[Release] Players Ranking + Page

KR373N

Well-Known Member
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>

Снимка:

88ede74adea95da74bea1a9f27a9be39.jpg


Файлове
 

Attachments

  • 1.gif
    1.gif
    949 bytes · Views: 665
  • offline.gif
    offline.gif
    310 bytes · Views: 667
  • online.gif
    online.gif
    326 bytes · Views: 668
Last edited:
не би трябвало да имате проблеми на който и да било Web Pack

Мисля, че само в MuWeb се има функцията clean_var?

Отгоре сложи:
PHP:
if(!function_exists('clean_var')){
function clean_var.......
}
 
мм дам аз защото си бачкам с Muweb и затова забраих за
PHP:
if(!function_exists('clean_var')){
function clean_var.......
}


ето малко по скъсен код :)

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) 
{ $color = 'gold'; $rank = "<img src=images/one.gif>"; } else { $color = 'silver';}


if($guilds['G_Name']==NULL) { $guilds['G_Name'] = '<font color="$color">-</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=$color>$rank</td>
<td bgcolor='#555555' border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center class=link_menu><font color=$color>$row[Name]</a></td>
<td bgcolor='#555555' border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=$color>$row[cLevel]</td>
<td bgcolor='#555555' border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><strong><font color=$color>[</strong><font color=$color>$row[Resets]</font><strong><font color=$color>]</strong></td>
<td bgcolor='#555555' border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=$color>$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=$color>$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>
 
Last edited:
  • Like
Reactions: MadBoy
Great But The First in ranking not show the 1st image. i have put it on images file but not show it.
 
Change Name of images 1.gif in one.gif

ty. can u make me that image and for the most 5 players e.g. now the image show 1 and a cup i wanna more 4 images with numbers 2 + cup 3+cup 4+cup 5 +cup . please if it easy make it.
 

ty. can u make me that image and for the most 5 players e.g. now the image show 1 and a cup i wanna more 4 images with numbers 2 + cup 3+cup 4+cup 5 +cup . please if it easy make it.

New Update

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) 
{ $color = 'gold'; 
$rank = "<img src=images/one.gif>"; 
} 
else 
{ 
$color = 'silver';
} 
if($rank == 2)
{
$rank = '<img src=images/two.gif>';
}
if($rank == 3)
{
$rank = '<img src=images/tru.gif>';
}
if($rank == 4)
{
$rank = '<img src=images/4.gif>';
}
if($rank == 5)
{
$rank = '<img src=images/4.gif>';
}
if($guilds['G_Name']==NULL) { $guilds['G_Name'] = '<font color="$color">-</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=$color>$rank</td>
<td bgcolor='#555555' border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center class=link_menu><font color=$color>$row[Name]</a></td>
<td bgcolor='#555555' border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=$color>$row[cLevel]</td>
<td bgcolor='#555555' border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><strong><font color=$color>[</strong><font color=$color>$row[Resets]</font><strong><font color=$color>]</strong></td>
<td bgcolor='#555555' border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=$color>$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=$color>$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>


TOP 5 Character In Ranking
Screen:
dface560e95cb9ab5ba11cce57ab08ea.png
 

Attachments

  • tru.gif
    tru.gif
    942 bytes · Views: 600
  • two.gif
    two.gif
    945 bytes · Views: 599
  • 4.gif
    4.gif
    945 bytes · Views: 604
Last edited:
  • Like
Reactions: MadBoy
Next Update Special Status Character

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  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=silver>#</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' width=115 align=center><font color=silver>Name</a></td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=silver>Level</a></td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=silver>Resets</a></td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' width=150 align=center><font color=silver>Class</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' width=9 align=center><font color=silver>Status</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' width=70 align=center><font color=silver>Guild</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' width=120 align=center><font color=silver>Special</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) 
{ $color = 'gold'; 
$rank = "<img src=images/one.gif>"; 
} 
else 
{ 
$color = 'silver';
} 
if($rank == 2)
{
$rank = '<img src=images/two.gif>';
}
if($rank == 3)
{
$rank = '<img src=images/tru.gif>';
}
if($rank == 4)
{
$rank = '<img src=images/4.gif>';
}
if($rank == 5)
{
$rank = '<img src=images/4.gif>';
}
if($row['CtlCode'] == 0)
{
$row['CtlCode'] = '<font color=green><b>Normal</b></font>';
}
if($row['CtlCode'] == 1)
{
$row['CtlCode'] = '<font color=darkred><b><s>Banned</s></b></font>';
}
if($row['CtlCode'] == 32)
{
$row['CtlCode'] = '<font color=red><b>Game Master</b></font>';
}
if($guilds['G_Name']==NULL) { $guilds['G_Name'] = '<font color="$color">-</font>'; $link =""; } else { $link ="<a href='?op=guild&guild=".htmlspecialchars($guilds['G_Name'])."'>"; }
if(!$row){ break; }

echo "<tr cellpadding='2' cellspacing='1' >
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=$color>$rank</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center class=link_menu><font color=$color>$row[Name]</a></td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=$color>$row[cLevel]</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><strong><font color=$color>[</strong><font color=$color>$row[Resets]</font><strong><font color=$color>]</strong></td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=$color>$classes</td>


<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center>$status</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' class=link_menu align=center><font color=$color>$guilds[G_Name]</font></a></td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' class=link_menu align=center><font color=$color>$row[CtlCode]</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>



Screen

c7d882c13179c48f1b2c2067be80d3a4.png
 

Attachments

  • NewUpdate.png
    NewUpdate.png
    24.5 KB · Views: 62
Last edited:
Next Update Special Status Character

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  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=silver>#</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' width=115 align=center><font color=silver>Name</a></td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=silver>Level</a></td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=silver>Resets</a></td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' width=150 align=center><font color=silver>Class</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' width=9 align=center><font color=silver>Status</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' width=70 align=center><font color=silver>Guild</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' width=120 align=center><font color=silver>Special</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) 
{ $color = 'gold'; 
$rank = "<img src=images/one.gif>"; 
} 
else 
{ 
$color = 'silver';
} 
if($rank == 2)
{
$rank = '<img src=images/two.gif>';
}
if($rank == 3)
{
$rank = '<img src=images/tru.gif>';
}
if($rank == 4)
{
$rank = '<img src=images/4.gif>';
}
if($rank == 5)
{
$rank = '<img src=images/4.gif>';
}
if($row['CtlCode'] == 0)
{
$row['CtlCode'] = '<font color=green><b>Normal</b></font>';
}
if($row['CtlCode'] == 1)
{
$row['CtlCode'] = '<font color=darkred><b><s>Banned</s></b></font>';
}
if($row['CtlCode'] == 32)
{
$row['CtlCode'] = '<font color=red><b>Game Master</b></font>';
}
if($guilds['G_Name']==NULL) { $guilds['G_Name'] = '<font color="$color">-</font>'; $link =""; } else { $link ="<a href='?op=guild&guild=".htmlspecialchars($guilds['G_Name'])."'>"; }
if(!$row){ break; }

echo "<tr cellpadding='2' cellspacing='1' >
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=$color>$rank</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center class=link_menu><font color=$color>$row[Name]</a></td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=$color>$row[cLevel]</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><strong><font color=$color>[</strong><font color=$color>$row[Resets]</font><strong><font color=$color>]</strong></td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center><font color=$color>$classes</td>


<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' align=center>$status</td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' class=link_menu align=center><font color=$color>$guilds[G_Name]</font></a></td>
<td  border='1' bordercolor='black'  style='border-collapse: collapse; border: 1px solid black' class=link_menu align=center><font color=$color>$row[CtlCode]</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>



Screen

c7d882c13179c48f1b2c2067be80d3a4.png

You Are Master. ;)
 
