db_Select_gen("SELECT news_id, news_datestamp from #news ORDER BY news_datestamp LIMIT 0,1"); $first_post = $bcSql->db_Fetch(); $start_year = date("Y", $first_post['news_datestamp']); $end_year = $cur_year; // ---------------------- // build the yearselector // ---------------------- $year_selector = "
"; $year_selector .= "".BLOGCAL_ARCHIV1.": \n
"; // -------------------------- // create the archive display // -------------------------- $newline = 0; $archive = "
"; $archive .= ""; for($i = 1; $i <= 12; $i++) { if (++$newline == $months_per_row+1) { $archive .= ""; $newline = 1; } $archive .= "\n"; } $archive .= "
{$year_selector}
"; $archive .= "
"; // href the current month regardless of newsposts or any month with news if (($req_year == $cur_year && $i == $cur_month) || $day_links[$i]) { $archive .= "".$marray[$i-1].""; } else { $archive .= $marray[$i-1]; } $archive .= "
"; if (($req_year == $cur_year) && ($i == $cur_month)) { $req_day = $cur_day; } else { $req_day = ""; } $archive .= "
".calendar($req_day, $i, $req_year, $day_links[$i], $pref['blogcal_ws'])."
"; $ns->tablerender(BLOGCAL_L2 ." $req_year", $archive); require_once(FOOTERF); ?>