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

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