<% 'öppna databasen Set Databas = Server.CreateObject( "Adodb.Connection" ) Databas.Provider = "Microsoft.Jet.OLEDB.4.0" MdbFilePath = Server.MapPath("db\theDB.mdb") Databas.ConnectionString = "Data Source='" & MdbFilePath & "'" Databas.open %>
<% 'hämta namnet på menyn SQL = "SELECT * From table1 WHERE theID = " & 39 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write " " &RecSet("theOtherPic") & "
" RecSet.Close Set RecSet = nothing %> <% 'hämta ev undermenyer if request.querystring("id") = 39 OR request.querystring("subid") = 39 then SQL = "SELECT * From table1 WHERE subID = " & 39 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) Do Until RecSet.EOF if RecSet.EOF then response.write "" end if response.write "   " &RecSet("theOtherPic") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing end if %> <% 'hämta namnet på menyn SQL = "SELECT * From table1 WHERE theID = " & 40 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write "
" &RecSet("theOtherPic") & "
" RecSet.Close Set RecSet = nothing %> <% if request.querystring("id") = 40 OR request.querystring("subid") = 40 then SQL = "SELECT * From table1 WHERE subID = " & 40 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) Do Until RecSet.EOF if RecSet.EOF then response.write "" end if response.write "   " &RecSet("theOtherPic") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing end if %> <% 'hästar response.write "
Hästar
" if request.querystring("id") = 41 OR request.querystring("subid") = 41 then response.write "   Ettåringar
   Tvååringar
   Treåringar
   Fyraåringar
   Femåringar och äldre" end if %> <% 'hämta namnet på menyn SQL = "SELECT * From table1 WHERE theID = " & 42 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write "
" &RecSet("theOtherPic") & "
" RecSet.Close Set RecSet = nothing %><% if request.querystring("id") = 42 OR request.querystring("subid") = 42 then SQL = "SELECT * From table1 WHERE subID = " & 42 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) Do Until RecSet.EOF if RecSet.EOF then response.write "" end if response.write "   " &RecSet("theOtherPic") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing end if %> <% 'hämta namnet på menyn SQL = "SELECT * From table1 WHERE theID = " & 43 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write "
" &RecSet("theOtherPic") & "
" RecSet.Close Set RecSet = nothing %><% if request.querystring("id") = 43 OR request.querystring("subid") = 43 then SQL = "SELECT * From table1 WHERE subID = " & 43 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) Do Until RecSet.EOF if RecSet.EOF then response.write "" end if response.write "   " &RecSet("theOtherPic") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing end if %>
Gästbok
<% 'starter response.write "
Starter
" if request.querystring("id") = 45 OR request.querystring("subid") = 45 then response.write "   Sverige
   Frankrike
" end if %> <% 'hämta namnet på menyn SQL = "SELECT * From table1 WHERE theID = " & 46 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write "
" &RecSet("theOtherPic") & "
" RecSet.Close Set RecSet = nothing %> <% if request.querystring("id") = 46 OR request.querystring("subid") = 46 then SQL = "SELECT * From table1 WHERE subID = " & 46 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) Do Until RecSet.EOF if RecSet.EOF then response.write "" end if response.write "   " &RecSet("theOtherPic") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing end if %> <% 'hämta namnet på menyn SQL = "SELECT * From table1 WHERE theID = " & 47 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write "
" &RecSet("theOtherPic") & "
" RecSet.Close Set RecSet = nothing %> <% if request.querystring("id") = 47 OR request.querystring("subid") = 47 then SQL = "SELECT * From table1 WHERE subID = " & 47 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) Do Until RecSet.EOF if RecSet.EOF then response.write "" end if response.write "   " &RecSet("theOtherPic") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing end if %> <% 'hämta namnet på menyn SQL = "SELECT * From table1 WHERE theID = " & 104 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write "
" &RecSet("theOtherPic") & "
" RecSet.Close Set RecSet = nothing %> <% if request.querystring("id") = 104 OR request.querystring("subid") = 104 then SQL = "SELECT * From table1 WHERE subID = " & 104 & " " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) Do Until RecSet.EOF if RecSet.EOF then response.write "" end if response.write "   " &RecSet("theOtherPic") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing end if %>
Nyhetsarkiv


