AVVISI ATTUALI |
// EDIT ANY OF THE VARIABLES BELOW TO MEET YOUR NEEDS
// [See readme.htm for complete instructions]
//////////////////////////////////////////
//////////BEGIN CALENDAR CODE ////////////
//////////////////////////////////////////
// CALENDAR MARKING STYLE
if (!$calstyle) $calstyle = "1";
// CELL BACKGROUND COLORS
// Edit these colors to suit your needs
$nbc="EEEEEE"; // NORMAL BACKGROUND COLOR
$abc="E9B4A1"; // MARKED BACKGROUND COLOR
$tbc="FF99FF"; // TODAY'S BACKGROUND COLOR
// DAY NAMES
// Edit the calendar day name column headers below
$day[0]="Dom";
$day[1]="Lun";
$day[2]="Mar";
$day[3]="Mer";
$day[4]="Gio";
$day[5]="Ven";
$day[6]="Sab";
// MONTH NAMES
// Edit the calendar month names below
$mth[1]="Gennaio";
$mth[2]="Febbraio";
$mth[3]="Marzo";
$mth[4]="Aprile";
$mth[5]="Maggio";
$mth[6]="Giugno";
$mth[7]="Luglio";
$mth[8]="Agosto";
$mth[9]="Settembre";
$mth[10]="Ottobre";
$mth[11]="Novembre";
$mth[12]="Dicembre";
// ON WHAT DAY DOES THE WEEK START?
// 0=Sunday; 1=Monday; 2=Tuesday; 3=Wednesday; 4=Thursday; 5=Friday; 6=Saturday
// This option can be set here or overridden by the command-line option 'daystart='
if (!$daystart) $daystart=1;
// PRINT YEAR?
// Changing 0 to 1 will not display the year number after the month name
// This option can be set here or overridden by the command-line option 'ny='
if (!$ny) $ny=0;
// MARK TODAY?
// Changing 0 to 1 will not mark today's date
// This option can be set here or overridden by the command-line option 'nt='
if (!$nt) $nt=0;
// HOURS TO OFFSET TIME +/-
// To add hours, enter a positive value. To substract hours, enter a "-" negative value
// This option can be set here or overridden by the command-line option 'ctime='
if (!$ctime) $ctime = "-0";
// CALENDAR WIDTH AND HEIGHT
// Set $tw to the width of the calendar table
// Set $ch to the height of the table cells for dates
// These options can be set here or overridden by the command-line options 'tw=' and 'ch='
if (!$tw) $tw="175"; // Table Width
if (!$ch) $ch="0"; // Cell Height
// DATE NUMBER ALIGNMENT
// Set $algn to 0 [defult] to align the dates to the middle and center of table cells.
// Set $algn to 1 to align the dates to the upper-right corner of table cells.
// This option can be set here or overridden by the command-line option 'algn='
if (!$algn) $algn="0";
// FONT SIZES AND WEIGHT
// These options can be set in the script or overridden by command-line options of
// the same named variables. The sizes are in pixels.
if (!$fsm) $fsm="18"; // FONT SIZE MONTH
if (!$fsd) $fsd="12"; // FONT SIZE DAY NAMES
if (!$fsn) $fsn="11"; // FONT SIZE NUMBERS
if (!$fwm) $fwm="bold"; else $fwm="normal"; // FONT WEIGHT MONTH
if (!$fwd) $fwd="normal"; else $fwd="bold"; // FONT WEIGHT DAY NAMES
if (!$fwn) $fwn="normal"; else $fwn="bold"; // FONT WEIGHT NUMBERS
// ONLY EDIT THE STYLE SHEET BELOW IF YOU WANT TO CHANGE THE FONT FACE AND/OR COLOR
?>
////////////////////////////////////////
///// DO NOT EDIT BELOW THIS POINT /////
////////////////////////////////////////
// CALCULATE COLUMN WIDTHS
$cw=$tw/7;
// DETERMINE AND SET DATE NUMBER CELL ALIGNMENT
if ($algn==0) $algn="align='center' valign='middle'";
else $algn="align='right' valign='top'";
// DETERMINE TODAYS DAY NUMBER
$ctime = $ctime*3600;
$tmo = date("m", time()+$ctime);
$tda = date("j", time()+$ctime);
$tyr = date("Y", time()+$ctime);
$tnum = (intval((date ("U", mktime(20,0,0,$tmo,$tda,$tyr))/86400)))-$daystart; // TODAY'S DAY NUMBER
// CHECK FOR COMMAND LINE DATE VARIABLES
if (!$mo) $mo=$tmo;
if (!$yr) $yr=$tyr;
$daycount = (intval((date ("U", mktime(20,0,0,$mo,1,$yr))/86400)))-$daystart; // FIRST OF MONTH DAY NUMBER
$mo=intval($mo);
$mn = $mth[$mo]; // SET MONTH NAME
if ($ny!=1) {$mn = $mn." ".$yr;} // ADD YEAR TO MONTH NAME?
// ON WHAT DAY DOES THE FIRST FALL
$sd = date ("w", mktime(0,0,0,$mo,1-$daystart,$yr));
$cd = 1-$sd;
// NUMBER OF DAYS IN MONTH
$nd = mktime (0,0,0,$mo+1,0,$yr);
$nd = (strftime ("%d",$nd))+1;
////////////////////////////////////////
// PROCESS DAY MARKING /////////////////
////////////////////////////////////////
if ($mrks) {
$mrks = explode ("x",$mrks);
$smc = count ($mrks);
$mrke = explode ("x",$mrke);
$emc = count ($mrke);
if ($smc==1) {
$mrks[1]="3000-01-01";
$mrke[1]="3000-01-01";
}
}
$i=0;
while ($i < $smc) {
$mrks[$i] = ereg_replace('-','/', $mrks[$i]);
$mrke[$i] = ereg_replace('-','/', $mrke[$i]);
$start = intval(strtotime ($mrks[$i])/86400)+1;
$end = intval(strtotime ($mrke[$i])/86400)+1;
if (!$mrke[$i]) $end=$start; // MARK SINGLE DAY WITH ONLY MRKS VARIABLE
if (!$bgc[$start]) {$bgc[$start]=1;} else {$bgc[$start]=4;}
$bgc[$end]=3;
for ($n = ($start+1); $n < $end; $n++) {
$bgc[$n] = 2;}
$i++;
}
////////////////////////////////////////////
// DISPLAY CALENDAR ////////////////////////
////////////////////////////////////////////
?>
|