From fa0ddb755d3a836e4e13cc05a6ba3eb6b0010958 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 24 Jan 1996 14:14:18 +0000 Subject: [PATCH] Work on target definitions. --- www/Makefile | 6 +-- www/gif/button-define-target.gif | Bin 0 -> 430 bytes www/query.egw | 9 ++-- www/targets.egw | 3 +- www/tdefine.egw | 96 ++++++++++++++++++++++++++++++++++++++ www/tform.egw | 62 ++++++++++++++++++++++++ www/z39util.tcl | 24 +++++++++- www/ztargets.conf | 4 +- 8 files changed, 191 insertions(+), 13 deletions(-) create mode 100644 www/gif/button-define-target.gif create mode 100644 www/tdefine.egw create mode 100644 www/tform.egw diff --git a/www/Makefile b/www/Makefile index f737871..679f2eb 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1,14 +1,14 @@ # Makefile for www gateway utility # Europagate, 1995 # -# $Id: Makefile,v 1.24 1996/01/24 10:13:56 adam Exp $ +# $Id: Makefile,v 1.25 1996/01/24 14:14:18 adam Exp $ # SHELL=/bin/sh # ZDEFS= ZINC=-I../../yaz/include ZLIB=../../yaz/lib/libyaz.a -#MOSILIB=../../xtimosi/src/libmosi.a -lrfc +MOSILIB=../../xtimosi/src/libmosi.a -lrfc LIBIRTCL=../../ir-tcl/libirtcl.a $(ZLIB) $(MOSILIB) #NETLIB=-lnsl -lsocket # @@ -17,7 +17,7 @@ TCLLIB=/usr/local/lib/libtcl7.4.a TCLINC=-I/usr/local/include # WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \ - mtargets.egw mquery.egw msearch.egw history.egw + mtargets.egw mquery.egw msearch.egw history.egw tform.egw tdefine.egw HSCRIPTS=egwindex.html CONFFILES=ztargets.conf TPROG1=egwcgi diff --git a/www/gif/button-define-target.gif b/www/gif/button-define-target.gif new file mode 100644 index 0000000000000000000000000000000000000000..8fc731dfc6f881f9e1ec69f14c8fc2fd292492a2 GIT binary patch literal 430 zcmV;f0a5-(Nk%v~VLt#-0KxzOz`(%Z-1vB)_*jVe000000000000000EC2ui06zdx z000C22)f+}*y*TU5yZ>M)j!a;lXsWJk+dghA&vF?Ec&_h!@BhHu;ub6#k3WD3 z$!rD(N}_X09SoM#Y}1O>dW&4?cian;&pb1FEl{)1?)Nw@_gV$wx|Xi5Uh{oZe1Thk zgnNcL1dEGBjE!<}kdQuC@*{0q|gW*rzs z9>yQ_HWn25FX6*z5@EH9hin=&ap|ahjOYay8g@ur-i+BU4bPrBa0104bZAkaM|&o1 zw^Uuzb5F@d4L8+W)ooV^Sy2FJXbvk-lz4R)RzVxEXw#})%eJjsv=7d{olCcFSrT~j Y>fOt?uiw9b0}CEZxUk{F91;KkJ8%Zl#Q*>R literal 0 HcmV?d00001 diff --git a/www/query.egw b/www/query.egw index 698c861..b28bcef 100644 --- a/www/query.egw +++ b/www/query.egw @@ -4,7 +4,7 @@ { -# $Id: query.egw,v 1.29 1996/01/24 08:27:28 adam Exp $ +# $Id: query.egw,v 1.30 1996/01/24 14:14:19 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -128,8 +128,8 @@ proc ok-response {} { html { All
} \n } - html "Input your search criteria:
\n" } + html "Input your search criteria:
\n" set fields [lindex $targets($host) 2] for {set no 1} {$no < 4} {incr no} { html {} } - html "
\n" if {$no < 3} { - html {
} \n set template {} if {$oSetNo > 0} { set template [join $hist($oSetNo,form,logic$no) " "] @@ -174,7 +173,7 @@ proc ok-response {} { if {$template == $op} continue html "
\n" + html "\n" } html "
\n" } diff --git a/www/targets.egw b/www/targets.egw index 952707d..2708dc0 100644 --- a/www/targets.egw +++ b/www/targets.egw @@ -1,6 +1,6 @@ { -# $Id: targets.egw,v 1.16 1996/01/24 09:08:30 adam Exp $ +# $Id: targets.egw,v 1.17 1996/01/24 14:14:19 adam Exp $ source ztargets.conf if {[info commands saveState] == ""} { source z39util.tcl @@ -49,6 +49,7 @@ { button-europagate + button-define-target 1 button-view-history 0 } diff --git a/www/tdefine.egw b/www/tdefine.egw new file mode 100644 index 0000000..bd8453b --- /dev/null +++ b/www/tdefine.egw @@ -0,0 +1,96 @@ + + + WWW/Z39.50 Gateway Target Definition Response + + +{ +# $Id: tdefine.egw,v 1.1 1996/01/24 14:14:19 adam Exp $ + + if {[info commands saveState] == ""} { + source z39util.tcl + } + html "

Target definition response


\n" + + set name [lindex [egw_form name] 0] + set description [lindex [egw_form description] 0] + set host [lindex [egw_form host] 0] + set databases [lindex [egw_form databases] 0] + set authentication [egw_form authentication] + set fields [lindex [egw_form fields] 0] + + set ok 1 + if {[string length $name] == 0} { + html "You didn't specify a target name. You must specify" + html " a target name
\n" + set ok 0 + } + if {[string length $host] == 0} { + html "You didn't specify a target name. You must specify" + html " a host name
\n" + set ok 0 + } + if {[string length $databases] == 0} { + html "You didn't specify any database(s). You must specify" + html " at least one database
\n" + set ok 0 + } + catch {unset item} + catch {unset attrList} + set fname {} + foreach e $fields { + set eqn [string first = $e] + if {$eqn > 0} { + lappend item {@attr} $e + } else { + if {[info exists item]} { + lappend attrList [list $fname $item] + set fname {} + unset item + } + if {[string length $fname] > 0} { + set fname "${fname} $e" + } else { + set fname $e + } + } + } + if {[info exists item]} { + lappend attrList [list $fname $item] + } + if {![info exists attrList]} { + html "You didn't specify proper search fields. At least one" + html " search fields must be present
\n" + set ok 0 + } + if {$ok} { + global targets + set targets($host) [list \ + [join $name] \ + $databases \ + $attrList \ + $authentication \ + $description \ + 1 ] + html "Target successfully defined
\n" + } +} +{ + button-europagate + button-define-target 1 + button-new-target 0 +} + +{ + global debug + + if {!$debug} return + + html "name=" $name "
\n" + html "description=" $description "
\n" + html "host=" $host "
\n" + html "databases=" $databases "
\n" + html "fields=" $fields "
\n" + html "attrList=$attrList
\n" +} + + diff --git a/www/tform.egw b/www/tform.egw new file mode 100644 index 0000000..f696723 --- /dev/null +++ b/www/tform.egw @@ -0,0 +1,62 @@ + + + WWW/Z39.50 Gateway Target Definition + + +{ +# $Id: tform.egw,v 1.1 1996/01/24 14:14:20 adam Exp $ + + if {[info commands saveState] == ""} { + source z39util.tcl + } + html "

Target definition form


\n" + html {
} \n + + html "
" + html "\n
Target name\n" + html {
} + + html "\n
Description\n" + html {
} + + html "\n
Host and port\n" + html {
} + html "\n
For example myhost.com:210" + + html "\n
Authentication\n" + html {
} + html "\n
Some targets require authentacation strings, " + html "i.e. passwords. Leave this field empty if no authentication " + html "string is required." + + html "\n
Databases\n" + html {
} + html "\n
Separate each database by blanks" + + html "\n
Search fields\n" + html {
} + html "\n
" + html {Specify search fields, such as Title/Author,ISBN, etc. and } + html {their mappings to the Bib-1 attribute for this target.} + html { Note: If you don't know how to set these - leave them untouched!} + html "" + html "\n

