1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Add admin logging to the 'pseudo-plugins' (configurable menus)

This commit is contained in:
e107steved
2008-12-21 12:53:48 +00:00
parent f203c0d622
commit 35aa10b43a
7 changed files with 206 additions and 163 deletions

View File

@@ -1,6 +1,6 @@
<?php
// e107 Language File.
// $Id: lan_log_messages.php,v 1.35 2008-12-10 22:39:43 e107steved Exp $
// $Id: lan_log_messages.php,v 1.36 2008-12-21 12:53:42 e107steved Exp $
/*
The definitions in this file are for standard 'explanatory' messages which might be entered
@@ -12,15 +12,15 @@ into any of the system logs. They are in three groups with different prefixes:
// User audit trail events. For messages 11-30, the last 2 digits must match the define for the event type in the admin log
define('LAN_AUDIT_LOG_001', "Access by banned user");
define('LAN_AUDIT_LOG_002', "Flood protection activated");
define('LAN_AUDIT_LOG_001', 'Access by banned user');
define('LAN_AUDIT_LOG_002', 'Flood protection activated');
define('LAN_AUDIT_LOG_003', 'Access from banned IP Address');
define('LAN_AUDIT_LOG_004', "");
define('LAN_AUDIT_LOG_005', "");
define('LAN_AUDIT_LOG_006', "User changed password");
define('LAN_AUDIT_LOG_007', "User changed email address");
define('LAN_AUDIT_LOG_008', "");
define('LAN_AUDIT_LOG_009', "");
define('LAN_AUDIT_LOG_004', '');
define('LAN_AUDIT_LOG_005', '');
define('LAN_AUDIT_LOG_006', 'User changed password');
define('LAN_AUDIT_LOG_007', 'User changed email address');
define('LAN_AUDIT_LOG_008', '');
define('LAN_AUDIT_LOG_009', '');
define('LAN_AUDIT_LOG_010', 'User data changed by admin');
define('LAN_AUDIT_LOG_011', 'User signed up');
define('LAN_AUDIT_LOG_012', 'User confirmed registration');
@@ -348,4 +348,15 @@ define('LAN_AL_PLUGMAN_03', 'Plugin uninstalled');
define('LAN_AL_PLUGMAN_04', 'Plugin refreshed');
// Sundry Pseudo-plugins - technically they're plugins, but not worth the file overhead of treating them separately
//----------------------
define('LAN_AL_MISC_01','Tree menu settings updated');
define('LAN_AL_MISC_02','Online menu settings updated');
define('LAN_AL_MISC_03','Login menu settings updated');
define('LAN_AL_MISC_04','Comment menu settings updated');
define('LAN_AL_MISC_05','Clock menu settings updated');
define('LAN_AL_MISC_06','Blog calendar menu settings updated');
define('LAN_AL_MISC_07','');
?>

View File

@@ -1,44 +1,45 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/blogcalendar_menu/config.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:45 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Plugin Administration - Blog calendar menu
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/blogcalendar_menu/config.php,v $
* $Revision: 1.2 $
* $Date: 2008-12-21 12:53:48 $
* $Author: e107steved $
*
*/
$eplug_admin = TRUE;
require_once("../../class2.php");
require_once(e_HANDLER."userclass_class.php");
$lan_file = e_PLUGIN."blogcalendar_menu/languages/".e_LANGUAGE.".php";
if (file_exists($lan_file)) {
require_once($lan_file);
} else {
require_once(e_PLUGIN."blogcalendar_menu/languages/English.php");
}
if (!getperms("1")) {
include_lan(e_PLUGIN."blogcalendar_menu/languages/".e_LANGUAGE.".php");
if (!getperms("1"))
{
header("location:".e_BASE."index.php");
exit ;
}
require_once(e_ADMIN."auth.php");
if (isset($_POST['update_menu'])) {
while (list($key, $value) = each($_POST)) {
if ($value != BLOGCAL_CONF3) {
$pref[$key] = $value;
if (isset($_POST['update_menu']))
{
$temp = array();
while (list($key, $value) = each($_POST))
{
if ($value != BLOGCAL_CONF3)
{
$temp[$key] = $value;
}
}
save_prefs();
if ($admin_log->logArrayDiffs($temp,$pref,'MISC_06'))
{
save_prefs();
}
$ns->tablerender("", "<div style='text-align:center'><b>".BLOGCAL_CONF5."</b></div>");
}

View File

@@ -1,44 +1,50 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/clock_menu/config.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:52 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Plugin Administration - Comment menu
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/clock_menu/config.php,v $
* $Revision: 1.2 $
* $Date: 2008-12-21 12:53:48 $
* $Author: e107steved $
*
*/
$eplug_admin = TRUE;
require_once("../../class2.php");
if (!getperms("1")) {
if (!getperms("1"))
{
header("location:".e_BASE."index.php");
exit ;
}
require_once(e_ADMIN."auth.php");
@include_once(e_PLUGIN."clock_menu/languages/admin/".e_LANGUAGE.".php");
@include_once(e_PLUGIN."clock_menu/languages/admin/English.php");
@include_lan(e_PLUGIN."clock_menu/languages/admin/".e_LANGUAGE.".php");
require_once(e_HANDLER."form_handler.php");
$rs = new form;
if (isset($_POST['update_menu'])) {
while (list($key, $value) = each($_POST)) {
if ($key != "update_menu") {
$menu_pref[$key] = $value;
if (isset($_POST['update_menu']))
{
$temp = array();
while (list($key, $value) = each($_POST))
{
if ($key != "update_menu")
{
$temp[$key] = $value;
}
}
if ($_POST['clock_format'] != 1) {
$menu_pref['clock_format'] = 0;
if ($_POST['clock_format'] != 1)
{
$temp['clock_format'] = 0;
}
if ($admin_log->logArrayDiffs($temp,$menu_pref,'MISC_05'))
{
$tmp = addslashes(serialize($menu_pref));
$sql->db_Update("core", "e107_value='{$tmp}' WHERE e107_name='menu_pref' ");
}
$tmp = addslashes(serialize($menu_pref));
$sql->db_Update("core", "e107_value='$tmp' WHERE e107_name='menu_pref' ");
$ns->tablerender("", "<div style=\"text-align:center\"><b>".CLOCK_AD_L1."</b></div>");
}

View File

@@ -1,48 +1,50 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/comment_menu/config.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:52 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Plugin Administration - Comment menu
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/comment_menu/config.php,v $
* $Revision: 1.2 $
* $Date: 2008-12-21 12:53:48 $
* $Author: e107steved $
*
*/
$eplug_admin = TRUE;
require_once("../../class2.php");
require_once(e_HANDLER."userclass_class.php");
$lan_file = e_PLUGIN."comment_menu/languages/".e_LANGUAGE.".php";
if (file_exists($lan_file)) {
require_once($lan_file);
} else {
require_once(e_PLUGIN."comment_menu/languages/English.php");
}
if (!getperms("1")) {
include_lan(e_PLUGIN."comment_menu/languages/".e_LANGUAGE.".php");
if (!getperms("1"))
{
header("location:".e_BASE."index.php");
exit ;
exit() ;
}
require_once(e_ADMIN."auth.php");
if (isset($_POST['update_menu'])) {
while (list($key, $value) = each($_POST)) {
if ($value != CM_L9) {
$menu_pref[$key] = $value;
if (isset($_POST['update_menu']))
{
$temp = array();
while (list($key, $value) = each($_POST))
{
if ($value != CM_L9)
{
$temp[$key] = $value;
}
}
if (!$_POST['comment_title']) {
$menu_pref['comment_title'] = 0;
if (!$_POST['comment_title'])
{
$temp['comment_title'] = 0;
}
if ($admin_log->logArrayDiffs($temp,$menu_pref,'MISC_04'))
{
$tmp = addslashes(serialize($menu_pref));
$sql->db_Update("core", "e107_value='{$tmp}' WHERE e107_name='menu_pref' ");
}
$tmp = addslashes(serialize($menu_pref));
$sql->db_Update("core", "e107_value='$tmp' WHERE e107_name='menu_pref' ");
$ns->tablerender("", "<div style=\"text-align:center\"><b>".CM_L10."</b></div>");
}

View File

@@ -1,50 +1,57 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/login_menu/config.php,v $
| $Revision: 1.4 $
| $Date: 2008-02-06 00:23:28 $
| $Author: secretr $
+----------------------------------------------------------------------------+
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Plugin Administration - Login menu
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/login_menu/config.php,v $
* $Revision: 1.5 $
* $Date: 2008-12-21 12:53:48 $
* $Author: e107steved $
*
*/
$eplug_admin = TRUE;
require_once("../../class2.php");
if (!getperms("4")) { header("location:".e_BASE."index.php"); exit ;}
if (!getperms("4"))
{
header("location:".e_BASE."index.php");
exit() ;
}
include_lan(e_PLUGIN."login_menu/languages/".e_LANGUAGE.".php");
require_once(e_ADMIN."auth.php");
require_once(e_PLUGIN."login_menu/login_menu_class.php");
if ($_POST['update_menu']) {
if ($_POST['update_menu'])
{
//sort/show/hide links - Start
if(varset($_POST['external_links'])) {
if(varset($_POST['external_links']))
{
$_POST['pref']['external_links'] = array();
asort($_POST['external_links_order']);
foreach ($_POST['external_links_order'] as $key => $value) {
foreach ($_POST['external_links_order'] as $key => $value)
{
if(array_key_exists($key, $_POST['external_links']))
{
$_POST['pref']['external_links'][] = $key;
}
}
$_POST['pref']['external_links'] = $_POST['pref']['external_links'] ? implode(',', $_POST['pref']['external_links']) : '';
unset($_POST['external_links']);
} else {
}
else
{
$_POST['pref']['external_links'] = '';
}
@@ -52,12 +59,15 @@ if ($_POST['update_menu']) {
//sort/show/hide links - End
//show/hide stats - Start
if(varset($_POST['external_stats'])) {
if(varset($_POST['external_stats']))
{
$_POST['pref']['external_stats'] = implode(',', array_keys($_POST['external_stats']));
unset($_POST['external_stats']);
} else {
}
else
{
$_POST['pref']['external_stats'] = '';
}
//show/hide stats - End
@@ -65,7 +75,8 @@ if ($_POST['update_menu']) {
unset($menu_pref['login_menu']);
$menu_pref['login_menu'] = $_POST['pref'];
$tmp = addslashes(serialize($menu_pref));
$sql->db_Update("core", "e107_value='$tmp' WHERE e107_name='menu_pref' ");
$sql->db_Update("core", "e107_value='{$tmp}' WHERE e107_name='menu_pref' ");
$admin_log->log_event('MISC_03','', E_LOG_INFORMATIVE,'');
$ns->tablerender("", '<div style=\'text-align:center\'><b>'.LAN_SETSAVED.'</b></div>');
}

View File

@@ -1,39 +1,45 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/online/config.php,v $
| $Revision: 1.1 $
| $Date: 2007-05-01 19:50:56 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Plugin Administration - Online menu
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/online/config.php,v $
* $Revision: 1.2 $
* $Date: 2008-12-21 12:53:48 $
* $Author: e107steved $
*
*/
$eplug_admin = TRUE;
require_once("../../class2.php");
include_lan(e_PLUGIN."online/languages/".e_LANGUAGE.".php");
if (!getperms("1")) {
if (!getperms("1"))
{
header("location:".e_BASE."index.php");
exit ;
}
require_once(e_ADMIN."auth.php");
if (isset($_POST['update_menu'])) {
while (list($key, $value) = each($_POST)) {
if ($value != LAN_UPDATE) {
$menu_pref[$key] = $value;
if (isset($_POST['update_menu']))
{
$temp = array();
while (list($key, $value) = each($_POST))
{
if ($value != LAN_UPDATE)
{
$temp[$key] = $value;
}
}
$tmp = addslashes(serialize($menu_pref));
$sql->db_Update("core", "e107_value='$tmp' WHERE e107_name='menu_pref' ");
if ($admin_log->logArrayDiffs($temp,$menu_pref,'MISC_02'))
{
$tmp = addslashes(serialize($menu_pref));
$sql->db_Update("core", "e107_value='{$tmp}' WHERE e107_name='menu_pref' ");
}
$ns->tablerender("", "<div style='text-align:center'><b>".LAN_UPDATED."</b></div>");
}

View File

@@ -1,41 +1,47 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/tree_menu/config.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:35:43 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Plugin Administration - Tree menu
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/tree_menu/config.php,v $
* $Revision: 1.2 $
* $Date: 2008-12-21 12:53:48 $
* $Author: e107steved $
*
*/
$eplug_admin = TRUE;
require_once("../../class2.php");
@include_once(e_PLUGIN."tree_menu/languages/".e_LANGUAGE.".php");
@include_once(e_PLUGIN."tree_menu/languages/English.php");
if (!getperms("4")) {
if (!getperms("4"))
{
header("location:".e_BASE."index.php");
exit ;
}
require_once(e_ADMIN."auth.php");
if (isset($_POST['update_menu'])) {
foreach($_POST as $key => $value) {
if ($value != TREE_L2) {
$menu_pref[$key] = $value;
if (isset($_POST['update_menu']))
{
$temp = array();
foreach($_POST as $key => $value)
{
if ($value != TREE_L2)
{
$temp[$key] = $value;
}
}
$tmp = addslashes(serialize($menu_pref));
$sql->db_Update("core", "e107_value='$tmp' WHERE e107_name='menu_pref' ");
if ($admin_log->logArrayDiffs($temp,$menu_pref,'MISC_01'))
{
$tmp = addslashes(serialize($menu_pref));
$sql->db_Update("core", "e107_value='{$tmp}' WHERE e107_name='menu_pref' ");
}
$ns->tablerender("", "<div style='text-align:center'><b>".TREE_L3."</b></div>");
}