当前位置: 首页>>代码示例>>PHP>>正文


PHP Rights::filterRights方法代码示例

本文整理汇总了PHP中Rights::filterRights方法的典型用法代码示例。如果您正苦于以下问题:PHP Rights::filterRights方法的具体用法?PHP Rights::filterRights怎么用?PHP Rights::filterRights使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Rights的用法示例。


在下文中一共展示了Rights::filterRights方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: reDirect


//.........这里部分代码省略.........
             $form_creator->popArr['headings'] = empty($headings) ? $customExport->getAssignedFields() : $headings;
             $form_creator->popArr['assigned'] = $customExport->getAssignedFields();
             $form_creator->popArr['exportName'] = $customExport->getName();
             $form_creator->popArr['id'] = $customExport->getId();
             break;
         case 'PAD':
             // Project Admin. Fall through to PRJ case below.
             $form_creator->getArr['uniqcode'] = "PRJ";
         case 'PRJ':
             $form_creator->formPath = '/templates/eimadmin/project.php';
             $project = new Projects();
             $customer = new Customer();
             $form_creator->popArr['cusid'] = $customer->fetchCustomers();
             $form_creator->popArr['employeeList'] = EmpInfo::getEmployeeMainDetails();
             if ($getArr['capturemode'] == 'updatemode') {
                 $form_creator->popArr['editArr'] = $project->fetchProject($getArr['id']);
                 $gw = new ProjectAdminGateway();
                 $form_creator->popArr['admins'] = $gw->getAdmins($getArr['id']);
             }
             break;
         case 'PAC':
             $form_creator->formPath = '/templates/eimadmin/projectActivity.php';
             /* If a HR admin, show all projects. Otherwise only show projects for which
              * user is an admin
              */
             $authorizeObj = new authorize($_SESSION['empID'], $_SESSION['isAdmin']);
             if ($authorizeObj->isAdmin()) {
                 $projects = new Projects();
                 /* Filter only not deleted projects */
                 $projects->setDeleted(Projects::PROJECT_NOT_DELETED);
                 $projectList = $projects->fetchProjects();
             } else {
                 if ($authorizeObj->isProjectAdmin()) {
                     $gw = new ProjectAdminGateway();
                     $projectList = $gw->getProjectsForAdmin($_SESSION['empID']);
                 }
             }
             /* If projectId given, get activities for that project else load first
              * project in list
              */
             $projectId = null;
             $activities = array();
             if (!empty($projectList)) {
                 if (isset($getArr['projectId']) && ($authorizeObj->isAdmin() || $authorizeObj->isProjectAdminOf($getArr['projectId']))) {
                     $projectId = $getArr['projectId'];
                 } else {
                     $projectId = $projectList[0]->getProjectId();
                 }
                 $activities = ProjectActivity::getActivityList($projectId);
             }
             $form_creator->popArr['projects'] = $projectList;
             $form_creator->popArr['projectId'] = $projectId;
             $form_creator->popArr['activities'] = $activities;
             break;
         case 'USR':
             $form_creator->formPath = '/templates/maintenance/users.php';
             $user = new Users();
             if ($getArr['capturemode'] == 'addmode') {
                 $form_creator->popArr['emplist'] = $user->getEmployeeCodes();
                 $form_creator->popArr['uglist'] = $user->getUserGroupCodes();
             } elseif ($getArr['capturemode'] == 'updatemode') {
                 $form_creator->popArr['editArr'] = $user->filterUsers($getArr['id']);
                 $form_creator->popArr['emplist'] = $user->getEmployeeCodes();
                 $form_creator->popArr['uglist'] = $user->getUserGroupCodes();
                 //$form_creator ->popArr['editArr'] = $user->filterChangeUsers($getArr['id']);
             }
             $form_creator->popArr['employeeSearchList'] = EmpInfo::getEmployeeSearchList();
             break;
         case 'USG':
             $form_creator->formPath = '/templates/maintenance/usergroups.php';
             $usrgrp = new UserGroups();
             if ($getArr['capturemode'] == 'updatemode') {
                 $form_creator->popArr['editArr'] = $usrgrp->filterUserGroups($getArr['id']);
             }
             break;
         case 'UGR':
             $form_creator->formPath = '/templates/maintenance/AdminMenu.php';
             $urights = new Rights();
             $usergroup = new UserGroups();
             $form_creator->popArr['ugDet'] = $usergroup->filterUserGroups($getArr['id']);
             $form_creator->popArr['modlist'] = $urights->getAllModules();
             if (isset($getArr['editID'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID'];
                 $form_creator->popArr['editArr'] = $urights->filterRights($arr);
             } else {
                 $form_creator->popArr['modlistUnAss'] = $urights->getModuleCodes($getArr['id']);
             }
             $form_creator->popArr['modlistAss'] = $urights->getAssRights($getArr['id']);
             break;
         case 'LDAP':
             if ($_SESSION['ldap'] == "enabled") {
                 $form_creator->formPath = '/templates/eimadmin/ldapConfiguration.php';
                 $ldapConfigObj = new LdapDetails();
                 $form_creator->popArr['editArr'] = $ldapConfigObj->retrieveLdapDetails();
             }
             break;
     }
     $form_creator->display();
 }
