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

Hide table on action

parent f63ca23b
No related branches found
No related tags found
No related merge requests found
...@@ -22,13 +22,16 @@ ...@@ -22,13 +22,16 @@
<div id="box" style="font-size:large"> <div id="box" style="font-size:large">
<div id="content"> <div id="content">
<h1> Interface de gestion des postes </h1>
<?php <?php
ini_set('display_errors', 1); ini_set('display_errors', 1);
ini_set('display_startup_errors', 1); ini_set('display_startup_errors', 1);
error_reporting(E_ALL); error_reporting(E_ALL);
extract($_POST);
if(!isset($action)){
$lines=explode(PHP_EOL, shell_exec("../scripts/get_registry.sh")); $lines=explode(PHP_EOL, shell_exec("../scripts/get_registry.sh"));
?> ?>
<h1> Interface de gestion des postes </h1>
<p> <?php echo count($lines); ?> postes sont inscrits sur ce serveur </p> <p> <?php echo count($lines); ?> postes sont inscrits sur ce serveur </p>
<h2> Actions globables </h2> <h2> Actions globables </h2>
<form action="index.php" method="post"> <form action="index.php" method="post">
...@@ -107,10 +110,7 @@ foreach($lines as $line){ ...@@ -107,10 +110,7 @@ foreach($lines as $line){
</pre> </pre>
<?php <?php
extract($_POST); }else{
if(!isset($action)){
exit();
}
switch($action){ switch($action){
case "wake" : case "wake" :
echo "<div id='result'><p>Démarrage demandé pour la machine $mac, veuillez patienter</p></div>"; echo "<div id='result'><p>Démarrage demandé pour la machine $mac, veuillez patienter</p></div>";
...@@ -158,6 +158,7 @@ foreach($lines as $line){ ...@@ -158,6 +158,7 @@ foreach($lines as $line){
echo "I should upgrade $mac with apt, not implemented yet"; echo "I should upgrade $mac with apt, not implemented yet";
break; break;
} }
}
?> ?>
</div> </div>
</div> </div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment