Commit c825216fe2cd9af27639601ce9a121588811e673

Authored by lwadbled
1 parent df46a0de

feat(main.php): Relation entre la page d'affichage/de commande et la page 'mesReservations'

Showing 95 changed files with 1604 additions and 4 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">
  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">
  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">
  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">
  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">
  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">
  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">
  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,83 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <style>
  4 + .pave-numerique{
  5 + font-size: 1.6em;
  6 + height: 40px;
  7 + width: 50px;
  8 + text-align: center;
  9 + color: #000;
  10 + background: #fff;
  11 + border-radius: 10px;
  12 + }
  13 + .pave-numerique:hover{
  14 + background: #b8ff70;
  15 + }
  16 + .pave-numerique:active{
  17 + background: #07e50a;
  18 + }
  19 + </style>
  20 + <div class="w-100 my-md-3 pl-md-3 text-center">
  21 + <div class="text-center">
  22 + <div class="btn-group" role="group" aria-label="panel-haut">
  23 + <form method="post" action="main.php">
  24 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="7" onclick="this.form.submit();"/>
  25 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_7"/>
  26 + </form>
  27 + <form method="post" action="main.php">
  28 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="8" onclick="this.form.submit();"/>
  29 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_8"/>
  30 + </form>
  31 + <form method="post" action="main.php">
  32 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="9" onclick="this.form.submit();"/>
  33 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_9"/>
  34 + </form>
  35 + </div>
  36 + <br/>
  37 + <div class="btn-group" role="group" aria-label="panel-centre-haut">
  38 + <form method="post" action="main.php">
  39 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="4" onclick="this.form.submit();"/>
  40 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_4"/>
  41 + </form>
  42 + <form method="post" action="main.php">
  43 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="5" onclick="this.form.submit();"/>
  44 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_5"/>
  45 + </form>
  46 + <form method="post" action="main.php">
  47 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="6" onclick="this.form.submit();"/>
  48 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_6"/>
  49 + </form>
  50 + </div>
  51 + <br/>
  52 + <div class="btn-group" role="group" aria-label="panel-centre-bas">
  53 + <form method="post" action="main.php">
  54 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="1" onclick="this.form.submit();"/>
  55 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_1"/>
  56 + </form>
  57 + <form method="post" action="main.php">
  58 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="2" onclick="this.form.submit();"/>
  59 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_2"/>
  60 + </form>
  61 + <form method="post" action="main.php">
  62 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="3" onclick="this.form.submit();"/>
  63 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_3"/>
  64 + </form>
  65 + </div>
  66 + <br/>
  67 + <div class="btn-group" role="group" aria-label="panel-bas">
  68 + <form method="post" action="main.php">
  69 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="." onclick="this.form.submit();"/>
  70 + <input type="hidden" id="chiffre" name="chiffre" value="POINT"/>
  71 + </form>
  72 + <form method="post" action="main.php">
  73 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="0" onclick="this.form.submit();"/>
  74 + <input type="hidden" id="chiffre" name="chiffre" value="NUMBER_0"/>
  75 + </form>
  76 + <form method="post" action="main.php">
  77 + <input type="button" id="chiffre" name="chiffre" class="pave-numerique" value="+/-" onclick="this.form.submit();"/>
  78 + <input type="hidden" id="chiffre" name="chiffre" value="NEGATIVE"/>
  79 + </form>
  80 + </div>
  81 + </div>
  82 + </div>
  83 +</html>
... ...
html/Generateur/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,15 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <div class="text-center">
  4 + <div class="btn-group" role="group" aria-label="gauche_droite">
  5 + <form method="post" action="main.php?tab=Global">
  6 + <input type="button" id="fleches" name="fleches" class="pave-numerique" value="<" onclick="this.form.submit();"/>
  7 + <input type="hidden" id="fleches" name="fleches" value="LEFT"/>
  8 + </form>
  9 + <form method="post" action="main.php?tab=Global">
  10 + <input type="button" id="fleches" name="fleches" class="pave-numerique" value=">" onclick="this.form.submit();"/>
  11 + <input type="hidden" id="fleches" name="fleches" value="RIGHT"/>
  12 + </form>
  13 + </div>
  14 + </div>
  15 +</html>
