Événements (old)
-
$now=(time()-21600);
setlocale(LC_TIME, "fr_FR");
$getevents=mysql_query("SELECT * FROM events WHERE event_debut > $now ORDER BY event_debut ASC”);
- $d // “.stripslashes($g[“event_nom”]).”$del
while($g=mysql_fetch_assoc($getevents)){
$d=strftime(“%e.%m.%Y”,$g[“event_debut”]);
if($g[“event_fin”]>0){$d=strftime(“%e.%m.%Y”,$g[“event_debut”]).” au “.strftime(“%e.%m.%Y”,$g[“event_fin”]);
}
if($_GET[“mode”]==”admin”){$del=”“;}else{$del=””;}
echo “
“;}
?>
$d=date("Y");
for($i=$d;$i>1984;$i–){
$s=mktime(0,0,1,1,1,$i);
$e=mktime(0,0,1,12,31,$i);
$query=mysql_query(“SELECT * FROM events WHERE (event_debut BETWEEN ‘$s’ AND ‘$e’)”)or die(mysql_error());
$count=mysql_num_rows($query);
if(!isset($_GET[“q”])){
if($i==$d){
$sele=” selected”;
$year=$d;
}else{
$sele=””;
}
}else{
if($i==$_GET[“q”]){
$year=$_GET[“q”];
$sele=” selected”;
}else{
$sele=””;
}
$s=mktime(0,0,1,1,1,$i);
$e=mktime(0,0,1,12,31,$i);
$query=mysql_query(“SELECT * FROM events WHERE (event_debut BETWEEN ‘$s’ AND ‘$e’)”)or die(mysql_error());
$count=mysql_num_rows($query);
if(!isset($_GET[“q”])){
if($i==$d){
$sele=” selected”;
$year=$d;
}else{
$sele=””;
}
}else{
if($i==$_GET[“q”]){
$year=$_GET[“q”];
$sele=” selected”;
}else{
$sele=””;
}
}
if(isset($_GET[“mode”])){$adm=”&mode=admin”;}else{$adm=””;}
if($count>0){$sel.=”“;}
}
?>
Historique de l’année echo $year;?>
-
$now=time();
setlocale(LC_TIME, "fr_FR");
if(isset($_GET["q"])){
$s=mktime(0,0,1,1,1,$_GET["q"]);
$e=mktime(0,0,1,12,31,$_GET["q"]);
}else{
$s=mktime(0,0,1,1,1,date("Y"));
$e=mktime(0,0,1,12,31,date("Y"));
}
$getevents=mysql_query("SELECT * FROM events WHERE event_debut < $now AND event_debut BETWEEN '$s' AND '$e' ORDER BY event_debut DESC");
while($g=mysql_fetch_assoc($getevents)){
$d=strftime("%e.%m.%Y à %Hh%M",$g["event_debut"]);
if($g["event_fin"]>0){$d=strftime(“%e.%m.%Y”,$g[“event_debut”]).” au “.strftime(“%e.%m.%Y”,$g[“event_fin”]); }
- $d // “.stripslashes($g[“event_nom”]).”$del
if($_GET[“mode”]==”admin”){$del=”“;}else{$del=””;}
echo “
“;}
?>