a
This commit is contained in:
parent
eec44d168b
commit
65fa636930
|
|
@ -95,16 +95,27 @@ class ControleurFichebeneficiaire extends Controleur {
|
|||
&& UPLOAD_ERR_OK === $_FILES['fichier_upload']['error'])
|
||||
{
|
||||
$rand = rand(1,1000000);
|
||||
$rand2 = rand(1,1000000);
|
||||
$nomImageTemp = $_SESSION['numeroBeneficiaire_C']."_".$rand.'.'. $extension;
|
||||
|
||||
|
||||
if(move_uploaded_file($_FILES['fichier_upload']['tmp_name'], TARGET.$nomImageTemp))
|
||||
{
|
||||
$src = TARGET.$nomImageTemp;
|
||||
|
||||
$rand = rand(1,1000000);
|
||||
$nomImage = $_SESSION['numeroBeneficiaire_C']."_".$rand.'.jpg';
|
||||
$nomImageCrypte = $_SESSION['numeroBeneficiaire_C']."_".$rand.'.bin';
|
||||
// ici
|
||||
|
||||
if($_SESSION['crypterPhoto']=="1")
|
||||
{
|
||||
$nomImageCrypte = $_SESSION['numeroBeneficiaire_C']."_".$rand.'.bin';
|
||||
}
|
||||
else
|
||||
{
|
||||
$nomImageCrypte = $_SESSION['numeroBeneficiaire_C']."_".$rand2.'.jpg';
|
||||
}
|
||||
|
||||
// $nomImageCrypte = $_SESSION['numeroBeneficiaire_C']."_".$rand.'.bin';
|
||||
|
||||
$imgtype = image_type_to_mime_type($infosImg[2]);
|
||||
|
||||
|
|
@ -152,8 +163,8 @@ class ControleurFichebeneficiaire extends Controleur {
|
|||
$_SESSION['lienPhoto_C'] = $nomImageCrypte;
|
||||
|
||||
unlink(TARGET.$nomImageTemp);
|
||||
unlink(TARGET.$nomImage);
|
||||
|
||||
// $this->index();
|
||||
$this->rediriger("Fichebeneficiaire/".$idBeneficiaire);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user