... ...
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,14 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <form method="post" action="main.php">
  4 + <input type="button" id="func1" name="func1" class="func-button" value="" onclick="this.form.submit()"/>
  5 + <input type="hidden" id="func1" name="func1" value="FUNC1" class="btn-outline-danger"/>
  6 + </form>
  7 + <script type='text/javascript'>
  8 + var elem = document.getElementById('cam<?php echo $i ?>');
  9 + var pos = elem.getBoundingClientRect();
  10 + var btn = document.getElementById('func1');
  11 + btn.style = "top : "+pos.bottom+"px; left : "+pos.x+"px";
  12 + console.log(pos.bottom);
  13 + </script>
  14 +</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,13 @@
  1 +<html>
  2 + <form method="post" action="main.php">
  3 + <input type="button" id="func2" name="func2" class="func-button" value="" onclick="this.form.submit()"/>
  4 + <input type="hidden" id="func2" name="func2" value="FUNC2" class="btn-outline-danger"/>
  5 + </form>
  6 + <script type='text/javascript'>
  7 + var elem = document.getElementById('cam<?php echo $i ?>');
  8 + var pos = elem.getBoundingClientRect();
  9 + var btn = document.getElementById('func2');
  10 + var pos_x = pos.x+80;
  11 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  12 + </script>
  13 +</html>
... ...
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,13 @@
  1 +<html>
  2 + <form method="post" action="main.php">
  3 + <input type="button" id="func3" name="func3" class="func-button" value="" onclick="this.form.submit()"/>
  4 + <input type="hidden" id="func3" name="func3" value="FUNC3" class="btn-outline-danger"/>
  5 + </form>
  6 + <script type='text/javascript'>
  7 + var elem = document.getElementById('cam<?php echo $i ?>');
  8 + var pos = elem.getBoundingClientRect();
  9 + var btn = document.getElementById('func3');
  10 + var pos_x = pos.x+160;
  11 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  12 + </script>
  13 +</html>
... ...
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,13 @@
  1 +<html>
  2 + <form method="post" action="main.php">
  3 + <input type="button" id="func4" name="func4" class="func-button" value="" onclick="this.form.submit()"/>
  4 + <input type="hidden" id="func4" name="func4" value="FUNC4" class="btn-outline-danger"/>
  5 + </form>
  6 + <script type='text/javascript'>
  7 + var elem = document.getElementById('cam<?php echo $i ?>');
  8 + var pos = elem.getBoundingClientRect();
  9 + var btn = document.getElementById('func4');
  10 + var pos_x = pos.x+240;
  11 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  12 + </script>
  13 +</html>
... ...
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,13 @@
  1 +<html>
  2 + <form method="post" action="main.php">
  3 + <input type="button" id="func5" name="func5" class="func-button" value="" onclick="this.form.submit()"/>
  4 + <input type="hidden" id="func5" name="func5" value="FUNC5" class="btn-outline-danger"/>
  5 + </form>
  6 + <script type='text/javascript'>
  7 + var elem = document.getElementById('cam<?php echo $i ?>');
  8 + var pos = elem.getBoundingClientRect();
  9 + var btn = document.getElementById('func5');
  10 + var pos_x = pos.x+320;
  11 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  12 + </script>
  13 +</html>
... ...
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,13 @@
  1 +<html>
  2 + <form method="post" action="main.php">
  3 + <input type="button" id="func6" name="func6" class="func-button" value="" onclick="this.form.submit()"/>
  4 + <input type="hidden" id="func6" name="func6" value="FUNC6"/>
  5 + </form>
  6 + <script type='text/javascript'>
  7 + var elem = document.getElementById('cam<?php echo $i ?>');
  8 + var pos = elem.getBoundingClientRect();
  9 + var btn = document.getElementById('func6');
  10 + var pos_x = pos.x+400;
  11 + btn.style = "top : "+(pos.bottom)+"px; left : "+(pos_x)+"px";
  12 + </script>
  13 +</html>
... ...
html/Generateur/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">
  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">
  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/commandes_generateur.php 0 → 100644
