View file k/pf.php

File size: 2.47Kb
<?php
$r=rand(0,10000);
include "conf.php";
$id=htmlspecialchars(stripslashes(trim($id)));
$pass=htmlspecialchars(stripslashes(trim($pass)));
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print "<?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><head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>
<card title="Профиль">
<p>
<?php
$q = mysql_query("select * from users where  id='$id';");
if(!$action) {
if(empty($id))
print "Вы не ввели ID!<br/>";
$data = mysql_fetch_array($q);
//ҐР±«РЃ ¤ ­­Р»Ґ ўҐР°­Р», РЃ¤Ґ¬ ¤ «РјРёҐ
if($pass==$data['pass']&&!(empty($pass))) {
//ўРµ®¤ ўР»Ї®«­Ґ­, ўР»ў®¤РЃ¬ ¤ ­­Р»Ґ
print "Название сайта:<br/>
<input type=\"text\" name=\"title$r\" maxlength=\"40\" value=\"".$data['title']."\"/><br/>Новый пароль:<br/>
<input type=\"text\" name=\"pass$r\" maxlength=\"20\" value=\"".$data['pass']."\"/><br/>
Ссылка:<br/>
<input type=\"text\" name=\"link$r\" maxlength=\"70\" value=\"".$data['link']."\"/><br/>
Описание:<br/>
<input type=\"text\" name=\"about\" maxlength=\"150\" value=\"".$data['about']."\"/><br/>
E-mail<br/>
<input type=\"text\" name=\"email$r\" maxlength=\"50\" value=\"".$data['email']."\"/><br/>
<select name=\"kat\">
<option value=\"1\">Для мобил</option>
<option value=\"2\">Загрузки</option>
<option value=\"3\">Эротика</option>
<option value=\"4\">Халява</option>
<option value=\"5\">Разное</option>
</select><br/>
<anchor>-=OK=-
<go href=\"pf.php?action=edit\" method=\"post\">
<postfield name=\"title\" value=\"$(title$r)\"/>
<postfield name=\"pass\" value=\"$(pass$r)\"/>
<postfield name=\"about\" value=\"$(about)\"/>
<postfield name=\"email\" value=\"$(email$r)\"/>
<postfield name=\"link\" value=\"$(link$r)\"/>
<postfield name=\"kat\" value=\"$(kat)\"/>
<postfield name=\"id\" value=\"$(id)\"/>
</go></anchor>";
} else { print "<b>Ненайдено</b><br/>Вернитесь и введите правильно!<br/>"; }
} else {
mysql_query("update users set pass='$pass',link='$link',about='$about',email='$email',category='$kat',title='$title' where id='$id';");
print "Ваш профиль изменён!<br/>:::::<br/><a href=\"/kat/index.php\">В каталог</a><br/><a href=\"http://guwap.org/kat/index.php/\">На главную</a><br/>";
}
@mysql_close();
?>
</p>
</card>
</wml>