本文整理汇总了PHP中role::get方法的典型用法代码示例。如果您正苦于以下问题:PHP role::get方法的具体用法?PHP role::get怎么用?PHP role::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类role
的用法示例。
在下文中一共展示了role::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ucwords
* showitem.entity.php
*
* showitem.entity dialog
*
*/
// enable or disable logging
error_reporting(E_ALL);
ini_set('display_errors', '1');
// 0 - disabled; 1 - enabled
//
$o = new role($data->data->id);
$o->details();
$sql = "SELECT `id`,CONCAT(`name`,' (',`login`,')') `name` FROM `##_auth_user` WHERE `deleted`='0' ORDER BY `name`;";
$DBO->query($sql);
$users = $DBO->result("objectlist");
$sql = "SELECT `a`.*, IF(IFNULL(`b`.`auth_role_id`,-1)>0,1,0) `applied`\n FROM `##_auth_ace` `a`\n LEFT JOIN `##_auth_acl` `b` ON (`b`.`auth_ace_id`=`a`.`id` AND `b`.`deleted`=0 AND `b`.`auth_role_id`=" . $o->get("id") . ")\n WHERE `a`.`deleted`=0\n ORDER BY `applied` desc, `a`.`name`;";
$DBO->query($sql);
$acl = $DBO->result("objectlist");
?>
<div class="title"><?php
echo ucwords(ROLE_EDIT_ROLE);
?>
</div>
<div class="form">
<div class="column">
<div class="row name">
<div class="caption"><?php
echo ucwords(ROLE_NAME);
?>
<input type="hidden" id="id" value="<?php
echo $o->get('id');
示例2: slashfix
$search = slashfix($_POST['search']);
$qry = DBFactory::getDBQuery();
$qry->execute('select usr_login from kb3_user where usr_login like ' . "'%" . $search . "%'");
while ($row = $qry->getRow()) {
$hitlist[] = $row['usr_login'];
}
$smarty->assignByRef('role', $_POST['role']);
$smarty->assignByRef('user', $hitlist);
$smarty->assign('url', edkURI::page("admin_roles"));
$page->addContext($menubox->generate());
$page->setContent($smarty->fetch(get_tpl('admin_roles_assign')));
$page->generate();
} elseif ($_POST['action'] == 'assign') {
$qry = DBFactory::getDBQuery();
$tmp = role::_get($_POST['role']);
var_dump($tmp);
#$qry->execute('select usr_login from kb3_user where usr_login like '."'%".$search."%'");
} elseif ($_POST['action'] == 'create') {
$page->addContext($menubox->generate());
$page->setContent('to be done');
$page->generate();
} else {
$hardcoded =& role::get(true);
$softcoded =& role::get();
$smarty->assignByRef('hroles', $hardcoded);
$smarty->assignByRef('sroles', $softcoded);
$smarty->assign('url', edkURI::page("admin_roles"));
$page->addContext($menubox->generate());
$page->setContent($smarty->fetch(get_tpl('admin_roles')));
$page->generate();
}