BerkayAta 5 Posted May 4, 2014 Share Posted May 4, 2014 (edited) If I click to last (Son) page I am going to first page in ranking gilden. Screen : Ranking_gilden.php : <?PHP $CPSeite = 25; $markierteZeile=0; if(isset($_GET['p'])) { if(!checkInt($_GET['p']) || !($_GET['p']>0)) $aSeite = 1; else $aSeite = $_GET['p']; } else { $aSeite = 1; } if(isset($_POST['Arama']) && $_POST['Arama']=='Arama') { if(!empty($_POST['gilde'])) { $sqlCmd="SELECT id,name,master,level,exp,ladder_point, rang FROM ( SELECT id,name,master,level,exp,ladder_point, @num := @num +1 AS rang FROM ( SELECT id,name,master,level,exp,ladder_point, @num :=0 FROM player.guild ORDER BY level DESC, exp DESC, win DESC, ladder_point DESC ) AS t1 ) AS t2 WHERE name = '".mysql_real_escape_string($_POST['gilde'])."' LIMIT 1"; $sqlQry=mysql_query($sqlCmd,$sqlServ); if(mysql_num_rows($sqlQry)>0) { $getRang = mysql_fetch_object($sqlQry); $aSeite = ceil($getRang->rang/$CPSeite); $markierteZeile = $getRang->rang; } } } $sqlCmd = "SELECT COUNT(*) as summeChars FROM player.guild ORDER BY level DESC, exp DESC, win DESC, ladder_point DESC"; $sqlQry = mysql_query($sqlCmd,$sqlServ); $getSum = mysql_fetch_object($sqlQry); $cSeite = calcPages($getSum->summeChars,$aSeite,$CPSeite); ?> <div id="con-top">Lonca Sıralaması</div> <div id="con-mid"> <div class="center"> <form name="form"> <select name="link" SIZE="1" onChange="window.location.href = document.form.link.options[document.form.link.selectedIndex].value;"> <option selected value="#">Lonca Sıralaması</option> <option value="?s=ranking_chars">Karakter Sıralaması</option> </select> </form> <br/> <form action="?s=ranking_gilden" method="POST"> <b>Arama :</b> <input type="text" name="gilde" maxlength="20" size="20" class="txt"/> <input type="submit" name="Arama" value="Arama" maxlength="20" size="20" class="button"/> </form> </div> <table> <tr> <th class="topLine">Sıra</th> <th class="topLine">Ad</th> <th class="topLine">Başkan</th> <th class="topLine">Level</th> <th class="topLine">Exp</th> <th class="topLine">Puan</th> </tr> <?PHP $sqlCmd = "SELECT id,name,master,level,exp,ladder_point FROM player.guild ORDER BY level DESC, exp DESC, win DESC, ladder_point DESC LIMIT ".$cSeite[1].",".$CPSeite; $sqlQry = mysql_query($sqlCmd,$sqlServ); $x=$cSeite[1]+1; while($getPlayers = mysql_fetch_object($sqlQry)) { $zF = ($x%2==0) ? "thell" : "tdunkel"; if(checkInt($markierteZeile) && $markierteZeile==$x) { $zF = "tmarkiert"; } echo "<tr>"; echo "<td class="$zF">".$x."</td>"; echo "<td class="$zF"><a href='index.php?s=guild&guild=".$getPlayers->name."'>".$getPlayers->name."</a></td>"; echo "<td class="$zF"><a href='index.php?s=char&char=".charname($getPlayers->master)."'>".charname($getPlayers->master)."</a></td>"; echo "<td class="$zF">".$getPlayers->level."</td>"; echo "<td class="$zF">".$getPlayers->exp."</td>"; echo "<td class="$zF">".$getPlayers->ladder_point."</td>"; echo "</tr>"; $x++; } ?> </table> <div class="center"> <?PHP $maxRange = 4; $maxStep = 15; $totalpages = ceil(mysql_num_rows($sqlQry)/$CPSeite); if(($aSeite-$maxRange)>0) $sStart = $aSeite-$maxRange; else $sStart = 1; if(($aSeite+$maxRange)<=$cSeite[0]) $sEnde = $aSeite+$maxRange; else $sEnde = $cSeite[0]; if(($aSeite)>1) echo '<span class="ranking2"><a href="index.php?s=ranking_gilden&p=1">İlk</a></span> « '; for($i=$sStart;$i<=$sEnde;$i++) { $sKlasse = ($i==$aSeite) ? "ranking1" : "ranking2"; echo'<span class="'.$sKlasse.'">'; echo'<a href="index.php?s=ranking_gilden&p='.$i.'">'.$i.'</a></span>'; } if(($aSeite+$maxStep)<=$cSeite[0]) echo ' » <span class="ranking2"><a href="index.php?s=ranking_gilden&p='.$totalpages.'">Son</span></a>'; ?> </div> </div> <div id="con-bot"></div> Edited August 22, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Zetsu 78 Posted May 5, 2014 Share Posted May 5, 2014 look at the page link and tell me if you have a number after s=ranking_gilden&p= eg: s=ranking_gilden&p=123 Link to comment Share on other sites More sharing options...
BerkayAta 5 Posted May 5, 2014 Author Share Posted May 5, 2014 look at the page link and tell me if you have a number after s=ranking_gilden&p= eg: s=ranking_gilden&p=123 s=ranking_gilden&p=1 Link to comment Share on other sites More sharing options...
BerkayAta 5 Posted May 5, 2014 Author Share Posted May 5, 2014 Help Link to comment Share on other sites More sharing options...
BerkayAta 5 Posted May 6, 2014 Author Share Posted May 6, 2014 Help Link to comment Share on other sites More sharing options...
BerkayAta 5 Posted May 7, 2014 Author Share Posted May 7, 2014 I don't solved it Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now