} } } if ($tmpBrowserLanguageId != $site->currentLanguage['id'] && $tmpBrowserLanguageId !== null) { header("location:" . $site->generateUrl($tmpBrowserLanguageId)); } } $_SESSION['modules']['standard']['languages']['language_selected_by_browser'] = true; /*eof detect browser language*/ /*check if the website is closed*/ if ($parametersMod->getValue('standard', 'configuration', 'main_parameters', 'closed_site') && !$site->managementState()) { echo $parametersMod->getValue('standard', 'configuration', 'main_parameters', 'closed_site_message'); exit; } /*eof check if the website is closed*/ require BASE_DIR . THEME_DIR . THEME . '/' . $site->getLayout(); /* Automatic execution of cron. The best solution is to setup cron service to launch file www.yoursite.com/ip_cron.php few times a day. By default fake cron is enabled */ if ($parametersMod->getValue('standard', 'configuration', 'advanced_options', 'use_fake_cron') && function_exists('curl_init') && $log->lastLogsCount(60, 'system/cron') == 0) { // create a new curl resource $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, BASE_URL . 'ip_cron.php'); curl_setopt($ch, CURLOPT_REFERER, BASE_URL); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 1); curl_exec($ch); } \Db::disconnect();