... ... @@ -0,0 +1,24 @@
  1 +<?php
  2 + /* On parcourt l'arborescence pour trouver les fichiers 'cmd_fichiers.php'
  3 + * Ces fichiers réalisent les commandes de l'appareil selon les boutons appuyés par l'utilisateur sur l'interface */
  4 + //$chemin = getcwd().'/'.$Appareil[$i]['type'];
  5 + //$files = array_diff(scandir($chemin),array('..','.'));
  6 + foreach($files as $dir){
  7 + $path = $chemin.'/'.$dir;
  8 + if(is_dir($path)){
  9 + $sub_dir = array_diff(scandir($path),array('..','.'));
  10 + foreach($sub_dir as $new_dir){
  11 + $path2 = $path.'/'.$new_dir;
  12 + if(is_dir($path2)){
  13 + $fichiers = array_diff(scandir($path2),array('..','.'));
  14 + foreach($fichiers as $cmd){
  15 + $path3 = $path2.'/'.$cmd;
  16 + if(is_file($path3) && strpos($path3,"cmd")!=false){
  17 + include($path3);
  18 + }
  19 + }
  20 + }
  21 + }
  22 + }
  23 + }
  24 +?>
... ...
html/Generateur/main_generateur.php 0 → 100644
... ... @@ -0,0 +1,63 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <style>
  4 + /* Style des boutons */
  5 + .func-button{
  6 + height: 30px;
  7 + width: 80px;
  8 + background: #fff;
  9 + border-radius: 10px;
  10 + position: absolute;
  11 + }
  12 + .func-button:hover{
  13 + background: #b8ff70;
  14 + }
  15 + .func-button:active{
  16 + background: #07e50a;
  17 + }
  18 + </style>
  19 + <?php
  20 + echo '<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3">';
  21 + echo '<div class="mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center">';
  22 + /* Affichage image */
  23 + include('./Scripts/creation_img.php');
  24 + echo '</div>';
  25 + echo '<div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 overflow-hidden">';
  26 + /* Affichage des commandes de l'appareil */
  27 + echo '<div class="my-3 py-3">';
  28 + echo '<h2 class="display-6 text-center">Panel de commande</h2>';
  29 + echo '</div>';
  30 + //$chemin = $Appareil[$i]['type'];
  31 + //$files = array_diff(scandir($chemin),array('..','.'));
  32 + echo '<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3">';
  33 + /* On parcourt l'arborescence pour trouver les fichiers 'form_fichiers.php'
  34 + * Ces fichiers affichent les différents boutons correspondant aux commandes de l'appareil */
  35 + foreach($files as $dir){
  36 + $path = $chemin.'/'.$dir;
  37 + if(is_dir($path)){
  38 + $subdir = array_diff(scandir($path),array('..','.'));
  39 + if($dir!="Menus"){
  40 + echo '<div class="mr-md-1 pt-1 px-1 pt-md-1 px-md-1">';
  41 + }
  42 + foreach($subdir as $new_dir){
  43 + $path2 = $path.'/'.$new_dir;
  44 + if(is_dir($path2)){
  45 + $fichiers = array_diff(scandir($path2),array('..','.'));
  46 + foreach($fichiers as $form){
  47 + $path3 = $path2.'/'.$form;
  48 + if(is_file($path3) && strpos($path3,"form")!=false){
  49 + include($path3);
  50 + }
  51 + }
  52 + }
  53 + }
  54 + if($dir!="Menus"){
  55 + echo '</div>';
  56 + }
  57 + }
  58 + }
  59 + echo '</div>';
  60 + echo '</div>';
  61 + echo '</div>';
  62 + ?>
  63 +</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">
  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">
  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">
  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,25 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <?php
  4 + $vdiv1 = floatval(substr($vdiv1,8,-2));
  5 + $sonde = floatval(substr($c1sonde,7));
  6 + $unite1 = substr($c1u,8,-1);
  7 + ?>
  8 + <form method="post" action="main.php">
  9 + <label for="c1_vdiv"><?php if($unite1=="A"){echo "Amps";}else{echo "Volts";}?>/div CH1 :</label>
  10 + <select id="c1_vdiv" name="c1_vdiv" onchange="this.form.submit();">
  11 + <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>
  12 + <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>
  13 + <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>
  14 + <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>
  15 + <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>
  16 + <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>
  17 + <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>
  18 + <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>
  19 + <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>
  20 + <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>
  21 + <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>
  22 + <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>
  23 + </select>
  24 + </form>
  25 +</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">
  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,36 @@
  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 + /* Commande type de filtre CH1 */
  18 + if(array_key_exists('c1_filts',$_POST)){
  19 + $c1filts=$_POST['c1_filts'];
  20 + if($c1filts=="LP"){
  21 + $limite_sup = floatval($_POST['lim_sup']);
  22 + shell_exec('lxi scpi -a '.$adresse.' "c1:filts type,'.$c1filts.',upplimit,'.$limite_sup.'MHz"');
  23 + }else if($c1filts=="HP"){
  24 + $limite_inf = $_POST['lim_inf'];
  25 + shell_exec('lxi scpi -a '.$adresse.' "c1:filts type,'.$c1filts.',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.' "c1:filts type,'.$c1filts.',upplimit,'.$limite_sup.'MHz,lowlimit,'.$limite_inf.'MHz"');
  33 + }
  34 + }
  35 + $c1filts=shell_exec('lxi scpi -a '.$adresse.' "c1:filts?"');
  36 +?>
... ...
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">
  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,12 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <?php
  4 + $val_c1trlv = floatval(substr($c1trlv,8,-2))/$vdiv1;
  5 + ?>
  6 + <form method='post' action='main.php' oninput='c1_triglv.value=c1_trlv.value'>
  7 + <label for="c1_trlv" class="form-range">Trigger Level CH1</label>
  8 + <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();">
  9 + <br/>
  10 + Trigger level : <output for="out" name="c1_triglv"><?php echo $val_c1trlv*$vdiv1; ?></output> V
  11 + </form>
  12 +</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">
  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">
  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">
  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,25 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <?php
  4 + $vdiv2 = floatval(substr($vdiv2,8,-2));
  5 + $sonde = floatval(substr($c2sonde,7));
  6 + $unite2 = substr($c2u,8,-1);
  7 + ?>
  8 + <form method="post" action="main.php">
  9 + <label for="c2_vdiv"><?php if($unite2=="A"){echo "Amps";}else{echo "Volts";}?>/div CH2 :</label>
  10 + <select id="c2_vdiv" name="c2_vdiv" onchange="this.form.submit();">
  11 + <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>
  12 + <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>
  13 + <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>
  14 + <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>
  15 + <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>
  16 + <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>
  17 + <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>
  18 + <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>
  19 + <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>
  20 + <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>
  21 + <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>
  22 + <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>
  23 + </select>
  24 + </form>
  25 +</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">
  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">
  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,12 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <?php
  4 + $val_c2trlv = floatval(substr($c2trlv,8,-2))/$vdiv2;
  5 + ?>
  6 + <form method='post' action='main.php' oninput='c2_triglv.value=c2_trlv.value'>
  7 + <label for="c2_trlv" class="form-range">Trigger Level CH2</label>
  8 + <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();">
  9 + <br/>
  10 + Trigger level : <output for="out" name="c2_triglv"><?php echo $val_c2trlv*$vdiv2; ?></output> V
  11 + </form>
  12 +</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">
  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="main.php" oninput="resultatA.value=hrel_curseurA.value; resultatB.value=hrel_curseurB.value">';
  21 + echo '<fieldset>';
  22 + if(strpos($trace_c1,"ON")!=false or strpos($trace_c2,"ON")!=false){
  23 + echo '<label for="choix">Voie :</label>';
  24 + echo '<select id="choix" name="choix" onchange="this.form.submit();">';
  25 + if(strpos($trace_c1,"ON")!=false){
  26 + echo '<option value="c1" '.$sel1.'>CH1</option>';
  27 + }
  28 + if(strpos($trace_c2,"ON")!=false){
  29 + echo '<option value="c2" '.$sel2.'>CH2</option>';
  30 + }
  31 + echo '</select>';
  32 + }
  33 + echo '<label for="hrel_curseurA" class="form-range">Valeur curseur A</label>';
  34 + echo '<input type="range" id="hrel_curseurA" name="hrel_curseurA" class="form-range" min="0" max="16" step="0.1" value="'.$valueA.'" onchange="this.form.submit();">';
  35 + echo '<br/>';
  36 + echo 'Division : <output for="out" name="resultatA">'.$valueA.'</output>';
  37 + echo '<br/>';
  38 + /* Curseur B */
  39 + echo '<label for="hrel_curseurB" class="form-range">Valeur curseur B</label>';
  40 + echo '<input type="range" id="hrel_curseurB" name="hrel_curseurB" class="form-range" min="0" max="16" step="0.1" value="'.$valueB.'" onchange="this.form.submit();">';
  41 + echo '<br/>';
  42 + echo 'Division : <output for="out" name="resultatB">'.$valueB.'</output>';
  43 + echo '<br/>';
  44 + echo '</fieldset>';
  45 + echo '</form>';
  46 + }else if(strpos($crms,"VREL")!=false){
  47 + $valueA=floatval(substr($vrelA,13));
  48 + $valueB=floatval(substr($vrelB,13));
  49 + /* Curseur A */
  50 + echo '<form method="post" action="main.php" oninput="resultatA.value=vrel_curseurA.value; resultatB.value=vrel_curseurB.value">';
  51 + echo '<fieldset>';
  52 + if(strpos($trace_c1,"ON")!=false or strpos($trace_c2,"ON")!=false){
  53 + echo '<label for="choix">Voie :</label>';
  54 + echo '<select id="choix" name="choix" onchange="this.form.submit();">';
  55 + if(strpos($trace_c1,"ON")!=false){
  56 + echo '<option value="c1" '.$sel1.'>CH1</option>';
  57 + }
  58 + if(strpos($trace_c2,"ON")!=false){
  59 + echo '<option value="c2" '.$sel2.'>CH2</option>';
  60 + }
  61 + echo '</select>';
  62 + }
  63 + echo '<label for="vrel_curseurA" class="form-range">Valeur curseur A</label>';
  64 + echo '<input type="range" id="vrel_curseurA" name="vrel_curseurA" min="-4" max="4" step="0.1" value="'.$valueA.'" orient="vertical" onchange="this.form.submit();">';
  65 + echo '<br/>';
  66 + echo 'Division : <output for="out" name="resultatA">'.$valueA.'</output>';
  67 + echo '<br/>';
  68 + /* Curseur B */
  69 + echo '<label for="vrel_curseurB" class="form-range">Valeur curseur B</label>';
  70 + echo '<input type="range" id="vrel_curseurB" name="vrel_curseurB" min="-4" max="4" step="0.1" value="'.$valueB.'" orient="vertical" onchange="this.form.submit();">';
  71 + echo '<br/>';
  72 + echo 'Division : <output for="out" name="resultatB">'.$valueB.'</output>';
  73 + echo '<br/>';
  74 + echo '</fieldset>';
  75 + echo '</form>';
  76 + }
  77 + ?>
  78 +</html>
