Exemple #1
0
     $emp = COM_applyFilter($_REQUEST['emp'], true);
     $ts = new nexTime();
     $ts->unlockTimesheetEntries($datestamp, $emp);
     if ($emp == $_USER['uid']) {
         $output = generateTimesheet($emp);
     } else {
         $output = generateTimesheet($_USER['uid'], false, true, $emp);
     }
     //$output=generateTimesheet($emp);
     $error = 'Successfully UN-locked your timesheet entry...';
     break;
 case 'approveitem':
     $id = COM_applyFilter($_REQUEST['id'], true);
     $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...';