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


PHP Projects::fetchProject方法代碼示例

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


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

示例1: reDirect


//.........這裏部分代碼省略.........
                 $form_creator->popArr['compulsary_fields'] = CustomImport::getCompulsaryFields();
             } else {
                 $customImport = new CustomImport();
                 // Assign compulsary fields
                 $compulsary = CustomImport::getCompulsaryFields();
                 $customImport->setAssignedFields($compulsary);
                 $form_creator->popArr['has_heading'] = true;
                 $form_creator->popArr['available'] = $customImport->getAvailableFields();
                 $form_creator->popArr['assigned'] = $compulsary;
                 $form_creator->popArr['importName'] = null;
                 $form_creator->popArr['id'] = null;
                 $form_creator->popArr['compulsary_fields'] = $compulsary;
             }
             break;
         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();
                 }
開發者ID:googlecode-mirror,項目名稱:pucit-orangehrm,代碼行數:67,代碼來源:ViewController.php

示例2: Customer

			<th class="tableMiddleRight"></th>
		</tr>
	</thead>
	<tbody>
		<?php 
$customerObj = new Customer();
$projectObj = new Projects();
$projectActivityObj = new ProjectActivity();
if (isset($timeExpenses) && is_array($timeExpenses)) {
    foreach ($timeExpenses as $timeExpense) {
        $projectId = $timeExpense->getProjectId();
        $projectName = $projectObj->retrieveProjectName($projectId);
        $customerName = $projectObj->retrieveCustomerName($projectId);
        $activityId = $timeExpense->getActivityId();
        $activityName = $projectActivityObj->retrieveActivityName($activityId);
        $projectDet = $projectObj->fetchProject($projectId);
        $projectActivities = $projectActivityObj->getActivityList($projectId);
        ?>
			<tr id="row[<?php 
        echo $row;
        ?>
]">
				<td class="tableMiddleLeft"></td>
				<td ><input type="checkbox" id="deleteEvent[]" name="deleteEvent[]" value="<?php 
        echo $timeExpense->getTimeEventId();
        ?>
" /></td>
				<td ><select id="cmbProject[<?php 
        echo $row;
        ?>
]" name="cmbProject[]" onfocus="looseCurrFocus();" onchange="$('status').innerHTML='<?php 
開發者ID:googlecode-mirror,項目名稱:pucit-orangehrm,代碼行數:31,代碼來源:timesheetEdit.php

示例3: viewActivityReport

 /**
  * View activity report
  */
 public function viewActivityReport()
 {
     $path = "/templates/time/activityReport.php";
     $timeEventObj = $this->objTime[0];
     $startDate = $this->objTime[1];
     $endDate = $this->objTime[2];
     $pageNo = $this->objTime[3];
     $projectId = $timeEventObj->getProjectId();
     $activityId = $timeEventObj->getActivityId();
     $time = $timeEventObj->getDuration();
     $returnUrl = '?timecode=Time&action=Project_Report_Define';
     if (!$this->authorizeObj->isAdmin() && !$this->authorizeObj->isProjectAdminOf($projectId)) {
         $this->redirect('UNAUTHORIZED_FAILURE', $returnUrl);
     }
     $projectObj = new Projects();
     $project = $projectObj->fetchProject($projectId);
     if (empty($project)) {
         $this->redirect('PROJECT_NOT_FOUND_FAILURE', $returnUrl);
     }
     $activity = ProjectActivity::getActivity($activityId);
     if (empty($activity)) {
         $this->redirect('ACTIVITY_NOT_FOUND_FAILURE', $returnUrl);
     }
     if ($projectId != $activity->getProjectId()) {
         $this->redirect('UNAUTHORIZED_FAILURE', $returnUrl);
     }
     $report = new ProjectReport();
     $count = $report->countEmployeesInActivity($projectId, $activityId, $startDate, $endDate);
     $empTimeArray = $report->getEmployeeActivityTime($projectId, $activityId, $startDate, $endDate, $pageNo);
     $dataArr[0] = $project;
     $dataArr[1] = $activity;
     $dataArr[2] = $startDate;
     $dataArr[3] = $endDate;
     $dataArr[4] = $empTimeArray;
     $dataArr[5] = $count;
     $dataArr[6] = $time;
     $dataArr[7] = $pageNo;
     $template = new TemplateMerger($dataArr, $path);
     $template->display();
 }
開發者ID:noikiy,項目名稱:owaspbwa,代碼行數:43,代碼來源:TimeController.php


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