array( "value" => "01", "title" => "Sausis" ), 1 => array( "value" => "02", "title" => "Vasaris" ), 2 => array( "value" => "03", "title" => "Kovas" ), 3 => array( "value" => "04", "title" => "Balandis" ), 4 => array( "value" => "05", "title" => "Gegužė" ), 5 => array( "value" => "06", "title" => "Birželis" ), 6 => array( "value" => "07", "title" => "Liepa" ), 7 => array( "value" => "08", "title" => "Rugpjūtis" ), 8 => array( "value" => "09", "title" => "Rugsėjis" ), 9 => array( "value" => "10", "title" => "Spalis" ), 10 => array( "value" => "11", "title" => "Lapkritis" ), 11 => array( "value" => "12", "title" => "Gruodis" ), ); $months_gen['en'] = array( 0 => array( "value" => "01", "title" => "January" ), 1 => array( "value" => "02", "title" => "February" ), 2 => array( "value" => "03", "title" => "March" ), 3 => array( "value" => "04", "title" => "April" ), 4 => array( "value" => "05", "title" => "May" ), 5 => array( "value" => "06", "title" => "June" ), 6 => array( "value" => "07", "title" => "July" ), 7 => array( "value" => "08", "title" => "August" ), 8 => array( "value" => "09", "title" => "September" ), 9 => array( "value" => "10", "title" => "October" ), 10 => array( "value" => "11", "title" => "November" ), 11 => array( "value" => "12", "title" => "December" ), ); $months_m = array( "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" ); $months = $months_gen[$ln]; $week_days_gen['lt'] = array( "P", "A", "T", "K", "P", "Š", "S" ); $week_days_gen['en'] = array( "M", "T", "W", "Th", "F", "S", "S" ); $week_days = $week_days_gen[$ln]; if (!$selected_month || !in_array($selected_month, $months_m)) $selected_month = date("m"); ?>
$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&capital=20"; // 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 = "#FF0000"; } 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"; } ?>