Beispiel #1
0
 }
 if (isset($_POST['deleteRecord']) && $trial->user->canDelete()) {
     if ($_POST['deletePassword'] && $trial->user->checkPassword($_POST['deletePassword'])) {
         $reason = isset($_POST['deleteReason']) ? $_POST['deleteReason'] : NULL;
         $trial->record->deleteAllData($trial->user->getID(), $reason);
         $trial->user->unlinkRecord();
         $_SESSION['message'] = 'The record has been deleted.';
         $return = "index.php";
     } else {
         $_SESSION['error'] = 'You must enter your password correctly to delete the record.';
         $return = "dataentry.php?page=signpt";
     }
     header("Location:{$return}");
     exit;
 }
 $trial->addSignInput($_POST);
 if ($trial->record->isSigned() && $signed != $trial->record->isSigned()) {
     // If record now signed and previously it was unsigned
     if (isset($_POST['incomplete']) && $_POST['comment'] == '') {
         $comment = 'Incomplete record';
         $trial->record->set('comment', $comment);
         $trial->record->saveToDB();
     }
     $_SESSION['message'] = "The record has been signed. Thank you.";
     header("Location:{$return}");
     exit;
 } elseif ($trial->record->isPreSigned() && $presigned != $trial->record->isPreSigned()) {
     if (isset($_POST['incomplete']) && $_POST['comment'] == '') {
         $comment = 'Incomplete record';
         $trial->record->set('comment', $comment);
         $trial->record->saveToDB();