48 lines
1.7 KiB
PHP
48 lines
1.7 KiB
PHP
<?php
|
|
@define('PENGUINCODER_BASE', dirname(__FILE__));
|
|
|
|
require PENGUINCODER_BASE . '/lib/base.php';
|
|
|
|
$title = _("Home");
|
|
|
|
global $pdata;
|
|
$entries = $pdata->getNewestJournals();
|
|
$maxJournalId = $pdata->getMaxJournalId();
|
|
$minJournalId = $pdata->getMinJournalId();
|
|
$admin = Auth::isAdmin('penguincoder:admin');
|
|
$adminDelete = Auth::isAdmin('penguincoder:admin', PERMS_DELETE);
|
|
$goodEntry = true;
|
|
|
|
if (is_a($entries, 'PEAR_Error')) {
|
|
$goodEntry = false;
|
|
$notification->push(_("There was a problem getting the Journal: ") .
|
|
$entry->getMessage(), 'horde.error');
|
|
}
|
|
|
|
require PENGUINCODER_TEMPLATES . '/common-header.inc';
|
|
require PENGUINCODER_TEMPLATES . '/menu/menu.inc';
|
|
require PENGUINCODER_TEMPLATES . '/frontpage.inc';
|
|
|
|
if ($goodEntry) {
|
|
$baseUrl = Util::addParameter(Horde::applicationUrl('journal.php'),
|
|
'actionId', 'show');
|
|
$appUrl = Horde::applicationUrl('journal.php');
|
|
foreach ($entries as $entry) {
|
|
$commentcount = $registry->call('forums/numMessages', array(
|
|
$entry['id'], 'penguincoder'));
|
|
if (is_a($commentcount, 'PEAR_Error')) {
|
|
$commentcount = 0;
|
|
}
|
|
include PENGUINCODER_TEMPLATES . '/data/header.inc';
|
|
include PENGUINCODER_TEMPLATES . '/actions/header.inc';
|
|
include PENGUINCODER_TEMPLATES . '/actions/main.inc';
|
|
include PENGUINCODER_TEMPLATES . '/actions/admin.inc';
|
|
include PENGUINCODER_TEMPLATES . '/actions/footer.inc';
|
|
include PENGUINCODER_TEMPLATES . '/data/data.inc';
|
|
include PENGUINCODER_TEMPLATES . '/data/footer.inc';
|
|
}
|
|
}
|
|
|
|
echo '<p> </p>';
|
|
require $registry->get('templates', 'horde') . '/common-footer.inc';
|