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

Размер файла: 4.71Kb
  1. <?php
  2. #####################################################
  3. # mod by -=LesNIK=- #
  4. # icq 366244181 #
  5. # Официальный сайт мода http://wenz.net.ru #
  6. # все ответы на вопросы и помощь по скрипту #
  7. # вы можете получить только там! #
  8. # #
  9. # Вы не имеете право вносить #
  10. # свои изменения в данный мод!#
  11. # #
  12. # Уважайте труд автора! #
  13. #####################################################
  14.  
  15. include "./../ini3.php";
  16. include "./../includes/header2.php";
  17. include "./../includes/inc_online.php";
  18.  
  19.  
  20. $id=cyr(htmlspecialchars(stripslashes(trim($id))));
  21. $pass=cyr(htmlspecialchars(stripslashes(trim($pass))));
  22.  
  23. if(!empty($id))
  24. {
  25. $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."';");
  26. }
  27. else
  28. {
  29. die ($lang['empty_login']."</body>
  30. </html>");
  31. }
  32.  
  33. $data = mysql_fetch_array($q);
  34.  
  35. $id=$data['id'];
  36. $login=$data['login'];
  37. $money=$data['money'];
  38. $level=$data['level'];
  39. $police=$data['police'];
  40. $stage=$data['stage'];
  41. $health=$data['health'];
  42. $cars=$data['cars'];
  43. $guns=$data['guns'];
  44. $nums=$data['nums'];
  45. $voo_por=$data['voodoo'];
  46. $golod=$data['golod'];
  47. $secur=$data['secur'];
  48. $zav=$data['zav'];
  49. $lsd=$data['lsd'];
  50. $ban=$data['ban'];
  51.  
  52. if($pass!=$data['pass'])
  53. {
  54. die ($lang['empty_login']."</body>
  55. </html>");
  56. }
  57.  
  58. mysql_query("update users set last='".time()."',city='1' where id='".$id."';");
  59. if($ban==0)
  60. {
  61.  
  62. include "./../includes/inc_secur.php";
  63. include "./../includes/inc_golod.php";
  64. include "./../includes/inc_hospital.php";
  65. include "./../includes/inc_police.php";
  66. include "./../includes/inc_die.php";
  67. include "./../includes/inc_voodoo.php";
  68. include "./../includes/inc_attack.php";
  69. include "./../includes/inc_mes.php";
  70. print "<b>[Зд: $health %][Сыт: $golod %][Зщ: $secur %]</b><br/>";
  71. $result = mysql_query("SELECT * FROM `themes`");
  72. $ths = mysql_num_rows($result);
  73. $result = mysql_query("SELECT * FROM `posts`");
  74. $pts = mysql_num_rows($result);
  75. echo'<a href="./../forum.php?id='.$id.'&amp;pass='.$pass.'">Форум</a> (<b>'.$ths.'</b>|<b>'.$pts.'</b>)<br/>';
  76.  
  77. print "<b>".$lang['game_city1']."</b><br/>";
  78. print "<u>[".$lang['sl_fastfood']."]</u><br/>";
  79.  
  80. if(!empty($p))
  81. {
  82. if(($money-$p)<=0) print $lang['voo_no_money'];
  83. else
  84. {
  85. if($p==50)
  86. {
  87. $gol_rand=rand(30,50);
  88. $golod=$golod+$gol_rand;
  89. if($golod>150)print $lang['rest_golod_err'];
  90. else
  91. {
  92. $money=$money-50;
  93. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  94. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  95. }
  96. }
  97. elseif($p==20)
  98. {
  99. $gol_rand=rand(10,20);
  100. $golod=$golod+$gol_rand;
  101. if($golod>150)print $lang['rest_golod_err'];
  102. else
  103. {
  104. $money=$money-20;
  105. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  106. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  107. }
  108. }
  109. elseif($p==10)
  110. {
  111. $gol_rand=rand(5,10);
  112. $golod=$golod+$gol_rand;
  113. if($golod>150)print $lang['rest_golod_err'];
  114. else
  115. {
  116. $money=$money-10;
  117. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  118. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  119. }
  120. }
  121. elseif($p==5)
  122. {
  123. $gol_rand=rand(1,5);
  124. $golod=$golod+$gol_rand;
  125. if($golod>150)print $lang['rest_golod_err'];
  126. else
  127. {
  128. $money=$money-5;
  129. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  130. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  131. }
  132. }
  133. }
  134. }
  135.  
  136. print $lang['city1_at_you']." <b>$money $$</b> ".$lang['city1_want_buy']."<br/>";
  137. print "-<a href=\"fastfood.php?id=$id&amp;pass=$pass&amp;p=50\">".$lang['ff-1']."</a>(50$$)<br/>";
  138. print "-<a href=\"fastfood.php?id=$id&amp;pass=$pass&amp;p=20\">".$lang['ff-2']."</a>(20$$)<br/>";
  139. print "-<a href=\"fastfood.php?id=$id&amp;pass=$pass&amp;p=10\">".$lang['ff-3']."</a>(10$$)<br/>";
  140. print "-<a href=\"fastfood.php?id=$id&amp;pass=$pass&amp;p=5\">".$lang['ff-4']."</a>(5$$)<br/>";
  141.  
  142.  
  143. print "&gt;<a href=\"slums.php?id=$id&amp;pass=$pass\">".$lang['city1_slums']."</a><br/>";
  144.  
  145.  
  146. print "---<br/>&gt;<a href=\"index.php?id=$id&amp;pass=$pass\">".$lang['in_city']."</a>";
  147. print "<br/>&gt;&gt;<a href=\"./../game.php?id=$id&amp;pass=$pass\">".$lang['menu']."</a>";
  148. print "<br/>---";
  149.  
  150. mysql_close();
  151. include "./../includes/footer2.php";
  152. }
  153.  
  154. elseif($ban==1)
  155. {
  156. die ($lang['empty_login']."</body>
  157. </html>");
  158.  
  159. }
  160. ?>