Projet

Général

Profil

Révision 7f9aab46

Ajouté par Victor Pongnian il y a plus de 10 ans

Version réaliée pour la sage de Victor Pongnian

Voir les différences:

panorama.php
79 79
       printf('point_list[%d] = new Array("%s", %03lf, %03lf, %03lf, "");'."\n", $ipt++, $name, $dist, $cap, $ele);
80 80
     }
81 81
   }
82
 
82 83

  
83 84
   if (isset($params['reference'])) {
84 85
     echo "ref_points = new Array();\n";
......
90 91
       }
91 92
     }
92 93
   }
94
  
95
  $localLat = (isset($_POST["loca_latitude"])) ? $_POST["loca_latitude"] : NULL;
96
  $localLon = (isset($_POST["loca_longitude"])) ? $_POST["loca_longitude"] : NULL;
97
  $localAlt = (isset($_POST["loca_altitude"])) ? $_POST["loca_altitude"] : NULL;
98
 
99
  if ($localLat && $localLon && $localAlt) {
100
  	  list($localDistance, $localCap, $localEle) = $pt->coordsToCap($localLat, $localLon, $localAlt);
101
  	  $n = "point temporaire";
102
      printf('point_list[%d] = new Array("%s", %03lf, %03lf, %03lf, "temporary");'."\n",$ipt++, $n, $localDistance, $localCap, $localEle);
103
  } 
93 104
  ?>
94 105
  </script>
106
  
107
 
108

  
109
  
95 110
  <link type="image/x-icon" rel="shortcut icon" href="images/tsf.png"/>
96 111
  <link rel="stylesheet" media="screen" href="css/all.css" />
112
  <script src="js/hide_n_showForm.js"></script> 
97 113
</head>
98 114
<body>
99 115
  <canvas id="mon-canvas">
100 116
    Ce message indique que ce navigateurs est vétuste car il ne supporte pas <samp>canvas</samp> (IE6, IE7, IE8, ...)
101 117
  </canvas>
118
  
102 119
  <fieldset id="control"><legend>contrôle</legend>
103 120
      <label>Zoom : <input type="range" min="0" max="2" value="2" id="zoom_ctrl"/></label>
104 121
      <label>Cap : <input type="number" min="0" max="360" step="10" value="0" autofocus="" id="angle_ctrl"/></label>
......
106 123
  </fieldset>
107 124

  
108 125
  <?php
109
      //phpinfo();exit;
126
      
