本文整理汇总了PHP中Server::get_list方法的典型用法代码示例。如果您正苦于以下问题:PHP Server::get_list方法的具体用法?PHP Server::get_list怎么用?PHP Server::get_list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server
的用法示例。
在下文中一共展示了Server::get_list方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ossim_db
$db_aux = new ossim_db();
$conn_aux = $db_aux->connect();
// Solera API
$_SESSION["_solera"] = $conf->get_conf("solera_enable", FALSE) ? true : false;
// Timezone correction
$tz = Util::get_timezone();
$timetz = gmdate("U") + 3600 * $tz;
// time to generate dates with timezone correction
$param_query = GET("query") ? GET("query") : "";
$current_search = urldecode(GET("current_search"));
$param_start = GET("start") ? GET("start") : gmdate("Y-m-d H:i:s", $timetz - 24 * 60 * 60);
$param_end = GET("end") ? GET("end") : gmdate("Y-m-d H:i:s", $timetz);
// Default GRAPH RANGE [day|last_month]";
$_SESSION['graph_type'] = "day";
$_SESSION['cat'] = gmdate("M j, Y");
$database_servers = Server::get_list($conn_aux, ",server_role WHERE server.name=server_role.name AND server_role.sem=1");
list($logger_servers, $ip_to_name, $ip_list, $fcolors, $bcolors, $from_remote, $logger_colors) = get_logger_servers($conn_aux);
ossim_valid($param_query, OSS_TEXT, OSS_NULLABLE, OSS_BRACKET, 'illegal:' . _("query"));
ossim_valid($current_search, OSS_TEXT, OSS_NULLABLE, OSS_BRACKET, OSS_PUNC, '%', 'illegal:' . _("current_search"));
ossim_valid($param_start, OSS_DIGIT, OSS_COLON, OSS_SCORE, OSS_SPACE, OSS_NULLABLE, 'illegal:' . _("start date"));
ossim_valid($param_end, OSS_DIGIT, OSS_COLON, OSS_SCORE, OSS_SPACE, OSS_NULLABLE, 'illegal:' . _("end date"));
ossim_valid($num_servers, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("num_servers"));
ossim_valid(GET('del_export'), OSS_DIGIT, OSS_ALPHA, OSS_NULLABLE, '=', 'illegal:' . _("del_export"));
if (ossim_error()) {
die(ossim_error());
}
$config = parse_ini_file("everything.ini");
if ($config["debug"] == 1) {
if ($config["debug_log"] == "") {
$config["debug_log"] = "/var/log/ossim/sem.log";
}
示例2: array
//here are stored the connected servers
$server_stack = array();
//here will be stored the servers wich are in DDBB
$server_configured_stack = array();
if ($server_list) {
foreach ($server_list as $server_status) {
if (in_array($server_status["servername"], $server_stack)) {
continue;
}
array_push($server_stack, $server_status["servername"]);
}
}
$active_servers = 0;
$total_servers = 0;
$xml = "";
$server_list = Server::get_list($conn, "ORDER BY {$order} {$limit}");
if ($server_list[0]) {
$total = $server_list[0]->get_foundrows();
if ($total == 0) {
$total = count($server_list);
}
} else {
$total = 0;
}
$xml .= "<rows>\n";
$xml .= "<page>{$page}</page>\n";
$xml .= "<total>{$total}</total>\n";
foreach ($server_list as $server) {
$total_servers++;
$name = $server->get_name();
$ip = $server->get_ip();
示例3: _
$title = Util::htmlentities($s_name);
$tooltip = $s_title;
$li = "key:'{$sensor_key}', url:'', icon:'../../pixmaps/theme/server.png', title:'{$title}', tooltip:'{$tooltip}'\n";
$buffer .= ($j > $from ? "," : "") . "{ {$li} }\n";
}
$j++;
}
if ($j > $to) {
$li = "key:'{$key}', page:'{$nextpage}', isFolder:true, isLazy:true, icon:'../../pixmaps/theme/net_group.png', title:'" . _("next") . " {$maxresults} " . _("sensors") . "'";
$buffer .= ",{ {$li} }\n";
}
$buffer .= "]";
}
} else {
if ($key == "server") {
if ($server_list = Server::get_list($conn, "ORDER BY name")) {
$j = 0;
$buffer .= "[";
foreach ($server_list as $server) {
if ($j >= $from && $j < $to) {
$server_name = $server->get_name();
$server_key = utf8_encode("server;" . $server_name);
$s_title = Util::htmlentities($server_name);
$s_name = strlen($server_name) > $length_name ? substr($server_name, 0, $length_name) . "..." : $server_name;
$title = Util::htmlentities($s_name);
$tooltip = $s_title;
$li = "key:'{$server_key}', url:'', icon:'../../pixmaps/theme/server.png', title:'{$title}', tooltip:'{$tooltip}'\n";
$buffer .= ($j > $from ? "," : "") . "{ {$li} }\n";
}
$j++;
}
示例4: _
$li = "title:'{$title}', tooltip:'{$tooltip}', key:'{$u_key}', icon:'{$v}', isLazy:true, noLink:true";
$buffer .= ($j > 0 ? "," : "") . "{ {$li} }";
$j++;
}
$buffer .= "]";
if ($buffer == "[]") {
$buffer = "[{title:'" . _("No Users found") . "', noLink:true}]";
}
echo $buffer;
} else {
if (preg_match("/servers/", $key)) {
$buffer = "[";
if (Session::am_i_admin()) {
require_once 'classes/Server.inc';
$j = 0;
$servers = Server::get_list($conn);
foreach ($servers as $server) {
$icon = "../../pixmaps/theme/host.png";
$server_name = $server->get_name();
$serv_title = Util::htmlentities($server_name);
$server_url = urlencode($server_name);
$title = strlen($server_name) > $length_name ? substr($server_name, 0, $length_name) . "..." : $server_name;
$title = Util::htmlentities($title);
$tooltip = $serv_title;
$li = "title:'{$title}', tooltip:'{$tooltip}', icon:'{$icon}', h:'{$h}', url:'../server/newserverform.php?name=" . $server_url . "'";
$buffer .= ($j > 0 ? "," : "") . "{ {$li} }";
$j++;
}
} else {
$buffer .= "{title:'" . _("No Servers Found") . "', noLink:true}";
}
示例5: array
$server_list_aux = $server_list;
//here are stored the connected servers
$server_stack = array();
//here will be stored the servers wich are in DDBB
$server_configured_stack = array();
if ($server_list) {
foreach ($server_list as $server_status) {
if (in_array($server_status["servername"], $server_stack)) {
continue;
}
array_push($server_stack, $server_status["servername"]);
}
}
$active_servers = 0;
$total_servers = 0;
if ($server_list = Server::get_list($conn, "")) {
$total_servers = count($server_list);
foreach ($server_list as $server) {
if (in_array($server->get_name(), $server_stack)) {
$active_servers++;
}
}
}
$active_servers = $active_servers == 0 ? "<font color=red><b>{$active_servers}</b></font>" : "<font color=green><b>{$active_servers}</b></font>";
$total_servers = "<b>{$total_servers}</b>";
$db->close($conn);
?>
<table class="noborder">
<tr><td valign="top">
<table id="flextable" style="display:none"></table>
示例6: unset
$cross_correlate = $_SESSION['_server']['cross_correlate'];
$store = $_SESSION['_server']['store'];
$qualify = $_SESSION['_server']['qualify'];
$resend_events = $_SESSION['_server']['resend_events'];
$resend_alarms = $_SESSION['_server']['resend_alarms'];
$multi = $_SESSION['_server']['multi'];
$sign = $_SESSION['_server']['sign'];
$sem = $_SESSION['_server']['sem'];
$sim = $_SESSION['_server']['sim'];
unset($_SESSION['_server']);
if (!empty($_GET['name'])) {
$action = 'modifyserver.php';
}
} else {
if (!empty($sname)) {
$server_list = Server::get_list($conn, "WHERE name = '{$sname}'");
$role_list = Role::get_list($conn, $sname);
if (!empty($server_list) && !empty($role_list)) {
$server = $server_list[0];
$role = $role_list[0];
$sname = $server->get_name();
$ip = $server->get_ip();
$port = $server->get_port();
$descr = $server->get_descr();
$correlate = $role->get_correlate();
$cross_correlate = $role->get_cross_correlate();
$store = $role->get_store();
$qualify = $role->get_qualify();
$resend_events = $role->get_resend_event();
$resend_alarms = $role->get_resend_alarm();
$sign = $role->get_sign();
示例7: get_targets
function get_targets($conn, $data)
{
$id = $data['id'];
ossim_valid($id, OSS_HEX, OSS_NULLABLE, 'illegal:' . _("CTX"));
if (ossim_error()) {
$info_error = "Error: " . ossim_get_error();
ossim_clean_error();
$return['error'] = TRUE;
$return['msg'] = $info_error;
return $return;
}
$result = "";
$servers = array();
$targets = array();
//Getting all the serves:
$server_list = Server::get_list($conn);
foreach ($server_list as $server) {
$servers[$server->get_id()] = $server->get_name();
}
if ($policies = Policy::get_list($conn, "AND id=UNHEX('{$id}')")) {
$policy = $policies[0];
if ($target_list = $policy->get_targets($conn)) {
foreach ($target_list as $target) {
$targets[$target->get_target_id()] = $servers[$target->get_target_id()] == "" ? _("ANY") : $servers[$target->get_target_id()];
}
}
}
$i = 1;
if ($server_list = Server::get_list($conn, "ORDER BY name")) {
foreach ($server_list as $server) {
$server_name = $server->get_name();
$server_id = $server->get_id();
$server_ip = $server->get_ip();
if ($i == 1) {
$result .= "<input type='hidden' name='targetserver' value='" . count($server_list) . "'/>";
}
$name = "targboxserver" . $i;
$result .= "<input type='checkbox' onclick='drawpolicy()' id='target_{$server_ip} ({$server_name})' name='{$name}' value='{$server_id}'" . ($targets[$server_id] != '' ? "checked='checked'" : "") . "/>{$server_ip}({$server_name})<br/>";
$i++;
}
}
/* == ANY target == */
$return['error'] = FALSE;
$return['data'] = $result;
return $return;
}
示例8: ob_implicit_flush
/**
* Class and Function List:
* Function list:
* Classes list:
*/
ob_implicit_flush();
require_once 'classes/Session.inc';
require_once 'classes/Server.inc';
require_once 'classes/Plugin.inc';
require_once 'ossim_db.inc';
include "lib/xmlrpc.inc";
Session::useractive("../session/login.php");
//
$db = new ossim_db();
$conn = $db->connect();
$servers = Server::get_list($conn, "");
list($categories, $subcategories) = Plugin::get_categories($conn);
$csclist = array("0:0" => "ANY");
foreach ($categories as $id => $name) {
$csclist["{$id}:0"] = $name;
foreach ($subcategories[$id] as $sid => $sname) {
$csclist["{$id}:{$sid}"] = "{$name} - {$sname}";
}
}
$db->close($conn);
//
if (GET("refresh") == 1) {
$client = new xmlrpc_client("http://127.0.0.1:8000");
$msg = new xmlrpcmsg('status', array());
$status = $client->send($msg);
echo '<a href="javascript:refresh()"><img src="../pixmaps/refresh.png" border="0"></a><br>';
示例9: array
//here are stored the connected servers
$server_stack = array();
//here will be stored the servers wich are in DDBB
$server_configured_stack = array();
if ($server_list) {
foreach ($server_list as $server_status) {
if (in_array($server_status["servername"], $server_stack)) {
continue;
}
array_push($server_stack, $server_status["servername"]);
}
}
$active_servers = 0;
$total_servers = 0;
$xml = "";
$server_list = Server::get_list($conn, "ORDER BY name ASC");
if ($server_list[0]) {
$total = $server_list[0]->get_foundrows();
if ($total == 0) {
$total = count($server_list);
}
} else {
$total = 0;
}
echo "[";
$flag = 0;
foreach ($server_list as $server) {
$total_servers++;
$name = $server->get_name();
$ip = $server->get_ip();
if ($flag) {