當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Server::UpdateState方法代碼示例

本文整理匯總了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;
 }
開發者ID:qexyorg,項目名稱:webMCR-1,代碼行數:24,代碼來源:monitoring.class.php

示例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');
開發者ID:qexyorg,項目名稱:webMCR-1,代碼行數:31,代碼來源:admin.php

示例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();
開發者ID:qexyorg,項目名稱:webMCR-1,代碼行數:10,代碼來源:state.php


注:本文中的Server::UpdateState方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。