Closes #34: Very basic maintenance mode up and running

merge-requests/2/head
Mike Koch 10 years ago
parent 187db3635e
commit bdf2460755

@ -35,6 +35,10 @@
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
require(HESK_PATH . 'nuMods_settings.inc.php');
// Check to see if we're in maintenance mode before sending anything to the DOM
if ($nuMods_settings['maintenance_mode'] && !defined('ON_MAINTENANCE_PAGE')) {
header('Location: '.HESK_PATH.'maintenance.php');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@ -62,6 +66,7 @@ require(HESK_PATH . 'nuMods_settings.inc.php');
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap.min.js"></script>
<?php
/* Prepare Javascript that browser should load on page load */
$onload = "javascript:var i=new Image();i.src='" . HESK_PATH . "img/orangebtnover.gif';var i2=new Image();i2.src='" . HESK_PATH . "img/greenbtnover.gif';";

@ -0,0 +1,24 @@
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','./');
define('ON_MAINTENANCE_PAGE', 1);
// Get all the required files and functions
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'nuMods_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require_once(HESK_PATH . 'inc/header.inc.php');
if (!$nuMods_settings['maintenance_mode']) {
//-- The user refreshed the maintenance page, but maintenance mode is off. Redirect them back to the index page.
header('Location: '.HESK_PATH);
}
?>
<div class="row">
<div class="col-md-6 col-md-offset-3" style="padding-top: 30px; text-align: center;">
<i class="fa fa-exclamation-triangle fa-5x" style="color: orange"></i><br>
<p>The helpdesk is currently undergoing maintenance. Please come back later.</p>
</div>
</div>
<?php
require_once(HESK_PATH . 'inc/footer.inc.php');
?>

@ -19,5 +19,8 @@ $nuMods_settings['rtl'] = 0;
//-- Set this to 1 to show icons next to navigation menu items
$nuMods_settings['show_icons'] = 0;
//-- Set this to 1 to enable maintenance mode
$nuMods_settings['maintenance_mode'] = 0;
/* DO NOT EDIT ANYTHING BELOW THIS LINE */
$nuMods_settings['version']='1.3.0';

Loading…
Cancel
Save