diff --git a/config.php b/config.php index 665ea76..cc1c528 100644 --- a/config.php +++ b/config.php @@ -40,7 +40,7 @@ function get($id) "anim" => false, "LinkAccount" => "http://localhost/admin/account.php?id=", "LinkPlayer" => "http://localhost/admin/player.php?guid=", - "searchlimit" => 10, + "searchlimit" => 5, "lang" => 8, /*################################################################################################## ## Admin settings diff --git a/lib/classes.php b/lib/classes.php index 72c7758..ecdf404 100644 --- a/lib/classes.php +++ b/lib/classes.php @@ -15,6 +15,10 @@ function GetNewId(); function GetNameByGUID($guid); function GetAccountNameById($id); function GetSections(); + function GetSubType($id); + function GetMap($id); + function GetZone($id); + function GetSectionById($id); function GetPercent($id,$one=false); function GetPriority($id,$one=false); function GetStatus($id,$one=false); @@ -44,7 +48,6 @@ interface html function install(); function send(); function viewall($int); - function viewdate($int); function progress($int); function detail($int); function view(); @@ -53,6 +56,7 @@ function htmlstart($title); function header(); function end(); function block($text); + function blocknot($text); function login(); function success(); function inc($content); diff --git a/lib/create.php b/lib/create.php index f5fde3e..3dbce73 100644 --- a/lib/create.php +++ b/lib/create.php @@ -55,7 +55,35 @@ public function GetSections($st=false) $res = $sql->num_rows($sql->exe($cfg->get("realmd"),"SELECT 1 FROM `bt_message`".$order)); return ($res > "0") ? ''.$res.'' : $res; } - + public function GetSectionById($id) + { + $cfg = new config; + $sql = new sql; + $name = $sql->res($cfg->get("realmd"),"SELECT `name` FROM `bt_section` WHERE `id` = '".$id."'"); + return $name; + } + public function GetSubType($id) + { + $cfg = new config; + $sql = new sql; + $result = $sql->res($cfg->get("realmd"),"SELECT `name` FROM `bt_subtype` WHERE `id` = '".$id."'"); + if(!$result) + $result = '--'; + return $result; + } + public function GetMap($id) + { + $cfg = new config; + $sql = new sql; + $result = $sql->res($cfg->get("realmd"),"SELECT `name` FROM `bt_map_id` WHERE `id` = '".$id."'"); + if(!$result) + $result = '--'; + return $result; + } + public function GetZone($id) + { + + } public function GetPercent($all,$one=false) { $cfg = new config; @@ -133,7 +161,7 @@ public function LoadZones() $opt[0] = ""; $cur = 0; $query = $sql->exe($cfg->get("realmd"),"SELECT * FROM `bt_zone_id` ORDER BY `map` ASC"); - while($row = mysql_fetch_array($query)) + while($row = $sql->fetch($query)) { if(!isset($opt[$row['map']])) { @@ -146,7 +174,7 @@ public function LoadZones() $query = $sql->exe($cfg->get("realmd"),"SELECT `map` FROM `bt_zone_id` ORDER BY `map` ASC"); $script = ''; - echo ' - + $text = ' +
- -
Сейчас так:
+
Сейчас так:
А должно быть так:
Пояснение:
- - - - + + + +
Персонаж: - - + + + + - - - + + + - - - + + + - - - + + + - + - - - - - + - - - -
Персонаж:'.$main->GetNameByGUID($all['sender']).'
Тип:'.$main->GetSectionById($all['type']).'
Подтип:'.$main->GetSubType($all['subtype']).'
Местность:'.$main->GetMap($all['map']).'
Зона: - -
-
'; - $main->LoadView($opt);echo ' +
+
Комментарии:
'; - - if($user['gmlevel'] >= $cfg->get("mingm")) - { - $text = ' -
- Быстрый ответ: -
'; - $this->block($text); - } + $this->blocknot($text); } public function view() { @@ -280,17 +194,21 @@ public function view() 3 => array("100px","Прогресс"), 4 => array("100px","Статус"), 5 => array("100px","Приоритет")); - - echo ' - + + $text = ' +
'; for($i=1;$iget("progressbar")) || $i != 3) - echo ''; - echo ' - - '; - + { + $text.= ''; + $text.= ''; + } + $text.= ' + +
'.$mass[$i][1].'Заголовок
'.$mass[$i][1].'
Заголовок
'; + $this->blocknot($text); + $text = ''; $psort = ''; if(isset($_GET['sort']) && intval($_GET['sort']) > 0 && $_GET['sort'] > "0" && $_GET['sort'] < "6") { @@ -315,22 +233,27 @@ public function view() $title = $all['title']; $pcn = $main->GetPercent($all); - $pix = str_replace("%","",$pcn)*1.05; + $pix = str_replace("%","",$pcn)*1.25; $stream = 'stream'.$row['id']; $width = ($cfg->get("anim") == true) ? 0 : $pix; - $img = '
'; + $img = '
'; - echo ' - - - '; + $text.= ' + + + + + '; if($cfg->get("progressbar")) - echo ' - '; - echo ' - - - + $text.= ' + + '; + $text.= ' + + + + + '; if($cfg->get("anim") && $pix > "0") @@ -339,8 +262,9 @@ public function view() } $m++; } - echo '
'.$row['id'].''.$main->GetNameByGUID(intval($row['sender'])).'
'.$row['id'].'
'.$main->GetNameByGUID(intval($row['sender'])).'
'.$img.''.$main->GetStatus($all).''.$main->GetPriority($all).'
'.$title.'
'.$img.'
'.$main->GetStatus($all).'
'.$main->GetPriority($all).'
'.$title.'
'; - echo ''; + $text.= '
'; + $text.= ''; + $this->blocknot($text); } else { @@ -467,7 +391,16 @@ public function block($text) '; } - + public function blocknot($text,$style='',$id='') + { + if($id)$id='id="'.$id.'"'; + echo ' + + + + +
'.$text.'
'; + } public function login() { echo ' @@ -487,10 +420,44 @@ public function success() global $user; if(isset($user['site_notice'])) $this->block($user['site_notice']); - echo ' -
Здравствуйте, '.$user['username'].'! (выход)
- -
Создать | Все | Новые | Мои | Сайт сервера
'; + $txt1 = ' + + + + + + +
Здравствуйте, '.$user['username'].'!
'; + + $txt2 = ' + + + + + + + + +
Точно выйти?
'; + + $txt3 = ' + + + + + + + + + + + + +
'; + + $this->blocknot($txt1,"","userpanel"); + $this->blocknot($txt2,"display:none;","checklogout"); + $this->blocknot($txt3); } public function inc($content) { @@ -501,23 +468,43 @@ public function inc($content) public function admin() { $main = new main; - if(isset($_GET['faststatus']) && isset($_GET['changeid']) && intval($_GET['changeid']) > 0) $main->SetStatus($_GET['faststatus'],$_GET['changeid']); if(isset($_GET['detail'])) + { $id = $_GET['detail']; + $all = $main->SelectMessage($id); + } else $id = "0"; - echo '
'; - echo 'Новых: '.$main->GetSections("new").' | Управление БД | Поиск и сортировка'; + $text = ' + + '; + + if($id > "0") + $text.= ' + + + + '; + + $text.= ' + + + + + '; if(isset($_GET['a']) && $_GET['a'] == "list" && $main->GetSections("all") > "0") - echo ' | Изменить'; + $text.= ' + + '; - echo ''; + $text.= '
Быстрый ответ:
'; + $this->blocknot($text); } public function CheckVersion() { diff --git a/lib/main.js b/lib/main.js index 23feaef..5b78b16 100644 --- a/lib/main.js +++ b/lib/main.js @@ -271,12 +271,12 @@ function showauth() function checklogout() { document.getElementById("userpanel").style.display = "none"; - document.getElementById("checklogout").style.display = "block"; + document.getElementById("checklogout").style.display = ""; } function logoutcancel() { document.getElementById("checklogout").style.display = "none"; - document.getElementById("userpanel").style.display = "block"; + document.getElementById("userpanel").style.display = ""; } function ChangeZones(id) { @@ -319,7 +319,6 @@ function send() // method player type subtype map zone name db; i++; } - if(sql && (area4 != '' && area3 != '' && area2 != '' && area1 != '')) { document.getElementById("ajaximg").style.visibility = "visible"; diff --git a/lib/style.css b/lib/style.css index d8eaa07..780615e 100644 --- a/lib/style.css +++ b/lib/style.css @@ -34,19 +34,33 @@ border: 0; } button { border: 0; +width: 60px; } .b1 { +padding: 15px 0px 0px 0px; background-color: #666; border: 1px; border-style: solid; border-color: #888; -width: 700px; +width: 1000px; position: relative; top: 40px; } +.t0 { +width: 970px; +margin: 0px 0px 15px 0px; +} +.t0 tr td.mini { +background-color: #555; +border: 1px; +border-style: solid; +border-color: #000; +vertical-align: top; +height: 32px; +} #t1 { margin: 15px; -width: 670px; +width: 970px; } #t1 tr td.block { color: #FFF; @@ -71,7 +85,7 @@ vertical-align: top; overflow: hidden; padding: 5px; margin: 0; -width: 400px; +width: 100%; height:160px; border: 0px; background-color: #999; @@ -84,6 +98,9 @@ width: 100%; .t2 tr td.block2 { padding: 0px 0px 0px 5px; } +.t2 tr td.block3 { +padding: 0px 5px 0px 0px; +} .input { width: 140px; } @@ -100,7 +117,7 @@ padding: 0px 0px 0px 5px; color: #FFF; } .border { -width: 668px; +width: 968px; height: 30px; margin: 15px; color: #FFF; @@ -112,13 +129,7 @@ padding: 5px; } .pad { padding: 0px 5px 0px 5px; -} -.statusborder { -width: 655px; -height: 5px; -border: 1px; -border-color: #006400; -border-style: solid; +color: #FFF; } #namelimit1 { position: relative; diff --git a/sql/realmd_bugtracker.sql b/sql/realmd_bugtracker.sql index 8eab2a1..e07faaa 100644 --- a/sql/realmd_bugtracker.sql +++ b/sql/realmd_bugtracker.sql @@ -25,23 +25,21 @@ CREATE TABLE `bt_message` ( `status` int(11) NOT NULL default '0', `percentage` int(3) NOT NULL default '0', `priority` int(1) NOT NULL, - `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `type` int(11) NOT NULL DEFAULT 0, `text_1` longtext NOT NULL, `text_2` longtext NOT NULL, `text_3` longtext NOT NULL, + `subtype` int(11) NOT NULL DEFAULT 0, + `map` int(11) NOT NULL DEFAULT 0, + `zone` int(11) NOT NULL DEFAULT 0, + `name` varchar(20) NOT NULL, + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=cp1251; DROP TABLE IF EXISTS `bt_options`; CREATE TABLE `bt_options` ( `id` int(11) NOT NULL, - `method` int(11) NOT NULL DEFAULT 2, - `guid` int(11) NOT NULL, - `map` int(11) NOT NULL, - `zone` int(11) NOT NULL, - `subtype` int(11) NOT NULL, - `type` int(11) NOT NULL, - `name` varchar(50) NOT NULL, `link` varchar(50) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=cp1251; diff --git a/sql/updates/realmd_revision_25.sql b/sql/updates/realmd_revision_25.sql new file mode 100644 index 0000000..86b413b --- /dev/null +++ b/sql/updates/realmd_revision_25.sql @@ -0,0 +1,23 @@ +ALTER TABLE `bt_message` +ADD COLUMN `type` int(11) NOT NULL DEFAULT 0 AFTER `text_3`, +ADD COLUMN `subtype` int(11) NOT NULL DEFAULT 0 AFTER `type`, +ADD COLUMN `name` varchar(50) NOT NULL AFTER `subtype`; + +ALTER TABLE `bt_options` +DROP COLUMN `method`, +DROP COLUMN `guid`, +DROP COLUMN `map`, +DROP COLUMN `zone`, +DROP COLUMN `subtype`, +DROP COLUMN `type`, +DROP COLUMN `name`, +MODIFY COLUMN `link` varchar(50) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL AFTER `id`; + +ALTER TABLE `bt_message` +MODIFY COLUMN `type` int(11) NOT NULL DEFAULT 0 AFTER `priority`, +ADD COLUMN `map` int(11) NOT NULL DEFAULT 0 AFTER `subtype`, +ADD COLUMN `zone` int(11) NOT NULL DEFAULT 0 AFTER `map`, +MODIFY COLUMN `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `name`; + +ALTER TABLE `bt_message` +MODIFY COLUMN `name` varchar(20) CHARACTER SET cp1251 COLLATE cp1251_general_ci NOT NULL AFTER `zone`; \ No newline at end of file