public function SetPanelSettings() { $GLOBALS['FooterScripts'] = ''; $GLOBALS['HideLogoutLink'] = 'display: none'; if(CustomerIsSignedIn()) { $GLOBALS['HideLogoutLink'] = ''; } if($_SERVER['REQUEST_METHOD'] == 'POST') { $baseURL = getConfig('ShopPathNormal'); } else { $baseURL = getCurrentLocation(); } if(strpos($baseURL, '?') === false) { $baseURL .= '?'; } else { $baseURL .= '&'; } $fullSiteLink = $baseURL.'fullSite=1'; $GLOBALS['ISC_CLASS_TEMPLATE']->assign('FullSiteLink', $fullSiteLink); // Show Mobile Site link if(canViewMobileSite()) { $mobileSiteURL = preg_replace('/(&)?fullSite=\d*/i', '', $baseURL); $GLOBALS['MobileSiteURL'] = $mobileSiteURL.'fullSite=0'; $GLOBALS['MobileSiteLink'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('MobileSiteLink'); } // Show "All prices are in [currency code]" $currency = GetCurrencyById($GLOBALS['CurrentCurrency']); if(is_array($currency) && $currency['currencycode']) { $GLOBALS['AllPricesAreInCurrency'] = sprintf(GetLang('AllPricesAreInCurrency'), isc_html_escape($currency['currencyname']), isc_html_escape($currency['currencycode'])); } if(GetConfig('DebugMode') == 1) { $end_time = microtime_float(); $GLOBALS['ScriptTime'] = number_format($end_time - ISC_START_TIME, 4); $GLOBALS['QueryCount'] = $GLOBALS['ISC_CLASS_DB']->NumQueries; if (function_exists('memory_get_peak_usage')) { $GLOBALS['MemoryPeak'] = "Memory usage peaked at ".Store_Number::niceSize(memory_get_peak_usage(true)); } else { $GLOBALS['MemoryPeak'] = ''; } if (isset($_REQUEST['debug'])) { $GLOBALS['QueryList'] = "<ol class='QueryList' style='font-size: 13px;'>\n"; foreach($GLOBALS['ISC_CLASS_DB']->QueryList as $query) { $GLOBALS['QueryList'] .= "<li style='line-height: 1.4; margin-bottom: 4px;'>".isc_html_escape($query['Query'])." — <em>".number_format($query['ExecutionTime'], 4)."seconds</em></li>\n"; } $GLOBALS['QueryList'] .= "</ol>"; } $GLOBALS['DebugDetails'] = "<p>Page built in ".$GLOBALS['ScriptTime']."s with ".$GLOBALS['QueryCount']." queries. ".$GLOBALS['MemoryPeak']."</p>"; } else { $GLOBALS['DebugDetails'] = ''; } // Do we have any live chat service code to show in the footer $modules = GetConfig('LiveChatModules'); if(!empty($modules)) { $liveChatClass = GetClass('ISC_LIVECHAT'); $GLOBALS['LiveChatFooterCode'] = $liveChatClass->GetPageTrackingCode('footer'); } // Load our whitelabel file for the front end require_once ISC_BASE_PATH.'/includes/whitelabel.php'; // Load the configuration file for this template $poweredBy = 0; require_once ISC_BASE_PATH.'/templates/'.GetConfig('template').'/config.php'; if(isset($GLOBALS['TPL_CFG']['PoweredBy'])) { if(!isset($GLOBALS['ISC_CFG']['TemplatePoweredByLines'][$GLOBALS['TPL_CFG']['PoweredBy']])) { $GLOBALS['TPL_CFG']['PoweredBy'] = 0; } $poweredBy = $GLOBALS['TPL_CFG']['PoweredBy']; } // Showing the powered by? $GLOBALS['PoweredBy'] = ''; if($GLOBALS['ISC_CFG']['DisableFrontEndPoweredBy'] == false && isset($GLOBALS['ISC_CFG']['TemplatePoweredByLines'][$poweredBy])) { $GLOBALS['PoweredBy'] = $GLOBALS['ISC_CFG']['TemplatePoweredByLines'][$poweredBy]; } if(empty($GLOBALS['OptimizerConversionScript']) && empty($GLOBALS['OptimizerTrackingScript']) && empty($GLOBALS['OptimizerControlScript'])) { $this->setGwoCookieCrossDomain(); } $GLOBALS['SitemapURL_HTML'] = isc_html_escape(SitemapLink()); $GLOBALS['SNIPPETS']['SitemapLink'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('SitemapLink'); if (Interspire_TaskManager::hasTasks()) { // hasTasks is only implemented for Internal so this will (should) never run for Resque-based task manager $GLOBALS['FooterScripts'] .= Interspire_TaskManager::getTriggerHtml('json'); } if (ISC_CATEGORY::areCategoryFlyoutsEnabled()) { // this needs to be output from php into the body since it's based on config vars // @todo use the stuff gaston is working on instead // bgiframe fixes some IE-related issues with CSS menus (like hovering over SELECT elements) $GLOBALS['FooterScripts'] .= '<script type="text/javascript" src="' . GetConfig('AppPath') . '/javascript/superfish/js/jquery.bgiframe.min.js?' . GetConfig('JSCacheToken') . '"></script>' . "\n"; $GLOBALS['FooterScripts'] .= '<script type="text/javascript" src="' . GetConfig('AppPath') . '/javascript/superfish/js/superfish.js?' . GetConfig('JSCacheToken') . '"></script>' . "\n"; $GLOBALS['FooterScripts'] .= '<script type="text/javascript"> $(function(){ if (typeof $.fn.superfish == "function") { $("ul.sf-menu").superfish({ delay: ' . ((float)GetConfig('categoryFlyoutMouseOutDelay') * 1000) . ', dropShadows: ' . isc_json_encode(GetConfig('categoryFlyoutDropShadow')) . ', speed: "fast" }) .find("ul") .bgIframe(); } }) </script> '; } if (GetConfig('FastCartAction') == 'popup' && GetConfig('ShowCartSuggestions')) { $GLOBALS['SNIPPETS']['FastCartThickBoxJs'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('FastCartThickBoxJs'); } }
$GLOBALS['ISC_CLASS_TEMPLATE'] = new TEMPLATE("ISC_LANG"); $GLOBALS['ISC_CLASS_TEMPLATE']->FrontEnd(); if(isset($_GET['fullSite'])) { if($_GET['fullSite'] > 0) { isc_setcookie('mobileViewFullSite', 1); } else { isc_setcookie('mobileViewFullSite', 0); $_COOKIE['mobileViewFullSite'] = 0; } } // Is this a mobile device? if(canViewMobileSite() && empty($_GET['fullSite']) && empty($_COOKIE['mobileViewFullSite']) ) { define('IS_MOBILE', true); $GLOBALS['ISC_CLASS_TEMPLATE']->setIsMobileDevice(true); // Reload the template configuration based on the mobile template $GLOBALS['TPL_CFG'] = $GLOBALS['ISC_CLASS_TEMPLATE']->getTemplateConfiguration(); } $GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplateBase(ISC_BASE_PATH . "/templates"); $GLOBALS['ISC_CLASS_TEMPLATE']->panelPHPDir = ISC_BASE_PATH . "/includes/display/"; $GLOBALS['ISC_CLASS_TEMPLATE']->templateExt = "html"; // Disable product comparisons if the template does not support them if($GLOBALS['TPL_CFG']['MaxComparisonProducts'] == 0) { $GLOBALS['ISC_CFG']['EnableProductComparisons'] = false; }