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