-
+
+
+
+
+
+
@@ -216,6 +226,22 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
'.PHP_EOL;
}
-if(!defined('G4_IS_ADMIN'))
+//if(!defined('G4_IS_ADMIN'))
echo $config['cf_add_script'];
?>
diff --git a/index.php b/index.php
index 3c07d7064..3aa9c62f2 100644
--- a/index.php
+++ b/index.php
@@ -31,10 +31,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
-
- // 사용방법
- // latest(스킨, 게시판아이디, 출력라인, 글자수);
+ // 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("basic", $row['bo_table'], 5, 25);
?>
diff --git a/install/shop.sql b/install/shop.sql
index 99dca6aa8..5da38de42 100644
--- a/install/shop.sql
+++ b/install/shop.sql
@@ -63,6 +63,7 @@ CREATE TABLE IF NOT EXISTS `shop_cart` (
`ct_history` text NOT NULL,
`ct_price` int(11) NOT NULL DEFAULT '0',
`ct_point` int(11) NOT NULL DEFAULT '0',
+ `cp_amount` int(11) NOT NULL DEFAULT '0',
`ct_point_use` tinyint(4) NOT NULL DEFAULT '0',
`ct_stock_use` tinyint(4) NOT NULL DEFAULT '0',
`ct_option` varchar(255) NOT NULL DEFAULT '',
@@ -152,7 +153,9 @@ CREATE TABLE IF NOT EXISTS `shop_coupon` (
`cp_trunc` INT(11) NOT NULL DEFAULT '0',
`cp_minimum` INT(11) NOT NULL DEFAULT '0',
`cp_maximum` INT(11) NOT NULL DEFAULT '0',
+ `od_id` bigint(20) unsigned NOT NULL,
`cp_used` TINYINT(4) NOT NULL DEFAULT '0',
+ `cp_used_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`cp_datetime` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`cp_no`),
UNIQUE KEY `cp_id` (`cp_id`),
@@ -588,6 +591,7 @@ CREATE TABLE IF NOT EXISTS `shop_order` (
`od_b_addr2` varchar(100) NOT NULL DEFAULT '',
`od_memo` text NOT NULL,
`od_send_cost` int(11) NOT NULL DEFAULT '0',
+ `od_send_coupon` int(11) NOT NULL DEFAULT '0',
`od_temp_bank` int(11) NOT NULL DEFAULT '0',
`od_temp_card` int(11) NOT NULL DEFAULT '0',
`od_temp_hp` int(11) NOT NULL,
@@ -602,6 +606,7 @@ CREATE TABLE IF NOT EXISTS `shop_order` (
`od_hp_time` datetime NOT NULL,
`od_cancel_card` int(11) NOT NULL DEFAULT '0',
`od_dc_amount` int(11) NOT NULL DEFAULT '0',
+ `od_coupon` int(11) NOT NULL DEFAULT '0',
`od_refund_amount` int(11) NOT NULL DEFAULT '0',
`od_shop_memo` text NOT NULL,
`dl_id` int(11) NOT NULL DEFAULT '0',
diff --git a/lib/shop.lib.php b/lib/shop.lib.php
index fc343fa27..f4e8ff25e 100644
--- a/lib/shop.lib.php
+++ b/lib/shop.lib.php
@@ -1139,6 +1139,42 @@ function get_coupon_id()
return $str;
}
+
+// array_map() 대체
+function array_add_callback($func, $array)
+{
+ if(!$func) {
+ return;
+ }
+
+ if(is_array($array)) {
+ foreach($array as $key => $value) {
+ if(is_array($value)) {
+ $array[$key] = array_add_callback($func, $value);
+ } else {
+ $array[$key] = call_user_func($func, $value);
+ }
+ }
+ } else {
+ $array = call_user_func($func, $array);
+ }
+
+ return $array;
+}
+
+// 상품포인트
+function get_item_point($it)
+{
+ $it_point = 0;
+
+ if($it['it_point_type']) {
+ $it_point = floor(($it['it_price'] * ($it['it_point'] / 100) / 10)) * 10;
+ } else {
+ $it_point = $it['it_point'];
+ }
+
+ return $it_point;
+}
//==============================================================================
// 쇼핑몰 함수 모음 끝
//==============================================================================
diff --git a/mobile/shop/cart.php b/mobile/shop/cart.php
index 8e248075c..1923a2a89 100644
--- a/mobile/shop/cart.php
+++ b/mobile/shop/cart.php
@@ -3,18 +3,257 @@ include_once('./_common.php');
$g4['title'] = '장바구니';
include_once(G4_MSHOP_PATH.'/_head.php');
+$s_uq_id = get_session('ss_uq_id');
?>
+
+
+
+
\ No newline at end of file
diff --git a/mobile/shop/item.php b/mobile/shop/item.php
index 3b38ac2e5..ed9bb561c 100644
--- a/mobile/shop/item.php
+++ b/mobile/shop/item.php
@@ -145,8 +145,8 @@ function pg_anchor_m($anc_id) {
?>
- >상품정보
- - >사용후기
- - >상품문의
+ - >사용후기
+ - >상품문의
- >배송정보
- >교환정보
- >관련상품
@@ -334,12 +334,7 @@ else
|
점
@@ -554,9 +549,9 @@ else
-
+
-
+
상품문의
-
+
-
+
등록된 상품문의
';
+ if ($i == 0) echo '';
?>
- -
-
-
+ -
+
+
- 작성자
- 작성일
@@ -65,12 +65,12 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
-
-
+
+
문의내용
-
+
답변
@@ -81,14 +81,14 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
-
- |
() |
|
+ |
|
diff --git a/mobile/shop/orderinquiryview.php b/mobile/shop/orderinquiryview.php
index 6af7413fe..4bbc36946 100644
--- a/mobile/shop/orderinquiryview.php
+++ b/mobile/shop/orderinquiryview.php
@@ -44,7 +44,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
- 상품 배송이 완료되었습니다.
+
0)
- {
+ // 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인
+ $od_coupon = $od['od_coupon'];
+ $tot_amount = $tot_sell_amount + $send_cost - $tot_cp_amount - $od_coupon;
?>
- 배송비
- 원
+ 주문총액
+ 원
+ 0) { ?>
+
+ 상품할인
+ 원
+
- 0) {
- ?>
+ 0) { ?>
+
+ 결제할인
+ 원
+
+
+
+ 0) { ?>
+
+ 배송비
+ 원
+
+
+
+ 0) { ?>
+
+ 배송비할인
+ 원
+
+
총계
- 원 점
+ 원
-
+
+ 포인트
+ 점
+
diff --git a/mobile/skin/board/basic/view.skin.php b/mobile/skin/board/basic/view.skin.php
index be5bbe6aa..cdcc4c3a8 100644
--- a/mobile/skin/board/basic/view.skin.php
+++ b/mobile/skin/board/basic/view.skin.php
@@ -166,8 +166,7 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
}
?>
diff --git a/mobile/skin/board/basic/view_comment.skin.php b/mobile/skin/board/basic/view_comment.skin.php
index 92757bf9e..c44a12cc5 100644
--- a/mobile/skin/board/basic/view_comment.skin.php
+++ b/mobile/skin/board/basic/view_comment.skin.php
@@ -32,6 +32,9 @@ var char_max = parseInt(); // 최대
작성일
+
@@ -113,7 +116,7 @@ var char_max = parseInt(); // 최대
| 내용 |
@@ -168,7 +171,7 @@ var char_max = parseInt(); // 최대
var subject = "";
var content = "";
$.ajax({
- url: g4_bbs_url+"/filter.ajax.php",
+ url: g4_bbs_url+"/ajax.filter.php",
type: "POST",
data: {
"subject": "",
diff --git a/mobile/skin/board/basic/write.skin.php b/mobile/skin/board/basic/write.skin.php
index c24f751b6..31bc836ef 100644
--- a/mobile/skin/board/basic/write.skin.php
+++ b/mobile/skin/board/basic/write.skin.php
@@ -202,7 +202,7 @@ function fwrite_submit(f)
var subject = "";
var content = "";
$.ajax({
- url: g4_bbs_url+"/filter.ajax.php",
+ url: g4_bbs_url+"/ajax.filter.php",
type: "POST",
data: {
"subject": f.wr_subject.value,
diff --git a/mobile/skin/board/gallery/style.css b/mobile/skin/board/gallery/style.css
index bda25bfc8..8cf767895 100644
--- a/mobile/skin/board/gallery/style.css
+++ b/mobile/skin/board/gallery/style.css
@@ -54,9 +54,9 @@
/* 게시판 읽기 */
#bo_v {margin-bottom:1.5em;padding-bottom:1.5em}
-#bo_v_cate {padding:0 1em;color:#999;font-size:0.9em;font-weight:bold}
+#bo_v_table {padding:0 1em;color:#999;font-size:0.9em;font-weight:bold}
-#bo_v_h1 {padding:0 0.7em 0.5em;font-size:1.2em}
+#bo_v_title {padding:0 0.7em 0.5em;font-size:1.2em}
#bo_v_info {padding:0 0.9em 1em;border-bottom:1px solid #ddd}
#bo_v_info h2 {margin:0;padding:0;height:0;overflow:hidden}
@@ -116,6 +116,10 @@
#bo_v_act_good,
#bo_v_act_nogood {display:inline-block;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden}
+#bo_v_sns {margin:0 0 2em;padding:0;list-style:none;zoom:1}
+#bo_v_sns:after {display:block;visibility:hidden;clear:both;content:""}
+#bo_v_sns li {float:left;margin:0 0.5em 0 0}
+
#bo_v form {padding-top:1.5em}
/* 게시판 댓글 */
@@ -146,4 +150,9 @@
#bo_vc_w #char_cnt {display:block;margin-bottom:0.3em}
#bo_vc_w textarea {width:99%}
+#bo_vc_sns {margin:0;padding:0;list-style:none;zoom:1}
+#bo_vc_sns:after {display:block;visibility:hidden;clear:both;content:""}
+#bo_vc_sns li {float:left;margin:0 1em 0 0}
+#bo_vc_sns input {margin:0 0 0 0.5em}
+
#bo_vc form {padding:0}
\ No newline at end of file
diff --git a/mobile/skin/board/gallery/view.skin.php b/mobile/skin/board/gallery/view.skin.php
index be5bbe6aa..cdcc4c3a8 100644
--- a/mobile/skin/board/gallery/view.skin.php
+++ b/mobile/skin/board/gallery/view.skin.php
@@ -166,8 +166,7 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
}
?>
diff --git a/mobile/skin/board/gallery/view_comment.skin.php b/mobile/skin/board/gallery/view_comment.skin.php
index bc789c16b..2a4a1c708 100644
--- a/mobile/skin/board/gallery/view_comment.skin.php
+++ b/mobile/skin/board/gallery/view_comment.skin.php
@@ -32,6 +32,9 @@ var char_max = parseInt(); // 최대
작성일
+
@@ -113,6 +116,9 @@ var char_max = parseInt(); // 최대
+
@@ -128,7 +134,7 @@ var char_max = parseInt(); // 최대
-
+
@@ -168,7 +174,7 @@ var char_max = parseInt(); // 최대
var subject = "";
var content = "";
$.ajax({
- url: g4_bbs_url+"/filter.ajax.php",
+ url: g4_bbs_url+"/ajax.filter.php",
type: "POST",
data: {
"subject": "",
@@ -236,6 +242,8 @@ var char_max = parseInt(); // 최대
+ document.getElementById("btn_submit").disabled = "disabled";
+
return true;
}
diff --git a/mobile/skin/board/gallery/write.skin.php b/mobile/skin/board/gallery/write.skin.php
index 76351e6f8..b3d57a10d 100644
--- a/mobile/skin/board/gallery/write.skin.php
+++ b/mobile/skin/board/gallery/write.skin.php
@@ -202,7 +202,7 @@ function fwrite_submit(f)
var subject = "";
var content = "";
$.ajax({
- url: g4_bbs_url+"/filter.ajax.php",
+ url: g4_bbs_url+"/ajax.filter.php",
type: "POST",
data: {
"subject": f.wr_subject.value,
diff --git a/plugin/ckeditor/config.js b/plugin/ckeditor/config.js
index a6eb7cb96..0326750a6 100644
--- a/plugin/ckeditor/config.js
+++ b/plugin/ckeditor/config.js
@@ -106,8 +106,8 @@ CKEDITOR.editorConfig = function( config ) {
'Arial;Comic Sans MS;Courier New;Lucida Sans Unicode;monospace;sans-serif;serif;Tahoma;Times New Roman;Verdana';
config.fontSize_defaultLabel = "10pt";
config.fontSize_sizes = "7pt/9px;8pt/11px;9pt/12px;10pt/13px;11pt/15px;14pt/19px;18pt/24px;24pt/32px;36/48px;";
- config.enterMode = CKEDITOR.ENTER_BR;
- config.shiftEnterMode = CKEDITOR.ENTER_P;
+ config.enterMode = CKEDITOR.ENTER_DIV;
+ config.shiftEnterMode = CKEDITOR.ENTER_DIV;
config.filebrowserUploadUrl = g4_ckeditor_url+"/upload.php?type=Images";
config.keystrokes=[
// Formatting
diff --git a/plugin/gcaptcha/gcaptcha.js b/plugin/gcaptcha/gcaptcha.js
index a1657af64..1067a1638 100644
--- a/plugin/gcaptcha/gcaptcha.js
+++ b/plugin/gcaptcha/gcaptcha.js
@@ -26,7 +26,7 @@ function chk_captcha()
$(function() {
$("#captcha").click(function(e) {
- this.setAttribute("src", g4_url+"/plugin/captcha/run.php?t="+(new Date).getTime());
+ this.setAttribute("src", g4_url+"/plugin/gcaptcha/run.php?t="+(new Date).getTime());
var keycode = (e.keyCode ? e.keyCode : e.which);
// 첫 실행에서는 포커스를 주지 않음
if (typeof(keycode) != "undefined") {
diff --git a/plugin/sns/icon/facebook_cmt.png b/plugin/sns/icon/facebook_cmt.png
new file mode 100644
index 000000000..67d294ec8
Binary files /dev/null and b/plugin/sns/icon/facebook_cmt.png differ
diff --git a/plugin/sns/icon/me2day_cmt.png b/plugin/sns/icon/me2day_cmt.png
new file mode 100644
index 000000000..cd7e21601
Binary files /dev/null and b/plugin/sns/icon/me2day_cmt.png differ
diff --git a/plugin/sns/icon/twitter_cmt.png b/plugin/sns/icon/twitter_cmt.png
new file mode 100644
index 000000000..f064d1cbb
Binary files /dev/null and b/plugin/sns/icon/twitter_cmt.png differ
diff --git a/skin/board/basic/view.sns.skin.php b/plugin/sns/view.sns.skin.php
similarity index 100%
rename from skin/board/basic/view.sns.skin.php
rename to plugin/sns/view.sns.skin.php
diff --git a/plugin/sns/view_comment_list.sns.skin.php b/plugin/sns/view_comment_list.sns.skin.php
new file mode 100644
index 000000000..81ef04ab4
--- /dev/null
+++ b/plugin/sns/view_comment_list.sns.skin.php
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/skin/board/basic/view_comment.sns.skin.php b/plugin/sns/view_comment_write.sns.skin.php
similarity index 97%
rename from skin/board/basic/view_comment.sns.skin.php
rename to plugin/sns/view_comment_write.sns.skin.php
index 18bd6e1a3..387ff216f 100644
--- a/skin/board/basic/view_comment.sns.skin.php
+++ b/plugin/sns/view_comment_write.sns.skin.php
@@ -4,7 +4,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if (!$board['bo_use_sns']) return;
?>
- | SNS 등록 |
+ SNS 동시등록 |
'$ctime' ";
sql_query($sql);
}
+*/
if (G4_IS_MOBILE) {
include_once(G4_MSHOP_PATH.'/cart.php');
@@ -29,18 +31,269 @@ if (G4_IS_MOBILE) {
$g4['title'] = '장바구니';
include_once('./_head.php');
+$s_uq_id = get_session('ss_uq_id');
?>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/shop/cartoption.php b/shop/cartoption.php
index 2044b375f..ec694239b 100644
--- a/shop/cartoption.php
+++ b/shop/cartoption.php
@@ -3,11 +3,12 @@ include_once('./_common.php');
$it_id = $_POST['it_id'];
-$sql = " select it_id, it_option_subject, it_supply_subject
+$sql = " select it_id, it_option_subject, it_supply_subject, it_price, it_point, it_point_type
from {$g4['shop_item_table']}
where it_id = '$it_id'
and it_use = '1' ";
$it = sql_fetch($sql);
+$it_point = get_item_point($it);
if(!$it['it_id'])
die('no-item');
@@ -18,7 +19,7 @@ $sql = " select * from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id
$result = sql_query($sql);
// 판매가격
-$sql2 = " select ct_price, it_name from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id = '$it_id' and ct_num = '0' ";
+$sql2 = " select ct_price, it_name, ct_point from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id = '$it_id' and ct_num = '0' ";
$row2 = sql_fetch($sql2);
if(!mysql_num_rows($result))
@@ -30,6 +31,7 @@ if(!mysql_num_rows($result))
+
+
+
|
|
@@ -160,7 +162,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
- |
+ |
|
0) {
+
+
- >상품정보
- - >사용후기
- - >상품문의
+ - >이용후기
+ - >상품문의
- >배송정보
- >교환정보
- >관련상품
@@ -338,12 +338,7 @@ else
포인트 |
점
@@ -558,9 +553,9 @@ else
-
- 사용후기
-
+
-
+
상품문의
-
+
-
+
등록된 상품문의
';
+ if ($i == 0) echo '';
?>
- -
-
-
+ -
+
+
- 작성자
- 작성일
@@ -65,12 +65,12 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
-
-
+
+
문의내용
-
+
답변
@@ -81,14 +81,14 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
-
-
+
|
@@ -40,6 +41,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
() |
|
|
+
|
|
|
diff --git a/shop/orderinquiryview.php b/shop/orderinquiryview.php
index 922b80fa4..349ec07a1 100644
--- a/shop/orderinquiryview.php
+++ b/shop/orderinquiryview.php
@@ -56,7 +56,7 @@ if(openwin != null) {
상품 배송이 완료되었습니다.
+
0)
- {
+ // 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인
+ $od_coupon = $od['od_coupon'];
+ $tot_amount = $tot_sell_amount + $send_cost - $tot_cp_amount - $od_coupon;
?>
- 배송비
- 원
+ 주문총액
+ 원
+ 0) { ?>
+
+ 상품할인
+ 원
+
- 0) {
- ?>
+ 0) { ?>
+
+ 결제할인
+ 원
+
+
+
+ 0) { ?>
+
+ 배송비
+ 원
+
+
+
+ 0) { ?>
+
+ 배송비할인
+ 원
+
+
총계
- 원 점
+ 원
-
+
+ 포인트
+ 점
+
diff --git a/shop/orderitemcoupon.php b/shop/orderitemcoupon.php
new file mode 100644
index 000000000..19795d7e0
--- /dev/null
+++ b/shop/orderitemcoupon.php
@@ -0,0 +1,81 @@
+= '".G4_TIME_YMD."'
+ and cp_minimum <= '$item_price'
+ and (
+ ( cp_method = '0' and cp_target = '{$it['it_id']}' )
+ OR
+ ( cp_method = '1' and ( cp_target IN ( '{$it['ca_id']}', '{$it['ca_id2']}', '{$it['ca_id3']}' ) ) )
+ ) ";
+$result = sql_query($sql);
+$count = mysql_num_rows($result);
+?>
+
+
+ 0) { ?>
+
+ -
+ 쿠폰명
+ 할인금액
+ 적용
+
+ $row['cp_maximum'])
+ $dc = $row['cp_maximum'];
+ ?>
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+ 0) { ?>
+
+
+
+
\ No newline at end of file
diff --git a/shop/ordermail2.inc.php b/shop/ordermail2.inc.php
index 7569e7fc3..383110162 100644
--- a/shop/ordermail2.inc.php
+++ b/shop/ordermail2.inc.php
@@ -45,6 +45,15 @@ $sql = " select b.it_sell_email,
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
+ // 합계금액 계산
+ $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
+ SUM(ct_point * ct_qty) as point,
+ SUM(ct_qty) as qty
+ from {$g4['shop_cart_table']}
+ where it_id = '{$row['it_id']}'
+ and uq_id = '$tmp_uq_id' ";
+ $sum = sql_fetch($sql);
+
// 옵션정보
$sql2 = " select ct_option, ct_qty
from {$g4['shop_cart_table']}
@@ -68,6 +77,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$list[$i]['it_simg'] = get_it_image($row['it_id'], $default['de_simg_width'], $default['de_simg_height']);
$list[$i]['it_name'] = $row['it_name'];
$list[$i]['it_opt'] = $options;
+ $list[$i]['ct_price'] = $sum['price'];
$subject = $config['cf_title'].' - 주문 알림 메일 (주문자 '.$od_name.'님)';
ob_start();
diff --git a/shop/ordersendcostcoupon.php b/shop/ordersendcostcoupon.php
new file mode 100644
index 000000000..9e83ac44d
--- /dev/null
+++ b/shop/ordersendcostcoupon.php
@@ -0,0 +1,69 @@
+= '".G4_TIME_YMD."'
+ and cp_used = '0'
+ and cp_minimum <= '$amount' ";
+$result = sql_query($sql);
+$count = mysql_num_rows($result);
+?>
+
+
+ 0) { ?>
+
+ -
+ 쿠폰명
+ 할인금액
+ 적용
+
+ $row['cp_maximum'])
+ $dc = $row['cp_maximum'];
+
+ if($dc > $send_cost)
+ $dc = $send_cost;
+ ?>
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+ 0) { ?>
+
+
+
+
\ No newline at end of file
diff --git a/skin/board/basic/list.skin.php b/skin/board/basic/list.skin.php
index 1b38c1a88..deb6243e6 100644
--- a/skin/board/basic/list.skin.php
+++ b/skin/board/basic/list.skin.php
@@ -115,7 +115,7 @@ if ($is_nogood) $colspan++;
?>
-
|
+
|
|
|
|
diff --git a/skin/board/basic/view.skin.php b/skin/board/basic/view.skin.php
index 678665bf1..f033e1315 100644
--- a/skin/board/basic/view.skin.php
+++ b/skin/board/basic/view.skin.php
@@ -167,9 +167,8 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
?>
-
); // 최대