当前位置: 首页>>代码示例>>PHP>>正文


PHP modauthkey函数代码示例

本文整理汇总了PHP中modauthkey函数的典型用法代码示例。如果您正苦于以下问题:PHP modauthkey函数的具体用法?PHP modauthkey怎么用?PHP modauthkey使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了modauthkey函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _getResult

 private function _getResult($res, $aid, $page)
 {
     require_once DISCUZ_ROOT . './source/function/function_home.php';
     require_once DISCUZ_ROOT . './source/function/function_portal.php';
     loadcache('portalcategory');
     global $_G;
     // 在DISCUZ_ROOT/source/module/portal/portal_view.php基础上二次开发
     if (empty($aid)) {
         return $this->makeErrorInfo($res, lang('message', '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'])) {
         return $this->makeErrorInfo($res, lang('message', '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');
     // }
     $res['body']['newsInfo'] = $this->_getNewsInfo($article, $page);
     return $res;
 }
开发者ID:caidongyun,项目名称:CS,代码行数:22,代码来源:NewsViewAction.php

示例2: loadforum

function loadforum()
{
    global $_G;
    $tid = intval(getgpc('tid'));
    $fid = getgpc('fid');
    if (!$fid && getgpc('gid')) {
        $fid = intval(getgpc('gid'));
    }
    /*vot*/
    if (!empty($_G['gp_archiver'])) {
        //Archiver X1.5 compatible
        if ($fid) {
            dheader('location: archiver/?fid-' . $fid . '.html');
        } elseif ($tid) {
            dheader('location: archiver/?tid-' . $tid . '.html');
        } else {
            dheader('location: archiver/');
        }
    }
    if (defined('IN_ARCHIVER') && $_G['setting']['archiverredirect'] && !IS_ROBOT) {
        dheader('location: ../forum.php' . ($_G['mod'] ? '?mod=' . $_G['mod'] . (!empty($_GET['fid']) ? '&fid=' . $_GET['fid'] : (!empty($_GET['tid']) ? '&tid=' . $_GET['tid'] : '')) : ''));
    }
    if ($_G['setting']['forumpicstyle']) {
        $_G['setting']['forumpicstyle'] = unserialize($_G['setting']['forumpicstyle']);
        empty($_G['setting']['forumpicstyle']['thumbwidth']) && ($_G['setting']['forumpicstyle']['thumbwidth'] = 214);
        empty($_G['setting']['forumpicstyle']['thumbheight']) && ($_G['setting']['forumpicstyle']['thumbheight'] = 160);
    } else {
        $_G['setting']['forumpicstyle'] = array('thumbwidth' => 214, 'thumbheight' => 160);
    }
    if ($fid) {
        $fid = is_numeric($fid) ? intval($fid) : (!empty($_G['setting']['forumfids'][$fid]) ? $_G['setting']['forumfids'][$fid] : 0);
    }
    $modthreadkey = isset($_G['gp_modthreadkey']) && $_G['gp_modthreadkey'] == modauthkey($tid) ? $_G['gp_modthreadkey'] : '';
    $_G['forum_auditstatuson'] = $modthreadkey ? true : false;
    $accessadd1 = $accessadd2 = $modadd1 = $modadd2 = $metadescription = $hookscriptmessage = '';
    $adminid = $_G['adminid'];
    if ($_G['uid']) {
        if ($_G['member']['accessmasks']) {
            $accessadd1 = ', a.allowview, a.allowpost, a.allowreply, a.allowgetattach, a.allowgetimage, a.allowpostattach, a.allowpostimage';
            /*vot*/
            $accessadd2 = "LEFT JOIN " . DB::table('forum_access') . " a ON (a.uid='{$_G['uid']}' AND a.fid=f.fid)";
        }
        if ($adminid == 3) {
            $modadd1 = ', m.uid AS ismoderator';
            /*vot*/
            $modadd2 = "LEFT JOIN " . DB::table('forum_moderator') . " m ON (m.uid='{$_G['uid']}' AND m.fid=f.fid)";
        }
    }
    if (!empty($tid) || !empty($fid)) {
        if (!empty($tid)) {
            $archiveid = !empty($_G['gp_archiveid']) ? intval($_G['gp_archiveid']) : null;
            $_G['thread'] = get_thread_by_tid($tid, '*', '', $archiveid);
            if (!$_G['forum_auditstatuson'] && !empty($_G['thread']) && !($_G['thread']['displayorder'] >= 0 || in_array($_G['thread']['displayorder'], array(-4, -3, -2)) && $_G['thread']['authorid'] == $_G['uid'])) {
                $_G['thread'] = null;
            }
            $_G['forum_thread'] =& $_G['thread'];
            if (empty($_G['thread'])) {
                $fid = $tid = 0;
            } else {
                $fid = $_G['thread']['fid'];
                $tid = $_G['thread']['tid'];
            }
        }
        if ($fid) {
            $forum = DB::fetch_first("SELECT f.fid, f.*, ff.* {$accessadd1} {$modadd1}, f.fid AS fid\r\n\t\t\tFROM " . DB::table('forum_forum') . " f\r\n\t\t\tLEFT JOIN " . DB::table("forum_forumfield") . " ff ON ff.fid=f.fid {$accessadd2} {$modadd2}\r\n\t\t\tWHERE f.fid='{$fid}'");
        }
        if ($forum) {
            $forum['ismoderator'] = !empty($forum['ismoderator']) || $adminid == 1 || $adminid == 2 ? 1 : 0;
            $fid = $forum['fid'];
            $gorup_admingroupids = $_G['setting']['group_admingroupids'] ? unserialize($_G['setting']['group_admingroupids']) : array('1' => '1');
            if ($forum['status'] == 3) {
                if (!$_G['setting']['groupstatus']) {
                    showmessage('group_status_off');
                }
                if (!empty($forum['moderators'])) {
                    $forum['moderators'] = unserialize($forum['moderators']);
                } else {
                    require_once libfile('function/group');
                    $forum['moderators'] = update_groupmoderators($fid);
                }
                if ($_G['uid'] && $_G['adminid'] != 1) {
                    $forum['ismoderator'] = !empty($forum['moderators'][$_G['uid']]) ? 1 : 0;
                    $_G['adminid'] = 0;
                    if ($forum['ismoderator'] || $gorup_admingroupids[$_G['groupid']]) {
                        $_G['adminid'] = $_G['adminid'] ? $_G['adminid'] : 3;
                        if (!empty($gorup_admingroupids[$_G['groupid']])) {
                            $forum['ismoderator'] = 1;
                            $_G['adminid'] = 2;
                        }
                        $group_userperm = unserialize($_G['setting']['group_userperm']);
                        if (is_array($group_userperm)) {
                            $_G['group'] = array_merge($_G['group'], $group_userperm);
                            $_G['group']['allowmovethread'] = $_G['group']['allowcopythread'] = $_G['group']['allowedittypethread'] = 0;
                        }
                    }
                }
            }
            foreach (array('threadtypes', 'threadsorts', 'creditspolicy', 'modrecommend') as $key) {
                $forum[$key] = !empty($forum[$key]) ? unserialize($forum[$key]) : array();
                if (!is_array($forum[$key])) {
//.........这里部分代码省略.........
开发者ID:v998,项目名称:discuzx-en,代码行数:101,代码来源:function_forum.php

示例3: libfile

 require_once libfile('function/misc');
 while ($comment = DB::fetch($query)) {
     $comment['dateline'] = dgmdate($comment['dateline']);
     $short_desc = cutstr($comment['message'], 75);
     if ($showcensor) {
         $censor->check($short_desc);
         $censor->check($comment['message']);
     }
     $comment_censor_words = $censor->words_found;
     if (count($comment_censor_words) > 3) {
         $comment_censor_words = array_slice($comment_censor_words, 0, 3);
     }
     $comment['censorwords'] = implode(', ', $comment_censor_words);
     $comment['ip'] = $comment['ip'] . ' - ' . convertip($comment['ip']);
     $comment['modkey'] = modauthkey($comment['id']);
     $comment['modcommentkey'] = modauthkey($comment['cid']);
     if (count($comment_censor_words)) {
         $comment_censor_text = "<span style=\"color: red;\">({$comment['censorwords']})</span>";
     } else {
         $comment_censor_text = lang('admincp', 'no_censor_word');
     }
     $viewurl = '';
     $commenttype = '';
     $editurl = "home.php?mod=spacecp&ac=comment&op=edit&cid={$comment['cid']}&modcommentkey={$comment['modcommentkey']}";
     switch ($comment['idtype']) {
         case 'uid':
             $commenttype = lang('admincp', 'comment_uid');
             $viewurl = "home.php?mod=space&uid={$comment['uid']}&do=wall#comment_anchor_{$comment['cid']}";
             break;
         case 'blogid':
             $commenttype = lang('admincp', 'comment_blogid');
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:moderate_comment.php

示例4: getstr

    $message = getstr($_POST['message'], 0, 0, 0, 2);
    $cid = empty($_POST['cid']) ? 0 : intval($_POST['cid']);
    if (strlen($message) < 2) {
        showmessage('content_is_too_short', '', array(), array());
    }
    require_once libfile('function/comment');
    $cidarr = add_comment($message, $id, $idtype, $cid);
    if ($cidarr['cid'] != 0) {
        showmessage($cidarr['msg'], dreferer(), $cidarr['magvalues'], $_GET['quickcomment'] ? array('msgtype' => 3, 'showmsg' => true) : array('showdialog' => 3, 'showmsg' => true, 'closetime' => true));
    } else {
        showmessage('no_privilege_comment', '', array(), array('return' => true));
    }
}
$cid = empty($_GET['cid']) ? 0 : intval($_GET['cid']);
if ($_GET['op'] == 'edit') {
    if ($_G['adminid'] != 1 && $_GET['modcommentkey'] != modauthkey($_GET['cid'])) {
        $authorid = intval($_G['uid']);
    } else {
        $authorid = '';
    }
    if (!($comment = C::t('home_comment')->fetch($cid, $authorid))) {
        showmessage('no_privilege_comment_edit');
    }
    if (submitcheck('editsubmit')) {
        $message = getstr($_POST['message'], 0, 0, 0, 2);
        if (strlen($message) < 2) {
            showmessage('content_is_too_short');
        }
        $message = censor($message);
        if (censormod($message)) {
            $comment_status = 1;
开发者ID:softhui,项目名称:discuz,代码行数:31,代码来源:spacecp_comment.php

示例5: exit

 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: portal_view.php 33660 2013-07-29 07:51:05Z nemohou $
 */
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);
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:portal_view.php

示例6: exit

if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
$minhot = $_G['setting']['feedhotmin'] < 1 ? 3 : $_G['setting']['feedhotmin'];
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
if ($page < 1) {
    $page = 1;
}
$id = empty($_GET['id']) ? 0 : intval($_GET['id']);
$_G['colorarray'] = array('', '#EE1B2E', '#EE5023', '#996600', '#3C9D40', '#2897C5', '#2B65B7', '#8F2A90', '#EC1282');
if ($id) {
    $blog = array_merge(C::t('home_blog')->fetch($id), C::t('home_blogfield')->fetch($id));
    if ($blog['uid'] != $space['uid']) {
        $blog = null;
    }
    if (!(!empty($blog) && ($blog['status'] == 0 || $blog['uid'] == $_G['uid'] || $_G['adminid'] == 1 || $_GET['modblogkey'] == modauthkey($blog['blogid'])))) {
        showmessage('view_to_info_did_not_exist');
    }
    if (!ckfriend($blog['uid'], $blog['friend'], $blog['target_ids'])) {
        require_once libfile('function/friend');
        $isfriend = friend_check($blog['uid']);
        space_merge($space, 'count');
        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']))) {
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:space_blog.php

示例7: libfile

    $query = DB::query("SELECT * FROM " . DB::table('portal_comment') . " WHERE cid='{$cid}'");
    $comment = DB::fetch($query);
}
if ($_GET['op'] == 'requote') {
    if (!empty($comment['message'])) {
        include_once libfile('class/bbcode');
        $bbcode =& bbcode::instance();
        $comment['message'] = $bbcode->html2bbcode($comment['message']);
        $comment['message'] = preg_replace("/\\[quote\\].*?\\[\\/quote\\]/is", '', $comment['message']);
        $comment['message'] = getstr($comment['message'], 150, 0, 0, 2, -1);
    }
} elseif ($_GET['op'] == 'edit') {
    if (empty($comment)) {
        showmessage('comment_edit_noexist');
    }
    if (!$_G['group']['allowmanagearticle'] && $_G['uid'] != $comment['uid'] && $_G['adminid'] != 1 && $_G['gp_modarticlecommentkey'] != modauthkey($comment['cid']) || $_G['groupid'] == '7') {
        showmessage('group_nopermission', NULL, array('grouptitle' => $_G['group']['grouptitle']), array('login' => 1));
    }
    if (submitcheck('editsubmit')) {
        $message = getstr($_POST['message'], 0, 1, 1, 2);
        if (strlen($message) < 2) {
            showmessage('content_is_too_short');
        }
        $message = censor($message);
        if (censormod($message)) {
            $comment_status = 1;
        } else {
            $comment_status = 0;
        }
        DB::update('portal_comment', array('message' => $message, 'status' => $comment_status), array('cid' => $comment['cid']));
        showmessage('do_success', dreferer());
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:portalcp_comment.php

示例8: loadforum

function loadforum()
{
    global $_G;
    $tid = intval(getgpc('tid'));
    $fid = getgpc('fid');
    if ($fid) {
        $fid = is_numeric($fid) ? intval($fid) : (!empty($_G['setting']['forumfids'][$fid]) ? $_G['setting']['forumfids'][$fid] : 0);
    }
    $modthreadkey = isset($_G['gp_modthreadkey']) && $_G['gp_modthreadkey'] == modauthkey($tid) ? $_G['gp_modthreadkey'] : '';
    $_G['forum_auditstatuson'] = $modthreadkey ? true : false;
    $accessadd1 = $accessadd2 = $modadd1 = $modadd2 = $metadescription = $hookscriptmessage = '';
    $adminid = $_G['adminid'];
    if ($_G['uid']) {
        if ($_G['member']['accessmasks']) {
            $accessadd1 = ', a.allowview, a.allowpost, a.allowreply, a.allowgetattach, a.allowpostattach, a.allowpostimage';
            $accessadd2 = "LEFT JOIN " . DB::table('forum_access') . " a ON a.uid='{$_G['uid']}' AND a.fid=f.fid";
        }
        if ($adminid == 3) {
            $modadd1 = ', m.uid AS ismoderator';
            $modadd2 = "LEFT JOIN " . DB::table('forum_moderator') . " m ON m.uid='{$_G['uid']}' AND m.fid=f.fid";
        }
    }
    if (!empty($tid) || !empty($fid)) {
        if (empty($tid)) {
            $forum = DB::fetch_first("SELECT f.fid, f.*, ff.* {$accessadd1} {$modadd1}, f.fid AS fid\r\n\t\t\tFROM " . DB::table('forum_forum') . " f\r\n\t\t\tLEFT JOIN " . DB::table("forum_forumfield") . " ff ON ff.fid=f.fid {$accessadd2} {$modadd2}\r\n\t\t\tWHERE f.fid='{$fid}'");
        } else {
            loadcache('threadtableids');
            $threadtableids = array(0);
            if (!empty($_G['cache']['threadtableids'])) {
                $threadtableids = array_merge($threadtableids, $_G['cache']['threadtableids']);
            }
            $archiveid = intval($_REQUEST['archiveid']);
            if (!empty($archiveid) && in_array($archiveid, $threadtableids)) {
                $threadtable = $archiveid ? "forum_thread_{$archiveid}" : 'forum_thread';
                $forum = DB::fetch_first("SELECT t.tid, t.closed," . (defined('SQL_ADD_THREAD') ? SQL_ADD_THREAD : '') . " f.*, ff.* {$accessadd1} {$modadd1}, f.fid AS fid\r\n\t\t\t\t\tFROM " . DB::table($threadtable) . " t\r\n\t\t\t\t\tINNER JOIN " . DB::table('forum_forum') . " f ON f.fid=t.fid\r\n\t\t\t\t\tLEFT JOIN " . DB::table('forum_forumfield') . " ff ON ff.fid=f.fid {$accessadd2} {$modadd2}\r\n\t\t\t\t\tWHERE t.tid='{$tid}'" . ($_G['forum_auditstatuson'] ? '' : " AND (t.displayorder>='0' OR (t.displayorder IN ('-4', '-3', '-2') AND t.authorid='{$_G['uid']}'))") . " LIMIT 1");
                $forum['threadtableid'] = $archiveid;
            } else {
                foreach ($threadtableids as $tableid) {
                    $threadtable = $tableid ? "forum_thread_{$tableid}" : 'forum_thread';
                    $forum = DB::fetch_first("SELECT t.tid, t.closed," . (defined('SQL_ADD_THREAD') ? SQL_ADD_THREAD : '') . " f.*, ff.* {$accessadd1} {$modadd1}, f.fid AS fid\r\n\t\t\t\t\tFROM " . DB::table($threadtable) . " t\r\n\t\t\t\t\tINNER JOIN " . DB::table('forum_forum') . " f ON f.fid=t.fid\r\n\t\t\t\t\tLEFT JOIN " . DB::table('forum_forumfield') . " ff ON ff.fid=f.fid {$accessadd2} {$modadd2}\r\n\t\t\t\t\tWHERE t.tid='{$tid}'" . ($_G['forum_auditstatuson'] ? '' : " AND (t.displayorder>='0' OR (t.displayorder IN ('-4', '-3', '-2') AND t.authorid='{$_G['uid']}'))") . " LIMIT 1");
                    if (!empty($forum)) {
                        $forum['threadtableid'] = $tableid;
                        break;
                    }
                }
            }
            $tid = $forum['tid'];
        }
        if ($forum) {
            $forum['ismoderator'] = !empty($forum['ismoderator']) || $adminid == 1 || $adminid == 2 ? 1 : 0;
            $fid = $forum['fid'];
            $gorup_admingroupids = $_G['setting']['group_admingroupids'] ? unserialize($_G['setting']['group_admingroupids']) : array('1' => '1');
            if ($forum['status'] == 3) {
                if (!$_G['setting']['groupstatus']) {
                    showmessage('group_status_off');
                }
                if (!empty($forum['moderators'])) {
                    $forum['moderators'] = unserialize($forum['moderators']);
                } else {
                    require_once libfile('function/group');
                    $forum['moderators'] = update_groupmoderators($fid);
                }
                if ($_G['uid'] && $_G['adminid'] != 1) {
                    $forum['ismoderator'] = !empty($forum['moderators'][$_G['uid']]) ? 1 : 0;
                    $_G['adminid'] = 0;
                    if ($forum['ismoderator'] || $gorup_admingroupids[$_G['groupid']]) {
                        $_G['adminid'] = $_G['adminid'] ? $_G['adminid'] : 3;
                        if (!empty($gorup_admingroupids[$_G['groupid']])) {
                            $forum['ismoderator'] = 1;
                            $_G['adminid'] = 2;
                        }
                        $group_userperm = unserialize($_G['setting']['group_userperm']);
                        if (is_array($group_userperm)) {
                            $_G['group'] = array_merge($_G['group'], $group_userperm);
                            $_G['group']['allowmovethread'] = $_G['group']['allowcopythread'] = $_G['group']['allowedittypethread'] = 0;
                        }
                    }
                }
            }
            foreach (array('threadtypes', 'threadsorts', 'creditspolicy', 'modrecommend') as $key) {
                $forum[$key] = !empty($forum[$key]) ? unserialize($forum[$key]) : array();
            }
            if ($forum['status'] == 3) {
                $_G['isgroupuser'] = 0;
                $_G['basescript'] = 'group';
                $_G['group']['allowstickthread'] = 1;
                if (empty($forum['level'])) {
                    $levelid = DB::result_first("SELECT levelid FROM " . DB::table('forum_grouplevel') . " WHERE creditshigher<='{$forum['commoncredits']}' AND '{$forum['commoncredits']}'<creditslower LIMIT 1");
                    $forum['level'] = $levelid;
                    DB::query("UPDATE " . DB::table('forum_forum') . " SET level='{$levelid}' WHERE fid='{$fid}'");
                }
                loadcache('grouplevels');
                $grouplevel = $_G['grouplevels'][$forum['level']];
                if (!empty($grouplevel['icon'])) {
                    $valueparse = parse_url($grouplevel['icon']);
                    if (!isset($valueparse['host'])) {
                        $grouplevel['icon'] = $_G['setting']['attachurl'] . 'common/' . $grouplevel['icon'];
                    }
                }
                $group_postpolicy = $grouplevel['postpolicy'];
//.........这里部分代码省略.........
开发者ID:v998,项目名称:discuzx-en,代码行数:101,代码来源:function_forum.php

示例9: libfile

 $censor =& discuz_censor::instance();
 $censor->highlight = '#FF0000';
 require_once libfile('function/misc');
 while ($blog = DB::fetch($query)) {
     $blog['dateline'] = dgmdate($blog['dateline']);
     $blog['subject'] = $blog['subject'] ? '<b>' . $blog['subject'] . '</b>' : '<i>' . $lang['nosubject'] . '</i>';
     if ($showcensor) {
         $censor->check($blog['subject']);
         $censor->check($blog['message']);
     }
     $blog_censor_words = $censor->words_found;
     if (count($post_censor_words) > 3) {
         $blog_censor_words = array_slice($blog_censor_words, 0, 3);
     }
     $blog['censorwords'] = implode(', ', $blog_censor_words);
     $blog['modblogkey'] = modauthkey($blog['blogid']);
     $blog['postip'] = $blog['postip'] . '-' . convertip($blog['postip']);
     if (count($blog_censor_words)) {
         $blog_censor_text = "<span style=\"color: red;\">({$blog['censorwords']})</span>";
     } else {
         $blog_censor_text = '';
     }
     showtagheader('tbody', '', true, 'hover');
     showtablerow("id=\"mod_{$blog['blogid']}_row1\"", array("id=\"mod_{$blog['blogid']}_row1_op\" rowspan=\"3\" class=\"rowform threadopt\" style=\"width:80px;\"", '', 'width="120"', 'width="120"', 'width="55"'), array("<ul class=\"nofloat\"><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$blog['blogid']}]\" id=\"mod_{$blog['blogid']}_1\" value=\"validate\" onclick=\"mod_setbg({$blog['blogid']}, 'validate');\"><label for=\"mod_{$blog['blogid']}_1\">{$lang['validate']}</label></li><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$blog['blogid']}]\" id=\"mod_{$blog['blogid']}_2\" value=\"delete\" onclick=\"mod_setbg({$blog['blogid']}, 'delete');\"><label for=\"mod_{$blog['blogid']}_2\">{$lang['delete']}</label></li><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$blog['blogid']}]\" id=\"mod_{$blog['blogid']}_3\" value=\"ignore\" onclick=\"mod_setbg({$blog['blogid']}, 'ignore');\"><label for=\"mod_{$blog['blogid']}_3\">{$lang['ignore']}</label></li></ul>", "<h3><a href=\"javascript:;\" onclick=\"display_toggle('{$blog['blogid']}');\">{$blog['subject']}</a> {$blog_censor_text}</h3><p>{$blog['postip']}</p>", $blog[classname], "<p><a target=\"_blank\" href=\"" . ADMINSCRIPT . "?action=members&operation=search&uid={$blog['uid']}&submit=yes\">{$blog['username']}</a></p> <p>{$blog['dateline']}</p>", "<a href=\"home.php?mod=space&uid={$blog['uid']}&do=blog&id={$blog['blogid']}&modblogkey={$blog['modblogkey']}\" target=\"_blank\">{$lang['view']}</a>&nbsp;<a href=\"home.php?mod=spacecp&ac=blog&blogid={$blog['blogid']}&modblogkey={$blog['modblogkey']}\" target=\"_blank\">{$lang['edit']}</a>"));
     showtablerow("id=\"mod_{$blog['blogid']}_row2\"", 'colspan="4" style="padding: 10px; line-height: 180%;"', '<div style="overflow: auto; overflow-x: hidden; max-height:120px; height:auto !important; height:100px; word-break: break-all;">' . $blog['message'] . '</div>');
     showtablerow("id=\"mod_{$blog['blogid']}_row3\"", 'class="threadopt threadtitle" colspan="4"', "<a href=\"?action=moderate&operation=blogs&fast=1&blogid={$blog['blogid']}&moderate[{$blog['blogid']}]=validate&page={$page}&frame=no\" target=\"fasthandle\">{$lang['validate']}</a> | <a href=\"?action=moderate&operation=blogs&fast=1&blogid={$blog['blogid']}&moderate[{$blog['blogid']}]=delete&page={$page}&frame=no\" target=\"fasthandle\">{$lang['delete']}</a> | <a href=\"?action=moderate&operation=blogs&fast=1&blogid={$blog['blogid']}&moderate[{$blog['blogid']}]=ignore&page={$page}&frame=no\" target=\"fasthandle\">{$lang['ignore']}</a>");
     showtagfooter('tbody');
 }
 showsubmit('modsubmit', 'submit', '', '<a href="#all" onclick="mod_setbg_all(\'validate\')">' . cplang('moderate_all_validate') . '</a> &nbsp;<a href="#all" onclick="mod_setbg_all(\'delete\')">' . cplang('moderate_all_delete') . '</a> &nbsp;<a href="#all" onclick="mod_setbg_all(\'ignore\')">' . cplang('moderate_all_ignore') . '</a> &nbsp;<a href="#all" onclick="mod_cancel_all();">' . cplang('moderate_all_cancel') . '</a>', $multipage, false);
 showtablefooter();
 showformfooter();
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:moderate_blog.php

示例10: libfile

    require_once libfile('class/censor');
    $censor =& discuz_censor::instance();
    $censor->highlight = '#FF0000';
    require_once libfile('function/misc');
    while ($article = DB::fetch($query)) {
        $article['dateline'] = dgmdate($article['dateline']);
        if ($showcensor) {
            $censor->check($article['title']);
            $censor->check($article['summary']);
        }
        $article_censor_words = $censor->words_found;
        if (count($article_censor_words) > 3) {
            $article_censor_words = array_slice($article_censor_words, 0, 3);
        }
        $article['censorwords'] = implode(', ', $article_censor_words);
        $article['modarticlekey'] = modauthkey($article['aid']);
        if (count($article_censor_words)) {
            $article_censor_text = "<span style=\"color: red;\">({$article['censorwords']})</span>";
        } else {
            $article_censor_text = '';
        }
        showtagheader('tbody', '', true, 'hover');
        showtablerow("id=\"mod_{$article['aid']}_row1\"", array("id=\"mod_{$article['aid']}_row1_op\" rowspan=\"3\" class=\"rowform threadopt\" style=\"width:80px;\"", '', 'width="120"', 'width="55"'), array("<ul class=\"nofloat\"><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$article['aid']}]\" id=\"mod_{$article['aid']}_1\" value=\"validate\" onclick=\"mod_setbg({$article['aid']}, 'validate');\"><label for=\"mod_{$article['aid']}_1\">{$lang['validate']}</label></li><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$article['aid']}]\" id=\"mod_{$article['aid']}_2\" value=\"delete\" onclick=\"mod_setbg({$article['aid']}, 'delete');\"><label for=\"mod_{$article['aid']}_2\">{$lang['delete']}</label></li><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$article['aid']}]\" id=\"mod_{$article['aid']}_3\" value=\"ignore\" onclick=\"mod_setbg({$article['aid']}, 'ignore');\"><label for=\"mod_{$article['aid']}_3\">{$lang['ignore']}</label></li></ul>", "<h3><a href=\"javascript:;\" onclick=\"display_toggle({$article[aid]});\">{$article['title']} {$article_censor_text}</a></h3>", "<p><a target=\"_blank\" href=\"" . ADMINSCRIPT . "?action=members&operation=search&uid={$article['uid']}&submit=yes\">{$article['username']}</a></p> <p>{$article['dateline']}</p>", "<a target=\"_blank\" href=\"portal.php?mod=view&aid={$article['aid']}&modarticlekey={$article['modarticlekey']}\">{$lang['view']}</a>&nbsp;<a href=\"portal.php?mod=portalcp&ac=article&op=edit&aid={$article['aid']}&modarticlekey={$article['modarticlekey']}\" target=\"_blank\">{$lang['edit']}</a>"));
        showtablerow("id=\"mod_{$article['aid']}_row2\"", 'colspan="4" style="padding: 10px; line-height: 180%;"', '<div style="overflow: auto; overflow-x: hidden; max-height:120px; height:auto !important; height:100px; word-break: break-all;">' . $article['summary'] . '</div>');
        showtablerow("id=\"mod_{$article['aid']}_row3\"", 'class="threadopt threadtitle" colspan="4"', "<a href=\"?action=moderate&operation=articles&fast=1&aid={$article['aid']}&moderate[{$article['aid']}]=validate&page={$page}&frame=no\" target=\"fasthandle\">{$lang['validate']}</a> | <a href=\"?action=moderate&operation=articles&fast=1&aid={$article['aid']}&moderate[{$article['aid']}]=delete&page={$page}&frame=no\" target=\"fasthandle\">{$lang['delete']}</a> | <a href=\"?action=moderate&operation=articles&fast=1&aid={$article['aid']}&moderate[{$article['aid']}]=ignore&page={$page}&frame=no\" target=\"fasthandle\">{$lang['ignore']}</a>");
        showtagfooter('tbody');
    }
    showsubmit('modsubmit', 'submit', '', '<a href="#all" onclick="mod_setbg_all(\'validate\')">' . cplang('moderate_all_validate') . '</a> &nbsp;<a href="#all" onclick="mod_setbg_all(\'delete\')">' . cplang('moderate_all_delete') . '</a> &nbsp;<a href="#all" onclick="mod_setbg_all(\'ignore\')">' . cplang('moderate_all_ignore') . '</a> &nbsp;<a href="#all" onclick="mod_cancel_all();">' . cplang('moderate_all_cancel') . '</a>', $multipage, false);
    showtablefooter();
    showformfooter();
} else {
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:moderate_article.php

示例11: updatecreditbyaction

        }
        updatecreditbyaction($action, 0, array(), $needle);
        if ($becomment) {
            if ($_POST['idtype'] == 'uid') {
                $needle = $_G['uid'];
            }
            updatecreditbyaction($becomment, $tospace['uid'], array(), $needle);
        }
    }
    DB::update('common_member_status', array('lastpost' => $_G['timestamp']), array('uid' => $_G['uid']));
    $magvalues['cid'] = $cid;
    showmessage($msg, dreferer(), $magvalues, $_G['gp_quickcomment'] ? array('msgtype' => 3, 'showmsg' => true) : array('showdialog' => 3, 'showmsg' => true, 'closetime' => true));
}
$cid = empty($_GET['cid']) ? 0 : intval($_GET['cid']);
if ($_GET['op'] == 'edit') {
    if ($_G['adminid'] != 1 && $_G['gp_modcommentkey'] != modauthkey($_G['gp_cid'])) {
        $sqladd = "AND authorid='{$_G['uid']}'";
    } else {
        $sqladd = '';
    }
    $query = DB::query("SELECT * FROM " . DB::table('home_comment') . " WHERE cid='{$cid}' {$sqladd}");
    if (!($comment = DB::fetch($query))) {
        showmessage('no_privilege');
    }
    if (submitcheck('editsubmit')) {
        $message = getstr($_POST['message'], 0, 1, 1, 2);
        if (strlen($message) < 2) {
            showmessage('content_is_too_short');
        }
        $message = censor($message);
        if (censormod($message)) {
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:spacecp_comment.php

示例12: ceil

    }
    if ($ordertype != 1) {
        $page = ceil($curpostnum / $_G['ppp']);
    } elseif ($curpostnum > 1) {
        $page = ceil(($thread['replies'] - $curpostnum + 3) / $_G['ppp']);
    } else {
        $page = 1;
    }
    if ($thread['special'] == 2 && C::t('forum_trade')->check_goods($pid)) {
        header("HTTP/1.1 301 Moved Permanently");
        dheader("Location: forum.php?mod=viewthread&do=tradeinfo&tid={$tid}&pid={$pid}");
    }
    $authoridurl = $authorid ? '&authorid=' . $authorid : '';
    $ordertypeurl = $ordertype ? '&ordertype=' . $ordertype : '';
    header("HTTP/1.1 301 Moved Permanently");
    dheader("Location: forum.php?mod=viewthread&tid={$tid}&page={$page}{$authoridurl}{$ordertypeurl}" . (isset($_GET['modthreadkey']) && ($modthreadkey = modauthkey($tid)) ? "&modthreadkey={$modthreadkey}" : '') . "#pid{$pid}");
}
if (empty($_G['thread'])) {
    showmessage('thread_nonexistence');
}
if ($_GET['goto'] == 'lastpost') {
    $pageadd = '';
    if (!getstatus($_G['thread'], 4)) {
        $page = ceil(($_G['thread']['special'] ? $_G['thread']['replies'] : $_G['thread']['replies'] + 1) / $_G['ppp']);
        $pageadd = $page > 1 ? '&page=' . $page : '';
    }
    dheader('Location: forum.php?mod=viewthread&tid=' . $_G['tid'] . $pageadd . '#lastpost');
} elseif ($_GET['goto'] == 'nextnewset' || $_GET['goto'] == 'nextoldset') {
    $lastpost = $_G['thread']['lastpost'];
    $glue = '<';
    $sort = 'DESC';
开发者ID:lemonstory,项目名称:bbs,代码行数:31,代码来源:forum_redirect.php

示例13: libfile

 $censor =& discuz_censor::instance();
 $censor->highlight = '#FF0000';
 require_once libfile('function/misc');
 require_once libfile('function/home');
 while ($pic = DB::fetch($query)) {
     $pic['dateline'] = dgmdate($pic['dateline']);
     $pic['title'] = $pic['title'] ? '<b>' . $pic['title'] . '</b>' : '<i>' . $lang['nosubject'] . '</i>';
     if ($showcensor) {
         $censor->check($pic['title']);
     }
     $pic_censor_words = $censor->words_found;
     if (count($pic_censor_words) > 3) {
         $pic_censor_words = array_slice($pic_censor_words, 0, 3);
     }
     $pic['censorwords'] = implode(', ', $pic_censor_words);
     $pic['modpickey'] = modauthkey($pic['picid']);
     $pic['postip'] = $pic['postip'] . '-' . convertip($pic['postip']);
     $pic['url'] = pic_get($pic['filepath'], 'album', $pic['thumb'], $pic['remote']);
     if (count($pic_censor_words)) {
         $pic_censor_text = "<span style=\"color: red;\">({$pic['censorwords']})</span>";
     } else {
         $pic_censor_text = '';
     }
     showtagheader('tbody', '', true, 'hover');
     showtablerow("id=\"mod_{$pic['picid']}_row1\"", array("id=\"mod_{$pic['picid']}_row1_op\" rowspan=\"3\" class=\"rowform threadopt\" style=\"width:80px;\"", '', 'width="120"', 'width="120"', 'width="55"'), array("<ul class=\"nofloat\"><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$pic['picid']}]\" id=\"mod_{$pic['picid']}_1\" value=\"validate\" onclick=\"mod_setbg({$pic['picid']}, 'validate');\"><label for=\"mod_{$pic['picid']}_1\">{$lang['validate']}</label></li><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$pic['picid']}]\" id=\"mod_{$pic['picid']}_2\" value=\"delete\" onclick=\"mod_setbg({$pic['picid']}, 'delete');\"><label for=\"mod_{$pic['picid']}_2\">{$lang['delete']}</label></li><li><input class=\"radio\" type=\"radio\" name=\"moderate[{$pic['picid']}]\" id=\"mod_{$pic['picid']}_3\" value=\"ignore\" onclick=\"mod_setbg({$pic['picid']}, 'ignore');\"><label for=\"mod_{$pic['picid']}_3\">{$lang['ignore']}</label></li></ul>", "<h3><a href=\"javascript:;\" onclick=\"display_toggle('{$pic['picid']}');\">{$pic['title']}</a> {$pic_censor_text}</h3><p>{$pic['postip']}</p>", "<a target=\"_blank\" href=\"home.php?mod=space&uid={$pic['uid']}&do=album&id={$pic['albumid']}\">{$pic['albumname']}</a>", "<p><a target=\"_blank\" href=\"" . ADMINSCRIPT . "?action=members&operation=search&uid={$pic['uid']}&submit=yes\">{$pic['username']}</a></p> <p>{$pic['dateline']}</p>", "<a target=\"_blank\" href=\"home.php?mod=space&uid={$pic['uid']}&do=album&picid={$pic['picid']}&modpickey={$pic['modpickey']}\">{$lang['view']}</a>"));
     showtablerow("id=\"mod_{$pic['picid']}_row2\"", 'colspan="4" style="padding: 10px; line-height: 180%;"', '<div style="overflow: auto; overflow-x: hidden; max-height:120px; height:auto !important; height:100px; word-break: break-all;"><img src="' . $pic['url'] . '" /></div>');
     showtablerow("id=\"mod_{$pic['picid']}_row3\"", 'class="threadopt threadtitle" colspan="4"', "<a href=\"?action=moderate&operation=pictures&fast=1&picid={$pic['picid']}&moderate[{$pic['picid']}]=validate&page={$page}&frame=no\" target=\"fasthandle\">{$lang['validate']}</a> | <a href=\"?action=moderate&operation=pictures&fast=1&picid={$pic['picid']}&moderate[{$pic['picid']}]=delete&page={$page}&frame=no\" target=\"fasthandle\">{$lang['delete']}</a> | <a href=\"?action=moderate&operation=pictures&fast=1&picid={$pic['picid']}&moderate[{$pic['picid']}]=ignore&page={$page}&frame=no\" target=\"fasthandle\">{$lang['ignore']}</a>");
     showtagfooter('tbody');
 }
 showsubmit('modsubmit', 'submit', '', '<a href="#all" onclick="mod_setbg_all(\'validate\')">' . cplang('moderate_all_validate') . '</a> &nbsp;<a href="#all" onclick="mod_setbg_all(\'delete\')">' . cplang('moderate_all_delete') . '</a> &nbsp;<a href="#all" onclick="mod_setbg_all(\'ignore\')">' . cplang('moderate_all_ignore') . '</a> &nbsp;<a href="#all" onclick="mod_cancel_all();">' . cplang('moderate_all_cancel') . '</a>', $multipage, false);
 showtablefooter();
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:moderate_picture.php

示例14: lang

        $navtitle = $album['albumname'] . ' - ' . lang('space', 'sb_album', array('who' => $album['username']));
        $nobbname = false;
    } else {
        $nobbname = true;
    }
    if (empty($metakeywords)) {
        $metakeywords = $album['albumname'];
    }
    if (empty($metadescription)) {
        $metadescription = $album['albumname'];
    }
    include_once template("diy:home/space_album_view");
} elseif ($picid) {
    $query = C::t('home_pic')->fetch_all_by_uid($space['uid'], 0, 1, $picid);
    $pic = $query[0];
    if (!$pic || $pic['status'] == 1 && $pic['uid'] != $_G['uid'] && $_G['adminid'] != 1 && $_GET['modpickey'] != modauthkey($pic['picid'])) {
        showmessage('view_images_do_not_exist');
    }
    $picid = $pic['picid'];
    $theurl = "home.php?mod=space&uid={$pic['uid']}&do={$do}&picid={$picid}";
    $album = array();
    if ($pic['albumid']) {
        $album = C::t('home_album')->fetch($pic['albumid']);
        if (!$album) {
            C::t('home_pic')->update_for_albumid($pic['albumid'], array('albumid' => 0));
        }
    }
    if ($album) {
        ckfriend_album($album);
    } else {
        $album['picnum'] = C::t('home_pic')->check_albumpic(0, NULL, $pic['uid']);
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:space_album.php

示例15: dgmdate

         $fids[] = $thread['fid'];
         if ($thread['isgroup']) {
             $groupsfid[$thread[fid]] = $thread['fid'];
         }
         $thread['lastpost'] = dgmdate($thread['lastpost']);
         $threadlist[] = $thread;
     }
     if ($groupsfid) {
         $query = DB::query("SELECT fid, name FROM " . DB::table('forum_forum') . " WHERE fid IN(" . dimplode($groupsfid) . ")");
         while ($row = DB::fetch($query)) {
             $groupsname[$row[fid]] = $row['name'];
         }
     }
     if ($threadlist) {
         foreach ($threadlist as $thread) {
             $threads .= showtablerow('', array('class="td25"', '', '', '', 'class="td25"', 'class="td25"'), array("<input class=\"checkbox\" type=\"checkbox\" name=\"tidarray[]\" value=\"{$thread['tid']}\" />", "<a href=\"forum.php?mod=viewthread&tid={$thread['tid']}" . ($thread['displayorder'] != -4 ? '' : '&modthreadkey=' . modauthkey($thread['tid'])) . "\" target=\"_blank\">{$thread['subject']}</a>" . ($thread['readperm'] ? " - [{$lang['threads_readperm']} {$thread['readperm']}]" : '') . ($thread['price'] ? " - [{$lang['threads_price']} {$thread['price']}]" : ''), "<a href=\"forum.php?mod=forumdisplay&fid={$thread['fid']}\" target=\"_blank\">" . (empty($thread['isgroup']) ? $_G['cache']['forums'][$thread[fid]]['name'] : $groupsname[$thread[fid]]) . "</a>", "<a href=\"home.php?mod=space&uid={$thread['authorid']}\" target=\"_blank\">{$thread['author']}</a>", $thread['replies'], $thread['views'], $thread['lastpost']), TRUE);
         }
     }
     $threadcount = DB::result_first("SELECT count(*) FROM " . DB::table('forum_thread') . " WHERE {$sql}");
     $multi = multi($threadcount, $perpage, $page, ADMINSCRIPT . "?action=threads");
     $multi = preg_replace("/href=\"" . ADMINSCRIPT . "\\?action=threads&amp;page=(\\d+)\"/", "href=\"javascript:page(\\1)\"", $multi);
     $multi = str_replace("window.location='" . ADMINSCRIPT . "?action=threads&amp;page='+this.value", "page(this.value)", $multi);
 } else {
     $query = DB::query("SELECT fid, tid FROM " . DB::table('forum_thread') . " WHERE {$sql}");
     while ($thread = DB::fetch($query)) {
         $fids[] = $thread['fid'];
         $tids .= ',' . $thread['tid'];
     }
     $threadcount = DB::result_first("SELECT count(*) FROM " . DB::table('forum_thread') . " WHERE {$sql}");
     $multi = '';
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:admincp_threads.php


注:本文中的modauthkey函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。