setJava($GLOBALS['RootPath']."engine/js/en_functions.js"); $thisPage->setJava($GLOBALS['RootPath']."engine/js/swfobject.js"); $thisPage->setJsEvent("header","var RootPath='".$GLOBALS['RootPath']."'"); $thisPage->setJsEvent("header","var PodVars=new Object();"); $thisPage->setJsEvent("body","inputfocus()"); //JUST TO TEST if(!isset($_SESSION[SITECODE]['WebLang'])){ $_SESSION [SITECODE] ['WebLang']=1; } // Rilevo la sezione attuale ed il diritto di accesso if($GLOBALS['htaccess']) { $sezione = $thisPage->parseSezione(); }else{ $sezione = $thisPage->getPage(Utility::getPar("sez","")); $curlang=$thisPage->getStrLang(Utility::getPar("l",1)); $thisPage->setlang ( $curlang ); } // TPL switch($sezione['tpl']){ case 1: // Web $thisPage->setCss($GLOBALS['RootPath']."www/css/web/layout.css"); $thisPage->setCss($GLOBALS['RootPath']."www/css/web/bodystyles.css"); $thisPage->setCss($GLOBALS['RootPath']."www/css/web/form.css"); $thisPage->setJava($GLOBALS['RootPath']."engine/js/mootools-1.2.1-core-yc.js"); $thisPage->setJava($GLOBALS['RootPath']."engine/js/mootools-1.2-more.js"); $thisPage->setJava($GLOBALS['RootPath']."engine/js/uploadfunctions.js"); $thisPage->setJava($GLOBALS['RootPath']."www/js/web/functions.js"); break; case 2: // Admin $thisPage->setCss($GLOBALS['RootPath']."www/css/admin/layout.css"); $thisPage->setCss($GLOBALS['RootPath']."www/css/admin/form.css"); $thisPage->setCss($GLOBALS['RootPath']."www/css/admin/table.css"); $thisPage->setCss($GLOBALS['RootPath']."www/css/admin/MenuMatic.css"); $thisPage->setJava($GLOBALS['RootPath']."www/js/admin/functions.js"); $thisPage->setJava($GLOBALS['RootPath']."engine/js/mootools-1.2.1-core-yc.js"); $thisPage->setJava($GLOBALS['RootPath']."engine/js/mootools-1.2-more.js"); $thisPage->setJava($GLOBALS['RootPath']."engine/js/MenuMatic_0.68.3.js"); $thisPage->setJsEvent("footer","window.addEvent('domready', function() {var myMenu = new MenuMatic();})"); break; } // Protezione if( $sezione["idaccess"]!=0 || Utility::getPar("logusername","")!=""){ // Verifico il login area riservata Users::checkUser(); Security::checkProtection($sezione['idaccess']); } // Eseguzione delle operazioni execOperations($_POST,1); // RENDERIZZO L'ERRORE Utility::renderError(); // START PAGE $smarty = new Smarty; $smarty->compile_check = true; $smarty->debugging = false; $smarty->caching = false; require_once("pages/".trim($sezione['page'])); $smarty->assign("HEADER",$thisPage->printHeader()); $smarty->assign("FOOTER",$thisPage->getFooter()); $smarty->display('index.tpl'); ?>