-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /var/www/html/zbk_20220209_admin/php/order/
File Upload :
Current File : /var/www/html/zbk_20220209_admin/php/order/act.s5sendend.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['pay_price'] != $info['result_price'] )
	#	script_re( $total['cmnnb'] . '&mode=view' , ' ÀÔ±ÝÀÌ È®ÀεÇÁö ¾ÊÀº ÁÖ¹®ÀÔ´Ï´Ù. ' ) ;
	if ( $info['n_state'] == 'Ãë¼Ò' || $info['n_state'] == '¹Ýǰ')
		script_re( $total['cmnnb'] . '&mode=view' , ' ÀÌ¹Ì Ãë¼Ò/¹Ýǰ ó¸®µÈ ÁÖ¹®ÀÔ´Ï´Ù. ' ) ;
	if ( !empty($info['real_no']) && $info['in_point'] == 'N' && $info['order_point'] > 0 ) {

		$lastHistory = $exe->qry_fetch( " from tbl_{$config[A02][1]}_point as mp left outer join tbl_{$config[A02][1]} as m on mp.real_no = m.numid where m.numid = '{$info[real_no]}' order by mp.numid desc limit 1 " , " point , totalpoint , m.numid , m.id " ) ;
		$point_price = $info['order_point'] ;
		if ( empty($lastHistory['numid'])) {
			$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'				=> $point_price ,
								'totalpoint'		=> $point_price ,
								'contents'		=> '¹è¼Û Àû¸³±Ý'
								) , "tbl_{$config[A02][1]}_point" ) ;
		} else {
			$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'				=> $point_price ,
								'totalpoint'		=> ($lastHistory['totalpoint'] + $point_price ) ,
								'contents'		=> '¹è¼Û Àû¸³±Ý'
								) , "tbl_{$config[A02][1]}_point" ) ;
		}
		$exe->qry_update(" have_point = have_point + {$point_price} " , "tbl_{$config[A02][1]}" , " numid={$info[real_no]} " ) ;
	}
	if ( $info['in_point'] == 'N' ) {
		// ÆÇ¸Å·® üũ
		$gsexe = $exe->qry_one(" from tbl_{$total[table]}_gs where orderScode = '{$info[orderScode]}' " , " goods_no , totalqry ") ;
		while ( $gsrs = $exe->fetch($gsexe)) {
			$exe->qry_query(" update tbl_{$config[SHP][1]}_item set salecount = salecount + " . ( empty($gsrs['totalqry']) ? 0 : intval($gsrs['totalqry'])) . " where numid = '{$gsrs[goods_no]}' ") ;
		}
	}

	$exe->qry_update ( array (
						'n_state'					=> '¹è¼Û¿Ï·á' ,
						'sendcmp'				=> $_POST['sendcmp'] ,
						'sendnumber'		=> $_POST['sendnumber'] ,
						'in_point'				=> 'Y' ) , " tbl_{$total[table]} " , " numid='{$numid}' " ) ;

# end

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

?>

Copyright © 2017 || Recoded By Mr.Bumblebee