<% ''''''''''Ű¿öµå °Ë»öÀ¸·Î ¿Ã¶§'''''''''' keyword = Trim(request("keyword")) ''''''''''Ű¿öµå °Ë»öÀ¸·Î ¿Ã¶§'''''''''' ''''''''°¡°Ý°Ë»öÀ¸·Î ¿Ã¶§'''''''''''' searchPrice1 = Trim(request("searchPrice1")) searchPrice2 = Trim(request("searchPrice2")) ''''''''°¡°Ý°Ë»öÀ¸·Î ¿Ã¶§'''''''''''' '''''''''''ÀÏ¹Ý Ä«Å׷θ® ¸µÅ©·Î ¿Ã¶§''''''''''''' categoryA = request("categoryA") categoryB = request("categoryB") categoryC = request("categoryC") '''''''''''ÀÏ¹Ý Ä«Å׷θ® ¸µÅ©·Î ¿Ã¶§''''''''''''' nPage = request("nPage") nPageSize = request("nPageSize") sort = request("sort") list_view = request("list_view") If nPage = "" Then nPage = "1" End If If list_view = "" Then list_view = "big" End If If sort = "" Then sort = "readCnt" End If If nPageSize = "" Then nPageSize = "35" End If sql_field = " p_code,p_name,price1,su_limit1,street_price,imgS1,useType,priceType,com_id,readCnt,insertDay " ''''''»Ì¾Æ³¾ Çʵåµé sql_field1 = " p_code,p_name,price1,su_limit1,street_price,imgS1,useType,priceType,com_id,readCnt,convert(varchar(20),inputday,112) as insertDay " ''''''»Ì¾Æ³¾ Çʵåµé ''''''''''''''''''»ç¿ëÁßÀÌ Ä«Å×°í¸®³»ÀÇ »óǰ¸¸ »Ì¾Æ³»±â À§ÇÑ Äõ¸®''''''''''''''''''''''''''' sql_categoryC = " categoryC in (select fk_category from t_categoryC c join t_categoryC_original o on c.fk_category = o.seq where c.useType = 'Y' and shop_code = '" & global_shop_code & "')" ''''''''''''''''''»ç¿ëÁßÀÌ Ä«Å×°í¸®³»ÀÇ »óǰ¸¸ »Ì¾Æ³»±â À§ÇÑ Äõ¸®''''''''''''''''''''''''''' Select Case sort Case "nameUp" '»óǰ³»¸²¼ø sql_sort = " order by p_name desc ,price1 desc,p_code desc" sql_sortR = " order by p_name asc ,price1 asc,p_code asc" Case "nameDown" '»óǰ¿Ã¸²¼ø sql_sort = " order by p_name asc ,price1 desc,p_code desc" sql_sortR = " order by p_name desc , price1 asc,p_code asc" Case "readCnt" '»óǰÀÎ±â¼ø sql_sort = " order by readCnt desc ,price1 desc,p_code desc" sql_sortR = " order by readCnt asc , price1 asc,p_code asc" Case "priceDown" '³·Àº°¡°Ý¼ø sql_sort = " order by price1 desc ,p_code desc" sql_sortR = " order by price1 asc ,p_code asc" Case "priceUp" '³ôÀº°¡°Ý¼ø sql_sort = " order by price1 asc, p_code desc" sql_sortR = " order by price1 desc, p_code asc" Case "newUp" '½Å»óǰ¼ø sql_sort = " order by insertDay desc" sql_sortR = " order by insertDay asc" End Select ListPage = "/product/sub.asp?categoryA=" & categoryA & "&categoryB=" & categoryB & "&categoryC=" & categoryC & "&nPageSize=" & nPageSize & "&keyword=" & keyword & "&sort=" & sort & "&list_view=" & list_view & "&searchPrice1=" & searchPrice1 & "&searchPrice2=" & searchPrice2 Set rs = server.CreateObject("ADODB.RecordSet") '''''''''''''''''''''''Ä«Å×°í¸® ¸®½ºÆ®·Î ¿ÔÀ»°æ¿ì °Ë»ö Ä«Å×°í¸®±âÁØ'''''''''''''''''''''''''' If keyword = "" Then If categoryA <> "" Then sql_searchCategory = "categoryA" sql = "select o.seq,o.category_name from t_categoryA_original o join t_categoryA c on o.seq = c.fk_category where c.seq = " & categoryA rs.open sql,oDBCon,1 If Not rs.eof Then sql_searchCategoryOriginal = rs(0) categoryA_name = rs(1) original_categoryA = rs(0) End If rs.close End If If categoryB <> "" Then sql_searchCategory = "categoryB" sql = "select o.seq,o.category_name from t_categoryB_original o join t_categoryB c on o.seq = c.fk_category where c.seq = " & categoryB rs.open sql,oDBCon,1 If Not rs.eof Then sql_searchCategoryOriginal = rs(0) categoryB_name = rs(1) End If rs.close End If If categoryC <> "" Then sql_searchCategory = "categoryC" sql = "select o.seq,o.category_name from t_categoryC_original o join t_categoryC c on o.seq = c.fk_category where c.seq = " & categoryC rs.open sql,oDBCon,1 If Not rs.eof Then sql_searchCategoryOriginal = rs(0) categoryC_name = rs(1) End If rs.close End If End If If categoryC <> "" Then cateC = categoryC sql = "select c.parent_code from t_categoryC c join t_categoryC_original o on c.fk_category = o.seq where c.seq = " & cateC rs.open sql,oDBCon,1 If Not rs.eof Then cateB = rs(0) End If rs.close sql = "select c.parent_code from t_categoryB c join t_categoryB_original o on c.fk_category = o.seq where c.seq = " & cateB rs.open sql,oDBCon,1 If Not rs.eof Then cateA = rs(0) End If rs.close End If If categoryB <> "" Then cateB = categoryB sql = "select c.parent_code from t_categoryB c join t_categoryB_original o on c.fk_category = o.seq where c.seq = " & cateB rs.open sql,oDBCon,1 If Not rs.eof Then cateA = rs(0) End If rs.close End If If categoryA <> "" Then cateA = categoryA End If '''''''''''''''''''''''Ä«Å×°í¸® ¸®½ºÆ®·Î ¿ÔÀ»°æ¿ì °Ë»ö Ä«Å×°í¸®±âÁØ'''''''''''''''''''''''''' If keyword <> "" Then ''''''''Ű¿öµå °Ë»öÀϰæ¿ì navigation = keyword & " °Ë»ö°á°ú" sql = "select count(distinct p_code) from t_product where " & sql_categoryC & " and ( p_name like '%" & keyword & "%' or keyword like '%" & keyword & "%' or p_code like '%" & keyword & "%' ) and useType <> 'N' " rs.open sql,oDBCon,1 nTotal = rs(0) rs.close nTotalPage = CEIL( nTotal / nPageSize) nStartPage = ( CEIL( nPage/10) - 1) * 10 + 1 nEndPage = CEIL((nPage + 10)/10 - 1) * 10 If nEndPage > nTotalPage Then nEndPage = nTotalPage End If If CDbl(nPage) = CDbl(nTotalPage) Then topSize = nTotal - nPageSize * (nPage-1) Else topSize = nPageSize End If subpage_sql = "select distinct " & sql_field & " from (select top " & topSize & " " & sql_field & " from (select distinct top " & nPage*nPageSize & " " & sql_field1 & " from t_product where " & sql_categoryC & " and ( p_name like '%" & keyword & "%' or keyword like '%" & keyword & "%' or p_code like '%" & keyword & "%') and useType <> 'N' " & sql_sort &") a " & sql_sortR & ") b " & sql_sort ElseIf searchPrice1 <> "" Or searchPrice2 <> "" Then If searchPrice2 <> 0 Then sub_sql = " and (price1 - price1 * " & global_shop_discount & " )<= " & Replace(searchPrice2,",","") navigation = "ÆÇ¸Å°¡ " & searchPrice1 & "~" & searchPrice2 & " °Ë»ö°á°ú" Else navigation = "ÆÇ¸Å°¡ " & searchPrice1 & "~ °Ë»ö°á°ú" End If sql = "select count(distinct p_code) from t_product where " & sql_categoryC & " and ( (price1 - price1*" & global_shop_discount & ") >= " & Replace(searchPrice1,",","") & sub_sql & ") and useType <> 'N' " rs.open sql,oDBCon,1 nTotal = rs(0) rs.close nTotalPage = CEIL( nTotal / nPageSize) nStartPage = ( CEIL( nPage/10) - 1) * 10 + 1 nEndPage = CEIL((nPage + 10)/10 - 1) * 10 If nEndPage > nTotalPage Then nEndPage = nTotalPage End If If CDbl(nPage) = CDbl(nTotalPage) Then topSize = nTotal - nPageSize * (nPage-1) Else topSize = nPageSize End If 'http://www.giftmani.com/product/sub.asp?searchPrice1=3,000&searchPrice2=5000 subpage_sql = "select " & sql_field & " from (select top " & topSize & " " & sql_field & " from (select distinct top " & nPage*nPageSize & " " & sql_field1 & " from t_product where " & sql_categoryC & " and ( (price1 - price1 * " & global_shop_discount & ") >= " & Replace(searchPrice1,",","") & sub_sql & " ) and useType <> 'N' " & sql_sort &") a " & sql_sortR & ") b " & sql_sort Else '''''Ä«Å×°í¸® ¸®½ºÆ® navigation = " Ȩ " If categoryA_name <> "" Then navigation = navigation & " > " & categoryA_name & "" End If If categoryB_name <> "" Then navigation = navigation & " > " & categoryB_name & "" End If If categoryC_name <> "" Then navigation = navigation & " > " & categoryC_name & "" End If sql = "select count(distinct p_code) from t_product where " & sql_categoryC & " and useType <> 'N' and " & sql_searchCategory & " = " & sql_searchCategoryOriginal rs.open sql,oDBCon,1 nTotal = rs(0) rs.close nTotalPage = CEIL( nTotal / nPageSize) nStartPage = ( CEIL( nPage/10) - 1) * 10 + 1 nEndPage = CEIL((nPage + 10)/10 - 1) * 10 If nEndPage > nTotalPage Then nEndPage = nTotalPage End If If CDbl(nPage) = CDbl(nTotalPage) Then topSize = nTotal - nPageSize * (nPage-1) Else topSize = nPageSize End If subpage_sql = "select " & sql_field & " from (select top " & topSize & " " & sql_field & " from (select distinct top " & (nPage-1)*nPageSize + nPageSize & " " & sql_field1 & " from t_product where " & sql_categoryC & " and useType <> 'N' and " & sql_searchCategory & " = " & sql_searchCategoryOriginal & " " & sql_sort &") a " & sql_sortR & ") b " & sql_sort End If tempVal = subpage_sql Set rs = Nothing i = 1 Dim arPage( 10, 3) For p = nStartPage To nEndPage arPage( i, 0) = p arPage( i, 1) = ListPage & "&nPage=" & p If Int(p) = Int( nPage) Then arPage( i, 2) = 1 End If 'ÇöÀçÆäÀÌÁöÀÏ °æ¿ì i = i + 1 next If (nStartPage - 10) >= 1 Then ' sPrev10Page sPrev10Page = ListPage & "&nPage=" & (nStartPage - 10) Else sPrev10Page = "" End If If (nStartPage + 10) <= nTotalPage Then ' sNext10Page sNext10Page = ListPage & "&nPage=" & (nStartPage + 10) Else sNext10Page = "" End If '### List PageHolder ó¸® ³¡ %>
ÇöÀçÀ§Ä¡<%=navigation%>
<%Set rs = server.CreateObject("ADODB.Recordset")%> <% If categoryA <>"" Or categoryB <> "" Or categoryC <> "" Then %>

