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


PHP groupperm函数代码示例

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


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

示例1: libfile

require_once libfile('function/post');
$pid = intval(getgpc('pid'));
$sortid = intval(getgpc('sortid'));
$typeid = intval(getgpc('typeid'));
$special = intval(getgpc('special'));
$_G['gp_from'] = !empty($_G['gp_from']) && in_array($_G['gp_from'], array('home', 'portal')) ? $_G['gp_from'] : '';
$postinfo = array('subject' => '');
$thread = array('readperm' => '', 'pricedisplay' => '', 'hiddenreplies' => '');
$_G['forum_dtype'] = $_G['forum_checkoption'] = $_G['forum_optionlist'] = $tagarray = $_G['forum_typetemplate'] = array();
if ($sortid) {
    require_once libfile('function/threadsort');
    threadsort_checkoption($sortid);
}
if ($_G['forum']['status'] == 3) {
    require_once libfile('function/group');
    $status = groupperm($_G['forum'], $_G['uid'], 'post');
    if ($status == -1) {
        showmessage('forum_not_group', 'index.php');
    } elseif ($status == 1) {
        showmessage('forum_group_status_off');
    } elseif ($status == 2) {
        showmessage('forum_group_noallowed', "forum.php?mod=group&fid={$_G['fid']}");
    } elseif ($status == 3) {
        showmessage('forum_group_moderated', "forum.php?mod=group&fid={$_G['fid']}");
    } elseif ($status == 4) {
        showmessage('forum_group_not_groupmember', "forum.php?mod=forumdisplay&fid={$_G['fid']}");
    }
}
if (empty($_G['gp_action'])) {
    showmessage('undefined_action', NULL);
} elseif ($_G['gp_action'] == 'threadsorts') {
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:forum_post.php

示例2: array

    }
    $seodata = array('forum' => $_G['forum']['name'], 'fup' => $forum_up['name'], 'fgroup' => $forum_top['name'], 'page' => intval($_G['gp_page']));
}
$rssauth = $_G['rssauth'];
$rsshead = $_G['setting']['rssstatus'] ? '<link rel="alternate" type="application/rss+xml" title="' . $_G['setting']['bbname'] . ' - ' . $navtitle . '" href="' . $_G['siteurl'] . 'forum.php?mod=rss&fid=' . $_G['fid'] . '&amp;auth=' . $rssauth . "\" />\n" : '';
$forumseoset = array('seotitle' => $_G['forum']['seotitle'], 'seokeywords' => $_G['forum']['keywords'], 'seodescription' => $_G['forum']['seodescription']);
$seotype = 'threadlist';
if ($_G['forum']['status'] == 3) {
    $navtitle = get_title_page($_G['forum']['name'], $_G['page']) . ' - ' . $_G['setting']['navs'][3]['navname'];
    $metakeywords = $_G['forum']['metakeywords'];
    $metadescription = $_G['forum']['description'];
    $_G['seokeywords'] = $_G['setting']['seokeywords']['group'];
    $_G['seodescription'] = $_G['setting']['seodescription']['group'];
    $action = getgpc('action') ? $_G['gp_action'] : 'list';
    require_once libfile('function/group');
    $status = groupperm($_G['forum'], $_G['uid']);
    if ($status == -1) {
        showmessage('forum_not_group', 'group.php');
    } elseif ($status == 1) {
        showmessage('forum_group_status_off');
    } elseif ($status == 2) {
        showmessage('forum_group_noallowed', 'forum.php?mod=group&fid=' . $_G['fid']);
    } elseif ($status == 3) {
        showmessage('forum_group_moderated', 'forum.php?mod=group&fid=' . $_G['fid']);
    }
    $_G['forum']['icon'] = get_groupimg($_G['forum']['icon'], 'icon');
    $_G['grouptypeid'] = $_G['forum']['fup'];
    $_G['forum']['dateline'] = dgmdate($_G['forum']['dateline'], 'd');
    $nav = get_groupnav($_G['forum']);
    $groupnav = $nav['nav'];
    $onlinemember = grouponline($_G['fid']);
开发者ID:kleitz,项目名称:sports,代码行数:31,代码来源:forum_forumdisplay.php

示例3: showmessage

        showmessage('forum_not_group', 'group.php');
    } elseif ($_G['forum']['jointype'] < 0 && !$_G['forum']['ismoderator']) {
        showmessage('forum_group_status_off', 'group.php');
    }
    $groupcache = getgroupcache($_G['fid'], array('replies', 'views', 'digest', 'lastpost', 'ranking', 'activityuser', 'newuserlist'), 604800);
    $_G['forum']['icon'] = get_groupimg($_G['forum']['icon'], 'icon');
    $_G['forum']['banner'] = get_groupimg($_G['forum']['banner']);
    $_G['forum']['dateline'] = dgmdate($_G['forum']['dateline'], 'd');
    $_G['forum']['posts'] = intval($_G['forum']['posts']);
    $_G['grouptypeid'] = $_G['forum']['fup'];
    $groupuser = DB::fetch_first("SELECT * FROM " . DB::table('forum_groupuser') . " WHERE fid='{$_G['fid']}' AND uid='{$_G['uid']}'");
    $onlinemember = grouponline($_G['fid'], 1);
    $groupmanagers = $_G['forum']['moderators'];
}
if (in_array($action, array('out', 'viewmember', 'manage', 'index', 'memberlist'))) {
    $status = groupperm($_G['forum'], $_G['uid'], $action, $groupuser);
    if ($status == -1) {
        showmessage('forum_not_group', 'group.php');
    } elseif ($status == 1) {
        showmessage('forum_group_status_off');
    }
    if ($action != 'index') {
        if ($status == 2) {
            showmessage('forum_group_noallowed', "forum.php?mod=group&fid={$_G['fid']}");
        } elseif ($status == 3) {
            showmessage('forum_group_moderated', "forum.php?mod=group&fid={$_G['fid']}");
        }
    }
}
if (in_array($action, array('index')) && $status != 2) {
    $newuserlist = $activityuserlist = array();
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:forum_group.php

示例4: _checkviewgroup

function _checkviewgroup()
{
    global $_G;
    $_G['action']['action'] = 3;
    require_once libfile('function/group');
    $status = groupperm($_G['forum'], $_G['uid']);
    if ($status == 1) {
        showmessage('forum_group_status_off');
    } elseif ($status == 2) {
        showmessage('forum_group_noallowed', 'forum.php?mod=group&fid=' . $_G['fid']);
    } elseif ($status == 3) {
        showmessage('forum_group_moderated', 'forum.php?mod=group&fid=' . $_G['fid']);
    }
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:14,代码来源:forum_viewthread.php

示例5: getimgthumbname

    if ($attach['isimage']) {
        $activity['attachurl'] = ($attach['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'forum/' . $attach['attachment'];
        $activity['thumb'] = $attach['thumb'] ? getimgthumbname($activity['attachurl']) : $activity['attachurl'];
        $activity['width'] = $attach['thumb'] && $_G['setting']['thumbwidth'] < $attach['width'] ? $_G['setting']['thumbwidth'] : $attach['width'];
    }
    $skipaids[] = $activity['aid'];
}
$applylistverified = array();
$noverifiednum = 0;
$query = C::t('forum_activityapply')->fetch_all_for_thread($_G['tid'], 0, 0, 0, 1);
foreach ($query as $activityapplies) {
    $activityapplies['dateline'] = dgmdate($activityapplies['dateline'], 'u');
    if ($activityapplies['verified'] == 1) {
        $activityapplies['ufielddata'] = dunserialize($activityapplies['ufielddata']);
        if (count($applylist) < $_G['setting']['activitypp']) {
            $activityapplies['message'] = preg_replace("/(" . lang('forum/misc', 'contact') . ".*)/", '', $activityapplies['message']);
            $applylist[] = $activityapplies;
        }
    } else {
        if (count($applylistverified) < 8) {
            $applylistverified[] = $activityapplies;
        }
        $noverifiednum++;
    }
}
$applynumbers = $activity['applynumber'];
$aboutmembers = $activity['number'] >= $applynumbers ? $activity['number'] - $applynumbers : 0;
$allapplynum = $applynumbers + $noverifiednum;
if ($_G['forum']['status'] == 3) {
    $isgroupuser = groupperm($_G['forum'], $_G['uid']);
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:thread_activity.php


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