diff --git a/lib/shop.lib.php b/lib/shop.lib.php
index 6c486b69e..8f1018fba 100644
--- a/lib/shop.lib.php
+++ b/lib/shop.lib.php
@@ -281,7 +281,7 @@ class item_list
if ($this->ca_id3) {
$where_ca_id[] = " ca_id3 like '{$this->ca_id3}%' ";
}
- $where[] = implode(" or ", $where_ca_id);
+ $where[] = "( ".implode(" or ", $where_ca_id)." )";
}
if ($this->order_by) {
diff --git a/mobile/shop/listtype.php b/mobile/shop/listtype.php
index fd445414b..256654a68 100644
--- a/mobile/shop/listtype.php
+++ b/mobile/shop/listtype.php
@@ -2,11 +2,11 @@
include_once('./_common.php');
$type = $_REQUEST['type'];
-if ($type == 1) $g4['title'] = "히트상품";
-else if ($type == 2) $g4['title'] = "추천상품";
-else if ($type == 3) $g4['title'] = "최신상품";
-else if ($type == 4) $g4['title'] = "인기상품";
-else if ($type == 5) $g4['title'] = "할인상품";
+if ($type == 1) $g4['title'] = '히트상품';
+else if ($type == 2) $g4['title'] = '추천상품';
+else if ($type == 3) $g4['title'] = '최신상품';
+else if ($type == 4) $g4['title'] = '인기상품';
+else if ($type == 5) $g4['title'] = '할인상품';
else
alert('상품유형이 아닙니다.');
@@ -16,45 +16,46 @@ include_once(G4_MSHOP_PATH.'/_head.php');
$list_mod = 3; // 한줄에 이미지 몇개씩 출력?
$list_row = 5; // 한 페이지에 몇라인씩 출력?
-$img_width = 230; // 출력이미지 폭
-$img_height = 230; // 출력이미지 높이
+$img_width = $default['de_type'.$type.'_img_width']; // 출력이미지 폭
+$img_height = $default['de_type'.$type.'_img_height']; // 출력이미지 높이
?>
";
+$error = '
';
if (!$skin)
- $skin = "list.skin.10.php";
-
-$td_width = (int)($mod / 100);
+ $skin = "list.10.skin.php";
// 리스트 유형별로 출력
-$list_file = G4_MSHOP_PATH.'/'.$skin;
+$list_file = G4_SHOP_SKIN_PATH.'/'.$skin;
if (file_exists($list_file)) {
+ // 총몇개 = 한줄에 몇개 * 몇줄
+ $items = $list_mod * $list_row;
+ // 페이지가 없으면 첫 페이지 (1 페이지)
+ if ($page == "") $page = 1;
+ // 시작 레코드 구함
+ $from_record = ($page - 1) * $items;
- include G4_MSHOP_PATH."/list.sub.php";
- //include "$cart_dir/list.sort.php";
-
- $sql = $sql_list1 . $sql_common . $sql_list2 . " limit $from_record, $items ";
- $result = sql_query($sql);
-
- include $list_file;
+ $list = new item_list();
+ $list->set_type($type);
+ $list->set_list_mod($list_mod);
+ $list->set_list_row($list_row);
+ $list->set_img_size($img_width, $img_height);
+ $list->set_is_page(true);
+ $list->set_mobile(true);
+ $list->set_order_by($order_by);
+ $list->set_from_record($from_record);
+ echo $list->run();
+ // where 된 전체 상품수
+ $total_count = $list->total_count;
+ // 전체 페이지 계산
+ $total_page = ceil($total_count / $items);
}
else
{
@@ -71,26 +72,7 @@ if ($i==0)
-
-$row2[ca_name]";
- $bar = " | ";
-}
-*/
+echo get_paging($config['cf_mobile_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");
?>
";
+$error = '
';
if (!$skin)
- $skin = "list.skin.10.php";
-
-$td_width = (int)($mod / 100);
+ $skin = "list.10.skin.php";
// 리스트 유형별로 출력
-$list_file = G4_SHOP_PATH.'/'.$skin;
+$list_file = G4_SHOP_SKIN_PATH.'/'.$skin;
if (file_exists($list_file)) {
+ // 총몇개 = 한줄에 몇개 * 몇줄
+ $items = $list_mod * $list_row;
+ // 페이지가 없으면 첫 페이지 (1 페이지)
+ if ($page == "") $page = 1;
+ // 시작 레코드 구함
+ $from_record = ($page - 1) * $items;
- include G4_SHOP_PATH."/list.sub.php";
- //include "$cart_dir/list.sort.php";
-
- $sql = $sql_list1 . $sql_common . $sql_list2 . " limit $from_record, $items ";
- $result = sql_query($sql);
-
- include $list_file;
+ $list = new item_list();
+ $list->set_type($type);
+ $list->set_list_mod($list_mod);
+ $list->set_list_row($list_row);
+ $list->set_img_size($img_width, $img_height);
+ $list->set_is_page(true);
+ $list->set_order_by($order_by);
+ $list->set_from_record($from_record);
+ echo $list->run();
+ // where 된 전체 상품수
+ $total_count = $list->total_count;
+ // 전체 페이지 계산
+ $total_page = ceil($total_count / $items);
}
else
{
@@ -77,21 +79,6 @@ $qstr .= '&type='.$type.'&sort='.$sort;
echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");
?>
-$row2[ca_name]";
- $bar = " | ";
-}
-*/
-?>
-