cHW/index.php

[Ritorna]

<?php /* index.php * * Copyright (C) 2016 Ing. Stefano Salvi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ ?><!DOCTYPE html> <html lang="it"> <head> <title>Raspberry-My Programmazione in C on Hardware</title> <meta charset="utf-8"> <meta name="author" content="Ing. Stefano Salvi"> <link rel="stylesheet" type="text/css" href="../css/index.css"> <script type="text/javascript" src="../js/index.js"></script> <script type="text/javascript" src="../js/testledC.js"></script> </head> <body onload="setInterval(testLed, 500)"> <!-- Dialog --> <div id="isf_overlay"> <div id="isf_overlay_frame"> <div id="isf_overlay_content"> <h2> Dialog modale visualizzato dal Javascript </h2><p> &Egrave; possibile fare comparire un dialog sopra la pagina, che scompaia con un bottone. </p> </div> <div id="isf_overlay_bottom"> <input id="isf_overlay_close_button" type="button" onClick="closeDialog()" value="Chiudi"> </div> </div> </div> <!-- Fine Dialog --> <!-- Slideshow --> <div id="testa-carousel"> <div id="testa-slideshow"> <img src="../img/little_pi.png" alt="Raspberry Pi 3" width="400" height="400" /> <img src="../img/raspberry-pi-2-angle-100569133-orig.png" alt="Raspberry Pi 3" width="400" height="400" /> <img src="../img/Raspberry_Pi_-_Model_A.jpg" alt="Raspberry Pi Model A" width="400" height="400" /> <img src="../img/rpi1bplus.png" alt="Raspberry Pi 2" width="400" height="400" /> </div> </div> <!-- Fine Slideshow --> <script type="text/javascript">var slides = new Slideshow('testa-slideshow', 1000, 400);</script> <h1>Esempi di programmazione in C on Hardware</h1> <p>[<a href="../index.html#chw">Ritorna</a>]</p> <p><input type="button" onClick="openDialog()" value="Apri Dialog"></p> <form method="get" action="index.php"> <p><input type="hidden" name="led" value="1"> <input type="submit" value="Accendi LED"></p> </form> <form method="get" action="index.php"> <p><input type="hidden" name="led" value="0"> <input type="submit" value="Spegni LED"></p> </form> <!--
<p><input type="hidden" name="led" value="2"> <input type="submit" value="CiaoCiao"></p> </form> --> <?php if (array_key_exists("led", $_REQUEST)) { switch ($_REQUEST["led"]) { case 0: exec ("sudo /var/www/html/cHW/off"); break; case 1: exec ("sudo /var/www/html/cHW/on"); break; default: break; } } if (exec ("sudo /var/www/html/cHW/testbutton") == 0) { print "
\n"; } else { print " <div id=\"showbutton\" class=\"on\">\n"; } print " </div>\n"; ?> <div id="footer"> <span class="author">Autore Stefano Salvi</span> <a href="mailto:stefano@salvi.mn.it" title="Indirizzo Mail di Salvi">stefano@salvi.mn.it</a> Rilasciato su licenza <a href="https://creativecommons.org/licenses/by-sa/3.0/it/legalcode" title="Attribuzione CC-by-sa">CC-BY-SA</a><br> <a href="https://creativecommons.org/licenses/by-sa/3.0/it/legalcode" title="Attribuzione CC-by-sa"><img src="../img/cc_by_sa_88x31.png" alt="Logo Creative Commons" title="Logo Creative Commons"></a> </div> </body> </html>