示例#1
0
    $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();
    }
    $smarty->assign('id_forum', $_GET['id_forum']);
    $smarty->assign('forums', $forum->obtenirListe());
    $listeConferenciers = $forum_appel->obtenirListeConferenciers($_GET['id_forum'], $list_champs, $list_ordre, $list_associatif, $list_filtre);
    foreach ($listeConferenciers as &$conferencier) {
        $conferencier['sessions'] = $forum_appel->obtenirListeSessionsPourConferencier($_GET['id_forum'], $conferencier['conferencier_id']);
    }
    $smarty->assign('conferenciers', $listeConferenciers);
    $smarty->assign('nb_conferenciers', $forum_appel->obtenirNbConferenciersDistinct($_GET['id_forum']));
} elseif ($action == 'supprimer') {
    if ($forum_appel->supprimerConferencier($_GET['id'])) {
        AFUP_Logs::log('Suppression du conférencier ' . $_GET['id']);
        afficherMessage('Le conférencier a été supprimé', 'index.php?page=forum_conferenciers&action=lister');
    } else {
        afficherMessage('Une erreur est survenue lors de la suppression du conférencier', 'index.php?page=forum_conferenciers&action=lister', true);
    }
} elseif ($action == 'associer_gravatar') {
    $champs = $forum_appel->obtenirConferencier($_GET['id']);
    $rs = $forum->obtenir($_GET['id_forum']);
    $imageDir = realpath('../../templates/' . $rs['path'] . '/images/intervenants/');
    // Transformation en 90x120 JPG pour simplifier