스킨화 작업 3차
This commit is contained in:
@ -102,11 +102,6 @@ else
|
||||
include_once(G5_MSHOP_SKIN_PATH.'/item.form.skin.php');
|
||||
?>
|
||||
|
||||
<?php
|
||||
// 상품 상세정보
|
||||
include_once(G5_MSHOP_SKIN_PATH.'/item.info.skin.php');
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
90
mobile/shop/iteminfo.php
Normal file
90
mobile/shop/iteminfo.php
Normal file
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$it_id = $_GET['it_id'];
|
||||
$info = $_GET['info'];
|
||||
|
||||
// 분류사용, 상품사용하는 상품의 정보를 얻음
|
||||
$sql = " select a.*,
|
||||
b.ca_name,
|
||||
b.ca_use
|
||||
from {$g5['g5_shop_item_table']} a,
|
||||
{$g5['g5_shop_category_table']} b
|
||||
where a.it_id = '$it_id'
|
||||
and a.ca_id = b.ca_id ";
|
||||
$it = sql_fetch($sql);
|
||||
if (!$it['it_id'])
|
||||
alert('자료가 없습니다.');
|
||||
if (!($it['ca_use'] && $it['it_use'])) {
|
||||
if (!$is_admin)
|
||||
alert('판매가능한 상품이 아닙니다.');
|
||||
}
|
||||
|
||||
// 분류 테이블에서 분류 상단, 하단 코드를 얻음
|
||||
$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']}' ";
|
||||
$ca = sql_fetch($sql);
|
||||
|
||||
|
||||
$g5['title'] = $it['it_name'].' > '.$it['ca_name'];
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
// 관리자가 확인한 사용후기의 갯수를 얻음
|
||||
$sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_use_count = $row['cnt'];
|
||||
|
||||
// 상품문의의 갯수를 얻음
|
||||
$sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_qa_count = $row['cnt'];
|
||||
|
||||
// 관련상품의 갯수를 얻음
|
||||
$sql = " select count(*) as cnt
|
||||
from {$g5['g5_shop_item_relation_table']} a
|
||||
left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1')
|
||||
where a.it_id = '{$it['it_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_relation_count = $row['cnt'];
|
||||
|
||||
function pg_anchor($info) {
|
||||
global $default;
|
||||
global $it_id, $item_use_count, $item_qa_count, $item_relation_count;
|
||||
|
||||
$href = G5_SHOP_URL.'/iteminfo.php?it_id='.$it_id;
|
||||
?>
|
||||
<ul class="sanchor">
|
||||
<li><a href="<?php echo $href; ?>" <?php if ($info == '') echo 'class="sanchor_on"'; ?>>상품정보</a></li>
|
||||
<li><a href="<?php echo $href; ?>&info=use" <?php if ($info == 'use') echo 'class="sanchor_on"'; ?>>사용후기 <span class="item_use_count"><?php echo $item_use_count; ?></span></a></li>
|
||||
<li><a href="<?php echo $href; ?>&info=qa" <?php if ($info == 'qa') echo 'class="sanchor_on"'; ?>>상품문의 <span class="item_qa_count"><?php echo $item_qa_count; ?></span></a></li>
|
||||
<?php if ($default['de_baesong_content']) { ?><li><a href="<?php echo $href; ?>&info=dvr" <?php if ($info == 'dvr') echo 'class="sanchor_on"'; ?>>배송정보</a></li><?php } ?>
|
||||
<?php if ($default['de_change_content']) { ?><li><a href="<?php echo $href; ?>&info=ex" <?php if ($info == 'ex') echo 'class="sanchor_on"'; ?>>교환정보</a></li><?php } ?>
|
||||
<li><a href="<?php echo $href; ?>&info=rel" <?php if ($info == 'rel') echo 'class="sanchor_on"'; ?>>관련상품 <span class="item_relation_count"><?php echo $item_relation_count; ?></span></a></li>
|
||||
</ul>
|
||||
<?php
|
||||
}
|
||||
|
||||
switch($info) {
|
||||
case 'use':
|
||||
include_once(G5_MSHOP_SKIN_PATH.'/iteminfo.itemuse.skin.php');
|
||||
break;
|
||||
case 'qa':
|
||||
include_once(G5_MSHOP_SKIN_PATH.'/iteminfo.itemqa.skin.php');
|
||||
break;
|
||||
case 'dvr':
|
||||
include_once(G5_MSHOP_SKIN_PATH.'/iteminfo.delivery.skin.php');
|
||||
break;
|
||||
case 'ex':
|
||||
include_once(G5_MSHOP_SKIN_PATH.'/iteminfo.change.skin.php');
|
||||
break;
|
||||
case 'rel':
|
||||
include_once(G5_MSHOP_SKIN_PATH.'/iteminfo.relation.skin.php');
|
||||
break;
|
||||
default:
|
||||
include_once(G5_MSHOP_SKIN_PATH.'/iteminfo.info.skin.php');
|
||||
break;
|
||||
}
|
||||
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -2,7 +2,7 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
|
||||
$itemuse_skin = G5_SHOP_SKIN_PATH.'/itemuse.skin.php';
|
||||
$itemuse_skin = G5_MSHOP_SKIN_PATH.'/itemuse.skin.php';
|
||||
|
||||
if(!file_exists($itemuse_skin)) {
|
||||
echo str_replace(G5_PATH.'/', '', $itemuse_skin).' 스킨 파일이 존재하지 않습니다.';
|
||||
|
||||
@ -32,7 +32,7 @@ if (!$skin)
|
||||
$skin = 'list.10.skin.php';
|
||||
|
||||
// 리스트 유형별로 출력
|
||||
$list_file = G5_SHOP_SKIN_PATH.'/'.$skin;
|
||||
$list_file = G5_MSHOP_SKIN_PATH.'/'.$skin;
|
||||
if (file_exists($list_file)) {
|
||||
// 총몇개 = 한줄에 몇개 * 몇줄
|
||||
$items = $list_mod * $list_row;
|
||||
|
||||
@ -358,29 +358,51 @@ if ($row['it_id']) {
|
||||
?>
|
||||
</aside>
|
||||
|
||||
<?php
|
||||
// 관리자가 확인한 사용후기의 갯수를 얻음
|
||||
$sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_use_count = $row['cnt'];
|
||||
|
||||
// 상품문의의 갯수를 얻음
|
||||
$sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_qa_count = $row['cnt'];
|
||||
|
||||
// 관련상품의 갯수를 얻음
|
||||
$sql = " select count(*) as cnt
|
||||
from {$g5['g5_shop_item_relation_table']} a
|
||||
left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1')
|
||||
where a.it_id = '{$it['it_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_relation_count = $row['cnt'];
|
||||
|
||||
$href = G5_SHOP_URL.'/iteminfo.php?it_id='.$it_id;
|
||||
?>
|
||||
<div>
|
||||
<ul class="sanchor">
|
||||
<li><a href="<?php echo $href; ?>" target="_blank">상품정보</a></li>
|
||||
<li><a href="<?php echo $href; ?>&info=use" target="_blank">사용후기 <span class="item_use_count"><?php echo $item_use_count; ?></span></a></li>
|
||||
<li><a href="<?php echo $href; ?>&info=qa" target="_blank">상품문의 <span class="item_qa_count"><?php echo $item_qa_count; ?></span></a></li>
|
||||
<?php if ($default['de_baesong_content']) { ?><li><a href="<?php echo $href; ?>&info=dvr" target="_blank">배송정보</a></li><?php } ?>
|
||||
<?php if ($default['de_change_content']) { ?><li><a href="<?php echo $href; ?>&info=ex" target="_blank">교환정보</a></li><?php } ?>
|
||||
<li><a href="<?php echo $href; ?>&info=rel" target="_blank">관련상품 <span class="item_relation_count"><?php echo $item_relation_count; ?></span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function click_item(id)
|
||||
{
|
||||
<?php
|
||||
echo "var str = 'item_explan,item_use,item_qa";
|
||||
if ($default['de_baesong_content']) echo ",item_baesong";
|
||||
if ($default['de_change_content']) echo ",item_change";
|
||||
echo ",item_relation';";
|
||||
?>
|
||||
$(function(){
|
||||
// 상품이미지 크게보기
|
||||
$(".popup_item_image").click(function() {
|
||||
var url = $(this).attr("href");
|
||||
var top = 10;
|
||||
var left = 10;
|
||||
var opt = 'scrollbars=yes,top='+top+',left='+left;
|
||||
popup_window(url, "largeimage", opt);
|
||||
|
||||
var s = str.split(',');
|
||||
|
||||
for (i=0; i<s.length; i++)
|
||||
{
|
||||
if (id=='*')
|
||||
document.getElementById(s[i]).style.display = 'block';
|
||||
else
|
||||
document.getElementById(s[i]).style.display = 'none';
|
||||
}
|
||||
|
||||
if (id!='*')
|
||||
document.getElementById(id).style.display = 'block';
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
// 바로구매, 장바구니 폼 전송
|
||||
function fitem_submit(f)
|
||||
|
||||
@ -1,216 +0,0 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 관리자가 확인한 사용후기의 갯수를 얻음
|
||||
$sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_use_count = $row['cnt'];
|
||||
|
||||
// 상품문의의 갯수를 얻음
|
||||
$sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_qa_count = $row['cnt'];
|
||||
|
||||
// 관련상품의 갯수를 얻음
|
||||
$sql = " select count(*) as cnt
|
||||
from {$g5['g5_shop_item_relation_table']} a
|
||||
left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1')
|
||||
where a.it_id = '{$it['it_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$item_relation_count = $row['cnt'];
|
||||
|
||||
if(!function_exists('pg_anchor')) {
|
||||
function pg_anchor($anc_id) {
|
||||
global $default;
|
||||
global $item_use_count, $item_qa_count, $item_relation_count;
|
||||
?>
|
||||
<ul class="sanchor">
|
||||
<li><a href="#sit_inf" <?php if ($anc_id == 'inf') echo 'class="sanchor_on"'; ?>>상품정보</a></li>
|
||||
<li><a href="#sit_use" <?php if ($anc_id == 'use') echo 'class="sanchor_on"'; ?>>사용후기 <span class="item_use_count"><?php echo $item_use_count; ?></span></a></li>
|
||||
<li><a href="#sit_qa" <?php if ($anc_id == 'qa') echo 'class="sanchor_on"'; ?>>상품문의 <span class="item_qa_count"><?php echo $item_qa_count; ?></span></a></li>
|
||||
<?php if ($default['de_baesong_content']) { ?><li><a href="#sit_dvr" <?php if ($anc_id == 'dvr') echo 'class="sanchor_on"'; ?>>배송정보</a></li><?php } ?>
|
||||
<?php if ($default['de_change_content']) { ?><li><a href="#sit_ex" <?php if ($anc_id == 'ex') echo 'class="sanchor_on"'; ?>>교환정보</a></li><?php } ?>
|
||||
<li><a href="#sit_rel" <?php if ($anc_id == 'rel') echo 'class="sanchor_on"'; ?>>관련상품 <span class="item_relation_count"><?php echo $item_relation_count; ?></span></a></li>
|
||||
</ul>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<section id="sit_inf">
|
||||
<h2>상품 정보</h2>
|
||||
<?php echo pg_anchor('inf'); ?>
|
||||
|
||||
<?php if ($it['it_basic']) { // 상품 기본설명 ?>
|
||||
<div id="sit_inf_basic">
|
||||
<?php echo $it['it_basic']; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_explan'] || $it['it_mobile_explan']) { // 상품 상세설명 ?>
|
||||
<div id="sit_inf_explan">
|
||||
<?php echo ($it['it_mobile_explan'] ? conv_content($it['it_mobile_explan'], 1) : conv_content($it['it_explan'], 1)); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<h3>상품 정보 고시</h3>
|
||||
<?php
|
||||
if ($it['it_info_value']) {
|
||||
$info_data = unserialize($it['it_info_value']);
|
||||
$gubun = $it['it_info_gubun'];
|
||||
$info_array = $item_info[$gubun]['article'];
|
||||
?>
|
||||
<!-- 상품정보고시 -->
|
||||
<table id="sit_inf_open">
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($info_data as $key=>$val) {
|
||||
$ii_title = $info_array[$key][0];
|
||||
$ii_value = $val;
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php echo $ii_title; ?></th>
|
||||
<td><?php echo $ii_value; ?></th>
|
||||
</tr>
|
||||
<?php } //foreach?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 상품정보고시 end -->
|
||||
<?php } //if?>
|
||||
|
||||
</section>
|
||||
<!-- 상품설명 end -->
|
||||
|
||||
<section id="sit_use">
|
||||
<h2>사용후기</h2>
|
||||
<?php echo pg_anchor('use'); ?>
|
||||
|
||||
<div id="itemuse"><?php include_once('./itemuse.php'); ?></div>
|
||||
</section>
|
||||
|
||||
<section id="sit_qa">
|
||||
<h2>상품문의</h2>
|
||||
<?php echo pg_anchor('qa'); ?>
|
||||
|
||||
<div id="itemqa"><?php include_once('./itemqa.php'); ?></div>
|
||||
</section>
|
||||
|
||||
|
||||
<?php if ($default['de_baesong_content']) { // 배송정보 내용이 있다면 ?>
|
||||
<section id="sit_dvr">
|
||||
<h2>배송정보</h2>
|
||||
<?php echo pg_anchor('dvr'); ?>
|
||||
|
||||
<?php echo conv_content($default['de_baesong_content'], 1); ?>
|
||||
</section>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ($default['de_change_content']) { // 교환/반품 내용이 있다면 ?>
|
||||
<section id="sit_ex">
|
||||
<h2>교환/반품</h2>
|
||||
<?php echo pg_anchor('ex'); ?>
|
||||
|
||||
<?php echo conv_content($default['de_change_content'], 1); ?>
|
||||
</section>
|
||||
<?php } ?>
|
||||
|
||||
<section id="sit_rel">
|
||||
<h2>관련상품</h2>
|
||||
<?php echo pg_anchor('rel'); ?>
|
||||
|
||||
<div class="sct_wrap">
|
||||
<?php
|
||||
$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("item.relation.skin.php", $default['de_rel_list_mod'], 1, $default['de_rel_img_width'], $default['de_rel_img_height']);
|
||||
$list->set_mobile(true);
|
||||
$list->set_query($sql);
|
||||
echo $list->run();
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 상품이미지 크게보기
|
||||
$(".popup_item_image").click(function() {
|
||||
var url = $(this).attr("href");
|
||||
var top = 10;
|
||||
var left = 10;
|
||||
var opt = 'scrollbars=yes,top='+top+',left='+left;
|
||||
popup_window(url, "largeimage", opt);
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
var save_use_id = null;
|
||||
function use_menu(id)
|
||||
{
|
||||
if (save_use_id != null)
|
||||
document.getElementById(save_use_id).style.display = "none";
|
||||
menu(id);
|
||||
save_use_id = id;
|
||||
}
|
||||
|
||||
var save_qa_id = null;
|
||||
function qa_menu(id)
|
||||
{
|
||||
if (save_qa_id != null)
|
||||
document.getElementById(save_qa_id).style.display = "none";
|
||||
menu(id);
|
||||
save_qa_id = id;
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--[if lte IE 6]>
|
||||
<script>
|
||||
// 이미지 등비율 리사이징
|
||||
$(window).load(function() {
|
||||
view_image_resize();
|
||||
});
|
||||
|
||||
function view_image_resize()
|
||||
{
|
||||
var $img = $("#sit_inf_explan img");
|
||||
var img_wrap = $("#sit_inf_explan").width();
|
||||
var win_width = $(window).width() - 35;
|
||||
var res_width = 0;
|
||||
|
||||
if(img_wrap < win_width)
|
||||
res_width = img_wrap;
|
||||
else
|
||||
res_width = win_width;
|
||||
|
||||
$img.each(function() {
|
||||
var img_width = $(this).width();
|
||||
var img_height = $(this).height();
|
||||
var this_width = $(this).data("width");
|
||||
var this_height = $(this).data("height");
|
||||
|
||||
if(this_width == undefined) {
|
||||
$(this).data("width", img_width); // 원래 이미지 사이즈
|
||||
$(this).data("height", img_height);
|
||||
this_width = img_width;
|
||||
this_height = img_height;
|
||||
}
|
||||
|
||||
if(this_width > res_width) {
|
||||
$(this).width(res_width);
|
||||
var res_height = Math.round(res_width * $(this).data("height") / $(this).data("width"));
|
||||
$(this).height(res_height);
|
||||
} else {
|
||||
$(this).width(this_width);
|
||||
$(this).height(this_height);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<![endif]-->
|
||||
12
mobile/skin/shop/basic/iteminfo.change.skin.php
Normal file
12
mobile/skin/shop/basic/iteminfo.change.skin.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<section id="sit_ex">
|
||||
<h2>교환/반품</h2>
|
||||
<?php echo pg_anchor($info); ?>
|
||||
|
||||
<?php echo conv_content($default['de_change_content'], 1); ?>
|
||||
</section>
|
||||
12
mobile/skin/shop/basic/iteminfo.delivery.skin.php
Normal file
12
mobile/skin/shop/basic/iteminfo.delivery.skin.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<section id="sit_dvr">
|
||||
<h2>배송정보</h2>
|
||||
<?php echo pg_anchor($info); ?>
|
||||
|
||||
<?php echo conv_content($default['de_baesong_content'], 1); ?>
|
||||
</section>
|
||||
100
mobile/skin/shop/basic/iteminfo.info.skin.php
Normal file
100
mobile/skin/shop/basic/iteminfo.info.skin.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
include_once(G5_LIB_PATH.'/iteminfo.lib.php');
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<section id="sit_inf">
|
||||
<h2>상품 정보</h2>
|
||||
<?php echo pg_anchor($info); ?>
|
||||
|
||||
<?php if ($it['it_basic']) { // 상품 기본설명 ?>
|
||||
<div id="sit_inf_basic">
|
||||
<?php echo $it['it_basic']; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_explan'] || $it['it_mobile_explan']) { // 상품 상세설명 ?>
|
||||
<div id="sit_inf_explan">
|
||||
<?php echo ($it['it_mobile_explan'] ? conv_content($it['it_mobile_explan'], 1) : conv_content($it['it_explan'], 1)); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<h3>상품 정보 고시</h3>
|
||||
<?php
|
||||
if ($it['it_info_value']) {
|
||||
$info_data = unserialize($it['it_info_value']);
|
||||
$gubun = $it['it_info_gubun'];
|
||||
$info_array = $item_info[$gubun]['article'];
|
||||
?>
|
||||
<!-- 상품정보고시 -->
|
||||
<table id="sit_inf_open">
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($info_data as $key=>$val) {
|
||||
$ii_title = $info_array[$key][0];
|
||||
$ii_value = $val;
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php echo $ii_title; ?></th>
|
||||
<td><?php echo $ii_value; ?></th>
|
||||
</tr>
|
||||
<?php } //foreach?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 상품정보고시 end -->
|
||||
<?php } //if?>
|
||||
|
||||
</section>
|
||||
<!-- 상품설명 end -->
|
||||
|
||||
<!--[if lte IE 6]>
|
||||
<script>
|
||||
// 이미지 등비율 리사이징
|
||||
$(window).load(function() {
|
||||
view_image_resize();
|
||||
});
|
||||
|
||||
function view_image_resize()
|
||||
{
|
||||
var $img = $("#sit_inf_explan img");
|
||||
var img_wrap = $("#sit_inf_explan").width();
|
||||
var win_width = $(window).width() - 35;
|
||||
var res_width = 0;
|
||||
|
||||
if(img_wrap < win_width)
|
||||
res_width = img_wrap;
|
||||
else
|
||||
res_width = win_width;
|
||||
|
||||
$img.each(function() {
|
||||
var img_width = $(this).width();
|
||||
var img_height = $(this).height();
|
||||
var this_width = $(this).data("width");
|
||||
var this_height = $(this).data("height");
|
||||
|
||||
if(this_width == undefined) {
|
||||
$(this).data("width", img_width); // 원래 이미지 사이즈
|
||||
$(this).data("height", img_height);
|
||||
this_width = img_width;
|
||||
this_height = img_height;
|
||||
}
|
||||
|
||||
if(this_width > res_width) {
|
||||
$(this).width(res_width);
|
||||
var res_height = Math.round(res_width * $(this).data("height") / $(this).data("width"));
|
||||
$(this).height(res_height);
|
||||
} else {
|
||||
$(this).width(this_width);
|
||||
$(this).height(this_height);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<![endif]-->
|
||||
12
mobile/skin/shop/basic/iteminfo.itemqa.skin.php
Normal file
12
mobile/skin/shop/basic/iteminfo.itemqa.skin.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<section id="sit_qa">
|
||||
<h2>상품문의</h2>
|
||||
<?php echo pg_anchor($info); ?>
|
||||
|
||||
<div id="itemqa"><?php include_once('./itemqa.php'); ?></div>
|
||||
</section>
|
||||
12
mobile/skin/shop/basic/iteminfo.itemuse.skin.php
Normal file
12
mobile/skin/shop/basic/iteminfo.itemuse.skin.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<section id="sit_use">
|
||||
<h2>사용후기</h2>
|
||||
<?php echo pg_anchor($info); ?>
|
||||
|
||||
<div id="itemuse"><?php include_once('./itemuse.php'); ?></div>
|
||||
</section>
|
||||
30
mobile/skin/shop/basic/iteminfo.relation.skin.php
Normal file
30
mobile/skin/shop/basic/iteminfo.relation.skin.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<section id="sit_rel">
|
||||
<h2>관련상품</h2>
|
||||
<?php echo pg_anchor($info); ?>
|
||||
|
||||
<div class="sct_wrap">
|
||||
<?php
|
||||
$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("relation.skin.php", $default['de_rel_list_mod'], 1, $default['de_rel_img_width'], $default['de_rel_img_height']);
|
||||
$list->set_mobile(true);
|
||||
$list->set_query($sql);
|
||||
echo $list->run();
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("a.sct_a").on("click", function() {
|
||||
opener.location.href = this.href;
|
||||
self.close();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -139,6 +139,11 @@ $(function(){
|
||||
$("#itemqa").load($(this).attr("href"));
|
||||
return false;
|
||||
});
|
||||
|
||||
$("a#itemqa_list").on("click", function() {
|
||||
opener.location.href = this.href;
|
||||
self.close();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 상품문의 목록 끝 -->
|
||||
@ -85,7 +85,7 @@ echo itemuse_page($config['cf_mobile_pages'], $page, $total_page, "./itemuse.php
|
||||
|
||||
<div id="sit_use_wbtn">
|
||||
<a href="<?php echo $itemuse_form; ?>" class="btn02 itemuse_form" onclick="return false;">사용후기 쓰기<span class="sound_only"> 새 창</span></a>
|
||||
<a href="<?php echo $itemuse_list; ?>" class="btn01 itemuse_list">더보기</a>
|
||||
<a href="<?php echo $itemuse_list; ?>" id="itemuse_list" class="btn01">더보기</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@ -117,6 +117,11 @@ $(function(){
|
||||
$("#itemuse").load($(this).attr("href"));
|
||||
return false;
|
||||
});
|
||||
|
||||
$("a#itemuse_list").on("click", function() {
|
||||
opener.location.href = this.href;
|
||||
self.close();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 상품 사용후기 끝 -->
|
||||
78
mobile/skin/shop/basic/relation.skin.php
Normal file
78
mobile/skin/shop/basic/relation.skin.php
Normal file
@ -0,0 +1,78 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
<script src="<?php echo G5_JS_URL ?>/shop.mobile.list.js"></script>
|
||||
|
||||
<!-- 상품진열 10 시작 { -->
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
if ($i == 0) {
|
||||
if ($this->css) {
|
||||
echo "<ul id=\"sct_wrap\" class=\"{$this->css}\">\n";
|
||||
} else {
|
||||
echo "<ul id=\"sct_wrap\" class=\"sct sct_10\">\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "<li class=\"sct_li\">\n";
|
||||
|
||||
if ($this->href) {
|
||||
echo "<a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_img) {
|
||||
echo "<span class=\"sct_img\">".get_it_image($row['it_id'], $this->img_width, $this->img_height)."</span>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_id) {
|
||||
echo "<b>".stripslashes($row['it_id'])."</b>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_name) {
|
||||
$it_name = $row['it_name'];
|
||||
if ($this->is_mobile && $row['it_mobile_name']) {
|
||||
$it_name = $row['it_mobile_name'];
|
||||
}
|
||||
echo "<b>".stripslashes($it_name)."</b>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_cust_price) {
|
||||
echo "<span class=\"sct_cost\">".display_price($row['it_cust_price'])."</span>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_price) {
|
||||
echo "<span class=\"sct_cost\">".display_price(get_price($row), $row['it_tel_inq'])."</span>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_icon) {
|
||||
echo "<span class=\"sct_icon\">".item_icon($row)."</span>\n";
|
||||
}
|
||||
|
||||
if ($this->view_sns) {
|
||||
echo "<div class=\"sct_sns\">";
|
||||
echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_fb.png');
|
||||
echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_twt.png');
|
||||
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_goo.png');
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
if ($this->href) {
|
||||
echo "</a>\n";
|
||||
}
|
||||
|
||||
echo "</li>\n";
|
||||
}
|
||||
|
||||
if ($i > 0) echo "</ul>\n";
|
||||
|
||||
if($i == 0) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
|
||||
?>
|
||||
<!-- } 상품진열 10 끝 -->
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#sct_wrap").itemList("li.sct_li", "sct_clear");
|
||||
});
|
||||
</script>
|
||||
8
shop/iteminfo.php
Normal file
8
shop/iteminfo.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if (G5_IS_MOBILE) {
|
||||
include_once(G5_MSHOP_PATH.'/iteminfo.php');
|
||||
return;
|
||||
}
|
||||
?>
|
||||
@ -135,7 +135,7 @@ function pg_anchor($anc_id) {
|
||||
<?php
|
||||
$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("item.relation.skin.php", $default['de_rel_list_mod'], 1, $default['de_rel_img_width'], $default['de_rel_img_height']);
|
||||
$list = new item_list("relation.skin.php", $default['de_rel_list_mod'], 1, $default['de_rel_img_width'], $default['de_rel_img_height']);
|
||||
$list->set_query($sql);
|
||||
echo $list->run();
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user