예제 #1
0
파일: process.php 프로젝트: uhtoff/eCRF
                 $_SESSION['error'] = "A user has already been registered with this email address.";
                 $_SESSION['inputErr']['dupEmail'] = 1;
             } else {
                 // No duplicates found so add to database and generate emails
                 $data->createNewUser();
                 // Generate username and set privilege ID to 99
                 if ($_POST['register-localadmin']) {
                     $newPriv = 98;
                 } else {
                     $newPriv = 99;
                 }
                 $data->setPrivilege($newPriv);
                 $data->saveToDB();
                 $data->getFromDB();
                 $email = $data->writeEmail($include);
                 $mail = $trial->sendEmail($email);
                 $_SESSION['message'] = 'You have been registered and are in the queue for validation.';
                 header("Location:index.php");
                 exit;
             }
         }
     }
     if (isset($data)) {
         $_SESSION[$include] = $data;
     }
     header("Location:index.php?page={$include}");
     exit;
     break;
 case 'testregister':
     $path = $_SERVER['DOCUMENT_ROOT'];
     require_once $path . '/addons/recaptchalib.php';
예제 #2
0
파일: adddata.php 프로젝트: uhtoff/eCRF
     } else {
         $_SESSION['error'] = "You must complete the form to discontinue a patient from the trial.  Please try again.";
         header("Location:index.php");
         exit;
     }
 } else {
     if ($page === 'adverseevent') {
         unset($_SESSION['inputErr']);
         $ae = new AdverseEvent();
         $complete = $trial->addUserInput($_POST, $ae);
         $ae->makeActive();
         if ($complete) {
             $ae->saveToDB();
             $trial->addAdverseEvent($ae);
             $email = $trial->generateAdverseEventEmail();
             $trial->sendEmail($email);
             $_SESSION['message'] = "Thank you for recording this adverse event.";
         } else {
             $_SESSION['error'] = "You must complete the adverse event form in its entirety, please try again.";
         }
         header("Location:index.php");
         exit;
     } else {
         if ($page === 'violation') {
             unset($_SESSION['inputErr']);
             $v = new Violation();
             $complete = $trial->addUserInput($_POST, $v);
             if ($complete) {
                 if (!$v->hasViolation()) {
                     $_SESSION['error'] = 'No deviation was selected. Please try again.';
                 } else {