Last edited:
На мен ми дава грешки на тази табличка на втори, трети и четвърти ред:

$page = clean_var($_GET['page']);
$mode = clean_var($_GET['mode']);
$class = clean_var($_GET['class']);
 
Last edited:
На мен ми дава грешки на тази табличка на втори, трети и четвърти ред:

$page = clean_var($_GET['page']);
$mode = clean_var($_GET['mode']);
$class = clean_var($_GET['class']);

я създай 1 файл с името clean_var.php след това го постави в папката includes след това сложи този код

PHP:
<?PHP
if (eregi("includes/clean_var.php", $_SERVER['SCRIPT_NAME'])) { die ("Access Denied!"); }
function clean_var($var=NULL) {
$newvar = @preg_replace('/[^a-zA-Z0-9\_\-\.]/', '', $var);
if (@preg_match('/[^a-zA-Z0-9\_\-\.]/', $var)) { }
return $newvar;
}

function secure($str)
{
 if(strpos(str_replace("''",""," $str"),"'")!=false)  return str_replace("'", "''", $str);
 else  return $str;
}
?>

запази файла

отвори index.php и добави където имаш
PHP:
include("config.php");
сложи под него
PHP:
include("includes/clean_var.php");
Записваш index.php и тествай ако не бачка пиши тук
 
Last edited:
Пак същатите грешки ми дава, междудругото съм с Екстайлинг уеб
 
я ми дай линк да го сваля да си го инстал и да права кода и щом го оправа кода ще ти го дам за Xtyling web :)
 
Заповядай DOX.bg - Файл организатор за лесно споделяне и съхранение на файлове това е сайта който ползвам аз, благодаря ти : )~



направен е направо с този сайт който си ти просто съм едитнал кода :) и бачка на 6 добавил съм ти всичко

