'0' "; if($ps_ctid) { $tmp_level = category_level($ps_ctid); $next_num = ($tmp_level)*2; $parent_str = substr($ps_ctid, 0, $next_num); $search_sql .= " and ( substring(goods_category,1,$next_num) = '$parent_str' or substring(goods_mcategory1,1,$next_num) = '$parent_str' or substring(goods_mcategory2,1,$next_num) = '$parent_str' or substring(goods_mcategory3,1,$next_num) = '$parent_str' or substring(goods_mcategory4,1,$next_num) = '$parent_str' or substring(goods_mcategory5,1,$next_num) = '$parent_str' ) "; $top_sql = " where goods_status = '1' and approval_date > '0' "; $top_result = morning_query_error("select * from $morning_goods_table $top_sql order by goods_sale_stock desc limit 0, 10"); } if($ps_search) { if($ps_subject == "subject") { $search_sql .= " and goods_name like '%$ps_search%' "; } elseif($ps_subject == "detail") { $search_sql .= " and goods_name like '%ps_search%' and goods_main like '%$ps_search%' "; } else { $search_sql .= " and goods_name like '%$ps_search%' "; } } if($ps_company) { $search_sql .= " and goods_company like '%$ps_search%' "; } if($ps_brand) { $search_sql .= " and goods_brand like '%$ps_search%' "; } if($ps_max_money) { $search_sql .= " and goods_sale_price < '$ps_max_money' "; } if($ps_min_money) { $search_sql .= " and goods_sale_price > '$ps_min_money' "; } if($ps_line == "best") { $order_by = " order by goods_sale_stock desc "; } elseif($ps_line == "new") { $order_by = " order by register_date desc "; } elseif($ps_line == "high") { $order_by = " order by goods_sale_price desc "; } elseif($ps_line == "low") { $order_by = " order by goods_sale_price asc "; } elseif($ps_line == "point") { $order_by = " order by goods_point desc "; } elseif($ps_line == "category") { $order_by = " order by goods_category desc "; } elseif($ps_line == "brand") { $order_by = " order by goods_brand desc "; } elseif($ps_line == "company") { $order_by = " order by goods_company desc "; } elseif($ps_line == "origin") { $order_by = " order by goods_origin desc "; } else { $order_by = " order by goods_rank asc "; } // 토탈 페이지 계산 $total_count = morning_counter($morning_goods_table, "$search_sql", "*"); $list_num = $cf_limit_list; $page_num = 10; // 전체 페이지 계산 $total_page = @ceil($total_count / $list_num); // 페이지가 없으면 첫 페이지 (1 페이지) if ($ps_page == "") $ps_page = 1; $from_record = ($ps_page - 1) * $list_num; $counter = $total_count - (($ps_page - 1) * $list_num); $query = "select * from $morning_goods_table where goods_status = '1' $order_by limit $from_record, $list_num"; $result = morning_query_error($query); $gt_result = morning_query_error("select * from $morning_goods_table where goods_status = '1' order by goods_sale_stock desc limit 0, 8"); //echo " $tmp_level === $next_num ==== $parent_str === $query
"; // 하위 카테고리 네비게이션 $tree_text = tree_navigation($ps_ctid); //
태그 넣어주기 if($mc_list[use_html]) { } else { $mc_list[category_head] = make_br($mc_list[category_head]); $mc_list[category_foot] = make_br($mc_list[category_foot]); } // 카테고리 상단 내용 if($mc_list[category_head]) { echo "$mc_list[category_head]"; } // 스킨 불러오기 include "$g_mall_skin_dir/$cf_skin_name/mall_to_goods.html"; // 카테고리 하단 내용6 if($mc_list[category_foot]) { echo "$mc_list[category_foot]"; } include "m_bottom.php"; morning_close($connect); exit; ?>