$sort_order = filter_input(INPUT_GET, 'order'); if ($sort_order == NULL) { $sort_order = 1; } $signup_dates = get_signup_dates_by_grade($user->usr_grade_lvl); $start_date = strtotime($signup_dates['start']); $end_date = strtotime($signup_dates['end']); date_default_timezone_set('America/New_York'); $current_date = time(); $action = filter_input(INPUT_GET, 'action'); $id = 0; $register_id = 0; $is_changing = $is_enrolled; if ($action == "register") { if (!($current_date < $start_date || $current_date > $end_date) || isset($_SESSION['prev_usr_id'])) { $presentations = get_presentation_list($currentSession, $sort_by, $sort_order); include "view.php"; } else { display_user_message("It's not time to enroll yet", "/" . $app_url_path . "/itinerary"); } } else { if ($action == "commit") { $pres_id = filter_input(INPUT_GET, 'pres_id'); $presentation = Presentation::getPresentation($pres_id); // Error -- not time to sign up. if (!isset($_SESSION['prev_usr_id'])) { if ($current_date < $start_date || $current_date > $end_date) { display_user_message("It is not currently time to enroll. Please check the enrollment dates.", "/" . $app_url_path . "/itinerary"); exit; } else { if (!$presentation->has_space()) {
$workshopList = get_workshop_list(); $roomList = get_room_list(); include 'presentation_modify.php'; exit; break; case 'modify_presentation': $choice = filter_input(INPUT_POST, 'choice'); $presenter_names = filter_input(INPUT_POST, 'presenters'); $org_name = filter_input(INPUT_POST, 'organization'); $rm_id = filter_input(INPUT_POST, 'room'); $pres_max_seats = filter_input(INPUT_POST, 'pres_max_capacity'); $wkshp_id = filter_input(INPUT_POST, 'workshop'); $ses_id = filter_input(INPUT_POST, 'session'); if (filter_input(INPUT_POST, 'choice') == "Modify") { modify_presentation($presenter_names, $org_name, $rm_id, $pres_max_seats, $wkshp_id, $ses_id); } $presentationList = get_presentation_list(); include 'presentation_list.php'; exit; break; case 'delete_presentation': $pres_id = filter_input(INPUT_GET, 'pres_id'); delete_presentation($pres_id); $presentationList = get_presentation_list(); include 'presentation_list.php'; exit; break; default: display_error('Unknown workshop action: ' . $action); break; }
require_once "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': include "sheetRequest.php"; break; case 'generates': $choice = filter_input(INPUT_POST, 'choice'); $presentations = get_presentation_list(); $header = array("Name", "Grade", "Academy", "Signature"); $pdf = new signinPDF(); foreach ($presentations as $pres) { $title = $pres['ses_name'] . " sign in"; $teachers = get_teachers_in_ses($pres["pres_id"]); $presenters = get_presenters_in_ses($pres["pres_id"]); $students = get_students_in_ses($pres["pres_id"]); $pdf->AddPage("P", "Letter"); $pdf->SetFont('Arial', '', 12); $pdf->SetY(10); $pdf->Cell(100, 9, "Title: " . $pres['pres_title']); $pdf->Ln(); $pdf->Cell(100, 9, "Room: " . $pres['rm_nbr']); $pdf->Ln(); $pdf->Cell(100, 9, "Session: " . $pres['ses_id'] . " (" . $pres['ses_start'] . " - " . $pres['ses_end'] . ")");
$pdf->Cell(100, 9, "Company: " . $pres['mentor_company']); $pdf->Ln(); $pdf->Cell(100, 9, "Host Teacher: " . $pres['pres_host_teacher']); $pdf->Ln(); $pdf->Cell(100, 9, "Room Number: " . $pres['pres_room']); $pdf->Ln(); $pdf->SetX(50); $pdf->SetDrawColor(50, 60, 100); $pdf->Cell(100, 10, $title, 1, 0, 'C', 0); $pdf->FancyStudent($header, $students); } $pdf->Output('signin.pdf', 'I'); break; case 'generater': $mentor_id = filter_input(INPUT_POST, 'mentor'); $presentations = get_presentation_list($mentor_id, 1); $pdf = new signinPDF(); $pdf->SetAutoPageBreak(false); foreach ($presentations as $pres) { $pdf->AddPage("L", "Letter"); $pdf->SetFont('Arial', '', 50); $WMargin = $pdf->getlMargin() + $pdf->getrMargin(); $HMargin = $pdf->gettMargin() + $pdf->gettMargin(); //have double border $pdf->SetDrawColor(0, 0, 0); $pdf->SetLineWidth(1.25); $pdf->Rect($pdf->getrMargin(), $pdf->gettMargin(), $pdf->getW() - $WMargin, $pdf->getH() - $HMargin); $pdf->Rect($pdf->getrMargin() + 2, $pdf->gettMargin() + 2, $pdf->getW() - $WMargin - 4, $pdf->getH() - $HMargin - 4); //Add Career day info $pdf->Cell(0, $pdf->getH() / 12, "", 0, 1); $pdf->SetFont('Arial', 'B');