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

Размер файла: 12.29Kb
<?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 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']."</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'];

if($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_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>";

switch ($mode) 
{
  case guns:
    print "<br/><u>[".$lang['city1_guns_market']."]</u><br/>";
    if(!empty($p) && $money>=$p)
{
$p=cyr(htmlspecialchars(stripslashes(trim($p))));
if($p==5) $gun="Кастет";
elseif($p==30) $gun="Нож";
elseif($p==50) $gun="Дубинка";
elseif($p==80) $gun="ПМ";
elseif($p==200) $gun="Мачете";
elseif($p==500) $gun="Беретта";
elseif($p==800) $gun="Меч";
elseif($p==1200) $gun="Калашников";
elseif($p==1500) $gun="Взрывчатка";
elseif($p==2500) $gun="Электрошокер";
else 
{
die($lang['error']."<br/><a href='javascript:history.back(1)'>".$lang['back']."</a><br/></body></html>");
}
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 "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=5\">Кастет</a>(5 $$),<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=30\">Нож</a>(30 $$),<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=50\">Дубинка</a>(50 $$),<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=80\">ПМ</a>(80 $$)<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=200\">Мачете</a>(200 $$)<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=500\">Беретта</a>(500 $$)<br/>";
	print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=800\">Меч</a>(800 $$)<br/>";
	print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=1200\">Калашников</a>(1200 $$)<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=1500\">Взрывчатка</a>(1500 $$)<br/>";
	print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=2500\">Электрошокер</a>(2500 $$)<br/>";
    print "&gt;<a href=\"univermag.php?id=$id&amp;pass=$pass\">".$lang['city1_market']."</a><br/>";
    break;
  case cars:
    print "<br/><u>[".$lang['city1_motor_show']."]</u><br/>";
    if(!empty($p) && $money>=$p)
{
$p=cyr(htmlspecialchars(stripslashes(trim($p))));
if($p==50) $car="Велосипед";
elseif($p==500) $car="Запорожец";
elseif($p==800) $car="Жигули";
elseif($p==1200) $car="Лада Калина";
elseif($p==6000) $car="Вуду";
elseif($p==8000) $car="Внедорожник";
elseif($p==12000) $car="Ламборджини";
elseif($p==16000) $car="Феррари";
elseif($p==25000) $car="Лимузин";
elseif($p==33000) $car="Линкольн";
elseif($p==40000) $car="Порше";
elseif($p==45000) $car="Комбайн";
elseif($p==50000) $car="Mustang";
elseif($p==55000) $car="Audi A4";
elseif($p==60000) $car="Мitsubish Pajero Sport";
elseif($p==70000) $car="Lexus";
elseif($p==80000) $car="BМW X5";
elseif($p==100000) $car="Land Cruiser";
elseif($p==200000) $car="Toyota Corolla";
elseif($p==350000) $car="Beantley";
elseif($p==500000) $car="BUTTI cars";
elseif($p==750000) $car="Гоночная машина";
else
{
die($lang['error']."<br/><anchor>".$lang['back']."<prev/></anchor></body></html>");
}
include "./../includes/inc_in_array.php";
if(empty($cars))
{
$money=$money-$p;
mysql_query("update users set cars='$car',money='$money' where id='".$id."';");
}
elseif(!empty($cars))
{
                $money=$money-$p;
mysql_query("update users set cars='$cars.$car',money='$money' where id='".$id."';");
}
print $lang['city1_yo_man']." $car-".$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 "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=50\">Велосипед</a>(50 $$),<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=500\">Запорожец</a>(500 $$),<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=800\">Жигули</a>(800 $$),<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=1200\">Лада Калина</a>(1200 $$)<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=6000\">Вуду</a>(6000 $$)<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=8000\">Внедорожник</a>(8000 $$)<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=12000\">Ламборджини</a>(12000 $$)<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=16000\">Феррари</a>(16000 $$)<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=25000\">Лимузин</a>(25000 $$)<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=33000\">Линкольн</a>(33000 $$)<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=40000\">Порше</a>(40000 $$)<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=45000\">Комбайн</a>(45000 $$)<br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=50000\">Mustang</a>(50000 $$)<br/>";
	print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=55000\">Audi A4</a>(55000 $$)<br/>";
	print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=60000\">Мitsubish Pajero Sport</a>(60000 $$)<br/>";
	print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=70000\">Lexus</a>(70000 $$)<br/>";
	print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=80000\">BМW X5</a>(80000 $$)<br/>";
	print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=100000\">Land Cruiser</a>(100000 $$)<br/>";
	print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=200000\">Toyota Corolla</a>(200000 $$)<br/>";
	print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=350000\">Beantley</a>(350000 $$)<br/>";
	print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=500000\">BUTTI cars</a>(500000 $$)<br/>";
	print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=750000\">Гоночная машина</a>(750000 $$)<br/>";
    print "&gt;<a href=\"univermag.php?id=$id&amp;pass=$pass\">".$lang['city1_market']."</a><br/>";
    break;
  case health:
    print "<br/><u>[".$lang['city1_apteka']."]</u><br/>";
    if(!empty($p) && $money>=$p && ($health+$p)<=500)
{
$p=cyr(htmlspecialchars(stripslashes(trim($p))));
$money=$money-$p;
$health=$health+$p;
mysql_query("update users set health='$health',money='$money' where id='".$id."';");
print $lang['city1_health_corrected']." <b>$p %</b>!<br/>";
}
    elseif($money<=$p)
{
print $lang['city1_dont_have_money']."<br/>";
}
    elseif(($health+$p)>=150)
{
print $lang['city1_health_cannot_be_more']." 150 %.<br/>";
}
    print $lang['city1_you_health']." <b>$health %</b> ".$lang['city1_and_at_you']." <b>$money $$</b> ".$lang['city1_how_much_correct_health']."<br/>";
    echo "<form action=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=health\" method=\"post\">";
    print "<input name=\"p\" size=\"3\" format=\"*N\" maxlength=\"3\"/>";
    echo "<input class=\"ibutton\" type=\"submit\" value=\"".$lang['ok']."\"/>";
    echo "</form>";


    print "&gt;<a href=\"univermag.php?id=$id&amp;pass=$pass\">".$lang['city1_market']."</a><br/>";
  break;
  case pm:
   print "<br/><u>[".$lang['city1_hair_saloon']."]</u><br/>";
    if(!empty($p) && $money>=$p && $p==100)
{
$p=cyr(htmlspecialchars(stripslashes(trim($p))));
$money=$money-$p;
mysql_query("update users set police='0',money='$money' where id='".$id."';");
print $lang['city1_crime_rate_0']."<br/>";
}
    elseif(!empty($p) && ($p>100 || $p<100))
{
print $lang['city1_fuck_halyava']."<br/>";
}
    print $lang['city1_at_100']." $$ ".$lang['city1_we_shall_cut_you']." <b>$money $$</b><br/>";
    print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=pm&amp;p=100\">".$lang['city1_hair_cut']."</a><br/>";
    print "&gt;<a href=\"univermag.php?id=$id&amp;pass=$pass\">".$lang['city1_market']."</a><br/>";
  break;
  case tattoo:
   print "<br/><u>[".$lang['city1_tattoo_saloon']."]</u><br/>";
    if(!empty($p) && $money>=$p && ($p==50 || $p==100 || $p==150 || $p==200 || $p==250) && ($level+floor($p/50))<=5)
{
$p=cyr(htmlspecialchars(stripslashes(trim($p))));
$money=$money-$p;
$level=$level+floor($p/50);
mysql_query("update users set level='$level',money='$money' where id='".$id."';");
print $lang['city1_now_you_authority']." <b>$level</b>!<br/>";
}
    elseif(!empty($p) && ($money<$p || ($level+floor($p/50))>5 || $p!=50 || $p!=100 || $p!=150 || $p!=200 || $p!=250))
{
print $lang['city1_make_it_impossible']."<br/>";
}
    print $lang['city1_you_authority']." <b>$level</b> ".$lang['city1_and_at_you']." <b>$money $$</b> ".$lang['city1_tattoo_make_help_you_up_auth']."<br/>";
    echo "<form action=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=tattoo\" method=\"post\">
    <postfield name=\"p\" value=\"$(p)\"/>";
    print "<input name=\"p\" size=\"3\" format=\"*N\" maxlength=\"3\"/>";
 echo "<input class=\"ibutton\" type=\"submit\" value=\"".$lang['ok']."\"/>";
    echo "</form>";

    print "&gt;<a href=\"univermag.php?id=$id&amp;pass=$pass\">".$lang['city1_market']."</a><br/>";
  break;
  default:
        print "<br/><u>[".$lang['city1_market']."]</u><br/>";
print $lang['city1_town_supermarket']."<br/>";
print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=guns\">".$lang['city1_guns']."</a><br/>";
print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=cars\">".$lang['city1_cars']."</a><br/>";
print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=health\">".$lang['city1_apteka']."</a><br/>";
print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=pm\">".$lang['city1_hair_saloon']."</a><br/>";
print "<a href=\"univermag.php?id=$id&amp;pass=$pass&amp;mode=tattoo\">".$lang['city1_tattoo_saloon']."</a><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";
}

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

}
?>