-=[ Mr. Bumblebee ]=-
_Indonesia_
<?
/*
* ¹Ù·Î±¸¸Å
* Àå¹Ù±¸´Ï¿Í µ¿ÀÏÇÏ°Ô ÀúÀå. ´Ü, Àå¹Ù±¸´Ï Äڵ尡 ¾Æ´Ñ ´ÜÀÏÄڵ带 »ý¼ºÇÏ¿© ÀúÀåÇÕ´Ï´Ù. ( 1ȸ¿ë )
*/
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 ( '/' , ' À¯È¿ÇÏÁö ¾ÊÀº Á¢±Ù ') ;
# get direct unique code
$drtcode = '' ;
while ( true ) {
$drtcode = 'D' . time() . str_rand(20,'A1');
$isdrt = $exe->qry_fetch( " from {$tblCart} where Ltype = 'D' and cart_id = '{$drtcode}' " , " numid " ) ;
if ( !empty($isdrt['numid'])) continue ; // ÀÖÀ¸¸é Àç»ý¼º.
else break ;
}
# base info
$action = array(
'Ltype' => 'D' ,
'real_no' => ( empty($total['loginno']) ? 0 : $total['loginno'] ) ,
'real_id' => ( empty($total['loginno']) ? '' : $total['loginid'] ) ,
'write_date' => $total['now'] ,
'ip' => $total['ip'] ,
'cart_id' => $drtcode , // ºñ·Î±×ÀÎ
'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 ,
'total_service_qry' => $total_service_qry ,
'top_service_qry' => $top_service_qry ,
'bot_service_qry' => $bot_service_qry ,
'armS_service' => $armS_service ,
'armL_service' => $armL_service ,
)) , $tblCart , " numid = '{$cartno}' ") ;
if ( empty($total['loginno']))
script_re ( '?mode=orderfrm&ordertype=DN&ordercode=' . $drtcode ) ;
else {
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
</head>
<body>
<form name="lform" method="post" action="?" onsubmit=" return ; ">
<input type="hidden" name="mode" value="orderfrm">
<input type="hidden" name="ordertype" value="DM">
<input type="hidden" name="ordercode" value="<?=$drtcode?>">
</form>
<script language="javascript">
document.getElementsByName('lform')[0].submit() ;
</script>
</body>
</html>
<?
}
exit ;
?>
Copyright © 2017 || Recoded By Mr.Bumblebee