File size: 2.65Kb
<?php
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
print '<!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>';
require ("db.php");
function autorize() {
global $link, $id, $pass;
$q = @mysql_query("select * from `top` where id='$id' and pass='$pass' limit 1;");
$duser = @mysql_fetch_array($q);
return $duser;
}
$link = autorize();
print '<card title="Профиль">'.
'<p align="left">';
if(empty($id))
print "<small>Не введен ID!</small><br/>";
if(empty($pass))
print "<small>Не введен Пароль!</small><br/>";
if($link) {
if($action==go) {
print '<small>название:</small><br/>'.
'<input type="text" name="title" value="'.$link['title'].'"/><br/>'.
'<small>URL:</small><br/>'.
'<input type="text" name="link" value="'.$link['link'].'"/><br/>'.
'<small>Пароль:</small><br/>'.
'<input type="password" name="newpass" value="'.$link['pass'].'"/><br/>'.
'<small>Описание:</small><br/>'.
'<input type="text" name="opis" value="'.$link['opis'].'"/><br/>'.
'<small><anchor>Изменить<go href="prof.php?action=edit&id='.$id.'&pass='.$pass.'" method="post">'.
'<postfield name="action" value="edit"/>'.
'<postfield name="link" value="$(link)"/>'.
'<postfield name="title" value="$(title)"/>'.
'<postfield name="pass" value="$(pass)"/>'.
'<postfield name="opis" value="$(opis)"/></go></anchor></small><br/>';
}
if($action==edit)
{
@mysql_query("update `top` set link='$link', title='$title',pass='$pass',opis='$opis' where id='$id';");
print "<small>Ваш профиль изменен!</small><br/>";}
print "<small><a href=\"index.php\">В рейтинг</a></small><br/>";
print "<small><a href=\"../index.php\">amlet.com.ru</a></small><br/>";
print "<small><u><anchor>Назад<prev/></anchor></u></small><br/>";
} else { print "<small>Не верные данные!<br/></small>"; }
print '</p>'.
'</card>'.
'</wml>';
@mysql_close();
?>