Размер файла: 6.03Kb
<?php
include "./../ini3.php";
include "./../includes/header2.php";
include "./../includes/inc_online.php";
$id=cyr(htmlspecialchars(stripslashes(trim($id))));
$pass=cyr(htmlspecialchars(stripslashes(trim($pass))));
if(!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'];
$money=$data['money'];
$level=$data['level'];
$police=$data['police'];
$stage=$data['stage'];
$health=$data['health'];
$cars=$data['cars'];
$guns=$data['guns'];
$nums=$data['nums'];
$voo_por=$data['voodoo'];
$energy=$data['energy'];
$secur=$data['secur'];
$zav=$data['zav'];
$lsd=$data['lsd'];
$ban=$data['ban'];
$gold=$data['gold'];
$antikiller=$data['antikiller'];
$lox=$data['lox'];
if(md5($pass)!=$data['pass'])
{
die ($lang['empty_login']."</body></html>");
}
mysql_query("update users set last='".time()."',city='1' where id='".$id."';");
if($ban==0)
{
include "./../includes/inc_secur.php";
include "./../includes/inc_energy.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";
print "<b>[Зд: $health %][<img src='a href=\./../../pic/energy.gif' title='Энергия'/>: $energy %][Зщ: $secur %]</b><br/>";
print "<b>".$lang['game_city1']."</b><br/>";
switch ($mode)
{
case "n":
if(empty($money)) print $lang['voo_no_money'];
else
{
print $lang['sec_mes1'];
if(empty($what))
{
print $lang['cops_select_gun'].":<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=1000\">".$lang['gun1']."</a>(1000$$,10 единиц)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=5000\">".$lang['gun2']."</a>(5000$$,50ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=10000\">".$lang['gun3']."</a>(10000$$,100ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=30000\">".$lang['gun4']."</a>(30000$$,300ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=50000\">".$lang['gun5']."</a>(50000$$,500ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=200000\">".$lang['gun6']."</a>(200000$$,2000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=500000\">".$lang['gun7']."</a>(500000$$,5000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=800000\">".$lang['gun8']."</a>(800000$$,8000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=1000000\">".$lang['gun9']."</a>(1000000$$,10000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=2000000\">".$lang['gun10']."</a>(2000000$$,20000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=5000000\">".$lang['gun11']."</a>(5000000$$,50000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=10000000\">".$lang['gun12']."</a>(10000000$$,100000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=20000000\">".$lang['gun13']."</a>(20000000$$,200000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=g1\">".$lang['gun14']."</a>(120 золота,400000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=g2\">".$lang['gun15']."</a>(135 золота,500000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=g3\">".$lang['gun16']."</a>(250 золота,1000000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=g4\">".$lang['gun17']."</a>(280 золота,1200000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=g5\">".$lang['gun18']."</a>(370 золота,1500000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=g6\">".$lang['gun19']."</a>(480 золота,2000000ед.)<br/>";
print "<a href=\"security.php?id=$id&pass=$pass&mode=n&what=g7\">".$lang['gun20']."</a>(700 золота,3500000ед.)<br/>";
}
else
{
if($what!="g1" && $what!="g2" && $what!="g3" && $what!="g4" && $what!="g5" && $what!="g6" && $what!="g7" && $what<=20000000 && $money>$what)
{
$ohrana=$what/100;
mysql_query("update users set secur='".$ohrana."',money='".$money."'-'".$what."' where id='".$id."';");
}else{
if($what=="g1")$ohrana=400000;
elseif($what=="g2")$ohrana=500000;
elseif($what=="g3")$ohrana=1000000;
elseif($what=="g4")$ohrana=1200000;
elseif($what=="g5")$ohrana=1500000;
elseif($what=="g6")$ohrana=2000000;
elseif($what=="g7")$ohrana=3500000;
if($what=="g1")$cena=120;
elseif($what=="g2")$cena=135;
elseif($what=="g3")$cena=250;
elseif($what=="g4")$cena=280;
elseif($what=="g5")$cena=370;
elseif($what=="g6")$cena=480;
elseif($what=="g7")$cena=700;
if($gold>$cena)mysql_query("update users set secur='".$ohrana."',gold='".$gold."'-'".$cena."' where id='".$id."';");
}
print $lang['sec_succ'];
}
}
print "><a href=\"security.php?id=$id&pass=$pass\">".$lang['el_security']."</a><br/>";
break;
default:
print "<u>[".$lang['el_security']."]</u><br/>";
print $lang['sec_enter'];
if($secur==0) print "<a href=\"security.php?id=$id&pass=$pass&mode=n\">".$lang['sec_get']."</a><br/>";
else print "<b>Ты еще под охраной.Заходи попозже</b><br/>";
print "><a href=\"elite.php?id=$id&pass=$pass\">".$lang['area_elite']."</a><br/>";
break;
}
print "---<br/>><a href=\"index.php?id=$id&pass=$pass\">".$lang['in_city']."</a>";
print "<br/>>><a href=\"./../game.php?id=$id&pass=$pass\">".$lang['menu']."</a>";
print "<br/>---";
mysql_close();
include "./../includes/footer2.php";
}
elseif($ban==1)
{
die ($lang['empty_login']."</body></html>");
}
?>