system = $system;
}
public function show() {
$servers = servers_get_info ();
if ($servers === false) $servers = array();
$table = null;
$table->width = '100%';
$table->align = array();
$table->align[1] = 'center';
$table->align[4] = 'center';
$table->head = array();
$table->head[0] = __('Server');
$table->head[1] = '' . __('T') . '';
$table->head[2] = '' . __('S') . '';
$table->head[3] = '' . __('U') . '';
$table->head[4] = '' . __('S') . '';
$table->data = array(); //$this->system->debug($servers);
foreach ($servers as $server) {
$data = array();
if ($server['status'] == 0) {
$server_status = ui_print_status_image(STATUS_SERVER_DOWN, '', true);
}
else {
$server_status = ui_print_status_image(STATUS_SERVER_OK, '', true);
}
$data[] = strip_tags($server["name"]);
$data[] = str_replace('images/', '/images/', $server['img']);
$data[] = human_time_comparation ($server["laststart"], 'tiny');
$data[] = human_time_comparation ($server["keepalive"], 'tiny');
$data[] = str_replace(array('images/status_sets', 'system->debug($server["name"]);
$table->data[] = $data;
}
html_print_table($table);
}
}
?>