Example #1
0
function misc_news_comments()
{
    global $set, $db, $apx, $user;
    $_REQUEST['id'] = (int) $_REQUEST['id'];
    if (!$_REQUEST['id']) {
        die('missing ID!');
    }
    $apx->tmpl->loaddesign('blank');
    news_showcomments($_REQUEST['id']);
}
Example #2
0
$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']);
    require 'lib/_end.php';
}
//////////////////////////////////////////////////////////////////////////////////////////////////////// NEWS DETAIL
if ($_REQUEST['id']) {
    //Verwendete Variablen auslesen
    $parse = $apx->tmpl->used_vars('detail');
    //News ausgeben
    $res = $db->first("SELECT a.*,b.userid,b.username,b.email,b.pub_hidemail FROM " . PRE . "_news AS a LEFT JOIN " . PRE . "_user AS b USING(userid) WHERE ( " . iif(!$user->is_team_member(), time() . " BETWEEN starttime AND endtime AND ") . " id='" . $_REQUEST['id'] . "' " . section_filter() . " ) LIMIT 1");
    if (!$res['id']) {
        filenotfound();
    }
    //Altersabfrage
    if ($res['restricted']) {
        checkage();
    }