当前位置: 首页>>代码示例>>PHP>>正文


PHP General::getIdNguoiMuon方法代码示例

本文整理汇总了PHP中General::getIdNguoiMuon方法的典型用法代码示例。如果您正苦于以下问题:PHP General::getIdNguoiMuon方法的具体用法?PHP General::getIdNguoiMuon怎么用?PHP General::getIdNguoiMuon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在General的用法示例。


在下文中一共展示了General::getIdNguoiMuon方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: updatedetail

 public function updatedetail()
 {
     $id = Input::get('txtidChitietPhieu');
     $BarCode = str_replace(" ", "", Input::get('txtMaBarCode'));
     $idSach = General::getIdSach($BarCode);
     //        $thoigianmuon = Input::get('txtThoiGianMuon');
     $thoigianhentra = Input::get('txtThoiGianHenTra');
     $ghichu = str_replace("  ", " ", Input::get('txtGhiChu'));
     $tthoatdong = Input::get('trangthai');
     $idNguoiCapNhat = General::getId(Auth::user()->ma_so_the);
     //Kiểm tra trạng thái chi tiết phiếu mượn -> quyển sách -> đầu sách ->banner.
     $tthoatdongold = General::getTrangThaiSachMuon($id);
     if ($tthoatdong != $tthoatdongold) {
         //Trạng thái sách trả
         if ($tthoatdong == 0) {
             $now = date('Y-m-d', time());
             if ($thoigianhentra < $now) {
                 $idNguoiMuon = General::getIdNguoiMuon(General::getIdPhieuMuon($id));
                 $CountBanner = DB::table('banned_tk')->select(DB::raw('count(*) as tong'))->where('banned_tk.id_nguoi_bi_banned', $idNguoiMuon)->get();
                 if ($CountBanner[0]->tong == 0) {
                     $idNguoiBiBan = $idNguoiMuon;
                     $SoNgayBan = SO_NGAY_BANNED_LAN_NHAT;
                     $NgayBatDau = $now;
                     $LyDo = "Trả sách trể hẹn";
                     $IdNguoiBan = General::getId(Auth::user()->ma_so_the);
                     $ThoiGianTacVu = date('Y-m-d H:i:s', time());
                     $TrangThaiBan = 0;
                     $result = DB::table('banned_tk')->insert(array('id_nguoi_bi_banned' => $idNguoiBiBan, 'so_ngay_banned' => $SoNgayBan, 'ngay_bat_dau' => $NgayBatDau, 'ly_do_banned' => $LyDo, 'id_nguoi_banned' => $IdNguoiBan, 'thoi_gian_tac_vu' => $ThoiGianTacVu, 'trang_thai_ban' => $TrangThaiBan));
                 } else {
                     if ($CountBanner[0]->tong == 1) {
                         $idNguoiBiBan = $idNguoiMuon;
                         $SoNgayBan = SO_NGAY_BANNED_LAN_HAI;
                         $NgayBatDau = $now;
                         $LyDo = "Trả sách trể hẹn";
                         $IdNguoiBan = General::getId(Auth::user()->ma_so_the);
                         $ThoiGianTacVu = date('Y-m-d H:i:s', time());
                         $TrangThaiBan = 0;
                         $result = DB::table('banned_tk')->insert(array('id_nguoi_bi_banned' => $idNguoiBiBan, 'so_ngay_banned' => $SoNgayBan, 'ngay_bat_dau' => $NgayBatDau, 'ly_do_banned' => $LyDo, 'id_nguoi_banned' => $IdNguoiBan, 'thoi_gian_tac_vu' => $ThoiGianTacVu, 'trang_thai_ban' => $TrangThaiBan));
                     } else {
                         $idNguoiBiBan = $idNguoiMuon;
                         $NgayBatDau = $now;
                         $LyDo = "Trả sách trể hẹn";
                         $IdNguoiBan = General::getId(Auth::user()->ma_so_the);
                         $ThoiGianTacVu = date('Y-m-d H:i:s', time());
                         $TrangThaiBan = 1;
                         $result = DB::table('banned_tk')->insert(array('id_nguoi_bi_banned' => $idNguoiBiBan, 'ngay_bat_dau' => $NgayBatDau, 'ly_do_banned' => $LyDo, 'id_nguoi_banned' => $IdNguoiBan, 'thoi_gian_tac_vu' => $ThoiGianTacVu, 'trang_thai_ban' => $TrangThaiBan));
                     }
                 }
             }
         } else {
             if ($tthoatdong == 2) {
                 $now = date('Y-m-d', time());
                 if ($thoigianhentra < $now) {
                     $idNguoiMuon = General::getIdNguoiMuon(General::getIdPhieuMuon($id));
                     $CountBanner = DB::table('banned_tk')->select(DB::raw('count(*) as tong'))->where('banned_tk.id_nguoi_bi_banned', $idNguoiMuon)->get();
                     if ($CountBanner[0]->tong == 0) {
                         $idNguoiBiBan = $idNguoiMuon;
                         $SoNgayBan = SO_NGAY_BANNED_LAN_NHAT;
                         $NgayBatDau = $now;
                         $LyDo = "Trả sách trể hẹn";
                         $IdNguoiBan = General::getId(Auth::user()->ma_so_the);
                         $ThoiGianTacVu = date('Y-m-d H:i:s', time());
                         $TrangThaiBan = 0;
                         $result = DB::table('banned_tk')->insert(array('id_nguoi_bi_banned' => $idNguoiBiBan, 'so_ngay_banned' => $SoNgayBan, 'ngay_bat_dau' => $NgayBatDau, 'ly_do_banned' => $LyDo, 'id_nguoi_banned' => $IdNguoiBan, 'thoi_gian_tac_vu' => $ThoiGianTacVu, 'trang_thai_ban' => $TrangThaiBan));
                     } else {
                         if ($CountBanner[0]->tong == 1) {
                             $idNguoiBiBan = $idNguoiMuon;
                             $SoNgayBan = SO_NGAY_BANNED_LAN_HAI;
                             $NgayBatDau = $now;
                             $LyDo = "Trả sách trể hẹn";
                             $IdNguoiBan = General::getId(Auth::user()->ma_so_the);
                             $ThoiGianTacVu = date('Y-m-d H:i:s', time());
                             $TrangThaiBan = 0;
                             $result = DB::table('banned_tk')->insert(array('id_nguoi_bi_banned' => $idNguoiBiBan, 'so_ngay_banned' => $SoNgayBan, 'ngay_bat_dau' => $NgayBatDau, 'ly_do_banned' => $LyDo, 'id_nguoi_banned' => $IdNguoiBan, 'thoi_gian_tac_vu' => $ThoiGianTacVu, 'trang_thai_ban' => $TrangThaiBan));
                         } else {
                             $idNguoiBiBan = $idNguoiMuon;
                             $NgayBatDau = $now;
                             $LyDo = "Trả sách trể hẹn";
                             $IdNguoiBan = General::getId(Auth::user()->ma_so_the);
                             $ThoiGianTacVu = date('Y-m-d H:i:s', time());
                             $TrangThaiBan = 1;
                             $result = DB::table('banned_tk')->insert(array('id_nguoi_bi_banned' => $idNguoiBiBan, 'ngay_bat_dau' => $NgayBatDau, 'ly_do_banned' => $LyDo, 'id_nguoi_banned' => $IdNguoiBan, 'thoi_gian_tac_vu' => $ThoiGianTacVu, 'trang_thai_ban' => $TrangThaiBan));
                         }
                     }
                 }
                 //-------------------.
             } else {
                 if ($tthoatdong == 3) {
                     $idQuyenSach = $idSach;
                     //Cập nhật sách mượn (quyển sach).
                     $RowAction = DB::update('update quyen_sach set trang_thai_sach=0 where id=?', array($idQuyenSach));
                     //-------------------------------.
                     $idDauSach = General::getIdDauSach($idQuyenSach);
                     $CountDauSach = DB::table('quyen_sach')->select(DB::raw('count(*) as tong'))->where('quyen_sach.id_dau_sach', $idDauSach, 'and')->where('quyen_sach.trang_thai_sach', 1)->get();
                     if ($CountDauSach[0]->tong == 0) {
                         //Cập nhật đầu sách (đầu sách).
                         $RowAction = DB::update('update dau_sach set trang_thai_dau_sach=0 where id=?', array($idDauSach));
                         //-------------------------------.
                     }
                 }
//.........这里部分代码省略.........
开发者ID:ngogiangthanh,项目名称:code-nien-luan-ktpm-k36,代码行数:101,代码来源:ThuThuQuanLyMuonTra.php

示例2: date

                        <span class="input-group-addon">Mã BarCode:</span>
                        <input type="text" name="txtMaBarCode" id="iduserid" class="form-control" maxlength="11" placehoder="Thời gian hẹn trả"/>
                    </div>
                    <div class="input-group">
                        <span class="input-group-addon">Thời Gian Mượn:</span>
                        <input type="text" name="txtThoiGianMuon" id="ThoiGianMuonId" class="form-control" placehoder="Thời gian mượn" value="<?php 
echo date('d/m/Y', time());
?>
" readonly/>
                    </div>
                    <div class="input-group">
                        <span class="input-group-addon">Thời Gian Hẹn Trả:</span>
                        <input type="text" name="txtThoiGianHenTra" id="ThoiGianHenTraId" class="form-control" placehoder="Thời gian hẹn trả" value="<?php 
$now = time();
$add = 86400;
if (General::getIdQuyenHan(General::getIdNguoiMuon(General::getIdPhieu(ThuThuQuanLyMuonTra::getMaSoVuaNhap()))) == 4) {
    $add = $add * SO_NGAY_MUON_SV;
} else {
    $add = $add * SO_NGAY_MUON_CB;
}
$new = $add + $now;
echo date('d/m/Y', $new);
?>
" readonly/>
                    </div>
                    <div class="input-group">
                        <span class="input-group-addon">Ghi Chú:</span>
                        <input type="text" name="txtGhiChu" id="GhiChulId" class="form-control" placehoder="Ghi Chú"/>
                    </div>
                    <div class="input-group">
                        <span class="input-group-addon">Mã Số Người Nhập:</span>
开发者ID:ngogiangthanh,项目名称:code-nien-luan-ktpm-k36,代码行数:31,代码来源:create.blade.php

示例3: date

                        <input type="text" class="form-control" placeholder="Thời gian mượn" name="txtThoiGianMuon" id="txtThoiGianMuonId" value="<?php 
    echo date('d/m/Y', strtotime($Phieu->thoi_gian_muon));
    ?>
" readonly/>
                    </div>
                    <div class="input-group">
                        <span class="input-group-addon">Thời Gian Hẹn Trả:</span>
                        <input type="date" class="form-control" placeholder="Thời gian hẹn trả" name="txtThoiGianHenTra" id="txtThoiGianHenTraId" value="<?php 
    echo $Phieu->thoi_gian_hen_tra;
    ?>
" 
                               min="<?php 
    echo date("Y-m-d", strtotime($Phieu->thoi_gian_hen_tra));
    ?>
" <?php 
    if (General::getIdQuyenHan(General::getIdNguoiMuon(General::getIdPhieuMuon($Phieu->id))) == 4) {
        ?>
 max="<?php 
        echo date("Y-m-d", strtotime($Phieu->thoi_gian_hen_tra) + 86400 * SO_NGAY_MUON_SV);
        ?>
" <?php 
    } else {
        ?>
 max="<?php 
        echo date("Y-m-d", strtotime($Phieu->thoi_gian_hen_tra) + 86400 * SO_NGAY_MUON_CB);
        ?>
" <?php 
    }
    ?>
/>
                    </div>
开发者ID:ngogiangthanh,项目名称:code-nien-luan-ktpm-k36,代码行数:31,代码来源:editdetail.blade.php


注:本文中的General::getIdNguoiMuon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。