... ...
html/Oscilloscope/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">
  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">
  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">
  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" >
  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/commandes_oscilloscope.php 0 → 100644
... ... @@ -0,0 +1,24 @@
  1 +<?php
  2 + /* On parcourt l'arborescence pour trouver les fichiers 'cmd_fichiers.php'
  3 + * Ces fichiers réalisent les commandes de l'appareil selon les boutons appuyés par l'utilisateur sur l'interface */
  4 + //$chemin = getcwd().'/'.$Appareil[$i]['type'];
  5 + //$files = array_diff(scandir($chemin),array('..','.'));
  6 + foreach($files as $dir){
  7 + $path = $chemin.'/'.$dir;
  8 + if(is_dir($path)){
  9 + $sub_dir = array_diff(scandir($path),array('..','.'));
  10 + foreach($sub_dir as $new_dir){
  11 + $path2 = $path.'/'.$new_dir;
  12 + if(is_dir($path2)){
  13 + $fichiers = array_diff(scandir($path2),array('..','.'));
  14 + foreach($fichiers as $cmd){
  15 + $path3 = $path2.'/'.$cmd;
  16 + if(is_file($path3) && strpos($path3,"cmd")!=false){
  17 + include($path3);
  18 + }
  19 + }
  20 + }
  21 + }
  22 + }
  23 + }
  24 +?>
