<?php
session_start();
error_reporting(0);
require_once('../admin/TCPDF-main/tcpdf.php');
include '../admin/includes/database.php';
include '../admin/includes/functions.php';

$conn = new Functions();
$admin_url = $conn->base_url();

if(isset($_POST['generate-report'])){
    $name = str_replace('-', ' ', $_POST['name']);
    $exam = str_replace('-', ' ', $_POST['exam']);
    $year = str_replace('-', '/', $_POST['year']);
    $class =str_replace('-', ' ', $_POST['class']);
    $section = str_replace('-', ' ', $_POST['section']);
    $zero = 0;


    // Include the flexible terminal report generator
    include_once 'flexible_terminal_report.php';

}else{
    //return back to index page

    header("location: index");
}
// ---------------------------------------------------------

// close and output PDF document
$pdf->Output('terminal_report.pdf', 'I');

//============================================================+
// END OF FILE
//============================================================+