$item): ?>
'; $weekday = $date_info['wday']; //savaites diena $weekday = $weekday - 1; //lietuviu pradedam skaiciuoti nuo pirmadienio ne nuo sekmadienio $day = 1; //pirmoji men diena $this_month = date('m'); $this_day = date('d'); $this_year = date( "Y" ); if ($weekday == -1) $weekday = 6; //tuscios vietos if($weekday > 0) $calendar .= " "; while ($day <= $maxdays) { //pradedam nauja savaite if($weekday == 7) { $calendar .= "\n"; $weekday = 0; } $linkDate = mktime (0,0,0, $month, $day, $year); ####################################################### // start keisti pagal miesta $link ="http://www.eb.lt/$ln.$PHP_EXTENSION?vid=75&date=$linkDate&city=Vilkavi%F0kis"; // end keisti pagal miesta ####################################################### $bgcolor = "#ffffff"; if ($month == $this_month) { if ($day == $this_day) { $diena = ""; if ($year == $this_year) $diena.= ""; $diena.= $day; if ($year == $this_year) $diena.= ""; $diena.= ""; if ($year == $this_year) $bgcolor = "#ffffff"; } elseif($day > $this_day) { $diena = ""; $diena.= $day; $diena.= ""; } else { $diena = $day; if ($year == $this_year+1) $diena = "".$diena.""; } } else { if ($month < $this_month && $year == $this_year) $diena = ""; else $diena = ""; $diena.= $day; if ($month < $this_month && $year == $this_year) $diena.= ""; else $diena.= ""; } $calendar .= "$diena\n"; $day++; $weekday++; } if($weekday != 7) $calendar .= ' '; return $calendar . "\n"; } ?>