\n" : "\n"; //get the php self path and set a variable with only the directory path $php_self_array = explode ("/", $_SERVER['PHP_SELF']); $php_self_dir = ''; foreach ($php_self_array as &$value) { if (substr($value, -4) != ".php") { $php_self_dir .= $value."/"; } } unset($php_self_array); if (strlen(PROJECT_PATH) > 0) { $php_self_dir = substr($php_self_dir, strlen(PROJECT_PATH), strlen($php_self_dir)); } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; //link to custom css file if ($_SESSION['theme']['custom_css']['text'] != '') { echo "\n\n"; } //output custom css if ($_SESSION['theme']['custom_css_code']['text'] != '') { echo "\n\n"; } //set fav icon $favicon = (isset($_SESSION['theme']['favicon']['text'])) ? escape($_SESSION['theme']['favicon']['text']) : '/themes/default/favicon.ico'; echo "\n"; echo "<!--{title}-->\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; //web font loader if ($_SESSION['theme']['font_loader']['text'] == 'true') { if ($_SESSION['theme']['font_retrieval']['text'] != 'asynchronous') { $font_loader_version = ($_SESSION['theme']['font_loader_version']['text'] != '') ? escape($_SESSION['theme']['font_loader_version']['text']) : 1; echo "\n"; } echo "\n"; } ?> \n"; echo "\n"; //add multilingual support $language = new text; $text = $language->get(null,'themes/default'); echo "\n"; echo "
\n"; //logged in, show the domains block if (strlen($_SESSION["username"]) > 0 && permission_exists("domain_select") && count($_SESSION['domains']) > 1) { echo "
\n"; echo " \n"; echo "
\n"; echo "
\n"; echo " \n"; if (file_exists($_SERVER["DOCUMENT_ROOT"]."/app/domains/domains.php")) { $href = '/app/domains/domains.php'; } else { $href = '/core/domain_settings/domains.php'; } echo "".$text['theme-title-domains']." (".sizeof($_SESSION['domains']).")"; echo "

\n"; echo " \n"; echo "
\n"; echo "
\n"; $bgcolor1 = "#eaedf2"; $bgcolor2 = "#fff"; foreach($_SESSION['domains'] as $domain) { $bgcolor = ($bgcolor == $bgcolor1) ? $bgcolor2 : $bgcolor1; $bgcolor = ($domain['domain_uuid'] == $_SESSION['domain_uuid']) ? "#eeffee" : $bgcolor; echo "
"; echo "".escape($domain['domain_name'])."\n"; if ($domain['domain_description'] != '') { echo " - ".escape($domain['domain_description'])."\n"; } echo "
\n"; $ary_domain_names[] = escape($domain['domain_name']); $ary_domain_descs[] = str_replace('"','\"',escape($domain['domain_description'])); } echo "
\n"; echo " \n"; echo "
\n"; echo "
\n"; } // qr code container for contacts echo "\n"; if (!$default_login) { //top fixed, static or inline boostrap menu function show_menu($menu_array, $menu_style, $menu_position) { global $text; //determine menu behavior switch ($menu_style) { case 'inline': $menu_type = 'default'; $menu_width = 'calc(100% - 20px)'; $menu_brand = false; $menu_corners = null; break; case 'static': $menu_type = 'static-top'; $menu_width = 'calc(100% - 40px)'; $menu_brand = true; $menu_corners = "style='-webkit-border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px;'"; break; case 'fixed': default: $menu_position = ($menu_position != '') ? $menu_position : 'top'; $menu_type = 'fixed-'.$menu_position; $menu_width = 'calc(90% - 20px)'; $menu_brand = true; $menu_corners = null; } //begin navbar code echo "\n"; } //determine menu configuration $menu = new menu; $menu->db = $db; $menu->menu_uuid = $_SESSION['domain']['menu']['uuid']; $menu_array = $menu->menu_array(); unset($menu); $menu_style = ($_SESSION['theme']['menu_style']['text'] != '') ? $_SESSION['theme']['menu_style']['text'] : 'fixed'; $menu_position = ($_SESSION['theme']['menu_position']['text']) ? $_SESSION['theme']['menu_position']['text'] : 'top'; switch ($menu_style) { case 'inline': $logo_align = ($_SESSION['theme']['logo_align']['text'] != '') ? $_SESSION['theme']['logo_align']['text'] : 'left'; $logo_style = ($_SESSION['theme']['logo_style']['text'] != '') ? $_SESSION['theme']['logo_style']['text'] : ''; echo "
\n"; if ($_SERVER['PHP_SELF'] != PROJECT_PATH."/core/install/install.php") { $logo = ($_SESSION['theme']['logo']['text'] != '') ? $_SESSION['theme']['logo']['text'] : PROJECT_PATH."/themes/default/images/logo.png"; echo ""; } show_menu($menu_array, $menu_style, $menu_position); break; case 'static': echo "
\n"; show_menu($menu_array, $menu_style, $menu_position); break; case 'fixed': show_menu($menu_array, $menu_style, $menu_position); echo "
\n"; break; case 'side': echo "\n"; echo "
\n"; echo "
\n"; //header: left echo "
\n"; echo "
\n"; //header: right echo ""; //current user echo "\n"; echo "".$text['theme-label-user'].": "; echo "".$_SESSION['username'].""; echo "\n"; //domain name/selector (sm+) if ($_SESSION["username"] != '' && permission_exists("domain_select") && count($_SESSION['domains']) > 1 && $_SESSION['theme']['domain_visible']['text'] == 'true') { echo "\n"; echo "".$text['theme-label-domain'].": "; echo "".escape($_SESSION['domain_name']).""; echo "\n"; } //logout icon if ($_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") { echo ""; } echo ""; echo "
\n"; break; } echo "
\n"; echo " \n"; echo "
\n"; echo "\n"; echo "
\n"; //initial div from switch statement above } // default login being used else { if ($_SESSION['theme']['logo_login']['text'] != '') { $logo = $_SESSION['theme']['logo_login']['text']; } else if ($_SESSION['theme']['logo']['text'] != '') { $logo = $_SESSION['theme']['logo']['text']; } else { $logo = PROJECT_PATH."/themes/default/images/logo_login.png"; } echo "
\n"; echo "
\n"; echo " \n"; echo "
\n"; echo "\n"; unset($_SESSION['background_image']); } echo "\n"; echo "\n"; ?>