當前位置: 首頁>>代碼示例>>PHP>>正文


PHP permissions::getUserExtraRights方法代碼示例

本文整理匯總了PHP中permissions::getUserExtraRights方法的典型用法代碼示例。如果您正苦於以下問題:PHP permissions::getUserExtraRights方法的具體用法?PHP permissions::getUserExtraRights怎麽用?PHP permissions::getUserExtraRights使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在permissions的用法示例。


在下文中一共展示了permissions::getUserExtraRights方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: foreach

"> 
<input type="submit" value=" Показать ">
</form>

<br><br>

<table width="100%" border="0" cellspacing="5" cellpadding="5">
<?php 
if ($users) {
    ?>
    <?php 
    foreach ($users as $user) {
        ?>
        <?php 
        $user_groups = permissions::getUserGroups($user['uid']);
        $user_rights = permissions::getUserExtraRights($user['uid']);
        $utype = is_emp($user['role']) ? 'emp' : 'frl';
        ?>
        <tr>
            <td>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
            		<tr valign="top" class="n_qpr">
            			<td width="70" align="center"><a name="user_<?php 
        echo $user['uid'];
        ?>
"></a><a href="/users/<?php 
        echo $user['login'];
        ?>
" class="<?php 
        echo $utype;
        ?>
開發者ID:Nikitian,項目名稱:fl-ru-damp,代碼行數:31,代碼來源:inner_user_list.php

示例2: array

     $rights = permissions::getAllRights();
     $user_groups_data = permissions::getUserGroups($user_id);
     $user_groups = array();
     $user_groups_rights = array();
     foreach ($user_groups_data as $user_group) {
         array_push($user_groups, $user_group['id']);
         $g_rights = permissions::getGroupInfo($user_group['id']);
         if ($g_rights['rights']) {
             foreach ($g_rights['rights'] as $g_right) {
                 if (!in_array($g_right, $user_groups_rights)) {
                     array_push($user_groups_rights, $g_right);
                 }
             }
         }
     }
     $user_rights_data = permissions::getUserExtraRights($user_id);
     $user_rights_allow = array();
     $user_rights_disallow = array();
     foreach ($user_rights_data as $user_right) {
         if ($user_right['is_allow'] == 't') {
             array_push($user_rights_allow, $user_right['id']);
         } else {
             array_push($user_rights_disallow, $user_right['id']);
         }
     }
     $inner_page = 'inner_user_form.php';
     break;
 case 'user_update':
     $user_id = __paramInit('int', 'uid', 'uid');
     permissions::updateUser($user_id, array($_POST['groups']), $_POST['rights_allow']);
     header('Location: /siteadmin/permissions/?action=user_list');
開發者ID:kapai69,項目名稱:fl-ru-damp,代碼行數:31,代碼來源:index.php


注:本文中的permissions::getUserExtraRights方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。