开发者ID:googlecode-mirror,项目名称:pucit-orangehrm,代码行数:101,代码来源:ViewController.php

示例2: reDirect

 function reDirect($getArr, $object = null)
 {
     $form_creator = new FormCreator($getArr);
     switch ($getArr['mtcode']) {
         case 'BUG':
             $form_creator->formPath = '/templates/maintenance/bugs.php';
             $bug = new Bugs();
             $form_creator->popArr['module'] = $bug->getAlias('module');
             break;
         case 'DVR':
             $form_creator->formPath = '/templates/maintenance/dbversions.php';
             $dbvers = new DbVersions();
             if ($getArr['capturemode'] == 'addmode') {
                 $form_creator->popArr['newID'] = $dbvers->getLastRecord();
             } elseif ($getArr['capturemode'] == 'updatemode') {
                 $form_creator->popArr['editArr'] = $dbvers->filterdbVersions($getArr['id']);
             }
             break;
         case 'MOD':
             $form_creator->formPath = '/templates/maintenance/modules.php';
             $modls = new Modules();
             if ($getArr['capturemode'] == 'addmode') {
                 $form_creator->popArr['version'] = $modls->getVersionList();
             } elseif ($getArr['capturemode'] == 'updatemode') {
                 $form_creator->popArr['editArr'] = $modls->filterModules($getArr['id']);
                 $form_creator->popArr['version'] = $modls->getVersionList();
             }
             break;
         case 'USG':
             $form_creator->formPath = '/templates/maintenance/usergroups.php';
             $usrgrp = new UserGroups();
             if ($getArr['capturemode'] == 'updatemode') {
                 $form_creator->popArr['editArr'] = $usrgrp->filterUserGroups($getArr['id']);
             }
             break;
         case 'VER':
             $form_creator->formPath = '/templates/maintenance/versions.php';
             $vers = new Versions();
             //$form_creator ->popArr['date'] = $vers->getDate();
             if ($getArr['capturemode'] == 'addmode') {
                 $form_creator->popArr['newID'] = $vers->getLastRecord();
                 $form_creator->popArr['db'] = $vers->getdbVersionList();
                 $form_creator->popArr['file'] = $vers->getFileVersionList();
             } elseif ($getArr['capturemode'] == 'updatemode') {
                 $form_creator->popArr['editArr'] = $vers->filterVersions($getArr['id']);
                 $form_creator->popArr['db'] = $vers->getdbVersionList();
                 $form_creator->popArr['file'] = $vers->getFileVersionList();
             }
             break;
         case 'FVR':
             $form_creator->formPath = '/templates/maintenance/fileversions.php';
             $filever = new fileVersions();
             if ($getArr['capturemode'] == 'addmode') {
                 $form_creator->popArr['newID'] = $filever->getLastRecord();
                 $form_creator->popArr['modlist'] = $filever->getModuleList();
             } elseif ($getArr['capturemode'] == 'updatemode') {
                 $form_creator->popArr['editArr'] = $filever->filterfileVersions($getArr['id']);
                 $form_creator->popArr['modlist'] = $filever->getModuleList();
             }
             break;
         case 'USR':
             $form_creator->formPath = '/templates/maintenance/users.php';
             $user = new Users();
             if ($getArr['capturemode'] == 'addmode') {
                 $form_creator->popArr['emplist'] = $user->getEmployeeCodes();
                 $form_creator->popArr['uglist'] = $user->getUserGroupCodes();
             } elseif ($getArr['capturemode'] == 'updatemode') {
                 $form_creator->popArr['editArr'] = $user->filterUsers($getArr['id']);
                 $form_creator->popArr['emplist'] = $user->getEmployeeCodes();
                 $form_creator->popArr['uglist'] = $user->getUserGroupCodes();
                 //$form_creator ->popArr['editArr'] = $user->filterChangeUsers($getArr['id']);
             }
             break;
         case 'CPW':
             $form_creator->formPath = '/templates/maintenance/changeusers.php';
             $chuser = new Users();
             if ($getArr['capturemode'] == 'updatemode') {
                 $form_creator->popArr['emplist'] = $chuser->getEmployeeCodes();
                 //$form_creator ->popArr['uglist'] = $chuser->getUserGroupCodes();
                 $form_creator->popArr['editArr'] = $chuser->filterChangeUsers($getArr['id']);
             }
             break;
         case 'UGR':
             $form_creator->formPath = '/templates/maintenance/AdminMenu.php';
             $urights = new Rights();
             $usergroup = new UserGroups();
             $form_creator->popArr['ugDet'] = $usergroup->filterUserGroups($getArr['id']);
             $form_creator->popArr['modlist'] = $urights->getAllModules();
             if (isset($getArr['editID'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID'];
                 $form_creator->popArr['editArr'] = $urights->filterRights($arr);
             } else {
                 $form_creator->popArr['modlistUnAss'] = $urights->getModuleCodes($getArr['id']);
             }
             $form_creator->popArr['modlistAss'] = $urights->getAssRights($getArr['id']);
             break;
     }
     $form_creator->display();
 }
开发者ID:googlecode-mirror,项目名称:pucit-orangehrm,代码行数:100,代码来源:MTViewController.php


注:本文中的Rights::filterRights方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。