<%=categoryA_name%>

<%If original_categoryA = "6"Then %>»óÆÐ¹®±¸¿¹½Ãº¸±â<%End If %>
<%If categoryB <> "" Or categoryC <> "" Then %>ÆîÃĺ¸±â ¡ý<%End If %>
<% sql = "select o.category_name,c.seq from t_categoryB c join t_categoryB_original o on c.fk_category = o.seq where c.useType ='Y' and c.parent_code = " & cateA & " order by c.sort asc" rs.open sql,oDBCon,1 If Not rs.eof Then Set rs1 = server.CreateObject("ADODB.RecordSet") Set rs2 = server.CreateObject("ADODB.RecordSet") Do Until rs.eof %> <%If categoryB <> "" Or categoryC <> "" Then %> <%If CDbl(cateB) <> CDbl(rs("seq")) Then %> <%cateB_css = "class='sub_cate_tr1' style='display:none;'"%> <%Else %> <%cateB_css = "class='sub_cate_tr'"%> <%End If %> <%End If %> > <% rs.movenext Loop End If rs.close Set rs1 = Nothing Set rs2 = Nothing %>
"><%=rs("category_name")%> <% sql = "select o.category_name,c.seq as cseq,o.seq as oseq from t_categoryC c join t_categoryC_original o on c.fk_category = o.seq where c.useType ='Y' and c.parent_code = " & rs("seq") & " order by c.sort asc" rs1.open sql,oDBcon,1 If Not rs1.eof Then i = 0 Do Until rs1.eof sql = "select count(*) from t_product where useType <> 'N' and categoryC = " & rs1("oseq") rs2.open sql,oDBCon,1 subTotal = rs2(0) rs2.close %> <%If i > 0 Then %> | <%End If %> &categoryC=<%=rs1("cseq")%>" <%If CDbl(rs1("cseq")) = CDbl(cateC) Then %>class="sub_cate_over"<%Else %>class="subA"<%End If %>><%=rs1("category_name")%>(<%=subTotal%>) <% i = i + 1 rs1.movenext Loop End If rs1.close %>

