<html>
{
-# $Id: msearch.egw,v 1.2 1995/11/08 16:14:33 adam Exp $
+# $Id: msearch.egw,v 1.10 1996/01/08 08:42:13 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
global hist
global zstatus
- if {[wform menu1] == ""} {
- set setNo [lindex $sessionParms 0]
- } else {
- if {![info exists hist($nextSetNo,0,host)]} {
- 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)
- set hist($nextSetNo,$i,database) $hist($setNo,$i,database)
- }
+ html "<head><title> WWW/Z39.50 Gateway Search </title>\n"
+ html "</head><body>\n"
+ set setNo [lindex $sessionParms 0]
+
+ if {[wform 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)
+ set hist($nextSetNo,$i,database) $hist($setNo,$i,database)
+ set hist($nextSetNo,$i,idAuthentication) \
+ $hist($setNo,$i,idAuthentication)
}
set setNo $nextSetNo
incr nextSetNo
for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
- set hist($setNo,$i,query) [build-query $hist($setNo,$i,host)]
+ set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3]
}
set hist($setNo,maxPresent) [wform hits]
if {$hist($setNo,maxPresent) == ""} {
set hist($setNo,maxPresent) 30
}
}
- html "<head><title> WWW/Z39.50 Gateway Search </title>\n"
- html "</head><body>\n"
-
- z39msearch $setNo 1
+ z39msearch $setNo 1 B
html "<dl>\n"
set not $hist($setNo,0,host)
for {set i 1} {$i <= $not} {incr i} {
if {$zstatus($i) != 2} continue
- html "<dt> " $hist($setNo,$i,host) ": "
+ html "<dt><h3>" [lindex $targets($hist($setNo,$i,host)) 0] ": "
set status [z39$i.$setNo responseStatus]
if {[lindex $status 0] == "NSD"} {
z39$i.$setNo nextResultSetPosition 0
set code [lindex $status 1]
set msg [lindex $status 2]
set addinfo [lindex $status 3]
- html "Error\n<dd>NSD$code: $msg: $addinfo"
+ html "Error</h3>\n<dd>NSD$code: $msg: $addinfo"
} else {
set r [z39$i.$setNo resultCount]
- html "$r hits\n<dd>\n"
+ html "$r hits</h3>\n<dd>\n<ul>\n"
- display-rec 1 $hist($setNo,$i,offset) display-brief z39$i
+ display-rec 1 $hist($setNo,$i,offset) display-brief $i
+ html "</ul>"
}
html "\n"
}
html "</dl>\n"
}
-
-<hr>
{
+ global useIcons
+
+ if {$useIcons} {
+ html {<img src="/gif/button-egw.gif">}
+ }
html {<a href="http:} $env(SCRIPT_NAME)
- html / $sessionId {/mtargets.egw"> New target </a>} " | \n"
+ html / $sessionId {/mtargets.egw}
+ if {$useIcons} {
+ html {"><img src="/gif/button-new-target.gif" border=0></a>}
+ } else {
+ html {"> New target </a>} " | \n"
+ }
html {<a href="http:} $env(SCRIPT_NAME)
- html / $sessionId {/mquery.egw/} $host + $setNo {"> New query </a>}
+ html / $sessionId {/mquery.egw/} $setNo
+ if {$useIcons} {
+ html {"><img src="/gif/button-new-query.gif" border=0></a>}
+ } else {
+ html {"> New query </a>}
+ }
}
{
+ if {!$debug} return
html "<hr>\n"
html "<h3>Debug information</h3>\n"
html "sessionId: $sessionId <br>\n"
}
html "form: " [wform] " <br>\n"
html "target: " $host " <br>\n"
- html "query: --" $hist($setNo,1,query) "-- <br>"
+ html "query: --" $hist($setNo,1,query) "-- <br>\n"
+ html "database: " $hist($setNo,1,database) "<br>\n"
html "setNo: " $setNo " <br>\n"
html "nextSetNo: " $nextSetNo " <br>\n"
}