View file topic/edit.php

File size: 2.18Kb
<?
///////////////////////////////////////////
//            Автор: Уфимец              //
//        Сайт: http://wap.vav.su        //
//                                       //
///////////////////////////////////////////
include("sconf.php");
header ("Content-type:text/vnd.wap.wml;charset=utf-8");

if(@$_POST['login'])
{
if(@$_POST['pass'])
{
$sql=mysql_query("SELECT * FROM admin;");
$res=mysql_fetch_array($sql);
$login=$res['name'];
$pass=$res['pass'];
if($_POST['login']!=$login || $_POST['pass']!=$pass)
{
?>
<!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="error" title="<?=$sitename?>" ontimer="login.php">
<timer value="10"/>
<p align="center">
Доступ закрыт!
</p>
</card>
</wml>
<?
}
else
{
?>
<!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="<?=$sitename?>">
<p align="center">
<?
$sql=mysql_query("SELECT * FROM sitetop;");
$res=mysql_fetch_array($sql);
?>
РўРѕРїРёРє<br/>
<input type="text" name="topic" value="<?=$res['topic']?>"/><br/>
<anchor>Р?зменить <go href="etop.php?n=<?=$login?>&amp;p=<?=$pass?>" method="post">
<postfield name="topic" value="$(topic)"/>
</go></anchor><br/>
</p>
</card>
</wml>
<?
}
}
else
{
?>
<!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="error" title="<?=$sitename?>" ontimer="login.php">
<timer value="10"/>
<p align="center">
Не введен пароль!
</p>
</card>
</wml>
<?
}
}
else
{
?>
<!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="error" title="<?=$sitename?>" ontimer="login.php">
<timer value="10"/>
<p align="center">
Не введен логин!
</p>
</card>
</wml>
<?
}
mysql_close();
?>