$output = generateTimesheet($userid); $error = ''; break; case 'getproject': $id = COM_applyFilter($_REQUEST['id'], true); $row = COM_applyFilter($_REQUEST['row'], true); $ts = new nexTime(); $output = $ts->getProjectDropDownFromActivityID($id); $output = '<select name="project_id' . $row . '" id="project_id' . $row . '" onchange="changeflag()" class="dropdown_menus">' . $output . '</select>'; $error = ''; break; case 'gettask': $id = COM_applyFilter($_REQUEST['id'], true); $row = COM_applyFilter($_REQUEST['row'], true); $ts = new nexTime(); $output = $ts->getTaskDropDownFromActivityID($id); $output = '<select name="task_id' . $row . '" id="task_id' . $row . '" onchange="changeflag()" class="dropdown_menus">' . $output . '</select>'; $error = ''; break; case 'getsundaytosunday': $date = COM_applyFilter($_REQUEST['date']); $datestamp = strtotime($date); $ts = new nexTime(); $retDateArray = $ts->generateSundayToSundayRange($datestamp); $start = date("Y/m/d", $retDateArray[0]); $end = date("Y/m/d", $retDateArray[1]); $output = "{$start},{$end}"; $error = ''; break; case 'lockrange': $emp = COM_applyFilter($_REQUEST['emp'], true);
$ts = new nexTime(); switch ($whichddl) { case 1: $title = $LANG_NEXTIME_HEADER['nextime_activity_id']; $lid = $CONF_NEXTIME['nexlist_nextime_activities']; $list = $ts->getActivitiesDropDown(0); break; case 2: $title = $LANG_NEXTIME_HEADER['project_id']; $lid = $CONF_NEXTIME['nexlist_nextime_projects']; $list = $ts->getProjectDropDownFromActivityID($selected); break; case 3: $title = $LANG_NEXTIME_HEADER['task_id']; $lid = $CONF_NEXTIME['nexlist_timesheet_tasks']; $list = $ts->getTaskDropDownFromActivityID($selected); break; default: $title = $LANG_NEXTIME_HEADER['nextime_activity_id']; $lid = $CONF_NEXTIME['nexlist_nextime_activities']; break; } $list = str_replace("&", "&", $list); echo $list; echo "<listname>" . htmlentities($title) . "</listname>"; echo "</data>"; break; case 'save': $ts = new nexTime(); header("Cache-Control: no-store, no-cache, must-revalidate"); header("content-type: application/xml");