template_dir = $doc_path.'templates'; $smarty->compile_dir = $doc_path.'templates_c'; //$smarty->debugging = true; // INCLUDE global $menu_id, $lang, $lang_id, $page, $lastUrl; require_once($doc_path.'includes/mrw.php'); require_once($doc_path.'includes/insert.inc'); require_once($doc_path.'includes/picture.php'); require_once($doc_path.'includes/funcs.php'); require_once($doc_path.'includes/function.paging2.php'); require_once($doc_path.'includes/fields.php'); require( $doc_path.'includes/languages/'.$lang['languages_file'] ); //require_once("includes/calendar_class.php"); if( ! empty( $lastUrl ) ) // if not in intro page { if( function_exists( $lastUrl ) ) { $lastUrl(); } if( isset( $_REQUEST['act'] ) ) { if( function_exists( $_REQUEST['act'] ) ) { $_REQUEST['act'](); } } if( is_readable($doc_path.'templates/content_'.$lastUrl.'.tpl') ) { $smarty->assign( 'template', 'content_' . $lastUrl . '.tpl' ); if(is_readable($doc_path.'templates/bottom_content_'.$lastUrl.'.tpl')) { $smarty->assign( 'template_bot', 'bottom_content_' . $lastUrl . '.tpl' ); } } else { for ($i = 4; $i>0; $i -=1 ) { if ( isset( $_URL[$i] ) && is_readable($doc_path.'templates/content_'.$_URL[$i].'.tpl') ) { $smarty->assign( 'template', 'content_' . $_URL[$i] . '.tpl' ); if(is_readable($doc_path.'templates/bottom_content_'.$_URL[$i].'.tpl')) { $smarty->assign( 'template_bot', 'bottom_content_' . $_URL[$i] . '.tpl' ); } break; } } } } if(isset($_URL[1]) && ($_URL[1]=='news' || $_URL[1]=='press')) { makeCalendar($_URL[1]); } //COMPARING BROWSERS $smarty->register_function('dumpArr','dumpArr'); $smarty->assign('_SERVER_REQUEST',$_SERVER['REQUEST_URI']); $smarty->register_function('paging2','paging2'); $smarty->assign("lng",$lng); $smarty->assign("months",$months); $smarty->assign('_CONFIG',$config); $smarty->assign('_URL',$_URL); $smarty->assign('_REQUEST',$_REQUEST); $smarty->assign('_SESSION',$_SESSION); $smarty->assign('_N',$_N); $smarty->assign("menu_id",$menu_id); $smarty->assign("lastUrl",$lastUrl); $smarty->assign("lang_id",$lang_id); $smarty->assign("doc_path",$doc_path); $smarty->assign("page",$page); // other available variable $lang $smarty->display('index.tpl'); ?>