Revert the removal of some features...for now

This reverts commit f61c05ac34.
merge-requests/2/head
Mike Koch 9 years ago
parent 21781b20c7
commit 0924dd5cc8

@ -1817,6 +1817,20 @@ if ( defined('HESK_DEMO') )
</div>
</div>
</div>
<div class="form-group">
<label for="maintenance-mode" class="col-sm-4 col-xs-12 control-label"><?php echo $hesklang['maintenanceMode']; ?>
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover" data-placement="bottom"
title="<?php echo $hesklang['maintenanceMode']; ?>"
data-content="<?php echo $hesklang['maintenanceModeHelp']; ?>"></i>
</label>
<div class="col-sm-8 col-xs-12">
<div class="checkbox">
<label>
<input id="maintenance-mode" name="maintenance-mode" type="checkbox" <?php if ($modsForHesk_settings['maintenance_mode']) {echo 'checked';} ?>> <?php echo $hesklang['enable_maintenance']; ?>
</label>
</div>
</div>
</div>
</div>
<!-- Mods For Hesk: Statuses -->
<div class="tab-pane fade in" id="statuses">

@ -537,6 +537,7 @@ $set['hesk_version'] = $hesk_settings['hesk_version'];
// Save the modsForHesk_settings.inc.php file
$set['rtl'] = empty($_POST['rtl']) ? 0 : 1;
$set['show-icons'] = empty($_POST['show-icons']) ? 0 : 1;
$set['maintenance-mode'] = empty($_POST['maintenance-mode']) ? 0 : 1;
$set['navbarBackgroundColor'] = hesk_input(hesk_POST('navbarBackgroundColor'));
$set['navbarBrandColor'] = hesk_input(hesk_POST('navbarBrandColor'));
$set['navbarBrandHoverColor'] = hesk_input(hesk_POST('navbarBrandHoverColor'));
@ -567,7 +568,10 @@ $modsForHesk_settings[\'questionMarkColor\'] = \''.$set['questionMarkColor'].'\'
$modsForHesk_settings[\'rtl\'] = '.$set['rtl'].';
//-- Set this to 1 to show icons next to navigation menu items
$modsForHesk_settings[\'show_icons\'] = '.$set['show-icons'].';';
$modsForHesk_settings[\'show_icons\'] = '.$set['show-icons'].';
//-- Set this to 1 to enable maintenance mode
$modsForHesk_settings[\'maintenance_mode\'] = '.$set['maintenance-mode'].';';
// Write the file
if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) )

@ -1020,7 +1020,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<div class="col-md-3 col-xs-12">
<div class="ticketName"><?php echo $ticket['name']; ?></div>
<div class="ticketEmail"><?php echo $ticket['email']; ?></div>
<div class="ticketEmail"><?php echo $hesklang['ip']; ?>: <?php echo $ticket['ip']; ?></div>
<div class="ticketEmail"><?php echo $hesklang['ip']; ?>: <?php echo '<a href="http://whois.domaintools.com/'.$ticket['ip'].'">'.$ticket['ip'].'</a>'; ?></div>
</div>
<div class="col-md-9 col-xs-12 pushMarginLeft">
<div class="ticketMessageTop withBorder">

@ -34,6 +34,7 @@
define('IN_SCRIPT',1);
define('HESK_PATH','../');
define('ON_LOGIN_PAGE',1);
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');

@ -35,6 +35,10 @@
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
require(HESK_PATH . 'modsForHesk_settings.inc.php');
// Check to see if we're in maintenance mode before sending anything to the DOM
if ($modsForHesk_settings['maintenance_mode'] && !defined('ON_MAINTENANCE_PAGE') && !defined('ON_LOGIN_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">

@ -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 . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require_once(HESK_PATH . 'inc/header.inc.php');
if (!$modsForHesk_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');
?>

@ -17,4 +17,7 @@ $modsForHesk_settings['questionMarkColor'] = '#000000';
$modsForHesk_settings['rtl'] = 0;
//-- Set this to 1 to show icons next to navigation menu items
$modsForHesk_settings['show_icons'] = 0;
$modsForHesk_settings['show_icons'] = 0;
//-- Set this to 1 to enable maintenance mode
$modsForHesk_settings['maintenance_mode'] = 0;
Loading…
Cancel
Save