PC메인 애니메이션 스킨 추가

This commit is contained in:
chicpro
2013-08-06 18:31:03 +09:00
parent 46b21c3373
commit 102dba1a59
9 changed files with 822 additions and 17 deletions

View File

@ -210,7 +210,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_type1_list_use" value="1" id="de_type1_list_use" <?php echo $default['de_type1_list_use']?"checked":""; ?>>
<label for="de_type1_list_skin">스킨</label>
<select name="de_type1_list_skin" id="de_type1_list_skin">
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type1_list_skin']); ?>
<?php echo get_list_skin_options("^main.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type1_list_skin']); ?>
</select>
<label for="de_type1_list_row">출력할 줄 수</label>
<input type="text" name="de_type1_list_row" value="<?php echo $default['de_type1_list_row']; ?>" id="de_type1_list_row" class="frm_input" size="3">
@ -229,7 +229,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_type2_list_use" value="1" id="de_type2_list_use" <?php echo $default['de_type2_list_use']?"checked":""; ?>>
<label for="de_type2_list_skin">스킨</label>
<select name="de_type2_list_skin" id="de_type2_list_skin">
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type2_list_skin']); ?>
<?php echo get_list_skin_options("^main.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type2_list_skin']); ?>
</select>
<label for="de_type2_list_row">출력할 줄 수</label>
<input type="text" name="de_type2_list_row" value="<?php echo $default['de_type2_list_row']; ?>" id="de_type2_list_row" class="frm_input" size="3">
@ -248,7 +248,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_type3_list_use" value="1" id="de_type3_list_use" <?php echo $default['de_type3_list_use']?"checked":""; ?>>
<label for="de_type3_list_skin">스킨</label>
<select name="de_type3_list_skin" id="de_type3_list_skin">
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type3_list_skin']); ?>
<?php echo get_list_skin_options("^main.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type3_list_skin']); ?>
</select>
<label for="de_type3_list_row">출력할 줄 수</label>
<input type="text" name="de_type3_list_row" value="<?php echo $default['de_type3_list_row']; ?>" id="de_type3_list_row" class="frm_input" size="3">
@ -267,7 +267,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_type4_list_use" value="1" id="de_type4_list_use" <?php echo $default['de_type4_list_use']?"checked":""; ?>>
<label for="de_type4_list_skin">스킨</label>
<select name="de_type4_list_skin" id="de_type4_list_skin">
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type4_list_skin']); ?>
<?php echo get_list_skin_options("^main.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type4_list_skin']); ?>
</select>
<label for="de_type4_list_row">출력할 줄 수</label>
<input type="text" name="de_type4_list_row" value="<?php echo $default['de_type4_list_row']; ?>" id="de_type4_list_row" class="frm_input" size="3">
@ -286,7 +286,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_type5_list_use" value="1" id="de_type5_list_use" <?php echo $default['de_type5_list_use']?"checked":""; ?>>
<label for="de_type5_list_skin">스킨</label>
<select name="de_type5_list_skin" id="de_type5_list_skin">
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type5_list_skin']); ?>
<?php echo get_list_skin_options("^main.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type5_list_skin']); ?>
</select>
<label for="de_type5_list_row">출력할 줄 수</label>
<input type="text" name="de_type5_list_row" value="<?php echo $default['de_type5_list_row']; ?>" id="de_type5_list_row" class="frm_input" size="3">
@ -322,7 +322,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_mobile_type1_list_use" value="1" id="de_mobile_type1_list_use" <?php echo $default['de_mobile_type1_list_use']?"checked":""; ?>>
<label for="de_mobile_type1_list_skin">스킨</label>
<select name="de_mobile_type1_list_skin" id="de_mobile_type1_list_skin">
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type1_list_skin']); ?>
<?php echo get_list_skin_options("^main.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type1_list_skin']); ?>
</select>
<label for="de_mobile_type1_list_mod">출력할 이미지 수</label>
<input type="text" name="de_mobile_type1_list_mod" value="<?php echo $default['de_mobile_type1_list_mod']; ?>" id="de_mobile_type1_list_mod" class="frm_input" size="3">
@ -338,7 +338,7 @@ $pg_anchor = '<ul class="anchor">
<label for="de_mobile_type2_list_use">출력</label> <input type="checkbox" name="de_mobile_type2_list_use" value="1" id="de_mobile_type2_list_use" <?php echo $default['de_mobile_type2_list_use']?"checked":""; ?>>
<label for="de_mobile_type2_list_skin">스킨 </label>
<select name="de_mobile_type2_list_skin" id="de_mobile_type2_list_skin">
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type2_list_skin']); ?>
<?php echo get_list_skin_options("^main.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type2_list_skin']); ?>
</select>
<label for="de_mobile_type2_list_mod">출력할 이미지 수</label>
<input type="text" name="de_mobile_type2_list_mod" value="<?php echo $default['de_mobile_type2_list_mod']; ?>" id="de_mobile_type2_list_mod" class="frm_input" size="3">
@ -355,7 +355,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_mobile_type3_list_use" value="1" id="de_mobile_type3_list_use" <?php echo $default['de_mobile_type3_list_use']?"checked":""; ?>>
<label for="de_mobile_type3_list_skin">스킨</label>
<select name="de_mobile_type3_list_skin" id="de_mobile_type3_list_skin">
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type3_list_skin']); ?>
<?php echo get_list_skin_options("^main.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type3_list_skin']); ?>
</select>
<label for="de_mobile_type3_list_mod">출력할 이미지 수</label>
<input type="text" name="de_mobile_type3_list_mod" value="<?php echo $default['de_mobile_type3_list_mod']; ?>" id="de_mobile_type3_list_mod" class="frm_input" size="3">
@ -372,7 +372,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_mobile_type4_list_use" value="1" id="de_mobile_type4_list_use" <?php echo $default['de_mobile_type4_list_use']?"checked":""; ?>>
<label for="de_mobile_type4_list_skin">스킨</label>
<select name="de_mobile_type4_list_skin" id="de_mobile_type4_list_skin">
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type4_list_skin']); ?>
<?php echo get_list_skin_options("^main.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type4_list_skin']); ?>
</select>
<label for="de_mobile_type4_list_mod">출력할 이미지 수</label>
<input type="text" name="de_mobile_type4_list_mod" value="<?php echo $default['de_mobile_type4_list_mod']; ?>" id="de_mobile_type4_list_mod" class="frm_input" size="3">
@ -389,7 +389,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_mobile_type5_list_use" value="1" id="de_mobile_type5_list_use" <?php echo $default['de_mobile_type5_list_use']?"checked":""; ?>>
<label for="de_mobile_type5_list_skin">스킨</label>
<select id="de_mobile_type5_list_skin" name="de_mobile_type5_list_skin">
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type5_list_skin']); ?>
<?php echo get_list_skin_options("^main.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type5_list_skin']); ?>
</select>
<label for="de_mobile_type5_list_mod">출력할 이미지 수</label>
<input type="text" name="de_mobile_type5_list_mod" value="<?php echo $default['de_mobile_type5_list_mod']; ?>" id="de_mobile_type5_list_mod" class="frm_input" size="3">

View File

@ -0,0 +1,75 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<link rel="stylesheet" href="<?php echo G4_MSHOP_SKIN_URL; ?>/style.css">
<!-- 상품진열 10 시작 { -->
<?php
for ($i=1; $row=sql_fetch_array($result); $i++) {
if ($this->list_mod >= 2) { // 1줄 이미지 : 2개 이상
if ($i%$this->list_mod == 0) $sct_last = 'sct_last'; // 줄 마지막
else if ($i%$this->list_mod == 1) $sct_last = 'sct_clear'; // 줄 첫번째
else $sct_last = '';
} else { // 1줄 이미지 : 1개
$sct_last = 'sct_clear';
}
if ($i == 1) {
if ($this->css) {
echo "<ul class=\"{$this->css}\">\n";
} else {
echo "<ul class=\"sct sct_10\">\n";
}
}
echo "<li class=\"sct_li {$sct_last}\">\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) {
echo "<b>".stripslashes($row['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, G4_SHOP_URL.'/img/sns_fb.png');
echo get_sns_share_link('twitter', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_twt.png');
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_goo.png');
echo "</div>\n";
}
if ($this->href) {
echo "</a>\n";
}
echo "</li>\n";
}
if ($i > 1) echo "</ul>\n";
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
?>
<!-- } 상품진열 10 끝 -->

View File

@ -51,7 +51,7 @@ exit;
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=1">히트상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 히트상품 모음</p>
</header>
<?php
<?php
$list = new item_list();
$list->set_type(1);
echo $list->run();
@ -65,7 +65,7 @@ exit;
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=2">추천상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 추천상품 모음</p>
</header>
<?php
<?php
$list = new item_list();
$list->set_type(2);
echo $list->run();
@ -79,7 +79,7 @@ exit;
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=3">최신상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 최신상품 모음</p>
</header>
<?php
<?php
$list = new item_list();
$list->set_type(3);
echo $list->run();
@ -93,7 +93,7 @@ exit;
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=4">인기상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 인기상품 모음</p>
</header>
<?php
<?php
$list = new item_list();
$list->set_type(4);
echo $list->run();
@ -107,7 +107,7 @@ exit;
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=5">할인상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 할인상품 모음</p>
</header>
<?php
<?php
$list = new item_list();
$list->set_type(5);
echo $list->run();

View File

@ -0,0 +1,75 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<link rel="stylesheet" href="<?php echo G4_SHOP_SKIN_URL; ?>/style.css">
<!-- 상품진열 10 시작 { -->
<?php
for ($i=1; $row=sql_fetch_array($result); $i++) {
if ($this->list_mod >= 2) { // 1줄 이미지 : 2개 이상
if ($i%$this->list_mod == 0) $sct_last = 'sct_last'; // 줄 마지막
else if ($i%$this->list_mod == 1) $sct_last = 'sct_clear'; // 줄 첫번째
else $sct_last = '';
} else { // 1줄 이미지 : 1개
$sct_last = 'sct_clear';
}
if ($i == 1) {
if ($this->css) {
echo "<ul class=\"{$this->css}\">\n";
} else {
echo "<ul class=\"sct sct_10\">\n";
}
}
echo "<li class=\"sct_li {$sct_last}\">\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) {
echo "<b>".stripslashes($row['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, G4_SHOP_URL.'/img/sns_fb.png');
echo get_sns_share_link('twitter', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_twt.png');
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_goo.png');
echo "</div>\n";
}
if ($this->href) {
echo "</a>\n";
}
echo "</li>\n";
}
if ($i > 1) echo "</ul>\n";
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
?>
<!-- } 상품진열 10 끝 -->

View File

@ -0,0 +1,150 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
/*
상품리스트가 일정 시간마다 위로 롤링되는 스킨
롤링되기 위해서는 상품이 2줄 이상이어야 함
*/
?>
<link rel="stylesheet" href="<?php echo G4_SHOP_SKIN_URL; ?>/style.css">
<!-- 상품진열 20 시작 { -->
<?php
$itemtype = $this->type;
for ($i=1; $row=sql_fetch_array($result); $i++) {
if ($this->list_mod >= 2) { // 1줄 이미지 : 2개 이상
if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막
else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째
else $sct_last = '';
} else { // 1줄 이미지 : 1개
$sct_last = ' sct_clear';
}
if ($i == 1) {
if ($this->css) {
echo "<ul id=\"smt_{$itemtype}\" class=\"{$this->css}\">\n";
} else {
echo "<ul id=\"smt_{$itemtype}\" class=\"sct smt_20\">\n";
}
echo "<li class=\"sct_li sct_li_first\">\n";
}
if ($i > 1 && $i%$this->list_mod == 1) {
echo "</li>\n";
echo "<li class=\"sct_li\">\n";
}
echo "<div class=\"sct_div{$sct_last}\">";
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) {
echo "<b>".stripslashes($row['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, G4_SHOP_URL.'/img/sns_fb.png');
echo get_sns_share_link('twitter', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_twt.png');
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_goo.png');
echo "</div>\n";
}
if ($this->href) {
echo "</a>\n";
}
echo "</div>\n";
}
if ($i > 1) {
echo "</li>\n";
echo "</ul>\n";
}
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
?>
<script>
$(function() {
var $smt<?php echo $itemtype; ?> = $("#smt_<?php echo $itemtype; ?> li.sct_li");
var $smt<?php echo $itemtype; ?>_a = $("#smt_<?php echo $itemtype; ?> li.sct_li a");
var smt<?php echo $itemtype; ?>_height = $smt<?php echo $itemtype; ?>.closest("ul").height();
var smt<?php echo $itemtype; ?>_count = $smt<?php echo $itemtype; ?>.size();
var smt<?php echo $itemtype; ?>_c_idx = smt<?php echo $itemtype; ?>_o_idx = 0;
var smt<?php echo $itemtype; ?>_time = 5000;
var smt<?php echo $itemtype; ?>_a_time = 800;
var smt<?php echo $itemtype; ?>_interval = null;
if(smt<?php echo $itemtype; ?>_count > 1)
smt<?php echo $itemtype; ?>_interval = setInterval(top_rolling, smt<?php echo $itemtype; ?>_time);
$smt<?php echo $itemtype; ?>.hover(
function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
},
function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
if(smt<?php echo $itemtype; ?>_count > 1)
smt<?php echo $itemtype; ?>_interval = setInterval(top_rolling, smt<?php echo $itemtype; ?>_time);
}
);
$smt<?php echo $itemtype; ?>_a.on("focusin", function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
});
$smt<?php echo $itemtype; ?>_a.on("focusout", function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
if(smt<?php echo $itemtype; ?>_count > 1)
smt<?php echo $itemtype; ?>_interval = setInterval(top_rolling, smt<?php echo $itemtype; ?>_time);
});
function top_rolling() {
$smt<?php echo $itemtype; ?>.eq(smt<?php echo $itemtype; ?>_o_idx).animate(
{ top: "-="+smt<?php echo $itemtype; ?>_height+"px" }, smt<?php echo $itemtype; ?>_a_time
);
smt<?php echo $itemtype; ?>_c_idx = (smt<?php echo $itemtype; ?>_o_idx + 1) % smt<?php echo $itemtype; ?>_count;
$smt<?php echo $itemtype; ?>.eq(smt<?php echo $itemtype; ?>_c_idx).css("display", "block").animate(
{ top: "-="+smt<?php echo $itemtype; ?>_height+"px" }, smt<?php echo $itemtype; ?>_a_time,
function() {
$smt<?php echo $itemtype; ?>.eq(smt<?php echo $itemtype; ?>_o_idx).css("display", "none").css("top", smt<?php echo $itemtype; ?>_height+"px");
smt<?php echo $itemtype; ?>_o_idx = smt<?php echo $itemtype; ?>_c_idx;
}
);
}
});
</script>
<!-- } 상품진열 20 끝 -->

View File

@ -0,0 +1,142 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
/*
상품리스트가 일정 시간마다 좌로 롤링되는 스킨
롤링되기 위해서는 상품이 2줄 이상이어야 함
*/
?>
<link rel="stylesheet" href="<?php echo G4_SHOP_SKIN_URL; ?>/style.css">
<!-- 상품유형 30 시작 { -->
<?php
$itemtype = $this->type;
for ($i=1; $row=sql_fetch_array($result); $i++) {
if ($i == 1) {
if ($this->css) {
echo "<ul id=\"smt_{$itemtype}\" class=\"{$this->css}\">\n";
} else {
echo "<ul id=\"smt_{$itemtype}\" class=\"sct smt_30\">\n";
}
echo "<li class=\"sct_li sct_li_first\">\n";
}
if ($i > 1 && $i%$this->list_mod == 1) {
echo "</li>\n";
echo "<li class=\"sct_li\">\n";
}
echo "<div class=\"sct_div\">";
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) {
echo "<b>".stripslashes($row['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, G4_SHOP_URL.'/img/sns_fb.png');
echo get_sns_share_link('twitter', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_twt.png');
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_goo.png');
echo "</div>\n";
}
if ($this->href) {
echo "</a>\n";
}
echo "</div>\n";
}
if ($i > 1) {
echo "</li>\n";
echo "</ul>\n";
}
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
?>
<script>
$(function() {
var $smt<?php echo $itemtype; ?> = $("#smt_<?php echo $itemtype; ?> li.sct_li");
var $smt<?php echo $itemtype; ?>_a = $("#smt_<?php echo $itemtype; ?> li.sct_li a");
var smt<?php echo $itemtype; ?>_width = $smt<?php echo $itemtype; ?>.width();
var smt<?php echo $itemtype; ?>_count = $smt<?php echo $itemtype; ?>.size();
var smt<?php echo $itemtype; ?>_c_idx = smt<?php echo $itemtype; ?>_o_idx = 0;
var smt<?php echo $itemtype; ?>_time = 7000;
var smt<?php echo $itemtype; ?>_a_time = 1500;
var smt<?php echo $itemtype; ?>_interval = null;
if(smt<?php echo $itemtype; ?>_count > 1)
smt<?php echo $itemtype; ?>_interval = setInterval(left_rolling, smt<?php echo $itemtype; ?>_time);
$smt<?php echo $itemtype; ?>.hover(
function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
},
function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
if(smt<?php echo $itemtype; ?>_count > 1)
smt<?php echo $itemtype; ?>_interval = setInterval(left_rolling, smt<?php echo $itemtype; ?>_time);
}
);
$smt<?php echo $itemtype; ?>_a.on("focusin", function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
});
$smt<?php echo $itemtype; ?>_a.on("focusout", function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
if(smt<?php echo $itemtype; ?>_count > 1)
smt<?php echo $itemtype; ?>_interval = setInterval(left_rolling, smt<?php echo $itemtype; ?>_time);
});
function left_rolling() {
$smt<?php echo $itemtype; ?>.eq(smt<?php echo $itemtype; ?>_o_idx).animate(
{ left: "-="+smt<?php echo $itemtype; ?>_width+"px" }, smt<?php echo $itemtype; ?>_a_time
);
smt<?php echo $itemtype; ?>_c_idx = (smt<?php echo $itemtype; ?>_o_idx + 1) % smt<?php echo $itemtype; ?>_count;
$smt<?php echo $itemtype; ?>.eq(smt<?php echo $itemtype; ?>_c_idx).css("display", "block").animate(
{ left: "-="+smt<?php echo $itemtype; ?>_width+"px" }, smt<?php echo $itemtype; ?>_a_time,
function() {
$smt<?php echo $itemtype; ?>.eq(smt<?php echo $itemtype; ?>_o_idx).css("display", "none").css("left", smt<?php echo $itemtype; ?>_width+"px");
smt<?php echo $itemtype; ?>_o_idx = smt<?php echo $itemtype; ?>_c_idx;
}
);
}
});
</script>
<!-- } 상품진열 30 끝 -->

View File

@ -0,0 +1,139 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
/*
상품리스트가 일정 시간마다 바뀜
롤링되기 위해서는 상품이 2줄 이상이어야 함
*/
?>
<link rel="stylesheet" href="<?php echo G4_SHOP_SKIN_URL; ?>/style.css">
<!-- 상품진열 40 시작 { -->
<?php
$itemtype = $this->type;
for ($i=1; $row=sql_fetch_array($result); $i++) {
if ($this->list_mod >= 2) { // 1줄 이미지 : 2개 이상
if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막
else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째
else $sct_last = '';
} else { // 1줄 이미지 : 1개
$sct_last = ' sct_clear';
}
if ($i == 1) {
if ($this->css) {
echo "<ul id=\"smt_{$itemtype}\" class=\"{$this->css}\">\n";
} else {
echo "<ul id=\"smt_{$itemtype}\" class=\"sct smt_40\">\n";
}
echo "<li class=\"sct_li sct_li_first\">\n";
}
if ($i > 1 && $i%$this->list_mod == 1) {
echo "</li>\n";
echo "<li class=\"sct_li\">\n";
}
echo "<div class=\"sct_div{$sct_last}\">";
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) {
echo "<b>".stripslashes($row['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, G4_SHOP_URL.'/img/sns_fb.png');
echo get_sns_share_link('twitter', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_twt.png');
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_goo.png');
echo "</div>\n";
}
if ($this->href) {
echo "</a>\n";
}
echo "</div>\n";
}
if ($i > 1) {
echo "</li>\n";
echo "</ul>\n";
}
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
?>
<script>
$(function() {
var $smt<?php echo $itemtype; ?> = $("#smt_<?php echo $itemtype; ?> li.sct_li");
var $smt<?php echo $itemtype; ?>_a = $("#smt_<?php echo $itemtype; ?> li.sct_li a");
var smt<?php echo $itemtype; ?>_count = $smt<?php echo $itemtype; ?>.size();
var smt<?php echo $itemtype; ?>_c_idx = smt<?php echo $itemtype; ?>_o_idx = 0;
var smt<?php echo $itemtype; ?>_time = 3000;
var smt<?php echo $itemtype; ?>_interval = null;
if(smt<?php echo $itemtype; ?>_count > 1)
smt<?php echo $itemtype; ?>_interval = setInterval(itemlist_show, smt<?php echo $itemtype; ?>_time);
$smt<?php echo $itemtype; ?>.hover(
function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
},
function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
if(smt<?php echo $itemtype; ?>_count > 1)
smt<?php echo $itemtype; ?>_interval = setInterval(itemlist_show, smt<?php echo $itemtype; ?>_time);
}
);
$smt<?php echo $itemtype; ?>_a.on("focusin", function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
});
$smt<?php echo $itemtype; ?>_a.on("focusout", function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
if(smt<?php echo $itemtype; ?>_count > 1)
smt<?php echo $itemtype; ?>_interval = setInterval(itemlist_show, smt<?php echo $itemtype; ?>_time);
});
function itemlist_show() {
$smt<?php echo $itemtype; ?>.eq(smt<?php echo $itemtype; ?>_o_idx).css("display", "none");
smt<?php echo $itemtype; ?>_c_idx = (smt<?php echo $itemtype; ?>_o_idx + 1) % smt<?php echo $itemtype; ?>_count;
$smt<?php echo $itemtype; ?>.eq(smt<?php echo $itemtype; ?>_c_idx).css("display", "block");
smt<?php echo $itemtype; ?>_o_idx = smt<?php echo $itemtype; ?>_c_idx;
}
});
</script>
<!-- } 상품진열 40 끝 -->

View File

@ -0,0 +1,156 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
/*
리스트의 상품이 순차적으로 위에서 내려옴
*/
?>
<link rel="stylesheet" href="<?php echo G4_SHOP_SKIN_URL; ?>/style.css">
<!-- 상품진열 50 시작 { -->
<?php
$itemtype = $this->type;
for ($i=1; $row=sql_fetch_array($result); $i++) {
if ($this->list_mod >= 2) { // 1줄 이미지 : 2개 이상
if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막
else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째
else $sct_last = '';
} else { // 1줄 이미지 : 1개
$sct_last = ' sct_clear';
}
if ($i == 1) {
if ($this->css) {
echo "<ul id=\"smt_{$itemtype}\" class=\"{$this->css}\">\n";
} else {
echo "<ul id=\"smt_{$itemtype}\" class=\"sct smt_50\">\n";
}
echo "<li class=\"sct_li sct_li_first\">\n";
}
if ($i > 1 && $i%$this->list_mod == 1) {
echo "</li>\n";
echo "<li class=\"sct_li\">\n";
}
echo "<div class=\"sct_div{$sct_last}\">";
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) {
echo "<b>".stripslashes($row['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, G4_SHOP_URL.'/img/sns_fb.png');
echo get_sns_share_link('twitter', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_twt.png');
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_goo.png');
echo "</div>\n";
}
if ($this->href) {
echo "</a>\n";
}
echo "</div>\n";
}
if ($i > 1) {
echo "</li>\n";
echo "</ul>\n";
}
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
?>
<script>
$(function() {
var $smt<?php echo $itemtype; ?> = $("#smt_<?php echo $itemtype; ?> li.sct_li");
var $smt<?php echo $itemtype; ?>_a = $("#smt_<?php echo $itemtype; ?> li.sct_li a");
var smt<?php echo $itemtype; ?>_count = $smt<?php echo $itemtype; ?>.size();
var $smt<?php echo $itemtype; ?>_height = $smt<?php echo $itemtype; ?>.height();
var smt<?php echo $itemtype; ?>_c_idx = smt<?php echo $itemtype; ?>_o_idx = 0;
var smt<?php echo $itemtype; ?>_time = 6000;
var smt<?php echo $itemtype; ?>_a_time = 800;
var smt<?php echo $itemtype; ?>_delay = 300;
var smt<?php echo $itemtype; ?>_interval = null;
// 초기실행
if(smt<?php echo $itemtype; ?>_count > 0)
item_drop();
if(smt<?php echo $itemtype; ?>_count > 1)
smt<?php echo $itemtype; ?>_interval = setInterval(item_drop, smt<?php echo $itemtype; ?>_time);
$smt<?php echo $itemtype; ?>.hover(
function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
},
function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
if(smt<?php echo $itemtype; ?>_count > 1)
smt<?php echo $itemtype; ?>_interval = setInterval(item_drop, smt<?php echo $itemtype; ?>_time);
}
);
$smt<?php echo $itemtype; ?>_a.on("focusin", function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
});
$smt<?php echo $itemtype; ?>_a.on("focusout", function() {
if(smt<?php echo $itemtype; ?>_interval != null)
clearInterval(smt<?php echo $itemtype; ?>_interval);
if(smt<?php echo $itemtype; ?>_count > 1)
smt<?php echo $itemtype; ?>_interval = setInterval(item_drop, smt<?php echo $itemtype; ?>_time);
});
function item_drop() {
var delay = 0;
$smt<?php echo $itemtype; ?>.eq(smt<?php echo $itemtype; ?>_o_idx).css("display", "none");
$smt<?php echo $itemtype; ?>.eq(smt<?php echo $itemtype; ?>_o_idx).find("div").css("top", "-"+$smt<?php echo $itemtype; ?>_height+"px");
smt<?php echo $itemtype; ?>_c_idx = (smt<?php echo $itemtype; ?>_o_idx + 1) % smt<?php echo $itemtype; ?>_count;
$smt<?php echo $itemtype; ?>.eq(smt<?php echo $itemtype; ?>_c_idx).css("display", "block");
$smt<?php echo $itemtype; ?>.eq(smt<?php echo $itemtype; ?>_c_idx).find("div").each(function() {
$(this).delay(delay).animate(
{ top: "+="+$smt<?php echo $itemtype; ?>_height+"px" }, smt<?php echo $itemtype; ?>_a_time
);
delay += smt<?php echo $itemtype; ?>_delay;
});
smt<?php echo $itemtype; ?>_o_idx = smt<?php echo $itemtype; ?>_c_idx;
}
});
</script>
<!-- } 상품진열 50 끝 -->

View File

@ -1,5 +1,5 @@
/* ##### maintype(nn).inc.php, list.skin.(nn).php 공통 적용 시작 ##### */
/* ##### main(nn).skin.php, list.(nn).skin..php 공통 적용 시작 ##### */
/* 공통 */
.sct_wrap {margin:0 0 30px;zoom:1}
.sct_wrap:after {display:block;visibility:hidden;clear:both;content:""}
@ -76,4 +76,72 @@
.sct_13 .sct_rel_ul {margin:0;padding:0;list-style:none}
.sct_13 .sct_rel_li {float:left;margin:0 0 0 10px}
.sct_13 .sct_sns {position:absolute;top:20px;right:20px}
/* ##### maintype(nn).inc.php, list.skin.(nn).php 공통 적용 끝 ##### */
/* 메인 상품 목록 스킨 20 */
.smt_20 {position:relative;height:306px;overflow-y:hidden}
.smt_20 .sct_li {position:absolute;top:306px;left:0;display:none}
.smt_20 .sct_li_first {top:0;display:block}
.smt_20 .sct_div {float:left;margin:0 25px 15px 0;}
.smt_20 .sct_last {margin:0 0 15px !important}
.smt_20 .sct_clear {clear:both}
.smt_20 .sct_a {display:block;position:relative;text-decoration:none}
.smt_20 .sct_a:focus, .smt_20 .sct_a:hover {text-decoration:none}
.smt_20 .sct_img {display:block;margin:0 0 15px}
.smt_20 b {display:block;margin:0 0 8px;font-weight:normal}
.smt_20 s {display:block}
.smt_20 .sct_cost {display:block;margin:0 0 10px;font-weight:bold}
.smt_20 .sct_icon {}
.smt_20 .sct_icon img {}
.smt_20 .sct_sns {position:absolute;top:190px;right:20px}
/* 메인 상품 목록 스킨 30 */
.smt_30 {position:relative;width:740px;height:308px;overflow-x:hidden}
.smt_30 .sct_li {position:absolute;top:0;left:765px;width:765px;display:none}
.smt_30 .sct_li_first {left:0;display:block}
.smt_30 .sct_div {float:left;margin:0 25px 15px 0;}
.smt_30 .sct_clear {clear:both}
.smt_30 .sct_a {display:block;position:relative;text-decoration:none}
.smt_30 .sct_a:focus, .smt_30 .sct_a:hover {text-decoration:none}
.smt_30 .sct_img {display:block;margin:0 0 15px}
.smt_30 b {display:block;margin:0 0 8px;font-weight:normal}
.smt_30 s {display:block}
.smt_30 .sct_cost {display:block;margin:0 0 10px;font-weight:bold}
.smt_30 .sct_icon {}
.smt_30 .sct_icon img {}
.smt_30 .sct_sns {position:absolute;top:190px;right:20px}
/* 메인 상품 목록 스킨 40 */
.smt_40 {position:relative;height:306px}
.smt_40 .sct_li {position:absolute;top:0;left:0;display:none}
.smt_40 .sct_li_first {display:block}
.smt_40 .sct_div {float:left;margin:0 25px 15px 0;}
.smt_40 .sct_last {margin:0 0 15px !important}
.smt_40 .sct_clear {clear:both}
.smt_40 .sct_a {display:block;position:relative;text-decoration:none}
.smt_40 .sct_a:focus, .smt_40 .sct_a:hover {text-decoration:none}
.smt_40 .sct_img {display:block;margin:0 0 15px}
.smt_40 b {display:block;margin:0 0 8px;font-weight:normal}
.smt_40 s {display:block}
.smt_40 .sct_cost {display:block;margin:0 0 10px;font-weight:bold}
.smt_40 .sct_icon {}
.smt_40 .sct_icon img {}
.smt_40 .sct_sns {position:absolute;top:190px;right:20px}
/* 메인 상품 목록 스킨 50 */
.smt_50 {position:relative;height:306px}
.smt_50 .sct_li {position:absolute;top:0;left:0;height:306px;display:none;overflow-y:hidden}
.smt_50 .sct_li_first {display:block}
.smt_50 .sct_div {float:left;position:relative;top:-306px;margin:0 25px 15px 0}
.smt_50 .sct_last {margin:0 0 15px}
.smt_50 .sct_clear {clear:both}
.smt_50 .sct_a {display:block;position:relative;text-decoration:none}
.smt_50 .sct_a:focus, .smt_50 .sct_a:hover {text-decoration:none}
.smt_50 .sct_img {display:block;margin:0 0 15px}
.smt_50 b {display:block;margin:0 0 8px;font-weight:normal}
.smt_50 s {display:block}
.smt_50 .sct_cost {display:block;margin:0 0 10px;font-weight:bold}
.smt_50 .sct_icon {}
.smt_50 .sct_icon img {}
.smt_50 .sct_sns {position:absolute;top:190px;right:20px}
/* ##### main(nn).skin.php, list.(nn).skin..php 공통 적용 끝 ##### */