<% '****************************************************************************************************************** 'System Name : ELIS Ver 1.0 '****************************************************************************************************************** 'File Name : BBS.asp 'File Description : ELIS Main Summary 'Developer : Taejin Kwon 'Date : 9/1/2009 'Modifier(Date) : None '****************************************************************************************************************** Dim G_MENU G_MENU = "BOARD" %> <%Call SubGlobalMenu() %>
<% CALL subTabIndexLink("BOARD") %>
<% CALL subTopMenu() %>
Æ÷Åä °¶·¯¸®
<% Dim oDBconn Set oDBconn = Server.CreateObject("ADODB.Connection") oDBconn.CursorLocation = 3 oDBconn.Open GetDBConnectionString() Dim sKeyword sKeyword = Trim(Request("sKeyword")) Dim SortVal, sortStr, sort SortVal = Trim(Request("SortVal")) sortStr = Trim(Request("sortStr")) sort = Trim(Request("sort")) Dim curPage curPage = Trim(Request("curPage")) IF curPage = "" Then curPage = 1 End If Dim Category_CD Category_CD = "GALLERY" %> <% Dim post_qry post_qry = "SELECT *, CASE EventDate_MM WHEN '' THEN '' ELSE CAST(EventDate_MM+'/'+EventDate_DD+'/'+EventDate_YYYY AS DateTime) END AS Event_Date FROM E3_Post " Dim where_qry If isSearch = "Y" Then where_qry = "WHERE Active_YN='Y' " If Category_CD <> "" Then where_qry = where_qry & " and Category_CD like '"&Category_CD&"%' " End If If sKeyword <> "" Then where_qry = where_qry & " and Upper(Title) like '%"&UCase(sKeyword)&"%' or Author like '%"&sKeyword&"%' " End IF Else where_qry = "WHERE Active_YN='Y' and Category_CD = 'GALLERY' " End IF Dim orderby_qry If SortVal <> "" Then orderby_qry = "Order By "&sortStr&" "&sort Else orderby_qry = "Order By Post_ID DESC " End IF post_qry = post_qry & where_qry '//Response.write post_qry Dim rsPost Set rsPost = ExecutePage(oDBconn, post_qry, Trim(Request("curPage")), orderby_qry) Dim totCount totCount = ExecuteCount(oDBconn, post_qry) Dim strParam strParam = "&isSearch="&isSearch&"&Category_CD="&Category_CD&"&sKeyword="&sKeyword&"&SortVal="&SortVal&"&sortStr="&sortStr&"&sort="&sort %> <%'--------------------------------------------------------------------------------------------------%>
Total <%=totCount%> Results
<% Dim com_temp, com_num, encode_str, newImg Dim ii, rowNumber, list_cnt Dim Subject ii = 0 rowNumber = totCount - ((curPage - 1) * G_PAGE_SIZE) list_cnt = 0 Do Until rsPost.EOF ii = ii + 1 '//»õ±ÛÀ̹ÌÁö if datediff("d",rsPost("Write_Date"),now) <= 1 then newImg = "" else newImg = "" end If ' Á¦¸ñÀÌ 20ÀÚ°¡ ³ÑÀ¸¸é ÀÏÁ¤·®À¸·Î ÀÚ¸¥´Ù. If Len(Trim(rsPost("title"))) > 14 Then Subject = Left(Trim(rsPost("title")),14) & "..." Else Subject = Trim(rsPost("title")) End If %> <% list_cnt = list_cnt + 1 IF (list_cnt mod 5) = 0 and list_cnt < G_PAGE_SIZE Then %> <% End IF rsPost.MoveNext rowNumber = rowNumber - 1 Loop rsPost.close set rsPost = Nothing %>
<%If Trim(rsPost("Upload_File")) <> "" Then%> <% Dim Jpeg Set Jpeg = Server.CreateObject("Persits.Jpeg") Jpeg.Open POST_PHISYCAL_PATH &"\"& Trim(rsPost("Upload_File")) Dim sWidth, sHeight sWidth = Jpeg.OriginalWidth sHeight = Jpeg.OriginalHeight %> &sWidth=<%=sWidth%>&sHeight=<%=sHeight%>', 'UpImg', 100, 75, 1)">" onload="img_resize('<%=ii%>');" name="bef_Upload_File<%=ii%>" border="0" title="<%=Trim(rsPost("title"))%>"> <%End IF%>
&curPage=<%=curPage%>" title="<%=StringCut(rsPost("Description"),200)%>"><%=rowNumber%>. <%=Subject%> <%=newImg%>
[<%=rsPost("Author")%>]


<%Response.Write ShowPageBar(Trim(Request("curPage")),"","",strParam)%>
<%'--------------------------------------------------------------------------------------------------%> <% oDBconn.close Set oDBconn = Nothing %> <%'End =========================================================================================================================%>