Commit 655d0e02db8688faa9c6d11981cae0c622bc7ce3
1 parent
b186066f
feat(*): ajout des fichiers de recherche des commandes+ajout de deux interfaces test (sans onglets)
Showing
94 changed files
with
1537 additions
and
89 deletions
Show diff stats
README.md
html/Captures/Siglent_SDS1102CML_SDS1MEBX2R2090_6_01_01_19.bmp
No preview for this file type
html/Captures/Siglent_Technologies_SDG1032X_SDG1XCAX3R0874_1_01_01_33R1.bmp
No preview for this file type
... | ... | @@ -0,0 +1,22 @@ |
1 | +<?php | |
2 | + $chemin = getcwd().'/'.$Appareil[$i]['type']; | |
3 | + $files = array_diff(scandir($chemin),array('..','.')); | |
4 | + foreach($files as $Fich){ | |
5 | + $path = $chemin.'/'.$Fich; | |
6 | + if(is_dir($path)){ | |
7 | + $files = array_diff(scandir($path),array('..','.')); | |
8 | + foreach($files as $dir){ | |
9 | + $path2 = $path.'/'.$dir; | |
10 | + if(is_dir($path2)){ | |
11 | + $files2 = array_diff(scandir($path2),array('..','.')); | |
12 | + foreach($files2 as $cmd){ | |
13 | + $path3 = $path2.'/'.$cmd; | |
14 | + if(is_file($path3) && strpos($path3,"cmd")!=false){ | |
15 | + include($path3); | |
16 | + } | |
17 | + } | |
18 | + } | |
19 | + } | |
20 | + } | |
21 | + } | |
22 | +?> | ... | ... |
html/Generateur/main_generateur.php
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html> |
3 | 3 | <?php |
4 | + if(isset($_GET['tab'])){ | |
5 | + $tab=$_GET['tab']; | |
6 | + }else{ | |
7 | + $tab="Global"; | |
8 | + } | |
4 | 9 | echo '<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3">'; |
5 | 10 | echo '<div class="mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center">'; |
6 | - /* Affichage de la capture d'ecran */ | |
7 | - usleep(90000); /* Utilisation pour un premier screenshot plus propre */ | |
8 | - /* Nom de la capture d'ecran au nom de l'appareil */ | |
9 | - $pic_name[$i] = str_replace(".","_",$Appareil[$i]['nom']); | |
10 | - $pic_name[$i] = str_replace(" ","_",$pic_name[$i]); | |
11 | - $pic_name[$i] = str_replace("+","",$pic_name[$i]); | |
12 | - $pic_name[$i] = str_replace(",","_",$pic_name[$i]).".bmp"; | |
13 | - $pic_name[$i] = 'Captures/'.$pic_name[$i]; | |
14 | - $_SESSION['pic_name'] = $pic_name[$i]; | |
15 | - include(getcwd().'/Scripts/screenshot.php'); /* Execution commande screenshot */ | |
16 | - /* Recuperation du nom du fichier a partir du chemin complet */ | |
17 | - echo "<img id='cam$i' class='fit-picture' src='".$pic_name[$i]."' alt='Image de ".$Appareil[$i]['nom']."'>"; | |
11 | + /* Affichage image */ | |
12 | + include('./Scripts/creation_img.php'); | |
18 | 13 | echo '</div>'; |
19 | 14 | echo '<div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 overflow-hidden">'; |
20 | 15 | /* Commandes de l'appareil */ | ... | ... |
html/Generateur_test/Fonctions/Burst/form_burst.php
0 → 100644
... | ... | @@ -0,0 +1,24 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <style> | |
4 | + .pannel-button{ | |
5 | + font-size: 1.6em; | |
6 | + height: 40px; | |
7 | + width: 200px; | |
8 | + text-align: center; | |
9 | + color: #000; | |
10 | + background: #fff; | |
11 | + border-radius: 10px; | |
12 | + } | |
13 | + .pannel-button:hover{ | |
14 | + background: #b8ff70; | |
15 | + } | |
16 | + .pannel-button:active{ | |
17 | + background: #07e50a; | |
18 | + } | |
19 | + </style> | |
20 | + <form method="post" action="main.php"> | |
21 | + <input type="button" id="burst" name="burst" class="pannel-button" value="Burst" onclick="this.form.submit()"/> | |
22 | + <input type="hidden" id="burst" name="burst" value="BURST"/> | |
23 | + </form> | |
24 | +</html> | ... | ... |
html/Generateur_test/Fonctions/Channel/cmd_channel.php
0 → 100644
html/Generateur_test/Fonctions/Channel/form_channel.php
0 → 100644
... | ... | @@ -0,0 +1,7 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <input type="button" id="channel" name="channel" class="pannel-button" value="Channel" onclick="this.form.submit()"/> | |
5 | + <input type="hidden" id="channel" name="channel" value="CHANNEL"/> | |
6 | + </form> | |
7 | +</html> | ... | ... |
html/Generateur_test/Fonctions/Parameter/cmd_parameter.php
0 → 100644
html/Generateur_test/Fonctions/Parameter/form_parameter.php
0 → 100644
... | ... | @@ -0,0 +1,7 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <input type="button" id="parameter" name="parameter" class="pannel-button" value="Parametre" onclick="this.form.submit()"/> | |
5 | + <input type="hidden" id="parameter" name="parameter" value="PARAMETER"/> | |
6 | + </form> | |
7 | +</html> | ... | ... |
html/Generateur_test/Fonctions/Sweep/form_sweep.php
0 → 100644
... | ... | @@ -0,0 +1,7 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <input type="button" id="sweep" name="sweep" class="pannel-button" value="Sweep" onclick="this.form.submit()"/> | |
5 | + <input type="hidden" id="sweep" name="sweep" value="SWEEP"/> | |
6 | + </form> | |
7 | +</html> | ... | ... |
html/Generateur_test/Fonctions/Utility/cmd_utility.php
0 → 100644
html/Generateur_test/Fonctions/Utility/form_utility.php
0 → 100644
... | ... | @@ -0,0 +1,7 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <input type="button" id="utility" name="utility" class="pannel-button" value="Utility" onclick="this.form.submit()"/> | |
5 | + <input type="hidden" id="utility" name="utility" value="UTILITY"/> | |
6 | + </form> | |
7 | +</html> | ... | ... |
html/Generateur_test/Fonctions/Waves/form_waves.php
0 → 100644
... | ... | @@ -0,0 +1,7 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <input type="button" id="waves" name="waves" class="pannel-button" value="Waveforms" onclick="this.form.submit()"/> | |
5 | + <input type="hidden" id="waves" name="waves" value="WAVES"/> | |
6 | + </form> | |
7 | +</html> | ... | ... |
html/Generateur_test/Global/Chiffres/cmd_chiffres.php
0 → 100644
html/Generateur_test/Global/Chiffres/form_chiffres.php
0 → 100644
... | ... | @@ -0,0 +1,83 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <style> | |
4 | + .pave-numerique{ | |
5 | + font-size: 1.6em; | |
6 | + height: 40px; | |
7 | + width: 50px; | |
8 | + text-align: center; | |
9 | + color: #000; | |
10 | + background: #fff; | |
11 | + border-radius: 10px; | |
12 | + } | |
13 | + .pave-numerique:hover{ | |
14 | + background: #b8ff70; | |
15 | + } | |
16 | + .pave-numerique:active{ | |
17 | + background: #07e50a; | |
18 | + } | |
19 | + </style> | |
20 | + <div class="w-100 my-md-3 pl-md-3 text-center"> | |
21 | + <div class="text-center"> | |
22 | + <div class="btn-group" role="group" aria-label="panel-haut"> | |
23 | + <form method="post" action="main.php"> | |
24 | + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="7" onclick="this.form.submit();"/> | |
25 | + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_7"/> | |
26 | + </form> | |
27 | + <form method="post" action="main.php"> | |
28 | + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="8" onclick="this.form.submit();"/> | |
29 | + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_8"/> | |
30 | + </form> | |
31 | + <form method="post" action="main.php"> | |
32 | + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="9" onclick="this.form.submit();"/> | |
33 | + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_9"/> | |
34 | + </form> | |
35 | + </div> | |
36 | + <br/> | |
37 | + <div class="btn-group" role="group" aria-label="panel-centre-haut"> | |
38 | + <form method="post" action="main.php"> | |
39 | + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="4" onclick="this.form.submit();"/> | |
40 | + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_4"/> | |
41 | + </form> | |
42 | + <form method="post" action="main.php"> | |
43 | + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="5" onclick="this.form.submit();"/> | |
44 | + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_5"/> | |
45 | + </form> | |
46 | + <form method="post" action="main.php"> | |
47 | + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="6" onclick="this.form.submit();"/> | |
48 | + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_6"/> | |
49 | + </form> | |
50 | + </div> | |
51 | + <br/> | |
52 | + <div class="btn-group" role="group" aria-label="panel-centre-bas"> | |
53 | + <form method="post" action="main.php"> | |
54 | + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="1" onclick="this.form.submit();"/> | |
55 | + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_1"/> | |
56 | + </form> | |
57 | + <form method="post" action="main.php"> | |
58 | + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="2" onclick="this.form.submit();"/> | |
59 | + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_2"/> | |
60 | + </form> | |
61 | + <form method="post" action="main.php"> | |
62 | + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="3" onclick="this.form.submit();"/> | |
63 | + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_3"/> | |
64 | + </form> | |
65 | + </div> | |
66 | + <br/> | |
67 | + <div class="btn-group" role="group" aria-label="panel-bas"> | |
68 | + <form method="post" action="main.php"> | |
69 | + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="." onclick="this.form.submit();"/> | |
70 | + <input type="hidden" id="chiffre" name="chiffre" value="POINT"/> | |
71 | + </form> | |
72 | + <form method="post" action="main.php"> | |
73 | + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="0" onclick="this.form.submit();"/> | |
74 | + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_0"/> | |
75 | + </form> | |
76 | + <form method="post" action="main.php"> | |
77 | + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="+/-" onclick="this.form.submit();"/> | |
78 | + <input type="hidden" id="chiffre" name="chiffre" value="NEGATIVE"/> | |
79 | + </form> | |
80 | + </div> | |
81 | + </div> | |
82 | + </div> | |
83 | +</html> | ... | ... |
html/Generateur_test/Global/Fleches/cmd_fleches.php
0 → 100644
html/Generateur_test/Global/Fleches/form_fleches.php
0 → 100644
... | ... | @@ -0,0 +1,15 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <div class="text-center"> | |
4 | + <div class="btn-group" role="group" aria-label="gauche_droite"> | |
5 | + <form method="post" action="main.php?tab=Global"> | |
6 | + <input type="button" id="fleches" name="fleches" class="pave-numerique" value="<" onclick="this.form.submit();"/> | |
7 | + <input type="hidden" id="fleches" name="fleches" value="LEFT"/> | |
8 | + </form> | |
9 | + <form method="post" action="main.php?tab=Global"> | |
10 | + <input type="button" id="fleches" name="fleches" class="pave-numerique" value=">" onclick="this.form.submit();"/> | |
11 | + <input type="hidden" id="fleches" name="fleches" value="RIGHT"/> | |
12 | + </form> | |
13 | + </div> | |
14 | + </div> | |
15 | +</html> | ... | ... |
16 KB
... | ... | @@ -0,0 +1,36 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <style> | |
4 | + .knob-button{ | |
5 | + font-size: 2.5em; | |
6 | + height: 125px; | |
7 | + width: 50px; | |
8 | + text-align: center; | |
9 | + color: #000; | |
10 | + background: #fff; | |
11 | + border-radius: 10px; | |
12 | + } | |
13 | + .knob-button:hover{ | |
14 | + background: #b8ff70; | |
15 | + } | |
16 | + .knob-button:active{ | |
17 | + background: #07e50a; | |
18 | + } | |
19 | + </style> | |
20 | + <div aria-label="bouton_tournant"> | |
21 | + <div class="btn-group" role="group" aria-label="panel-haut"> | |
22 | + <form method="post" action="main.php?tab=Global"> | |
23 | + <input type="button" id="knob" name="knob" class="knob-button" value="↱" onclick="this.form.submit();"/> | |
24 | + <input type="hidden" id="knob" name="knob" value="KNOB_RIGHT" class="btn btn-outline-danger"/> | |
25 | + </form> | |
26 | + <form method="post" action="main.php?tab=Global"> | |
27 | + <input type="image" src="Generateur/Global/Knob/btn_knob_generateur.png" name="submit" onclick="this.form.submit()"/> | |
28 | + <input type="hidden" id="chiffre" name="chiffre" value="KNOB_DOWN"/> | |
29 | + </form> | |
30 | + <form method="post" action="main.php?tab=Global"> | |
31 | + <input type="button" id="knob" name="knob" class="knob-button" value="↰" onclick="this.form.submit();"/> | |
32 | + <input type="hidden" id="knob" name="knob" value="KNOB_LEFT" class="btn btn-outline-danger"/> | |
33 | + </form> | |
34 | + </div> | |
35 | + </div> | |
36 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,13 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <input type="button" id="func1" name="func1" class="func-button" value="" onclick="this.form.submit()"/> | |
5 | + <input type="hidden" id="func1" name="func1" value="FUNC1" class="btn-outline-danger"/> | |
6 | + </form> | |
7 | + <script type='text/javascript'> | |
8 | + var elem = document.getElementById('cam<?php echo $i ?>'); | |
9 | + var pos = elem.getBoundingClientRect(); | |
10 | + var btn = document.getElementById('func1'); | |
11 | + btn.style = "top : "+pos.bottom+"px; left : "+pos.x+"px"; | |
12 | + </script> | |
13 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,13 @@ |
1 | +<html> | |
2 | + <form method="post" action="main.php"> | |
3 | + <input type="button" id="func2" name="func2" class="func-button" value="" onclick="this.form.submit()"/> | |
4 | + <input type="hidden" id="func2" name="func2" value="FUNC2" class="btn-outline-danger"/> | |
5 | + </form> | |
6 | + <script type='text/javascript'> | |
7 | + var elem = document.getElementById('cam<?php echo $i ?>'); | |
8 | + var pos = elem.getBoundingClientRect(); | |
9 | + var btn = document.getElementById('func2'); | |
10 | + var pos_x = pos.x+80; | |
11 | + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px"; | |
12 | + </script> | |
13 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,13 @@ |
1 | +<html> | |
2 | + <form method="post" action="main.php"> | |
3 | + <input type="button" id="func3" name="func3" class="func-button" value="" onclick="this.form.submit()"/> | |
4 | + <input type="hidden" id="func3" name="func3" value="FUNC3" class="btn-outline-danger"/> | |
5 | + </form> | |
6 | + <script type='text/javascript'> | |
7 | + var elem = document.getElementById('cam<?php echo $i ?>'); | |
8 | + var pos = elem.getBoundingClientRect(); | |
9 | + var btn = document.getElementById('func3'); | |
10 | + var pos_x = pos.x+160; | |
11 | + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px"; | |
12 | + </script> | |
13 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,13 @@ |
1 | +<html> | |
2 | + <form method="post" action="main.php"> | |
3 | + <input type="button" id="func4" name="func4" class="func-button" value="" onclick="this.form.submit()"/> | |
4 | + <input type="hidden" id="func4" name="func4" value="FUNC4" class="btn-outline-danger"/> | |
5 | + </form> | |
6 | + <script type='text/javascript'> | |
7 | + var elem = document.getElementById('cam<?php echo $i ?>'); | |
8 | + var pos = elem.getBoundingClientRect(); | |
9 | + var btn = document.getElementById('func4'); | |
10 | + var pos_x = pos.x+240; | |
11 | + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px"; | |
12 | + </script> | |
13 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,13 @@ |
1 | +<html> | |
2 | + <form method="post" action="main.php"> | |
3 | + <input type="button" id="func5" name="func5" class="func-button" value="" onclick="this.form.submit()"/> | |
4 | + <input type="hidden" id="func5" name="func5" value="FUNC5" class="btn-outline-danger"/> | |
5 | + </form> | |
6 | + <script type='text/javascript'> | |
7 | + var elem = document.getElementById('cam<?php echo $i ?>'); | |
8 | + var pos = elem.getBoundingClientRect(); | |
9 | + var btn = document.getElementById('func5'); | |
10 | + var pos_x = pos.x+320; | |
11 | + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px"; | |
12 | + </script> | |
13 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,13 @@ |
1 | +<html> | |
2 | + <form method="post" action="main.php"> | |
3 | + <input type="button" id="func6" name="func6" class="func-button" value="" onclick="this.form.submit()"/> | |
4 | + <input type="hidden" id="func6" name="func6" value="FUNC6"/> | |
5 | + </form> | |
6 | + <script type='text/javascript'> | |
7 | + var elem = document.getElementById('cam<?php echo $i ?>'); | |
8 | + var pos = elem.getBoundingClientRect(); | |
9 | + var btn = document.getElementById('func6'); | |
10 | + var pos_x = pos.x+400; | |
11 | + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px"; | |
12 | + </script> | |
13 | +</html> | ... | ... |
html/Generateur_test/Outputs/Output1/cmd_output_1.php
0 → 100644
html/Generateur_test/Outputs/Output1/form_output_1.php
0 → 100644
... | ... | @@ -0,0 +1,7 @@ |
1 | +<!DOCTYPE> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <input type="button" id="output1" name="output1" class="pannel-button" value="Output1" onclick="this.form.submit()"/> | |
5 | + <input type="hidden" id="output1" name="output1" value="OUTPUT1"/> | |
6 | + </form> | |
7 | +</html> | ... | ... |
html/Generateur_test/Outputs/Output2/cmd_output_2.php
0 → 100644
html/Generateur_test/Outputs/Output2/form_output_2.php
0 → 100644
... | ... | @@ -0,0 +1,7 @@ |
1 | +<!DOCTYPE> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <input type="button" id="output2" name="output2" class="pannel-button" value="Output2" onclick="this.form.submit()"/> | |
5 | + <input type="hidden" id="output2" name="output2" value="OUTPUT2"/> | |
6 | + </form> | |
7 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,22 @@ |
1 | +<?php | |
2 | + $chemin = getcwd().'/'.$Appareil[$i]['type']; | |
3 | + $files = array_diff(scandir($chemin),array('..','.')); | |
4 | + foreach($files as $Fich){ | |
5 | + $path = $chemin.'/'.$Fich; | |
6 | + if(is_dir($path)){ | |
7 | + $files = array_diff(scandir($path),array('..','.')); | |
8 | + foreach($files as $dir){ | |
9 | + $path2 = $path.'/'.$dir; | |
10 | + if(is_dir($path2)){ | |
11 | + $files2 = array_diff(scandir($path2),array('..','.')); | |
12 | + foreach($files2 as $cmd){ | |
13 | + $path3 = $path2.'/'.$cmd; | |
14 | + if(is_file($path3) && strpos($path3,"cmd")!=false){ | |
15 | + include($path3); | |
16 | + } | |
17 | + } | |
18 | + } | |
19 | + } | |
20 | + } | |
21 | + } | |
22 | +?> | ... | ... |
... | ... | @@ -0,0 +1,60 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <style> | |
4 | + .func-button{ | |
5 | + height: 30px; | |
6 | + width: 80px; | |
7 | + background: #fff; | |
8 | + border-radius: 10px; | |
9 | + position: absolute; | |
10 | + } | |
11 | + .func-button:hover{ | |
12 | + background: #b8ff70; | |
13 | + } | |
14 | + .func-button:active{ | |
15 | + background: #07e50a; | |
16 | + } | |
17 | + </style> | |
18 | + <?php | |
19 | + echo '<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3">'; | |
20 | + echo '<div class="mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center">'; | |
21 | + /* Affichage image */ | |
22 | + include('./Scripts/creation_img.php'); | |
23 | + echo '</div>'; | |
24 | + echo '<div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 overflow-hidden">'; | |
25 | + /* Commandes de l'appareil */ | |
26 | + echo '<div class="my-3 py-3">'; | |
27 | + echo '<h2 class="display-6 text-center">Panel de commande</h2>'; | |
28 | + echo '</div>'; | |
29 | + $chemin = getcwd().'/'.$Appareil[$i]['type']; | |
30 | + $files = array_diff(scandir($chemin),array('..','.')); | |
31 | + echo '<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3">'; | |
32 | + foreach($files as $Fich){ | |
33 | + $path = $chemin.'/'.$Fich; | |
34 | + if(is_dir($path)){ | |
35 | + $files = array_diff(scandir($path),array('..','.')); | |
36 | + if($Fich!="Menus"){ | |
37 | + echo '<div class="mr-md-1 pt-1 px-1 pt-md-1 px-md-1">'; | |
38 | + } | |
39 | + foreach($files as $dir){ | |
40 | + $path2 = $path.'/'.$dir; | |
41 | + if(is_dir($path2)){ | |
42 | + $new_dir = array_diff(scandir($path2),array('..','.')); | |
43 | + foreach($new_dir as $form){ | |
44 | + $path3 = $path2.'/'.$form; | |
45 | + if(is_file($path3) && strpos($path3,"form")!=false){ | |
46 | + include($path3); | |
47 | + } | |
48 | + } | |
49 | + } | |
50 | + } | |
51 | + if($Fich!="Menus"){ | |
52 | + echo '</div>'; | |
53 | + } | |
54 | + } | |
55 | + } | |
56 | + echo '</div>'; | |
57 | + echo '</div>'; | |
58 | + echo '</div>'; | |
59 | + ?> | |
60 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,22 @@ |
1 | +<?php | |
2 | + $chemin = getcwd().'/'.$Appareil[$i]['type']; | |
3 | + $files = array_diff(scandir($chemin),array('..','.')); | |
4 | + foreach($files as $Fich){ | |
5 | + $path = $chemin.'/'.$Fich; | |
6 | + if(is_dir($path)){ | |
7 | + $files = array_diff(scandir($path),array('..','.')); | |
8 | + foreach($files as $dir){ | |
9 | + $path2 = $path.'/'.$dir; | |
10 | + if(is_dir($path2)){ | |
11 | + $files2 = array_diff(scandir($path2),array('..','.')); | |
12 | + foreach($files2 as $cmd){ | |
13 | + $path3 = $path2.'/'.$cmd; | |
14 | + if(is_file($path3) && strpos($path3,"cmd")!=false){ | |
15 | + include($path3); | |
16 | + } | |
17 | + } | |
18 | + } | |
19 | + } | |
20 | + } | |
21 | + } | |
22 | +?> | ... | ... |
html/Oscilloscope/main_oscilloscope.php
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html> |
3 | 3 | <?php |
4 | + if(isset($_GET['tab'])){ | |
5 | + $tab=$_GET['tab']; | |
6 | + }else{ | |
7 | + $tab="Global"; | |
8 | + } | |
4 | 9 | echo '<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3">'; |
5 | 10 | echo '<div class="mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center">'; |
6 | - /* Affichage de la capture d'ecran */ | |
7 | - usleep(90000); /* Utilisation pour un premier screenshot plus propre */ | |
8 | - /* Nom de la capture d'ecran au nom de l'appareil */ | |
9 | - $pic_name[$i] = str_replace(".","_",$Appareil[$i]['nom']); | |
10 | - $pic_name[$i] = str_replace(" ","_",$pic_name[$i]); | |
11 | - $pic_name[$i] = str_replace("+","",$pic_name[$i]); | |
12 | - $pic_name[$i] = str_replace(",","_",$pic_name[$i]).".bmp"; | |
13 | - $pic_name[$i] = 'Captures/'.$pic_name[$i]; | |
14 | - $_SESSION['pic_name'] = $pic_name[$i]; | |
15 | - include(getcwd().'/Scripts/screenshot.php'); /* Execution commande screenshot */ | |
16 | - /* Recuperation du nom du fichier a partir du chemin complet */ | |
17 | - echo "<img id='cam$i' class='fit-picture' src='".$pic_name[$i]."' alt='Image de ".$Appareil[$i]['nom']."'>"; | |
11 | + /* Affichage image */ | |
12 | + include('./Scripts/creation_img.php'); | |
18 | 13 | echo '</div>'; |
19 | 14 | echo '<div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 overflow-hidden">'; |
20 | 15 | /* Commandes de l'appareil */ |
21 | - echo '<div class="my-3 py-3">'; | |
22 | - echo '<h2 class="display-6 text-center">Panel de commande</h2>'; | |
23 | - echo '</div>'; | |
24 | - echo '<div class="bd-example">'; | |
25 | - echo '<nav>'; | |
26 | - echo '<div class="bg-warning nav nav-tabs mb-3" id="nav-tab" role="tablist">'; | |
27 | - $chemin = getcwd().'/'.$Appareil[$i]['type']; | |
28 | - $files = array_diff(scandir($chemin),array('..','.')); | |
29 | - foreach($files as $Fich){ | |
30 | - $trypath = $chemin.'/'.$Fich; | |
31 | - if(is_dir($trypath)){ | |
32 | - echo '<button class="nav-link '; | |
33 | - if($tab==$Fich){ | |
34 | - echo "active"; | |
35 | - } | |
36 | - echo '" id="nav-'.$Fich.'-tab" data-bs-toggle="tab" data-bs-target="#nav-'.$Fich.'" type="button" role="tab" aria-controls="nav-'.$Fich.'" aria-selected="true">'.$Fich.'</button>'; | |
37 | - } | |
38 | - } | |
39 | - echo '</div>'; | |
40 | - echo '</nav>'; | |
41 | - echo '<div class="tab-content" id="nav-tabContent">'; | |
42 | - foreach($files as $Fich){ | |
43 | - $path = $chemin.'/'.$Fich; | |
44 | - if(is_dir($path)){ | |
45 | - echo '<div class="tab-pane fade '; | |
46 | - if($tab==$Fich){ | |
47 | - echo "show active"; | |
48 | - } | |
49 | - echo '" id="nav-'.$Fich.'" role=tabpanel" aria-labelledby="nav-'.$Fich.'-tab">'; | |
50 | - echo '<p>'; | |
51 | - $files = array_diff(scandir($path),array('..','.')); | |
52 | - foreach($files as $dir){ | |
53 | - $path2 = $path.'/'.$dir; | |
54 | - if(is_dir($path2)){ | |
55 | - $files2 = array_diff(scandir($path2),array('..','.')); | |
56 | - foreach($files2 as $form){ | |
57 | - $path3 = $path2.'/'.$form; | |
58 | - if(is_file($path3) && strpos($path3,"form")!=false){ | |
59 | - include($path3); | |
60 | - echo '<br/>'; | |
61 | - } | |
62 | - } | |
63 | - } | |
64 | - } | |
65 | - echo '</p>'; | |
66 | - echo '</div>'; | |
16 | + echo '<div class="my-3 py-3">'; | |
17 | + echo '<h2 class="display-6 text-center">Panel de commande</h2>'; | |
18 | + echo '</div>'; | |
19 | + echo '<div class="bd-example">'; | |
20 | + echo '<nav>'; | |
21 | + echo '<div class="bg-warning nav nav-tabs mb-3" id="nav-tab" role="tablist">'; | |
22 | + $chemin = getcwd().'/'.$Appareil[$i]['type']; | |
23 | + $files = array_diff(scandir($chemin),array('..','.')); | |
24 | + foreach($files as $Fich){ | |
25 | + $trypath = $chemin.'/'.$Fich; | |
26 | + if(is_dir($trypath)){ | |
27 | + echo '<button class="nav-link '; | |
28 | + if($tab==$Fich){ | |
29 | + echo "active"; | |
30 | + } | |
31 | + echo '" id="nav-'.$Fich.'-tab" data-bs-toggle="tab" data-bs-target="#nav-'.$Fich.'" type="button" role="tab" aria-controls="nav-'.$Fich.'" aria-selected="true">'.$Fich.'</button>'; | |
32 | + } | |
33 | + } | |
34 | + echo '</div>'; | |
35 | + echo '</nav>'; | |
36 | + echo '<div class="tab-content" id="nav-tabContent">'; | |
37 | + foreach($files as $Fich){ | |
38 | + $path = $chemin.'/'.$Fich; | |
39 | + if(is_dir($path)){ | |
40 | + echo '<div class="tab-pane fade '; | |
41 | + if($tab==$Fich){ | |
42 | + echo "show active"; | |
43 | + } | |
44 | + echo '" id="nav-'.$Fich.'" role=tabpanel" aria-labelledby="nav-'.$Fich.'-tab">'; | |
45 | + echo '<p>'; | |
46 | + $files = array_diff(scandir($path),array('..','.')); | |
47 | + foreach($files as $dir){ | |
48 | + $path2 = $path.'/'.$dir; | |
49 | + if(is_dir($path2)){ | |
50 | + $files2 = array_diff(scandir($path2),array('..','.')); | |
51 | + foreach($files2 as $form){ | |
52 | + $path3 = $path2.'/'.$form; | |
53 | + if(is_file($path3) && strpos($path3,"form")!=false){ | |
54 | + include($path3); | |
55 | + echo '<br/>'; | |
67 | 56 | } |
68 | - } | |
69 | - echo '</div>'; | |
70 | - echo '</div>'; | |
57 | + } | |
58 | + } | |
59 | + } | |
60 | + echo '</p>'; | |
71 | 61 | echo '</div>'; |
62 | + } | |
63 | + } | |
64 | + echo '</div>'; | |
65 | + echo '</div>'; | |
66 | + echo '</div>'; | |
72 | 67 | echo '</div>'; |
73 | 68 | ?> |
74 | 69 | </html> | ... | ... |
... | ... | @@ -0,0 +1,12 @@ |
1 | +<?php | |
2 | + /* Commande Tracer CH1 */ | |
3 | + $trace_c1 = shell_exec('lxi scpi -a '.$adresse.' "c1:tra?"'); | |
4 | + if(array_key_exists('tra_c1',$_POST)){ | |
5 | + if(strpos($trace_c1,"ON")!=false){ | |
6 | + shell_exec('lxi scpi -a '.$adresse.' "c1:tra off"'); | |
7 | + }else{ | |
8 | + shell_exec('lxi scpi -a '.$adresse.' "c1:tra on"'); | |
9 | + } | |
10 | + $trace_c1 = shell_exec('lxi scpi -a '.$adresse.' "c1:tra?"'); | |
11 | + } | |
12 | +?> | ... | ... |
... | ... | @@ -0,0 +1,8 @@ |
1 | +<?php | |
2 | + /* Commande Attenuation Sonde CH1 */ | |
3 | + if(array_key_exists('c1_sonde',$_POST)){ | |
4 | + $c1sonde=$_POST["c1_sonde"]; | |
5 | + shell_exec('lxi scpi -a '.$adresse.' "c1:attn '.$c1sonde.'"'); | |
6 | + } | |
7 | + $c1sonde=shell_exec('lxi scpi -a '.$adresse.' "c1:attn?"'); | |
8 | +?> | ... | ... |
... | ... | @@ -0,0 +1,24 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <label for="c1_sonde">Attenuation Sonde CH1 :</label> | |
5 | + <select id="c1_sonde" name="c1_sonde" onchange="this.form.submit();"> | |
6 | + <option value="0.1" <?php if(strpos($c1sonde,"ATTN 0.1")!=false) echo "selected" ?> >0.1X</option> | |
7 | + <option value="0.2" <?php if(strpos($c1sonde,"ATTN 0.2")!=false) echo "selected" ?> >0.2X</option> | |
8 | + <option value="0.5" <?php if(strpos($c1sonde,"ATTN 0.5")!=false) echo "selected" ?> >0.5X</option> | |
9 | + <option value="1" <?php if(strpos($c1sonde,"ATTN 1")!=false) echo "selected" ?> >1X</option> | |
10 | + <option value="2" <?php if(strpos($c1sonde,"ATTN 2")!=false) echo "selected" ?> >2X</option> | |
11 | + <option value="5" <?php if(strpos($c1sonde,"ATTN 5")!=false) echo "selected" ?> >5X</option> | |
12 | + <option value="10" <?php if(strpos($c1sonde,"ATTN 10")!=false) echo "selected" ?> >10X</option> | |
13 | + <option value="20" <?php if(strpos($c1sonde,"ATTN 20")!=false) echo "selected" ?> >20X</option> | |
14 | + <option value="50" <?php if(strpos($c1sonde,"ATTN 50")!=false) echo "selected" ?> >50X</option> | |
15 | + <option value="100" <?php if(strpos($c1sonde,"ATTN 100")!=false) echo "selected" ?> >100X</option> | |
16 | + <option value="200" <?php if(strpos($c1sonde,"ATTN 200")!=false) echo "selected" ?> >200X</option> | |
17 | + <option value="500" <?php if(strpos($c1sonde,"ATTN 500")!=false) echo "selected" ?> >500X</option> | |
18 | + <option value="1000" <?php if(strpos($c1sonde,"ATTN 1000")!=false) echo "selected" ?> >1000X</option> | |
19 | + <option value="2000" <?php if(strpos($c1sonde,"ATTN 2000")!=false) echo "selected" ?> >2000X</option> | |
20 | + <option value="5000" <?php if(strpos($c1sonde,"ATTN 5000")!=false) echo "selected" ?> >5000X</option> | |
21 | + <option value="10000" <?php if(strpos($c1sonde,"ATTN 10000")!=false) echo "selected" ?> >10000X</option> | |
22 | + </select> | |
23 | + </form> | |
24 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,10 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <label for="c1_unit">Unité CH1 :</label> | |
5 | + <select id="c1_unit" name="c1_unit" onchange="this.form.submit();"> | |
6 | + <option value="V" <?php if(strpos($c1u,"V")!=false) echo "selected" ?> >Volt</option> | |
7 | + <option value="A" <?php if(strpos($c1u,"A")!=false) echo "selected" ?> >Ampere</option> | |
8 | + </select> | |
9 | + </form> | |
10 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,14 @@ |
1 | +<?php | |
2 | + /* Commande Volts/DIV CH1 */ | |
3 | + if(array_key_exists('c1_vdiv',$_POST)){ | |
4 | + $div=$_POST["c1_vdiv"]; | |
5 | + shell_exec('lxi scpi -a '.$adresse.' "c1:vdiv '.$div.'"'); | |
6 | + } | |
7 | + if(strpos($c1u,"A")!=false){ | |
8 | + shell_exec('lxi scpi -a '.$adresse.' "c1:unit V"'); | |
9 | + $vdiv1=shell_exec('lxi scpi -a '.$adresse.' "c1:vdiv?"'); | |
10 | + shell_exec('lxi scpi -a '.$adresse.' "c1:unit A"'); | |
11 | + }else{ | |
12 | + $vdiv1=shell_exec('lxi scpi -a '.$adresse.' "c1:vdiv?"'); | |
13 | + } | |
14 | +?> | ... | ... |
html/Oscilloscope_test/CH1/4_Vdiv/form_volt_div.php
0 → 100644
... | ... | @@ -0,0 +1,26 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <?php | |
4 | + /* TODO : Meilleur endroit ? */ | |
5 | + $vdiv1 = floatval(substr($vdiv1,8,-2)); | |
6 | + $sonde = floatval(substr($c1sonde,7)); | |
7 | + $unite1 = substr($c1u,8,-1); | |
8 | + ?> | |
9 | + <form method="post" action="main.php"> | |
10 | + <label for="c1_vdiv"><?php if($unite1=="A"){echo "Amps";}else{echo "Volts";}?>/div CH1 :</label> | |
11 | + <select id="c1_vdiv" name="c1_vdiv" onchange="this.form.submit();"> | |
12 | + <option value="<?php echo floatval(2.00E-03)*$sonde ?>V" <?php if($vdiv1==(floatval(2.00E-03*$sonde))) echo "selected" ?> ><?php echo floatval(2.00E-03)*$sonde.$unite1 ?></option> | |
13 | + <option value="<?php echo floatval(5.00E-03)*$sonde ?>V" <?php if($vdiv1==(floatval(5.00E-03*$sonde))) echo "selected" ?> ><?php echo floatval(5.00E-03)*$sonde.$unite1 ?></option> | |
14 | + <option value="<?php echo floatval(1.00E-02)*$sonde ?>V" <?php if($vdiv1==(floatval(1.00E-02*$sonde))) echo "selected" ?> ><?php echo floatval(1.00E-02)*$sonde.$unite1 ?></option> | |
15 | + <option value="<?php echo floatval(2.00E-02)*$sonde ?>V" <?php if($vdiv1==(floatval(2.00E-02*$sonde))) echo "selected" ?> ><?php echo floatval(2.00E-02)*$sonde.$unite1 ?></option> | |
16 | + <option value="<?php echo floatval(5.00E-02)*$sonde ?>V" <?php if($vdiv1==(floatval(5.00E-02*$sonde))) echo "selected" ?> ><?php echo floatval(5.00E-02)*$sonde.$unite1 ?></option> | |
17 | + <option value="<?php echo floatval(1.00E-01)*$sonde ?>V" <?php if($vdiv1==(floatval(1.00E-01*$sonde))) echo "selected" ?> ><?php echo floatval(1.00E-01)*$sonde.$unite1 ?></option> | |
18 | + <option value="<?php echo floatval(2.00E-01)*$sonde ?>V" <?php if($vdiv1==(floatval(2.00E-01*$sonde))) echo "selected" ?> ><?php echo floatval(2.00E-01)*$sonde.$unite1 ?></option> | |
19 | + <option value="<?php echo floatval(5.00E-01)*$sonde ?>V" <?php if($vdiv1==(floatval(5.00E-01*$sonde))) echo "selected" ?> ><?php echo floatval(5.00E-01)*$sonde.$unite1 ?></option> | |
20 | + <option value="<?php echo floatval(1.00E+00)*$sonde ?>V" <?php if($vdiv1==(floatval(1.00E+00*$sonde))) echo "selected" ?> ><?php echo floatval(1.00E+00)*$sonde.$unite1 ?></option> | |
21 | + <option value="<?php echo floatval(2.00E+00)*$sonde ?>V" <?php if($vdiv1==(floatval(2.00E+00*$sonde))) echo "selected" ?> ><?php echo floatval(2.00E+00)*$sonde.$unite1 ?></option> | |
22 | + <option value="<?php echo floatval(5.00E+00)*$sonde ?>V" <?php if($vdiv1==(floatval(5.00E+00*$sonde))) echo "selected" ?> ><?php echo floatval(5.00E+00)*$sonde.$unite1 ?></option> | |
23 | + <option value="<?php echo floatval(1.00E+01)*$sonde ?>V" <?php if($vdiv1==(floatval(1.00E+01*$sonde))) echo "selected" ?> ><?php echo floatval(1.00E+01)*$sonde.$unite1 ?></option> | |
24 | + </select> | |
25 | + </form> | |
26 | +</html> | ... | ... |
html/Oscilloscope_test/CH1/5_Couplage/cmd_couplage.php
0 → 100644
html/Oscilloscope_test/CH1/5_Couplage/form_couplage.php
0 → 100644
... | ... | @@ -0,0 +1,11 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <label for="c1_cpl">Couplage CH1 :</label> | |
5 | + <select id="c1_cpl" name="c1_cpl" onchange="this.form.submit();"> | |
6 | + <option value="D1M" <?php if(strpos($c1cpl,"D1M")!=false) echo "selected" ?> >DC</option> | |
7 | + <option value="A1M" <?php if(strpos($c1cpl,"A1M")!=false) echo "selected" ?> >AC</option> | |
8 | + <option value="GND" <?php if(strpos($c1cpl,"GND")!=false) echo "selected" ?> >GND</option> | |
9 | + </select> | |
10 | + </form> | |
11 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,37 @@ |
1 | +<?php | |
2 | + /* Filtre CH1 */ | |
3 | + if(array_key_exists('filt_c1',$_POST)){ | |
4 | + $filt_c1 = shell_exec('lxi scpi -a '.$adresse.' "c1:filt?"'); | |
5 | + if(strpos($filt_c1,"ON")!=false){ | |
6 | + shell_exec('lxi scpi -a '.$adresse.' "c1:filt off"'); | |
7 | + }else{ | |
8 | + shell_exec('lxi scpi -a '.$adresse.' "c1:filt on"'); | |
9 | + } | |
10 | + } | |
11 | + $trace_c1=shell_exec('lxi scpi -a '.$adresse.' "c1:tra?"'); | |
12 | + if(strpos($trace_c1,"OFF")!=false){ | |
13 | + $filt_c1="OFF"; | |
14 | + }else{ | |
15 | + $filt_c1 = shell_exec('lxi scpi -a '.$adresse.' "c1:filt?"'); | |
16 | + } | |
17 | + /* TODO : Probleme (Voir erreur /var/log/apache2/error.log) */ | |
18 | + /* Commande type de filtre CH1 */ | |
19 | + if(array_key_exists('c1_filts',$_POST)){ | |
20 | + $c1filts=$_POST['c1_filts']; | |
21 | + if($c1filts=="LP"){ | |
22 | + $limite_sup = floatval($_POST['lim_sup']); | |
23 | + shell_exec('lxi scpi -a '.$adresse.' "c1:filts type,'.$c1filts.',upplimit,'.$limite_sup.'MHz"'); | |
24 | + }else if($c1filts=="HP"){ | |
25 | + $limite_inf = $_POST['lim_inf']; | |
26 | + shell_exec('lxi scpi -a '.$adresse.' "c1:filts type,'.$c1filts.',lowlimit,'.$limite_inf.'MHz"'); | |
27 | + }else{ | |
28 | + $limite_sup = $_POST['lim_sup']; | |
29 | + $limite_inf = $_POST['lim_inf']; | |
30 | + if($limite_inf>=$limite_sup){ | |
31 | + $limite_inf=$limite_sup-5; | |
32 | + } | |
33 | + shell_exec('lxi scpi -a '.$adresse.' "c1:filts type,'.$c1filts.',upplimit,'.$limite_sup.'MHz,lowlimit,'.$limite_inf.'MHz"'); | |
34 | + } | |
35 | + } | |
36 | + $c1filts=shell_exec('lxi scpi -a '.$adresse.' "c1:filts?"'); | |
37 | +?> | ... | ... |
html/Oscilloscope_test/CH1/6_Filtre/form_filtre.php
0 → 100644
... | ... | @@ -0,0 +1,72 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <input type="submit" name="filt_c1" value="Filtre ON/OFF CH1" class="btn btn-outline-danger"/> | |
5 | + </form> | |
6 | + <?php | |
7 | + echo "Etat du filtre : "; | |
8 | + if(strpos($filt_c1,"ON")){ | |
9 | + echo "ON"; | |
10 | + echo "<br/>"; | |
11 | + if(strpos($c1filts,"LP")!=false){ | |
12 | + echo "<form method='post' action='main.php?tab=CH1' oninput='limitesup.value=lim_sup.value;'>"; | |
13 | + }else if(strpos($c1filts,"HP")!=false){ | |
14 | + echo "<form method='post' action='main.php?tab=CH1' oninput='limiteinf.value=lim_inf.value;'>"; | |
15 | + }else{ | |
16 | + echo "<form method='post' action='main.php?tab=CH1' oninput='limitesup.value=lim_sup.value; limiteinf.value=lim_inf.value;'>"; | |
17 | + } | |
18 | + echo '<fieldset>'; | |
19 | + echo "<label for='c1_filts'>Type du Filtre : </label>"; | |
20 | + echo "<select id='c1_filts' name='c1_filts' onchange='this.form.submit();'>"; | |
21 | + echo "<option value='LP' "; | |
22 | + if(strpos($c1filts,"LP")!=false) echo "selected"; | |
23 | + echo ">Passe Bas</option>"; | |
24 | + echo "<option value='HP' "; | |
25 | + if(strpos($c1filts,"HP")!=false) echo "selected"; | |
26 | + echo ">Passe Haut</option>"; | |
27 | + echo "<option value='BP' "; | |
28 | + if(strpos($c1filts,"BP")!=false) echo "selected"; | |
29 | + echo ">Passe Bande</option>"; | |
30 | + echo "<option value='BR' "; | |
31 | + if(strpos($c1filts,"BR")!=false) echo "selected"; | |
32 | + echo ">Coupe Bande</option>"; | |
33 | + echo "</select>"; | |
34 | + if(strpos($c1filts,"LP")!=false){ | |
35 | + $limite = strstr($c1filts,"UPPLIMIT"); | |
36 | + $lim_sup=floatval(substr($limite,9,-4)); | |
37 | + echo '<label for="lim_sup" class="form-range">Limite supérieure passe bas</label>'; | |
38 | + 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();">'; | |
39 | + echo '<br/>'; | |
40 | + echo 'Fréquence : <output for="out" name="limitesup">'.$lim_sup.'</output> MHz'; | |
41 | + echo '<br/>'; | |
42 | + }else if(strpos($c1filts,"HP")!=false){ | |
43 | + $limite = strstr($c1filts,"LOWLIMIT"); | |
44 | + $lim_inf=floatval(substr($limite,9,-4)); | |
45 | + echo '<label for="lim_inf" class="form-range">Limite inférieure</label>'; | |
46 | + 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();">'; | |
47 | + echo '<br/>'; | |
48 | + echo 'Fréquence : <output for="out" name="limiteinf">'.$lim_inf.'</output> MHz'; | |
49 | + echo '<br/>'; | |
50 | + }else{ | |
51 | + $limite = strstr($c1filts,"UPPLIMIT"); | |
52 | + $lim_sup=floatval(substr($limite,9,-4)); | |
53 | + $limite = strstr($c1filts,"LOWLIMIT"); | |
54 | + $lim_inf=floatval(substr($limite,9,-4)); | |
55 | + echo '<label for="lim_sup" class="form-range">Limite supérieure</label>'; | |
56 | + 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();">'; | |
57 | + echo '<br/>'; | |
58 | + echo 'Fréquence : <output for="out" name="limitesup">'.$lim_sup.'</output> MHz'; | |
59 | + echo '<br/>'; | |
60 | + echo '<label for="lim_inf" class="form-range">Limite inférieure</label>'; | |
61 | + 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();">'; | |
62 | + echo '<br/>'; | |
63 | + echo 'Fréquence : <output for="out" name="limiteinf">'.$lim_inf.'</output> MHz'; | |
64 | + echo '<br/>'; | |
65 | + } | |
66 | + echo '</fieldset>'; | |
67 | + echo "</form>"; | |
68 | + }else{ | |
69 | + echo "OFF"; | |
70 | + } | |
71 | + ?> | |
72 | +</html> | ... | ... |
html/Oscilloscope_test/CH1/7_Trigger_level/cmd_trig_lvl.php
0 → 100644
... | ... | @@ -0,0 +1,8 @@ |
1 | +<?php | |
2 | + /* Commande trigger level CH1 */ | |
3 | + if(array_key_exists('c1_trlv',$_POST)){ | |
4 | + $c1trlv=floatval($_POST['c1_trlv']); | |
5 | + shell_exec('lxi scpi -a '.$adresse.' "c1:trlv '.$c1trlv.'"'); | |
6 | + } | |
7 | + $c1trlv=shell_exec('lxi scpi -a '.$adresse.' "c1:trlv?"'); | |
8 | +?> | ... | ... |
html/Oscilloscope_test/CH1/7_Trigger_level/form_trig_lvl.php
0 → 100644
... | ... | @@ -0,0 +1,13 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <?php | |
4 | + /* TODO : Meilleur endroit ? */ | |
5 | + $val_c1trlv = floatval(substr($c1trlv,8,-2))/$vdiv1; | |
6 | + ?> | |
7 | + <form method='post' action='main.php' oninput='c1_triglv.value=c1_trlv.value'> | |
8 | + <label for="c1_trlv" class="form-range">Trigger Level CH1</label> | |
9 | + <input type="range" id="c1_trlv" name="c1_trlv" class="form-range" min="<?php echo (-4)*$vdiv1; ?>" max="<?php echo 4*$vdiv1; ?>" step="0.1" value="<?php echo $val_c1trlv*$vdiv1; ?>" onchange="this.form.submit();"> | |
10 | + <br/> | |
11 | + Trigger level : <output for="out" name="c1_triglv"><?php echo $val_c1trlv*$vdiv1; ?></output> V | |
12 | + </form> | |
13 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,13 @@ |
1 | +<?php | |
2 | + /* Commande Tracer CH2 */ | |
3 | + $trace_c2 = shell_exec('lxi scpi -a '.$adresse.' "c2:tra?"'); | |
4 | + if(array_key_exists('tra_c2',$_POST)){ | |
5 | + $trace_c2 = shell_exec('lxi scpi -a '.$adresse.' "c2:tra?"'); | |
6 | + if(strpos($trace_c2,"ON")!=false){ | |
7 | + shell_exec('lxi scpi -a '.$adresse.' "c2:tra off"'); | |
8 | + }else{ | |
9 | + shell_exec('lxi scpi -a '.$adresse.' "c2:tra on"'); | |
10 | + } | |
11 | + $trace_c2 = shell_exec('lxi scpi -a '.$adresse.' "c2:tra?"'); | |
12 | + } | |
13 | +?> | ... | ... |
... | ... | @@ -0,0 +1,8 @@ |
1 | +<?php | |
2 | + /* Commande Attenuation Sonde CH2 */ | |
3 | + if(array_key_exists('c2_sonde',$_POST)){ | |
4 | + $c2sonde=$_POST["c2_sonde"]; | |
5 | + shell_exec('lxi scpi -a '.$adresse.' "c2:attn '.$c2sonde.'"'); | |
6 | + } | |
7 | + $c2sonde=shell_exec('lxi scpi -a '.$adresse.' "c2:attn?"'); | |
8 | +?> | ... | ... |
... | ... | @@ -0,0 +1,24 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <label for="c2_sonde">Attenuation Sonde CH2 :</label> | |
5 | + <select id="c2_sonde" name="c2_sonde" onchange="this.form.submit();"> | |
6 | + <option value="0.1" <?php if(strpos($c2sonde,"ATTN 0.1")!=false) echo "selected" ?> >0.1X</option> | |
7 | + <option value="0.2" <?php if(strpos($c2sonde,"ATTN 0.2")!=false) echo "selected" ?> >0.2X</option> | |
8 | + <option value="0.5" <?php if(strpos($c2sonde,"ATTN 0.5")!=false) echo "selected" ?> >0.5X</option> | |
9 | + <option value="1" <?php if(strpos($c2sonde,"ATTN 1")!=false) echo "selected" ?> >1X</option> | |
10 | + <option value="2" <?php if(strpos($c2sonde,"ATTN 2")!=false) echo "selected" ?> >2X</option> | |
11 | + <option value="5" <?php if(strpos($c2sonde,"ATTN 5")!=false) echo "selected" ?> >5X</option> | |
12 | + <option value="10" <?php if(strpos($c2sonde,"ATTN 10")!=false) echo "selected" ?> >10X</option> | |
13 | + <option value="20" <?php if(strpos($c2sonde,"ATTN 20")!=false) echo "selected" ?> >20X</option> | |
14 | + <option value="50" <?php if(strpos($c2sonde,"ATTN 50")!=false) echo "selected" ?> >50X</option> | |
15 | + <option value="100" <?php if(strpos($c2sonde,"ATTN 100")!=false) echo "selected" ?> >100X</option> | |
16 | + <option value="200" <?php if(strpos($c2sonde,"ATTN 200")!=false) echo "selected" ?> >200X</option> | |
17 | + <option value="500" <?php if(strpos($c2sonde,"ATTN 500")!=false) echo "selected" ?> >500X</option> | |
18 | + <option value="1000" <?php if(strpos($c2sonde,"ATTN 1000")!=false) echo "selected" ?> >1000X</option> | |
19 | + <option value="2000" <?php if(strpos($c2sonde,"ATTN 2000")!=false) echo "selected" ?> >2000X</option> | |
20 | + <option value="5000" <?php if(strpos($c2sonde,"ATTN 5000")!=false) echo "selected" ?> >5000X</option> | |
21 | + <option value="10000" <?php if(strpos($c2sonde,"ATTN 10000")!=false) echo "selected" ?> >10000X</option> | |
22 | + </select> | |
23 | + </form> | |
24 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,10 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <label for="c2_unit">Unité CH2 :</label> | |
5 | + <select id="c2_unit" name="c2_unit" onchange="this.form.submit();"> | |
6 | + <option value="V" <?php if(strpos($c2u,"V")!=false) echo "selected" ?> >Volt</option> | |
7 | + <option value="A" <?php if(strpos($c2u,"A")!=false) echo "selected" ?> >Ampere</option> | |
8 | + </select> | |
9 | + </form> | |
10 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,14 @@ |
1 | +<?php | |
2 | + /* Commande Volts/DIV CH2 */ | |
3 | + if(array_key_exists('c2_vdiv',$_POST)){ | |
4 | + $div=$_POST["c2_vdiv"]; | |
5 | + shell_exec('lxi scpi -a '.$adresse.' "c2:vdiv '.$div.'"'); | |
6 | + } | |
7 | + if(strpos($c2u,"A")!=false){ | |
8 | + shell_exec('lxi scpi -a '.$adresse.' "c2:unit V"'); | |
9 | + $vdiv2=shell_exec('lxi scpi -a '.$adresse.' "c2:vdiv?"'); | |
10 | + shell_exec('lxi scpi -a '.$adresse.' "c2:unit A"'); | |
11 | + }else{ | |
12 | + $vdiv2=shell_exec('lxi scpi -a '.$adresse.' "c2:vdiv?"'); | |
13 | + } | |
14 | +?> | ... | ... |
html/Oscilloscope_test/CH2/4_Vdiv/form_volt_div.php
0 → 100644
... | ... | @@ -0,0 +1,26 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <?php | |
4 | + /* TODO : Meilleur endroit ? */ | |
5 | + $vdiv2 = floatval(substr($vdiv2,8,-2)); | |
6 | + $sonde = floatval(substr($c2sonde,7)); | |
7 | + $unite2 = substr($c2u,8,-1); | |
8 | + ?> | |
9 | + <form method="post" action="main.php"> | |
10 | + <label for="c2_vdiv"><?php if($unite2=="A"){echo "Amps";}else{echo "Volts";}?>/div CH2 :</label> | |
11 | + <select id="c2_vdiv" name="c2_vdiv" onchange="this.form.submit();"> | |
12 | + <option value="<?php echo floatval(2.00E-03)*$sonde ?>V" <?php if($vdiv2==(floatval(2.00E-03*$sonde))) echo "selected" ?> ><?php echo floatval(2.00E-03)*$sonde.$unite2 ?></option> | |
13 | + <option value="<?php echo floatval(5.00E-03)*$sonde ?>V" <?php if($vdiv2==(floatval(5.00E-03*$sonde))) echo "selected" ?> ><?php echo floatval(5.00E-03)*$sonde.$unite2 ?></option> | |
14 | + <option value="<?php echo floatval(1.00E-02)*$sonde ?>V" <?php if($vdiv2==(floatval(1.00E-02*$sonde))) echo "selected" ?> ><?php echo floatval(1.00E-02)*$sonde.$unite2 ?></option> | |
15 | + <option value="<?php echo floatval(2.00E-02)*$sonde ?>V" <?php if($vdiv2==(floatval(2.00E-02*$sonde))) echo "selected" ?> ><?php echo floatval(2.00E-02)*$sonde.$unite2 ?></option> | |
16 | + <option value="<?php echo floatval(5.00E-02)*$sonde ?>V" <?php if($vdiv2==(floatval(5.00E-02*$sonde))) echo "selected" ?> ><?php echo floatval(5.00E-02)*$sonde.$unite2 ?></option> | |
17 | + <option value="<?php echo floatval(1.00E-01)*$sonde ?>V" <?php if($vdiv2==(floatval(1.00E-01*$sonde))) echo "selected" ?> ><?php echo floatval(1.00E-01)*$sonde.$unite2 ?></option> | |
18 | + <option value="<?php echo floatval(2.00E-01)*$sonde ?>V" <?php if($vdiv2==(floatval(2.00E-01*$sonde))) echo "selected" ?> ><?php echo floatval(2.00E-01)*$sonde.$unite2 ?></option> | |
19 | + <option value="<?php echo floatval(5.00E-01)*$sonde ?>V" <?php if($vdiv2==(floatval(5.00E-01*$sonde))) echo "selected" ?> ><?php echo floatval(5.00E-01)*$sonde.$unite2 ?></option> | |
20 | + <option value="<?php echo floatval(1.00E+00)*$sonde ?>V" <?php if($vdiv2==(floatval(1.00E+00*$sonde))) echo "selected" ?> ><?php echo floatval(1.00E+00)*$sonde.$unite2 ?></option> | |
21 | + <option value="<?php echo floatval(2.00E+00)*$sonde ?>V" <?php if($vdiv2==(floatval(2.00E+00*$sonde))) echo "selected" ?> ><?php echo floatval(2.00E+00)*$sonde.$unite2 ?></option> | |
22 | + <option value="<?php echo floatval(5.00E+00)*$sonde ?>V" <?php if($vdiv2==(floatval(5.00E+00*$sonde))) echo "selected" ?> ><?php echo floatval(5.00E+00)*$sonde.$unite2 ?></option> | |
23 | + <option value="<?php echo floatval(1.00E+01)*$sonde ?>V" <?php if($vdiv2==(floatval(1.00E+01*$sonde))) echo "selected" ?> ><?php echo floatval(1.00E+01)*$sonde.$unite2 ?></option> | |
24 | + </select> | |
25 | + </form> | |
26 | +</html> | ... | ... |
html/Oscilloscope_test/CH2/5_Couplage/cmd_couplage.php
0 → 100644
html/Oscilloscope_test/CH2/5_Couplage/form_couplage.php
0 → 100644
... | ... | @@ -0,0 +1,11 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <label for="c2_cpl">Couplage CH2 :</label> | |
5 | + <select id="c2_cpl" name="c2_cpl" onchange="this.form.submit();"> | |
6 | + <option value="D1M" <?php if(strpos($c2cpl,"D1M")!=false) echo "selected" ?> >DC</option> | |
7 | + <option value="A1M" <?php if(strpos($c2cpl,"A1M")!=false) echo "selected" ?> >AC</option> | |
8 | + <option value="GND" <?php if(strpos($c2cpl,"GND")!=false) echo "selected" ?> >GND</option> | |
9 | + </select> | |
10 | + </form> | |
11 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,36 @@ |
1 | +<?php | |
2 | + /* Filtre CH2 */ | |
3 | + if(array_key_exists('filt_c2',$_POST)){ | |
4 | + $filt_c2 = shell_exec('lxi scpi -a '.$adresse.' "c2:filt?"'); | |
5 | + if(strpos($filt_c2,"ON")!=false){ | |
6 | + shell_exec('lxi scpi -a '.$adresse.' "c2:filt off"'); | |
7 | + }else{ | |
8 | + shell_exec('lxi scpi -a '.$adresse.' "c2:filt on"'); | |
9 | + } | |
10 | + } | |
11 | + $trace_c2=shell_exec('lxi scpi -a '.$adresse.' "c2:tra?"'); | |
12 | + if(strpos($trace_c2,"OFF")!=false){ | |
13 | + $filt_c2="OFF"; | |
14 | + }else{ | |
15 | + $filt_c2 = shell_exec('lxi scpi -a '.$adresse.' "c2:filt?"'); | |
16 | + } | |
17 | + /* Commande type de filtre CH2 */ | |
18 | + if(array_key_exists('c2_filts',$_POST)){ | |
19 | + $c2filts=$_POST['c2_filts']; | |
20 | + if($c2filts=="LP"){ | |
21 | + $limite_sup = floatval($_POST['lim_sup']); | |
22 | + shell_exec('lxi scpi -a '.$adresse.' "c2:filts type,'.$c2filts.',upplimit,'.$limite_sup.'MHz"'); | |
23 | + }else if($c1filts=="HP"){ | |
24 | + $limite_inf = $_POST['lim_inf']; | |
25 | + shell_exec('lxi scpi -a '.$adresse.' "c2:filts type,'.$c2filts.',lowlimit,'.$limite_inf.'MHz"'); | |
26 | + }else{ | |
27 | + $limite_sup = $_POST['lim_sup']; | |
28 | + $limite_inf = $_POST['lim_inf']; | |
29 | + if($limite_inf>=$limite_sup){ | |
30 | + $limite_inf=$limite_sup-5; | |
31 | + } | |
32 | + shell_exec('lxi scpi -a '.$adresse.' "c2:filts type,'.$c2filts.',upplimit,'.$limite_sup.'MHz,lowlimit,'.$limite_inf.'MHz"'); | |
33 | + } | |
34 | + } | |
35 | + $c2filts=shell_exec('lxi scpi -a '.$adresse.' "c2:filts?"'); | |
36 | +?> | ... | ... |
html/Oscilloscope_test/CH2/6_Filtre/form_filtre.php
0 → 100644
... | ... | @@ -0,0 +1,72 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <input type="submit" name="filt_c2" value="Filtre ON/OFF CH2" class="btn btn-outline-danger"/> | |
5 | + </form> | |
6 | + <?php | |
7 | + echo "Etat du filtre : "; | |
8 | + if(strpos($filt_c2,"ON")){ | |
9 | + echo "ON"; | |
10 | + echo "<br/>"; | |
11 | + if(strpos($c2filts,"LP")!=false){ | |
12 | + echo "<form method='post' action='main.php?tab=CH2' oninput='limitesup.value=lim_sup.value;'>"; | |
13 | + }else if(strpos($c2filts,"HP")!=false){ | |
14 | + echo "<form method='post' action='main.php?tab=CH2' oninput='limiteinf.value=lim_inf.value;'>"; | |
15 | + }else{ | |
16 | + echo "<form method='post' action='main.php?tab=CH2' oninput='limitesup.value=lim_sup.value; limiteinf.value=lim_inf.value;'>"; | |
17 | + } | |
18 | + echo '<fieldset>'; | |
19 | + echo "<label for='c2_filts'>Type du Filtre : </label>"; | |
20 | + echo "<select id='c2_filts' name='c2_filts'>"; | |
21 | + echo "<option value='LP' "; | |
22 | + if(strpos($c2filts,"LP")!=false) echo "selected"; | |
23 | + echo ">Passe Bas</option>"; | |
24 | + echo "<option value='HP' "; | |
25 | + if(strpos($c2filts,"HP")!=false) echo "selected"; | |
26 | + echo ">Passe Haut</option>"; | |
27 | + echo "<option value='BP' "; | |
28 | + if(strpos($c2filts,"BP")!=false) echo "selected"; | |
29 | + echo ">Passe Bande</option>"; | |
30 | + echo "<option value='BR' "; | |
31 | + if(strpos($c2filts,"BR")!=false) echo "selected"; | |
32 | + echo ">Coupe Bande</option>"; | |
33 | + echo "</select>"; | |
34 | + if(strpos($c2filts,"LP")!=false){ | |
35 | + $limite = strstr($c2filts,"UPPLIMIT"); | |
36 | + $lim_sup=floatval(substr($limite,9,-4)); | |
37 | + echo '<label for="lim_sup" class="form-range">Limite supérieure passe bas</label>'; | |
38 | + 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();">'; | |
39 | + echo '<br/>'; | |
40 | + echo 'Fréquence : <output for="out" name="limitesup">'.$lim_sup.'</output> MHz'; | |
41 | + echo '<br/>'; | |
42 | + }else if(strpos($c2filts,"HP")!=false){ | |
43 | + $limite = strstr($c2filts,"LOWLIMIT"); | |
44 | + $lim_inf=floatval(substr($limite,9,-4)); | |
45 | + echo '<label for="lim_inf" class="form-range">Limite inférieure</label>'; | |
46 | + 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();">'; | |
47 | + echo '<br/>'; | |
48 | + echo 'Fréquence : <output for="out" name="limiteinf">'.$lim_inf.'</output> MHz'; | |
49 | + echo '<br/>'; | |
50 | + }else{ | |
51 | + $limite = strstr($c2filts,"UPPLIMIT"); | |
52 | + $lim_sup=floatval(substr($limite,9,-4)); | |
53 | + $limite = strstr($c2filts,"LOWLIMIT"); | |
54 | + $lim_inf=floatval(substr($limite,9,-4)); | |
55 | + echo '<label for="lim_sup" class="form-range">Limite supérieure</label>'; | |
56 | + 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();">'; | |
57 | + echo '<br/>'; | |
58 | + echo 'Fréquence : <output for="out" name="limitesup">'.$lim_sup.'</output> MHz'; | |
59 | + echo '<br/>'; | |
60 | + echo '<label for="lim_inf" class="form-range">Limite inférieure</label>'; | |
61 | + 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();">'; | |
62 | + echo '<br/>'; | |
63 | + echo 'Fréquence : <output for="out" name="limiteinf">'.$lim_inf.'</output> MHz'; | |
64 | + echo '<br/>'; | |
65 | + } | |
66 | + echo '</fieldset>'; | |
67 | + echo "</form>"; | |
68 | + }else{ | |
69 | + echo "OFF"; | |
70 | + } | |
71 | + ?> | |
72 | +</html> | ... | ... |
html/Oscilloscope_test/CH2/7_Trigger_level/cmd_trig_lvl.php
0 → 100644
... | ... | @@ -0,0 +1,8 @@ |
1 | +<?php | |
2 | + /* Commande trigger level CH2 */ | |
3 | + if(array_key_exists('c2_trlv',$_POST)){ | |
4 | + $c2trlv=floatval($_POST['c2_trlv']); | |
5 | + shell_exec('lxi scpi -a '.$adresse.' "c2:trlv '.$c2trlv.'"'); | |
6 | + } | |
7 | + $c2trlv=shell_exec('lxi scpi -a '.$adresse.' "c2:trlv?"'); | |
8 | +?> | ... | ... |
html/Oscilloscope_test/CH2/7_Trigger_level/form_trig_lvl.php
0 → 100644
... | ... | @@ -0,0 +1,13 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <?php | |
4 | + /* TODO : Meilleur endroit ? */ | |
5 | + $val_c2trlv = floatval(substr($c2trlv,8,-2))/$vdiv2; | |
6 | + ?> | |
7 | + <form method='post' action='main.php' oninput='c2_triglv.value=c2_trlv.value'> | |
8 | + <label for="c2_trlv" class="form-range">Trigger Level CH2</label> | |
9 | + <input type="range" id="c2_trlv" name="c2_trlv" class="form-range" min="<?php echo (-4)*$vdiv2; ?>" max="<?php echo 4*$vdiv2; ?>" step="0.1" value="<?php echo $val_c2trlv*$vdiv2; ?>" onchange="this.form.submit();"> | |
10 | + <br/> | |
11 | + Trigger level : <output for="out" name="c2_triglv"><?php echo $val_c2trlv*$vdiv2; ?></output> V | |
12 | + </form> | |
13 | +</html> | ... | ... |
html/Oscilloscope_test/Curseurs/1_Choix/cmd_choix.php
0 → 100644
html/Oscilloscope_test/Curseurs/1_Choix/form_choix.php
0 → 100644
... | ... | @@ -0,0 +1,11 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <label for="crms">Curseurs de mesure :</label> | |
5 | + <select id="crms" name="crms" onchange="this.form.submit();"> | |
6 | + <option value="off" <?php if(strpos($crms,"OFF")!=false) echo "selected" ?> >OFF</option> | |
7 | + <option value="hrel" <?php if(strpos($crms,"HREL")!=false) echo "selected" ?> >HREL</option> | |
8 | + <option value="vrel" <?php if(strpos($crms,"VREL")!=false) echo "selected" ?> >VREL</option> | |
9 | + </select> | |
10 | + </form> | |
11 | +<html> | ... | ... |
html/Oscilloscope_test/Curseurs/2_Affichage_curseurs/cmd_affichage_curseurs.php
0 → 100644
... | ... | @@ -0,0 +1,50 @@ |
1 | +<?php | |
2 | + if(strpos($crms,'OFF')==false){ | |
3 | + /* HREL Curseurs */ | |
4 | + if(array_key_exists('choix',$_POST)){ | |
5 | + $voie=$_POST['choix']; | |
6 | + } | |
7 | + if(array_key_exists('hrel_curseurA',$_POST)){ | |
8 | + $hrelA=$_POST["hrel_curseurA"]; | |
9 | + shell_exec('lxi scpi -a '.$adresse.' "'.$voie.':crst href,'.$hrelA.'"'); | |
10 | + } | |
11 | + if(array_key_exists('hrel_curseurB',$_POST)){ | |
12 | + $hrelB=$_POST["hrel_curseurB"]; | |
13 | + shell_exec('lxi scpi -a '.$adresse.' "'.$voie.':crst hdif,'.$hrelB.'"'); | |
14 | + } | |
15 | + /* VREL Curseurs */ | |
16 | + if(array_key_exists('vrel_curseurA',$_POST)){ | |
17 | + $vrelA=$_POST["vrel_curseurA"]; | |
18 | + shell_exec('lxi scpi -a '.$adresse.' "'.$voie.':crst vref,'.$vrelA.'"'); | |
19 | + } | |
20 | + if(array_key_exists('vrel_curseurB',$_POST)){ | |
21 | + $vrelB=$_POST["vrel_curseurB"]; | |
22 | + shell_exec('lxi scpi -a '.$adresse.' "'.$voie.':crst vdif,'.$vrelB.'"'); | |
23 | + } | |
24 | + $crms=shell_exec('lxi scpi -a '.$adresse.' "crms?"'); | |
25 | + if(strpos($crms,'HREL')!=false){ | |
26 | + if(isset($voie)){ | |
27 | + $hrelA=shell_exec('lxi scpi -a '.$adresse.' "'.$voie.':crst? href"'); | |
28 | + $hrelB=shell_exec('lxi scpi -a '.$adresse.' "'.$voie.':crst? hdif"'); | |
29 | + }else if(strpos($trace_c1,"ON")!=false){ | |
30 | + $hrelA=shell_exec('lxi scpi -a '.$adresse.' "c1:crst? href"'); | |
31 | + $hrelB=shell_exec('lxi scpi -a '.$adresse.' "c1:crst? hdif"'); | |
32 | + }else{ | |
33 | + $hrelA=shell_exec('lxi scpi -a '.$adresse.' "c2:crst? href"'); | |
34 | + $hrelB=shell_exec('lxi scpi -a '.$adresse.' "c2:crst? hdif"'); | |
35 | + } | |
36 | + } | |
37 | + if(strpos($crms,'VREL')!=false){ | |
38 | + if(isset($voie)){ | |
39 | + $vrelA=shell_exec('lxi scpi -a '.$adresse.' "'.$voie.':crst? vref"'); | |
40 | + $vrelB=shell_exec('lxi scpi -a '.$adresse.' "'.$voie.':crst? vdif"'); | |
41 | + }else if(strpos($trace_c1,"ON")!=false){ | |
42 | + $vrelA=shell_exec('lxi scpi -a '.$adresse.' "c1:crst? vref"'); | |
43 | + $vrelB=shell_exec('lxi scpi -a '.$adresse.' "c1:crst? vdif"'); | |
44 | + }else{ | |
45 | + $vrelA=shell_exec('lxi scpi -a '.$adresse.' "c2:crst? vref"'); | |
46 | + $vrelB=shell_exec('lxi scpi -a '.$adresse.' "c2:crst? vdif"'); | |
47 | + } | |
48 | + } | |
49 | + } | |
50 | +?> | ... | ... |
html/Oscilloscope_test/Curseurs/2_Affichage_curseurs/form_affichage_curseurs.php
0 → 100644
... | ... | @@ -0,0 +1,78 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <?php | |
4 | + if(isset($voie)){ | |
5 | + if($voie=="c1"){ | |
6 | + $sel1="selected"; | |
7 | + $sel2=""; | |
8 | + }else if($voie=="c2"){ | |
9 | + $sel1=""; | |
10 | + $sel2="selected"; | |
11 | + } | |
12 | + }else{ | |
13 | + $sel1=""; | |
14 | + $sel2=""; | |
15 | + } | |
16 | + if(strpos($crms,"HREL")!=false){ | |
17 | + $valueA=floatval(substr($hrelA,13)); /* Parfois probleme de decalage par rapport au debut de la fenetre */ | |
18 | + $valueB=floatval(substr($hrelB,13)); | |
19 | + /* Curseur A */ | |
20 | + echo '<form method="post" action="oscillo.php" oninput="resultatA.value=hrel_curseurA.value; resultatB.value=hrel_curseurB.value">'; | |
21 | + echo '<fieldset>'; | |
22 | + if(strpos($trace_c1,"ON")!=false or strpos($trace_c2,"ON")!=false){ | |
23 | + echo '<label for="choix">Voie :</label>'; | |
24 | + echo '<select id="choix" name="choix" onchange="this.form.submit();">'; | |
25 | + if(strpos($trace_c1,"ON")!=false){ | |
26 | + echo '<option value="c1" '.$sel1.'>CH1</option>'; | |
27 | + } | |
28 | + if(strpos($trace_c2,"ON")!=false){ | |
29 | + echo '<option value="c2" '.$sel2.'>CH2</option>'; | |
30 | + } | |
31 | + echo '</select>'; | |
32 | + } | |
33 | + echo '<label for="hrel_curseurA" class="form-range">Valeur curseur A</label>'; | |
34 | + echo '<input type="range" id="hrel_curseurA" name="hrel_curseurA" class="form-range" min="0" max="16" step="0.1" value="'.$valueA.'" onchange="this.form.submit();">'; | |
35 | + echo '<br/>'; | |
36 | + echo 'Division : <output for="out" name="resultatA">'.$valueA.'</output>'; | |
37 | + echo '<br/>'; | |
38 | + /* Curseur B */ | |
39 | + echo '<label for="hrel_curseurB" class="form-range">Valeur curseur B</label>'; | |
40 | + echo '<input type="range" id="hrel_curseurB" name="hrel_curseurB" class="form-range" min="0" max="16" step="0.1" value="'.$valueB.'" onchange="this.form.submit();">'; | |
41 | + echo '<br/>'; | |
42 | + echo 'Division : <output for="out" name="resultatB">'.$valueB.'</output>'; | |
43 | + echo '<br/>'; | |
44 | + echo '</fieldset>'; | |
45 | + echo '</form>'; | |
46 | + }else if(strpos($crms,"VREL")!=false){ | |
47 | + $valueA=floatval(substr($vrelA,13)); | |
48 | + $valueB=floatval(substr($vrelB,13)); | |
49 | + /* Curseur A */ | |
50 | + echo '<form method="post" action="oscillo.php" oninput="resultatA.value=vrel_curseurA.value; resultatB.value=vrel_curseurB.value">'; | |
51 | + echo '<fieldset>'; | |
52 | + if(strpos($trace_c1,"ON")!=false or strpos($trace_c2,"ON")!=false){ | |
53 | + echo '<label for="choix">Voie :</label>'; | |
54 | + echo '<select id="choix" name="choix" onchange="this.form.submit();">'; | |
55 | + if(strpos($trace_c1,"ON")!=false){ | |
56 | + echo '<option value="c1" '.$sel1.'>CH1</option>'; | |
57 | + } | |
58 | + if(strpos($trace_c2,"ON")!=false){ | |
59 | + echo '<option value="c2" '.$sel2.'>CH2</option>'; | |
60 | + } | |
61 | + echo '</select>'; | |
62 | + } | |
63 | + echo '<label for="vrel_curseurA" class="form-range">Valeur curseur A</label>'; | |
64 | + echo '<input type="range" id="vrel_curseurA" name="vrel_curseurA" min="-4" max="4" step="0.1" value="'.$valueA.'" orient="vertical" onchange="this.form.submit();">'; | |
65 | + echo '<br/>'; | |
66 | + echo 'Division : <output for="out" name="resultatA">'.$valueA.'</output>'; | |
67 | + echo '<br/>'; | |
68 | + /* Curseur B */ | |
69 | + echo '<label for="vrel_curseurB" class="form-range">Valeur curseur B</label>'; | |
70 | + echo '<input type="range" id="vrel_curseurB" name="vrel_curseurB" min="-4" max="4" step="0.1" value="'.$valueB.'" orient="vertical" onchange="this.form.submit();">'; | |
71 | + echo '<br/>'; | |
72 | + echo 'Division : <output for="out" name="resultatB">'.$valueB.'</output>'; | |
73 | + echo '<br/>'; | |
74 | + echo '</fieldset>'; | |
75 | + echo '</form>'; | |
76 | + } | |
77 | + ?> | |
78 | +</html> | ... | ... |
html/Oscilloscope_test/Global/1_Mode_acqw/cmd_acqw.php
0 → 100644
... | ... | @@ -0,0 +1,14 @@ |
1 | +<?php | |
2 | + /* Commande Mode Acquisition */ | |
3 | + if(array_key_exists('acqw',$_POST)){ | |
4 | + $acquire=$_POST['acqw']; | |
5 | + shell_exec('lxi scpi -a '.$adresse.' "acqw '.$acquire.'"'); | |
6 | + } | |
7 | + /* Commande nombre de point moyen acquisition */ | |
8 | + if(array_key_exists('avga',$_POST)){ | |
9 | + $points=$_POST['avga']; | |
10 | + shell_exec('lxi scpi -a '.$adresse.' "avga '.$points.'"'); | |
11 | + } | |
12 | + $acqw_mode=shell_exec('lxi scpi -a '.$adresse.' "acqw?"'); | |
13 | + $avga=shell_exec('lxi scpi -a '.$adresse.' "avga?"'); | |
14 | +?> | ... | ... |
html/Oscilloscope_test/Global/1_Mode_acqw/form_acqw.php
0 → 100644
... | ... | @@ -0,0 +1,38 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <label for="acqw">Mode d'acquisition :</label> | |
5 | + <select id="acqw" name="acqw" onchange="this.form.submit();"> | |
6 | + <option value="sampling" <?php if(strpos($acqw_mode,"SAMPLING")!=false) echo "selected"; ?> >Echantillon</option> | |
7 | + <option value="peak_detect" <?php if(strpos($acqw_mode,"PEAK_DETECT")!=false) echo "selected"; ?> >Detection de pic</option> | |
8 | + <option value="average" <?php if(strpos($acqw_mode,"AVERAGE")!=false) echo "selected"; ?> >Moyenne</option> | |
9 | + </select> | |
10 | + </form> | |
11 | + <?php | |
12 | + if(strpos($acqw_mode,"AVERAGE")!=false){ | |
13 | + echo '<form method="post" action="main.php">'; | |
14 | + echo '<label for="avga">Nombre de points moyen :</label>'; | |
15 | + echo '<select id="avga" name="avga" onchange="this.form.submit();">'; | |
16 | + echo '<option value="4" '; | |
17 | + if(strpos($avga,"4")!=false) echo "selected"; | |
18 | + echo '>4</option>'; | |
19 | + echo '<option value="16" '; | |
20 | + if(strpos($avga,"16")!=false) echo "selected"; | |
21 | + echo '>16</option>'; | |
22 | + echo '<option value="32" '; | |
23 | + if(strpos($avga,"32")!=false) echo "selected"; | |
24 | + echo '>32</option>'; | |
25 | + echo '<option value="64" '; | |
26 | + if(strpos($avga,"64")!=false) echo "selected"; | |
27 | + echo '>64</option>'; | |
28 | + echo '<option value="128" '; | |
29 | + if(strpos($avga,"128")!=false) echo "selected"; | |
30 | + echo '>128</option>'; | |
31 | + echo '<option value="256" '; | |
32 | + if(strpos($avga,"256")!=false) echo "selected"; | |
33 | + echo '>256</option>'; | |
34 | + echo '</select>'; | |
35 | + echo '</form>'; | |
36 | + } | |
37 | + ?> | |
38 | +</html> | ... | ... |
html/Oscilloscope_test/Global/2_Cmd/cmd_run_stop_aset.php
0 → 100644
... | ... | @@ -0,0 +1,14 @@ |
1 | +<?php | |
2 | + /* Commande Autoset */ | |
3 | + if(array_key_exists('autoset',$_POST)){ | |
4 | + shell_exec('lxi scpi -a '.$adresse.' "aset"'); | |
5 | + } | |
6 | + /* Commande Run */ | |
7 | + if(array_key_exists('run',$_POST)){ | |
8 | + shell_exec('lxi scpi -a '.$adresse.' "run"'); | |
9 | + } | |
10 | + /* Commande Stop */ | |
11 | + if(array_key_exists('stop',$_POST)){ | |
12 | + shell_exec('lxi scpi -a '.$adresse.' "stop"'); | |
13 | + } | |
14 | +?> | ... | ... |
html/Oscilloscope_test/Global/2_Cmd/form_run_stop_aset.php
0 → 100644
... | ... | @@ -0,0 +1,8 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <input type="submit" name="autoset" value="Autoset" class="btn btn-outline-danger"/> | |
5 | + <input type="submit" name="run" value="Run" class="btn btn-success"/> | |
6 | + <input type="submit" name="stop" value="Stop" class="btn btn-danger"/> | |
7 | + </form> | |
8 | +</html> | ... | ... |
html/Oscilloscope_test/Global/3_Trigger/cmd_trigger_mode.php
0 → 100644
html/Oscilloscope_test/Global/3_Trigger/form_trigger_mode.php
0 → 100644
... | ... | @@ -0,0 +1,12 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php"> | |
4 | + <label for"trmd">Trigger mode :</label> | |
5 | + <select id="trmd" name="trmd" onchange="this.form.submit();"> | |
6 | + <option value="auto" <?php if(strpos($trmd,"AUTO")!=false) echo "selected" ?> >AUTO</option> | |
7 | + <option value="norm" <?php if(strpos($trmd,"NORM")!=false) echo "selected" ?> >NORMAL</option> | |
8 | + <option value="single" <?php if(strpos($trmd,"SINGLE")!=false) echo "selected" ?> >SINGLE</option> | |
9 | + <option value="stop" <?php if(strpos($trmd,"STOP")!=false) echo "selected" ?> >STOP</option> | |
10 | + </select> | |
11 | + </form> | |
12 | +</html> | ... | ... |
html/Oscilloscope_test/Global/4_Temps_par_div/cmd_temps_div.php
0 → 100644
html/Oscilloscope_test/Global/4_Temps_par_div/form_temps_div.php
0 → 100644
... | ... | @@ -0,0 +1,40 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php" > | |
4 | + <label for="timediv">Temps/div :</label> | |
5 | + <select id="timediv" name="timediv" onchange="this.form.submit();"> | |
6 | + <option value="2.5ns" <?php if(strpos($tdiv,"2.50E-09s")!=false) echo "selected" ?> >2.5ns</option> | |
7 | + <option value="5ns" <?php if(strpos($tdiv,"5.00E-09s")!=false) echo "selected" ?> >5ns</option> | |
8 | + <option value="10ns" <?php if(strpos($tdiv,"1.00E-08s")!=false) echo "selected" ?> >10ns</option> | |
9 | + <option value="25ns" <?php if(strpos($tdiv,"2.50E-08s")!=false) echo "selected" ?> >25ns</option> | |
10 | + <option value="50ns" <?php if(strpos($tdiv,"5.00E-08s")!=false) echo "selected" ?> >50ns</option> | |
11 | + <option value="100ns" <?php if(strpos($tdiv,"1.00E-07s")!=false) echo "selected" ?> >100ns</option> | |
12 | + <option value="250ns" <?php if(strpos($tdiv,"2.50E-07s")!=false) echo "selected" ?> >250ns</option> | |
13 | + <option value="500ns" <?php if(strpos($tdiv,"5.00E-07s")!=false) echo "selected" ?> >500ns</option> | |
14 | + <option value="1us" <?php if(strpos($tdiv,"1.00E-06s")!=false) echo "selected" ?> >1us</option> | |
15 | + <option value="2.5us" <?php if(strpos($tdiv,"2.50E-06s")!=false) echo "selected" ?> >2.5us</option> | |
16 | + <option value="5us" <?php if(strpos($tdiv,"5.00E-06s")!=false) echo "selected" ?> >5us</option> | |
17 | + <option value="10us" <?php if(strpos($tdiv,"1.00E-05s")!=false) echo "selected" ?> >10us</option> | |
18 | + <option value="25us" <?php if(strpos($tdiv,"2.50E-05s")!=false) echo "selected" ?> >25us</option> | |
19 | + <option value="50us" <?php if(strpos($tdiv,"5.00E-05s")!=false) echo "selected" ?> >50us</option> | |
20 | + <option value="100us" <?php if(strpos($tdiv,"1.00E-04s")!=false) echo "selected" ?> >100us</option> | |
21 | + <option value="250us" <?php if(strpos($tdiv,"2.50E-04s")!=false) echo "selected" ?> >250us</option> | |
22 | + <option value="500us" <?php if(strpos($tdiv,"5.00E-04s")!=false) echo "selected" ?> >500us</option> | |
23 | + <option value="1ms" <?php if(strpos($tdiv,"1.00E-03s")!=false) echo "selected" ?> >1ms</option> | |
24 | + <option value="2.5ms" <?php if(strpos($tdiv,"2.50E-03s")!=false) echo "selected" ?> >2.5ms</option> | |
25 | + <option value="5ms" <?php if(strpos($tdiv,"5.00E-03s")!=false) echo "selected" ?> >5ms</option> | |
26 | + <option value="10ms" <?php if(strpos($tdiv,"1.00E-02s")!=false) echo "selected" ?> >10ms</option> | |
27 | + <option value="25ms" <?php if(strpos($tdiv,"2.50E-02s")!=false) echo "selected" ?> >25ms</option> | |
28 | + <option value="50ms" <?php if(strpos($tdiv,"5.00E-02s")!=false) echo "selected" ?> >50ms</option> | |
29 | + <option value="100ms" <?php if(strpos($tdiv,"1.00E-01s")!=false) echo "selected" ?> >100ms</option> | |
30 | + <option value="250ms" <?php if(strpos($tdiv,"2.50E-01s")!=false) echo "selected" ?> >250ms</option> | |
31 | + <option value="500ms" <?php if(strpos($tdiv,"5.00E-01s")!=false) echo "selected" ?> >500ms</option> | |
32 | + <option value="1s" <?php if(strpos($tdiv,"1.00E+00s")!=false) echo "selected" ?> >1s</option> | |
33 | + <option value="2.5s" <?php if(strpos($tdiv,"2.50E+00s")!=false) echo "selected" ?> >2.5s</option> | |
34 | + <option value="5s" <?php if(strpos($tdiv,"5.00E+00s")!=false) echo "selected" ?> >5s</option> | |
35 | + <option value="10s" <?php if(strpos($tdiv,"1.00E+01s")!=false) echo "selected" ?> >10s</option> | |
36 | + <option value="25s" <?php if(strpos($tdiv,"2.50E+01s")!=false) echo "selected" ?> >25s</option> | |
37 | + <option value="50s" <?php if(strpos($tdiv,"5.00E+01s")!=false) echo "selected" ?> >50s</option> | |
38 | + </select> | |
39 | + </form> | |
40 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,10 @@ |
1 | +<?php | |
2 | + /* Commande Menu ON */ | |
3 | + if(array_key_exists('menu_on',$_POST)){ | |
4 | + shell_exec('lxi scpi -a '.$adresse.' "menu on"'); | |
5 | + } | |
6 | + /* Commande Menu OFF */ | |
7 | + if(array_key_exists('menu_off',$_POST)){ | |
8 | + shell_exec('lxi scpi -a '.$adresse.' "menu off"'); | |
9 | + } | |
10 | +?> | ... | ... |
... | ... | @@ -0,0 +1,7 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <form method="post" action="main.php?tab=Global"> | |
4 | + <input type="submit" name="menu_on" value="Menu On" class="btn btn-outline-danger" title="Ouverture du menu de l'oscilloscope"/> | |
5 | + <input type="submit" name="menu_off" value="Menu Off" class="btn btn-outline-danger" title="Fermeture du menu de l'oscilloscope"/> | |
6 | + </form> | |
7 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,22 @@ |
1 | +<?php | |
2 | + $chemin = getcwd().'/'.$Appareil[$i]['type']; | |
3 | + $files = array_diff(scandir($chemin),array('..','.')); | |
4 | + foreach($files as $Fich){ | |
5 | + $path = $chemin.'/'.$Fich; | |
6 | + if(is_dir($path)){ | |
7 | + $files = array_diff(scandir($path),array('..','.')); | |
8 | + foreach($files as $dir){ | |
9 | + $path2 = $path.'/'.$dir; | |
10 | + if(is_dir($path2)){ | |
11 | + $files2 = array_diff(scandir($path2),array('..','.')); | |
12 | + foreach($files2 as $cmd){ | |
13 | + $path3 = $path2.'/'.$cmd; | |
14 | + if(is_file($path3) && strpos($path3,"cmd")!=false){ | |
15 | + include($path3); | |
16 | + } | |
17 | + } | |
18 | + } | |
19 | + } | |
20 | + } | |
21 | + } | |
22 | +?> | ... | ... |
... | ... | @@ -0,0 +1,45 @@ |
1 | +<!DOCTYPE html> | |
2 | +<html> | |
3 | + <?php | |
4 | + echo '<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3">'; | |
5 | + echo '<div class="mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center">'; | |
6 | + /* Affichage image */ | |
7 | + include('./Scripts/creation_img.php'); | |
8 | + echo '</div>'; | |
9 | + echo '<div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 overflow-hidden">'; | |
10 | + /* Commandes de l'appareil */ | |
11 | + echo '<div class="my-3 py-3">'; | |
12 | + echo '<h2 class="display-6 text-center">Panel de commande</h2>'; | |
13 | + echo '</div>'; | |
14 | + $chemin = getcwd().'/'.$Appareil[$i]['type']; | |
15 | + $files = array_diff(scandir($chemin),array('..','.')); | |
16 | + echo '<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3">'; | |
17 | + foreach($files as $Fich){ | |
18 | + $path = $chemin.'/'.$Fich; | |
19 | + if(is_dir($path)){ | |
20 | + $files = array_diff(scandir($path),array('..','.')); | |
21 | + if($Fich!="Menus"){ | |
22 | + echo '<div class="mr-md-1 pt-1 px-1 pt-md-1 px-md-1">'; | |
23 | + } | |
24 | + foreach($files as $dir){ | |
25 | + $path2 = $path.'/'.$dir; | |
26 | + if(is_dir($path2)){ | |
27 | + $new_dir = array_diff(scandir($path2),array('..','.')); | |
28 | + foreach($new_dir as $form){ | |
29 | + $path3 = $path2.'/'.$form; | |
30 | + if(is_file($path3) && strpos($path3,"form")!=false){ | |
31 | + include($path3); | |
32 | + } | |
33 | + } | |
34 | + } | |
35 | + } | |
36 | + if($Fich!="Menus"){ | |
37 | + echo '</div>'; | |
38 | + } | |
39 | + } | |
40 | + } | |
41 | + echo '</div>'; | |
42 | + echo '</div>'; | |
43 | + echo '</div>'; | |
44 | + ?> | |
45 | +</html> | ... | ... |
... | ... | @@ -0,0 +1,14 @@ |
1 | +<?php | |
2 | + /* Affichage de la capture d'ecran */ | |
3 | + usleep(90000); /* Utilisation pour un premier screenshot plus propre */ | |
4 | + /* Nom de la capture d'ecran au nom de l'appareil */ | |
5 | + $pic_name[$i] = str_replace(".","_",$Appareil[$i]['nom']); | |
6 | + $pic_name[$i] = str_replace(" ","_",$pic_name[$i]); | |
7 | + $pic_name[$i] = str_replace("+","",$pic_name[$i]); | |
8 | + $pic_name[$i] = str_replace(",","_",$pic_name[$i]).".bmp"; | |
9 | + $pic_name[$i] = 'Captures/'.$pic_name[$i]; | |
10 | + $_SESSION['pic_name'] = $pic_name[$i]; | |
11 | + include(getcwd().'/Scripts/screenshot.php'); /* Execution commande screenshot */ | |
12 | + /* Recuperation du nom du fichier a partir du chemin complet */ | |
13 | + echo "<img id='cam$i' class='fit-picture' src='".$pic_name[$i]."' alt='Image de ".$Appareil[$i]['nom']."'>"; | |
14 | +?> | ... | ... |
html/bdd.json
html/decouvre.php
... | ... | @@ -107,8 +107,8 @@ |
107 | 107 | } |
108 | 108 | echo "</tbody>"; |
109 | 109 | echo "</table>"; |
110 | - /* Bouton d'envoie des donnees de l'appareil choisi */ | |
111 | - echo "<input type='button' value=\"Utiliser l'appareil/les appareils\" class='btn btn-primary' onclick='count_chkBox();'>"; | |
110 | + /* Bouton d'envoi des donnees de l'appareil choisi */ | |
111 | + echo "<input type='button' id='bouton' value=\"Utiliser l'appareil\" class='btn btn-primary' pointer-events='none' onclick='count_chkBox();'>"; | |
112 | 112 | echo '<br/><p id="text-load" style="display:none">Erreur, veuillez selectionner au moins un appareil à utiliser !</p>'; |
113 | 113 | echo "</form>"; |
114 | 114 | } |
... | ... | @@ -116,7 +116,6 @@ |
116 | 116 | <!-- TODO : Verifier si EventListener fonctionne pour plusieurs appareils en meme temps --> |
117 | 117 | <script type="text/javascript"> |
118 | 118 | var checkbox = document.getElementById("check"); |
119 | - var nb_check = 0; | |
120 | 119 | var chk_El = document.getElementsByName("App[]"); |
121 | 120 | var display_txt = document.getElementById("text-load"); |
122 | 121 | var elem = document.getElementById("formulaire"); |
... | ... | @@ -126,6 +125,7 @@ |
126 | 125 | } |
127 | 126 | }); |
128 | 127 | function count_chkBox(){ |
128 | + var nb_check = 0; | |
129 | 129 | for(var i=0;i<chk_El.length;i++){ |
130 | 130 | if(chk_El[i].checked){ |
131 | 131 | nb_check++; | ... | ... |
html/main.php
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html> |
3 | - <!-- Réalisé avec l'oscilloscope SDS 1102CML+ --> | |
4 | 3 | <head> |
5 | 4 | <title>Commande Appareil</title> |
6 | 5 | <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" |
... | ... | @@ -17,7 +16,6 @@ |
17 | 16 | <form method="post" action="index.html"> |
18 | 17 | <input type="submit" value="Retour a l'accueil" class="btn btn-secondary"/> |
19 | 18 | </form><br/> |
20 | - <!-- TODO : Animation de chargement ? --> | |
21 | 19 | <form method="post" action="decouvre.php"> |
22 | 20 | <input type="submit" value="Retourner à la recherche d'appareil" class="btn btn-success"/> |
23 | 21 | </form><br/> |
... | ... | @@ -26,6 +24,7 @@ |
26 | 24 | /* Recuperation de l'adresse et du nom de l'appareil choisi */ |
27 | 25 | session_start(); |
28 | 26 | if(isset($_POST['App'])){ |
27 | + /* Methode POST (quand on vient de la page de recherche/choix d'appareils */ | |
29 | 28 | $number = 0; |
30 | 29 | $App = $_POST['App']; |
31 | 30 | $_SESSION['App']=$App; |
... | ... | @@ -35,17 +34,19 @@ |
35 | 34 | $nom = $donnees[0]; |
36 | 35 | $type = $donnees[1]; |
37 | 36 | $adresse = $donnees[2]; |
37 | + /* DEBUG */ | |
38 | 38 | /* Affichage des données de l'appareil (nom,type et adresse IP) */ |
39 | - echo "Données de l'appareil $number choisi : <br/>"; | |
39 | + /*echo "Données de l'appareil $number choisi : <br/>"; | |
40 | 40 | echo "Nom : ".$nom."<br/>"; |
41 | 41 | echo "Adresse : ".$adresse."<br/>"; |
42 | 42 | echo 'Type : '.$type.'<br/>'; |
43 | - echo "<br/>"; | |
43 | + echo "<br/>";*/ | |
44 | 44 | $Appareil[$number-1]['nom'] = $nom; |
45 | 45 | $Appareil[$number-1]['type'] = $type; |
46 | 46 | $Appareil[$number-1]['adresse'] = $adresse; |
47 | 47 | } |
48 | 48 | }else if(isset($_SESSION['App'])){ |
49 | + /* Session (quand on vient de la page main) */ | |
49 | 50 | $number = 0; |
50 | 51 | $App = $_SESSION['App']; |
51 | 52 | foreach($App as $element){ |
... | ... | @@ -54,12 +55,13 @@ |
54 | 55 | $nom = $donnees[0]; |
55 | 56 | $type = $donnees[1]; |
56 | 57 | $adresse = $donnees[2]; |
58 | + /* DEBUG */ | |
57 | 59 | /* Affichage des données de l'appareil (nom,type et adresse IP) */ |
58 | - echo "Données de l'appareil $number choisi : <br/>"; | |
60 | + /*echo "Données de l'appareil $number choisi : <br/>"; | |
59 | 61 | echo "Nom : ".$nom."<br/>"; |
60 | 62 | echo "Adresse : ".$adresse."<br/>"; |
61 | 63 | echo 'Type : '.$type.'<br/>'; |
62 | - echo "<br/>"; | |
64 | + echo "<br/>";*/ | |
63 | 65 | $Appareil[$number-1]['nom'] = $nom; |
64 | 66 | $Appareil[$number-1]['type'] = $type; |
65 | 67 | $Appareil[$number-1]['adresse'] = $adresse; |
... | ... | @@ -69,17 +71,28 @@ |
69 | 71 | echo "Pas de sélection réalisée, vous allez être redirigé"; |
70 | 72 | echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.html\">"; |
71 | 73 | } |
72 | - if(isset($_GET['tab'])){ | |
74 | + /*if(isset($_GET['tab'])){ | |
73 | 75 | $tab=$_GET['tab']; |
74 | 76 | }else{ |
75 | 77 | $tab="Global"; |
76 | - } | |
78 | + }*/ | |
77 | 79 | |
78 | 80 | /* TODO : Noms des variables plus clair */ |
79 | 81 | for($i=0;$i<count($Appareil);$i++){ |
80 | 82 | $chemin = getcwd().'/'.$Appareil[$i]['type']; |
81 | 83 | $adresse = $Appareil[$i]['adresse']; |
82 | 84 | $files = array_diff(scandir($chemin),array('..','.')); |
85 | + foreach($files as $type_cmd){ | |
86 | + $new_cmd = $chemin.'/'.$type_cmd; | |
87 | + if(is_file($new_cmd) and strpos($new_cmd,"/commandes")!=false){ | |
88 | + include($new_cmd); | |
89 | + } | |
90 | + } | |
91 | + } | |
92 | + /*for($i=0;$i<count($Appareil);$i++){ | |
93 | + $chemin = getcwd().'/'.$Appareil[$i]['type']; | |
94 | + $adresse = $Appareil[$i]['adresse']; | |
95 | + $files = array_diff(scandir($chemin),array('..','.')); | |
83 | 96 | foreach($files as $dir){ |
84 | 97 | $chemin2 = $chemin.'/'.$dir; |
85 | 98 | if(is_dir($chemin2)){ |
... | ... | @@ -98,7 +111,7 @@ |
98 | 111 | } |
99 | 112 | } |
100 | 113 | } |
101 | - } | |
114 | + }*/ | |
102 | 115 | ?> |
103 | 116 | </div> |
104 | 117 | <br/> |
... | ... | @@ -110,9 +123,7 @@ |
110 | 123 | foreach($files as $type_form){ |
111 | 124 | $new_form = $chemin.'/'.$type_form; |
112 | 125 | if(is_file($new_form) and strpos($new_form,"/main")!=false){ |
113 | - echo '<div>'; | |
114 | 126 | include($new_form); |
115 | - echo '</div>'; | |
116 | 127 | } |
117 | 128 | } |
118 | 129 | } | ... | ... |