File size: 11.75Kb
<?php
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
header("Cache-Control: no-store, no-cache, must-revalidate");
print "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<?php
//preparations (do not modify!)
include("core.php"); //load main functions
include("conf.php"); //load config
echo connect($dbuser,$dbpass,$dbserver,$dbname);
$action=$_GET["action"];
$id=$_GET["id"];
$nick=$_GET["nick"];
$pass=$_GET["pass"];
if ($action=="addforum") {
echo "<card id=\"viewforum\" title=\"Форумы Mobilka.Us\">";
echo "<p align=\"center\">";
isadmin($nick,$pass);
global $administrator;
if ($administrator)
{
echo "Админ-панель для $nick<br/><br/>";
echo "Создать форум:";
echo "<br/>Название:<input name=\"forumname\" maxlength=\"99\"/>";
echo "<br/>Права доступа:<input name=\"perms\" maxlength=\"99\" format=\"*N\"/><br/>";
echo "<anchor title=\"create\">Ok";
echo "<go href=\"addforum.php?nick=$nick&pass=$pass\" method=\"post\">";
echo "<postfield name=\"forumname\" value=\"\$forumname\"/>";
echo "<postfield name=\"perms\" value=\"\$perms\"/>";
echo "</go>";
echo "</anchor>";
echo "<br/><br/>";
echo "Права доступа:<br/>";
echo "<b>0</b> - какждый пользователь может видеть форум<br/>";
echo "<b>1</b> - только зареганные пользователи могут видет форум<br/>";
echo "<b>2</b> - только исключительные пользователи<br/>";
}
echo "<a href=\"index.php?action=admincp&nick=$nick&pass=$pass\">[Админ-панель]</a><br/>";
echo "<a href=\"index.php?nick=$nick&pass=$pass\">[Форумы]</a><br/>";
echo "</p>";
echo "</card>";
}
if ($action=="delforum") {
echo "<card id=\"viewforum\" title=\"WAP Форумы\">";
echo "<p align=\"center\">";
isadmin($nick,$pass);
global $administrator;
if ($administrator)
{
echo "Админ-панель для $nick<br/><br/>";
echo "Удалить форум:";
// echo "<br/>Name:<input name=\"forumname\" maxlength=\"99\"/><br/>";
echo "<select name=\"forumux\">";
$forumulistas=mysql_query("SELECT name,id FROM forums");
while ($forumelis=mysql_fetch_array($forumulistas))
{
echo "<option value=\"$forumelis[0]&$forumelis[1]\">$forumelis[0]</option>";
};
echo "</select><br/>";
echo "<anchor title=\"delete\">Ok";
echo "<go href=\"delforum.php?nick=$nick&pass=$pass\" method=\"post\">";
echo "<postfield name=\"forumux\" value=\"\$forumux\"/>";
echo "</go>";
echo "</anchor>";
}
echo "<br/><a href=\"index.php?action=admincp&nick=$nick&pass=$pass\">[Админ-панель]</a><br/>";
echo "<a href=\"index.php?nick=$nick&pass=$pass\">[Форумы]</a><br/>";
echo "</p>";
echo "</card>";
}
if ($action=="editforum") {
echo "<card id=\"viewforum\" title=\"WAP Форумы\">";
echo "<p align=\"center\">";
isadmin($nick,$pass);
global $administrator;
if ($administrator)
{
echo "Админ-панель для $nick<br/><br/>";
echo "Редактировать форум:";
// echo "<br/>Name:<input name=\"forumname\" maxlength=\"99\"/><br/>";
echo "<select name=\"forumux\">";
$forumulistas=mysql_query("SELECT name,perms FROM forums");
while ($forumelis=mysql_fetch_array($forumulistas))
{
echo "<option value=\"$forumelis[0]\">$forumelis[0]($forumelis[1])</option>";
};
echo "</select><br/>";
echo "Изменить на:<input name=\"chngto\"/><br/>";
echo "Права доступа:<input name=\"perms\" format=\"*N\" value=\"0\"/><br/>";
echo "Только для админов:<select name=\"adminonl\">";
echo "<option value=\"n\">no</option>";
echo "<option value=\"y\">yes</option>";
echo "</select><br/>";
echo "Только для модеров:<select name=\"modonl\">";
echo "<option value=\"n\">no</option>";
echo "<option value=\"y\">yes</option>";
echo "</select><br/>";
echo "<anchor title=\"change\">Ok";
echo "<go href=\"editforum.php?nick=$nick&pass=$pass\" method=\"post\">";
echo "<postfield name=\"forumux\" value=\"\$forumux\"/>";
echo "<postfield name=\"chngto\" value=\"\$chngto\"/>";
echo "<postfield name=\"perms\" value=\"\$perms\"/>";
echo "<postfield name=\"adminonl\" value=\"\$adminonl\"/>";
echo "<postfield name=\"modonl\" value=\"\$modonl\"/>";
echo "</go>";
echo "</anchor>";
}
echo "<br/><a href=\"index.php?action=admincp&nick=$nick&pass=$pass\">[Админ-панель]</a><br/>";
echo "<a href=\"index.php?nick=$nick&pass=$pass\">[Форумы]</a><br/>";
echo "</p>";
echo "</card>";
}
if ($action=="edituser") {
echo "<card id=\"viewforum\" title=\"WAP Форумы\">";
echo "<p align=\"center\">";
isadmin($nick,$pass);
global $administrator;
if ($administrator)
{
echo "Админ-панель для $nick<br/><br/>";
echo "Редактировать пользователя:";
echo "<br/>Имя:<input name=\"useris\" maxlength=\"99\"/><br/>";
echo "<anchor title=\"Изменить\">Ok";
echo "<go href=\"edituser.php?nick=$nick&pass=$pass\" method=\"post\">";
echo "<postfield name=\"useris\" value=\"\$useris\"/>";
echo "</go>";
echo "</anchor><br/>";
echo "<anchor title=\"permissions\">Права доступа";
echo "<go href=\"edituserprms.php?nick=$nick&pass=$pass\" method=\"post\">";
echo "<postfield name=\"useris\" value=\"\$useris\"/>";
echo "</go>";
echo "</anchor><br/>";
echo "<anchor title=\"moderation\">Модератерство";
echo "<go href=\"editusermod.php?nick=$nick&pass=$pass\" method=\"post\">";
echo "<postfield name=\"useris\" value=\"\$useris\"/>";
echo "</go>";
echo "</anchor><br/>";
echo "<anchor title=\"other\">Другое";
echo "<go href=\"edituserhard.php?nick=$nick&pass=$pass\" method=\"post\">";
echo "<postfield name=\"useris\" value=\"\$useris\"/>";
echo "</go>";
echo "</anchor><br/>";
}
echo "<a href=\"index.php?action=admincp&nick=$nick&pass=$pass\">[Админ-панель]</a><br/>";
echo "<a href=\"index.php?nick=$nick&pass=$pass\">[Форумы]</a><br/>";
echo "</p>";
echo "</card>";
}
if ($action=="bbcode") {
echo "<card id=\"viewforum\" title=\"WAP Форумы\">";
echo "<p align=\"center\">";
isadmin($nick,$pass);
global $administrator;
if ($administrator)
{
echo "Админ-панель для $nick<br/><br/>";
echo "Текст:<input name=\"chfrom\"/><br/>";
echo "Ссылка:<input name=\"chto\" value=\"smilies/\"/><br/>";
echo "<anchor title=\"Add\">Ok";
echo "<go href=\"addsmilie.php?nick=$nick&pass=$pass\" method=\"post\">";
echo "<postfield name=\"chfrom\" value=\"\$chfrom\"/>";
echo "<postfield name=\"chto\" value=\"\$chto\"/>";
echo "</go>";
echo "</anchor><br/>";
}
echo "<a href=\"index.php?action=admincp&nick=$nick&pass=$pass\">[Админ-панель]</a><br/>";
echo "<a href=\"index.php?nick=$nick&pass=$pass\">[Форумы]</a><br/>";
echo "</p>";
echo "</card>";
}
if ($action=="editbb") {
echo "<card id=\"viewforum\" title=\"WAP Форумы\">";
echo "<p align=\"center\">";
isadmin($nick,$pass);
global $administrator;
if ($administrator)
{
echo "Админ-панель для $nick<br/><br/>";
$bbkodai2=mysql_fetch_array(mysql_query("SELECT bbcode,changeto,id FROM smilies WHERE id='".$id."'"));
$bbkodai2[0]=htmlspecialchars($bbkodai2[0]);
$bbkodai2[1]=htmlspecialchars($bbkodai2[1]);
$bbkodai2[2]=htmlspecialchars($bbkodai2[2]);
echo "Текст:<input name=\"chfrom\" value=\"$bbkodai2[0]\"/><br/>";
echo "Ссылка:<input name=\"chto\" value=\"$bbkodai2[1]\"/><br/>";
echo "<anchor title=\"Change\">Ok";
echo "<go href=\"editsmilie.php?nick=$nick&pass=$pass\" method=\"post\">";
echo "<postfield name=\"chfrom\" value=\"\$chfrom\"/>";
echo "<postfield name=\"chto\" value=\"\$chto\"/>";
echo "<postfield name=\"id\" value=\"$bbkodai2[2]\"/>";
echo "</go>";
echo "</anchor><br/>";
}
echo "<a href=\"index.php?action=admincp&nick=$nick&pass=$pass\">[Админ-панель]</a><br/>";
echo "<a href=\"index.php?nick=$nick&pass=$pass\">[Форумы]</a><br/>";
echo "</p>";
echo "</card>";
}
if ($action=="reforum") {
echo "<card id=\"viewforum\" title=\"WAP Форум\">";
echo "<p align=\"center\">";
isadmin($nick,$pass);
global $administrator;
if ($administrator)
{
echo "Админ-панель для $nick<br/><br/>";
echo "Положение форумов:<br/>";
$forumaii=mysql_query("SELECT id, name, perms, position FROM forums ORDER BY position");
while ($frmz=mysql_fetch_array($forumaii))
{
echo "$frmz[1]";
echo "<input name=\"forum$frmz[0]\" value=\"$frmz[3]\" format=\"*N\"/>";
echo "<anchor title=\"Change\">Ok";
echo "<go href=\"reorder.php?nick=$nick&pass=$pass\" method=\"post\">";
echo "<postfield name=\"forumas\" value=\"$frmz[0]\"/>";
echo "<postfield name=\"pozicija\" value=\"\$forum$frmz[0]\"/>";
echo "</go>";
echo "</anchor><br/>";
};
}
echo "<a href=\"index.php?action=admincp&nick=$nick&pass=$pass\">[Админ-панель]</a><br/>";
echo "<a href=\"index.php?nick=$nick&pass=$pass\">[Форумы]</a><br/>";
echo "</p>";
echo "</card>";
}
?>
</wml>