File size: 1.78Kb
<?
$id=@mysql_escape_string($id);
$pass=@mysql_escape_string($pass);
$login=@mysql_escape_string($login);
include "config2.php";
include "../top.php";
echo "<div class=\"blue\"><font color=\"#FF0000\">VISAVI.NET</font><br/></div><div>";
//\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
$bro=fopen("brow.dat", "r+");
while (!feof ($bro))
{
$brow=fgets ($bro,1024);
}
if ($chis==$brow) {echo""; $brow =rand(1000, 9999);
$bro=fopen("brow.dat", "w+");
chmod("brow.dat", 0666);
fwrite($bro, $brow);
fclose($bro);} else {$brow =rand(1000, 9999);
$bro=fopen("brow.dat", "w+");
chmod("brow.dat", 0666);
fwrite($bro, $brow);
fclose($bro); echo"Введенное число неправильное<br/><hr/><a href=\"prof.php?id=$id&pass=$pass\">: Вернуться</a><br/>
</div></body></html>"; exit;}
//\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
$linkk=mysql_pconnect ($DB_HOST, $DB_USER, $DB_PASS);
mysql_select_db($DB_NAME);
$q_u=mysql_query("select * from users where id='".$id."';");
$data=mysql_fetch_array($q_u);
if(empty($action)) {
if(!empty($id)) {
if($id==$data['id']) {
if($pass==$data['pass']) {
if(mysql_query("update users set title='$title',pass='$newpass',email='$email',link='$link',about='$about' where id='".$id."';"))
print "Ваш профиль изменен!<br/>";
print "<hr/><a href=\"prof.php?id=$id&pass=$newpass\">Профиль</a><br/>";
print "<a href=\"index.php\">В рейтинг</a><br/>";
print "<a href=\"http://visavi.net\">Visavi.net</a><br/>";
} else { print "Пароль не подходит!"; }
}
else { print "Данные юзера не верны!"; }
} else { print "Логин пуст!"; }
}
else
{
if(($id==$data['id']) && ($pass==$data['pass'])) {
} else {
print "password incorrect";
}
}
?>
</div>
</body>
</html>
<?
mysql_close($linkk);
?>