";
$id=cyr(htmlspecialchars(stripslashes(trim($id))));
$login=cyr(htmlspecialchars(stripslashes(trim($login))));
$pass=cyr(htmlspecialchars(stripslashes(trim($pass))));
if(!empty($login))
{
$q = mysql_query("select pass,id,login,mobile,about,email from users where login='".cyr($login)."';");
}
elseif(!empty($id))
{
$q = mysql_query("select pass,id,login,mobile,about,email from users where id='".$id."';");
}
else
{
die ($lang['empty_login']."");
}
$data = mysql_fetch_array($q);
$id=$data['id'];
$login=$data['login'];
$mobile=$data['mobile'];
$about=$data['about'];
$mail=$data['email'];
if($pass!=$data['pass'])
{
die ($lang['empty_login']."");
}
mysql_query("update users set last='".time()."',city='0' where id='".$id."';");
switch ($mode)
{
case "save":
if($newpass!=$newpass2)
{
print $lang['reg_error_pass']."
";
print "".$lang['again']."";
exit;
}
if (ereg("[à-ÿÀ-ß,$,>,<,',;,/,\,&,#,,,.,:,*,@,!,%,^,(,)]","$newpass$login$newpass2"))
{
print $lang['reg_bad_symbols']."
";
print "".$lang['again']."";
exit;
}
$newpass=cyr(htmlspecialchars(stripslashes(trim(str_replace('$','$$',$newpass)))));
$newpass2=cyr(htmlspecialchars(stripslashes(trim(str_replace('$','$$',$newpass2)))));
$newemail=cyr(htmlspecialchars(stripslashes(trim(str_replace('$','$$',$newemail)))));
$newmobile=cyr(htmlspecialchars(stripslashes(trim(str_replace('$','$$',$newmobile)))));
$newabout=cyr(htmlspecialchars(stripslashes(trim(str_replace('$','$$',$newabout)))));
$newnums=cyr(htmlspecialchars(stripslashes(trim(str_replace('$','$$',$newnums)))));
mysql_query("update users set pass='".$newpass."',email='".$newemail."',mobile='".$newmobile."',about='".$newabout."',nums='".$newnums."' where id='".$id."';");
print $lang['profile_refreshed'];
$pass=$newpass;
break;
default:
print $lang['profile_pass'].":
";
print "
";
print "".$lang['profile_pass2'].":
";
print "
";
print "".$lang['reg_mail'].":
";
print "
";
print "".$lang['regmobile'].":
";
print "
";
print "".$lang['regabout'].":
";
print "
";
print "".$lang['regonline'].":
";
print "
";
print "".$lang['ok']."
";
break;
}
print "
>".$lang['menu']."";
print "
---";
mysql_close();
print "";
?>