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


PHP Default_Model_Users::getEmployeeSummaryByID方法代码示例

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


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

示例1: getCreateProjectsData

 /**
  * 
  * @param type $sort
  * @param type $by
  * @param type $pageNo
  * @param type $perPage
  * @param type $searchQuery
  * @return type
  */
 public function getCreateProjectsData($sort, $by, $pageNo, $perPage, $searchQuery)
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     /*
      * 1. only for - Login User is part of Project creator, Primary Admin or Secondary Admin
      * 2. only for - Login User's Business Unit Projects
      */
     $usersModel = new Default_Model_Users();
     $loginUserSummary = $usersModel->getEmployeeSummaryByID($loginUserId);
     $where = " (b.isactive = 1) AND (b.businessunit=" . $loginUserSummary['businessunit_id'] . ") ";
     if ($loginuserGroup != MANAGEMENT_GROUP && $loginuserGroup != MANAGER_GROUP) {
         $where .= " AND (b.primarylead = " . $loginUserId . " OR b.secondarylead = " . $loginUserId . " or createdby = " . $loginUserId . ") ";
     }
     if ($searchQuery) {
         $where .= " AND (" . $searchQuery . ")";
     } else {
         $where .= " AND (b.status = 5)";
     }
     $db = Zend_Db_Table::getDefaultAdapter();
     $businessunitsdata = $this->select()->setIntegrityCheck(false)->from(array('b' => 'main_timemanagement_projects'), array('id' => 'b.id', 'projectname' => 'b.projectname', 'description' => 'b.description', 'startdate' => 'date_format(b.startdate,"' . DATEFORMAT_MYSQL . '")', 'enddate' => 'date_format(b.enddate,"' . DATEFORMAT_MYSQL . '")', 'effort' => 'b.effort'))->where($where)->order("{$by} {$sort}")->limitPage($pageNo, $perPage);
     return $businessunitsdata;
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:36,代码来源:Createprojects.php

示例2: getProjectTasksData

 /**
  * 
  * @param type $sort
  * @param type $by
  * @param type $pageNo
  * @param type $perPage
  * @param type $searchQuery
  * @return type
  */
 public function getProjectTasksData($sort, $by, $pageNo, $perPage, $searchQuery)
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     /*
      * 1. only for - Login User is part of Project/Task  creator, Primary Admin or Secondary Admin
      * 2. only for - Login User's Business Unit Projects
      */
     $usersModel = new Default_Model_Users();
     $loginUserSummary = $usersModel->getEmployeeSummaryByID($loginUserId);
     $where = " (b.isactive = 1 and a.isactive = 1) AND (a.businessunit=" . $loginUserSummary['businessunit_id'] . ") ";
     if ($loginuserGroup != MANAGEMENT_GROUP && $loginuserGroup != MANAGER_GROUP) {
         $where .= " AND (b.primarylead = " . $loginUserId . " OR b.secondarylead = " . $loginUserId . " or b.createdby = " . $loginUserId . " or a.primarylead = " . $loginUserId . " OR a.secondarylead = " . $loginUserId . " or a.createdby = " . $loginUserId . ") ";
     }
     //        if ($searchData != '' && $searchData != 'undefined') {
     //            $searchValues = json_decode($searchData);
     //            foreach ($searchValues as $searchQuery =>$key)
     //            if ($searchQuery=='startdate') {
     //                $where .= " AND (" . $searchQuery . ")";
     //            }
     //        }
     $where = " b.isactive = 1 ";
     if ($searchQuery) {
         $where .= " AND " . $searchQuery;
     }
     $db = Zend_Db_Table::getDefaultAdapter();
     $businessunitsdata = $this->select()->setIntegrityCheck(false)->from(array('b' => 'main_timemanagement_project_tasks'), array('id' => 'b.id', 'taskname' => 'b.taskname', 'description' => 'b.description', 'effort' => 'b.effort', 'startdate' => 'date_format(b.startdate,"' . DATEFORMAT_MYSQL . '")', 'enddate' => 'date_format(b.enddate,"' . DATEFORMAT_MYSQL . '")'))->joinLeft(array('a' => 'main_timemanagement_projects'), "a.id=b.projectid ", array('projectname' => 'a.projectname'))->where($where)->order("{$by} {$sort}")->limitPage($pageNo, $perPage);
     return $businessunitsdata;
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:42,代码来源:Createtasks.php

