$list_ordre = $_GET['tri'] . ' ' . $_GET['sens']; } if (isset($_GET['filtre'])) { $list_filtre = $_GET['filtre']; } if (!isset($_GET['id_forum']) || intval($_GET['id_forum']) == 0) { $_GET['id_forum'] = $forum->obtenirDernier(); } $smarty->assign('id_forum', $_GET['id_forum']); $smarty->assign('forum_tarifs_lib', $AFUP_Tarifs_Forum_Lib); $smarty->assign('forum_tarifs', $AFUP_Tarifs_Forum); $smarty->assign('statistiques', $forum_inscriptions->obtenirStatistiques($_GET['id_forum'])); $smarty->assign('forums', $forum->obtenirListe()); $smarty->assign('inscriptions', $forum_inscriptions->obtenirListe($_GET['id_forum'], $list_champs, $list_ordre, $list_associatif, $list_filtre)); } elseif ($action == 'supprimer') { if ($forum_inscriptions->supprimerInscription($_GET['id']) && $forum_facturation->supprimerFacturation($_GET['id'])) { AFUP_Logs::log('Suppression de l\'inscription ' . $_GET['id']); afficherMessage('L\'inscription a été supprimée', 'index.php?page=forum_inscriptions&action=lister'); } else { afficherMessage('Une erreur est survenue lors de la suppression de l\'inscription', 'index.php?page=forum_inscriptions&action=lister', true); } } elseif ($action == 'generer_mail_inscription_afup') { $champs = $forum_inscriptions->obtenir($_GET['id']); $champs2 = $forum_facturation->obtenir($champs['reference']); $info_forum = $forum->obtenir($champs['id_forum']); $texte = ' - civilité : ' . $champs['civilite'] . PHP_EOL; $texte .= ' - nom : ' . $champs['nom'] . PHP_EOL; $texte .= ' - prénom : ' . $champs['prenom'] . PHP_EOL; $texte .= ' - email : ' . $champs['email'] . PHP_EOL; $texte .= ' - adresse : ' . $champs2['adresse'] . PHP_EOL; $texte .= ' - code postal : ' . $champs2['code_postal'] . PHP_EOL;
} else { afficherMessage("La facture n'a pas pu être envoyée", 'index.php?page=forum_facturation&action=lister', true); } } elseif ($action == 'envoyer_tout') { if ($forum_facturation->envoyerATous($_GET['id_forum'])) { afficherMessage('Les factures ont été envoyées', 'index.php?page=forum_facturation&action=lister'); } else { afficherMessage('Au moins une facture n\'a pas pu être envoyé. Se conférer aux logs pour plus de détails', 'index.php?page=forum_facturation&action=lister', true); } } elseif ($action == 'facturer_facture') { if ($forum_facturation->estFacture($_GET['ref'])) { AFUP_Logs::log('Facturation => facture n°' . $_GET['ref']); afficherMessage('La facture est prise en compte', 'index.php?page=forum_facturation&action=lister'); } else { afficherMessage("La facture n'a pas pu être prise en compte", 'index.php?page=forum_facturation&action=lister', true); } } elseif ($action == 'supprimer_facture') { if ($forum_facturation->supprimerFacturation($_GET['ref'])) { AFUP_Logs::log('Supprimer => facture n°' . $_GET['ref']); afficherMessage('La facture est supprimée', 'index.php?page=forum_facturation&action=lister'); } else { afficherMessage("La facture n'a pas pu être supprimée", 'index.php?page=forum_facturation&action=lister', true); } } elseif ($action == 'changer_date_reglement') { $reglement = strtotime(implode('-', array_reverse(explode('/', $_GET['reglement'])))); if ($forum_facturation->changerDateReglement($_GET['ref'], $reglement)) { afficherMessage('La date de réglement a été changée', 'index.php?page=forum_facturation&action=lister'); } else { afficherMessage('La date de réglement n\'a pas été changée', 'index.php?page=forum_facturation&action=lister', true); } }