$g->dev = $_POST['DevID']; } if ($_POST['Status']) { $g->status = $_POST['Status']; } if ($_POST['HolidayID']) { $g->holidayid = $_POST['HolidayID']; $g->holidayDetails = $_POST['HolidayID']; } } $where = ""; if ($g->status > 1) { $where = "statusid > 1"; } //$g->projList=GetProjects(); $g->devList = MakeDropDown("userid", "name", "users", null, "name"); if (!isset($g->EndDate)) { $g->EndDate = date("Y-m-d"); } if (!isset($g->StartDate)) { $g->StartDate = date("Y-m-d"); } $g->trAttr = array("class='odd'", "class='even'"); //select date_format(createddate,"%d-%m-%Y"), comment, date_format(createddate,"%d-%m-%Y"), status //from holidaycompletion, status where holidaycompletion.statusid = status.statusid and holidayid = 11 //if ($g->holidayid>=1) // { $today = date('Y-m-d'); $g->holCols = "Developer, Start Date, EndDate"; $g->holDetails = MakeTable("name, date_format(startdate,\"%d-%m-%Y\"), date_format(enddate,\"%d-%m-%Y\")", "holiday, users", "holiday.developerid = users.userid and enddate > '{$today}' and developerid = {$g->dev}", "startdate desc"); // }
$g->taskid = $_POST['TaskID']; $g->taskDetails = $_POST['TaskID'] . " - " . $_POST['TaskName']; } } $_SESSION['Status'] = $g->status; $_SESSION['CompDate'] = $g->compDate; $_SESSION['StartDate'] = $g->startDate; $_SESSION['Comment'] = $g->comment; $where = ""; if ($g->status > 1) { $where = "statusid > 1"; } //$g->projList=GetProjects(); $g->projList = MakeDropDown("projectid", "projectname", "project", "live='L'", "projectname"); $g->devList = MakeDropDown("userid", "name", "users", null, "name"); $g->statList = MakeDropDown("statusid", "status", "status", $where, "statusid"); if (!isset($g->compDate)) { $g->compDate = date("Y-m-d"); } if (!isset($g->startDate)) { $g->startDate = date("Y-m-d"); } $g->trAttr = array("class='odd'", "class='even'"); //select date_format(createddate,"%d-%m-%Y"), comment, date_format(createddate,"%d-%m-%Y"), status //from taskcompletion, status where taskcompletion.statusid = status.statusid and taskid = 11 if ($g->taskid >= 1) { $g->compCols = "Date Entered, Comment, Estimated Start, Estimated Completion, Status"; $g->compDetails = MakeTable("date_format(createddate,\"%d-%m-%Y\"), comment, date_format(commencedate,\"%d-%m-%Y\"),\r\n date_format(completiondate,\"%d-%m-%Y\"), status", "taskcompletion, status", "taskcompletion.statusid = status.statusid and taskid =" . $g->taskid, "createddate desc"); $g->timeCols = "Year,Month,Time"; $g->timeDetails = MakeTable("year(date), monthname(date), concat (sum(minutes) div 60, ':', lpad(sum(minutes) mod 60,2,0)) hhmm", "time", "taskid=" . $g->taskid, "year(date),month(date)", "year(date), month(date)"); }