-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /var/www/html/z_product.bk.230817/php/order/
File Upload :
Current File : /var/www/html/z_product.bk.230817/php/order/step01_orderform.php

<?
/*
 *  checking
 *  ordertype
 * 			CM : cart , member
 * 			CN : cart , none member
 * 			DM : direct , member
 * 			DN : direct , none member
 */
	include_once( 'inc/cart.php') ;

	$skins = $skin->skin ( array ( 'frm' => 'FORM' ) , $skinfile ) ;

	$cartQuery = '' ;
	switch ( $_POST['ordertype']) {
		case 'CM' : $cartQuery = " ct.Ltype = 'C' and real_no = '{$total[loginno]}' " ; 		break ;
		case 'CN' : $cartQuery = " ct.Ltype = 'C' and ct.cart_id = '{$cart_id}' " ; 				break ;
		case 'DM' :
		case 'DN' :
			if ( empty($_POST['ordercode'])) script_re ( '/' , ' À¯È¿ÇÏÁö ¾ÊÀº Á¢±ÙÀÔ´Ï´Ù. ')  ;
			$cartQuery = " ct.Ltype = 'D' and ct.cart_id = '{$_POST[ordercode]}' " . ( !empty($total['loginno']) ? " and real_no = '{$total[loginno]}' " : "" ) ;
			break ;
		default :
				script_re ( '/' , ' À߸øµÈ Á¢±ÙÀÔ´Ï´Ù. ') ;
	}

# get member info
	unset($mem) ;
	$skn_point = '' ;
	if ( !empty($total['loginno'])) {
		$mem = $exe->qry_fetch(" from tbl_{$config[A02][1]} where numid = '{$total[loginno]}' " , " numid , name , tel , hp , email , zipcode , addr1 , addr2 , have_point ") ;
		if ( empty($mem['numid'])) script_re ( '/mypage/?mode=logout' , ' ȸ¿ø Á¤º¸¸¦ ãÀ» ¼ö ¾ø½À´Ï´Ù. ') ;

		$tel = explode( '-' , $mem['tel']) ;
		$hp = explode( '-' , $mem['hp']) ;
		//$email = explode( '@' , $mem['email']) ;
		$zipcode = explode( '-' , $mem['zipcode']) ;

		$skn_point = '
				<tr>
					<td height="25" class="pd_l8" colspan="2" style="border-bottom:1px solid #cde5dc;border-left:1px solid #cde5dc;border-right:1px solid #cde5dc;background-color:#eee;">
						<span style="font-weight:bold;margin-right:100px;">Àû¸³±Ý »ç¿ë</span> <input type="text" name="usepoint" value="" onblur=" checking_usepoint(); " size="7">¿ø <input type="checkbox" name="allUsepoint" value="Y" onclick=" checking_Allusepoint(); "> Àü¾×Àû¿ë(' . number_format($mem['have_point']) . '¿ø) </td>
				</tr>
		' ;
	}

# order goods
	include_once( 'inc/function.orderfrm.php') ;

	$execute = $exe->qry_one( " from {$tblCart} as ct left outer join tbl_{$total[table]}_item as it on ct.goods_no = it.numid " .
		  " where {$cartQuery} order by ct.write_date asc " ,
		  " it.* , ct.numid as cart_no , ct.file1 as userAttachfile , ct.contents as userComment " .
		  " , ct.totalqry , ct.top_qry , ct.bot_qry , ct.armS , ct.armL , ct.tn_use , ct.tn_text , ct.tn_arch , ct.tn_pos , ct.cr_opt " .
		  " , ct.Atype_np , ct.Atype_tnm , ct.Atype_tpos , ct.Atype_memo , ct.Atype_nfont , ct.Atype_arch " .
		  " , ct.file2 as userAttachfile2 , ct.file3 as userAttachfile3 , ct.file4 as userAttachfile4 " .
		  " , ct.MAtype_giftno , ( select numid from tbl_{$config[GFT][1]} where numid = ct.MAtype_giftno ) as gift_noisit , ( select title from tbl_{$config[GFT][1]} where numid = ct.MAtype_giftno ) as gift_title " .
		  " , ct.MAtype_hopedate , ct.MAtype_eventdate , ct.MAtype_payintype , ct.MAtype_payindate " .
		  " , ct.Atype_orderbottype " .
		  " , ct.hoooption_hp , ct.hoooption_schooly , ct.hoooption_classname , ct.hoooption_schoolname , ct.hoooption_teachername , ct.hoooption_teacherhp " .
		  " , ct.Atype_orderbotoption " ) ;
	$formtype_q_count = 0 ;
	$formtype_etc_count = 0 ;
	while ( $rs = $exe->fetch($execute)) {
		unset($tmp_Rs) ;
		if ( $rs['salestate'] != '1' ) continue ;
		if ( $rs['openstate'] != 'Y' ) continue ;
		if ( $rs['formtype'] == 'M' ) $tmp_Rs = skn_M_CartList() ;
		if ( $rs['formtype'] == 'T' ) $tmp_Rs = skn_T_CartList() ;
		if ( $rs['formtype'] == 'S' ) $tmp_Rs = skn_S_CartList() ;
		if ( $rs['formtype'] == 'Q' ) $tmp_Rs = skn_Q_CartList() ;
		if ( $rs['formtype'] == 'A' ) $tmp_Rs = skn_A_CartList() ;
		if ( $tmp_Rs[0] != 'Y' ) continue ;

		if ( $rs['formtype'] == 'Q' ) $formtype_q_count++;
		else $formtype_etc_count++;
	}

	$goods_sumprice += $s_sumprice ;
	if ( $goods_sumprice <= 0 ) script_re ( '/' , ' ÁÖ¹®ÇÒ »óǰÀÌ ¾ø½À´Ï´Ù. ') ;
	if ( $formtype_q_count > 0 && $formtype_etc_count > 0 ) script_re ( '?mode=cart' , ' °³ÀΰáÁ¦»óǰÀº ¹Ù·Î±¸¸Å¸¸ °¡´ÉÇÕ´Ï´Ù ') ;
	else if ( $formtype_q_count > 0 ) {
		// °³ÀΰáÁ¦»óǰÀº ¹è¼Ûºñ ¾øÀ½
		$order_sendprice = 0 ;
	} else {
		$order_sendprice = $goods_sumprice < $shop_set['send_order_min'] && $goods_sumprice > 0 ? $shop_set['send_price']  : 0 ;
	}
	$goods_sumprice += $order_sendprice ;


