���� 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/infohosting/ |
<?php $fmt = new NumberFormatter( 'vi_VN', NumberFormatter::CURRENCY ); $v_infohosting_id = 0; $row_check = $DB->get_colum_tb('tb_infohosting'); $row_check['infohosting_begin'] = date('d-m-Y'); $row_check['infohosting_end'] = date('d-m-Y'); $txt_log = ''; if(isset($CORE->input['infohosting_id']) && $CORE->input['infohosting_id']>0){ $v_infohosting_id = $CORE->input['infohosting_id']; $row_check = $DB->fetch_row($DB->query("SELECT * FROM tb_infohosting WHERE infohosting_id='$v_infohosting_id' ")); $row_check['infohosting_begin'] = date('d-m-Y',strtotime($row_check['infohosting_end'])); $row_check['infohosting_end'] = date('d-m-Y'); //lich sư gia han $txt_log = ''; $q_log = $DB->query("SELECT * FROM tb_infohosting_log WHERE infohosting_id='$v_infohosting_id' ORDER BY time_post ASC"); while ($r_log = $DB->fetch_row($q_log)){ $txt_begin = date('d-m-Y', strtotime($r_log['infohosting_begin'])); $txt_end = date('d-m-Y', strtotime($r_log['infohosting_end'])); $txt_log .= '<tr><td>'.$r_log['infohosting_log_id'].'</td><td>'.$txt_begin.'</td><td>'.$txt_end.'</td><td>'.$fmt->formatCurrency($r_log['infohosting_price'],'VND').'</td><td>'.date('d-m-Y',$r_log['time_post']).'</td><td>'.$r_log['user_post'].'</td><td><a href="?act=management&code=infohosting&type=del_log&infohosting_id='.$v_infohosting_id.'&log_id='.$r_log['infohosting_log_id'].'" onclick="return confirm(\'Bạn có chắc muốn xóa?\')">Xóa</a> </td></tr>'; } } if(isset($CORE->input['submitbt'])) { $f = $CORE->input['f']; $v_infohosting_id = $f['infohosting_id']; if (strtotime($f['infohosting_end']) < strtotime($f['infohosting_begin'])) { exit('Sai thời gian!'); } $txt_begin = date('Y-m-d', strtotime($f['infohosting_begin'])); $txt_end = date('Y-m-d', strtotime($f['infohosting_end'])); $v_pricebegin = preg_replace('/[^0-9]/', '', $f['infohosting_price']); $arr_insert_log = array('infohosting_id' => $v_infohosting_id, 'infohosting_begin' => $txt_begin, 'infohosting_end' => $txt_end, 'infohosting_price' => $v_pricebegin, 'time_post' => time(), 'user_post' => $ob_user->user_name); $row_check_log = $DB->fetch_row($DB->query("SELECT * FROM tb_infohosting_log ORDER BY time_post DESC LIMIT 1 ")); if ($row_check_log['infohosting_end'] > $txt_begin) { exit('Thời gian bắt đầu phải lớn hơn thời gian kết thúc Hosting!'); } $DB->do_insert('tb_infohosting_log',$arr_insert_log); $row_vps = $DB->fetch_row($DB->query("SELECT * FROM tb_infohosting WHERE infohosting_id='$v_infohosting_id' ")); $v_price = $row_vps['infohosting_pricebegin']+$v_pricebegin; $DB->query("UPDATE tb_infohosting SET infohosting_end='$txt_end', infohosting_pricebegin='$v_price' WHERE infohosting_id='".$v_infohosting_id."' "); $print->refresh('?act=management&code=infohosting&type=giahanhosting&infohosting_id='.$v_infohosting_id); } ?>