<% SokID = Request.QueryString("ID") Area = Request.QueryString("Area") %>
<% Area = Request.QueryString("Area") db_path ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath("/db/nybro.mdb") & ";Persist Security Info=False" Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open db_path Set rs = Server.CreateObject("ADODB.Recordset") rs.Open "SELECT * FROM Nyheter WHERE ID = " & SokID, db_path %> <% index=0 Do Until rs.EOF OR index=20 'Visar X senaste inlägg %>
<% =rs("RUBRIK") %>
<% =rs("TEXTEN") %>
<% rs.MoveNext 'Loopar index=index+1 Loop rs.Close Connection.Close set rs = Nothing %> <% If Area="Nyheter" then db_path ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath("/db/nybro.mdb") & ";Persist Security Info=False" Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open db_path Set rs = Server.CreateObject("ADODB.Recordset") rs.Open "SELECT * FROM Nyheter WHERE (Area='Nyheter' AND SubID <> 100) ORDER BY Datum DESC", db_path %> <% index=0 Do Until rs.EOF OR index=10 'Visar X senaste inlägg %>
><% =rs("Rubrik") %> <% rs.MoveNext 'Loopar index=index+1 Loop rs.Close Connection.Close set rs = Nothing End if %> <% If Area="Aktiviteter" then db_path ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath("/db/nybro.mdb") & ";Persist Security Info=False" Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open db_path Set rs = Server.CreateObject("ADODB.Recordset") rs.Open "SELECT * FROM Nyheter WHERE (Area='Aktiviteter' AND SubID <> 100) ORDER BY Datum DESC", db_path %> <% index=0 Do Until rs.EOF 'Visar X senaste inlägg %>
><% =rs("Rubrik") %>
<% rs.MoveNext 'Loopar index=index+1 Loop rs.Close Connection.Close set rs = Nothing End if %> <% If Area="Anslagstavla" then db_path ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath("/db/nybro.mdb") & ";Persist Security Info=False" Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open db_path Set rs = Server.CreateObject("ADODB.Recordset") rs.Open "SELECT * FROM Nyheter WHERE (Area='Anslagstavla' AND SubID <> 100) ORDER BY Datum DESC", db_path %> <% index=0 Do Until rs.EOF 'Visar X senaste inlägg %>
<% =rs("datum") %>  
><% =rs("Rubrik") %>
<% rs.MoveNext 'Loopar index=index+1 Loop rs.Close Connection.Close set rs = Nothing End if %>


Skriv ut sidans innehåll