示例#1
0
    $workshop->cancelWorkshop($_POST['workshop_id'], $_POST['is_cancelled_reason']);
    $loggers['audit']->info("Workshop {$_POST['workshop_id']} cancelled");
} elseif ($_GET['page'] === "update") {
    $workshop->updateWorkshopDetails($_POST, $_POST['row']);
    $loggers['audit']->info("Workshop {$_POST['row']} updated");
} elseif ($_GET['page'] === "exportws") {
    $l10n->addResource(FS_L10N . '/filenames.json');
    $l10n->addResource(FS_WORKSHOPS . '/l10n/workshops.json');
    $result = $workshop->exportWorkshop($_GET['wsid']);
    foreach ($result as &$r) {
        for ($i = 0; $i < sizeof($r); $i++) {
            $r[$l10n->__("csvColumn" . $i)] = $r["column" . $i];
            unset($r["column" . $i]);
        }
    }
    $csv = new \Ventus\Utilities\CSV($result);
    $csv->generate($l10n->__('file.counselling_workshops_registrants', null));
} elseif ($_GET['page'] === "add-to-workshop") {
    $studentws->addToWorkshop($_POST);
    $loggers['audit']->info("Student {$_POST['student_num']} added to workshop {$_POST['workshop_id']}");
} elseif ($_GET['page'] === "remove-from-workshop") {
    $studentws->removeFromWorkShop($_POST);
    $loggers['audit']->info("Student {$_POST['student_num']} removed from workshop {$_POST['workshop_id']}");
} elseif ($_GET['page'] === "numseats-in-workshop") {
    header('Content-Type: text/plain');
    echo $studentws->getNumRemainingSeats($_POST['row']);
    exit;
}
/**
 * View rendering
 */
示例#2
0
文件: calendar.php 项目: hughnguy/php
    $loggers['audit']->info("Appointment status updated for event {$_POST['event_id']} in calendar");
} elseif ($_GET['page'] === "invite") {
    $cal->invitePeople($_POST['event_id'], $_POST['employee_list']);
    $loggers['audit']->info("Employees invited to event {$_POST['event_id']} in calendar");
} elseif ($_GET['page'] === "appointment-list-excel") {
    $l10n->addResource(FS_L10N . '/filenames.json');
    $csv_result = $cal->listStudentAppointments($_GET);
    $l10n->addResource(__DIR__ . '/l10n/calendar.json');
    $l10n->localizeArray($csv_result, 'column1');
    foreach ($csv_result as &$r) {
        for ($i = 0; $i < sizeof($r); $i++) {
            $r[$l10n->__("csvColumn" . $i)] = $r["column" . $i];
            unset($r["column" . $i]);
        }
    }
    $csv = new \Ventus\Utilities\CSV($csv_result);
    $csv->generate($l10n->__('file.calendar_appointment_list'));
} elseif ($_GET['page'] === "get-invitee-info") {
    $invitee_info_array[] = array('invited' => $cal->getInvitees($_POST['event_id'], $_POST['emp_id']), 'creator_alt' => $cal->getCreator($_POST['parent_event_id']), 'invited_alt' => $cal->getInvitees($_POST['parent_event_id'], $_POST['emp_id']));
    header('Content-Type: application/json; charset=utf-8');
    echo json_encode($invitee_info_array);
    exit;
}
/**
 * View rendering
 */
if (isset($render) && $render) {
    require FS_PHP . '/header.php';
    require FS_PHP . '/nav.php';
    if (isset($viewFile) && file_exists($viewFile)) {
        require $viewFile;
示例#3
0
    }
} elseif ($_GET['page'] === "export") {
    $l10n->addResource(FS_L10N . '/filenames.json');
    $l10n->addResource(__DIR__ . '/l10n/denied-requests.json');
    $result = $denied->fetchDeniedExamRequestsForExport($_GET['start'], $_GET['end']);
    foreach ($result as &$r) {
        $r["column4"] = $l10n->__($r["column4"]);
        //The exam type is stored in English in the database
        $r["column7"] = $l10n->__($r["column7"]);
        //The alternate status is stored in English in the database
        for ($i = 0; $i < sizeof($r); $i++) {
            $r[$l10n->__("csvColumn" . $i)] = $r["column" . $i];
            unset($r["column" . $i]);
        }
    }
    $csv = new \Ventus\Utilities\CSV($result);
    $csv->generate($l10n->__('file.exams_denied_csv_export'));
}
/**
 * View rendering
 */
