本文整理汇总了PHP中Asset_host::get_full_list方法的典型用法代码示例。如果您正苦于以下问题:PHP Asset_host::get_full_list方法的具体用法?PHP Asset_host::get_full_list怎么用?PHP Asset_host::get_full_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Asset_host
的用法示例。
在下文中一共展示了Asset_host::get_full_list方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: session_id
$maxrows = $maxrows > 50 ? 50 : $maxrows;
$torder = $torder == 1 ? 'ASC' : 'DESC';
$to = $maxrows;
$session = session_id();
//Get list params
$filters = array();
$tables = '';
$filters['order_by'] = $order . ' ' . $torder;
$filters['limit'] = $from . ', ' . $to;
$filters['where'] = '';
if (!$all_list) {
$tables = ', user_host_filter hf';
$filters['where'] = "hf.asset_id=host.id AND hf.session_id='{$session}'";
}
try {
list($assets, $total) = Asset_host::get_full_list($conn, $tables, $filters);
} catch (Exception $e) {
$response = array();
$response['sEcho'] = $sec;
$response['iTotalRecords'] = 0;
$response['iTotalDisplayRecords'] = 0;
$response['aaData'] = array();
$response['iDisplayStart'] = 0;
echo json_encode($response);
exit;
}
$detail = '';
$results = array();
foreach ($assets as $_id => $asset_data) {
$d_types = Asset_host_devices::get_devices_to_string($conn, $_id);
if (preg_match('/<br\\/>/', $d_types)) {
示例2: ossim_db
$db = new ossim_db();
$conn = $db->connect();
if (array_key_exists($order, $orders_by_columns)) {
$order = $orders_by_columns[$order];
} else {
$order = 'host.hostname';
}
$tables = '';
// Group filter
$filters = array('limit' => "{$from}, {$maxrows}", 'order_by' => "{$order} {$torder}", 'where' => " id NOT IN (SELECT host_id FROM host_group_reference WHERE host_group_id = UNHEX('" . $group_id . "')) ");
if ($search_str != '') {
$search_str = escape_sql($search_str, $conn);
$tables = ', host_ip hi';
$filters['where'] .= 'AND host.id = hi.host_id AND (host.hostname LIKE "%' . $search_str . '%" OR INET6_NTOA(hi.ip) LIKE "%' . $search_str . '%")';
}
list($asset_list, $total) = Asset_host::get_full_list($conn, $tables, $filters, FALSE);
} catch (Exception $e) {
$db->close();
Util::response_bad_request($e->getMessage());
}
$data = array();
foreach ($asset_list as $_id => $asset_data) {
$d_types = Asset_host_devices::get_devices_to_string($conn, $_id);
if (preg_match('/<br\\/>/', $d_types)) {
$d_types = preg_replace('/<br\\/>.*/', '', $d_types) . '...';
}
// COLUMNS
$_res = array();
$_res['DT_RowId'] = $_id;
$_res[] = '';
//Checkbox