31 lines
794 B
PHP
Executable File
31 lines
794 B
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Feuillemaladie.php';
|
|
|
|
class ControleurAjaxfacturerfeuillemaladie extends Controleur {
|
|
private $feuillemaladie;
|
|
|
|
public function __construct() {
|
|
$this->feuillemaladie = new Feuillemaladie();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
}
|
|
|
|
public function facturer()
|
|
{
|
|
$csrf_token = trim($this->requete->getParametreFormulaire("csrf_token"));
|
|
|
|
if (!Csrf::validateToken($csrf_token)) {
|
|
$_SESSION['flash_error'] = 'Votre session a expiré. Veuillez réessayer.';
|
|
|
|
header('Location: ' . $_SERVER['HTTP_REFERER']);
|
|
exit;
|
|
}
|
|
|
|
$user_id_substitut = $this->requete->getParametreFormulaire("user_id_substitut");
|
|
|
|
$this->feuillemaladie->facturer($user_id_substitut);
|
|
}
|
|
} |