Game Appreciation
<% today=date today_now=mid(replace(today,"-",""),1,8) yesterday=mid(replace(dateadd("d",-1,date),"-",""),1,8) sql = "select top 5 * from TB_GIBO where gb_div=3 order by gb_date desc" Set Cmd = Server.CreateObject("ADODB.Command") Cmd.ActiveConnection = ConnOleN Cmd.CommandText = sql Cmd.CommandType = adCmdText Set rs = Cmd.Execute cnt=5 i=0 do while not rs.eof and i < cnt gibonum = rs("gb_no") gibo = rs("gb_gibo") dir = rs("gb_gibo_dir") if not(dir="") then dir = dir & "/" end if file = dir & gibo gb_no=rs("gb_no") gb_date=rs("gb_date") gb_bgname=rs("gb_bgname") gb_wgname=rs("gb_wgname") 'if len(gb_bgname)>4 then gb_bgname=left(gb_bgname,4) end if 'if len(gb_wgname)>4 then gb_wgname=left(gb_wgname,4) end if gb_update=rs("gb_update") img_new="" ud_title="" if gb_update <> "" and not isnull(gb_update) then if CDbl(gb_update)>=CDbl(yesterday) then img_new="" end if ud_title="Updated : "&left(gb_update,4)&"/"&mid(gb_update,5,2)&"/"&mid(gb_update,7,2)&" " end if ud_info=rs("gb_game_info") ud_info = fnCutString(ud_info,"...",30) %> <% rs.movenext i=i+1 loop Set cmd = nothing %>
<%if dir="test/" then%> <%=ud_info%><%=img_new%> <%else%> <%=ud_info%><%=img_new%> <%end if%> [<%=left(gb_date,4)&"."&mid(gb_date,5,2)&"."&mid(gb_date,7,2)%>]
Mail From Overseas
<% sql = "select top 5 * from BOARD_FREE where bd_div=10 and not bd_stat is null order by bd_date desc" Set Cmd = Server.CreateObject("ADODB.Command") Cmd.ActiveConnection = ConnOle Cmd.CommandText = sql Cmd.CommandType = adCmdText Set rs = Cmd.Execute cnt=5 i=0 do while not rs.eof and i < cnt bnum = rs("bd_num") btitle = rs("bd_title") btitle = fnCutString(btitle,"...",40) gb_update = rs("bd_date") img_new="" ud_title="" if bdate <> "" and not isnull(bdate) then if CDbl(gb_update)>=CDbl(yesterday) then img_new="" end if ud_title="Updated : "&left(bdate,4)&"/"&mid(bdate,5,2)&"/"&mid(bdate,7,2)&" " end if %> <% rs.movenext i=i+1 loop do while i < cnt %> <% i=i+1 loop Set cmd = nothing %>
<%=btitle%><%=img_new%> [<%=left(gb_update,4)&"."&mid(gb_update,6,2)&"."&mid(gb_update,9,2)%>]
<% Function fnCutString(str1, str2, cutLen) Dim strLen Dim strByte Dim strCut Dim strRes Dim char Dim i strLen = 0 strByte = 0 strLen = Len(str1) If str1 = "" Or IsNull(str1) Then strLen = 0 For i = 1 to strLen char = "" strCut = Mid(str1, i, 1) char = Asc(strCut) char = Left(char, 1) If char = "-" Then strByte = strByte + 2 Else strByte = strByte + 1 End If If cutLen < strByte Then strRes = strRes & str2 Exit For Else strRes = strRes & strCut End If Next fnCutString = strRes End Function %>