当前位置: 首页>>代码示例>>PHP>>正文


PHP Asset_host::get_full_list方法代码示例

本文整理汇总了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)) {
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:load_assets_result.php

示例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
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:dt_asset_group.php


注:本文中的Asset_host::get_full_list方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。