... ...
html/Oscilloscope/main_oscilloscope.php 0 → 100644
... ... @@ -0,0 +1,43 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <?php
  4 + echo '<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3">';
  5 + echo '<div class="mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center">';
  6 + /* Affichage image */
  7 + include('./Scripts/creation_img.php');
  8 + echo '</div>';
  9 + echo '<div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 overflow-hidden">';
  10 + /* Commandes de l'appareil */
  11 + echo '<div class="my-3 py-3">';
  12 + echo '<h2 class="display-6 text-center">Panel de commande</h2>';
  13 + echo '</div>';
  14 + //$chemin = getcwd().'/'.$Appareil[$i]['type'];
  15 + //$files = array_diff(scandir($chemin),array('..','.'));
  16 + echo '<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3">';
  17 + /* On parcourt l'arborescence pour trouver les fichiers 'form_fichiers.php'
  18 + * Ces fichiers affichent les différents boutons correspondant aux commandes de l'appareil */
  19 + foreach($files as $dir){
  20 + $path = $chemin.'/'.$dir;
  21 + if(is_dir($path)){
  22 + $sub_dir = array_diff(scandir($path),array('..','.'));
  23 + echo '<div class="mr-md-1 pt-1 px-1 pt-md-1 px-md-1">';
  24 + foreach($sub_dir as $new_dir){
  25 + $path2 = $path.'/'.$new_dir;
  26 + if(is_dir($path2)){
  27 + $fichiers = array_diff(scandir($path2),array('..','.'));
  28 + foreach($fichiers as $form){
  29 + $path3 = $path2.'/'.$form;
  30 + if(is_file($path3) && strpos($path3,"form")!=false){
  31 + include($path3);
  32 + }
  33 + }
  34 + }
  35 + }
  36 + echo '</div>';
  37 + }
  38 + }
  39 + echo '</div>';
  40 + echo '</div>';
  41 + echo '</div>';
  42 + ?>
  43 +</html>
