month, 1, $this -> year ); $daysInMonth = date( "t", $date ); $offset = date( "w", $date ) - 1; if ( $offset < 0 ) $offset = 6; $rows = 1; $prev_month = $this -> month - 1; $prev_year = $this -> year; if ( $this -> month == 1 ) { $prev_month = 12; $prev_year = $this -> year - 1; } $next_month = $this -> month + 1; $next_year = $this -> year; if ( $this -> month == 12 ) { $next_month = 1; $next_year = $this -> year + 1; } ?> if ( !$this -> ajax ):?>
| Pn | Wt | Śr | Cz | Pt | Sb | Nd |
|---|---|---|---|---|---|---|
| endfor;?> for ( $day = 1; $day <= $daysInMonth; $day++ ) { if ( ( $day + $offset - 1 ) % 7 == 0 && $day != 1 ) { echo " | ||||||
month . '-' . $this -> year ) ) == 6 )
echo 'sb ';
if ( date( 'w', strtotime( $day . '-' . $this -> month . '-' . $this -> year ) ) == 0 )
echo 'nd ';
$class = '';
$out_list = '';
if ( is_array( $this -> articles ) ) foreach ( $this -> articles as $article )
{
$date_tmp = date( 'Y-m-d', strtotime( $day . '-' . $this -> month . '-' . $this -> year ) );
if ( $date_tmp >= $article['date_start'] and $date_tmp <= $article['date_end'] )
{
$class = 'event ';
if ( !$out_list )
$out_list = '
| ";
}
while ( ($day + $offset) <= $rows * 7 )
{
echo ""; $day++; } ?> |