# Makefile for www gateway utility
# Europagate, 1995
#
-# $Id: Makefile,v 1.38 1996/04/25 10:22:20 adam Exp $
+# $Id: Makefile,v 1.39 1996/05/15 18:43:37 adam Exp $
#
SHELL=/bin/sh
TCLLIB=/usr/local/lib/libtcl7.5.a
TCLINC=
-WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \
- mtargets.egw mquery.egw msearch.egw history.egw tform.egw tdefine.egw \
- sameas.egw nwi.egw nwiutil.tcl
HSCRIPTS=egwindex.html
CONFFILES=egw.res ztargets.conf
TPROG1=egwcgi
echo "Making directory $(HTDOCS)"; \
mkdir $(HTDOCS); \
fi
- @for x in $(WSCRIPTS); do \
+ @for x in *.egw *.tcl; do \
echo Installing $$x; \
cp $$x $(EGWDIR)/$$x; \
done
<html>
{
-# $Id: msearch.egw,v 1.21 1996/03/14 11:50:45 adam Exp $
+# $Id: msearch.egw,v 1.22 1996/05/15 18:43:37 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
incr nextSetNo
for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
- set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3]
+ set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 6]
}
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 hist($setNo,form,entry1) [egw_form entry1]
- set hist($setNo,form,entry2) [egw_form entry2]
- set hist($setNo,form,entry3) [egw_form entry3]
-
- set hist($setNo,form,logic1) [egw_form logic1]
- set hist($setNo,form,logic2) [egw_form logic2]
- set hist($setNo,form,logic3) {}
-
+ for {set i 1} {$i < 6} {incr i} {
+ set hist($setNo,form,menu$i) [egw_form menu$i]
+ set hist($setNo,form,entry$i) [egw_form entry$i]
+ set hist($setNo,form,logic$i) [egw_form logic$i]
+ }
set hist($setNo,maxPresent) [egw_form hits]
if {$hist($setNo,maxPresent) == ""} {
set hist($setNo,maxPresent) 20
<html>
{
-# $Id: nwi.egw,v 1.5 1996/03/15 14:43:44 adam Exp $
+# $Id: nwi.egw,v 1.6 1996/05/15 18:43:37 adam Exp $
source ztargets.conf
set scriptQuery nwi.egw
set curEntry {}
set initSet 0
+
catch {
set initSet [lindex $sessionParms 0]
if {$initSet < 0} {
html {<dt><b>and search the following servers</b><dd>}
- foreach t {
+ set hosts {
+ {mars.dtv.dk:9999/Default}
{nwi.ub2.lu.se/sverige}
- {nwi.ub2.lu.se/new_nor_lib}
- } {
+ }
+ foreach t $hosts {
html {<input type="checkbox" name="host" }
if {[info exists curTargets]} {
if {[lsearch -exact $curTargets $t] != -1} {
}
html "</select></b><br></dl>\n"
+ html {<input type=submit value="Search"><input type=reset value="Reset">}
+
+ html "\n<br><p><hr>\n"
+
+ if {0} {
+ html {<form action="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/msearch.egw/} $setNo {" method=get>} \n
+ }
+
+ html {<b>Advanced search</b><br>}
+
+ set host [lindex $hosts 0]
+ set fields [lindex $targets($host) 2]
+ for {set no 2} {$no < 6} {incr no} {
+
+ html {<select name="menu} $no {">} \n
+ set template {}
+ if {$initSet} {
+ set template [join $hist($initSet,form,menu$no)]
+ }
+ if {[string length $template] > 0} {
+ html {<option> } $template "\n"
+ }
+ foreach f $fields {
+ 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 value="}
+
+ if {$initSet} {
+ if {[info exists hist($initSet,form,entry$no)]} {
+ html [join $hist($initSet,form,entry$no) " "]
+ }
+ }
+ html {">} \n
+ if {$no < 5} {
+ html {<select name="logic} $no {">} \n
+ set template {}
+ if {$initSet} {
+ set template [join $hist($initSet,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"
+ }
+ unset hosts
+ html "</form><br>\n"
set useIcons 0
button-main
+
catch maintenance
}
<html>
{
-# $Id: search.egw,v 1.39 1996/03/14 11:50:48 adam Exp $
+# $Id: search.egw,v 1.40 1996/05/15 18:43:38 adam Exp $
proc start-scan {scanNo targetNo cache dir initSet} {
global sessionId
egw_log debug "z39_scan failed"
return
}
+ if {!$useIcons} {
+ html "\n | "
+ }
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/search.egw/} $setNo + $targetNo +
html [expr $scanNo - 1] + b {">}
html {<img src="/egwgif/button-previous-terms.gif" }
html {alt="Next Terms" border=0></a>}
} else {
- html {Previous Terms</a> | }
+ html {Previous Terms</a>}
}
+ if {!$useIcons} {
+ html "\n | "
+ }
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/search.egw/} $setNo + $targetNo +
html [expr $scanNo + 1] + f {">}
html {<img src="/egwgif/button-next-terms.gif" }
html {alt="Next Terms" border=0></a>}
} else {
- html {Next Terms</a> | }
+ html {Next Terms</a>}
}
html {</a>}
}
button-main
+ if {!$useIcons} {
+ html "\n | "
+ }
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/search.egw/} $setNo + $targetNo +
html [expr $scanNo - 1] + b {">}
html {<img src="/egwgif/button-previous-terms.gif" }
html {alt="Next Terms" border=0></a>}
} else {
- html {Previous Terms</a> | }
+ html {Previous Terms</a>}
}
+ if {!$useIcons} {
+ html "\n | "
+ }
html {<a href="http:} $env(SCRIPT_NAME)
html / $sessionId {/search.egw/} $setNo + $targetNo +
html [expr $scanNo + 1] + f {">}
html {<img src="/egwgif/button-next-terms.gif" }
html {alt="Next Terms" border=0></a>}
} else {
- html {Next Terms</a> | }
+ html {Next Terms</a>}
}
html {</a>}
button-new-query $setNo
#
-# $Id: z39util.tcl,v 1.43 1996/03/26 16:27:03 adam Exp $
+# $Id: z39util.tcl,v 1.44 1996/05/15 18:43:38 adam Exp $
#
proc saveState {} {
uplevel #0 {
egw_log debug "attr failed for $t"
set attr [lindex [lindex [lindex $targets($t) 2] 0] 1]
}
+ egw_log debug "op=${op}"
switch $op {
And
- { set q "@and $q ${attr} \"${term}\"" }
+ { set q "@and $q ${attr} \"${term}\""; egw_log debug AND }
Or
- { set q "@or $q ${attr} \"${term}\"" }
- {And not}
- { set q "@not $q ${attr} \"${term}\"" }
+ { set q "@or $q ${attr} \"${term}\""; egw_log debug OR }
{}
- { set q "${attr} \"${term}\"" }
+ { set q "${attr} \"${term}\""; egw_log debug NOPE }
+ default
+ { set q "@not $q ${attr} \"${term}\""; egw_log debug ANDNOT }
}
set op [egw_form logic$i]
}
html {">Query</a>: }
}
set op {}
- for {set j 1} {$j <= 3} {incr j} {
+ for {set j 1} {$j <= 10} {incr j} {
+ if {![info exists hist($setNo,form,entry$j)]} {
+ break
+ }
if {[string length $hist($setNo,form,entry$j)] > 0} {
html " <b>" [join $op " "] "</b> "
set pre [join $hist($setNo,form,menu$j)]
wais $assoc
} else {
ir $assoc
+ $assoc maximumRecordSize 1000000
}
} else {
if {![string compare [lindex $targets($host) 1] WAIS]} {
} else {
if {[$assoc comstack] == "tcpip"} return
ir $assoc
+ $assoc maximumRecordSize 1000000
}
}
}
-# $Id: ztargets.conf,v 1.33 1996/04/25 10:22:21 adam Exp $
+# $Id: ztargets.conf,v 1.34 1996/05/15 18:43:40 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
set targets(nwi.ub2.lu.se/sverige) {
Sweden
WAIS \
- { { Free-text {@attr 1=4} } }
+ { { {All Fields} {@attr 1=4} } }
{}
{Nordic Web Index - Sweden}
1
}
-set targets(nwi.ub2.lu.se/new_nor_lib) {
- Norway
- WAIS
- { { Free-text {@attr 1=4} } }
+set targets(mars.dtv.dk:9999/Default) {
+ Denmark
+ USMARC
+ { { {All Fields} {@attr 1=1016 @attr 4=105} }
+ { {Title} {@attr 1=4 @attr 4=105} }
+ { {URL} {@attr gils 1=2021} }
+ { {Subject} {@attr 1=29 @attr 4=105} }
+ { {URL links} {@attr gils 1=2047} } }
{}
- {Nordic Web Index - Norway}
+ {Nordic Web Index - Denmark}
1
nwi
}