Merge branch 'patch'
This commit is contained in:
@ -1,3 +1,11 @@
|
||||
<?php
|
||||
include_once('../common.php');
|
||||
|
||||
// 커뮤니티 사용여부
|
||||
if(G5_COMMUNITY_USE === false) {
|
||||
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP)
|
||||
die('<p>쇼핑몰 설치 후 이용해 주십시오.</p>');
|
||||
|
||||
define('_SHOP_', true);
|
||||
}
|
||||
?>
|
||||
@ -16,7 +16,10 @@ if ($url) {
|
||||
alert('url에 도메인을 지정할 수 없습니다.');
|
||||
}
|
||||
|
||||
$link = $url;
|
||||
if($url == 'shop')
|
||||
$link = G5_SHOP_URL;
|
||||
else
|
||||
$link = $url;
|
||||
} else if ($bo_table) {
|
||||
$link = G5_BBS_URL.'/board.php?bo_table='.$bo_table;
|
||||
} else {
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if (!defined('_SHOP_')) {
|
||||
$pop_division = 'comm';
|
||||
} else {
|
||||
$pop_division = 'shop';
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['new_win_table']}
|
||||
where '".G5_TIME_YMDHIS."' between nw_begin_time and nw_end_time
|
||||
and nw_device IN ( 'both', 'pc' )
|
||||
and nw_device IN ( 'both', 'pc' ) and nw_division IN ( 'both', '".$pop_division."' )
|
||||
order by nw_id asc ";
|
||||
$result = sql_query($sql, false);
|
||||
?>
|
||||
|
||||
@ -390,6 +390,51 @@ if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
|
||||
}
|
||||
|
||||
|
||||
// 신규회원 쿠폰발생
|
||||
if($w == '' && $default['de_member_reg_coupon_use'] && $default['de_member_reg_coupon_term'] > 0 && $default['de_member_reg_coupon_price'] > 0) {
|
||||
$j = 0;
|
||||
$create_coupon = false;
|
||||
|
||||
do {
|
||||
$cp_id = get_coupon_id();
|
||||
|
||||
$sql3 = " select count(*) as cnt from {$g5['g5_shop_coupon_table']} where cp_id = '$cp_id' ";
|
||||
$row3 = sql_fetch($sql3);
|
||||
|
||||
if(!$row3['cnt']) {
|
||||
$create_coupon = true;
|
||||
break;
|
||||
} else {
|
||||
if($j > 20)
|
||||
break;
|
||||
}
|
||||
} while(1);
|
||||
|
||||
if($create_coupon) {
|
||||
$cp_subject = '신규 회원가입 축하 쿠폰';
|
||||
$cp_method = 2;
|
||||
$cp_target = '';
|
||||
$cp_start = G5_TIME_YMD;
|
||||
$cp_end = date("Y-m-d", (G5_SERVER_TIME + (86400 * ((int)$default['de_member_reg_coupon_term'] - 1))));
|
||||
$cp_type = 0;
|
||||
$cp_price = $default['de_member_reg_coupon_price'];
|
||||
$cp_trunc = 1;
|
||||
$cp_minimum = $default['de_member_reg_coupon_minimum'];
|
||||
$cp_maximum = 0;
|
||||
|
||||
$sql = " INSERT INTO {$g5['g5_shop_coupon_table']}
|
||||
( cp_id, cp_subject, cp_method, cp_target, mb_id, cp_start, cp_end, cp_type, cp_price, cp_trunc, cp_minimum, cp_maximum, cp_datetime )
|
||||
VALUES
|
||||
( '$cp_id', '$cp_subject', '$cp_method', '$cp_target', '$mb_id', '$cp_start', '$cp_end', '$cp_type', '$cp_price', '$cp_trunc', '$cp_minimum', '$cp_maximum', '".G5_TIME_YMDHIS."' ) ";
|
||||
|
||||
$res = sql_query($sql, false);
|
||||
|
||||
if($res)
|
||||
set_session('ss_member_reg_coupon', 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 사용자 코드 실행
|
||||
@include_once ($member_skin_path.'/register_form_update.tail.skin.php');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user