<%Response.Buffer = True%> The Magic of Fantasy <%Function FixaTecken(str) FixaTecken = Replace(Trim(str),"'","''") End function Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db If Request.Querystring("do")= "" Then%>
~


<%Else With RecSet .MoveFirst .PageSize = gbaps .AbsolutePage = sida End With Sidor = RecSet.PageCount If Sidor > 1 Then%> <%End If X = 0 Do While Not RecSet.EOF And X < RecSet.PageSize%> <%If Recset("Email") <> "" Then%> <%Else%> <%End If%> <%If Recset("svar") <> "" Then%> <%End If%> <%X = X+ 1 Recset.MoveNext Loop If Sidor > 1 Then%>
<%Set Recset = Server.CreateObject("ADODB.Recordset") ' Sidscriptet är nerladdat från http://www.fatmilk.nu/ ' Skrivet av Ludvig "geek" Lindblom ' geek@fatmilk.nu Const gbaps = 3 Sidan = Request.QueryString("sida") If Sidan = "" then sida = 1 Else sida = Sidan End If With RecSet .CursorLocation = 3 .CacheSize = gbaps End With SQL = "Select * From box Order By datum desc" RecSet.Open SQL, Conn If RecSet.EOF Then%>


Ingen har skrivit i gästboken.

<%For Sid = 1 To Sidor If (Int(Sid)) = (Int(sida)) Then%><%=Sid%><%Else%> <%=Sid%> <%End If Next%>

"><%=Recset("Namn")%>
<%=FormatDateTime(Recset("Datum"),2)%>
<%=Recset("Namn")%>
<%=FormatDateTime(Recset("Datum"),2)%>
<%=FixaLankar(RecSet("inlagg"))%>
 
Svar: <%=Replace(RecSet("svar"), vbCrLf, "
")%>

<%For Sid = 1 To Sidor If (Int(Sid)) = (Int(sida)) Then%><%=Sid%><%Else%> <%=Sid%> <%End If Next%>
<%End If Recset.Close Set Recset = Nothing End If End If If Request.QueryString("do")= "add" Then Namn = Request.Form("namn") Email = Request.Form("email") Meddelande = FixaTecken(Request.Form("inlagg")) Conn.Execute("Insert Into box(Namn, Email, inlagg) Values('"& Namn &"','"& Email &"','"&Meddelande &"')") Response.Redirect "shoutbox.asp" End If%>
<%Conn.Close Set Conn = Nothing%>