SetLanguage('it'); $gPluginManager->mDb = &$gDb; $gPluginManager->mTpl = $gTpl; $gPluginManager->mConf = &$gPageConfiguration; include('plugins.inc.php'); $gDb->SetTablePrefix($gPageConfiguration['DatabaseTablePrefix']); $gDb->Connect($gPageConfiguration['DatabaseServer'], $gPageConfiguration['DatabaseUser'], $gPageConfiguration['DatabasePassword']); $gDb->SelectDb($gPageConfiguration['DatabaseName']); if($options == 'external') { $gPluginManager->ProcessExternalAll(); $gDb->Disconnect(); exit; } if(!isset($_GET['section'])) { $_GET['section'] = 'content'; $_GET['action'] = 'show'; $_GET['content_id'] = 30; } $gTpl->SetLanguageFilePath('templates/language/'); $gTpl->Load('templates/main.htm'); $gTpl->GlobalReplace('BASEPATH', $gPageConfiguration['BasePath']); $gTpl->GlobalReplace('ABSOLUTEPATH', $gPageConfiguration['AbsolutePagePath']); // Get all javascripts needed by plugins $PluginScripts = $gPluginManager->GetScript(); foreach($PluginScripts AS $script) { $gTpl->Replace('jsscript', 'FILENAME', $script); $scripts .= $gTpl->Output('jsscript'); } $gTpl->GlobalReplace('JSSCRIPTS', $scripts); $gTpl->GlobalReplace('STYLE', $gPluginManager->GetStyle()); echo $gTpl->Output('head'); $styles = $gPluginManager->GetStyle(); foreach($styles AS $style) { $gTpl->Replace('css_style', 'PATH', $style); echo $gTpl->Output('css_style') ; } $gTpl->Replace('body', 'RANDOM', get_random_image()); echo $gTpl->Output('body'); $gPluginManager->ProcessLeftMenuAll(); echo $gTpl->Output('left_menu'); $gPluginManager->ProcessFrontendAll(); echo $gTpl->Output('footer'); $gDb->Disconnect(); ?>