// Entered from import report form switch ($_POST['todo']) { case RPT_BTN_IMPORT: // Error check input and import the new report $success = ImportReport(trim($_POST['reportname'])); $usrMsg[] = array('message' => $success['message'], 'level' => $success['result']); if ($success['result'] == 'error') { $FormParams = PrepStep('imp'); break; } // All through and imported successfully, return to reports home page // All through and imported successfully, return to reports home page case RPT_BTN_BACK: default: $DropDownString = RetrieveReports(); $FormParams = PrepStep('1'); } break; // End Step 8 } // end switch $Title = $FormParams['title']; // fetch the title for the header.inc file include $PathPrefix . 'includes/header.inc'; if ($usrMsg) { foreach ($usrMsg as $temp) { prnmsg($temp['message'], $temp['level']); } } include $FormParams['IncludePage']; include $PathPrefix . 'includes/footer.inc';
} } // read in fields for next form if ($todo == 'finish') { // then finish was pressed $FormParams = PrepStep('1'); } else { // update was pressed, return to criteria form $temp = RetrieveFields('security'); $temp = array_pop($temp['lists']); $Security = explode(';', $temp['params']); $presets = array(); foreach ($Security as $value) { $presets[substr($value, 0, 1)] = explode(':', substr($value, 2)); } $FormParams = PrepStep('sec'); } } break; // end step 9 // end step 9 default: die('Bad action number: ' . $action); } // end switch /***************** prepare to display templates *************************/ $include_header = false; $include_footer = false; $include_tabs = false; $include_calendar = false; $include_template = $FormParams['IncludePage'];