Example #1
0
function articles_showcomments($id)
{
    global $set, $db, $apx, $user;
    $id = (int) $id;
    $res = $db->first("SELECT id,allowcoms FROM " . PRE . "_articles WHERE ( id='" . $id . "' " . section_filter() . " ) LIMIT 1");
    if (!$apx->is_module('comments') || !$set['articles']['coms'] || !$res['allowcoms']) {
        return;
    }
    require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
    $coms = new comments('articles', $id);
    $coms->assign_comments();
    if (!articles_recent($id) && !$set['articles']['archcoms']) {
        $apx->tmpl->assign('COMMENT_NOFORM', 1);
    }
    $apx->tmpl->parse('comments', 'comments');
    require 'lib/_end.php';
}
Example #2
0
| 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('articles') . 'functions.php';
$apx->module('articles');
$apx->lang->drop('articles');
$apx->lang->drop('global');
headline($apx->lang->get('HEADLINE_ARCHIVE'), mklink('articlearchive.php', 'articlearchive.html'));
titlebar($apx->lang->get('HEADLINE_ARCHIVE'));
$recent = articles_recent();
$filter = iif(count($recent) && !$set['articles']['archiveall'], 'AND NOT ( id IN (' . implode(',', $recent) . ') )');
$_REQUEST['id'] = (int) $_REQUEST['id'];
//////////////////////////////////////////////////////////////////////////////////////////////////////// SUCHE
if ($_REQUEST['action'] == 'search') {
    $apx->lang->drop('search');
    //ERGEBNIS ANZEIGEN
    if ($_REQUEST['searchid']) {
        titlebar($apx->lang->get('HEADLINE_SEARCH'));
        //Suchergebnis auslesen
        $resultIds = '';
        list($resultIds) = getSearchResult('articles', $_REQUEST['searchid']);
        //Keine Ergebnisse
        if (!$resultIds) {
            message($apx->lang->get('MSG_NORESULT'), 'javascript:history.back();');
            require 'lib/_end.php';