Exemplo n.º 1
0
             fclose($handle);
             $file = array('name' => $files['name'][$i], 'size' => $files['size'][$i], 'type' => $files['type'][$i], 'document_type' => 'medical certificate', 'student_disability_id' => $student_disability_id);
             $model->addStudentDisabilityFile($file, $content);
             $loggers['audit']->info('Disability file added');
         }
     }
     if ($_GET['mode'] === "completed-intake") {
         header('Location: profile.php?mode=completed-intake');
         exit;
     } else {
         header('Location: profile.php');
         exit;
     }
 } else {
     if ($_GET['page'] === "view-attachment") {
         $file = $model->fetchDisabilityFile($_GET['file_id'], $SESSION->student_num);
         header("Content-type: " . $file[0]['type'] . "");
         header("Content-Disposition:attachment; filename=" . str_replace(',', '', $file[0]['name']) . "");
         print $file[0]['content'];
     } else {
         if ($_GET['page'] === "acknowledge-cam") {
             if ($_GET['source'] !== "specialist") {
                 if ($_GET['student_type'] === "undergraduate") {
                     $model->updateEmailPermissionStatus($SESSION->student_num);
                 }
                 $student_num = $SESSION->student_num;
                 $student_email = $SESSION->access_username;
             } else {
                 $student_num = $_POST['student_num'];
                 $student_email = trim($_POST['access_username']);
             }