recusfiscaux/www/admin/choix_annee.php

25 lines
592 B
PHP

<?php
namespace Garradin;
use Garradin\Plugin\RecusFiscaux\Utils;
// liste des années fiscales
$anneeCourante = date("Y");
$anneesFiscales = Utils::getAnneesFiscales();
if ($anneesFiscales[0] < $anneeCourante) {
array_unshift($anneesFiscales, $anneeCourante);
}
if (f('change'))
{
$_SESSION['annee_recu'] = f('annee_recu');
\Garradin\Utils::redirect(f('from') ?: PLUGIN_URL);
}
$tpl->assign('anneesFiscales', $anneesFiscales);
$tpl->assign('annee_recu', $_SESSION['annee_recu']);
$tpl->assign('from', qg('from'));
$tpl->display(PLUGIN_ROOT . '/templates/choix_annee.tpl');