예제 #1
0
파일: exp_imp.php 프로젝트: rennhak/zabbix
         }
         $table->ShowRow(array(new CCol($host['host'], 'top'), $el_table));
         unset($el_table);
     }
     $form = new CForm(null, 'post');
     $form->setName('hosts');
     $form->addVar("config", $config);
     $form->addVar('update', true);
     $form->addVar('hosts', $hosts);
     $form->addVar('templates', $templates);
     $form->addVar('items', $items);
     $form->addVar('graphs', $graphs);
     $form->addVar('triggers', $triggers);
     $form->addItem(array(new CButton('back', S_BACK), new CButton('preview', S_REFRESH), new CButton('export', S_EXPORT)));
     $table->setFooter(new CCol($form));
     $table->showEnd();
 } else {
     /* table HOSTS */
     $form = new CForm(null, 'post');
     $form->SetName('hosts');
     $form->AddVar('config', $config);
     $form->AddVar('update', true);
     $cmbGroups = new CComboBox('groupid', $PAGE_GROUPS['selected'], 'javascript: submit();');
     foreach ($PAGE_GROUPS['groups'] as $groupid => $name) {
         $cmbGroups->addItem($groupid, get_node_name_by_elid($groupid) . $name);
     }
     $header = get_table_header(S_HOSTS_BIG, array(S_GROUP . SPACE, $cmbGroups));
     $form->addItem($header);
     $table = new CTableInfo(S_NO_HOSTS_DEFINED);
     $table->setHeader(array(array(new CCheckBox("all_hosts", true, "CheckAll('" . $form->GetName() . "','all_hosts','hosts');"), make_sorting_link(S_NAME, 'h.host')), make_sorting_link(S_DNS, 'h.dns'), make_sorting_link(S_IP, 'h.ip'), make_sorting_link(S_PORT, 'h.port'), make_sorting_link(S_STATUS, 'h.status'), array(new CCheckBox("all_templates", true, "CheckAll('" . $form->GetName() . "','all_templates','templates');"), S_TEMPLATES), array(new CCheckBox("all_items", true, "CheckAll('" . $form->GetName() . "','all_items','items');"), S_ITEMS), array(new CCheckBox("all_triggers", true, "CheckAll('" . $form->GetName() . "','all_triggers','triggers');"), S_TRIGGERS), array(new CCheckBox("all_graphs", true, "CheckAll('" . $form->GetName() . "','all_graphs','graphs');"), S_GRAPHS)));
     $sql_from = '';