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