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

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