분류 상품 개별 스킨 기능 추가
This commit is contained in:
@ -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);
|
||||
|
||||
@ -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 '<div id="sit_hhtml">'.stripslashes($it['it_mobile_head_html']).'</div>';
|
||||
@ -173,7 +206,7 @@ else
|
||||
|
||||
<?php
|
||||
// 상품 구입폼
|
||||
include_once(G5_MSHOP_SKIN_PATH.'/item.form.skin.php');
|
||||
include_once($skin_dir.'/item.form.skin.php');
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="sct">
|
||||
|
||||
<?php
|
||||
$nav_ca_id = $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_SHOP_SKIN_PATH.'/navigation.skin.php';
|
||||
include $nav_skin;
|
||||
|
||||
// 상단 HTML
|
||||
echo '<div id="sct_hhtml">'.stripslashes($ca['ca_mobile_head_html']).'</div>';
|
||||
@ -41,10 +56,14 @@ include_once(G5_MSHOP_PATH.'/_head.php');
|
||||
|
||||
$error = '<p class="sct_noitem">등록된 상품이 없습니다.</p>';
|
||||
|
||||
// 리스트 유형별로 출력
|
||||
$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 '<div class="sct_nofile">'.$ca['ca_mobile_skin'].' 파일을 찾을 수 없습니다.<br>관리자에게 알려주시면 감사하겠습니다.</div>';
|
||||
echo '<div class="sct_nofile">'.str_replace(G5_PATH.'/', '', $skin_file).' 파일을 찾을 수 없습니다.<br>관리자에게 알려주시면 감사하겠습니다.</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$qstr1 .= 'ca_id='.$ca_id;
|
||||
if($skin)
|
||||
$qstr1 .= '&skin='.$skin;
|
||||
$qstr1 .='&sort='.$sort.'&sortodr='.$sortodr;
|
||||
echo get_paging($config['cf_mobile_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr1.'&page=');
|
||||
?>
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -3,15 +3,49 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">', 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<h1 id="win_title">관련상품</h1>
|
||||
|
||||
<div class="sct_wrap">
|
||||
<?php
|
||||
$rel_skin_file = $skin_dir.'/'.$default['de_mobile_rel_list_skin'];
|
||||
if(!is_file($rel_skin_file))
|
||||
$rel_skin_file = G5_MSHOP_SKIN_PATH.'/'.$default['de_mobile_rel_list_skin'];
|
||||
|
||||
$sql = " select b.* from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and b.it_use='1' ";
|
||||
|
||||
$list = new item_list($default['de_mobile_rel_list_skin'], 1, 1, $default['de_mobile_rel_img_width'], $default['de_mobile_rel_img_height']);
|
||||
$list = new item_list($rel_skin_file, 1, 1, $default['de_mobile_rel_img_width'], $default['de_mobile_rel_img_height']);
|
||||
$list->set_mobile(true);
|
||||
$list->set_query($sql);
|
||||
$list->set_view('sns', true);
|
||||
|
||||
Reference in New Issue
Block a user