$search_div = new CDiv($search_form); $search_div->setAttribute('id','zbx_search'); $search_div->setAttribute('class','zbx_search'); $page_menu->addItem($search_div); //*/ $page_menu->show(); } //------------------------------------- <HISTORY> --------------------------------------- if (isset($page['hist_arg']) && $USER_DETAILS['alias'] != ZBX_GUEST_USER && $page['type'] == PAGE_TYPE_HTML && !defined('ZBX_PAGE_NO_MENU')) { $table = new CTable(); $table->setClass('history'); $table->setCellSpacing(0); $table->setCellPadding(0); $history = get_user_history(); $tr = new CRow(new CCol('History:', 'caption')); $tr->addItem($history); $table->addRow($tr); $table->Show(); } else { if ($page['type'] == PAGE_TYPE_HTML && !defined('ZBX_PAGE_NO_MENU')) { echo SBR; } } //------------------------------------ </HISTORY> --------------------------------------- unset($ZBX_MENU); unset($table, $top_page_row, $menu_table, $node_form); unset($main_menu_row); unset($db_nodes, $node_data); unset($sub_menu_table, $sub_menu_rows);
$sub_menu_div->setAttribute('id', 'sub_empty'); $sub_menu_div->setAttribute('style', 'display: ' . ($menu_selected ? 'none;' : 'block;')); $menu_divs[] = $sub_menu_div; $search_div = null; if ($page['file'] != 'index.php' && CWebUser::$data['userid'] > 0) { $searchForm = new CView('general.search'); $search_div = $searchForm->render(); } $sub_menu_table->addRow(array($menu_divs, $search_div)); $page_menu->addItem($sub_menu_table); $page_menu->show(); } // create history if (isset($page['hist_arg']) && CWebUser::$data['alias'] != ZBX_GUEST_USER && $page['type'] == PAGE_TYPE_HTML && !defined('ZBX_PAGE_NO_MENU')) { $table = new CTable(null, 'history left'); $table->addRow(new CRow(array(new CCol(_('History') . ':', 'caption'), get_user_history()))); $table->show(); } elseif ($page['type'] == PAGE_TYPE_HTML && !defined('ZBX_PAGE_NO_MENU')) { echo SBR; } // unset multiple variables unset($ZBX_MENU, $table, $top_page_row, $menu_table, $node_form, $main_menu_row, $db_nodes, $node_data, $sub_menu_table, $sub_menu_rows); if ($page['type'] == PAGE_TYPE_HTML && $showGuiMessaging) { zbx_add_post_js('var msglistid = initMessages({});'); } // if a user logs in after several unsuccessful attempts, display a warning if ($failedAttempts = CProfile::get('web.login.attempt.failed', 0)) { $attempip = CProfile::get('web.login.attempt.ip', ''); $attempdate = CProfile::get('web.login.attempt.clock', 0); $error_msg = _n('%4$s failed login attempt logged. Last failed attempt was from %1$s on %2$s at %3$s.', '%4$s failed login attempts logged. Last failed attempt was from %1$s on %2$s at %3$s.', $attempip, zbx_date2str(_('d M Y'), $attempdate), zbx_date2str(_('H:i'), $attempdate), $failedAttempts); error($error_msg);