PHP:
<?php include"home.php"; ?>
<div align="center">
  <table align="center" border="1" bordercolor="#666666" bgcolor=white cellpadding="0" cellspacing="0" frame="vsides" rules="none" width="760">
    <tbody><tr> 
      <td align="left" background="images/left_bg.gif" valign="top" width="204"><p><img src="images/left_top_news.gif" height="36" width="204">
        <?php include"pictures.php"; ?>
        <?php include"ranks.php"; ?>
        </p></td>
      <td background="images/xu.gif" height="190" width="1"></td>
      <td align="center" valign="top" width="553"><p>
        <?
include("paginator.php"); 
include("config.php");
require_once "sql_inject.php"; 
include_once('sql_check.php');
_OQE01();




$_I60iQ = TRUE; 
$_I61tI = 'index.php'; 
$_I61tL = new _OQF0A('./log_file_sql.log',$_I60iQ,$_I61tI)  ; 

$_I6QfO = mssql_query("SELECT count(*) FROM Character");
$_I6Q8f  = mssql_result($_I6QfO, 0, 0);
$_I6I1C =& new _OQQF1($_GET['page'],$_I6Q8f);


$_I6I1C->_OQQFL($_I6IL6); 
$_I6I1C->_OQL8R(15);
$_I6j0l = $_I6I1C->_OQJ8Q();  
$_I6j8f = $_I6I1C->_OQJFR();  

$_I6joJ = 'SELECT TOP ';
$_I6joJ .= $_I6j0l + $_I6j8f;
$_I6joJ .= ' Name,Class,Resets,Money,PkCount,cLevel,CtlCode,AccountID from Character  order by Resets desc, cLevel desc, name asc';
$_I6J8j = mssql_query($_I6joJ);
$connect = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$$_I6joJ[7]'");
$conn =  mssql_fetch_array($connect);

echo '<TABLE border=0 bordercolor=#666666 cellPadding=0 cellSpacing=0 >
                          <TBODY>
                          <TR>
                            
                         
    <TD align=left vAlign=top> 
                               
                              
  </TR>
                          <TR>
                            <TD align=center  
                            vAlign=top>
                              <TABLE border=0 cellPadding=0 cellSpacing=0  
                            
                                <TBODY>
                                <TR>
                                        
<TD align=middle vAlign=center><br><font color=red size=2>Top Players</font>
<br></br>
<table height=10 border="0" cellpadding="5" cellspacing="0" width="98%" bordercolor=#666666>               
<tr> 
<td valign=top align=center bgcolor=#c6c6c6 width=45><font color=#000000>Rank</td>
<td valign=top align=center bgcolor=#c6c6c6 width=100><font color=#000000>Name</td>
<td valign=top align=center bgcolor=#c6c6c6 width=60><font color=#000000>Class</td>
<td valign=top align=center bgcolor=#c6c6c6 width=60><font color=#000000>cLevel</td>
<td valign=top align=center bgcolor=#c6c6c6 width=60><font color=#000000>Resets</td>
<td valign=top align=center bgcolor=#c6c6c6 width=160><font color=#000000>Special</td>
<td valign=top align=center bgcolor=#c6c6c6 width=60><font color=#000000>Status</td>
<td valign=top align=center bgcolor=#c6c6c6 width=100><font color=#000000>Money</td>
<td valign=top align=center bgcolor=#c6c6c6 width=50><font color=#000000>PK</td>

</tr>';

$_I6JC6 = 'black'; 