<% dim thePic dim rubrik 'skriv ut hästar på id 41 if request.querystring("id") = "41" then SQL = "SELECT * From table1 WHERE theID = " & Request.Querystring("id") &"" Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write "" end if dim Rubriken if RecSet2("subID") = "1" then Rubriken = "1-åring" else if RecSet2("subID") = "2" then Rubriken = "2-åring" else if RecSet2("subID") = "3" then Rubriken = "3-åring" else if RecSet2("subID") = "4" then Rubriken = "4-åring" else if RecSet2("subID") = "5" then Rubriken = "5-åring eller äldre" end if end if end if end if end if response.write "" & RecSet2("theHead") & " ("&rubriken&")
" RecSet2.MoveNext Loop response.write "" RecSet2.Close Set RecSet2 = Nothing 'hämta personal på id 61 else if request.querystring("id") = "61" OR Request.querystring("pid") = "61" then SQL = "SELECT * From table1 WHERE theID = " & Request.Querystring("id") &"" Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write "" end if response.write "" & RecSet2("theHead") & "
" RecSet2.MoveNext Loop response.write "" RecSet2.Close Set RecSet2 = Nothing 'kolla om det är någon av undersidorna som hämtas else if request.querystring("id") > "" then SQL = "SELECT * From table1 WHERE theID = " & Request.Querystring("id") &"" Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) dim headID headID= RecSet("theID") response.write "" thePic = RecSet("thePic") rubrik = RecSet("theHead") RecSet.Close Set RecSet = nothing 'annars hämta startsidan else SQL = "SELECT * From table1 WHERE theType= 'start' " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write "" thePic = RecSet("thePic") rubrik = RecSet("theHead") RecSet.Close Set RecSet = nothing end if end if end if %>
" Response.write RecSet("theText") response.write "

Hästar

" thePic = RecSet("thePic") rubrik = RecSet("theHead") RecSet.Close Set RecSet = nothing 'hämta alla hästar SQL2 = "SELECT * From table1 WHERE theType='horse' ORDER BY subID ASC" Databas.Execute( SQL2 ) set RecSet2=Databas.execute(SQL2) Do Until RecSet2.EOF if RecSet2.EOF then response.write "Inga hästar ännu
" Response.write RecSet("theText") response.write "

Medarbetare

" thePic = RecSet("thePic") rubrik = RecSet("theHead") RecSet.Close Set RecSet = nothing 'hämta all personal SQL2 = "SELECT * From table1 WHERE theType='personal' ORDER BY subID ASC" Databas.Execute( SQL2 ) set RecSet2=Databas.execute(SQL2) Do Until RecSet2.EOF if RecSet2.EOF then response.write "Ingen personal ännu
" 'response.write "" & textfix(RecSet("theHead")) 'response.write "
" & left(RecSet("theDate"),11) &" | " Response.write RecSet("theText") response.write "
" 'response.write "" & textfix(RecSet("theHead")) 'response.write "
" & left(RecSet("theDate"),11) &" | " Response.write RecSet("theText") response.write "
<% response.write " " & rubrik & "" %>
Nyheter <% SQL = "SELECT TOP 3 * From table1 WHERE theType='news' ORDER BY theDate DESC" Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) Do Until RecSet.EOF response.write "" RecSet.MoveNext Loop RecSet.Close set RecSet = nothing %>
"&left(RecSet("theDate"),11)&" | " & left(RecSet("theText"),120) & " Läs mer
<% SQL = "SELECT * From table1 WHERE theType='banner1'" Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write " " RecSet.Close set RecSet = nothing SQL = "SELECT * From table1 WHERE theType='banner2'" Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write " " RecSet.Close set RecSet = nothing SQL = "SELECT * From table1 WHERE theType='banner3'" Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) response.write " " RecSet.Close set RecSet = nothing %>
<% Databas.Close set Databas = nothing 'stänger databasen för hela sidan %>