Размер файла: 3.47Kb
- <?php
- # Не выводить сообщения об ошибках
- error_reporting(0);
-
- Header("Content-type:text/vnd.wap.wml; charset=Utf-8");
- Header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
- Header("Cache-Control: no-cache, must-relative");
- print "<?xml version=\"1.0\" encoding=\"Utf-8\"?>";
- print '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml_1.2.xml">';
- print '<wml>';
- # if ($user!='dimon') die('<card id="m" title="KMX.Ru-Форум"><p>Форум на реконструкции. Зайдите позже.<br/><anchor>назад<prev/></anchor></p></card></wml>');
-
- # Пути
- $rootpath="/home/kmx/includes/main_forum/"; # К директории форума относительно корня файловой системы
- $forum='?'.$id.'/forum'; # К файлу форума относительно корня WEB-сервера
- $mainpage='?'.$id; # К главной странице относительно корня WEB-сервера
-
- # Имена таблиц в БД
- $table = "mainforum"; # Форума
- $tableu = "users"; # Пользователей
-
- # Системное сообщение по умолчанию
- #$sysmsg='<b>РІСЃРµ РІ РЅРѕСЂРјРµ</b><br/>';
-
- #if ($anketa['status']<4) include($rootpath."underconstuction.php");
-
- if (!$connect_bd) include($rootpath."mysqlerror.php");
-
- @mysql(DBName,"CREATE TABLE `$table` ( `l1` int(11) NOT NULL default '0', `l2` int(11) NOT NULL default '0', `l3` int(11) NOT NULL default '0', `status` int(11) NOT NULL default '0', `login` varchar(16) NOT NULL default '', `time` int(11) NOT NULL default '0', `text` text NOT NULL)");
-
- # @mysql_query("LOCK TABLES `$table` WRITE");
- # ALTER TABLE `mainforum` ORDER BY (`l1` * 1000000 + `l2` * 1000 + `l3`)
-
- $login = $user.'.'.$sitedomain.'.ru';
-
- $q=@mysql(DBName,"SELECT `status` FROM `users` WHERE `domain` = '$sitedomain' AND `login` = '$user'");
-
- $back_addr=$query1.'/'.$query2.'/'.$query3.'/'.$query4.'/'.$query5.'/'.$query6;
-
- if ($user!='')
- {
- $autorize = true;
- $f = mysql_fetch_array($q);
- $status = $f['status'];
- }
- else
- {
- $autorize = false;
- $status = 0;
- }
-
- $action = $query1;
-
- $_razdel = explode('-',$query2);
- $razdel = $_razdel[0];
- $paget = $_razdel[1] =$apage;
-
- $_topic = explode('-',$query3);
- $topic = $_topic[0];
- $pagem = $_topic[1];
-
- $_message = explode('-',$query4);
- $message = $_message[0];
-
- $addtopic = addslashes(utf2cyr(str_replace("\r"," ",str_replace("\n"," ",stripslashes(trim($HTTP_POST_VARS['at']))))));
- $addmsg = addslashes(utf2cyr(str_replace("\r"," ",str_replace("\n"," ",stripslashes(trim($HTTP_POST_VARS['am']))))));
-
- $title = "KMX.Ru - ";
-
- if ($paget<1) $paget=1;
- if ($pagem<1) $pagem=1;
-
- $maxsize=3000;
-
- if ($autorize)
- {
- $endtext='<br/><br/><a href="'.$mainpage.'">xPanel</a></p></card></wml>';
- $mainkey='<do name="m" type="options" label="xPanel"><go href="'.$mainpage.'"/></do>';
- }
- else
- {
- $endtext='<br/><br/><a href="'.$mainpage.'">На главную</a></p></card></wml>';
- $mainkey='<do name="m" type="options" label="На главную"><go href="'.$mainpage.'"/></do>';
- }
-
- switch ($action)
- {
- case 'dr': include($rootpath_forum."delrazdel.php");break;
- case 'ar': include($rootpath_forum."addrazdel.php");break;
- case 'r': include($rootpath_forum."rules.php");break;
- case 'a':
- case 'reg': include($rootpath_forum."autorize.php");break;
- case 'nm': include($rootpath_forum."addanswer.php");break;
- case 'nt': include($rootpath_forum."addtopic.php");break;
- case 'dm': include($rootpath_forum."editanswer.php");break;
- default: include($rootpath_forum."main.php");break;
- }
-
- @mysql_query("UNLOCK TABLES");
-
- print $endtext;
- exit();
- ?>