コード例 #1
0
ファイル: index.php プロジェクト: deanstalker/phpVMS
 */
define('ADMIN_PANEL', true);
include '../core/codon.config.php';
if (!Auth::LoggedIn()) {
    Debug::showCritical('Please login first');
    die;
}
if (!PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) {
    Debug::showCritical('Unauthorized access');
    die;
}
$BaseTemplate = new TemplateSet();
$tplname = Config::Get('ADMIN_SKIN');
if ($tplname == '') {
    $tplname = 'layout';
}
//load the main skin
$settings_file = SITE_ROOT . '/admin/lib/' . $tplname . '/' . $tplname . '.php';
if (file_exists($settings_file)) {
    include $settings_file;
}
$BaseTemplate->template_path = SITE_ROOT . '/admin/lib/' . $tplname;
$BaseTemplate->Set('title', SITE_NAME);
Template::Set('MODULE_NAV_INC', $NAVBAR);
Template::Set('MODULE_HEAD_INC', $HTMLHead);
$BaseTemplate->Show('header.tpl');
flush();
MainController::runAllActions();
$BaseTemplate->Show('footer.tpl');
# Force connection close
DB::close();