if (isset($render) && $render) {
    $follow_up_pending_count = $follow->fetchFollowUpsCountEmployee($SESSION->user_id);
    require FS_PHP . '/header.php';
    require FS_PHP . '/nav.php';
    if (isset($viewFile) && file_exists($viewFile)) {
        require $viewFile;
    } else {
        require FS_PHP . '/error.php';
    }
    require FS_PHP . '/footer.php';
示例#4
0
    foreach ($noe_confirmed_dropped_students as $ds) {
        $noe_students_array[] = array('student_num' => $ds['student_num'], 'last_name' => $ds['last_name'], 'first_name' => $ds['first_name'], 'email' => $ds['email'], 'startDate' => date("Y-m-d", strtotime($ds['startDate'])), 'endDate' => date("Y-m-d", strtotime($ds['endDate'])), 'status' => "droppedConfirmed:" . $ds['request_id']);
    }
    $noe_denied_dropped_students = $model->fetchDeniedDroppedStudents($_POST);
    foreach ($noe_denied_dropped_students as $ds) {
        $date = date("Y-m-d", strtotime($ds['exam_date']));
        $noe_students_array[] = array('student_num' => $ds['student_num'], 'last_name' => $ds['last_name'], 'first_name' => $ds['first_name'], 'email' => $ds['email'], 'startDate' => $date, 'endDate' => $date, 'status' => "droppedDenied");
    }
    header('Content-Type: application/json; charset=utf-8');
    echo json_encode($noe_students_array);
    exit;
} elseif ($_GET['page'] === "export") {
    $l10n->addResource(FS_L10N . '/filenames.json');
    $l10n->addResource(__DIR__ . '/l10n/list-exams.json');
    $result = $model->fetchNoticeDetailsForExport($SESSION->user_id, $_GET['start'], $_GET['end']);
    foreach ($result as &$r) {
        $r["column2"] = $l10n->__($r["column2"]);
        //The exam type is stored in English in the database
        $r["column5"] = $l10n->__($r["column5"]);
        //The alternate status is stored in English in the database
        for ($i = 0; $i < sizeof($r); $i++) {
            $r[$l10n->__("csvColumn" . $i)] = $r["column" . $i];
            unset($r["column" . $i]);
        }
    }
    $csv = new \Ventus\Utilities\CSV($result);
    $csv->generate($l10n->__('file.faculty_exam_list'));
} else {
    header('Location: https://' . URL_PHP . '/error-external.php?eid=F087');
    exit;
}
示例#5
0
    $l10n->localizeArray($semester, 'previous3_long');
    $l10n->localizeArray($semester, 'next_long');
    $l10n->localizeArray($semester, 'next1_long');
    require_once FS_PHP . '/header-external.php';
    require_once 'views/list-courses.php';
    require_once FS_PHP . '/footer-external.php';
} elseif ($_GET['page'] === "excel") {
    $semester = \Ventus\Utilities\Functions::fetchSemester();
    if (!isset($_GET['sem'])) {
        $selected_semester = $semester['now_short'];
    } else {
        $selected_semester = $_GET['sem'];
    }
    $l10n->addResource(FS_L10N . '/filenames.json');
    $l10n->addResource(__DIR__ . '/l10n/list-courses.json');
    $result = $model->fetchAllCoursesExamsExcel($SESSION->user_id, $selected_semester);
    foreach ($result as &$r) {
        $r["column5"] = $l10n->__($r["column5"]);
        //The exam type is stored in English in the database
        $r["column7"] = $l10n->__($r["column7"]);
        //The alternate status is stored in English in the database
        for ($i = 0; $i < sizeof($r); $i++) {
            $r[$l10n->__("csvColumn" . $i)] = $r["column" . $i];
            unset($r["column" . $i]);
        }
    }
    $csv = new \Ventus\Utilities\CSV($result);
    $csv->generate($l10n->__('file.faculty_course_list'));
} else {
    header('location: https://' . URL_PHP . '/error-external.php?eid=F002');
}
示例#6
0
文件: index.php 项目: hughnguy/php
        $fileName = $l10n->__('file.transcription_exam_transcription_list');
    } else {
        $result_csv = $transcriptions->exportBookTranscriptions();
        $fileName = $l10n->__('file.transcription_book_transcription_list');
    }
    $l10n->addResource(__DIR__ . '/l10n/book-requests.json');
    $l10n->localizeArray($result_csv, 'column2');
    foreach ($result_csv as &$r) {
        $r["column5"] = $l10n->__($r["column5"]);
        //The status column in the database is in English
        for ($i = 0; $i < sizeof($r); $i++) {
            $r[$l10n->__("csvColumn" . $i)] = $r["column" . $i];
            unset($r["column" . $i]);
        }
    }
    $csv = new \Ventus\Utilities\CSV($result_csv);
    $csv->generate($fileName);
}
/**
 * View rendering
 */
