<title>Europagate WWW index</title>
</head>
<body>
-<h2>Europagate WWW index, $Id: egwindex.html,v 1.11 1996/03/11 17:40:47 adam Exp $</h2>
+<h2>Europagate WWW index, $Id: egwindex.html,v 1.12 1996/03/13 14:07:28 adam Exp $</h2>
<p>
<ul>
<li>
<a href="http:/cgi-bin/egwcgi/egwwais/mtargets.egw/1+1">
multiple wais/z39.50 targets with debug and html3</a>
<li>
- <a href="http:/cgi-bin/egwcgi/egwwais/nwi.egw/1+1">
+ <a href="http:/cgi-bin/egwcgi/egwwais/nwi.egw">
NWI/test</a>
+<li>
+ <a href="http:/cgi-bin/egwcgi/egwwais/nwi.egw/1+1">
+ NWI/test with debug</a>
</ul>
</body>
</html>
</head>
<body>
{
-# $Id: history.egw,v 1.6 1996/03/12 16:30:26 adam Exp $
+# $Id: history.egw,v 1.7 1996/03/13 14:07:29 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
set useIcons 1
button-main
- button-new-target 0
+ button-new-target
z39history
set useIcons 0
button-main
- button-new-target 0
+ button-new-target
}
{
catch maintenance
</head>
<body>
{
-# $Id: mquery.egw,v 1.14 1996/03/12 16:30:26 adam Exp $
+# $Id: mquery.egw,v 1.15 1996/03/13 14:07:29 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
set useIcons 1
button-main
- button-new-target 0
+ button-new-target
html {<form action="http:} $env(SCRIPT_NAME)
html / $sessionId {/msearch.egw/} $setNo {" method=get>} \n
lappend hist($setNo,$i,database) $base
}
set oSetNo [lindex $sessionParms 0]
- if {$i == 0 && [info exists hist($oSetNo,0,host)]} {
+ if {$oSetNo < 0} {
+ set oSetNo 0
+ }
+ if {$i == 0 && $oSetNo && [info exists hist($oSetNo,0,host)]} {
for {set i 1} {$i <= $hist($oSetNo,0,host)} {incr i} {
set hist($setNo,$i,host) $hist($oSetNo,$i,host)
set hist($setNo,$i,idAuthentication) \
html "<h2>No targets specified</h2></body></html>"
egw_abort 1
}
+
+ set curSort server
+ set curFormat brief
+ if {$oSetNo} {
+ set curSort $hist($oSetNo,sort)
+ set curFormat $hist($oSetNo,format)
+ }
+
set hist($setNo,0,host) $i
- html "Input your search criteria:<br>\n"
+ html "<b>Fill-in this search form:</b><br>\n"
set fields [lindex $targets($host) 2]
for {set no 1} {$no < 4} {incr no} {
+
html {<select name="menu} $no {">} \n
+ set template {}
+ if {$oSetNo} {
+ set template [join $hist($oSetNo,form,menu$no)]
+ }
+ if {[string length $template] > 0} {
+ html {<option> } $template "\n"
+ }
foreach f $fields {
- html {<option> } [lindex $f 0] \n
+ set name [lindex $f 0]
+ if {$template == $name} continue
+ html {<option> } $name \n
}
html "</select>\n"
- html {<input type="text" name="entry} $no {" size=35>} \n
+
+ html {<input type="text" name="entry} $no {" size=35 value="}
+
+ if {$oSetNo} {
+ if {[info exists hist($oSetNo,form,entry$no)]} {
+ html [join $hist($oSetNo,form,entry$no) " "]
+ }
+ }
+ html {">} \n
if {$no < 3} {
html {<select name="logic} $no {">} \n
- html "<option> And\n"
- html "<option> Or\n"
- html "<option> And not\n"
+ set template {}
+ if {$oSetNo} {
+ set template [join $hist($oSetNo,form,logic$no) " "]
+ }
+ if {[string length $template] > 0} {
+ html "<option> " $template \n
+ }
+ foreach op {And Or {And not}} {
+ if {$template == $op} continue
+ html "<option> " [join $op " "] \n
+ }
html "</select>\n"
}
html "<br>\n"
}
+
html {<input type=submit value="Search"><input type=reset value="Reset">}
html "<br>\n"
- html {Display each record in <select name="format">}
- html "<option>brief\n"
- html "<option>medium\n"
+
+ html {<b>Display each record in <select name="format">}
+ if {![string compare $curFormat brief]} {
+ html "<option>brief\n"
+ html "<option>medium\n"
+ } else {
+ html "<option>medium\n"
+ html "<option>brief\n"
+ }
html "</select> notation"
html { and sort by <select name="sort">}
- html "<option>score\n"
- html "<option>server\n"
- html "</select><br>\n"
+ if {![string compare $curSort score]} {
+ html "<option>score\n"
+ html "<option>server\n"
+ } else {
+ html "<option>server\n"
+ html "<option>score\n"
+ }
+ html "</select></b><br>\n"
set useIcons 0
button-main
- button-new-target 0
+ button-new-target
}
{
catch maintenance
<html>
{
-# $Id: msearch.egw,v 1.19 1996/03/12 16:30:26 adam Exp $
+# $Id: msearch.egw,v 1.20 1996/03/13 14:07:29 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3]
}
+ set hist($setNo,scan) 0
+
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 useIcons 1
button-main
- button-new-query 1 $setNo
- button-new-target 0
+ button-new-query $setNo
+ button-view-history
+ button-new-target
html "<br>\n"
z39msearch $setNo B 1 $hist($setNo,maxPresent) 1
set useIcons 0
button-main
- button-new-query 1 $setNo
- button-new-target 0
+ button-new-query $setNo
+ button-view-history
+ button-new-target
}
{
<html>
{
-# $Id: mtargets.egw,v 1.18 1996/03/12 16:30:27 adam Exp $
+# $Id: mtargets.egw,v 1.19 1996/03/13 14:07:30 adam Exp $
set setNo 1
source ztargets.conf
if {[info commands saveState] == ""} {
source z39util.tcl
}
- set mMode 1
-
if {![info exists debug]} {
if {[lindex $sessionParms 1] == "1"} {
set debug 1
set useIcons 1
button-main
- button-define-target 0
+ button-define-target
html "<h2>Choose one or more targets</h2>\n"
html {<form action="http:} $env(SCRIPT_NAME)
- html / $sessionId {/mquery.egw/} $setNo {" method=get><br>} \n
+ html / $sessionId / $scriptQuery {;/} -1 {" method=get><br>} \n
html "<dl>\n"
- proc targetsCmp {l r} {
- global targets
- return [string compare [string tolower [lindex $targets($l) 0]] \
- [string tolower [lindex $targets($r) 0]]]
+ proc headlineC {h} {
+ html {<dt><h2>} $h \n {</h2>}
}
- set tt [array names targets]
- set tn [lsort -command targetsCmp $tt]
- foreach t $tn {
- html {<dt>} [ lindex $targets($t) 0]
- html {<dd>}
+ proc targetC {t} {
+ global targets
+ html {<dt><b>} [ lindex $targets($t) 0]
+ html {</b>: }
set databases [splitDatabaseSpec $t]
set desc [lindex $targets($t) 4]
- if {$desc != ""} {
+ if {[string length $desc] > 0} {
html "$desc<br>\n"
}
+ html {<dd>}
foreach d $databases {
html {<input type="checkbox" name="target"}
html { value="} $t + $d {"> } $d
}
- html "<br>\n"
+ html "<br><br>\n"
}
+ serverList headlineC targetC
+
html "</dl>\n"
html {<input type="submit" value="Select"></form>} \n
html "<p>\n"
set useIcons 0
button-main
- button-define-target 0
+ button-define-target
}
{
<html>
{
-# $Id: nwi.egw,v 1.2 1996/03/12 16:30:27 adam Exp $
+# $Id: nwi.egw,v 1.3 1996/03/13 14:07:30 adam Exp $
source ztargets.conf
set scriptQuery nwi.egw
if {[info commands saveState] == ""} {
source z39util.tcl
}
- set mMode 1
-
if {![info exists debug]} {
if {[lindex $sessionParms 1] == "1"} {
set debug 1
set useIcons 1
button-main
- set initSet [lindex $sessionParms 0]
set curSort score
set curFormat brief
set curEntry {}
+
+ set initSet 0
catch {
- if {$initSet > 0} {
+ set initSet [lindex $sessionParms 0]
+ if {$initSet < 0} {
+ set initSet 0
+ }
+ if {$initSet} {
for {set i 1} {$i <= $hist($initSet,0,host)} {incr i} {
lappend curTargets $hist($initSet,$i,host)
}
</head>
<body>
{
-# $Id: query.egw,v 1.37 1996/03/12 16:30:27 adam Exp $
+# $Id: query.egw,v 1.38 1996/03/13 14:07:30 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
set useIcons 1
button-main
- button-new-target 1
+ button-new-target
if {[lsearch [z390 options] scan] >= 0} {
- button-scan-window 1 $setNo
+ button-scan-window $setNo
}
- button-view-history 0
+ button-view-history
html "<h2>" [lindex $targets($host) 0] "</h2><br>\n"
html [concat $databases] {"> All <br>} \n
}
}
- html "Input your search criteria:<br>\n"
+ html "<b>Fill-in this search form:</b><br>\n"
set fields [lindex $targets($host) 2]
for {set no 1} {$no < 4} {incr no} {
html {<select name="menu} $no {">} \n
set useIcons 0
button-main
- button-new-target 1
+ button-new-target
if {[lsearch [z390 options] scan] >= 0} {
- button-scan-window 1 $setNo
+ button-scan-window $setNo
}
- button-view-history 0
+ button-view-history
}
{
<html>
{
-# $Id: search.egw,v 1.37 1996/03/12 16:30:28 adam Exp $
+# $Id: search.egw,v 1.38 1996/03/13 14:07:31 adam Exp $
proc start-scan {scanNo targetNo cache dir initSet} {
global sessionId
}
if {$hist($setNo,$scanNo,scanTerm) != ""} {
if {[z39scan $setNo $scanNo 0 $lines $pos $cache] != "1"} {
- button-new-query 0 $setNo
+ button-new-query $setNo
egw_log debug "z39_scan failed"
return
}
}
html {</a>}
}
- button-new-query 0 $setNo
+ button-new-query $setNo
set databases [splitDatabaseSpec $host]
set useIcons 0
if {$hist($setNo,$scanNo,scanTerm) == ""} {
button-main
- button-new-query 0 $setNo
+ button-new-query $setNo
return
}
html {Next Terms</a> | }
}
html {</a>}
- button-new-query 0 $setNo
+ button-new-query $setNo
if {!$debug} return
html "<hr>\n"
html $e {: } $env($e) {<br>} \n
}
html "form: " [egw_form] " <br>\n"
- html "target: " $host " <br>\n"
html "databases: " $hist($setNo,$targetNo,database) " <br>\n"
html "selected: " [egw_form base] " <br>\n"
html "setNo: " $setNo " <br>\n"
set setNo $nextSetNo
incr nextSetNo
} else {
- catch {unset hist($setNo,hits)}
+ catch {unset hist($setNo,$targetNo,hits)}
}
set hist($setNo,scan) 0
set b [egw_form base]
if {[egw_form baseall] != ""} {
- set hist($setNo,0,database) $databases
+ set hist($setNo,$targetNo,database) $databases
} elseif {$b == ""} {
- set hist($setNo,0,database) $databases
+ set hist($setNo,$targetNo,database) $databases
} else {
- set hist($setNo,0,database) $b
+ set hist($setNo,$targetNo,database) $b
}
set hist($setNo,maxPresent) [egw_form hits]
if {$hist($setNo,maxPresent) == ""} {
set hist($setNo,sort) server
set i [lindex $sessionParms 2]
- if {$i == ""} {
+ if {[string length $i] == 0} {
for {set j 1} {$j <= 3} {incr j} {
if {[egw_form scan$j] != ""} {
set i $j
}
}
}
- if {$i != ""} {
+ if {[string length $i] != 0} {
set scanNo 1000
set hist($setNo,scan) $i
set termPlusAttr [build-scan $hist($setNo,0,host) $i]
return
}
set query [build-query $hist($setNo,0,host) 3]
- if {"x$query" == "x"} {
+ if {[string length $query] == 0} {
html "<head><title> WWW/Z39.50 Gateway Search</title>\n<body>\n"
displayError "Empty query" \
"You must specify at least one search word"
set setNo $nextSetNo
incr nextSetNo
} else {
- catch {unset hist($setNo,hits)}
+ catch {unset hist($setNo,$targetNo,hits)}
}
set hist($setNo,scan) 0
set hist($setNo,$targetNo,query) \
html "env($n) = " $env($n) " <br>\n"
}
html "form: " [egw_form] " <br>\n"
- html "target: " $host " <br>\n"
html "databases: " $hist($setNo,$targetNo,database) " <br>\n"
html "selected: " [egw_form base] " <br>\n"
html "query: --" $hist($setNo,$targetNo,query) "-- <br>"
<html>
{
-# $Id: showfull.egw,v 1.22 1996/03/12 16:30:28 adam Exp $
+# $Id: showfull.egw,v 1.23 1996/03/13 14:07:31 adam Exp $
proc buttons {setNo tno no format count host after} {
global sessionId
}
}
- if {!$useIcons} {
- html "\n | "
- }
- html {<a href="http:} $env(SCRIPT_NAME) / $sessionId
- if {$tno > 0} {
- html {/msearch.egw/} $setNo
- } else {
- html {/search.egw/} $setNo + $tno
- }
- html + 1 + $hist($setNo,maxPresent)
- if {$useIcons} {
- html {"><img src="/egwgif/button-result-set.gif" }
- html {alt="Result Set" border=0></a>}
- } else {
- html {">Result Set</a>}
- }
-
- button-new-query 1 $setNo
- button-new-target 0
+ button-result-set $setNo $tno
+ button-new-query $setNo
+ button-new-target
html "<p>\n"
}
<html>
{
-# $Id: targets.egw,v 1.22 1996/03/12 16:30:29 adam Exp $
+# $Id: targets.egw,v 1.23 1996/03/13 14:07:31 adam Exp $
source ztargets.conf
if {[info commands saveState] == ""} {
source z39util.tcl
}
- set mMode 0
-
if {![info exists debug]} {
if {[lindex $sessionParms 1] == "1"} {
set debug 1
button-main
if {[info exists nextSetNo]} {
- button-view-history 1
+ button-view-history
}
- button-define-target 0
+ button-define-target
html "<h2>Choose a target</h2><br>\n"
html "<dl>\n"
set useIcons 0
button-main
if {[info exists nextSetNo]} {
- button-view-history 1
+ button-view-history
}
- button-define-target 0
+ button-define-target
}
{
catch maintenance
</head>
<body>
{
-# $Id: tdefine.egw,v 1.4 1996/03/12 16:30:29 adam Exp $
+# $Id: tdefine.egw,v 1.5 1996/03/13 14:07:31 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
}
set useIcons 1
button-main
- button-define-target 1
- button-new-target 0
+ button-define-target
+ button-new-target
html "<h2>Target definition response</h2><br>\n"
html "<p>\n"
set useIcons 0
button-main
- button-define-target 1
- button-new-target 0
+ button-define-target
+ button-new-target
}
{
global debug
</head>
<body>
{
-# $Id: tform.egw,v 1.4 1996/03/12 16:30:29 adam Exp $
+# $Id: tform.egw,v 1.5 1996/03/13 14:07:32 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
}
set useIcons 1
button-main
- button-new-target 0
+ button-new-target
html "<h2>Target definition form</h2><br>\n"
html {<form action="http:} $env(SCRIPT_NAME)
set useIcons 0
button-main
- button-new-target 0
+ button-new-target
}
</body></html>
\ No newline at end of file
#
-# $Id: z39util.tcl,v 1.39 1996/03/12 16:30:30 adam Exp $
+# $Id: z39util.tcl,v 1.40 1996/03/13 14:07:32 adam Exp $
#
proc saveState {} {
uplevel #0 {
set location [$zset getMarc $no field 260 * a]
set publisher [$zset getMarc $no field 260 * b]
set year [$zset getMarc $no field 260 * c]
+ set score [$zset getMarc $no field 999 * r]
} dispError ] } {
html { <a href="http:} $env(SCRIPT_NAME) /
html $sessionId {/showfull.egw/} $setNo + $targetNo + $no + full {">}
html "No Title"
}
html {</a> }
+ if {[scan $score %d nscore]} {
+ html "; Score " $nscore
+ }
} else {
html { <a href="http:} $env(SCRIPT_NAME) /
html $sessionId {/showfull.egw/} $setNo + $targetNo + $no + full {">}
dl-marc-field $zset $no 537 * "Source of data" {} "<br>\n"
dl-marc-field $zset $no 538 * "System details" {} "<br>\n"
dl-marc-field $zset $no 787 {[rstw6]} "Related information" {} "<br>\n"
+ dl-marc-field $zset $no 999 r "Score" {} ", "
dl-marc-field $zset $no 001 * "Local control number" {} ", "
html "</dl>\n"
}
html {<dt><b>Last checked</b><dd>} $data(lastChecked) "<br>\n"
}
if {[info exists data(ip)]} {
- html {<dt><b>Initial text</b><dd>} $data(ip) "</dl><br>\n"
+ html {<dt><b>Initial text</b><dd>} $data(ip) "<br>\n"
}
if {0} {
html {<a href="} $env(SCRIPT_NAME) / $sessionId {/sameas.egw/}
html [egw_enc [$zset getWAIS $no documentID]] {">}
html {Similar WAIS record</a><br>}
}
- html "<dt><b>References</b>\n"
+ if {[info exists data($i,linkage)]} {
+ html "<dt><b>References</b>\n"
+ }
for {set i 1} {[info exists data($i,linkage)]} {incr i} {
html {<dd><a href="} $data($i,linkage) {">}
if {[info exists data($i,title)]} {
if {0} {
regsub -all {\ } [lindex [$zs scanLine $i] 1] + tterm
html {<a href="http:} $env(SCRIPT_NAME)
- html / $sessionId / $scriptQuery / $setNo + $hist($setNo,host) +
+ html / $sessionId / $scriptQuery {;/} $setNo + $hist($setNo,host) +
html $hist($setNo,scan) + $tterm {">}
} else {
regsub -all {\ } [lindex [$zs scanLine $i] 1] + tterm
return 0
}
} elseif {![catch [list $zz.$setNo smallSetUpperBound 0]]} {
- if {$tno > 0} {
- if {[info exists hist($setNo,$tno,hits)]} {
- return 1
- }
- } else {
- if {[info exists hist($setNo,hits)]} {
- return 1
- }
+ if {[info exists hist($setNo,$tno,hits)]} {
+ return 1
}
}
if {$sessionWait != 1} {
return 0
}
- set hist($setNo,hits) [$zz.$setNo resultCount]
+ set hist($setNo,$tno,hits) [$zz.$setNo resultCount]
return 1
}
html {">Previous Records</a>}
}
}
- button-new-query 1 $setNo
- button-new-target 1
- button-view-history 0
+ if {$targetNo > 0} {
+ button-result-set $setNo $targetNo
+ }
+ button-new-query $setNo
+ button-new-target
+ button-view-history
html "<p>\n"
}
if {$zstatus($i) != 2} continue
set status [z39$i.$setNo responseStatus]
if {[lindex $status 0] != "DBOSD"} continue
- if {$hist($setNo,$i,offset) > $hist($setNo,maxPresent)} {
- set nor $hist($setNo,maxPresent)
- } else {
- set nor $hist($setNo,$i,offset)
- }
+ set nor $hist($setNo,$i,offset)
for {set j 1} {$j <= $nor} {incr j} {
if {![string compare [z39$i.$setNo recordType $j] WAIS]} {
set score [z39$i.$setNo getWAIS $j score]
- if {$score > 0} {
- lappend scoreArray [list $score $i $j]
+ } elseif {![string compare [z39$i.$setNo recordType $j] USmarc]} {
+ set score [z39$i.$setNo getMarc $j field 999 * r]
+ if {[scan $score %d score] != 1} {
+ set score 10
}
} else {
- lappend scoreArray [list 10 $i $j]
+ set score 10
+ }
+ if {$score > 0} {
+ lappend scoreArray [list $score $i $j]
}
}
}
if {![info exists scoreArray]} {
html "<br><h3>Search produced no result</h3><br>\n"
- return
+ } else {
+ html "<ul>\n"
+ set scoreSorted [lsort -command score-sort $scoreArray]
+ foreach r $scoreSorted {
+ set i [lindex $r 1]
+ set j [lindex $r 2]
+ display-$hist($setNo,format) z39$i.$setNo $j $setNo $i
+ }
+ html "<br></ul>\n"
}
- set scoreSorted [lsort -command score-sort $scoreArray]
-
- html "<ul>\n"
- foreach r $scoreSorted {
- set i [lindex $r 1]
- set j [lindex $r 2]
- display-$hist($setNo,format) z39$i.$setNo $j $setNo $i
+ for {set i 1} {$i <= $not} {incr i} {
+ if {$zstatus($i) != 2} continue
+ 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 {<dt>} [lindex $targets($hist($setNo,$i,host)) 0]
+ html "<dd>Error: $msg: $addinfo (code $code)<br>\n"
+ }
}
- html "</ul><br>\n"
+ html "\n<br>"
}
proc display-result-set-m-server {setNo} {
global useIcons
global zstatus
global targets
+ global env
+ global sessionId
set not $hist($setNo,0,host)
html "<dl>\n"
for {set i 1} {$i <= $not} {incr i} {
if {$zstatus($i) != 2} continue
- html "<dt><h3>" [lindex $targets($hist($setNo,$i,host)) 0] ": "
set status [z39$i.$setNo responseStatus]
if {[lindex $status 0] == "NSD"} {
+ html "<dt><h3>" [lindex $targets($hist($setNo,$i,host)) 0] ": "
z39$i.$setNo nextResultSetPosition 0
set code [lindex $status 1]
set msg [lindex $status 2]
set addinfo [lindex $status 3]
html "Error</h3>\n<dd>NSD$code: $msg: $addinfo"
} else {
+ html {<dt><a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo + $i + 1
+ html + $hist($setNo,maxPresent) {">}
+ html "<h3>" [lindex $targets($hist($setNo,$i,host)) 0] "</a>: "
set r [z39$i.$setNo resultCount]
html "$r hits</h3>\n<dd>\n"
global html3
global scriptQuery
- set targetNo 0
if {![info exists nextSetNo]} {
return
}
html {<dl>} "\n"
}
for {set setNo 1} {$setNo < $nextSetNo} {incr setNo} {
- if {$hist($setNo,scan) > 0} continue
- set host $hist($setNo,0,host)
- if {$html3} {
- html {<td align=left>}
- } else {
- html {<dt> }
+ if {[info exists hist($setNo,scan)]} {
+ if {$hist($setNo,scan) > 0} continue
}
- html [lindex $targets($host) 0]
- if {$html3} {
- html {<td align=left>} [join $hist($setNo,0,database)]
+ if {[info exists hist($setNo,1,host)]} {
+ set start 1
+ set end $hist($setNo,0,host)
} else {
- if {[llength [lindex $targets($host) 1]] > 1} {
- html ": "
- foreach b $hist($setNo,0,database) {
- html " $b"
+ set start 0
+ set end 0
+ }
+ for {set i $start} {$i <= $end} {incr i} {
+ if {$html3} {
+ html {<td align=left>}
+ } else {
+ html {<dt> }
+ }
+ set host $hist($setNo,$i,host)
+ html [lindex $targets($host) 0]
+ if {$html3} {
+ html {<td align=left>} [join $hist($setNo,$i,database)]
+ } else {
+ if {[llength [lindex $targets($host) 1]] > 1} {
+ html ": "
+ foreach b $hist($setNo,$i,database) {
+ html " $b"
+ }
}
+ html {. }
}
- html {. }
- }
- if {$html3} {
- html {<td align=right>}
- }
- if {[info exists hist($setNo,hits)]} {
- html { <a href="http:} $env(SCRIPT_NAME)
- html / $sessionId {/search.egw/} $setNo + $targetNo + 1
- html + $hist($setNo,maxPresent)
- if {1} {
- html {">} $hist($setNo,hits) {</a>}
+ if {$html3} {
+ html {<td align=right>}
+ }
+ if {[info exists hist($setNo,$i,hits)]} {
+ html { <a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo + $i + 1
+ html + $hist($setNo,maxPresent)
+ html {">} $hist($setNo,$i,hits) {</a>}
} else {
- html {">Result</a>: } $hist($setNo,hits) { hits.}
+ if {$html3} {
+ html {Failed}
+ } else {
+ html {Search failed.}
+ }
}
- } else {
if {$html3} {
- html {Failed}
+ html {<td align=left>}
} else {
- html {Search failed.}
+ html "<dd>\n"
}
- }
- if {$html3} {
- html {<td align=left>}
- } else {
- html "<dd>\n"
- }
- html { <a href="http:} $env(SCRIPT_NAME)
- html / $sessionId / $scriptQuery / $setNo + $host
- if {$html3} {
- html {">}
- } else {
- html {">Query</a>: }
- }
- set op {}
- for {set i 1} {$i <= 3} {incr i} {
- if {[string length $hist($setNo,form,entry$i)] > 0} {
- html " <b>" [join $op " "] "</b> "
- html [join $hist($setNo,form,menu$i)] "="
- html $hist($setNo,form,entry$i)
- set op $hist($setNo,form,logic$i)
+ html { <a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId / $scriptQuery {;/} $setNo + $host
+ if {$html3} {
+ html {">}
+ } else {
+ html {">Query</a>: }
+ }
+ set op {}
+ for {set j 1} {$j <= 3} {incr j} {
+ if {[string length $hist($setNo,form,entry$j)] > 0} {
+ html " <b>" [join $op " "] "</b> "
+ set pre [join $hist($setNo,form,menu$j)]
+ if {[string length $pre] > 0} {
+ html $pre "="
+ }
+ html $hist($setNo,form,entry$j)
+ set op $hist($setNo,form,logic$j)
+ }
+ }
+ if {$html3} {
+ html {</a><tr>} "\n"
}
- }
- if {$html3} {
- html {</a><tr>} "\n"
}
}
if {$html3} {
}
}
-proc button-define-target {more} {
+proc button-define-target {} {
global useIcons
global env
global sessionId
}
}
-proc button-new-target {more} {
+proc button-new-target {} {
global useIcons
global env
global sessionId
- global mMode
global scriptTarget
if {[string length $scriptTarget] == 0} return
}
}
-proc button-view-history {more} {
+proc button-view-history {} {
global useIcons
global env
global sessionId
}
}
-proc button-new-query {more setNo} {
+proc button-new-query {setNo} {
global useIcons
global env
global sessionId
global hist
- global mMode
global scriptQuery
if {!$useIcons} {
html "\n | "
}
html {<a href="http:} $env(SCRIPT_NAME)
- html / $sessionId / $scriptQuery / $setNo + $hist($setNo,0,host) {">}
+ html / $sessionId / $scriptQuery {;/} $setNo + $hist($setNo,0,host) {">}
if {$useIcons} {
html {<img src="/egwgif/button-new-query.gif" }
}
}
-proc button-scan-window {more setNo} {
+proc button-result-set {setNo tno} {
+ global useIcons
+ global env
+ global sessionId
+ global hist
+
+ if {!$useIcons} {
+ html "\n | "
+ }
+ html {<a href="http:} $env(SCRIPT_NAME) / $sessionId
+ if {$tno > 0} {
+ html {/msearch.egw/} $setNo
+ } else {
+ html {/search.egw/} $setNo + $tno
+ }
+ html + 1 + $hist($setNo,maxPresent)
+ if {$useIcons} {
+ html {"><img src="/egwgif/button-result-set.gif" }
+ html {alt="Result Set" border=0></a>}
+ } else {
+ html {">Result Set</a>}
+ }
+}
+
+proc button-scan-window {setNo} {
global useIcons
global env
global sessionId
}
}
+proc serverList {headlineProc targetProc} {
+ global targets
+ global groupsDescription
+
+ proc targetsCmp {l r} {
+ global targets
+ return [string compare [string tolower [lindex $targets($l) 0]] \
+ [string tolower [lindex $targets($r) 0]]]
+ }
+ proc groupCmp {l r} {
+ global groupsOrder
+ if {[catch {set lo $groupsOrder($l)}]} {
+ set lo 10
+ }
+ if {[catch {set ro $groupsOrder($r)}]} {
+ set ro 10
+ }
+ return [expr $lo - $ro]
+ }
+
+ foreach tt [array names targets] {
+ lappend groupsTmp([lindex $targets($tt) 6]) $tt
+ }
+ set gts [lsort -command groupCmp [array names groupsTmp]]
+ foreach gt $gts {
+ if {[info exists groupsDescription($gt)]} {
+ eval $headlineProc [list $groupsDescription($gt)]
+ } else {
+ eval $headlineProc $gt
+ }
+ set tn [lsort -command targetsCmp $groupsTmp($gt)]
+ foreach t $tn {
+ eval $targetProc $t
+ }
+ }
+
+ rename targetsCmp {}
+}
+
if {[info exists utilExtension]} {
source $utilExtension
}
\ No newline at end of file
-# $Id: ztargets.conf,v 1.30 1996/03/12 16:30:30 adam Exp $
+# $Id: ztargets.conf,v 1.31 1996/03/13 14:07:33 adam Exp $
#
# This file contains the predefined targets in the WWW-Z39.50 gateway
# Each target is an entry in the associative array "targets". The
{}
{Middlebury College (DRA).}
1
+ university
}
set targets(rlg.stanford.edu/SAM) [list \
{} \
{Research Libraries group, Stanford University. Sample database} \
1 \
+ z39sample \
]
set targets(z3950.bibsys.no:2100/BIBSYS) [list \
{} \
{BIBSYS; Norway.} \
0 \
+ union \
]
#set targets(dtbsun.dtv.dk:4501/DEM) [list \
{}
{Danish Union Catalogue}
0
+ union
}
-set targets(dtbsun.dtv.dk:9999/usgs-esdd-uah) {
+set targets(dtbsun.dtv.dk:9999/usgs-esdd-iah-cd_rom) {
Zebra
USMARC
{
{ Date {@attr 1=30} }
{ {Doc ID} {@attr 1=1032} }
{ All {@attr 1=1016} }
- { Ranked {@attr 1=1016 @attr 4=105} }
+ { Free-text {@attr 1=1016 @attr 4=105} }
}
{}
- {New Zebra Z39.50 test server with GILS records. Databases: <br>
+ {Zebra Z39.50 test server with GILS records. Databases: <br>
usgs: sample of USGS data directory <br>
esdd: additional Earch Science Data Directory records <br>
- uah: data directory for the International Association of Hydrologists <br>
+ iah: data directory for the International Association of Hydrologists <br>
+ cd_rom: SIG-CAT compendium of CD-ROMs.
}
1
+ gils
}
set targets(z3950.research.att.com/books) [list \
{} \
{AT&T book catalog, mainly IEEE} \
1 \
+ assorted \
]
set targets(dranet.dra.com/drewdb) [list \
{} \
{Sample database of 400,000 bibliographic records from Drew University} \
1 \
+ z39sample \
]
set targets(libcat1.cc.emory.edu/UNICORN) [list \
{} \
{Emory University} \
0 \
+ assorted \
]
set targets(161.253.225.10/UNICORN) [ list \
{} \
{George Washington University} \
0 \
+ assorted \
]
set targets(IBM2.LOC.GOV:2210/BOOKS) [ list \
{} \
{Library of Congress: Production file of monograph (book) records} \
1 \
+ union \
]
set targets(IBM2.LOC.GOV:2210/NAMES) [ list \
{} \
{Library of Congress: Production file of name authority records} \
1 \
+ union \
]
set targets(199.92.147.99/Baystate) [list \
{} \
{Baystate Medical Center} \
0 \
+ assorted \
]
set targets(Tikal.dev.oclc.org/AGRICOLA) [list \
{} \
{OCLC-FirstSearch: AGRICOLA} \
1 \
+ union \
]
set targets(nwi.ub2.lu.se/sverige) {
NWI-Sweden
WAIS \
- { { Ranked {@attr 1=4} } }
+ { { Free-text {@attr 1=4} } }
{}
{Nordic Web Index - Sweden}
1
+ nwi
}
set targets(nwi.ub2.lu.se/new_nor_lib) {
NWI-Norway
WAIS
- { { Ranked {@attr 1=4} } }
+ { { Free-text {@attr 1=4} } }
{}
{Nordic Web Index - Norway}
1
+ nwi
}
set targets(netsrv.casi.sti.nasa.gov:10210/GILS) {
NASA
WAIS
- { { Ranked {@attr 1=4} } }
+ { { Free-text {@attr 1=4} } }
{}
{NASA database}
1
+ gils
}
set targets(localhost:9999/test) {
localwais
WAIS
- { { Ranked {@attr 1=4} } }
+ { { Free-text {@attr 1=4} } }
{}
- {Localhost test base}
+ {WAIS test server on localhost:9999}
1
+ test
}
{}
{Server with description of other Z39.50 databases}
1
+ assorted
}
set targets(z3950.research.att.com/netlib) {
{}
{Netlib server}
1
+ assorted
}
set targets(localhost:210/Default) {
{ Date {@attr 1=30} }
{ {Doc ID} {@attr 1=1032} }
{ All {@attr 1=1016} }
- { Ranked {@attr 1=1016 @attr 4=105} }
+ { Free-text {@attr 1=1016 @attr 4=105} }
}
{}
- {Test server on port 210}
+ {Z39.50 Test server on port 210}
1
+ test
}
+
+set groupsDescription(union) {Union catalogues}
+set groupsOrder(union) 10
+
+set groupsDescription(university) {Universities}
+set groupsOrder(university) 11
+
+set groupsDescription(nwi) {Nordic Web Index servers}
+set groupsOrder(nwi) 12
+
+set groupsDescription(gils) {Government Information Locators (GILS)}
+set groupsOrder(gils) 13
+
+set groupsDescription(assorted) {Assorted servers}
+set groupsOrder(assorted) 14
+
+set groupsDescription(z39sample) {Z39.50 Test sample servers}
+set groupsOrder(z39sample) 99
+
+
+set groupsDescription(test) {Test servers}
+set groupsOrder(test) 100
+