1 | // ********************************************************** |
2 | // |
3 | // Display and process a simple form |
4 | // |
5 | // ********************************************************** |
6 | |
7 | require('functions.php'); |
8 | CheckLoggedIn(); |
9 | require('header.php'); |
10 | |
11 | // ******************************************************** |
12 | |
13 | function DisplayJavaScript() |
14 | { |
1 | <script type="text/javascript"> |
1 | |
2 | function apopupwindow(url,title) |
3 | { |
4 | window.open(url,title,"width=420,height=400,resizable=yes,scrollbars=yes"); |
5 | return false; |
6 | } |
7 | |
8 | function toggle_adv(tag) |
9 | { |
10 | var adv = document.getElementById('i-' + tag + '-adv-div') |
11 | var city = document.getElementById('i-' + tag + '-city') |
12 | var cities = document.getElementById('i-' + tag + '-city-pick-1') |
13 | var state = document.getElementById('i-' + tag + '-state') |
14 | var zone = document.getElementById('i-' + tag + '-zone') |
15 | var count = 2; |
16 | |
17 | if (adv.style.display != 'block') |
18 | { |
19 | city.disabled = true |
20 | state.disabled = true |
21 | zone.disabled = true |
22 | adv.style.display = 'block' |
23 | |
24 | while(cities) |
25 | { |
26 | cities.disabled = true |
27 | cities = document.getElementById('i-' + tag + '-city-pick-' + count) |
28 | count ++ |
29 | } |
30 | } |
31 | else |
32 | { |
33 | city.disabled = false |
34 | state.disabled = false |
35 | zone.disabled = false |
36 | adv.style.display = 'none' |
37 | |
38 | while(cities) |
39 | { |
40 | cities.disabled = false |
41 | cities = document.getElementById('i-' + tag + '-city-pick-' + count) |
42 | count++ |
43 | } |
44 | } |
45 | return true; |
46 | } |
47 | |
2 | </script> |
15 | } |
16 | |
17 | // ************************************************************* |
18 | |
19 | if (isset($_POST)) |
20 | { |
21 | $output = open_results(); |
22 | |
23 | write($output,"name:' . $_POST['name']); |
24 | write($output,"email" . $_POST['email']); |
25 | |
26 | // ... |
27 | |
3 | <div class="content"> |
4 | <p> |
1 | Thank you. |
5 | </p> |
6 | </div> |
28 | } |
29 | else |
30 | { |
31 | DisplayJavaScript(); |
7 | <div class="content"> |
8 | <p> |
2 | We need some information from you before we can proceed. Please fill |
3 | out the following form and submit it. We'll be getting back to you |
4 | soon enough. |
9 | </p> |
10 | <form id="Subscribe" method="post" action="sample.php" accept-charset="US-ASCII"> |
11 | <fieldset id="subinfo"> |
12 | <legend> |
5 | Subscription Information |
13 | </legend> |
14 | <p> |
15 | <label for="i-name"> |
6 | Name |
16 | </label> |
17 | <input id="i-name" title="Name" type="text" name="name" value="your name" tabindex="1"> |
18 | <br> |
19 | <label for="i-email"> |
7 | Email |
20 | </label> |
21 | <input id="i-email" title="Email" type="text" name="email" value="you@example.com" tabindex="2"> |
22 | </p> |
23 | <p> |
24 | <label for="i-passwd-a"> |
8 | Password |
25 | </label> |
26 | <input id="i-passwd-a" name="passwd.a" type="password" tabindex="3"> |
27 | <br> |
28 | <label for="i-passwd-b"> |
9 | (again) |
29 | </label> |
30 | <input id="i-passwd-b" name="passwd.b" type="password" tabindex="4"> |
31 | </p> |
32 | </fieldset> |
33 | <fieldset id="birthchart"> |
34 | <legend> |
10 | Information for the Birth Chart |
35 | </legend> |
36 | <p> |
37 | <label for="i-bd-month"> |
11 | Birth date |
38 | </label> |
39 | <select id="i-bd-month" name="bd.month" tabindex="5"> |
40 | <option value="1"> |
12 | January |
41 | </option> |
42 | <option value="2"> |
13 | February |
43 | </option> |
44 | <option value="3"> |
14 | March |
45 | </option> |
46 | <option value="4"> |
15 | April |
47 | </option> |
48 | <option value="5"> |
16 | May |
49 | </option> |
50 | <option value="6"> |
17 | June |
51 | </option> |
52 | <option value="7"> |
18 | July |
53 | </option> |
54 | <option value="8"> |
19 | August |
55 | </option> |
56 | <option value="9"> |
20 | September |
57 | </option> |
58 | <option value="10"> |
21 | October |
59 | </option> |
60 | <option value="11"> |
22 | November |
61 | </option> |
62 | <option value="12"> |
23 | December |
63 | </option> |
64 | </select> |
65 | <input id="i-bd-day" type="text" name="bd.day" value="1" tabindex="6" size="2" maxsize="2"> |
66 | <input id="i-bd-year" type="text" name="bd.year" value="19--" tabindex="7" size="4" maxsize="4"> |
67 | </p> |
68 | <p> |
69 | <label for="i-bd-hour"> |
24 | Birth time |
70 | </label> |
71 | <input id="i-bd-hour" name="bd.hour" type="text" value="1" size="2" maxsize="2" tabindex="8"> |
25 | : |
72 | <input id="i-bd-minute" name="bd.minute" type="text" value="01" size="2" maxsize="2" tabindex="9"> |
73 | <input id="i-bd-am" name="bd.ap" type="radio" value="am" checked="checked" tabindex="10"> |
74 | <label for="i-bd-am"> |
26 | AM |
75 | </label> |
76 | <input id="i-bd-pm" name="bd.ap" type="radio" value="pm" tabindex="11"> |
77 | <label for="i-bd-pm"> |
27 | PM |
78 | </label> |
79 | <input id="i-bd-dst" name="bd.dst" type="checkbox" value="true" tabindex="12"> |
80 | <label for="i-bd-dst"> |
81 | <a href="notes/dst.html" onclick='return apopupwindow("notes/dst.note.html","Daylight Saving Time")'> |
28 | Daylight Saving Time |
82 | </a> |
83 | </label> |
84 | </p> |
85 | <p> |
86 | <label for="i-bd-city"> |
29 | Birth city |
87 | </label> |
88 | <input id="i-bd-city" name="bd.city" type="text" value="Hueytown" tabindex="13"> |
89 | <select id="i-bd-state" name="bd.state" tabindex="14"> |
90 | <option value='AL'> |
30 | Alabama |
91 | </option> |
92 | <option value='AK'> |
31 | Alaska |
93 | </option> |
94 | <option value='AZ'> |
32 | Arizona |
95 | </option> |
96 | <option value='AR'> |
33 | Arkansas |
97 | </option> |
98 | <option value='CA'> |
34 | California |
99 | </option> |
100 | <option value='CO'> |
35 | Colorado |
101 | </option> |
102 | <option value='CT'> |
36 | Connecticut |
103 | </option> |
104 | <option value='DE'> |
37 | Delaware |
105 | </option> |
106 | <option value='FL'> |
38 | Florida |
107 | </option> |
108 | <option value='GA'> |
39 | Georgia |
109 | </option> |
110 | <option value='HI'> |
40 | Hawaii |
111 | </option> |
112 | <option value='ID'> |
41 | Idaho |
113 | </option> |
114 | <option value='IL'> |
42 | Illinois |
115 | </option> |
116 | <option value='IN'> |
43 | Indiana |
117 | </option> |
118 | <option value='IA'> |
44 | Iowa |
119 | </option> |
120 | <option value='KS'> |
45 | Kansas |
121 | </option> |
122 | <option value='KY'> |
46 | Kentucky |
123 | </option> |
124 | <option value='LA'> |
47 | Louisiana |
125 | </option> |
126 | <option value='ME'> |
48 | Maine |
127 | </option> |
128 | <option value='MD'> |
49 | Maryland |
129 | </option> |
130 | <option value='MA'> |
50 | Massachusetts |
131 | </option> |
132 | <option value='MI'> |
51 | Michigan |
133 | </option> |
134 | <option value='MN'> |
52 | Minnesota |
135 | </option> |
136 | <option value='MS'> |
53 | Mississippi |
137 | </option> |
138 | <option value='MO'> |
54 | Missouri |
139 | </option> |
140 | <option value='MT'> |
55 | Montana |
141 | </option> |
142 | <option value='NE'> |
56 | Nebraska |
143 | </option> |
144 | <option value='NV'> |
57 | Nevada |
145 | </option> |
146 | <option value='NH'> |
58 | New Hampshire |
147 | </option> |
148 | <option value='NJ'> |
59 | New Jersey |
149 | </option> |
150 | <option value='NM'> |
60 | New Mexico |
151 | </option> |
152 | <option value='NY'> |
61 | New York |
153 | </option> |
154 | <option value='NC'> |
62 | North Carolina |
155 | </option> |
156 | <option value='ND'> |
63 | North Dakota |
157 | </option> |
158 | <option value='OH'> |
64 | Ohio |
159 | </option> |
160 | <option value='OK'> |
65 | Oklahoma |
161 | </option> |
162 | <option value='OR'> |
66 | Oregon |
163 | </option> |
164 | <option value='PA'> |
67 | Pennsylvania |
165 | </option> |
166 | <option value='RI'> |
68 | Rhode Island |
167 | </option> |
168 | <option value='SC'> |
69 | South Carolina |
169 | </option> |
170 | <option value='SD'> |
70 | South Dakota |
171 | </option> |
172 | <option value='TN'> |
71 | Tennessee |
173 | </option> |
174 | <option value='TX'> |
72 | Texas |
175 | </option> |
176 | <option value='UT'> |
73 | Utah |
177 | </option> |
178 | <option value='VT'> |
74 | Vermont |
179 | </option> |
180 | <option value='VA'> |
75 | Virginia |
181 | </option> |
182 | <option value='WA'> |
76 | Washington |
183 | </option> |
184 | <option value='DC'> |
77 | Washington, DC |
185 | </option> |
186 | <option value='WV'> |
78 | West Virginia |
187 | </option> |
188 | <option value='WI'> |
79 | Wisconsin |
189 | </option> |
190 | <option value='WY'> |
80 | Wyoming |
191 | </option> |
192 | </select> |
193 | </p> |
194 | <p> |
195 | <label for="i-bd-zone"> |
81 | Time Zone |
196 | </label> |
197 | <select id="i-bd-zone" name="bd.zone" tabindex="15"> |
198 | <option value="-5:00"> |
82 | Eastern |
199 | </option> |
200 | <option value="-6:00"> |
83 | Central |
201 | </option> |
202 | <option value="-7:00"> |
84 | Mountain |
203 | </option> |
204 | <option value="-8:00"> |
85 | Pacific |
205 | </option> |
206 | <option value="-9:00"> |
86 | Alaska |
207 | </option> |
208 | <option value="-10:00"> |
87 | Hawaii-Aleutian |
209 | </option> |
210 | </select> |
211 | <input id="i-bd-adv" name="bd.adv" type="checkbox" value="true" onclick='return toggle_adv("bd")' tabindex="16"> |
212 | <label for="i-bd-adv"> |
88 | Advanced |
213 | </label> |
214 | </p> |
215 | <div class="adv" id="i-bd-adv-div"> |
216 | <p> |
89 | Information here overrides the location given above. |
217 | </p> |
218 | <p> |
219 | <label for="i-bd-lat-deg"> |
90 | Latitude |
220 | </label> |
221 | <input id="i-bd-lat-deg" name="bd.lat.deg" type="text" value="33" size="2" maxsize="2" tabindex="17"> |
91 | ° |
222 | <input id="i-bd-lat-min" name="bd.lat.min" type="text" value="26" size="2" maxsize="2" tabindex="18"> |
92 | ′ |
223 | <input id="i-bd-lat-sec" name="bd.lat.sec" type="text" value="15" size="2" maxsize="2" tabindex="19"> |
93 | ″ |
224 | <select id="i-bd-lat-hem" name="bd.lat.hem" tabindex="20"> |
225 | <option> |
94 | N |
226 | </option> |
227 | <option> |
95 | S |
228 | </option> |
229 | </select> |
230 | </p> |
231 | <p> |
232 | <label for="i-bd-long-deg"> |
96 | Longitude |
233 | </label> |
234 | <input id="i-bd-long-deg" name="bd.long.deg" type="text" value="86" size="2" maxsize="2" tabindex="21"> |
97 | ° |
235 | <input id="i-bd-long-min" name="bd.long.min" type="text" value="59" size="2" maxsize="2" tabindex="22"> |
98 | ′ |
236 | <input id="i-bd-long-sec" name="bd.long.sec" type="text" value="51" size="2" maxsize="2" tabindex="23"> |
99 | ″ |
237 | <select id="i-bd-long-hem" name="bd.long.hem" tabindex="24"> |
238 | <option> |
100 | E |
239 | </option> |
240 | <option selected="selected"> |
101 | W |
241 | </option> |
242 | </select> |
243 | </p> |
244 | <p> |
245 | <label for="i-bd-zone-hour"> |
102 | Time Zone |
246 | </label> |
247 | <input id="i-bd-zone-hour" name="bd.zone.hour" type="text" value="-5" size="3" maxsize="3" tabindex="25"> |
103 | : |
248 | <input id="i-bd-zone-min" name="bd.zone.min" type="text" value="00" size="2" maxsize="2" tabindex="26"> |
249 | </p> |
250 | </div> |
251 | </fieldset> |
252 | <fieldset id="location"> |
253 | <legend> |
104 | Information on your current Location |
254 | </legend> |
255 | <p> |
256 | <label for="i-loc-city"> |
105 | Current city |
257 | </label> |
258 | <input id="i-loc-city" name="loc.city" type="text" value="Hueytown" tabindex="27"> |
259 | <select id="i-loc-state" name="loc.state" tabindex="28"> |
260 | <option value='AL'> |
106 | Alabama |
261 | </option> |
262 | <option value='AK'> |
107 | Alaska |
263 | </option> |
264 | <option value='AZ'> |
108 | Arizona |
265 | </option> |
266 | <option value='AR'> |
109 | Arkansas |
267 | </option> |
268 | <option value='CA'> |
110 | California |
269 | </option> |
270 | <option value='CO'> |
111 | Colorado |
271 | </option> |
272 | <option value='CT'> |
112 | Connecticut |
273 | </option> |
274 | <option value='DE'> |
113 | Delaware |
275 | </option> |
276 | <option value='FL'> |
114 | Florida |
277 | </option> |
278 | <option value='GA'> |
115 | Georgia |
279 | </option> |
280 | <option value='HI'> |
116 | Hawaii |
281 | </option> |
282 | <option value='ID'> |
117 | Idaho |
283 | </option> |
284 | <option value='IL'> |
118 | Illinois |
285 | </option> |
286 | <option value='IN'> |
119 | Indiana |
287 | </option> |
288 | <option value='IA'> |
120 | Iowa |
289 | </option> |
290 | <option value='KS'> |
121 | Kansas |
291 | </option> |
292 | <option value='KY'> |
122 | Kentucky |
293 | </option> |
294 | <option value='LA'> |
123 | Louisiana |
295 | </option> |
296 | <option value='ME'> |
124 | Maine |
297 | </option> |
298 | <option value='MD'> |
125 | Maryland |
299 | </option> |
300 | <option value='MA'> |
126 | Massachusetts |
301 | </option> |
302 | <option value='MI'> |
127 | Michigan |
303 | </option> |
304 | <option value='MN'> |
128 | Minnesota |
305 | </option> |
306 | <option value='MS'> |
129 | Mississippi |
307 | </option> |
308 | <option value='MO'> |
130 | Missouri |
309 | </option> |
310 | <option value='MT'> |
131 | Montana |
311 | </option> |
312 | <option value='NE'> |
132 | Nebraska |
313 | </option> |
314 | <option value='NV'> |
133 | Nevada |
315 | </option> |
316 | <option value='NH'> |
134 | New Hampshire |
317 | </option> |
318 | <option value='NJ'> |
135 | New Jersey |
319 | </option> |
320 | <option value='NM'> |
136 | New Mexico |
321 | </option> |
322 | <option value='NY'> |
137 | New York |
323 | </option> |
324 | <option value='NC'> |
138 | North Carolina |
325 | </option> |
326 | <option value='ND'> |
139 | North Dakota |
327 | </option> |
328 | <option value='OH'> |
140 | Ohio |
329 | </option> |
330 | <option value='OK'> |
141 | Oklahoma |
331 | </option> |
332 | <option value='OR'> |
142 | Oregon |
333 | </option> |
334 | <option value='PA'> |
143 | Pennsylvania |
335 | </option> |
336 | <option value='RI'> |
144 | Rhode Island |
337 | </option> |
338 | <option value='SC'> |
145 | South Carolina |
339 | </option> |
340 | <option value='SD'> |
146 | South Dakota |
341 | </option> |
342 | <option value='TN'> |
147 | Tennessee |
343 | </option> |
344 | <option value='TX'> |
148 | Texas |
345 | </option> |
346 | <option value='UT'> |
149 | Utah |
347 | </option> |
348 | <option value='VT'> |
150 | Vermont |
349 | </option> |
350 | <option value='VA'> |
151 | Virginia |
351 | </option> |
352 | <option value='WA'> |
152 | Washington |
353 | </option> |
354 | <option value='DC'> |
153 | Washington, DC |
355 | </option> |
356 | <option value='WV'> |
154 | West Virginia |
357 | </option> |
358 | <option value='WI'> |
155 | Wisconsin |
359 | </option> |
360 | <option value='WY'> |
156 | Wyoming |
361 | </option> |
362 | </select> |
363 | </p> |
364 | <p> |
365 | <label for="i-loc-zone"> |
157 | Time Zone |
366 | </label> |
367 | <select id="i-loc-zone" name="loc.zone" tabindex="29"> |
368 | <option value="-5:00"> |
158 | Eastern |
369 | </option> |
370 | <option value="-6:00"> |
159 | Central |
371 | </option> |
372 | <option value="-7:00"> |
160 | Mountain |
373 | </option> |
374 | <option value="-8:00"> |
161 | Pacific |
375 | </option> |
376 | <option value="-9:00"> |
162 | Alaska |
377 | </option> |
378 | <option value="-10:00"> |
163 | Hawaii-Aleutian |
379 | </option> |
380 | </select> |
381 | <input id="i-loc-adv" name="loc.adv" type="checkbox" onclick="return toggle_adv('loc')" value="true" tabindex="30"> |
382 | <label for="i-loc-adv"> |
164 | Advanced |
383 | </label> |
384 | </p> |
385 | <div class="adv" id="i-loc-adv-div"> |
386 | <p> |
165 | Information here overrides the location given above. |
387 | </p> |
388 | <p> |
389 | <label for="i-loc-lat-deg"> |
166 | Latitude |
390 | </label> |
391 | <input id="i-loc-lat-deg" name="loc.lat.deg" type="text" value="33" size="2" maxsize="2" tabindex="31"> |
167 | ° |
392 | <input id="i-loc-lat-min" name="loc.lat.min" type="text" value="26" size="2" maxsize="2" tabindex="32"> |
168 | ′ |
393 | <input id="i-loc-lat-sec" name="loc.lat.sec" type="text" value="15" size="2" maxsize="2" tabindex="33"> |
169 | ″ |
394 | <select id="i-loc-lat-hem" name="loc.lat.hem" tabindex="34"> |
395 | <option> |
170 | N |
396 | </option> |
397 | <option> |
171 | S |
398 | </option> |
399 | </select> |
400 | </p> |
401 | <p> |
402 | <label for="i-loc-long-deg"> |
172 | Longitude |
403 | </label> |
404 | <input id="i-loc-long-deg" name="loc.long.deg" type="text" value="86" size="2" maxsize="2" tabindex="35"> |
173 | ° |
405 | <input id="i-loc-long-min" name="loc.long.min" type="text" value="59" size="2" maxsize="2" tabindex="36"> |
174 | ′ |
406 | <input id="i-loc-long-sec" name="loc.long.sec" type="text" value="51" size="2" maxsize="2" tabindex="37"> |
175 | ″ |
407 | <select id="i-loc-long-hem" name="loc.long.hem" tabindex="38"> |
408 | <option> |
176 | E |
409 | </option> |
410 | <option selected="selected"> |
177 | W |
411 | </option> |
412 | </select> |
413 | </p> |
414 | <p> |
415 | <label for="i-loc-zone-hour"> |
178 | Time Zone |
416 | </label> |
417 | <input id="i-loc-zone-hour" name="loc.zone.hour" type="text" value="-5" size="3" maxsize="3" tabindex="39"> |
179 | : |
418 | <input id="i-loc-zone-min" name="loc.zone.min" type="text" value="00" size="2" maxsize="2" tabindex="40"> |
419 | </p> |
420 | </div> |
421 | </fieldset> |
422 | <fieldset id="control"> |
423 | <legend> |
180 | Subscribe |
424 | </legend> |
425 | <p style="text-align: center;"> |
426 | <input id="i-submit" type="submit" name="submit" value="Subscribe" tabindex="41"> |
427 | <input id="i-reset" type="reset" name="reset" value="Reset" tabindex="42"> |
428 | </p> |
429 | </fieldset> |
430 | </form> |
431 | </div> |
32 | } |
33 | |
34 | require('footer.php'); |
35 | |