<%@ CodePage=65001 Language="VBScript"%> <%Response.CodePage = 65001 Response.CharSet = "utf-8" %> <% response.buffer=true '// Create subroutines Sub ShowThumb (Pic_ID, Pic_large, Pic_small, Pic_text, Pic_foto, Pic_vurdering, Admin, Edit) If iBBSLogonType = US_Registered Then Blob = "" Blob = Blob + "" Blob = Blob + "
 

" Blob = Blob + "
" & Pic_text & "
©" & Pic_foto & "

  " & Edit & "
" Blob = Blob + Admin & "
 
" Response.Write Blob 'Response.Write "

" & Pic_text & "
©" & Pic_foto & "

" & Admin & Edit &"
" Else Response.Write "
" & Pic_text & "
©" & Pic_foto & "
" & Admin & "" End If End Sub Sub StartTable (Caption) Response.Write "" MYSQL = "SELECT * FROM " & sKat & " WHERE nummer = " & Ennum & " ORDER BY Dato" Set rsGal = Con.Execute(MYSQL) ' 0 1 2 3 4 5 6 7 8 9 Set rsGal = Con.Execute ("SELECT ID, URL, Thumb, Tekst, Fotograf, poeng, stemmer, Type, Nummer, Dato FROM " & sKat & " WHERE nummer = " & Ennum & " ORDER BY Dato;") If Not rsGal.EOF Then xGal = rsGal.GetRows() For Xa = 0 to Ubound(xGal,2) Pic_ID = xGal(0,Xa) Pic_large = xGal(1,Xa) Pic_small = xGal(2,Xa) Pic_foto = xGal(4,Xa) Pic_text = xGal(3,Xa) Pic_poeng = xGal(5,Xa) Pic_stemmer = xGal(6,Xa) Pic_Type = xGal(7,Xa) Pic_Nummer = xGal(8,Xa) Pic_Dato = xGal(9,Xa) Pic_Dato = Mid(Pic_Dato,7,4) If IsNull(Pic_stemmer) = True Then Pic_stemmer = 0 If IsNull(Pic_poeng) = True Then Pic_poeng= 0 If Pic_stemmer = 0 Then Pic_vurdering = 0 Else Pic_vurdering = Pic_poeng/Pic_stemmer Pic_vurdering = FormatNumber(Pic_vurdering,0) End If If Pic_Dato = "2008" Then Pic_URI = Mid(Pic_large,25) Edit = "" Else Edit = "" End If if IsIngroup(2, iBBSMemberID) then Admin = "        
  
" Else Admin = "" End If '// Display pics If Count = 4 then Response.Write "" Count = 0 End If ShowThumb Pic_ID, Pic_large, Pic_small, Pic_text, Pic_foto, Pic_vurdering, Admin, Edit Count = Count + 1 Next Else: Response.Write "" End IF Set rsGal = Nothing %>
" End Sub '// Database connections ' Set Con = Server.CreateObject("ADODB.Connection") ' Con.open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\inetpub\vhosts\jernbane.net\private\galleri.mdb" If Err.Number <> 0 Then response.write "Couldn't open DB" response.end End If Ennum = Request.Querystring("enhet") sKat = Request.Querystring("kat") sNavn = Request.Querystring("katID") If sNavn <> "" Then MYSQL = "SELECT * FROM Kategori WHERE katID = " & sNavn Else MYSQL = "SELECT * FROM Kategori WHERE typetable = '" & sKat & "'" End If Set rsKat = Con.Execute(MYSQL) xKat = rsKat.GetRows() KatNavn = xKat(1,0) ' 0 1 2 3 4 5 6 7 MYSQL = "SELECT numID, enhet, typeID, info, inkl, info2, Glan, Glng FROM Nummer WHERE numID = " & Ennum Set rsNum = Con.Execute(MYSQL) xNum = rsNum.GetRows() enhet = xnum(1,0) typenavn = xnum(2,0) info = xnum(3,0) inkl = xnum(4,0) info2 = xnum(5,0) Glat = xnum(6,0) Glng = xnum(7,0) Set rsNum = Nothing Session("Glat") = Glat Session("Glng") = Glng Session("stasjon") = enhet MYSQL2 = "SELECT * FROM Type WHERE [typeID] = " & typenavn & "" 'Response.Write MYSQL2 Set rsType = Con.Execute(MYSQL2) xType = rsType.GetRows() typenavn = xType(1,0) %> <% metakeywords = typenavn & "," & enhet & ",jernbane,tog,museumstog,jernbanemuseum,museumsjernbane,museumslokomotiver,jernbanespor,jernbanelinjer,modelljernbane,norske tog,diesellokomotiver,njk,cargonet,motorvogner,nsb,jbv" metadescription = "Bilder av " & typenavn & ": " & enhet pTITLE= typenavn & ": " & enhet & " - Jernbane.net" %> <% Response.Write "
" & Caption & "   
" & KatNavn & ", " & typenavn & ":
" & enhet & "
" & info & "

" Response.Write "
" If inkl <> "" Then Server.Execute inkl End If If info2 <> "" Then 'Response.Write "
" Response.Write 'Response.Write "

" End If Response.Write "

" If Glat <> "" Then FilEx = "map.asp" Server.Execute FilEx End If Response.Write "

" StartTable Caption Count = 0 Response.Write "


Det finnes desverre ingen bilder av " & typenavn & ": " & enhet & "