Código fuente de 'Calendario del mes 2.php'
<html>
<head>
<title>Calendario del mes 2</title>
</head>
<body style="font-family: Arial; font-size: 9pt">
<center><b><font face="Arial" size="3">Calendario del mes 2</font></b><br><br><br>
<?php /*********************************************************************
By Morgan Andersson 2002.
www.morgande.com
www.3dlr.com
If you use this script then please buy a domain name to support me.
************************************************************************/
define('ADAY', (60*60*24));
$datearray = getdate();
$month = $datearray['mon'];
$year = $datearray['year'];
$start= mktime(0,0,0,$month,1,$year);
$firstdayarray = getdate($start);
$months = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio',
'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'];
$days = ['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'];
?>
<table border=1 cellpadding=1 bordercolor="000000" cellspacing="0">
<tr>
<td colspan="7" bordercolor="ffffff">
<div align="center"><font color="#000066"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<?php echo "$datearray[month] $year"; ?>
</font></b></font></div>
</td>
</tr>
<?php
foreach ($days as $day) {
?>
<td bordercolor="ffffff">
<div align="center"><font color="#000066"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
<?php echo "$day"; ?>
</font></b></font></div>
</td>
<?php
}
for ($count = 0; $count < (6 * 7); $count++) {
$dayarray = getdate($start);
if ((($count) % 7) == 0) {
if ($dayarray['mon'] != $datearray['mon'])
break;
echo "</tr><tr>";
}
if ($count < $firstdayarray['wday'] || $dayarray['mon'] != $month) {
echo "<td bordercolor=ffffff><br></td>";
} else {
if ($dayarray['mday'] == $datearray['mday']) {
?>
<td bgcolor="#FFCC99" bordercolor="#FFCC99">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
<?php echo "$dayarray[mday]"; ?>
</font></div>
</td>
<?php
$start += ADAY;
} else {
?>
<td bordercolor="ffffff">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
<?php echo "$dayarray[mday]"; ?>
</font></div>
</td>
<?php
$start += ADAY;
}
}
}
?>
</tr>
</table>
</center>
</body>
</html>