is_mobile) {
- $this->list_skin = $list_skin ? $list_skin : $default['de_mobile_type'.$this->type.'_list_skin'];
+ $this->list_skin = $list_skin ? $list_skin : G5_MSHOP_SKIN_PATH.'/'.$default['de_mobile_type'.$this->type.'_list_skin'];
} else {
- $this->list_skin = $list_skin ? $list_skin : $default['de_type'.$this->type.'_list_skin'];
+ $this->list_skin = $list_skin ? $list_skin : G5_SHOP_SKIN_PATH.'/'.$default['de_type'.$this->type.'_list_skin'];
}
}
@@ -311,11 +311,7 @@ class item_list
}
- if ($this->is_mobile) {
- $file = G5_MSHOP_SKIN_PATH."/{$this->list_skin}";
- } else {
- $file = G5_SHOP_SKIN_PATH."/{$this->list_skin}";
- }
+ $file = $this->list_skin;
if ($this->list_skin == "") {
return $this->count."번 item_list() 의 스킨파일이 지정되지 않았습니다.";
diff --git a/mobile/shop/event.php b/mobile/shop/event.php
index bd4920c06..4ee7c99a7 100644
--- a/mobile/shop/event.php
+++ b/mobile/shop/event.php
@@ -42,7 +42,7 @@ if (file_exists($list_file))
// 시작 레코드 구함
$from_record = ($page - 1) * $items;
- $list = new item_list($ev['ev_mobile_skin'], $ev['ev_mobile_list_mod'], 1, $ev['ev_mobile_img_width'], $ev['ev_mobile_img_height']);
+ $list = new item_list(G5_MSHOP_SKIN_PATH.'/'.$ev['ev_mobile_skin'], $ev['ev_mobile_list_mod'], 1, $ev['ev_mobile_img_width'], $ev['ev_mobile_img_height']);
$list->set_event($ev['ev_id']);
$list->set_is_page(true);
$list->set_mobile(true);
diff --git a/mobile/shop/item.php b/mobile/shop/item.php
index 48f548ec1..7421f0410 100644
--- a/mobile/shop/item.php
+++ b/mobile/shop/item.php
@@ -21,7 +21,7 @@ if (!($it['ca_use'] && $it['it_use'])) {
}
// 분류 테이블에서 분류 상단, 하단 코드를 얻음
-$sql = " select ca_include_head, ca_include_tail, ca_cert_use, ca_adult_use
+$sql = " select ca_mobile_skin_dir, ca_include_head, ca_include_tail, ca_cert_use, ca_adult_use
from {$g5['g5_shop_category_table']}
where ca_id = '{$it['ca_id']}' ";
$ca = sql_fetch($sql);
@@ -145,6 +145,36 @@ if($is_orderable) {
}
}
+// 스킨경로
+$skin_dir = G5_MSHOP_SKIN_PATH;
+$ca_dir_check = true;
+
+if($it['it_mobile_skin']) {
+ $skin_dir = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$it['it_mobile_skin'];
+
+ if(is_dir($skin_dir)) {
+ $form_skin_file = $skin_dir.'/item.form.skin.php';
+
+ if(is_file($form_skin_file))
+ $ca_dir_check = false;
+ }
+}
+
+if($ca_dir_check) {
+ if($ca['ca_mobile_skin_dir']) {
+ $skin_dir = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$ca['ca_mobile_skin_dir'];
+
+ if(is_dir($skin_dir)) {
+ $form_skin_file = $skin_dir.'/item.form.skin.php';
+
+ if(!is_file($skin_file))
+ $skin_dir = G5_MSHOP_SKIN_PATH;
+ } else {
+ $skin_dir = G5_MSHOP_SKIN_PATH;
+ }
+ }
+}
+
$g5['title'] = $it['it_name'].' > '.$it['ca_name'];
include_once(G5_MSHOP_PATH.'/_head.php');
@@ -152,7 +182,10 @@ include_once(G5_MSHOP_PATH.'/_head.php');
// 분류 위치
// HOME > 1단계 > 2단계 ... > 6단계 분류
$ca_id = $it['ca_id'];
-include G5_MSHOP_SKIN_PATH.'/navigation.skin.php';
+$nav_skin = $skin_dir.'/navigation.skin.php';
+if(!is_file($nav_skin))
+ $nav_skin = G5_MSHOP_SKIN_PATH.'/navigation.skin.php';
+include $nav_skin;
// 상단 HTML
echo ''.stripslashes($it['it_mobile_head_html']).'
';
@@ -173,7 +206,7 @@ else
diff --git a/mobile/shop/iteminfo.php b/mobile/shop/iteminfo.php
index 919f948b2..f277e7f2a 100644
--- a/mobile/shop/iteminfo.php
+++ b/mobile/shop/iteminfo.php
@@ -21,7 +21,7 @@ if (!($it['ca_use'] && $it['it_use'])) {
}
// 분류 테이블에서 분류 상단, 하단 코드를 얻음
-$sql = " select ca_include_head, ca_include_tail, ca_cert_use, ca_adult_use
+$sql = " select ca_mobile_skin_dir, ca_include_head, ca_include_tail, ca_cert_use, ca_adult_use
from {$g5['g5_shop_category_table']}
where ca_id = '{$it['ca_id']}' ";
$ca = sql_fetch($sql);
diff --git a/mobile/shop/list.php b/mobile/shop/list.php
index cd30fc749..5d2961baf 100644
--- a/mobile/shop/list.php
+++ b/mobile/shop/list.php
@@ -20,15 +20,30 @@ $g5['title'] = $ca['ca_name'].' 상품리스트';
include_once(G5_MSHOP_PATH.'/_head.php');
-// 스킨을 지정했다면 지정한 스킨을 사용함 (스킨의 다양화)
-//if ($skin) $ca[ca_skin] = $skin;
+// 스킨경로
+$skin_dir = G5_SHOP_SKIN_PATH;
+
+if($ca['ca_mobile_skin_dir']) {
+ $skin_dir = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$ca['ca_mobile_skin_dir'];
+
+ if(is_dir($skin_dir)) {
+ $skin_file = $skin_dir.'/'.$ca['ca_mobile_skin'];
+
+ if(!is_file($skin_file))
+ $skin_dir = G5_MSHOP_SKIN_PATH;
+ } else {
+ $skin_dir = G5_MSHOP_SKIN_PATH;
+ }
+}
?>
'.stripslashes($ca['ca_mobile_head_html']).'
';
@@ -41,10 +56,14 @@ include_once(G5_MSHOP_PATH.'/_head.php');
$error = '등록된 상품이 없습니다.
';
- // 리스트 유형별로 출력
- $list_file = G5_MSHOP_SKIN_PATH.'/'.$ca['ca_mobile_skin'];
- if (file_exists($list_file)) {
- include G5_MSHOP_SKIN_PATH.'/list.sort.skin.php';
+ // 리스트 스킨
+ $skin_file = $skin_dir.'/'.$ca['ca_mobile_skin'];
+
+ if (file_exists($skin_file)) {
+ $sort_skin = $skin_dir.'/list.sort.skin.php';
+ if(!is_file($sort_skin))
+ $sort_skin = G5_SHOP_SKIN_PATH.'/list.sort.skin.php';
+ include $sort_skin;
// 총몇개
$items = $ca['ca_mobile_list_mod'];
@@ -53,7 +72,7 @@ include_once(G5_MSHOP_PATH.'/_head.php');
// 시작 레코드 구함
$from_record = ($page - 1) * $items;
- $list = new item_list($ca['ca_mobile_skin'], $ca['ca_mobile_list_mod'], 1, $ca['ca_mobile_img_width'], $ca['ca_mobile_img_height']);
+ $list = new item_list($skin_file, $ca['ca_mobile_list_mod'], 1, $ca['ca_mobile_img_width'], $ca['ca_mobile_img_height']);
$list->set_category($ca['ca_id'], 1);
$list->set_category($ca['ca_id'], 2);
$list->set_category($ca['ca_id'], 3);
@@ -77,14 +96,12 @@ include_once(G5_MSHOP_PATH.'/_head.php');
}
else
{
- echo ''.$ca['ca_mobile_skin'].' 파일을 찾을 수 없습니다. 관리자에게 알려주시면 감사하겠습니다.
';
+ echo ''.str_replace(G5_PATH.'/', '', $skin_file).' 파일을 찾을 수 없습니다. 관리자에게 알려주시면 감사하겠습니다.
';
}
?>
diff --git a/mobile/shop/listtype.php b/mobile/shop/listtype.php
index bcef978b1..3c1cf5ecb 100644
--- a/mobile/shop/listtype.php
+++ b/mobile/shop/listtype.php
@@ -44,7 +44,7 @@ if (file_exists($list_file)) {
$list = new item_list();
$list->set_type($type);
- $list->set_list_skin($skin);
+ $list->set_list_skin($list_file);
$list->set_list_mod($list_mod);
$list->set_list_row($list_row);
$list->set_img_size($img_width, $img_height);
diff --git a/mobile/shop/search.php b/mobile/shop/search.php
index e992d04f4..fb38196b7 100644
--- a/mobile/shop/search.php
+++ b/mobile/shop/search.php
@@ -156,7 +156,7 @@ $total_page = ceil($total_count / $items); // 전체 페이지 계산
$list_file = G5_MSHOP_SKIN_PATH.'/'.$default['de_mobile_search_list_skin'];
if (file_exists($list_file)) {
- $list = new item_list($default['de_mobile_search_list_skin'], $default['de_mobile_search_list_mod'], 1, $default['de_mobile_search_img_width'], $default['de_mobile_search_img_height']);
+ $list = new item_list($list_file, $default['de_mobile_search_list_mod'], 1, $default['de_mobile_search_img_width'], $default['de_mobile_search_img_height']);
$list->set_query(" select * $sql_common $sql_where {$order_by} limit $from_record, $items ");
$list->set_is_page(true);
$list->set_mobile(true);
diff --git a/mobile/skin/shop/basic/iteminfo.relation.skin.php b/mobile/skin/shop/basic/iteminfo.relation.skin.php
index cb27414c5..a9be83c10 100644
--- a/mobile/skin/shop/basic/iteminfo.relation.skin.php
+++ b/mobile/skin/shop/basic/iteminfo.relation.skin.php
@@ -3,15 +3,49 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet(' ', 0);
+
+// 스킨경로
+$skin_dir = G5_MSHOP_SKIN_PATH;
+$ca_dir_check = true;
+
+if($it['it_mobile_skin']) {
+ $skin_dir = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$it['it_mobile_skin'];
+
+ if(is_dir($skin_dir)) {
+ $form_skin_file = $skin_dir.'/item.form.skin.php';
+
+ if(is_file($form_skin_file))
+ $ca_dir_check = false;
+ }
+}
+
+if($ca_dir_check) {
+ if($ca['ca_mobile_skin_dir']) {
+ $skin_dir = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/shop/'.$ca['ca_mobile_skin_dir'];
+
+ if(is_dir($skin_dir)) {
+ $form_skin_file = $skin_dir.'/item.form.skin.php';
+
+ if(!is_file($skin_file))
+ $skin_dir = G5_MSHOP_SKIN_PATH;
+ } else {
+ $skin_dir = G5_MSHOP_SKIN_PATH;
+ }
+ }
+}
?>
관련상품
set_mobile(true);
$list->set_query($sql);
$list->set_view('sns', true);
diff --git a/shop/event.php b/shop/event.php
index 13964d702..d1e99dcb3 100644
--- a/shop/event.php
+++ b/shop/event.php
@@ -59,7 +59,7 @@ if (file_exists($list_file))
// 시작 레코드 구함
$from_record = ($page - 1) * $items;
- $list = new item_list($ev['ev_skin'], $ev['ev_list_mod'], $ev['ev_list_row'], $ev['ev_img_width'], $ev['ev_img_height']);
+ $list = new item_list(G5_SHOP_SKIN_PATH.'/'.$ev['ev_skin'], $ev['ev_list_mod'], $ev['ev_list_row'], $ev['ev_img_width'], $ev['ev_img_height']);
$list->set_event($ev['ev_id']);
$list->set_is_page(true);
$list->set_order_by($order_by);
diff --git a/shop/item.php b/shop/item.php
index 65ad5504b..50aa37bdd 100644
--- a/shop/item.php
+++ b/shop/item.php
@@ -21,7 +21,7 @@ if (!($it['ca_use'] && $it['it_use'])) {
}
// 분류 테이블에서 분류 상단, 하단 코드를 얻음
-$sql = " select ca_include_head, ca_include_tail, ca_cert_use, ca_adult_use from {$g5['g5_shop_category_table']} where ca_id = '{$it['ca_id']}' ";
+$sql = " select ca_skin_dir, ca_include_head, ca_include_tail, ca_cert_use, ca_adult_use from {$g5['g5_shop_category_table']} where ca_id = '{$it['ca_id']}' ";
$ca = sql_fetch($sql);
// 본인인증, 성인인증체크
@@ -57,6 +57,36 @@ if ($_COOKIE['ck_it_id'] != $it_id) {
set_cookie("ck_it_id", $it_id, time() + 3600); // 1시간동안 저장
}
+// 스킨경로
+$skin_dir = G5_SHOP_SKIN_PATH;
+$ca_dir_check = true;
+
+if($it['it_skin']) {
+ $skin_dir = G5_PATH.'/'.G5_SKIN_DIR.'/shop/'.$it['it_skin'];
+
+ if(is_dir($skin_dir)) {
+ $form_skin_file = $skin_dir.'/item.form.skin.php';
+
+ if(is_file($form_skin_file))
+ $ca_dir_check = false;
+ }
+}
+
+if($ca_dir_check) {
+ if($ca['ca_skin_dir']) {
+ $skin_dir = G5_PATH.'/'.G5_SKIN_DIR.'/shop/'.$ca['ca_skin_dir'];
+
+ if(is_dir($skin_dir)) {
+ $form_skin_file = $skin_dir.'/item.form.skin.php';
+
+ if(!is_file($skin_file))
+ $skin_dir = G5_SHOP_SKIN_PATH;
+ } else {
+ $skin_dir = G5_SHOP_SKIN_PATH;
+ }
+ }
+}
+
$g5['title'] = $it['it_name'].' > '.$it['ca_name'];
// 분류 상단 코드가 있으면 출력하고 없으면 기본 상단 코드 출력
@@ -68,10 +98,16 @@ else
// 분류 위치
// HOME > 1단계 > 2단계 ... > 6단계 분류
$ca_id = $it['ca_id'];
-include G5_SHOP_SKIN_PATH.'/navigation.skin.php';
+$nav_skin = $skin_dir.'/navigation.skin.php';
+if(!is_file($nav_skin))
+ $nav_skin = G5_SHOP_SKIN_PATH.'/navigation.skin.php';
+include $nav_skin;
// 이 분류에 속한 하위분류 출력
-include G5_SHOP_SKIN_PATH.'/listcategory.skin.php';
+$cate_skin = $skin_dir.'/listcategory.skin.php';
+if(!is_file($cate_skin))
+ $cate_skin = G5_SHOP_SKIN_PATH.'/listcategory.skin.php';
+include $cate_skin;
if ($is_admin) {
echo '
';
@@ -194,12 +230,15 @@ function pg_anchor($anc_id) {
diff --git a/shop/list.php b/shop/list.php
index a083d0adb..cf647b339 100644
--- a/shop/list.php
+++ b/shop/list.php
@@ -25,8 +25,21 @@ if ($ca['ca_include_head'])
else
include_once('./_head.php');
-// 스킨을 지정했다면 지정한 스킨을 사용함 (스킨의 다양화)
-//if ($skin) $ca[ca_skin] = $skin;
+// 스킨경로
+$skin_dir = G5_SHOP_SKIN_PATH;
+
+if($ca['ca_skin_dir']) {
+ $skin_dir = G5_PATH.'/'.G5_SKIN_DIR.'/shop/'.$ca['ca_skin_dir'];
+
+ if(is_dir($skin_dir)) {
+ $skin_file = $skin_dir.'/'.$ca['ca_skin'];
+
+ if(!is_file($skin_file))
+ $skin_dir = G5_SHOP_SKIN_PATH;
+ } else {
+ $skin_dir = G5_SHOP_SKIN_PATH;
+ }
+}
if ($is_admin)
echo '';
@@ -41,13 +54,18 @@ var itemlist_ca_id = "";
'.stripslashes($ca['ca_head_html']).'
';
- include G5_SHOP_SKIN_PATH.'/listcategory.skin.php';
+ $cate_skin = $skin_dir.'/listcategory.skin.php';
+ if(!is_file($cate_skin))
+ $cate_skin = G5_SHOP_SKIN_PATH.'/listcategory.skin.php';
+ include $cate_skin;
// 상품 출력순서가 있다면
if ($sort != "")
@@ -57,16 +75,23 @@ var itemlist_ca_id = "";
$error = '등록된 상품이 없습니다.
';
- // 리스트 유형별로 출력
- $list_file = G5_SHOP_SKIN_PATH.'/'.$ca['ca_skin'];
- if (file_exists($list_file)) {
+ // 리스트 스킨
+ $skin_file = $skin_dir.'/'.$ca['ca_skin'];
+
+ if (file_exists($skin_file)) {
echo '';
- include G5_SHOP_SKIN_PATH.'/list.sort.skin.php';
+ $sort_skin = $skin_dir.'/list.sort.skin.php';
+ if(!is_file($sort_skin))
+ $sort_skin = G5_SHOP_SKIN_PATH.'/list.sort.skin.php';
+ include $sort_skin;
// 상품 보기 타입 변경 버튼
- include G5_SHOP_SKIN_PATH.'/list.sub.skin.php';
- echo '
';
+ $sub_skin = $skin_dir.'/list.sub.skin.php';
+ if(!is_file($sub_skin))
+ $sub_skin = G5_SHOP_SKIN_PATH.'/list.sub.skin.php';
+ include $sub_skin;
+ echo '';
// 총몇개 = 한줄에 몇개 * 몇줄
$items = $ca['ca_list_mod'] * $ca['ca_list_row'];
@@ -75,7 +100,7 @@ var itemlist_ca_id = "";
// 시작 레코드 구함
$from_record = ($page - 1) * $items;
- $list = new item_list($ca['ca_skin'], $ca['ca_list_mod'], $ca['ca_list_row'], $ca['ca_img_width'], $ca['ca_img_height']);
+ $list = new item_list($skin_file, $ca['ca_list_mod'], $ca['ca_list_row'], $ca['ca_img_width'], $ca['ca_img_height']);
$list->set_category($ca['ca_id'], 1);
$list->set_category($ca['ca_id'], 2);
$list->set_category($ca['ca_id'], 3);
@@ -99,14 +124,12 @@ var itemlist_ca_id = "";
}
else
{
- echo ''.$ca['ca_skin'].' 파일을 찾을 수 없습니다. 관리자에게 알려주시면 감사하겠습니다.
';
+ echo ''.str_replace(G5_PATH.'/', '', $skin_file).' 파일을 찾을 수 없습니다. 관리자에게 알려주시면 감사하겠습니다.
';
}
?>
diff --git a/shop/listtype.php b/shop/listtype.php
index 5cfdb2a89..84ec9c758 100644
--- a/shop/listtype.php
+++ b/shop/listtype.php
@@ -48,7 +48,7 @@ if (file_exists($list_file)) {
$list = new item_list();
$list->set_type($type);
- $list->set_list_skin($skin);
+ $list->set_list_skin($list_file);
$list->set_list_mod($list_mod);
$list->set_list_row($list_row);
$list->set_img_size($img_width, $img_height);
diff --git a/shop/search.php b/shop/search.php
index 588727341..8201eec2c 100644
--- a/shop/search.php
+++ b/shop/search.php
@@ -164,7 +164,7 @@ if ($is_admin) {
$list_file = G5_SHOP_SKIN_PATH.'/'.$default['de_search_list_skin'];
if (file_exists($list_file)) {
- $list = new item_list($default['de_search_list_skin'], $default['de_search_list_mod'], $default['de_search_list_row'], $default['de_search_img_width'], $default['de_search_img_height']);
+ $list = new item_list($list_file, $default['de_search_list_mod'], $default['de_search_list_row'], $default['de_search_img_width'], $default['de_search_img_height']);
$list->set_query(" select * $sql_common $sql_where {$order_by} limit $from_record, $items ");
$list->set_is_page(true);
$list->set_view('it_img', true);
diff --git a/skin/shop/basic/item.info.skin.php b/skin/shop/basic/item.info.skin.php
index 716ab9d68..8b98294dc 100644
--- a/skin/shop/basic/item.info.skin.php
+++ b/skin/shop/basic/item.info.skin.php
@@ -107,8 +107,12 @@ add_stylesheet(' ',
set_query($sql);
echo $list->run();
?>