1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
|
<?php
if ($texte)
{
echo "<p>$texte</p>";
}
while($ligne=mysql_fetch_array($result))
{
$id=$ligne["id"];
$date_debut=$ligne["date_debut"];
$date_fin=$ligne["date_fin"];
$heure_debut=$ligne["heure_debut"];
$heure_fin=$ligne["heure_fin"];
$nom=$ligne["nom"];
$nom=$ligne["nom"];
$description=$ligne["description"];
$categorie=$ligne["categorie"];
$lieu=$ligne["lieu"];
$contact=$ligne["contact"];
$adresse=$ligne["adresse"];
$email=$ligne["email"];
$telephone=$ligne["telephone"];
$fax=$ligne["fax"];
$lien=$ligne["lien"];
$url=$ligne["url"];
$google=$ligne["google"];
$google1=$ligne["google1"];
$nom=stripslashes($nom);
$description=stripslashes($description);
$lieu=stripslashes($lieu);
$contact=stripslashes($contact);
$adresse=stripslashes($adresse);
$lien=stripslashes($lien);
$nom=convert_html($nom);
$description=convert_html($description);
$lieu=convert_html($lieu);
$contact=convert_html($contact);
$adresse=convert_html($adresse);
$lien=convert_html($lien);
$date_debut=formaterDate($date_debut);
$date_fin=formaterDate($date_fin);
$heure_debut=formaterHeure($heure_debut);
$heure_fin=formaterHeure($heure_fin);
$categorie=getCategorie($categorie);
echo "<div class=\"event\">\n";
if ($date_fin == $date_debut)
{
echo "<p>Le <b>$date_debut</b>";
if ($heure_debut != "00:00" AND $heure_fin != "00:00") echo " de <b>$heure_debut</b> à <b>$heure_fin</b>";
elseif ($heure_debut != "00:00") echo " à <b>$heure_debut</b>";
elseif ($heure_fin != "00:00") echo " jusqu'à <b>$heure_fin</b>";
}
else
{
echo "<p>Du <b>$date_debut</b>";
if ($heure_debut != "00:00") echo " à <b>$heure_debut</b>";
echo " au <b>$date_fin</b>";
if ($heure_fin != "00:00") echo " à <b>$heure_fin</b>";
}
echo "<br>\n";
if ($reduit)
{
echo "<b>$categorie : <a href=\"javascript:showEvent($id)\">$nom</a></b></p>\n";
}
else
{
echo "<b>$categorie : $nom</b></p>\n";
}
if ($reduit)
{
echo "<div id=\"event_$id\" style=\"display:none\">\n";
}
if ($description AND $editeur_html)
{
echo "<div>$description</div>\n";
}
elseif ($description AND !$editeur_html)
{
$description=nl2br($description);
echo "<p>$description</p>\n";
}
echo "<p>";
if ($lieu)
{
echo "<b>Lieu :</b> $lieu";
}
if ($lieu AND $contact)
{
echo "<br>";
}
if ($contact)
{
echo "<b>Contact :</b> $contact ";
}
if ($contact AND $email)
{
echo " - <a href=\"mailto:$email\">$email</a> ";
}
elseif ($email)
{
echo "<br><b>Contact :</b> <a href=\"mailto:$email\">$email</a>";
}
if ($adresse)
{
echo "<br>$adresse ";
}
if ($telephone)
{
echo "<br><b>Tél</b> : $telephone ";
}
if ($telephone AND $fax)
{
echo "- <b>Fax</b> : $fax ";
}
elseif ($fax)
{
echo "<br><b>Fax</b> : $fax ";
}
if ($url AND $lien)
{
echo "<br><b>En savoir plus :</b> <a href=\"$url\" target=\"_blank\">$lien</a>";
}
echo "</p>\n";
if ($adresse)
{
require('../GoogleMapAPI.class.php');
// set custom map id and app id
$map = new GoogleMapAPI('map');
// enter YOUR Google Map Key
$map->setAPIKey('abcdef');
// create some map markers
$map->addMarkerByAddress($adresse,'','');
$map->printHeaderJS();
$map->printMapJS();
echo ' <body onload="onLoad()">';
$map->printMap();
$map->printSidebar();
echo ' </body>';
}
if ($reduit)
{
echo "</div>\n";
}
echo "</div>\n";
}
?> |
Partager