예제 #1
0
<?php

//On vérifie si la connexion est établie.
if (!isset($_SESSION['compte']['id_participant'])) {
    //Renvoi vers la page d'accueil.
    header("location:./index.php");
}
//Création du code pour le cadre "agenda".
require_once './modules/agenda/agenda_classes.php';
$agenda = new agenda_classes();
$id = $_SESSION['compte']['id_participant'];
//Création du lien vers l'agenda du participant.
$code = $agenda->agenda_participant($id, $dbh);
$url_agenda = $SITE_nom_site . "/modules/agenda/ics.php?code=" . $code;
$text_url_agenda = str_replace("%url_agenda%", $url_agenda, $LANG_synchronisation_agenda);
//Création de la liste des événements.
$liste_evenement = $agenda->a_venir($id, $dbh);
if ($liste_evenement != 0) {
    /* gestion des locales */
    setlocale(LC_TIME, $locale);
    //Variable pour l'agenda.
    $agenda = NULL;
    foreach ($liste_evenement as $row) {
        $date_formate = strftime("%A %d %B %Y", strtotime($row['date_evenement']));
        $agenda .= "<p>" . $date_formate . " " . $row['titre'] . "</p>\n\r";
    }
} else {
    $agenda = $LANG_aucun_evenement;
}
//Création du code pour le cadre "message".
if (empty($message_non_lu)) {
예제 #2
0
파일: index.php 프로젝트: phil6611/wigowiz3
<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require_once '../bdd/connect.php';
require_once './agenda_classes.php';
$agenda = new agenda_classes();
$id = '16';
$liste_evenement = $agenda->a_venir($id, $dbh);
if ($liste_evenement != 0) {
    /* gestion des locales */
    setlocale(LC_TIME, $locale);
    foreach ($liste_evenement as $row) {
        //$evenement_passe =  strftime("%A %d %B");
        $date_formate = strftime("%A %d %B %Y", strtotime($row['date_evenement']));
        echo "<p>" . $date_formate . " " . $row['titre'] . "</p>\n\r";
    }
} else {
    echo $LANG_agenda;
}