api fix
This commit is contained in:
@@ -1,17 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
// Ce script renvoie un object JSON des connexions en cours
|
// Ce script renvoie un object JSON des connexions en cours
|
||||||
|
// on pourra mettre ici l'include d'une lib d'authentification
|
||||||
|
|
||||||
include_once('../admin/connexions.php');
|
include_once('../admin/connexions.php');
|
||||||
|
|
||||||
header('Content-Type: application/json; charset=utf-8');
|
header('Content-Type: application/json; charset=utf-8');
|
||||||
|
|
||||||
$connexions = Connexion_machine();
|
$connexions = Connexions();
|
||||||
$tableau_connexions = [];
|
|
||||||
foreach ($connexions as $machine => $conn) {
|
|
||||||
$conn["machine"] = $machine; // ajout d'un champ dans le hash $conn
|
|
||||||
array_push($tableau_connexions, $conn);
|
|
||||||
}
|
|
||||||
|
|
||||||
$json_connexions = json_encode($tableau_connexions);
|
$json_connexions = json_encode($connexions);
|
||||||
echo($json_connexions);
|
echo($json_connexions);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user