set explicite du timestamp sur deconnexion (plus automatique)
This commit is contained in:
parent
7fe4256b7a
commit
0dd808a517
@ -17,7 +17,7 @@ if ( $_SERVER["REQUEST_METHOD"] == "POST" && $_SERVER["SERVER_PORT"] == "443" &&
|
||||
// requête de création de l'enregistrement de connexion
|
||||
$req_con_C ='INSERT INTO connexions (username, hote, ip, debut_con, close) VALUES ("'.$username.'", "'.$computer.'", "'.$ip.'", CURRENT_TIMESTAMP(),0)';
|
||||
//requête de mise à jour (fermeture) de la connexion
|
||||
$req_con_D = 'UPDATE connexions SET close = 1 WHERE close = 0 AND username = "'.$username.'" AND hote = "'.$computer.'"';
|
||||
$req_con_D = 'UPDATE connexions SET close = 1, fin_con = CURRENT_TIMESTAMP() WHERE close = 0 AND username = "'.$username.'" AND hote = "'.$computer.'"';
|
||||
// requête de mise à jour de l'adresse IP dans la table machines
|
||||
$req_ip_machine = 'UPDATE machines SET adresse_ip = "'. $ip .'" WHERE machine_id = "'. $computer .'"';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user