<?php require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php'; require_once dirname(__FILE__) . '/_config.inc.php'; require_once 'Afup/AFUP_Inscriptions_Forum.php'; $inscription_manager = new AFUP_Inscriptions_Forum($bdd); $md5_code = $_GET['id']; $inscrit = $inscription_manager->obtenirInscription($md5_code); if (empty($inscrit)) { header('Location: /pages/forumphp' . $config_forum['annee'] . '/index.php'); } $smarty->assign('inscrit', $inscrit); $smarty->display('convocation_visiteurs.html');
<?php require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php'; require_once 'Afup/AFUP_Inscriptions_Forum.php'; $inscriptions = new AFUP_Inscriptions_Forum($bdd); $inscriptions->ajouterRappel($_POST['email']); $smarty->display('inscriptions_rappel.html');
<?php require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php'; require_once dirname(__FILE__) . '/_config.inc.php'; require_once 'Afup/AFUP_Inscriptions_Forum.php'; require_once 'Afup/AFUP_Facturation_Forum.php'; $forum_inscriptions = new AFUP_Inscriptions_Forum($bdd); $forum_facturation = new AFUP_Facturation_Forum($bdd); $forum_inscriptions->modifierEtatInscription($_GET['cmd'], AFUP_FORUM_ETAT_REGLE); $forum_facturation->enregistrerInformationsTransaction($_GET['cmd'], $_GET['autorisation'], $_GET['transaction']); $smarty->display('paybox_effectue.html');
$mailing = new AFUP_Mailing($bdd); if ($action == 'mailing') { switch ($_GET['liste']) { case 'membre_a_jour_cotisation': require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Assemblee_Generale.php'; $assemblee = new AFUP_Assemblee_Generale($bdd); $liste = $assemblee->obtenirListeEmailPersonnesAJourDeCotisation(); break; case 'ancien_conferencier': require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_AppelConferencier.php'; $forum_appel = new AFUP_AppelConferencier($bdd); $liste = $forum_appel->obtenirListeEmailAncienConferencier(); break; case 'ancien_visiteur': require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Inscriptions_Forum.php'; $inscriptions = new AFUP_Inscriptions_Forum($bdd); $liste = $inscriptions->obtenirListeEmailAncienVisiteurs(); break; default: $liste = ''; break; } $formulaire =& instancierFormulaire(); $id_forum = $forum->obtenirDernier(); $rs_forum = $forum->obtenir($id_forum); $formulaire->setDefaults(array('from_email' => $GLOBALS['conf']->obtenir('mails|email_expediteur'), 'from_name' => $GLOBALS['conf']->obtenir('mails|nom_expediteur'), 'subject' => $rs_forum['titre'], 'body' => '', 'tos' => $liste)); $formulaire->addElement('header', null, 'Mailling'); $formulaire->addElement('text', 'from_name', 'Expéditeur ', array('size' => 30, 'maxlength' => 40)); $formulaire->addElement('text', 'from_email', 'Email', array('size' => 30, 'maxlength' => 40)); $formulaire->addElement('text', 'subject', 'Sujet', array('size' => 50, 'maxlength' => 50)); $formulaire->addElement('textarea', 'body', 'Texte', array('cols' => 60, 'rows' => 20));
<?php require_once __DIR__ . '/../../include/prepend.inc.php'; require_once __DIR__ . '/_config.inc.php'; require_once __DIR__ . '/../../../sources/Afup/AFUP_Pays.php'; require_once __DIR__ . '/../../../sources/Afup/AFUP_Forum.php'; require_once __DIR__ . '/../../../sources/Afup/AFUP_Inscriptions_Forum.php'; require_once __DIR__ . '/../../../sources/Afup/AFUP_Facturation_Forum.php'; $pays = new AFUP_Pays($bdd); $forum = new AFUP_Forum($bdd); $id_forum = $config_forum['id']; $forum_inscriptions = new AFUP_Inscriptions_Forum($bdd); $forum_facturation = new AFUP_Facturation_Forum($bdd); $nombre_places = $forum->obtenirNombrePlaces($id_forum); $nombre_inscrits = $forum_inscriptions->obtenirNombreInscrits($id_forum); $is_prevente = time() < $config_forum['date_fin_prevente']; if (!isset($_GET['passage_en_force'])) { if (time() > $config_forum['date_fin_vente']) { $smarty->display('inscriptions_fermes.html'); die; } if ($nombre_inscrits >= $nombre_places) { $smarty->display('inscriptions_fermes.html'); die; } } //nombre possible d'inscrptions sur une même commande $nombre_personnes = isset($_GET['nombre_personnes']) ? (int) $_GET['nombre_personnes'] : 5; $nombre_tags = 3; //nombre inscription choisi via js $nombre_inscriptions = isset($_GET['nbInscriptions']) ? (int) $_GET['nbInscriptions'] : 1;
// Impossible to access the file itself if (!defined('PAGE_LOADED_USING_INDEX')) { trigger_error("Direct access forbidden.", E_USER_ERROR); exit; } $action = verifierAction(array('lister', 'ajouter', 'modifier', 'supprimer', 'inscrire_forum', 'associer_gravatar')); $tris_valides = array(); $sens_valides = array('asc', 'desc'); $smarty->assign('action', $action); require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_AppelConferencier.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Inscriptions_Forum.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Facturation_Forum.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Forum.php'; $forum = new AFUP_Forum($bdd); $forum_appel = new AFUP_AppelConferencier($bdd); $forum_inscriptions = new AFUP_Inscriptions_Forum($bdd); $forum_facturation = new AFUP_Facturation_Forum($bdd); if ($action == 'inscrire_forum') { if (!isset($_GET['id_forum']) || intval($_GET['id_forum']) == 0) { $_GET['id_forum'] = $forum->obtenirDernier(); } $sessions = $forum_appel->obtenirListeSessionsPlannifies($_GET['id_forum']); foreach (array(353, 354, 355, 356, 357, 358, 359, 361, 362, 363, 364, 366) as $id_projet_php) { $sessions[] = array('session_id' => $id_projet_php, 'is_projet' => true); } $valeurs['id_forum'] = (int) $_GET['id_forum']; $nb_conferencier = 0; $valeurs['citer_societe'] = true; $valeurs['newsletter_nexen'] = true; $valeurs['newsletter_afup'] = true; $valeurs['type_reglement'] = 3;
<?php require_once '../../include/prepend.inc.php'; require_once dirname(__FILE__) . '/_config.inc.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/_Common.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Inscriptions_Forum.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Facturation_Forum.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Mail.php'; $forum_inscriptions = new AFUP_Inscriptions_Forum($bdd); $forum_facturation = new AFUP_Facturation_Forum($bdd); $forum_inscriptions->modifierEtatInscription($_GET['cmd'], AFUP_FORUM_ETAT_REGLE); $forum_facturation->enregistrerInformationsTransaction($_GET['cmd'], $_GET['autorisation'], $_GET['transaction']); if ($forum_facturation->estFacture($_GET['cmd'])) { $facture = $forum_facturation->obtenir($_GET['cmd']); // Send the invoice $forum_facturation->envoyerFacture($facture); // Send register confirmation $mail = new AFUP_Mail(); $registrations = $forum_inscriptions->getRegistrationsByReference($facture['reference']); foreach ($registrations as $registration) { $receiver = array('email' => $registration['email'], 'name' => sprintf('%s %s', $registration['prenom'], $registration['nom'])); $data = $registration; if (!$mail->send('confirmation-inscription-phptour2015', $receiver, $data)) { $message = <<<HTML Impossible d'envoyer la confirmation d'inscription après paiement pour le forum en cours.<br> Facture : {$registration['reference']}<br/> Contact : {$registration['prenom']} {$registration['nom']} <{$registration['email']}> HTML; $mail->sendSimpleMessage("Impossible d'envoyer la confirmation", $message, array(array('name' => 'Trésorier AFUP', 'email' => '*****@*****.**'), array('name' => 'Communication AFUP', 'email' => '*****@*****.**'))); } }
<?php require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php'; require_once dirname(__FILE__) . '/_config.inc.php'; require_once 'Afup/AFUP_Inscriptions_Forum.php'; $inscriptions = new AFUP_Inscriptions_Forum($bdd); $inscriptions->modifierEtatInscription($_GET['cmd'], AFUP_FORUM_ETAT_ERREUR); $smarty->display('paybox_erreur.html');
<?php // Impossible to access the file itself if (!defined('PAGE_LOADED_USING_INDEX')) { trigger_error("Direct access forbidden.", E_USER_ERROR); exit; } $action = verifierAction(array('lister', 'lister_conferencier_orga')); $tris_valides = array('i.date', 'i.nom', 'f.societe', 'i.etat'); $sens_valides = array('desc', 'asc'); $smarty->assign('action', $action); require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Inscriptions_Forum.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Facturation_Forum.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Forum.php'; $forum = new AFUP_Forum($bdd); $forum_inscriptions = new AFUP_Inscriptions_Forum($bdd); $forum_facturation = new AFUP_Facturation_Forum($bdd); $list_champs = 'i.id, i.date, i.nom, i.prenom, i.email, f.societe, i.etat, i.coupon, i.type_inscription'; $list_ordre = 'I.nom asc'; $list_sens = 'desc'; $list_associatif = false; $list_filtre = false; if (isset($_GET['tri']) && in_array($_GET['tri'], $tris_valides) && isset($_GET['sens']) && in_array($_GET['sens'], $sens_valides)) { $list_ordre = $_GET['tri'] . ' ' . $_GET['sens']; } 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('forums', $forum->obtenirListe());
<?php require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php'; require_once 'Afup/AFUP_Pays.php'; require_once 'Afup/AFUP_Forum.php'; require_once 'Afup/AFUP_Inscriptions_Forum.php'; require_once 'Afup/AFUP_Facturation_Forum.php'; $pays = new AFUP_Pays($bdd); $forum = new AFUP_Forum($bdd); $id_forum = 3; $forum_inscriptions = new AFUP_Inscriptions_Forum($bdd); $forum_facturation = new AFUP_Facturation_Forum($bdd); $nombre_places = $forum->obtenirNombrePlaces($id_forum); $nombre_inscrits = $forum_inscriptions->obtenirNombreInscrits($id_forum); //$smarty->display('inscriptions_a_venir.html'); //die(); if (time() > mktime(0, 0, 0, 12, 8, 2008)) { $smarty->display('inscriptions_fermes.html'); die; } if ($nombre_inscrits >= $nombre_places) { $smarty->display('inscriptions_completes.html'); die; } //nombre possible d'inscrptions sur une même commande $nombre_personnes = 5; // On créé le formulaire $formulaire =& instancierFormulaire(); $formulaire->setDefaults(array('civilite' => 'M.', 'id_pays_facturation' => 'FR', 'type_inscription' => -1, 'type_reglement' => -1)); for ($i = 1; $i <= $nombre_personnes; $i++) { $next = $i + 1;
<?php require_once '../../include/prepend.inc.php'; require_once dirname(__FILE__) . '/_config.inc.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Inscriptions_Forum.php'; $inscriptions = new AFUP_Inscriptions_Forum($bdd); $inscriptions->modifierEtatInscription($_GET['cmd'], AFUP_FORUM_ETAT_REFUSE); $smarty->display('paybox_refuse.html');
<?php require_once '../../include/prepend.inc.php'; require_once dirname(__FILE__) . '/_config.inc.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/_Common.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Inscriptions_Forum.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Facturation_Forum.php'; $forum_inscriptions = new AFUP_Inscriptions_Forum($bdd); $forum_facturation = new AFUP_Facturation_Forum($bdd); if (in_array($_SERVER['REMOTE_ADDR'], ['195.101.99.73', '195.101.99.76', '194.2.160.66', '194.2.122.158', '195.25.7.146', '195.25.7.166']) === false) { /// Ici sont rencensees les IP indiquées par paybox dans leur doc die('...'); } $status = $_GET['status']; $etat = AFUP_FORUM_ETAT_ERREUR; if ($status === '00000') { $etat = AFUP_FORUM_ETAT_REGLE; } elseif ($status === '00015') { // Designe un paiement deja effectue : on a surement deja eu le retour donc on s'arrete die; } elseif ($status === '00117') { $etat = AFUP_FORUM_ETAT_ANNULE; } elseif (substr($status, 0, 3) === '001') { $etat = AFUP_FORUM_ETAT_REFUSE; } $forum_inscriptions->modifierEtatInscription($_GET['cmd'], $etat); $forum_facturation->enregistrerInformationsTransaction($_GET['cmd'], $_GET['autorisation'], $_GET['transaction']); if ($etat === AFUP_FORUM_ETAT_REGLE && $forum_facturation->estFacture($_GET['cmd'])) { $facture = $forum_facturation->obtenir($_GET['cmd']); // Send the invoice $forum_facturation->envoyerFacture($facture);
function array2csv(array &$array) { if (count($array) == 0) { return null; } ob_start(); $df = fopen("php://output", 'w'); fputcsv($df, array_keys(reset($array))); foreach ($array as $row) { fputcsv($df, $row); } fclose($df); return ob_get_clean(); } $forum = new AFUP_Forum($bdd); $forum_inscriptions = new AFUP_Inscriptions_Forum($bdd); $id_forum = isset($_GET['id_forum']) ? (int) $_GET['id_forum'] : O; $id_personne = isset($_GET['id_personne']) ? (int) $_GET['id_personne'] : 0; $badges = $forum_inscriptions->obtenirListePourBadges($id_forum, $id_personne); $badge_prints = array(); $nb_cols = 3; $nb_rows = 4; $badge_row = 1; $badge_col = 1; $badge_page = 1; foreach ($badges as $nb => $badge) { preg_match('@\\<tag\\>(.*)\\</tags\\>@i', $badge['commentaires'], $matches); $tags = isset($matches[1]) ? $matches[1] : ''; $tags = explode(';', $tags); $tags = implode(' - ', array_filter($tags)); $badge['tags'] = $tags;
<?php // Impossible to access the file itself if (!defined('PAGE_LOADED_USING_INDEX')) { trigger_error("Direct access forbidden.", E_USER_ERROR); exit; } require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Inscriptions_Forum.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Facturation_Forum.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Forum.php'; $forum = new AFUP_Forum($bdd); $forum_inscriptions = new AFUP_Inscriptions_Forum($bdd); 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_avenir', $forum->obtenir((int) $_GET['id_forum'])); $id_precedent = $forum->obtenirPrecedent((int) $_GET['id_forum']); $smarty->assign('forum_precedent', $forum->obtenir($id_precedent)); $smarty->assign('forums', $forum->obtenirListe()); $suiviBrut = $forum_inscriptions->obtenirSuivi($_GET['id_forum']); $smarty->assign('suivis', $suiviBrut); $n = $n_1 = array(); if ($suiviBrut != false) { foreach ($suiviBrut as $s) { $n[] = $s['n']; $n_1[] = $s['n_1']; } } $smarty->assign('n', implode(', ', $n)); $smarty->assign('n_1', implode(', ', $n_1));
<?php $action = verifierAction(array('lister', 'ajouter', 'modifier', 'supprimer', 'envoyer_convocation', 'generer_mail_inscription_afup', 'generer_inscription_afup')); $tris_valides = array('i.date', 'i.nom', 'f.societe', 'i.etat'); $sens_valides = array('desc', 'asc'); $smarty->assign('action', $action); require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Inscriptions_Forum.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Facturation_Forum.php'; require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Forum.php'; $forum = new AFUP_Forum($bdd); $forum_inscriptions = new AFUP_Inscriptions_Forum($bdd); $forum_facturation = new AFUP_Facturation_Forum($bdd); if ($action == 'envoyer_convocation') { $current = $forum->obtenir($_GET['id_forum'], 'titre'); $formulaire =& instancierFormulaire(); $formulaire->setDefaults(array('template' => 'convocation-???')); $formulaire->addElement('hidden', 'id_forum', $_GET['id_forum']); $formulaire->addElement('hidden', 'action', 'envoyer_convocation'); $formulaire->addElement('header', null, 'Convocation (seulement à ceux qui doivent la recevoir, aucun conférencier)'); $formulaire->addElement('text', 'template', 'Template Mandrill', array('size' => 255)); $formulaire->addElement('header', 'boutons', ''); $formulaire->addElement('submit', 'soumettre', 'Envoyer la convoc Saperlipopette !'); $formulaire->addRule('template', 'Template manquant', 'required'); if ($formulaire->validate()) { $valeurs = $formulaire->exportValues(); $resultat = $forum_inscriptions->envoyerEmailConvocation($valeurs['id_forum'], $valeurs['template']); if ($resultat) { AFUP_Logs::log("Envoi de la convocation pour le {$current['titre']}"); afficherMessage('La convocation a été envoyée', 'index.php?page=forum_inscriptions&action=lister'); } else { AFUP_Logs::log("Echec de l'envoi de la convocation pour le {$current['titre']}");
<?php require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php'; require_once dirname(__FILE__) . '/_config.inc.php'; require_once 'Afup/AFUP_Inscriptions_Forum.php'; $inscriptions = new AFUP_Inscriptions_Forum($bdd); if ($inscriptions->modifierEtatInscription($_GET['cmd'], AFUP_FORUM_ETAT_ANNULE)) { $texte = "Votre paiement a été annulé. Aucun montant n'a été débité."; } else { $texte = "Une erreur est survenue lors de l'annulation de votre inscription.<br />Aucun montant n'a été débité."; } $smarty->assign('texte', $texte); $smarty->display('paybox_annule.html');
<?php require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php'; require_once 'Afup/AFUP_Pays.php'; $pays = new AFUP_Pays($bdd); require_once 'Afup/AFUP_Inscriptions_Forum.php'; $inscriptions = new AFUP_Inscriptions_Forum($bdd); // S'il ne reste plus de place, on ne permet pas l'inscription $nombre_places = 200; // TODO : Mettre cela dans le fichier de configuration /*$nombre_inscrits = $inscriptions->obtenirNombreInscrits(); if ($nombre_inscrits >= $nombre_places) { $smarty->display('inscriptions_completes.html'); die(); }*/ // On créé le formulaire $formulaire =& instancierFormulaire(); $formulaire->setDefaults(array('civilite' => 'M.', 'id_pays_facturation' => 'FR', 'type_inscription' => -1, 'type_reglement' => -1)); $formulaire->addElement('header', null, 'Informations'); $groupe = array(); $groupe[] =& HTML_QuickForm::createElement('radio', 'type_inscription', null, 'Journée fonctionnelle, mercredi 09 novembre 2005 : <strong>100,00 ' . EURO . '</strong>', AFUP_FORUM_PREMIERE_JOURNEE); $groupe[] =& HTML_QuickForm::createElement('radio', 'type_inscription', null, 'Journée technique, jeudi 10 novembre 2005 : <strong>100,00 ' . EURO . '</strong>', AFUP_FORUM_DEUXIEME_JOURNEE); $groupe[] =& HTML_QuickForm::createElement('radio', 'type_inscription', null, 'Deux jours : <strong>150,00 ' . EURO . '</strong>', AFUP_FORUM_2_JOURNEES); $groupe[] =& HTML_QuickForm::createElement('radio', 'type_inscription', null, 'Deux jours (membre AFUP) : <strong>100,00 ' . EURO . '</strong>', AFUP_FORUM_2_JOURNEES_AFUP); $groupe[] =& HTML_QuickForm::createElement('radio', 'type_inscription', null, 'Deux jours (étudiant) : <strong>100,00 ' . EURO . '</strong>', AFUP_FORUM_2_JOURNEES_ETUDIANT); $formulaire->addGroup($groupe, 'groupe_type_inscription', 'Formule', '<br />', false); $groupe = array(); $groupe[] =& HTML_QuickForm::createElement('radio', 'type_reglement', null, 'Carte bancaire', AFUP_FORUM_REGLEMENT_CARTE_BANCAIRE); $groupe[] =& HTML_QuickForm::createElement('radio', 'type_reglement', null, 'Chèque', AFUP_FORUM_REGLEMENT_CHEQUE); $formulaire->addGroup($groupe, 'groupe_type_reglement', 'Règlement', ' ', false); $formulaire->addElement('select', 'civilite', 'Civilité', array('M.' => 'M.', 'Mme' => 'Mme', 'Mlle' => 'Mlle'));
<?php require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php'; require_once 'Afup/AFUP_Inscriptions_Forum.php'; $inscriptions = new AFUP_Inscriptions_Forum($bdd); $inscriptions->modifierEtatInscription($_GET['cmd'], AFUP_FORUM_ETAT_REGLE); $inscriptions->enregistrerInformationsTransaction($_GET['cmd'], $_GET['autorisation'], $_GET['transaction']); $smarty->display('paybox_effectue.html');