<?
/*
//||||||||||||||||||||||||||||||||||||||||||||||||\\
\\*          SUPER HERO MOD WEB STATS 3.0         //
//                                                \\
\\  Written By ShadowLeader aka 123 (Tim Hansen)  //
//                                                \\
\\              http://SH-MOD.TK                  //
//          Email: shadowleader@jubii.dk          \\
\\          MSN: shadowleader11@hotmail.com       //
//                                                \\
\\   You are allowed to edit anything in these    //
//     files, as long as these lines remain.      \\
\\                                                //
//   If you have any trouble with the system,     \\
\\       go to www.SH-MOD.TK to get help.         //
//                                                \\
\\   Thanks to:                                   //
//   AlleyKat - Help with Template system         \\
\\   MajesticM00se - A little code                //
//   Vittu - Finding bugs                         \\
\\||||||||||||||||||||||||||||||||||||||||||||||||//
*/

require "include/header.php";

dbconn(true);

stdhead();
/////////START/////////
?>
<?
	if($_GET["sort"] == "level"){
	$result = mysql_query("SELECT * FROM sh_hero_database ORDER BY sh_level DESC") or die(mysql_error());
	}else{
	$result = mysql_query("SELECT * FROM sh_hero_database ORDER BY sh_name") or die(mysql_error());
	}
	
	$totalheroes = mysql_num_rows($result);
	echo"<table class=\"borders\" cellpadding=\"0\" cellspacing=\"2\" width=100%>
	<tr>
    <td valign=\"top\"><b><a href=\"".$_SERVER['PHP_SELF']."\">Hero Name</a></b> ($totalheroes Heroes)</td>
	<td valign=\"top\"><b><a href=\"".$_SERVER['PHP_SELF']."?sort=level\">Level</a></b></td>";
	if($allow_dl == "1"){
	echo"<td valign=\"top\"><b>Download</b></td>";
	}else{echo"";}
	echo"</tr>";
	while($row = mysql_fetch_array($result)) 
	{
	echo"<tr>
    <td width=30% valign=\"top\"><a href=\"sh_hero.php?hero=$row[sh_name]\">$row[sh_name]</a></td>
	<td width=30% valign=\"top\">$row[sh_level]</td>";
	if($allow_dl == "1"){
	echo"<td width=40% valign=\"top\"><a href=\"download/$row[sh_download]\">$row[sh_download]</a></td>";
	}else{echo"";}
	echo"
	</tr>";
	}
	echo"
	</table>";
?>
<?
/////////END/////////
stdfoot();
?>