Commit ded358f1b47d6d10b7913afeba5adf59c7a4fc42

Authored by lwadbled
1 parent c465b3ff

feat(*): ajout des fichiers du projet

Showing 92 changed files with 1926 additions and 0 deletions   Show diff stats
html/Captures/.bmp 0 → 100644
No preview for this file type
html/Captures/Siglent_SDS1102CML_SDS1MEBX2R2090_6_01_01_19.bmp 0 → 100644
No preview for this file type
html/Captures/Siglent_SDS1102CML_SDS1MHEQ4R3490_6_01_01_21R2.bmp 0 → 100644
No preview for this file type
html/Captures/Siglent_Technologies_SDG1032X_SDG1XCAX3R0874_1_01_01_33R1.bmp 0 → 100644
No preview for this file type
html/Generateur/Fonctions/Burst/cmd_burst.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande fonctions */
  3 + if(array_key_exists('burst',$_POST)){
  4 + $bouton=$_POST['burst'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/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?tab=Fonctions">
  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/Fonctions/Channel/cmd_channel.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande fonctions */
  3 + if(array_key_exists('channel',$_POST)){
  4 + $bouton=$_POST['channel'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Fonctions/Channel/form_channel.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=Fonctions">
  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/Fonctions/Mod/cmd_mod.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande fonctions */
  3 + if(array_key_exists('mod',$_POST)){
  4 + $bouton=$_POST['mod'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Fonctions/Mod/form_mod.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=Fonctions">
  4 + <input type="button" id="mod" name="mod" class="pannel-button" value="Mod" onclick="this.form.submit()"/>
  5 + <input type="hidden" id="mod" name="mod" value="MOD"/>
  6 + </form>
  7 +</html>
... ...
html/Generateur/Fonctions/Parameter/cmd_parameter.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande fonctions */
  3 + if(array_key_exists('parameter',$_POST)){
  4 + $bouton=$_POST['parameter'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Fonctions/Parameter/form_parameter.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=Fonctions">
  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/Fonctions/Sweep/cmd_sweep.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande fonctions */
  3 + if(array_key_exists('sweep',$_POST)){
  4 + $bouton=$_POST['sweep'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Fonctions/Sweep/form_sweep.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=Fonctions">
  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/Fonctions/Utility/cmd_utility.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande fonctions */
  3 + if(array_key_exists('utility',$_POST)){
  4 + $bouton=$_POST['utility'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Fonctions/Utility/form_utility.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=Fonctions">
  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/Fonctions/Waves/cmd_waves.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande fonctions */
  3 + if(array_key_exists('waves',$_POST)){
  4 + $bouton=$_POST['waves'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Fonctions/Waves/form_waves.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=Fonctions">
  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/Global/Chiffres/cmd_chiffres.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande Pavé numérique */
  3 + if(array_key_exists('chiffre',$_POST)){
  4 + $bouton=$_POST['chiffre'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Global/Chiffres/form_chiffres.php 0 → 100644
... ... @@ -0,0 +1,84 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <?php /* TODO : modifier les SRC */ ?>
  4 + <style>
  5 + .pave-numerique{
  6 + font-size: 1.6em;
  7 + height: 40px;
  8 + width: 50px;
  9 + text-align: center;
  10 + color: #000;
  11 + background: #fff;
  12 + border-radius: 10px;
  13 + }
  14 + .pave-numerique:hover{
  15 + background: #b8ff70;
  16 + }
  17 + .pave-numerique:active{
  18 + background: #07e50a;
  19 + }
  20 + </style>
  21 + <div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3">
  22 + <div class="mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center">
  23 + <div class="btn-group" role="group" aria-label="panel-haut">
  24 + <form method="post" action="main.php?tab=Global">
  25 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="7" onclick="this.form.submit();"/>
  26 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_7"/>
  27 + </form>
  28 + <form method="post" action="main.php?tab=Global">
  29 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="8" onclick="this.form.submit();"/>
  30 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_8"/>
  31 + </form>
  32 + <form method="post" action="main.php?tab=Global">
  33 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="9" onclick="this.form.submit();"/>
  34 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_9"/>
  35 + </form>
  36 + </div>
  37 + <br/>
  38 + <div class="btn-group" role="group" aria-label="panel-centre-haut">
  39 + <form method="post" action="main.php?tab=Global">
  40 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="4" onclick="this.form.submit();"/>
  41 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_4"/>
  42 + </form>
  43 + <form method="post" action="main.php?tab=Global">
  44 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="5" onclick="this.form.submit();"/>
  45 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_5"/>
  46 + </form>
  47 + <form method="post" action="main.php?tab=Global">
  48 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="6" onclick="this.form.submit();"/>
  49 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_6"/>
  50 + </form>
  51 + </div>
  52 + <br/>
  53 + <div class="btn-group" role="group" aria-label="panel-centre-bas">
  54 + <form method="post" action="main.php?tab=Global">
  55 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="1" onclick="this.form.submit();"/>
  56 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_1"/>
  57 + </form>
  58 + <form method="post" action="main.php?tab=Global">
  59 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="2" onclick="this.form.submit();"/>
  60 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_2"/>
  61 + </form>
  62 + <form method="post" action="main.php?tab=Global">
  63 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="3" onclick="this.form.submit();"/>
  64 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_3"/>
  65 + </form>
  66 + </div>
  67 + <br/>
  68 + <div class="btn-group" role="group" aria-label="panel-bas">
  69 + <form method="post" action="main.php?tab=Global">
  70 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="." onclick="this.form.submit();"/>
  71 + <input type="hidden" id="chiffre" name="chiffre" value="POINT"/>
  72 + </form>
  73 + <form method="post" action="main.php?tab=Global">
  74 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="0" onclick="this.form.submit();"/>
  75 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_0"/>
  76 + </form>
  77 + <form method="post" action="main.php?tab=Global">
  78 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="+/-" onclick="this.form.submit();"/>
  79 + <input type="hidden" id="chiffre" name="chiffre" value="NEGATIVE"/>
  80 + </form>
  81 + </div>
  82 + </div>
  83 + </div>
  84 +</html>
... ...
html/Generateur/Global/Fleches/cmd_fleches.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande fleches */
  3 + if(array_key_exists('fleches',$_POST)){
  4 + $bouton=$_POST['fleches'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Global/Fleches/form_fleches.php 0 → 100644
... ... @@ -0,0 +1,13 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <div class="btn-group" role="group" aria-label="gauche_droite">
  4 + <form method="post" action="main.php?tab=Global">
  5 + <input type="button" id="fleches" name="fleches" class="pave-numerique" value="<" onclick="this.form.submit();"/>
  6 + <input type="hidden" id="fleches" name="fleches" value="LEFT"/>
  7 + </form>
  8 + <form method="post" action="main.php?tab=Global">
  9 + <input type="button" id="fleches" name="fleches" class="pave-numerique" value=">" onclick="this.form.submit();"/>
  10 + <input type="hidden" id="fleches" name="fleches" value="RIGHT"/>
  11 + </form>
  12 + </div>
  13 +</html>
... ...
html/Generateur/Global/Knob/btn_knob_generateur.png 0 → 100644

16 KB

html/Generateur/Global/Knob/cmd_knob.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande knob */
  3 + if(array_key_exists('knob',$_POST)){
  4 + $bouton=$_POST['knob'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Global/Knob/form_knob.php 0 → 100644
... ... @@ -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="&#x21B1;" 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="&#x21B0;" 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>
... ...
html/Generateur/Menus/Func1/cmd_func1.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande Menu Func */
  3 + if(array_key_exists('func1',$_POST)){
  4 + $bouton=$_POST['func1'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Menus/Func1/form_func1.php 0 → 100644
... ... @@ -0,0 +1,28 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <style>
  4 + .func1-button{
  5 + height: 30px;
  6 + width: 80px;
  7 + background: #fff;
  8 + border-radius: 10px;
  9 + position: absolute;
  10 + }
  11 + .func1-button:hover{
  12 + background: #b8ff70;
  13 + }
  14 + .func1-button:active{
  15 + background: #07e50a;
  16 + }
  17 + </style>
  18 + <form method="post" action="main.php?tab=Menus">
  19 + <input type="button" id="func1" name="func1" class="func1-button" value="" onclick="this.form.submit()"/>
  20 + <input type="hidden" id="func1" name="func1" value="FUNC1" class="btn-outline-danger"/>
  21 + </form>
  22 + <script type='text/javascript'>
  23 + var elem = document.getElementById('cam<?php echo $i ?>');
  24 + var pos = elem.getBoundingClientRect();
  25 + var btn = document.getElementById('func1');
  26 + btn.style = "top : "+pos.bottom+"px; left : "+pos.x+"px";
  27 + </script>
  28 +</html>
... ...
html/Generateur/Menus/Func2/cmd_func2.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande Menu Func */
  3 + if(array_key_exists('func2',$_POST)){
  4 + $bouton=$_POST['func2'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Menus/Func2/form_func2.php 0 → 100644
... ... @@ -0,0 +1,28 @@
  1 +<html>
  2 + <style>
  3 + .func2-button{
  4 + height: 30px;
  5 + width: 80px;
  6 + background: #fff;
  7 + border-radius: 10px;
  8 + position: absolute;
  9 + }
  10 + .func2-button:hover{
  11 + background: #b8ff70;
  12 + }
  13 + .func2-button:active{
  14 + background: #07e50a;
  15 + }
  16 + </style>
  17 + <form method="post" action="main.php?tab=Menus">
  18 + <input type="button" id="func2" name="func2" class="func2-button" value="" onclick="this.form.submit()"/>
  19 + <input type="hidden" id="func2" name="func2" value="FUNC2" class="btn-outline-danger"/>
  20 + </form>
  21 + <script type='text/javascript'>
  22 + var elem = document.getElementById('cam<?php echo $i ?>');
  23 + var pos = elem.getBoundingClientRect();
  24 + var btn = document.getElementById('func2');
  25 + var pos_x = pos.x+80;
  26 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  27 + </script>
  28 +</html>
... ...
html/Generateur/Menus/Func3/cmd_func3.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande Menu Func */
  3 + if(array_key_exists('func3',$_POST)){
  4 + $bouton=$_POST['func3'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Menus/Func3/form_func3.php 0 → 100644
... ... @@ -0,0 +1,27 @@
  1 +<html>
  2 + <style>
  3 + .func3-button{
  4 + height: 30px;
  5 + width: 80px;
  6 + background: #fff;
  7 + border-radius: 10px;
  8 + position: absolute;
  9 + .func3-button:hover{
  10 + background: #b8ff70;
  11 + }
  12 + .func3-button:active{
  13 + background: #07e50a;
  14 + }
  15 + </style>
  16 + <form method="post" action="main.php?tab=Menus">
  17 + <input type="button" id="func3" name="func3" class="func3-button" value="" onclick="this.form.submit()"/>
  18 + <input type="hidden" id="func3" name="func3" value="FUNC3" class="btn-outline-danger"/>
  19 + </form>
  20 + <script type='text/javascript'>
  21 + var elem = document.getElementById('cam<?php echo $i ?>');
  22 + var pos = elem.getBoundingClientRect();
  23 + var btn = document.getElementById('func3');
  24 + var pos_x = pos.x+160;
  25 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  26 + </script>
  27 +</html>
... ...
html/Generateur/Menus/Func4/cmd_func4.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande Menu Func */
  3 + if(array_key_exists('func4',$_POST)){
  4 + $bouton=$_POST['func4'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Menus/Func4/form_func4.php 0 → 100644
... ... @@ -0,0 +1,27 @@
  1 +<html>
  2 + <style>
  3 + .func4-button{
  4 + height: 30px;
  5 + width: 80px;
  6 + background: #fff;
  7 + border-radius: 10px;
  8 + position: absolute;
  9 + .func4-button:hover{
  10 + background: #b8ff70;
  11 + }
  12 + .func4-button:active{
  13 + background: #07e50a;
  14 + }
  15 + </style>
  16 + <form method="post" action="main.php?tab=Menus">
  17 + <input type="button" id="func4" name="func4" class="func4-button" value="" onclick="this.form.submit()"/>
  18 + <input type="hidden" id="func4" name="func4" value="FUNC4" class="btn-outline-danger"/>
  19 + </form>
  20 + <script type='text/javascript'>
  21 + var elem = document.getElementById('cam<?php echo $i ?>');
  22 + var pos = elem.getBoundingClientRect();
  23 + var btn = document.getElementById('func4');
  24 + var pos_x = pos.x+240;
  25 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  26 + </script>
  27 +</html>
... ...
html/Generateur/Menus/Func5/cmd_func5.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande Menu Func */
  3 + if(array_key_exists('func5',$_POST)){
  4 + $bouton=$_POST['func5'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Menus/Func5/form_func5.php 0 → 100644
... ... @@ -0,0 +1,28 @@
  1 +<html>
  2 + <style>
  3 + .func5-button{
  4 + height: 30px;
  5 + width: 80px;
  6 + background: #fff;
  7 + border-radius: 10px;
  8 + position: absolute;
  9 + }
  10 + .func5-button:hover{
  11 + background: #b8ff70;
  12 + }
  13 + .func5-button:active{
  14 + background: #07e50a;
  15 + }
  16 + </style>
  17 + <form method="post" action="main.php?tab=Menus">
  18 + <input type="button" id="func5" name="func5" class="func5-button" value="" onclick="this.form.submit()"/>
  19 + <input type="hidden" id="func5" name="func5" value="FUNC5" class="btn-outline-danger"/>
  20 + </form>
  21 + <script type='text/javascript'>
  22 + var elem = document.getElementById('cam<?php echo $i ?>');
  23 + var pos = elem.getBoundingClientRect();
  24 + var btn = document.getElementById('func5');
  25 + var pos_x = pos.x+320;
  26 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  27 + </script>
  28 +</html>
... ...
html/Generateur/Menus/Func6/cmd_func6.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande Menu Func */
  3 + if(array_key_exists('func6',$_POST)){
  4 + $bouton=$_POST['func6'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Menus/Func6/form_func6.php 0 → 100644
... ... @@ -0,0 +1,28 @@
  1 +<html>
  2 + <style>
  3 + .func6-button{
  4 + height: 30px;
  5 + width: 80px;
  6 + background: #fff;
  7 + border-radius: 10px;
  8 + position: absolute;
  9 + }
  10 + .func6-button:hover{
  11 + background: #b8ff70;
  12 + }
  13 + .func6-button:active{
  14 + background: #07e50a;
  15 + }
  16 + </style>
  17 + <form method="post" action="main.php?tab=Menus">
  18 + <input type="button" id="func6" name="func6" class="func6-button" value="" onclick="this.form.submit()"/>
  19 + <input type="hidden" id="func6" name="func6" value="FUNC6"/>
  20 + </form>
  21 + <script type='text/javascript'>
  22 + var elem = document.getElementById('cam<?php echo $i ?>');
  23 + var pos = elem.getBoundingClientRect();
  24 + var btn = document.getElementById('func6');
  25 + var pos_x = pos.x+400;
  26 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  27 + </script>
  28 +</html>
... ...
html/Generateur/Outputs/Output1/cmd_output_1.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande output */
  3 + if(array_key_exists('output1',$_POST)){
  4 + $bouton=$_POST['output1'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Outputs/Output1/form_output_1.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<!DOCTYPE>
  2 +<html>
  3 + <form method="post" action="main.php?tab=Outputs">
  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/Outputs/Output2/cmd_output_2.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<?php
  2 + /* Commande output */
  3 + if(array_key_exists('output2',$_POST)){
  4 + $bouton=$_POST['output2'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "VKEY VALUE,KB_'.$bouton.',STATE,1"');
  6 + }
  7 +?>
... ...
html/Generateur/Outputs/Output2/form_output_2.php 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +<!DOCTYPE>
  2 +<html>
  3 + <form method="post" action="main.php?tab=Outputs">
  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>
... ...
html/Generateur/main_generateur.php 0 → 100644
... ... @@ -0,0 +1,154 @@
  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 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']."'>";
  18 + echo '</div>';
  19 + echo '<div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 overflow-hidden">';
  20 + /* 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('Menus','..','.'));
  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>';
  67 + }
  68 + }
  69 + echo '</div>';
  70 + echo '</div>';
  71 + echo '</div>';
  72 + ?>
  73 + <style>
  74 + .func-button{
  75 + height: 30px;
  76 + width: 80px;
  77 + background: #fff;
  78 + border-radius: 10px;
  79 + position: absolute;
  80 + }
  81 + .func-button:hover{
  82 + background: #b8ff70;
  83 + }
  84 + .func-button:active{
  85 + background: #07e50a;
  86 + }
  87 + </style>
  88 + <form method="post" action="main.php?tab=<?php echo $tab; ?>">
  89 + <input type="button" id="func1" name="func1" class="func-button" value="" onclick="this.form.submit()"/>
  90 + <input type="hidden" id="func1" name="func1" value="FUNC1" class="btn-outline-danger"/>
  91 + </form>
  92 + <form method="post" action="main.php?tab=<?php echo $tab; ?>">
  93 + <input type="button" id="func2" name="func2" class="func-button" value="" onclick="this.form.submit()"/>
  94 + <input type="hidden" id="func2" name="func2" value="FUNC2" class="btn-outline-danger"/>
  95 + </form>
  96 + <form method="post" action="main.php?tab=<?php echo $tab; ?>">
  97 + <input type="button" id="func3" name="func3" class="func-button" value="" onclick="this.form.submit()"/>
  98 + <input type="hidden" id="func3" name="func3" value="FUNC3" class="btn-outline-danger"/>
  99 + </form>
  100 + <form method="post" action="main.php?tab=<?php echo $tab; ?>">
  101 + <input type="button" id="func4" name="func4" class="func-button" value="" onclick="this.form.submit()"/>
  102 + <input type="hidden" id="func4" name="func4" value="FUNC4" class="btn-outline-danger"/>
  103 + </form>
  104 + <form method="post" action="main.php?tab=<?php echo $tab; ?>">
  105 + <input type="button" id="func5" name="func5" class="func-button" value="" onclick="this.form.submit()"/>
  106 + <input type="hidden" id="func5" name="func5" value="FUNC5" class="btn-outline-danger"/>
  107 + </form>
  108 + <form method="post" action="main.php?tab=<?php echo $tab; ?>">
  109 + <input type="button" id="func6" name="func6" class="func-button" value="" onclick="this.form.submit()"/>
  110 + <input type="hidden" id="func6" name="func6" value="FUNC6" class="btn-outline-danger"/>
  111 + </form>
  112 + </div>
  113 + <script type='text/javascript'>
  114 + var elem = document.getElementById('cam<?php echo $i ?>');
  115 + var pos = elem.getBoundingClientRect();
  116 + var btn = document.getElementById('func1');
  117 + btn.style = "top : "+pos.bottom+"px; left : "+pos.x+"px";
  118 + </script>
  119 + <script type='text/javascript'>
  120 + var elem = document.getElementById('cam<?php echo $i ?>');
  121 + var pos = elem.getBoundingClientRect();
  122 + var btn = document.getElementById('func2');
  123 + var pos_x = pos.x+80;
  124 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  125 + </script>
  126 + <script type='text/javascript'>
  127 + var elem = document.getElementById('cam<?php echo $i ?>');
  128 + var pos = elem.getBoundingClientRect();
  129 + var btn = document.getElementById('func3');
  130 + var pos_x = pos.x+160;
  131 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  132 + </script>
  133 + <script type='text/javascript'>
  134 + var elem = document.getElementById('cam<?php echo $i ?>');
  135 + var pos = elem.getBoundingClientRect();
  136 + var btn = document.getElementById('func4');
  137 + var pos_x = pos.x+240;
  138 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  139 + </script>
  140 + <script type='text/javascript'>
  141 + var elem = document.getElementById('cam<?php echo $i ?>');
  142 + var pos = elem.getBoundingClientRect();
  143 + var btn = document.getElementById('func5');
  144 + var pos_x = pos.x+320;
  145 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  146 + </script>
  147 + <script type='text/javascript'>
  148 + var elem = document.getElementById('cam<?php echo $i ?>');
  149 + var pos = elem.getBoundingClientRect();
  150 + var btn = document.getElementById('func6');
  151 + var pos_x = pos.x+400;
  152 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  153 + </script>
  154 +</html>
... ...
html/Oscilloscope/CH1/1_Trace/cmd_trace.php 0 → 100644
... ... @@ -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 +?>
... ...
html/Oscilloscope/CH1/1_Trace/form_trace.php 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=CH1">
  4 + <input type="submit" name="tra_c1" value="Tracer/Effacer CH1" class="btn btn-outline-danger"/>
  5 + </form>
  6 +</html>
... ...
html/Oscilloscope/CH1/2_Attn/cmd_attn.php 0 → 100644
... ... @@ -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 +?>
... ...
html/Oscilloscope/CH1/2_Attn/form_attn.php 0 → 100644
... ... @@ -0,0 +1,24 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=CH1">
  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>
... ...
html/Oscilloscope/CH1/3_Unite/cmd_unite.php 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +<?php
  2 + /* Commande Unité CH1 */
  3 + if(array_key_exists('c1_unit',$_POST)){
  4 + $unit=$_POST["c1_unit"];
  5 + shell_exec('lxi scpi -a '.$adresse.' "c1:unit '.$unit.'"');
  6 + }
  7 + $c1u=shell_exec('lxi scpi -a '.$adresse.' "c1:unit?"');
  8 +?>
... ...
html/Oscilloscope/CH1/3_Unite/form_unite.php 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=CH1">
  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>
... ...
html/Oscilloscope/CH1/4_Vdiv/cmd_volt_div.php 0 → 100644
... ... @@ -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/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?tab=CH1">
  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/CH1/5_Couplage/cmd_couplage.php 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +<?php
  2 + /* Couplage CH1 */
  3 + if(array_key_exists('c1_cpl',$_POST)){
  4 + $c1cpl=$_POST["c1_cpl"];
  5 + shell_exec('lxi scpi -a '.$adresse.' "c1:cpl '.$c1cpl.'"');
  6 + }
  7 + $c1cpl=shell_exec('lxi scpi -a '.$adresse.' "c1:cpl?"');
  8 +?>
... ...
html/Oscilloscope/CH1/5_Couplage/form_couplage.php 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=CH1">
  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>
... ...
html/Oscilloscope/CH1/6_Filtre/cmd_filtre.php 0 → 100644
... ... @@ -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/CH1/6_Filtre/form_filtre.php 0 → 100644
... ... @@ -0,0 +1,72 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=CH1">
  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/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/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?tab=CH1' 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>
... ...
html/Oscilloscope/CH2/1_Trace/cmd_trace.php 0 → 100644
... ... @@ -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 +?>
... ...
html/Oscilloscope/CH2/1_Trace/form_trace.php 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=CH2">
  4 + <input type="submit" name="tra_c2" value="Tracer/Effacer CH2" class="btn btn-outline-danger"/>
  5 + </form>
  6 +</html>
... ...
html/Oscilloscope/CH2/2_Attn/cmd_attn.php 0 → 100644
... ... @@ -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 +?>
... ...
html/Oscilloscope/CH2/2_Attn/form_attn.php 0 → 100644
... ... @@ -0,0 +1,24 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=CH2">
  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>
... ...
html/Oscilloscope/CH2/3_Unite/cmd_unite.php 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +<?php
  2 + /* Commande Unité CH2 */
  3 + if(array_key_exists('c2_unit',$_POST)){
  4 + $unit=$_POST["c2_unit"];
  5 + shell_exec('lxi scpi -a '.$adresse.' "c2:unit '.$unit.'"');
  6 + }
  7 + $c2u=shell_exec('lxi scpi -a '.$adresse.' "c2:unit?"');
  8 +?>
... ...
html/Oscilloscope/CH2/3_Unite/form_unite.php 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=CH2">
  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>
... ...
html/Oscilloscope/CH2/4_Vdiv/cmd_volt_div.php 0 → 100644
... ... @@ -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/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?tab=CH2">
  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/CH2/5_Couplage/cmd_couplage.php 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +<?php
  2 + /* Couplage CH2 */
  3 + if(array_key_exists('c2_cpl',$_POST)){
  4 + $c2cpl=$_POST["c2_cpl"];
  5 + shell_exec('lxi scpi -a '.$adresse.' "c2:cpl '.$c2cpl.'"');
  6 + }
  7 + $c2cpl=shell_exec('lxi scpi -a '.$adresse.' "c2:cpl?"');
  8 +?>
... ...
html/Oscilloscope/CH2/5_Couplage/form_couplage.php 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=CH2">
  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>
... ...
html/Oscilloscope/CH2/6_Filtre/cmd_filtre.php 0 → 100644
... ... @@ -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/CH2/6_Filtre/form_filtre.php 0 → 100644
... ... @@ -0,0 +1,72 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=CH2">
  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/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/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?tab=CH2' 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/Curseurs/1_Choix/cmd_choix.php 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +<?php
  2 + /* Commande Mode du curseur */
  3 + if(array_key_exists('crms',$_POST)){
  4 + $crms=$_POST["crms"];
  5 + shell_exec('lxi scpi -a '.$adresse.' "crms '.$crms.'"');
  6 + }
  7 + $crms=shell_exec('lxi scpi -a '.$adresse.' "crms?"');
  8 +?>
... ...
html/Oscilloscope/Curseurs/1_Choix/form_choix.php 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php?tab=Curseurs">
  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/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/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?tab=Curseurs" 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?tab=Curseurs" 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/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/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?tab=Global">
  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/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/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?tab=Global">
  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/Global/3_Trigger/cmd_trigger_mode.php 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +<?php
  2 + /* Commande Trigger Mode */
  3 + if(array_key_exists('trmd',$_POST)){
  4 + $trig=$_POST['trmd'];
  5 + shell_exec('lxi scpi -a '.$adresse.' "trmd '.$trig.'"');
  6 + }
  7 + $trmd=shell_exec('lxi scpi -a '.$adresse.' "trmd?"');
  8 +?>
... ...
html/Oscilloscope/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?tab=Global">
  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/Global/4_Temps_par_div/cmd_temps_div.php 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +<?php
  2 + /* Commande Time/DIV */
  3 + if(array_key_exists('timediv',$_POST)){
  4 + $div=$_POST["timediv"];
  5 + echo $div;
  6 + shell_exec('lxi scpi -a '.$adresse.' "tdiv '.$div.'"');
  7 + }
  8 + $tdiv=shell_exec('lxi scpi -a '.$adresse.' "tdiv?"');
  9 +?>
... ...
html/Oscilloscope/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?tab=Global" >
  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>
... ...
html/Oscilloscope/Global/5_Menu/cmd_menu.php 0 → 100644
... ... @@ -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 +?>
... ...
html/Oscilloscope/Global/5_Menu/form_menu.php 0 → 100644
... ... @@ -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>
... ...
html/Oscilloscope/main_oscilloscope.php 0 → 100644
... ... @@ -0,0 +1,74 @@
  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 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']."'>";
  18 + echo '</div>';
  19 + echo '<div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 overflow-hidden">';
  20 + /* 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>';
  67 + }
  68 + }
  69 + echo '</div>';
  70 + echo '</div>';
  71 + echo '</div>';
  72 + echo '</div>';
  73 + ?>
  74 +</html>
... ...
html/Scripts/refresh_img.php 0 → 100644
... ... @@ -0,0 +1,26 @@
  1 +<!DOCTYPE html>
  2 +<script type='text/javascript'>
  3 + /* Rafraichissement de l'image toutes les secondes */
  4 + function refresh<?php echo $i ?>(){
  5 + var xhttp = new XMLHttpRequest();
  6 + var params = 'pic_name<?php echo $i ?>=<?php echo $pic_name[$i]?>&adresse=<?php echo $Appareil[$i]['adresse']?>&img=<?php echo $i ?>';
  7 + xhttp.onreadystatechange=function(){
  8 + if(xhttp.readyState==4){
  9 + /* Rien a faire si la requete est faite */
  10 + }
  11 + }
  12 + xhttp.open('POST','Scripts/screenshot.php',true);
  13 + xhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
  14 + xhttp.send(params);
  15 + var tmp = new Date();
  16 + var img = document.getElementById('cam<?php echo $i ?>');
  17 + img.src = img.src + '?' + tmp.getTime();
  18 + }
  19 + window.onload = function(){
  20 + <?php
  21 + for($j=0;$j<count($Appareil);$j++){
  22 + echo 'setInterval(refresh'.$j.',1000);';
  23 + }
  24 + ?>
  25 + };
  26 +</script>
... ...
html/Scripts/screenshot.php 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +<?php
  2 + /* Partie Session pour le premier screen de la page */
  3 + if(isset($_SESSION['pic_name'])){
  4 + $picture_name = $_SESSION['pic_name'];
  5 + $adresse = $Appareil[$i]['adresse'];
  6 + $path = getcwd().'/'.$picture_name;
  7 + shell_exec('lxi screenshot -a '.$adresse.' '.$path);
  8 + /* Partie Post pour les screens en continu */
  9 + }else if(isset($_POST['img'])){
  10 + $picture_name = $_POST['pic_name'.$_POST['img']];
  11 + $adresse = $_POST['adresse'];
  12 + $path = getcwd().'/../'.$picture_name;
  13 + echo $path;
  14 + shell_exec('lxi screenshot -a '.$adresse.' '.$path);
  15 + /* Si impossible de prendre des captures, retour à la première page */
  16 + }else{
  17 + echo "<script> alert('Probleme screenshot') </script>";
  18 + echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.html\">";
  19 + }
  20 +?>
... ...
html/bdd.json 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +[
  2 + {
  3 + "name": "SDS1102CML+",
  4 + "appareil": "Oscilloscope"
  5 + },
  6 + {
  7 + "name": "SDG1032X",
  8 + "appareil": "Generateur"
  9 + }
  10 +]
... ...
html/decouvre.php 0 → 100644
... ... @@ -0,0 +1,142 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <head>
  4 + <title>Choix appareil</title>
  5 + <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
  6 + rel="stylesheet"
  7 + integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
  8 + crossorigin="anonymous">
  9 + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"
  10 + integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
  11 + crossorigin="anonymous">
  12 + </script>
  13 +
  14 + <style>
  15 + .form-check-error{
  16 + border-color:red;
  17 + }
  18 + table{
  19 + border-collapse: collapse;
  20 + border: 2px solid rgb(200,200,200);
  21 + letter-spacing: 1px;
  22 + front-size: 0.8rem;
  23 + }
  24 + td,th{
  25 + border: 1px solid rgb(190,190,190);
  26 + padding: 10px 20px;
  27 + }
  28 + td{
  29 + text-align: center;
  30 + }
  31 + caption{
  32 + padding: 10px;
  33 + }
  34 + </style>
  35 + </head>
  36 + <body>
  37 + <?php session_unset(); ?>
  38 + <form method="post" action="index.html">
  39 + <input type="submit" value="Retour" class="btn btn-secondary"/>
  40 + </form>
  41 + <br/>
  42 + <!-- TODO : Animation de chargement ? -->
  43 + <form method="post" action="decouvre.php">
  44 + <input type="submit" value="Rechercher à nouveau" class="btn btn-success"/>
  45 + </form>
  46 + <br/>
  47 + <?php
  48 + $txt = shell_exec('lxi discover');
  49 + if(strpos($txt,"Found")==false){
  50 + echo "Aucun appareil trouvé" ;
  51 + }else{
  52 + $i=0; /* Variable d'iteration */
  53 + $nb=0; /* Nombre d'appareils découverts */
  54 + $txt = nl2br($txt); /* Ajout sauts à la ligne dans le texte recu */
  55 +
  56 + while(strpos($txt,"Found")!=false){
  57 + $phrase = "";
  58 + $adresse = "";
  59 +
  60 +
  61 + for($i=strpos($txt,"Found"),$j=0;$txt[$i]!='<';$i++,$j++){ /* Pour toutes les phrases contenant 'Found' */
  62 + $phrase[$j]=$txt[$i]; /* Traitement des phrases contenant 'Found' une par une */
  63 + }
  64 +
  65 + preg_match('/"([^"]+)"/',$phrase,$tableau); /* Nom de l'appareil entre guillemets donc en prends ce que l'on trouve entre les guillemets */
  66 + //print_r($tableau); /* DEBUG */
  67 + $mots = explode(" ",$phrase);
  68 + //echo count($mots); /* DEBUG */
  69 + //print_r($mots); /* DEBUG */
  70 + /* Si la phrase contient plus de 5 mots, alors on prends le dernier mot comme adresse IP
  71 + * car les phrases sont sous la forme 'Found "NAME" on address IP'
  72 + * et comme ça on ne prend pas la derniere phrase qui indique le nombre d'appareils trouvés */
  73 + if(count($mots)>=5){
  74 + $nom = $tableau[1];
  75 + /* Verification du type de l'appareil */
  76 + $type = "";
  77 + include(getcwd().'/type_appareil.php');
  78 + if($type!=""){
  79 + $Types[$nb] = $type;
  80 + $Devices[$nb] = $nom;
  81 + $Adresses[$nb] = $mots[count($mots)-1];
  82 + $nb++;
  83 + }
  84 + }
  85 + $txt = substr($txt,-(strlen($txt)-$i)); /* On enlève la phrase que l'on vient d'afficher au texte de base pour afficher d'autres phrases */
  86 + unset($phrase);
  87 + }
  88 + /* Affichage sous forme de tableau */
  89 + echo "<form method='post' id='formulaire' action='main.php'>";
  90 + echo "<table class='table table-striped'>";
  91 + echo "<thead>";
  92 + echo "<tr>";
  93 + echo "<th>Choix</th>";
  94 + echo "<th>Nom de l'appareil</th>";
  95 + echo "<th>Type d'appareil</th>";
  96 + echo "<th>Adresse IP</th>";
  97 + echo "</tr>";
  98 + echo "</thead>";
  99 + echo "<tbody>";
  100 + for($i=0;$i<=$nb-1;$i++){ /* On affiche tous les appareils trouvés en enlevant la derniere ligne qui correspond au nombre d'appareils trouvés */
  101 + $infos = $Devices[$i].'$'.$Types[$i].'$'.$Adresses[$i];
  102 + echo "<td><input type='checkbox' name='App[]' id='check' class='form-check-input' value='$infos'></td>";
  103 + echo "<td>".$Devices[$i]."</td>";
  104 + echo "<td>".$Types[$i]."</td>";
  105 + echo "<td>".$Adresses[$i]."</td>";
  106 + echo "</tr>";
  107 + }
  108 + echo "</tbody>";
  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();'>";
  112 + echo '<br/><p id="text-load" style="display:none">Erreur, veuillez selectionner au moins un appareil à utiliser !</p>';
  113 + echo "</form>";
  114 + }
  115 + ?>
  116 + <!-- TODO : Verifier si EventListener fonctionne pour plusieurs appareils en meme temps -->
  117 + <script type="text/javascript">
  118 + var checkbox = document.getElementById("check");
  119 + var nb_check = 0;
  120 + var chk_El = document.getElementsByName("App[]");
  121 + var display_txt = document.getElementById("text-load");
  122 + var elem = document.getElementById("formulaire");
  123 + checkbox.addEventListener('change',e=>{
  124 + if(e.target.checked){
  125 + display_txt.style = "display:none";
  126 + }
  127 + });
  128 + function count_chkBox(){
  129 + for(var i=0;i<chk_El.length;i++){
  130 + if(chk_El[i].checked){
  131 + nb_check++;
  132 + }
  133 + }
  134 + if(nb_check==0){
  135 + display_txt.style = "color:red";
  136 + }else{
  137 + elem.submit();
  138 + }
  139 + }
  140 + </script>
  141 + </body>
  142 +</html>
... ...
html/index.html 0 → 100644
... ... @@ -0,0 +1,36 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <head>
  4 + <meta charset="utf-8" />
  5 + <title>Page principale</title>
  6 + <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
  7 + rel="stylesheet"
  8 + integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
  9 + crossorigin="anonymous">
  10 + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"
  11 + integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
  12 + crossorigin="anonymous">
  13 + </script>
  14 + </head>
  15 + <body>
  16 + <div class="jumbotron text-center">
  17 + <h3> Appuyez pour rechercher les appareils utilisables </h3>
  18 + <form method="post" action="decouvre.php">
  19 + <input type="button" value="Lancer la recherche" id="bouton" class="btn btn-success" title="Recherche des appareils" onclick="Loading(); this.form.submit();"/>
  20 + </form>
  21 + <br/>
  22 + <div class="spinner-border text-primary" id="load" role="status" style="display:none"></div>
  23 + <div id="text-load" style="display:none">Veuillez patienter pendant la recherche d'appareil...<br/>Cette operation peut prendre quelques secondes</div>
  24 + </div>
  25 + </div>
  26 + <script type="text/javascript">
  27 + function Loading(){
  28 + var spin = document.getElementById("load");
  29 + spin.style= "";
  30 + var bouton = document.getElementById("bouton");
  31 + bouton.value = "Recherche en cours...";
  32 + var txt = document.getElementById("text-load");
  33 + txt.style= "";}
  34 + </script>
  35 + </body>
  36 +</html>
... ...
html/main.php 0 → 100644
... ... @@ -0,0 +1,124 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <!-- Réalisé avec l'oscilloscope SDS 1102CML+ -->
  4 + <head>
  5 + <title>Commande Appareil</title>
  6 + <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
  7 + rel="stylesheet"
  8 + integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
  9 + crossorigin="anonymous">
  10 + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"
  11 + integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
  12 + crossorigin="anonymous">
  13 + </script>
  14 + </head>
  15 +
  16 + <body style="background-color:grey;">
  17 + <form method="post" action="index.html">
  18 + <input type="submit" value="Retour a l'accueil" class="btn btn-secondary"/>
  19 + </form><br/>
  20 + <!-- TODO : Animation de chargement ? -->
  21 + <form method="post" action="decouvre.php">
  22 + <input type="submit" value="Retourner à la recherche d'appareil" class="btn btn-success"/>
  23 + </form><br/>
  24 + <div class="text-white">
  25 + <?php
  26 + /* Recuperation de l'adresse et du nom de l'appareil choisi */
  27 + session_start();
  28 + if(isset($_POST['App'])){
  29 + $number = 0;
  30 + $App = $_POST['App'];
  31 + $_SESSION['App']=$App;
  32 + foreach($App as $element){
  33 + $number++;
  34 + $donnees=explode("$",$element);
  35 + $nom = $donnees[0];
  36 + $type = $donnees[1];
  37 + $adresse = $donnees[2];
  38 + /* Affichage des données de l'appareil (nom,type et adresse IP) */
  39 + echo "Données de l'appareil $number choisi : <br/>";
  40 + echo "Nom : ".$nom."<br/>";
  41 + echo "Adresse : ".$adresse."<br/>";
  42 + echo 'Type : '.$type.'<br/>';
  43 + echo "<br/>";
  44 + $Appareil[$number-1]['nom'] = $nom;
  45 + $Appareil[$number-1]['type'] = $type;
  46 + $Appareil[$number-1]['adresse'] = $adresse;
  47 + }
  48 + }else if(isset($_SESSION['App'])){
  49 + $number = 0;
  50 + $App = $_SESSION['App'];
  51 + foreach($App as $element){
  52 + $number++;
  53 + $donnees=explode("$",$element);
  54 + $nom = $donnees[0];
  55 + $type = $donnees[1];
  56 + $adresse = $donnees[2];
  57 + /* Affichage des données de l'appareil (nom,type et adresse IP) */
  58 + echo "Données de l'appareil $number choisi : <br/>";
  59 + echo "Nom : ".$nom."<br/>";
  60 + echo "Adresse : ".$adresse."<br/>";
  61 + echo 'Type : '.$type.'<br/>';
  62 + echo "<br/>";
  63 + $Appareil[$number-1]['nom'] = $nom;
  64 + $Appareil[$number-1]['type'] = $type;
  65 + $Appareil[$number-1]['adresse'] = $adresse;
  66 + }
  67 + }else{
  68 + /* Si par erreur on arrive sur cette page : redirection vers la page principale */
  69 + echo "Pas de sélection réalisée, vous allez être redirigé";
  70 + echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.html\">";
  71 + }
  72 + if(isset($_GET['tab'])){
  73 + $tab=$_GET['tab'];
  74 + }else{
  75 + $tab="Global";
  76 + }
  77 +
  78 + /* TODO : Noms des variables plus clair */
  79 + for($i=0;$i<count($Appareil);$i++){
  80 + $chemin = getcwd().'/'.$Appareil[$i]['type'];
  81 + $adresse = $Appareil[$i]['adresse'];
  82 + $files = array_diff(scandir($chemin),array('..','.'));
  83 + foreach($files as $dir){
  84 + $chemin2 = $chemin.'/'.$dir;
  85 + if(is_dir($chemin2)){
  86 + $new_dir = array_diff(scandir($chemin2),array('..','.'));
  87 + foreach($new_dir as $fichiers){
  88 + $chemin3 = $chemin2."/".$fichiers;
  89 + if(is_dir($chemin3)){
  90 + $cmd_files = array_diff(scandir($chemin3),array('..','.'));
  91 + foreach($cmd_files as $cmd){
  92 + $path = $chemin3.'/'.$cmd;
  93 + if(is_file($path) && strpos($path,"cmd")!=false){
  94 + include($path);
  95 + }
  96 + }
  97 + }
  98 + }
  99 + }
  100 + }
  101 + }
  102 + ?>
  103 + </div>
  104 + <br/>
  105 + <?php
  106 + for($i=0;$i<count($Appareil);$i++){
  107 + $chemin = getcwd().'/'.$Appareil[$i]['type'];
  108 + $adresse = $Appareil[$i]['adresse'];
  109 + $files = array_diff(scandir($chemin),array('..','.'));
  110 + foreach($files as $type_form){
  111 + $new_form = $chemin.'/'.$type_form;
  112 + if(is_file($new_form) and strpos($new_form,"/main")!=false){
  113 + echo '<div>';
  114 + include($new_form);
  115 + echo '</div>';
  116 + }
  117 + }
  118 + }
  119 + for($i=0;$i<count($Appareil);$i++){
  120 + include(getcwd().'/Scripts/refresh_img.php');
  121 + }
  122 + ?>
  123 + </body>
  124 +</html>
... ...
html/type_appareil.php 0 → 100644
... ... @@ -0,0 +1,14 @@
  1 +<?php
  2 + $Json = file_get_contents("bdd.json");
  3 + $my_array = json_decode($Json,true);
  4 + for($j=0;$j<count($my_array);$j++){
  5 + $name = $my_array[$j]['name'];
  6 + if(strpos($nom,$name)!=false or $nom==$name){
  7 + $type = $my_array[$j]['appareil'];
  8 + }
  9 + }
  10 + if($type==""){
  11 + echo "<script> alert('Appareil non reconnu') </script>";
  12 + echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.html\">";
  13 + }
  14 +?>
... ...