02/11/2010, 15:22
|
| | Fecha de Ingreso: junio-2010
Mensajes: 10
Antigüedad: 14 años, 6 meses Puntos: 0 | |
Respuesta: Problemas con los includes Este es el codigo completo de la pagina:
Código:
<?php
include("../include/config.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<div class="ntitle">Bienvenidos a Angeles Caidos</div>
<img class="linija" width="450" height="2" src="img/line.gif" style="margin-bottom:20px;"/>
<?php
$i=1;
$mysqlgame = mysql_connect( $dbhost, $dbuser, $dbpass ) or die ("Can't connect to MySQL server [Wrong login or pass !]");
mysql_select_db( $dbname, $mysqlgame ) or die( "Can't connect to MySQL server [Wrong dbgame or mysql is turned off !]" );
mysql_query("set names 'UTF8'");
if (isset($_GET['class'])) {
$class = mysql_real_escape_string($_GET['class']);
$query = mysql_query("SELECT name, exp, race, player_class, online FROM `players` WHERE player_class = '".$class."' ORDER BY exp DESC LIMIT 25");
}
else {
$query = mysql_query("SELECT name, exp, race, player_class, online FROM `players` WHERE exp>1 ORDER BY exp DESC LIMIT 25");
}
?>
<table width='100%' border='0' cellpadding='0' cellspacing='0'>
<tr align='center'>
<td width="10%">
<font size='2'><b><u>Rank</u></b><br />
</td>
<td width="25%">
<font size='2'><b><u>Nick</u></b><br />
</td>
<td width="10%">
<font size='2'><b><u>Level</u></b><br />
</td>
<td width="14%">
<font size='2'><b><u>Raza</u></b><br />
</td>
<td width="14%">
<font size='2'><b><u>Clase</u></b><br />
</td>
<td width="14%">
<font size='2'><b><u>Online</u></b><br />
</td>
</tr>
<?php
while($case = mysql_fetch_array($query)){
if ($case["exp"] <= '0') {$exp = "1";}
elseif ($case["exp"] <= '650') {$exp = "1";}
elseif ($case["exp"] <= '1917') {$exp = "2";}
elseif ($case["exp"] <= '4230') {$exp = "3";}
elseif ($case["exp"] <= '8693') {$exp = "4";}
elseif ($case["exp"] <= '14583') {$exp = "5";}
elseif ($case["exp"] <= '22885') {$exp = "6";}
elseif ($case["exp"] <= '34936') {$exp = "7";}
elseif ($case["exp"] <= '52435') {$exp = "8";}
elseif ($case["exp"] <= '73125') {$exp = "9";}
elseif ($case["exp"] <= '94104') {$exp = "10";}
elseif ($case["exp"] <= '130995') {$exp = "11";}
elseif ($case["exp"] <= '169608') {$exp = "12";}
elseif ($case["exp"] <= '217175') {$exp = "13";}
elseif ($case["exp"] <= '266649') {$exp = "14";}
elseif ($case["exp"] <= '326185') {$exp = "15";}
elseif ($case["exp"] <= '392297') {$exp = "16";}
elseif ($case["exp"] <= '522080') {$exp = "17";}
elseif ($case["exp"] <= '669713') {$exp = "18";}
elseif ($case["exp"] <= '817822') {$exp = "19";}
elseif ($case["exp"] <= '1000147') {$exp = "20";}
elseif ($case["exp"] <= '1235094') {$exp = "21";}
elseif ($case["exp"] <= '1609877') {$exp = "22";}
elseif ($case["exp"] <= '2001924') {$exp = "23";}
elseif ($case["exp"] <= '2348658') {$exp = "24";}
elseif ($case["exp"] <= '2686741') {$exp = "25";}
elseif ($case["exp"] <= '3117416') {$exp = "26";}
elseif ($case["exp"] <= '3602261') {$exp = "27";}
elseif ($case["exp"] <= '4012536') {$exp = "28";}
elseif ($case["exp"] <= '4676472') {$exp = "29";}
elseif ($case["exp"] <= '5828232') {$exp = "30";}
elseif ($case["exp"] <= '6808242') {$exp = "31";}
elseif ($case["exp"] <= '8091124') {$exp = "32";}
elseif ($case["exp"] <= '9689407') {$exp = "33";}
elseif ($case["exp"] <= '12669129') {$exp = "34";}
elseif ($case["exp"] <= '16124465') {$exp = "35";}
elseif ($case["exp"] <= '19742022') {$exp = "36";}
elseif ($case["exp"] <= '26021841') {$exp = "37";}
elseif ($case["exp"] <= '29936163') {$exp = "38";}
elseif ($case["exp"] <= '36147970') {$exp = "39";}
elseif ($case["exp"] <= '42173920') {$exp = "40";}
elseif ($case["exp"] <= '49355480') {$exp = "41";}
elseif ($case["exp"] <= '57959880') {$exp = "42";}
elseif ($case["exp"] <= '64372369') {$exp = "43";}
elseif ($case["exp"] <= '70382402') {$exp = "44";}
elseif ($case["exp"] <= '73867010') {$exp = "45";}
elseif ($case["exp"] <= '84528173') {$exp = "46";}
elseif ($case["exp"] <= '97508511') {$exp = "47";}
elseif ($case["exp"] <= '112426441') {$exp = "48";}
elseif ($case["exp"] <= '128909893') {$exp = "49";}
elseif ($case["exp"] <= '146070028') {$exp = "50";}
elseif ($case["exp"] <= '177464778') {$exp = "51";}
elseif ($case["exp"] <= '204255001') {$exp = "52";}
elseif ($case["exp"] <= '236485764') {$exp = "53";}
elseif ($case["exp"] <= '271392354') {$exp = "54";}
elseif ($case["exp"] <= '341728469') {$exp = "55";}
if ($case["race"] == 'ELYOS') {$race = "<img src='img/ely.png' title='Elyos' />";}
elseif ($case["race"] == 'ASMODIANS') {$race = "<img src='img/asmo.png' title='Asmodians' />";}
if ($case["player_class"] == 'WARRIOR') {$player_class1 = "<img src='img/warrior.png' title='Warrior'>";}
elseif ($case["player_class"] == 'GLADIATOR') {$player_class1 = "<img src='img/gladiator.png' title='Gladiator'>";}
elseif ($case["player_class"] == 'TEMPLAR') {$player_class1 = "<img src='img/templar.png' title='Templar'>";}
elseif ($case["player_class"] == 'SCOUT') {$player_class1 = "<img src='img/scout.png' title='Scout'> ";}
elseif ($case["player_class"] == 'ASSASSIN') {$player_class1 = "<img src='img/assassin.png' title='Assassin'>";}
elseif ($case["player_class"] == 'RANGER') {$player_class1 = "<img src='img/ranger.png' title='Ranger'>";}
elseif ($case["player_class"] == 'MAGE') {$player_class1 = "<img src='img/mage.png' title='Mage'>";}
elseif ($case["player_class"] == 'SORCERER') {$player_class1 = "<img src='img/sorcerer.png' title='Sorcerer'>";}
elseif ($case["player_class"] == 'SPIRIT_MASTER') {$player_class1 = "<img src='img/spiritmaster.png' title='Spirit Master'>";}
elseif ($case["player_class"] == 'PRIEST') {$player_class1 = "<img src='img/priest.png' title='Priest'>";}
elseif ($case["player_class"] == 'CLERIC') {$player_class1 = "<img src='img/cleric.png' title='Cleric'>";}
elseif ($case["player_class"] == 'CHANTER') {$player_class1 = "<img src='img/chanter.png' title='Chanter'>";}
if($case["online"] == '0') {$online = "<img src='img/ico-off.png' title='Offline' />";}
elseif($case["online"] == '1') {$online = "<img src='img/ico-on.png' title='Online' />";}
echo "
<tr align='center'>
<td><font size='2'>".$i."</font></td>
<td><font size='2'>".$case['name']."</font></td>
<td><font size='2'>".$exp."</font></td>
<td><font size='2'>".$race."</font></td>
<td><font size='2'>".$player_class1."</font></td>
<td><font size='2'>".$online."</font></td>
</tr>";
$i++;
}
?>
</span></p>
</table>
</body>
</html>
|