1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
<?PHP
// include('/maison/N4/entete.php'); // l'entete du site
include('L:\Program files 2\wamp\www\maison\N4\template\entete.php');
?>
<body>
<p>Commande X10 avec bouton Marche/Arrêt/Variateur.</p>
<table width="510" border="0">
<tr>
<td width="223" bgcolor="#999999"><div align="center">Commande</div></td>
<td width="51" bgcolor="#999999">Code M. U </td>
<td width="71" bgcolor="#999999"><div align="center">On</div></td>
<td width="66" bgcolor="#999999"><div align="center">Off</div></td>
<td width="71" bgcolor="#999999">Variateur</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><div align="center">
<?php include('L:\Program files 2\wamp\www\maison\N4\X10\ft-x10\P0.txt'); ?>
</div></td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"> </td>
</tr>
<tr>
<td><?php include('L:\Program files 2\wamp\www\maison\N4\X10\ft-x10\P1.txt'); ?></td>
<td>P1</td>
<td><input name="P1-On2" value="<?php include('L:\Program files 2\wamp\www\maison\N4\X10\ft-x10\P1-ON.txt'); ?>" type="submit" /></td>
<td><input name="P1-Off2" value="<?php include('L:\Program files 2\wamp\www\maison\N4\X10\ft-x10\P1-OFF.txt'); ?>" type="submit" /></td>
<td> </td>
</tr>
<tr>
<td><?php include('L:\Program files 2\wamp\www\maison\N4\X10\ft-x10\P2.txt'); ?></td>
<td>P2</td>
<td><input name="P2-On3" value="<?php include('L:\Program files 2\wamp\www\maison\N4\X10\ft-x10\P2-ON.txt'); ?>" type="submit" /></td>
<td><input name="P2-Off3" value="<?php include('L:\Program files 2\wamp\www\maison\N4\X10\ft-x10\P2-OFF.txt'); ?>" type="submit" /></td>
<td> </td>
</tr>
</table>
<?php
// Execute commande MS-Dos
if (isset($_POST['P1-On'])) exec('ahcmd.exe sendplc P1 on');
if (isset($_POST['P1-Off'])) exec('ahcmd.exe sendplc P1 off');
if (isset($_POST['P2-On'])) exec('ahcmd.exe sendplc P2 on');
if (isset($_POST['P2-Off'])) exec('ahcmd.exe sendplc P2 off');
?>
<?php
$cmdstring = $_POST['hc'];
exec("ahcmd.exe sendplc $cmdstring");
?>
<?php
include('L:\Program files 2\wamp\www\maison\N4\template\retour-x10-bouton-lecture.php') ; // clique Retour
include('L:\Program files 2\wamp\www\maison\commun\template\pied.php3') ; // mon bas de page
?> |
Partager