本文整理匯總了PHP中module_security::get_access_level方法的典型用法代碼示例。如果您正苦於以下問題:PHP module_security::get_access_level方法的具體用法?PHP module_security::get_access_level怎麽用?PHP module_security::get_access_level使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類module_security
的用法示例。
在下文中一共展示了module_security::get_access_level方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
<?php
/**
* Copyright: dtbaker 2012
* Licence: Please check CodeCanyon.net for licence details.
* 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
*/
$user_id = (int) $_REQUEST['user_id'];
// grab the users permissions:
// TODO - move this back into the security plugin - redundant code:
$level = $level = module_security::get_access_level($user_id);
$access_level = $level['access_level'];
$data_access = $level['data_access'];
if (!$access_level) {
$access_level = 2;
}
// default to user.
?>
<script type="text/javascript">
function set_data_access(){
if($('#system_access select').val() == 1){
$('#data_access').hide();
}else{
$('#data_access').show();
}
}
$(function(){