Remplacement identificateurs et fonctions ; ajout session_start()
FossilOrigin-Name: 66cba3dd1a9082a7481da1d448e40d14964dfbfc95fff099be86f599ad6bf50b
This commit is contained in:
parent
8091c8b87d
commit
263770b9c7
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Paheko;
|
namespace Paheko;
|
||||||
|
session_start();
|
||||||
|
|
||||||
use Paheko\Files\Files;
|
use Paheko\Files\Files;
|
||||||
use Paheko\Entities\Files\File;
|
use Paheko\Entities\Files\File;
|
||||||
|
@ -105,7 +106,7 @@ function genererRecusPDF($totalPersonnes,
|
||||||
$prefixeNum = getNumPrefixe($configNum);
|
$prefixeNum = getNumPrefixe($configNum);
|
||||||
$numero_sequentiel = getNumSequentiel($configNum);
|
$numero_sequentiel = getNumSequentiel($configNum);
|
||||||
foreach ($totalPersonnes as $idPersonne => $personne) {
|
foreach ($totalPersonnes as $idPersonne => $personne) {
|
||||||
$tpl = new UserTemplate();
|
$tpl = new UserTemplate(null);
|
||||||
$tpl->setSource(PLUGIN_ROOT . '/templates/recu.skel');
|
$tpl->setSource(PLUGIN_ROOT . '/templates/recu.skel');
|
||||||
|
|
||||||
$tpl->assignArray(compact('signature', 'logo_asso', 'texteArticles'));
|
$tpl->assignArray(compact('signature', 'logo_asso', 'texteArticles'));
|
||||||
|
@ -193,11 +194,11 @@ function genererRecusPDF($totalPersonnes,
|
||||||
// echo $link;
|
// echo $link;
|
||||||
|
|
||||||
// faire une archive zip
|
// faire une archive zip
|
||||||
// $fichierZip = Utils::makeArchive(
|
$fichierZip = Utils::makeArchive(
|
||||||
// $listeFichiersPDF,
|
$listeFichiersPDF,
|
||||||
// $_SESSION['annee_recu'],
|
$_SESSION['annee_recu'],
|
||||||
// PLUGIN_ROOT . "/zip"
|
PLUGIN_ROOT . "/zip"
|
||||||
// );
|
);
|
||||||
|
|
||||||
//supprimer les fichiers pdf
|
//supprimer les fichiers pdf
|
||||||
// foreach ($listeFichiersPDF as $f) {
|
// foreach ($listeFichiersPDF as $f) {
|
||||||
|
@ -242,8 +243,8 @@ function generererRecusHTML($tpl,
|
||||||
$tpl->assign('prefixeNum', getNumPrefixe($configNum));
|
$tpl->assign('prefixeNum', getNumPrefixe($configNum));
|
||||||
$tpl->assign('membre', $configNum->membre);
|
$tpl->assign('membre', $configNum->membre);
|
||||||
$tpl->assign('numero_sequentiel', getNumSequentiel($configNum));
|
$tpl->assign('numero_sequentiel', getNumSequentiel($configNum));
|
||||||
$tpl->assign('nom_asso', Config::getInstance()->get('nom_asso'));
|
$tpl->assign('org_name', Config::getInstance()->get('org_name'));
|
||||||
$tpl->assign('adresse_asso', Config::getInstance()->get('adresse_asso'));
|
$tpl->assign('org_address', Config::getInstance()->get('org_address'));
|
||||||
$tpl->assign('objet_asso', $plugin->getConfig('objet_asso'));
|
$tpl->assign('objet_asso', $plugin->getConfig('objet_asso'));
|
||||||
$tpl->assign('courriel', $plugin->getConfig('imprimerCourriel'));
|
$tpl->assign('courriel', $plugin->getConfig('imprimerCourriel'));
|
||||||
$tpl->assign('complements', mentionsComplémentaires());
|
$tpl->assign('complements', mentionsComplémentaires());
|
||||||
|
@ -323,7 +324,6 @@ function cumulerVersementsTarif($versements)
|
||||||
$dateMax = -1;
|
$dateMax = -1;
|
||||||
$totalVersements = 0;
|
$totalVersements = 0;
|
||||||
foreach ($versements as $ligne) {
|
foreach ($versements as $ligne) {
|
||||||
error_log("\nligne=" . print_r($ligne, true));
|
|
||||||
if (
|
if (
|
||||||
$ligne->idTarif != $idTarifCourant ||
|
$ligne->idTarif != $idTarifCourant ||
|
||||||
$ligne->idUser != $idPersonneCourant ||
|
$ligne->idUser != $idPersonneCourant ||
|
||||||
|
|
|
@ -1,20 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Paheko;
|
namespace Paheko;
|
||||||
|
session_start();
|
||||||
|
|
||||||
use Paheko\Entities\Files\File;
|
use Paheko\Entities\Files\File;
|
||||||
use Paheko\Files\Files;
|
use Paheko\Files\Files;
|
||||||
|
|
||||||
$parent = qg('p');
|
$parent = qg('p');
|
||||||
|
/*
|
||||||
if (!File::checkCreateAccess($parent, $session)) {
|
if (!File::checkCreateAccess($parent, $session)) {
|
||||||
throw new UserException('Vous n\'avez pas le droit d\'ajouter de fichier.');
|
throw new UserException('Vous n\'avez pas le droit d\'ajouter de fichier.');
|
||||||
}
|
}
|
||||||
|
// checkCreateAccess n'existe plus...
|
||||||
|
*/
|
||||||
|
|
||||||
$csrf_key = 'upload_file_' . md5($parent);
|
$csrf_key = 'upload_file_' . md5($parent);
|
||||||
|
|
||||||
$form->runIf('upload', function () use ($parent) {
|
$form->runIf('upload', function () use ($parent) {
|
||||||
$_SESSION['sig_file'] = File::uploadMultiple($parent, 'file');
|
$_SESSION['sig_file'] = \Paheko\Files\Files::uploadMultiple($parent, 'file');
|
||||||
}, $csrf_key, PLUGIN_ROOT . '/www/admin/config.php');
|
}, $csrf_key, PLUGIN_ROOT . '/admin/config.php');
|
||||||
|
|
||||||
$tpl->assign(compact('parent', 'csrf_key'));
|
$tpl->assign(compact('parent', 'csrf_key'));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue