View file gta/city1/profile.php

File size: 4.45Kb
  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 "ini.php";
  16. include "includes/header.php";
  17. include "includes/inc_online.php";
  18. print "<p><small>";
  19.  
  20. $id=cyr(htmlspecialchars(stripslashes(trim($id))));
  21. $login=cyr(htmlspecialchars(stripslashes(trim($login))));
  22. $pass=cyr(htmlspecialchars(stripslashes(trim($pass))));
  23.  
  24. if(!empty($login))
  25. {
  26. $q = mysql_query("select pass,id,login,mobile,about,email from users where login='".cyr($login)."';");
  27. }
  28. elseif(!empty($id))
  29. {
  30. $q = mysql_query("select pass,id,login,mobile,about,email from users where id='".$id."';");
  31. }
  32. else
  33. {
  34. die ($lang['empty_login']."</small></p></card></wml>");
  35. }
  36.  
  37. $data = mysql_fetch_array($q);
  38.  
  39. $id=$data['id'];
  40. $login=$data['login'];
  41. $mobile=$data['mobile'];
  42. $about=$data['about'];
  43. $mail=$data['email'];
  44.  
  45. if($pass!=$data['pass'])
  46. {
  47. die ($lang['empty_login']."</small></p></card></wml>");
  48. }
  49.  
  50. mysql_query("update users set last='".time()."',city='0' where id='".$id."';");
  51.  
  52.  
  53. switch ($mode)
  54. {
  55. case "save":
  56.  
  57. if($newpass!=$newpass2)
  58. {
  59. print $lang['reg_error_pass']."<br/>";
  60. print "<anchor>".$lang['again']."<prev/></anchor></small></p></card></wml>";
  61. exit;
  62. }
  63. if (ereg("[а-яА-Я,$,>,<,',;,/,\,&,#,,,.,:,*,@,!,%,^,(,)]","$newpass$login$newpass2"))
  64. {
  65. print $lang['reg_bad_symbols']."<br/>";
  66. print "<anchor>".$lang['again']."<prev/></anchor></small></p></card></wml>";
  67. exit;
  68. }
  69.  
  70. $newpass=cyr(htmlspecialchars(stripslashes(trim(str_replace('$','$$',$newpass)))));
  71. $newpass2=cyr(htmlspecialchars(stripslashes(trim(str_replace('$','$$',$newpass2)))));
  72. $newemail=cyr(htmlspecialchars(stripslashes(trim(str_replace('$','$$',$newemail)))));
  73. $newmobile=cyr(htmlspecialchars(stripslashes(trim(str_replace('$','$$',$newmobile)))));
  74. $newabout=cyr(htmlspecialchars(stripslashes(trim(str_replace('$','$$',$newabout)))));
  75. $newnums=cyr(htmlspecialchars(stripslashes(trim(str_replace('$','$$',$newnums)))));
  76.  
  77. mysql_query("update users set pass='".$newpass."',email='".$newemail."',mobile='".$newmobile."',about='".$newabout."',nums='".$newnums."' where id='".$id."';");
  78. print $lang['profile_refreshed'];
  79.  
  80. $pass=$newpass;
  81.  
  82. break;
  83. default:
  84. print $lang['profile_pass'].":</small><br/>";
  85. print "<input name=\"newpass\" value=\"$pass\" maxlength=\"15\"/><br/>";
  86. print "<small>".$lang['profile_pass2'].":</small><br/>";
  87. print "<input name=\"newpass2\" value=\"$pass\" maxlength=\"15\"/><br/>";
  88. print "<small>".$lang['reg_mail'].":</small><br/>";
  89. print "<input name=\"newemail\" value=\"$mail\"/><br/>";
  90. print "<small>".$lang['regmobile'].":</small><br/>";
  91. print "<input value=\"$mobile\" name=\"newmobile\"/><br/>";
  92.  
  93. print "<small>".$lang['regabout'].":</small><br/>";
  94. print "<input value=\"$about\" name=\"newabout\"/><br/>";
  95. print "<small>".$lang['regonline'].":</small><br/>";
  96. print "<select name=\"newnums\">
  97. <option value=\"5\">5</option>
  98. <option value=\"10\">10</option>
  99. <option value=\"15\">15</option>
  100. <option value=\"20\">20</option>
  101. <option value=\"25\">25</option>
  102. <option value=\"30\">30</option>
  103. <option value=\"50\">50</option>
  104. </select><br/>";
  105. print "<small><anchor>".$lang['ok']."
  106. <go href=\"profile.php?id=$id&amp;pass=$pass\" method=\"post\">
  107. <postfield name=\"mode\" value=\"save\"/>
  108. <postfield name=\"newpass\" value=\"$(newpass)\"/>
  109. <postfield name=\"newpass2\" value=\"$(newpass2)\"/>
  110. <postfield name=\"newemail\" value=\"$(newemail)\"/>
  111. <postfield name=\"newmobile\" value=\"$(newmobile)\"/>
  112. <postfield name=\"newstatus\" value=\"$(newstatus)\"/>
  113. <postfield name=\"newabout\" value=\"$(newabout)\"/>
  114. <postfield name=\"newnums\" value=\"$(newnums)\"/>
  115. </go>
  116. </anchor>";
  117. break;
  118. }
  119.  
  120.  
  121. print "<br/><a href=\"game.php?id=$id&amp;pass=$pass\">".$lang['menu']."</a>";
  122. print "<br/>---";
  123. echo '<br/><br/>-------<br/><div class="msg"><a href="http://wenz.net.ru">Сайт вап мастеру</a></div><br/>';
  124.  
  125.  
  126. mysql_close();
  127. print "</small></p></card></wml>";
  128. ?>