for ($_I6JL6=0;$_I6JL6 < $_I6j0l; ++$_I6JL6) {
 	$_I66L1 = mssql_fetch_row($_I6J8j);
}
for($_I6fCf=0;$_I6fCf < mssql_num_rows($_I6J8j)-$_I6j0l;++$_I6fCf) {
	$_I66L1 = mssql_fetch_row($_I6J8j);




$_I6fi1 = $_I6fCf + $_I6j0l +1;

if($_I66L1[1] == 0){ $_I66L1[1] ='DW';
}
if($_I66L1[1] == 1){ $_I66L1[1] ='SM';
}
if($_I66L1[1] == 16){ $_I66L1[1] ='DK';
}
if($_I66L1[1] == 17){ $_I66L1[1] ='BK';
}
if($_I66L1[1] == 32){ $_I66L1[1] ='ELF';
}
if($_I66L1[1] == 33){ $_I66L1[1] ='ME';
}
if($_I66L1[1] == 48){ $_I66L1[1] ='MG';
}
if($_I66L1[1] == 64){ $_I66L1[1] ='DL';
}
if($_I66L1[6] == 0) { $_I66L1[6] = '<font color=green>Normal</font>';
}
if($_I66L1[6] == 1) { $_I66L1[6] = '<font color=darkred><s>Banned</s></font>';
}

	
$_I68j8 = '0';
if ($_I6JC6 == 'black') {
$_I6JC6 = 'darkblue';
$_I686t = 'white';
$_I68j8 = '1'; }
if ($_I6JC6 == 'darkblue') {
if ($_I68j8 != '1') {
$_I6JC6 = 'black';
$_I686t = '#f4f4f4'; } }
if ($_I6fi1 == '1') {
$_I686t = 'darkorange'; }

$_I6tQl = $_I6JL6 + 1; 
if($_I66L1[6] == 8) { $_I66L1[6] = '<font color=red>Game Master</font>';
}	
if($_I66L1[6] == 32) { $_I66L1[6] = '<font color=red>Game Master</font>';
}
if($_I6fi1 == 1) { $_I6fi1 = '<img src=images/one.gif>';
}
if($_I6fi1 == 2) { $_I6fi1 = '<img src=images/two.gif>';
}
if($_I6fi1 == 3) { $_I6fi1 = '<img src=images/tru.gif>';
}
if($_I6fi1 == 4) { $_I6fi1 = '<img src=images/4.gif>';
}
if($_I6fi1 == 5) { $_I6fi1 = '<img src=images/4.gif>';
}
if($conn['ConnectStat'] == 1 AND $rows['GameIDC'] == $row['Name']) { $status ='<img src=images/online.gif>'; }
else { $status='<img src=images/offline.gif></a>'; }

echo "<tr>
<td valign=top align=center bgcolor=$_I686t width=45><font color=#666666>$_I6fi1</td>
<td valign=top align=center bgcolor=$_I686t width=100><font color=#666666>$_I66L1[0]</td>
<td valign=top align=center bgcolor=$_I686t width=60><font color=#666666>$_I66L1[1]</td>
<td valign=top align=center bgcolor=$_I686t width=60><font color=#666666>$_I66L1[5]</td>
<td valign=top align=center bgcolor=$_I686t width=60><font color=#666666>$_I66L1[2]</td>
<td valign=top align=center bgcolor=$_I686t width=100><font color=#666666>$_I66L1[6]</td>
<td valign=top align=center bgcolor=$_I686t width=100><font color=#666666>$status</td>
<td valign=top align=center bgcolor=$_I686t width=100><font color=#666666>$_I66L1[3]</td>
<td valign=top align=center bgcolor=$_I686t width=50><font color=#666666>$_I66L1[4]</td>

</tr>";
}

?>


            

     </tbody> 
                </table><br>

<?

	         if($_I6I1C->_OQBQO()==1)
		         {
		         $_I6OQ1 = "First <b>|</b> ";
		         } else { $_I6OQ1="<a href=\"" .  $_I6I1C->_OQBE8() . "?op=rankings&page=" . $_I6I1C->_OQ8PA() . "\">First</a> <b>|</b>"; }  
					 //check to see that _OQA6E() is returning a value. If not there will be no link.
		       if($_I6I1C->_OQA6E())
		         {
		         $_I6OQt = "<a href=\"" .  $_I6I1C->_OQBE8() . "?op=rankings&page=" . $_I6I1C->_OQA6E() . "\">Prev</a> <b>|</b> ";
		         } else { $_I6OQt="Prev <b>|</b> "; }
		       //check to see that _OQCPE() is returning a value. If not there will be no link.
	         if($_I6I1C->_OQCPE())
		         {
		         $_I6OtQ = "<a href=\"" . $_I6I1C->_OQBE8() . "?op=rankings&page=" . $_I6I1C->_OQCPE() . "\">Next</a> <b>|</b> ";
		         } else { $_I6OtQ="Next <b>|</b> "; }
		
		       //check to see that _OQP8A() is returning a value. If not there will be no link.
		       if($_I6I1C->_OQP8A())
		         {
		         $_I6oJj = "<a href=\"" . $_I6I1C->_OQBE8() . "?op=rankings&page=" . $_I6I1C->_OQP8A() . "\">Last</a>";
		         } else { $_I6oJj="Last"; }
						 //since these will always exist just print out the values.  Result will be
						 //something like 1 of 4 of 25
		          echo  $_I6I1C->_OQ6LP() . " of " .$_I6I1C->_OQ6FC() . " of " . $_I6I1C->_OQLPB() . " ";
							//print the values determined by the if statements above.
		          echo $_I6OQ1 . " " . $_I6OQt . " " . $_I6OtQ . " " . $_I6oJj;
					//==============================================================================
					//end of example
	?><p><table><p>
    <p></table>
</div>
</body></html>

Года ти е готов тестван работи ако има някъв проблем пиши :)

прикачих снимка да видиш как е :)
 

Attachments

  • images.zip
    2.1 KB · Views: 16
  • xtyling.png
    xtyling.png
    8.5 KB · Views: 47
Last edited: