Просмотр файла gta/city2/medicines.php

Размер файла: 4.5Kb
  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.  
  16. include "./../ini3.php";
  17. include "./../includes/header2.php";
  18. include "./../includes/inc_online.php";
  19.  
  20.  
  21. $id=cyr(htmlspecialchars(stripslashes(trim($id))));
  22. $pass=cyr(htmlspecialchars(stripslashes(trim($pass))));
  23.  
  24. if(!empty($id))
  25. {
  26. $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."';");
  27. }
  28. else
  29. {
  30. die ($lang['empty_login']."</body>
  31. </html>");
  32. }
  33.  
  34. $data = mysql_fetch_array($q);
  35.  
  36. $id=$data['id'];
  37. $login=$data['login'];
  38. $money=$data['money'];
  39. $level=$data['level'];
  40. $police=$data['police'];
  41. $stage=$data['stage'];
  42. $health=$data['health'];
  43. $cars=$data['cars'];
  44. $guns=$data['guns'];
  45. $nums=$data['nums'];
  46. $voo_por=$data['voodoo'];
  47. $golod=$data['golod'];
  48. $secur=$data['secur'];
  49. $zav=$data['zav'];
  50. $lsd=$data['lsd'];
  51. $ban=$data['ban'];
  52.  
  53. if($pass!=$data['pass'])
  54. {
  55. die ($lang['empty_login']."</body>
  56. </html>");
  57. }
  58.  
  59. mysql_query("update users set last='".time()."',city='1' where id='".$id."';");
  60. if($ban==0)
  61. {
  62.  
  63. include "./../includes/inc_secur.php";
  64. include "./../includes/inc_golod.php";
  65. include "./../includes/inc_hospital.php";
  66. include "./../includes/inc_police.php";
  67. include "./../includes/inc_die.php";
  68. include "./../includes/inc_voodoo.php";
  69. include "./../includes/inc_attack.php";
  70. include "./../includes/inc_mes.php";
  71. print "<b>[Зд: $health %][Сыт: $golod %][Зщ: $secur %]</b><br/>";
  72. $result = mysql_query("SELECT * FROM `themes`");
  73. $ths = mysql_num_rows($result);
  74. $result = mysql_query("SELECT * FROM `posts`");
  75. $pts = mysql_num_rows($result);
  76. echo'<a href="./../forum.php?id='.$id.'&amp;pass='.$pass.'">Форум</a> (<b>'.$ths.'</b>|<b>'.$pts.'</b>)<br/>';
  77.  
  78. print "<b>".$lang['game_city2']."</b><br/>";
  79. print "<u>[Поликлиника]</u><br/>";
  80.  
  81. switch ($mode)
  82. {
  83. case "sale":
  84.  
  85. if(!empty($p) && $money>=$p && ($health+$p)<=1500 && ($p==50 || $p==70 || $p==100 || $p==500))
  86. {
  87. $p=cyr(htmlspecialchars(stripslashes(trim($p))));
  88. $money=$money-$p;
  89. $health=$health+($p-30);
  90. mysql_query("update users set health='$health',money='$money' where id='".$id."';");
  91. print $lang['city1_health_corrected']." <b>$p %</b>!<br/>";
  92. }
  93. elseif($money<=$p)
  94. {
  95. print $lang['city1_dont_have_money']."<br/>";
  96. }
  97. elseif(($health+$p)>=1500)
  98. {
  99. print $lang['city1_health_cannot_be_more']." 1500 %.<br/>";
  100. }
  101. elseif(empty($p))
  102. {
  103. print "-<a href=\"medicines.php?id=$id&amp;pass=$pass&amp;mode=sale&amp;p=50\">Осмотр</a><b>(50 $$)</b><br/>";
  104. print "-<a href=\"medicines.php?id=$id&amp;pass=$pass&amp;mode=sale&amp;p=70\">Анализы</a><b>(70 $$)</b><br/>";
  105. print "-<a href=\"medicines.php?id=$id&amp;pass=$pass&amp;mode=sale&amp;p=100\">Рентген</a><b>(100 $$)</b><br/>";
  106. print "-<a href=\"medicines.php?id=$id&amp;pass=$pass&amp;mode=sale&amp;p=500\">Полное обследование</a><b>(500 $$)</b><br/>";
  107. }
  108. print "&gt;<a href=\"medicines.php?id=$id&amp;pass=$pass\">В поликлинику</a><br/>";
  109. break;
  110. default:
  111. print 'Здесь ты можешь вылечиться от всех болезней,если у тебя есть деньги<br/>';
  112. print "<a href=\"medicines.php?id=$id&amp;pass=$pass&amp;mode=sale\">Обратиться к врачу</a><br/>";
  113. break;
  114. }
  115.  
  116.  
  117.  
  118. print "---<br/>&gt;<a href=\"index.php?id=$id&amp;pass=$pass\">".$lang['in_city']."</a>";
  119. print "<br/>&gt;&gt;<a href=\"./../game.php?id=$id&amp;pass=$pass\">".$lang['menu']."</a>";
  120. print "<br/>---";
  121.  
  122. mysql_close();
  123. include "./../includes/footer2.php";
  124. echo '<br/><br/>-------<br/><div class="msg"><a href="http://wenz.net.ru">Сайт вап мастеру</a></div><br/>';
  125.  
  126. }
  127.  
  128. elseif($ban==1)
  129. {
  130. die ($lang['empty_login']."</body>
  131. </html>");
  132.  
  133. }
  134. ?>