<html>
<head>
<style>
.with_event {
background-color:red;
}
.atual {
background-color:green;
}
.calen td {
padding:20px;
}
</style>
<body>
<table class="calen">
<?php
$dias = Array( "20" => 5, "19"=>1, "13"=>2, "25"=> 1);
for ($at = 1; $at <= $days; $at++){
if($at%7 == 1){
echo "</tr>";
echo "<tr>";
}
?>
<td class="calen_td
<?=$at==$atual?
'atual':''?> <?=isset($dias[$at])?
'with_event':''?>" data-dia="
<?=$at?>" data-month="
<?=$mes_atual?>">
<?=$at; ?></td>
<?php
}
?>
</tr>
</table>
</body>
</html>
PGh0bWw+CjxoZWFkPgo8c3R5bGU+Ci53aXRoX2V2ZW50IHsKCWJhY2tncm91bmQtY29sb3I6cmVkOwp9CgouYXR1YWwgewoJYmFja2dyb3VuZC1jb2xvcjpncmVlbjsKfQoKLmNhbGVuIHRkIHsKCXBhZGRpbmc6MjBweDsKfQoKPC9zdHlsZT4KPGJvZHk+Cjx0YWJsZSBjbGFzcz0iY2FsZW4iPgogIDw/cGhwCgkkZGlhcyA9IEFycmF5KCAiMjAiID0+IDUsICIxOSI9PjEsICIxMyI9PjIsICIyNSI9PiAxKTsKICAKICAgICAgICAgICAgJG1lc19hdHVhbCA9IGRhdGUoIm0iKTsKCSRkYXlzID0gZGF0ZSgidCIpOwoJJGF0dWFsID0gZGF0ZSgiZCIpOwoKCWZvciAoJGF0ID0gMTsgJGF0IDw9ICRkYXlzOyAkYXQrKyl7CgkJaWYoJGF0JTcgPT0gMSl7CgkJCWVjaG8gIjwvdHI+IjsKCQkJZWNobyAiPHRyPiI7CgkJfQoJCT8+CgkJPHRkIGNsYXNzPSJjYWxlbl90ZCA8Pz0kYXQ9PSRhdHVhbD8nYXR1YWwnOicnPz4gPD89aXNzZXQoJGRpYXNbJGF0XSk/J3dpdGhfZXZlbnQnOicnPz4iIGRhdGEtZGlhPSI8Pz0kYXQ/PiIgZGF0YS1tb250aD0iPD89JG1lc19hdHVhbD8+Ij48Pz0kYXQ7ID8+PC90ZD4KCQk8P3BocAoJfQoJPz4KPC90cj4KPC90YWJsZT4KPC9ib2R5Pgo8L2h0bWw+