# set view data
	// ¹«ÅëÀåÀÔ±Ý
	$bank_s_options = '' ;
	foreach ( $define_shop['¹«ÅëÀåÀÔ±Ý'] as $v ) {
		$bank_s_options .= '<option value="' . $v . '">' . $v . '</option>' ;
	}
	// test
	$n_member_privacy = '' ;
	if ( empty($total['loginno'])) {
		/*
		$mem['name'] = 'ºñȸ¿ø' ;
		$tel[0] = '02' ;
		$tel[1] = '1234' ;
		$tel[2] = '4567' ;
		$hp[0] = '010' ;
		$hp[1] = '1233' ;
		$hp[2] = '3211' ;
		$mem['email'] = 'test@none-member.co.kr' ;
		$zipcode[0] = '111' ;
		$zipcode[1] = '222' ;
		$mem['addr1'] = '¼­¿ï ºñȸ¿øÁö±¸' ;
		$mem['addr2'] = 'Å×½ºÆ®»óȸ 101È£' ;

		# *
		# */
		 $n_member_privacy = '
			<p>
			<iframe name="ifrm_privacy" id="ifrm_privacy" src="/etc/privacy2.html" frameborder=0 width="99%" height="200" style="border:1px solid #999;"></iframe><br><br>
				<div align="right"><input type="checkbox" name="nCheckprivacy" value="Y" id="nCheckprivacy_chk" dreq emsg="°³ÀÎÁ¤º¸ ¼öÁý¿¡ µ¿ÀÇÇÏÁö¾ÊÀ¸¼Ì½À´Ï´Ù."> <label for="nCheckprivacy_chk">°³ÀÎÁ¤º¸ ¼öÁý¿¡ ´ëÇÑ µ¿ÀÇÇÕ´Ï´Ù.</label></div>
			</p>
		 ' ;
	}
	$info = array(
		'ordertype'				=> $_POST['ordertype'] ,
		'ordercode'				=> $_POST['ordercode'] ,
		'order_name'			=> $mem['name'] ,
		'order_tel1' 			=> $tel[0] ,
		'order_tel2' 			=> $tel[1] ,
		'order_tel3' 			=> $tel[2] ,
		'order_hp1' 			=> $hp[0] ,
		'order_hp2' 			=> $hp[1] ,
		'order_hp3' 			=> $hp[2] ,
		'order_email'			=> $mem['email'] ,
		'order_zip1'			=> $zipcode[0] ,
		'order_zip2'			=> $zipcode[1] ,
		'order_addr1'			=> $mem['addr1'] ,
		'order_addr2'			=> $mem['addr2'] ,
		'total_count'			=> number_format($goods_totalcount) ,
		'total_send_price'	=> number_format($order_sendprice) ,
		'total_price'			=> number_format($goods_sumprice) ,
		'nresult_payprice'	=> intval($goods_sumprice) ,
		'result_payprice'	=> number_format($goods_sumprice) ,
		// form
		'bank_s_options'	=> $bank_s_options ,
		'skn_point'				=> $skn_point  ,
		'userpoint'				=> ( is_numeric($mem['have_point']) ? intval($mem['have_point']) : 0 )  ,
		// add
		'n_member_privacy'	 => $n_member_privacy ,
		'point_use_min'		=> $shop_set['point_use_min']
	) ;
	if ( $formtype_q_count > 0 ) {
		$info['formtype-q-disabled'] = 'disabled' ;		// °³ÀΰáÁ¦»óǰÀº ½Å¿ëÄ«µå¸¸ °áÁ¦ °¡´É
		$info['skn_point'] = '' ;						// °³ÀΰáÁ¦»óǰÀº Àû¸³±Ý »ç¿ë ºÒ°¡
		$info['userpoint'] = '0' ;
	}

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

 ?>

Copyright © 2017 || Recoded By Mr.Bumblebee