View file gta/city1/rating.php

File size: 4.65Kb
<?php

include "./../ini3.php";
include "./../includes/header2.php";
include "./../includes/inc_online.php";



$id=cyr(htmlspecialchars(stripslashes(trim($id))));
$login=cyr(htmlspecialchars(stripslashes(trim($login))));
$pass=cyr(htmlspecialchars(stripslashes(trim($pass))));

if(!empty($login)) 
{  
$q = mysql_query("select * from users where login='".cyr($login)."';");
}
elseif(!empty($id)) 
{
$q = mysql_query("select * from users where id='".$id."';");
}
else
{
die ($lang['empty_login']."</body></html>");
}

$data = mysql_fetch_array($q);

$id=$data['id'];
$login=$data['login'];
$status=$data['status'];
$reg_data=$data['reg_data'];
$money=$data['money'];
$level=$data['level'];
$police=$data['police'];
$health=$data['health'];
$cars=$data['cars'];
$guns=$data['guns'];
$band=$data['band'];
$golod=$data['golod'];
$secur=$data['secur'];
$admin=$data['admin'];
$ban=$data['ban'];
$lsd=$data['lsd'];
$zav=$data['zav'];
$lvl=$data['lvl'];
$gold=$data['gold'];
$school=$data['school'];
$ref=$data['ref'];
$antikiller=$data['antikiller'];
$lox=$data['lox'];

if($pass!=$data['pass'])
{
die ($lang['empty_login']."</body></html>");
}

mysql_query("update users set last='".time()."',city='1' where id='".$id."';");

include "./../includes/inc_secur.php";
include "./../includes/inc_golod.php";
include "./../includes/inc_hospital.php";
include "./../includes/inc_police.php";
include "./../includes/inc_die.php";
include "./../includes/inc_voodoo.php";
include "./../includes/inc_attack.php";
include "./../includes/inc_mes.php";

switch($mode)
{
default:
print "<u>[Доска почета]</u><br/>";
print "На доске почета написаны имена лучших гангстеров<br/>";
print "<a href=\"rating.php?id=$id&amp;pass=$pass&amp;mode=money\">Самые богатые</a><br/>";
print "<a href=\"rating.php?id=$id&amp;pass=$pass&amp;mode=level\">Самые крутые</a><br/>";
print "<a href=\"rating.php?id=$id&amp;pass=$pass&amp;mode=ref\">По приглашенным друзьям</a><br/>";
print "<a href=\"rating.php?id=$id&amp;pass=$pass&amp;mode=cops\">Самые опасные</a><br/>";
print "<a href=\"rating.php?id=$id&amp;pass=$pass&amp;mode=bands\">Самые крутые банды</a><br/>";
print "<a href=\"rating.php?id=$id&amp;pass=$pass&amp;mode=lvl\">Лучшие работники</a><br/><br/>";
break;
case "money":
print "<u>[Самые богатые]</u><br/>";
$pr_q=mysql_query("select login,money,gold from users order by money desc limit 10;");
while($pr_ar=mysql_fetch_array($pr_q))
{
++$i;
print "<b>".$i.".</b>".$pr_ar['login']."<br/>Деньги:<b>".$pr_ar['money']."</b><br/>Золото:<b>".$pr_ar['gold']."</b><br/>-------<br/>";
}
break;
case "level":
print "<u>[Самые крутые]</u><br/>";
$pr_q=mysql_query("select login,level from users order by level desc limit 10;");

while($pr_ar=mysql_fetch_array($pr_q))
{
++$i;
print "<b>".$i.".</b>".$pr_ar['login']."<br/>Авторитет:<b>".$pr_ar['level']."</b><br/>-----<br/>";
}
break;
case "ref":
print "<u>[По приглашенным друзьям]</u><br/>";
$pr_q=mysql_query("select login,ref from users order by ref desc limit 10;");

while($pr_ar=mysql_fetch_array($pr_q))
{
++$i;
print "<b>".$i.".</b>".$pr_ar['login']."<br/>Пригласил друзей:<b>".$pr_ar['ref']."</b><br/>-----<br/>";
}
break;
case "cops":
print "<u>[Самые опасные]</u><br/>";
$pr_q=mysql_query("select login,police from users order by police desc limit 10;");

while($pr_ar=mysql_fetch_array($pr_q))
{
++$i;
print "<b>".$i.".</b>".$pr_ar['login']."<br/>Преступность:<b>".$pr_ar['police']."</b><br/>-----<br/>";
}
break;
case "bands":
print "<u>[Самые крутые банды]</u><br/>";
$pr_q=mysql_query("select name,boss,blvl from bands order by blvl desc limit 10;");

while($pr_ar=mysql_fetch_array($pr_q))
{
++$i;
print "<b>".$i.".</b>".$pr_ar['name']."<br/>Босс:<b>".$pr_ar['boss']."</b><br/>Уровень:<b>".$pr_ar['blvl']."</b><br/>-----<br/>";
}
break;
case "lvl":
print "<u>[Лучшие работники]</u><br/>";
$pr_q=mysql_query("select login,lvl from users order by lvl desc limit 10;");

while($pr_ar=mysql_fetch_array($pr_q))
{
++$i;
print "<b>".$i.".</b>".$pr_ar['login']."<br/>Рабочий стаж:<b>".$pr_ar['lvl']."</b><br/>-----<br/>";
}
break;
}

print "---<br/>&gt;<a href=\"index.php?id=$id&amp;pass=$pass\">".$lang['in_city']."</a>";
print "<br/>&gt;&gt;<a href=\"./../game.php?id=$id&amp;pass=$pass\">".$lang['menu']."</a>";
print "<br/>---";

mysql_close();
include "./../includes/footer2.php";
?>