caching = $WebStaticCache == "1" ? true : false; $smarty -> force_compile = $WebForceCompil == "1" ? true : false; $smarty -> cache_lifetime = $WebCacheLifetime; $smarty -> debugging = false; $smarty -> template_dir = SONGCMSROOT . $TemDir; $smarty -> compile_dir = SONGCMSROOT . 'tmp/translation'; $smarty -> cache_dir = SONGCMSROOT . 'tmp/cache'; $smarty -> left_delimiter = ""; //Smarty局部不被缓存 function smarty_block_dynamic($param,$content,&$smarty){ return $content; } $smarty -> register_block('dynamic','smarty_block_dynamic',false); $Sys = array( 'CMSVersion' => $CMSVersion, 'CMSUpDate' => $CMSUpDate, 'Charset' => $Charset, 'isTraditional' => $isTraditional, 'Lang' => $Lang, 'WebLangKind' => $WebLangKind, 'TemDir' => './' . $TemDir, 'WebHost' => $WebHost, 'isLogin' => $_COOKIE['isLogin'], 'sGET' => $sGET, 'WebStaticHTML' => $WebStaticHTML, 'URL' => URL(), ); $smarty -> register_function("URL","IDURL"); //注册URL,方便带有ID的URL调用 $TemDir = SONGCMSROOT . $TemDir; $sdb = new sdb(); $WebConfig = $sdb -> WebConfig($Lang); extract($WebConfig); @include_once("{$TemDir}language.php"); $smarty -> assign('Sys',$Sys); $smarty -> assign('Web',$WebConfig); $smarty -> assign('Html',$Html[$Lang]); include_once($File); ?>