ajout scripts_distants : squid
This commit is contained in:
parent
af1d51138d
commit
cc9284f2fa
8
admin/scripts_distants/squid/bloque_salle.php
Normal file
8
admin/scripts_distants/squid/bloque_salle.php
Normal 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");
|
||||||
|
}
|
||||||
|
?>
|
8
admin/scripts_distants/squid/debloque_salle.php
Normal file
8
admin/scripts_distants/squid/debloque_salle.php
Normal 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");
|
||||||
|
}
|
||||||
|
?>
|
20
admin/scripts_distants/squid/salles.conf
Normal file
20
admin/scripts_distants/squid/salles.conf
Normal 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";
|
||||||
|
|
||||||
|
?>
|
13
admin/scripts_distants/squid/salles_bloquees.php
Normal file
13
admin/scripts_distants/squid/salles_bloquees.php
Normal 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);
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user