Ejemplo n.º 1
0
function news_is_recent($id)
{
    $recent = news_recent();
    if (in_array($id, $recent)) {
        return true;
    }
    if (!count($recent)) {
        return true;
    }
    return false;
}
Ejemplo n.º 2
0
|                  http://www.stylemotion.de                    |
|                                                               |
|---------------------------------------------------------------|
| THIS SOFTWARE IS NOT FREE! MAKE SURE YOU OWN A VALID LICENSE! |
| DO NOT REMOVE ANY COPYRIGHTS WITHOUT PERMISSION!              |
| SOFTWARE BELONGS TO ITS AUTHORS!                              |
\***************************************************************/
define('APXRUN', true);
////////////////////////////////////////////////////////////////////////////////////////////////////////
require 'lib/_start.php';
//////////////////////////////////////////////////////////// SYSTEMSTART ///
////////////////////////////////////////////////////////////////////////////////////////////////////////
require_once BASEDIR . getmodulepath('news') . 'functions.php';
$apx->module('news');
$apx->lang->drop('news');
$recent = news_recent();
$_REQUEST['id'] = (int) $_REQUEST['id'];
$_REQUEST['catid'] = (int) $_REQUEST['catid'];
//////////////////////////////////////////////////////////////////////////////////////////////////////// NUR KOMMENTARE
if ($_REQUEST['id'] && $_REQUEST['comments']) {
    $res = $db->first("SELECT id,title,starttime FROM " . PRE . "_news WHERE ( " . time() . " BETWEEN starttime AND endtime AND id='" . $_REQUEST['id'] . "' " . section_filter() . " ) LIMIT 1");
    //Headline + Titlebar
    if (news_is_recent($res['id'])) {
        headline($apx->lang->get('HEADLINE'), mklink('news.php', 'news.html'));
        titlebar($apx->lang->get('HEADLINE') . ': ' . $res['title']);
    } else {
        headline($apx->lang->get('HEADLINE_ARCHIVE'), mklink('newsarchive.php', 'newsarchive.html'));
        headline(getcalmonth(date('m', $res['starttime'] - TIMEDIFF)) . ' ' . date('Y', $res['starttime'] - TIMEDIFF), mklink('newsarchive.php?month=' . date('m', $res['starttime'] - TIMEDIFF) . date('Y', $res['starttime'] - TIMEDIFF), 'newsarchive,' . date('m', $res['starttime'] - TIMEDIFF) . ',' . date('Y', $res['starttime'] - TIMEDIFF) . ',1.html'));
        titlebar($apx->lang->get('HEADLINE_ARCHIVE') . ': ' . $res['title']);
    }
    news_showcomments($_REQUEST['id']);