<?php require_once '../../util/main.php'; require_once '../../model/workshop_admin_db.php'; $action = strtolower(filter_input(INPUT_POST, 'action')); if ($action == NULL) { $action = strtolower(filter_input(INPUT_GET, 'action')); if ($action == NULL) { $action = 'time_select'; } } verify_admin(); switch ($action) { case 'time_select': $session1 = get_session_times(1); $session2 = get_session_times(2); include "./view.php"; break; case 'modify_times': $choice = filter_input(INPUT_POST, 'choice'); if ($choice == "Modify") { $start1 = filter_input(INPUT_POST, 'start1'); $start2 = filter_input(INPUT_POST, 'start2'); $end1 = filter_input(INPUT_POST, 'end1'); $end2 = filter_input(INPUT_POST, 'end2'); update_session_times($start1, $end1, $start2, $end2); } header("Location: .."); break; default: display_error('Unknown account action: ' . $action);
include "../../model/signins_db.php"; include "signInPDF.php"; verify_admin(); $action = strtolower(filter_input(INPUT_POST, 'action')); if ($action == NULL) { $action = strtolower(filter_input(INPUT_GET, 'action')); if ($action == NULL) { $action = 'show_generate_page'; } } switch ($action) { case 'show_generate_page': $choice = filter_input(INPUT_POST, 'choice'); $mentors = get_mentors(); $mentor_id = filter_input(INPUT_POST, 'mentor_id'); $sessions = get_session_times(); $session_id = filter_input(INPUT_POST, 'ses_id'); include "sheetRequest.php"; break; case 'generatet': $title = "Mentor Check In"; $mentorList = get_mentors(); $mentors = array(); foreach ($mentorList as $mentorInfo) { array_push($mentors, array($mentorInfo['pres_room'], $mentorInfo['pres_host_teacher'], $mentorInfo['mentor_last_name'], $mentorInfo['mentor_first_name'], $mentorInfo['mentor_company'])); } $header = array("X", "Name", "Company", "Host Teacher", "Rm #"); $pdf = new signinPDF(); $pdf->AddPage("P", "Letter"); $pdf->SetFont('Arial', 'B', 12); $pdf->SetXY(50, 20);