示例#1
0
<?php

// Cette page attend deux paramètres :
// - session_id : identifiant de la conférence
// - conferencier_id : identifiant du conférencier
require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php';
require_once dirname(__FILE__) . '/_config.inc.php';
require_once 'Afup/AFUP_AppelConferencier.php';
$conferences_manager = new AFUP_AppelConferencier($bdd);
$session = $conferences_manager->obtenirSession($_GET['session_id'], '*');
$conferencier = $conferences_manager->obtenirConferencier($_GET['conferencier_id'], '*');
$planning = $conferences_manager->obtenirPlanningDeSession($_GET['session_id']);
$date_horaire_array = getdate($planning['debut']);
$date_horaire = $date_horaire_array['mday'] . '/' . $date_horaire_array['mon'] . ' à ' . $date_horaire_array['hours'] . ':' . str_pad($date_horaire_array['minutes'], 2, '0', STR_PAD_LEFT);
if (empty($session) || empty($conferencier)) {
    header('Location: /pages/forumphp' . $config_forum['annee'] . '/index.php');
}
// var_dump($conferencier) ; var_dump($session) ; var_dump($date_horaire_array) ;
$smarty->assign('conferencier', $conferencier);
$smarty->assign('session', $session);
$smarty->assign('date_horaire', $date_horaire);
$smarty->display('rappel_conferenciers.html');
示例#2
0
    $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
    $img = @imagecreatefromjpeg(AFUP_Utils::get_gravatar($champs['email'], 90));
    if (gettype($img) != 'resource') {
        $img = imagecreatefrompng(AFUP_Utils::get_gravatar($champs['email'], 90));
    }
    $width = imagesx($img);
    $height = imagesy($img);
    /*if ($width != 90 || $height != 120) {
          $oldImg = $img;
          $img = imagecreatetruecolor(90, 120);
          imagecopyresampled($img, $oldImg, 0, 0, 0, 0, 90, 120, $width, $height);
      }*/
    imagejpeg($img, $imageDir . '/' . $_GET['id'] . '.jpg', 90);