#177 에 따른 모바일 쇼핑몰 코드 수정
This commit is contained in:
@ -158,6 +158,8 @@ a.sanchor_on {background:#626870;color:#fff !important;text-decoration:none}
|
||||
|
||||
#sit_pvi_nw h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#sit_pvi_nwbig {padding:1em 0;text-align:center}
|
||||
#sit_pvi_nwbig span {display:none}
|
||||
#sit_pvi_nwbig span.visible {display:inline}
|
||||
#sit_pvi_nw ul {margin:0 0 1.18em;padding:0 1em;list-style:none;zoom:1}
|
||||
#sit_pvi_nw ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#sit_pvi_nw li {float:left;margin:0 0 0 1px}
|
||||
|
||||
@ -93,11 +93,11 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
if ($s_page == 'cart.php' || $s_page == 'orderinquiryview.php') { // 링크를 붙이고
|
||||
$a1 = '<a href="./item.php?it_id='.$row[it_id].'"><b>';
|
||||
$a2 = '</b></a>';
|
||||
$image = get_it_image($row['it_id'].'_s', 70, 70, '');
|
||||
$image = get_it_image($row['it_id'], 70, 70);
|
||||
} else { // 붙이지 않고
|
||||
$a1 = '<b>';
|
||||
$a2 = '</b>';
|
||||
$image = get_it_image($row['it_id'].'_s', 50, 50);
|
||||
$image = get_it_image($row['it_id'], 50, 50);
|
||||
}
|
||||
|
||||
$it_name = $a1 . stripslashes($row['it_name']) . $a2;
|
||||
|
||||
@ -158,20 +158,25 @@ else
|
||||
<button type="button" id="sit_pvi_next" class="sit_pvi_btn">다음</button>
|
||||
<?php
|
||||
// 이미지(중) 썸네일
|
||||
for ($i=1; $i<=5; $i++)
|
||||
$thumb_count = 0;
|
||||
for ($i=1; $i<=10; $i++)
|
||||
{
|
||||
if ($i == 1) echo '<ul id="sit_pvi_slide">';
|
||||
if (file_exists(G4_DATA_PATH.'/item/'.$it_id.'_l'.$i))
|
||||
{
|
||||
$img_id = $it_id.'_l'.$i;
|
||||
echo '<li>';
|
||||
echo get_large_image($it_id.'_'.$i, $it['it_id'], false);
|
||||
echo '<a href="'.G4_SHOP_URL.'/largeimage.php?it_id='.$it['it_id'].'&img='.$img_id.'" id="'.$img_id.'" class="popup_item_image slide_img" target="_blank"><img src="'.G4_DATA_URL.'/item/'.$it_id.'_l'.$i.'" alt="" id="sit_pvi_t'.$i.'" ';
|
||||
echo '></a>';
|
||||
echo '</li>';
|
||||
}
|
||||
if(!$it['it_img'.$i])
|
||||
continue;
|
||||
|
||||
if($thumb_count == 0) echo '<ul id="sit_pvi_slide">';
|
||||
$thumb = get_it_thumbnail($it['it_img'.$i], 280, 280);
|
||||
|
||||
if(!$thumb)
|
||||
continue;
|
||||
|
||||
echo '<li>';
|
||||
echo '<a href="'.G4_SHOP_URL.'/largeimage.php?it_id='.$it['it_id'].'&no='.$i.'" class="popup_item_image slide_img" target="_blank">'.$thumb.'</a>';
|
||||
echo '</li>';
|
||||
|
||||
$thumb_count++;
|
||||
}
|
||||
if ($i > 1) echo '</ul>';
|
||||
if ($thumb_count > 0) echo '</ul>';
|
||||
?>
|
||||
<script>
|
||||
$(function() {
|
||||
@ -521,21 +526,11 @@ else
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 이미지 미리보기
|
||||
$("#sit_pvi .img_thumb").bind("hover focus", function(){
|
||||
var img_src = $(this).attr("id").replace("_s", "_l1");
|
||||
$("#sit_pvi_big img").attr("src","<?php echo G4_DATA_URL; ?>/item/"+img_src); // 이미지 소스 교체
|
||||
$("#sit_pvi_big a").attr("id", img_src);
|
||||
});
|
||||
|
||||
// 상품이미지 크게보기
|
||||
$(".popup_item_image").click(function() {
|
||||
var it_id = "<?php echo $it['it_id']; ?>";
|
||||
var img = $(this).attr("id");
|
||||
|
||||
var url = $(this).attr("href");
|
||||
var top = 10;
|
||||
var left = 10;
|
||||
var url = "<?php echo G4_SHOP_URL; ?>/largeimage.php?it_id=" + it_id + "&img=" + img;
|
||||
var opt = 'scrollbars=yes,top='+top+',left='+left;
|
||||
popup_window(url, "largeimage", opt);
|
||||
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if (G4_IS_MOBILE) {
|
||||
include_once(G4_MSHOP_PATH.'/itemrecommend.php');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$is_member)
|
||||
alert_close('회원만 메일을 발송할 수 있습니다.');
|
||||
|
||||
|
||||
@ -2,16 +2,17 @@
|
||||
include_once('./_common.php');
|
||||
|
||||
$it_id = $_GET['it_id'];
|
||||
$img = $_GET['img'];
|
||||
$no = $_GET['no'];
|
||||
|
||||
$sql = " select it_id, it_name from {$g4['shop_item_table']} where it_id='$it_id' ";
|
||||
$sql = " select it_id, it_name, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
|
||||
from {$g4['shop_item_table']} where it_id='$it_id' ";
|
||||
$row = sql_fetch_array(sql_query($sql));
|
||||
|
||||
if(!$row['it_id'])
|
||||
alert_close('상품정보가 존재하지 않습니다.');
|
||||
|
||||
$imagefile = G4_DATA_PATH."/item/$img";
|
||||
$imagefileurl = G4_DATA_URL."/item/$img";
|
||||
$imagefile = G4_DATA_PATH.'/item/'.$row['it_img'.$no];
|
||||
$imagefileurl = G4_DATA_URL.'/item/'.$row['it_img'.$no];
|
||||
$size = getimagesize($imagefile);
|
||||
|
||||
$g4['title'] = "{$row['it_name']} ($it_id)";
|
||||
@ -22,23 +23,40 @@ include_once(G4_PATH.'/head.sub.php');
|
||||
<h1>상품 이미지 새 창 보기</h1>
|
||||
|
||||
<div id="sit_pvi_nwbig">
|
||||
<a href="javascript:window.close();">
|
||||
<img src="<?php echo $imagefileurl; ?>" width="<?php echo $size[0]; ?>" height="<?php echo $size[1]; ?>" alt="<?php echo $row['it_name']; ?>" id="largeimage">
|
||||
</a>
|
||||
<?php
|
||||
$thumbnails = array();
|
||||
for($i=1; $i<=10; $i++) {
|
||||
if(!$row['it_img'.$i])
|
||||
continue;
|
||||
|
||||
$file = G4_DATA_PATH.'/item/'.$row['it_img'.$i];
|
||||
if(is_file($file)) {
|
||||
// 썸네일
|
||||
$thumb = get_it_thumbnail($row['it_img'.$i], 60, 60);
|
||||
$thumbnails[$i] = $thumb;
|
||||
$imageurl = G4_DATA_URL.'/item/'.$row['it_img'.$i];
|
||||
?>
|
||||
<span>
|
||||
<a href="javascript:window.close();">
|
||||
<img src="<?php echo $imageurl; ?>" width="<?php echo $size[0]; ?>" height="<?php echo $size[1]; ?>" alt="<?php echo $row['it_name']; ?>" id="largeimage">
|
||||
</a>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
for ($i=1; $i<=5; $i++)
|
||||
{
|
||||
if ($i == 1) echo '<ul>';
|
||||
if (file_exists(G4_DATA_PATH."/item/{$it_id}_l{$i}")) {
|
||||
$id = $it_id.'_l'.$i;
|
||||
?>
|
||||
<li><a href="<?php echo G4_SHOP_URL; ?>/largeimage.php?it_id=<?php echo $it_id; ?>&img=<?php echo $id; ?>" id="<?php echo $id; ?>" class="img_thumb"><img id="large<?php echo $i; ?>" src="<?php echo G4_DATA_URL; ?>/item/<?php echo $id; ?>" alt=""></a></li>
|
||||
<?php
|
||||
$total_count = count($thumbnails);
|
||||
$thumb_count = 0;
|
||||
if($total_count > 0) {
|
||||
echo '<ul>';
|
||||
foreach($thumbnails as $key=>$val) {
|
||||
echo '<li><a href="'.G4_SHOP_URL.'/largeimage.php?it_id='.$it_id.'&no='.$key.'" class="img_thumb">'.$val.'</a></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
if ($i > 1) echo '</ul>';
|
||||
?>
|
||||
|
||||
<div class="btn_win">
|
||||
@ -53,10 +71,13 @@ $(function(){
|
||||
var h = <?php echo $size[1]; ?> + 210;
|
||||
window.resizeTo(w, h);
|
||||
|
||||
$("#sit_pvi_nwbig span:eq("+<?php echo ($no - 1); ?>+")").addClass("visible");
|
||||
|
||||
// 이미지 미리보기
|
||||
$(".img_thumb").bind("hover focus", function(){
|
||||
var img_src = $(this).attr("id");
|
||||
$("#sit_pvi_nwbig img").attr("src","<?php echo G4_DATA_URL; ?>/item/"+img_src); // 이미지 소스 교체
|
||||
$(".img_thumb").bind("mouseover focus", function(){
|
||||
var idx = $(".img_thumb").index($(this));
|
||||
$("#sit_pvi_nwbig span.visible").removeClass("visible");
|
||||
$("#sit_pvi_nwbig span:eq("+idx+")").addClass("visible");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -13,7 +13,7 @@ for ($i=1; $row=sql_fetch_array($result); $i++)
|
||||
?>
|
||||
<li class="sct_li">
|
||||
<a href="<?php echo $href; ?>" class="sct_a">
|
||||
<span class="sct_img"><?php echo get_it_image($row['it_id'].'_m', $img_width, $img_height); ?></span>
|
||||
<span class="sct_img"><?php echo get_it_image($row['it_id'], $img_width, $img_height); ?></span>
|
||||
<b><?php echo stripslashes($row['it_name']); ?></b>
|
||||
<?php if ($row['it_cust_amount'] && !$row['it_gallery']) { ?>
|
||||
<s><?php echo display_amount($row['it_cust_amount']); ?></s>
|
||||
|
||||
@ -12,7 +12,7 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
?>
|
||||
<li class="sct_li">
|
||||
<a href="<?php echo $href; ?>" class="sct_a">
|
||||
<span class="sct_img"><?php echo get_it_image($row['it_id'].'_m', $img_width, $img_height); ?></span>
|
||||
<span class="sct_img"><?php echo get_it_image($row['it_id'], $img_width, $img_height); ?></span>
|
||||
<b><?php echo stripslashes($row['it_name']); ?></b>
|
||||
<span class="sct_cost"><?php echo display_amount(get_amount($row), $row['it_tel_inq']); ?></span>
|
||||
<span class="sct_icon">
|
||||
|
||||
@ -68,7 +68,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
||||
if ($i>0)
|
||||
echo "<tr><td colspan=3 height=1 background='".G4_SHOP_URL."/img/dot_line.gif'></td></tr>";
|
||||
|
||||
$image = get_it_image($row['it_id']."_s", 70, 70, $row['it_id']);
|
||||
$image = get_it_image($row['it_id'], 70, 70, true);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
|
||||
@ -118,7 +118,7 @@ $total_count = $row['cnt'];
|
||||
from {$g4['shop_item_table']} where it_id = '{$save['it_id'][$i]}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$image = get_it_image($row['it_id'].'_s', (int)($default['de_simg_width']), (int)($default['de_simg_height']), $row['it_id']);
|
||||
$image = get_it_image($row['it_id'], (int)($default['de_simg_width']), (int)($default['de_simg_height']), true);
|
||||
?>
|
||||
<li>
|
||||
<span class="ssch_img"><?php echo $image; ?></span>
|
||||
|
||||
@ -48,7 +48,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
|
||||
|
||||
if ($row['it_tel_inq']) $out_cd = 'tel_inq';
|
||||
|
||||
$image = get_it_image($row['it_id'].'_s', 70, 70, '');
|
||||
$image = get_it_image($row['it_id'], 70, 70);
|
||||
|
||||
$s_del = '';
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user