<?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>Reservation 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%;table-layout:fixed;text-align:left;" border="1" class="table">
    <tr>
        <th>S.No</th>
        <th>Cardnumber</th>
        <th>Name</th>
        <th>Designation</th>
        <th>Title</th>
        <th>Author</th>
        <th>Reserve Date</th>
        <th>Expiration Date</th>
        <th>Hold Status</th>
    </tr>
    <?php $sno = isset($pdf_sno_start) ? (int) $pdf_sno_start : 1; ?>
    <?php foreach ($report as $row) { ?>
    <tr>
        <td><?php echo $sno++; ?></td>
        <td><?php echo htmlspecialchars((string) $row->cardnumber); ?></td>
        <td><?php echo htmlspecialchars((string) $row->patron_name); ?></td>
        <td><?php echo htmlspecialchars((string) $row->Designation); ?></td>
        <td><?php echo htmlspecialchars((string) $row->title); ?></td>
        <td><?php echo htmlspecialchars((string) $row->author); ?></td>
        <td><?php echo !empty($row->reservedate) ? date('d/m/Y', strtotime($row->reservedate)) : ''; ?></td>
        <td><?php echo !empty($row->expirationdate) ? date('d/m/Y', strtotime($row->expirationdate)) : ''; ?></td>
        <td><?php echo htmlspecialchars((string) $row->hold_status); ?></td>
    </tr>
    <?php } ?>
</table>
</div>
