<% '****************************************************************************************************************** 'System Name : ELIS Ver 1.0 '****************************************************************************************************************** 'File Name : service_m.asp 'File Description : ELIS Main Summary 'Developer : Taejin Kwon 'Date : 7/10/2009 'Modifier(Date) : None '****************************************************************************************************************** Dim G_MENU G_MENU = "SERVICE" %> <%Call SubGlobalMenu() %>
<% CALL subTabIndexLink("SERVICE") %>
<% CALL subTopMenu() %>
Service
<% Dim IsSearch IsSearch = Trim(Request("IsSearch")) Dim inter_cd Dim prod_name Dim txt_keyword Dim category Dim active_YN Dim result_rows Dim sort_by inter_cd = Trim(Request("inter_cd")) prod_name = Trim(Request("prod_name")) txt_keyword = Trim(Request("txt_keyword")) category = Trim(Request("category")) active_YN = Trim(Request("active_YN")) result_rows = Trim(Request("result_rows")) IF result_rows = "" Then result_rows = 10 End IF sort_by = Trim(Request("sort_by")) %> <%'Start ========================================================================================================================%>
"> ">
³»ºÎÄÚµå »óǰ¸í
Ű¿öµå Ä«Å×°í¸® <% Dim arrType arrType = funcGetCategory(objQuery) %>
Áø¿­»óÅÂ (Active/Inactive) Result Rows
Á¤·ÄÁ¶°Ç
   
<% Dim objCommonList Dim objListProperty Set objCommonList = New CommonListClass Set objListProperty = New CommonListProperty IF IsSearch = "true" Then Dim strWhereCondition strWhereCondition = " WHERE prod_cd is not null " IF inter_cd <> "" Then strWhereCondition = strWhereCondition & " AND inter_cd like '%" & inter_cd & "%'" End IF IF prod_name <> "" Then strWhereCondition = strWhereCondition & " AND prod_name like '%" & prod_name & "%'" End IF IF txt_keyword <> "" Then strWhereCondition = strWhereCondition & " AND txt_keyword like '%" & txt_keyword & "%'" End IF IF category <> "" Then strWhereCondition = strWhereCondition & " AND category like '" & category & "%'" End IF IF active_YN <> "" Then strWhereCondition = strWhereCondition & " AND active_YN = '" & active_YN & "'" End If objListProperty.Query = funcListSearchQuery(strWhereCondition, sort_by) '//Query Else objListProperty.Query = funcListQuery() '//Query End If objListProperty.PageRowSize = result_rows '//ÆäÀÌÁö »çÀÌÁî objListProperty.ColumnTitle = Array("","Image","Category","Name","Price","Read","Active") '// ù ÀÚ¸®´Â Ç×»ó Key°¡ µé¾î°¨ objListProperty.ColumnTableWidth = "100%" objListProperty.ColumnAlign = Array("","center","center","left","center","center","center") '//Key¸¦ À§ÇØ ÇÒ´çµÈ ÀÚ¸®À̹ǷΠ... objListProperty.TDSize = Array("","10%","20%","30%", "15%","10%","10%") '//¹øÈ£¿­À» À§ÇØ Ç×»ó Àüü 95%·Î À¯Áö objListProperty.FontColor = Array("","#426BB5","#333333","#333333","#333333","#333333","#333333") objListProperty.AnchorColumn = 3'//Link¸¦ °É¾îÁÙ ¹è¿­¹øÈ£... 0ºÎÅÍ ½ÃÀÛÇÔ. objListProperty.DisplayNoMsg = "No Result" '// Result°¡ ¾øÀ» ¶§ ¸Þ½ÃÁö IF Trim(Request("IsSearch")) = "true" Then objListProperty.AnchorURL = "./service_m_detail.asp?IsSearch="&Request("IsSearch")&"&s_inter_cd="&inter_cd&"&s_prod_name="&prod_name&"&s_txt_keyword="&txt_keyword&"&s_category="&category&"&s_active_YN="&active_YN&"&result_rows="&result_rows&"&sort_by="&sort_by&"&prod_cd=" objListProperty.CurrentURL = "./service_m.asp?IsSearch="&Request("IsSearch")&"&inter_cd="&inter_cd&"&prod_name="&prod_name&"&txt_keyword="&txt_keyword&"&category="&category&"&active_YN="&active_YN&"&result_rows="&result_rows&"&sort_by="&sort_by Else objListProperty.AnchorURL = "./service_m_detail.asp?prod_cd=" objListProperty.CurrentURL = "./service_m.asp" End IF objCommonList.funcAddProperty objListProperty Set objListProperty = Nothing Set objCommonList = Nothing %>
<%'End =========================================================================================================================%>
<% Function funcListQuery() Dim strQuery strQuery = " SELECT prod_cd AS TD0, image_s AS TD1, (SELECT category_name FROM E_Category WHERE (category_cd = ZP.category)) AS TD2, " &_ " '' + prod_name + '' AS TD3, " &_ " curr_price AS TD4, " &_ " read_cnt AS TD5, active_YN AS TD6, image_s AS IMG " &_ " FROM E_Product ZP " &_ " ORDER BY idx_prod desc" '//Response.write strQuery funcListQuery = strQuery End Function Function funcListSearchQuery(byVal strWhere, byVal sort_by) Dim orderby, arrSort IF sort_by = "" Then orderby = "order_by, prod_name asc" Else arrSort = Split(sort_by, "X") 'Response.write arrSort(0) &" --- "&arrSort(1) 'Response.end orderby = arrSort(0) & " " & arrSort(1) End IF Dim strQuery strQuery = " SELECT prod_cd AS TD0, image_s AS TD1, (SELECT category_name FROM E_Category WHERE (category_cd = ZP.category)) AS TD2, " &_ " '' + prod_name + '' AS TD3, " &_ " curr_price AS TD4, " &_ " read_cnt AS TD5, active_YN AS TD6, image_s AS IMG " &_ " FROM E_Product ZP " & strWhere &_ " ORDER BY " & orderby funcListSearchQuery = strQuery End Function %>