mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-09 03:22:00 +01:00
4a7ec5d41d
Signed-off-by: Janos SUTO <sj@acts.hu>
47 lines
1.0 KiB
PHP
47 lines
1.0 KiB
PHP
<?php
|
|
|
|
|
|
class ControllerHealthHealth extends Controller {
|
|
|
|
public function index(){
|
|
|
|
$this->id = "content";
|
|
$this->template = "health/health.tpl";
|
|
if(EXTERNAL_DASHBOARD_URL) {
|
|
$this->layout = "common/layout-empty";
|
|
}
|
|
else {
|
|
$this->layout = "common/layout";
|
|
}
|
|
|
|
$this->load->model('health/health');
|
|
|
|
$request = Registry::get('request');
|
|
$language = Registry::get('language');
|
|
|
|
$this->document->title = $language->get('text_health_monitor');
|
|
|
|
|
|
/* check if we are admin */
|
|
|
|
if(Registry::get('admin_user') != 1 && Registry::get('readonly_admin') != 1) {
|
|
$this->template = "common/error.tpl";
|
|
$this->data['errorstring'] = $this->data['text_you_are_not_admin'];
|
|
}
|
|
else {
|
|
if(isset($_GET['toggle_enable_purge'])) {
|
|
$this->model_health_health->toggle_option('enable_purge');
|
|
header("Location: " . HEALTH_URL);
|
|
exit;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
$this->render();
|
|
}
|
|
|
|
}
|
|
|
|
?>
|