mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Add admin logging to maintenance mode
This commit is contained in:
@@ -11,23 +11,40 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/ugflag.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/ugflag.php,v $
|
||||||
| $Revision: 1.1.1.1 $
|
| $Revision: 1.2 $
|
||||||
| $Date: 2006-12-02 04:33:28 $
|
| $Date: 2008-11-01 23:01:05 $
|
||||||
| $Author: mcfly_e107 $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
require_once("../class2.php");
|
require_once("../class2.php");
|
||||||
if (!getperms("9")) {
|
if (!getperms("9"))
|
||||||
|
{
|
||||||
header("location:".e_BASE."index.php");
|
header("location:".e_BASE."index.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once(e_HANDLER."ren_help.php");
|
require_once(e_HANDLER."ren_help.php");
|
||||||
|
|
||||||
if (isset($_POST['updatesettings'])) {
|
if (isset($_POST['updatesettings']))
|
||||||
$pref['maintainance_flag'] = intval($_POST['maintainance_flag']);
|
{
|
||||||
$pref['maintainance_text'] = $tp->toDB($_POST['maintainance_text']);
|
$changed = FALSE;
|
||||||
save_prefs();
|
$temp = intval($_POST['maintainance_flag']);
|
||||||
|
if ($pref['maintainance_flag'] != $temp)
|
||||||
|
{
|
||||||
|
$pref['maintainance_flag'] = $temp;
|
||||||
|
$changed = TRUE;
|
||||||
|
}
|
||||||
|
$temp = $tp->toDB($_POST['maintainance_text']);
|
||||||
|
if ($pref['maintainance_text'] != $temp)
|
||||||
|
{
|
||||||
|
$pref['maintainance_text'] = $temp;
|
||||||
|
$changed = TRUE;
|
||||||
|
}
|
||||||
|
if ($changed)
|
||||||
|
{
|
||||||
|
$admin_log->log_event(($pref['maintainance_flag'] == 0) ? 'MAINT_02' : 'MAINT_01',$pref['maintainance_text'],E_LOG_INFORMATIVE,'');
|
||||||
|
save_prefs();
|
||||||
|
}
|
||||||
header("location:".e_SELF."?u");
|
header("location:".e_SELF."?u");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
// e107 Language File.
|
// e107 Language File.
|
||||||
// $Id: lan_log_messages.php,v 1.14 2008-10-20 21:52:38 e107steved Exp $
|
// $Id: lan_log_messages.php,v 1.15 2008-11-01 23:01:11 e107steved Exp $
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The definitions in this file are for standard 'explanatory' messages which might be entered
|
The definitions in this file are for standard 'explanatory' messages which might be entered
|
||||||
@@ -138,4 +138,10 @@ define('LAN_AL_ADMIN_01','Update admin permissions');
|
|||||||
define('LAN_AL_ADMIN_02','Admin rights removed');
|
define('LAN_AL_ADMIN_02','Admin rights removed');
|
||||||
define('LAN_AL_ADMIN_03','');
|
define('LAN_AL_ADMIN_03','');
|
||||||
|
|
||||||
|
// Maintenance mode
|
||||||
|
//-----------------
|
||||||
|
define('LAN_AL_MAINT_00','Unknown maintenance message');
|
||||||
|
define('LAN_AL_MAINT_01','Maintenance mode set');
|
||||||
|
define('LAN_AL_MAINT_02','Maintenance mode cleared');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user