public function luuGiaHan()
 {
     $idctpm = Input::get('idchitietquyensach');
     $ngay_gia_han = Input::get('thoigiangiahan');
     $ngay_hen_tra = Input::get('thoigianhientai');
     $so_ngay_gia_han = (strtotime($ngay_gia_han) - strtotime($ngay_hen_tra)) / 86400;
     $id_dk_gh = DangKiGiaHanSach::max('id');
     $id_dk_gh = ++$id_dk_gh;
     $ngay_gia_han = date('Y-m-d', strtotime($ngay_gia_han));
     $result = DB::statement(DB::raw("CALL insert_gia_han_sach(" . $id_dk_gh . "," . $idctpm . "," . $so_ngay_gia_han . ",'" . $ngay_gia_han . "');"));
     return Redirect::to('/borrows/tables')->with('success_message', 'Bạn đã gia hạn thành công!');
 }
            case 4:
                echo "<input style='color:white !important;'class='btn btn-large btn-info' type='text' value='Đang Giữ Chỗ' readonly>";
                break;
            case 5:
                echo "<input style='color:white !important;'class='btn btn-small' type='text' value='Giữ Chỗ Đã Huỷ' readonly>";
                break;
            default:
                echo "<input style='color:white !important;'class='btn btn-small' type='text' value='Giữ Chỗ Đã Huỷ' readonly>";
                break;
        }
        ?>
                                </td>
                                <td class="center">
                                    <?php 
        if ($quyensach->trang_thai_sach_muon == 1 && $checksn) {
            $checksl = DangKiGiaHanSach::kiemTraTrangThai($quyensach->id);
            if ($checksl) {
                ?>
                                        <img src='<?php 
                echo URL;
                ?>
public/images/icon/edit.gif' width='30px' alt='Gia hạn' title='Gia hạn' onclick='giaHan(<?php 
                echo $quyensach->id;
                ?>
)'/>
                                        <?php 
            }
        }
        ?>
                                </td>
                            </tr>