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


PHP sapp_Global::implode2DArray方法代码示例

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


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

示例1: getdatafromajaxcallAction

 public function getdatafromajaxcallAction()
 {
     $dept_model = new Default_Model_Createtasks();
     $methodKey = $this->_getParam('methodKey', null);
     if ($methodKey == "1") {
         //Get Project Activities based on Selected Project
         $projectid = $this->_getParam('projectid', null);
         $options_data = "";
         if ($projectid != '') {
             $dept_data = $dept_model->getProjectActivities($projectid);
             foreach ($dept_data as $dept) {
                 $options_data .= sapp_Global::selectOptionBuilder($dept['id'], $dept['name']);
             }
         }
         $this->_helper->json(array('options' => $options_data));
     } else {
         if ($methodKey == "2") {
             //get employees by Business Unit code
             $bunit_id = $this->_getParam('bunitid', null);
             $options_data = "";
             if ($bunit_id != '') {
                 $dept_data = $dept_model->getEmployeesByBU($bunit_id);
                 foreach ($dept_data as $dept) {
                     $options_data .= sapp_Global::selectOptionBuilder($dept['id'], $dept['name']);
                 }
             }
             $this->_helper->json(array('options' => $options_data));
         } else {
             if ($methodKey == "3") {
                 //get employees by project code
                 $projectid = $this->_getParam('projectid', null);
                 $options_data = "";
                 $options_data .= sapp_Global::selectOptionBuilder('0', 'Select Resource');
                 if ($projectid != '') {
                     $dept_data = $dept_model->getEmployeesByProject($projectid);
                     foreach ($dept_data as $dept) {
                         $options_data .= sapp_Global::selectOptionBuilder($dept['id'], $dept['name']);
                     }
                 }
                 $this->_helper->json(array('options' => $options_data));
             } else {
                 if ($methodKey == "4") {
                     //get Project Details
                     $projectid = $this->_getParam('projectid', null);
                     $this->_helper->json(array('options' => sapp_Global::_convertArrayToHTMLTable("leavecardtablegrid", "Project Details", $dept_model->getProjectDetails($projectid))));
                 } else {
                     if ($methodKey == "5") {
                         //get Project Existing Tasks
                         $projectid = $this->_getParam('projectid', null);
                         $this->_helper->json(array('options' => sapp_Global::_convertArrayToHTMLTable("leavecardtablegrid", "Existing Tasks", $dept_model->getProjectTaskDetails($projectid))));
                     } else {
                         if ($methodKey == "6") {
                             //get project activites data
                             $projectid = $this->_getParam('projectid', null);
                             $taskid = $this->_getParam('taskid', null);
                             $this->_helper->json(array('options' => sapp_Global::implode2DArray($dept_model->getProjectActivitiesWithData($projectid, $taskid))));
                         } else {
                             if ($methodKey == "7") {
                                 $taskstatusid = $this->_getParam('taskstatusid', null);
                                 $options_data = $this->TasksResultsByStatus($taskstatusid);
                                 $this->_helper->json(array('options' => $options_data));
                             }
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:69,代码来源:CreatetasksController.php

示例2: getdatafromajaxcallAction

 public function getdatafromajaxcallAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $taskallocation_model = new Default_Model_Tasksallocation();
     $methodKey = $this->_getParam('methodKey', null);
     if ($methodKey == "1") {
         //Get Project Tasks
         $projectid = $this->_getParam('projectid', null);
         $options_data = "";
         $options_data .= sapp_Global::selectOptionBuilder('0', 'Select Task');
         if ($projectid != '') {
             $dept_data = $taskallocation_model->getCurrentUserProjectTasks($projectid, $loginUserId, $loginuserGroup);
             foreach ($dept_data as $dept) {
                 $options_data .= sapp_Global::selectOptionBuilder($dept['id'], $dept['name']);
             }
         }
         $this->_helper->json(array('options' => $options_data));
     } else {
         if ($methodKey == "2") {
             //Get Tasks Details for View
             $taskid = $this->_getParam('taskid', null);
             $this->_helper->json(array('options' => sapp_Global::_convertArrayToHTMLTable("leavecardtablegrid", "Task Details", $taskallocation_model->getTaskDetails($taskid))));
         } else {
             if ($methodKey == "3") {
                 //Get Tasks Planned Activities
                 $taskid = $this->_getParam('taskid', null);
                 $this->_helper->json(array('options' => sapp_Global::implode2DArray($taskallocation_model->getTaskActivityDetails($taskid))));
             } else {
                 if ($methodKey == "4") {
                     //Get Project resources
                     $projectid = $this->_getParam('projectid', null);
                     $options_data = "";
                     //$options_data .= sapp_Global::selectOptionBuilder('0', 'Select Resource');
                     if ($projectid != '') {
                         $dept_data = $taskallocation_model->getEmployeesByProject($projectid);
                         foreach ($dept_data as $dept) {
                             $options_data .= sapp_Global::selectOptionBuilder($dept['id'], $dept['name']);
                         }
                     }
                     $this->_helper->json(array('options' => $options_data));
                 } else {
                     if ($methodKey == "5") {
                         //get TaskAllocated data based on Task and Activity
                         $taskid = $this->_getParam('taskid', null);
                         $taskactivityid = $this->_getParam('taskactivityid', null);
                         $this->_helper->json(array('options' => sapp_Global::implode2DArray($taskallocation_model->getAllocatedTasks($taskid, $taskactivityid))));
                     } else {
                         if ($methodKey == "6") {
                             //Get Tasks Planned Activities
                             $taskid = $this->_getParam('taskid', null);
                             $this->_helper->json(array('options' => sapp_Global::implode2DArray($taskallocation_model->getTaskActivityMasterDetails($taskid))));
                         } else {
                             if ($methodKey == "7") {
                                 //Get Tasks Planned Activities
                                 $taskid = $this->_getParam('taskid', null);
                                 $options_data = "";
                                 $options_data .= sapp_Global::selectOptionBuilder('0', 'Select Activity');
                                 if ($taskid != '') {
                                     $dept_data = $taskallocation_model->getTaskActivityDetails($taskid);
                                     foreach ($dept_data as $dept) {
                                         $options_data .= sapp_Global::selectOptionBuilder($dept['activityid'], $dept['Activity']);
                                     }
                                 }
                                 $this->_helper->json(array('options' => $options_data));
                             } else {
                                 if ($methodKey == "8") {
                                     //Get Tasks Planned Activities
                                     $taskid = $this->_getParam('taskid', null);
                                     $this->_helper->json(array('options' => sapp_Global::implode2DArray($taskallocation_model->getTaskActivityAllocationByTaskID($taskid))));
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:82,代码来源:TasksallocationController.php


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