public function __construct() { global $config; try { parent::__construct(); } catch (\Exception $e) { static::raiseError(get_class($parent) . '::__construct() failed!', true, $e); return false; } $this->smarty->addPluginsDir(APP_BASE . '/vendor/Mtlda/SmartyPlugins'); if (!($base_path = $config->getWebPath())) { static::raiseError(get_class($config) . 'getWebPath() returned false!', true); return false; } if ($base_path == '/') { $base_path = ''; } $this->registerPlugin("function", "get_menu_state", array(&$this, "getMenuState"), false); $this->assign('image_arrow_left', $base_path . '/resources/images/arrow-circle-left-4x.png'); $this->assign('image_arrow_right', $base_path . '/resources/images/arrow-circle-right-4x.png'); $this->assign('document_top_left', $base_path . '/resources/images/top_left.png'); $this->assign('document_top_center', $base_path . '/resources/images/top_center.png'); $this->assign('document_top_right', $base_path . '/resources/images/top_right.png'); $this->assign('document_middle_left', $base_path . '/resources/images/middle_left.png'); $this->assign('document_middle_center', $base_path . '/resources/images/middle_center.png'); $this->assign('document_middle_right', $base_path . '/resources/images/middle_right.png'); $this->assign('document_bottom_left', $base_path . '/resources/images/bottom_left.png'); $this->assign('document_bottom_center', $base_path . '/resources/images/bottom_center.png'); $this->assign('document_bottom_right', $base_path . '/resources/images/bottom_right.png'); }
public function __construct() { global $ms, $config; parent::__construct(); if (($base_web_path = $config->getWebPath()) === false) { $this->raiseError(get_class($config) . '::getWebPath() returned false!', true); return; } $this->assign('icon_chains', $base_web_path . '/resources/icons/flag_blue.gif'); $this->assign('icon_chains_assign_pipe', $base_web_path . '/resources/icons/flag_blue_with_purple_arrow.gif'); $this->assign('icon_options', $base_web_path . '/resources/icons/options.gif'); $this->assign('icon_pipes', $base_web_path . '/resources/icons/flag_pink.gif'); $this->assign('icon_ports', $base_web_path . '/resources/icons/flag_orange.gif'); $this->assign('icon_protocols', $base_web_path . '/resources/icons/flag_red.gif'); $this->assign('icon_servicelevels', $base_web_path . '/resources/icons/flag_yellow.gif'); $this->assign('icon_filters', $base_web_path . '/resources/icons/flag_green.gif'); $this->assign('icon_targets', $base_web_path . '/resources/icons/flag_purple.gif'); $this->assign('icon_clone', $base_web_path . '/resources/icons/clone.png'); $this->assign('icon_delete', $base_web_path . '/resources/icons/delete.png'); $this->assign('icon_active', $base_web_path . '/resources/icons/active.gif'); $this->assign('icon_inactive', $base_web_path . '/resources/icons/inactive.gif'); $this->assign('icon_arrow_left', $base_web_path . '/resources/icons/arrow_left.gif'); $this->assign('icon_arrow_right', $base_web_path . '/resources/icons/arrow_right.gif'); $this->assign('icon_chains_arrow_up', $base_web_path . '/resources/icons/ms_chains_arrow_up_14.gif'); $this->assign('icon_chains_arrow_down', $base_web_path . '/resources/icons/ms_chains_arrow_down_14.gif'); $this->assign('icon_pipes_arrow_up', $base_web_path . '/resources/icons/ms_pipes_arrow_up_14.gif'); $this->assign('icon_pipes_arrow_down', $base_web_path . '/resources/icons/ms_pipes_arrow_down_14.gif'); $this->assign('icon_users', $base_web_path . '/resources/icons/ms_users_14.gif'); $this->assign('icon_about', $base_web_path . '/resources/icons/home.gif'); $this->assign('icon_home', $base_web_path . '/resources/icons/home.gif'); $this->assign('icon_new', $base_web_path . '/resources/icons/page_white.gif'); $this->assign('icon_monitor', $base_web_path . '/resources/icons/chart_pie.gif'); $this->assign('icon_shaper_start', $base_web_path . '/resources/icons/enable.gif'); $this->assign('icon_shaper_stop', $base_web_path . '/resources/icons/disable.gif'); $this->assign('icon_bandwidth', $base_web_path . '/resources/icons/bandwidth.gif'); $this->assign('icon_update', $base_web_path . '/resources/icons/update.gif'); $this->assign('icon_interfaces', $base_web_path . '/resources/icons/network_card.gif'); $this->assign('icon_hosts', $base_web_path . '/resources/icons/host.png'); $this->assign('icon_treeend', $base_web_path . '/resources/icons/tree_end.gif'); $this->assign('icon_rules_show', $base_web_path . '/resources/icons/show.gif'); $this->assign('icon_rules_load', $base_web_path . '/resources/icons/enable.gif'); $this->assign('icon_rules_unload', $base_web_path . '/resources/icons/disable.gif'); $this->assign('icon_rules_export', $base_web_path . '/resources/icons/disk.gif'); $this->assign('icon_rules_restore', $base_web_path . '/resources/icons/restore.gif'); $this->assign('icon_rules_reset', $base_web_path . '/resources/icons/reset.gif'); $this->assign('icon_rules_update', $base_web_path . '/resources/icons/update.gif'); $this->assign('icon_pdf', $base_web_path . '/resources/icons/page_white_acrobat.gif'); $this->assign('icon_menu_down', $base_web_path . '/resources/icons/bullet_arrow_down.png'); $this->assign('icon_menu_right', $base_web_path . '/resources/icons/bullet_arrow_right.png'); $this->assign('icon_busy', $base_web_path . '/resources/icons/busy.png'); $this->assign('icon_ready', $base_web_path . '/resources/icons/ready.png'); $this->assign('icon_process', $base_web_path . '/resources/icons/task.png'); $this->assign('web_path', $base_web_path); if ($ms->isZendOpcacheAvailable()) { $this->assign('zend_opcache_available', true); } else { $this->assign('zend_opcache_available', false); } $this->registerPlugin("function", "start_table", array(&$this, "smartyStartTable"), false); $this->registerPlugin("function", "page_end", array(&$this, "smartyPageEnd"), false); $this->registerPlugin("function", "year_select", array(&$this, "smartyYearSelect"), false); $this->registerPlugin("function", "month_select", array(&$this, "smartyMonthSelect"), false); $this->registerPlugin("function", "day_select", array(&$this, "smartyDaySelect"), false); $this->registerPlugin("function", "hour_select", array(&$this, "smartyHourSelect"), false); $this->registerPlugin("function", "minute_select", array(&$this, "smartyMinuteSelect"), false); $this->registerPlugin("function", "chain_select_list", array(&$this, "smartyChainSelectList"), false); $this->registerPlugin("function", "pipe_select_list", array(&$this, "smartyPipeSelectList"), false); $this->registerPlugin("function", "target_select_list", array(&$this, "smartyTargetSelectList"), false); $this->registerPlugin("function", "service_level_select_list", array(&$this, "smartyServiceLevelSelectList"), false); $this->registerPlugin("function", "network_path_select_list", array(&$this, "smartyNetworkPathSelectList"), false); $this->registerPlugin("function", "host_profile_select_list", array(&$this, "smartyHostProfileSelectList"), false); $this->registerPlugin("function", "get_menu_state", array(&$this, "getMenuState"), false); return; }