本文整理汇总了PHP中CComboBox::ItemsCount方法的典型用法代码示例。如果您正苦于以下问题:PHP CComboBox::ItemsCount方法的具体用法?PHP CComboBox::ItemsCount怎么用?PHP CComboBox::ItemsCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CComboBox
的用法示例。
在下文中一共展示了CComboBox::ItemsCount方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
$cmbElements->addItem($row['elementid'], get_node_name_by_elid($row['elementid']) . $row['name']);
if (bccomp($elementid, $row['elementid']) == 0) {
$element_correct = 1;
}
if (!isset($first_element)) {
$first_element = $row['elementid'];
}
}
if (!isset($element_correct) && isset($first_element)) {
$elementid = $first_element;
}
if (isset($elementid) && !slideshow_accessible($elementid, PERM_READ_ONLY)) {
access_deny();
}
if ($cmbElements->ItemsCount() > 0) {
$form->addItem(array(SPACE . S_SLIDESHOW . SPACE, $cmbElements));
}
if (2 != $_REQUEST['fullscreen'] && !empty($elementid) && check_dynamic_items($elementid, 1)) {
if (!isset($_REQUEST['hostid'])) {
$_REQUEST['groupid'] = $_REQUEST['hostid'] = 0;
}
$options = array('allow_all_hosts', 'monitored_hosts', 'with_items');
if (!$ZBX_WITH_ALL_NODES) {
array_push($options, 'only_current_node');
}
$params = array();
foreach ($options as $option) {
$params[$option] = 1;
}
$PAGE_GROUPS = get_viewed_groups(PERM_READ_ONLY, $params);
示例2: array
update_profile("web.maps.sysmapid", $_REQUEST["sysmapid"]);
}
$p_elements = array();
$text = null;
if (isset($_REQUEST["sysmapid"])) {
$sysmap = get_sysmap_by_sysmapid($_REQUEST["sysmapid"]);
$text = $all_maps[$_REQUEST["sysmapid"]];
}
$form = new CForm();
$form->SetMethod('get');
$form->AddVar("fullscreen", $_REQUEST["fullscreen"]);
$cmbMaps = new CComboBox("sysmapid", get_request("sysmapid", 0), "submit()");
foreach ($all_maps as $id => $name) {
$cmbMaps->AddItem($id, $name);
}
if ($cmbMaps->ItemsCount() > 0) {
$form->AddItem($cmbMaps);
$p_elements[] = get_table_header($text, $form);
}
$table = new CTable(S_NO_MAPS_DEFINED, "map");
if (isset($_REQUEST["sysmapid"])) {
$action_map = get_action_map_by_sysmapid($_REQUEST["sysmapid"]);
$table->AddRow($action_map);
$imgMap = new CImg("map.php?noedit=1&sysmapid=" . $_REQUEST["sysmapid"]);
$imgMap->SetMap($action_map->GetName());
$table->AddRow($imgMap);
}
$p_elements[] = $table;
$icon = null;
$fs_icon = null;
if (isset($_REQUEST["sysmapid"])) {
示例3: CComboBox
$l_header->AddVar('mark_color', $_REQUEST['mark_color']);
}
$cmbLogList = new CComboBox('cmbloglist');
if (is_array($_REQUEST['itemid'])) {
$cmbLogList->AddItem(0, $main_header);
foreach ($_REQUEST['itemid'] as $itemid) {
if (!($item = get_item_by_itemid($itemid)) || $item['value_type'] != ITEM_VALUE_TYPE_LOG) {
invalid_url();
}
$host = get_host_by_hostid($item['hostid']);
$cmbLogList->AddItem($itemid, $host['host'] . ': ' . item_description($item));
}
} else {
$cmbLogList->AddItem($_REQUEST['itemid'], $main_header);
}
$l_header->AddItem(array("Log files list", SPACE, $cmbLogList, SPACE, new CButton("add_log", "Add", "return PopUp('popup.php?" . "dstfrm=" . $l_header->GetName() . "&srctbl=logitems&dstfld1=itemid&srcfld1=itemid');"), SPACE, $cmbLogList->ItemsCount() > 1 ? new CButton("remove_log", "Remove selected") : null));
}
$form = new CForm();
$form->SetMethod('get');
$form->AddVar("itemid", $_REQUEST["itemid"]);
if (isset($_REQUEST["filter_task"])) {
$form->AddVar("filter_task", $_REQUEST["filter_task"]);
}
if (isset($_REQUEST["filter"])) {
$form->AddVar("filter", $_REQUEST["filter"]);
}
if (isset($_REQUEST["mark_color"])) {
$form->AddVar("mark_color", $_REQUEST["mark_color"]);
}
$cmbAction = new CComboBox("action", $_REQUEST["action"], "submit()");
if (str_in_array($item_type, array(ITEM_VALUE_TYPE_FLOAT, ITEM_VALUE_TYPE_UINT64))) {
示例4: CTable
$table->setCellPadding(5);
$table->addRow($top_page_row);
$table->show();
$menu_table = new CTable(NULL, 'menu');
$menu_table->setCellSpacing(0);
$menu_table->setCellPadding(5);
$menu_table->addRow($main_menu);
$node_form = null;
if (ZBX_DISTRIBUTED) {
$lst_nodes = new CComboBox('switch_node', get_current_nodeid(false), 'submit()');
$available_nodes = get_accessible_nodes_by_user($USER_DETAILS, PERM_READ_LIST);
$db_nodes = DBselect('SELECT * ' . ' FROM nodes ' . ' WHERE ' . DBcondition('nodeid', $available_nodes) . ' ORDER BY name ');
while ($node_data = DBfetch($db_nodes)) {
$lst_nodes->addItem($node_data['nodeid'], $node_data['name']);
}
if ($lst_nodes->ItemsCount() > 0) {
$node_form = new CForm();
$node_form->addItem(array(new CSpan(S_CURRENT_NODE, 'textcolorstyles'), $lst_nodes));
unset($lst_nodes);
if (!defined('ZBX_DISABLE_SUBNODES')) {
global $ZBX_WITH_SUBNODES;
$cmd_show_subnodes = new CComboBox('show_subnodes', !empty($ZBX_WITH_SUBNODES) ? 1 : 0, 'submit()');
$cmd_show_subnodes->addItem(0, S_CURRENT_NODE_ONLY);
$cmd_show_subnodes->addItem(1, S_WITH_SUBNODES);
$node_form->addItem(array(SPACE, new CSpan(S_SHOW, 'textcolorstyles'), $cmd_show_subnodes));
}
}
}
$table = new CTable();
$table->setCellSpacing(0);
$table->setCellPadding(0);