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

Размер файла: 10.03Kb
  1. <?php
  2. include "./../ini.php";
  3. include "./../includes/header.php";
  4. include "./../includes/inc_online.php";
  5. print "<p><small>";
  6.  
  7. $id=cyr(htmlspecialchars(stripslashes(trim($id))));
  8. $pass=cyr(htmlspecialchars(stripslashes(trim($pass))));
  9.  
  10. if(!empty($id))
  11. {
  12. $q = mysql_query("select secur,golod,band,voodoo,nums,guns,cars,id,login,pass,money,level,police,health from users where id='".$id."';");
  13. }
  14. else
  15. {
  16. die ($lang['empty_login']."</small></p></card></wml>");
  17. }
  18.  
  19. $data = mysql_fetch_array($q);
  20.  
  21. $id=$data['id'];
  22. $login=$data['login'];
  23. $money=$data['money'];
  24. $level=$data['level'];
  25. $police=$data['police'];
  26. $stage=$data['stage'];
  27. $health=$data['health'];
  28. $cars=$data['cars'];
  29. $guns=$data['guns'];
  30. $nums=$data['nums'];
  31. $band=$data['band'];
  32. $golod=$data['golod'];
  33. $secur=$data['secur'];
  34.  
  35. if($pass!=$data['pass'])
  36. {
  37. die ($lang['empty_login']."</small></p></card></wml>");
  38. }
  39.  
  40. mysql_query("update users set last='".time()."',city='1' where id='".$id."';");
  41.  
  42. include "./../includes/inc_secur.php";
  43. include "./../includes/inc_golod.php";
  44. include "./../includes/inc_hospital.php";
  45. include "./../includes/inc_police.php";
  46. include "./../includes/inc_die.php";
  47. include "./../includes/inc_voodoo.php";
  48. include "./../includes/inc_attack.php";
  49. include "./../includes/inc_mes.php";
  50. print "<b>[".$lang['plc_sud']."]</b><br/>";
  51.  
  52.  
  53. $db=mysql_fetch_array(mysql_query("select * from krisha where city='2' and house='supermarket';"));
  54. $bcity=$db['city'];
  55. $bband=$db['band'];
  56. $busers=$db['users'];
  57. $bmoney=$db['money'];
  58. $btime=$db['time'];
  59.  
  60. if(empty($bmoney))
  61. {
  62. $bank_money=rand(1,10000);
  63. mysql_query("update krisha set money='".$bank_money."' where city='2' and house='supermarket';");
  64. }
  65.  
  66. switch ($mode)
  67. {
  68. case "eat":
  69.  
  70. if(!empty($p))
  71. {
  72. if(($money-$p)<=0) print $lang['voo_no_money']."<br/>";
  73. else
  74. {
  75. if($p==500)
  76. {
  77. $money=$money-500;
  78. mysql_query("update users set money='".$money."',golod='150' where id='".$id."';");
  79. print $lang['rest_now_yr_golod']." 150% :-)<br/>";
  80. }
  81. elseif($p==300)
  82. {
  83. $money=$money-300;
  84. mysql_query("update users set money='".$money."',golod='100' where id='".$id."';");
  85. print $lang['rest_now_yr_golod']." 100% :-)<br/>";
  86. }
  87. elseif($p==200)
  88. {
  89. $gol_rand=rand(50,100);
  90. $golod=$golod+$gol_rand;
  91. if($golod>150)print $lang['rest_golod_err'];
  92. else
  93. {
  94. $money=$money-200;
  95. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  96. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  97. }
  98. }
  99. elseif($p==100)
  100. {
  101. $gol_rand=rand(30,70);
  102. $golod=$golod+$gol_rand;
  103. if($golod>150)print $lang['rest_golod_err'];
  104. else
  105. {
  106. $money=$money-100;
  107. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  108. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  109. }
  110. }
  111. elseif($p==50)
  112. {
  113. $gol_rand=rand(5,10);
  114. $golod=$golod+$gol_rand;
  115. if($golod>150)print $lang['rest_golod_err'];
  116. else
  117. {
  118. $money=$money-50;
  119. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  120. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  121. }
  122. }
  123. }
  124. }
  125.  
  126. print $lang['city1_at_you']." <b>$money $$</b>. ".$lang['rest_what_u_want']."<br/>";
  127. print "-<a href=\"rest.php?id=$id&amp;pass=$pass&amp;mode=eat&amp;p=500\">".$lang['rest-1']."</a>(500$$)<br/>";
  128. print "-<a href=\"rest.php?id=$id&amp;pass=$pass&amp;mode=eat&amp;p=300\">".$lang['rest-2']."</a>(300$$)<br/>";
  129. print "-<a href=\"rest.php?id=$id&amp;pass=$pass&amp;mode=eat&amp;p=200\">".$lang['rest-3']."</a>(200$$)<br/>";
  130. print "-<a href=\"rest.php?id=$id&amp;pass=$pass&amp;mode=eat&amp;p=100\">".$lang['rest-4']."</a>(100$$)<br/>";
  131. print "-<a href=\"rest.php?id=$id&amp;pass=$pass&amp;mode=eat&amp;p=50\">".$lang['rest-5']."</a>(50$$)<br/>";
  132.  
  133. print "&gt;<a href=\"rest.php?id=$id&amp;pass=$pass\">".$lang['rest']."</a><br/>";
  134. break;
  135.  
  136. case "grab":
  137.  
  138. if(empty($guns) || ($bband==$band || $bband==''))
  139. {
  140. print $lang['uv_without_guns']."<br/>";
  141. }
  142. else
  143. {
  144. if(empty($a))
  145. {
  146. $guns_array = explode(".", $guns);
  147. $count_guns=count($guns_array);
  148. print $lang['cops_select_gun']."</small><br/><select name=\"at_gun\">";
  149. for($i=0;$i<$count_guns;$i++)
  150. {
  151. print "<option value=\"".$guns_array[$i]."\">".$guns_array[$i]."</option>";
  152. }
  153. print "</select><br/><small>";
  154. print "<anchor>".$lang['ok']."
  155. <go href=\"supermarket.php?id=$id&amp;pass=$pass&amp;mode=grab\" method=\"post\">
  156. <postfield name=\"a\" value=\"b\"/>
  157. <postfield name=\"at_gun\" value=\"$(at_gun)\"/>
  158. </go></anchor><br/>";
  159. }
  160. else
  161. {
  162. if($at_gun==$lang['gun1'])$at_gun=1;
  163. elseif($at_gun==$lang['gun2'])$at_gun=2;
  164. elseif($at_gun==$lang['gun3'])$at_gun=3;
  165. elseif($at_gun==$lang['gun4'])$at_gun=4;
  166. elseif($at_gun==$lang['gun5'])$at_gun=5;
  167. elseif($at_gun==$lang['gun6'])$at_gun=6;
  168. elseif($at_gun==$lang['gun7'])$at_gun=7;
  169. elseif($at_gun==$lang['gun8'])$at_gun=8;
  170. elseif($at_gun==$lang['gun9'])$at_gun=9;
  171. elseif($at_gun==$lang['gun10'])$at_gun=10;
  172. elseif($at_gun==$lang['gun11'])$at_gun=11;
  173. elseif($at_gun==$lang['gun12'])$at_gun=12;
  174.  
  175. $gun_cop=rand(3,12);
  176.  
  177. if($gun_cop==3)$cop_gun=$lang['gun3'];
  178. elseif($gun_cop==4)$cop_gun=$lang['gun4'];
  179. elseif($gun_cop==5)$cop_gun=$lang['gun5'];
  180. elseif($gun_cop==6)$cop_gun=$lang['gun6'];
  181. elseif($gun_cop==7)$cop_gun=$lang['gun7'];
  182. elseif($gun_cop==8)$cop_gun=$lang['gun8'];
  183. elseif($gun_cop==9)$cop_gun=$lang['gun9'];
  184. elseif($gun_cop==10)$cop_gun=$lang['gun10'];
  185. elseif($gun_cop==11)$cop_gun=$lang['gun11'];
  186. elseif($gun_cop==12)$cop_gun=$lang['gun12'];
  187.  
  188. $police=$police+3;
  189. if($gun_cop>$at_gun)
  190. {
  191.  
  192. $health=$health-50;
  193. if($health<0) $health=0;
  194. mysql_query("update users set health='".$health."',police='".$police."' where id='".$id."';");
  195. print $lang['bank_grab_fuck']." ".$cop_gun."!<br/>".$lang['bank_grab_health']." ".$health."%<br/>";
  196. }
  197. else
  198. {
  199. $grab_money=$money+$bmoney;
  200. mysql_query("update users set money='".$grab_money."',police='".$police."' where id='".$id."';");
  201. mysql_query("update krisha set money='0' where city='2' and house='supermarket';");
  202. print $lang['supermarket_grab_yeah']." ".$grab_money."$$<br/>";
  203. }
  204.  
  205. }
  206.  
  207. }
  208. print "&gt;<a href=\"supermarket.php?id=$id&amp;pass=$pass\">".$lang['supermarket']."</a><br/>";
  209. break;
  210. case "kr":
  211.  
  212. if(empty($bband) && !empty($band))
  213. {
  214. mysql_query("update krisha set band='".$band."' where city='2' and house='supermarket'");
  215. print $lang['rest_now_your_band_is_kr1'];
  216.  
  217. $bank_band=mysql_fetch_array(mysql_query("select boss from bands where name='".$band."';"));
  218. $boss=$bank_band['boss'];
  219. $db_boss=mysql_fetch_array(mysql_query("select id,pass from users where login='".$boss."';"));
  220. $dbid=$db_boss['id'];
  221. $dbpass=$db_boss['pass'];
  222. $messaga=$lang['rest_now_mes1']."<br/>[<a href=\"./../mes.php?pass=$dbpass&amp;id=$dbid&amp;dbid=0&amp;mode=del\">".$lang['ok']."</a>]";
  223. mysql_query("insert into messagi values(0,'0','$dbid','$messaga');");
  224. }
  225. else
  226. {
  227. print $lang['error']."<br/>";
  228. }
  229. print "&gt;<a href=\"supermarket.php?id=$id&amp;pass=$pass\">".$lang['supermarket']."</a><br/>";
  230. break;
  231. case "at_kr":
  232. if(!empty($band) && $band!=$bband)
  233. {
  234. $band_array_att=mysql_fetch_array(mysql_query("select avtoritet from bands where name='".$band."';"));
  235. $band_array_kr=mysql_fetch_array(mysql_query("select boss,avtoritet from bands where name='".$bband."';"));
  236.  
  237. $avtoritet_att=$band_array_att['avtoritet'];
  238. $boss_kr=$band_array_kr['boss'];
  239. $avtoritet_kr=$band_array_kr['avtoritet'];
  240.  
  241. if($avtoritet_att>$avtoritet_kr)
  242. {
  243. mysql_query("update krisha set band='".$band."' where city='2' and house='supermarket';'");
  244. print $lang['rest_kr_another_band']." ".$band."!<br/>";
  245.  
  246.  
  247. $db_boss=mysql_fetch_array(mysql_query("select id,pass from users where login='".$boss_kr."';"));
  248. $dbid=$db_boss['id'];
  249. $dbpass=$db_boss['pass'];
  250. $messaga="<b>".$lang['supermarket']."</b><br/>".$lang['supermarket_kr_another_band']." ".$band.".<br/>[<a href=\"./../mes.php?pass=$dbpass&amp;id=$dbid&amp;dbid=0&amp;mode=del\">".$lang['ok']."</a>]";
  251. mysql_query("insert into messagi values(0,'0','$dbid','$messaga');");
  252.  
  253. }
  254. elseif($avtoritet_att<=$avtoritet_kr)
  255. {
  256. print $lang['bank_small_level'];
  257. }
  258.  
  259. }
  260. else
  261. {
  262. print $lang['error']."<br/>";
  263. }
  264.  
  265.  
  266. print "&gt;<a href=\"supermarket.php?id=$id&amp;pass=$pass\">".$lang['supermarket']."</a><br/>";
  267. break;
  268. case "gp":
  269. if(($btime+3600)<time())
  270. {
  271. $band_array=mysql_fetch_array(mysql_query("select boss,money from bands where name='".$bband."';"));
  272. $percents=rand(1,1000);
  273. $bmoney=$bmoney-$percents;
  274. $band_money=$band_array['money'];
  275. $band_boss=$band_array['boss'];
  276. $band_money=$band_money+$percents;
  277. mysql_query("update krisha set money='".$bmoney."',time='".time()."' where city='2' and house='supermarket';");
  278. mysql_query("update bands set money='".$band_money."' where name='".$bband."';");
  279. print $percents."$$ ".$lang['bank_now_at_obwak']."<br/>";
  280. $db_boss=mysql_fetch_array(mysql_query("select id,pass from users where login='".$band_boss."';"));
  281. $dbid=$db_boss['id'];
  282. $dbpass=$db_boss['pass'];
  283. $messaga="<b>".$lang['rest']."</b><br/>".$lang['bank_has_percents']." ".$band_money."$$<br/>[<a href=\"./../mes.php?pass=$dbpass&amp;id=$dbid&amp;dbid=0&amp;mode=del\">".$lang['ok']."</a>]";
  284. mysql_query("insert into messagi values(0,'0','$dbid','$messaga');");
  285. }
  286. else
  287. {
  288. print $lang['bank_kto-to']." ".$bband." ".$lang['bank_uje']."<br/>";
  289. }
  290.  
  291. print "&gt;<a href=\"supermarket.php?id=$id&amp;pass=$pass\">".$lang['supermarket']."</a><br/>";
  292. break;
  293.  
  294. default:
  295. print $lang['plc_sud_hi'];
  296.  
  297. if(empty($bband) && $band!='') print "<a href=\"supermarket.php?id=$id&amp;pass=$pass&amp;mode=kr\">".$lang['bank_krisha']."</a><br/>";
  298. elseif(!empty($bband) && $bband!=$band && $band!='')
  299. {
  300. }
  301. break;
  302. }
  303.  
  304.  
  305. print "&gt;<a href=\"http://wenz.org.ru/gta/city1/about_sud.php?id=$id&amp;pass=$pass\">О cyде</a>";
  306. print "&gt;<a href=\"http://wenz.org.ru/gta/city1/kart_sud.php?id=$id&amp;pass=$pass\">Каpтотека</a>";
  307. print "&gt;<a href=\"http://wenz.org.ru/gb\">Оcтaвить жалобy</a>";
  308. print "&gt;<a href=\"http://wenz.org.ru\">Заceдание cyда</a>";
  309. print "<br/>&gt;&gt;<a href=\"http://wenz.org.ru/gta/city1/index.php?id=$id&amp;pass=$pass\">".$lang['in_city']."</a>";
  310. print "<br/>---";
  311.  
  312. mysql_close();
  313. include "./../includes/footer.php";
  314. ?>