} 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; } }
/** * composite function for generic confirmation of action * * @param string $confirm_text Confirmation message to display * @param string $confirm_url URL to go to if confirm button is clicked * @param string $cancel_text Link text cor the cancel message * @param string $cancel_url URL to go to is action is canceled * @param array $arg An array of args to create hidden fields for * * @access public */ function ConfirmAction($confirm_text, $confirm_url, $cancel_text, $cancel_url, $arg = array()) { $compoutput = new pnHTML(); $compoutput->FormStart($confirm_url); $compoutput->Text($confirm_text); $compoutput->Linebreak(2); $arg['confirm'] = 1; $arg['authid'] = pnSecGenAuthKey(); $arg['confirmation'] = 1; $compoutput->FormHidden($arg); $compoutput->FormSubmit(_CONFIRM); $compoutput->Linebreak(2); $compoutput->URL($cancel_url, $cancel_text); $compoutput->FormEnd(); if ($this->GetOutputMode() == _PNH_RETURNOUTPUT) { $compoutput->SetOutputMode(_PNH_RETURNOUTPUT); return $compoutput->PrintPage(); } else { $compoutput->SetOutputMode(_PNH_RETURNOUTPUT); $this->output .= $compoutput->GetOutput(); } }