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

Размер файла: 3.63Kb
  1. <?php
  2. include "./../ini3.php";
  3. include "./../includes/header2.php";
  4. include "./../includes/inc_online.php";
  5.  
  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 * from users where id='".$id."';");
  13. }
  14. else
  15. {
  16. die ($lang['empty_login']."</body></html>");
  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. $gold=$data['gold'];
  38. $antikiller=$data['antikiller'];
  39. $lox=$data['lox'];
  40.  
  41. if($pass!=$data['pass'])
  42. {
  43. die ($lang['empty_login']."</body></html>");
  44. }
  45.  
  46. mysql_query("update users set last='".time()."',city='1' where id='".$id."';");
  47. if($ban==0)
  48. {
  49.  
  50. include "./../includes/inc_secur.php";
  51. include "./../includes/inc_golod.php";
  52. include "./../includes/inc_hospital.php";
  53. include "./../includes/inc_police.php";
  54. include "./../includes/inc_die.php";
  55. include "./../includes/inc_voodoo.php";
  56. include "./../includes/inc_attack.php";
  57. include "./../includes/inc_mes.php";
  58. print "<b>[Зд: $health %][Сыт: $golod %][Зщ: $secur %]</b><br/>";
  59. print "<b>".$lang['game_city1']."</b><br/>";
  60. print "<u>[".$lang['sl_fastfood']."]</u><br/>";
  61.  
  62. if(!empty($p))
  63. {
  64. if(($money-$p)<=0) print $lang['voo_no_money'];
  65. else
  66. {
  67. if($p==50)
  68. {
  69. $gol_rand=rand(30,50);
  70. $golod=$golod+$gol_rand;
  71. if($golod>150)print $lang['rest_golod_err'];
  72. else
  73. {
  74. $money=$money-50;
  75. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  76. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  77. }
  78. }
  79. elseif($p==20)
  80. {
  81. $gol_rand=rand(10,20);
  82. $golod=$golod+$gol_rand;
  83. if($golod>150)print $lang['rest_golod_err'];
  84. else
  85. {
  86. $money=$money-20;
  87. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  88. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  89. }
  90. }
  91. elseif($p==10)
  92. {
  93. $gol_rand=rand(5,10);
  94. $golod=$golod+$gol_rand;
  95. if($golod>150)print $lang['rest_golod_err'];
  96. else
  97. {
  98. $money=$money-10;
  99. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  100. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  101. }
  102. }
  103. elseif($p==5)
  104. {
  105. $gol_rand=rand(1,5);
  106. $golod=$golod+$gol_rand;
  107. if($golod>150)print $lang['rest_golod_err'];
  108. else
  109. {
  110. $money=$money-5;
  111. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  112. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  113. }
  114. }
  115. }
  116. }
  117.  
  118. print $lang['city1_at_you']." <b>$money $$</b> ".$lang['city1_want_buy']."<br/>";
  119. print "-<a href=\"fastfood.php?id=$id&amp;pass=$pass&amp;p=50\">".$lang['ff-1']."</a>(50$$)<br/>";
  120. print "-<a href=\"fastfood.php?id=$id&amp;pass=$pass&amp;p=20\">".$lang['ff-2']."</a>(20$$)<br/>";
  121. print "-<a href=\"fastfood.php?id=$id&amp;pass=$pass&amp;p=10\">".$lang['ff-3']."</a>(10$$)<br/>";
  122. print "-<a href=\"fastfood.php?id=$id&amp;pass=$pass&amp;p=5\">".$lang['ff-4']."</a>(5$$)<br/>";
  123.  
  124.  
  125. print "&gt;<a href=\"slums.php?id=$id&amp;pass=$pass\">".$lang['city1_slums']."</a><br/>";
  126.  
  127.  
  128. print "---<br/>&gt;<a href=\"index.php?id=$id&amp;pass=$pass\">".$lang['in_city']."</a>";
  129. print "<br/>&gt;&gt;<a href=\"./../game.php?id=$id&amp;pass=$pass\">".$lang['menu']."</a>";
  130. print "<br/>---";
  131.  
  132. mysql_close();
  133. include "./../includes/footer2.php";
  134. }
  135.  
  136. elseif($ban==1)
  137. {
  138. die ($lang['empty_login']."</body>
  139. </html>");
  140.  
  141. }
  142. ?>