$userid = COM_applyFilter($_REQUEST['uid'], true); $ts = new nexTime(); $ret = $ts->approveSingleItem($id); if ($ret) { $error = 'Successfully approved the item...'; $output = generateTimesheet($userid, false, true); } else { $error = 'Error! Database Error thrown.'; $output = ''; } break; case 'unapproveitem': $id = COM_applyFilter($_REQUEST['id'], true); $userid = COM_applyFilter($_REQUEST['uid'], true); $ts = new nexTime(); $ret = $ts->unApproveSingleItem($id); if ($ret) { $error = 'Successfully un-approved the item...'; $output = generateTimesheet($userid, false, true); } else { $error = 'Error! Database Error thrown.'; $output = ''; } break; case 'rejectitem': $id = COM_applyFilter($_REQUEST['id'], true); $comment = COM_applyFilter($_REQUEST['comment']); $comment = $_REQUEST['comment']; $userid = COM_applyFilter($_REQUEST['uid'], true); $ts = new nexTime(); $ret = $ts->rejectSingleItem($id, $comment);