best product

»óǰÀ̹ÌÁö

°¹¼ö°³ °¡°Ý¿ø
<%End If %>
»óǰ <%=nTotal%>°³
<% If list_view = "small" Then imgsrc1 = "lst_lst_on.gif" imgsrc2 = "lst_img_out.gif" ElseIf list_view = "big" Then imgsrc1 = "lst_lst_out.gif" imgsrc2 = "lst_img_on.gif" End If %> ¸®½ºÆ®Çü½Äº¸±âÀ̹ÌÁöÇü½Äº¸±â
<%Set rs1 = server.CreateObject("ADODB.RecordSet")%> <%If list_view = "big" Then %>
style="display:none;"<%End If %>>
<% rs.open subpage_sql,oDBCon,1 If rs.eof Or rs.bof Then %>
»óǰµî·Ï ÁغñÁßÀÔ´Ï´Ù.
<% Else i = 1 Do Until rs.eof price1 = FormatNumber(discount(rs("price1")),0) If session("mro") <> "" Then price1= FormatNumber(discount_mro(price1),0) End If If sql_searchCategory <> "" Then sql = "select seq,showType from t_product where " & sql_categoryC & " and useType <> 'N' and " & sql_searchCategory & " = " & sql_searchCategoryOriginal & " and p_code='" & rs("p_code") & "'" Else sql = "select seq,showType from t_product where " & sql_categoryC & " and useType <> 'N' and p_code='" & rs("p_code") & "'" End If rs1.open sql,oDBcon,1 If Not rs.eof Then seq = rs1("seq") showType = rs1("showType") End If rs1.close %> <% If i Mod 5 = 1 Then %>
<% End If %>

