diff --git a/mobile/shop/item.php b/mobile/shop/item.php
index 50fe94071..1a39e8197 100644
--- a/mobile/shop/item.php
+++ b/mobile/shop/item.php
@@ -604,32 +604,12 @@ else
set_mobile(true);
$list->set_query($sql);
echo $list->run();
-
- /*
- if ($num)
- include G4_MSHOP_PATH.'/maintype10.inc.php';
- else
- echo '
이 상품과 관련된 상품이 없습니다.
';
- */
?>
diff --git a/mobile/shop/list.php b/mobile/shop/list.php
index 9ee6412c9..0d9efc49a 100644
--- a/mobile/shop/list.php
+++ b/mobile/shop/list.php
@@ -48,42 +48,14 @@ if ($is_admin)
echo ''.stripslashes($ca['ca_mobile_head_html']).'
';
// 상품 출력순서가 있다면
- if ($sort != "") {
- $order_by = $sort . ' '.$sortodr. ' , ';
- }
-
- // 상품 (하위 분류의 상품을 모두 포함한다.)
- $sql_list1 = " select * ";
- $sql_list2 = " order by $order_by it_order, it_id desc ";
-
- // 하위분류 포함
- // 판매가능한 상품만
- $sql_common = " from {$g4['shop_item_table']}
- where (ca_id like '{$ca_id}%'
- or ca_id2 like '{$ca_id}%'
- or ca_id3 like '{$ca_id}%')
- and it_use = '1' ";
+ if ($sort != "")
+ $order_by = $sort.' '.$sortodr.' , it_order, it_id desc';
$error = '등록된 상품이 없습니다.
';
// 리스트 유형별로 출력
$list_file = G4_MSHOP_SKIN_PATH.'/'.$ca['ca_mobile_skin'];
if (file_exists($list_file)) {
- /*
- $list_row = $ca['ca_mobile_list_row'];
- $img_width = $ca['ca_mobile_img_width'];
- $img_height = $ca['ca_mobile_img_height'];
-
- include G4_MSHOP_PATH.'/list.sub.php';
-
- $sql = $sql_list1 . $sql_common . $sql_list2 . " limit $from_record, $items ";
- $result = sql_query($sql);
-
- echo '';
- include $list_file;
- echo '
';
- */
-
// 총몇개
$items = $ca['ca_mobile_list_mod'];
// 페이지가 없으면 첫 페이지 (1 페이지)
@@ -94,6 +66,8 @@ if ($is_admin)
$list = new item_list($ca['ca_mobile_skin'], $ca['ca_mobile_list_mod'], 1, $ca['ca_mobile_img_width'], $ca['ca_mobile_img_height']);
$list->set_category($ca['ca_id']);
$list->set_is_page(true);
+ $list->set_mobile(true);
+ $list->set_order_by($order_by);
$list->set_from_record($from_record);
echo $list->run();
diff --git a/shop/item.php b/shop/item.php
index bb479d82f..1d4a9de4e 100644
--- a/shop/item.php
+++ b/shop/item.php
@@ -615,25 +615,11 @@ else
set_mobile(true);
+ $list = new item_list("list.10.skin.php", $default['de_rel_list_mod'], 1, $default['de_rel_img_width'], $default['de_rel_img_height']);
$list->set_query($sql);
echo $list->run();
-
- /*
- if ($num)
- include G4_SHOP_PATH.'/maintype10.inc.php';
- else
- echo '
이 상품과 관련된 상품이 없습니다.
';
- */
?>
diff --git a/shop/list.php b/shop/list.php
index 4dd864f1f..a58542136 100644
--- a/shop/list.php
+++ b/shop/list.php
@@ -65,42 +65,16 @@ if ($is_admin)
include G4_SHOP_PATH.'/listcategory3.inc.php';
// 상품 출력순서가 있다면
- if ($sort != "") {
- $order_by = $sort . ' '.$sortodr. ' , ';
- }
-
- // 상품 (하위 분류의 상품을 모두 포함한다.)
- $sql_list1 = " select * ";
- $sql_list2 = " order by $order_by it_order, it_id desc ";
-
- // 하위분류 포함
- // 판매가능한 상품만
- $sql_common = " from {$g4['shop_item_table']} where (ca_id like '{$ca_id}%' or ca_id2 like '{$ca_id}%' or ca_id3 like '{$ca_id}%') and it_use = '1' ";
+ if ($sort != "")
+ $order_by = $sort.' '.$sortodr.' , it_order, it_id desc';
$error = '등록된 상품이 없습니다.
';
// 리스트 유형별로 출력
$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]);
-
- /*
- $list_mod = $ca['ca_list_mod'];
- $list_row = $ca['ca_list_row'];
- $img_width = $ca['ca_img_width'];
- $img_height = $ca['ca_img_height'];
-
- include G4_SHOP_PATH.'/list.sub.php';
include G4_SHOP_PATH.'/list.sort.php';
- $sql = $sql_list1 . $sql_common . $sql_list2 . " limit $from_record, $items ";
- $result = sql_query($sql);
-
- echo '';
- include $list_file;
- echo '
';
- */
-
// 총몇개 = 한줄에 몇개 * 몇줄
$items = $ca['ca_list_mod'] * $ca['ca_list_row'];
// 페이지가 없으면 첫 페이지 (1 페이지)
@@ -111,6 +85,7 @@ if ($is_admin)
$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_order_by($order_by);
$list->set_from_record($from_record);
echo $list->run();