Просмотр файла gta/city3/killer.php

Размер файла: 6.89Kb
<?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_city3']."</b><br/>";
print "<u>[Киллер]</u><br/>";

switch ($mode) 
  
{
    case "level":
if(empty($who) || empty($which))
{
    print 'Ты можешь отнять авторитет у любого человека.Ты унизишь его в глазах гангстеров.Ему остается только догадываться,кто его заказал.Стоит это 10000$$ за единицу авторитета.За один раз я могу отнять максимум 50 единиц авторитета.Если ты согласен,скажи кому отнять:<br/>';
    print "</small>";
    print "<input name=\"who\"/><br/><small>";
print 'И сколько авторитета отнимаем:<br/></small>';
print "<input name=\"which\" format=\"*N\"/><br/><small>";
    print "<anchor>".$lang['ok']."<go href=\"killer.php?id=$id&amp;pass=$pass&amp;mode=level\" method=\"post\">
<postfield name=\"who\" value=\"$(who)\"/>
<postfield name=\"which\" value=\"$(which)\"/>
</go></anchor><br/>";
}
else
{
$who=cyr(htmlspecialchars(stripslashes(trim($who))));
$which=cyr(htmlspecialchars(stripslashes(trim($which))));
if($which<50 && $money>($which*10000))
   {
$db=mysql_fetch_array(mysql_query("select id,pass,level from users where login='".$who."';"));
$dbid=$db['id'];
$dbpass=$db['pass'];
$dblevel=$db['level'];
if(empty($dbid))
{
print $lang['voo_sel_us_err']."<br/>";
}
else
{
$dblevel=$dblevel-$which;
$money=$money-($which*10000);
if($dblevel<=1) die($lang['voo_health_err']."<br/><anchor>".$lang['back']."<prev/></anchor></small></p></card></wml>");
$messaga="<b>Киллер</b><br/>Киллер унизил тебя в глазах гангстеров.У тебя отнято ".$which." единиц авторитета<br/>[<a href=\"./../mes.php?pass=$dbpass&amp;id=$dbid&amp;dbid=$id&amp;mode=del\">".$lang['ok']."</a>]";
mysql_query("insert into messagi values(0,'$id','$dbid','$messaga');");
mysql_query("update users set money='".$money."' where id='".$id."';");
mysql_query("update users set level='".$dblevel."' where id='".$dbid."';");
print $who.' потеряет авторитет в городе<br/>';

}
   }
else
   {
print 'Так не пойдет.У тебя нет денег<br/>';
   }
}
    print "&gt;<a href=\"killer.php?pass=$pass&amp;id=$id\">Киллер</a><br/>";
    break;

  case "health":
if(empty($who) || empty($which))
{
    print 'Ты можешь анонимно отнять здоровье у любого человека.Он будет ранен в перестрелке.Это будет стоить тебе 50 баксов за одну единицу здоровья:<br/>';
    print "</small>";
    print "<input name=\"who\"/><br/><small>";
print $lang['voo_and_wh_heal']."<br/></small>";
print "<input name=\"which\" format=\"*N\"/><br/><small>";
    print "<anchor>".$lang['ok']."<go href=\"killer.php?id=$id&amp;pass=$pass&amp;mode=health\" method=\"post\">
<postfield name=\"who\" value=\"$(who)\"/>
<postfield name=\"which\" value=\"$(which)\"/>
</go></anchor><br/>";
}
else
{
$who=cyr(htmlspecialchars(stripslashes(trim($who))));
$which=cyr(htmlspecialchars(stripslashes(trim($which))));
if($which<1500 && $money>($which*50))
   {
$db=mysql_fetch_array(mysql_query("select id,pass,health from users where login='".$who."';"));
$dbid=$db['id'];
$dbpass=$db['pass'];
$dbhealth=$db['health'];
if(empty($dbid))
{
print $lang['voo_sel_us_err']."<br/>";
}
else
{
$dbhealth=$dbhealth-$which;
$money=$money-($which*50);
if($dbhealth<=10) die($lang['voo_health_err']."<br/><anchor>".$lang['back']."<prev/></anchor></small></p></card></wml>");
$messaga="<b>Киллер</b><br/>Кто-то заказал тебя киллеру.У тебя отнято  ".$which." ".$lang['voo_heal_mes2']."<br/>[<a href=\"./../mes.php?pass=$dbpass&amp;id=$dbid&amp;dbid=$id&amp;mode=del\">".$lang['ok']."</a>]";
mysql_query("insert into messagi values(0,'$id','$dbid','$messaga');");
mysql_query("update users set money='".$money."' where id='".$id."';");
mysql_query("update users set health='".$dbhealth."' where id='".$dbid."';");
print 'Заказ выполнен<br/>';

}
   }
else
   {
print 'Так не пойдет.У тебя нет денег<br/>';
   }
}
    print "&gt;<a href=\"killer.php?pass=$pass&amp;id=$id\">Киллер</a><br/>";
    break;

case "porcha":

if($money<5000) 
{
/*
mysql_query("delete from messagi where kto='".$dbid."' and komu='".$id."' limit 1;");
*/
die($lang['voo_no_money']."<br/><anchor>".$lang['back']."<prev/></anchor></small></p></card></wml>");
}
else
{
$money=$money-5000;
mysql_query("update users set voodoo='',money='".$money."' where id='".$id."'");
print $lang['voo_pr_sn']."<br/>";
}

break;
  default:
print 'Привет,чувак!Нужны мои услуги?<br/>';
print "<a href=\"killer.php?id=$id&amp;pass=$pass&amp;mode=health\">Отнять здоровье</a><br/>";
print "<a href=\"killer.php?id=$id&amp;pass=$pass&amp;mode=level\">Отнять авторитет</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/footer.php";
}

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

}
?>