a
This commit is contained in:
parent
0dd75d71d5
commit
ed065511cb
|
|
@ -210,4 +210,39 @@ class ControleurLaboratoire extends Controleur {
|
|||
'geds' => $geds, 'msgErreur' => $msgErreur, 'contestation' => $contestation, 'prixActeModifiable' => $prixActeModifiable));
|
||||
}
|
||||
}
|
||||
|
||||
public function confirmerotp()
|
||||
{
|
||||
if ($this->requete->existeParametre("otpValue"))
|
||||
{
|
||||
$login = $_SESSION['p_login'];
|
||||
$otpValueSaisi = $this->requete->getParametre("otpValue");
|
||||
$codeTypeFacture = "LAB";
|
||||
|
||||
$otpArray = $this->feuille->get_otp_value($codeTypeFacture);
|
||||
|
||||
$otpValueRequis = $otpArray['otpValue'];
|
||||
$idOtpFacturePrestation = $otpArray['idOtpFacturePrestation'];
|
||||
|
||||
if ( (password_verify($otpValueSaisi, $otpValueRequis)) && (strlen($otpValueSaisi)=='6') )
|
||||
{
|
||||
$this->feuille->maj_otp($idOtpFacturePrestation, '1'); // validé
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->feuille->maj_otp($idOtpFacturePrestation, '9'); // incorrect
|
||||
}
|
||||
|
||||
$this->rediriger("Pharmacien");
|
||||
}
|
||||
}
|
||||
|
||||
public function envoyerotp()
|
||||
{
|
||||
$codeTypeFacture = "LAB";
|
||||
$otpValue = mt_rand(100000, 999999);
|
||||
$this->feuille->envoyer_otp($codeTypeFacture, $otpValue);
|
||||
$this->rediriger("Pharmacien");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -233,8 +233,9 @@ class ControleurPharmacien extends Controleur {
|
|||
{
|
||||
$login = $_SESSION['p_login'];
|
||||
$otpValueSaisi = $this->requete->getParametre("otpValue");
|
||||
$codeTypeFacture = "PHAR";
|
||||
|
||||
$otpArray = $this->feuille->get_otp_value("PHAR");
|
||||
$otpArray = $this->feuille->get_otp_value($codeTypeFacture);
|
||||
|
||||
$otpValueRequis = $otpArray['otpValue'];
|
||||
$idOtpFacturePrestation = $otpArray['idOtpFacturePrestation'];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user