File size: 9.1Kb
<?php
#####################################################
# mod by -=LesNIK=- #
# icq 366244181 #
# Официальный сайт мода http://wenz.net.ru #
# все ответы на вопросы и помощь по скрипту #
# вы можете получить только там! #
# #
# Вы не имеете право вносить #
# свои изменения в данный мод!#
# #
# Уважайте труд автора! #
#####################################################
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/>";
$result = mysql_query("SELECT * FROM `themes`");
$ths = mysql_num_rows($result);
$result = mysql_query("SELECT * FROM `posts`");
$pts = mysql_num_rows($result);
echo'<a href="./../forum.php?id='.$id.'&pass='.$pass.'">Форум</a> (<b>'.$ths.'</b>|<b>'.$pts.'</b>)<br/>';
print "<b>".$lang['game_city1']."</b><br/>";
switch ($mode)
{
case "skupka":
if(empty($car_sale))
{
if(!empty($cars))
{
$cars_count = explode(".", $cars);
$count_cars=count($cars_count);
echo '<img src="a href=\./../../pic/car.png" alt="youcars"/> Твои тачки';
print " <b>($count_cars)</b>:<br/>";
echo "<form action=\"black_sale.php?id=$id&pass=$pass&mode=skupka\" method=\"post\">
<postfield name=\"car_sale\" value=\"$(car_sale)\"/>";
print "<select name=\"car_sale\">";
for($i=0;$i<$count_cars;$i++)
{
print "<option value=\"".$cars_count[$i]."\">".$cars_count[$i]."</option>";
}
print "</select><br/>";
echo "<input class=\"ibutton\" type=\"submit\" value=\"".$lang['ok']."\"/>";
echo "</form>";
}
else
{
print $lang['bs_error'];
}
}
else
{
$check=mysql_fetch_array(mysql_query("select cars from users where id='".$id."';"));
$ch_cars_ar=$check['cars'];
$ch_cars=explode('.',$ch_cars_ar);
if(!in_array($car_sale,$ch_cars)) print $lang['error'];
else
{
$car_sale=cyr(htmlspecialchars(stripslashes(trim($car_sale))));
if($car_sale=='Велосипед' && !empty($cars))
{
$money=$money+25;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Запорожец' && !empty($cars))
{
$money=$money+250;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Жигули' && !empty($cars))
{
$money=$money+400;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Лада Калина' && !empty($cars))
{
$money=$money+600;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Вуду' && !empty($cars))
{
$money=$money+3000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Внедорожник' && !empty($cars))
{
$money=$money+4000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Ламборджини' && !empty($cars))
{
$money=$money+6000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Феррари' && !empty($cars))
{
$money=$money+8000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Лимузин' && !empty($cars))
{
$money=$money+12500;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Линкольн' && !empty($cars))
{
$money=$money+16500;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Порше' && !empty($cars))
{
$money=$money+20000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Комбайн' && !empty($cars))
{
$money=$money+22500;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Mustang' && !empty($cars))
{
$money=$money+25000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Audi A4' && !empty($cars))
{
$money=$money+27500;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Мitsubish Pajero Sport' && !empty($cars))
{
$money=$money+30000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Lexus' && !empty($cars))
{
$money=$money+35000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='BМW X5' && !empty($cars))
{
$money=$money+40000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Land Cruiser' && !empty($cars))
{
$money=$money+50000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Toyota Corolla' && !empty($cars))
{
$money=$money+100000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Beantley' && !empty($cars))
{
$money=$money+175000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='BUTTI cars' && !empty($cars))
{
$money=$money+400000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
elseif($car_sale=='Гоночная машина' && !empty($cars))
{
$money=$money+425000;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
$cars_array = explode(".", $cars);
if(count($cars_array)<=1)
{
$cars=str_replace("$car_sale","","$cars");
mysql_query("update users set cars='$cars' where id='$id';");
}
elseif(count($cars_array)>1 && $cars_array[0]!=$car_sale)
{
$cars=str_replace(".$car_sale","","$cars");
mysql_query("update users set cars='$cars' where id='$id';");
}
elseif(count($cars_array)>1 && $cars_array[0]==$car_sale)
{
$cars=str_replace("$car_sale.","","$cars");
mysql_query("update users set cars='$cars' where id='$id';");
}
print $lang['bs_car_saled']." ".$money." $$!<br/>";
}
}
print "<br/>><a href=\"black_sale.php?id=$id&pass=$pass\">".$lang['sl_black_sale']."</a><br/>";
break;
case "nap":
print "<u>[".$lang['bs_nap']."]</u><br/>";
print $lang['bs_nap_mes']."<br/>";
if(!empty($p) && ($p==1 || $p==2 || $p=3))
{
$val=rand(1,4);
if($p==$val)
{
$val=$val*4;
print $lang['bs_nap_yes1']." ".$p." ".$lang['bs_nap_yes2']." ".$val."$$<br/>";
$money=$money+$val;
mysql_query("update users set money='".$money."' where id='".$id."';");
}
else
{
$money=$money-($p+$p);
if($money<=0) print $lang['voo_no_money'];
else
{
mysql_query("update users set money='".$money."' where id='".$id."';");
print $lang['bs_nap_false']." ".$money."$$<br/>";
}
}
}
print "-<a href=\"black_sale.php?id=$id&pass=$pass&mode=nap&p=1\">".$lang['bs_nap_stakan']." 1</a><br/>";
print "-<a href=\"black_sale.php?id=$id&pass=$pass&mode=nap&p=2\">".$lang['bs_nap_stakan']." 2</a><br/>";
print "-<a href=\"black_sale.php?id=$id&pass=$pass&mode=nap&p=3\">".$lang['bs_nap_stakan']." 3</a><br/>";
print "><a href=\"black_sale.php?id=$id&pass=$pass\">".$lang['sl_black_sale']."</a><br/>";
break;
default:
print "<u>[".$lang['sl_black_sale']."]</u><br/>";
print $lang['bs_mes']."<br/>";
print "<a href=\"black_sale.php?id=$id&pass=$pass&mode=skupka\">".$lang['bs_skup_krad']."</a><br/>";
print "<a href=\"black_sale.php?id=$id&pass=$pass&mode=nap\">".$lang['bs_nap']."</a><br/>";
break;
}
include "./../includes/inc_in_city.php";
mysql_close();
include "./../includes/footer2.php";
}
elseif($ban==1)
{
die ($lang['empty_login']."</body>
</html>");
}
?>