示例#1
0
文件: index.php 项目: hughnguy/php
    $l10n->localizeArray($book_data, 'transcription_name');
    $viewFile = 'views/book-requests.php';
} elseif ($_GET['page'] === "view-book-request") {
    $render = true;
    $book_data = $transcriptions->getBookTranscriptionInfo($_GET['id']);
    $log_data = $transcriptions->fetchTranscriptionLog($_GET['id']);
    $l10n->addResource(__DIR__ . '/l10n/book-details.json');
    $viewFile = 'views/book-details.php';
} elseif ($_GET['page'] === "exam-requests") {
    $render = true;
    $examData = $transcriptions->getAllExamTranscriptionRequests();
    $l10n->addResource(__DIR__ . '/l10n/exam-requests.json');
    $viewFile = 'views/exam-requests.php';
} elseif ($_GET['page'] === "view-exam-request") {
    $render = true;
    $exam_data = $transcriptions->getExamTranscriptionInfo($_GET['id']);
    $log_data = $transcriptions->fetchTranscriptionLog($_GET['id']);
    $l10n->addResource(__DIR__ . '/l10n/exam-details.json');
    $viewFile = 'views/exam-details.php';
} elseif ($_GET['page'] === 'update-log-status') {
    $transcriptions->insertTranscriptionLog($SESSION->user_id, $_POST);
    $transcriptions->updateBookStatus($_POST['request_id'], $_POST['status']);
    $loggers['audit']->info("Status for transcription {$_POST['request_id']} changed to {$_POST['status']}");
} elseif ($_GET['page'] === "excelall") {
    $l10n->addResource(FS_L10N . '/filenames.json');
    if ($_GET['action'] === 'examExcel') {
        $result_csv = $transcriptions->exportExamAll();
        $fileName = $l10n->__('file.transcription_exam_transcription_list');
    } else {
        $result_csv = $transcriptions->exportBookTranscriptions();
        $fileName = $l10n->__('file.transcription_book_transcription_list');