本文整理汇总了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;
}
示例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;
}