本文整理匯總了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;
}