本文整理汇总了PHP中module_security::get_security_role方法的典型用法代码示例。如果您正苦于以下问题:PHP module_security::get_security_role方法的具体用法?PHP module_security::get_security_role怎么用?PHP module_security::get_security_role使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类module_security
的用法示例。
在下文中一共展示了module_security::get_security_role方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: redirect_browser
* More licence clarification available here: http://codecanyon.net/wiki/support/legal-terms/licensing-terms/
* Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
* Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
* Package Date: 2015-11-25 02:55:20
* IP Address: 67.79.165.254
*/
if (!module_config::can_i('view', 'Settings') || !module_security::can_i('view', 'Security Roles', 'Security')) {
redirect_browser(_BASE_HREF);
}
$security_role_id = $_REQUEST['security_role_id'];
$security_role = array();
if ($security_role_id && $security_role_id != 'new') {
if (class_exists('module_security', false)) {
module_security::check_page(array('category' => 'Security', 'page_name' => 'Security Roles', 'module' => 'security', 'feature' => 'edit'));
}
$security_role = module_security::get_security_role($security_role_id);
if (!$security_role) {
$security_role_id = 'new';
}
}
if ($security_role_id == 'new' || !$security_role_id) {
if (class_exists('module_security', false)) {
module_security::check_page(array('category' => 'Security', 'page_name' => 'Security Roles', 'module' => 'security', 'feature' => 'create'));
}
$security_role = array('security_role_id' => 'new', 'name' => '');
}
if (module_security::can_i('edit', 'Security Roles', 'Security') && isset($_REQUEST['delete_security_permission_id'])) {
$id = (int) $_REQUEST['delete_security_permission_id'];
if ($id > 0) {
delete_from_db('security_permission', 'security_permission_id', $id);
delete_from_db('security_role_perm', 'security_permission_id', $id);