class item_list 모바일 적용
This commit is contained in:
@ -52,8 +52,9 @@ exit;
|
||||
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 히트상품 모음</p>
|
||||
</header>
|
||||
<?php
|
||||
$disp = new display_item(1);
|
||||
echo $disp->run();
|
||||
$list = new item_list();
|
||||
$list->set_type(1);
|
||||
echo $list->run();
|
||||
?>
|
||||
</section>
|
||||
<!-- } 히트상품 끝 -->
|
||||
@ -65,8 +66,9 @@ exit;
|
||||
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 추천상품 모음</p>
|
||||
</header>
|
||||
<?php
|
||||
$disp = new display_item(2);
|
||||
echo $disp->run();
|
||||
$list = new item_list();
|
||||
$list->set_type(2);
|
||||
echo $list->run();
|
||||
?>
|
||||
</section>
|
||||
<!-- } 추천상품 끝 -->
|
||||
@ -78,8 +80,9 @@ exit;
|
||||
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 최신상품 모음</p>
|
||||
</header>
|
||||
<?php
|
||||
$disp = new display_item(3);
|
||||
echo $disp->run();
|
||||
$list = new item_list();
|
||||
$list->set_type(3);
|
||||
echo $list->run();
|
||||
?>
|
||||
</section>
|
||||
<!-- } 최신상품 끝 -->
|
||||
@ -91,8 +94,9 @@ exit;
|
||||
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 인기상품 모음</p>
|
||||
</header>
|
||||
<?php
|
||||
$disp = new display_item(4);
|
||||
echo $disp->run();
|
||||
$list = new item_list();
|
||||
$list->set_type(4);
|
||||
echo $list->run();
|
||||
?>
|
||||
</section>
|
||||
<!-- } 인기상품 끝 -->
|
||||
@ -104,8 +108,9 @@ exit;
|
||||
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 할인상품 모음</p>
|
||||
</header>
|
||||
<?php
|
||||
$disp = new display_item(5);
|
||||
echo $disp->run();
|
||||
$list = new item_list();
|
||||
$list->set_type(5);
|
||||
echo $list->run();
|
||||
?>
|
||||
</section>
|
||||
<!-- } 할인상품 끝 -->
|
||||
|
||||
@ -620,17 +620,25 @@ else
|
||||
|
||||
<div class="sct_wrap">
|
||||
<?php
|
||||
/*
|
||||
$list_mod = 3;
|
||||
$img_width = 230;
|
||||
$img_height = 230;
|
||||
*/
|
||||
|
||||
$sql = " select b.* from {$g4['shop_item_relation_table']} a left join {$g4['shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and b.it_use='1' ";
|
||||
$result = sql_query($sql);
|
||||
$num = @mysql_num_rows($result);
|
||||
|
||||
$list = new item_list("list.10.skin.php", 3, 1, 150, 0);
|
||||
$list->set_mobile(true);
|
||||
$list->set_query($sql);
|
||||
echo $list->run();
|
||||
|
||||
/*
|
||||
if ($num)
|
||||
include G4_SHOP_PATH.'/maintype10.inc.php';
|
||||
else
|
||||
echo '<p class="sit_empty">이 상품과 관련된 상품이 없습니다.</p>';
|
||||
*/
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -80,7 +80,7 @@ if ($is_admin)
|
||||
$error = '<p class="sct_noitem">등록된 상품이 없습니다.</p>';
|
||||
|
||||
// 리스트 유형별로 출력
|
||||
$list_file = G4_SHOP_PATH.'/'.$ca['ca_skin'];
|
||||
$list_file = G4_SHOP_SKIN_PATH.'/'.$ca['ca_skin'];
|
||||
if (file_exists($list_file)) {
|
||||
//display_type(2, "maintype10.inc.php", 4, 2, 100, 100, $ca[ca_id]);
|
||||
|
||||
@ -101,9 +101,23 @@ if ($is_admin)
|
||||
echo '</div>';
|
||||
*/
|
||||
|
||||
$list = new item_list(0, "type10.skin.php", $ca['ca_list_mod'], $ca['ca_list_row'], $ca['ca_img_width'], $ca['ca_img_height'], $ca_id);
|
||||
// 총몇개 = 한줄에 몇개 * 몇줄
|
||||
$items = $ca['ca_list_mod'] * $ca['ca_list_row'];
|
||||
// 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
if ($page == "") $page = 1;
|
||||
// 시작 레코드 구함
|
||||
$from_record = ($page - 1) * $items;
|
||||
|
||||
$list = new item_list($ca['ca_skin'], $ca['ca_list_mod'], $ca['ca_list_row'], $ca['ca_img_width'], $ca['ca_img_height']);
|
||||
$list->set_category($ca['ca_id']);
|
||||
$list->set_is_page(true);
|
||||
$list->set_from_record($from_record);
|
||||
echo $list->run();
|
||||
|
||||
// where 된 전체 상품수
|
||||
$total_count = $list->total_count;
|
||||
// 전체 페이지 계산
|
||||
$total_page = ceil($total_count / $items);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user