Просмотр файла cat/auth.php

Размер файла: 2.94Kb
<?php
require ("cfg.php");
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 id=\"сatalog\" title=\"Каталог\">
<p align=\"left\">";

if(!isset($id)){
print"<small>ID сайта:</small> <input type=\"text\" name=\"id\"/><br/>
<small>Пароль:</small> <input type=\"password\" name=\"pass\"/><br/>
<small><anchor title=\"go\">[Изменить]<go href=\"auth.php\" method=\"post\">
<postfield name=\"id\" value=\"$(id)\"/>
<postfield name=\"pass\" value=\"$(pass)\"/>
</go></anchor></small><br/>";}

else{
$id=intval($id);
$pass=coding_cool(substr(trim($pass), 0, 30));
$q = mysql_query("select * from `cool_site` where  id='$id';");
$data = mysql_fetch_array($q);
if(empty($id))
print "<small>Вы не ввели ID!</small><br/>";
if(!empty($pass)&&$pass==$data['pass']){
print"<small>Название сайта:</small><br/>
<input type=\"text\" name=\"title\" maxlength=\"30\" value=\"".$data['title']."\"/><br/>
<small>URL:</small><br/>
<input type=\"text\" name=\"link\" maxlength=\"100\" value=\"".$data['link']."\"/><br/>";
print"<small>Категория:</small><br/>
<select name=\"k\" value=\"".$data['category']."\">";
$q=mysql_query("select * from `cool_raz` where 1 order by por asc");
while($datas = @mysql_fetch_array($q)){
print"<option value=\"".$datas['id']."\">".$datas['text']."</option>";}
print"</select><br/>
<small>Описание:</small><br/>
<input type=\"text\" name=\"about\" maxlength=\"300\" value=\"".$data['about']."\"/><br/>
<small>Старый пароль:</small><br/>
<input type=\"text\" name=\"oldpass\" maxlength=\"30\" value=\"".$data['pass']."\"/><br/>
<small>Новый пароль:</small><br/>
<input type=\"text\" name=\"pass\" maxlength=\"30\" value=\"".$data['pass']."\"/><br/>
<small>E-Mail:</small><br/>
<input type=\"text\" name=\"email\" maxlength=\"70\" value=\"".$data['email']."\"/><br/>
<small>Транслит:</small> <select name=\"trans\">
<option value=\"0\">нет</option>
<option value=\"1\">да</option>
</select><br/>
<small><anchor>[Изменить]
<go href=\"registration.php?act=edit\" method=\"post\">
<postfield name=\"title\" value=\"$(title)\"/>
<postfield name=\"oldpass\" value=\"$(oldpass)\"/>
<postfield name=\"id\" value=\"$id\"/>
<postfield name=\"pass\" value=\"$(pass)\"/>
<postfield name=\"link\" value=\"$(link)\"/>
<postfield name=\"about\" value=\"$(about)\"/>
<postfield name=\"email\" value=\"$(email)\"/>
<postfield name=\"trans\" value=\"$(trans)\"/>
<postfield name=\"k\" value=\"$(k)\"/>
</go></anchor></small><br/>";
}else{print"<small>Неправильный пароль!</small><br/>";}}
print"<br/><small><a href=\"./\">Каталог</a><br/>
</small></p></card></wml>";
?>