From 7e91f4821aee41589dd744a9540f15b76d729bab Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Fri, 3 Jun 2011 14:44:01 +0200 Subject: recentchanges -> admin log --- DB/db_rewrite.sql | 23 ++++++++++++++--------- includes/pages/admin_log.php | 25 +++++++++++++++++++++++++ includes/sys_menu.php | 3 ++- www-ssl/admin/Recentchanges.php | 29 ----------------------------- www-ssl/index.php | 4 ++++ 5 files changed, 45 insertions(+), 39 deletions(-) create mode 100644 includes/pages/admin_log.php delete mode 100644 www-ssl/admin/Recentchanges.php diff --git a/DB/db_rewrite.sql b/DB/db_rewrite.sql index 8758c191..525d6e7b 100644 --- a/DB/db_rewrite.sql +++ b/DB/db_rewrite.sql @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Host: localhost --- Erstellungszeit: 03. Juni 2011 um 12:37 +-- Erstellungszeit: 03. Juni 2011 um 12:43 -- Server Version: 5.1.44 -- PHP-Version: 5.3.1 @@ -82,7 +82,7 @@ INSERT INTO `Counter` (`URL`, `Anz`) VALUES ('admin_angel_types', 71), ('user_settings', 134), ('user_messages', 113), -('admin_groups', 135), +('admin_groups', 141), ('user_questions', 55), ('admin_questions', 43), ('admin_faq', 55), @@ -90,7 +90,8 @@ INSERT INTO `Counter` (`URL`, `Anz`) VALUES ('news_comments', 151), ('admin_user', 206), ('user_meetings', 5), -('admin_language', 22); +('admin_language', 25), +('admin_log', 5); -- -------------------------------------------------------- @@ -136,7 +137,7 @@ CREATE TABLE IF NOT EXISTS `GroupPrivileges` ( `privilege_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `group_id` (`group_id`,`privilege_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=73 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=74 ; -- -- Daten für Tabelle `GroupPrivileges` @@ -160,7 +161,8 @@ INSERT INTO `GroupPrivileges` (`id`, `group_id`, `privilege_id`) VALUES (57, -4, 7), (63, -4, 5), (70, -2, 8), -(72, -5, 18); +(72, -5, 18), +(73, -3, 19); -- -------------------------------------------------------- @@ -274,7 +276,7 @@ CREATE TABLE IF NOT EXISTS `Privileges` ( `desc` varchar(1024) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ; -- -- Daten für Tabelle `Privileges` @@ -298,7 +300,8 @@ INSERT INTO `Privileges` (`id`, `name`, `desc`) VALUES (15, 'news_comments', 'User can comment news'), (16, 'admin_user', 'Administrate the angels'), (17, 'user_meetings', 'Lists meetings (news)'), -(18, 'admin_language', 'Translate the system'); +(18, 'admin_language', 'Translate the system'), +(19, 'admin_log', 'Display recent changes'); -- -------------------------------------------------------- @@ -1045,7 +1048,9 @@ INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('user_meetings', 'DE', 'Treffen'), ('user_meetings', 'EN', 'Meetings'), ('admin_language', 'DE', 'Übersetzung'), -('admin_language', 'EN', 'Translation'); +('admin_language', 'EN', 'Translation'), +('admin_log', 'EN', 'Log'), +('admin_log', 'DE', 'Log'); -- -------------------------------------------------------- @@ -1088,7 +1093,7 @@ CREATE TABLE IF NOT EXISTS `User` ( -- INSERT INTO `User` (`UID`, `Nick`, `Name`, `Vorname`, `Alter`, `Telefon`, `DECT`, `Handy`, `email`, `ICQ`, `jabber`, `Size`, `Passwort`, `Gekommen`, `Aktiv`, `Tshirt`, `color`, `Sprache`, `Avatar`, `Menu`, `lastLogIn`, `CreateDate`, `Art`, `kommentar`, `Hometown`) VALUES -(1, 'admin', 'Gates', 'Bill', 42, '', '', '', '', '', '', '', '4297f44b13955235245b2497399d7a93', 1, 1, 0, 10, 'DE', 115, 'L', 1307104634, '0000-00-00 00:00:00', '', '', ''), +(1, 'admin', 'Gates', 'Bill', 42, '', '', '', '', '', '', '', '4297f44b13955235245b2497399d7a93', 1, 1, 0, 10, 'DE', 115, 'L', 1307105002, '0000-00-00 00:00:00', '', '', ''), (148, 'msquare', '', '', 23, '', '', '', 'msquare@notrademark.de', '', '', '', '4297f44b13955235245b2497399d7a93', 0, 1, 1, 10, 'DE', 0, 'L', 1307082872, '2011-06-03 07:55:24', 'AudioEngel', '', ''); -- -------------------------------------------------------- diff --git a/includes/pages/admin_log.php b/includes/pages/admin_log.php new file mode 100644 index 00000000..5f112f03 --- /dev/null +++ b/includes/pages/admin_log.php @@ -0,0 +1,25 @@ + 0) { + $html .= "\n"; + $html .= "\n\t\n\t\n\t\n\t\n\n"; + for ($n = 0; $n < mysql_num_rows($Erg); $n++) { + $html .= "\n"; + $html .= "\t\n"; + $html .= "\t\n"; + $html .= "\t\n"; + $html .= "\t\n"; + $html .= "\n"; + } + $html .= "
TimeUserCommendSQL Command
" . mysql_result($Erg, $n, "Time") . "" . UID2Nick(mysql_result($Erg, $n, "UID")) . displayavatar(mysql_result($Erg, $n, "UID")) . "" . mysql_result($Erg, $n, "Commend") . "" . mysql_result($Erg, $n, "SQLCommad") . "
\n"; + } else { + $html .= "Log is empty..."; + } + return $html; +} +?> + diff --git a/includes/sys_menu.php b/includes/sys_menu.php index 744d28d5..e81bed8d 100644 --- a/includes/sys_menu.php +++ b/includes/sys_menu.php @@ -40,7 +40,8 @@ function make_navigation() { "admin_rooms", "admin_groups", "admin_faq", - "admin_language" + "admin_language", + "admin_log" )); return $menu; } diff --git a/www-ssl/admin/Recentchanges.php b/www-ssl/admin/Recentchanges.php deleted file mode 100644 index 26324406..00000000 --- a/www-ssl/admin/Recentchanges.php +++ /dev/null @@ -1,29 +0,0 @@ -\n"; -echo "\n\tTime\n\tUser\n\tCommend\n\tSQL Commad\n\n"; - -for ($n = 0; $n < mysql_num_rows($Erg); $n++) { - echo "\n"; - echo "\t" . mysql_result($Erg, $n, "Time") . "\n"; - echo "\t" . UID2Nick(mysql_result($Erg, $n, "UID")) . displayavatar(mysql_result($Erg, $n, "UID")) . "\n"; - echo "\t" . mysql_result($Erg, $n, "Commend") . "\n"; - echo "\t" . mysql_result($Erg, $n, "SQLCommad") . "\n"; - echo "\n"; -} - -echo "\n"; - -include ("includes/footer.php"); -?> - diff --git a/www-ssl/index.php b/www-ssl/index.php index fe8c4795..7c65abb2 100644 --- a/www-ssl/index.php +++ b/www-ssl/index.php @@ -97,6 +97,10 @@ if (in_array($p, $privileges)) { elseif ($p == "admin_language") { require_once ('includes/pages/admin_language.php'); $content = admin_language(); + } + elseif ($p == "admin_log") { + require_once ('includes/pages/admin_log.php'); + $content = admin_log(); } else { require_once ('includes/pages/guest_start.php'); $content = guest_start(); -- cgit v1.2.3-70-g09d2