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

Размер файла: 5.79Kb
  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>".$lang['game_city1']."</b><br/>";
  59. print "<u>[".$lang['area_ag']."]</u><br/>";
  60. $st=50;
  61. if (empty($key))
  62. { echo '<form action="agentstvo.php?id='.$id.'&amp;pass='.$pass.'" method="post">
  63. <postfield name="key" value="$('.key.')"/>';
  64. print ''.$lang['ag_about'].'<b>$$'.$st.'</b>'.$lang['ag_about2'].'<br/>'.$lang['ag_word'].':<br/>
  65. <input title="Word" name="key"/><br/>';
  66.  
  67. echo "<input class=\"ibutton\" type=\"submit\" value=\"".$lang['ag_search']."\"/>";
  68. echo "</form>";
  69. }
  70. else
  71. {
  72. $money = $money-$st;
  73. mysql_query("update users set money='".$money."' where id='".$id."'");
  74. $key = htmlspecialchars(stripslashes(trim(str_replace("$", "$$", $key))));
  75. $query = "SELECT * FROM users WHERE login = '".$key."'";
  76. $result = mysql_query($query);
  77. if (mysql_num_rows($result) > 0)
  78. {
  79. while ($r = mysql_fetch_array($result))
  80. {
  81. $reg = explode(":",$r['reg_data']);
  82. print ''.$lang['ag_results'].'<br/>';
  83. if (time()-$last > 1200) { $v = ''.$lang['no'].''; }
  84. else { $v=''.$lang['yes'].''; }
  85. $p = date("H:i j.m.Y",$r['last']);
  86. $msg = '<u>['.$r['login'].']</u>:<br/>';
  87. $msg .= '<a href="../mes.php?id='.$id.'&amp;pass='.$pass.'&amp;dbid='.$r['id'].'&amp;mode=reply">['.$lang['uv_mes'].']</a><br/>';
  88. $msg .= 'ID: '.$r['id'].'<br/>';
  89. $msg .= ''.$lang['uv_status'].': <b>'.$r['status'].'</b><br/>';
  90. $msg .= ''.$lang['ag_now'].': '.$v.'<br/>';
  91. $msg .= ''.$lang['uv_regdate1'].':'.$reg[1].' '.$lang['uv_regdate2'].' '.$reg[0].' '.$lang['uv_regdate3'].'<br/>';
  92. $msg .= ''.$lang['uv_money'].': $$'.$r['money'].'<br/>';
  93. $msg .= ''.$lang['uv_level'].': '.$r['level'].'<br/>';
  94. $msg .= ''.$lang['uv_police'].': '.$r['police'].'<br/>';
  95. if ($r['cars'] != "")
  96. {
  97. $msg .= ''.$lang['uv_cars'].': '.str_replace(".", ",", $r['cars']).'<br/>';
  98. }
  99. if ($r['guns'] != "")
  100. {
  101. $msg .= ''.$lang['uv_guns'].': '.str_replace(".", ",", $r['guns']).'<br/>';
  102. }
  103. if ($r['secur'] != "")
  104. {
  105. $msg .= ''.$lang['uv_secur'].': '.$r['secur'].'<br/>';
  106. }
  107. $msg .= ''.$lang['uv_health'].': '.$r['health'].'%<br/>';
  108. $msg .= ''.$lang['uv_golod'].': '.$r['golod'].'%<br/>';
  109. $msg .= ''.$lang['ag_last'].': '.$p.'<br/>';
  110. $msg .= '';
  111. if ($r['band'] != "")
  112. {
  113. $msg .= ''.$lang['uv_band'].': <b><a href="../bands/viewband.php?id='.$id.'&amp;pass='.$pass.'&amp;band='.urlencode($r['band']).'">'.$r['band'].'</a></b><br/>';
  114. }
  115. if ($r['mobile'] != "")
  116. {
  117. $msg .= ''.$lang['uv_mobile'].': '.$r['mobile'].'<br/>';
  118. }
  119. if ($r['about'] != "")
  120. {
  121. $msg .= ''.$lang['regabout'].': '.$r['about'].'<br/>';
  122. }
  123. if ($r['email'] != "")
  124. {
  125. $msg .= 'E-mail: '.$r['email'].'<br/>';
  126. }
  127. $msg .= '&gt;<a href="agentstvo.php?id='.$id.'&amp;pass='.$pass.'">'.$lang['area_ag'].'</a><br/>';
  128.  
  129. print '
  130. '.$msg.'
  131. ';
  132. }
  133. }
  134. else
  135. {
  136. print ''.$lang['ag_no_results'].'<br/>';
  137. print '&gt;<a href="agentstvo.php?id='.$id.'&amp;pass='.$pass.'">'.$lang['area_ag'].'</a><br/>';
  138. }
  139. }
  140.  
  141. print "---<br/>&gt;<a href=\"index.php?id=$id&amp;pass=$pass\">".$lang['in_city']."</a>";
  142. print "<br/>&gt;&gt;<a href=\"./../game.php?id=$id&amp;pass=$pass\">".$lang['menu']."</a>";
  143. print "<br/>---";
  144.  
  145. mysql_close();
  146. include "./../includes/footer2.php";
  147. }
  148. ?>