[17] | 1 | <%@ page import="fr.acri.norm.*" %> |
---|
| 2 | |
---|
| 3 | <%@ page import="java.io.*" %> |
---|
| 4 | <%@ page import="java.util.*" %> |
---|
| 5 | <%@ page import="java.lang.*" %> |
---|
| 6 | <%@ include file="conf_visu.jsp" %> |
---|
| 7 | <% |
---|
| 8 | |
---|
| 9 | send_request req = new send_request(); |
---|
| 10 | int nexp=-1, k=0, indice=0, i=0, j=0; |
---|
| 11 | String class_temp="",sel_tpl_id="", sql="", error_msg="", error_msgl="", idt="", selected="", modef="", appel="", graph_sel=""; |
---|
| 12 | |
---|
| 13 | String[] exp_columns={"exp_id"}, traces_columns={"ttid","tt_nom"}, tabTraces = new String[21], tabTracesAuto = new String[22]; |
---|
| 14 | |
---|
| 15 | String sel_tpl_name=request.getParameter("sel_tpl_name"); |
---|
| 16 | modef=request.getParameter("modef"); |
---|
| 17 | if (modef=="" || modef=="null" || modef.equals("") || modef.equals("null")) { |
---|
| 18 | modef=""; |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | graph_sel=request.getParameter("graph_sel"); |
---|
| 22 | if (graph_sel=="" || graph_sel=="null" || graph_sel.equals("") || graph_sel.equals("null")) { |
---|
| 23 | graph_sel=""; |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | appel=request.getParameter("appel"); |
---|
| 28 | if (appel=="" || appel=="null" || appel.equals("") || appel.equals("null")) { |
---|
| 29 | appel=""; |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | |
---|
| 33 | for (indice=0 ; indice<tabTraces.length ; indice++) { |
---|
| 34 | tabTracesAuto[indice]="disabled"; |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | tabTraces[0]=VERTICAL_ANALYSIS; |
---|
| 39 | tabTraces[1]=TIME_ANALYSIS; |
---|
| 40 | tabTraces[2]=XY_PLOT; |
---|
| 41 | tabTraces[3]=CONTOUR; |
---|
| 42 | tabTraces[4]="11"; |
---|
| 43 | tabTraces[7]="5"; |
---|
| 44 | tabTraces[5]=DOT_PLOT; |
---|
| 45 | tabTraces[6]=_2D_TRAJECTORY; |
---|
| 46 | tabTraces[8]="7"; |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | if (!sel_tpl_name.equals("") && !sel_tpl_name.equals("null")) { |
---|
| 50 | sql="SELECT exp_id FROM ether.ether_experiment WHERE exp_name='"+sel_tpl_name+"'"; |
---|
| 51 | |
---|
| 52 | ArrayList exp_list=req.get_list(sql,exp_columns); |
---|
| 53 | |
---|
| 54 | if (exp_list==null || exp_list.size()==0) error_msg="No file class found in the databse"; |
---|
| 55 | else { |
---|
| 56 | nexp=exp_list.size()/exp_columns.length; |
---|
| 57 | if (nexp>0) { |
---|
| 58 | sel_tpl_id=exp_list.get(0).toString(); |
---|
| 59 | sql="SELECT sil_trace_autorise.tt_id as ttid, tt_acronyme as tt_nom FROM sil_trace_autorise, sil_type_trace "; |
---|
| 60 | sql+="WHERE sil_trace_autorise.tt_id=sil_type_trace.tt_id "; |
---|
| 61 | sql+="and exp_id="+sel_tpl_id; |
---|
| 62 | |
---|
| 63 | ArrayList exp_list_traces=req.get_list(sql,traces_columns); |
---|
| 64 | if (exp_list_traces==null || exp_list_traces.size()==0) error_msgl="NO LAYOUT FOR THIS EXPERIMENT AT THE MOMENT"; |
---|
| 65 | else { |
---|
| 66 | nexp=exp_list_traces.size()/traces_columns.length; |
---|
| 67 | if (nexp>0) { |
---|
| 68 | k=0; |
---|
| 69 | for(i=0;i<nexp;i++) { |
---|
| 70 | idt=exp_list_traces.get(k).toString(); |
---|
| 71 | for (indice=0 ; indice<tabTraces.length ; indice++) { |
---|
| 72 | if (idt.equals(tabTraces[indice])) { |
---|
| 73 | tabTracesAuto[indice]=""; |
---|
| 74 | if (tabTraces[indice].equals(graph_sel)) tabTracesAuto[indice]+=" checked"; |
---|
| 75 | } |
---|
| 76 | } |
---|
| 77 | k+=traces_columns.length; |
---|
| 78 | } |
---|
| 79 | } |
---|
| 80 | |
---|
| 81 | } |
---|
| 82 | } |
---|
| 83 | |
---|
| 84 | } |
---|
| 85 | } |
---|
| 86 | |
---|
| 87 | for (i=0 ; i<22 ; i++) { |
---|
| 88 | // out.write(i+"="+tabTracesAuto[i]+" -- "); |
---|
| 89 | |
---|
| 90 | } |
---|
| 91 | req.close_connection(); |
---|
| 92 | %> |
---|
| 93 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
---|
| 94 | <html> |
---|
| 95 | <head> |
---|
| 96 | <meta http-equiv="pragma" content="no-cache"> |
---|
| 97 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
| 98 | <title>Graphicslist</title> |
---|
| 99 | <link rel="stylesheet" href="ether.css" type="text/css"> |
---|
| 100 | |
---|
| 101 | <script language="Javascript"> |
---|
| 102 | <%if (error_msgl.equals("") || error_msgl==null) {%> |
---|
| 103 | function inactiveGraph() { |
---|
| 104 | //document.thisForm.graph_sel[0].checked=false; |
---|
| 105 | //document.thisForm.graph_sel[1].checked=false; |
---|
| 106 | //document.thisForm.graph_sel[2].checked=false; |
---|
| 107 | |
---|
| 108 | } |
---|
| 109 | |
---|
| 110 | function Newfen (URL,NAME,W,H) |
---|
| 111 | { |
---|
| 112 | var wconf = 'scrollbars=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,width=' + W + ',height=' + H; |
---|
| 113 | var w = window.open (URL, NAME, wconf); |
---|
| 114 | } |
---|
| 115 | |
---|
| 116 | function choixForm() { |
---|
| 117 | var i=0; |
---|
| 118 | var j=0; |
---|
| 119 | var graph=''; |
---|
| 120 | var mt=''; |
---|
| 121 | for (i=3 ;i<document.thisForm.meta_type.length ; i++) { |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | if (document.thisForm.meta_type[i].checked==true) { |
---|
| 125 | mt=document.thisForm.meta_type[i].value; |
---|
| 126 | |
---|
| 127 | } |
---|
| 128 | } |
---|
| 129 | for (j=0 ;j<document.thisForm.graph_sel.length ; j++) { |
---|
| 130 | if (document.thisForm.graph_sel[j].checked==true) { |
---|
| 131 | graph=document.thisForm.graph_sel[j].value; |
---|
| 132 | window.opener.document.thisForm.meta_type.value=mt; |
---|
| 133 | window.opener.document.thisForm.graph_sel.value=graph; |
---|
| 134 | |
---|
| 135 | if (graph=="13") { |
---|
| 136 | window.opener.document.thisForm.imSelected.value="Icons/contour.gif"; |
---|
| 137 | } |
---|
| 138 | else if (graph=="3") { |
---|
| 139 | window.opener.document.thisForm.imSelected.value="Icons/plot_2d.gif"; |
---|
| 140 | } |
---|
| 141 | else if (graph=="0") { |
---|
| 142 | window.opener.document.thisForm.imSelected.value="Icons/vertical_analysis.jpg"; |
---|
| 143 | } |
---|
| 144 | else if (graph=="1") { |
---|
| 145 | window.opener.document.thisForm.imSelected.value="Icons/time_analysis.jpg"; |
---|
| 146 | } |
---|
| 147 | else if (graph=="2") { |
---|
| 148 | window.opener.document.thisForm.imSelected.value="Icons/xy_plot.jpg"; |
---|
| 149 | } |
---|
| 150 | else if (graph=="4") { |
---|
| 151 | window.opener.document.thisForm.imSelected.value="Icons/2D_trajectory.jpg"; |
---|
| 152 | } |
---|
| 153 | |
---|
| 154 | if ((document.thisForm.graph_sel_form.value=='<%=_2D_TRAJECTORY%>' && graph!='<%=_2D_TRAJECTORY%>') || (document.thisForm.graph_sel_form.value!='<%=_2D_TRAJECTORY%>' && graph=='<%=_2D_TRAJECTORY%>')) { |
---|
| 155 | window.opener.document.thisForm.sel_tpl_id.value=''; |
---|
| 156 | |
---|
| 157 | window.opener.document.thisForm.latmin.value=''; |
---|
| 158 | window.opener.document.thisForm.latmax.value=''; |
---|
| 159 | window.opener.document.thisForm.lonmax.value=''; |
---|
| 160 | window.opener.document.thisForm.lonmin.value=''; |
---|
| 161 | |
---|
| 162 | window.opener.blocForm(); |
---|
| 163 | } |
---|
| 164 | |
---|
| 165 | if (document.thisForm.appel.value=="1") window.opener.initForm('3'); |
---|
| 166 | |
---|
| 167 | window.opener.blocForm(); |
---|
| 168 | window.close(); |
---|
| 169 | } |
---|
| 170 | } |
---|
| 171 | if (graph=="") { |
---|
| 172 | alert("Select a layout to draw"); |
---|
| 173 | return false; |
---|
| 174 | } |
---|
| 175 | } |
---|
| 176 | |
---|
| 177 | |
---|
| 178 | function updateMeta(ind) { |
---|
| 179 | for (j=0 ;j<document.thisForm.meta_type.length ; j++) { |
---|
| 180 | if (document.thisForm.meta_type[j].value==ind) { |
---|
| 181 | document.thisForm.meta_type[j].checked=true; |
---|
| 182 | } |
---|
| 183 | } |
---|
| 184 | |
---|
| 185 | } |
---|
| 186 | //--> |
---|
| 187 | <%}%> |
---|
| 188 | </script> |
---|
| 189 | |
---|
| 190 | </head> |
---|
| 191 | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#ffffff" onUnload="" onLoad=""> |
---|
| 192 | <form name="thisForm" method="get"> |
---|
| 193 | <%if (error_msgl.equals("") || error_msgl==null) {%> |
---|
| 194 | <table border="0" cellpadding="2" cellspacing="2" width="100%"> |
---|
| 195 | <input type="hidden" name="modef" value="<%=modef%>"> |
---|
| 196 | <input type="hidden" value="<%=sel_tpl_name%>" name="sel_tpl_name"> |
---|
| 197 | <input type="hidden" value="<%=appel%>" name="appel"> |
---|
| 198 | <input type="hidden" value="<%=graph_sel%>" name="graph_sel_form"> |
---|
| 199 | |
---|
| 200 | <tr><td colspan=2 class="titreN"><b>GRAPHIC TYPES</b></td></tr> |
---|
| 201 | <tr> |
---|
| 202 | <td width="20"><input type="radio" checked name="meta_type" value="0"></td> |
---|
| 203 | <td class="rubrique" align="left"><b> |
---|
| 204 | VERTICAL PROFIL</b></td> |
---|
| 205 | <td align="right" class="normal"> </td> |
---|
| 206 | |
---|
| 207 | </tr> |
---|
| 208 | <tr> |
---|
| 209 | <td colspan="3"> </td> |
---|
| 210 | </tr> |
---|
| 211 | <tr> |
---|
| 212 | <td colspan="3" align="center"> |
---|
| 213 | <table border="0" cellpadding="2" cellspacing="0"> |
---|
| 214 | <tr> |
---|
| 215 | <td colspan="3"><img src="Icons/line.gif" width="300" height="10"></td> |
---|
| 216 | </tr> |
---|
| 217 | <tr> |
---|
| 218 | <td><input type="radio" name="graph_sel" value="<%=VERTICAL_ANALYSIS%>" onClick="updateMeta('0');" <%=tabTracesAuto[0]%>></td> |
---|
| 219 | <td class=<%if (tabTracesAuto[0].equals("disabled")) {out.write("inactif2");} else {out.write("normal");}%> align="left">VERTICAL ANALYSIS</td> |
---|
| 220 | <td align="center"><a href="Javascript:Newfen('Icons/vertical_analysis.jpg','graph','120','120')"><img src="Icons/vertical_analysis.jpg" width="50" height="50" border="1"></a></td> |
---|
| 221 | |
---|
| 222 | </tr> |
---|
| 223 | <tr> |
---|
| 224 | <td colspan="3"><img src="Icons/line.gif" width="300" height="10"></td> |
---|
| 225 | </tr> |
---|
| 226 | <tr> |
---|
| 227 | <td><input type="radio" name="graph_sel" value="<%=TIME_ANALYSIS%>" onClick="updateMeta('0');" <%=tabTracesAuto[1]%>></td> |
---|
| 228 | <td class=<%if (tabTracesAuto[1].equals("disabled")) {out.write("inactif2");} else {out.write("normal");}%> align="left">TIME ANALYSIS</td> |
---|
| 229 | <td align="center"><a href="Javascript:Newfen('Icons/time_analysis.gif','graph','120','120')"><img src="Icons/time_analysis.jpg" width="50" height="50" border="1"></a></td> |
---|
| 230 | </tr> |
---|
| 231 | <tr> |
---|
| 232 | <td colspan="3"><img src="Icons/line.gif" width="300" height="10"></td> |
---|
| 233 | </tr> |
---|
| 234 | <tr> |
---|
| 235 | <td><input type="radio" name="graph_sel" value="<%=XY_PLOT%>" onClick="updateMeta('0');" <%=tabTracesAuto[2]%>></td> |
---|
| 236 | <td class=<%if (tabTracesAuto[2].equals("disabled")) {out.write("inactif2");} else {out.write("normal");}%> align="left">XY PLOT</td> |
---|
| 237 | <td align="center"><a href="Javascript:Newfen('Icons/xy_plot.jpg','graph','120','120')"><img src="Icons/xy_plot.jpg" width="50" height="50" border="1"></a></td> |
---|
| 238 | </tr> |
---|
| 239 | <tr> |
---|
| 240 | <td colspan="3"><img src="Icons/line.gif" width="300" height="10"></td> |
---|
| 241 | </tr> |
---|
| 242 | |
---|
| 243 | </table> |
---|
| 244 | </td> |
---|
| 245 | </tr> |
---|
| 246 | <tr><td colspan="3"></td></tr> |
---|
| 247 | <tr><td colspan="3"></td></tr> |
---|
| 248 | <tr><td colspan="3"></td></tr> |
---|
| 249 | <tr><td colspan="3"></td></tr> |
---|
| 250 | |
---|
| 251 | </tr> |
---|
| 252 | |
---|
| 253 | <tr> |
---|
| 254 | <td width="20"><input type="radio" name="meta_type" value="3" onClick="inactiveGraph();"></td> |
---|
| 255 | <td class="rubrique" align="left"><b> |
---|
| 256 | MAP 2D (standard or stereopolar projection)</b></td> |
---|
| 257 | <td align="right" class="normal"> </td> |
---|
| 258 | |
---|
| 259 | </tr> |
---|
| 260 | <tr> |
---|
| 261 | <td colspan="3"> </td> |
---|
| 262 | </tr> |
---|
| 263 | <% |
---|
| 264 | if (tabTracesAuto[5].equals("disabled")) { |
---|
| 265 | class_temp="inactif2"; |
---|
| 266 | } |
---|
| 267 | else class_temp="normal"; |
---|
| 268 | %> |
---|
| 269 | |
---|
| 270 | <tr> |
---|
| 271 | <td colspan="3" align="center"> |
---|
| 272 | <table border="0" cellpadding="2" cellspacing="0"> |
---|
| 273 | <tr> |
---|
| 274 | <td colspan="3"><img src="Icons/line.gif" width="300" height="10"></td> |
---|
| 275 | </tr> |
---|
| 276 | <tr> |
---|
| 277 | <td><input type="radio" name="graph_sel" value="<%=DOT_PLOT%>" onClick="updateMeta('3');" <%=tabTracesAuto[5]%>></td> |
---|
| 278 | <td class="<%=class_temp%>" align="left">DOT DISTRIBUTION</td> |
---|
| 279 | <td align="center"><a href="Javascript:Newfen('Icons/plot_2d.gif','graph','120','120')"><img src="Icons/plot_2d.gif" width="50" height="50" border=" |
---|
| 280 | 1"></a></td> |
---|
| 281 | </tr> |
---|
| 282 | <tr> |
---|
| 283 | <td colspan="3"><img src="Icons/line.gif" width="300" height="10"></td> |
---|
| 284 | </tr> |
---|
| 285 | <% |
---|
| 286 | if (tabTracesAuto[3].equals("disabled")) { |
---|
| 287 | class_temp="inactif2"; |
---|
| 288 | } |
---|
| 289 | else class_temp="normal"; |
---|
| 290 | %> |
---|
| 291 | <tr> |
---|
| 292 | <td><input type="radio" name="graph_sel" value="<%=CONTOUR%>" onClick="updateMeta('3');" <%=tabTracesAuto[3]%>></td> |
---|
| 293 | <td class="<%=class_temp%>" align="left">CONTOUR</td> |
---|
| 294 | <td align="center"><a href="Javascript:Newfen('Icons/contour.gif','graph','120','120')"><img src="Icons/contour.gif" width="50" height="50" border="1"></a></td> |
---|
| 295 | </tr> |
---|
| 296 | <tr><td colspan="3"><img src="Icons/line.gif" width="300" height="10"></td></tr> |
---|
| 297 | |
---|
| 298 | <% |
---|
| 299 | if (tabTracesAuto[8].equals("disabled")) { |
---|
| 300 | class_temp="inactif2"; |
---|
| 301 | } |
---|
| 302 | else class_temp="normal"; |
---|
| 303 | %> |
---|
| 304 | <tr> |
---|
| 305 | <td><input type="radio" name="graph_sel" value="<%=_2D_TRAJECTORY%>" onClick="updateMeta('3');" <%=tabTracesAuto[6]%>></td> |
---|
| 306 | <td class="<%=class_temp%>" align="left">2D TRAJEECTORY</td> |
---|
| 307 | <td align="center"><a href="Javascript:Newfen('Icons/2D_trajectory.jpg','graph','120','120')"><img src="Icons/2D_trajectory.jpg" width="50" height="50" border="1"></a></td> |
---|
| 308 | </tr> |
---|
| 309 | <tr><td colspan="3"><img src="Icons/line.gif" width="300" height="10"></td></tr> |
---|
| 310 | |
---|
| 311 | <tr><td colspan="3"></td></tr> |
---|
| 312 | </table> |
---|
| 313 | </td> |
---|
| 314 | </tr> |
---|
| 315 | |
---|
| 316 | |
---|
| 317 | <tr> |
---|
| 318 | <td valign="bottom" colspan="3" align="center"><a href="#" onClick="return choixForm();"><img src="Icons/valid.gif" width="75" height="25" border="0"></a></td> |
---|
| 319 | </tr> |
---|
| 320 | <%} |
---|
| 321 | else {%> |
---|
| 322 | <table valign=center align=center> |
---|
| 323 | <tr><td height="100"> </td></tr> |
---|
| 324 | <tr><td><span color=black><%=error_msgl%></span></td></tr> |
---|
| 325 | <%}%> |
---|
| 326 | </table> |
---|
| 327 | </div> |
---|
| 328 | </form> |
---|
| 329 | </body> |
---|
| 330 | </html> |
---|
| 331 | |
---|