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

Размер файла: 6.83Kb
  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. include "./../ini3.php";
  16. include "./../includes/header2.php";
  17. include "./../includes/inc_online.php";
  18.  
  19.  
  20. $id=cyr(htmlspecialchars(stripslashes(trim($id))));
  21. $pass=cyr(htmlspecialchars(stripslashes(trim($pass))));
  22.  
  23. if(!empty($id))
  24. {
  25. $q = mysql_query("select secur,golod,voodoo,nums,guns,cars,id,login,pass,money,level,police,health from users where id='".$id."';");
  26. }
  27. else
  28. {
  29. die ($lang['empty_login']."</body>
  30. </html>");
  31. }
  32.  
  33. $data = mysql_fetch_array($q);
  34.  
  35. $id=$data['id'];
  36. $login=$data['login'];
  37. $money=$data['money'];
  38. $level=$data['level'];
  39. $police=$data['police'];
  40. $stage=$data['stage'];
  41. $health=$data['health'];
  42. $cars=$data['cars'];
  43. $guns=$data['guns'];
  44. $nums=$data['nums'];
  45. $golod=$data['golod'];
  46. $secur=$data['secur'];
  47.  
  48. if($pass!=$data['pass'])
  49. {
  50. die ($lang['empty_login']."</body>
  51. </html>");
  52. }
  53.  
  54. mysql_query("update users set last='".time()."',city='1' where id='".$id."';");
  55.  
  56. /**/
  57. $st = 50;
  58. /**/
  59. include "./../includes/inc_secur.php";
  60. include "./../includes/inc_golod.php";
  61. include "./../includes/inc_hospital.php";
  62. include "./../includes/inc_police.php";
  63. include "./../includes/inc_die.php";
  64. include "./../includes/inc_voodoo.php";
  65. include "./../includes/inc_attack.php";
  66. include "./../includes/inc_mes.php";
  67. print "<b>[Зд: $health %][Сыт: $golod %][Зщ: $secur %]</b><br/>";
  68. $result = mysql_query("SELECT * FROM `themes`");
  69. $ths = mysql_num_rows($result);
  70. $result = mysql_query("SELECT * FROM `posts`");
  71. $pts = mysql_num_rows($result);
  72. echo'<a href="./../forum.php?id='.$id.'&amp;pass='.$pass.'">Форум</a> (<b>'.$ths.'</b>|<b>'.$pts.'</b>)<br/>';
  73.  
  74. print "<b>".$lang['game_city1']."</b><br/>";
  75. print "<u>[".$lang['area_ag']."]</u><br/>";
  76.  
  77. if (empty($key))
  78. { echo '<form action="agentstvo.php?id='.$id.'&amp;pass='.$pass.'" method="post">
  79. <postfield name="key" value="$('.key.')"/>';
  80. print ''.$lang['ag_about'].'<b>$$'.$st.'</b>'.$lang['ag_about2'].'<br/>'.$lang['ag_word'].':<br/>
  81. <input title="Word" name="key"/><br/>';
  82.  
  83. echo "<input class=\"ibutton\" type=\"submit\" value=\"".$lang['ag_search']."\"/>";
  84. echo "</form>";
  85. }
  86. else
  87. {
  88. $money = $money-$st;
  89. mysql_query("update users set money='".$money."' where id='".$id."'");
  90. $key = htmlspecialchars(stripslashes(trim(str_replace("$", "$$", $key))));
  91. $query = "SELECT * FROM users WHERE login = '".$key."'";
  92. $result = mysql_query($query);
  93. if (mysql_num_rows($result) > 0)
  94. {
  95. while ($r = mysql_fetch_array($result))
  96. {
  97. $reg = explode(":",$r['reg_data']);
  98. print ''.$lang['ag_results'].'<br/>';
  99. if (time()-$last > 1200) { $v = ''.$lang['no'].''; }
  100. else { $v=''.$lang['yes'].''; }
  101. $p = date("H:i j.m.Y",$r['last']);
  102. $msg = '<u>['.$r['login'].']</u>:<br/>';
  103. $msg .= '<a href="../mes.php?id='.$id.'&amp;pass='.$pass.'&amp;dbid='.$r['id'].'&amp;mode=reply">['.$lang['uv_mes'].']</a><br/>';
  104. $msg .= 'ID: '.$r['id'].'<br/>';
  105. $msg .= ''.$lang['uv_status'].': <b>'.$r['status'].'</b><br/>';
  106. $msg .= ''.$lang['ag_now'].': '.$v.'<br/>';
  107. $msg .= ''.$lang['uv_regdate1'].':'.$reg[1].' '.$lang['uv_regdate2'].' '.$reg[0].' '.$lang['uv_regdate3'].'<br/>';
  108. $msg .= ''.$lang['uv_money'].': $$'.$r['money'].'<br/>';
  109. $msg .= ''.$lang['uv_level'].': '.$r['level'].'<br/>';
  110. $msg .= ''.$lang['uv_police'].': '.$r['police'].'<br/>';
  111. if ($r['cars'] != "")
  112. {
  113. $msg .= ''.$lang['uv_cars'].': '.str_replace(".", ",", $r['cars']).'<br/>';
  114. }
  115. if ($r['guns'] != "")
  116. {
  117. $msg .= ''.$lang['uv_guns'].': '.str_replace(".", ",", $r['guns']).'<br/>';
  118. }
  119. if ($r['secur'] != "")
  120. {
  121. $msg .= ''.$lang['uv_secur'].': '.$r['secur'].'<br/>';
  122. }
  123. $msg .= ''.$lang['uv_health'].': '.$r['health'].'%<br/>';
  124. $msg .= ''.$lang['uv_golod'].': '.$r['golod'].'%<br/>';
  125. $msg .= ''.$lang['ag_last'].': '.$p.'<br/>';
  126. $msg .= '';
  127. if ($r['band'] != "")
  128. {
  129. $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/>';
  130. }
  131. if ($r['mobile'] != "")
  132. {
  133. $msg .= ''.$lang['uv_mobile'].': '.$r['mobile'].'<br/>';
  134. }
  135. if ($r['about'] != "")
  136. {
  137. $msg .= ''.$lang['regabout'].': '.$r['about'].'<br/>';
  138. }
  139. if ($r['email'] != "")
  140. {
  141. $msg .= 'E-mail: '.$r['email'].'<br/>';
  142. }
  143. $msg .= '&gt;<a href="agentstvo.php?id='.$id.'&amp;pass='.$pass.'">'.$lang['area_ag'].'</a><br/>';
  144.  
  145. print '
  146. '.$msg.'
  147. ';
  148. }
  149. }
  150. else
  151. {
  152. print ''.$lang['ag_no_results'].'<br/>';
  153. print '&gt;<a href="agentstvo.php?id='.$id.'&amp;pass='.$pass.'">'.$lang['area_ag'].'</a><br/>';
  154. }
  155. }
  156.  
  157. print "---<br/>&gt;<a href=\"index.php?id=$id&amp;pass=$pass\">".$lang['in_city']."</a>";
  158. print "<br/>&gt;&gt;<a href=\"./../game.php?id=$id&amp;pass=$pass\">".$lang['menu']."</a>";
  159. print "<br/>---";
  160.  
  161. mysql_close();
  162. include "./../includes/footer2.php";
  163. ?>