// předchozí měsíc
if(MkTime(0,0,0,$month,0,$year) > MkTime(0,0,0, Date("m"), 0, Date("Y"))):
$month_pred=$month-1;
if ($month_pred==0) {$month_pred=12;}
if ($month==1) $year_pred=$year-1;
else
$year_pred=$year;
if ($month_pred<10) $month_pred = '0'.$month_pred;
else $month_pred = $month_pred;
echo '';
echo '<';
echo '';
endif;
// tento měsíc
$mesic = Array("Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec","Srpen","Září","Říjen","Listopad","Prosinec");
$mesic2=$mesic[(int)$month-1];
echo ' | ';
echo $mesic2;
echo ' | ';
// následující měsíc
if(MkTime(0,0,0,$month,0,$year) == MkTime(0,0,0, Date("m"), 0, Date("Y"))):
$month_po=$month+1;
if ($month_po==13) $month_po=1;
if ($month==12)
$year_po=$year+1;
else
$year_po=$year;
if ($month_po<10) $month_po = '0'.$month_po;
else $month_po = $month_po;
echo '';
echo '>';
echo '';
endif;
?>
|
';
for($i=1;$i<=7;$i++):
echo '';
$day = $x*7+$i-$first+1; // na základě obou cyklů postupně počítá den
$date_string = $year.'-'.$month.'-'.$day;
// porovnavani
// if ($month<10) $month_compare = '0'.$month;
// else $month_compare = $month;
$month_compare = $month;
if ($day<10) $day_compare = '0'.$day;
else $day_compare = $day;
$date_string_compare = $year.'-'.$month_compare.'-'.$day_compare ;
if($date[$day] == $i)
// UREDNI HODINY JEN V
if ((in_array($i,$allowed))&&(MkTime(0,0,0,$month,$day,$year) > MkTime(0,0,0, Date("m"), Date("d"), Date("Y")))&&(!in_array($date_string_compare,$restricted))):
echo '';
echo $day;
echo '';
else:
echo $day;
endif;
else
echo " ";
echo ' | ';
endfor;
echo '
';
if(!CheckDate($month, $day+1, $year)) break; // pokud neexistuje následující datum, ukončí cyklus
endfor;
?>
Odběr novinek