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


PHP CDiv::additem方法代码示例

本文整理汇总了PHP中CDiv::additem方法的典型用法代码示例。如果您正苦于以下问题:PHP CDiv::additem方法的具体用法?PHP CDiv::additem怎么用?PHP CDiv::additem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDiv的用法示例。


在下文中一共展示了CDiv::additem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

         $node_tree[0] = array('id' => 0, 'caption' => S_ALL_S, 'combo_select_node' => $combo_check_all, 'parentid' => 0);
         //root
         foreach ($available_nodes as $num => $node) {
             $checked = uint_in_array($node['nodeid'], $ZBX_VIEWED_NODES['nodeids']);
             $combo_select_node = new CCheckbox('selected_nodes[' . $node['nodeid'] . ']', $checked, null, $node['nodeid']);
             // If not exist parent for node, link it to root (0)
             if (!isset($available_nodes[$node['masterid']])) {
                 $node['masterid'] = 0;
             }
             $node_tree[$node['nodeid']] = array('id' => $node['nodeid'], 'caption' => $node['name'], 'combo_select_node' => $combo_select_node, 'parentid' => $node['masterid']);
         }
         $node_tree_captions = array('caption' => bold(S_NODE), 'combo_select_node' => SPACE);
         $node_tree = new CTree('nodes', $node_tree, $node_tree_captions);
         // --- ---
         $div_node_tree = new CDiv();
         $div_node_tree->additem($node_tree->getHTML());
         $div_node_tree->additem(new CButton('select_nodes', S_SELECT, "javascript: " . " hidePopupDiv('select_iframe');" . " \$('div_node_tree').setStyle({display:'none'});"));
         $div_node_tree->setAttribute('id', 'div_node_tree');
         $div_node_tree->addStyle('display: none');
         if (!is_null($combo_node_list)) {
             $node_form->addItem(array(new CSpan(S_CURRENT_NODE, 'textcolorstyles'), $combo_node_list));
         }
         $node_form->addItem($button_show_tree);
         $node_form->addItem($div_node_tree);
         unset($combo_node_list);
     }
 }
 // 1st level menu
 $table = new CTable();
 $table->setCellSpacing(0);
 $table->setCellPadding(0);
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:page_header.php


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