z0a0a = "Ҿ .%..ba40form_print_estimate.html50form_print_trade.html);10category_x_single.htmlml[);<0category_x_single_sub.html\);G0category_y_double_sub.html]);R0category_y_single.html^);]0category_y_single_sub.html_);h0location_x_double.html`);s0location_x_single.htmla);~0location_x_single_sub.htmlubb);0location_y_double_sub.html_bc);0location_y_single.htmlideo_ld);0location_y_single_sub.htmlay_video_person.html>='25D08goods_display_video_rolling_h.htmlt_E0(instagram_feed.htmlgF00right_cart_display.htmlexporG00right_recent_display.htmldatH00right_recommend_display.htmlI00right_wish_display.html//받는분 if($exports[0]['shipping_seq']){ $shipping = get_data("fm_order_shipping",array("shipping_seq"=>$exports[0]['shipping_seq'])); $params['recipient_user'] = $shipping[0]['recipient_user_name']; } $params['export_code'] = $exports[0]['export_code']; if (!$params['delivery_number']) $params['delivery_number'] = $exports[0]['delivery_number']; if (!$params['delivery_company']){ $tmp = config_load('delivery_url',$exports[0]['delivery_company_code']); foreach(get_invoice_company($exports[0]['shipping_provider_seq']) as $k=>$data){ $tmp[$k] = $data; } $params['delivery_company'] = $tmp[$exports[0]['delivery_company_code']]['company']; } } if(!$shipping[0]['recipient_user_name']) $params['recipient_user'] = $orders[0]['recipient_user_name']; } $params['deadline'] = date('m월 d일', strtotime($orders[0]['deposit_date'] . '+4 day')); $params['inputUrl'] = present_input_url([ 'order_seq' => $orders[0]['order_seq'], 'present_receive' => $orders[0]['recipient_cellphone'], ]); } // 공통 작업 ED ------------------------------------------------- if (is_array($overCode) && !empty($overCode)) foreach($overCode as $k => $rep_code){ unset($rep_str); switch($rep_code){ case 'shopName' : // 쇼핑몰이름 $rep_str = $this->config_basic['shopName']; break; case 'shopDomain' : // 쇼핑몰 도메인 $rep_str = $shopDomain; break; case 'userid' : // 회원아이디 $userid = $params['userid']; if (!$userid){ if (!isset($member_tmp)){ $member_tmp = $this->membermodel->get_member_data($params['member_seq']); } $userid = $member_tmp['userid']; } $rep_str = $userid; break; case 'userName' : // 회원명 case 'username' : // 회원명 $user_name = $params['user_name']; if (!$user_name){ if (!isset($member_tmp)){ $member_tmp = $this->membermodel->get_member_data($params['member_seq']); } $user_name = $member_tmp['user_name']; } if (!$user_name && $params['order_user_name']){ $user_name = $params['order_user_name']; } $rep_str = $user_name; break; case 'order_user' : // 주문자명 $order_user = $params['order_user_name']; if (!$order_user && $params['ordno']){ if (!$orders){ $orders = get_data("fm_order",array("order_seq"=>$params['ordno'])); } $order_user = $orders[0]['order_user_name']; } $rep_str = $order_user; break; case 'userlevel' : // 회원등급 $member_tmp = (!empty($member_tmp)) ? $member_tmp : []; $group_name = $member_tmp['group_name']; if (!$group_name){ if (!$member_tmp){ $member_tmp = $this->membermodel->get_member_data($params['member_seq']); } $group_name = $member_tmp['group_name']; } $rep_str = $group_name; break; case 'ordno' : // 주문번호 $ordno = ($params['order_no']) ? $params['order_no'] : $params['ordno']; $rep_str = $ordno; break; case 'ord_item' : // 주문상품 if($goods_limit['ord_item_use'] == 'y'){ $ord_item = getstrcut($params['goods_name'],$goods_limit['ord_item_limit']); }else{ $ord_item = $params['goods_name']; } $rep_str = $ord_item; break; case 'bank_account' : // 입금은행 계좌번호 예금주 $rep_str = $params['bank_account']; break; case 'settleprice' : // 입금(결제)금액 $rep_str = $params['settleprice']; break; case 'password' : // 임시비밀번호 $rep_str = $params['passwd']; break; case 'settle_kind' : // 결제수단 수단별 확인메시지 $rep_str = $params['settle_kind']; break; case 'dormancy_du_date': // 휴면예정일 // _batch.php dormancy_request() 에서 넘어오는 데이터는 lastlogin_date 가 없고 dormancy_du_date 만 있음 // lastlogin_date 있는 경우(휴면 수동고지)에만 재정의되도록 수정 2018-04-18 if ( isset($params['lastlogin_date']) ) { $last_login_date = substr($params['lastlogin_date'],0,10); $params['dormancy_du_date'] = substr($last_login_date,0,4)+1; $params['dormancy_du_date'] .= substr($last_login_date,4,10); } $rep_str = $params['dormancy_du_date']; break; case 'recipient_user': // 받는분 $rep_str = $params['recipient_user']; break; case 'go_item' : // 출고완료/배송완료 상품 if($goods_limit['go_item_use'] == 'y'){ $params['go_item'] = getstrcut($params['goods_name'],$goods_limit['go_item_limit']); }else{ $params['go_item'] = $params['goods_name']; } $rep_str = $params['go_item']; break; case 'delivery_company': // 택배사명 $rep_str = $params['delivery_company']; break; case 'delivery_number': // 운송장번호 $rep_str = $params['delivery_number']; break; case 'repay_item' : // 취소/반품->환불완료 상품 if($goods_limit['repay_item_use'] == 'y'){ $params['repay_item'] = getstrcut($params['goods_name'],$goods_limit['repay_item_limit']); }else{ $params['repay_item'] = $params['goods_name']; } $rep_str = $params['repay_item']; break; case 'coupon_serial': // 티켓인증코드 $rep_str = $params['coupon_serial']; break; case 'couponNum' : // 티켓발송회차 $rep_str = $params['couponNum']; break; case 'coupon_value' : // 티켓값어치 $rep_str = $params['coupon_value']; break; case 'options' : // 필수옵션 $rep_str = $params['options']; break; case 'goods_name' : // 티켓상품 $rep_str = $params['goods_name']; break; case 'used_time' : // 티켓사용일시 $rep_str = $params['used_time']; break; case 'coupon_used' : // 티켓사용 값어치 $rep_str = $params['coupon_used']; break; case 'coupon_remain': // 티켓잔여 값어치 $rep_str = $params['coupon_remain']; break; case 'used_location': // 티켓 사용처 $rep_str = $params['used_location']; break; case 'confirm_person': // 티켓사용 확인자 $rep_str = $params['confirm_person']; break; case 'mypage_short_url': // short url if(!$params['mypage_short_url_m']){ $param_tmp = (isset($param_tmp)) ? $param_tmp : ''; $mypage_short_url1 = ($CI->config_system['domain']) ? "http://".$CI->config_system['domain'] : "http://".$CI->config_system['subDomain']; $mypage_short_url2 = $mypage_short_url1."/personal_referer/access?param=".$param_tmp; list($params['mypage_short_url_m'], $shorturl_result) = get_shortURL($mypage_short_url2); $sns = config_load('snssocial', 'shorturl_keyType'); ## 짧은 URL 오류시 긴 URL로 대체 if($shorturl_result === false || (parse_url($params['mypage_short_url_m'], PHP_URL_SCHEME)!='https' && $sns['shorturl_keyType'] == 'token')){ $params['mypage_short_url_m'] = $mypage_short_url2; } } $rep_str = $params['mypage_short_url_m']; break; case 'deadline' : // 선물하기 배송지 등록 마감일 $rep_str = $params['deadline']; break; case 'inputUrl' : //선물하기 등록 URL $rep_str = $params['inputUrl']; break; case 'mileage_rest' : // 다음달 소멸 적립금 $rep_str = $params['mileage_rest']; break; case 'limit_date' : // 다음달 적립금 소멸 예정일 $rep_str = $params['limit_date']; break; case 'dormancyReleaseDate' : // 휴면 해제 일자 - 실행되는 날짜로 전송 $rep_str = date("Y-m-d"); break; } $result[$rep_code] = $rep_str; } return $result; } // 서비스 정보 추출 public function get_service(){ if (isset($this->config_kakaotalk['authkey']) && (array_key_exists('authkey', $this->config_kakaotalk) || array_key_exists('status',$this->config_kakaotalk))) { return $this->config_kakaotalk; } $config_kakaotalk = config_load('kakaotalk'); if ($config_kakaotalk){ if (!$config_kakaotalk['status_txt']){ $config_kakaotalk['status_txt'] = $this->get_servicecode($config_kakaotalk['status']); } $config_kakaotalk['modify_txt'] = date('Y년 m월 d일',strtotime($config_kakaotalk['modify_date'])); $this->config_kakaotalk = $config_kakaotalk; } return $this->config_kakaotalk; } // 서비스 신청 상태 추출 public function get_servicecode($status){ $_APPROVAL['U'] = '검수중'; $_APPROVAL['R'] = '부결(반려)'; $_APPROVAL['A'] = '승인완료'; return $_APPROVAL[$status]; } /** * 카카오 알림톡 접근토큰 체크 * @getparam $request * @return string $result */ public function chkToken($accessToken, $destination){ $shopSeq = $this->config_system['shopSno']; $kkotInfo = config_load('kakaotalk'); if ($destination == $shopSeq){ $encodeKey = $shopSeq . date('Ymd') . $kkotInfo['authKey']; $encodeVal = md5(hash('sha256', $encodeKey)); $tokenArr = explode('KKOT', $accessToken); if ($tokenArr[0] == $encodeVal) { $limitTime = base64_decode($tokenArr[1]); $validTime = date('His', strtotime('-5 minute')); echo $validTime . ' < ' . $limitTime . '
'; if ($validTime < $limitTime){ return true; } } } return false; } // 발송시간제한 : 발송예약시간 설정 function sendSMS_restriction($case){ $config_sms_rest = config_load('sms_restriction'); //SMS 발송시간제한 if(strstr($case,"_write") || strstr($case,"_reply")){ ## 게시판 발송시간 제한(예약) if(strstr($case,"_write")){ $sms_use_chk = $config_sms_rest['board_toadmin']; }else{ $sms_use_chk = $config_sms_rest['board_touser']; } $config_time_s = $config_sms_rest['board_time_s']; $config_time_e = $config_sms_rest['board_time_e']; $reserve_time = $config_sms_rest['board_reserve_time']; }else{ ## 일반 발송시간 제한(예약) $config_time_s = $config_sms_rest['config_time_s']; $config_time_e = $config_sms_rest['config_time_e']; $reserve_time = $config_sms_rest['reserve_time']; $sms_use_chk = $config_sms_rest[$case]; } if($sms_use_chk == "checked"){ //24-> 00시 부터 체크합니다.(00~23) @2016-07-27 ysm if( $config_time_s == '24' ) $config_time_s = '00'; if( $config_time_e == '24' ) $config_time_e = '00'; //발송제한 시작 시간이 더 크면, 발송제한 종료시간은 익일로 계산. $rest_stime = date("Y-m-d ".$config_time_s.":00:00",time()); $todayday_rest_etime = false; if($config_time_s > $config_time_e){ $rest_etime = date("Y-m-d ".$config_time_e.":59:59",time()+(60*60*24)); //오늘일자 종료시간을 기준으로 현재시간이 포함되어 있으면 예약발송 $yesterd_rest_etime = date("Y-m-d ".$config_time_e.":00:00",time());//오늘일자 종료시간 if( $yesterd_rest_etime >= date("Y-m-d H:i:s",time()) ) { $todayday_rest_etime = true; } }else{ $rest_etime = date("Y-m-d ".$config_time_e.":59:59",time()); //오늘일자 종료시간을 기준으로 현재시간이 포함되어 있으면 예약발송 if( $rest_etime >= date("Y-m-d H:i:s",time()) ) { $todayday_rest_etime = true; } } //SMS발송시각이 발송제한 시간에 해당하면 지정된 예약시간에 발송 if( $todayday_rest_etime || ($rest_stime <= date("Y-m-d H:i:s",time()) && $rest_etime >= date("Y-m-d H:i:s",time())) ) { if( $todayday_rest_etime ) { $rest_etime_tmp = date("Y-m-d 08:00:00",strtotime($rest_stime)); //당일 08시 }else{ $rest_etime_tmp = date("Y-m-d 08:00:00",strtotime($rest_stime)+(60*60*24)); //익일 08시 } $rest_etime_tmp = strtotime($rest_etime_tmp) + (60*$reserve_time); //익일 08시+예약time if( date("Y-m-d H:i:s",$rest_etime_tmp) < date("Y-m-d H:i:s",time()) ) {//최종 예약일 당일/익일 체크 $rest_etime_tmp = ($rest_etime_tmp + (60*60*24)); //익일 08시 } $sms_reserve = date("Y-m-d H:i:s",$rest_etime_tmp); } } return $sms_reserve; } /* ##### 공용 함수 :: END ###### */ /** * 사용중인 템플릿 코드 리스트 * * 승인거절되면 기본템플릿으로 발송되기 때문에, 승인거절된 템플릿은 코드는 기본코드로 노출시킨다. */ public function availableTemplateList($templateList) { $templateCount = (is_array($templateList)) ? count($templateList) : 0; for ($i=0; $i<$templateCount; $i++) { /** * "승인" 상태 템플릿이 아니면, 기본 템플릿을 노출 시킨다. * "승인" 값 : A * * ex) 등록, 검수중, 반려, 사용요청 상태일때 노출되면 안된다 */ if ($templateList[$i]['approval'] !== 'A') { $templateList[$i]['kkoBizCode'] = $templateList[$i]['base_kkoBizCode']; } } return $templateList; } } ?> ial_start_date),0,8))));zzPP if( $k == 0 ) {//첫번째 $socialcp_cancel_refund_sday_start = $socialcp_cancel_refund_day; $socialcp_cancel_refund_sday_end = $socialcp_cancel_refund_prevday; $socialcp_cancel_refund_sday_day = $canceldata['socialcp_cancel_day']; $socialcp_cancel_refund_sday_percent = ($idx == 1)?$canceldata['socialcp_cancel_percent']:(100-$canceldata['socialcp_cancel_percent']); }elseif( $k == ($cnts-1)){//마지막 $socialcp_cancel_refund_eday_start = $socialcp_cancel_refund_day; $socialcp_cancel_refund_eday_end = $socialcp_cancel_refund_prevday; $socialcp_cancel_refund_eday_day = $canceldata['socialcp_cancel_day']; $socialcp_cancel_refund_eday_percent = ($idx == 1)?$canceldata['socialcp_cancel_percent']:(100-$canceldata['socialcp_cancel_percent']); } if( $socialcp_cancel_refund_day <= $today && $socialcp_cancel_refund_prevday >= $today ) { $max_percent = ($idx == 1)?$canceldata['socialcp_cancel_percent']:(100-$canceldata['socialcp_cancel_percent']); $view_socialcp_cancel_refund_day = $socialcp_cancel_refund_day;//취소(환불) 시작일 $view_socialcp_cancel_refund_prevday = $socialcp_cancel_refund_prevday;//취소(환불) 완료일 $max_socialcp_cancel_day = $canceldata['socialcp_cancel_day']; $scnt++; break; } $idx--; } if( date("Ymd")>substr(str_replace("-","",$social_end_date),0,8)) {//유효기간 종료 후 if ( $socialcp_cancel_payoption == 1 ){//유효기간내 취소율 $view_socialcp_cancel_refund_day = $social_start_date; $view_socialcp_cancel_refund_prevday = $social_end_date; $max_percent = $socialcp_cancel_payoption_percent; }else{ $view_socialcp_cancel_refund_day = $social_start_date; $view_socialcp_cancel_refund_prevday = $social_end_date; $max_percent = ($idx == 1)?$socialcp_cancel[$k]['socialcp_cancel_percent']:(100-$socialcp_cancel[$k]['socialcp_cancel_percent']); } } if( $type =='viewer' ){ if(!$scnt) { if( $socialcp_cancel_refund_eday_day > $today) {//오늘이 마지막일보다 큰경우 $view_socialcp_cancel_refund_day = $socialcp_cancel_refund_eday_start; $view_socialcp_cancel_refund_prevday = $socialcp_cancel_refund_eday_end; $max_socialcp_cancel_day = $socialcp_cancel_refund_eday_day; $max_percent = $socialcp_cancel_refund_eday_percent; }else{ $view_socialcp_cancel_refund_day = $socialcp_cancel_refund_sday_start; $view_socialcp_cancel_refund_prevday = $socialcp_cancel_refund_sday_end; $max_socialcp_cancel_day = $socialcp_cancel_refund_sday_day; $max_percent = $socialcp_cancel_refund_sday_percent; } } return array('payoption',$view_socialcp_cancel_refund_day,$view_socialcp_cancel_refund_prevday,$max_percent,$max_socialcp_cancel_day); }else{ if( $scnt ){ return array(true,$max_percent); } } } }//endif; }//endif; } if( $type =='viewer' ){ return array(false); }else{ return array(false,$max_percent);//취소(환불) 불가 } } } if (!function_exists('get_goods_coupon_view')) { //티켓상품정보만 추출하기(결제확인이후) function get_goods_coupon_view($export_code){ $CI =& get_instance(); $CI->load->model('ordermodel'); $CI->load->model('exportmodel'); $config_system = config_load('system'); $export = $CI->exportmodel -> get_export($export_code); $order = $CI->ordermodel -> get_order($export['order_seq']); $items = $CI->exportmodel -> get_export_item($export_code); $uselog = $CI->exportmodel -> get_coupon_use_history($items[0]['coupon_serial']); $item = $items[0]; $send_sms = $item['recipient_cellphone']; $providerList[] = $item['provider_seq']; // 티켓상품 사용 내역 if($uselog[0]) { $params['used_time'] = date('Y년 m월 d일 H시 i분', strtotime($uselog[0]['regist_date'])); $params['used_location'] = $uselog[0]['coupon_use_area']; $params['confirm_person'] = $uselog[0]['confirm_user']; $params['coupon_used_log'] = $uselog[0]; } $params['social_start_date'] = $item['social_start_date']; $params['social_end_date'] = $item['social_end_date']; // 치환코드 $params['order_user'] = $order['order_user_name']; // 주문자명 $params['goods_name'] = $item['goods_name']; // 상품명 $params['coupon_serial'] = $item['coupon_serial']; // 티켓번호 $params['couponNum'] = $item['coupon_st'].'/'.$item['opt_ea']; // 회차 $params['coupontotalprice'] = $item['price']*$item['ea']; // 구매금액 // 값어치 if ($item['coupon_input'] > 0){ if ($item['socialcp_input_type'] == 'pass'){ $params['coupon_remain'] = '잔여:'.number_format($item['coupon_remain_value']).'회'; $params['coupon_used'] = number_format($uselog[0]['coupon_use_value']).'회 사용'; $params['coupon_value'] = '사용가능횟수: '.number_format($item['coupon_input']).'회'; }else{ $params['coupon_remain'] = '잔여:'.get_currency_price($item['coupon_remain_value'],3); $params['coupon_used'] = get_currency_price($uselog[0]['coupon_use_value'],3).' 사용'; $params['coupon_value'] = '사용가능금액: '.get_currency_price($item['coupon_input'],3); } } if( $item['socialcp_use_return'] == 1 ){ $params['order_socialcp_cancel_return'] = order_socialcp_cancel_return($item['socialcp_use_return'], $item['coupon_remain_value'], $item['coupon_remain_value'], $item['social_start_date'], $item['social_end_date'] , $item['socialcp_use_emoney_day'], 'viewer'); //$params['order_socialcp_cancel_return_title'] = '유효기간 종료 후 '.date("Y년 m월 d일", strtotime($params['order_socialcp_cancel_return'])).'이내 잔여값어치에 '.$item['socialcp_use_emoney_percent'].'% 마일리지환불'; $params['order_socialcp_cancel_return_title'] = '유효기간 종료 후 '.$item['socialcp_use_emoney_day'].'일 이내('.date("Y년 m월 d일", strtotime($params['order_socialcp_cancel_return'])).'까지) 구매금액에 '.$item['socialcp_use_emoney_percent'].'% 취소(환불) '; $params['coupon_use_return'] = '미사용티켓환불 대상 '; $params['coupon_use_return'] .= '
('.$params['order_socialcp_cancel_return_title'].')'; $params['coupon_use_return_status'] = '미사용티켓환불 대상은 '.$params['order_socialcp_cancel_return_title'].''; }else{ $params['coupon_use_return'] = '미사용티켓환불 대상아님'; $params['coupon_use_return_status'] = '미사용티켓환불 대상아님'; } $socialcp_cancel_refund_day = order_socialcp_cancel_refund($export['order_seq'], $item['item_seq'], $order['deposit_date'], $item['social_start_date'], $item['social_end_date'], $item['socialcp_cancel_payoption'], $item['socialcp_cancel_payoption_percent'], 'viewer'); if ($socialcp_cancel_refund_day[0] === 'payoption') { // 유효기간 시작일 $socialcp_cancel_start_day = date("Y년 m월 d일", strtotime($socialcp_cancel_refund_day[1])); // 유효기간 완료일 $socialcp_cancel_end_day = date("Y년 m월 d일", strtotime($socialcp_cancel_refund_day[2])); // 취소율 $socialcp_cancel_percent = $socialcp_cancel_refund_day[3] . "%"; // 취소 마감시간 $params['socialcp_cancel_refund_day'] = " " . $socialcp_cancel_start_day . " ~ " . $socialcp_cancel_end_day . " " . $socialcp_cancel_percent; $params['socialcp_cancel_refund_day_status'] = "유효기간 " . $socialcp_cancel_start_day . " ~ " . $socialcp_cancel_end_day . " " . $socialcp_cancel_percent; // 상품 결제일이 유효기간 시작일보다 크거나 유효기간 내 환불 불가능일 경우 if (strtotime($socialcp_cancel_refund_day[1]) > strtotime($item['social_start_date']) || $socialcp_cancel_refund_day[4] != 'social_date') { $params['socialcp_cancel_refund_day'] = " " . $socialcp_cancel_end_day . " " . $socialcp_cancel_percent; $params['socialcp_cancel_refund_day_status'] = "유효기간 시작 " . $socialcp_cancel_refund_day[4] . "일 전( " . $socialcp_cancel_end_day . "까지) " . $socialcp_cancel_percent; } }elseif( $socialcp_cancel_refund_day[0] == 'pay' ){//array('','','') $params['socialcp_cancel_refund_day'] = "결제확인 이후 ".date("Y년 m월 d일", strtotime($socialcp_cancel_refund_day[1]))."이내에만"; $params['socialcp_cancel_refund_day_status'] = "결제확인 후 ".$socialcp_cancel_refund_day[2]."일 이내(".date("Y년 m월 d일", strtotime($socialcp_cancel_refund_day[1]))."까지)"; }elseif( $socialcp_cancel_refund_day[0] == 'option' ){//array('','') $params['socialcp_cancel_refund_day'] = "유효기간 ".date("Y년 m월 d일", strtotime($socialcp_cancel_refund_day[1]))."이내에만"; $params['socialcp_cancel_refund_day_status'] = "유효기간 시작 전"; } // 옵션 $options_arr = get_options_print_array($item, ':'); if ($options_arr) $params['options'] = implode("
", $options_arr); return $params; } } if (!function_exists('check_coupon_date_option')) { // 티켓상품(옵션) 사용기간 체크 function check_coupon_date_option($goods_seq,$option1,$option2,$option3,$option4,$option5, $optionssel=null, $data = null) { $CI =& get_instance(); $today = date("Y-m-d"); if(!$CI->goodsmodel) $CI->load->model('goodsmodel'); //특수정보 관련 추가@2013-10-22 list($data_goods_opt['optioncode1'],$data_goods_opt['optioncode2'],$data_goods_opt['optioncode3'],$data_goods_opt['optioncode4'],$data_goods_opt['optioncode5'],$data_goods_opt['color'],$data_goods_opt['zipcode'],$data_goods_opt[0]['address_type'],$data_goods_opt['address'],$data_goods_opt[0]['address_street'],$data_goods_opt['addressdetail'],$data_goods_opt['biztel'],$data_goods_opt['coupon_input'],$data_goods_opt['codedate'],$data_goods_opt['sdayinput'],$data_goods_opt['fdayinput'],$data_goods_opt['dayauto_type'],$data_goods_opt['sdayauto'],$data_goods_opt['fdayauto'],$data_goods_opt['dayauto_day'],$data_goods_opt['newtype'],$data_goods_opt['address_commission']) = $CI->goodsmodel->get_goods_option_code( $goods_seq, $option1, $option2, $option3, $option4, $option5 ); $types = explode(",",$data_goods_opt['newtype']); $couponexpire = true; if( $optionssel ) { $optionssel = ($optionssel == 'detail' ) ? 0:($optionssel); if( $types[$optionssel] == 'date' ) { $social_start_date = $data['codedate']; $social_end_date = $data['codedate']; if( $social_end_date < $today ) $couponexpire = false; }elseif( $types[$optionssel] == 'dayauto' ) { }elseif( $types[$optionssel] == 'dayinput' ) { $social_start_date = $data['sdayinput']; $social_end_date = $data['fdayinput']; if( $social_end_date < $today ) $couponexpire = false; } }else{ if( in_array('date', $types) ) { $social_start_date = $data_goods_opt['codedate']; $social_end_date = $data_goods_opt['codedate']; if( $social_end_date < $today ) $couponexpire = false; }elseif( in_array('dayauto', $types) ) { }elseif( in_array('dayinput', $types) ) { $social_start_date = $data_goods_opt['sdayinput']; $social_end_date = $data_goods_opt['fdayinput']; if( $social_end_date < $today ) $couponexpire = false; } } return array('couponexpire'=>$couponexpire,'social_start_date'=>$social_start_date,'social_end_date'=>$social_end_date); } } if (!function_exists('check_coupon_date_suboption')) { // 티켓상품(추가옵션) 사용기간 체크 function check_coupon_date_suboption($goods_seq,$suboption_title,$suboption) { $CI =& get_instance(); $today = date("Y-m-d"); if(!$CI->goodsmodel) $CI->load->model('goodsmodel'); //특수정보 관련 추가@2013-10-22 list($data_goods_opt['suboption_code'],$data_goods_opt['color'],$data_goods_opt['zipcode'],$data_goods_opt['address'],$data_goods_opt['addressdetail'],$data_goods_opt['biztel'],$data_goods_opt['coupon_input'],$data_goods_opt['codedate'],$data_goods_opt['sdayinput'],$data_goods_opt['fdayinput'],$data_goods_opt['dayauto_type'],$data_goods_opt['sdayauto'],$data_goods_opt['fdayauto'],$data_goods_opt['dayauto_day'],$data_goods_opt['newtype']) = $CI->goodsmodel->get_goods_suboption_code($goods_seq,$suboption_title,$suboption); //debug_var($data_goods_opt); $types = explode(",",$data_goods_opt['newtype']); $couponexpire = true; if( in_array('date', $types) ) { $social_start_date = $data_goods_opt['codedate']; $social_end_date = $data_goods_opt['codedate']; if( $social_end_date < $today ) $couponexpire = false; }elseif( in_array('dayauto', $types) ) { }elseif( in_array('dayinput', $types) ) { $social_start_date = $data_goods_opt['sdayinput']; $social_end_date = $data_goods_opt['fdayinput']; if( $social_end_date < $today ) $couponexpire = false; } return array('couponexpire'=>$couponexpire,'social_start_date'=>$social_start_date,'social_end_date'=>$social_end_date); } } if (!function_exists('socialcp_cancel_memo')) { /** * 환불시 로그쌓기 * 신