# Copyright for the Uniform Repository Service (c) 1995 - 2013, # by Gerald Banon. All rights reserved. # Version 2.1 # export.tcl # exports bibliographic references # cgi inputs used by Export: # username # session proc Export {} { if [catch { global env # global cgi ;# used in CheckUsernamePasswordForm - commented by GJFB in 2014-06-10 - CheckUsernamePasswordForm is not used global homePath ;# used in GetSessionList (see CheckSession) global serverAddress ;# used in SetFieldValue global URLibServiceRepository ;# used in CheckSession global localSite ;# used when calling FindSite2 fconfigure stdout -translation binary set col ../../../../.. set URLibServiceRepository $env(URLIB_SERVICE_REP) source ../$col/$URLibServiceRepository/doc/utilities1.tcl source ../$col/$URLibServiceRepository/doc/cgi/mirrorfind-.tcl foreach {name value} [split $env(QUERY_STRING) &=] { set cgi([DecodeURL $name]) [DecodeURL $value] } CreateCGIArray 1 # homePath set homePath $env(DOCUMENT_ROOT) # serverAddress set serverAddress [list $env(SERVER_NAME) $env(URLIB_PORT)] ## serverAddressWithIP # set serverAddressWithIP [list $env(IP_ADDR) $env(URLIB_PORT)] ;# used in CheckUsernamePasswordForm - commented by GJFB in 2014-06-10 - atually CheckUsernamePasswordForm is not used # localSite set localSite $env(SERVER_NAME):$env(SERVER_PORT) set currentRep $cgi(mirrorrepository) # Find the language and the language repository # use the same languages as used for the local bibliographic mirror foreach {language languageRep1 languageRep2 firstLanguageRep \ submissionFormRep submissionFormLanguage submissionFormLanguageRep} \ [FindLanguage $currentRep] {break} source ../$col/$languageRep2/doc/mirror/${submissionFormLanguage}Submit.tcl global "${languageRep2}::Nothing checked" global "${languageRep2}::Return" if 0 { puts {Content-Type: text/html} puts {} # puts [array get cgi] } # Check session if {![info exists cgi(username)] || \ ![info exists cgi(session)] || \ [CheckSession $cgi(session) $cgi(username)]} { # no session puts {Content-Type: text/html} puts {} puts "Export: permission denied." return } # Check session - end # Ckeck the form if ![info exist cgi(checkeditemlist)] { puts {Content-Type: text/html} puts {} puts "
${Nothing checked}.