View file gta/city1/gunman.php

File size: 4.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'];
$golod=$data['golod'];
$secur=$data['secur'];
$zav=$data['zav'];
$lsd=$data['lsd'];
$ban=$data['ban'];
$lox=$data['lox'];

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

if($level<50)
{
die ($lang['error']."</body></html>");
}

mysql_query("update users set last='".time()."',city='2' 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_city2']."</b><br/>";

print "<u>[".$lang['gm2_name']."]</u><br/>";

switch ($mode) 
{  

  case k:
    if(!empty($p) && $money>=$p)
{
$p=cyr(htmlspecialchars(stripslashes(trim($p))));
if($p==500000) $gun=$lang['gun14'];
elseif($p==1000000) $gun=$lang['gun15'];
elseif($p==2000000) $gun=$lang['gun16'];
elseif($p==3500000) $gun=$lang['gun17'];
elseif($p==5000000) $gun=$lang['gun18'];
else 
{
die($lang['error']."<br/><anchor>".$lang['back']."<prev/></anchor></small></p></card></wml>");
}
include "./../includes/inc_in_array.php";
if(empty($guns))
{
$money=$money-$p;
mysql_query("update users set guns='$gun',money='$money' where id='".$id."';");
}
elseif(!empty($guns))
{
                $money=$money-$p;
mysql_query("update users set guns='$guns.$gun',money='$money' where id='".$id."';");
}
print $lang['city1_yo_man']." $gun-".$lang['city1_best_purchase']."<br/>";
}
    elseif($money<=$p)
{
print $lang['city1_dont_have_money']."<br/>";
}
    print $lang['city1_at_you']." <b>$money $$</b> ".$lang['city1_want_buy']."<br/>";
    print "<img src='./../city1/images/gun14.jpeg' alt='gun14'/><a href=\"gunman.php?id=$id&amp;pass=$pass&amp;mode=k&amp;p=500000\">".$lang['gun14']."</a>(500000 $$),<br/>";
    print "<img src='./../city1/images/gun15.jpeg' alt='gun15'/><a href=\"gunman.php?id=$id&amp;pass=$pass&amp;mode=k&amp;p=1000000\">".$lang['gun15']."</a>(1000000 $$),<br/>";
    print "<img src='./../city1/images/gun16.jpeg' alt='gun16'/><a href=\"gunman.php?id=$id&amp;pass=$pass&amp;mode=k&amp;p=2000000\">".$lang['gun16']."</a>(2000000 $$),<br/>";
    print "<img src='./../city1/images/gun5.gif' alt='gun17'/><a href=\"gunman.php?id=$id&amp;pass=$pass&amp;mode=k&amp;p=3500000\">".$lang['gun17']."</a>(3500000 $$)<br/>";
	print "<img src='./../city1/images/gun18.jpeg' alt='gun18'/><a href=\"gunman.php?id=$id&amp;pass=$pass&amp;mode=k&amp;p=5000000\">".$lang['gun18']."</a>(5000000 $$)<br/>";
    print "&gt;<a href=\"gunman.php?id=$id&amp;pass=$pass\">".$lang['city2_gunman2']."</a><br/>";
    break;


  default:
print $lang['gm2_hello'];
print "<a href=\"gunman.php?id=$id&amp;pass=$pass&amp;mode=k\">Нy давай поcмотpим</a><br/>";
print "<a href=\"./../city2/index.php?id=$id&amp;pass=$pass\">".$lang['gm_p2']."</a><br/>";
  break;
}


print "---<br/>&gt;<a href=\"./../city2/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";
}

elseif($ban==1)
{
die ($lang['empty_login']."</body></html>");

}
?>