<% Option Explicit %> ::: 스포츠조선 ::: <% Dim title,num,Direct,yy,dd,mm title = Trim(request("title")) num = request("num") Direct = request("Direct") yy = Request("select7") mm = Request("select8") dd = Request("select9") Dim ObjDBConn, ObjRs, strSQL Dim maxNum, curNum, filename,fso,f,strconnect set fso = Server.CreateObject("Scripting.FileSystemObject") set f = fso.OpenTextFile("C:\cons2.dat") strconnect = f.Readline set ObjDBConn=Server.CreateObject("ADODB.Connection") ObjDBConn.Open strconnect Set ObjRs = Server.CreateObject("ADODB.Recordset") ObjRs.ActiveCOnnection = ObjDBConn If Request("num") = "" Then strSQL = "SELECT num, filename FROM daigal ORDER BY num DESC fetch first 2 rows only" Else strSQL = "SELECT num, filename FROM daigal ORDER BY num DESC" End If ObjRs.Open strSQL, ObjDBConn, 1, 2 maxNum = objRs("num") If Request("num") = "" Then '아무런 검색조건 없이 처음 이 페이지에 들어오는 경우 ObjRs.Find "num = " & CDbl(objRs("num")) ObjRs.MoveNext If Not ObjRs.EOF Then curNum = objRs("num") filename = objRs("filename") Else filename = "00000000.gif" End If Else '이전이나 이후 버튼을 누른 경우 ObjRs.Find "num = " & CDbl(Request("num")) If Request("Direct") = "Next" Then ObjRs.MovePrevious If Not ObjRs.EOF Then curNum = objRs("num") filename = objRs("filename") Else filename = "00000000.gif" End If Else ObjRs.MoveNext If Not ObjRs.EOF Then curNum = objRs("num") filename = objRs("filename") Else filename = "00000000.gif" End If End If End If yy = Left(filename, 4) mm = Mid(filename, 5, 2) dd = Mid(filename, 7, 2) %>
스포츠조선 > 만화/연재물
[대갈장군] <%=yy%>년<%=mm%>월<%=dd%>일 (2)
 
<% If CInt(curNum) > 2 Then %> <% Else %> <% End If %> <% If (CDbl(curNum) < CDbl(maxNum)) And (filename <> "00000000.gif") Then %> <% Else %> <% End If %>
&Direct=Prev">
/image_cartoons/<%=filename%>" alt="<%=yy%>년<%=mm%>월<%=dd%>일">
 
 
 
<% If CInt(curNum) > 2 Then %> <% Else %> <% End If %> <% If (CDbl(curNum) < CDbl(maxNum)) And (filename <> "00000000.gif") Then %> <% Else %> <% End If %>
&Direct=Prev">
 
 
 
 
 
<% objRs.Close Set objRs = Nothing objDbConn.Close Set ObjDBConn =Nothing %>