

Chyba na webu
Udelal jsem si an PC Server jedne hry pres Virtual box,portmapy,xampp na web a Hamachi.Na webu vse funguje i Server ale u Zbebricku a Registrace je chyba.U zebricku kde jsou pouice hracu je chyba nad nimy
Notice: Undefined index: max in C:\xampp\htdocs\system\rangliste.php on line 17
a pod jmeny
Notice: Use of undefined constant account_id - assumed 'account_id' in C:\xampp\htdocs\system\rangliste.php on line 52
Nekde je chyba na radku 52 a 17,ale nemohu najit kde.
Takto vypada cely soubory rangliste.php
<div id="content">
<div class="con_ui con_title"><h2>Kompletni zebricek</h2></div>
<div class="con_ui con_cont">
<div class="con_middle">
<style type="text/css">
.tr {
background:url(style/images/th.png);
width:485px;
height:30px;
}</style>
<?php
echo "<center>";
mysql_select_db('player');
$test = "SELECT * from player";
$testquery = mysql_query($test);
$num2 = mysql_num_rows($testquery);
if($_GET['max']) {
$get = $_GET['max'];
} else {
$get = '0';
$max = $get + 20;
$max2 = $get - 20;
if($get > $num2) { }
elseif($get >= 20 && $get < $num2) {
}
elseif ($num2 <= 20) { echo ""; }
else { }
echo "</center><br>";
?>
<center><div class="tr"><table border="0">
<tr>
<th width="50">Pozice</th>
<th width="270">Jmeno</th>
<th width="155">Level</th>
<th width="200">Exp</th>
<th width="110">Rise</th>
</tr>
</table></div></center>
<?php
mysql_select_db('player');
$rank = "SELECT * from player WHERE name NOT LIKE '[GA]%' and name NOT LIKE '[SGA]Invasio%' and name NOT LIKE '[SA]%' and name NOT LIKE '[SGM]%' LIMIT 50";
$query = mysql_query($rank);
echo "<center><table border=\"0\" width=\"458\">";
$i = 0;while($array = mysql_fetch_array($query)) {
$i = $i + 1;
echo "
<tr>
<th width=\"10\">".$i."</th>
<th width=\"270\">".$array["name"]."</th>
<th width=\"155\">".$array["level"]."</th>
<th width=\"200\">".$array["exp"]."</th>";
$reich = "SELECT empire from player_index where id = " . $array[account_id] . "";
$query2 = mysql_query($reich);
$array2 = mysql_fetch_array($query2);
if($array2["empire"] == 1) {
echo "<th width=\"100\"><img src=\"style/images/1.jpg\"></th></tr>";
} elseif($array2["empire"] == 2) {
echo "<th width=\"100\"><img src=\"style/images/2.jpg\"></th></tr>";
} else {
echo "<th width=\"100\"><img src=\"style/images/3.jpg\"></th></tr>";
}
}
echo "</table></center><br>"; // close table
}
?></div><div id="clear"></div>
</div>
<div class="con_ui con_bt"></div>
</div>
Tak to nevim,jeste tohle asi tak ne co?
Ne.
Tak to fakt nevim,zrejme si s tim budu muset nejak pohrat jako s tou prvni chybou.
Tak tohle porad nejde,ale je to jen 1 chyba bud casem opravim nebo to tak necham.Ale tahle chyba by sla opravit ne?Sice nechapu proc tam je to br.Jsou 2 ikonky na nejaky text a v nich je:v prvni
a v druhe
Zdroj:
Tohle by slo opravit,ne?Ale nenasel jsem jak.
Používáš nedefinované proměnné. Měl bys je předávat pomocí GET, ale z nějakého důvodu nepředáváš. Bez znalosti celého projektu se opět nedá pomoct.
Nebylo by jednodussi,sem dat odkaz na stazeni originalni verze aby jsi se podival sam?
Trávit hodiny studiem cizího projektu se mi opravdu nechce.
Tak dobre nevadi,kdyby neco napadlo tak se muzes ozvat.