diff --git a/shop/search3.php b/shop/search3.php new file mode 100644 index 000000000..4455c5fda --- /dev/null +++ b/shop/search3.php @@ -0,0 +1,183 @@ + + +

+ + + + + +
+    찾으시는 검색어는 "" 입니다. +

+ {$total_count}건의 상품이 검색 되었습니다.

"; + + // 임시배열에 저장해 놓고 분류별로 출력한다. + // write_serarch_save() 함수가 임시배열에 있는 내용을 출력함 + if ($total_count > 0) { + // 인기검색어 + $sql = " insert into {$g4['popular_table']} + set pp_word = '$search_str', + pp_date = '".G4_TIME_YMD."', + pp_ip = '{$_SERVER['REMOTE_ADDR']}' "; + sql_query($sql, FALSE); + + unset($save); // 임시 저장 배열 + $sql = " select a.ca_id, + a.it_id + $sql_common + order by a.ca_id, a.it_id desc "; + $result = sql_query($sql); + for ($i=0; $row=mysql_fetch_array($result); $i++) { + if ($save['ca_id'] != $row['ca_id']) { + if ($save['ca_id']) { + write_search_save($save); + unset($save); + } + $save['ca_id'] = $row['ca_id']; + $save['cnt'] = 0; + } + $save['it_id'][$save['cnt']] = $row['it_id']; + $save['cnt']++; + } + mysql_free_result($result); + write_search_save($save); + } + ?> +
+ + + + + + + + +  $row[ca_name] ($save[cnt]) + 판매가격 + 포인트 + + + "; + */ + + // 김선용 2006.12 : 중복 하위분류명이 많으므로 대분류 포함하여 출력 + $ca_temp = ""; + if(strlen($save['ca_id']) > 2) // 중분류 이하일 경우 + { + $sql2 = " select ca_name from {$g4['shop_category_table']} where ca_id='".substr($save['ca_id'],0,2)."' "; + $row2 = sql_fetch($sql2); + $ca_temp = "{$row2['ca_name']} > "; + } + + $list_mod = 4; + $td_width = (int)(100 / $list_mod); + $img_width = $default['de_simg_width']; + $img_height = $default['de_simg_height']; + + echo " + + + + + "; + + for ($i=0; $i<$save['cnt']; $i++) { + $sql = " select it_id, + it_name, + it_amount, + it_amount2, + it_amount3, + it_tel_inq, + it_cust_amount, + it_gallery, + it_point, + it_type1, + it_type2, + it_type3, + it_type4, + it_type5 + from {$g4['shop_item_table']} where it_id = '{$save['it_id'][$i]}' "; + $row = sql_fetch($sql); + + //$image = get_it_image("$row[it_id]_s", (int)($default[de_simg_width] / $image_rate), (int)($default[de_simg_height] / $image_rate), $row[it_id]); + + if ( ($i>0) && (($i%$list_mod)==0) ) + { + echo "\n\n"; + echo "\n\n"; + echo "\n"; + } + + echo " + "; + + } + + // 나머지 td 를 채운다. + if (($cnt = $i%$list_mod) != 0) + for ($k=$cnt; $k<$list_mod; $k++) + echo "\n"; + + echo ""; + echo "
 {$ca_temp}{$row['ca_name']} ({$save['cnt']})
+
+ + + "; + + if ($row['it_cust_amount'] && !$row['it_gallery']) + echo ""; + + echo "
".get_it_image($row['it_id']."_s", $img_width , $img_height, $row['it_id'])."
".it_name_icon($row)."
".display_amount($row['it_cust_amount'])."
"; + + if (!$row['it_gallery']) + echo "".display_amount(get_amount($row), $row['it_tel_inq']).""; + + echo "
 


\n"; +} + +include_once('./_tail.php'); +?>