本文整理汇总了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));
}
}
}
}
}
}
}
}
示例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))));
}
}
}
}
}
}
}
}
}