View file top/prof.php

File size: 3.86Kb
<?
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
$id=@mysql_escape_string($id);
$pass=@mysql_escape_string($pass);
$login=@mysql_escape_string($login);
include "config3.php";
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml><head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>
<card title="<? print $topic; ?>">
<p align="center">
<?
include "config2.php";

$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']) {
print "<br/>&#x412;&#x430;&#x448; id=".$data['id']."<br/><br/>";
?>
&#x41D;&#x430;&#x437;&#x432;&#x430;&#x43D;&#x438;&#x435; &#x441;&#x430;&#x439;&#x442;&#x430;:<br/>
<input type="text" name="title" value="<? print $data['title'] ?>" emptyok="false"/><br/>
Новый пароль:<br/>
<input type="text" name="newpass" value="<? print $data['pass'] ?>" emptyok="false"/><br/>
e-mail:<br/>
<input type="text" name="email" value="<? print $data['email'] ?>" emptyok="true"/><br/>
&#x421;&#x441;&#x44B;&#x43B;&#x43A;&#x430;:<br/>
<input type="text" name="link" value="<? print $data['link'] ?>" emptyok="true"/><br/>
&#x41E;&#x43F;&#x438;&#x441;&#x430;&#x43D;&#x438;&#x435;:<br/>
<input type="text" name="about" value="<? print $data['about'] ?>" emptyok="true"/><br/>
<anchor>Изменить<br/><go href="prof.php?id=<? print $id; ?>&amp;pass=<? print $pass; ?>" method="post">
<postfield name="action" value="edit"/>
<postfield name="title" value="$(title)"/>
<postfield name="newpass" value="$(newpass)"/>
<postfield name="email" value="$(email)"/>
<postfield name="link" value="$(link)"/>
<postfield name="about" value="$(about)"/>
</go></anchor>
<?
print "</p><p align=\"left\">";
		print "<br/>&#x420;&#x430;&#x437;&#x43C;&#x435;&#x441;&#x442;&#x438;&#x442;&#x435; &#x43A;&#x43E;&#x434; &#x43E;&#x434;&#x43D;&#x43E;&#x433;&#x43E; &#x438;&#x437; &#x44D;&#x442;&#x438;&#x445; &#x441;&#x447;&#x435;&#x442;&#x447;&#x438;&#x43A;&#x43E;&#x432; &#x443; &#x432;&#x430;&#x441; &#x43D;&#x430; &#x441;&#x430;&#x439;&#x442;&#x435;:<br/>";
		print "1)<img src=\"http://$domen/count.php?id=".$data['id']."\" alt=\"$name\"/><br/>";
		print htmlspecialchars("<a href=\"http://$domen/top/index.php?cid=".$data['id']."\"><img src=\"http://$domen/top/count.php?id=".$data['id']."\" alt=\"$name\"/></a>");
	//	print "<br/>2)<img src=\"http://wapmax.ru/top/count.php?id=".$data['id']."&amp;img=1\" alt=\"WAPmax.RU\"/><br/>";
	//	print htmlspecialchars("<a href=\"http://wapmax.ru/top/index.php?cid=".$data['id']."\"><img src=\"http://wapmax.ru/top/count.php?id=".$data['id']."&amp;img=1\" alt=\"wapmax.ru\"/></a>");
	//	print "<br/>3)<img src=\"http://wapmax.ru/top/count.php?id=".$data['id']."&amp;img=2\" alt=\"wapmax.ru\"/><br/>";
	//	print htmlspecialchars("<a href=\"http://wapmax.ru/top/index.php?cid=".$data['id']."\"><img src=\"http://wapmax.ru/top/count.php?id=".$data['id']."&amp;img=2\" alt=\"wapmax.ru\"/></a>");

		} else { print "Пароль не подходит!"; }
	}
	else { print "Данные юзера не верны!"; }
 } else { print "Логин пуст!"; }
}
else
{
	if(($id==$data['id']) && ($pass==$data['pass'])) {


if(mysql_query("update users set title='$title',pass='$newpass',email='$email',link='$link',about='$about'  where id='".$id."';"))
print "<b>Ваш профиль изменен!</b><br/>";
print "<a href=\"prof.php?id=$id&amp;pass=$newpass\">&#x41F;&#x440;&#x43E;&#x444;&#x438;&#x43B;&#x44C;</a><br/>";
print "<a href=\"index.php?id=$id&amp;pass=$newpass\">$topic</a>";
} else {
print "password incorrect";
}

}
?>
</p>
</card>
</wml>
<?
mysql_close($linkk);
?>