Просмотр файла rating_v6_update/prof.php

Размер файла: 4.58Kb
<?
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
$uid=@mysql_escape_string($uid);
$p=@mysql_escape_string($p);
$admin=@mysql_escape_string($admin);
?>
<!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="Profil'">
<p align="center">
<?
@include "config.php";

//$linkk=mysql_pconnect ($DB_HOST, $DB_USER, $DB_PASS);
//mysql_select_db($DB_NAME);

$q_u=mysql_query("select * from users where uid='".$uid."';");
$data=mysql_fetch_array($q_u);
if(empty($action)) {
if(!empty($uid)) {
	if($uid==$data['uid']) { 
		if($p==$data['pass']) {
print "<br/>&#x412;&#x430;&#x448; uid=".$data['uid']."<br/><br/>";
?>
&#x41D;&#x430;&#x437;&#x432;&#x430;&#x43D;&#x438;&#x435; &#x441;&#x430;&#x439;&#x442;&#x430;:<br/>
<input type="text" name="site_name" value="<? print $data['site_name'] ?>" emptyok="false"/><br/>
&#x421;&#x441;&#x44B;&#x43B;&#x43A;&#x430;:<br/>
<input type="text" name="link" value="<? print $data['link'] ?>" emptyok="true"/><br/>
&#x41B;&#x43E;&#x433;&#x438;&#x43D; &#x430;&#x434;&#x43C;&#x438;&#x43D;&#x430;:<br/>
<input type="text" name="admin" value="<? print $data['admin'] ?>" emptyok="true"/><br/>
e-mail:<br/>
<input type="text" name="email" value="<? print $data['email'] ?>" emptyok="true"/><br/>
&#x41E;&#x43F;&#x438;&#x441;&#x430;&#x43D;&#x438;&#x435;:<br/>
<input type="text" name="info " value="<? print $data['info'] ?>" emptyok="true"/><br/>
&#x412;&#x430;&#x448; &#x43F;&#x430;&#x440;&#x43E;&#x43B;&#x44C;:<br/>
<input type="text" name="newpass" value="<? print $data['pass'] ?>" emptyok="false"/><br/>

<anchor>&#x418;&#x437;&#x43C;&#x435;&#x43D;&#x438;&#x442;&#x44C;<br/><go href="prof.php?uid=<? print $uid; ?>&amp;p=<? print $p; ?>" method="post">
<postfield name="action" value="edit"/>
<postfield name="site_name" value="$(site_name)"/>
<postfield name="link" value="$(link)"/>
<postfield name="admin" value="$(admin)"/>
<postfield name="email" value="$(email)"/>
<postfield name="info" value="$(info)"/>
<postfield name="newpass" value="$(newpass)"/>
</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://elena.nsk.ru/top/count.php?id=".$data['id']."\" alt=\"ELENA rating\"/><br/>";
		print htmlspecialchars("<a href=\"http://elena.nsk.ru/top/in.php?cid=".$data['id']."\"><img src=\"http://elena.nsk.ru/top/count.php?id=".$data['id']."&amp;img=img\" alt=\"ELENA rating\"/></a>");
		print "<br/>2)<img src=\"http://elena.nsk.ru/top/count.php?id=".$data['id']."&amp;img=stblue\" alt=\"ELENA rating2\"/><br/>";
		print htmlspecialchars("<a href=\"http://elena.nsk.ru/top/in.php?cid=".$data['id']."\"><img src=\"http://elena.nsk.ru/top/count.php?id=".$data['id']."&amp;img=stblue\" alt=\"ELENA rating\"/></a>");
		print "<br/>3)<img src=\"http://elena.nsk.ru/top/count.php?id=".$data['id']."&amp;img=stgrey\" alt=\"ELENA rating3\"/><br/>";
		print htmlspecialchars("<a href=\"http://elena.nsk.ru/top/in.php?cid=".$data['id']."\"><img src=\"http://elena.nsk.ru/top/count.php?id=".$data['id']."&amp;img=stgrey\" alt=\"ELENA rating\"/></a>");
*/
		} else { print "&#x41F;&#x430;&#x440;&#x43E;&#x43B;&#x44C; &#x43D;&#x435; &#x43F;&#x43E;&#x434;&#x445;&#x43E;&#x434;&#x438;&#x442;!"; }
	}
	else { print "&#x414;&#x430;&#x43D;&#x43D;&#x44B;&#x435; &#x44E;&#x437;&#x435;&#x440;&#x430; &#x43D;&#x435; &#x432;&#x435;&#x440;&#x43D;&#x44B;!"; }
 } else { print "&#x41B;&#x43E;&#x433;&#x438;&#x43D; &#x43F;&#x443;&#x441;&#x442;!"; }
}
else
{
	if(($uid==$data['uid']) && ($p==$data['pass'])) {


if(mysql_query("update users set site_name='$site_name',link='$link',admin='$admin',email='$email',info='$info',pass='$newpass'  where uid='".$uid."';"))
print "<b>&#x412;&#x430;&#x448; &#x43F;&#x440;&#x43E;&#x444;&#x438;&#x43B;&#x44C; &#x438;&#x437;&#x43C;&#x435;&#x43D;&#x435;&#x43D;!</b><br/>";
print "<a href=\"prof.php?uid=$uid&amp;p=$newpass\">&#x41F;&#x440;&#x43E;&#x444;&#x438;&#x43B;&#x44C;</a><br/>";
print "<a href=\"top.php?uid=$uid&amp;p=$newpass\">ELENA &#x440;&#x435;&#x439;&#x442;&#x438;&#x43D;&#x433;</a>";
} else {
print "password incorrect";
}

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