|
|
Home
page / Calendar
of Events |
YEAR
echo date('Y'); ?> |
for ($M=1; $M<13; $M++) {
switch ($M) {
case 1: $NOMEMESE="January"; $COLMESE="#FFFF66"; break;
case 2: $NOMEMESE="February"; break;
case 3: $NOMEMESE="March"; break;
case 4: $NOMEMESE="April"; break;
case 5: $NOMEMESE="May"; break;
case 6: $NOMEMESE="Giugno"; break;
case 7: $NOMEMESE="July"; break;
case 8: $NOMEMESE="August"; break;
case 9: $NOMEMESE="September"; break;
case 10: $NOMEMESE="October"; break;
case 11: $NOMEMESE="November"; break;
case 12: $NOMEMESE="Dicember"; break;
}
echo "$NOMEMESE  ";
}
?>
|
switch ($MESE) {
case 1: $NOMEMESE="January"; break;
case 2: $NOMEMESE="February"; break;
case 3: $NOMEMESE="March"; break;
case 4: $NOMEMESE="April"; break;
case 5: $NOMEMESE="May"; break;
case 6: $NOMEMESE="June"; break;
case 7: $NOMEMESE="July"; break;
case 8: $NOMEMESE="August"; break;
case 9: $NOMEMESE="September"; break;
case 10: $NOMEMESE="October"; break;
case 11: $NOMEMESE="November"; break;
case 12: $NOMEMESE="Dicember"; break;
}
echo "".strtoupper($NOMEMESE)." ".date('Y')." - Directory of the official events of the month of ".strtoupper($NOMEMESE)." ".date('Y');
?>
|
$SQL="select * from $CALENDARIO where month(datainizio)=$MESE order by datainizio";
$RisCalendario=mysql_query($SQL,$PVE);
while ($Calendario=mysql_fetch_array($RisCalendario)) {
$DataIni=substr($Calendario[datainizio],0,4).substr($Calendario[datainizio],5,2).substr($Calendario[datainizio],8,2);
$DataIni=strtotime($DataIni);
$DataFin=substr($Calendario[datafine],0,4).substr($Calendario[datafine],5,2).substr($Calendario[datafine],8,2);
$DataFin=strtotime($DataFin);
$GIOSETT=date('w',$DataIni);
switch ($GIOSETT) {
case 0: $GIORNOINI="sunday"; break;
case 1: $GIORNOINI="lunedi'"; break;
case 2: $GIORNOINI="martedi'"; break;
case 3: $GIORNOINI="mercoledi'"; break;
case 4: $GIORNOINI="giovedi'"; break;
case 5: $GIORNOINI="venerdi'"; break;
case 6: $GIORNOINI="sabato"; break;
}
$GIOSETT=date('w',$DataFin);
switch ($GIOSETT) {
case 0: $GIORNOFIN="domenica"; break;
case 1: $GIORNOFIN="lunedi'"; break;
case 2: $GIORNOFIN="martedi'"; break;
case 3: $GIORNOFIN="mercoledi'"; break;
case 4: $GIORNOFIN="giovedi'"; break;
case 5: $GIORNOFIN="venerdi'"; break;
case 6: $GIORNOFIN="sabato"; break;
}
if ($BGCOLOR=="#FFFFCC") { $BGCOLOR="#FFFFFF"; } else { $BGCOLOR="#FFFFCC"; }
echo "";
if ($DataFin<>$DataIni) {
echo "Da ";
}
echo "$GIORNOINI ".date('d',$DataIni);
if ($DataFin<>$DataIni) {
echo " a $GIORNOFIN ".date('d',$DataFin);
}
echo " | ";
$COLLHOT=""; $NOCOLLHOT="";
if ($Calendario[filedes]>"") {
$COLLHOT="";
$NOCOLLHOT="";
}
echo "$Calendario[descrizione]
$COLLHOT$Calendario[titolo]$NOCOLLHOT
ore $Calendario[orainizio] $Calendario[luogo]
";
echo " | ";
}
?>
|
|