<?
 $title="Помощь";
 include "function/lib.php";
 if ($_GET[help]=="main" or !isset($_GET[help]))  {
 	 $page.="<div class='f'>Помощь</div>";
 	 $page.="<div class='link'>";
 	 $page.="<a href='./top.php?help=exp'>Самые опытные</a><br/>";
     $page.="<a href='./top.php?help=resist'>Самые богатые</a><br/>";
     
     
 }
 else {
  if ($_GET[help]==exp)  {
$page.="<div class='d'><b>Параметры</b></div>";
$page.="<div class='link'>";
$sql=mysql_query("SELECT count(id) FROM users");
$count= mysql_result($sql,0,0);
if (!isset($_GET[str])) {$str=1;}
else  {$str=intval(htmlspecialchars($_GET[str]));}
$begin=($str-1)*15;
$sql = mysql_query("SELECT * FROM users ORDER BY level DESC limit 10");
while($user=mysql_fetch_array($sql)){
$page.="<br/>$user[char_name]-[$user[exp]]</a>";
}
}
elseif ($_GET[help]==resist)  {
$page.="<div class='d'><b>Сопротивления</b></div>";
$sql=mysql_query("SELECT count(id) FROM users");
$count= mysql_result($sql,0,0);
if (!isset($_GET[str])) {$str=1;}
else  {$str=intval(htmlspecialchars($_GET[str]));}
$begin=($str-1)*15;
$sql = mysql_query("SELECT * FROM users ORDER BY money DESC limit 10");
while($user=mysql_fetch_array($sql)){
$page.="<br/>$user[char_name]-[$user[money]]</a>";
 }
 }
 }   			
  
 $page.="<a href='./?rand=".rand(1,1000)."'>в игру</a>";
 display($page,$title,$style);
?>