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->Ln(); $pdf->Cell(100, 9, "Presenters: " . $presenters); $pdf->Ln(); $pdf->Cell(100, 9, "Teachers: " . $teachers); $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;