���� 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/luckymerchan/code/pages/ |
<?php $where = ''; $slug = $CORE->input['slug'] ?? ''; if($slug!=''){ $where .= " AND b.ftitle='$slug' "; } $r_menu2 = $DB->fetch_row($DB->query("SELECT * FROM tb_menus WHERE menus_fname='$code'")); $r_total = $DB->fetch_row( $DB->query( "SELECT count(*) as total FROM tb_menus_pages a INNER JOIN tb_pages b ON a.pages_id=b.id WHERE a.menus_fname='$code' ")); $q_page = $DB->query("SELECT a.*,b.* FROM tb_menus_pages a INNER JOIN tb_pages b ON a.pages_id=b.id WHERE a.menus_fname='$code' ORDER BY b.noibat DESC, b.time DESC "); $txt_list_title = $title = $body = ''; $i = 1; while($r_page = $DB->fetch_row($q_page)){ if($i==1){ if(empty($slug)) { $slug = $r_page['ftitle']; } $title = $r_page['title']; $body = $r_page['body']; } $active=''; if($r_page['ftitle']==$slug){ $active='active'; } $txt_list_title .= '<a href="/'.$code.'/'.$r_page['ftitle'].'/" class="list-group-item list-group-item-action '.$active.'"> <div class="d-flex w-100 justify-content-between"> <h5 class="mb-1">'.$r_page['title'].'</h5> <small>'.date('d-m-Y',$r_page['time']).'</small> </div> </a>'; $i++; } if(!empty($slug)){ $r_detail = $DB->fetch_row($DB->query(" SELECT a.*,b.* FROM tb_menus_pages a INNER JOIN tb_pages b ON a.pages_id=b.id WHERE a.menus_fname='$code' ".$where." ORDER BY b.noibat DESC, b.time DESC ")); $title = $r_detail['title']; $body = $r_detail['body']; } $CORE->title_page = $r_menu2['menus_name'].' - '.$title; $where = $param_search = ''; if(isset($CORE->input['s'])){ $s = $CORE->input['s']; foreach ($s as $key=>$val){ if($val!='') { $param_search .= '&s['.$key.']='.trim($val); if($key=='date_from'){ $txt_date_from = date('Y-m-d',strtotime($val)); $where .= " AND kqloc_excel_date>='$txt_date_from' "; } if($key=='date_to'){ $txt_date_to = date('Y-m-d',strtotime($val)); $where .= " AND kqloc_excel_date<='$txt_date_to' "; } } } } $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_kqloc_excel WHERE 1 ".$where)); $total = $t['total']; $totalPage = ceil($total / $pageSize); $q_excel = $DB->query("SELECT * FROM tb_kqloc_excel WHERE 1 ".$where." ORDER BY kqloc_excel_date DESC,kqloc_excel_type LIMIT $from, $pageSize"); $txt_list = ''; while($r_excel = $DB->fetch_row($q_excel)){ $arr_data[$r_excel['kqloc_excel_date']][] = array('type'=>$r_excel['kqloc_excel_type'],'date'=>$r_excel['kqloc_excel_date'],'free'=>$r_excel['kqloc_excel_show_free']); $arr_date[] = $r_excel['kqloc_excel_date']; } $arr_date = array_unique($arr_date); if(isset($arr_date) and !empty($arr_date)){ $txt_date = implode("','",$arr_date); } $q_so = $DB->query("SELECT * FROM tb_kqloc WHERE kqloc_date IN ('".$txt_date."') ORDER BY kqloc_so"); $arr_list_so = array(); while($r_so = $DB->fetch_row($q_so)){ if(isset($r_so['kqloc_date']) and $r_so['kqloc_date']!=1) { $arr_list_so[$r_so['kqloc_date']][$r_so['kqloc_type']][] = ' <span style="padding: 5px;background-color: '.$r_so['mau_bg'].'"><span style="color: '.$r_so['mau_text'].'">'.$r_so['kqloc_so'].'</span></span> '; }else{ $arr_list_so[$r_so['kqloc_date']][$r_so['kqloc_type']][] = ''; } } $txt_list = ''; foreach($arr_date as $key=>$val){ foreach($arr_data[$val] as $val2) { $txt_type = ''; $date = $key; if (isset($val2['type'])) { if ($val2['type'] == 1) { $txt_type = 'List 1 ngày'; } else { $txt_type = 'List 6 ngày'; } } $txt_list_so = ''; if (isset($arr_list_so[$val][$val2['type']])) { $txt_list_so = implode('', $arr_list_so[$val][$val2['type']]); } if (isset($val2['free']) and $val2['free'] == 1) { $txt_list .= '<tr><td>' . date('d-m-Y', strtotime($val)) . '</td><td>' . $txt_type . '</td><td>' . $txt_list_so . '</td></tr>'; } else { if(!isset($ob_user->user_id) or $ob_user->user_id==0) { $txt_list .= '<tr><td>' . date('d-m-Y', strtotime($val)) . '</td><td>' . $txt_type . '</td><td><a href="/login.html">Đăng nhập</a> để xem</td></tr>'; }else{ $txt_list .= '<tr><td>' . date('d-m-Y', strtotime($val)) . '</td><td>' . $txt_type . '</td><td>Vào mục <a href="/user/so-loc/">Số lọc</a> để xem</td></tr>'; } } } } $nav = $print->Pagination($totalPage,$pageNum,'pages','index.php?act=pages&code=thong-ke&slug=lich-su-so-loc'.$param_search); ?>