Вход Регистрация
Файл: chats/city1/univermag.php
Строк: 257
<?php
require( "../inc/conf.inc.php" );
require( 
"../inc/check.php" );
include 
"../includes/inc_online.php";
include 
"./../includes/header.php";
include 
"../russian/lang_main.php"//языковой файл
if(!empty($id)) 
{
$q mysql_query("select secur,golod,voodoo,nums,guns,cars,id,login,pass,mafcredits,level,police,health from users where id='".$id."';"); 
}

$data mysql_fetch_array($q);

$id=$data['id'];
$login=$data['login'];
$mafcredits=$data['mafcredits'];
$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'];



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";
print 
"<div><b>".$lang['game_city1']."</b></div>";

switch (
$mode
{
case 
guns:
print 
"<br/><u>[".$lang['city1_guns_market']."]</u><br/>";
if(!empty(
$p) && $mafcredits>=$p)
{
$p=cyr(htmlspecialchars(stripslashes(trim($p))));
if(
$p==10$gun=$lang['gun1'];
elseif(
$p==70$gun=$lang['gun5'];
elseif(
$p==120$gun=$lang['gun7'];
elseif(
$p==200$gun=$lang['gun9'];
else 
{
die(
$lang['error']."<br/><anchor>".$lang['back']."<prev/></anchor></small></p></card></wml>");
}
include 
"./../includes/inc_in_array.php";
if(empty(
$guns))
{
$mafcredits=$mafcredits-$p;
mysql_query("update users set guns='$gun',mafcredits='$mafcredits' where id='".$id."';");
}
elseif(!empty(
$guns))
{
$mafcredits=$mafcredits-$p;
mysql_query("update users set guns='$guns.$gun',mafcredits='$mafcredits' where id='".$id."';");
}
print 
$lang['city1_yo_man'].$gun-".$lang['city1_best_purchase']."<br/>";
}
elseif(
$mafcredits<=$p)
{
print 
$lang['city1_dont_have_mafcredits']."<br/>";
}
print 
$lang['city1_at_you']." <b>$mafcredits $$</b> ".$lang['city1_want_buy']."<br/>";
print 
"<a href="univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=10">".$lang['gun1']."</a>(10 $$),<br/>";
print 
"<a href="univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=70">".$lang['gun5']."</a>(70 $$),<br/>";
print 
"<a href="univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=120">".$lang['gun7']."</a>(120 $$),<br/>";
print 
"<a href="univermag.php?id=$id&amp;pass=$pass&amp;mode=guns&amp;p=200">".$lang['gun9']."</a>(200 $$)<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) && $mafcredits>=$p)
{
$p=cyr(htmlspecialchars(stripslashes(trim($p))));
if(
$p==80$car=$lang['car1'];
elseif(
$p==400$car=$lang['car2'];
elseif(
$p==700$car=$lang['car3'];
elseif(
$p==1000$car=$lang['car4'];
else
{
die(
$lang['error']."<br/><anchor>".$lang['back']."<prev/></anchor></small></p></card></wml>");
}
include 
"./../includes/inc_in_array.php";
if(empty(
$cars))
{
$mafcredits=$mafcredits-$p;
mysql_query("update users set cars='$car',mafcredits='$mafcredits' where id='".$id."';");
}
elseif(!empty(
$cars))
{
$mafcredits=$mafcredits-$p;
mysql_query("update users set cars='$cars.$car',mafcredits='$mafcredits' where id='".$id."';");
}
print 
$lang['city1_yo_man'].$car-".$lang['city1_best_purchase']."<br/>";
}
elseif(
$mafcredits<=$p)
{
print 
$lang['city1_dont_have_mafcredits']."<br/>";
}
print 
$lang['city1_at_you']." <b>$mafcredits $$</b> ".$lang['city1_want_buy']."<br/>";
print 
"<a href="univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=80">".$lang['car1']."</a>(80 $$),<br/>";
print 
"<a href="univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=400">".$lang['car2']."</a>(400 $$),<br/>";
print 
"<a href="univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=700">".$lang['car3']."</a>(700 $$),<br/>";
print 
"<a href="univermag.php?id=$id&amp;pass=$pass&amp;mode=cars&amp;p=1000">".$lang['car4']."</a>(1000 $$)<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) && $mafcredits>=$p && ($health+$p)<=150)
{
$p=cyr(htmlspecialchars(stripslashes(trim($p))));
$mafcredits=$mafcredits-$p;
$health=$health+$p;
mysql_query("update users set health='$health',mafcredits='$mafcredits' where id='".$id."';");
print 
$lang['city1_health_corrected']." <b>$p %</b>!<br/>";
}
elseif(
$mafcredits<=$p)
{
print 
$lang['city1_dont_have_mafcredits']."<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>$mafcredits $$</b> ".$lang['city1_how_much_correct_health']."</small><br/>";
//////////////Здоровье ввод//////////////
echo "<form method="post" action="univermag.php?id=$id&amp;pass=$pass&amp;mode=health"><input name="p" maxlength="3" value="$health"/><input value="Сохранить" type="submit" class="cp">rn</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) && $mafcredits>=$p && $p==100)
{
$p=cyr(htmlspecialchars(stripslashes(trim($p))));
$mafcredits=$mafcredits-$p;
mysql_query("update users set police='0',mafcredits='$mafcredits' 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>$mafcredits $$</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) && $mafcredits>=$p && ($p==50 || $p==100 || $p==150 || $p==200 || $p==250) && ($level+floor($p/50))<=5)
{
$p=cyr(htmlspecialchars(stripslashes(trim($p))));
$mafcredits=$mafcredits-$p;
$level=$level+floor($p/50);
mysql_query("update users set level='$level',mafcredits='$mafcredits' where id='".$id."';");
print 
$lang['city1_now_you_authority']." <b>$level</b>!<br/>";
}
elseif(!empty(
$p) && ($mafcredits<$p || ($level+floor($p/50))>|| $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>$mafcredits $$</b> ".$lang['city1_tattoo_make_help_you_up_auth']."</small><br/>";


echo 
"<form method="post" action="univermag.php?id=$id&amp;pass=$pass&amp;mode=tattoo"><input name="p" maxlength="3" value="50"/><input value="Сохранить" type="submit" class="cp">rn</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/>---";
echo 
"<br/><a href="../enter.php?id={$id}&amp;pass={$pass}&amp;ref={$ref}">Прихожка</a><br/>";
mysql_close();
include 
"./../includes/footer.php";
?>
Онлайн: 0
Реклама