# 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
#
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
</head>
<body>
{
-# $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
html {<input type="checkbox" name="baseall" value="}
html [concat $databases] {"> All <br>} \n
}
- html "Input your search criteria:<br>\n"
}
+ html "Input your search criteria:<br>\n"
set fields [lindex $targets($host) 2]
for {set no 1} {$no < 4} {incr no} {
html {<select name="menu} $no {">} \n
if {0 && [lsearch [z39 options] scan] >= 0} {
html {<input type="checkbox" name="scan} $no {" value="1" scan>}
}
- html "<br>\n"
if {$no < 3} {
- html {<center><select name="logic} $no {">} \n
+ html {<select name="logic} $no {">} \n
set template {}
if {$oSetNo > 0} {
set template [join $hist($oSetNo,form,logic$no) " "]
if {$template == $op} continue
html "<option> " [join $op " "] \n
}
- html "</select></center>\n"
+ html "</select>\n"
}
html "<br>\n"
}
<html>
{
-# $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
{
button-europagate
+ button-define-target 1
button-view-history 0
}
--- /dev/null
+<html>
+<head>
+<title> WWW/Z39.50 Gateway Target Definition Response</title>
+</head>
+<body>
+{
+# $Id: tdefine.egw,v 1.1 1996/01/24 14:14:19 adam Exp $
+
+ if {[info commands saveState] == ""} {
+ source z39util.tcl
+ }
+ html "<h2>Target definition response</h2><br>\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 <em>must</em> specify"
+ html " a target name<br>\n"
+ set ok 0
+ }
+ if {[string length $host] == 0} {
+ html "You didn't specify a target name. You <em>must</em> specify"
+ html " a host name<br>\n"
+ set ok 0
+ }
+ if {[string length $databases] == 0} {
+ html "You didn't specify any database(s). You <em>must</em> specify"
+ html " at least one database</br>\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<br>\n"
+ set ok 0
+ }
+ if {$ok} {
+ global targets
+ set targets($host) [list \
+ [join $name] \
+ $databases \
+ $attrList \
+ $authentication \
+ $description \
+ 1 ]
+ html "Target successfully defined<br>\n"
+ }
+}
+{
+ button-europagate
+ button-define-target 1
+ button-new-target 0
+}
+
+{
+ global debug
+
+ if {!$debug} return
+
+ html "name=" $name "<br>\n"
+ html "description=" $description "<br>\n"
+ html "host=" $host "<br>\n"
+ html "databases=" $databases "<br>\n"
+ html "fields=" $fields "<br>\n"
+ html "attrList=$attrList<br>\n"
+}
+
+</body></html>
--- /dev/null
+<html>
+<head>
+<title> WWW/Z39.50 Gateway Target Definition</title>
+</head>
+<body>
+{
+# $Id: tform.egw,v 1.1 1996/01/24 14:14:20 adam Exp $
+
+ if {[info commands saveState] == ""} {
+ source z39util.tcl
+ }
+ html "<h2>Target definition form</h2><br>\n"
+ html {<form action="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/tdefine.egw} {" method=post>} \n
+
+ html "<dl>"
+ html "\n<dt>Target name\n"
+ html {<dd><input type="text" size=20 maxlength=20 name="name">}
+
+ html "\n<dt>Description\n"
+ html {<dd><textarea rows=3 cols=50 name="description"></textarea>}
+
+ html "\n<dt>Host and port\n"
+ html {<dd><input type="text" size=50 name="host">}
+ html "\n<br><font size=2>For example myhost.com:210</font>"
+
+ html "\n<dt>Authentication\n"
+ html {<dd><input type="text" size=50 name="authentication">}
+ html "\n<br><font size=2>Some targets require authentacation strings, "
+ html "i.e. passwords. Leave this field empty if no authentication "
+ html "string is required.</font>"
+
+ html "\n<dt>Databases\n"
+ html {<dd><textarea rows=3 cols=50 name="databases"></textarea>}
+ html "\n<br><font size=2>Separate each database by blanks</font>"
+
+ html "\n<dt>Search fields\n"
+ html {<dd><textarea rows=8 cols=50 name="fields">}
+ html "Title 1=4\n"
+ html "Author 1=1003\n"
+ html "Abstract 1=62\n"
+ html "Date 1=30\n"
+ html "Doc Id 1=1032\n"
+ html "All 1=1016\n"
+ html "Ranked 1=1016 4=105\n"
+ html {</textarea>}
+ html "\n<br><font size=2>"
+ 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 "</font>"
+ html "\n</dl><br>\n"
+ html {<input type=submit name=submit value="Submit">}
+ html {<input type=reset value="Reset">}
+ html "\n<br>\n"
+}
+
+{
+ button-europagate
+ button-new-target 0
+}
+</body></html>
\ No newline at end of file
#
-# $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 {
}
}
+proc button-define-target {more} {
+ global useIcons
+ global env
+ global sessionId
+
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/tform.egw}
+ if {$useIcons} {
+ html {"><img src="/egwgif/button-define-target.gif" }
+ html {alt="New Target" border=0></a>}
+ } else {
+ html {">New Target</a>}
+ if {$more} {
+ html " | \n"
+ } else {
+ html "\n"
+ }
+ }
+}
+
proc button-new-target {more} {
global useIcons
global env
proc maintenance {} {
html {<hr>This page is maintained by }
html {<a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.}
- html {Last modified 9. january 1996. <br>}
+ html {Last modified 24. january 1996. <br>}
html {<em> This and the following pages are under construction and }
html {will continue to be so until the end of January 1996.</em>}
}
-# $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} }
1
}
-set targets(z3950.research.att.com) [list \
+set targets(z3950.research.att.com.xx) [list \
{AT&T Server} \
Default \
$commonFields \