|
echo "$month_name $year";?> |
|
|
for ($i=0;$i<7;$i++) { ?>
echo "$day_name[$i]"; ?> |
} ?>
// DATA Q VEM ANTES ---------------------------------------------
if (date("w",mktime(0,0,0,$month,1,$year))==0) {
$start=7;
} else {
$start=date ("w",mktime(0,0,0,$month,1,$year));
}
for($a=($start-2);$a>=0;$a--)
{
$d=date("t",mktime(0,0,0,$month,0,$year))-$a;
?>
=$d?> |
}
// DATAS ATUAIS ---------------------------------------------
for($d=1;$d<=date("t",mktime(0,0,0,($month+1),0,$year));$d++)
{
global $linha;
if($month==date("m") && $year==date("Y") && $d==date("d")) {
$bg="bgcolor=\"#B0CCE4\"";
$linkando="";
$fimlink="";
} else {
$bg="bgcolor=\"#d4e3f1\"";
$linkando="";
$fimlink="";
}
for ($i=0;$i<$linha;$i++){
global $month,$year,$d;
$dia_sql=mysql_result($result,$i,'dia');
$mes_sql=mysql_result($result,$i,'mes');
$ano_sql=mysql_result($result,$i,'ano');
$id_sql=mysql_result($result,$i,'id');
$ano = ltrim(rtrim($ano_sql));
$mes = ltrim(rtrim($mes_sql));
$dia = ltrim(rtrim($dia_sql));
$id_cod = ltrim(rtrim($id_sql));
if($d==$dia&$year==$ano&$month==$mes) {
$bg="bgcolor=#ffa800";
$linkando="";
$fimlink="";
}
}
?>
>
echo $linkando; ?>
echo $d; ?>
echo $fimlink; ?>
|
// DATA Q VEM DEPOIS ---------------------------------------------
if(date("w",mktime(0,0,0,$month,$d,$year))==0&date("t",mktime(0,0,0,($month+1),0,$year))>$d)
{
?>
}}
$da=$d+1;
if(date("w",mktime(0,0,0,$month+1,1,$year))<>1)
{
$d=1;
while(date("w",mktime(0,0,0,($month+1),$d,$year))<>1)
{
?>
=$d?> |
$d++;
}
}
?>
|