a
This commit is contained in:
parent
357b9ff1ad
commit
050c22f23c
|
|
@ -48,6 +48,8 @@ class ControleurRemboursement extends Controleur {
|
|||
|
||||
public function uploadged()
|
||||
{
|
||||
$_SESSION['mesage_kane'] ="";
|
||||
|
||||
$idDemandeRemboursement = $_SESSION['idDemandeRemboursement'] ?? '0';
|
||||
|
||||
$message = "";
|
||||
|
|
@ -59,12 +61,10 @@ class ControleurRemboursement extends Controleur {
|
|||
{
|
||||
$csrf_token = trim($this->requete->getParametreFormulaire("csrf_token_upload"));
|
||||
|
||||
header("Location: https://assure.ebene.ovh/Remboursement/$csrf_token");
|
||||
|
||||
if (!Csrf::validateToken($csrf_token)) {
|
||||
$_SESSION['flash_error'] = 'Votre session a expiré. Veuillez réessayer.';
|
||||
|
||||
header('Location: ' . $_SERVER['HTTP_REFERER']);
|
||||
$_SESSION['mesage_kane'] = $_SESSION['flash_error'];
|
||||
// header('Location: ' . $_SERVER['HTTP_REFERER']);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ class ControleurRemboursement extends Controleur {
|
|||
}
|
||||
|
||||
// On verifie si le champ est rempli
|
||||
if( !empty($_FILES['fichier_upload']['name']) )
|
||||
if(!empty($_FILES['fichier_upload']['name']) )
|
||||
{
|
||||
// Recuperation de l'extension du fichier
|
||||
|
||||
|
|
@ -148,8 +148,7 @@ class ControleurRemboursement extends Controleur {
|
|||
|
||||
// fin upload
|
||||
}
|
||||
// $this->executerAction("index");
|
||||
echo "après uploadged";
|
||||
$_SESSION['mesage_kane'] = $message;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -25,6 +25,13 @@
|
|||
|
||||
?>
|
||||
|
||||
<?php if (!empty($_SESSION['mesage_kane'])): ?>
|
||||
<div class="alert alert-warning">
|
||||
<?= htmlspecialchars($_SESSION['mesage_kane']) ?>
|
||||
<?php unset($_SESSION['mesage_kane']); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<input type="hidden" id="csrf_token" name="csrf_token" value="<?= htmlspecialchars($token) ?>">
|
||||
|
||||
<div class="card shadow-lg border-0 mb-4" style="border-radius: 15px;">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user