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

Размер файла: 4.26Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE);          /////////////// игнорируем ошибки

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);
?>
<!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="&#x41F;&#x440;&#x43E;&#x444;&#x438;&#x43B;&#x44C;">
<p align="left">
<?
include "../conf.inc.php";

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

$q_u=mysql_query("Select * from cusers where cid='".$id."' AND pass='".$pass."'") or die("Querry error");
$data=mysql_fetch_array($q_u);

if(mysql_affected_rows()==0)
{
echo <<<END
	<?xml version="1.0" encoding="UTF-8"?>
	<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
	<wml>
		<card id="search" title="РџРѕРёСЃРє">
			<p align="center">
				&#x41B;&#x43E;&#x433;&#x438;&#x43D; &#x438;&#x43B;&#x438; &#x43F;&#x430;&#x440;&#x43E;&#x43B;&#x44C; &#x43D;&#x435;&#x432;&#x435;&#x440;&#x43D;&#x44B;, &#x43F;&#x440;&#x43E;&#x432;&#x435;&#x440;&#x44C;&#x442;&#x435; &#x432;&#x430;&#x448; &#x432;&#x432;&#x43E;&#x434;.
			</p>
		</card>
	</wml>
END;
return 0;
}
else
{

if(empty($action)) {
print "<br/>CID &#x432;&#x430;&#x448;&#x435;&#x433;&#x43E; &#x447;&#x430;&#x442;&#x430;: ".$data['cid']."<br/><br/>";
?>

&#x41D;&#x430;&#x437;&#x432;&#x430;&#x43D;&#x438;&#x435; &#x447;&#x430;&#x442;&#x430;:<br/>
<input type="text" name="chatname" value="<? print $data['chatname']; ?>" emptyok="false"/><br/>
&#x41F;&#x430;&#x440;&#x43E;&#x43B;&#x44C;:<br/>
<input type="text" name="newpass" value="<? print $data['pass']; ?>" emptyok="false"/><br/>
&#x410;&#x434;&#x440;&#x435;&#x441; &#x432;&#x430;&#x448;&#x435;&#x433;&#x43E; &#x441;&#x430;&#x439;&#x442;&#x430;:<br/>
<input type="text" name="link" value="<? print $data['link']; ?>" emptyok="false"/><br/>
&#x41D;&#x430;&#x437;&#x432;&#x430;&#x43D;&#x438;&#x435; &#x432;&#x430;&#x448;&#x435;&#x433;&#x43E; &#x441;&#x430;&#x439;&#x442;&#x430;:<br/>
<input type="text" name="name" value="<? print $data['name']; ?>" emptyok="false"/><br/>
email:<br/>
<input type="text" name="email" value="<? print $data['email']; ?>" emptyok="false"/><br/>
<anchor>&#x418;&#x437;&#x43C;&#x435;&#x43D;&#x438;&#x442;&#x44C;<br/><go href="prof.php?id=<? print $id; ?>&amp;pass=<? print $pass; ?>" method="post">
<postfield name="action" value="edit"/>
<postfield name="chatname" value="$(chatname)"/>
<postfield name="newpass" value="$(newpass)"/>
<postfield name="link" value="$(link)"/>
<postfield name="name" value="$(name)"/>
<postfield name="email" value="$(email)"/>
</go></anchor>
<?

}
else
{


if(mysql_query("update cusers set chatname='$chatname',pass='$newpass',link='$link',name='$name',email='$email'  where cid='".$id."';"))
print "<b>&#x412;&#x430;&#x448; &#x43F;&#x440;&#x43E;&#x444;&#x438;&#x43B;&#x44C; &#x438;&#x437;&#x43C;&#x435;&#x43D;&#x451;&#x43D;!</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\">&#x421;&#x435;&#x440;&#x432;&#x438;&#x441; &#x447;&#x430;&#x442;&#x43E;&#x432;</a>";
}
}
?>
</p>
</card>
</wml>
<?
mysql_close($linkk);
?>