예제 #1
0
    }
    if (empty($file)) {
        $file = "index";
    }
    include 'includes/legacy.php';
    switch ($op) {
        case 'modload':
            define("LOADED_AS_MODULE", "1");
            // added for the module/system seperation [class007]
            if (file_exists('modules/' . pnVarPrepForOS($name) . '/' . pnVarPrepForOS($file) . '.php')) {
                include 'modules/' . pnVarPrepForOS($name) . '/' . pnVarPrepForOS($file) . '.php';
            } else {
                // Failed to load the module
                $output = new pnHTML();
                //$output->StartPage();
                $output->Text('Failed to load module ' . $module);
                $output->EndPage();
                $output->PrintPage();
                exit;
            }
            break;
        default:
            // Failed to load the module
            $output = new pnHTML();
            //$output->StartPage();
            $output->Text('Sorry, you cannot access this file directly...');
            $output->EndPage();
            $output->PrintPage();
            break;
    }
}