$ts = new nexTime(); $ret = $ts->unlockRange($start, $end, $emp); if ($ret > 0) { $error = 'Successfully UN-locked the range of dates...'; $ret = $ts->generateApprovalTimesheetRows($_USER['uid'], $emp); $output = $ret[1]; } elseif ($ret === false) { $error = 'Error! Database Error thrown.'; $output = ''; } break; case 'ackmodified': $start = COM_applyFilter($_REQUEST['startstamp'], true); $end = COM_applyFilter($_REQUEST['endstamp'], true); $ts = new nexTime(); $ret = $ts->setAcknowledgedModified($start, $end, $_USER['uid']); $output = ''; if ($ret) { $error = ''; } else { $error = 'Error! Database Error thrown.'; } break; case 'test': $output = "<tr><td>3</td><td>4</td><td>5</td></tr>"; break; } } else { $output = ""; $error = "Your login has expired - please log back into the system..."; }