if (!db_exec($sql)) { $AppUI->setMsg("ins/del err", UI_MSG_ERROR, true); } $AppUI->redirect('', -1); } else { if ($task_id > 0) { $_GET["open_task_id"] = $task_id; } } $AppUI->savePlace(); if (($open_task_id = dPGetParam($_GET, "open_task_id", 0)) > 0 && !in_array($_GET["open_task_id"], $tasks_opened)) { $tasks_opened[] = $_GET["open_task_id"]; } // Closing tasks needs also to be within tasks iteration in order to // close down all child tasks if (($close_task_id = dPGetParam($_GET, "close_task_id", 0)) > 0) { closeOpenedTask($close_task_id); } // We need to save tasks_opened until the end because some tasks are closed within tasks iteration //echo "<pre>"; print_r($tasks_opened); echo "</pre>"; /// End of tasks_opened routine $durnTypes = dPgetSysVal('TaskDurationType'); $taskPriority = dPgetSysVal('TaskPriority'); $task_project = intval(dPgetParam($_GET, 'task_project', null)); //$task_id = intval( dPgetParam( $_GET, 'task_id', null ) ); if ($_REQUEST["user_id"] != '') { $user_id_f = $_REQUEST["user_id"]; } $MyC = isset($_REQUEST["MyC"]) ? $_REQUEST["MyC"] : ''; $task_sort_item1 = dPgetParam($_GET, 'task_sort_item1', ''); $task_sort_type1 = dPgetParam($_GET, 'task_sort_type1', '');
if (!db_exec($sql)) { $AppUI->setMsg('ins/del err', UI_MSG_ERROR, true); } $AppUI->redirect('', -1); } if ($task_id > 0) { $_GET['open_task_id'] = $task_id; } //save place is at end //$AppUI->savePlace(); // shall all tasks be either opened or opened? $open_task_all = dPGetParam($_GET, 'open_task_all', 0); $close_task_all = dPGetParam($_GET, 'close_task_all', 0); // Closing and opening tasks only applies to dynamic tasks or tasks with children $open_task_id = dPGetParam($_GET, 'open_task_id', 0); $close_task_id = dPGetParam($_GET, 'close_task_id', 0); if ($open_task_all) { $tasks_opened = array_unique($tasks_closed); $tasks_closed = array(); } else { if ($close_task_all) { $tasks_closed = array_unique(array_merge($tasks_closed, $tasks_opened)); $tasks_opened = array(); } else { if ($open_task_id) { openClosedTask($open_task_id); } else { if ($close_task_id) { closeOpenedTask($close_task_id); } }
} else { $q->clear(); } $AppUI->redirect('', -1); } else { if ($task_id > 0) { $tasks_opened[] = $task_id; } } $AppUI->savePlace(); if (($open_task_id = dPGetParam($_GET, 'open_task_id', 0)) > 0 && !in_array($_GET['open_task_id'], $tasks_opened)) { $tasks_opened[] = $_GET['open_task_id']; } // Closing tasks needs also to be within tasks iteration in order to // close down all child tasks if (($close_task_id = dPGetParam($_GET, 'close_task_id', 0)) > 0) { closeOpenedTask($close_task_id); } // We need to save tasks_opened until the end because some tasks are closed within tasks iteration /// End of tasks_opened routine $durnTypes = dPgetSysVal('TaskDurationType'); $taskPriority = dPgetSysVal('TaskPriority'); $task_project = $project_id; $task_sort_item1 = dPgetCleanParam($_GET, 'task_sort_item1', ''); $task_sort_type1 = dPgetCleanParam($_GET, 'task_sort_type1', ''); $task_sort_item2 = dPgetCleanParam($_GET, 'task_sort_item2', ''); $task_sort_type2 = dPgetCleanParam($_GET, 'task_sort_type2', ''); $task_sort_order1 = intval(dPgetParam($_GET, 'task_sort_order1', 0)); $task_sort_order2 = intval(dPgetParam($_GET, 'task_sort_order2', 0)); if (isset($_POST['show_task_options'])) { $AppUI->setState('TaskListShowIncomplete', (int) dPgetParam($_POST, 'show_incomplete', 0));
if (($open_task_id = dPGetParam($_GET, 'open_task_id', 0)) > 0 && !in_array($_GET['open_task_id'], $tasks_opened)) { $tasks_opened[] = $_GET['open_task_id']; } // Closing tasks needs also to be within tasks iteration in order to // close down all child tasks if (($close_task_id = dPGetParam($_GET, 'close_task_id', 0)) > 0) { closeOpenedTask($close_task_id); } // Close all tasks at once if (dPGetParam($_GET, 'close_task_all', 0) > 0) { foreach ($tasks_opened as $to) { closeOpenedTask($to); } } // shall all tasks be opened? $open_task_all = dPGetParam($_GET, 'open_task_all', 0); $durnTypes = dPgetSysVal('TaskDurationType'); $taskPriority = dPgetSysVal('TaskPriority'); $task_project = intval(dPgetParam($_GET, 'task_project', null)); $task_sort_item1 = dPgetParam($_GET, 'task_sort_item1', ''); $task_sort_type1 = dPgetParam($_GET, 'task_sort_type1', ''); $task_sort_item2 = dPgetParam($_GET, 'task_sort_item2', ''); $task_sort_type2 = dPgetParam($_GET, 'task_sort_type2', ''); $task_sort_order1 = intval(dPgetParam($_GET, 'task_sort_order1', 0)); $task_sort_order2 = intval(dPgetParam($_GET, 'task_sort_order2', 0)); if (isset($_POST['show_task_options'])) { $AppUI->setState('TaskListShowIncomplete', dPgetParam($_POST, 'show_incomplete', 0)); } $showIncomplete = $AppUI->getState('TaskListShowIncomplete', 0); require_once $AppUI->getModuleClass('projects'); $project =& new CProject();