From 8091c8b87d57e83b40848694299ddbc1ceeb407d Mon Sep 17 00:00:00 2001 From: engel <> Date: Fri, 10 Nov 2023 11:31:18 +0000 Subject: [PATCH] Remplacement PLUGIN_URL ; ajout session_start() FossilOrigin-Name: 7fad3fa0b91ae127517c4e9d9a62a316280e17c561855a6abde8711e3cac72f2 --- admin/action.php | 1 + admin/choix_annee.php | 3 ++- admin/config.php | 1 + admin/index.php | 2 ++ admin/style.css | 5 +++++ admin/versements_activites.php | 10 +++++----- admin/versements_personnes.php | 2 +- lib/Utils.php | 2 +- templates/index.tpl | 2 +- 9 files changed, 19 insertions(+), 9 deletions(-) diff --git a/admin/action.php b/admin/action.php index 86a998b..7776094 100644 --- a/admin/action.php +++ b/admin/action.php @@ -1,6 +1,7 @@ assign('anneesFiscales', $anneesFiscales); diff --git a/admin/config.php b/admin/config.php index 60c4981..a5d7c51 100644 --- a/admin/config.php +++ b/admin/config.php @@ -1,6 +1,7 @@ assign('plugin_config', $plugin->getConfig()); $tpl->assign('nbTaux', $nbTaux); $tpl->assign('nbChamps', $nbChamps); $tpl->assign('plugin_css', ['style.css']); +$tpl->assign('plugin_url', \Paheko\Utils::plugin_url()); // envoyer au template $tpl->display(PLUGIN_ROOT . '/templates/index.tpl'); diff --git a/admin/style.css b/admin/style.css index eb52c78..e096fff 100644 --- a/admin/style.css +++ b/admin/style.css @@ -109,6 +109,11 @@ div.actions display : inline; } +a.icn-btn { + font-family: "paheko", sans-serif; + font-size : 1.2em; +} + dl.config { padding-bottom : 1ex; diff --git a/admin/versements_activites.php b/admin/versements_activites.php index 85a7f01..56114bf 100644 --- a/admin/versements_activites.php +++ b/admin/versements_activites.php @@ -16,7 +16,7 @@ if (! isset($_SESSION['tauxSelectionnes']) && null === f('comptes')) { - \Paheko\Utils::redirect(PLUGIN_URL . 'index.php'); + \Paheko\Utils::redirect(\Paheko\Utils::plugin_url() . 'index.php'); } // tarifs sélectionnés @@ -25,11 +25,11 @@ if (null !== f('tarifs')) { } else if (! isset($_SESSION['tauxSelectionnes'])) { $tarifsSelectionnes = []; } -error_log("\ntarifsSelectionnes=" . print_r($tarifsSelectionnes, true)); +// error_log("\ntarifsSelectionnes=" . print_r($tarifsSelectionnes, true)); // comptes sélectionnés if (null !== f('comptes')) { $_SESSION['comptesSelectionnes'] = f('comptes'); - error_log("\ncomptesSelectionnes=" . print_r($_SESSION['comptesSelectionnes'], true)); + // error_log("\ncomptesSelectionnes=" . print_r($_SESSION['comptesSelectionnes'], true)); } /* else if (! isset($_SESSION['tauxSelectionnes'])) { $_SESSION['comptesSelectionnes'] = []; @@ -72,7 +72,7 @@ if (count($lesTarifs) != 0) $lesTarifs, $lesComptes, $champsNom); - error_log("lesVersements=" . print_r($_SESSION['lesVersements'], true)); + // error_log("lesVersements=" . print_r($_SESSION['lesVersements'], true)); } // ajouter les versements sans tarif (tri par nom, compte, date) @@ -86,7 +86,7 @@ if (isset($_SESSION['comptesSelectionnes'])) $_SESSION['lesVersements'][] = $versement; } } -error_log("lesVersements=" . print_r($_SESSION['lesVersements'], true)); +//error_log("lesVersements=" . print_r($_SESSION['lesVersements'], true)); // préparation de l'affichage $tpl->assign('lesVersements', $_SESSION['lesVersements']); diff --git a/admin/versements_personnes.php b/admin/versements_personnes.php index c23d423..8db95e8 100644 --- a/admin/versements_personnes.php +++ b/admin/versements_personnes.php @@ -11,7 +11,7 @@ if (! isset($_SESSION['taux_reduction']) && null === $taux) { - \Paheko\Utils::redirect(PLUGIN_URL . 'index.php'); + \Paheko\Utils::redirect(\Paheko\Utils::plugin_url() . 'index.php'); } if (null !== $taux) { $_SESSION['taux_reduction'] = $taux; diff --git a/lib/Utils.php b/lib/Utils.php index ced8bca..2bbb2f9 100644 --- a/lib/Utils.php +++ b/lib/Utils.php @@ -230,7 +230,7 @@ class Utils $condition, $tri ); - error_log("\ngetVersementsTarifsComptes : sql=" . $sql); + // error_log("\ngetVersementsTarifsComptes : sql=" . $sql); return $db->get($sql); } diff --git a/templates/index.tpl b/templates/index.tpl index 9a6dc51..1f6ca84 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -4,7 +4,7 @@