From 4d59bf13dd453f8ed378ffb9d453a30379a28785 Mon Sep 17 00:00:00 2001 From: jbousquie Date: Tue, 13 Dec 2016 11:16:43 +0100 Subject: [PATCH] =?UTF-8?q?wifi=20ajout=20nom,=20pr=C3=A9nom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/connexions.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/admin/connexions.php b/admin/connexions.php index ab26ee4..2ff123d 100644 --- a/admin/connexions.php +++ b/admin/connexions.php @@ -235,13 +235,14 @@ function PremiereConnexion() { // con_wifi[i]["ip"] : ip allouée // con_wifi[i]["browser"] : user agent // con_wifi[i]["debut"] : timestamp du début de la connexion - +// con_wifi[i]["prenom"] : prénom de l'utilisateur +// con_wifi[i]["nom"] : nom de l'utilisateur function Connexions_wifi() { $connexions_wifi = array(); $db = db_connect(); $req_close = "UPDATE wifi SET close = 1 WHERE DATE(wifi_deb_conn) < CURDATE()"; - $req = "SELECT wifi_id, wifi_username, wifi_ip, wifi_browser, wifi_deb_conn FROM wifi WHERE close = 0 ORDER BY wifi_deb_conn"; + $req = "SELECT wifi_id, wifi_username, wifi_ip, wifi_browser, wifi_deb_conn, prenom, nom FROM wifi, comptes WHERE close = 0 AND username = wifi_username ORDER BY wifi_deb_conn DESC"; db_query($db, $req_close); $res = db_query($db, $req); @@ -252,6 +253,8 @@ function Connexions_wifi() { $connexions_wifi[$i]["ip"] = $con[2]; $connexions_wifi[$i]["browser"] = $con[3]; $connexions_wifi[$i]["debut"] = $con[4]; + $connexions_wifi[$i]["prenom"] = $con[5]; + $connexions_wifi[$i]["nom"] = $con[6]; $i++; }