Example #1
0
    $output .= $ts->generateTableHeader($disabled, $isapproval, $ts->determineIfItemIsInLockRangeByDateStamp($startStamp, $uid));
    $retval = $ts->generateTimesheetRows($uid, $startStamp, $numberOfDays, NULL, 0, $disabled, $isapproval);
    $output .= $retval[1];
    $output .= $ts->generateTableFooter($isapproval, $retval[2], $retval[3], $retval[4], $retval[5], $ts->determineIfItemIsInLockRangeByDateStamp($startStamp, $uid));
    $output .= $ts->generateTotalRowCount($retval[0]);
    return $output;
}
if ($_USER['uid'] > 1) {
    switch ($op) {
        case 'deleteentries':
            //delete timesheet entries
            $list = COM_applyFilter($_REQUEST['list']);
            $approvalUID = COM_applyFilter($_REQUEST['approved_by'], true);
            $forWhichUID = COM_applyFilter($_REQUEST['emp'], true);
            $ts = new nexTime();
            $ret = $ts->deleteEntries($list);
            if ($forWhichUID == 0) {
                $output = generateTimesheet();
            } else {
                $output = generateTimesheet($forWhichUID, false, true, $forWhichUID);
            }
            if ($ret) {
                $error = 'Successfully deleted your selected items...';
            } else {
                $error = 'Some of your items could not be deleted as they were approved or rejected...';
            }
            break;
            // case where saving adjustments
        // case where saving adjustments
        case 'savetimesheet_adj':
            $maxRowNumber = COM_applyFilter($_POST['max_row_number'], true);