상품보기 유형 변경 코드를 파일에 분리해서 저장

This commit is contained in:
chicpro
2013-08-08 14:25:58 +09:00
parent 21e5ac6108
commit 0da7ccb589
7 changed files with 71 additions and 62 deletions

View File

@ -1,10 +1,14 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$sct_sort_href = $_SERVER['PHP_SELF'].'?ca_id='.$ca_id;
$sct_sort_href = $_SERVER['PHP_SELF'].'?';
if($ca_id)
$sct_sort_href .= 'ca_id='.$ca_id;
else if($ev_id)
$sct_sort_href .= 'ev_id='.$ev_id;
if($skin)
$sct_sort_href .= '&amp;skin='.$skin;
$sct_sort_href .= '&amp;ev_id='.$ev_id.'&amp;sort=';
$sct_sort_href .= '&amp;sort=';
?>
<!-- 상품 정렬 선택 시작 { -->
@ -21,21 +25,5 @@ $sct_sort_href .= '&amp;ev_id='.$ev_id.'&amp;sort=';
<li><a href="<?php echo $sct_sort_href; ?>it_type4&amp;sortodr=desc" class="btn01">인기상품</a></li>
<li><a href="<?php echo $sct_sort_href; ?>it_type5&amp;sortodr=desc" class="btn01">할인상품</a></li>
</ul>
<button type="button" class="sct_lst_view sct_lst_list">리스트뷰</button>
<button type="button" class="sct_lst_view sct_lst_gallery">갤러리뷰</button>
</section>
<script>
$(function() {
$("button.sct_lst_view").on("click", function() {
if($(this).hasClass("sct_lst_gallery")) {
$("ul.sct").removeClass("sct_13");
set_cookie("ck_itemlist_type", "gallery", 1, g4_cookie_domain);
} else {
$("ul.sct").addClass("sct_13");
set_cookie("ck_itemlist_type", "list", 1, g4_cookie_domain);
}
});
});
</script>
<!-- } 상품 정렬 선택 끝 -->