piler/webui/controller/health/worker.php

40 lines
874 B
PHP
Raw Permalink Normal View History

2012-02-08 23:14:28 +01:00
<?php
class ControllerHealthWorker extends Controller {
private $error = [];
2012-02-08 23:14:28 +01:00
public function index(){
$this->id = "content";
$this->template = "health/worker.tpl";
$this->layout = "common/layout-empty";
$db_history = Registry::get('db_history');
$this->load->model('health/health');
$this->load->model('stat/counter');
2013-07-24 22:14:05 +02:00
if(ENABLE_SAAS == 1) {
$this->load->model('saas/customer');
}
2012-02-08 23:14:28 +01:00
$request = Registry::get('request');
$lang = Registry::get('language');
$db = Registry::get('db');
$db->select_db($db->database);
if(Registry::get('admin_user') != 1 && Registry::get('readonly_admin') != 1) {
die("go away");
2013-02-16 12:33:25 +01:00
}
2013-04-30 15:59:04 +02:00
$this->model_health_health->collect_data();
$this->data['health'] = $this->model_health_health->data;
2013-08-09 10:13:54 +02:00
2012-02-08 23:14:28 +01:00
$this->render();
}
}