if (isset($render) && $render) {
    $follow_up_pending_count = $follow->fetchFollowUpsCountEmployee($SESSION->user_id);
    require FS_PHP . '/header.php';
    require FS_PHP . '/nav.php';
    if (isset($viewFile) && file_exists($viewFile)) {
        require $viewFile;
    } else {
        require FS_PHP . '/error.php';
    }
    require FS_PHP . '/footer.php';
示例#7
0
    $loggers['audit']->info("Exam file {$_POST['file_id']} deleted");
} elseif ($_GET['page'] === "export") {
    $l10n->addResource(FS_L10N . '/filenames.json');
    require_once 'l10n/notice-of-examination.php';
    $result = $noes->fetchNoticeDetailsForExport($_GET['start'], $_GET['end']);
    foreach ($result as &$r) {
        $r["column2"] = $l10n->__($r["column2"]);
        //The exam type is stored in English in the database
        $r["column5"] = $l10n->__($r["column5"]);
        //The alternate status is stored in English in the database
        for ($i = 0; $i < sizeof($r); $i++) {
            $r[$l10n->__("csvColumn" . $i)] = $r["column" . $i];
            unset($r["column" . $i]);
        }
    }
    $csv = new \Ventus\Utilities\CSV($result);
    $csv->generate($l10n->__('file.exams_noe_csv_export'));
}
/**
 * View rendering
 */
if (isset($render) && $render) {
    $follow_up_pending_count = $follow->fetchFollowUpsCountEmployee($SESSION->user_id);
    require FS_PHP . '/header.php';
    require FS_PHP . '/nav.php';
    if (isset($viewFile) && file_exists($viewFile)) {
        require $viewFile;
    } else {
        require FS_PHP . '/error.php';
    }
    require FS_PHP . '/footer.php';
示例#8
0
        $active_exam_accommodations = $model->getAllStudentActiveExamAndTranscriptionAccommodations($r['column0'], $r['column7'], $r['column4'], $r['column5'], $r['column3']);
        if (empty($active_exam_accommodations)) {
            unset($requests[$key]);
        }
    }
    foreach ($requests as &$r) {
        $r["column6"] = $l10n->__($r["column6"]);
        //The exam type is stored in English in the database
        $r["column9"] = $l10n->__($r["column9"]);
        //The alternate status is stored in English in the database
        for ($i = 0; $i < sizeof($r); $i++) {
            $r[$l10n->__("csvColumn" . $i)] = $r["column" . $i];
            unset($r["column" . $i]);
        }
    }
    $csv = new \Ventus\Utilities\CSV($requests);
    $csv->generate($l10n->__('file.exams_unconfirmed_csv_export'));
}
/**
 * View rendering
 */
if (isset($render) && $render) {
    $thisPage = "unconfirmed-requests";
    $follow_up_pending_count = $follow->fetchFollowUpsCountEmployee($SESSION->user_id);
    require FS_PHP . '/header.php';
    require FS_PHP . '/nav.php';
    if (isset($viewFile) && file_exists($viewFile)) {
        require $viewFile;
    } else {
        require FS_PHP . '/error.php';
    }
示例#9
0
    $l10n->localizeArray($semester, 'now_long');
    $l10n->localizeArray($semester, 'previous_long');
    $l10n->localizeArray($semester, 'previous2_long');
    $l10n->localizeArray($semester, 'previous3_long');
    $l10n->localizeArray($semester, 'next_long');
    $l10n->localizeArray($semester, 'next1_long');
    require_once FS_PHP . '/header-external.php';
    require_once 'views/list-students.php';
    require_once FS_PHP . '/footer-external.php';
} elseif ($_GET['page'] === "excel") {
    $semester = \Ventus\Utilities\Functions::fetchSemester();
    if (!isset($_GET['sem'])) {
        $selected_semester = $semester['now_short'];
    } else {
        $selected_semester = $_GET['sem'];
    }
    $l10n->addResource(FS_L10N . '/filenames.json');
    $l10n->addResource(__DIR__ . '/l10n/list-students.json');
    $result = $model->fetchAllStudentsExcel(array("Exam"), $SESSION->user_id, $selected_semester);
    foreach ($result as &$r) {
        for ($i = 0; $i < sizeof($r); $i++) {
            $r[$l10n->__("csvColumn" . $i)] = $r["column" . $i];
            unset($r["column" . $i]);
        }
    }
    $csv = new \Ventus\Utilities\CSV($result);
    $csv->generate($l10n->__('file.faculty_student_list'));
} else {
    header('Location: https://' . URL_PHP . '/error-external.php?eid=F011');
    exit;
}