Exemple #1
0
<?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');
Exemple #2
0
<?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']}");
Exemple #3
0
<?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;
Exemple #4
0
<?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']} &lt;{$registration['email']}&gt;
HTML;
            $mail->sendSimpleMessage("Impossible d'envoyer la confirmation", $message, array(array('name' => 'Trésorier AFUP', 'email' => '*****@*****.**'), array('name' => 'Communication AFUP', 'email' => '*****@*****.**')));
        }
    }
Exemple #5
0
<?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);
Exemple #6
0
<?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', 'telecharger_devis', 'telecharger_facture', 'envoyer_facture', 'envoyer_tout', 'facturer_facture', 'supprimer_facture', 'changer_date_reglement'));
$tris_valides = array('date_facture', 'email', 'societe', 'etat');
$sens_valides = array('asc', 'desc');
$smarty->assign('action', $action);
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_facturation = new AFUP_Facturation_Forum($bdd);
if ($action == 'lister') {
    // Valeurs par défaut des paramètres de tri
    $list_champs = 'reference, date_facture, montant, email, societe, etat, facturation, date_reglement, nom, prenom';
    $list_ordre = 'date_facture DESC';
    $list_associatif = false;
    $list_filtre = false;
    // Modification des paramètres de tri en fonction des demandes passées en GET
    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['filtre'])) {
        $list_filtre = $_GET['filtre'];
    }
    if (!isset($_GET['id_forum']) || intval($_GET['id_forum']) == 0) {
        $_GET['id_forum'] = $forum->obtenirDernier();
    }
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;
    $valeurs['etat'] = 5;