1 |
<?php |
---|
2 |
/** |
---|
3 |
* @project Chameleon |
---|
4 |
* @revision $Id: Z39Query.phtml,v 1.2 2004/12/03 03:31:57 pspencer Exp $ |
---|
5 |
* @purpose This the main user interface page building Z39 Queries |
---|
6 |
* @author Jason Fournier (dev@dmsolutions.ca) |
---|
7 |
* @copyright |
---|
8 |
* <b>Copyright (c) 2003, DM Solutions Group Inc.</b> |
---|
9 |
* Permission is hereby granted, free of charge, to any person obtaining a |
---|
10 |
* copy of this software and associated documentation files (the "Software"), |
---|
11 |
* to deal in the Software without restriction, including without limitation |
---|
12 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
---|
13 |
* and/or sell copies of the Software, and to permit persons to whom the |
---|
14 |
* Software is furnished to do so, subject to the following conditions: |
---|
15 |
* |
---|
16 |
* The above copyright notice and this permission notice shall be included |
---|
17 |
* in all copies or substantial portions of the Software. |
---|
18 |
* |
---|
19 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
---|
20 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
---|
21 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
---|
22 |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
---|
23 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
---|
24 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
---|
25 |
* DEALINGS IN THE SOFTWARE. |
---|
26 |
**/ |
---|
27 |
|
---|
28 |
// include the supporting php functions |
---|
29 |
include( "./Z39Query.php" ); |
---|
30 |
|
---|
31 |
?> |
---|
32 |
<html> |
---|
33 |
<head> |
---|
34 |
<title>Environment Canada Envirodat Metadata Search</title> |
---|
35 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
36 |
|
---|
37 |
<link href="popup.css" rel="stylesheet" type="text/css"> |
---|
38 |
|
---|
39 |
<style type="text/css"> |
---|
40 |
|
---|
41 |
select |
---|
42 |
{ |
---|
43 |
font-family : verdana,serif,sans-serif,monospace; |
---|
44 |
font-size : 10px; |
---|
45 |
} |
---|
46 |
|
---|
47 |
</style> |
---|
48 |
<script language="JavaScript" src="<?php echo $_SESSION['gszCoreWebPath']; ?>/widgets/js/cwc_dhtml.js" type="text/javascript"></script> |
---|
49 |
<script language="JavaScript" src="<?php echo $_SESSION['gszCoreWebPath']; ?>/widgets/js/cwc_button.js" type="text/javascript"></script> |
---|
50 |
|
---|
51 |
<script language="javascript" type="text/javascript"> |
---|
52 |
|
---|
53 |
function ExecuteQuery() |
---|
54 |
{ |
---|
55 |
|
---|
56 |
var rtnError = 0; |
---|
57 |
|
---|
58 |
// Collection |
---|
59 |
// This is soon to be a set of checkboxes which will not require |
---|
60 |
// any error checking. |
---|
61 |
|
---|
62 |
// Search String |
---|
63 |
var searchString = document.z39query.searchstring.value; |
---|
64 |
// In order to simplify error checking the interface should |
---|
65 |
// be changed to: enter entity -> click add -> adds entity to |
---|
66 |
// a list on the side. Then we build the string here. |
---|
67 |
|
---|
68 |
|
---|
69 |
// Date vars |
---|
70 |
var begDate = document.z39query.begdate.value; |
---|
71 |
var endDate = document.z39query.enddate.value; |
---|
72 |
|
---|
73 |
// Date Error Check |
---|
74 |
if(( begDate != '' ) && ( begDate.length != 8 )) |
---|
75 |
{ |
---|
76 |
alert('The Start Date must be in the format of either yyyymmdd -or- <blank>'); |
---|
77 |
rtnError = 1; |
---|
78 |
return; |
---|
79 |
} |
---|
80 |
else if(( endDate != '' ) && ( endDate.length != 8 )) |
---|
81 |
{ |
---|
82 |
alert('The End Date must be in the format of either yyyymmdd -or- <blank>'); |
---|
83 |
rtnError = 1; |
---|
84 |
return; |
---|
85 |
} |
---|
86 |
|
---|
87 |
// ROI vars |
---|
88 |
var nNorth = document.z39query.north.value; |
---|
89 |
var nSouth = document.z39query.south.value; |
---|
90 |
var nEast = document.z39query.east.value; |
---|
91 |
var nWest = document.z39query.west.value; |
---|
92 |
|
---|
93 |
// ROI Error Check |
---|
94 |
// the ROI should be in DD for Blue Angel and *should* have been converted |
---|
95 |
// onLoad of this form. Assume DD. |
---|
96 |
if( nNorth < nSouth ) |
---|
97 |
{ |
---|
98 |
alert('North must be a greater value than South. Please revise.'); |
---|
99 |
rtnError = 1; |
---|
100 |
return; |
---|
101 |
} |
---|
102 |
else if( nWest < nEast ) |
---|
103 |
{ |
---|
104 |
alert('East must be a greater value than West. Please revise.'); |
---|
105 |
rtnError = 1; |
---|
106 |
return; |
---|
107 |
} |
---|
108 |
|
---|
109 |
// Search Params |
---|
110 |
|
---|
111 |
if( rtnError == 0 ) |
---|
112 |
{ |
---|
113 |
document.z39query.formSubmit.value = 1; |
---|
114 |
document.z39query.submit(); |
---|
115 |
} |
---|
116 |
|
---|
117 |
} |
---|
118 |
function CloseWindow() |
---|
119 |
{ |
---|
120 |
window.close(); |
---|
121 |
} |
---|
122 |
|
---|
123 |
</script> |
---|
124 |
|
---|
125 |
</head> |
---|
126 |
|
---|
127 |
<body class="page" onload="window.focus()"> |
---|
128 |
<form name="z39query" method="post" action="z39QueryResult.phtml"> |
---|
129 |
|
---|
130 |
<!--<input type="hidden" name="responsestylesheet" value="<?php echo $_FORM['responsestylesheet']; ?>">--> |
---|
131 |
<input type="hidden" name="SearchServer" value="<?php if(isset($_FORM['SearchServer'])) echo $_FORM['SearchServer']; ?>"> |
---|
132 |
<input type="hidden" name="GMLName" value="<?php if(isset($_FORM['GMLName'])) echo urldecode($_FORM['GMLName']); ?>"> |
---|
133 |
<input type="hidden" name="formSubmit" value="0"> |
---|
134 |
<input type="hidden" name="SID" value="<?php echo session_id(); ?>"> |
---|
135 |
|
---|
136 |
<table width="500" border="0" cellpadding="1" cellspacing="10"> |
---|
137 |
<tr> |
---|
138 |
<td class="layoutTable"> |
---|
139 |
<table class="titleArea" width="500" border="0" cellpadding="4" cellspacing="0"> |
---|
140 |
<tr> |
---|
141 |
<td><span class="title">Collection</span></td> |
---|
142 |
</tr> |
---|
143 |
</table> |
---|
144 |
<table align="left" class="contentArea" width="500" border="0" cellpadding="4" cellspacing="0"> |
---|
145 |
<tr> |
---|
146 |
<td> |
---|
147 |
<table cellpadding="2" cellspacing="0" border="0"> |
---|
148 |
<tr> |
---|
149 |
<td width="75" align="right"><span class="label">Collection:</span></td> |
---|
150 |
<td><input class=inputBox size="50" type="text" name="collection" value="<?php if(isset($_FORM['collection'])) echo $_FORM['collection']; else echo 'env wq stats geo'; ?>"/></td> |
---|
151 |
</tr> |
---|
152 |
</table> |
---|
153 |
</td> |
---|
154 |
</tr> |
---|
155 |
</table> |
---|
156 |
</td> |
---|
157 |
</tr> |
---|
158 |
<tr> |
---|
159 |
<td class="layoutTable"> |
---|
160 |
<table class="titleArea" width="500" border="0" cellpadding="4" cellspacing="0"> |
---|
161 |
<tr> |
---|
162 |
<td><span class="title">Entity</span></td> |
---|
163 |
</tr> |
---|
164 |
</table> |
---|
165 |
<table align="left" class="contentArea" width="500" border="0" cellpadding="4" cellspacing="0"> |
---|
166 |
<tr> |
---|
167 |
<td> |
---|
168 |
<table cellpadding="2" cellspacing="0" border="0"> |
---|
169 |
<tr> |
---|
170 |
<td width="75" align="right"> </td> |
---|
171 |
<td><span class="note">*In this section you specify the entities you wish to search. Use commas to specify more than one entity.</span></td> |
---|
172 |
</tr> |
---|
173 |
<tr> |
---|
174 |
<td width="75" align="right"><span class="label">Entities:</span></td> |
---|
175 |
<td><input class=inputBox size="50" type="text" name="searchstring" size="25" value="<?php if(isset($_FORM['searchstring'])) echo $_FORM['searchstring']; else echo 'Carbon'; ?>"></td> |
---|
176 |
<!-- <input type="hidden" name="test" value=""> --> |
---|
177 |
</tr> |
---|
178 |
<tr> |
---|
179 |
<td width="75" align="right"><span class="label">Search Type:</span></td> |
---|
180 |
<td> |
---|
181 |
<select class="inputList" name="searchtype" id="searchtype"> |
---|
182 |
<option value="AND" SELECTED>AND</option> |
---|
183 |
<option value="OR">OR</option> |
---|
184 |
</select> |
---|
185 |
</td> |
---|
186 |
</tr> |
---|
187 |
</table> |
---|
188 |
</td> |
---|
189 |
</tr> |
---|
190 |
</table> |
---|
191 |
</td> |
---|
192 |
</tr> |
---|
193 |
<tr> |
---|
194 |
<td class="layoutTable"> |
---|
195 |
<table class="titleArea" width="500" border="0" cellpadding="4" cellspacing="0"> |
---|
196 |
<tr> |
---|
197 |
<td><span class="title">Region Of Interest</span></td> |
---|
198 |
</tr> |
---|
199 |
</table> |
---|
200 |
<table align="center" class="contentArea" width="500" border="0" cellpadding="4" cellspacing="0"> |
---|
201 |
<tr> |
---|
202 |
<td> |
---|
203 |
<table align="center" class="contentArea" width="0" border="0" cellpadding="4" cellspacing="0"> |
---|
204 |
<tr> |
---|
205 |
<td> </td> |
---|
206 |
<td> |
---|
207 |
<span class="label"><b>North</b></span><br> |
---|
208 |
<input class=inputBox size="15" type="text" name="north" size="25" value="<?php if(isset($nMaxY)) echo $nMaxY; ?>"></td> |
---|
209 |
<td> </td> |
---|
210 |
</tr> |
---|
211 |
<tr> |
---|
212 |
<td> |
---|
213 |
<span class="label"><b>West</b></span><br> |
---|
214 |
<input class=inputBox size="15" type="text" name="west" size="25" value="<?php if(isset($nMinX)) echo $nMinX; ?>"> |
---|
215 |
</td> |
---|
216 |
<td> </td> |
---|
217 |
<td> |
---|
218 |
<span class="label"><b>East</b></span><br> |
---|
219 |
<input class=inputBox size="15" type="text" name="east" size="25" value="<?php if(isset($nMaxX)) echo $nMaxX; ?>"> |
---|
220 |
</td> |
---|
221 |
</tr> |
---|
222 |
<tr> |
---|
223 |
<td> </td> |
---|
224 |
<td> |
---|
225 |
<span class="label"><b>South</b></span><br> |
---|
226 |
<input class=inputBox size="15" type="text" name="south" size="25" value="<?php if(isset($nMinY)) echo $nMinY; ?>"> |
---|
227 |
</td> |
---|
228 |
<td> </td> |
---|
229 |
</tr> |
---|
230 |
</table> |
---|
231 |
</td> |
---|
232 |
</tr> |
---|
233 |
</table> |
---|
234 |
</td> |
---|
235 |
</tr> |
---|
236 |
<tr> |
---|
237 |
<td class="layoutTable"> |
---|
238 |
<table class="titleArea" width="500" border="0" cellpadding="4" cellspacing="0"> |
---|
239 |
<tr> |
---|
240 |
<td><span class="title">Additional Criteria</span></td> |
---|
241 |
</tr> |
---|
242 |
</table> |
---|
243 |
<table align="left" class="contentArea" width="500" border="0" cellpadding="4" cellspacing="0"> |
---|
244 |
<tr> |
---|
245 |
<td> |
---|
246 |
<table cellpadding="2" cellspacing="0" border="0"> |
---|
247 |
<tr> |
---|
248 |
<td width="75" align="right"><span class="label">Start Date:</span></td> |
---|
249 |
<td><input class=inputBox size="15" maxlength="8" type="text" name="begdate" value="<?php if(isset($_FORM['begdate'])) echo $_FORM['begdate']; ?>"></td> |
---|
250 |
<td width="75" align="right"><span class="label">End Date:</span></td> |
---|
251 |
<td><input class=inputBox size="15" maxlength="8" type="text" name="enddate" value="<?php if(isset($_FORM['enddate'])) echo $_FORM['enddate']; ?>"></td> |
---|
252 |
</tr> |
---|
253 |
<tr> |
---|
254 |
<td width="75" align="right"><span class="note"> </span></td> |
---|
255 |
<td colspan="3"><span class="note">*date format: yyyymmdd</span></td> |
---|
256 |
</tr> |
---|
257 |
<tr> |
---|
258 |
<td colspan="4" align="right"><img src="./images/a_pixel.gif" width="1" height="5" border="0"></td> |
---|
259 |
</tr> |
---|
260 |
<!-- |
---|
261 |
<tr> |
---|
262 |
<td width="75" align="right"><span class="label">MinX:</span></td> |
---|
263 |
<td><input class=inputBox size="15" type="text" name="west" size="25" value="<?php echo $nMinX; ?>"></td> |
---|
264 |
</tr> |
---|
265 |
<tr> |
---|
266 |
<td width="75" align="right"><span class="label">MaxX:</span></td> |
---|
267 |
<td><input class=inputBox size="15" type="text" name="east" size="25" value="<?php echo $nMaxX; ?>"></td> |
---|
268 |
</tr> |
---|
269 |
<tr> |
---|
270 |
<td width="75" align="right"><span class="label">MinY:</span></td> |
---|
271 |
<td><input class=inputBox size="15" type="text" name="south" size="25" value="<?php echo $nMinY; ?>"></td> |
---|
272 |
</tr> |
---|
273 |
<tr> |
---|
274 |
<td width="75" align="right"><span class="label">MaxY:</span></td> |
---|
275 |
<td><input class=inputBox size="15" type="text" name="north" size="25" value="<?php echo $nMaxY; ?>"></td> |
---|
276 |
</tr> |
---|
277 |
--> |
---|
278 |
<tr> |
---|
279 |
<td colspan="4" align="right"><img src="./images/a_pixel.gif" width="1" height="5" border="0"></td> |
---|
280 |
</tr> |
---|
281 |
<tr> |
---|
282 |
<td width="75" align="right"><span class="label">SearchOffset:</span></td> |
---|
283 |
<td colspan="3"><input class=inputBox size="5" type="text" name="searchoffset" value="<?php if(isset($_FORM['searchoffset'])) echo $_FORM['searchoffset']; else echo '0'; ?>" size="3"></td> |
---|
284 |
</tr> |
---|
285 |
<tr> |
---|
286 |
<td width="75" align="right"><span class="label">DisplayCount:</span></td> |
---|
287 |
<td colspan="3"><input class=inputBox size="5" type="text" name="searchdisplaycount" value="<?php if(isset($_FORM['searchdisplaycount'])) echo $_FORM['searchdisplaycount']; else echo '10'; ?>" size="3"></td> |
---|
288 |
</tr> |
---|
289 |
</table> |
---|
290 |
</td> |
---|
291 |
</tr> |
---|
292 |
</table> |
---|
293 |
</td> |
---|
294 |
</tr> |
---|
295 |
</table> |
---|
296 |
|
---|
297 |
<table width="500" border="0" cellpadding="0" cellspacing="0"> |
---|
298 |
<tr> |
---|
299 |
<td align="right"> |
---|
300 |
<?php echo makeButton( 'ExecuteQuery', '', 'Z39Query', "images/icon_ok.png", "Process", "Update Map", array('width'=>75) ); ?> |
---|
301 |
<?php echo makeButton( 'CloseWindow', '', 'Z39Query', "images/icon_cancel.png", "Close", "Close Dialog", array('width'=>75) ); ?> |
---|
302 |
</td> |
---|
303 |
</tr> |
---|
304 |
</table> |
---|
305 |
|
---|
306 |
</form> |
---|
307 |
</html> |
---|
308 |
|
---|
309 |
|
---|