Blame view

html/Oscilloscope_test/CH2/6_Filtre/form_filtre.php 3.21 KB
655d0e02   lwadbled   feat(*): ajout de...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
  <!DOCTYPE html>
  <html>
  	<form method="post" action="main.php">
  		<input type="submit" name="filt_c2" value="Filtre ON/OFF CH2" class="btn btn-outline-danger"/>
  	</form>
  	<?php 
  		echo "Etat du filtre : ";
  		if(strpos($filt_c2,"ON")){
  			echo "ON";
  			echo "<br/>";
  			if(strpos($c2filts,"LP")!=false){
  				echo "<form method='post' action='main.php?tab=CH2' oninput='limitesup.value=lim_sup.value;'>";
  			}else if(strpos($c2filts,"HP")!=false){
  				echo "<form method='post' action='main.php?tab=CH2' oninput='limiteinf.value=lim_inf.value;'>";
  			}else{
  				echo "<form method='post' action='main.php?tab=CH2' oninput='limitesup.value=lim_sup.value; limiteinf.value=lim_inf.value;'>";
  			}
  			echo '<fieldset>';
  			echo "<label for='c2_filts'>Type du Filtre : </label>";
  			echo "<select id='c2_filts' name='c2_filts'>";
  			echo "<option value='LP' ";
  			if(strpos($c2filts,"LP")!=false) echo "selected";
  			echo ">Passe Bas</option>";
  			echo "<option value='HP' ";
  			if(strpos($c2filts,"HP")!=false) echo "selected";
  			echo ">Passe Haut</option>";
  			echo "<option value='BP' ";
  			if(strpos($c2filts,"BP")!=false) echo "selected";
  			echo ">Passe Bande</option>";
  			echo "<option value='BR' ";
  			if(strpos($c2filts,"BR")!=false) echo "selected";
  			echo ">Coupe Bande</option>";
  			echo "</select>";
  			if(strpos($c2filts,"LP")!=false){
  				$limite = strstr($c2filts,"UPPLIMIT");
  				$lim_sup=floatval(substr($limite,9,-4));
  				echo '<label for="lim_sup" class="form-range">Limite supérieure passe bas</label>';
  				echo '<input type="range" id="lim_sup" name="lim_sup" class="form-range" min="5" max="245" step="5" value="'.$lim_sup.'" onchange="this.form.submit();">';
  				echo '<br/>';
  				echo 'Fréquence : <output for="out" name="limitesup">'.$lim_sup.'</output> MHz';
  				echo '<br/>';
  			}else if(strpos($c2filts,"HP")!=false){
  				$limite = strstr($c2filts,"LOWLIMIT");
  				$lim_inf=floatval(substr($limite,9,-4));
  				echo '<label for="lim_inf" class="form-range">Limite inférieure</label>';
  				echo '<input type="range" id="lim_inf" name="lim_inf" class="form-range" min="5" max="245" step="5" value="'.$lim_inf.'" onchange="this.form.submit();">';
  				echo '<br/>';
  				echo 'Fréquence : <output for="out" name="limiteinf">'.$lim_inf.'</output> MHz';
  				echo '<br/>';
  			}else{
  				$limite = strstr($c2filts,"UPPLIMIT");
  				$lim_sup=floatval(substr($limite,9,-4));
  				$limite = strstr($c2filts,"LOWLIMIT");
  				$lim_inf=floatval(substr($limite,9,-4));
  				echo '<label for="lim_sup" class="form-range">Limite supérieure</label>';
  				echo '<input type="range" id="lim_sup" name="lim_sup" class="form-range" min="5" max="245" step="5" value="'.$lim_sup.'" onchange="this.form.submit();">';
  				echo '<br/>';
  				echo 'Fréquence : <output for="out" name="limitesup">'.$lim_sup.'</output> MHz';
  				echo '<br/>';
  				echo '<label for="lim_inf" class="form-range">Limite inférieure</label>';
  				echo '<input type="range" id="lim_inf" name="lim_inf" class="form-range" min="5" max="245" step="5" value="'.$lim_inf.'" onchange="this.form.submit();">';
  				echo '<br/>';
  				echo 'Fréquence : <output for="out" name="limiteinf">'.$lim_inf.'</output> MHz';
  				echo '<br/>';
  			}
  			echo '</fieldset>';
  			echo "</form>";
  		}else{
  			echo "OFF";
  		}
  	?>
  </html>