File size: 3.78Kb
<?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="SpiderWap Photo Dating">'.
'<p align="left">';
if(empty($id))
print "<small>Not logged in!</small><br/>";
if($nick) {
if(empty($action)) {
print '<small>NickName:</small><br/>'.
'<input type="text" name="name" value="'.$nick['name'].'"/><br/>'.
'<small>New Password:</small><br/>'.
'<input type="text" name="newpass" value="'.$nick['pass'].'"/><br/>'.
'<small>Sex:</small><br/>'.
'<select name="sex" title="Sex" value="'.$login['sex'].'">'.
'<option value="m">Male</option>'.
'<option value="zh">Female</option></select><br/>'.
'<small>BirthDay:</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>City:</small><br/>'.
'<input type="text" name="gorod" value="'.$nick['gorod'].'"/><br/>'.
'<small>Height:</small><br/>'.
'<input type="text" name="rost" value="'.$nick['rost'].'"/><br/>'.
'<small>Weight:</small><br/>'.
'<input type="text" name="ves" value="'.$nick['ves'].'"/><br/>'.
'<small>Seeking:</small><br/>'.
'<input type="text" name="ssex" value="'.$nick['ssex'].'"/><br/>'.
'<small>For:</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>Mobile Number:</small><br/>'.
'<input type="text" name="mob" value="'.$nick['mob'].'"/><br/>'.
'<small>More Info:</small><br/>'.
'<input type="text" name="infa" value="'.$nick['infa'].'"/><br/>'.
'<small>URL to photo, (<b>without http://</b>):</small><br/>'.
'<input type="text" name="foto" value="'.$nick['foto'].'"/><br/>'.
'<small><anchor>Update Profile<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>Profile Updated!!</b><br/>";
print "<small><a href=\"index.php\">Back</a></small><br/>";
print "<small><a href=\"../index.php\">SpiderWap</a></small><br/>";
}
if(!$action)
print "<small><u><anchor>Previus<prev/></anchor></u></small><br/>";
} else { print "<small>Error!<br/>Please Try Again</small>"; }
print '</p>'.
'</card>'.
'</wml>';
@mysql_close();
?>