<% 'ö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


<% if request.querystring("h") > "" then 'hämta en specifik häst, och sedan alla hästar i samma kategori SQL3 = "SELECT * From table1 WHERE theID=" & Request.Querystring("h") &" AND subID= " & Request.Querystring("kat") &"" Databas.Execute( SQL3 ) set RecSet=Databas.execute(SQL3) thePic = RecSet("thePic") response.write RecSet("theText")&"

" RecSet.Close Set RecSet = nothing 'sedan hämta alla andra i samma ålderskategori SQL3 = "SELECT * From table1 WHERE subID= " & Request.Querystring("kat") &" ORDER BY theHead ASC" Databas.Execute( SQL3 ) set RecSet=Databas.execute(SQL3) 'thePic = RecSet("thePic") Do Until RecSet.EOF if RecSet.EOF then response.write "Inga hästar ännu" end if response.write "" &RecSet("theHead") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing else if request.querystring("kat") = "1" then 'hämta alla ettåringar SQL3 = "SELECT * From table1 WHERE theType='horse' AND subID= " & 1 & " ORDER BY theHead ASC" Databas.Execute( SQL3 ) set RecSet=Databas.execute(SQL3) Do Until RecSet.EOF if RecSet.EOF then response.write "Inga hästar ännu" end if thePic = RecSet("thePic") response.write "

Ettåringar


" response.write "" &RecSet("theHead") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing else if request.querystring("kat") = "2" then 'hämta alla tvååringar SQL3 = "SELECT * From table1 WHERE theType='horse' AND subID= " & 2 & " ORDER BY theHead ASC" Databas.Execute( SQL3 ) set RecSet=Databas.execute(SQL3) thePic = RecSet("thePic") response.write "

Tvååringar


" Do Until RecSet.EOF if RecSet.EOF then response.write "Inga hästar ännu" end if response.write "" &RecSet("theHead") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing else if request.querystring("kat") = "3" then 'hämta alla etreåringar SQL3 = "SELECT * From table1 WHERE theType='horse' AND subID= " & 3 & " ORDER BY theHead ASC" Databas.Execute( SQL3 ) set RecSet=Databas.execute(SQL3) thePic = RecSet("thePic") response.write "

Treåringar


" Do Until RecSet.EOF if RecSet.EOF then response.write "Inga hästar ännu" end if response.write "" &RecSet("theHead") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing else if request.querystring("kat") = "4" then 'hämta alla fyraåringar SQL3 = "SELECT * From table1 WHERE theType='horse' AND subID= " & 4 & " ORDER BY theHead ASC" Databas.Execute( SQL3 ) set RecSet=Databas.execute(SQL3) thePic = RecSet("thePic") response.write "

Fyraåringar


" Do Until RecSet.EOF if RecSet.EOF then response.write "Inga hästar ännu" end if response.write "" &RecSet("theHead") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing else if request.querystring("kat") = "5" then 'hämta alla ettåringar SQL3 = "SELECT * From table1 WHERE theType='horse' AND subID= " & 5 & " ORDER BY theHead ASC" Databas.Execute( SQL3 ) set RecSet=Databas.execute(SQL3) thePic = RecSet("thePic") response.write "

Femåringar och äldre


" Do Until RecSet.EOF if RecSet.EOF then response.write "Inga hästar ännu" end if response.write "" &RecSet("theHead") & "
" RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing else 'skriv ut startsida för hästarna dvs id41 SQL = "SELECT * From table1 WHERE theID= " & 41 & "" Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) Response.write RecSet("theText") thePic = RecSet("thePic") rubrik = RecSet("theHead") RecSet.Close Set RecSet = nothing end if end if end if end if end if end if %>
<% response.write " Hästar hos Team Westholm" %>
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 %>