Пример #1
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', 'preparer', 'envoyer', 'ajouter', 'modifier', 'supprimer', 'remplir', 'exporter', 'listing'));
$tris_valides = array('nom', 'entreprise', 'email', 'telephone', 'presence', 'confirme', 'creation');
$sens_valides = array('asc', 'desc');
$smarty->assign('action', $action);
require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Rendez_Vous.php';
$rendez_vous = new AFUP_Rendez_Vous($bdd);
if ($action == 'lister' || $action == 'listing') {
    if (isset($_GET['id'])) {
        $rendezvous = $rendez_vous->obtenir((int) $_GET['id']);
    } else {
        $rendezvous = $rendez_vous->obtenirProchain();
    }
    if (!isset($rendezvous['id'])) {
        $rendezvous['id'] = 0;
    }
    if (!isset($rendezvous['capacite'])) {
        $rendezvous['capacite'] = 0;
    }
    $list_ordre = 'creation';
    $list_associatif = 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 ($action == "listing") {
Пример #2
0
<?php

require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php';
require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Rendez_Vous.php';
require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Logs.php';
AFUP_Logs::initialiser($bdd, 0);
$rendezvous = new AFUP_Rendez_Vous($bdd);
if (isset($_GET['id'])) {
    $prochain_rendezvous = $rendezvous->obtenir((int) $_GET['id']);
} else {
    $prochain_rendezvous = $rendezvous->obtenirProchain();
}
if (isset($prochain_rendezvous) and is_array($prochain_rendezvous)) {
    if ($prochain_rendezvous['debut'] <= time()) {
        $prochain_rendezvous['est_futur'] = FALSE;
    } else {
        $prochain_rendezvous['est_futur'] = TRUE;
    }
    $prochain_rendezvous['date'] = date("d/m/Y", $prochain_rendezvous['debut']);
    $prochain_rendezvous['debut'] = date("H\\hi", $prochain_rendezvous['debut']);
    $prochain_rendezvous['fin'] = date("H\\hi", $prochain_rendezvous['fin']);
    if (isset($_GET['id'])) {
        $champsSlides = $rendezvous->obtenirSlides((int) $_GET['id']);
        for ($i = 0; $i < sizeof($champsSlides); $i++) {
            $prochain_rendezvous['slides' . $i] = $champsSlides[$i]['fichier'];
            $prochain_rendezvous['urlslides' . $i] = $champsSlides[$i]['url'];
        }
    }
    //	$formulaire->setDefaults($champs);
    $smarty->assign('rendezvous', $prochain_rendezvous);
    if (!$prochain_rendezvous['est_futur']) {
Пример #3
0
<?php

// 0. initialisation (bootstrap) de l'application
require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php';
// 1. chargement des classes nécessaires
require_once 'Afup/AFUP_Rendez_Vous.php';
require_once 'Afup/AFUP_Logs.php';
// 2. récupération et filtrage des données
AFUP_Logs::initialiser($bdd, 0);
$rendezvous = new AFUP_Rendez_Vous($bdd);
if (isset($_GET['id'])) {
    $archive_rendezvous = $rendezvous->obtenirRendezVousPasse((int) $_GET['id']);
} else {
    $archive_rendezvous = $rendezvous->obtenirProchain();
}
if (isset($archive_rendezvous) and is_array($archive_rendezvous)) {
    $archive_rendezvous['date'] = date("d/m/Y", $archive_rendezvous['debut']);
    $archive_rendezvous['debut'] = date("H\\hi", $archive_rendezvous['debut']);
    $archive_rendezvous['fin'] = date("H\\hi", $archive_rendezvous['fin']);
    $smarty->assign('rendezvous', $archive_rendezvous);
    if ($rendezvous->accepteSurListeAttenteUniquement($archive_rendezvous['id'])) {
        $smarty->assign('resultat', 'erreur');
        $smarty->assign('message', 'Attention, les inscriptions sont closes. Votre inscription sera mise sur liste d\'attente. Si des places se lib�rent, vous recevrez un email.');
    }
    if ($rendezvous->estComplet($archive_rendezvous['id'])) {
        $smarty->display('rendezvous-complet.html');
        die;
    }
    $formulaire =& instancierFormulaire();
    $formulaire->addElement('hidden', 'id_rendezvous', $archive_rendezvous['id']);
    $formulaire->addElement('hidden', 'id', 0);
Пример #4
0
<?php

// 0. initialisation (bootstrap) de l'application
require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php';
// 1. chargement des classes nécessaires
require_once 'Afup/AFUP_Rendez_Vous.php';
require_once 'Afup/AFUP_Logs.php';
// 2. récupération et filtrage des données
AFUP_Logs::initialiser($bdd, 0);
$rendezvous = new AFUP_Rendez_Vous($bdd);
$rendezvous->obtenirInscritAConfirmer($_GET['hash']);
if (isset($_GET['hash']) and $champs = $rendezvous->obtenirInscritAConfirmer($_GET['hash'])) {
    if (isset($champs['id_rendezvous']) and is_numeric($champs['id_rendezvous'])) {
        $prochain_rendezvous = $rendezvous->obtenirRendezVousFutur($champs['id_rendezvous']);
    }
}
if (!isset($prochain_rendezvous)) {
    $prochain_rendezvous = $rendezvous->obtenirProchain();
}
if (is_array($prochain_rendezvous)) {
    $prochain_rendezvous['date'] = date("d/m/Y", $prochain_rendezvous['debut']);
    $prochain_rendezvous['debut'] = date("H\\hi", $prochain_rendezvous['debut']);
    $prochain_rendezvous['fin'] = date("H\\hi", $prochain_rendezvous['fin']);
    $smarty->assign('rendezvous', $prochain_rendezvous);
    if (isset($champs) and is_array($champs)) {
        $formulaire =& instancierFormulaire();
        $formulaire->setDefaults($champs);
        $formulaire->addElement('hidden', 'id', $champs['id']);
        $formulaire->addElement('hidden', 'id_rendezvous', $champs['id_rendezvous']);
        $formulaire->addElement('hidden', 'presence', $champs['presence']);
        $formulaire->addElement('header', '', 'Inscription');
Пример #5
0
<?php

require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php';
require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Rendez_Vous.php';
require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Logs.php';
AFUP_Logs::initialiser($bdd, 0);
$rendezvous = new AFUP_Rendez_Vous($bdd);
$lister_rendezvous = $rendezvous->obtenirListe();
if (isset($lister_rendezvous) and is_array($lister_rendezvous)) {
    foreach ($lister_rendezvous as &$rendezvous) {
        $rendezvous['est_futur'] = $rendezvous['debut'] <= time() ? FALSE : TRUE;
        $rendezvous['date'] = date("d/m/Y", $rendezvous['debut']);
        $rendezvous['debut'] = date("H\\hi", $rendezvous['debut']);
        $rendezvous['fin'] = date("H\\hi", $rendezvous['fin']);
    }
    $smarty->assign('listerendezvous', $lister_rendezvous);
    $smarty->display('archives-rendezvous.html');
} else {
    $smarty->display('pas-de-rendezvous.html');
}