Portions created by the Initial Developer are Copyright (C) 2008-2020 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ //includes files require_once __DIR__ . "/require.php"; //set the domains session if (!isset($_SESSION['domains'])) { $domain = new domains(); $domain->session(); $domain->set(); } //if reloadxml then run the command if (permission_exists('dialplan_edit') && isset($_SESSION["reload_xml"])) { if (!empty($_SESSION["reload_xml"])) { if (isset($_SESSION['apply_settings']) && $_SESSION['apply_settings'] == "true") { //show the apply settings prompt } else { //reload the access control list this also runs reloadxml $response = event_socket::api('reloadxml'); $_SESSION["reload_xml"] = ''; unset($_SESSION["reload_xml"]); usleep(500); //clear the apply settings reminder $_SESSION["reload_xml"] = false; } } } //set the template base directory path $template_base_path = dirname(__DIR__, 1).'/themes'; //start the output buffer include $template_base_path.'/'.$settings->get('domain', 'template', 'default').'/config.php'; //start the output buffer ob_start(); //get the content if (isset($_GET["c"])) { $content = $_GET["c"]; //link } else { $content = ''; } //get the parent id $sql = "select menu_item_parent_uuid from v_menu_items "; $sql .= "where menu_uuid = :menu_uuid "; $sql .= "and menu_item_link = :menu_item_link "; $parameters['menu_uuid'] = $settings->get('domain', 'menu'); $parameters['menu_item_link'] = $_SERVER["SCRIPT_NAME"]; $_SESSION["menu_item_parent_uuid"] = $database->select($sql, $parameters, 'column'); unset($sql, $parameters); //button css class and styles $button_icon_class = ''; $button_icon_style = 'padding: 3px;'; $button_label_class = 'button-label'; $button_label_style = 'padding-left: 5px; padding-right: 3px;'; $button_icons = (!empty($settings->get('theme', 'button_icons'))) ? $button_icons = $settings->get('theme', 'button_icons') : ''; switch ($button_icons) { case 'auto': $button_label_class .= ' hide-md-dn'; break; case 'only': $button_label_style .= ' display: none;'; break; case 'never': $button_icon_class .= ' display: none;'; break; case 'always': break; } //get the input toggle style options: select, switch_round, switch_square if (substr($settings->get('theme', 'input_toggle_style', 'switch_round'), 0, 6) == 'switch') { $input_toggle_style_switch = true; } else { $input_toggle_style_switch = false; } //start the output buffer ob_start(); //for translate tool (if available) if (file_exists(dirname(__DIR__, 1)."/app/translate/translate_header.php")) { require_once("app/translate/translate_header.php"); } ?>