</head>
<body>
{
-# $Id: history.egw,v 1.3 1996/01/12 10:03:16 adam Exp $
+# $Id: history.egw,v 1.4 1996/01/24 08:27:25 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
html $e {: } $env($e) {<br>} \n
}
- html "form: " [wform] " <br>\n"
+ html "form: " [egw_form] " <br>\n"
}
</body></html>
</head>
<body>
{
-# $Id: mquery.egw,v 1.9 1996/01/09 16:16:47 adam Exp $
+# $Id: mquery.egw,v 1.10 1996/01/24 08:27:25 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
set phost {}
set i 0
- foreach t [lsort [wform target]] {
+ foreach t [lsort [egw_form target]] {
set host [lindex $t 0]
set base [lindex $t 1]
if {$host != $phost} {
}
if {$i == 0} {
html "<h2>No targets specified</h2></body></html>"
- wabort 1
+ egw_abort 1
}
set hist($setNo,0,host) $i
}
html "host=" $hist($setNo,$i,host) " " $hist($setNo,$i,database)
html "<br>\n"
}
- html "form: " [wform] " <br>\n"
+ html "form: " [egw_form] " <br>\n"
html "target: " $host " <br>\n"
html "setNo: " $setNo " <br>\n"
html "nextSetNo: " $nextSetNo " <br>\n"
<html>
{
-# $Id: msearch.egw,v 1.11 1996/01/09 16:16:48 adam Exp $
+# $Id: msearch.egw,v 1.12 1996/01/24 08:27:26 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
html "</head><body>\n"
set setNo [lindex $sessionParms 0]
- if {[wform menu1] != ""} {
+ if {[egw_form menu1] != ""} {
set hist($nextSetNo,0,host) $hist($setNo,0,host)
for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
set hist($nextSetNo,$i,host) $hist($setNo,$i,host)
for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3]
}
- set hist($setNo,maxPresent) [wform hits]
+ set hist($setNo,maxPresent) [egw_form hits]
if {$hist($setNo,maxPresent) == ""} {
set hist($setNo,maxPresent) 30
}
foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
html $e {: } $env($e) {<br>} \n
}
- html "form: " [wform] " <br>\n"
+ html "form: " [egw_form] " <br>\n"
html "target: " $host " <br>\n"
html "query: --" $hist($setNo,1,query) "-- <br>\n"
html "database: " $hist($setNo,1,database) "<br>\n"
</head>
<body>
{
-# $Id: query.egw,v 1.28 1996/01/12 13:08:28 adam Exp $
+# $Id: query.egw,v 1.29 1996/01/24 08:27:28 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
ir z39
}
- html "<h2>Search in " [lindex $targets($host) 0] "</h2>\n"
+ html "<h2>Search in " [lindex $targets($host) 0] "</h2><br>\n"
z39 callback ok-response
z39 failback fail-response
if {$host != $oldHost} {
displayError "Cannot connect to target ${host}" {}
html "</body></html>\n"
z39 disconnect
- wabort
+ egw_abort
} elseif {$sessionWait == 0} {
- if {[catch {zwait sessionWait 35}]} {
+ if {[catch {egw_wait sessionWait 35}]} {
displayError "Cannot connect to target ${host}" {}
html "</body></html>\n"
z39 disconnect
- wabort
+ egw_abort
}
if {$sessionWait != 1} {
displayError "Cannot connect to target ${host}" {}
html "</body></html>\n"
z39 disconnect
- wabort
+ egw_abort
}
}
set sessionWait 0
if {[catch {z39 init}]} {
displayError "Cannot initialize target ${host}" {}
html "</body></html>\n"
- wabort
+ egw_abort
}
- if {[catch {zwait sessionWait 60}]} {
+ if {[catch {egw_wait sessionWait 60}]} {
displayError "Cannot initialize target ${host}" {}
html "</body></html>\n"
- wabort
+ egw_abort
}
if {$sessionWait != "1"} {
displayError "Cannot initialize target ${host}" {}
- htmlr "</body></html>\n"
- wabort
+ html "</body></html>\n"
+ egw_abort
}
if {![z39 initResult]} {
displayError "Connection rejected by target ${host}" \
[z39 userInformationField]
z39 disconnect
- htmlr "</body></html>"
- wabort
+ html "</body></html>\n"
+ egw_abort
}
}
set databases [lindex $targets($host) 1]
foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
html $e {: } $env($e) {<br>} \n
}
- html "form: " [wform] " <br>\n"
+ html "form: " [egw_form] " <br>\n"
html "target: " $host " <br>\n"
html "databases: " $databases " <br>\n"
html "setNo: " $setNo " <br>\n"
<html>
{
-# $Id: search.egw,v 1.29 1996/01/12 13:39:22 adam Exp $
+# $Id: search.egw,v 1.30 1996/01/24 08:27:29 adam Exp $
proc start-scan {scanNo cache dir initSet} {
global sessionId
if {$hist($setNo,$scanNo,scanTerm) == ""} {
button-new-query 0 $setNo
- wabort
+ egw_abort
return
}
if {$dir == "b"} {
foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
html $e {: } $env($e) {<br>} \n
}
- html "form: " [wform] " <br>\n"
+ html "form: " [egw_form] " <br>\n"
html "target: " $host " <br>\n"
html "databases: " $hist($setNo,database) " <br>\n"
- html "selected: " [wform base] " <br>\n"
+ html "selected: " [egw_form base] " <br>\n"
html "setNo: " $setNo " <br>\n"
html "nextSetNo: " $nextSetNo " <br>\n"
}
set setNo [lindex $sessionParms 0]
- if {[wform] != ""} {
+ if {[egw_form] != ""} {
set hist($nextSetNo,idAuthentication) $hist($setNo,idAuthentication)
set hist($nextSetNo,host) $hist($setNo,host)
}
set hist($setNo,scan) 0
- set hist($setNo,form,menu1) [wform menu1]
- set hist($setNo,form,menu2) [wform menu2]
- set hist($setNo,form,menu3) [wform menu3]
+ set hist($setNo,form,menu1) [egw_form menu1]
+ set hist($setNo,form,menu2) [egw_form menu2]
+ set hist($setNo,form,menu3) [egw_form menu3]
- set hist($setNo,form,entry1) [wform entry1]
- set hist($setNo,form,entry2) [wform entry2]
- set hist($setNo,form,entry3) [wform entry3]
+ set hist($setNo,form,entry1) [egw_form entry1]
+ set hist($setNo,form,entry2) [egw_form entry2]
+ set hist($setNo,form,entry3) [egw_form entry3]
- set hist($setNo,form,logic1) [wform logic1]
- set hist($setNo,form,logic2) [wform logic2]
+ set hist($setNo,form,logic1) [egw_form logic1]
+ set hist($setNo,form,logic2) [egw_form logic2]
set hist($setNo,form,logic3) {}
set host $hist($setNo,host)
set databases [lindex $targets($host) 1]
- set b [wform base]
- if {[wform baseall] != ""} {
+ set b [egw_form base]
+ if {[egw_form baseall] != ""} {
set hist($setNo,database) $databases
} elseif {$b == ""} {
set hist($setNo,database) $databases
} else {
set hist($setNo,database) $b
}
- set hist($setNo,maxPresent) [wform hits]
+ set hist($setNo,maxPresent) [egw_form hits]
if {$hist($setNo,maxPresent) == ""} {
set hist($setNo,maxPresent) 30
}
set i [lindex $sessionParms 1]
if {$i == ""} {
for {set j 1} {$j <= 3} {incr j} {
- if {[wform scan$j] != ""} {
+ if {[egw_form scan$j] != ""} {
set i $j
break
}
set hist($setNo,scanAttr) [lindex $termPlusAttr 1]
start-scan $scanNo 0 {} {}
html "</body></html>\n"
- wabort
+ egw_abort
return
}
set query [build-query $hist($setNo,host) 3]
displayError "Empty query" \
"You must specify at least one search word"
html "</body></html>\n"
- wabort
+ egw_abort
}
set hist($setNo,query) $query
} else {
set hist($setNo,$scanNo,scanTerm) {}
start-scan $scanNo 0 {} {}
html "</body></html>\n"
- wabort
+ egw_abort
}
if {![info exists hist($setNo,scan)]} return
if {$hist($setNo,scan) > 0} {
}
start-scan $scanNo 1 $dir $setNo
html "</body></html>\n"
- wabort
+ egw_abort
}
}
set host $hist($setNo,host)
} else {
html "<h3> No hits</h3>\n"
}
- wflush
+ egw_flush
html "<ul>\n"
display-rec 1 $setOffset display-brief 0
incr setOffset
} else {
html "<h3> No hits</h3>\n"
}
- wflush
+ egw_flush
html "<ul>\n"
}
if {$setMax > 0} {
foreach n [array names env] {
html "env($n) = " $env($n) " <br>\n"
}
- html "form: " [wform] " <br>\n"
+ html "form: " [egw_form] " <br>\n"
html "target: " $host " <br>\n"
html "databases: " $hist($setNo,database) " <br>\n"
- html "selected: " [wform base] " <br>\n"
+ html "selected: " [egw_form base] " <br>\n"
html "query: --" $hist($setNo,query) "-- <br>"
html "setNo: " $setNo " <br>\n"
html "nextSetNo: " $nextSetNo " <br>\n"
#
-# $Id: z39util.tcl,v 1.22 1996/01/23 14:22:03 adam Exp $
+# $Id: z39util.tcl,v 1.23 1996/01/24 08:27:23 adam Exp $
#
proc saveState {} {
uplevel #0 {
}
html $data
}
- htmlr {<br>}
+ html "<br>\n"
}
}
proc build-scan {t i} {
global targets
- set term [wform entry$i]
+ set term [egw_form entry$i]
if {$term != ""} {
- set field [join [wform menu$i]]
+ set field [join [egw_form menu$i]]
set attr {Title}
foreach x [lindex $targets($t) 2] {
if {[lindex $x 0] == $field} {
set op {}
set q {}
for {set i 1} {$i <= $ilines} {incr i} {
- set term [join [wform entry$i]]
+ set term [join [egw_form entry$i]]
if {[string length $term] > 0} {
- set field [join [wform menu$i]]
+ set field [join [egw_form menu$i]]
foreach x [lindex $targets($t) 2] {
if {[lindex $x 0] == $field} {
set attr [lindex $x 1]
{}
{ set q "${attr} ${term}" }
}
- set op [wform logic$i]
+ set op [egw_form logic$i]
}
}
return $q
displayError "Cannot connect to target" $host
return 0
} elseif {$sessionWait == 0} {
- if {[catch {zwait sessionWait 300}]} {
+ if {[catch {egw_wait sessionWait 300}]} {
$zz disconnect
displayError "Cannot connect to target" $host
return 0
$zz disconnect
return 0
}
- if {[catch {zwait sessionWait 60}]} {
+ if {[catch {egw_wait sessionWait 60}]} {
displayError "Cannot initialize target" $host
$zz disconnect
return 0
set sessionWait 0
$zs scan "${scanAttr} ${scanTerm}"
- if {[catch {zwait sessionWait 60}]} {
- wlog debug "timeout/cancel in scan"
+ if {[catch {egw_wait sessionWait 60}]} {
+ egw_log debug "timeout/cancel in scan"
displayError "Timeout in scan" {}
html "</body></html>\n"
$zz disconnect
displayError "Cannot connect to target" $host
return 0
} elseif {$sessionWait == 0} {
- if {[catch {zwait sessionWait 300}]} {
+ if {[catch {egw_wait sessionWait 300}]} {
$zz disconnect
displayError "Cannot connect to target" $host
return 0
$zz disconnect
return 0
}
- if {[catch {zwait sessionWait 60}]} {
+ if {[catch {egw_wait sessionWait 60}]} {
displayError "Cannot initialize target" $host
$zz disconnect
return 0
$zz.$setNo mediumSetElementSetNames $elements
$zz.$setNo recordElements $elements
- wlog debug "database=$database"
+ egw_log debug "database=$database"
eval $zz.$setNo databaseNames $database
$zz.$setNo preferredRecordSyntax USMARC
set sessionWait 0
$zz.$setNo search $query
- if {[catch {zwait sessionWait 600}]} {
- wlog debug "timeout/cancel in search"
+ if {[catch {egw_wait sessionWait 600}]} {
+ egw_log debug "timeout/cancel in search"
displayError "Timeout in search" {}
html "</body></html>\n"
$zz disconnect
global zstatus
global zleft
- wlog debug "init-m-response"
+ egw_log debug "init-m-response"
set zstatus($i) 1
incr zleft -1
global zstatus
global zleft
- wlog debug "connect-m-response"
+ egw_log debug "connect-m-response"
z39$i callback [list init-m-response $i]
if {[catch {z39$i init}]} {
set zstatus($i) -1
global zstatus
global zleft
- wlog debug "fail-m-response"
+ egw_log debug "fail-m-response"
set zstatus($i) -1
incr zleft -1
}
}
}
while {$zleft > 0} {
- wlog debug "Waiting for init response"
- if {[catch {zwait zleft 10}]} {
+ egw_log debug "Waiting for init response"
+ if {[catch {egw_wait zleft 10}]} {
break
}
}
z39$i.$setNo mediumSetPresentNumber 0
}
set zstatus($i) 1
- wlog debug "search " $hist($setNo,$i,query)
+ egw_log debug "search " $hist($setNo,$i,query)
z39$i.$setNo search $hist($setNo,$i,query)
incr zleft
} else {
}
}
while {$zleft > 0} {
- wlog debug "Waiting for search response"
- if {[catch {zwait zleft 30}]} {
+ egw_log debug "Waiting for search response"
+ if {[catch {egw_wait zleft 30}]} {
break
}
}
if {$got < $toGet} {
set sessionWait 0
$zz.$setNo present $setOffset $toGet
- if {[catch {zwait sessionWait 300}]} {
- wlog debug "timeout/cancel in present"
+ if {[catch {egw_wait sessionWait 300}]} {
+ egw_log debug "timeout/cancel in present"
$zz disconnect
break
}
display-rec $setOffset [expr $got + $setOffset - 1] $dfunc $tno
set setOffset [expr $got + $setOffset]
set toGet [expr 1 + $setMax - $setOffset]
- wflush
+ egw_flush
}
}