Просмотр файла gta/city1/elite.php

Размер файла: 5.77Kb
<?php
include "./../ini.php";
include "./../includes/header.php";
include "./../includes/inc_online.php";
print "<p><small>";

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

if(!empty($id))
{
$q = mysql_query("select secur,golod,voodoo,nums,guns,cars,id,login,pass,money,level,police,health,zav,lsd,ban from users where id='".$id."';");
}
else
{
die ($lang['empty_login']."</small></p></card></wml>");
}

$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'];
$golod=$data['golod'];
$secur=$data['secur'];
$zav=$data['zav'];
$lsd=$data['lsd'];
$ban=$data['ban'];

if($pass!=$data['pass'])
{
die ($lang['empty_login']."</small></p></card></wml>");
}

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

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";
print "<b>[Зд: $health %][Сыт: $golod %][Зщ: $secur %]</b><br/>";
print "<b>".$lang['game_city1']."</b><br/>";




switch ($mode) 
{  
  case "1a":
print "<u>[".$lang['el_1avenu']."]</u><br/>";

if(empty($what))
{
print "<a href=\"elite.php?id=$id&amp;pass=$pass&amp;mode=1a&amp;what=os\">".$lang['el_os']."</a><br/>";
/*print "<a href=\"museum.php?id=$id&amp;pass=$pass\"> </a><br/>";*/
}
elseif($what='os')
{

$os_cars=array('Жигули','Лада Калина','Вуду','Внедорожник','Ламборджини','Феррари','Лимузин','Линкольн','Toyota Corolla');
$cars_rand = rand(0, count($os_cars)-1);

if(empty($tachka) || empty($at_gun))
{
print $lang['el_1av_mes'];
print "<b>".$os_cars[$cars_rand]."</b><br/>";

if(!empty($guns))
{
$guns_array = explode(".", $guns);
$count_guns=count($guns_array);
print $lang['cops_select_gun']."</small><br/><select name=\"at_gun\">";
for($i=0;$i<$count_guns;$i++)
{
print "<option value=\"".$guns_array[$i]."\">".$guns_array[$i]."</option>"; 
}
print "</select><br/><small>";
print "
<anchor>".$lang['uv_try_steal']."
<go href=\"elite.php?id=$id&amp;pass=$pass&amp;mode=1a&amp;what=os\" method=\"post\">
<postfield name=\"tachka\" value=\"".$os_cars[$cars_rand]."\"/>
<postfield name=\"at_gun\" value=\"$(at_gun)\"/>
</go>
</anchor><br/>";
}

}
else
{
if($at_gun=="Кастет")$at_gun=1;
elseif($at_gun=="Нож")$at_gun=2;
elseif($at_gun=="Дубинка")$at_gun=3;
elseif($at_gun=="ПМ")$at_gun=4;
elseif($at_gun=="Мачете")$at_gun=5;
elseif($at_gun=="Беретта")$at_gun=6;
elseif($at_gun=="Меч")$at_gun=7;
elseif($at_gun=="Калашников")$at_gun=8;
elseif($at_gun=="Взрывчатка")$at_gun=9;
elseif($at_gun=="Электрошокер")$at_gun=10;
elseif($at_gun=="Напалм")$at_gun=11;
elseif($at_gun=="Базука")$at_gun=12;
elseif($at_gun=="Гранатомет")$at_gun=13;
elseif($at_gun=="ПЗРК")$at_gun=14;
elseif($at_gun=="Слонобой")$at_gun=15;
elseif($at_gun=="Ракетная установка")$at_gun=16;
elseif($at_gun=="МЕ 85 Combat")$at_gun=17;
elseif($at_gun=="Rohm 735")$at_gun=18;
elseif($at_gun=="Brunner CZ 75")$at_gun=19;
elseif($at_gun=="Лазерное оружие")$at_gun=20;

$gun_cop=rand(8,18);

if($gun_cop==8)$cop_gun="Калашников";
elseif($gun_cop==9)$cop_gun="Взрывчатка";
elseif($gun_cop==10)$cop_gun="Электрошокер";
elseif($gun_cop==11)$cop_gun="Напалм";
elseif($gun_cop==12)$cop_gun="Базука";
elseif($gun_cop==13)$cop_gun="Гранатомет";
elseif($gun_cop==14)$cop_gun="ПЗРК";
elseif($gun_cop==15)$cop_gun="Слонобой";
elseif($gun_cop==16)$cop_gun="Ракетная установка";
elseif($gun_cop==17)$cop_gun="МЕ 85 Combat";
elseif($gun_cop==18)$cop_gun="Rohm 735";

$police=$police+2;
if($gun_cop>$at_gun)
{
$health=$health-50;
if($health<0) $health=0;
mysql_query("update users set health='".$health."',police='".$police."' where id='".$id."';");
print $lang['bank_grab_fuck']." ".$cop_gun."!<br/>".$lang['bank_grab_health']." ".$health."%<br/>";
}
else
{
$grab_money=$money+$bmoney;
mysql_query("update users set money='".$grab_money."',police='".$police."' where id='".$id."';");
if(empty($cars)) 
mysql_query("update users set cars='$tachka' where id='".$id."';");
else 
mysql_query("update users set cars='$cars.$tachka' where id='".$id."';");
print "<b>$tachka</b> ".$lang['el_car_now_at_you']."<br/>";
}

}


}

print "&gt;<a href=\"elite.php?id=$id&amp;pass=$pass\">".$lang['area_elite']."</a><br/>";
break;
default:
print "<u>[".$lang['area_elite']."]</u><br/>";
    print $lang['el_mes']."<br/>";
  /*  print "<a href=\"museum.php?id=$id&amp;pass=$pass\"></a><br/>";*/
    print "<a href=\"rest.php?id=$id&amp;pass=$pass\">".$lang['rest']."</a><br/>";
    print "<a href=\"elite.php?id=$id&amp;pass=$pass&amp;mode=1a\">".$lang['el_1avenu']."</a><br/>";
    print "<a href=\"osobnyaki.php?id=$id&amp;pass=$pass\">".$lang['el_2avenu']."</a><br/>";
    print "<a href=\"security.php?id=$id&amp;pass=$pass\">".$lang['el_security']."</a><br/>";
print "&gt;<a href=\"area.php?id=$id&amp;pass=$pass\">".$lang['city1_area']."</a><br/>";
break;
}

include("./../includes/inc_in_city.php");

mysql_close();
include "./../includes/footer.php";
}

elseif($ban==1)
{
die ($lang['empty_login']."</small></p></card></wml>");

}
?>