\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"; 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'])) ? $_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"; 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")) { $domain_path = PROJECT_PATH.'/app/domains/domains.php'; } else { $domain_path = PROJECT_PATH.'/core/domains/domains.php'; } echo " ".$text['theme-title-domains']." (".sizeof($_SESSION['domains']).")"; echo "

\n"; echo " \n"; echo "
\n"; echo "
\n"; //alternating background colors of inactive domains if ($_SESSION['theme']['domain_inactive_background_color'][0] != '') { $bgcolor1 = $_SESSION['theme']['domain_inactive_background_color'][0]; } else { $bgcolor1 = "#eaedf2"; } if ($_SESSION['theme']['domain_inactive_background_color'][1] != '') { $bgcolor2 = $_SESSION['theme']['domain_inactive_background_color'][1]; } else { $bgcolor2 = "#fff"; } foreach($_SESSION['domains'] as $domain) { //active domain color $bgcolor = ($bgcolor == $bgcolor1) ? $bgcolor2 : $bgcolor1; if ($_SESSION['theme']['domain_active_background_color']['text'] != '') { $bgcolor = ($domain['domain_uuid'] == $_SESSION['domain_uuid']) ? escape($_SESSION['theme']['domain_active_background_color']['text']) : $bgcolor; } else { $bgcolor = ($domain['domain_uuid'] == $_SESSION['domain_uuid']) ? "#eeffee" : $bgcolor; } //active domain's text hover color if ($_SESSION['theme']['domain_active_text_color_hover']['text'] != '' && $domain['domain_uuid'] == $_SESSION['domain_uuid']) { echo "
"; } else if ($_SESSION['theme']['domain_inactive_text_color_hover']['text'] != '' && $domain['domain_uuid'] != $_SESSION['domain_uuid']) { echo "
"; } else { echo "
"; } echo "".escape($domain['domain_name'])."\n"; if ($domain['domain_description'] != '') { //active domain description text color if ($_SESSION['theme']['domain_active_desc_text_color']['text'] != '' && $domain['domain_uuid'] == $_SESSION['domain_uuid']) { echo " - ".escape($domain['domain_description'])."\n"; } //inactive domains description text color else if ($_SESSION['theme']['domain_inactive_desc_text_color']['text'] != '' && $domain['domain_uuid'] != $_SESSION['domain_uuid']) { echo " - ".escape($domain['domain_description'])."\n"; } //default domain description text color else { echo " - ".escape($domain['domain_description'])."\n"; } } echo "
\n"; $ary_domain_names[] = $domain['domain_name']; $ary_domain_descs[] = str_replace('"','\"',$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; if (!http_user_agent('mobile')) { $menu_width = $_SESSION['theme']['menu_width_fixed']['text'] != '' ? $_SESSION['theme']['menu_width_fixed']['text'] : 'calc(90% - 20px)'; } $menu_brand = true; $menu_corners = null; } //begin navbar code echo "\n"; } //get the menu array and save it to the session if (!isset($_SESSION['menu']['array'])) { $menu = new menu; $menu->menu_uuid = $_SESSION['domain']['menu']['uuid']; $_SESSION['menu']['array'] = $menu->menu_array(); unset($menu); } //get the menu style and position $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'; //show the menu style 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'] : null; 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($_SESSION['menu']['array'], $menu_style, $menu_position); break; case 'static': echo "
\n"; show_menu($_SESSION['menu']['array'], $menu_style, $menu_position); break; case 'fixed': show_menu($_SESSION['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 } else { // default login being used 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"; ?>