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

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