本文整理匯總了PHP中print_search函數的典型用法代碼示例。如果您正苦於以下問題:PHP print_search函數的具體用法?PHP print_search怎麽用?PHP print_search使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了print_search函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
foreach (dbFetchRows('SELECT E.`device_id` AS `device_id`, `hostname`, `entPhysicalModelName`
FROM `entPhysical` AS E
INNER JOIN `devices` AS D ON D.`device_id` = E.`device_id`' . $where . 'GROUP BY `device_id`, `entPhysicalModelName`;') as $data) {
$device_id = $data['device_id'];
$devices_array[$device_id] = $data['hostname'];
if ($data['entPhysicalModelName'] != '') {
$parts[$data['entPhysicalModelName']] = $data['entPhysicalModelName'];
}
}
//Device field
natcasesort($devices_array);
$search[] = array('type' => 'multiselect', 'width' => '160px', 'name' => 'Devices', 'id' => 'device_id', 'value' => $vars['device_id'], 'values' => $devices_array);
//Parts field
ksort($parts);
$search[] = array('type' => 'multiselect', 'width' => '160px', 'name' => 'Parts', 'id' => 'parts', 'value' => $vars['parts'], 'values' => $parts);
//Serial field
$search[] = array('type' => 'text', 'width' => '160px', 'name' => 'Serial', 'id' => 'serial', 'value' => $vars['serial']);
//Description field
$search[] = array('type' => 'text', 'width' => '160px', 'name' => 'Desc', 'id' => 'description', 'value' => $vars['description']);
print_search($search, 'Inventory', 'search', 'inventory/');
// Pagination
$vars['pagination'] = TRUE;
print_inventory($vars);
$pagetitle[] = 'Inventory';
?>
</div> <!-- col-md-12 -->
</div> <!-- row -->
<?php
// EOF
示例2:
header.hidden=true;
query_status=document.getElementsByClassName("query_status")[0];
query_status.hidden=true;
SponsID=document.getElementsByClassName("SponsID")[0];
SponsID.hidden=false;
window.print();
document.getElementById("printButton").style.visibility="visible";
sort.hidden=false;
search.hidden=false;
header.hidden=false;
query_status.hidden=false;
SponsID.hidden=true;
}
</script>';
echo '<button name="print" type="button" value="Print" id="printButton" onClick="printpage()">Print</button>';
print_sort($result);
print_search($result);
print_table($result);
$_SESSION['main_query'] = $main_query;
$_SESSION['table_message'] = $table_message;
?>
</div>
</body>
</html>
示例3: array
} else {
$navbar['options_right']['searchbar'] = array('text' => 'Hide Search', 'url' => generate_url($vars, array('searchbar' => 'hide')));
}
if ($vars['bare'] == "yes") {
$navbar['options_right']['header'] = array('text' => 'Show Header', 'url' => generate_url($vars, array('bare' => NULL)));
} else {
$navbar['options_right']['header'] = array('text' => 'Hide Header', 'url' => generate_url($vars, array('bare' => 'yes')));
}
$navbar['options_right']['reset'] = array('text' => 'Reset', 'url' => generate_url(array('page' => 'devices', 'section' => $vars['section'], 'bare' => $vars['bare'])));
print_navbar($navbar);
unset($navbar);
// Print period options for graphs
if ($vars['format'] == 'graphs') {
$search = array();
$search[] = array('type' => 'datetime', 'id' => 'timestamp', 'presets' => TRUE, 'min' => '2007-04-03 16:06:59', 'max' => date('Y-m-d 23:59:59'), 'from' => date('Y-m-d H:i:s', $vars['from']), 'to' => date('Y-m-d H:i:s', $vars['to']));
print_search($search, NULL, 'update');
//Do not use url here, because it discards all other vars from url
unset($search);
}
switch ($vars['sort']) {
case 'uptime':
case 'location':
case 'os':
$order = ' ORDER BY `' . $vars['sort'] . '`';
default:
$order = ' ORDER BY `hostname`';
break;
}
$query = "SELECT * FROM `devices` " . $where . $query_permitted . $order;
list($format, $subformat) = explode("_", $vars['format'], 2);
$devices = dbFetchRows($query);
示例4: unset
<div class="col-md-12">
<?php
unset($search, $vlans, $vlan_names);
// Select vlans only with FDB tables
foreach (dbFetchRows('SELECT `vlan_vlan`, `vlan_name`
FROM `vlans_fdb` AS F
LEFT JOIN `vlans` as V ON V.`vlan_vlan` = F.`vlan_id` AND V.`device_id` = F.`device_id`
WHERE F.`device_id` = ?
GROUP BY `vlan_vlan`', array($device['device_id'])) as $data) {
$vlans[$data['vlan_vlan']] = 'Vlan' . $data['vlan_vlan'];
$vlan_names[$data['vlan_name']] = $data['vlan_name'];
}
//Vlans field
ksort($vlans);
$search[] = array('type' => 'multiselect', 'name' => 'VLANs', 'id' => 'vlan_id', 'value' => $vars['vlan_id'], 'values' => $vlans);
//Vlan names field
natcasesort($vlan_names);
$search[] = array('type' => 'multiselect', 'width' => '160px', 'name' => 'VLAN names', 'id' => 'vlan_name', 'value' => $vars['vlan_name'], 'values' => $vlan_names);
//MAC address field
$search[] = array('type' => 'text', 'name' => 'MAC Address', 'id' => 'address', 'value' => $vars['address']);
print_search($search);
// Pagination
$vars['pagination'] = TRUE;
print_fdbtable($vars);
?>
</div> <!-- col-md-12 -->
</div> <!-- row -->
<?php
// EOF
示例5: unset
* @copyright (C) 2006-2014 Adam Armstrong
*
*/
?>
<div class="row">
<div class="col-md-12">
<?php
unset($search, $devices);
//Search by field
$search[] = array('type' => 'select', 'name' => '搜索條件', 'id' => 'searchby', 'width' => '120px', 'value' => $vars['searchby'], 'values' => array('mac' => 'MAC地址', 'ip' => 'IP地址'));
//IP version field
$search[] = array('type' => 'select', 'name' => 'IP', 'id' => 'ip_version', 'width' => '120px', 'value' => $vars['ip_version'], 'values' => array('' => 'IPv4 & IPv6', '4' => '僅IPv4', '6' => '僅IPv6'));
//Address field
$search[] = array('type' => 'text', 'name' => '地址', 'id' => 'address', 'value' => $vars['address']);
print_search($search, 'ARP/NDP 搜索');
// Pagination
$vars['pagination'] = TRUE;
if (!$vars['pagesize']) {
$vars['pagesize'] = 100;
}
if (!$vars['pageno']) {
$vars['pageno'] = 1;
}
print_arptable($vars);
?>
</div> <!-- col-md-12 -->
</div> <!-- row -->
<?php
示例6: generate_query_permitted
$where .= generate_query_permitted(array('port'), array('port_table' => 'M'));
$devices_array = array();
//$devices_array[''] = 'All Devices';
// Select the devices only with ARP/NDP tables
foreach (dbFetchRows('SELECT `device_id` FROM `ip_mac` AS M
LEFT JOIN `ports` AS I ON I.`port_id` = M.`port_id`' . $where . 'GROUP BY `device_id`;') as $data) {
$device_id = $data['device_id'];
if ($cache['devices']['id'][$device_id]['hostname']) {
$devices_array[$device_id] = $cache['devices']['id'][$device_id]['hostname'];
}
}
natcasesort($devices_array);
$search = array();
//Device field
$search[] = array('type' => 'multiselect', 'name' => '設備', 'id' => 'device_id', 'width' => '130px', 'value' => $vars['device_id'], 'values' => $devices_array);
//Search by field
$search[] = array('type' => 'select', 'name' => '搜索', 'id' => 'searchby', 'width' => '120px', 'value' => $vars['searchby'], 'values' => array('mac' => 'MAC地址', 'ip' => 'IP地址'));
//IP version field
$search[] = array('type' => 'select', 'name' => 'IP', 'id' => 'ip_version', 'width' => '120px', 'value' => $vars['ip_version'], 'values' => array('' => 'IPv4 & IPv6', '4' => '僅IPv4', '6' => '僅IPv6'));
//Address field
$search[] = array('type' => 'text', 'name' => '地址', 'id' => 'address', 'width' => '120px', 'value' => $vars['address']);
print_search($search, 'ARP/NDP', NULL, 'search/search=arp/');
// Pagination
$vars['pagination'] = TRUE;
print_arptable($vars);
$page_title[] = 'ARP/NDP搜素';
?>
</div> <!-- col-md-12 -->
</div> <!-- row -->
示例7: unset
<div class="col-md-12">
<?php
unset($search, $vlans, $vlan_names);
// Select vlans only with FDB tables
foreach (dbFetchRows('SELECT `vlan_vlan`, `vlan_name`
FROM `vlans_fdb` AS F
LEFT JOIN `vlans` as V ON V.`vlan_vlan` = F.`vlan_id` AND V.`device_id` = F.`device_id`
WHERE F.`device_id` = ? AND F.`port_id` = ?
GROUP BY `vlan_vlan`', array($port['device_id'], $port['port_id'])) as $data) {
$vlans[$data['vlan_vlan']] = 'Vlan' . $data['vlan_vlan'];
$vlan_names[$data['vlan_name']] = $data['vlan_name'];
}
//Vlans field
ksort($vlans);
$search[] = array('type' => 'multiselect', 'name' => 'VLANs', 'id' => 'vlan_id', 'value' => $vars['vlan_id'], 'values' => $vlans);
//Vlan names field
natcasesort($vlan_names);
$search[] = array('type' => 'multiselect', 'width' => '160px', 'name' => 'VLAN名稱', 'id' => 'vlan_name', 'value' => $vars['vlan_name'], 'values' => $vlan_names);
//MAC address field
$search[] = array('type' => 'text', 'name' => 'MAC地址', 'id' => 'address', 'value' => $vars['address']);
print_search($search, NULL, 'search', 'device/device=' . $port['device_id'] . '/tab=port/port=' . $port['port_id'] . '/view=fdb/');
// Pagination
$vars['pagination'] = TRUE;
print_fdbtable($vars);
?>
</div> <!-- col-md-12 -->
</div> <!-- row -->
<?php
// EOF
示例8: unset
?>
<div class="row">
<div class="col-md-12">
<?php
unset($search, $devices_array);
//$devices_array[''] = 'All Devices';
foreach ($cache['devices']['hostname'] as $hostname => $device_id) {
if ($cache['devices']['id'][$device_id]['disabled'] && !$config['web_show_disabled']) {
continue;
}
$devices_array[$device_id] = $hostname;
}
//Device field
$search[] = array('type' => 'multiselect', 'name' => 'Devices', 'id' => 'device_id', 'width' => '160px', 'value' => $vars['device_id'], 'values' => $devices_array);
//Interface field
$search[] = array('type' => 'select', 'name' => 'Interface', 'id' => 'interface', 'width' => '160px', 'value' => $vars['interface'], 'values' => array('' => 'All Interfaces', 'Loopback%' => 'Loopbacks', 'Vlan%' => 'Vlans'));
//MAC address field
$search[] = array('type' => 'text', 'name' => 'MAC Address', 'id' => 'address', 'width' => '160px', 'value' => $vars['address']);
print_search($search, 'MAC Addresses', NULL, 'search/search=mac/');
// Pagination
$vars['pagination'] = TRUE;
// Print MAC addresses
print_mac_addresses($vars);
$pagetitle[] = 'MAC addresses';
?>
</div> <!-- col-md-12 -->
</div> <!-- row -->
示例9: foreach
foreach ($cache['devices']['hostname'] as $hostname => $device_id) {
if ($cache['devices']['id'][$device_id]['disabled'] && !$config['web_show_disabled']) {
continue;
}
$devices_array[$device_id] = $hostname;
}
//Device field
$search[] = array('type' => 'multiselect', 'name' => 'Device', 'id' => 'device_id', 'value' => $vars['device_id'], 'values' => $devices_array);
//Interface field
$search[] = array('type' => 'select', 'name' => 'Interface', 'id' => 'interface', 'width' => '130px', 'value' => $vars['interface'], 'values' => array('' => 'All Interfaces', 'Lo' => 'Loopbacks', 'Vlan' => 'Vlans'));
////IP version field
//$search[] = array('type' => 'select',
// 'name' => 'IP',
// 'id' => 'ip_version',
// 'width' => '120px',
// 'value' => $vars['ip_version'],
// 'values' => array('' => 'IPv4 & IPv6', '4' => 'IPv4 only', '6' => 'IPv6 only'));
//IP address field
$search[] = array('type' => 'text', 'name' => 'IP Address', 'id' => 'address', 'value' => $vars['address']);
print_search($search, 'IPv6', NULL, 'search/search=ipv6/');
// Pagination
$vars['pagination'] = TRUE;
// Print addresses
print_addresses($vars);
$pagetitle[] = "IPv6 address search";
?>
</div> <!-- col-md-12 -->
</div> <!-- row -->
示例10: unset
?>
<div class="row">
<div class="col-md-12">
<?php
unset($search, $devices_array);
//$devices_array[''] = 'All Devices';
// Select the devices only in the wifi_sessions table
foreach (dbFetchRows('SELECT `device_id` FROM `wifi_sessions` GROUP BY `device_id`;') as $data) {
$device_id = $data['device_id'];
if ($cache['devices']['id'][$device_id]['hostname']) {
$devices_array[$device_id] = $cache['devices']['id'][$device_id]['hostname'];
}
}
natcasesort($devices_array);
//Device field
$search[] = array('type' => 'multiselect', 'name' => 'Device', 'id' => 'device_id', 'width' => '130px', 'value' => $vars['device_id'], 'values' => $devices_array);
//Search by field
$search[] = array('type' => 'select', 'name' => 'Search By', 'id' => 'searchby', 'width' => '120px', 'value' => $vars['searchby'], 'values' => array('mac' => 'MAC Address', 'ip' => 'IP Address', 'username' => 'Username'));
//Address field
$search[] = array('type' => 'text', 'name' => 'Address', 'id' => 'address', 'width' => '120px', 'value' => $vars['address']);
print_search($search, '802.1x', NULL, 'search/search=dot1x/');
// Pagination
$vars['pagination'] = TRUE;
print_dot1xtable($vars);
$pagetitle[] = '.1x Session Search';
?>
</div> <!-- col-md-12 -->
</div> <!-- row -->
示例11: natcasesort
LEFT JOIN `vlans` as V ON V.`vlan_vlan` = F.`vlan_id` AND V.`device_id` = F.`device_id`' . $where . 'GROUP BY `device_id`, `vlan_vlan`;') as $data) {
$device_id = $data['device_id'];
if ($cache['devices']['id'][$device_id]['hostname']) {
$devices_array[$device_id] = $cache['devices']['id'][$device_id]['hostname'];
if (is_numeric($data['vlan_vlan'])) {
$vlans[$data['vlan_vlan']] = 'Vlan' . $data['vlan_vlan'];
$vlan_names[$data['vlan_name']] = $data['vlan_name'];
}
}
}
//Device field
natcasesort($devices_array);
$search[] = array('type' => 'multiselect', 'width' => '160px', 'name' => '設備', 'id' => 'device_id', 'value' => $vars['device_id'], 'values' => $devices_array);
//Vlans field
ksort($vlans);
$search[] = array('type' => 'multiselect', 'name' => 'VLANs', 'id' => 'vlan_id', 'value' => $vars['vlan_id'], 'values' => $vlans);
//Vlan names field
natcasesort($vlan_names);
$search[] = array('type' => 'multiselect', 'width' => '160px', 'name' => 'VLAN名稱', 'id' => 'vlan_name', 'value' => $vars['vlan_name'], 'values' => $vlan_names);
//MAC address field
$search[] = array('type' => 'text', 'name' => 'MAC地址', 'id' => 'address', 'value' => $vars['address']);
print_search($search, "FDB表", NULL, 'search/search=fdb/');
// Pagination
$vars['pagination'] = TRUE;
print_fdbtable($vars);
$page_title[] = "FDB搜索";
?>
</div> <!-- col-md-12 -->
</div> <!-- row -->
示例12: unset
<?php
/**
* Observium Network Management and Monitoring System
* Copyright (C) 2006-2014, Adam Armstrong - http://www.observium.org
*
* @package observium
* @subpackage webui
* @author Adam Armstrong <adama@memetic.org>
* @copyright (C) 2006-2014 Adam Armstrong
*
*/
unset($search, $types);
//Message field
$search[] = array('type' => 'text', 'name' => 'Message', 'id' => 'message', 'value' => $vars['message']);
//Type field
//$types[''] = 'All Types';
$types['system'] = 'System';
foreach (dbFetchRows('SELECT `type` FROM `eventlog` WHERE `device_id` = ? GROUP BY `type` ORDER BY `type`', array($vars['device'])) as $data) {
$type = $data['type'];
$types[$type] = ucfirst($type);
}
$search[] = array('type' => 'multiselect', 'name' => 'Types', 'id' => 'type', 'value' => $vars['type'], 'values' => $types);
$search[] = array('type' => 'newline', 'hr' => TRUE);
$search[] = array('type' => 'datetime', 'id' => 'timestamp', 'presets' => TRUE, 'min' => dbFetchCell('SELECT MIN(`timestamp`) FROM `eventlog` WHERE `device_id` = ?', array($vars['device'])), 'max' => dbFetchCell('SELECT MAX(`timestamp`) FROM `eventlog` WHERE `device_id` = ?', array($vars['device'])), 'from' => $vars['timestamp_from'], 'to' => $vars['timestamp_to']);
print_search($search, 'Eventlog');
/// Pagination
$vars['pagination'] = TRUE;
print_events($vars);
$pagetitle[] = "Events";
// EOF
示例13: natcasesort
}
natcasesort($port_ids);
// Ports names field
$search[] = array('type' => 'multiselect', 'width' => '160px', 'name' => 'Ports', 'id' => 'port', 'value' => $vars['port'], 'values' => $port_ids);
// Select vlans only with FDB tables
foreach (dbFetchRows('SELECT `vlan_vlan`, `vlan_name`
FROM `vlans_fdb` AS F
LEFT JOIN `vlans` as V ON V.`vlan_vlan` = F.`vlan_id` AND V.`device_id` = F.`device_id`
WHERE F.`device_id` = ?
GROUP BY `vlan_vlan`', array($device['device_id'])) as $data) {
$vlans[$data['vlan_vlan']] = 'Vlan' . $data['vlan_vlan'];
$vlan_names[$data['vlan_name']] = $data['vlan_name'];
}
//Vlans field
ksort($vlans);
$search[] = array('type' => 'multiselect', 'name' => 'VLANs', 'id' => 'vlan_id', 'value' => $vars['vlan_id'], 'values' => $vlans);
//Vlan names field
natcasesort($vlan_names);
$search[] = array('type' => 'multiselect', 'width' => '160px', 'name' => 'VLAN名稱', 'id' => 'vlan_name', 'value' => $vars['vlan_name'], 'values' => $vlan_names);
//MAC address field
$search[] = array('type' => 'text', 'name' => 'MAC地址', 'id' => 'address', 'value' => $vars['address']);
print_search($search, NULL, 'search', 'device/device=' . $device['device_id'] . '/tab=ports/view=fdb/');
// Pagination
$vars['pagination'] = TRUE;
print_fdbtable($vars);
?>
</div> <!-- col-md-12 -->
</div> <!-- row -->
<?php
// EOF
示例14: unset
* @package observium
* @subpackage webui
* @author Adam Armstrong <adama@memetic.org>
* @copyright (C) 2006-2014 Adam Armstrong
*
*/
unset($search, $types);
//Message field
$search[] = array('type' => 'text', 'name' => '信息', 'id' => 'message', 'value' => $vars['message']);
//Type field
//$types[''] = '所有類型';
$types['system'] = '係統';
foreach (dbFetchRows('SELECT `type` FROM `eventlog` WHERE `device_id` = ? GROUP BY `type` ORDER BY `type`', array($vars['device'])) as $data) {
$type = $data['type'];
$types[$type] = ucfirst($type);
}
$search[] = array('type' => 'multiselect', 'name' => '類型', 'id' => 'type', 'value' => $vars['type'], 'values' => $types);
$search[] = array('type' => 'newline');
$search[] = array('type' => 'datetime', 'id' => 'timestamp', 'presets' => TRUE, 'min' => dbFetchCell('SELECT MIN(`timestamp`) FROM `eventlog` WHERE `device_id` = ?', array($vars['device'])), 'max' => dbFetchCell('SELECT MAX(`timestamp`) FROM `eventlog` WHERE `device_id` = ?', array($vars['device'])), 'from' => $vars['timestamp_from'], 'to' => $vars['timestamp_to']);
print_search($search, '事件日誌');
/// Pagination
$vars['pagination'] = TRUE;
if (!$vars['pagesize']) {
$vars['pagesize'] = "100";
}
if (!$vars['pageno']) {
$vars['pageno'] = "1";
}
print_events($vars);
$pagetitle[] = "日誌";
// EOF
示例15: print_info
', 'toc', $(this));"></a></span>
<div class="bookmark_detail" id="toc_detail_<?php
echo $index;
?>
">
<div class="bookmark_info" id="toc_info_<?php
echo $index;
?>
">
<div class="orange-title">®Description® :</div>
<?php
print_info($bookmark['description']);
?>
<div class="orange-title" style="margin-top: 6px;">®Keywords® : </div>
<?php
print_search($bookmark['keywords']);
?>
</div>
<div class="edit_bookmark_form" id="edit_toc_<?php
echo $index;
?>
">
<input type="hidden" name="album" id="toc_album_<?php
echo $index;
?>
" value="<?php
echo $bookmark['album'];
?>
"/>
<input type="hidden" name="asset" id="toc_asset_<?php