% 'Grab news 'SQLconnect "SQL0", "newsreader", "news69read" If (Not SQLConnect(SQLSERVER, SQLLOGIN, SQLPASSWORD)) Then Response.Write "Error connecting to SQL Server." Response.End End If CONST SiteID = 345 'StrategyPlanet: Empires Aeon 'on error resume next if trim(request("id") & "") = "" then lId = 0 else lid = CLng(request("id") & "") if lid = 0 then lid = 0 end if if trim(request("rows") & "") = "" then lrows = 3 else lrows = CLng(request("rows") & "") if lrows = 0 then lrows = 3 end if if trim(request("cols") & "") = "" then lcols = 2 else lcols = CLng(request("cols") & "") if lcols = 0 then lcols = 2 end if set rs = moconn.execute ("potdfirst " & siteid & ", " & (lcols * lrows)) if not rs.eof then do lmaxid = rs("id") rs.movenext loop while not rs.eof end if if lid =0 or lid > lmaxid then lid = lmaxid set rs = moconn.execute ("potdarchive " & siteid & ", " & lid & ", " & (lcols * lrows)) startdate = rs("datetime") startid = rs("id") startid = rs("id") do endid = rs("id") enddate = rs("datetime") rs.movenext loop while not rs.eof set rs = rs.nextrecordset response.write "" set rs2 = moconn.execute ("potdprevnext " & siteid & ", " & endid & ", " & startid & ", " & (lcols * lrows)) if not rs2.eof then lnextid = rs2("id") end if set rs2 = rs2.nextrecordset if not rs2.eof then do lprevid = rs2("id") rs2.movenext loop while not rs2.eof end if rs2.close lnextid = CLng(lnextid) lprevid = CLng(lprevid) %>
<% if not rs.eof then %>
">" width="250" height="188" border=1 style="color:black"> <%=formatdatetime(rs("datetime"),2)%> <% rs.movenext end if %> |
<% next %>