1 | <HTML> |
---|
2 | <HEADER> |
---|
3 | <link rel="stylesheet" |
---|
4 | href="./Eccad.css" |
---|
5 | type="text/css" |
---|
6 | media="all"> |
---|
7 | </HEADER> |
---|
8 | <SCRIPT type="text/javascript" SRC="./SelectEccad.js"> </SCRIPT> |
---|
9 | <BODY topmargin="0" leftmargin="0"> |
---|
10 | <? |
---|
11 | //connect to database |
---|
12 | require('adodb/adodb.inc.php'); |
---|
13 | $DB = ADONewConnection('postgres'); |
---|
14 | // $DB->debug = true; |
---|
15 | // $DB->Connect('shiva', 'wwwadm', 'adm001', 'ECCAD'); |
---|
16 | $DB->Connect('eccad', 'eccad', 'adm001', 'ECCADTEST'); |
---|
17 | $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; |
---|
18 | echo '<div id="page">'; |
---|
19 | echo '<div id="centre">'; |
---|
20 | echo '<div class="navigV">'; |
---|
21 | echo '<div class="logo2">'; |
---|
22 | echo '<img src="./images/ECCAD_small.gif" width="80%"></img>'; |
---|
23 | echo '</div>'; |
---|
24 | echo 'Menu de gauche'; |
---|
25 | echo '<ul>'; |
---|
26 | echo '<li><a href="#">ECCAD Home</a></li>'; |
---|
27 | echo '<li><a href="#">Project description</a></li>'; |
---|
28 | echo '<li><a href="#">Context</a></li>'; |
---|
29 | echo '<li><a href="#">Data</a></li>'; |
---|
30 | echo '<li><a href="#">Contact</a></li>'; |
---|
31 | echo '</ul>'; |
---|
32 | echo '</div>'; |
---|
33 | |
---|
34 | |
---|
35 | echo '<div class="contenu">'; |
---|
36 | echo '<div class="pageEccad">'; |
---|
37 | echo "<FORM action='http://postel.medias.cnes.fr/cgi-bin/ion-p' method='GET' enctype='text/plain' class='selection'>" ; |
---|
38 | // echo "<FORM action='clientXmlRpc.php' method='GET' enctype='text/plain' class='selection'>" ; |
---|
39 | echo "<input type='hidden' name='page' value='New.ion'/>"; |
---|
40 | echo '<h1>Data selection</h1>'; |
---|
41 | echo '<h2>Product selection</h2>'; |
---|
42 | |
---|
43 | |
---|
44 | //Selection of the Parameter |
---|
45 | echo '<p><label>Parameter</label>'; |
---|
46 | echo "<select name='Parameter' id='Parameter' onclick='LoadProduct()'>"; |
---|
47 | $rs = $DB->Execute('select * from parametre'); |
---|
48 | while (!$rs->EOF) { |
---|
49 | $fullname = str_replace(" ", "_", $rs->fields[fullname_param]); |
---|
50 | //value of the parameter: |
---|
51 | //id-Name ex: 1-Burnt_Area |
---|
52 | echo "<option value= " . $rs->fields[id_param] ."-".$fullname.">". $rs->fields[fullname_param] . "</option>"; |
---|
53 | $rs->MoveNext(); |
---|
54 | } |
---|
55 | echo "</select></p>"; |
---|
56 | |
---|
57 | //Line of the selection of the Products |
---|
58 | echo "<p id='ProductLine'><label>Product</label>"; |
---|
59 | echo "<select name='Product' id='Product' onclick='LoadDate()'></select>"; |
---|
60 | echo "</p>"; |
---|
61 | |
---|
62 | //Lines of the description of the area |
---|
63 | echo "<div id='ZoneStudy'>"; |
---|
64 | echo "<h2>Zone selection</h2>"; |
---|
65 | echo "<p><h3>Upper Left Corner</h3>"; |
---|
66 | echo "<label>Latitude</label><input type='text' id='UpLeftLat' name='UpLeftLat' value='90' size=5 onKeyUp='VerifyArea()'/>"; |
---|
67 | echo "<label>Longitude</label><input type='text' id='UpLeftLon' name='UpLeftLon' value='-180' size=6 onKeyUp='VerifyArea()'/>"; |
---|
68 | echo "</p>"; |
---|
69 | echo "<p><h3>Lower Right Corner</h3>"; |
---|
70 | echo "<label>Latitude</label><input type='text' id='LowRightLat' name='LowRightLat' value='-90' size=5 onKeyUp='VerifyArea()'/>"; |
---|
71 | echo "<label>Longitude</label><input type='text' id='LowRightLon' name='LowRightLon' value='180' size=6 onKeyUp='VerifyArea()'/>"; |
---|
72 | echo "<div id='ErrorArea'></div></p>"; |
---|
73 | echo "</div>"; |
---|
74 | |
---|
75 | //Line of the selection of the dates |
---|
76 | echo "<div id='Dates'>"; |
---|
77 | echo "<h2>Date selection</h2>"; |
---|
78 | echo "<p>"; |
---|
79 | echo "<label>First date</label>"; |
---|
80 | echo "<select name='Year1' id='Year1' onchange='VerifyDate()'><option value= 0>0</option></select>"; |
---|
81 | echo "<select name='Month1' id='Month1' onchange='VerifyDate()'><option value= 0>0</option></select>"; |
---|
82 | echo "<select name='Day1' id='Day1' onchange='VerifyDate()'><option value= 0>0</option></select>"; |
---|
83 | echo "</p>"; |
---|
84 | echo "<p id='SecondDateLine'>"; |
---|
85 | echo "<label>Last date</label>"; |
---|
86 | echo "<select name='Year2' id='Year2' onchange='VerifyDate()'><option value= 0>0</option></select>"; |
---|
87 | echo "<select name='Month2' id='Month2' onchange='VerifyDate()'><option value= 0>0</option></select>"; |
---|
88 | echo "<select name='Day2' id='Day2' onchange='VerifyDate()'><option value= 0>0</option></select>"; |
---|
89 | echo "</p>"; |
---|
90 | echo "</div>"; |
---|
91 | echo "<div id='ErrorDate'></div>"; |
---|
92 | |
---|
93 | |
---|
94 | echo "<div id='Output'>"; |
---|
95 | echo "<h2>File format</h2>"; |
---|
96 | |
---|
97 | echo "<p id='DFFLine'><label>Data File Format</label>"; |
---|
98 | echo "<SELECT Name='DataFileFormat'>"; |
---|
99 | echo "<OPTION VALUE=1>Ascii</OPTION>"; |
---|
100 | echo "<OPTION VALUE=2>NetCDF</OPTION>"; |
---|
101 | echo "</SELECT></p>"; |
---|
102 | |
---|
103 | echo "<p id='DFCLine'><label>Data Compression</label>"; |
---|
104 | echo "<SELECT Name='DataFileCompress'>"; |
---|
105 | echo "<OPTION VALUE=0>No compress</OPTION>"; |
---|
106 | echo "<OPTION VALUE=1>Zip</OPTION>"; |
---|
107 | echo "<OPTION VALUE=2>Gzip</OPTION>"; |
---|
108 | echo "</SELECT></p>"; |
---|
109 | echo "</div>"; |
---|
110 | echo "<p></p>"; |
---|
111 | echo "<p><INPUT TYPE='SUBMIT' VALUE='Start_visualization' ID='Valid' NAME='Start_visualization' ></p>"; |
---|
112 | echo "</FORM>"; |
---|
113 | |
---|
114 | //Products & Dates are hidden, they appear depending the use case |
---|
115 | echo "<SCRIPT language='javascript'>"; |
---|
116 | echo "document.getElementById('ProductLine').style.visibility='hidden';"; |
---|
117 | echo "document.getElementById('Dates').style.visibility='hidden';"; |
---|
118 | echo "document.getElementById('ZoneStudy').style.visibility='hidden';"; |
---|
119 | echo "document.getElementById('Valid').style.visibility='hidden';"; |
---|
120 | echo "document.getElementById('Output').style.visibility='hidden';"; |
---|
121 | echo "document.getElementById('DFFLine').style.visibility='hidden';"; |
---|
122 | echo "document.getElementById('DFCLine').style.visibility='hidden';"; |
---|
123 | echo "</SCRIPT>\n"; |
---|
124 | |
---|
125 | $DB->Close(); |
---|
126 | ?> |
---|
127 | </div> |
---|
128 | </div> |
---|
129 | </div> |
---|
130 | </div> |
---|
131 | </BODY> |
---|
132 | </HTML> |
---|