# Copyright for the Uniform Repository Service (c) 1995 - 1999, # by Gerald Banon. All rights reserved. # Version 2.1 # banner.tcl package provide dpi.inpe.br/banon/1998/08.02.08.56 2.1 # ---------------------------------------------------------------------- # ProvideBanner proc ProvideBanner {} { global env global cgi global currentRep global searchResult set col ../../../../.. set URLibServiceRepository dpi.inpe.br/banon/1998/08.02.08.56 set language [lindex [file split $env(PATH_INFO)] end] source ../$col/$URLibServiceRepository/doc/utilities1.tcl source ../$col/$URLibServiceRepository/doc/cgi/mirrorfind-.tcl # Find all the banners set auxDoc ../$col/$URLibServiceRepository/auxdoc source $auxDoc/.repositoryProperties.tcl set bannerRepList {} foreach index [array names repositoryProperties *,type] { if {$repositoryProperties($index) == "Banner"} { regsub {,.*} $index {} repository if {$repositoryProperties($repository,targetfile) == \ "@${language}Banner.html"} { lappend bannerRepList $repository } } } # Find all the banners - end # Choose the next banner Load $auxDoc/${language}BannerRep previousBannerRep set i [lsearch -exact $bannerRepList $previousBannerRep] incr i set iMax [llength $bannerRepList] if {$i == "$iMax"} {set i 0} set bannerRep [lindex $bannerRepList $i] Store bannerRep $auxDoc/${language}BannerRep # Choose the next banner - end if {$iMax == 0} { puts {Content-Type: text/html} puts {} puts { Bibliographic Mirror } } else { puts "Location: ../rep-/$bannerRep" puts "" } return } # ProvideBanner - end # ----------------------------------------------------------------------