From 13bd3d9482a2b8989a6809a37e9b41e38ac8dc44 Mon Sep 17 00:00:00 2001 From: grouille Date: Sat, 25 Apr 2020 19:52:40 +0200 Subject: [PATCH] MAJ --- site/accesBase.php | 20 ++++++++++++++++++++ site/stop.php | 29 ++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/site/accesBase.php b/site/accesBase.php index 01a46f5..93012a3 100644 --- a/site/accesBase.php +++ b/site/accesBase.php @@ -205,6 +205,16 @@ return (int)$tab['version']; } + function getVersion($nom) + { + $db = connexion(); + $query = "SELECT version FROM capteurs where nom = '$nom'"; + $result = pg_query($db, $query) or die("La requète a echoué : ".pg_last_error()); + $tab = pg_fetch_assoc($result); + deconnexion($db); + return (int)$tab['version']; + } + function getRaspberrys() { $db = connexion(); @@ -363,6 +373,16 @@ return $tab['numero']; } + function getRaspberry($nom) + { + $db = connexion(); + $query = "SELECT raspberry FROM capteurs WHERE nom = '$nom'"; + $result = pg_query($db, $query) or die("La requ te a echou : ".pg_last_error()); + $tab = pg_fetch_assoc($result); + deconnexion($db); + return $tab['raspberry']; + } + function getTime($type) { $db = connexion(); diff --git a/site/stop.php b/site/stop.php index 4b83470..c58100c 100644 --- a/site/stop.php +++ b/site/stop.php @@ -1,3 +1,30 @@ -- libgit2 0.21.2