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


Starter
<% if request.querystring("kat") = "1" then 'hämta alla ettåringar SQL3 = "SELECT * From table1 WHERE theType='starts' ORDER BY theHead ASC" Databas.Execute( SQL3 ) set RecSet=Databas.execute(SQL3) response.write "

Starter i Sverige


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

Starter i Frankrike


" Do Until RecSet.EOF if RecSet.EOF then response.write "Inga starter ännu" end if Response.write RecSet("theText") thePic = RecSet("thePic") rubrik = RecSet("theHead") RecSet.MoveNext Loop RecSet.Close Set RecSet = nothing else 'skriv ut startsida för starter dvs id45 SQL = "SELECT * From table1 WHERE theID= " & 45 & "" 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 %>
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 %>