ajout scripts_distants : squid

This commit is contained in:
Jérôme Bousquié 2016-11-30 11:38:16 +01:00
parent af1d51138d
commit cc9284f2fa
4 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,8 @@
<?php
include("salles.conf");
$req = $_GET["s"];
$salle_demandee = $salle[$req];
if ($salle_demandee) {
exec("sudo /usr/local/bin/bloque_salle.sh $salle_demandee");
}
?>

View File

@ -0,0 +1,8 @@
<?php
include("salles.conf");
$req = $_GET["s"];
$salle_demandee = $salle[$req];
if ($salle_demandee) {
exec("sudo /usr/local/bin/debloque_salle.sh $salle_demandee");
}
?>

View File

@ -0,0 +1,20 @@
<?php
$salle["a102"] = "a102";
$salle["a103"] = "a103";
$salle["a104"] = "a104";
$salle["a105"] = "a105";
$salle["a200"] = "a200";
$salle["a201"] = "a201";
$salle["a202"] = "a202";
$salle["a203"] = "a203";
$salle["a205"] = "a205";
$salle["a206"] = "a206";
$salle["a300"] = "a300";
$salle["a304"] = "a304";
$salle["a307"] = "a307";
$salle["b501"] = "b501";
$salle["crdoc"]= "crdoc";
$salle["stock"]= "stock";
$salle["test"] = "test";
?>

View File

@ -0,0 +1,13 @@
<?php
header('Content-type: application/json; charset=utf-8');
$dirname = '/var/www/salles/rep_salles';
$dir = opendir($dirname);
$salles = array();
while($file = readdir($dir)) {
if($file != '.' && $file != '..' && !is_dir($dirname.$file))
{
$salles[] = $file;
}
}
echo json_encode($salles);
?>