本文整理汇总了PHP中Server::UpdateState方法的典型用法代码示例。如果您正苦于以下问题:PHP Server::UpdateState方法的具体用法?PHP Server::UpdateState怎么用?PHP Server::UpdateState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server
的用法示例。
在下文中一共展示了Server::UpdateState方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Show
public function Show($type = 'side', $update = false)
{
global $bd_names;
$page = self::getPageName($type);
if (!$page) {
return false;
}
$html_serv = $this->ShowPage('serverstate_' . $type . '_header.html');
$result = getDB()->ask("SELECT `id` FROM `{$bd_names['servers']}` WHERE `{$page}`=1 ORDER BY `priority` DESC LIMIT 0,10", false);
while ($line = $result->fetch('num')) {
$found = true;
$server = new Server($line[0], $this->st_subdir);
if ($update) {
$server->UpdateState();
}
$html_serv .= $server->ShowHolder($type);
unset($server);
}
if (!isset($found)) {
$html_serv .= $this->ShowPage('serverstate_' . $type . '_empty.html');
}
$html_serv .= $this->ShowPage('serverstate_' . $type . '_footer.html');
return $html_serv;
}
示例2: elseif
$server->SetVisible('side', $serv_side);
$server->SetVisible('game', $serv_game);
$server->SetVisible('mon', $serv_mon);
} elseif ($id and Filter::input('delete', 'post', 'bool')) {
$server = new Server($id);
if ($server->Delete()) {
$info .= lng('SERVER_DELETED');
} else {
$info .= lng('SERVER_NOT_EXIST');
}
$id = false;
}
/* Output */
if ($id) {
$server = new Server($id, $st_subdir . 'server/');
$server->UpdateState(true);
$server_info = $server->ShowHolder('mon', 'adm');
if (!$server->Exist()) {
$info .= lng('SERVER_NOT_EXIST');
break;
}
$serv_sysinfo = $server->getInfo();
$serv_name = TextBase::HTMLDestruct($serv_sysinfo['name']);
$serv_method = $serv_sysinfo['method'];
$serv_ref = $serv_sysinfo['refresh'];
$serv_address = $serv_sysinfo['address'];
$serv_port = $serv_sysinfo['port'];
$serv_s_user = $serv_sysinfo['s_user'] ? $serv_sysinfo['s_user'] : '';
$serv_info = TextBase::HTMLDestruct($serv_sysinfo['info']);
$serv_priority = $server->GetPriority();
$serv_side = $server->GetVisible('side');
示例3: Server
<?php
require '../system.php';
loadTool('ajax.php');
loadTool('monitoring.class.php');
$id = Filter::input('id', 'post', 'int', true) or exit;
DBinit('monitoring');
$server = new Server($id, 'serverstate/');
$server->UpdateState();
$server->ShowInfo();