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

Размер файла: 2.19Kb
  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. $golod=$data['golod'];
  32. $secur=$data['secur'];
  33.  
  34. if($pass!=$data['pass'])
  35. {
  36. die ($lang['empty_login']."</small></p></card></wml>");
  37. }
  38.  
  39. mysql_query("update users set last='".time()."',city='1' where id='".$id."';");
  40.  
  41. include "./../includes/inc_secur.php";
  42. include "./../includes/inc_golod.php";
  43. include "./../includes/inc_hospital.php";
  44. include "./../includes/inc_police.php";
  45. include "./../includes/inc_die.php";
  46. include "./../includes/inc_voodoo.php";
  47. include "./../includes/inc_attack.php";
  48. include "./../includes/inc_mes.php";
  49. print "<b>".$lang['game_city1']."</b><br/>";
  50. print "<u>[".$lang['chuv_enter']."]</u><br/>";
  51.  
  52. switch ($mode)
  53. {
  54. case "e":
  55. if(empty($p))
  56. {
  57. print $lang['chuv_yes'];
  58. print "<a href=\"chuvak.php?id=$id&amp;pass=$pass&amp;mode=e&amp;p=k\">".$lang['ph_kup']."</a><br/>";
  59. }
  60. else
  61. {
  62. if($money<100) die($lang['bands_user_without_money_for']."<br/><anchor>".$lang['back']."<prev/></anchor></small></p></card></wml>");
  63. $money=$money-1;
  64. ++$police;
  65. mysql_query("update users set money='".$money."',police='".$police."',health='1500' where id='".$id."';");
  66. print $lang['chuv_warning'];
  67. }
  68. break;
  69. default:
  70. print $lang['chuv_mes'];
  71. print "<a href=\"chuvak.php?id=$id&amp;pass=$pass&amp;mode=e\">".$lang['chuv_vopros']."</a><br/>";
  72. print "<a href=\"area.php?id=$id&amp;pass=$pass\">".$lang['chuv_ok']."</a><br/>";
  73. break;
  74. }
  75.  
  76.  
  77. include("./../includes/inc_in_city.php");
  78.  
  79. mysql_close();
  80. include "./../includes/footer.php";
  81. ?>