diff --git a/Contestation/Assure.php b/Contestation/Assure.php index 9f540ad..61361d3 100755 --- a/Contestation/Assure.php +++ b/Contestation/Assure.php @@ -94,7 +94,23 @@ class Assure extends Modelecontestation { return $ligne; } + public function get_nbTentativeBiometrie($codeSociete) + { + $sql = 'select nbTentativeBiometrie FROM societeuser WHERE (codeSociete=?);'; + + $resultat = $this->executerRequete($sql, array($codeSociete))->fetch(PDO::FETCH_ASSOC); + + return $resultat['nbTentativeBiometrie']; + } + public function get_parametres_scosiete($codeSociete) + { + $sql = 'select dureeTokenReconnaissanceFaciale, dossierPhoto, nbTentativeBiometrie FROM societeuser WHERE (codeSociete=?);'; + + $resultat = $this->executerRequete($sql, array($codeSociete))->fetch(PDO::FETCH_ASSOC); + + return $resultat; + } } ?> \ No newline at end of file diff --git a/Contestation/Demandereconnaissancefaciale.php b/Contestation/Demandereconnaissancefaciale.php index f35211e..2410b64 100755 --- a/Contestation/Demandereconnaissancefaciale.php +++ b/Contestation/Demandereconnaissancefaciale.php @@ -169,6 +169,12 @@ : "Paramètres vérifiés avec succès!"; afficherMessage("$message", false); */ + + $param_societe = $assure->get_parametres_scosiete($codeSociete); + + var_dump($param_societe); + exit; + } function afficherMessage($message) { diff --git a/Contestation/verify_facial_api.php b/Contestation/verify_facial_api.php index 63d5911..6ac7237 100644 --- a/Contestation/verify_facial_api.php +++ b/Contestation/verify_facial_api.php @@ -5,15 +5,20 @@ */ header('Content-Type: application/json'); -require_once 'config.php'; -require_once 'database.php'; +// require_once 'config.php'; +// require_once 'database.php'; +require_once "Assure.php"; + class FacialVerificationAPI { - private $db; + // private $db; + private $assure_api; private $maxAttempts = 3; public function __construct($db) { - $this->db = $db; + // $this->db = $db; + $assure_api = new Assure(); + $maxAttempts = get_nbTentativeBiometrie($_SESSION['codeEntite']); } /**