Example #1
0
function misc_content_comments()
{
    global $set, $db, $apx, $user;
    $_REQUEST['id'] = (int) $_REQUEST['id'];
    if (!$_REQUEST['id']) {
        die('missing ID!');
    }
    $apx->tmpl->loaddesign('blank');
    content_showcomments($_REQUEST['id']);
}
Example #2
0
} elseif ($apx->is_module('comments') && $_REQUEST['id'] && $_REQUEST['comments']) {
    $res = $db->first("SELECT title FROM " . PRE . "_content AS a WHERE ( id='" . $_REQUEST['id'] . "' AND active='1' " . section_filter() . " ) LIMIT 1");
    //Titel
    $tt = explode('->', $res['title']);
    $number = count($tt);
    foreach ($tt as $one) {
        ++$hi;
        if ($number == $hi) {
            headline(trim($one), str_replace('&', '&', $_SERVER['REQUEST_URI']));
        } else {
            headline(trim($one));
        }
        $last = $one;
    }
    titlebar(strip_tags($last));
    content_showcomments($_REQUEST['id']);
    require 'lib/_end.php';
} elseif ($_REQUEST['id']) {
    $apx->lang->drop('content');
    //Klicks+1
    $db->query("UPDATE " . PRE . "_content SET hits=hits+1 WHERE id='" . $_REQUEST['id'] . "' LIMIT 1");
    $res = $db->first("SELECT a.*,b.username,b.email,b.pub_hidemail,c.username AS lc_username,c.email AS lc_email,c.pub_hidemail AS lc_pub_hidemail FROM " . PRE . "_content AS a LEFT JOIN " . PRE . "_user AS b USING(userid) LEFT JOIN " . PRE . "_user AS c ON a.lastchange_userid=c.userid WHERE ( a.id='" . $_REQUEST['id'] . "' " . iif(!$user->is_team_member(), " AND a.active='1' " . section_filter() . " ") . " ) LIMIT 1");
    if (!$res['id']) {
        filenotfound();
    }
    //Titel
    $headline = array();
    $tt = explode('->', $res['title']);
    $number = count($tt);
    foreach ($tt as $one) {
        ++$hi;