���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/admin.adimi/code/management/infotratruoc/ |
<?php $fmt = new NumberFormatter( 'vi_VN', NumberFormatter::CURRENCY ); $type2 = (isset($CORE->input['type2']) && $CORE->input['type2']>0) ? $CORE->input['type2'] : 0; $where = " WHERE infotratruoc_id>0 "; $s = array(); $param_search = ''; if(isset($CORE->input['s'])){ $s = $CORE->input['s']; $txt_batdau = $txt_end = ''; foreach ($s as $key=>$val){ if(trim($val)!='') { $txt_batdau = date('Y-m-d',strtotime($s['date_begin'])); $txt_end = date('Y-m-d',strtotime($s['date_end'])); //$where .= " AND ".$key." LIKE '%".$val."%' "; $param_search .= '&s[' . $key . ']=' . $val; } } if($txt_batdau!='' and $txt_end!='') { $where .= " AND infotratruoc_ngay BETWEEN '" . $txt_batdau . "' AND '" . $txt_end . "' "; } } switch ($type2){ default: $where .= ""; break; case '1': $time_check_month = time(); $txt_check_month = date('Y-m-d',$time_check_month); $where .= " AND infotratruoc_end>'".$txt_check_month."' "; break; case '2': $time_check_month = time(); $txt_check_month = date('Y-m-d',$time_check_month); $time_check_month_next = time() + (30*24*60*60); $txt_check_month_next = date('Y-m-d',$time_check_month_next); $where .= " AND infotratruoc_end BETWEEN '".$txt_check_month."' AND '".$txt_check_month_next."' "; break; case '3': $time_check_month = time(); $txt_check_month = date('Y-m-d',$time_check_month); $where .= " AND infotratruoc_end<='".$txt_check_month."' "; break; } $pageNum = isset($_GET['pageNum']) ? intval($_GET['pageNum']) : 1; $pageSize = 50; $from = (($pageNum * $pageSize) - $pageSize); $t = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_infotratruoc ".$where)); $total = $t['total']; $totalPage = ceil($total / $pageSize); $q_vps = $DB->query("SELECT * FROM tb_infotratruoc ".$where." ORDER BY infotratruoc_ngay DESC LIMIT $from,$pageSize "); $txt_list=''; $stt=1; $total_tien = 0; while ($r_vps = $DB->fetch_row($q_vps)){ $txt_infotratruoc_ngay = date('d-m-Y',strtotime($r_vps['infotratruoc_ngay'])); $txt_key = ''; if($r_vps['infotratruoc_key']=='mo_tai_khoan'){ $txt_key = 'Mở tài khoản'; }elseif($r_vps['infotratruoc_key']=='mua_them'){ $txt_key = 'Mua thêm'; } $txt_list .= '<tr><td>'.$r_vps['infotratruoc_id'].'</td><td>'.$txt_infotratruoc_ngay.'</td><td>'.$txt_key.'</td><td>'.$fmt->formatCurrency($r_vps['infotratruoc_sotien'],'VND').'</td><td>'.$r_vps['infotratruoc_soluong'].'</td><td>'.$fmt->formatCurrency($r_vps['infotratruoc_total'],'VND').'</td><td><a href="?act=management&code=infotratruoc&type=post&infotratruoc_id='.$r_vps['infotratruoc_id'].'">Chi tiết</a> | <a href="?act=management&code=infotratruoc&type=del&infotratruoc_id='.$r_vps['infotratruoc_id'].'" onclick="return confirm(\'Bạn có chắc muốn xóa?\')">Xóa</a></td></tr>'; $total_tien += $r_vps['infotratruoc_total']; $stt++; } $txt_list .= '<tr><th colspan="5">Total: </th><td class="text-success">'.$fmt->formatCurrency($total_tien,'VND').'</td><td></td></tr>'; $nav = $print->Pagination($totalPage,$pageNum,'menu','?act=management&code=infotratruoc&type2='.$type2); ?>