Arrow gifs.
[egate.git] / www / mquery.egw
1 <html>
2 <head>
3 <title> WWW/Z39.50 Gateway Query Form</title>
4 </head>
5 <body>
6 {
7 # $Id: mquery.egw,v 1.5 1995/11/13 15:41:41 adam Exp $
8
9     if {[info commands saveState] == ""} {
10         source z39util.tcl
11     }
12
13     global setNo
14     global nextSetNo
15     global hist
16     global targets
17
18     if {[catch {set setNo $nextSetNo}]} {
19         set nextSetNo 1
20         set setNo 1
21     }
22
23     html {<form action="http:} $env(SCRIPT_NAME)
24     html / $sessionId {/msearch.egw/} $setNo {" method=post>} \n
25
26     set phost {}
27     set i 0
28     foreach t [lsort [wform target]] {
29         set host [lindex $t 0]
30         set base [lindex $t 1]
31         if {$host != $phost} {
32             set phost $host
33             incr i
34             set hist($setNo,$i,host) $host
35             set hist($setNo,$i,idAuthentication) [lindex $targets($host) 3]
36         }
37         lappend hist($setNo,$i,database) $base
38     }
39     if {$i == 0} {
40         html "<h2>No targets specified</h2></body></html>"
41         wabort 1
42     }
43     set hist($setNo,0,host) $i
44 }
45 <hr>
46 <h3>Input your search criteria: </h3> <br>
47 {
48     set fields [lindex $targets($host) 2]
49     for {set no 1} {$no < 4} {incr no} {
50         html {<select name="menu} $no {">} \n
51         foreach f $fields {
52             html {<option> } [lindex $f 0] \n
53         }
54         html "</select>\n"
55         html {<input type="text" name="entry} $no {" size=30>} \n
56         if {$no < 3} {
57             html {<select name="logic} $no {">} \n
58             html "<option> And\n"
59             html "<option> Or\n"
60             html "<option> And not\n"
61             html "</select>\n"
62         }
63         html "<br>\n"
64     }
65 }
66 <h3> Various technical parameters: </h3> <br>
67 Max hits: <input type="text" name="hits" value="10" size=3>
68 Records are shown in:
69 <select name="format">
70 <option> Long format
71 <option> Medium format
72 <option> Short format
73 <option> Raw MARC
74 </select>
75 <br>
76 <p>
77 <input type=submit value="Search"><input type=reset value="Reset">
78 </form>
79 <hr>
80 This page is maintained by <a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.
81 Last modified 29. september 1995. <br>
82 <em> This and the following pages are under construction
83 and will continue to be so until the end of December 1995.</em>
84 <hr>
85
86 {
87     html {<a href="http:} $env(SCRIPT_NAME)
88     html / $sessionId {/mtargets.egw"> New target </a>}
89 }
90 {
91     html "<hr>\n"
92     html "<h3>Debug information</h3>\n"
93     html "sessionId: $sessionId <br>\n"
94     html "sessionParms: $sessionParms <br>\n"
95     foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
96         html $e {: } $env($e) {<br>} \n
97     }
98     set j $hist($setNo,0,host)
99     for {set i 1} {$i <= $j} {incr i} {
100         html "host=" $hist($setNo,$i,host) " " $hist($setNo,$i,database) 
101         html "<br>\n"
102     }
103     html "form: " [wform] " <br>\n"
104     html "target: " $host " <br>\n"
105     html "setNo: " $setNo " <br>\n"
106     html "nextSetNo: " $nextSetNo " <br>\n"
107 }
108 </body></html>