\n" + html {} + html {} + html "\n
\n" +} + +{ + button-europagate + button-new-target 0 +} + \ No newline at end of file diff --git a/www/z39util.tcl b/www/z39util.tcl index 3eb4dff..ca41b99 100644 --- a/www/z39util.tcl +++ b/www/z39util.tcl @@ -1,5 +1,5 @@ # -# $Id: z39util.tcl,v 1.23 1996/01/24 08:27:23 adam Exp $ +# $Id: z39util.tcl,v 1.24 1996/01/24 14:14:20 adam Exp $ # proc saveState {} { uplevel #0 { @@ -998,6 +998,26 @@ proc button-europagate {} { } } +proc button-define-target {more} { + global useIcons + global env + global sessionId + + html {} + } else { + html {">New Target} + if {$more} { + html " | \n" + } else { + html "\n" + } + } +} + proc button-new-target {more} { global useIcons global env @@ -1085,7 +1105,7 @@ proc button-scan-window {more setNo} { proc maintenance {} { html {
This page is maintained by } html { Peter Wad Hansen .} - html {Last modified 9. january 1996.
} + html {Last modified 24. january 1996.
} html { This and the following pages are under construction and } html {will continue to be so until the end of January 1996.} } diff --git a/www/ztargets.conf b/www/ztargets.conf index 5939cf4..b07aced 100644 --- a/www/ztargets.conf +++ b/www/ztargets.conf @@ -1,4 +1,4 @@ -# $Id: ztargets.conf,v 1.17 1996/01/12 16:30:11 adam Exp $ +# $Id: ztargets.conf,v 1.18 1996/01/24 14:14:21 adam Exp $ set commonFields { { Title {@attr 1=4} } { Author {@attr 1=1003} } @@ -83,7 +83,7 @@ set targets(dtbsun.dtv.dk:9999) { 1 } -set targets(z3950.research.att.com) [list \ +set targets(z3950.research.att.com.xx) [list \ {AT&T Server} \ Default \ $commonFields \ -- 1.7.10.4