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


PHP cmsUser::userIsEditor方法代码示例

本文整理汇总了PHP中cmsUser::userIsEditor方法的典型用法代码示例。如果您正苦于以下问题:PHP cmsUser::userIsEditor方法的具体用法?PHP cmsUser::userIsEditor怎么用?PHP cmsUser::userIsEditor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cmsUser的用法示例。


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

示例1: mod_usermenu

function mod_usermenu($module_id, $cfg)
{
    $inCore = cmsCore::getInstance();
    $inUser = cmsUser::getInstance();
    $is_billing = $inCore->isComponentInstalled('billing');
    $is_audio = $inCore->isComponentInstalled('audio');
    $is_video = $inCore->isComponentInstalled('video');
    cmsPage::initTemplate('modules', 'mod_usermenu')->assign('avatar', $inUser->imageurl)->assign('nickname', $inUser->nickname)->assign('login', $inUser->login)->assign('id', $inUser->id)->assign('newmsg', cmsUser::getNewMessages($inUser->id))->assign('is_can_add', cmsUser::isUserCan('content/add'))->assign('is_admin', $inUser->is_admin)->assign('is_editor', cmsUser::userIsEditor())->assign('cfg', $inCore->loadModuleConfig($module_id))->assign('users_cfg', $inCore->loadComponentConfig('users'))->assign('is_billing', $is_billing)->assign('is_audio', $is_audio)->assign('is_video', $is_video)->assign('audio_count', $is_audio ? $inUser->audio_count : 0)->assign('video_count', $is_video ? $inUser->video_count : 0)->assign('balance', $is_billing ? $inUser->balance : 0)->display('mod_usermenu.tpl');
    return true;
}
开发者ID:4uva4ek,项目名称:svato,代码行数:10,代码来源:module.php

示例2: getUsersArray

function getUsersArray($result, $cfg, $inDB)
{
    $users = array();
    while ($usr = $inDB->fetch_assoc($result)) {
        if ($cfg['admin_editor']) {
            if (cmsUser::userIsAdmin($usr['id'])) {
                $usr['genderlink'] = cmsUser::getGenderLink($usr['id'], $usr['nickname'], $usr['gender'], $usr['login'], "color:{$cfg['color_admin']}");
            } elseif (cmsUser::userIsEditor($usr['id'])) {
                $usr['genderlink'] = cmsUser::getGenderLink($usr['id'], $usr['nickname'], $usr['gender'], $usr['login'], "color:{$cfg['color_editor']}");
            } else {
                $usr['genderlink'] = cmsUser::getGenderLink($usr['id'], $usr['nickname'], $usr['gender'], $usr['login']);
            }
        } else {
            $usr['genderlink'] = cmsUser::getGenderLink($usr['id'], $usr['nickname'], $usr['gender'], $usr['login']);
        }
        $users[] = $usr['genderlink'];
    }
    return $users;
}
开发者ID:4uva4ek,项目名称:svato,代码行数:19,代码来源:module.php


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