Added authentication field in target info.
<title>Europagate WWW index</title>
</head>
<body>
-<h2>Europagate WWW index, $Id: egwindex.html,v 1.5 1995/11/07 10:44:30 adam Exp $</h2>
-<p>
-egwcgi ref:
- <a href="http://localhost/cgi-bin/egwcgi/egwtcl/egwscript">egwcgi</a>
+<h2>Europagate WWW index, $Id: egwindex.html,v 1.6 1995/11/08 12:42:16 adam Exp $</h2>
<p>
z39 targets:
<a href="http://localhost/cgi-bin/egwcgi/egwirtcl/targets.egw">targets.egw</a>
-<br>
+(experimental) <br>
Multiple z39 targets:
- <a href="http://localhost/cgi-bin/egwcgi/egwirtcl/mtargets.egw">mtargets.egw</a>
+ <a href="http://localhost/cgi-bin/egwcgi/egwirtcl/mtargets.egw">mtargets.egw</a> (very experimental)
+<br>
</body>
</html>
</head>
<body>
{
-# $Id: query.egw,v 1.9 1995/11/06 17:44:20 adam Exp $
+# $Id: query.egw,v 1.10 1995/11/08 12:42:17 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
set setNo 1
}
set hist($setNo,host) $host
+ set hist($setNo,idAuthentication) [lindex $targets($host) 3]
if {[catch {z39 failback fail-response}]} {
ir z39
}
+
+ html "<h2> Search in " [lindex $targets($host) 0] "</h2>\n"
+
z39 callback ok-response
z39 failback fail-response
if {$host != $oldHost} {
catch {z39 disconnect}
- html "Connecting to target " $host " <br>\n"
set sessionWait 0
if {[catch {z39 connect $host}]} {
html "Cannot connect to target ${host} <br>\n"
}
}
set sessionWait 0
+ z39 idAuthentication $hist($setNo,idAuthentication)
if {[catch {z39 init}]} {
htmlr "Cannot initialize with target ${host} <br>"
htmlr "</body></html>"
}
set databases [lindex $targets($host) 1]
- html "<h2> Search in databases </h2>\n"
html {<form action="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
html / $sessionId {/search.egw/} $setNo {" method=post>} \n
set nodb [llength $databases]
<html>
{
-# $Id: search.egw,v 1.9 1995/11/07 14:56:59 adam Exp $
+# $Id: search.egw,v 1.10 1995/11/08 12:42:17 adam Exp $
+
+proc buttons {setNo setMax startPos} {
+ global sessionId
+ global env
+ global hist
+
+ html "<p>\n"
+ if {$setMax < [z39.$setNo resultCount]} {
+ html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo + [expr $setMax + 1]
+ html + [expr $setMax + $hist($setNo,maxPresent)] {"> Next </a>} "| \n"
+ }
+ if {$startPos != "" && $startPos != "1"} {
+ html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+ html / $sessionId {/search.egw/} $setNo
+ if {[expr $startPos - $hist($setNo,maxPresent)] > 1} {
+ html + [expr $startPos - $hist($setNo,maxPresent)]
+ html + [expr $startPos - 1]
+ }
+ html {"> Prev </a>} "| \n"
+ }
+ html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+ html / $sessionId {/targets.egw"> New target </a>} " | \n"
+ html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+ html / $sessionId {/query.egw/} $hist($setNo,host) + $setNo
+ html {"> New query </a>} "<p>\n"
+}
if {[info commands saveState] == ""} {
source z39util.tcl
if {$setMax > $endPos} {
set setMax $endPos
}
+ if {$setMax > 0} {
+ buttons $setNo $setMax $startPos
+ }
}
if {$setMax > 0} {
z39present $setNo $setOffset $setMax display-brief
}
-}
-
-<hr>
-{
- if {$setMax < [z39.$setNo resultCount]} {
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/search.egw/} $setNo + [expr $setMax + 1]
- html + [expr $setMax + $hist($setNo,maxPresent)] {"> Next </a>} "| \n"
- }
- if {$startPos != "" && $startPos != "1"} {
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/search.egw/} $setNo
- if {[expr $startPos - $hist($setNo,maxPresent)] > 1} {
- html + [expr $startPos - $hist($setNo,maxPresent)]
- html + [expr $startPos - 1]
- }
- html {"> Prev </a>} "| \n"
- }
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/targets.egw"> New target </a>} " | \n"
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/query.egw/} $host + $setNo {"> New query </a>}
+ buttons $setNo $setMax $startPos
}
{
<html>
{
-# $Id: showfull.egw,v 1.4 1995/11/07 14:56:59 adam Exp $
+# $Id: showfull.egw,v 1.5 1995/11/08 12:42:17 adam Exp $
- if {[info commands saveState] == ""} {
- source z39util.tcl
- }
-
- html "<head><title> WWW/Z39.50 Gateway Record " $host " </title>\n"
- html "</head><body>\n"
-
- global setNo
+proc buttons {setNo no} {
+ global sessionId
+ global env
global hist
- set sno [lindex $sessionParms 0]
- set no [lindex $sessionParms 1]
-
- set setNo $sno
-
- if {[z39search $setNo 0] != "1"} {
- return
- }
- set total [z39.$setNo resultCount]
- html "<h2>Record \#$no out of $total </h2><br>\n"
-}
-
-{
+ html "<p>\n"
if {$no < [z39.$setNo resultCount]} {
html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
html / $sessionId {/showfull.egw/} $setNo + [expr $no + 1]
html {"> Next </a>} "| \n"
}
- if {$no > 0} {
+ if {$no > 1} {
html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
html / $sessionId {/showfull.egw/} $setNo + [expr $no - 1]
html {"> Prev </a>} "| \n"
html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
html / $sessionId {/targets.egw"> New target </a>} " | \n"
html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/query.egw/} $host + $setNo {"> New query </a>}
+ html / $sessionId {/query.egw/} $hist($setNo,host) + $setNo
+ html {"> New query </a>} "<p>\n"
}
-{
- z39present $setNo $no $no display-full
-}
-<hr>
-{
- if {$no < [z39.$setNo resultCount]} {
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/showfull.egw/} $setNo + [expr $no + 1]
- html {"> Next </a>} "| \n"
+ if {[info commands saveState] == ""} {
+ source z39util.tcl
}
- if {$no > 0} {
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/showfull.egw/} $setNo + [expr $no - 1]
- html {"> Prev </a>} "| \n"
+
+ html "<head><title> WWW/Z39.50 Gateway Record " $host " </title>\n"
+ html "</head><body>\n"
+
+ global setNo
+ global hist
+
+ set sno [lindex $sessionParms 0]
+ set no [lindex $sessionParms 1]
+
+ set setNo $sno
+
+ if {[z39search $setNo 0] != "1"} {
+ return
}
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/search.egw/} $setNo + 1
- html + [expr $hist($setNo,maxPresent) - 1]
- html {"> Result </a>} "| \n"
-
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/targets.egw"> New target </a>} " | \n"
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/query.egw/} $host + $setNo {"> New query </a>}
-}
+ set total [z39.$setNo resultCount]
+ html "<h2>Record \#$no out of $total </h2><br>\n"
+
+ buttons $setNo $no
+ z39present $setNo $no $no display-full
+
+ buttons $setNo $no
+}
</body>
</html>
<html>
{
-# $Id: targets.egw,v 1.5 1995/11/06 17:44:21 adam Exp $
+# $Id: targets.egw,v 1.6 1995/11/08 12:42:17 adam Exp $
source /usr/local/etc/httpd/conf/ztargets.conf
if {[info commands saveState] == ""} {
source z39util.tcl
<dl>
{
foreach t [array names targets] {
- html {<dt> <a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME) /
- html "$sessionId/query.egw/$t" {"> } $t "</a>\n"
- html "<dd> " [lindex $targets($t) 0] \n
+ html {<dt><a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME) /
+ html "$sessionId/query.egw/$t" {"> } [lindex $targets($t) 0] " </a>\n"
+ set desc [lindex $targets($t) 4]
+ if {$desc != ""} {
+ html "<dd><em>$desc</em>\n"
+ }
}
}
</dl>
* USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $Log: wcgi.c,v $
- * Revision 1.6 1995/11/06 17:44:22 adam
+ * Revision 1.7 1995/11/08 12:42:18 adam
+ * Added descriptive text field in target info.
+ * Added authentication field in target info.
+ *
+ * Revision 1.6 1995/11/06 17:44:22 adam
* State reestablised when shell restarts. History of previous
* result sets.
*
exit (1);
}
#else
-# if 0
+# if 1
fcntl (linein, F_SETFL, O_NONBLOCK);
# endif
while (1)
#
-# $Id: z39util.tcl,v 1.2 1995/11/07 14:57:00 adam Exp $
+# $Id: z39util.tcl,v 1.3 1995/11/08 12:42:18 adam Exp $
#
proc saveState {} {
uplevel #0 {
set rtype [$zset recordType $no]
if {$rtype == "SUTRS"} {
html [join [$zset getSutrs $no]]
- htmlr {<br>}
+ html "<br>\n"
return
}
if {![catch {
html $sessionId {/showfull.egw/} $setNo + $no {"> } $title {</a>}
html " <i> ${year} </i>"
}
- htmlr {<br>}
+ html "<br>\n"
}
proc display-full {zset no} {
if {$add != {}} {
set add " :${add}"
}
- htmlr "<hr> ${no} <br>"
- htmlr "Error ${err}${add} <br>"
+ html "<h3>${no}</h3>\n"
+ html "Error ${err}${add} <br>\n"
return
}
if {$type != "DB"} {
return
}
- htmlr "<hr> ${no} <br>"
+ html "<h3>${no}</h3>\n"
set rtype [$zset recordType $no]
if {$rtype == "SUTRS"} {
- htmlr [join [$zset getSutrs $no]]
+ html [join [$zset getSutrs $no]] "<br>\n"
return
}
if {[catch {set r [$zset getMarc $no line * * *]}]} {
- htmlr "Unknown record type: $rtype"
+ html "Unknown record type: $rtype <br>\n"
return
}
foreach line $r {
html "$tag "
if {$l > 0} {
for {set i 0} {$i < $l} {incr i} {
- if {[string index $tag $i] == " "} {
- html "_"
+ if {[string index $indicator $i] == " "} {
+ html "-"
} else {
html [string index $tag $i]
}
return 0
}
}
+ z39 idAuthentication $hist($setNo,idAuthentication)
set sessionWait 0
if {[catch {z39 init}]} {
html "Cannot initialize with target ${host} <br>\n"
}
set got [z39.$setNo numberOfRecordsReturned]
}
- display-rec $setOffset [expr $got + $setOffset - 1] $dfunc
+ display-rec $setOffset [expr $got + $setOffset - 1] $dfunc z39
set setOffset [expr $got + $setOffset]
set toGet [expr 1 + $setMax - $setOffset]
wflush
global hist
global env
global sessionId
+ global targets
if {![info exists nextSetNo]} {
return
html {<dt> <a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
html / $sessionId {/search.egw/} $setNo + 1
html + [expr $hist($setNo,maxPresent) - 1]
- html {"> } $hist($setNo,host)
+ html {"> } [lindex $targets($hist($setNo,host)) 0]
if {[llength $hist($setNo,database)] > 1} {
html ": "
foreach b $hist($setNo,database) {
-# $Id: ztargets.conf,v 1.5 1995/11/06 17:44:24 adam Exp $
+# $Id: ztargets.conf,v 1.6 1995/11/08 12:42:18 adam Exp $
set commonFields {
{ Title {@attr 1=4} }
{ Author {@attr 1=1003} }
}
set targets(myriad.middlebury.edu) {
- {University somewhere, bla bla}
- {Default}
+ Myriad
+ Default
{ { Title {@attr 1=4} }
{ Author {@attr 1=1003} }
{ Abstract {@attr 1=62} }
{ Date {@attr 1=30} }
{ All {@attr 1=1016} }
- }
+ }
+ {}
+ {Myriad}
}
set targets(rlg.stanford.edu) [list \
- {The famous Stanford University} \
+ rlg \
{BKS AMC MAP MDF REC SCO SER VIM BIB} \
$commonFields \
+ {} \
+ {Research Libraries group, Stanford University}
]
-set targets(bibsys) [list \
- {BIBSYS - Norway} \
+set targets(z3950.bibsys.no:2100) [list \
+ BIBSYS \
BIBSYS \
$commonFields \
+ {} \
+ {BIBSYS - norway} \
]
set targets(dtbsun.dtv.dk:4500) [list \
- {Aleph, Z39.50 Server} \
+ {Aleph} \
{DEM MAR} \
$commonFields \
+ {} \
+ {Aleph, Z39.50 Server on DTV} \
]
-set targets(ir.dbc.bib.dk) [list \
- {SR-DANBIB} \
- DANBIB \
- $commonFields \
+set targets(dtbsun.dtv.dk:210) [list \
+ {SR-DanBib} \
+ danbib \
+ { { Title {@attr 1=4} } \
+ { Author {@attr 1=1} } \
+ { Abstract {@attr 1=62} } \
+ { Date {@attr 1=30} } \
+ { All {@attr 1=1016} } \
+ } \
+ {<<danbib>>} \
+ {SR Target DanBib trough the Europagate gateway} \
]
set targets(localhost:9999) [list \
- ztest9999 \
+ Ztest9999 \
{ABE BETA} \
$commonFields \
+ {} \
+ {Test server on localhost} \
]
set targets(dtbsun.dtv.dk:9999) [list \
- zserver \
+ Zserver \
{usgs esdd cd_rom unknown} \
$commonFields \
+ {} \
+ {New Index Data Z39.50 Server in alpha-test} \
]
set targets(z3950.research.att.com) [list \
- {AT&T Z39.50 Server} \
- {Default} \
+ {AT&T Server} \
+ Default \
$commonFields \
+ {} \
+ {Z39.50 Server at AT&T} \
]
+set targets(dranet.dra.com) [list \
+ {Dranet} \
+ drewdb \
+ $commonFields \
+ {} \
+ {Data Research Z39.50 Server} \
+]