# Pass the taskID forward if we came from a task $url .= "&taskID=" . $_POST["taskID"]; } } } alloc_redirect($url); exit; } } } } else { if ($_POST["delete"]) { // Deleting a record $timeSheet->read_globals(); $timeSheet->select(); $timeSheet->delete(); if (!$TPL["message"]) { alloc_redirect($TPL["url_alloc_timeSheetList"]); } } else { if ($timeSheetID) { // Displaying a record $timeSheet->set_id($timeSheetID); $timeSheet->select(); } else { // create a new record $timeSheet->read_globals(); $timeSheet->read_globals("timeSheet_"); $timeSheet->set_value("status", "edit"); $TPL["message_help"] = "Begin a Time Sheet by selecting a Project and clicking the Create Time Sheet button. A manager must add you to the project before you can create time sheets for it."; }