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

Размер файла: 3.45Kb
  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. $voo_por=$data['voodoo'];
  32. $golod=$data['golod'];
  33. $secur=$data['secur'];
  34.  
  35. if($pass!=$data['pass'])
  36. {
  37. die ($lang['empty_login']."</small></p></card></wml>");
  38. }
  39.  
  40. mysql_query("update users set last='".time()."',city='1' where id='".$id."';");
  41.  
  42. include "./../includes/inc_secur.php";
  43. include "./../includes/inc_golod.php";
  44. include "./../includes/inc_hospital.php";
  45. include "./../includes/inc_police.php";
  46. include "./../includes/inc_die.php";
  47. include "./../includes/inc_voodoo.php";
  48. include "./../includes/inc_attack.php";
  49. include "./../includes/inc_mes.php";
  50. print "<b>".$lang['game_city1']."</b><br/>";
  51. print "<u>[".$lang['sl_fastfood']."]</u><br/>";
  52.  
  53. if(!empty($p))
  54. {
  55. if(($money-$p)<=0) print $lang['voo_no_money'];
  56. else
  57. {
  58. if($p==50)
  59. {
  60. $gol_rand=rand(30,50);
  61. $golod=$golod+$gol_rand;
  62. if($golod>150)print $lang['rest_golod_err'];
  63. else
  64. {
  65. $money=$money-50;
  66. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  67. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  68. }
  69. }
  70. elseif($p==20)
  71. {
  72. $gol_rand=rand(10,20);
  73. $golod=$golod+$gol_rand;
  74. if($golod>150)print $lang['rest_golod_err'];
  75. else
  76. {
  77. $money=$money-20;
  78. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  79. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  80. }
  81. }
  82. elseif($p==10)
  83. {
  84. $gol_rand=rand(5,10);
  85. $golod=$golod+$gol_rand;
  86. if($golod>150)print $lang['rest_golod_err'];
  87. else
  88. {
  89. $money=$money-10;
  90. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  91. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  92. }
  93. }
  94. elseif($p==5)
  95. {
  96. $gol_rand=rand(1,5);
  97. $golod=$golod+$gol_rand;
  98. if($golod>150)print $lang['rest_golod_err'];
  99. else
  100. {
  101. $money=$money-5;
  102. mysql_query("update users set money='".$money."',golod='".$golod."' where id='".$id."';");
  103. print $lang['rest_now_yr_golod']." ".$golod."% :-)<br/>";
  104. }
  105. }
  106. }
  107. }
  108.  
  109. print $lang['city1_at_you']." <b>$money $$</b> ".$lang['city1_want_buy']."<br/>";
  110. print "-<a href=\"fastfood.php?id=$id&amp;pass=$pass&amp;p=50\">".$lang['ff-1']."</a>(50$$)<br/>";
  111. print "-<a href=\"fastfood.php?id=$id&amp;pass=$pass&amp;p=20\">".$lang['ff-2']."</a>(20$$)<br/>";
  112. print "-<a href=\"fastfood.php?id=$id&amp;pass=$pass&amp;p=10\">".$lang['ff-3']."</a>(10$$)<br/>";
  113. print "-<a href=\"fastfood.php?id=$id&amp;pass=$pass&amp;p=5\">".$lang['ff-4']."</a>(5$$)<br/>";
  114.  
  115.  
  116. print "&gt;<a href=\"slums.php?id=$id&amp;pass=$pass\">".$lang['city1_slums']."</a><br/>";
  117.  
  118.  
  119. print "---<br/>&gt;<a href=\"index.php?id=$id&amp;pass=$pass\">".$lang['in_city']."</a>";
  120. print "<br/>&gt;&gt;<a href=\"./../game.php?id=$id&amp;pass=$pass\">".$lang['menu']."</a>";
  121. print "<br/>---";
  122.  
  123. mysql_close();
  124. include "./../includes/footer.php";
  125. ?>