&nPage=<%=nPage%>&categoryA=<%=categoryA%>&categoryB=<%=categoryB%>&categoryC=<%=categoryC%>&nPageSize=<%=nPageSize%>&keyword=<%=keyword%>&sort=<%=sort%>&list_view=<%=list_view%>"> " alt="<%=rs("p_name")%>" />

È®´ëº¸±â &nPage=<%=nPage%>&categoryA=<%=categoryA%>&categoryB=<%=categoryB%>&categoryC=<%=categoryC%>&nPageSize=<%=nPageSize%>&keyword=<%=keyword%>&sort=<%=sort%>&list_view=<%=list_view%>"><%=rs("p_name")%> <%=rs("su_limit1")%>°³/<%=rs("p_code")%> <%If rs("useType") = "p" Then %> ÀϽÃǰÀý <%Else %> <%If showType = "Y" And global_shop_kind = "B" Then %> <%If categoryA <> "394" Then%>****¿ø<%End If%> <%Else %> <%If categoryA <> "394" Then%><%=FormatNumber(rs("street_price"),0)%> ¡æ <%End If%><%=price1%>¿ø <%End If %> <%End If %>
<%If i Mod 5 = 0 Then %>
<%End If %> <% i = i + 1 rs.movenext Loop End If rs.close %> <% If (i - 1) Mod 5 <> 0 Then %>
<% End If %>
<%If sPrev10Page <> "" Then %> <%End If %>
<%For i = 1 To 10%> <%If arPage(i,0) = "" Then Exit For End If %> class="on" <%End If %>><%=arPage(i,0)%> <%Next %>
<%If sNext10Page <> "" Then %> <%End If %>
<%ElseIf list_view = "small" Then %>
style="display:none;"<%End If %>>
  • À̹ÌÁö
  • »óǰ¸í
  • »óǰÄÚµå
  • ÃÖ¼ÒÆÇ¸Å¼ö·®
  • ÆÇ¸Å°¡
<% Set rs = server.CreateObject("ADODB.Recordset") rs.open subpage_sql,oDBCon,1 If rs.eof Or rs.bof Then %>
»óǰµî·Ï ÁغñÁßÀÔ´Ï´Ù.
<% Else Do Until rs.eof If sql_searchCategory <> "" Then sql = "select seq,showType from t_product where " & sql_categoryC & " and useType <> 'N' and " & sql_searchCategory & " = " & sql_searchCategoryOriginal & " and p_code='" & rs("p_code") & "'" Else sql = "select seq,showType from t_product where " & sql_categoryC & " and useType <> 'N' and p_code='" & rs("p_code") & "'" End If rs1.open sql,oDBcon,1 If Not rs.eof Then seq = rs1("seq") showType = rs1("showType") End If rs1.close %> <% rs.movenext Loop End If rs.close Set rs = Nothing %>
<%If sPrev10Page <> "" Then %> <%End If %>
<%For i = 1 To 10%> <%If arPage(i,0) = "" Then Exit For End If %> class="on" <%End If %>><%=arPage(i,0)%> <%Next %> <%If sNext10Page <> "" Then %> <%End If %>
<%End If %> <% Set rs = Nothing %>