... ...
html/Scripts/creation_img.php 0 → 100644
... ... @@ -0,0 +1,14 @@
  1 +<?php
  2 + /* Affichage de la capture d'ecran */
  3 + usleep(90000); /* Utilisation pour un premier screenshot plus propre */
  4 + /* Nom de la capture d'ecran par rapport au nom de l'appareil */
  5 + $pic_name[$i] = str_replace(".","_",$Appareil[$i]['nom']);
  6 + $pic_name[$i] = str_replace(" ","_",$pic_name[$i]);
  7 + $pic_name[$i] = str_replace("+","",$pic_name[$i]);
  8 + $pic_name[$i] = str_replace(",","_",$pic_name[$i]).".bmp";
  9 + $pic_name[$i] = 'Captures/'.$pic_name[$i];
  10 + $_SESSION['pic_name'] = $pic_name[$i];
  11 + include('Scripts/screenshot.php'); /* Execution commande screenshot */
  12 + /* Recuperation du nom du fichier a partir du chemin complet */
  13 + echo "<img id='cam$i' class='fit-picture' src='".$pic_name[$i]."' alt='Image de ".$Appareil[$i]['nom']."'>";
  14 +?>
... ...
html/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 ?>(){ /* Nom de la fonction en fonction du nombre d'appareil que la page doit afficher */
  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,22 @@
  1 +<?php
  2 + /* Fichier de la réalisation d'un screenshot avec lxi */
  3 +
  4 + /* Partie Session pour le premier screen de la page */
  5 + if(isset($_SESSION['pic_name'])){
  6 + $picture_name = $_SESSION['pic_name'];
  7 + $adresse = $Appareil[$i]['adresse'];
  8 + $path = getcwd().'/'.$picture_name;
  9 + shell_exec('lxi screenshot -a '.$adresse.' '.$path);
  10 + /* Partie Post pour les screens en continu (rafraichissement de l'image) */
  11 + }else if(isset($_POST['img'])){
  12 + $picture_name = $_POST['pic_name'.$_POST['img']];
  13 + $adresse = $_POST['adresse'];
  14 + $path = getcwd().'/../'.$picture_name;
  15 + echo $path;
  16 + shell_exec('lxi screenshot -a '.$adresse.' '.$path);
  17 + /* Si impossible de prendre des captures, retour à la première page */
  18 + }else{
  19 + echo "<script> alert('Probleme screenshot') </script>";
  20 + echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.html\">";
  21 + }
  22 +?>
... ...
html/Scripts/type_appareil.php 0 → 100644
... ... @@ -0,0 +1,16 @@
  1 +<?php
  2 + /* Recherche du type de l'appareil en fonction de son nom dans le fichier 'bdd.json' */
  3 + $Json = file_get_contents("bdd.json");
  4 + $my_array = json_decode($Json,true);
  5 + for($j=0;$j<count($my_array);$j++){
  6 + $name = $my_array[$j]['name'];
  7 + if(strpos($nom,$name)!=false or $nom==$name){
  8 + $type = $my_array[$j]['appareil'];
  9 + }
  10 + }
  11 + /* TODO : Modifier le probleme de l'appareil non connu de la page ? */
  12 + if($type==""){
  13 + echo "<script> alert('Appareil non reconnu') </script>";
  14 + echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.html\">";
  15 + }
  16 +?>
... ...
html/main.php 0 → 100644
... ... @@ -0,0 +1,133 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <head>
  4 + <title>Commande 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 + </head>
  14 +
  15 + <body style="background-color:grey;">
  16 + <?php
  17 + session_start();
  18 + if(isset($_SESSION['identifiant'])){
  19 + $identifiant = $_SESSION['identifiant'];
  20 + }else{
  21 + echo "<meta http-equiv=\"refresh\" content=\"0;url=index.html\">";
  22 + }
  23 + ?>
  24 + <!--Retour page d'accueil -->
  25 + <form method="post" action="mesReservations.php">
  26 + <input type="submit" value="Retour à vos réservations" class="btn btn-secondary"/>
  27 + </form>
  28 + <br/>
  29 + <div class="text-white">
  30 + <?php
  31 + /* Recuperation de l'adresse IP, du type et du nom de l'appareil choisi */
  32 + include("connexion.php");
  33 + if(isset($_POST['banc'])){
  34 + /* Methode POST quand on vient des réservations */
  35 + $number=0;
  36 + $Banc = $_POST['banc'];
  37 + $_SESSION['banc']=$Banc;
  38 + $requete = "SELECT * FROM equipement WHERE
  39 + num = $Banc";
  40 + $exec_requete = mysqli_query($db,$requete);
  41 + $reponse = mysqli_fetch_all($exec_requete);
  42 + foreach($reponse as $element){
  43 + $number++;
  44 + $nom = $element[2];
  45 + $type = $element[3];
  46 + $adresse = $element[1];
  47 + $Appareil[$number-1]['nom'] = $nom;
  48 + $Appareil[$number-1]['type'] = $type;
  49 + $Appareil[$number-1]['adresse'] = $adresse;
  50 + }
  51 + }else if(isset($_SESSION['App'])){
  52 + /* Session (quand on vient de la page main) */
  53 + $number = 0;
  54 + $Banc = $_SESSION['banc'];
  55 + $requete = "SELECT * FROM equipement WHERE
  56 + num =$Banc";
  57 + $exec_requete = mysqli_query($db,$requete);
  58 + $reponse = mysqli_fetch_all($exec_requete);
  59 + foreach($App as $element){
  60 + $number++;
  61 + $nom = $donnees[2];
  62 + $type = $donnees[3];
  63 + $adresse = $donnees[1];
  64 + $Appareil[$number-1]['nom'] = $nom;
  65 + $Appareil[$number-1]['type'] = $type;
  66 + $Appareil[$number-1]['adresse'] = $adresse;
  67 + }
  68 + }else{
  69 + /* Si par erreur on arrive sur cette page : redirection vers la page principale */
  70 + echo "Erreur, vous allez être redirigé";
  71 + echo "<meta http-equiv=\"refresh\" content=\"0;URL=menu.html\">";
  72 + }
  73 +
  74 + /* DEBUG */
  75 + /* Affichage des données de l'appareil (nom,type et adresse IP) */
  76 + for($i=1;$i<=count($Appareil);$i++){
  77 + echo "Données de l'appareil $i choisi : <br/>";
  78 + echo "Nom : ".$nom."<br/>";
  79 + echo "Adresse : ".$adresse."<br/>";
  80 + echo 'Type : '.$type.'<br/>';
  81 + echo "<br/>";
  82 + }
  83 +
  84 + /* Recherche des fichiers 'commandes_type.php' dans les dossiers des types d'appareils sélectionnés
  85 + * Ces fichiers vont effectuer les commandes de l'appareil si un bouton est utilisé */
  86 + /* TODO
  87 + for($i=0;$i<count($Appareil);$i++){
  88 + $chemin = $Appareil[$i]['type'];
  89 + $adresse = $Appareil[$i]['adresse'];
  90 + $files = array_diff(scandir($chemin),array('..','.'));
  91 + foreach($files as $type_cmd){
  92 + $cmd_path = $chemin.'/'.$type_cmd;
  93 + if(is_file($cmd_path) and strpos($cmd_path,"/commandes")!=false){
  94 + include($cmd_path);
  95 + }
  96 + }
  97 + }*/
  98 + ?>
  99 + </div>
  100 + <br/>
  101 + <?php
  102 + /* Recherche des fichiers 'main_type.php' dans les dossiers des types d'appareils sélectionnés
  103 + * Ces fichiers vont afficher une capture de l'appareil et les commandes que l'utilisateur peut utiliser */
  104 + /* TODO
  105 + for($i=0;$i<count($Appareil);$i++){
  106 + $chemin = getcwd().'/'.$Appareil[$i]['type'];
  107 + $adresse = $Appareil[$i]['adresse'];
  108 + $files = array_diff(scandir($chemin),array('..','.'));
  109 + foreach($files as $type_form){
  110 + $form_path = $chemin.'/'.$type_form;
  111 + if(is_file($form_path) and strpos($form_path,"/main")!=false){
  112 + echo '<div>';
  113 + include($form_path);
  114 + echo '</div>';
  115 + }
  116 + }
  117 + }*/
  118 + /* Appel du script du rafraichissement des images, un script par appareil */
  119 + /* TODO for($i=0;$i<count($Appareil);$i++){
  120 + include('Scripts/refresh_img.php');
  121 + }*/
  122 + mysqli_close($db);
  123 + ?>
  124 + <script type="text/javascript">
  125 + function quitter(){
  126 + <?php //TODO : Faire un truc pour des hcoses ?>
  127 + }
  128 + window.onload = function(){
  129 + setInterval(quitter,1000);
  130 + };
  131 + </script>
  132 + </body>
  133 +</html>
... ...
html/menu.php
... ... @@ -2,7 +2,7 @@
2 2 <html>
3 3 <head>
4 4 <meta charset="utf-8"/>
5   - <title>Page principale</title>
  5 + <title>Mon espace</title>
6 6 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
7 7 rel="stylesheet"
8 8 integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
... ...
html/mesReservations.php
... ... @@ -2,7 +2,7 @@
2 2 <html>
3 3 <head>
4 4 <meta charset="utf-8"/>
5   - <title>Page principale</title>
  5 + <title>Mes réservations</title>
6 6 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
7 7 rel="stylesheet"
8 8 integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
... ... @@ -60,7 +60,7 @@
60 60 if(!($creneau[3]<=$ActualHour && $ActualHour<$creneau[4])){
61 61 echo "<button class='btn-lg btn-outline-success' type='submit' disabled ";
62 62 }else{
63   - echo "<button class='btn-lg btn-success' type='submit'";
  63 + echo "<button class='btn-lg btn-success' type='submit' name='banc' value='$creneau[0]'";
64 64 }
65 65 }else{
66 66 echo "<button class='btn-lg btn-outline-success' type='submit' disabled ";
... ...
html/reservation.php
... ... @@ -2,7 +2,7 @@
2 2 <html>
3 3 <head>
4 4 <meta charset="utf-8"/>
5   - <title>Page principale</title>
  5 + <title>Réserver un banc</title>
6 6 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
7 7 rel="stylesheet"
8 8 integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
... ...