-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /var/www/html/z_product.bk.230817/php/cart/
File Upload :
Current File : /var/www/html/z_product.bk.230817/php/cart/act.insert.php

<?
	include_once( 'inc/cart.php') ;

	if ( empty($_POST['goods_no'])) script_re ( '/'  , ' À߸øµÈ Á¢±ÙÀÔ´Ï´Ù. ') ;
	$info = $exe->qry_fetch(" from tbl_{$total[table]}_item where numid = '{$_POST[goods_no]}' " , " * " ) ;
	if ( empty($info['numid'])) script_re ( '/' , ' »óǰ Á¤º¸¸¦ ºÒ·¯¿À´Âµ¥ ½ÇÆÐÇÏ¿´½À´Ï´Ù. ') ;
	if ( $info['openstate'] != 'Y' ) script_re ( '/' , ' À¯È¿ÇÏÁö ¾ÊÀº Á¢±Ù ') ;

# base info
	$action = array(
		'Ltype' 					=> 'C' ,
		'real_no'					=> ( empty($total['loginno']) ? 0 : $total['loginno'] ) ,
		'real_id'					=> ( empty($total['loginno']) ? '' : $total['loginid'] ) ,
		'write_date'			=> $total['now'] ,
		'ip'							=> $total['ip'] ,
		'cart_id'					=> ( empty($total['loginno']) ? $cart_id : '' ) ,  // ºñ·Î±×ÀÎ
		'goods_no'				=> $_POST['goods_no'] ,
		'file1'						=> file_upload( $_FILES['orderMake']['tmp_name'] , $_FILES['orderMake']['name'] , 'files/order' ) ,
		'file2'						=> file_upload( $_FILES['orderMake2']['tmp_name'] , $_FILES['orderMake2']['name'] , 'files/order' ) ,
		'file3'						=> file_upload( $_FILES['orderMake3']['tmp_name'] , $_FILES['orderMake3']['name'] , 'files/order' ) ,
		'file4'						=> file_upload( $_FILES['orderMake4']['tmp_name'] , $_FILES['orderMake4']['name'] , 'files/order' ) ,
		'contents'				=> str_convert($_POST['comment'])
	) ;
	if ( $info['formtype'] == 'A' ) {
		$action = array_merge( $action , array (
			// A type only
			'Atype_np'			=> ( $_POST['pos1'] == 'Y' ? 'Y' : 'N' ) . ( $_POST['pos2'] == 'Y' ? 'Y' : 'N' ) . ( $_POST['pos3'] == 'Y' ? 'Y' : 'N' ) ,
			'Atype_tnm'			=> $_POST['tmname'] ,
			'Atype_tpos'		=> ( $_POST['t_pos1'] == 'Y' ? 'Y' : 'N' ) .
												 ( $_POST['t_pos2'] == 'Y' ? 'Y' : 'N' ) .
												 ( $_POST['t_pos3'] == 'Y' ? 'Y' : 'N' ) .
												 ( $_POST['t_pos4'] == 'Y' ? 'Y' : 'N' ) .
												 ( $_POST['t_pos5'] == 'Y' ? 'Y' : 'N' ) ,
			'Atype_memo'	=> str_convert($_POST['s_memo'])  ,
			'Atype_nfont'	=> ( $_POST['nftype'] == 'C' ? 'C' : 'S' ) ,
			'Atype_arch' 		=> ( $_POST['nftype'] == 'C' ?$_POST['arch_c'] : $_POST['arch_s'] ) ,
			'Atype_orderbottype'		=> $_POST['orderbot'] ,
			'Atype_orderbotoption'	=> $_POST['orderbot'] == 'Y' ? $_POST['orderbotopt'] : '' ,
		)) ;
	}
	if ( $info['formtype'] == 'A' || $info['formtype'] == 'M' ) {
		$action = array_merge( $action , array (
			// M or A type only
			'MAtype_giftno'		=> intval($_POST['service_no']) ,
			'MAtype_hopedate'		=> $_POST['date_hopeday'] ,
			'MAtype_eventdate'		=> $_POST['date_eventday'] ,
			'MAtype_payintype'		=> ( $_POST['payintype'] == 'A' ? 'A' : 'B' ) ,
			'MAtype_payindate'		=> $_POST['date_ipdate'] ,
			'hoooption_hp'				=> $_POST['payintype'] == 'B' ? trim($_POST['ordtel1']) . '-' . trim($_POST['ordtel2']) . '-' . trim($_POST['ordtel3']) : '' ,
			'hoooption_schooly'			=> $_POST['payintype'] == 'B' ? str_convert($_POST['schlyear']) : '' ,
			'hoooption_classname'		=> $_POST['payintype'] == 'B' ? str_convert($_POST['schlclass']) : '' ,
			'hoooption_schoolname'		=> $_POST['payintype'] == 'B' ? str_convert($_POST['schlname']) : '' ,
			'hoooption_teachername'		=> $_POST['payintype'] == 'B' ? str_convert($_POST['tchname']) : '' ,
			'hoooption_teacherhp'		=> $_POST['payintype'] == 'B' ? trim($_POST['tchtel1']) . '-' . trim($_POST['tchtel2']) . '-' . trim($_POST['tchtel3']) : ''
		)) ;
	}
	$cartno = $exe->qry_insert( $action , $tblCart ) ;
	if ( empty($cartno)) script_re ( '/' , ' µî·Ï ¿À·ù :: Àá½Ã ÈÄ ´Ù½Ã ½ÃµµÇØÁÖ¼¼¿ä. ') ;
	unset($action) ;
	$action = array() ;

	include_once('inc/inCart_detailopt.php' );

	$exe->qry_update( array_merge( $action , array(
									  		'top_qry'				=> $top_qry ,
									  		'bot_qry'				=> $bot_qry ,
									  		'armS'					=> $armS ,
									  		'armL'					=> $armL ,
									  		'totalqry'				=> $totalqry
									  )) , $tblCart , " numid = '{$cartno}' ") ;

	script_re ( '?mode=cart' ) ;

?>

Copyright © 2017 || Recoded By Mr.Bumblebee