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

Размер файла: 5.1Kb
  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,voodoo,nums,guns,cars,id,login,pass,money,level,police,health,zav,lsd,ban 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. $voo_por=$data['voodoo'];
  32. $golod=$data['golod'];
  33. $secur=$data['secur'];
  34. $zav=$data['zav'];
  35. $lsd=$data['lsd'];
  36. $ban=$data['ban'];
  37.  
  38. if($pass!=$data['pass'])
  39. {
  40. die ($lang['empty_login']."</small></p></card></wml>");
  41. }
  42.  
  43. mysql_query("update users set last='".time()."',city='1' where id='".$id."';");
  44. if($ban==0)
  45. {
  46.  
  47. include "./../includes/inc_secur.php";
  48. include "./../includes/inc_golod.php";
  49. include "./../includes/inc_hospital.php";
  50. include "./../includes/inc_police.php";
  51. include "./../includes/inc_die.php";
  52. include "./../includes/inc_voodoo.php";
  53. include "./../includes/inc_attack.php";
  54. include "./../includes/inc_mes.php";
  55. print "<b>[Зд: $health %][Сыт: $golod %][Зщ: $secur %]</b><br/>";
  56. print "<b>".$lang['game_city1']."</b><br/>";
  57.  
  58.  
  59.  
  60.  
  61. switch ($mode)
  62. {
  63. case "1a":
  64. print "<u>[".$lang['el_1avenu']."]</u><br/>";
  65.  
  66. if(empty($what))
  67. {
  68. print "<a href=\"elite.php?id=$id&amp;pass=$pass&amp;mode=1a&amp;what=os\">".$lang['el_os']."</a><br/>";
  69. /*print "<a href=\"museum.php?id=$id&amp;pass=$pass\"> </a><br/>";*/
  70. }
  71. elseif($what='os')
  72. {
  73.  
  74. $os_cars=array($lang['car1'],$lang['car2'],$lang['car3'],$lang['car4'],$lang['car5']);
  75. $cars_rand = rand(0, count($os_cars)-1);
  76.  
  77. if(empty($tachka) || empty($at_gun))
  78. {
  79. print $lang['el_1av_mes'];
  80. print "<b>".$os_cars[$cars_rand]."</b><br/>";
  81.  
  82. if(!empty($guns))
  83. {
  84. $guns_array = explode(".", $guns);
  85. $count_guns=count($guns_array);
  86. print $lang['cops_select_gun']."</small><br/><select name=\"at_gun\">";
  87. for($i=0;$i<$count_guns;$i++)
  88. {
  89. print "<option value=\"".$guns_array[$i]."\">".$guns_array[$i]."</option>";
  90. }
  91. print "</select><br/><small>";
  92. print "
  93. <anchor>".$lang['uv_try_steal']."
  94. <go href=\"elite.php?id=$id&amp;pass=$pass&amp;mode=1a&amp;what=os\" method=\"post\">
  95. <postfield name=\"tachka\" value=\"".$os_cars[$cars_rand]."\"/>
  96. <postfield name=\"at_gun\" value=\"$(at_gun)\"/>
  97. </go>
  98. </anchor><br/>";
  99. }
  100.  
  101. }
  102. else
  103. {
  104. if($at_gun==$lang['gun1'])$at_gun=1;
  105. elseif($at_gun==$lang['gun2'])$at_gun=2;
  106. elseif($at_gun==$lang['gun3'])$at_gun=3;
  107. elseif($at_gun==$lang['gun4'])$at_gun=4;
  108. elseif($at_gun==$lang['gun5'])$at_gun=5;
  109. elseif($at_gun==$lang['gun6'])$at_gun=6;
  110. elseif($at_gun==$lang['gun7'])$at_gun=7;
  111. elseif($at_gun==$lang['gun8'])$at_gun=8;
  112. elseif($at_gun==$lang['gun9'])$at_gun=9;
  113. elseif($at_gun==$lang['gun10'])$at_gun=10;
  114. elseif($at_gun==$lang['gun11'])$at_gun=11;
  115. elseif($at_gun==$lang['gun12'])$at_gun=12;
  116.  
  117. $gun_cop=rand(4,12);
  118.  
  119. if($gun_cop==4)$cop_gun=$lang['gun4'];
  120. elseif($gun_cop==5)$cop_gun=$lang['gun5'];
  121. elseif($gun_cop==6)$cop_gun=$lang['gun6'];
  122. elseif($gun_cop==7)$cop_gun=$lang['gun7'];
  123. elseif($gun_cop==8)$cop_gun=$lang['gun8'];
  124. elseif($gun_cop==9)$cop_gun=$lang['gun9'];
  125. elseif($gun_cop==10)$cop_gun=$lang['gun10'];
  126. elseif($gun_cop==11)$cop_gun=$lang['gun11'];
  127. elseif($gun_cop==12)$cop_gun=$lang['gun12'];
  128.  
  129. $police=$police+3;
  130. if($gun_cop>$at_gun)
  131. {
  132. $health=$health-30;
  133. if($health<0) $health=0;
  134. mysql_query("update users set health='".$health."',police='".$police."' where id='".$id."';");
  135. print $lang['bank_grab_fuck']." ".$cop_gun."!<br/>".$lang['bank_grab_health']." ".$health."%<br/>";
  136. }
  137. else
  138. {
  139. $grab_money=$money+$bmoney;
  140. mysql_query("update users set money='".$grab_money."',police='".$police."' where id='".$id."';");
  141. if(empty($cars))
  142. mysql_query("update users set cars='$tachka' where id='".$id."';");
  143. else
  144. mysql_query("update users set cars='$cars.$tachka' where id='".$id."';");
  145. print "<b>$tachka</b> ".$lang['el_car_now_at_you']."<br/>";
  146. }
  147.  
  148. }
  149.  
  150.  
  151. }
  152.  
  153. print "&gt;<a href=\"elite.php?id=$id&amp;pass=$pass\">".$lang['area_elite']."</a><br/>";
  154. break;
  155. default:
  156. print "<u>[".$lang['area_elite']."]</u><br/>";
  157. print $lang['el_mes']."<br/>";
  158. /* print "<a href=\"museum.php?id=$id&amp;pass=$pass\"></a><br/>";*/
  159. print "<a href=\"rest.php?id=$id&amp;pass=$pass\">".$lang['rest']."</a><br/>";
  160. print "<a href=\"elite.php?id=$id&amp;pass=$pass&amp;mode=1a\">".$lang['el_1avenu']."</a><br/>";
  161. print "<a href=\"osobnyaki.php?id=$id&amp;pass=$pass\">".$lang['el_2avenu']."</a><br/>";
  162. print "<a href=\"security.php?id=$id&amp;pass=$pass\">".$lang['el_security']."</a><br/>";
  163. print "&gt;<a href=\"area.php?id=$id&amp;pass=$pass\">".$lang['city1_area']."</a><br/>";
  164. break;
  165. }
  166.  
  167. include("./../includes/inc_in_city.php");
  168.  
  169. mysql_close();
  170. include "./../includes/footer.php";
  171. }
  172.  
  173. elseif($ban==1)
  174. {
  175. die ($lang['empty_login']."</small></p></card></wml>");
  176.  
  177. }
  178. ?>