</head>
<body>
{
-# $Id: mquery.egw,v 1.1 1995/11/07 14:56:58 adam Exp $
+# $Id: mquery.egw,v 1.6 1995/12/21 15:49:51 adam Exp $
if {[info commands saveState] == ""} {
source z39util.tcl
global setNo
global nextSetNo
global hist
-
- html {<form action="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/msearch.egw/} $setNo {" method=post>} \n
+ global targets
if {[catch {set setNo $nextSetNo}]} {
set nextSetNo 1
set setNo 1
}
- set hosts [wform target]
- html "hosts=$hosts <br>\n"
- set i 1
- foreach host $hosts {
- set hist($setNo,$i,host) $host
- set hist($setNo,$i,database) [lindex [lindex $targets($host) 1] 0]
- incr i
+
+ html {<form action="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/msearch.egw/} $setNo {" method=post>} \n
+
+ set phost {}
+ set i 0
+ foreach t [lsort [wform target]] {
+ set host [lindex $t 0]
+ set base [lindex $t 1]
+ if {$host != $phost} {
+ set phost $host
+ incr i
+ set hist($setNo,$i,host) $host
+ set hist($setNo,$i,idAuthentication) [lindex $targets($host) 3]
+ }
+ lappend hist($setNo,$i,database) $base
+ }
+ if {$i == 0} {
+ html "<h2>No targets specified</h2></body></html>"
+ wabort 1
}
- set hist($setNo,0,host) [expr $i - 1]
- set host [lindex $hosts 0]
+ set hist($setNo,0,host) $i
}
-<hr>
-<h3>Input your search criteria: </h3> <br>
+<h2>Input your search criteria: </h2><br>
{
set fields [lindex $targets($host) 2]
for {set no 1} {$no < 4} {incr no} {
html {<option> } [lindex $f 0] \n
}
html "</select>\n"
- html {<input type="text" name="entry} $no {" size=30>} \n
+ html {<input type="text" name="entry} $no {" size=35>} \n
if {$no < 3} {
html {<select name="logic} $no {">} \n
html "<option> And\n"
html "<br>\n"
}
}
-<h3> Various technical parameters: </h3> <br>
-Max hits: <input type="text" name="hits" value="10" size=3>
-Records are shown in:
-<select name="format">
-<option> Long format
-<option> Medium format
-<option> Short format
-<option> Raw MARC
-</select>
+<input type=submit value="Search"><input type=reset value="Reset">
<br>
-<p>
-<input type="submit" value="Send Query">
+{
+ html {Number of records to display in the result set list: }
+ html {<input type="text" name="hits" value="}
+ html 10
+ html {" size=3>}
+}
</form>
+{
+ global useIcons
+ if {$useIcons} {
+ html {<img src="/gif/button-egw.gif">}
+ }
+ html {<a href="http:} $env(SCRIPT_NAME)
+ html / $sessionId {/mtargets.egw}
+ if {$useIcons} {
+ html {"><img src="/gif/button-new-target.gif" border=0></a>}
+ } else {
+ html {"> New target </a>}
+ }
+}
<hr>
This page is maintained by <a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.
Last modified 29. september 1995. <br>
<em> This and the following pages are under construction
and will continue to be so until the end of December 1995.</em>
-<hr>
-
-{
- html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
- html / $sessionId {/mtargets.egw"> New target </a>}
-}
{
html "<hr>\n"
html "<h3>Debug information</h3>\n"
foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
html $e {: } $env($e) {<br>} \n
}
+ set j $hist($setNo,0,host)
+ for {set i 1} {$i <= $j} {incr i} {
+ html "host=" $hist($setNo,$i,host) " " $hist($setNo,$i,database)
+ html "<br>\n"
+ }
html "form: " [wform] " <br>\n"
html "target: " $host " <br>\n"
html "setNo: " $setNo " <br>\n"