Work on search in multiple targets.
[egate.git] / www / mquery.egw
diff --git a/www/mquery.egw b/www/mquery.egw
new file mode 100644 (file)
index 0000000..27e6e32
--- /dev/null
@@ -0,0 +1,93 @@
+<html>
+<head>
+<title> WWW/Z39.50 Gateway Query Form</title>
+</head>
+<body>
+{
+# $Id: mquery.egw,v 1.1 1995/11/07 14:56:58 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
+
+    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
+    }
+    set hist($setNo,0,host) [expr $i - 1]
+    set host [lindex $hosts 0]
+}
+<hr>
+<h3>Input your search criteria: </h3> <br>
+{
+    set fields [lindex $targets($host) 2]
+    for {set no 1} {$no < 4} {incr no} {
+        html {<select name="menu} $no {">} \n
+        foreach f $fields {
+            html {<option> } [lindex $f 0] \n
+        }
+        html "</select>\n"
+        html {<input type="text" name="entry} $no {" size=30>} \n
+        if {$no < 3} {
+            html {<select name="logic} $no {">} \n
+            html "<option> And\n"
+            html "<option> Or\n"
+            html "<option> And not\n"
+            html "</select>\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>
+<br>
+<p>
+<input type="submit" value="Send Query">
+</form>
+<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"
+    html "sessionId: $sessionId <br>\n"
+    html "sessionParms: $sessionParms <br>\n"
+    foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
+        html $e {: } $env($e) {<br>} \n
+    }
+    html "form: " [wform] " <br>\n"
+    html "target: " $host " <br>\n"
+    html "setNo: " $setNo " <br>\n"
+    html "nextSetNo: " $nextSetNo " <br>\n"
+}
+</body></html>