$NewDefaults['defaults']['displaydesc'] = $_POST['DisplayDesc']; if (isset($_POST['Params'])) { $NewDefaults['defaults']['params'] = $_POST['Params']; } if ($_POST['todo'] == RPT_BTN_ADDNEW) { // add new so insert $NewDefaults['defaults']['buttonvalue'] = RPT_BTN_ADDNEW; } else { // exists, so update it. $NewDefaults['defaults']['buttonvalue'] = RPT_BTN_CHANGE; } } else { // fetch the input results and save them if ($_POST['todo'] == RPT_BTN_ADDNEW) { // add new so insert $success = InsertSequence($_POST['SeqNum'], $EntryType); } else { // record exists, so update it. $success = UpdateSequence($EntryType); } } $reportname = $_POST['ReportName']; $FormParams = PrepStep('6'); break; case RPT_BTN_UPDATE: // update the date and general options fields, reload form // update the date and general options fields, reload form case RPT_BTN_FINISH: // update fields and return to report manager screen // update fields and return to report manager screen default:
$NewDefaults['defaults']['displaydesc'] = $_POST['sDisplayDesc']; $NewDefaults['defaults']['params'] = array('default' => $_POST['sParamsDef'] ? '1' : '0'); break; case 'critlist': $NewDefaults['defaults']['seqnum'] = $_POST['cSeqNum']; $NewDefaults['defaults']['fieldname'] = $_POST['cFieldName']; $NewDefaults['defaults']['displaydesc'] = $_POST['cDisplayDesc']; $NewDefaults['defaults']['params'] = array('value' => $_POST['cParamsVal'], 'min_val' => $_POST['MinValue'], 'max_val' => $_POST['MaxValue']); break; } $NewDefaults['defaults']['buttonvalue'] = $todo == 'add' ? TEXT_ADD : TEXT_CHANGE; } else { // fetch the input results and save them if ($todo == 'add') { // add new so insert $success = InsertSequence($SeqNum, $EntryType); } else { // record exists, so update it. $success = UpdateSequence($SeqNum, $EntryType); } } $FormParams = PrepStep('6'); break; case 'update': // update the date and general options fields, reload form // update the date and general options fields, reload form case 'continue': // update fields and return to report manager screen // update fields and return to report manager screen default: // bail to reports home