Hvor får du pstrDate fra..? Og had udgør Lastdato..?
Response.Write vbCrLf &_
"<img src=""pic/space.gif"" border=""0"" height=""20"" width=""500"">" &_
"<table cellspacing=""0"" cellpadding=""0"" border=""0"" width=""400"">" & vbCrLf &_
"<tr>" & vbCrLf &_
"<td colspan=""3"" align=""left"" class=""head"" height=""30"" valign=""top"">" &_
"<img src=""pic/space.gif"" border=""0"" height=""10"" width=""30"">" & Rsmain("head" & StrLang) & "</td>" & vbCrLf &_
"</tr>" & vbCrLf &_
"<tr>" & vbCrLf &_
"<td width=""40""><img src=""pic/space.gif"" height=""200"" width=""40"" border=""0""></td>" & vbCrLf &_
"<td class=""txt"" height=""100"" valign=""top"" colspan=""2"" align=""left"">"
If Page = "" Then
Page = 1
End If
Sql ="SELECT * FROM konc ORDER BY dato DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorType = adOpenStatic
rs.PageSize = 3
rs.Open(Sql), Conn, 1, 3
If Not rs.EOF Then
rs.AbsolutePage = cINT(Page)
rowCount = 0
End If
TrCount = 0
Total = 0
PageCount = 0
While Not rs.EOF and rowCount < rs.PageSize
rowCount = rowCount + 1
Response.Write vbCrLf &_
"<table border=""0"" cellpadding=""2"" cellspacing=""0"">" & vbCrLf &_
"<tr>" & vbCrLf
TmpD = left(RS("dato"),2)
TmpM = right(left(RS("dato"),5),2)
TmpA = right(RS("dato"),4)
TmpDato = TmpD & "-" & TmpM & "-" & TmpA
If TmpDato > StrDato Then
Response.Write "<td class=""shead"" height=""30"" valign=""top"">" & RS("head") & "</td>"
Else
Response.Write "<td class=""oldshead"" height=""30"" valign=""top"">" & RS("head") & "</td>"
End If
Response.Write vbCrLf &_
"<td class=""dato""> " & FormatDateTime(RS("Dato"),2) & Strdato & "</td>" & vbCrLf &_
"</tr>"
If Not Rs("txt" & StrLang) = "" Then
Response.Write"<tr>" & vbCrLf &_
"<td class=""txt"" colspan=""2"">" & RS("txt" & StrLang) & "</td>" & vbCrLf &_
"</tr>"
End If
If Not Rs("link") = "" Then
Response.Write"<tr>" & vbCrLf &_
"<td class=""txt"" colspan=""2"" align=""left"" height=""20"">" &_
"<a href=""
http://" & RS("link") & """ target=""_blank"">" &_
Rs("link") & "</td>" & vbCrLf &_
"</tr>"
End If
Response.Write "</table><br>"
rs.Movenext
Wend
Response.Write "</td></tr>" & vbCrLf & "<tr><td colspan=""3"" align=""right"">" & vbCrLf
If StrLang = "UK" Then
If Clng(Page) > 1 Then
Response.Write "<a href=""default.asp?act=show&lang=" & StrLang & "&id=" & StrId & "&cat=" & StrCat & "&page=" & Page - 1 &_
"""' onMouseOver=""window.status='Previous Page';return true""" &_
"onMouseOut=""window.status='Previous Page';return true""" &_
" onClick=""window.status='Previous Page';return true"">" &_
"<< Previous Page</a>"
End If
Response.Write " "
If Clng(Page) < Clng(rs.PageCount) Then
Response.Write "<a href=""default.asp?act=show&lang=" & StrLang & "&id=" & StrId & "&cat=" & StrCat & "&page=" & Page + 1 &_
"""' onMouseOver=""window.status='Next Page';return true""" &_
"onMouseOut=""window.status='Next Page';return true""" &_
" onClick=""window.status='Next Page';return true"">" &_
"Next Page >></a>"
End If
Else
If Clng(Page) > 1 Then
Response.Write "<a href=""default.asp?act=show&lang=" & StrLang & "&id=" & StrId & "&cat=" & StrCat & "&page=" & Page - 1 &_
"""' onMouseOver=""window.status='Forrige side';return true""" &_
"onMouseOut=""window.status='Forrige side';return true""" &_
" onClick=""window.status='Forrige side';return true"">" &_
"<< Forrige side</a>"
End If
Response.Write " "
If Clng(Page) < Clng(rs.PageCount) Then
Response.Write "<a href=""default.asp?act=show&lang=" & StrLang & "&id=" & StrId & "&cat=" & StrCat & "&page=" & Page + 1 &_
"""' onMouseOver=""window.status='Previous Page';return true""" &_
"onMouseOut=""window.status='Næste side';return true""" &_
" onClick=""window.status='Næste side';return true"">" &_
"Næste side >></a>"
End If
End If
Response.Write "</td>" & vbCrLf &_
"</tr>" & vbCrLf &_
"</table>"
RS.Close
Set Rs = Nothing