template_dir = "templates"; $smarty->compile_dir = "./smarty/templates_c"; $smarty->config_dir = "./smarty/configs"; $smarty->plugins_dir = array("plugins"); $smarty->force_compile = true; require_once "_include/class_cDataBaseEx.php"; require_once "_include/ini_db.php"; $db = ini_db(); if( $db->error !== false ){ exit( $db->error ); } $db->Query ("SET NAMES `utf8`"); // CONTENT ARRAY $C = array(); // -------------- if( isset( $_GET["sec"] ) ) { if( file_exists("modules/fn_".$_GET["sec"].".php") ) { require_once "modules/fn_".$_GET["sec"].".php"; $smarty->assign( "place", $_GET["sec"] ); } else { require_once "modules/fn_pagrindinis.php"; $smarty->assign( "place", "pagrindinis" ); } } else { require_once "modules/fn_pagrindinis.php"; $smarty->assign( "place", "pagrindinis" ); } foreach( $C as $key => $value ) { $smarty->assign( $key, $value ); } $smarty->display( "index.tpl" ); ?>