Просмотр файла znak_otzuv(mysql)/prof.php

Размер файла: 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="&#1055;&#1088;&#1086;&#1092;&#1080;&#1083;&#1100;">'.
'<p align="left">';

if(empty($id))
print "<small>&#1051;&#1086;&#1075;&#1080;&#1085; &#1087;&#1091;&#1089;&#1090;!</small><br/>";
if($nick) {
if(empty($action)) {
print '<small>&#1048;&#1084;&#1103;:</small><br/>'.
'<input type="text" name="name" value="'.$nick['name'].'"/><br/>'.
'<small>&#1053;&#1086;&#1074;&#1099;&#1081; &#1087;&#1072;&#1088;&#1086;&#1083;&#1100;:</small><br/>'.
'<input type="text" name="newpass" value="'.$nick['pass'].'"/><br/>'.
'<small>&#1055;&#1086;&#1083;:</small><br/>'.
'<select name="sex" title="&#1055;&#1086;&#1083;" value="'.$login['sex'].'">'.
'<option value="m">&#1052;</option>'.
'<option value="zh">&#1046;</option></select><br/>'.
'<small>&#1044;&#1072;&#1090;&#1072; &#1088;&#1086;&#1078;&#1076;&#1077;&#1085;&#1080;&#1103;:</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>&#1043;&#1086;&#1088;&#1086;&#1076;:</small><br/>'.
'<input type="text" name="gorod" value="'.$nick['gorod'].'"/><br/>'.
'<small>&#1056;&#1086;&#1089;&#1090;:</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>&#1048;&#1097;&#1091;:</small><br/>'.
'<input type="text" name="ssex" value="'.$nick['ssex'].'"/><br/>'.
'<small>...&#1044;&#1083;&#1103;:</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>&#1053;&#1086;&#1084;&#1077;&#1088; &#1090;&#1077;&#1083;&#1077;&#1092;&#1086;&#1085;&#1072;:</small><br/>'.
'<input type="text" name="mob" value="'.$nick['mob'].'"/><br/>'.
'<small>&#1054; &#1089;&#1077;&#1073;&#1077;:</small><br/>'.
'<input type="text" name="infa" value="'.$nick['infa'].'"/><br/>'.
'<small>&#1040;&#1076;&#1088;&#1077;&#1089; &#1092;&#1086;&#1090;&#1082;&#1080; &#1074; &#1080;&#1085;&#1090;&#1077;&#1088;&#1085;&#1077;&#1090;&#1077; (&#1073;&#1077;&#1079; http://):</small><br/>'.
'<input type="text" name="foto" value="'.$nick['foto'].'"/><br/>'.
'<small><anchor>&#1048;&#1079;&#1084;&#1077;&#1085;&#1080;&#1090;&#1100;<go href="prof.php?id='.$id.'&amp;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>&#1042;&#1072;&#1096; &#1087;&#1088;&#1086;&#1092;&#1080;&#1083;&#1100; &#1080;&#1079;&#1084;&#1077;&#1085;&#1077;&#1085;!</b><br/>";

print "<small><a href=\"index.php\">&#1047;&#1085;&#1072;&#1082;&#1086;&#1084;&#1089;&#1090;&#1074;&#1072;</a></small><br/>";
print "<small><a href=\"../index.php\">Mas.Net.Ru</a></small><br/>";
}
if(!$action)
print "<small><u><anchor>&#1053;&#1072;&#1079;&#1072;&#1076;<prev/></anchor></u></small><br/>";
} else { print "<small>&#1053;&#1077;&#1074;&#1077;&#1088;&#1085;&#1099;&#1081; &#1074;&#1074;&#1086;&#1076;!<br/>:(((</small>"; }

print '</p>'.
'</card>'.
'</wml>';

@mysql_close();
?>