$t_array['order'] = $_SESSION['ticket_view']['order'];
        $order_temp = $t_array['order'];
    } else {
        unset($_SESSION['ticket_view']['order']);
    }
}
/*
	Paging Support
*/
$page_array_temp = paging_start(array('page' => $page, 'limit' => $t_array['limit']));
$t_array['offset'] = $page_array_temp['offset'];
$tickets_array = $tickets->get($t_array);
$page_array = paging_finish(array('events' => count($tickets_array), 'limit' => $t_array['limit'], 'next_page' => $page_array_temp['next_page']));
$next_page = $page_array['next_page'];
$previous_page = $page_array_temp['previous_page'];
$upgrade = new upgrade();
if ($auth->get('user_level') == 2 || $auth->get('user_level') == 6) {
    $users_array = $users->get();
}
if ($auth->get('user_level') == 2 || $auth->get('user_level') == 6) {
    $departments = $ticket_departments->get(array('enabled' => 1));
} else {
    $departments = $ticket_departments->get(array('enabled' => 1, 'get_other_data' => true, 'user_id' => $auth->get('id')));
}
$priorities = $ticket_priorities->get(array('enabled' => 1));
$status = $ticket_status->get(array('enabled' => 1));
$page_url = $config->get('address') . '/tickets/' . '?state_id=' . (int) $state_id_temp . '&priority_id=' . (int) $priority_id_temp . '&like_search=' . safe_output($like_search_temp) . '&department_id=' . safe_output($department_id_temp) . '&user_id=' . safe_output($user_id_temp) . '&assigned_user_id=' . safe_output($assigned_user_id_temp) . '&limit=' . (int) $t_array['limit'];
$page_previous = $page_url . '&order_by=' . safe_output($order_by_temp) . '&order=' . safe_output($order_temp) . '&page=' . (int) $previous_page;
$page_next = $page_url . '&order_by=' . safe_output($order_by_temp) . '&order=' . safe_output($order_temp) . '&page=' . (int) $next_page;
if ($order_temp == 'asc') {
    $order_reverse = 'desc';
<?php

namespace sts;

use sts as core;
if (!defined(__NAMESPACE__ . '\\ROOT')) {
    exit;
}
$site->set_title($language->get('Update Info'));
if ($auth->get('user_level') != 2) {
    header('Location: ' . $config->get('address') . '/');
    exit;
}
$upgrade = new upgrade();
$update_available = false;
if ($upgrade->update_available()) {
    $update_available = true;
    $update_info = $upgrade->get_update_info();
}
include core\ROOT . '/user/themes/' . CURRENT_THEME . '/includes/html_header.php';
?>
	<div id="sidebar">
		<div id="upgrade-details" class="widget">
			<div class="left">
				<h2><?php 
echo safe_output($language->get('Update Information'));
?>
</h2>
			</div>
			<?php 
if ($update_available) {
            }
        }
    }
    $log_array['event_severity'] = 'notice';
    $log_array['event_number'] = E_USER_NOTICE;
    $log_array['event_description'] = 'Settings Edited';
    $log_array['event_file'] = __FILE__;
    $log_array['event_file_line'] = __LINE__;
    $log_array['event_type'] = 'edit';
    $log_array['event_source'] = 'settings';
    $log_array['event_version'] = '1';
    $log_array['log_backtrace'] = false;
    $log->add($log_array);
    $message = $language->get('Settings Saved');
}
$upgrade = new upgrade();
$langs = $language->get_system_languages();
$user_langs = $language->get_user_languages();
$timezones = get_timezones();
$pushover_users = $config->get('pushover_notify_users');
include core\ROOT . '/user/themes/' . CURRENT_THEME . '/includes/html_header.php';
?>
	<form method="post" action="<?php 
echo safe_output($_SERVER['REQUEST_URI']);
?>
">

		<div id="sidebar">
			<div id="login-details" class="widget">
				<div class="left">
					<h2><?php 
<?php

namespace sts;

use sts as core;
if (!defined(__NAMESPACE__ . '\\ROOT')) {
    exit;
}
$site->set_title($language->get('Upgrade'));
if ($auth->get('user_level') != 2) {
    header('Location: ' . $config->get('address') . '/');
    exit;
}
$upgrade = new upgrade();
include core\ROOT . '/user/themes/' . CURRENT_THEME . '/includes/html_header.php';
?>
	<div id="sidebar">
		<div id="upgrade-details" class="widget">
			<h2><?php 
echo safe_output($language->get('Upgrade'));
?>
</h2>
			<p><?php 
echo safe_output($language->get('This page upgrades the database to the latest version.'));
?>
</p>
		</div>
	</div>

	<div id="box">
		<div id="content">		
if (!defined(__NAMESPACE__ . '\\ROOT')) {
    exit;
}
$site->set_title('Support');
if ($auth->get('user_level') != 2) {
    header('Location: ' . $config->get('address') . '/');
    exit;
}
if (isset($_POST['reset_cron'])) {
    $cron_intervals = array(array('name' => 'every_two_minutes', 'description' => 'Every Two Minutes', 'next_run' => '0000-00-00 00:00:00', 'frequency' => '120'), array('name' => 'every_five_minutes', 'description' => 'Every Five Minutes', 'next_run' => '0000-00-00 00:00:00', 'frequency' => '300'), array('name' => 'every_fifteen_minutes', 'description' => 'Every Fifteen Minutes', 'next_run' => '0000-00-00 00:00:00', 'frequency' => '900'), array('name' => 'every_hour', 'description' => 'Every Hour', 'next_run' => '0000-00-00 00:00:00', 'frequency' => '3600'), array('name' => 'every_day', 'description' => 'Every Day', 'next_run' => '0000-00-00 00:00:00', 'frequency' => '86400'), array('name' => 'every_week', 'description' => 'Every Week', 'next_run' => '0000-00-00 00:00:00', 'frequency' => '604800'), array('name' => 'every_month', 'description' => 'Every Month', 'next_run' => '0000-00-00 00:00:00', 'frequency' => '2592000'));
    $config->set('cron_intervals', $cron_intervals);
}
if (isset($_POST['clear_queue'])) {
    $queue->delete();
}
$upgrade = new upgrade();
$version_info = $upgrade->version_info();
$cron_intervals = $config->get('cron_intervals');
$users_count = $users->count();
$tickets_count = $tickets->count();
$pop_message_count = $pop_system->count_message();
$ticket_department_count = $ticket_departments->count();
$queue_count = $queue->count();
include core\ROOT . '/user/themes/' . CURRENT_THEME . '/includes/html_header.php';
?>

<script type="text/javascript">
	$(document).ready(function () {
		$('#clear_queue').click(function () {
			if (confirm("<?php 
echo safe_output($language->get('Are you sure you wish to clear the queue?'));