fxEscape($_POST['usa_login']) . "' AND com_actif = 1 AND com_superadm = 1"; $recLogin = $db->fxGetRow($sqlLogin); if ($recLogin != null) { if (strcasecmp($_POST['usa_password'], $recLogin['com_password']) == 0) { $blnSuccess = true; $strHashPassword = ', com_password = ' . password_hash($_POST['usa_password'], PASSWORD_DEFAULT) . "'"; // faire un hash } else { $blnSuccess = password_verify($_POST['usa_password'], $recLogin['com_password']); $strHashPassword = ''; } if ($blnSuccess) { /* $sqlUpdate = "UPDATE usagers SET usa_lastvisit = '" . fxGetDateTime() . "' WHERE usa_id = " . intval($recLogin['usa_id']); $qryUpdate = $db->fxQuery($sqlUpdate); */ $_SESSION['usa_id'] = $recLogin['com_id']; $_SESSION['usa_info'] = $recLogin; $_SESSION['logged'] = time(); header('Location: ' . fxSuperadmConsumeRedirectAfterLogin('index.php')); exit; } else { $_SESSION['msg'] = 1; header('Location: login.php'); exit; } } else { $_SESSION['msg'] = 1; header('Location: login.php'); exit; } } $strPage = 'login.php'; $strLangue = 'fr'; require_once('inc_header.php'); ?>