public static function refreshHomePageCache() { //check if cache exists if (file_exists(TEMP_URL . 'home.html')) { // retrieve the file $file = file_get_html(VCAAExamController::getBaseURLToLoad(), false, VCAAExamController::getContext()); // delete existing file unlink(TEMP_URL . 'home.html'); // load new file $fo = fopen(TEMP_URL . 'home.html', 'w'); fwrite($fo, $file); fclose($fo); return "Successfully refreshed"; } else { return "Error! Cache does not exist!"; } }
if ($modeIndicator == ExamFetchingMode::SINGLE) { //Retrieve checkbox value $singleModePaperChecked = $_POST['singlePaperChecked']; $singleModeReportChecked = $_POST['singleReportChecked']; //Construct controller $controller = new VCAAExamController($singleModePaperChecked, $singleModeReportChecked, $modeIndicator); echo $controller->output(); exit; } // --- for bulk -> get values and construct if ($modeIndicator == ExamFetchingMode::BULK) { //Retrieve checkbox value $bulkModePaperChecked = $_POST['bulkPaperChecked']; $bulkModeReportChecked = $_POST['bulkReportChecked']; //Construct controller $controller = new VCAAExamController($bulkModePaperChecked, $bulkModeReportChecked, $modeIndicator); // get datas $subj_arr = $_POST['bulk_subject']; $year_arr = $_POST['bulk_year']; if (isset($_POST['from-year']) && isset($_POST['to-year'])) { $from = $_POST['from-year']; $to = $_POST['to-year']; echo $controller->output($subj_arr, $year_arr, $from, $to); } else { echo $controller->output($subj_arr, $year_arr); } // output exit; } } elseif ($_POST['action'] == "sendmail") { // retrieve variables