110 127
     if ($params && isset($params['latitude']) && isset($params['longitude'])) {
111 128
       print("<div id=\"params\">\n");
112
       printf ("<p>latitude :   <em>%.3f°</em></p>\n", $params['latitude']);
113
       printf ("<p>longitude : <em>%.3f°</em></p>\n", $params['longitude']);
114
       if (isset($params['altitude'])) printf ("<p>altitude : <em>%d m</em></p>\n", $params['altitude']);
129
       printf ("<p>latitude :   <em><span id=\"pos_lat\">%.5f</span>°</em></p>\n", $params['latitude']);
130
       printf ("<p>longitude : <em><span id=\"pos_lon\">%.5f</span>°</em></p>\n", $params['longitude']);
131
       if (isset($params['altitude'])) printf ("<p>altitude : <em><span id=\"pos_alt\">%d</span> m</em></p>\n", $params['altitude']); 
115 132
       print("</div>\n");
133
       ?>
134
       <span id="loca"><img src="images/locapoint.svg" id="icone" onclick="showLoca()"/></span>
135
  <fieldset id="locadraw"><legend id="" onclick="hideLoca()">Localiser un point</legend>
136
    <form id="form_loca" method="post" name="form_localate" action="panorama.php?dir=<?php echo $_GET['dir'];?>&amp;panorama=<?php echo $_GET['panorama'];?>">
137
      <label class="form_col" title="La latitude ϵ [-90°, 90°]. Ex: 12.55257">Latitude :
138
	<input  name="loca_latitude" type="number" min="-90" max="90"  id="loca_latitude"/></label>
139
	         
140
      <label class="form_col" title="La longitude ϵ [-180°, 180°]. Ex: 144.14723">Longitude :
141
	<input name="loca_longitude" type="number" min="-180" max="180" id="loca_longitude"/></label>
142
	      
143
      <label class="form_col" title="L'altitude positive Ex: 170">Altitude :
144
	<input  name="loca_altitude" type="number" min="-400" id="loca_altitude"/></label>
145
	       
146
      <div class="answer">
147
	<input type="button" value="Localiser" id="loca_button" class="form_button"/> 
148
	<input type="reset" value="Reset" class="form_button"/>
149
	<input type="button" value="Effacer" class="form_button" id="loca_erase"/>
150
      </div>
151
	      
152
    </form>
153
  </fieldset>
154
       <?php
155
     } elseif ($params == false ){
156
     	$dir   = $_GET['dir'];
157
        $name  = $_GET['panorama'];
158
     	?>
159
       <div id="addParams">		
160
     	  <label onclick="showForm()" value="Hide label">Paramétrer le panorama</label>	
161
       </div>
162
       <fieldset id="adding"><legend id="lgd" onclick="hideForm()">Paramètrer le panorama</legend>
163
	 <form action="addParams.php?dir=<?php echo $dir;?>&amp;panorama=<?php echo $name;?>" id="form_param" method="post">
164
	   	  
165
	   <label class="form_col" for="param_title" title="Au moins 4 caractères">Titre: </label>
166
	   <input type="text" id="param_title" name="param_title"/>
167
	   
168
	   <label class="form_col" for="param_latitude" title="La latitude ϵ [-90°, 90°]. Ex: 12.55257">Latitude: </label>
169
	   <input  name="param_latitude" type="text" id="param_latitude" />
170
	         
171
	   <label class="form_col" for="param_longitude" title="La longitude ϵ [-180°, 180°]. Ex: 144.14723">Longitude: </label>
172
	   <input name="param_longitude" type="text" id="param_longitude" />
173
	   
174
	   <label class="form_col" for="param_altitude" title="L'altitude positive Ex: 170">Altitude: </label>
175
	   <input  name="param_altitude" type="text" id="param_altitude" />
176
	  
177
	   <label class="form_col" for="param_elevation" title="élévation ϵ [-10,10] ( valeur par défaut : 0)">Elévation: </label>
178
	   <input  name="param_elevation" type="text" id="param_elevation" />
179
	   
180
	   <label class="form_col" for="param_loop" title="L'image fait elle 360° ? ">Rebouclage: </label>
181
	   <input class="radio" type="radio" name="param_loop" value="true" checked="checked"> Oui
182
           <input class="radio" type="radio" name="param_loop" value="false"> Non
183
	   
184
	   <input type="hidden" value="Localiser" id="loca_button" class="form_button" style="width:70px" /> 
185
	   <input type="hidden" value="Effacer" class="form_button" id="loca_erase"/>
186
	  
187
	   <div class="answer">
188
	     <input type="submit" value="Submit" class="form_button"/> 
189
	     <input type="reset" value="Reset" class="form_button"/>
190
	   </div>
191
	      
192
  	 </form>
193
       </fieldset>
194
  
195
 
196
       <script src="js/pano_deroulant.js"></script> 
197
      
198
     	<?php
116 199
     }
117 200
     echo '<p id="info"></p>'."\n";
118 201
     if (count($extra_names) > 1) {
......
126 209
       echo "<input type=\"button\" id=\"do-cancel\" value=\"annuler\"/>\n";
127 210
       echo "</p>\n";
128 211
     }
129
  ?> 
212
     
213
     ?>
130 214
  <p class="validators"><a href="http://validator.w3.org/check?uri=referer">page xHTML validé !</a></p>
131 215
  <p id="res"></p>
132 216
</body>

Formats disponibles : Unified diff