- Joined
- May 18, 2008
- Messages
- 1,943
- Reaction score
- 446
това е моят стар Ранк лист реших да го споделя с вас ако ви харесва да го ползвате не би трябвало да имате проблеми на който и да било Web Pack ето го и него
Снимка:
Файлове
PHP:
<?
$page = clean_var($_GET['page']);
$mode = clean_var($_GET['mode']);
$class = clean_var($_GET['class']);
//Decode Class Mode
if($class == '') { $classmode = ""; }
elseif($class == 0) { $classmode = "WHERE Class='0'"; }
elseif($class == 1) { $classmode = "WHERE Class='1'"; }
elseif($class == 16) { $classmode = "WHERE Class='16'"; }
elseif($class == 17) { $classmode = "WHERE Class='17'"; }
elseif($class == 32) { $classmode = "WHERE Class='32'"; }
elseif($class == 33) { $classmode = "WHERE Class='33'"; }
elseif($class == 48) { $classmode = "WHERE Class='48'"; }
if ($mode == '') { $search = "SELECT * FROM Character $classmode order by Resets desc,cLevel desc"; }
if ($mode == 5) {
if($classmode !='') { $classmode = str_replace('WHERE','AND',$classmode); }
$search = "SELECT Character.*,MEMB_STAT.ServerName FROM AccountCharacter,MEMB_STAT,Character WHERE MEMB_STAT.ConnectStat=1 AND AccountCharacter.Id=MEMB_STAT.memb___id AND Character.AccountID=MEMB_STAT.memb___id AND AccountCharacter.GameIDC=Character.Name $classmode ORDER by Resets desc,cLevel desc"; }
if($page == '') { $page = 1; }
$RowPerPage = 25;
$startRows = ($page-1)*$RowPerPage + 0;
$msquery = "$search";
$msresults= mssql_query($msquery);
$num_of_rows = mssql_num_rows ($msresults);
@mssql_data_seek($msresults, $startRows);
$total_pages = ceil($num_of_rows / $RowPerPage);
echo "<table cellpadding='2' cellspacing='1' align='center' class='text_statistics' >
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=silver>#</td>
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' width=115 align=center><font color=silver>Name</a></td>
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=silver>Level</a></td>
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=silver>Resets</a></td>
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' width=150 align=center><font color=silver>Class</td>
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' width=9 align=center><font color=silver>Status</td>
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' width=70 align=center><font color=silver>Guild</td><tr>";
for($i=0; $i<$RowPerPage; $i++) {
$row = mssql_fetch_array($msresults);
$connect = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$row[AccountID]'");
$conn = mssql_fetch_array($connect);
$querys = mssql_query("SELECT * FROM AccountCharacter WHERE id='$row[AccountID]'");
$rows = mssql_fetch_array($querys);
$guild_mem = mssql_query("SELECT * FROM GuildMember WHERE name='$row[Name]'");
$guild = mssql_fetch_array($guild_mem);
$guild_info = mssql_query("SELECT * FROM Guild WHERE g_name='$guild[G_Name]'");
$guilds = mssql_fetch_array($guild_info);-
$memb = mssql_query("SELECT COUNT(*) FROM GuildMember WHERE G_Name='$guild[G_Name]'");
$totalmemb = mssql_result($memb, 0, 0);
$rank = $i + $startRows+1;
if($conn['ConnectStat'] == 1 AND $rows['GameIDC'] == $row['Name']) { $status ='<img src=images/online.gif>'; }
else { $status='<img src=images/offline.gif></a>'; }
//Class
if ($row['Class'] == 0) { $classes = "Dark Wizzard"; }
if ($row['Class'] == 1) { $classes = "Soul Master"; }
if($row['Class'] == 2) { $classes = "Grand Master"; }
if($row['Class'] == 16) { $classes = "Dark Knight"; }
if($row['Class'] == 17) { $classes = "Blade Knight"; }
if($row['Class'] == 18) { $classes = "Blade Master"; }
if($row['Class'] == 32) { $classes = "Elf"; }
if($row['Class'] == 33) { $classes = "Muse Elf"; }
if($row['Class'] == 34) { $classes = "High Elf"; }
if($row['Class'] == 48) { $classes = "Magic Gladiator"; }
if($row['Class'] == 50) { $classes = "Duel Master"; }
if($row['Class'] == 64) { $classes = "Dark Lord"; }
if($row['Class'] == 66) { $classes = "Lord Emporer"; }
if($row['Class'] == 80) { $classes = "Summoner"; }
if($row['Class'] == 81) { $classes = "Bloody Summoner"; }
if($row['Class'] == 82) { $classes = "Dimension Master"; }
if ($rank == 1) {
$row['Name'] = "<font color=gold>$row[Name]</font>";
$rank = "<font color=gold>$rank</font>";
$row['cLevel'] = "<font color=gold>$row[cLevel]</font>";
$row['Resets'] = "<font color=gold>$row[Resets]</font>";
$classes = "<font color=gold>$classes</font>";
$guilds['G_Name'] = "<font color=gold>$guilds[G_Name]</font>";
$rank = "<img src=images/one.gif>";}
if($guilds['G_Name']==NULL) { $guilds['G_Name'] = '<font color="silver">-</font>'; $link =""; } else { $link ="<a href='?op=guild&guild=".htmlspecialchars($guilds['G_Name'])."'>"; }
if(!$row){ break; }
echo "<tr cellpadding='2' cellspacing='1' >
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=silver>$rank</td>
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center class=link_menu><font color=silver>$row[Name]</a></td>
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=silver>$row[cLevel]</td>
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><strong><font color=silver>[</strong><font color=red>$row[Resets]</font><strong><font color=silver>]</strong></td>
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center><font color=silver>$classes</td>
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' align=center>$status</td>
<td bgcolor='#555555' border='1' bordercolor='black' style='border-collapse: collapse; border: 1px solid black' class=link_menu align=center><font color=silver>$guilds[G_Name]</font></a></td>";
}
?></table><br>
<table bgcolor='#555555' class='text_statistics' align='center' border='0' class='alt5'><?
//Link for First Page
if($page > 5) { echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode\">First</a></td>"; }
//Link for Prev
if($page > 1){ echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=".($page - 1)."\"><<<</a></td>"; }
//Link for Prev Page 5
if(5 < $page) { echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=".($page-5)."\">[#".($page-5)."]</a></td>"; }
//Link for Prev Page 4
if(4 < $page) { echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=".($page-4)."\">[#".($page-4)."]</a></td>"; }
//Link for Prev Page 3
if(3 < $page) { echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=".($page-3)."\">[#".($page-3)."]</a></td>"; }
//Link for Prev Page 2
if(2 < $page) { echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=".($page-2)."\">[#".($page-2)."]</a></td>"; }
//Link for Prev Page 1
if(1 < $page) { echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=".($page-1)."\">[#".($page-1)."]</a></td>"; }
//Show Current Page
if($num_of_rows >0) { echo "<td title='Currently see page:$page'>[<b>".($startRows+1)."-".($RowPerPage+$startRows)."</b>]</td>"; }
//Link for Next page 1
if($page < $total_pages) { echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=".($page+1)."\">[#".($page+1)."]</a></td>"; }
//Link for Next page 2
if(($page+1) < $total_pages) { echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=".($page+2)."\">[#".($page+2)."]</a></td>"; }
//Link for Next page 3
if(($page+2) < $total_pages) { echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=".($page+3)."\">[#".($page+3)."]</a></td>"; }
//Link for Next page 4
if(($page+3) < $total_pages) { echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=".($page+4)."\">[#".($page+4)."]</a></td>"; }
//Link for Next page 5
if(($page+4) < $total_pages) { echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=".($page+5)."\">[#".($page+5)."]</a></td>"; }
//Link for Next Page
if($page < $total_pages){ echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=".($page + 1)."\">>>></a></td>"; }
//Draw Link For Last Page
if(($page+5) < $total_pages){ echo "<td><a href=\"".$_SERVER['PHP_SELF']."?op=rankings&mode=$mode&page=$total_pages\">Last</a></td>"; }
?></table>
Снимка:
Файлове
Attachments
Last edited: