コード例 #1
0
ファイル: portal_view.php プロジェクト: tang86/discuz-utf8
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
$aid = empty($_GET['aid']) ? 0 : intval($_GET['aid']);
if (empty($aid)) {
    showmessage('view_no_article_id');
}
$article = C::t('portal_article_title')->fetch($aid);
require_once libfile('function/portalcp');
$categoryperm = getallowcategory($_G['uid']);
if (empty($article) || $article['status'] > 0 && $article['uid'] != $_G['uid'] && !$_G['group']['allowmanagearticle'] && empty($categoryperm[$article['catid']]['allowmanage']) && $_G['adminid'] != 1 && $_GET['modarticlekey'] != modauthkey($article['aid'])) {
    showmessage('view_article_no_exist');
}
if (!empty($_G['setting']['antitheft']['allow']) && empty($_G['setting']['antitheft']['disable']['article']) && empty($_G['cache']['portalcategory'][$article['catid']]['noantitheft'])) {
    helper_antitheft::check($aid, 'aid');
}
if (!empty($_G['setting']['makehtml']['flag']) && $article['htmlmade'] && !isset($_G['makehtml']) && empty($_GET['diy']) && empty($article['url'])) {
    dheader('location:' . fetch_article_url($article));
}
$article_count = C::t('portal_article_count')->fetch($aid);
if ($article_count) {
    $article = array_merge($article_count, $article);
}
if ($article_count) {
    C::t('portal_article_count')->increase($aid, array('viewnum' => 1));
    unset($article_count);
} else {
    C::t('portal_article_count')->insert(array('aid' => $aid, 'catid' => $article['catid'], 'viewnum' => 1));
}
if ($article['url']) {
コード例 #2
0
ファイル: space_blog.php プロジェクト: tang86/discuz-utf8
     space_merge($space, 'profile');
     $_G['privacy'] = 1;
     require_once libfile('space/profile', 'include');
     include template('home/space_privacy');
     exit;
 } elseif (!$space['self'] && $blog['friend'] == 4 && $_G['adminid'] != 1) {
     $cookiename = "view_pwd_blog_{$blog['blogid']}";
     $cookievalue = empty($_G['cookie'][$cookiename]) ? '' : $_G['cookie'][$cookiename];
     if ($cookievalue != md5(md5($blog['password']))) {
         $invalue = $blog;
         include template('home/misc_inputpwd');
         exit;
     }
 }
 if (!empty($_G['setting']['antitheft']['allow']) && empty($_G['setting']['antitheft']['disable']['blog'])) {
     helper_antitheft::check($id, 'bid');
 }
 $classarr = C::t('home_class')->fetch($blog['classid']);
 if ($blog['catid']) {
     $blog['catname'] = C::t('home_blog_category')->fetch_catname_by_catid($blog['catid']);
     $blog['catname'] = dhtmlspecialchars($blog['catname']);
 }
 require_once libfile('function/blog');
 $blog['message'] = blog_bbcode($blog['message']);
 $otherlist = $newlist = array();
 $otherlist = array();
 $query = C::t('home_blog')->fetch_all_by_uid($space['uid'], 'dateline', 0, 6);
 foreach ($query as $value) {
     if ($value['blogid'] != $blog['blogid'] && empty($value['friend']) && $blog['status'] == 0) {
         $otherlist[] = $value;
     }
コード例 #3
0
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
require_once libfile('function/forumlist');
require_once libfile('function/discuzcode');
require_once libfile('function/post');
$thread =& $_G['forum_thread'];
$forum =& $_G['forum'];
if (!$_G['forum_thread'] || !$_G['forum']) {
    showmessage('thread_nonexistence');
}
$page = max(1, $_G['page']);
$_GET['stand'] = isset($_GET['stand']) && in_array($_GET['stand'], array('0', '1', '2')) ? $_GET['stand'] : null;
if ($page === 1 && !empty($_G['setting']['antitheft']['allow']) && empty($_G['setting']['antitheft']['disable']['thread']) && empty($_G['forum']['noantitheft'])) {
    helper_antitheft::check($_G['forum_thread']['tid'], 'tid');
}
if ($_G['setting']['cachethreadlife'] && $_G['forum']['threadcaches'] && !$_G['uid'] && $page == 1 && !$_G['forum']['special'] && empty($_GET['do']) && !defined('IN_ARCHIVER') && !defined('IN_MOBILE')) {
    viewthread_loadcache();
}
$threadtableids = !empty($_G['cache']['threadtableids']) ? $_G['cache']['threadtableids'] : array();
$threadtable_info = !empty($_G['cache']['threadtable_info']) ? $_G['cache']['threadtable_info'] : array();
$archiveid = $thread['threadtableid'];
$thread['is_archived'] = $archiveid ? true : false;
$thread['archiveid'] = $archiveid;
$forum['threadtableid'] = $archiveid;
$threadtable = $thread['threadtable'];
$posttableid = $thread['posttableid'];
$posttable = $thread['posttable'];
$_G['action']['fid'] = $_G['fid'];
$_G['action']['tid'] = $_G['tid'];
コード例 #4
0
ファイル: post_newreply.php プロジェクト: lemonstory/bbs
    $modpost->attach_after_methods('newreply', $afmethods);
    $return = $modpost->newreply($params);
    $pid = $modpost->pid;
    if ($specialextra) {
        @(include_once DISCUZ_ROOT . './source/plugin/' . $_G['setting']['threadplugins'][$specialextra]['module'] . '.class.php');
        $classname = 'threadplugin_' . $specialextra;
        if (class_exists($classname) && method_exists($threadpluginclass = new $classname(), 'newreply_submit_end')) {
            $threadpluginclass->newreply_submit_end($_G['fid'], $_G['tid']);
        }
    }
    if ($modpost->pid && !$modpost->param('modnewreplies')) {
        if (!empty($_GET['addfeed'])) {
            $modpost->replyfeed();
        }
    }
    if ($modpost->param('modnewreplies')) {
        $url = "forum.php?mod=viewthread&tid=" . $_G['tid'];
    } else {
        $antitheft = '';
        if (!empty($_G['setting']['antitheft']['allow']) && empty($_G['setting']['antitheft']['disable']['thread']) && empty($_G['forum']['noantitheft'])) {
            $sign = helper_antitheft::get_sign($_G['tid'], 'tid');
            if ($sign) {
                $antitheft = '&_dsign=' . $sign;
            }
        }
        $url = "forum.php?mod=viewthread&tid=" . $_G['tid'] . "&pid=" . $modpost->pid . "&page=" . $modpost->param('page') . "{$antitheft}&extra=" . $extra . "#pid" . $modpost->pid;
    }
    if (!isset($inspacecpshare)) {
        showmessage($return, $url, $modpost->param('showmsgparam'));
    }
}