Location: PHPKode > projects > Buzzword > buzzword-0.8.12/blog/archive.php
<?php

/*
 * buzzword
 * Copyright (c) 2003 Jon Tai
 *
 * $Id: archive.php 334 2004-04-18 01:35:29Z jon $
 *
 * This file is part of buzzword.
 *
 * buzzword is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * buzzword is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with buzzword; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

require_once './config.inc';

$date = import_blog_entry_date();
$start = mktime(0, 0, 0, date('m', $date), 1, date('Y', $date));
$end = mktime(0, 0, 0, date('m', $date) + 1, 1, date('Y', $date));

$BUZZWORD_BREADCRUMBS[] = "<a href=\"archive.php?d=$start\">".strtolower(date('F Y', $start))."</a>";
include_once '../includes/header.inc';

?>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td id="content">
<?php

$entries = get_blog_entries_by_date($start, $end);
foreach ($entries as $entry) {

?>
<h1><?php echo $entry->get_display_date_created(); ?></h1>
<div class="content-container">
<h2><a href="entry.php?e=<?php echo $entry->entry_key; ?>"><?php echo $entry->get_display_title(); ?></a></h2>
<?php echo $entry->get_display_short_body(); ?>
</div>
<?php

}

?>
</td>
<td id="sidebar">
<h1>this month</h1>
<div class="sidebar-container">
<p>
<?php

echo str_plural(count($entries), 'entry', 'entries')." this month<br>\n";

?>
</p>
</div>
<h1>archives</h1>
<div class="sidebar-container">
<p>
<?php

echo get_sidebar_blog_months();

?>
</p>
</div>
<?php if (defined('ADMIN_LOGGED_IN')) { ?>
<h1>administration</h1>
<div class="sidebar-container">
<p>
<a href="newentry.php">new entry</a><br>
<a href="../admin/preferences.php">preferences</a><br>
<a href="../admin/index.php?admin-logout=1">log out</a><br>
</p>
</div>
<?php } ?>
</td>
</tr>
</table>
<?php

include_once '../includes/footer.inc';

?>
Return current item: Buzzword