mldo
New Member
- Joined
- Jun 29, 2014
- Messages
- 36
- Reaction score
- 0
Witam, ustawiłem w highscore żeby poziomował według reb'ów(resets) od najwiekszego do mniejszego, działa, ale jest problem ustawia według pierwszej liczy np. 100 reb bedzie niżej niz 9: tak to wyglada -> Test
PHP:
<?PHP
error_reporting(E_ALL & ~E_NOTICE);
ini_set('display_errors', '1');
$list = (isset($_REQUEST['list'])) ? $_REQUEST['list'] : '';
$page = (isset($_REQUEST['page'])) ? $_REQUEST['list'] : '';
// $vocation = array( 'All', 'Sorcerer', 'Druid', 'Paladin', 'Knight');
$vocation_id = (isset($_REQUEST['vocation_id'])) ? $_REQUEST['vocation_id'] : '';
switch($list)
{
case "fist":
$id = 0;
$list_name = 'Fist Fighting';
break;
case "club":
$id = 1;
$list_name = 'Club Fighting';
break;
case "sword":
$id = 2;
$list_name = 'Sword Fighting';
break;
case "axe":
$id = 3;
$list_name = 'Axe Fighting';
break;
case "distance":
$id = 4;
$list_name = 'Distance Fighting';
break;
case "shield":
$id = 5;
$list_name = 'Shielding';
break;
case "fishing":
$id = 6;
$list_name = 'Fishing';
break;
}
if(!isset($id))
if($list == "magic")
$list_name = "Magic Level";
else
{
$list_name = 'Experience';
$list = 'experience';
}
if(count($config['site']['worlds']) > 1)
{
$worlds .= '<i>Select world:</i> ';
foreach($config['site']['worlds'] as $idd => $world_n)
{
if($idd == (int) $_GET['world'])
{
$world_id = $idd;
$world_name = $world_n;
}
}
}
if($idd == (int) $_GET['world'])
{
$world_id = $idd;
$world_name = $world_n;
}
if(!isset($world_id))
{
$world_id = 0;
$world_name = $config['server']['serverName'];
}
$offset = $page * 100;
##################################### \/ by Dragonas
$main_content .= '<FORM ACTION="?subtopic=highscores&list='.$list.'" METHOD=post>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
<TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white><B>highscores Search</B></TD></TR>
<TR BGCOLOR='.$config['site']['darkborder'].'><TD>Only for vocation: <SELECT NAME="vocation_id">';
$main_content .= '<OPTION VALUE="a:a" ';
if('a:a' == $vocation_id)
$main_content .= 'SELECTED';
$main_content .= '>All';
foreach($vocation_name[0] as $prom => $arr)
foreach($arr as $voc_id => $voc_name)
{
if(($prom < 1) && ($voc_id != 0))
{
$main_content .= '<OPTION VALUE="'.$prom.';'.$voc_id.'"';
if($prom.';'.$voc_id == $vocation_id && $vocation_id != "a:a" && $vocation_id != '')
$main_content .= ' SELECTED';
$main_content .= '/>'.$voc_name;
}
}
$main_content .= '</SELECT><input type="hidden" name="order" value="'.$orderby.'"> <INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD><TR>
</TABLE></FORM>';
$vcc = $vocation_id;
$vcc = substr($vcc, 0, 1);
$vocation_id = substr($vocation_id, 2, 1);
if(($vcc != 'a') || ($vocation_id != 'a'))
$vocation_id = ($vcc * 4) + $vocation_id;
elseif($vocation_id = '')
$vocation_id = 'vocation';
else
$vocation_id = 'vocation';
if(($vocation_id < 1) || ($vocation_id > 4))
// || !int($vocation_id)
$vocation_id = 'vocation';