-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /var/www/html/z_admin.bk.240724/php/order.bk/
File Upload :
Current File : /var/www/html/z_admin.bk.240724/php/order.bk/skn.print.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'] , ' »èÁ¦µÇ¾ú°Å³ª ¾ø´Â µ¥ÀÌÅÍÀÔ´Ï´Ù. ' ) ;
########################################################
// skin file
########################################################

	$skins = $skin->skin (	array (
								'frm'		=> 'FORM' ,
								'typeQ'		=> 'ORDER TYPE Q' ,
								'typeS'		=> 'ORDER TYPE S' ,
								'typeT'		=> 'ORDER TYPE T' ,
								'typeM'		=> 'ORDER TYPE M' ,
								'typeMi'	=> 'ORDER TYPE M INFO' ,
								'typeMr'	=> 'ORDER TYPE M REP'
							) , $skinfile ) ;

########################################################
// get data
########################################################

	$query = " from tbl_{$total[table]}_item where ordercode = '{$info[ordercode]}' order by numid asc " ;
	$columns = " * " ;
	$execute = $exe->qry_one ( $query , $columns ) ;

	include define_config_shop_file ;

	$total_item_price = 0 ;

	while ( $rs = $exe->fetch($execute)) {
		$typecode = $rs['item_gubun'] ;
		$rs['title'] = '<a href="/shop/?mode=view&numid=' . $rs['item_no'] . '" target="_blank">' . $rs['item_title'] . '</a>' ;
		$item_repeat = '' ;
		switch ( $typecode ) {
			case 'Q' :
				$item_repeat.= str_foreach ( array (
													'title'		=> '»óǰ' ,
													'qry'		=> number_format($rs['item_qry']) ,
													'price'		=> number_format($rs['item_price']) ,
													'sum_price'	=> number_format($rs['item_qry']*$rs['item_price']) ,
													'etcmemo'	=> '' ) , 'RS' , $skins['typeMi'] ) ;
				$total_price+= ($rs['item_qry']*$rs['item_price']);
				$total_item_price+= $rs['item_qry']*$rs['item_price'] ;
				if ( !empty($rs['order_option'])) {
					$item_repeat.= str_foreach ( array (
														'title'		=> '¼±ÅÃ' ,
														'qry'		=> '' ,
														'price'		=> '' ,
														'sum_price'	=> '' ,
														'etcmemo'	=> $rs['order_option'] ) , 'RS' , $skins['typeMi'] ) ;
				}
				break ;
			case 'S' :
				$tmp1 = unserialize($rs['s_order_size']);
				$tmp2 = unserialize($rs['s_order_qry']);
				$tmp = array();
				foreach ( $tmp2 as $key=>$val ) {
					if ( empty($val)) continue ;
					if ( is_numeric($val)) $tmp[] = $tmp1[$key] . ' : ' . $val ;
				}
				$item_repeat.= str_foreach ( array (
													'title'		=> '»óǰ' ,
													'qry'		=> number_format($rs['item_qry']) ,
													'price'		=> number_format($rs['item_price']) ,
													'sum_price'	=> number_format($rs['item_qry']*$rs['item_price']) ,
													'etcmemo'	=> implode( ' , ' , $tmp ) ) , 'RS' , $skins['typeMi'] ) ;
				$total_price+= ($rs['item_qry']*$rs['item_price']);
				$total_item_price+= $rs['item_qry']*$rs['item_price'] ;
				if ( !empty($rs['order_option'])) {
					$item_repeat.= str_foreach ( array (
														'title'		=> '¼±ÅÃ' ,
														'qry'		=> '' ,
														'price'		=> '' ,
														'sum_price'	=> '' ,
														'etcmemo'	=> $rs['order_option'] ) , 'RS' , $skins['typeMi'] ) ;
				}
				unset($tmp);
				unset($tmp1);
				unset($tmp2);
				break ;
			case 'T' :
				$tmp1 = unserialize($rs['t_order_size']);
				$tmp2 = unserialize($rs['t_order_qry']);
				$tmp = array();
				foreach ( $tmp2 as $key=>$val ) {
					if ( empty($val)) continue ;
					if ( is_numeric($val)) $tmp[] = $tmp1[$key] . ' : ' . $val ;
				}
				$item_repeat.= str_foreach ( array (
													'title'		=> '»óǰ' ,
													'qry'		=> number_format($rs['item_qry']) ,
													'price'		=> number_format($rs['item_price']) ,
													'sum_price'	=> number_format($rs['item_qry']*$rs['item_price']) ,
													'etcmemo'	=> implode( ' , ' , $tmp ) ) , 'RS' , $skins['typeMi'] ) ;
				unset($tmp);
				unset($tmp1);
				unset($tmp2);
				$teamprice = 0 ;
				# ÆÀ¸í
					if ( !empty($rs['t_opt_teamname']) && $rs['t_opt_teampos'] != 'N' ) {
						$teamlen = mb_strlen($rs['t_opt_teamname'], 'EUC-KR') ;
						$teamprice = $teamlen * $rs['t_opt_teamprice'] ;
						$item_repeat.= str_foreach ( array (
															'title'		=> 'ÆÀ¸í' ,
															'qry'		=> number_format($rs['item_qry']) ,
															'price'		=> number_format($teamprice) ,
															'sum_price'	=> number_format($rs['item_qry'] * $teamprice) ,
															'etcmemo'	=> $rs['t_opt_teamname'] . ' ( À§Ä¡ : ' . $team_name_position[$rs['t_opt_teampos']] . ' , ¼ö·® : ' . $teamlen . 'ÀÚ * ' . $rs['item_qry'] . '¸í )' ) , 'RS' , $skins['typeMi'] ) ;
					}
				$total_price+= ($rs['item_qry']*$rs['item_price']) + ($rs['item_qry']*$teamprice);
				$total_item_price+= $rs['item_qry']*$rs['item_price'] ;
				break ;
			case 'M' :
				# Á¤¸®
					if ( $rs['m_opt_arm'] == 'L' ) $rs['title'].= ' (±äÆÈ)' ;
					else if ( $rs['m_opt_arm'] == 'S' ) $rs['title'].= ' (¹ÝÆÈ)' ;
					$item_repeat = '' ;
				# »óǰ
					unset($price_message);
					$price_message = array() ;
					if ( $rs['m_opt_c1code'] == 'Y') {
						$price_message[] = '»óÀÇ' ;
						$rs['item_price']+=$rs['m_opt_c1price'];
					}
					if ( $rs['m_opt_c2code'] == 'Y') {
						$price_message[] = 'ÇÏÀÇ' ;
						$rs['item_price']+=$rs['m_opt_c2price'];
					}
					$item_repeat.= str_foreach ( array (
														'title'		=> '»óǰ' ,
														'qry'		=> number_format($rs['item_qry']) ,
														'price'		=> number_format($rs['item_price']) ,
														'sum_price'	=> number_format($rs['item_qry']*$rs['item_price']) ,
														'etcmemo'	=> '&nbsp' ) , 'RS' , $skins['typeMi'] ) ;
					$item_sum_price = $rs['item_price'] ;
				# ½ºÅ¸Å·
					if ( $rs['m_opt_stocking'] == 'Y' ) {
						$item_repeat.= str_foreach ( array (
															'title'		=> '½ºÅ¸Å·' ,
															'qry'		=> number_format($rs['item_qry']) ,
															'price'		=> number_format($rs['m_opt_stocking_price']) ,
															'sum_price'	=> number_format($rs['item_qry'] * $rs['m_opt_stocking_price']) ,
															'etcmemo'	=> '' ) , 'RS' , $skins['typeMi'] ) ;
						$item_sum_price+= $rs['m_opt_stocking_price'] ;
					}
				# ½ºÆù¼­
					if ( !empty($rs['m_opt_sponsor_code'])) {
						$sponsor_price = $rs['m_opt_sponsor_price'] ;
						$item_repeat.= str_foreach ( array (
															'title'		=> '½ºÆù¼­' ,
															'qry'		=> number_format($rs['item_qry']) ,
															'price'		=> number_format($sponsor_price) ,
															'sum_price'	=> number_format($rs['item_qry'] * $sponsor_price) ,
															'etcmemo'	=> $define_sponsor[$rs['m_opt_sponsor_code']][2] ) , 'RS' , $skins['typeMi'] ) ;
						$item_sum_price+= $sponsor_price ;
					}
				# ¿¥ºí·½
					if ( !empty($rs['m_opt_emblem_code'])) {
						$e_price = $rs['m_opt_emblem_price'] ;
						$e_memo = array();
						if ( $rs['m_opt_emblem_top'] == 'Y' ) { $e_memo[] = '»óÀÇ' ; }
						if ( $rs['m_opt_emblem_bot'] == 'Y' ) { $e_memo[] = 'ÇÏÀÇ' ; }
						$item_repeat.= str_foreach ( array (
															'title'		=> '¿¥ºí·½' ,
															'qry'		=> number_format($rs['item_qry']) ,
															'price'		=> number_format($e_price) ,
															'sum_price'	=> number_format($rs['item_qry'] * $e_price) ,
															'etcmemo'	=> $define_emblem[$rs['m_opt_emblem_code']][1] . ' (' . implode ( ', ' , $e_memo ) . ' ºÎÂø ) ' ) , 'RS' , $skins['typeMi'] ) ;
						$item_sum_price+= $e_price ;
						unset($e_memo);
					}
				# ÆÐÄ¡(ÁÂ)
					if ( !empty($rs['m_opt_patch1_code'])) {
						$patch_price = $rs['m_opt_patch1_price'] ;
						$item_repeat.= str_foreach ( array (
															'title'		=> 'ÆÐÄ¡(ÁÂ)' ,
															'qry'		=> number_format($rs['item_qry']) ,
															'price'		=> number_format($patch_price) ,
															'sum_price'	=> number_format($rs['item_qry'] * $patch_price) ,
															'etcmemo'	=> $define_patch[$rs['m_opt_patch1_code']][0] ) , 'RS' , $skins['typeMi'] ) ;
						$item_sum_price+= $patch_price ;
					}
				# ÆÐÄ¡(¿ì)
					if ( !empty($rs['m_opt_patch2_code'])) {
						$patch_price = $rs['m_opt_patch2_price'] ;
						$item_repeat.= str_foreach ( array (
															'title'		=> 'ÆÐÄ¡(¿ì)' ,
															'qry'		=> number_format($rs['item_qry']) ,
															'price'		=> number_format($patch_price) ,
															'sum_price'	=> number_format($rs['item_qry'] * $patch_price) ,
															'etcmemo'	=> $define_patch[$rs['m_opt_patch2_code']][0] ) , 'RS' , $skins['typeMi'] ) ;
						$item_sum_price+= $patch_price ;
					}
				# ÆÀ¸í
					if ( !empty($rs['m_opt_teamname']) && $rs['m_opt_teampos'] != 'N' ) {
						$teamlen = mb_strlen($rs['m_opt_teamname'], 'EUC-KR') ;
						$teamprice = $teamlen * $rs['m_opt_teamprice'] ;
						$item_repeat.= str_foreach ( array (
															'title'		=> 'ÆÀ¸í' ,
															'qry'		=> number_format($rs['item_qry']) ,
															'price'		=> number_format($rs['m_opt_teamprice']) ,
															'sum_price'	=> number_format($rs['item_qry'] * $rs['m_opt_teamprice']) ,
															'etcmemo'	=> $rs['m_opt_teamname'] . ' ( À§Ä¡ : ' . $team_name_position[$rs['m_opt_teampos']] . ' , ¼ö·® : ' . $teamlen . 'ÀÚ * ' . $rs['item_qry'] . '¸í )' ) , 'RS' , $skins['typeMi'] ) ;
						$item_sum_price+= $teamprice ;
					}
				# ¹øÈ£&À̴ϼÈ
					$tmp_numb_code = '' ;
					if ( !empty($rs['m_opt_numbers_code']) ) {
						$numberhap = array();
						if ( $rs['m_opt_numbers_frt'] == 'Y' ) $numberhap[] = '¾Õ¹øÈ£' ;
						if ( $rs['m_opt_numbers_bck'] == 'Y' ) $numberhap[] = 'µî¹øÈ£' ;
						if ( $rs['m_opt_numbers_bot'] == 'Y' ) $numberhap[] = 'ÇÏÀǹøÈ£' ;
						$numberhap[] = $tmp_numb_code = (empty($rs['m_opt_numbers_code']))?'':$define_numbers[$rs['m_opt_numbers_code']][1] ;
						if ( is_array($numberhap)) {
							$item_repeat.= str_foreach ( array (
																'title'		=> '¹øÈ£ÇÕ' ,
																'qry'		=> number_format($rs['m_opt_total_number_count']) ,
																'price'		=> '' ,
																'sum_price'	=> '' ,
																'etcmemo'	=> implode( ' ' , $numberhap ) ) , 'RS' , $skins['typeMi'] ) ;
							unset($numberhap);
						}
					}
				# ¼¼ºÎ ÁÖ¹® ¸ñ·Ï
					$m_order_size = unserialize($rs['m_order_size']);
					$m_order_char = __unserialize(str_replace("&#039;" , "'" , $rs['m_order_char']));
					$m_order_char_lang = unserialize($rs['m_order_char_lang']);
					$m_order_numb = unserialize($rs['m_order_numb']);
					$inicial_input_count = 0 ;
					asort($m_order_size);
					foreach ( $m_order_size as $key=>$val) {
						if ( empty($val)) continue;
						$t_numb = str_replace( ' ' , '' , $m_order_numb[$key] );
						$t_numb_len = mb_strlen($t_numb, 'EUC-KR') ;
						$p_numb = $rs['m_opt_numbers_frt_price'] + $rs['m_opt_numbers_bck_price'] + $rs['m_opt_numbers_bot_price'] ;
						$t_chars = str_replace( ' ' , '' , $m_order_char[$key]);
						if ( !empty($t_chars)) {
							$inicial_input_count++;
							$trs = array (
									'option'	=> $val ,
									'number'	=> $t_numb ,
									'initials'	=> $m_order_char[$key] ,
									'number_p'	=> ($p_numb>0)?number_format($t_numb_len*$p_numb):'',
									'initials_p'=> number_format($rs['m_opt_initials_' . strtolower($m_order_char_lang[$key])] + $rs['m_opt_goodtaste_price']) ,
								 ) ;
						} else {
							$trs = array (
									'option'	=> $val ,
									'number'	=> $t_numb ,
									'initials'	=> $m_order_char[$key] ,
									'number_p'	=> ($p_numb>0)?number_format($t_numb_len*$p_numb):'',
									'initials_p'=> '' ,
								 ) ;
						}
						$trs['sum1'] = number_format($item_sum_price + un_number_format($trs['number_p']) + un_number_format($trs['initials_p'])) ;
						$total_price+= un_number_format($trs['sum1']) ;
						$trs['sum2'] = number_format($total_price) ;
						$rs['repeat'].= str_foreach( $trs , 'RS' , $skins['typeMr'] ) ;
						$total_item_price+= $rs['item_price'] ;
					}
					if ( $rs['m_opt_goodtaste'] == 'Y') {
						if ( $m_order_char_lang[$key] == 'N' || $m_order_char_lang[$key] == 'SP' )
							$item_repeat.= str_foreach ( array (
																'title'		=> 'À̴ϼÈ' ,
																'qry'		=> number_format($inicial_input_count) ,
																'price'		=> '' ,
																'sum_price'	=> '' ,
																'etcmemo'	=> '¾ÆÄ¡Çü' ) , 'RS' , $skins['typeMi'] ) ;
						else
							$item_repeat.= str_foreach ( array (
																'title'		=> 'À̴ϼÈ' ,
																'qry'		=> number_format($inicial_input_count) ,
																'price'		=> number_format($rs['m_opt_goodtaste_price']) ,
																'sum_price'	=> '' ,
																'etcmemo'	=> '¾ÆÄ¡Çü' ) , 'RS' , $skins['typeMi'] ) ;
					}
				break ;
		}
		$rs['item_repeat'] = $item_repeat ;
		$total_count+= $rs['item_qry'] ;
		$repeat.=  str_foreach ( $rs , 'RS' , $skins['type' . $typecode] ) ;
	}

	$info+= array (
		'repeat'			=> $repeat ,
		'total_count'		=> number_format($total_count) ,
		'point'				=> ( !empty($info['real_no']))?number_format($total_item_price*0.01) . ' ¿ø':'-'
	#	'total_send_price'	=> number_format($info['send_price']) ,
	#	'total_price'		=> number_format($total_price) ,
	) ;

	if ( $info['ReplyCode'] != '0000' ) {
		$info['pay_price'] = 0 ;
		$info['paydate'] = '' ;
		$info['n_state'] = '°áÁ¦½ÇÆÐ' ;
	} else {
		if ( $info['pay_type'] == '3' ) { // Ä«µå°áÁ¦
			$info['frm_card_info'] = '
		  <tr>
			  <td class="pd_l8 titlestyle" height="25">Ä«µå½ÂÀιøÈ£</td>
			  <td class="pd_l8 b">' . $info[ApprovalNo] . '</td>
			  <td class="pd_l8 titlestyle" height="25">PG»ç°Å·¡¹øÈ£</td>
			  <td class="pd_l8 b">' . $info[SequenceNo] . '</td>
		  </tr>
			' ;
		}
	}

	if ( $info['use_point'] == 'Y' ) {
		$info['frm_point'] = '
				<tr>
				  <td class="contentstyle" >»ç¿ëÇÑ Àû¸³±Ý : </td><td align="right" class="contentstyle" > -' . number_format($info['point_price']) . ' ¿ø</td>
				</tr>
		' ;
	}

	if ( $info['pay_type'] == '3' ) {
		$info['frm_card'] = '
				<tr>
				  <td class="contentstyle" >¼¼¾×º°µµ : </td><td align="right" class="contentstyle" > ' . number_format($info['sum_price']*0.1) . ' ¿ø</td>
				</tr>
		' ;
	}
	$info['pay_type'] = $define_shop['°áÁ¦'][$info['pay_type']] ;
	$info['sum_price'] = number_format($info['sum_price']);
	$info['send_price'] = number_format($info['send_price']);
	$info['pay_price'] = number_format($info['pay_price']);
	$info['result_price'] = number_format($info['result_price']);

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

	$result = str_foreach ( $info , 'INFO' , $skins['frm'] ) ;

?>

Copyright © 2017 || Recoded By Mr.Bumblebee