Example #1
0
 $smarty->template_dir = "{$basepath}/templates/{$theme}";
 if (file_exists("{$basepath}/cachefiles/{$theme}")) {
     $smarty->compile_dir = "{$basepath}/cachefiles/{$theme}";
     $smarty->cache_dir = "{$basepath}/cachefiles/{$theme}";
 } else {
     $smarty->compile_dir = "{$basepath}/cachefiles/";
     $smarty->cache_dir = "{$basepath}/cachefiles";
 }
 $smarty->config_dir = "{$basepath}/templates/smarty/configs";
 $smarty->assign("templatepath", "{$baseurl}/templates/{$theme}");
 $smarty->assign("cachekey_plain", $cachekey_plain);
 if (isset($_SESSION['fb_justregistered']) && $_SESSION['fb_justregistered']) {
     $smarty->assign("facebook_promo", 1);
     unset($_SESSION['fb_justregistered']);
 }
 $pages = $page->getPagesMenu($language);
 $global_settings = $settings->getMultiSettings(array("tv_guide", "captchas", "listing_style", "adfly", "analytics", "seo_links", "facebook", "smart_bar", "smartbar_size", "smartbar_rows", "maxtvperpage", "maxmoviesperpage", "countdown_free", "countdown_user"), true);
 /* SEO links */
 if (!isset($global_settings['seo_links']) || !in_array($global_settings['seo_links'], array(0, 1))) {
     $global_settings['seo_links'] = 1;
 }
 if (!isset($global_settings['captchas']) || !$global_settings['captchas']) {
     $global_settings['captchas'] = false;
 } else {
     $global_settings['captchas'] = true;
 }
 if (!isset($global_settings['tv_guide'])) {
     $global_settings['tv_guide'] = true;
 } elseif (!$global_settings['tv_guide']) {
     $global_settings['tv_guide'] = false;
 } else {