-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /var/www/html/zbk_admin.220809/php/order.bk/
File Upload :
Current File : /var/www/html/zbk_admin.220809/php/order.bk/act.s5.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 ( !empty($info['real_no']) && $info['in_point'] == 'N' ) {

		$query = " from tbl_{$total[table]}_item where ordercode = '{$info[ordercode]}' order by numid asc " ;
		$columns = " item_gubun , item_qry , item_price , m_opt_c1code , m_opt_c1price , m_opt_c2code , m_opt_c2price , m_order_size " ;
		$execute = $exe->qry_one ( $query , $columns ) ;
		$total_item_price = 0 ;
		while ( $rs = $exe->fetch($execute)) {
			$typecode = $rs['item_gubun'] ;
			switch ( $typecode ) {
				case 'Q' :
				case 'S' :
				case 'T' :
					$total_item_price+= $rs['item_qry']*$rs['item_price'] ;
					break ;
				case 'M' :
						if ( $rs['m_opt_c1code'] == 'Y') {
							$rs['item_price']+=$rs['m_opt_c1price'];
						}
						if ( $rs['m_opt_c2code'] == 'Y') {
							$rs['item_price']+=$rs['m_opt_c2price'];
						}
						$m_order_size = unserialize($rs['m_order_size']);
						foreach ( $m_order_size as $key=>$val) {
							if ( empty($val)) continue;
							$total_item_price+= $rs['item_price'] ;
						}
					break ;
			}
		}

		$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 = $total_item_price * 0.00 ;
		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]} " ) ;
	}

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

	//send_sms( $info_sms['from'] , $info['ohp'] , '°í°´´ÔÀÇ ÁÖ¹®»óǰÀÌ ±ÝÀÏ ¹ß¼ÛµÇ¾ú½À´Ï´Ù. / www.fieldsoccer.co.kr' ) ;

	//include $_SERVER['DOCUMENT_ROOT'] . '/sms/soap_client.php' ;
	//sms($info['ohp'] ,$info_sms['from'] , '°í°´´ÔÀÇ ÁÖ¹®»óǰÀÌ ±ÝÀÏ ¹ß¼ÛµÇ¾ú½À´Ï´Ù. /STARSOCCER'  ,'send') ;
######################################################
// end
######################################################

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

?>

Copyright © 2017 || Recoded By Mr.Bumblebee