示例3: editAction

 public function editAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $sess_vals = $auth->getStorage()->read();
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $messages['message'] = '';
     $id = $this->getRequest()->getParam('id', null);
     $taskModel = new Default_Model_Createtasks();
     $currprojectsModel = new Default_Model_Createprojects();
     $activityModel = new Default_Model_Createactivities();
     $requi_model = new Default_Model_Requisition();
     $usersModel = new Default_Model_Users();
     $currentUserSummary = $usersModel->getEmployeeSummaryByID($loginUserId);
     $taskAllocationModel = new Default_Model_Tasksallocation();
     $where = "";
     $actionflag = 1;
     $form = new Default_Form_createprojects();
     $form->setAttrib('action', DOMAIN . 'createtasks/edit/id/' . $id);
     //$this->view->activeprojects = $taskModel->getActiveProjects();
     $this->view->activeprojects = $taskAllocationModel->getActiveProjectsForTasksForUser($currentUserSummary['businessunit_id'], $loginUserId, $loginuserGroup);
     $this->view->projectCategories = $taskModel->getProjectCategories();
     $this->view->business_units_list = $requi_model->getBusinessUnits();
     $this->view->allusers = array();
     //$this->view->allusers = $usersModel->getAllActiveUsers();
     try {
         if ($id > 0 && is_numeric($id)) {
             //update code
             $where = "";
             $actionflag = 2;
             $id = abs($id);
             $taskdata = $taskModel->getTaskDataByID($id);
             $Currprojectdata = $currprojectsModel->getProjectDataByID($taskdata['projectid']);
             $form->submit->setLabel('Update Task');
             $this->view->taskpagerefresh = '0';
             $this->view->TaskID = $id;
             $this->view->loginuserGroup = $loginuserGroup;
             $this->view->form = $form;
             $this->view->isEdit = "1";
             $this->view->data = $taskdata;
             $this->view->BUUsers = $usersModel->getAllActiveUsersByBU($Currprojectdata['businessunit']);
             $this->view->TrackingCodes = $currprojectsModel->getTrackingCodesByCategory($Currprojectdata['category']);
             if ($this->getRequest()->getPost()) {
                 $trDb = Zend_Db_Table::getDefaultAdapter();
                 // starting transaction
                 $trDb->beginTransaction();
                 try {
                     $bFlag = true;
                     //Task Details
                     $tprojectSelected = $this->_getParam('projectSelected', null);
                     $ttaskName = $this->_getParam('taskName', null);
                     $ttaskDescription = $this->_getParam('taskDescription', null);
                     $ttaskStartDate = $this->_getParam('taskStartDate', null);
                     $ttaskEndDate = $this->_getParam('taskEndDate', null);
                     $ttaskStatus = $this->_getParam('taskStatus', null);
                     $ttaskPrimaryLead = $this->_getParam('taskPrimaryLead', null);
                     $ttaskSecondaryLead = $this->_getParam('taskSecondaryLead', null);
                     $ttaskEffort = $this->_getParam('taskEffort', null);
                     //Task Activity Details
                     $tprjactivitytaskid = $this->_getParam('prjactivitytaskid', null);
                     $tprjactivityid = $this->_getParam('prjactivityid', null);
                     $tprjactivitysdate = $this->_getParam('prjactivitysdate', null);
                     $tprjactivityedate = $this->_getParam('prjactivityedate', null);
                     $tprjactivityeffort = $this->_getParam('prjactivityeffort', null);
                     $tprojectStartDate1 = sapp_Global::change_date(trim($ttaskStartDate), 'database');
                     $tprojectEndDate1 = sapp_Global::change_date(trim($ttaskEndDate), 'database');
                     $tprojectStartDate2 = sapp_Global::change_date(trim($taskdata['startdate']), 'database');
                     $tprojectEndDate2 = sapp_Global::change_date(trim($taskdata['enddate']), 'database');
                     //get tracking codes for edits
                     $ttrackingcodestartdate = $this->_getParam('trackingcodestartdate', null);
                     $ttrackingcodeenddate = $this->_getParam('trackingcodeenddate', null);
                     $ttrackingcodeeffort = $this->_getParam('trackingcodeenddate', null);
                     $mtaskactivitytrackingdata = array('startdate' => implode(',', $ttrackingcodestartdate), 'enddate' => implode(',', $ttrackingcodeenddate), 'effort' => implode(',', $ttrackingcodeeffort));
                     $this->view->taskactivitytrackingdata = $mtaskactivitytrackingdata;
                     $this->view->taskpagerefresh = '1';
                     if ($tprojectStartDate2 != $tprojectStartDate1 && ($ttrackingcodestartdate <= 0 || $ttrackingcodestartdate == '')) {
                         //$this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => "Tracking code due to change in Project Planned Start Date."));
                         $validationMsg['message'] = 'Tracking code due to change in Task Planned Start Date.';
                         $validationMsg['msgtype'] = 'error';
                         $this->view->validationMsg = $validationMsg;
                         $bFlag = false;
                     } else {
                         if ($tprojectEndDate2 != $tprojectEndDate1 && ($ttrackingcodeenddate <= 0 || $ttrackingcodeenddate == '')) {
                             //$this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => "Tracking code due to change in Project Planned End Date."));
                             $validationMsg['message'] = 'Tracking code due to change in Task Planned End Date.';
                             $validationMsg['msgtype'] = 'error';
                             $this->view->validationMsg = $validationMsg;
                             $bFlag = false;
                         } else {
                             if ($taskdata['effort'] != $ttaskEffort && ($ttrackingcodeeffort <= 0 || $ttrackingcodeeffort == '')) {
                                 //$this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => "Tracking code due to change in Project Planned Effort."));
                                 $validationMsg['message'] = 'Tracking code due to change in Task Planned Effort.';
                                 $validationMsg['msgtype'] = 'error';
                                 $this->view->validationMsg = $validationMsg;
                                 $bFlag = false;
                             } else {
                                 if ($tprojectSelected <= 0) {
//.........这里部分代码省略.........
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:CreatetasksController.php

示例4: editAction

 public function editAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $sess_vals = $auth->getStorage()->read();
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $messages['message'] = '';
     $id = $this->getRequest()->getParam('id', null);
     $taskAllocationModel = new Default_Model_Tasksallocation();
     $activityModel = new Default_Model_Createactivities();
     $requi_model = new Default_Model_Requisition();
     $usersModel = new Default_Model_Users();
     $currentUserSummary = $usersModel->getEmployeeSummaryByID($loginUserId);
     $where = "";
     $actionflag = 1;
     $form = new Default_Form_createprojects();
     $form->setAttrib('action', DOMAIN . 'tasksallocation/edit/id/' . $id);
     //$this->view->activeprojects = $taskAllocationModel->getActiveProjects();
     $this->view->activeprojects = $taskAllocationModel->getActiveProjectsForUser($currentUserSummary['businessunit_id'], $loginUserId, $loginuserGroup);
     $this->view->projectCategories = $taskAllocationModel->getProjectCategories();
     $this->view->business_units_list = $requi_model->getBusinessUnits();
     $this->view->allusers = array();
     //$this->view->allusers = $usersModel->getAllActiveUsers();
     $form->submit->setLabel('Allocate Task Activities');
     $this->view->loginuserGroup = $loginuserGroup;
     $this->view->form = $form;
     if ($this->getRequest()->getPost()) {
         $trDb = Zend_Db_Table::getDefaultAdapter();
         // starting transaction
         $trDb->beginTransaction();
         $tprojectSelected = $this->_getParam('projectSelected', null);
         $ttaskSelected = $this->_getParam('taskSelected', null);
         $ActivitiesForTasks = $taskAllocationModel->getTaskActivityDetails($ttaskSelected);
         $ttaskallocationdelete = $this->_getParam('taskallocationdelete', null);
         $ttaskallocationactivitys = $this->_getParam('taskallocationactivity', null);
         $ttaskallocationresource = $this->_getParam('taskallocationresource', null);
         $ttaskallocationstartdate = $this->_getParam('taskallocationstartdate', null);
         $ttaskallocationenddate = $this->_getParam('taskallocationenddate', null);
         $ttaskallocationeffort = $this->_getParam('taskallocationeffort', null);
         $ttaskallocationrowid = $this->_getParam('taskallocationrowid', null);
         $resCurPos = 0;
         foreach ($ttaskallocationactivitys as $ttaskallocationactivity) {
             $varCurrAction = "0";
             $currRowID = $ttaskallocationrowid[$resCurPos];
             $allocID = $this->getIDbyActivity($ActivitiesForTasks, $ttaskallocationactivity);
             if (is_numeric($currRowID)) {
                 if ($currRowID > 0) {
                     //for Update
                     $mpolicydata = array('taskactivityid' => trim($allocID), 'resourceid' => trim($ttaskallocationresource[$resCurPos]), 'effort' => trim($ttaskallocationeffort[$resCurPos]), 'startdate' => sapp_Global::change_date(trim($ttaskallocationstartdate[$resCurPos]), 'database'), 'enddate' => sapp_Global::change_date(trim($ttaskallocationenddate[$resCurPos]), 'database'), 'modifiedby' => trim($loginUserId), 'modifieddate' => gmdate("Y-m-d H:i:s"));
                     $where = array('id=?' => $currRowID);
                     $varCurrAction = $taskAllocationModel->SaveorUpdateData($mpolicydata, $where);
                 }
             }
             if ($varCurrAction == "0") {
                 //for Insert
                 $mpolicydata = array('taskactivityid' => trim($allocID), 'resourceid' => trim($ttaskallocationresource[$resCurPos]), 'status' => trim('5'), 'effort' => trim($ttaskallocationeffort[$resCurPos]), 'startdate' => sapp_Global::change_date(trim($ttaskallocationstartdate[$resCurPos]), 'database'), 'enddate' => sapp_Global::change_date(trim($ttaskallocationenddate[$resCurPos]), 'database'), 'createdby' => trim($loginUserId), 'createddate' => gmdate("Y-m-d H:i:s"), 'modifiedby' => trim($loginUserId), 'modifieddate' => gmdate("Y-m-d H:i:s"));
                 $where = "";
                 $Id = $taskAllocationModel->SaveorUpdateData($mpolicydata, $where);
             }
             $resCurPos = $resCurPos + 1;
         }
         //for Soft Delete
         foreach ($ttaskallocationdelete as $ttaskallocationdelete1) {
             $isRecordForDelete = $ttaskallocationdelete[$resCurPos];
             if (is_numeric($ttaskallocationdelete1)) {
                 if ($ttaskallocationdelete1 > 0) {
                     $mpolicydata = array('isactive' => '0', 'modifiedby' => trim($loginUserId), 'modifieddate' => gmdate("Y-m-d H:i:s"));
                     $where = array('id=?' => $ttaskallocationdelete1);
                     $varCurrAction = $taskAllocationModel->SaveorUpdateData($mpolicydata, $where);
                 }
             }
         }
         $menuID = -999;
         sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
         $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Task successfully allocated."));
         $trDb->commit();
         $this->_redirect('/tasksallocation');
     }
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:82,代码来源:TasksallocationController.php

示例5: editAction

 public function editAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $sess_vals = $auth->getStorage()->read();
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $messages['message'] = '';
     $id = $this->getRequest()->getParam('id', null);
     $meetingRoom = new Default_Model_Meetingroom();
     $taskModel = new Default_Model_Createtasks();
     $currprojectsModel = new Default_Model_Createprojects();
     $activityModel = new Default_Model_Createactivities();
     $requi_model = new Default_Model_Requisition();
     $usersModel = new Default_Model_Users();
     $currentUserSummary = $usersModel->getEmployeeSummaryByID($loginUserId);
     $taskAllocationModel = new Default_Model_Tasksallocation();
     $where = "";
     $actionflag = 1;
     $form = new Default_Form_createprojects();
     //$form = new Default_Form_createprojects();
     $form->setAttrib('action', DOMAIN . 'meetingroomblock/edit/id/' . $id);
     $this->view->activeprojects = $taskModel->getActiveProjects();
     $this->view->activeprojects = $taskAllocationModel->getActiveProjectsForTasksForUser($currentUserSummary['businessunit_id'], $loginUserId, $loginuserGroup);
     $this->view->projectCategories = $taskModel->getProjectCategories();
     $this->view->business_units_list = $meetingRoom->getBusinessUnits();
     $this->view->meetingrooms = $meetingRoom->getActiveMeetingRooms();
     $this->view->allusers = array();
     //$this->view->allusers = $usersModel->getAllActiveUsers();
     try {
         if ($id > 0 && is_numeric($id)) {
             //update code
             $where = "";
             $actionflag = 2;
             $id = abs($id);
             $meetingdata = $meetingRoom->getMeetingRoomDataByID($id);
             // $Currprojectdata = $currprojectsModel->getProjectDataByID($taskdata['projectid']);
             $form->submit->setLabel('Update Meeting');
             $this->view->taskpagerefresh = '0';
             $this->view->MeetingRoomID = $id;
             $this->view->loginuserGroup = $loginuserGroup;
             $this->view->form = $form;
             $this->view->isEdit = "1";
             $this->view->data = $meetingdata;
             $this->view->delta_recipents_list = $meetingRoom->getRecipentsByBU($meetingdata['businessunit']);
             if ($this->getRequest()->getPost()) {
                 $trDb = Zend_Db_Table::getDefaultAdapter();
                 // starting transaction
                 $trDb->beginTransaction();
                 try {
                     $bFlag = true;
                     //Meeting Room Details
                     $deltameetingrooms = $this->_getParam('deltameetingrooms', null);
                     $meetingDate = $this->_getParam('meetingDate', null);
                     $meetingStartTime = $this->_getParam('meetingStartTime', null);
                     $meetingEndTime = $this->_getParam('meetingEndTime', null);
                     $projectBU = $this->_getParam('projectBU', null);
                     $buResources = $this->_getParam('buResources', null);
                     $clientrecipients = $this->_getParam('clientrecipients', null);
                     $meetingtitle = $this->_getParam('meetingtitle', null);
                     $meetingnotes = $this->_getParam('meetingnotes', null);
                     $deltaOwnerResource = $this->_getParam('deltaOwnerResource', null);
                     $clientOwnerResource = $this->_getParam('clientOwnerResource', null);
                     if ($deltameetingrooms <= 0) {
                         $validationMsg['message'] = 'Please select meetingroom.';
                         $validationMsg['msgtype'] = 'error';
                         $this->view->validationMsg = $validationMsg;
                         $bFlag = false;
                     } else {
                         if (strlen(trim($meetingDate)) <= 0) {
                             $validationMsg['message'] = 'Meeting Date cannot be empty.';
                             $validationMsg['msgtype'] = 'error';
                             $this->view->validationMsg = $validationMsg;
                             $bFlag = false;
                         } else {
                             if (strlen(trim($meetingStartTime)) <= 0) {
                                 $validationMsg['message'] = 'Meeting Start Time cannot be empty.';
                                 $validationMsg['msgtype'] = 'error';
                                 $this->view->validationMsg = $validationMsg;
                                 $bFlag = false;
                             } else {
                                 if (strlen(trim($meetingEndTime)) <= 0) {
                                     $validationMsg['message'] = 'Meeting End Time cannot be empty.';
                                     $validationMsg['msgtype'] = 'error';
                                     $this->view->validationMsg = $validationMsg;
                                     $bFlag = false;
                                 } else {
                                     if (count($projectBU) <= 0) {
                                         $validationMsg['message'] = 'Please select Business Unit.';
                                         $validationMsg['msgtype'] = 'error';
                                         $this->view->validationMsg = $validationMsg;
                                         $bFlag = false;
                                     } else {
                                         if (count($buResources) <= 0) {
                                             $validationMsg['message'] = 'Please select Recipients.';
                                             $validationMsg['msgtype'] = 'error';
                                             $this->view->validationMsg = $validationMsg;
                                             $bFlag = false;
//.........这里部分代码省略.........
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:MeetingroomblockController.php


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