-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /var/www/html/zbk_admin.bk.200925/php/order.bk/
File Upload :
Current File : /var/www/html/zbk_admin.bk.200925/php/order.bk/act.s6.php

<?php

########################################################
// approve
########################################################

	if ( empty($numid)) script_re($total['cmnall'] , ' Á¢±ÙÇÒ ¼ö ¾ø½À´Ï´Ù. ' ) ;

	$info = $exe->qry_fetch ( " from tbl_{$total[table]} where numid='{$numid}' " , " * " ) ;
	if ( empty($info['numid'])) script_re( $total['cmnall'] , ' »èÁ¦µÇ¾ú°Å³ª ¾ø´Â µ¥ÀÌÅÍÀÔ´Ï´Ù. ' ) ;
	if ( $info['n_state'] == 'Ãë¼Ò' || $info['n_state'] == '¹Ýǰ')
		script_re( $total['cmnnb'] . '&mode=view' , ' ÀÌ¹Ì Ãë¼Ò/¹Ýǰ ó¸®µÈ ÁÖ¹®ÀÔ´Ï´Ù. ' ) ;

	$exe->qry_update ( array (
						'n_state'		=> 'Ãë¼Ò' ,
						'cancel_date'	=> $total['now'] ) , " tbl_{$total[table]} " , " numid='{$numid}' " ) ;

	if ( !empty($info['real_no'])) {
		$m_info = $exe->qry_fetch(" from tbl_{$config[A02][1]} where keycode='A02' and numid='{$info[real_no]}' " , " numid , have_point " ) ;

		if ( $info['in_point'] == 'Y' ) {
			$p_info = $exe->qry_fetch(" from tbl_{$config[A02][1]}_point where order_no = {$numid} and real_no = {$info[real_no]} and point > 0 order by numid desc limit 1 " , " point , totalpoint " );
			if ( $p_info['point'] > 0 ) {
				$exe->qry_insert ( array (
									'keycode'		=> 'A02' ,
									'write_date'	=> $total['now'] ,
									'ip'			=> $total['ip'] ,
									'real_no'		=> $info['real_no'] ,
									'real_id'		=> $info['real_id'] ,
									'order_no'		=> $numid ,
									'point'			=> '-'.$p_info['point'] ,
									'totalpoint'	=> ($p_info['totalpoint'] - $p_info['point'] ) ,
									'contents'		=> 'ÁÖ¹® Ãë¼Ò'
									) , "tbl_{$config[A02][1]}_point" ) ;
				$exe->qry_update(" have_point = have_point - {$p_info[point]} " , "tbl_{$config[A02][1]}" , " numid={$info[real_no]} " ) ;
				$m_info['have_point']-=$p_info['point'];
			}
		}
		if ( $info['use_point'] == 'Y' && $info['point_price'] > 0 ) {
			$exe->qry_insert ( array (
								'keycode'		=> 'A02' ,
								'write_date'	=> $total['now'] ,
								'ip'			=> $total['ip'] ,
								'real_no'		=> $info['real_no'] ,
								'real_id'		=> $info['real_id'] ,
								'order_no'		=> $numid ,
								'point'			=> $info['point_price'] ,
								'totalpoint'	=> ($m_info['have_point'] + $info['point_price'] ) ,
								'contents'		=> 'ÁÖ¹® Ãë¼Ò'
								) , "tbl_{$config[A02][1]}_point" ) ;
			$exe->qry_update(" have_point = have_point + {$info[point_price]} " , "tbl_{$config[A02][1]}" , " numid={$info[real_no]} " ) ;
		}
	}

######################################################
// end
######################################################

	script_re($total['cmnnb'] . '&mode=view#order' ) ;

?>

Copyright © 2017 || Recoded By Mr.Bumblebee