mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Add admin logging to maintenance mode
This commit is contained in:
parent
ae120a300c
commit
fb0169937f
@ -11,23 +11,40 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_admin/ugflag.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:33:28 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2008-11-01 23:01:05 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
require_once("../class2.php");
|
||||
if (!getperms("9")) {
|
||||
if (!getperms("9"))
|
||||
{
|
||||
header("location:".e_BASE."index.php");
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once(e_HANDLER."ren_help.php");
|
||||
|
||||
if (isset($_POST['updatesettings'])) {
|
||||
$pref['maintainance_flag'] = intval($_POST['maintainance_flag']);
|
||||
$pref['maintainance_text'] = $tp->toDB($_POST['maintainance_text']);
|
||||
save_prefs();
|
||||
if (isset($_POST['updatesettings']))
|
||||
{
|
||||
$changed = FALSE;
|
||||
$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");
|
||||
exit;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
// 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
|
||||
@ -138,4 +138,10 @@ define('LAN_AL_ADMIN_01','Update admin permissions');
|
||||
define('LAN_AL_ADMIN_02','Admin rights removed');
|
||||
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');
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user