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


PHP Projects::setDeleted方法代码示例

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


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

示例1: projectObjArr

 /**
  * Build the project object array from the given result set
  *
  * @param resource $result Result set from the database
  * @return array   Array of Project objects
  */
 public static function projectObjArr($result)
 {
     $objArr = null;
     while ($row = mysql_fetch_assoc($result)) {
         $tmpcusArr = new Projects();
         $tmpcusArr->setProjectId($row[self::PROJECT_DB_FIELD_PROJECT_ID]);
         $tmpcusArr->setCustomerId($row[self::PROJECT_DB_FIELD_CUSTOMER_ID]);
         $tmpcusArr->setProjectName($row[self::PROJECT_DB_FIELD_NAME]);
         $tmpcusArr->setProjectDescription($row[self::PROJECT_DB_FIELD_DESCRIPTION]);
         $tmpcusArr->setDeleted($row[self::PROJECT_DB_FIELD_DELETED]);
         $objArr[] = $tmpcusArr;
     }
     return $objArr;
 }
开发者ID:googlecode-mirror,项目名称:pucit-orangehrm,代码行数:20,代码来源:Projects.php

示例2: viewEditTimesheet

 public function viewEditTimesheet($return = "View_Timesheet")
 {
     $timesheetObj = $this->objTime;
     $roles = array(authorize::AUTHORIZE_ROLE_ADMIN, authorize::AUTHORIZE_ROLE_SUPERVISOR);
     $role = $this->authorizeObj->firstRole($roles);
     if ($timesheetObj->getTimesheetId() != null) {
         $timesheetObj->setEmployeeId(null);
     } else {
         if ($_SESSION['empID'] != $timesheetObj->getEmployeeId()) {
             if (!$role || $role == authorize::AUTHORIZE_ROLE_SUPERVISOR && !$this->authorizeObj->isTheSupervisor($timesheetObj->getEmployeeId())) {
                 $this->redirect('UNAUTHORIZED_FAILURE');
             }
         }
     }
     $timesheets = $timesheetObj->fetchTimesheets();
     if ($timesheets == null) {
         if ($_SESSION['empID'] == $timesheetObj->getTimesheetId()) {
             $timesheetObj->addTimesheet();
             $timesheets = $timesheetObj->fetchTimesheets();
         }
     }
     $timesheet = $timesheets[0];
     $timeEventObj = new TimeEvent();
     $timesheetSubmissionPeriodObj = new TimesheetSubmissionPeriod();
     $timesheetSubmissionPeriodObj->setTimesheetPeriodId($timesheet->getTimesheetPeriodId());
     $timesheetSubmissionPeriod = $timesheetSubmissionPeriodObj->fetchTimesheetSubmissionPeriods();
     $timeEventObj->setTimesheetId($timesheet->getTimesheetId());
     $timeEventObj->setEmployeeId($timesheet->getEmployeeId());
     $timeEventObj->setStartTime($timesheet->getStartDate());
     $timeEventObj->setEndTime($timesheet->getEndDate());
     $timeEvents = $timeEventObj->fetchTimeEvents();
     $path = "/templates/time/timesheetEdit.php";
     $customerObj = new Customer();
     $projectObj = new Projects();
     $customers = $customerObj->fetchCustomers();
     // Only fetch non-deleted projects
     $projectObj->setDeleted(Projects::PROJECT_NOT_DELETED);
     $projects = $projectObj->fetchProjects();
     $employeeObj = new EmpInfo();
     $employee = $employeeObj->filterEmpMain($timesheet->getEmployeeId());
     $self = false;
     if ($timesheet->getEmployeeId() == $_SESSION['empID']) {
         $self = true;
     }
     $dataArr[0] = $timesheet;
     $dataArr[1] = $timesheetSubmissionPeriod[0];
     $dataArr[2] = $timeEvents;
     $dataArr[3] = $customers;
     $dataArr[4] = $projects;
     $dataArr[5] = $employee[0];
     $dataArr[6] = $self;
     $dataArr[7] = $roles;
     $dataArr[8] = $return;
     $template = new TemplateMerger($dataArr, $path);
     $template->display();
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:56,代码来源:TimeController.php

示例3: reDirect


//.........这里部分代码省略.........
         case 'CHD':
             $form_creator->formPath = '/templates/eimadmin/customExportHeadingDefine.php';
             $customExport = CustomExport::getCustomExport($getArr['id']);
             $headings = $customExport->getHeadings();
             $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']);
开发者ID:googlecode-mirror,项目名称:pucit-orangehrm,代码行数:67,代码来源:ViewController.php

示例4: viewDefineEmployeeTimeReport

 public function viewDefineEmployeeTimeReport()
 {
     $path = "/templates/time/defineEmployeeTimeReport.php";
     $roles = array(authorize::AUTHORIZE_ROLE_ADMIN, authorize::AUTHORIZE_ROLE_SUPERVISOR);
     $role = $this->authorizeObj->firstRole($roles);
     if (!$role) {
         $this->redirect('UNAUTHORIZED_FAILURE', '?timecode=Time&action=View_Timesheet');
     }
     $employees = null;
     $pendingTimesheets = null;
     $pending = false;
     if ($this->authorizeObj->isSupervisor()) {
         $empRepObj = new EmpRepTo();
         $employees = $empRepObj->getEmpSubDetails($_SESSION['empID']);
         $timesheetObj = new Timesheet();
         $timesheetObj->setStatus(Timesheet::TIMESHEET_STATUS_SUBMITTED);
         for ($i = 0; $i < count($employees); $i++) {
             $timesheetObj->setEmployeeId($employees[$i][0]);
             $newTimesheets = $timesheetObj->fetchTimesheets();
             $pendingTimesheets[$employees[$i][0]] = $newTimesheets;
             if (isset($newTimesheets) && $newTimesheets) {
                 $pending = true;
             }
         }
     }
     $customerObj = new Customer();
     $projectObj = new Projects();
     $customers = $customerObj->fetchCustomers(0, '', -1, 1);
     $projectObj->setDeleted(0);
     // choose only not deleted records
     $projects = $projectObj->fetchProjects();
     $dataArr[0] = $role;
     $dataArr[1] = $employees;
     $dataArr[2] = $projects;
     $dataArr['empList'] = array();
     if ($role == authorize::AUTHORIZE_ROLE_ADMIN) {
         $dataArr['empList'] = EmpInfo::getEmployeeMainDetails();
     } elseif ($role == authorize::AUTHORIZE_ROLE_SUPERVISOR) {
         $dataArr['empList'] = $this->_getSubsForAutoComplete($_SESSION['empID']);
     }
     $template = new TemplateMerger($dataArr, $path);
     $template->display();
 }
开发者ID:googlecode-mirror,项目名称:pucit-orangehrm,代码行数:43,代码来源:TimeController.php


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