<div class="textbox">
    <div class="toolbar">
        <div class="pull-left title"><?php echo $page_title; ?></div>
        <div class="pull-right">
            <?php echo anchor('main', "<i class='icon-remove-circle'></i> ปิด", array('class' => 'btn')); ?>
        </div>
        <div class="clear"></div>
    </div>
    <div class="textbox_content">
        <div class="table-search" style="height:20px">
            <strong><?php echo $page_title; ?></strong>
        </div>
        <table class="display normal-t" cellspacing="0" cellpadding="0" border="0">
            <thead>
                <tr>
                    <th width="150">วันเวลาที่จอง</th>
                    <th>จองใช้รถเพื่อ</th>
                    <th width="150">ทะเบียน</th>
                    <th width="90">เมนู</th>
                </tr>
            </thead>
            <tbody>
                <?php
                $irow = 0;
                foreach ($query as $r) {
                    $irow++;
                    $id = $r['id'];
                    echo "<tr>";
                    echo "<td class='center'>" . $mydate->dateToText($r['rdate']) . "<div>".$r['start_time']." - ".$r['end_time']."<div></td>";
                    echo "<td valign='top'>" . $r['name'] . "</td>";
                    echo "<td class='center' valign='top'>" . $r['car_code'] . "</td>";
                    echo "<td class='center'>";
                    echo anchor("approve_car/edit/$id", '<i class="icon-folder-open"></i> แสดง', array('class' => 'btn btn-mini')) . nbs();
                    echo "</td>";
                    echo "</tr>";
                }
                if ($irow == 0) {
                    echo "<tr><td colspan='4' class='center'>*** ไม่มีรายการจองห้องประชุม รออนุมัติ ***</td></tr>";
                }
                ?>
            </tbody>
        </table>
    </div>
</div>
