system = $system;
}
public function show() {
$servers = get_server_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 = print_status_image(STATUS_SERVER_DOWN, '', true);
}
else {
$server_status = 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('.png', '_ball.png', str_replace('images/status_sets',
'../images/status_sets', $server_status));
// $this->system->debug($server["name"]);
$table->data[] = $data;
}
print_table($table);
}
}
?>