Skip to content
Snippets Groups Projects
Verified Commit ca3eabfd authored by David Beniamine's avatar David Beniamine
Browse files

Remove debug and useless stuff

parent e2d75ebf
Branches
No related tags found
No related merge requests found
......@@ -15,23 +15,24 @@
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<?php
extract($_POST);
//echo "actions '$action', uuid '$uuid', name '$name', dev '$dev'<br/>";
switch($action){
case "wake" :
$args = escapeshellarg($mac);
if(preg_match('/^([0-9a-f]{2}:?){6}$/',$mac)){
$cmd = "../scripts/sendmac.sh";
echo "<p>Mac : '$mac'</p>";
//echo "<p>Mac : '$mac'</p>";
}else{
echo "<p>Adresse MAC invalide : ".$args."</p>";
}
break;
}
if (strcmp($cmd, "")){
echo "<p>execution de ' $cmd $args '</p>";
echo "<p>".shell_exec("$cmd $args")."</p>";
//echo "<p>execution de ' $cmd $args '</p>";
//echo "<p>".shell_exec("$cmd $args")."</p>";
shell_exec("$cmd $args");
}
?>
<div id="box">
......@@ -39,7 +40,6 @@
<h1> Interface d'allumage de PC à distance </h1>
<p>Merci d'indiquer l'adresse MAC du PC à réveiller</p>
<form action="index.php" method="post">
<input type="hidden" name="uuid" value="<?php echo $uuid ?>">
<input type="hidden" name="action" value="wake">
<input type="text" name="mac" title="MAC Addresse" placeholder="1a:2b:3c:4e:5f:6a">
<input type="submit" value="Démarrer" title="Démarrer la machine">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment