<?php $this->load->view('report_pdf/pdf_header'); ?>
<?php $show_title = !isset($show_title) ? true : (bool) $show_title; if ($show_title) { ?>
<p style="text-align:center;font-size:14px;margin:5px 0;">
    <b>EBook Report on <?php echo date("d/m/Y", strtotime($today)); ?></b>
</p>

<p style="text-align:left;font-size:13px;margin:5px 0;">
    Total Records : <?php echo report_pdf_total_rows(isset($report) ? $report : array(), isset($pdf_total_rows) ? $pdf_total_rows : null); ?>
</p>
<?php } ?>
<div id="content">
<br><br>
<table style="border-collapse: collapse;width:100%;text-align:left;" border="1" class="table">
    <tr>
        <th>Accession Date</th>
        <th>Accession No</th>
        <th>Title</th>
        <th>Author</th>
        <th>Subject</th>
        <th>Pages</th>
        <th>ISBN</th>
        <th>Publisher</th>
        <th>Year</th>
        <th>File URL</th>
    </tr>
    <?php foreach ($report as $row) { ?>
    <tr>
        <td><?php echo htmlspecialchars((string) $row->Accession_Date); ?></td>
        <td><?php echo htmlspecialchars((string) $row->Accession_No); ?></td>
        <td><?php echo htmlspecialchars((string) $row->Title); ?></td>
        <td><?php echo htmlspecialchars((string) $row->Author); ?></td>
        <td><?php echo htmlspecialchars((string) $row->Subject); ?></td>
        <td><?php echo htmlspecialchars((string) $row->Pages); ?></td>
        <td><?php echo htmlspecialchars((string) $row->ISBN); ?></td>
        <td><?php echo htmlspecialchars((string) $row->Publisher); ?></td>
        <td><?php echo htmlspecialchars((string) $row->Year); ?></td>
        <td><?php echo htmlspecialchars((string) $row->File_URL); ?></td>
    </tr>
    <?php } ?>
</table>
</div>
