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

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