<% public strPath strPath=Server.MapPath("gjestebok.txt") public fontz fontz = "" Dim linenum Public numm Dim MyArray() if Request.QueryString("lines") = "" then Set fs= Server.createObject("Scripting.FileSystemObject") set tf=fs.OpenTextFile(strPath,1,True) If tf.AtEndOfStream <> True Then Do Until tf.AtEndOfStream strTxt=tf.ReadLine linnum = linnum + 1 Loop Response.Redirect("gjest.asp?lines=" & linnum &"&tot=" & linnum ) End If tf.close else sub write_all Dim fs Dim tf Set fs= Server.createObject("Scripting.FileSystemObject") set tf=fs.OpenTextFile(strPath,1,True) sizeofMyarray = Request.QueryString("lines") timestoloop = Request.QueryString("lines") timestoloop2 = Request.QueryString("lines") -1 ReDim MyArray(sizeofMyarray) For i = 0 To timestoloop2 MyArray(i)=tf.ReadLine next i2 = UBound(MyArray)-1 if Request.QueryString("num") = "" then i = UBound(MyArray)-1000 Else i = (Request.QueryString("num")+1000)-UBound(MyArray) End if For i = i To UBound(MyArray)-1 if i2 < 0 then Exit For end if split_this = MyArray(i2) i2 = i2 -1 if split_this = "" then Exit For end if the_text = split(split_this,",",6) On Error Resume Next the_text(0) = Trim(the_text(0)) the_text(1) = Trim(the_text(1)) the_text(2) = Trim(the_text(2)) the_text(3) = Trim(the_text(3)) the_text(4) = Trim(the_text(4)) the_text(5) = Trim(the_text(5)) Response.Write(" Dato: " & the_text(4) & ", kl. " & the_text(5) & "") Response.Write(" Navn: ") Response.Write("" & the_text(0) & "") Response.Write(" Hjemmeside: ") Response.Write("" & the_text(2) & "") Response.Write(" ") Response.Write(" Melding:") Response.Write(the_text(3)) Response.Write("
") numm = UBound(MyArray) next tf.close Set tf=Nothing Set fs=Nothing end sub %> Follo Freestyle


Gjestebok

">Skriv melding <% if Request.QueryString("lines") > 999 then %>&tot=<%=request.querystring("tot")%>">
Neste 1000
<% end if %>
<% if Request.QueryString("tot") > Request.QueryString("lines") then %>&tot=<%=request.querystring("tot")%>">
Foregående 1000
<% end if %>

<%write_all%>
<% End if %>