summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2011-06-03 14:44:01 +0200
committerPhilip Häusler <msquare@notrademark.de>2011-06-03 14:44:01 +0200
commit7e91f4821aee41589dd744a9540f15b76d729bab (patch)
tree522e68d503f155b52350a6c634c80333bc17842b
parent2fcd0a63f5c1bb8edd753788729ea2e22e01c0ab (diff)
recentchanges -> admin log
-rw-r--r--DB/db_rewrite.sql23
-rw-r--r--includes/pages/admin_log.php25
-rw-r--r--includes/sys_menu.php3
-rw-r--r--www-ssl/admin/Recentchanges.php29
-rw-r--r--www-ssl/index.php4
5 files changed, 45 insertions, 39 deletions
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 @@
+<?php
+function admin_log() {
+ $html = "";
+ $SQL = "SELECT * FROM `ChangeLog` ORDER BY `Time` DESC LIMIT 0,10000";
+ $Erg = sql_query($SQL);
+
+ if (mysql_num_rows($Erg) > 0) {
+ $html .= "<table border=1>\n";
+ $html .= "<tr>\n\t<th>Time</th>\n\t<th>User</th>\n\t<th>Commend</th>\n\t<th>SQL Command</th>\n</tr>\n";
+ for ($n = 0; $n < mysql_num_rows($Erg); $n++) {
+ $html .= "<tr>\n";
+ $html .= "\t<td>" . mysql_result($Erg, $n, "Time") . "</td>\n";
+ $html .= "\t<td>" . UID2Nick(mysql_result($Erg, $n, "UID")) . displayavatar(mysql_result($Erg, $n, "UID")) . "</td>\n";
+ $html .= "\t<td>" . mysql_result($Erg, $n, "Commend") . "</td>\n";
+ $html .= "\t<td>" . mysql_result($Erg, $n, "SQLCommad") . "</td>\n";
+ $html .= "</tr>\n";
+ }
+ $html .= "</table>\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 @@
-<?php
-require_once ('../bootstrap.php');
-
-$title = "ChangeLog";
-$header = "Datenbank-Auszug";
-include ("includes/header.php");
-
-$SQL = "SELECT * FROM `ChangeLog` ORDER BY `Time` DESC LIMIT 0,10000";
-$Erg = mysql_query($SQL, $con);
-
-echo mysql_error($con);
-
-echo "<table border=1>\n";
-echo "<tr>\n\t<th>Time</th>\n\t<th>User</th>\n\t<th>Commend</th>\n\t<th>SQL Commad</th>\n</tr>\n";
-
-for ($n = 0; $n < mysql_num_rows($Erg); $n++) {
- echo "<tr>\n";
- echo "\t<td>" . mysql_result($Erg, $n, "Time") . "</td>\n";
- echo "\t<td>" . UID2Nick(mysql_result($Erg, $n, "UID")) . displayavatar(mysql_result($Erg, $n, "UID")) . "</td>\n";
- echo "\t<td>" . mysql_result($Erg, $n, "Commend") . "</td>\n";
- echo "\t<td>" . mysql_result($Erg, $n, "SQLCommad") . "</td>\n";
- echo "</tr>\n";
-}
-
-echo "</table>\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();