'-------------------------------------------------------------------------------- ' ' Script for website FOTOEXPO ' ' (p)2000-2004 by fotograaf@xs4all.nl ' '-------------------------------------------------------------------------------- Option Explicit Const ForReading = 1, ForWriting = 2 '-------------------------------------------------------------------------------- Function CheckArgument(parameter) Dim objArgs, teller, HelpCheckArgument Set objArgs = WScript.Arguments HelpCheckArgument = false For teller = 0 to objArgs.Count - 1 If objArgs(teller) = parameter Then HelpCheckArgument = true Next CheckArgument = HelpCheckArgument End Function Function CheckVarArgument(parameter) Dim objArgs, teller, HelpCheckVarArgument Set objArgs = WScript.Arguments HelpCheckVarArgument = "" For teller = 0 to objArgs.Count - 1 If ( InStr( objArgs(teller), ":" ) > 0 ) Then If ( Left( objArgs(teller), InStr( objArgs(teller), ":" ) -1 ) = parameter ) Then HelpCheckVarArgument = Mid( objArgs(teller), InStr( objArgs(teller), ":" ) +1, 20 ) End If End If Next CheckVarArgument = HelpCheckVarArgument End Function Function GetParameter(scriptfilename, initag, default) Dim HelpGetParameter Dim FSI, inputfile, inputfileline HelpGetParameter = "" If verbose Then wscript.echo "Scriptfilename: " & scriptfilename If GetFileExist(scriptfilename) = true Then Set fsi = CreateObject("Scripting.FileSystemObject") Set inputfile = fsi.OpenTextFile(scriptfilename, ForReading, False) Do While ( inputfile.AtEndOfStream <> True ) and _ ( Left(inputfileline, 1) <> "[" ) and _ ( HelpGetParameter = "" ) inputfileline = inputfile.ReadLine If ( Mid( inputfileline, 1, 1 ) <> ";" ) and ( InStr( inputfileline, initag & " ") > 0 ) Then HelpGetParameter = Mid(inputfileline, InStr( inputfileline, """") + 1, InStrRev( inputfileline, """") - InStr( inputfileline, """") - 1) End If Loop inputfile.close Else Dim helpdirname, helpfilename, startdirname Scriptfilename = Replace( Scriptfilename, "\", "/" ) helpfilename = Mid ( scriptfilename, InStrRev( scriptfilename, "/" ) + 1, 30 ) helpdirname = Left( scriptfilename, InStrRev( scriptfilename, "/" ) ) startdirname = helpdirname Do helpdirname = Left( helpdirname, InStrRev( helpdirname, "/", Len(helpdirname) - 1 ) ) loop until ( GetFileExist(helpdirname & helpfilename) = true ) or _ ( InStrRev( helpdirname, "/", Len(helpdirname) - 1 ) = 0 ) If ( GetFileExist(helpdirname & helpfilename) = true ) Then Set fsi = CreateObject("Scripting.FileSystemObject") Set inputfile = fsi.OpenTextFile(helpdirname & helpfilename, ForReading, False) Do inputfileline = inputfile.ReadLine Loop until ( inputfileline = "[" & Mid( startdirname, Len(helpdirname) + 1, Len(startdirname) - Len(helpdirname) -1 ) & "]" ) or _ ( inputfile.AtEndOfStream = True ) Dim sectionpassed, sectionfound sectionpassed = false sectionfound = false If ( inputfileline = "[" & Mid( startdirname, Len(helpdirname) + 1, Len(startdirname) - Len(helpdirname) -1 ) & "]" ) Then sectionfound = true Do While inputfile.AtEndOfStream <> True inputfileline = inputfile.ReadLine If ( Left( inputfileline, 1 ) = "[" ) Then sectionpassed = true If ( Mid( inputfileline, 1, 1 ) <> ";" ) and _ ( InStr( inputfileline, initag & " ") > 0 ) and _ ( sectionpassed = false ) Then HelpGetParameter = Mid(inputfileline, InStr( inputfileline, """") + 1, InStrRev( inputfileline, """") - InStr( inputfileline, """") - 1) End If Loop inputfile.close 'wscript.echo "Search for tag """ & initag & """ in section [" & Mid( startdirname, Len(helpdirname) + 1, Len(startdirname) - Len(helpdirname) -1 ) & "] " & BooleanString(sectionfound, "(Section OK)", "(Section not found!)") & _ ' " of file " & helpdirname & helpfilename & " " & BooleanString( HelpGetParameter <> "", "OK", "Not Found!" ) End If End If If HelpGetParameter <> "" Then GetParameter = HelpGetParameter Else GetParameter = default End If End Function '-------------------------------------------------------------------------------- Function GetExifParameter(ExifFilename, Imagename, ExifTag) Dim HelpGetParameter Dim FSI, inputfile, inputfileline If verbose = true Then wscript.echo "Entering Function GetExifParameter" HelpGetParameter = "" If GetFileExist(ExifFilename) = true Then If verbose = true Then wscript.echo " Exif File " & ExifFilename & " exists" Set fsi = CreateObject("Scripting.FileSystemObject") Set inputfile = fsi.OpenTextFile(ExifFilename, ForReading, False) Do inputfileline = inputfile.ReadLine Loop until ( ( Left( inputfileline, Len("File name : ")) = "File name : " ) and _ ( LCase( Mid( inputfileline, Len("File name : ") + 1, 50) ) = LCase(Imagename) ) ) or _ ( inputfile.AtEndOfStream = True ) If inputfile.AtEndOfStream = false Then If verbose = true Then wscript.echo " Exif Section found for " & Imagename & "(" & inputfileline & ")" Do While ( inputfile.AtEndOfStream <> True ) and ( HelpGetParameter = "" ) inputfileline = inputfile.ReadLine If Left( inputfileline, Len(ExifTag ) ) = ExifTag Then HelpGetParameter = Right( inputfileline, Len( inputfileline ) - InStr( inputfileline, ": " ) - 1) If ( ExifTag = "Focal length" ) and ( InStr( HelpGetParameter, "equivalent" ) > 0 ) Then HelpGetParameter = Left( HelpGetParameter, InStr( HelpGetParameter, "mm" ) + 1 ) End If If ( ExifTag = "Exposure time" ) Then HelpGetParameter = Mid( HelpGetParameter, InStr( HelpGetParameter, "(" ) + 1, InStr( HelpGetParameter, ")" ) - InStr( HelpGetParameter, "(" ) - 1 ) + "s" End If If ( ExifTag = "ISO equiv." ) Then HelpGetParameter = "iso" & HelpGetParameter End If If ( ExifTag = "Flash used" ) Then HelpGetParameter = BooleanString( HelpGetParameter = "Yes", "flash", "no flash") End If End If Loop End If inputfile.close Else If verbose = true Then wscript.echo " Exif File " & ExifFilename & " not available" End If If HelpGetParameter <> "" Then GetExifParameter = HelpGetParameter Else GetExifParameter = "unknown" End If If verbose = true Then wscript.echo " ExifParameter: " & GetExifParameter End Function '-------------------------------------------------------------------------------- Function GetFileExist(filespec) Dim fso, result Set fso = CreateObject("Scripting.FileSystemObject") If (fso.FileExists(filespec)) Then result = true Else result = false End If GetFileExist = result End Function Function GetFolderExist(folderspec) Dim fso, result Set fso = CreateObject("Scripting.FileSystemObject") If (fso.FolderExists(folderspec)) Then result = true Else result = false End If GetFolderExist = result End Function Function DeleteFile(filespec) Dim fso If GetFileExist(filespec) = true Then wscript.echo "[DeleteFile] Deleting file: " & filespec Set fso = CreateObject("Scripting.FileSystemObject") fso.DeleteFile(filespec) Else wscript.echo "Deleting file: " & filespec & " unsuccesfull (file exists)" End If End Function ' Function RenameFile(filespec, newfilename) ' ' Dim fso, file ' ' wscript.echo "Renaming file: " & filespec & " into " & newfilename ' ' Set fso = CreateObject("Scripting.FileSystemObject") ' ' Set file = fso.GetFile(filespec) ' ' file.name = newfilename ' ' End Function ' Function ReadAllTextFile(filename) ' ' Dim fso, file ' ' Set fso = CreateObject("Scripting.FileSystemObject") ' ' Set file = fso.OpenTextFile(filename, ForReading) ' ' ReadAllTextFile = file.ReadAll ' ' End Function Function BooleanString(bool, truestring, falsestring) If bool = true Then BooleanString = truestring Else BooleanString = falsestring End If End Function Function AddZero(txt, maxlength) Dim HelpAddZero HelpAddZero = txt While Len(HelpAddZero) < maxlength HelpAddZero = "0" & HelpAddZero Wend AddZero = HelpAddZero End Function Function AddHTMLSpace(txt) If Len(txt) = 1 Then AddHTMLSpace = " " & txt Else AddHTMLSpace = txt End If End Function Function GetItemCount(txt, seperator) Dim seperatorteller, helpteller seperatorteller = 0 For helpteller = 1 to Len(txt) If Mid(txt, helpteller, 1) = seperator Then seperatorteller = seperatorteller + 1 Next GetItemCount = seperatorteller + 1 End Function Function GetItem(txt, number) GetItem = GetItemExtended(txt, number, ",") End Function Function GetItemExtended(txt, number, seperator) Dim teller, position1, position2, maxnumber maxnumber = GetItemCount(txt, seperator) If number = 1 Then position1 = 0 If maxnumber > 1 Then position2 = InStr(txt, seperator) Else position2 = Len(txt) + 1 End If End If If number > 1 Then position1 = InStr(1, txt, seperator, 1) position2 = 0 If number > 2 Then For teller = 1 to number-2 position1 = InStr(position1 + 1, txt, seperator, 1) Next End If If number < maxnumber Then position2 = InStr(position1 + 1, txt, seperator, 1) Else position2 = Len(txt) + 1 End If End If If position2 > position1 Then GetItemExtended = Mid(txt, position1+1, position2 - position1 - 1) Else GetItemExtended = "Error" End If End Function Function GetDirectoryPart(par_directory, counter, fullpath) Dim posStart, posEnd If ( counter = 1 ) Then PosEnd = Len(par_directory) - 1 PosStart = InStrRev( par_directory, "/", PosEnd ) + 1 End If If ( counter = 2 ) Then PosEnd = InStrRev( par_directory, "/", Len(par_directory) -1 ) - 1 PosStart = InStrRev( par_directory, "/", PosEnd ) + 1 End If If ( counter = 3 ) Then PosEnd = InStrRev( par_directory, "/", InStrRev( par_directory, "/", Len(par_directory) -1 ) - 1 ) - 1 PosStart = InStrRev( par_directory, "/", PosEnd ) + 1 End If If ( counter = 4 ) Then PosEnd = InStrRev( par_directory, "/", InStrRev( par_directory, "/", InStrRev( par_directory, "/", Len(par_directory) -1 ) - 1 ) - 1 ) - 1 PosStart = InStrRev( par_directory, "/", PosEnd ) + 1 End If If fullpath = true Then PosStart = 1 GetDirectoryPart = Mid(par_directory, PosStart, PosEnd - PosStart +2) End Function Function CountSubdirectories(par_directory, startstring) Dim FSO, F, FD, folder Dim HelpCountSubdirectories Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FD = F.Subfolders HelpCountSubdirectories = 0 For each folder in FD If ( startstring = "" ) or _ ( ( startstring <> "" ) and ( LCase(Left(folder.name, Len(startstring))) = LCase(startstring) ) ) _ Then HelpCountSubdirectories = HelpCountSubdirectories + 1 Next CountSubdirectories = HelpCountSubdirectories End Function '-------------------------------------------------------------------------------- Sub IncludeEmbeddedVars(dirname, infilename, outfilename) Dim FSI, FSO, inputfile, outputfile Dim inputfileline wscript.echo "Creating file: " & outfilename & String( 30 - Len(outfilename), " " ) & " (inputfile: " & infilename & ")" 'Input File Set fsi = CreateObject("Scripting.FileSystemObject") Set inputfile = fsi.OpenTextFile(dirname & infilename, ForReading, False) 'Output File Set fso = CreateObject("Scripting.FileSystemObject") Set outputfile = fso.CreateTextFile(dirname & outfilename, True) Do While inputfile.AtEndOfStream <> True inputfileline = inputfile.readline If ( InStr( inputfileline, "<%=") = 0 ) Then outputfile.writeline(inputfileline) Else inputfileline = Replace(inputfileline, "<%=rootprefix%>", rootprefix) inputfileline = Replace(inputfileline, "<%=rootdirectory%>", rootdirectory) inputfileline = Replace(inputfileline, "<%=reportdirectory%>", reportdirectory) inputfileline = Replace(inputfileline, "<%=extension%>", extension) outputfile.writeline(inputfileline) End If Loop inputfile.close outputfile.close End Sub ' Sub CreateNewsHeaders(dirname, infilename, outfilename) ' ' Dim FSI, FSO, inputfile, outputfile ' Dim NewsBar ' Dim inputfileline, inputfilelinenext ' ' wscript.echo "Creating file: " & outfilename & String( 16 - Len(outfilename), " " ) & " (inputfile: " & infilename & ")" ' ' 'Input File ' Set fsi = CreateObject("Scripting.FileSystemObject") ' Set inputfile = fsi.OpenTextFile(dirname & infilename, ForReading, False) ' ' 'Output File ' Set fso = CreateObject("Scripting.FileSystemObject") ' Set outputfile = fso.CreateTextFile(dirname & outfilename, True) ' ' Do While inputfile.AtEndOfStream <> True ' ' inputfileline = inputfile.readline ' ' If InStr(inputfileline, " 0 Then ' ' NewsGetInfo outputfile, Mid(inputfileline, 10, Len(inputfileline) - 9 -1), true ' ' Else ' ' If ( Left( inputfileline, 1) <> "[" ) and _ ' ( Left( inputfileline, 1) <> "{" ) Then ' ' If inputfileline <> "" Then outputfile.writeline(inputfileline) ' ' ElseIf ( Left( inputfileline, 1) = "{" ) Then ' ' inputfileline = Replace( inputfileline, "{", "" ) ' inputfileline = Replace( inputfileline, "}", "" ) ' ' inputfilelinenext = inputfile.readline ' ' If extension = "html" Then ' ' 'outputfile.writeline("display_sitenewsitem('" & ReplaceforJavascript(inputfilelinenext) & "','" & GetVerboseDate(inputfileline, "us", true) & "','" & GetVerboseDate(inputfileline, "nl", true) & "', '" & GetVerboseDate(inputfileline, "de", true) & "');") ' ' ElseIf extension = "php" Then ' ' ' End If ' ' End If ' ' End If ' ' Loop ' ' inputfile.close ' outputfile.close ' ' End Sub Sub NewsGetInfo(outputfile, directorypart, catlink, condition) Dim foldername, par_directory Dim news_directory, news_file, news_title, news_titleimage, news_thumbimage, news_offline, news_todo, news_catlink, news_link, news_location, news_date, news_country, news_hot Dim linkdir, linkterm news_directory = "" news_file = "" news_title = "" news_titleimage = "off" news_thumbimage = "off" news_offline = "off" news_todo = "off" news_catlink = "off" news_link = "" news_date = "" news_country = "" news_hot = "off" wscript.echo "Get Info for newsitem: " & directorypart foldername = Mid(directorypart, InStr(directorypart, "/") + 1, 100) par_directory = drive & rootprefix & rootdirectory & reportdirectory & directorypart & "/" If verbose Then wscript.echo "Directorypart: " & directorypart wscript.echo "Directory: " & par_directory wscript.echo "folder: " & foldername End If news_directory = directorypart & "/" news_file = GetInfowithDefault(foldername, "indexfile", "index") & "." & extension news_link = GetInfo(foldername, "link") If GetFileExist(par_directory & "title.jpg") Then news_titleimage = "on" If GetFileExist(par_directory & "thumb.jpg") Then news_thumbimage = "on" If GetInfo(foldername, "offline") = true Then news_offline = "on" If GetInfo(foldername, "todo") = true Then news_todo = "on" If GetInfo(foldername, "hot") = true Then news_hot = "on" If catlink = true Then news_catlink = "catlink" If extension = "html" Then If InStr(directorypart, "specials/") > 0 Then outputfile.writeline("display_reportitemlink_special('" & news_directory & "', '" & news_file & "', '" & _ ReplaceForJavaScript(GetDescription(foldername, "us", false, false)) & "', '" & _ ReplaceForJavaScript(GetDescription(foldername, "nl", false, false)) & "', '" & _ ReplaceForJavascript(GetDescription(foldername, "de", false, false)) & "')") Else news_title = ReplaceforJavascript(GetInfo(foldername, "title")) news_location = GetInfo(foldername, "location") news_country = GetInfo(foldername, "country") news_date = GetInfo(foldername, "date") 'outputfile.writeline("display_reportitemlink('" & news_directory & "', '" & news_file & "', '" & news_title & "', '" & news_location & "', '" & news_country & "', '" & news_date & "', '" & news_link & "', '" & news_thumbimage & "', '" & news_offline & "', '" & news_todo & "', '" & news_catlink & "');") outputfile.writeline( BooleanString(condition="", "", "if " & condition & " { ") & "display_reportitemlink('" & news_directory & "', '" & news_file & "', '" & news_title & "', '" & news_location & "', '" & news_country & "', '" & news_date & "', '" & news_link & "', '" & news_thumbimage & "', '" & news_offline & "', '" & news_todo & "', " & news_catlink & ", '" & news_hot & "')" & BooleanString(condition="", ";", " }")) End If ElseIf extension = "php" Then End If End Sub Function GetVerboseDate(Datetxt, language, capitalweekday) Dim var_weekday, var_day, var_month, var_year, var_ustxt Dim array_day_us, array_month_us, _ array_day_nl, array_month_nl, _ array_day_de, array_month_de array_day_us = Array("Monday", "Tuesday", "Wensday", "Thursday", "Friday", "Saturday", "Sunday") array_month_us = Array("Januari", "Februari", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") array_day_nl = Array("Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag", "Zondag") array_month_nl = Array("Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December") array_day_de = Array("Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag") array_month_de = Array("Januar", "Februar", "Mârz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember") var_year = Mid(datetxt, 1, 4) var_month = Mid(datetxt, 6, 2) var_day = Mid(datetxt, 9, 2) 'wscript.echo datetxt If verbose Then wscript.echo "Date input: " & Datetxt If verbose Then wscript.echo "Year: " & var_year If verbose Then wscript.echo "Month: " & var_month If verbose Then wscript.echo "Day: " & var_day var_weekday = DatePart("w", var_day & "-" & var_month & "-" & var_year, 2) If ( Len(var_day) = 2 ) and ( Left(var_day,1) = "0" ) Then var_day = Replace(var_day, "0", "") var_ustxt = "th" If var_day = "1" Then var_ustxt = "st" If var_day = "2" Then var_ustxt = "nd" If language = "us" Then GetVerboseDate = BooleanString(capitalweekday = true, array_day_us(var_weekday-1), LCase(array_day_us(var_weekday-1))) & ", the " & var_day & var_ustxt & " of " & array_month_us(var_month-1) & " " & var_year If language = "nl" Then GetverboseDate = BooleanString(capitalweekday = true, array_day_nl(var_weekday-1), LCase(array_day_nl(var_weekday-1))) & " " & var_day & " " & array_month_nl(var_month-1) & " " & var_year If language = "de" Then GetVerboseDate = array_day_de(var_weekday-1) & ", den " & var_day & ". " & array_month_de(var_month-1) & " " & var_year End Function '-------------------------------------------------------------------------------- ' Sub CreateAllLanguageHTML(dirname, filename, parDeletefile) ' ' wscript.echo ' wscript.echo "Create Language files for: " & dirname & filename ' ' CreateLanguageHTML dirname, filename, "us" ' CreateLanguageHTML dirname, filename, "nl" ' CreateLanguageHTML dirname, filename, "de" ' ' If parDeletefile = true Then DeleteFile(dirname & filename) ' ' End Sub ' Sub CreateLanguageHTML(dirname, filename, language) ' ' Dim outputfilename, includefilename ' Dim FSI, FSO, FSINC, inputfile, outputfile, includefile ' Dim inputfileline, includefileline ' ' If InStr(filename, "_ml") > 0 Then ' ' outputfilename = Replace(filename, "_ml", "_" & language) ' ' Else ' ' outputfilename = Replace(filename, ".", "_" & language & ".") ' ' End If ' ' wscript.echo "[CreateLanguageHTML] Creating HTML file " & outputfilename ' ' 'Input File ' Set fsi = CreateObject("Scripting.FileSystemObject") ' Set inputfile = fsi.OpenTextFile(dirname & filename, ForReading, False) ' ' 'Output File ' Set fso = CreateObject("Scripting.FileSystemObject") ' Set outputfile = fso.CreateTextFile(dirname & outputfilename, True) ' ' Do While inputfile.AtEndOfStream <> True ' ' inputfileline = GetNextLine(inputfile,language) ' ' inputfileline = Replace(inputfileline, "", "") ' inputfileline = Replace(inputfileline, "", "") ' inputfileline = Replace(inputfileline, "", "") ' ' inputfileline = Replace(inputfileline, "", "") ' inputfileline = Replace(inputfileline, "", "") ' inputfileline = Replace(inputfileline, "", "") ' ' If ( InStr( inputfileline, "" ) - InStr( inputfileline, "") = 0 ) Then outputfile.writeline("") ' ' 'Include File ' Set fsinc = CreateObject("Scripting.FileSystemObject") ' ' If ( InStr(includefilename, ":") = 0 ) Then Includefilename = drive & Includefilename ' ' Set includefile = fsinc.OpenTextFile(includefilename, ForReading, False) ' ' Dim tempnextline ' ' Do While includefile.AtEndOfStream <> True ' ' tempnextline = GetNextLine(includefile,language) ' ' If ( dirname = drive & rootprefix & rootdirectory & "carnaval/" ) or _ ' ( dirname = drive & rootprefix & rootdirectory & "events/" ) or _ ' ( dirname = drive & rootprefix & rootdirectory & "vehicles/" ) Then ' ' If ( InStr(tempnextline, "") > 0 ) Then tempnextline = Replace(tempnextline, "", "") ' ' End If ' ' tempnextline = Replace(tempnextline, "
", "
") ' tempnextline = Replace(tempnextline, "
", "
") ' ' tempnextline = Replace(tempnextline, "", "") ' tempnextline = Replace(tempnextline, "", "") ' tempnextline = Replace(tempnextline, "", "") ' ' tempnextline = Replace(tempnextline, "", "") ' tempnextline = Replace(tempnextline, "", "") ' tempnextline = Replace(tempnextline, "", "") ' ' outputfile.writeline(tempnextline) ' ' Loop ' ' If ( InStr(includefilename, "doctype.inc") = 0 ) and ( InStr(inputfileline, "") = 0 ) Then outputfile.writeline("") ' ' End If ' ' Loop ' ' inputfile.close ' outputfile.close ' ' End Sub Sub CreateAllScriptLanguageHTML(outputfile, dirname, filename) CreateScriptLanguageHTML outputfile, dirname, filename, "us" CreateScriptLanguageHTML outputfile, dirname, filename, "nl" CreateScriptLanguageHTML outputfile, dirname, filename, "de" End Sub Sub CreateScriptLanguageHTML(outputfile, dirname, filename, language) Dim FSI, inputfile, inputfileline 'Input File Set fsi = CreateObject("Scripting.FileSystemObject") Set inputfile = fsi.OpenTextFile(dirname & filename, ForReading, False) outputfile.writeline If extension = "html" Then outputfile.writeline("if ( language == '" & language & "' ) {") ElseIf extension = "php" Then outputfile.writeline("if ( $language == '" & language & "' ) {") End If Do While inputfile.AtEndOfStream <> True inputfileline = GetNextLine(inputfile,language) inputfileline = Replace(inputfileline, "", "") inputfileline = Replace(inputfileline, "", "") inputfileline = Replace(inputfileline, "", "") inputfileline = Replace(inputfileline, "", "") inputfileline = Replace(inputfileline, "", "") inputfileline = Replace(inputfileline, "", "") If ( InStr( inputfileline, " "" ) Then Display outputfile, inputfileline End If Loop inputfile.close If extension = "html" Then outputfile.writeline("}") ElseIf extension = "php" Then outputfile.writeline("}") End If outputfile.writeline End Sub Function GetNextLine(inputfilepointer, language) Dim inputfileline inputfileline = ReadNextLine(inputfilepointer) If ( language = "us" ) Then Do If ( InStr( inputfileline, "") > 0 ) Then If ( InStr( inputfileline, "") = 0 ) Then Do inputfileline = inputfilepointer.ReadLine Loop until ( InStr(inputfileline, "") > 0 ) End If inputfileline = ReadNextLine(inputfilepointer) End If If ( InStr( inputfileline, "") > 0 ) Then If ( InStr( inputfileline, "") = 0 ) Then Do inputfileline = inputfilepointer.ReadLine Loop until ( InStr(inputfileline, "") > 0 ) End If inputfileline = ReadNextLine(inputfilepointer) End If Loop until ( InStr( inputfileline, "") = 0 ) and ( InStr( inputfileline, "") = 0 ) End If If ( language = "nl" ) Then Do If ( InStr( inputfileline, "") > 0 ) Then If ( InStr( inputfileline, "") = 0 ) Then Do inputfileline = inputfilepointer.ReadLine Loop until ( InStr(inputfileline, "") > 0 ) End If inputfileline = ReadNextLine(inputfilepointer) End If If ( InStr( inputfileline, "") > 0 ) Then If ( InStr( inputfileline, "") = 0 ) Then Do inputfileline = inputfilepointer.ReadLine Loop until ( InStr(inputfileline, "") > 0 ) End If inputfileline = ReadNextLine(inputfilepointer) End If Loop until ( InStr( inputfileline, "") = 0 ) and ( InStr( inputfileline, "") = 0 ) End If If ( language = "de" ) Then Do If ( InStr( inputfileline, "") > 0 ) Then If ( InStr( inputfileline, "") = 0 ) Then Do inputfileline = inputfilepointer.ReadLine Loop until ( InStr(inputfileline, "") > 0 ) End If inputfileline = ReadNextLine(inputfilepointer) End If If ( InStr( inputfileline, "") > 0 ) Then If ( InStr( inputfileline, "") = 0 ) Then Do inputfileline = inputfilepointer.ReadLine Loop until ( InStr(inputfileline, "") > 0 ) End If inputfileline = ReadNextLine(inputfilepointer) End If Loop until ( InStr( inputfileline, "") = 0 ) and ( InStr( inputfileline, "") = 0 ) End If GetNextLine = inputfileline End Function Function ReadNextLine(inputfilepointer) Dim inputfileline If ( inputfilepointer.AtEndOfStream = false ) Then inputfileline = inputfilepointer.ReadLine Else inputfileline = "" End If ReadNextLine = inputfileline End Function Sub IncludeFileStatement(dirname, inputfilename, outputfilename) Dim includefilename Dim FSI, FSO, FSINC, inputfile, outputfile, includefile Dim inputfileline, includefileline wscript.echo "[IncludeFileStatement] Creating file " & dirname & outputfilename & " (input:" & inputfilename & ")" 'Input File Set fsi = CreateObject("Scripting.FileSystemObject") Set inputfile = fsi.OpenTextFile(dirname & inputfilename, ForReading, False) 'Output File Set fso = CreateObject("Scripting.FileSystemObject") Set outputfile = fso.CreateTextFile(dirname & outputfilename, True) Do While inputfile.AtEndOfStream <> True inputfileline = inputfile.ReadLine If ( InStr( inputfileline, "" ) - InStr( inputfileline, "") = 0 ) Then outputfile.writeline("") Set fsinc = CreateObject("Scripting.FileSystemObject") If verbose Then wscript.echo "ifn: " & includefilename Set includefile = fsinc.OpenTextFile(includefilename, ForReading, False) Dim tempnextline Do While includefile.AtEndOfStream <> True tempnextline = includefile.ReadLine outputfile.writeline(tempnextline) Loop If ( InStr(includefilename, "doctype.inc") = 0 ) and ( InStr(inputfileline, "") = 0 ) Then outputfile.writeline("") includefile.close End If Loop inputfile.close outputfile.close End Sub Function CreateFullPage(dirname, infilename, outfilename, standardnavmenu, lastnavmenuitem, loading) Dim FSI, FSO, inputfile, outputfile Dim inputfileline, navfilename wscript.echo "Creating file: " & outfilename & String( 30 - Len(outfilename), " " ) & " (inputfile: " & infilename & ")" 'Input File Set fsi = CreateObject("Scripting.FileSystemObject") Set inputfile = fsi.OpenTextFile(dirname & infilename, ForReading, False) 'Output File Set fso = CreateObject("Scripting.FileSystemObject") Set outputfile = fso.CreateTextFile(dirname & outfilename & ".temp", True) outputfile.writeline("") If loading = true Then outputfile.writeline("
") outputfile.writeline End If outputfile.writeline("") outputfile.writeline("") navfilename = Replace(infilename, Mid( infilename, InStrRev(infilename, ".") ), "." & extension & ".nav" ) If standardnavmenu = true Then If extension = "html" Then outputfile.writeline("display_menunav('Language' , rootprefix + 'index.html');") outputfile.writeline("display_menunav('Main Page', rootprefix + rootdirectory + 'fotoexpo.html');") ElseIf extension = "php" Then outputfile.writeline("display_menunav('Language' , $rootprefix . 'index.html');") outputfile.writeline("display_menunav('Main Page', $rootprefix . $rootdirectory . 'fotoexpo.php&language=' . $language);") End If End If If GetFileExist(dirname & navfilename) = true Then wscript.echo "include Navigation file: " & navfilename outputfile.writeline("") End If If lastnavmenuitem <> "" Then If extension = "html" Then outputfile.writeline("display_menunav('" & lastnavmenuitem & "', '');") ElseIf extension = "php" Then outputfile.writeline("display_menunav('" & lastnavmenuitem & "', '');") End If End If outputfile.writeline outputfile.writeline("") outputfile.writeline("") If extension = "html" Then outputfile.writeline("//-->") outputfile.writeline ElseIf extension = "php" Then outputfile.writeline("?>") outputfile.writeline End If outputfile.writeline("") If extension = "html" Then outputfile.writeline outputfile.writeline("") End If outputfile.writeline outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") inputfile.close outputfile.close IncludeFileStatement dirname, outfilename & ".temp", outfilename DeleteFile dirname & outfilename & ".temp" End Function '-------------------------------------------------------------------------------- Function ReplaceforJavascript(txt) ReplaceforJavascript = Replace(txt, "'", "\'") End Function Function ReplaceforSQL(txt) ReplaceforSQL = Replace(txt, "'", "''") End Function Sub Display(outputfile, txt) txt = Replace(txt, "'", "\'") If txt <> "" Then If extension = "html" Then outputfile.writeline("document.write('" & txt & "');") ElseIf extension = "php" Then outputfile.writeline("echo '" & txt & "' . ""\n"";") 'outputfile.writeline("echo ""\n"";") End If Else outputfile.writeline End If End Sub Sub DisplayComment(outputfile, txt) If txt <> "" Then If extension = "html" Then outputfile.writeline("// " & txt) ElseIf extension = "php" Then outputfile.writeline("// " & txt) End If Else outputfile.writeline End If End Sub Sub DisplayLanguage(outputfile, txt_us, txt_nl, txt_de) txt_us = Replace(txt_us, "'", "\'") txt_nl = Replace(txt_nl, "'", "\'") txt_de = Replace(txt_de, "'", "\'") If extension = "html" Then outputfile.writeline("display_language('" & txt_us & "', '" & txt_nl & "', '" & txt_de & "')") 'outputfile.writeline("if ( language == 'us' ) { document.write('" & txt_us & "'); }") 'outputfile.writeline("if ( language == 'nl' ) { document.write('" & txt_nl & "'); }") 'outputfile.writeline("if ( language == 'de' ) { document.write('" & txt_de & "'); }") ElseIf extension = "php" Then outputfile.writeline("if ( $language == 'us' ) { echo '" & txt_us & "'; }") outputfile.writeline("if ( $language == 'nl' ) { echo '" & txt_nl & "'; }") outputfile.writeline("if ( $language == 'de' ) { echo '" & txt_de & "'; }") End If End Sub Sub DisplayScriptDelimiter(outputfile, extenstion, start) If extension = "html" Then If start = "begin" Then outputfile.writeline("") ElseIf extension = "php" Then If start = "begin" Then outputfile.writeline("<%php") If start = "end" Then outputfile.writeline("%>") End If End Sub Sub CreateCompleteSiteIndex(dirname, outfilename) Dim FSO, outputfile Dim rs, sql wscript.echo "Creating file: " & outfilename 'Output File Set fso = CreateObject("Scripting.FileSystemObject") Set outputfile = fso.CreateTextFile(dirname & outfilename, True) Set rs = CreateObject("ADODB.Recordset") sql = "select * from reports, categories, subcategories, events, countries WHERE ( rp_category = cat_categoryname ) and ( rp_subcategory = subcat_categoryname ) and ( rp_event = ev_eventname ) and ( rp_country = cn_name ) and ( rp_category <> 'Specials' ) ORDER BY rp_date DESC" If verbose Then wscript.echo "SQL: " & sql rs.open sql, conn_fotoexpo, 3, 3 wscript.echo "SQL recordcount: " & rs.recordcount rs.movefirst Do while Not rs.eof 'wscript.echo rs.Fields("rp_directory").Value & " - " & rs.Fields("rp_date").Value NewsGetInfo outputfile, rs.Fields("cat_directory").Value & "/" & rs.Fields("rp_directory").Value, true, _ "(" & BooleanString(rs.Fields("rp_date").Value > CDate("2003-04-15"), "(n=='recent')||", "") & _ "(n=='all')||" & _ "(n=='" & DatePart("yyyy", rs.Fields("rp_date").Value) & "')||" & _ BooleanString( rs.Fields("rp_subcategory").Value = "-", "(c=='" & rs.Fields("cat_index").Value & "')", _ "((c=='" & rs.Fields("cat_index").Value & "')&&(sc==''))||((c=='" & rs.Fields("cat_index").Value & "')&&(sc=='" & rs.Fields("subcat_index").Value & "'))") & _ BooleanString( rs.Fields("rp_event").Value <> "-", "||(ev=='" & rs.Fields("ev_index").Value & "')", "" ) & _ ")" rs.movenext Loop rs.close outputfile.close End Sub ' Function MakeCategoryIndex(par_directory) ' ' 'OBSOLETE!! ' 'This function creates the category indexfiles, for categories like events or vehicles ' ' Dim fs, outputfile ' Dim par_startfile ' Dim FSO, F, FD, folder ' Dim helpgetlink ' ' par_startfile = GetParameter(par_directory & "script.ini", "categoryfile", "index") ' ' Set fs = CreateObject("Scripting.FileSystemObject") ' Set outputfile = fs.CreateTextFile(par_directory & par_startfile & "." & extension & ".tmp", True) ' ' wscript.echo ' wscript.echo "Create Category Index: " & par_directory & par_startfile & "." & extension & ".tmp" ' ' Set FSO = CreateObject("Scripting.FileSystemObject") ' Set F = FSO.GetFolder(par_directory) ' Set FD = F.Subfolders ' ' outputfile.writeline("") ' 'IncludeMetaTags par_directory & par_startfile, "keywords" , outputfile ' 'IncludeMetaTags par_directory & par_startfile, "description", outputfile ' outputfile.writeline("") ' outputfile.writeline("") ' ' 'Navigation ' ' If extension = "html" Then ' ' 'language & main page ' outputfile.writeline("display_menunav('Language', '" & rootprefix & "index." & extension & "');") ' outputfile.writeline("display_menunav('Main Page', '" & rootprefix & rootdirectory & "fotoexpo." & extension & "');") ' ' 'category ' outputfile.writeline("display_menunav('" & GetParameter( par_directory & "script.ini", "category.txt.us", "?") & "', '');") ' ' ElseIf extension = "php" Then ' ' 'language & main page ' outputfile.writeline("display_menunav('Language', '" & rootprefix & "index." & extension & "');") ' outputfile.writeline("display_menunav('Main Page', '" & rootprefix & rootdirectory & "fotoexpo." & extension & "');") ' ' 'category ' outputfile.writeline("display_menunav('" & GetParameter( par_directory & "script.ini", "category.txt.us", "?") & "', '');") ' ' End If ' outputfile.writeline ' ' outputfile.writeline("") ' outputfile.writeline("") ' ' outputfile.writeline("display_maincolumn_header('" & GetParameter( par_directory & "script.ini", "category.txt.us", "?") & "');") ' ' Dim CatIndexFileArray(), CatIndexFileArrayTeller, teller, foldername ' ' CatIndexFileArrayTeller = 0 ' ReDim Preserve CatIndexFileArray(0) ' ' For each folder in FD ' CatIndexFileArrayTeller = CatIndexFileArrayTeller + 1 ' ReDim Preserve CatIndexFileArray(CatIndexFileArrayTeller) ' CatIndexFileArray(CatIndexFileArrayTeller ) = folder.name ' Next ' ' 'For each folder in FD ' For teller = CatIndexFileArrayTeller to 1 step -1 ' ' foldername = CatIndexFileArray(teller) ' ' wscript.echo "foldername: " & foldername ' ' NewsGetInfo outputfile, Mid(par_directory & foldername, InStr(par_directory & foldername, "reports/") + 8, 100), false ' ' Next ' ' outputfile.writeline("") ' outputfile.writeline("") ' outputfile.writeline("") ' ' outputfile.close ' ' IncludeFileStatement par_directory, par_startfile & "." & extension & ".tmp", par_startfile & "." & extension ' DeleteFile par_directory & par_startfile & "." & extension & ".tmp" ' ' End Function Function GetDescription(subcategory, language, translatechars, capitalweekday) Dim FSI, FSO, inputfile, outputfile Dim inputfileline, helpgetdescription, helpdate, helplocation helpgetdescription = "" If verbose Then wscript.echo "Get Descripton for " & subcategory 'Input File Set fsi = CreateObject("Scripting.FileSystemObject") Set inputfile = fsi.OpenTextFile(drive & rootprefix & rootdirectory & "database/description.db", ForReading, False) Do While inputfile.AtEndOfStream <> True inputfileline = inputfile.readline If ( InStr( inputfileline, subcategory & "." & language & "," ) = 1 ) Then helpgetdescription = Mid(inputfileline, InStr(inputfileline, ",") +1, 500) If translatechars Then helpgetdescription = Replace(helpgetdescription, "'", "\'") Do While ( InStr(helpgetdescription, " ") > 0 ) helpgetdescription = Replace(helpgetdescription, " ", " ") Loop If ( InStr(LCase(helpgetdescription), "") > 0 ) Then helpdate = Mid(helpgetdescription, InStr(helpgetdescription, "") + 6, 10) helpgetdescription = Replace(helpgetdescription, "" + helpdate + "", _ "" & GetVerboseDate( helpdate, language, capitalweekday ) & "" ) End If If ( InStr(LCase(helpgetdescription), "") > 0 ) Then helpgetdescription = ChangeLocation(helpgetdescription, language) End If Loop inputfile.close GetDescription = helpgetdescription End Function Function ChangeLocation(locationtxt, language) Dim helpchangelocation, helplocation helpchangelocation = locationtxt If ( InStr(LCase(locationtxt), "") > 0 ) Then helplocation = Mid( locationtxt, InStr(locationtxt, "") + 10, InStr(locationtxt, "") - InStr(locationtxt, "") - 10 ) If ( language = "us" ) Then helplocation = replace(helplocation, "(NL)", ", The Netherlands") If ( language = "us" ) Then helplocation = replace(helplocation, "(D)", ", Germany") If ( language = "us" ) Then helplocation = replace(helplocation, "(B)", ", Belgium") If ( language = "nl" ) Then helplocation = replace(helplocation, "(D)", ", Duitsland") If ( language = "nl" ) Then helplocation = replace(helplocation, "(B)", ", België") If ( language = "de" ) Then helplocation = replace(helplocation, "(NL)", ", Die Niederlande") If ( language = "de" ) Then helplocation = replace(helplocation, "(B)", ", Belgiën") helplocation = Replace(helplocation, "(NL)", "") helplocation = Replace(helplocation, "(D)", "") helplocation = Replace(helplocation, "(B)", "") helpchangelocation = Replace(locationtxt, "" + Mid( locationtxt, InStr(locationtxt, "") + 10, InStr(locationtxt, "") - InStr(locationtxt, "") - 10 ) + "", _ "" & helplocation & "" ) End If ChangeLocation = helpchangelocation End Function ' Function GetLink_old(subcategory) ' ' Dim FSI, FSO, inputfile, outputfile ' Dim inputfileline, helpgetlink ' ' helpgetlink = "" ' ' 'Input File ' Set fsi = CreateObject("Scripting.FileSystemObject") ' Set inputfile = fsi.OpenTextFile(drive & rootprefix & rootdirectory & "database/link.db", ForReading, False) ' ' Do While inputfile.AtEndOfStream <> True ' ' inputfileline = inputfile.readline ' ' If ( InStr( inputfileline, subcategory & "," ) = 1 ) Then ' ' helpgetlink = Mid(inputfileline, InStr(inputfileline, ",") +1, 100) ' ' End If ' ' Loop ' ' inputfile.close ' ' If helpgetlink <> "" Then wscript.echo "Get Link for " & subcategory & ": " & helpgetlink ' ' GetLink = helpgetlink ' ' End Function Function GetInfowithDefault(subcategory, field, default) Dim helpstring helpstring = GetInfo(subcategory, field) GetInfowithDefault = BooleanString(helpstring <> "", helpstring, default) End Function Function GetInfo(subcategory, field) Dim helpgetinfo helpgetinfo = "" If verbose Then wscript.echo "Get " & field & " Info for " & subcategory If field = "link" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_link") If field = "title" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_title") If field = "location" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_location") If field = "country" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_country") If field = "offline" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_offline") If field = "todo" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_todo") If field = "hot" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_hot") If field = "indexfile" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_indexfile") If field = "rootprefix_images" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_rpfix_images") If field = "rootprefix_thumbs" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_rpfix_thumbs") If field = "rootprefix_fullimages" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_rpfix_fullimages") If field = "start1stpage" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_start1stpage") If field = "pagenavonmainpage" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_pagenavonmainpage") If field = "infoonmainpageonly" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_infoonmainpageonly") If field = "policylink" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_policylink") If field = "description" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_description") If field = "description_us" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rpdesc_description_us") If field = "description_nl" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rpdesc_description_nl") If field = "description_de" Then helpgetinfo = GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rpdesc_description_de") If field = "date" Then helpgetinfo = CStr(GetInfoExtended( Mid(subcategory, InstrRev(subcategory, "/") +1, 30), "rp_date")) helpgetinfo = DatePart("yyyy", helpgetinfo) & "-" & AddZero(DatePart("m", helpgetinfo),2) & "-" & AddZero(DatePart("d", helpgetinfo),2) End If 'If helpgetinfo = "" Then ' wscript.echo "WARNING: Illegal databasefield in GetInfo" ' wscript.sleep 5000 'End If GetInfo = helpgetinfo End Function Function GetInfoExtended(subcategory, field) Dim rs, sql If verbose Then wscript.echo "Get " & field & " Info for " & subcategory Set rs = CreateObject("ADODB.Recordset") 'sql = "select * from reports, categories, countries WHERE ( rp_category = cat_categoryname ) and ( rp_country = cn_name ) and ( rp_directory = '" & subcategory & "')" 'sql = "select * from ( reports, categories, countries LEFT OUTER JOIN reports_descriptions ON ( reports.rp_directory = reports_descriptions.rpdesc_directory ) ) WHERE ( rp_category = cat_categoryname ) and ( rp_country = cn_name ) and ( rp_directory = '" & subcategory & "')" sql = "SELECT * FROM ( ( ( reports INNER JOIN categories ON ( reports.rp_category = categories.cat_categoryname ) ) INNER JOIN countries ON ( reports.rp_country = countries.cn_name) ) LEFT OUTER JOIN reports_descriptions ON ( reports.rp_directory = reports_descriptions.rpdesc_directory ) ) WHERE ( reports.rp_directory = '" & subcategory & "')" If verbose Then wscript.echo "SQL: " & sql rs.open sql, conn_fotoexpo, 3, 3 If verbose Then wscript.echo "SQL recordcount: " & rs.recordcount rs.movefirst GetInfoExtended = rs.Fields(field).Value rs.close 'wscript.sleep(10000) End Function '-------------------------------------------------------------------------------- Function GetInfoReportItemwithDefault(subcategory, subdir, field, default) Dim helpstring helpstring = GetInfoReportItem(subcategory, subdir, field) GetInfoReportItemwithDefault = BooleanString(helpstring <> "", helpstring, default) End Function Function GetInfoReportItem(subcategory, subdir, field) Dim helpgetinfo, helpsubdir 'helpgetinfo = "" If verbose Then wscript.echo "Get " & field & " Info for " & subcategory helpsubdir = Left(subdir, Len(subdir) -1) If field = "columns" Then helpgetinfo = GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rpdir_columns") If field = "nothumbs" Then helpgetinfo = GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rpdir_nothumbs") If field = "hiddentitle" Then helpgetinfo = GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rpdir_hiddentitle") If field = "subtitle_us" Then helpgetinfo = GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rpdir_subtitle_us") If field = "subtitle_nl" Then helpgetinfo = GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rpdir_subtitle_nl") If field = "subtitle_de" Then helpgetinfo = GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rpdir_subtitle_de") If field = "text_align" Then helpgetinfo = GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rptext_align") If field = "text_valign" Then helpgetinfo = GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rptext_valign") If field = "text_color" Then helpgetinfo = GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rptext_color") If field = "text_us" Then helpgetinfo = GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rptext_text_us") If field = "text_nl" Then helpgetinfo = GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rptext_text_nl") If field = "text_de" Then helpgetinfo = GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rptext_text_de") If ( field = "thumbs" ) and ( GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rpdir_nothumbs") = true ) Then helpgetinfo = false If ( field = "thumbs" ) and ( GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rpdir_nothumbs") = false ) Then helpgetinfo = true If field = "subtitle_ml" Then helpgetinfo = true If ( GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rpdir_subtitle_us") <> "" ) and _ ( GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rpdir_subtitle_nl") = "" ) and _ ( GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rpdir_subtitle_de") = "" ) _ Then helpgetinfo = false End If If field = "text" Then helpgetinfo = false If ( GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rptext_text_us") <> "" ) Then helpgetinfo = true End If If field = "text_ml" Then helpgetinfo = true If ( GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rptext_text_us") <> "" ) and _ ( GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rptext_text_nl") = "" ) and _ ( GetInfoReportItemExtended( subcategory, Mid(helpsubdir, InstrRev(helpsubdir, "/") +1, 30), "rptext_text_de") = "" ) _ Then helpgetinfo = false End If GetInfoReportItem = helpgetinfo End Function Function GetInfoReportItemExtended(subcategory, subdir, field) Dim rs, sql If subdir = "images" Then subdir = "" If verbose Then wscript.echo "Get " & field & " Info for " & subcategory & " (subdir = " & subdir & ")" Set rs = CreateObject("ADODB.Recordset") 'sql = "select * from reports_subitems WHERE ( rpdir_directory = '" & subcategory & "' ) and ( rpdir_subdirectory = '" & subdir & "')" 'sql = "select * from reports_subitems WHERE ( ( rpdir_directory = '" & subcategory & "' ) AND ( rpdir_subdirectory = '" & subdir & "') )" sql = "select * from ( reports_subitems LEFT OUTER JOIN reports_text ON ( reports_subitems.rpdir_directory = reports_text.rptext_directory ) AND ( reports_subitems.rpdir_subdirectory = reports_text.rptext_subdirectory ) ) WHERE ( reports_subitems.rpdir_directory = '" & subcategory & "' ) and ( reports_subitems.rpdir_subdirectory = '" & subdir & "')" If verbose Then wscript.echo "SQL: " & sql rs.open sql, conn_fotoexpo, 3, 3 If verbose Then wscript.echo "SQL recordcount: " & rs.recordcount If rs.recordcount > 0 Then rs.movefirst If IsNull(rs.Fields(field).Value) Then GetInfoReportItemExtended = "" If verbose Then wscript.echo "Value for " & field & " IS NULL!" Else GetInfoReportItemExtended = rs.Fields(field).Value End If Else GetInfoReportItemExtended = "" End If rs.close End Function '-------------------------------------------------------------------------------- Function CombineIndex(par_StartDirectory, par_OutputDirectory, par_OutputFile) wscript.echo "[CombineIndex] Create file:" & par_StartDirectory & par_OutputFile Dim fs, outputfile, pagename Set fs = CreateObject("Scripting.FileSystemObject") Set outputfile = fs.CreateTextFile(par_OutputDirectory & par_OutputFile & ".inc", True) outputfile.writeline("") outputfile.writeline("") If extension = "html" Then outputfile.writeline("picture = querystring(window.location.search, 'picture', '');") outputfile.writeline("page = querystring(window.location.search, 'page', " & BooleanString(GetInfowithDefault(report_databasekey, "start1stpage", false) = false, "''", "'01'") & ");") ElseIf extension = "php" Then outputfile.writeline("$picture = strtolower($_GET[""picture""]);") outputfile.writeline("$page = strtolower($_GET[""page""]);") End If outputfile.writeline Dim FSO, F, FC, file Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_Startdirectory) Set FC = F.files For each file in FC If ( LCase(Right(file.name,4)) = ".inc" ) and _ ( LCase(Right(file.name,8)) <> "_nav.inc" ) and _ ( LCase(Right(file.name,9)) <> "_pics.inc" ) and _ ( file.name <> "description.inc" ) and _ ( Left(file.name, Len(par_OutputFile)) <> par_OutputFile ) Then wscript.echo "including Page: " & file.name DisplayComment outputfile, "" DisplayComment outputfile, "************************************************************" DisplayComment outputfile, " Page: " & file.name DisplayComment outputfile, "************************************************************" DisplayComment outputfile, "" pagename = Replace( Left(file.name, Len(file.name) - Len(".inc")) , "page", "" ) If file.name = "_mainindex.inc" Then pagename = "" If extension = "html" Then outputfile.writeline("if ( ( page == '" & pagename & "' ) && ( picture == '' ) ) {") ElseIf extension = "php" Then outputfile.writeline("if ( $page == '" & pagename & "' ) & ( $picture == '' ) {") End If outputfile.writeline outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") If extension = "html" Then outputfile.writeline("}") ElseIf extension = "php" Then outputfile.writeline("}") End If 'outputfile.writeline If GetFileExist(par_StartDirectory & Replace(file.name, ".inc", "_pics.inc")) Then Displaycomment outputfile, "" Displaycomment outputfile, "************************************************************" Displaycomment outputfile, " Pictures of " & file.name Displaycomment outputfile, "************************************************************" Displaycomment outputfile, "" outputfile.writeline("") outputfile.writeline End If End If Next outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") outputfile.close IncludeFileStatement par_OutputDirectory, par_OutputFile & ".inc", par_Outputfile & "." & extension 'Delete INC files For each file in FC If ( LCase(Right(file.name,4)) = ".inc" ) and _ ( file.name <> "description.inc" ) Then DeleteFile(par_StartDirectory & file.name) End If Next End Function Function MakeIndex(par_StartDirectory, par_MainIndex, par_OutputDirectory, par_OutputFile) 'Thus function creates a complete subcategory, like FFWD Dance Parade 'This function is called with parameter par_MainIndex = true. 'The functions recursively calls itself via called function MakeIndex_Sub1 with parameter par_MainIndex = false, 'when linkfile <> "" in INIFILE or foldername = PAGE* 'par_StartDirectory = directory to start parsing 'par_MainIndex = Boolean (true/false) 'par_OutputDirectory & par_Outputfile = path to file to create (without extension) Dim FileArray(), FileArrayTeller, pagename FileArrayTeller = 0 ReDim Preserve FileArray(3,0) Dim startimagedirectory Dim fs, outputfile, fs1, outputfilenav, helpgetlink, helpstartdirectoryname Set fs = CreateObject("Scripting.FileSystemObject") Set outputfile = fs.CreateTextFile(par_OutputDirectory & par_OutputFile & ".inc", True) wscript.echo "[MakeIndex] Create file: " & par_OutputDirectory & par_OutputFile & ".inc" Set fs1 = CreateObject("Scripting.FileSystemObject") Set outputfilenav = fs.CreateTextFile(par_OutputDirectory & par_OutputFile & "_nav.inc", True) If par_Outputfile = "_mainindex" Then pagename = "" Else pagename = par_OutputFile End If If GetInfowithDefault(report_databasekey, "rootprefix_thumbs", false) = false Then startimagedirectory = par_startdirectory & imagedirectory Else startimagedirectory = Replace(par_startdirectory, drive & rootprefix, altwebspacedir) & imagedirectory End If If extension = "html" Then 'language & main page outputfilenav.writeline("display_menunav('Language', '" & rootprefix & "index." & extension & "');") outputfilenav.writeline("display_menunav('Main Page', '" & rootprefix & rootdirectory & "fotoexpo." & extension & "');") 'category outputfilenav.writeline("display_menunav('" & GetParameter( GetDirectoryPart(globalstartdirectory, 2, true ) & "script.ini", "category.txt.us", "?") & "', '../" & _ GetParameter( GetDirectoryPart(globalstartdirectory, 2, true ) & "script.ini", "categoryfile", "index") & "." & extension & "');") If par_MainIndex = true Then 'subcategory 'outputfilenav.writeline("display_menunav('" & GetParameter( globalstartdirectory & "script.ini", "navigation", "?") & "', '');") outputfilenav.writeline("display_menunav('" & ReplaceForJavascript(GetInfowithDefault(report_databasekey, "title", "?")) & "', '');") Else 'subcategory outputfilenav.writeline("display_menunav('" & GetParameter( GetDirectoryPart(par_startdirectory, 3, true ) & "script.ini", "navigation", "?") & "', '" & _ GetParameter( GetDirectoryPart(par_startdirectory, 3, true ) & "script.ini", "startfile", "index") & "." & extension & "');") 'sub-subcategory outputfilenav.writeline("display_menunav('" & GetParameter( par_startdirectory & "script.ini", "navigation", "?") & "', '');") End If ElseIf extension = "php" Then 'language & main page outputfilenav.writeline("display_menunav('Language', '" & rootprefix & "index." & extension & "');") outputfilenav.writeline("display_menunav('Main Page', '" & rootprefix & rootdirectory & "fotoexpo." & extension & "');") 'category outputfilenav.writeline("display_menunav('" & GetParameter( GetDirectoryPart(globalstartdirectory, 2, true ) & "script.ini", "category.txt.us", "?") & "', '../" & _ GetParameter( GetDirectoryPart(globalstartdirectory, 2, true ) & "script.ini", "categoryfile", "index") & "." & extension & "');") If par_MainIndex = true Then 'subcategory outputfilenav.writeline("display_menunav('" & GetParameter( globalstartdirectory & "script.ini", "navigation", "?") & "', '');") Else 'subcategory outputfilenav.writeline("display_menunav('" & GetParameter( GetDirectoryPart(par_startdirectory, 3, true ) & "script.ini", "navigation", "?") & "', '" & _ GetParameter( GetDirectoryPart(par_startdirectory, 3, true ) & "script.ini", "startfile", "index") & "." & extension & "');") 'REPLACE outputfilenav.writeline("display_menunav('Images ', '');") End If End If outputfilenav.writeline If GetInfowithDefault(report_databasekey, "rootprefix_thumbs", false) = true Then outputfile.writeline("if (rootprefix_thumbs_disable != 'on') picture_thumbprefix = rootprefix_thumbs + '" & Replace(globalstartdirectory, drive & rootprefix & rootdirectory & reportdirectory, "") & "';") 'outputfile.writeline("picture_thumbprefix = rootprefix_thumbs + '" & Replace(globalstartdirectory, drive & rootprefix & rootdirectory & reportdirectory, "") & "';") 'outputfile.writeline("if (rootprefix_thumbs_disable == 'on') picture_thumbprefix = '';") outputfile.writeline End If If GetInfowithDefault(report_databasekey, "rootprefix_images", false) = true Then outputfile.writeline("picture_imageprefix = rootprefix_images + '" & Replace(globalstartdirectory, drive & rootprefix & rootdirectory & reportdirectory, "") & "';") outputfile.writeline("if (rootprefix_images_disable == 'on') picture_imageprefix = '';") outputfile.writeline End If If ( par_MainIndex = true ) or _ ( ( GetInfowithDefault(report_databasekey, "infoonmainpageonly", false) = false ) and ( LCase(Left(par_OutputFile,4)) = "page" ) ) Then helpstartdirectoryname = par_StartDirectory If ( LCase(Left(par_OutputFile,4)) = "page" ) Then helpstartdirectoryname = Replace(helpstartdirectoryname, imagedirectory & par_Outputfile & "/", "") 'wscript.echo "HELPSTARTDIRECTORYNAME ** = " & helpstartdirectoryname helpstartdirectoryname = Left( helpstartdirectoryname, Len(helpstartdirectoryname) -1 ) helpstartdirectoryname = Mid ( helpstartdirectoryname , InStrRev(helpstartdirectoryname, "/") + 1, 40) 'wscript.echo "HELPSTARTDIRECTORYNAME = " & helpstartdirectoryname Display outputfile, "
" DisplayLanguage outputfile, GetDescription(helpstartdirectoryname, "us", false, false), _ GetDescription(helpstartdirectoryname, "nl", false, false), _ GetDescription(helpstartdirectoryname, "de", false, false) Display outputfile, "

" Display outputfile, "
" Display outputfile, "" 'Extra Description If ( GetInfo(report_databasekey, "description") = true ) Then wscript.echo "[MakeIndex] Include file: Description" 'CreateAllScriptLanguageHTML outputfile, par_Startdirectory, "description.inc" Dim desc_us, desc_nl, desc_de desc_us = GetInfowithDefault(report_databasekey, "description_us", "") desc_nl = GetInfowithDefault(report_databasekey, "description_nl", "") desc_de = GetInfowithDefault(report_databasekey, "description_de", "") If ( desc_us <> "" ) and ( desc_nl = "" ) and ( desc_de = "" ) Then Display outputfile, desc_us Else If extension = "html" Then If ( desc_us <> "" ) Then outputfile.writeline("if ( language == 'us' ) {") Display outputfile, Replace(desc_us, vbCrLf, "") outputfile.writeline("}") End If If ( desc_nl <> "" ) Then outputfile.writeline("if ( language == 'nl' ) {") Display outputfile, Replace(desc_nl, vbCrLf, "") outputfile.writeline("}") End If If ( desc_de <> "" ) Then outputfile.writeline("if ( language == 'de' ) {") Display outputfile, Replace(desc_de, vbCrLf, "") outputfile.writeline("}") End If End If End If Display outputfile, "

" End If 'Link helpgetlink = GetInfo(helpstartdirectoryname, "link") If helpgetlink <> "" Then Display outputfile, "" End If If not( ( par_MainIndex = true ) and ( GetInfowithDefault(report_databasekey, "pagenavonmainpage", false) = false ) ) Then Dim HelpCountSubdirectories If ( LCase(Left(par_OutputFile,4)) <> "page" ) Then HelpCountSubdirectories = CountSubdirectories(startimagedirectory, "page") Else HelpCountSubdirectories = CountSubdirectories( Replace(par_startdirectory, par_Outputfile & "/", ""), "page") End If If HelpCountSubdirectories > 0 Then 'Display outputfile, "Pagina's: " & HelpCountSubdirectories If extension = "html" Then outputfile.writeline("display_subpagenav(" & HelpCountSubdirectories & ",'" & subcategoryfile & "');") End If End If End If outputfile.writeline If extension = "html" Then 'If ( GetInfo(report_databasekey, "policylink") = true ) Then outputfile.writeline("display_policylink();") 'If ( InStr(par_startdirectory, "specials") = 0 ) Then outputfile.writeline("display_policylink();") End If outputfile.writeline End If If verbose Then wscript.echo "INFO: " & GetInfowithDefault(report_databasekey, "rootprefix_thumbs", false) If ( par_MainIndex = true ) Then MakeIndex_Sub1 outputfile, BooleanString( not GetInfowithDefault(report_databasekey, "rootprefix_thumbs", false), par_startdirectory, Replace(par_startdirectory, drive & rootprefix, altwebspacedir)) & imagedirectory, par_outputfile, true, filearray, filearrayteller Else MakeIndex_Sub1 outputfile, BooleanString( not GetInfowithDefault(report_databasekey, "rootprefix_thumbs", false), par_startdirectory, Replace(par_startdirectory, drive & rootprefix, altwebspacedir)), par_outputfile, true, filearray, filearrayteller End If outputfile.writeline outputfile.close wscript.echo wscript.echo "------------------------------------------------------------" wscript.echo "Create HTML files" wscript.echo "------------------------------------------------------------" wscript.echo UBound(FileArray,2) & " HTML files to be parsed:" Dim teller For teller = 1 to UBound(FileArray,2) wscript.echo FileArray(1,teller) & FileArray(2,teller) Next wscript.echo If ( UBound(FileArray,2) > 0 ) Then MakePictureHTML par_OutputDirectory, par_OutputFile, filearray, par_startdirectory End Function Sub MakeIndex_Sub1(outputfile, par_directory, par_outputfile, firstdir, filearray, filearrayteller) 'This function is used by the function MakeIndex 'This function normaly makes an index page with thumbnails for every file in directory par_directory 'For every subdirectory the function calls itself recursively. 'This function calls MakeIndex when a NEW index (page <> '') is to be made Dim FSO, F, FD, FC, file, folder Dim Columns, filename, linkname, SubTitle, Columnteller, StartFileArrayTeller, pagename Dim Thumbteller Dim newrow, closerow Dim var_columns Dim var_hiddentitle, var_subtitle_ml, var_subtitle_us, var_subtitle_nl, var_subtitle_de Dim var_text, var_text_ml, var_text_align, var_text_valign, var_text_color, var_text_us, var_text_nl, var_text_de Dim var_nothumbs, var_thumbs var_columns = GetInfoReportItem(report_databasekey, par_directory, "columns") var_thumbs = GetInfoReportItem(report_databasekey, par_directory, "thumbs") var_nothumbs = GetInfoReportItem(report_databasekey, par_directory, "nothumbs") var_hiddentitle = GetInfoReportItem(report_databasekey, par_directory, "hiddentitle") var_subtitle_ml = GetInfoReportItem(report_databasekey, par_directory, "subtitle_ml") var_subtitle_us = GetInfoReportItem(report_databasekey, par_directory, "subtitle_us") var_subtitle_nl = GetInfoReportItem(report_databasekey, par_directory, "subtitle_nl") var_subtitle_de = GetInfoReportItem(report_databasekey, par_directory, "subtitle_de") var_text = GetInfoReportItem(report_databasekey, par_directory, "text") var_text_ml = GetInfoReportItem(report_databasekey, par_directory, "text_ml") var_text_align = GetInfoReportItem(report_databasekey, par_directory, "text_align") var_text_valign = GetInfoReportItem(report_databasekey, par_directory, "text_valign") var_text_color = GetInfoReportItem(report_databasekey, par_directory, "text_color") var_text_us = GetInfoReportItem(report_databasekey, par_directory, "text_us") var_text_nl = GetInfoReportItem(report_databasekey, par_directory, "text_nl") var_text_de = GetInfoReportItem(report_databasekey, par_directory, "text_de") If par_Outputfile = "_mainindex" Then pagename = "" Else 'Create 01.* files instead of page01.* pagename = Replace( par_OutputFile, "page", "" ) End If StartFileArrayTeller = FileArrayTeller columnteller = 0 columns = var_columns wscript.echo "[MakeIndex_Sub1] " & par_directory Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FD = F.Subfolders Set FC = F.files If FC.count > 0 Then '***** SubTitle = var_subtitle_us If ( SubTitle = "" ) and ( firstdir = true ) Then Display outputfile, "


" If ( SubTitle <> "" ) and ( var_hiddentitle = false ) Then Display outputfile, "

" Display outputfile, "" Display outputfile,"
" If ( var_subtitle_ml = false ) Then wscript.echo "Standard (US) Subtitle: " & Subtitle Display outputfile, SubTitle Else wscript.echo "Multilangual Subtitle (US: " & SubTitle & ")" DisplayLanguage outputfile, var_subtitle_us, _ var_subtitle_nl, _ var_subtitle_de End If If ( var_nothumbs = false ) and ( extension = "html" ) Then outputfile.writeline("document.write('  ' + translate('>enlarge'));") If ( var_nothumbs = true ) and ( extension = "html" ) Then outputfile.writeline("document.write('  ' + translate('>onlythumb'));") Display outputfile, "

" Display outputfile, "" End If 'Rename For each file in FC If file.name <> LCase(file.name) Then wscript.echo "Rename " & file.name file.name = "_" & LCase(file.name) file.name = Mid( file.name, 2, 40 ) End If If ( InStr(LCase(file.name), "img_") > 0 ) Then wscript.echo "Rename " & file.name file.name = Replace(file.name, "img_", "img") End If Next 'Text If ( var_text = true ) and _ ( var_text_valign = "top" ) Then WriteText par_directory, outputfile End If If ( var_thumbs = true ) Then 'wscript.echo "DEBUG: " & par_directory 'wscript.sleep 5000 'Thumbs = on wscript.echo "Create Thumb Index: " & par_directory If FC.count > 0 Then If extension = "html" Then outputfile.writeline("display_report_thumbnail_table_start();") ElseIf extension = "php" Then End If For each file in FC If ( Ucase(Right(file.name,4)) = ".JPG" ) Then If ( UCase(Left(file.name,3)) = "TN_") Then columnteller = columnteller + 1 newrow = false If ( columnteller mod columns ) = 1 or ( columns = 1 ) Then newrow = true closerow = false If ( columnteller mod columns ) = 0 Then closerow = true linkname = "html/" & Mid(file.name, 8, Len(file.name)-3-4-4) 'filename = Mid(par_directory & file.name, Len(globalstartdirectory) + 1, 200) filename = Mid(par_directory & file.name, InStr(par_directory, imagedirectory), 200) If extension = "html" Then 'If GetInfowithDefault(report_databasekey, "rootprefix_thumbs", false) = false Then outputfile.writeline("display_report_thumbnail('" & subcategoryfile & "." & extension & "','" & pagename & "','" & filename & "','" & AddZero(StartFileArrayTeller + columnteller,4) & "','" & StartFileArrayTeller + columnteller & "','" & file.name & "'," & BooleanString(newrow = false, "0,", "1,") & BooleanString(closerow = false, "0", "1") & ");") 'outputfile.writeline("document.write('" & booleanstring( GetParameter(par_directory & "script.ini", "thumbfilenames", "") = "on", "
" & file.name & "", "") & "')") 'Else ' outputfile.writeline("display_report_thumbnail('" & subcategoryfile & "." & extension & "','" & pagename & "','" & Replace(globalstartdirectory, drive & rootprefix, altwebspacedir) & filename & "','" & AddZero(StartFileArrayTeller + columnteller,4) & "','" & StartFileArrayTeller + columnteller & "','" & file.name & "'," & BooleanString(newrow = false, "0,", "1,") & BooleanString(closerow = false, "0", "1") & ");") 'End If ElseIf extension = "php" Then outputfile.writeline("echo '" & booleanstring( GetParameter(par_directory & "script.ini", "thumbfilenames", "") = "on", "
" & file.name & "", "") & "';") End If 'Full image elsewhere If GetFileExist(par_directory & Replace(UCase(file.name), "TN_", "")) = false Then If verbose Then wscript.echo "Debug: Thumbnail with no Full Size Image" FileArrayTeller = FileArrayTeller + 1 ReDim Preserve FileArray(3, FileArrayTeller) FileArray(1, FileArrayTeller ) = Mid(par_directory, InStr(par_directory, imagedirectory), 200) FileArray(2, FileArrayTeller ) = file.name FileArray(3, FileArrayTeller ) = "" End If Else FileArrayTeller = FileArrayTeller + 1 ReDim Preserve FileArray(3, FileArrayTeller) FileArray(1, FileArrayTeller ) = Mid(par_directory, InStr(par_directory, imagedirectory), 200) FileArray(2, FileArrayTeller ) = file.name Dim ExifFilename, ExifDirectory, ExifInfo ExifDirectory = Replace( Left( par_directory, InStrRev( Left(par_directory, Len(par_directory) -1), "/" ) ) ,imagedirectory, "") 'wscript.echo "ExifDirectory: " & ExifDirectory If ( CheckArgument("/noexif") = false ) and ( GetFileExist(ExifDirectory & "exif.txt") = true ) Then 'TODO!! ExifFilename = Replace( Mid( par_directory & file.name, Len(globalstartdirectory) + 1, 200) ,"/", "\") ExifInfo = GetExifParameter(ExifDirectory & "exif.txt", ExifFilename, "Focal length") & " - " & _ GetExifParameter(ExifDirectory & "exif.txt", ExifFilename, "Exposure time") & " - " & _ GetExifParameter(ExifDirectory & "exif.txt", ExifFilename, "Aperture") & " - " & _ GetExifParameter(ExifDirectory & "exif.txt", ExifFilename, "Flash used") 'GetExifParameter(ExifDirectory & "exif.txt", ExifFilename, "ISO equiv.") & " - " & _ 'FileArray(3, FileArrayTeller ) = BooleanString( Left(ExifInfo,7) <> "unknown", ExifInfo, "" ) FileArray(3, FileArrayTeller ) = ExifInfo Else FileArray(3, FileArrayTeller ) = "" End If End If 'TN_ End If 'JPG Next If ( columnteller mod columns ) <> 0 Then Display outputfile, "" If extension = "html" Then outputfile.writeline("display_report_thumbnail_table_end();") ElseIf extension = "php" Then End If Display outputfile, "" End If Else 'Thumbs=off columnteller = 0 thumbteller = 0 'columns = GetParameter(par_directory & "script.ini", "columns", "2") wscript.echo "GET COLUMNS!" columns = var_columns wscript.echo "report_databasekey: " & report_databasekey wscript.echo "par_directory: " & par_directory wscript.echo "Columns: " & columns wscript.sleep(5000) wscript.echo "Create Thumbless Index: " & par_directory Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FD = F.Subfolders Set FC = F.files If extension = "html" Then outputfile.writeline("display_report_images_table_start();") ElseIf extension = "php" Then End If For each file in FC If ( Ucase(Right(file.name,4)) = ".JPG" ) Then columnteller = columnteller + 1 thumbteller = thumbteller + 1 If verbose Then wscript.echo "JPG found" newrow = false If ( columnteller mod columns ) = 1 or ( columns = 1 ) Then newrow = true closerow = false If ( columnteller mod columns ) = 0 Then closerow = true 'filename = Mid(par_directory, InStr(par_directory, categorydirectory), 200) & file.name filename = Mid(par_directory, InStr(par_directory, imagedirectory), 200) & file.name 'filename = Mid(par_directory, Len(globalstartdirectory) + 1, 200) & file.name 'Display outputfile, "" & BooleanString( GetParameter(par_directory & "script.ini", "thumbfilenames", "") = "on", "
" & file.name & "", "") & "") 'Display outputfile, "" & BooleanString( GetParameter(par_directory & "script.ini", "thumbfilenames", "") = "on", "
" & file.name & "", "") & "" If extension ="html" Then outputfile.writeline("display_report_image('" & filename & "','" & thumbteller & "','" & file.name & "'," & BooleanString(newrow = false, "0,", "1,") & BooleanString(closerow = false, "0", "1") & ");") ElseIf extension ="php" Then End If End If Next If extension = "html" Then outputfile.writeline("display_report_images_table_end();") ElseIf extension = "php" Then End If Display outputfile, "" End If 'Text If ( var_text = true ) and _ ( var_text_valign = "bottom" ) Then WriteText par_directory, outputfile End If End If '***** FC > 0 wscript.echo "[MakeIndex_Sub1] Start Parsing Subfolders" For each folder in FD If ( InStr(LCase(folder.name), "recycler") = 0 ) Then 'wscript.echo 'wscript.echo "Entering Folder: " & par_directory & folder.name & "/" If ( LCase(Left(folder.name,4)) = "page" ) Then wscript.echo "RECURSIVE MAKEINDEX!! for directory " & folder.name MakeIndex par_directory & folder.name & "/", false, globalstartdirectory, folder.name Else If GetParameter(par_directory & folder.name & "/script.ini", "page", "") = "" Then MakeIndex_Sub1 outputfile, par_directory & folder.name & "/", par_outputfile, false, filearray, filearrayteller Else 'Page <> "" If GetParameter(par_directory & folder.name & "/script.ini", "link-filename", "") = "on" Then 'Index contains link to HTML bestand SubTitle = var_subtitle_us If ( SubTitle <> "" ) and ( var_hiddentitle = false ) Then Display outputfile, "

" Display outputfile, "" Display outputfile,"
" If ( var_subtitle_ml = false ) Then wscript.echo "Standard (US) Subtitle: " & Subtitle Display outputfile, SubTitle Else wscript.echo "Multilangual Subtitle (US: " & SubTitle & ")" DisplayLanguage outputfile, var_subtitle_us, _ var_subtitle_nl, _ var_subtitle_de End If Display outputfile, "

" Display outputfile, "" End If 'Index contains link to HTML bestand Display outputfile, "" End If 'link-filename = on wscript.echo "RECURSIVE MAKEINDEX!!" MakeIndex par_directory & folder.name & "/", false, globalstartdirectory, GetParameter(par_directory & folder.name & "/script.ini", "page", "") End If 'page="" End If 'folder.name = page End If 'recycler Next End Sub Sub WriteText(par_directory, outputfile) If verbose = true Then wscript.echo "[WriteText] file: outputfile" Display outputfile, "

" Display outputfile, "" Display outputfile, " " Display outputfile, "
" Display outputfile, "" If ( GetInfoReportItem(report_databasekey, par_directory, "text_ml") = false ) Then Display outputfile, GetInfoReportItem(report_databasekey, par_directory, "text_us") Else DisplayLanguage outputfile, GetInfoReportItem(report_databasekey, par_directory, "text_us"), _ GetInfoReportItem(report_databasekey, par_directory, "text_nl"), _ GetInfoReportItem(report_databasekey, par_directory, "text_de") End If 'If ( GetParameter(par_directory & "script.ini", "text-link", "") <> "" ) Then ' ' Display outputfile, "" & GetParameter(par_directory & "script.ini", "text-link", "") & "" ' 'End If Display outputfile, "" Display outputfile, "

" Display outputfile, "" End Sub ' Sub IncludeMetaTags(filename, meta, par_outputfile) ' ' If GetFileExist(filename & "." & meta) = true Then ' ' wscript.echo "Generate METATAG " & meta ' ' par_outputfile.write(" "" Then outputfile.writeline("picture_exif[" & teller & "] = '" & FileArray(3,teller) & "';") Next 'If FileArray(3,1) <> "" Then outputfile.writeline ElseIf extension = "php" Then outputfile.writeline("if ( $page == '" & pagename & "' ) & ( $picture != '' )") outputfile.writeline("{") outputfile.writeline outputfile.writeline("// Define Variables") outputfile.writeline outputfile.writeline("$picture_fileprefix = '" & GetParameter( globalstartdirectory & "script.ini", "fullimagelinkprefix", "") & "';") outputfile.writeline outputfile.writeline("$picture_number = (int) $picture;") outputfile.writeline("$picture_maxnumber = " & UBound(FileArray,2) & ";") outputfile.writeline For teller = 1 to UBound(FileArray,2) outputfile.writeline("$picture_file[" & teller & "] = '" & FileArray(1,teller) & FileArray(2,teller) & "';") Next outputfile.writeline For teller = 1 to UBound(FileArray,2) If FileArray(3,teller) <> "" Then outputfile.writeline("picture_exif[" & teller & "] = '" & FileArray(3,teller) & "';") Next If FileArray(3,1) <> "" Then outputfile.writeline End If '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' -- Site Navigation Table -- outputfile.writeline("// Site Navigation Table Start") outputfile.writeline outputfile.writeline("") If extension = "html" Then 'language & main page outputfile.writeline("display_menunav('Language', '" & rootprefix & "index." & extension & "');") outputfile.writeline("display_menunav('Main Page', '" & rootprefix & rootdirectory & "fotoexpo." & extension & "');") 'category outputfile.writeline("display_menunav('" & GetParameter( GetDirectoryPart(globalstartdirectory, 2, true ) & "script.ini", "category.txt.us", "?") & "', '../" & _ GetParameter( GetDirectoryPart(globalstartdirectory, 2, true ) & "script.ini", "categoryfile", "index") & "." & extension & "');") 'subcategory 'outputfile.writeline("display_menunav('" & GetParameter( globalstartdirectory & "script.ini", "navigation", "?") & "', '" & _ ' GetParameter( globalstartdirectory & "script.ini", "startfile", "index") & "." & extension & "');") outputfile.writeline("display_menunav('" & GetInfowithDefault(report_databasekey, "title", "?") & "', '" & _ GetInfowithDefault(report_databasekey, "indexfile", "index") & "." & extension & "');") 'page If pagename <> "" Then outputfile.writeline("display_menunav('" & GetParameter( par_startdirectory & "script.ini", "navigation", "?") & "', '" & _ GetParameter( par_startdirectory & "script.ini", "startfile", "index") & "." & extension & "?page=" & pagename & "');") End If 'Image outputfile.writeline("display_menunav(translate('Image') + ' ' + picture_number + '/' + picture_maxnumber, '');") ElseIf extension = "php" Then 'language & main page outputfile.writeline("display_menunav('Language', '" & rootprefix & "index." & extension & "');") outputfile.writeline("display_menunav('Main Page', '" & rootprefix & rootdirectory & "fotoexpo." & extension & "');") 'category outputfile.writeline("display_menunav('" & GetParameter( GetDirectoryPart(globalstartdirectory, 2, true ) & "script.ini", "category.txt.us", "?") & "', '" & _ GetParameter( GetDirectoryPart(globalstartdirectory, 2, true ) & "script.ini", "categoryfile", "index") & "." & extension & "');") 'subcategory outputfile.writeline("display_menunav('" & GetParameter( globalstartdirectory & "script.ini", "navigation", "?") & "', '" & _ GetParameter( globalstartdirectory & "script.ini", "startfile", "index") & "." & extension & "');") 'Image outputfile.writeline("display_menunav('Image ' . $picture_number . '/' . $picture_maxnumber, '');") End If outputfile.writeline '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - outputfile.writeline("") outputfile.writeline("") ' -- Image Navigation Table -- outputfile.writeline("// Picture Navigation Table Start") outputfile.writeline Display outputfile, "
" Display outputfile, "" Display outputfile, "" Display outputfile, "" If extension = "html" Then outputfile.writeline("display_imagenav(picture_number > 1, 1, 'First', '" & subcategoryfile & "', '" & pagename & "')") outputfile.writeline("display_imagenav(picture_number > 1, picture_number -1, 'Previous', '" & subcategoryfile & "', '" & pagename & "')") outputfile.writeline("display_imagenav(true, 0, 'Index', '" & subcategoryfile & "', '" & pagename & "')") outputfile.writeline("display_imagenav(picture_number < picture_maxnumber, picture_number +1, 'Next', '" & subcategoryfile & "', '" & pagename & "')") outputfile.writeline("display_imagenav(picture_number < picture_maxnumber, picture_maxnumber, 'Last', '" & subcategoryfile & "', '" & pagename & "')") ElseIf extension = "php" Then outputfile.writeline("display_imagenav($picture_number > 1, 1, ""First"");") outputfile.writeline("display_imagenav($picture_number > 1, $picture_number -1, ""Previous"");") outputfile.writeline("display_imagenav(true, 0, ""Index"");") outputfile.writeline("display_imagenav($picture_number < $picture_maxnumber, $picture_number +1, ""Next"");") outputfile.writeline("display_imagenav($picture_number < $picture_maxnumber, $picture_maxnumber, ""Last"");") End If outputfile.writeline Display outputfile, "" Display outputfile, "
  
" Display outputfile, "
" Display outputfile, "" '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If extension = "html" Then outputfile.writeline("// Display Picture") outputfile.writeline outputfile.writeline("if ( picture_file[picture_number] != null ) {") outputfile.writeline(" document.write('

')") outputfile.writeline(" if ( picture_exif != '' ) document.write('
' + picture_exif[picture_number] + '
')") If GetInfowithDefault(report_databasekey, "rootprefix_fullimages", false) = false Then outputfile.writeline(" document.write('



')") Else outputfile.writeline(" document.write('



')") outputfile.writeline(" if ( picture_fullimageprefix == '' ) display_language('
Sorry! Bigger image not available now
' ,'
De grotere afbeelding is helaas momenteel niet beschikbaar
', '
Die grössere Abbilding ist leider momentan nicht verfügbar
');") End If outputfile.writeline("}") outputfile.writeline("else") outputfile.writeline(" document.write('




No (valid) Image Selected



');") outputfile.writeline outputfile.writeline("}") ElseIf extension = "php" Then outputfile.writeline("// Dispay Picture") outputfile.writeline outputfile.writeline("if ( $picture_file[$picture_number] != null ) {") outputfile.writeline(" echo '

';") 'outputfile.writeline(" if ( $picture_exif != '' ) document.write('
' + picture_exif + '
')") outputfile.writeline(" echo '



';") outputfile.writeline("}") outputfile.writeline("else {") outputfile.writeline(" echo '




No (valid) Image Selected



';") outputfile.writeline("}") outputfile.writeline("}") outputfile.writeline End If outputfile.writeline '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - outputfile.close IncludeFileStatement par_OutputDirectory, par_OutputFile & "_pics.inc.tmp", par_Outputfile & "_pics.inc" DeleteFile par_OutputDirectory & par_OutputFile & "_pics.inc.tmp" End Function Sub CreateSubGroups(par_directory) wscript.echo "------------------------------------------------------------" wscript.echo " Create All for directory " & par_directory wscript.echo "------------------------------------------------------------" Dim FSO, F, FD, folder Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FD = F.Subfolders For each folder in FD CreateSubGroup(par_directory & folder.name & "/") Next End Sub Sub CreateSubGroup(par_directory) wscript.echo "------------------------------------------------------------" wscript.echo " HTML Index Generator " wscript.echo "------------------------------------------------------------" If verbose Then wscript.echo "[CreateSubGroup] input: " & par_directory drive = GetParameter(par_directory & "script.ini", "drive" , drive) rootprefix = GetParameter(par_directory & "script.ini", "rootprefix" , rootprefix) rootdirectory = GetParameter(par_directory & "script.ini", "rootdirectory" , rootdirectory) reportdirectory = GetParameter(par_directory & "script.ini", "rootdirectory" , reportdirectory) categorydirectory = GetDirectoryPart(par_directory, 2, false) subcategorydirectory = GetDirectoryPart(par_directory, 1, false) report_databasekey = replace(subcategorydirectory, "/", "") subcategoryfile = GetInfowithDefault(report_databasekey, "indexfile", "index") ' subcategoryfile = GetParameter(par_directory & "script.ini", "startfile" , "index") imagedirectory = GetParameter(par_directory & "script.ini", "imagedirectory", "images/") wscript.echo "Drive: """ & drive & """" wscript.echo "Rootprefix: " & rootprefix wscript.echo "Rootdirectory: " & rootdirectory wscript.echo "Categorydirectory: " & categorydirectory wscript.echo "Subcategorydirectory: " & subcategorydirectory wscript.echo "Subcategoryfile: " & subcategoryfile wscript.echo "imagedirectory: " & imagedirectory wscript.echo "report_databasekey: " & report_databasekey wscript.echo globalstartdirectory = drive & rootprefix & rootdirectory & reportdirectory & categorydirectory & subcategorydirectory wscript.echo wscript.echo " --> Startdirectory: " & globalstartdirectory wscript.echo "------------------------------------------------------------" '-------------------------------------------------------------------------------- If ( GetInfo(report_databasekey, "todo") = false ) and ( GetInfo(report_databasekey, "offline") = false ) Then Dim FSO, F, FD, FC, file Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(globalstartdirectory) Set FD = F.Subfolders Set FC = F.files wscript.echo "[CreateSubGroup] Create HTML Indexfile: " & globalstartdirectory & subcategoryfile & "." & extension wscript.echo MakeIndex globalstartdirectory, true, globalstartdirectory, "_mainindex" CombineIndex globalstartdirectory, globalstartdirectory, subcategoryfile Else wscript.echo "Subcategory OFFLINE" End If End Sub '-------------------------------------------------------------------------------- Function CreateDatabaseTable(table, anchor, tabletitle, outputfile, header) Dim conn, rs, sql, rs1, sql1 Dim agendayear Dim sortfield sortfield = "" oldfieldvalue = "" oldfieldvalue1 = "" agendayear = "" weeknumberboolean = false wscript.echo "Create DatabaseTable for table " & table Set conn = CreateObject("ADODB.Connection") conn.open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=n:\~******\fotoexpo\database\links.mdb" Set rs = CreateObject("ADODB.Recordset") sql = "select * from " & table If table = "agenda" Then sql = "select * from agenda, evenementen_locaties, agenda_category WHERE ( ag_location = el_id ) AND (ag_category = cat_category) AND (ag_date_start > #2003-01-01#) order by ag_date_start, ag_date_end, ag_title" agendayear = "2003" End If If table = "agenda2002" Then sql = "select * from agenda, evenementen_locaties, agenda_category WHERE ( ag_location = el_id ) AND (ag_category = cat_category) AND (ag_date_start < #2003-01-01#) order by ag_date_start, ag_date_end, ag_title" table = "agenda" agendayear = "2002" End If If table = "evenementen_locaties" Then sql = sql & " WHERE (el_hidden = false) ORDER BY el_country desc, el_omschrijving" If ( table = "evenementen_sites" ) and ( tabletitle = "Kaarten, Routes en Weerbericht" ) Then sql = "select * from evenementen_sites, evenementen_sites_category WHERE ( esa_category = cat_category ) and ( cat_index >= 10000 ) ORDER BY cat_index, esa_country DESC, esa_title" If ( table = "evenementen_sites" ) and ( tabletitle = "Beurzen Sites" ) Then sql = "select * from evenementen_sites, evenementen_sites_category WHERE ( esa_category = cat_category ) and ( esa_specific = true ) and ( cat_index < 10000 ) ORDER BY cat_index, esa_country DESC, esa_title" If ( table = "evenementen_sites" ) and ( tabletitle = "Evenementen Sites" ) Then sql = "select * from evenementen_sites, evenementen_sites_category WHERE ( esa_category = cat_category ) and ( esa_specific = false ) and ( cat_index < 10000 ) ORDER BY cat_index, esa_country DESC, esa_title" If ( table = "evenementen_plaatsen" ) and ( tabletitle = "Plaatsen" ) Then sql = "select * from evenementen_plaatsen WHERE ( esp_region = false ) ORDER BY esp_country DESC, esp_city, esp_title" If ( table = "evenementen_plaatsen" ) and ( tabletitle = "Streken" ) Then sql = "select * from evenementen_plaatsen WHERE ( esp_region = true ) ORDER BY esp_country DESC, esp_city, esp_title" wscript.echo "SQL: " & sql rs.open sql, conn, 3, 3 wscript.echo "SQL recordcount: " & rs.recordcount rs.movefirst Set rs1 = CreateObject("ADODB.Recordset") sql1 = "select * from tabelheaders WHERE (tabel='" & table & "')" rs1.open sql1, conn, 3, 3 rs1.movefirst outputfile.writeline("") outputfile.writeline outputfile.writeline("") outputfile.writeline("

") CreateTranslateLines outputfile,tabletitle If agendayear <> "" Then outputfile.writeline " " & agendayear outputfile.writeline("

") outputfile.writeline If table = "agenda" Then outputfile.writeline("
") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("
Months / Maanden / Monate
" & agendayear & "-01 " & agendayear & "-02 " & agendayear & "-03 " & agendayear & "-04
" & agendayear & "-05 " & agendayear & "-06 " & agendayear & "-07 " & agendayear & "-08
" & agendayear & "-09 " & agendayear & "-10 " & agendayear & "-11 " & agendayear & "-12

") outputfile.writeline("
") outputfile.writeline If agendayear = "2002" Then outputfile.writeline "

" If agendayear = "2003" Then outputfile.writeline "
Link to: Agenda 2002

" End If outputfile.writeline("") outputfile.writeline '***** Write TableHeader If ( Not rs1.eof ) and ( header = true ) Then outputfile.writeline("") Do While ( Not rs1.eof ) and ( header = true ) If rs1.Fields("hidden") = false Then outputfile.writeline(" ") End If rs1.MoveNext loop outputfile.writeline("") End If '***** Get Sortfield rs1.movefirst Do While ( Not rs1.eof ) and ( header = true ) If rs1.Fields("sort").Value = true Then sortfield = rs1.Fields("field").value rs1.MoveNext loop wscript.echo "sort by: " & sortfield '***** Write Tablerows Dim rowteller, rowclass rowteller = 0 Do while Not rs.eof rowteller = rowteller + 1 If ( rowteller mod 2 ) <> 0 Then rowclass = "" Else rowclass = "-alt" End If If table = "agenda" Then CreateAgendaTableRow outputfile,rs, rowclass Else '***** Write subheader If sortfield <> "" Then If ( rs.Fields(sortfield).Value <> oldfieldvalue ) Then outputfile.writeline outputfile.writeline("") outputfile.writeline End If oldfieldvalue = rs.Fields(sortfield).Value End If '***** Write Tablerow outputfile.writeline("") rs1.movefirst Do While Not rs1.eof If InStr(rs1.Fields("field").value, "url") = 0 then If rs1.Fields("hidden") = false Then outputfile.writeline(" ") End If Else 'URL 'If rs1.Fields("hidden") = false Then outputfile.writeline(" " ) If rs1.Fields("hidden") = false Then outputfile.writeline(" " ) End If rs1.MoveNext loop outputfile.writeline("") End If rs.MoveNext loop outputfile.writeline outputfile.writeline("
") If rs1.Fields("emptyheader") = false Then CreateTranslateLines outputfile, rs1.Fields("header").Value outputfile.writeline("
" & rs.Fields(sortfield).Value & "
") 'outputfile.writeline(" ") If IsNull(rs1.Fields("specialclass").Value)=true Then outputfile.writeline(" " & rs.Fields(rs1.Fields("field").value).Value & " ") Else If ( rs1.Fields("specialclass").Value = "flags" ) Then If ( rs.Fields(rs1.Fields("field").value).Value = "Nederland" ) Then outputfile.writeline("") If ( rs.Fields(rs1.Fields("field").value).Value = "België" ) Then outputfile.writeline("") If ( rs.Fields(rs1.Fields("field").value).Value = "Duitsland" ) Then outputfile.writeline("") ElseIf ( rs1.Fields("specialclass").Value = "rating" ) and ( IsNull(rs.Fields(rs1.Fields("field").value).Value) = false ) Then Dim teller For teller = 1 to rs.Fields(rs1.Fields("field").value).Value outputfile.writeline("*") Next Else outputfile.writeline(" " & rs.Fields(rs1.Fields("field").value).Value & " ") End If End If outputfile.writeline("" & "" & rs.Fields(rs1.Fields("field").value).Value & "" & "" & Booleanstring( Len(rs.Fields(rs1.Fields("field").value).Value) <= 50, rs.Fields(rs1.Fields("field").value).Value, Left( rs.Fields(rs1.Fields("field").value).Value, 50 ) & " [...]" ) & "

") outputfile.writeline rs.close rs1.close conn.close set conn = nothing End Function Function CreateTranslateLines(outputfile,txt) outputfile.writeline("") End Function Function MakeHTML(txt) MakeHTML = Replace(txt, "&", "&") End Function Function CreateAgendaTableRow(outputfile,recset, rowclass) Dim helptext '**** Write Subheader If GetItemExtended(recset.Fields("ag_date_start").Value, 2, "-") <> oldfieldvalue Then outputfile.writeline If oldfieldvalue <> "" Then outputfile.writeline("") outputfile.writeline("") outputfile.writeline("" & _ BooleanString(recset.Fields("ag_date_start").Value <> "1-1-2010", _ GetItemExtended(recset.Fields("ag_date_start").Value, 2, "-") & " - " & _ GetItemExtended(recset.Fields("ag_date_start").Value, 3, "-"), _ "Datum nog niet bekend")) If ( recset.Fields("ag_date_start").Value <> "1-1-2010" ) then outputfile.writeline("") End If outputfile.writeline("") outputfile.writeline outputfile.writeline End If oldfieldvalue = GetItemExtended(recset.Fields("ag_date_start").Value, 2, "-") 'weeknummer If DatePart("ww", recset.Fields("ag_date_start").Value, vbMonday) <> oldfieldvalue1 Then weeknumberboolean = not(weeknumberboolean) End If oldfieldvalue1 = DatePart("ww", recset.Fields("ag_date_start").Value, vbMonday) rowclass = rowclass & BooleanString(weeknumberboolean, "", "-altweek") '***** Calculate rowspanteller Dim rowspanteller rowspanteller = 1 If recset.Fields("ag_omschrijving").Value <> "" Then rowspanteller = rowspanteller + 1 If recset.Fields("ag_url").Value <> "" Then rowspanteller = rowspanteller + 1 '***** Date Start outputfile.writeline("") outputfile.writeline(" " & _ BooleanString(recset.Fields("ag_date_start").Value <> "1-1-2010", _ AddHTMLSpace(GetItemExtended(recset.Fields("ag_date_start").Value, 1, "-")) & "-" & AddHTMLSpace(GetItemExtended(recset.Fields("ag_date_start").Value, 2, "-")), "") & "" ) '***** Date End If IsNull(recset.Fields("ag_date_end").Value)=true Then outputfile.writeline(" ") Else outputfile.writeline(" " & AddHTMLSpace(GetItemExtended(recset.Fields("ag_date_end" ).Value, 1, "-")) & "-" & AddHTMLSpace(GetItemExtended(recset.Fields("ag_date_end" ).Value, 2, "-")) & "") End If '***** Event title If recset.Fields("ag_category").Value = "-" Then outputfile.writeline(" " & MakeHTML(recset.Fields("ag_title").Value) & "") Else outputfile.writeline(" ") outputfile.writeline("
" & MakeHTML(recset.Fields("ag_title").Value) & "
") outputfile.writeline("
" & MakeHTML(recset.Fields("ag_category").Value) & "
") outputfile.writeline(" ") End If '***** Location helptext = "" If recset.Fields("ag_location").Value <> "-" Then If recset.Fields("el_url_alg").Value <> "" Then helptext = helptext & "
" & recset.Fields("el_omschrijving").Value & "" Else helptext = helptext & recset.Fields("el_omschrijving").Value End If helptext = helptext & "
" & recset.Fields("el_location").Value & _ BooleanString(recset.Fields("el_country").Value = "Nederland", " (NL)","") & _ BooleanString(recset.Fields("el_country").Value = "België", " (B)" ,"") & _ BooleanString(recset.Fields("el_country").Value = "Duitsland", " (D)","") Else helptext = helptext & recset.Fields("ag_plaats").Value End If outputfile.writeline(" " & helptext & "") outputfile.writeline("") '***** Omschrijving & URL If recset.Fields("ag_omschrijving").Value <> "" Then outputfile.writeline("" & MakeHTML(recset.Fields("ag_omschrijving").Value) & "") If recset.Fields("ag_url").Value <> "" Then outputfile.writeline("site: " & recset.Fields("ag_url").value & "" ) outputfile.writeline End Function Function CreateLinksPage(linkfile) Dim fs, outputfile Set fs = CreateObject("Scripting.FileSystemObject") Set outputfile = fs.CreateTextFile(linkfile, True) outputfile.writeline("
") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("") outputfile.writeline("
Content / Inhoud / Inhalt
Evenementen Locaties
Kaarten, Routes en Weerbericht
Beurzen Sites
Evenementen Sites
Streken
Plaatsen

") outputfile.writeline("
") outputfile.writeline CreateDatabaseTable "evenementen_locaties", "el", "Evenementen locaties", outputfile, true CreateDatabaseTable "evenementen_sites", "krw", "Kaarten, Routes en Weerbericht", outputfile, true CreateDatabaseTable "evenementen_sites", "bs", "Beurzen Sites", outputfile, true CreateDatabaseTable "evenementen_sites", "es", "Evenementen Sites", outputfile, true CreateDatabaseTable "evenementen_plaatsen", "eps", "Streken", outputfile, true CreateDatabaseTable "evenementen_plaatsen", "ep", "Plaatsen", outputfile, true 'CreateDatabaseTable "fotosites", "df", "Digitale Foto Sites", outputfile, true outputfile.writeline("

") outputfile.writeline outputfile.close End Function Function CreateAgendaPage(linkfile, currentagenda) Dim fs, outputfile Set fs = CreateObject("Scripting.FileSystemObject") Set outputfile = fs.CreateTextFile(linkfile, True) If currentagenda = true Then DisplayScriptDelimiter outputfile, extension, "begin" 'Display outputfile, "

" DisplayLanguage outputfile, "This calendar is just a small list of some events in the Netherlands, Germany and Belgium. It does absolutely NOT mean that FOTOEXPO will attend these events.", _ "Deze kalender geeft een klein overzicht van enkele evenementen in Nederland, Duitsland en België. Het is absoluut NIET zo dat FOTOEXPO deze evenementen ook zal bezoeken.", _ "Den Terminkalender gibt eine kleine Übersicht von einigen Veranstaltungen in die Niederlande, Deutschland und Belgien. Es ist absolut KEINE Übersicht von Veranstaltungen die FOTOECKE auch besuchen wird." DisplayLanguage outputfile, "FOTOEXPO can NOT be held responsible for incorrect information. ALLWAYS check the site of the event or location to check if the information is correct!", _ "FOTOEXPO kan NIET verantwoordelijk worden gesteld voor incorrecte informatie. Controlleer ALTIJD de site van het evenement of de evenementenlocatie om de informatie op correctheid te beoordelen!", _ "Alle angaben sind OHNE gewahr. Kontrolliere IMMER die Webseiten von Veranstaltungen oder Messen um die Korrektheit der Daten zu überprüfen!" DisplayScriptDelimiter outputfile, extension, "end" outputfile.writeline CreateDatabaseTable "agenda", "agenda", "Event Calendar" , outputfile, true Else 'outputfile.writeline "" CreateDatabaseTable "agenda2002", "agenda", "Event Calendar" , outputfile, true End If outputfile.writeline("

") outputfile.writeline outputfile.close End Function Sub CreateLinksAndAgendaPage CreateLinksPage drive & rootprefix & rootdirectory & "links\links.inc" CreateAgendaPage drive & rootprefix & rootdirectory & "links\agenda.inc", true CreateAgendaPage drive & rootprefix & rootdirectory & "links\agenda2002.inc", false CreateFullPage drive & rootprefix & rootdirectory & "links\", "links.inc", "links." & extension, true, "Links", false CreateFullPage drive & rootprefix & rootdirectory & "links\", "agenda.inc", "agenda." & extension, true, "Agenda", true CreateFullPage drive & rootprefix & rootdirectory & "links\", "agenda2002.inc", "agenda2002." & extension, true, "Agenda 2002", true DeleteFile drive & rootprefix & rootdirectory & "links\links.inc" DeleteFile drive & rootprefix & rootdirectory & "links\agenda.inc" DeleteFile drive & rootprefix & rootdirectory & "links\agenda2002.inc" End Sub '-------------------------------------------------------------------------------- Sub CreateCategorieTableFields(par_directory) Dim FSO, F, FD, folder, dbkey Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FD = F.Subfolders wscript.echo "Checking Categorie: " & par_directory wscript.echo For each folder in FD dbkey = folder.name 'wscript.echo "Reading " & par_directory & folder.name & " [" & dbkey & "]" If GetInfo(dbkey, "offline") = false Then CreateSubCategorieTableFields par_directory & folder.name & "/", dbkey End If Next End Sub Sub CreateSubCategorieTableFields(par_directory, dbkey) Dim FSO, F, FD, folder Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory & "images/") Set FD = F.Subfolders wscript.echo "Checking SubCategorie: " & par_directory & " [" & dbkey & "]" Dim sql If FD.count = 0 Then sql = "INSERT INTO reports_subitems VALUES ('" & dbkey & "', '" & _ "" & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/script.ini", "columns", "") ) & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/script.ini", "thumbs", "") ) & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/script.ini", "hiddentitle", "") ) & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/script.ini", "subtitle", "") ) & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/script.ini", "subtitle.us", "") ) & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/script.ini", "subtitle.nl", "") ) & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/script.ini", "subtitle.de", "") ) & "')" If verbose Then wscript.echo "SQL: " & sql wscript.echo "SQL: " & sql conn_fotoexpo.execute(sql) Else For each folder in FD wscript.echo "Reading SCRIPT.INI vars: " & par_directory & "images/" & folder.name & " [" & dbkey & "]" wscript.echo "Colums: " & GetParameter(par_directory & "images/" & folder.name & "/script.ini", "columns", "") wscript.echo "Thumbs: " & GetParameter(par_directory & "images/" & folder.name & "/script.ini", "thumbs", "") wscript.echo "Hiddentitle: " & GetParameter(par_directory & "images/" & folder.name & "/script.ini", "hiddentitle", "") wscript.echo "Subtitle: " & GetParameter(par_directory & "images/" & folder.name & "/script.ini", "subtitle", "") wscript.echo "Subtitle.us:" & GetParameter(par_directory & "images/" & folder.name & "/script.ini", "subtitle.us", "") wscript.echo "Subtitle.nl:" & GetParameter(par_directory & "images/" & folder.name & "/script.ini", "subtitle.nl", "") wscript.echo "Subtitle.de:" & GetParameter(par_directory & "images/" & folder.name & "/script.ini", "subtitle.de", "") sql = "INSERT INTO reports_subitems VALUES ('" & dbkey & "', '" & _ folder.name & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/" & folder.name & "/script.ini", "columns", "") ) & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/" & folder.name & "/script.ini", "thumbs", "") ) & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/" & folder.name & "/script.ini", "hiddentitle", "") ) & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/" & folder.name & "/script.ini", "subtitle", "") ) & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/" & folder.name & "/script.ini", "subtitle.us", "") ) & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/" & folder.name & "/script.ini", "subtitle.nl", "") ) & "', '" & _ ReplaceforSQL( GetParameter(par_directory & "images/" & folder.name & "/script.ini", "subtitle.de", "") ) & "')" If verbose Then wscript.echo "SQL: " & sql wscript.echo "SQL: " & sql conn_fotoexpo.execute(sql) Next End If wscript.echo End Sub '-------------------------------------------------------------------------------- Sub CheckThumbs(par_directory) Dim FSO, F, FD, folder Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FD = F.Subfolders For each folder in FD CheckThumbsCategorie(par_directory & folder.name & "/") Next End Sub Sub CheckThumbsCategorie(par_directory) Dim FSO, F, FD, FC, file, folder, dbkey, prefix_fullimages, prefix_thumbs Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FD = F.Subfolders Set FC = F.Files wscript.echo "Checking Categorie: " & par_directory wscript.echo For each folder in FD dbkey = folder.name 'wscript.echo "dbkey: " & dbkey & "(" & par_directory & ")" prefix_thumbs = GetInfowithDefault(dbkey, "rootprefix_thumbs", false) prefix_fullimages = GetInfowithDefault(dbkey, "rootprefix_fullimages", false) 'wscript.echo 'wscript.echo "Checking " & par_directory & folder.name & " [" & dbkey & "]" & BooleanString(prefix_thumbs=true, " prefix_thumbs", "") & BooleanString(prefix_fullimages=true, " prefix_fullimages", "") For each file in FC If ( file.name <> "index.html" ) and _ ( file.name <> "carnaval.html" ) and _ ( file.name <> "script.ini" ) and _ ( file.name <> "description.inc" ) and _ ( file.name <> "thumb.jpg" ) Then wscript.echo par_directory & " Obsolete file? " & file.name End If Next If ( prefix_thumbs = false ) and ( prefix_fullimages = false ) and _ ( GetFolderExist( Replace(par_directory & folder.name, drive & rootprefix, altwebspacedir) ) = true ) Then wscript.echo "Directory not needed: " & Replace(par_directory & folder.name, drive & rootprefix, altwebspacedir) End If CheckThumbsSubCategorie par_directory & folder.name & "/", dbkey, prefix_thumbs, prefix_fullimages Next End Sub Sub CheckThumbsSubCategorie(par_directory, dbkey, prefix_thumbs, prefix_fullimages) Dim FSO, F, FC, FD, file, folder Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FC = F.files Set FD = F.Subfolders CheckThumbs_FirstError = false If verbose Then wscript.echo "[Directory] " & par_directory If verbose Then wscript.echo "Files " & FC.count If verbose Then wscript.echo "Directories " & FD.count If ( FD.count > 0 ) and ( FC.count > 0 ) and ( InStr(par_directory, "images") > 0 ) Then CheckThumbsError par_directory, "[FILES & DIRS]" End If If FD.count > 0 Then For each folder in FD CheckThumbsSubCategorie par_directory & folder.name & "/", dbkey, prefix_thumbs, prefix_fullimages Next End If If ( InStr(par_directory, "/images/") > 0 ) Then 'wscript.echo "[CT] " & par_directory If ( GetInfoReportItem(report_databasekey, par_directory, "thumbs") = true ) Then 'wscript.echo "Directory WITH thumbnails" For each file in FC If ( LCase(Right(file.name,4)) <> ".jpg" ) Then 'NO JPG File CheckThumbsError par_directory & " [WITH Thumbnails]", "[NO JPG] " & file.name Else 'JPG File If ( LCase(Left(file.name,3)) = "tn_") Then 'Thumbnail found If ( prefix_fullimages = false ) Then 'NO ALTWEBSPACE If ( GetFileExist(par_directory & Replace(LCase(file.name), "tn_", "")) = false ) _ Then CheckThumbsError par_directory & " [WITH Thumbnails]", "[No Full Size Image] " & file.name Else 'ALTWEBSPACE If ( GetFileExist(Replace(par_directory, drive & rootprefix, altwebspacedir) & Replace(LCase(file.name), "tn_", "")) = false ) _ Then CheckThumbsError par_directory & " [WITH Thumbnails]", "[No Full Size Image in ALTWEBSPACE] " & file.name End If 'If ( GetFileExist(par_directory & Replace(LCase(file.name), "tn_", "")) = false ) and _ ' ( GetFileExist(Replace(par_directory, drive & rootprefix, altwebspacedir) & Replace(LCase(file.name), "tn_", "")) = false ) _ 'Then CheckThumbsError par_directory & " [WITH Thumbnails]", "[No Full Size Image] " & file.name Else 'Full size image If ( prefix_thumbs = false ) and _ ( GetFileExist(par_directory & "tn_" + LCase(file.name)) = false ) _ Then CheckThumbsError par_directory & " [WITH Thumbnails]", "[No Thumbnail] " & file.name End If End If 'JPG Next Else 'wscript.echo "Directory WITHOUT thumbnails" ' For each file in FC ' If ( InStr(LCase(file.name), "tn_") > 0 ) Then CheckThumbsError par_directory & " [WITHOUT Thumbnails]", "[Thumbnail] " & file.name ' Next End If End If If CheckThumbs_FirstError = true Then wscript.echo End Sub Sub CheckThumbsOLD(par_directory) Dim FSO, F, FC, FD, file, folder Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FC = F.files Set FD = F.Subfolders CheckThumbs_FirstError = false If verbose Then wscript.echo "[Directory] " & par_directory If verbose Then wscript.echo "Files " & FC.count If verbose Then wscript.echo "Directories " & FD.count If FD.count > 0 Then For each folder in FD CheckThumbs(par_directory & folder.name & "/") Next ElseIf ( InStr(par_directory, "images") > 0 ) Then 'wscript.echo "[CT] " & par_directory If ( GetParameter(par_directory & "script.ini", "thumbs", "") <> "off" ) Then 'wscript.echo "Directory WITH thumbnails" For each file in FC If ( LCase(Right(file.name,4)) <> ".jpg" ) Then 'NO JPG File CheckThumbsError par_directory & " [WITH Thumbnails]", "[NO JPG] " & file.name Else 'JPG File If ( LCase(Left(file.name,3)) = "tn_") Then 'Thumbnail found If ( GetFileExist(par_directory & Replace(LCase(file.name), "tn_", "")) = false ) and _ ( GetFileExist(Replace(par_directory, drive & rootprefix, altwebspacedir) & Replace(LCase(file.name), "tn_", "")) = false ) _ Then CheckThumbsError par_directory & " [WITH Thumbnails]", "[No Full Size Image] " & file.name Else 'Full size image If GetFileExist(par_directory & "tn_" + LCase(file.name)) = false Then CheckThumbsError par_directory & " [WITH Thumbnails]", "[No Thumbnail] " & file.name End If End If 'JPG Next Else 'wscript.echo "Directory WITHOUT thumbnails" ' For each file in FC ' If ( InStr(LCase(file.name), "tn_") > 0 ) Then CheckThumbsError par_directory & " [WITHOUT Thumbnails]", "[Thumbnail] " & file.name ' Next End If End If If CheckThumbs_FirstError = true Then wscript.echo End Sub Sub CheckThumbsError(Dirname,txt) If CheckThumbs_FirstError = false Then CheckThumbs_FirstError = true wscript.echo dirname End If wscript.echo txt End Sub Sub CheckThumbsReversed(par_directory) Dim FSO, F, FD, folder Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FD = F.Subfolders For each folder in FD CheckThumbsReversedCategorie(par_directory & folder.name & "/") Next End Sub Sub CheckThumbsReversedCategorie(par_directory) Dim FSO, F, FD, FC, file, folder, dbkey, prefix_fullimages, prefix_thumbs Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FD = F.Subfolders Set FC = F.Files wscript.echo "Checking Categorie: " & par_directory wscript.echo For each folder in FD dbkey = folder.name prefix_thumbs = GetInfowithDefault(dbkey, "rootprefix_thumbs", false) prefix_fullimages = GetInfowithDefault(dbkey, "rootprefix_fullimages", false) 'wscript.echo 'wscript.echo "Checking " & par_directory & folder.name & " [" & dbkey & "]" & BooleanString(prefix_thumbs=true, " prefix_thumbs", "") & BooleanString(prefix_fullimages=true, " prefix_fullimages", "") CheckThumbsReversedSubCategorie par_directory & folder.name & "/", dbkey, prefix_thumbs, prefix_fullimages Next End Sub Sub CheckThumbsReversedSubCategorie(par_directory, dbkey, prefix_thumbs, prefix_fullimages) Dim FSO, F, FC, FD, file, folder Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FC = F.files Set FD = F.Subfolders CheckThumbs_FirstError = false If FD.count > 0 Then For each folder in FD CheckThumbsReversedSubCategorie par_directory & folder.name & "/", dbkey, prefix_thumbs, prefix_fullimages Next End If If ( GetInfoReportItem(dbkey, Replace(par_directory, altwebspacedir, drive & rootprefix), "thumbs") = true ) Then 'Thumbnails For each file in FC If ( LCase(Right(file.name,4)) <> ".jpg" ) Then 'NO JPG CheckThumbsError par_directory, "[No JPG] " & file.name Else 'JPG If ( prefix_thumbs = false ) and _ ( GetFileExist(Replace(par_directory, altwebspacedir, drive & rootprefix) & "tn_" & LCase(file.name) ) = false ) _ Then CheckThumbsError par_directory, "[No Thumbnail in Original Site] " & file.name End If Next End If End Sub '-------------------------------------------------------------------------------- Sub Rename_IMG(par_directory, oldtxt, newtxt) Dim FSO, F, FC, FD, file, folder Set FSO = CreateObject("Scripting.FileSystemObject") Set F = FSO.GetFolder(par_directory) Set FC = F.files Set FD = F.Subfolders wscript.echo "[Directory] " & par_directory If FD.count > 0 Then For each folder in FD Rename_IMG par_directory & folder.name & "/", oldtxt, newtxt Next Else For each file in FC If ( InStr(LCase(file.name), oldtxt) > 0 ) Then wscript.echo "Rename " & file.name & " to " & Replace(LCase(file.name), oldtxt, newtxt) file.name = Replace(LCase(file.name), oldtxt, newtxt) End If Next End If End Sub '-------------------------------------------------------------------------------- Dim extension Dim oldfieldvalue, oldfieldvalue1, weeknumberboolean Dim globalstartdirectory Dim drive, rootprefix, rootdirectory, reportdirectory, report_databasekey Dim categorydirectory, subcategorydirectory, subcategoryfile, imagedirectory Dim altwebspacedir Dim verbose Dim CheckThumbs_FirstError drive = "n:" rootprefix = "/~******/" rootdirectory = "fotoexpo/" reportdirectory = "reports/" altwebspacedir = "n:/pinkspace/" Dim conn_fotoexpo Set conn_fotoexpo = CreateObject("ADODB.Connection") conn_fotoexpo.open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=n:\~******\fotoexpo\database\fotoexpo.mdb" extension = "html" If CheckArgument("/html") Then extension = "html" If CheckArgument("/php") Then extension = "php" verbose = false If CheckArgument("/v") = true Then verbose = true If CheckArgument("/all") or CheckArgument("/news") Then 'CreateNewsHeaders drive & rootprefix & rootdirectory & "include/html/", "news.html.src", "news.html.inc" If ( CheckArgument("/frame")= false ) and ( CheckArgument("/all")= false ) Then IncludeEmbeddedVars drive & rootprefix & rootdirectory, "fotoexpo." & extension & ".src", "fotoexpo." & extension & ".tmp" IncludeFileStatement drive & rootprefix & rootdirectory, "fotoexpo." & extension & ".tmp", "fotoexpo." & extension DeleteFile drive & rootprefix & rootdirectory & "fotoexpo." & extension & ".tmp" End If End If 'If CheckArgument("/all") or CheckArgument("/policy") Then ' IncludeEmbeddedVars drive & rootprefix & rootdirectory, "policy.src", "policy." & extension 'End If If CheckArgument("/all") or CheckArgument("/frame") Then wscript.echo "------------------------------------------------------------" wscript.echo "Create Frame and Main Index files" wscript.echo "------------------------------------------------------------" IncludeEmbeddedVars drive & rootprefix & rootdirectory, "index.src", "index." & extension IncludeEmbeddedVars drive & rootprefix & rootdirectory, "fotoexpo." & extension & ".src", "fotoexpo." & extension & ".tmp" IncludeFileStatement drive & rootprefix & rootdirectory, "fotoexpo." & extension & ".tmp", "fotoexpo." & extension DeleteFile drive & rootprefix & rootdirectory & "fotoexpo." & extension & ".tmp" IncludeEmbeddedVars drive & rootprefix & rootdirectory & "include/" & "php" & "/", "html_header.src", "html_header.inc" IncludeEmbeddedVars drive & rootprefix & rootdirectory & "include/" & "html" & "/", "html_header.src", "html_header.inc" End If If CheckArgument("/all") or CheckArgument("/guestbook") then CreateFullPage drive & rootprefix & rootdirectory & "guestbook/", "guestbook.inc", "guestbook." & extension, true, "Guestbook", false CreateFullPage drive & rootprefix & rootdirectory & "guestbook/", "guestbook_missing_name.inc", "guestbook_missing_name." & extension, true, "Guestbook", false CreateFullPage drive & rootprefix & rootdirectory & "guestbook/", "guestbook_missing_text.inc", "guestbook_missing_text." & extension, true, "Guestbook", false End If If CheckArgument("/all") or CheckArgument("/siteindex") then CreateCompleteSiteIndex drive & rootprefix & rootdirectory & "include/html/", "news.html.inc" If ( CheckArgument("/frame")= false ) and ( CheckArgument("/all")= false ) Then IncludeEmbeddedVars drive & rootprefix & rootdirectory, "fotoexpo." & extension & ".src", "fotoexpo." & extension & ".tmp" IncludeFileStatement drive & rootprefix & rootdirectory, "fotoexpo." & extension & ".tmp", "fotoexpo." & extension DeleteFile drive & rootprefix & rootdirectory & "fotoexpo." & extension & ".tmp" End If End If If CheckArgument("/all") or CheckArgument("/feedback") Then CreateFullPage drive & rootprefix & rootdirectory & "feedback/", "feedback.inc", "feedback." & extension, true, "Feedback", false CreateFullPage drive & rootprefix & rootdirectory & "feedback/", "feedback_missing.inc", "feedback_missing." & extension, true, "Feedback", false CreateFullPage drive & rootprefix & rootdirectory & "feedback/", "feedback_completed.inc", "feedback_completed." & extension, true, "Feedback", false End If If CheckArgument("/all") or CheckArgument("/script") Then CreateFullPage drive & rootprefix & rootdirectory & "script/", "script.inc", "script." & extension, true, "Site Development", false End If If CheckArgument("/all") or CheckArgument("/equip") Then CreateFullPage drive & rootprefix & rootdirectory & "equipment/", "equipment.inc", "equipment." & extension, true, "Equipment", false If CheckArgument("/all") or CheckArgument("/whoami") Then CreateFullPage drive & rootprefix & rootdirectory & "whoami/", "whoami.inc", "whoami." & extension, true, "Whoami", false If CheckArgument("/all") or CheckArgument("/policy") Then CreateFullPage drive & rootprefix & rootdirectory & "policy/", "policy.inc", "policy." & extension, true, "Policy", false 'If CheckArgument("/all") or CheckArgument("/catindex") or ( CheckVarArgument("/cat" ) = "e" ) Then MakeCategoryIndex drive & rootprefix & rootdirectory & reportdirectory & "events/" 'If CheckArgument("/all") or CheckArgument("/catindex") or ( CheckVarArgument("/cat" ) = "c" ) Then MakeCategoryIndex drive & rootprefix & rootdirectory & reportdirectory & "carnaval/" 'If CheckArgument("/all") or CheckArgument("/catindex") or ( CheckVarArgument("/cat" ) = "ex") Then MakeCategoryIndex drive & rootprefix & rootdirectory & reportdirectory & "exhibitions/" 'If CheckArgument("/all") or CheckArgument("/catindex") or ( CheckVarArgument("/cat" ) = "m" ) Then MakeCategoryIndex drive & rootprefix & rootdirectory & reportdirectory & "misc/" 'If CheckArgument("/all") or CheckArgument("/catindex") or ( CheckVarArgument("/cat" ) = "f" ) Then MakeCategoryIndex drive & rootprefix & rootdirectory & reportdirectory & "fashion/" 'If CheckArgument("/all") or CheckArgument("/catindex") or ( CheckVarArgument("/cat" ) = "v" ) Then MakeCategoryIndex drive & rootprefix & rootdirectory & reportdirectory & "vehicles/" 'If CheckArgument("/all") or CheckArgument("/catindex") or ( CheckVarArgument("/cat" ) = "s" ) Then MakeCategoryIndex drive & rootprefix & rootdirectory & reportdirectory & "specials/" If CheckArgument("/all") or CheckArgument("/reports") or ( CheckVarArgument("/e" ) = "all" ) Then CreateSubGroups drive & rootprefix & rootdirectory & reportdirectory & "events/" If CheckArgument("/all") or CheckArgument("/reports") or ( CheckVarArgument("/c" ) = "all" ) Then CreateSubGroups drive & rootprefix & rootdirectory & reportdirectory & "carnaval/" If CheckArgument("/all") or CheckArgument("/reports") or ( CheckVarArgument("/ex") = "all" ) Then CreateSubGroups drive & rootprefix & rootdirectory & reportdirectory & "exhibitions/" If CheckArgument("/all") or CheckArgument("/reports") or ( CheckVarArgument("/m" ) = "all" ) Then CreateSubGroups drive & rootprefix & rootdirectory & reportdirectory & "misc/" If CheckArgument("/all") or CheckArgument("/reports") or ( CheckVarArgument("/f" ) = "all" ) Then CreateSubGroups drive & rootprefix & rootdirectory & reportdirectory & "fashion/" If CheckArgument("/all") or CheckArgument("/reports") or ( CheckVarArgument("/v" ) = "all" ) Then CreateSubGroups drive & rootprefix & rootdirectory & reportdirectory & "vehicles/" If CheckArgument("/all") or CheckArgument("/reports") or ( CheckVarArgument("/s" ) = "all" ) Then CreateSubGroups drive & rootprefix & rootdirectory & reportdirectory & "specials/" If ( CheckVarArgument("/e" ) <> "" ) and ( CheckVarArgument("/e" ) <> "all" ) Then CreateSubGroup drive & rootprefix & rootdirectory & reportdirectory & "events/event" & CheckVarArgument("/e") & "/" If ( CheckVarArgument("/c" ) <> "" ) and ( CheckVarArgument("/c" ) <> "all" ) Then CreateSubGroup drive & rootprefix & rootdirectory & reportdirectory & "carnaval/carnaval" & CheckVarArgument("/c") & "/" If ( CheckVarArgument("/ex") <> "" ) and ( CheckVarArgument("/ex") <> "all" ) Then CreateSubGroup drive & rootprefix & rootdirectory & reportdirectory & "exhibitions/exhibition" & CheckVarArgument("/ex") & "/" If ( CheckVarArgument("/m" ) <> "" ) and ( CheckVarArgument("/m" ) <> "all" ) Then CreateSubGroup drive & rootprefix & rootdirectory & reportdirectory & "misc/misc" & CheckVarArgument("/m") & "/" If ( CheckVarArgument("/f" ) <> "" ) and ( CheckVarArgument("/f" ) <> "all" ) Then CreateSubGroup drive & rootprefix & rootdirectory & reportdirectory & "fashion/fashion" & CheckVarArgument("/f") & "/" If ( CheckVarArgument("/v" ) <> "" ) and ( CheckVarArgument("/v" ) <> "all" ) Then CreateSubGroup drive & rootprefix & rootdirectory & reportdirectory & "vehicles/vehicles" & CheckVarArgument("/v") & "/" If ( CheckVarArgument("/s" ) <> "" ) and ( CheckVarArgument("/s" ) <> "all" ) Then CreateSubGroup drive & rootprefix & rootdirectory & "specials/" & CheckVarArgument("/s") & "/" If CheckArgument("/all") or CheckArgument("/database") Then CreateLinksAndAgendaPage If CheckArgument("/ct") Then CheckThumbs(drive & rootprefix & rootdirectory & reportdirectory) End If If CheckArgument("/ctr") Then CheckThumbsReversed(altwebspacedir & rootdirectory & reportdirectory) If CheckArgument("/ctf") Then 'CreateCategorieTableFields(drive & rootprefix & rootdirectory & reportdirectory & "carnaval/") 'CreateCategorieTableFields(drive & rootprefix & rootdirectory & reportdirectory & "events/") 'CreateCategorieTableFields(drive & rootprefix & rootdirectory & reportdirectory & "exhibitions/") 'CreateCategorieTableFields(drive & rootprefix & rootdirectory & reportdirectory & "fashion/") 'CreateCategorieTableFields(drive & rootprefix & rootdirectory & reportdirectory & "misc/") 'CreateCategorieTableFields(drive & rootprefix & rootdirectory & reportdirectory & "specials/") 'CreateCategorieTableFields(drive & rootprefix & rootdirectory & reportdirectory & "vehicles/") End If If CheckArgument("/ren") Then Rename_IMG altwebspacedir & rootdirectory & reportdirectory & "carnaval/carnaval011/", "img_", "img" 'If CheckArgument("/ren") Then Rename_IMG altwebspacedir & rootdirectory & reportdirectory, "img_", "img" 'If CheckArgument("/ren") Then Rename_IMG drive & rootprefix & rootdirectory & reportdirectory & "events/event014/", "tn_", "" 'If CheckArgument("/ren") Then Rename_IMG drive & rootprefix & rootdirectory & reportdirectory & "events/event028/images/d1_partypeople/", "img", "tn_img" 'If CheckArgument("/ren") Then Rename_IMG drive & rootprefix & rootdirectory & reportdirectory & "events/event028/images/d2_partypeople/", "img", "tn_img" conn_fotoexpo.close set conn_fotoexpo = nothing 'wscript.echo globalstartdirectory 'wscript.echo GetDirectoryPart(globalstartdirectory, 1, true ) 'wscript.echo GetDirectoryPart(globalstartdirectory, 2, true ) 'wscript.echo GetDirectoryPart(globalstartdirectory, 3, true ) 'wscript.echo GetDirectoryPart(globalstartdirectory, 4, true )