<% public function GetImageSize(ByVal strImagePath) dim ImageType, arrImageDimensions(2), fso, file, s, ns, n ImageType = lcase(Right(strImagePath, len(strImagePath) - instrrev(strImagePath, ".", -1))) Set fso = CreateObject("Scripting.FileSystemObject") Set file = fso.OpenTextFile(strImagePath,1) Select Case ImageType Case "jpg", "jpeg" file.Skip(2) ns = file.Read(2) Do While Not (ns = "˙À" Or ns = "˙Â") ns = file.Read(2) n = HexToDec(HexAt(ns,1) & HexAt(ns,2)) n = n - 2 file.Skip(n) ns = file.Read(2) Loop file.Skip(3) s = file.Read(4) arrImageDimensions(0) = HexToDec(HexAt(s,3) & HexAt(s,4)) arrImageDimensions(1) = HexToDec(HexAt(s,1) & HexAt(s,2)) Case "gif" s = Right(file.Read(10),4) arrImageDimensions(0) = HexToDec(HexAt(s,2) & HexAt(s,1)) arrImageDimensions(1) = HexToDec(HexAt(s,4) & HexAt(s,3)) case "bmp" s = Right(file.Read(24), 8) arrImageDimensions(0) = HexToDec(HexAt(s,4) & HexAt(s,3)) arrImageDimensions(1) = HexToDec(HexAt(s,8) & HexAt(s,7)) case "wmf" s = Right(file.Read(14), 4) arrImageDimensions(0) = HexToDec(HexAt(s,1) & HexAt(s,1)) arrImageDimensions(1) = HexToDec(HexAt(s,4) & HexAt(s,3)) case "png" s = Right(file.Read(24), 8) arrImageDimensions(0) = HexToDec(HexAt(s,3) & HexAt(s,4)) arrImageDimensions(1) = HexToDec(HexAt(s,7) & HexAt(s,8)) End Select file.Close Set file = Nothing GetImageSize = arrImageDimensions end function private function HexAt(s, n) HexAt = Hex(Asc(Mid(s, n, 1))) if len(HexAt) = 1 then HexAt = "0" & HexAt end if end function private function HexToDec(cadhex) Dim n, i, ch, decimal decimal = 0 n = Len(cadhex) For i=1 To n decimal = decimal * 16 ch = Mid(cadhex, i, 1) decimal = decimal + inStr("0123456789ABCDEFabcdef", ch) -1 Next HexToDec = decimal end function %>

 

 

Internationales Jahr der Astronomie 2009

Webseiten für die Metropolregion Nürnberg

Weitere Aktionen für das Internationale Jahr der Astronomie in der
Europäischen Metropolregion Nürnberg

<% Dim strDB2, strCon2 Dim objCon2, objRS2 Dim strSQL2 Dim strDB, strCon Dim objCon, objRS Dim strSQL, i Dim b, Rest, ausrichtung, c1, c2, c3, c4, c5, c b = 1 Rest = b Mod 2 If Rest > 0 Then ausrichtung = "left" Else ausrichtung = "right" End if i = 1 strDB = "Data Source=" & Server.MapPath("../database/ain.mdb") strCon = "Provider=Microsoft.Jet.OLEDB.4.0;" & strDB Set objCon = Server.CreateObject("ADODB.Connection") objCon.Open strCon Set objRS = Server.CreateObject("ADODB.Recordset") Set objRS2 = Server.CreateObject("ADODB.Recordset") strSQL2 = "Select * From iya_projekte" objRS2.open strSQL2, objCon Response.Write "" Response.Write "
Zum Kalender
    " Do While Not objRS2.EOF Response.Write "
  • "&objRS2("Name")&"

  • " objRS2.movenext Loop Response.Write "
" strSQL = "Select * From iya_projekte" objRS.open strSQL, objCon Do While Not objRS.EOF Rest = b Mod 2 If Rest > 0 Then ausrichtung = "left" Else ausrichtung = "right" End if Response.Write "

 

" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "
 
"&objRS("Name")&"
"&objRS("inst")&"
"&objRS("Datum")&"
"&objRS("Zeit")&"
" If objRS("Bild") = "keines" then Response.Write "" Else Response.Write ""&objRS("Bild")&"" End If Response.Write objRS("Beschreibung")&"
Zurück...
" i = i + 1 b = b + 1 objRS.movenext Loop objRS.Close Set objRS = Nothing objCon.Close Set objCon = Nothing %>
Webseiten betreut durch Logo Nürnberger Astronomische Gesellschaft
Impressum Astrojahr 2009