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


Nyheter
<% dim thePic SQL = "SELECT * From table1 WHERE theID=" & Request.Querystring("id") &" " Databas.Execute( SQL ) set RecSet=Databas.execute(SQL) if RecSet.EOF then response.write "Fel" end if thePic = RecSet("thePic") response.write RecSet("theText") response.write "
" & left(RecSet("theDate"),11) &"

" RecSet.Close set RecSet = nothing %> Tillbaka till nyheterna
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 %>