function vue_criteres() { $zoom = $_REQUEST["zoom"]; $taille_vue = $_REQUEST["taille_vue"]; $trolls_disparus = $_REQUEST["trolls_disparus"]; $anim = $_REQUEST["anim"]; $options = $_SESSION["options"]; echo "\n\t\t\t<input type='hidden' name='cX_direct' value='" . $_REQUEST["cX"] . "'>\n\t\t\t<input type='hidden' name='cY_direct' value='" . $_REQUEST["cY"] . "'>\n\t\t\t<input type='hidden' name='cZ_direct' value='" . $_REQUEST["cZ"] . "'>\n\t\t\t<input type='hidden' name='max_pa_direct' value='" . $_REQUEST["max_pa"] . "'>\n\t\t\t<input type='hidden' name='pcenter' value='" . $_REQUEST["pcenter"] . "'>\n\t\t\t<select name='id_troll_list' id='id_troll_list' onChange='document.form_cockpit.id_troll.value=this.value;get_map();'>\n\t\t"; showListeCache($_REQUEST["id_troll"], true); echo "\n\t\t\t</select>\n\t\t\t<input type='hidden' value='" . $_REQUEST["id_troll"] . "' name='id_troll' id='id_troll'>\n\t\t"; echo " Vue "; if (empty($taille_vue)) { $taille_vue = $options["vue_taille_option"]; } formulaire_listbox("taille_vue", 0, LIMITE_MAX_VUE, 1, $taille_vue, "moinsplus", "", false, true, "onChange='get_map();'"); afficheAideVueTailleVue(); if (empty($zoom)) { $zoom = $options["vue_zoom_option"]; } vue_afficher_zoom_select($zoom, "zoom", "onChange='get_map();'"); if (empty($anim)) { $anim = $options["vue_animations_option"]; } if (empty($trolls_disparus)) { $trolls_disparus = $options["vue_fantomes_option"]; } echo " Animations "; echo "<select name='anim' onChange='get_map();'>"; afficher_listbox_select("oui", $anim, "Oui"); afficher_listbox_select("non", $anim, "Non"); echo "</select>"; afficheAideVueAnimation(); echo " Trolls Disparus "; echo "<select name='trolls_disparus' onChange='get_map();'>"; afficher_listbox_select("oui", $trolls_disparus, "Oui"); afficher_listbox_select("non", $trolls_disparus, "Non"); echo "</select>"; afficheAideVueTrollsDisparus(); $js_id = "id_troll=\"+document.form_cockpit.id_troll.value"; echo " Rafraichir <input type='button' onClick='document.location.href=\"cockpit.php?refresh=s_public&{$js_id}' value='Auto' class='mh_form_submit' alt='Rafraichir la vue avec les scripts publics'> "; echo "<input type='button' onClick='document.location.href=\"cockpit.php?refresh=copie_colle&{$js_id}' value='Manuel' class='mh_form_submit' alt='Rafraichir la vue avec un copié collé'>"; }
function afficherOptionsVue2d($info) { $cX = $info['x_position']; $cY = $info['y_position']; $cZ = $info['z_position']; $taille_vue = $info['taille_vue']; $max_pa = $info['max_pa']; $mytroll = $info['myTroll']; $id_troll = $mytroll['id_troll']; $zoom = $_REQUEST['zoom']; if ($zoom <= 0) { $zoom = 1; } $anim = $info['anim']; $trolls_disparus = $info['trolls_disparus']; $taille_niveau_z = $info['taille_niveau_z']; ?> <script language='Javascript'> function control_id_script_public(){ myForm = document.select_troll; id_troll = myForm.id_troll.value; x = myForm.cX.value; y = myForm.cY.value; z = myForm.cZ.value; go_submit = false; if (document.getElementById('refresh_ss').checked == true) { if (id_troll == "") { alert('Vous devez sélectionner un Troll Relais&Mago'); } else { go_submit = true; } } else if (document.getElementById('refresh').checked == true) { if ( (x != "") && (y != "") && (z != "") ) go_submit = true; else alert('Positions invalides'); } else { go_submit = true; } if (go_submit == true) myForm.submit(); } </script> <table width='100%' cellspacing='0'> <tr class='mh_tdtitre'> <td align='center' colspan='3'>Options Vue2d</td> </tr> <tr class='mh_tdpage'> <td> <form name='select_troll' method='GET' action='cockpit.php'> <input type='hidden' name='vue_refresh' value='oui'> <input type='hidden' name='id_troll' size=6 value='<?php echo $id_troll; ?> '> </td> </tr> <?php /*--------------------*/ echo "<tr><td valign='top'>"; echo "Centrer sur "; echo "</td><td>"; echo "<input type='text' value='{$cX}' name='cX' size='2' onChange='javascript:clear_id_troll()'>"; echo "<input type='text' value='{$cY}' name='cY' size='2' onChange='javascript:clear_id_troll()'>"; echo "<input type='text' value='{$cZ}' name='cZ' size='2' onChange='javascript:clear_id_troll()'>"; echo "</td><td>"; afficheAideVueCenterSur(); echo "</td></tr>"; /*--------------------*/ echo "<tr><td>Taille de la vue </td><td>"; formulaire_listbox("taille_vue", 0, LIMITE_MAX_VUE, 1, $taille_vue, "moinsplus", "", false); echo "</td><td>"; afficheAideVueTailleVue(); echo "</td></tr>"; /*--------------------*/ echo "<tr><td>Limite verticale</td>"; echo "<td><input type=text name='taille_niveau_z' size=2 value='{$taille_niveau_z}'></td>"; echo "<td>"; afficheAideVueLimiteVerticale(); echo "</td></tr>"; /*--------------------*/ echo "<tr><td> Zoom </td>"; echo "<td><select name='zoom'>"; // Prototype : afficher_listbox_select($val, $val_to_select,$display=""); afficher_listbox_select(5.0, $zoom, "toupeti"); afficher_listbox_select(4.5, $zoom, "====="); afficher_listbox_select(4.0, $zoom, "====-"); afficher_listbox_select(3.6, $zoom, "===--"); afficher_listbox_select(3.2, $zoom, "==---"); afficher_listbox_select(2.9, $zoom, "=----"); afficher_listbox_select(2.6, $zoom, "peti"); afficher_listbox_select(2.3, $zoom, "-----"); afficher_listbox_select(2.0, $zoom, "----"); afficher_listbox_select(1.6, $zoom, "---"); afficher_listbox_select(1.4, $zoom, "--"); afficher_listbox_select(1.2, $zoom, "-"); afficher_listbox_select(1, $zoom, "Normal"); afficher_listbox_select(0.9, $zoom, "+"); afficher_listbox_select(0.8, $zoom, "++"); afficher_listbox_select(0.7, $zoom, "+++"); afficher_listbox_select(0.6, $zoom, "++++"); afficher_listbox_select(0.5, $zoom, "BIG"); echo "</select></td><td>"; afficheAideVueZoom(); echo "</td></tr>"; /*--------------------*/ echo "<tr><td>Taille en PA du <br>troll-O-meter </td><td>"; formulaire_listbox("max_pa", 0, LIMITE_MAX_TAILLE_PA, 1, $max_pa, "moinsplus", "", false); echo "</td><td>"; afficheAideVueTrollometer(); echo "</td></tr>"; /*--------------------*/ echo "<tr><td>Animations </td>"; echo "<td> <input type='radio' name='anim' value='oui'"; if ($anim == "oui") { echo "CHECKED"; } echo "> oui <input type='radio' name='anim' value='non'"; if ($anim == "non") { echo "CHECKED"; } echo "> non"; echo "</td><td>"; afficheAideVueAnimation(); echo "</td></tr>"; /*--------------------*/ echo "<tr><td>Trolls disparus </td>"; echo "<td nowrap> <input type='radio' name='trolls_disparus' value='oui'"; if ($trolls_disparus == "oui") { echo "checked"; } echo "> afficher <input type='radio' name='trolls_disparus' value='non'"; if ($trolls_disparus == "non") { echo "checked"; } echo "> cacher"; echo "</td><td>"; afficheAideVueTrollsDisparus(); echo "</td></tr>"; /*--------------------*/ echo "<tr><td valign='top' nowrap>"; echo "Rafraîchir la vue</td>"; echo "<td valign='top' nowrap>"; echo "<input type='radio' id='refresh' name='refresh' value='non' checked>"; echo "non <br>"; echo "<input type='radio' id='refresh_cc' name='refresh' value='copie_colle'>"; echo "copier/coller <br>"; echo "<input type='radio' id='refresh_ss' name='refresh' value='s_public' >"; echo "scripts publics <br>"; echo "</td>"; echo "<td valign='top' nowrap>"; echo "<br><br>"; afficheAideVueCopierColler(); informationImportanteScriptsPublics($id_troll); echo "<br>"; afficheAideVueRefreshPublic(); vue2d_afficher_utilisation_scripts_publics($id_troll); echo "</td>"; echo "</tr>"; ?> <tr> <td colspan='3' align='center'> <input type='button' name='button' class='mh_form_submit' value='On y va !' onClick='javascript:control_id_script_public()'> <input type='reset' name='reset' class='mh_form_submit' value='Par défaut'> </td> <td> </td> </tr> </table> </form> <?php }