File size: 4.58Kb
<?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>';
include "./c.php";
function autorize() {
global $nick, $id, $pass;
$q = @mysql_query("select * from `users` where id='$id' and pass='$pass' limit 1;");
$duser = @mysql_fetch_array($q);
return $duser;
}
$nick = autorize();
print '<card title="Профиль">'.
'<p align="left">';
if(empty($id))
print "<small>Логин пуст!</small><br/>";
if($nick) {
if(empty($action)) {
print '<small>Имя:</small><br/>'.
'<input type="text" name="name" value="'.$nick['name'].'"/><br/>'.
'<small>Новый пароль:</small><br/>'.
'<input type="text" name="newpass" value="'.$nick['pass'].'"/><br/>'.
'<small>Пол:</small><br/>'.
'<select name="sex" title="Пол" value="'.$login['sex'].'">'.
'<option value="m">М</option>'.
'<option value="zh">Ж</option></select><br/>'.
'<small>Дата рождения:</small><br/>'.
'<input size="2" name="bday" maxlength="2" value="'.$nick['bday'].'" format="*N"/>-<input size="2" name="bmonth" maxlength="2" value="'.$nick['bmonth'].'" format="*N"/>-<input size="4" name="byear" maxlength="4" value="'.$nick['byear'].'" format="*N"/><br/>'.
'<small>Город:</small><br/>'.
'<input type="text" name="gorod" value="'.$nick['gorod'].'"/><br/>'.
'<small>Рост:</small><br/>'.
'<input type="text" name="rost" value="'.$nick['rost'].'"/><br/>'.
'<small>Bec:</small><br/>'.
'<input type="text" name="ves" value="'.$nick['ves'].'"/><br/>'.
'<small>Ищу:</small><br/>'.
'<input type="text" name="ssex" value="'.$nick['ssex'].'"/><br/>'.
'<small>...Для:</small><br/>'.
'<input type="text" name="swhy" value="'.$nick['swhy'].'"/><br/>'.
'<small>e-mail:</small><br/>'.
'<input type="text" name="mail" value="'.$nick['mail'].'"/><br/>'.
'<small>Номер телефона:</small><br/>'.
'<input type="text" name="mob" value="'.$nick['mob'].'"/><br/>'.
'<small>О себе:</small><br/>'.
'<input type="text" name="infa" value="'.$nick['infa'].'"/><br/>'.
'<small>Адрес фотки в интернете (без http://):</small><br/>'.
'<input type="text" name="foto" value="'.$nick['foto'].'"/><br/>'.
'<small><anchor>Изменить<go href="prof.php?id='.$id.'&pass='.$pass.'" method="post">'.
'<postfield name="action" value="edit"/>'.
'<postfield name="name" value="$(name)"/>'.
'<postfield name="pass" value="$(pass)"/>'.
'<postfield name="sex" value="$(sex)"/>'.
'<postfield name="bday" value="$(bday)"/>'.
'<postfield name="bmonth" value="$(bmonth)"/>'.
'<postfield name="byear" value="$(byear)"/>'.
'<postfield name="gorod" value="$(gorod)"/>'.
'<postfield name="rost" value="$(rost)"/>'.
'<postfield name="ves" value="$(ves)"/>'.
'<postfield name="ssex" value="$(ssex)"/>'.
'<postfield name="swhy" value="$(swhy)"/>'.
'<postfield name="mail" value="$(mail)"/>'.
'<postfield name="mob" value="$(mob)"/>'.
'<postfield name="infa" value="$(infa)"/>'.
'<postfield name="foto" value="$(foto)"/></go></anchor></small><br/>';
}
else
{
if(@mysql_query("update `users` set name='$name',pass='$pass',sex='$sex',bday='$bday',bmonth='$bmonth',byear='$byear',gorod='$gorod',rost='$rost',ves='$ves',ssex='$ssex',swhy='$swhy',mail='$mail',mob='$mob',infa='$infa',foto='$foto' where id='$id';"))
print "<b>Ваш профиль изменен!</b><br/>";
print "<small><a href=\"index.php\">Знакомства</a></small><br/>";
print "<small><a href=\"../index.php\">Mas.Net.Ru</a></small><br/>";
}
if(!$action)
print "<small><u><anchor>Назад<prev/></anchor></u></small><br/>";
} else { print "<small>Неверный ввод!<br/>:(((</small>"; }
print '</p>'.
'</card>'.
'</wml>';
@mysql_close();
?>