Exemple #1
0
         return;
     }
     $manageWorks = new manageWorks();
     $manageWorks->completeWork($workid);
     $manageWorks->addComment($workid, APPNAME, "<B>{$USERNAME}</B> marked task as 'Completed' ");
     send_Action_Response('Success', "Task {$workid} marked as <b>Complete</b> !");
     exit;
     break;
 case 'closeWork':
     $workid = get_POST_var('workid');
     if (!checkPermissions_canUserEditTask($USERNAME, $workid)) {
         send_Action_Response('Fail', 'insufficient privilege !');
         return;
     }
     $manageWorks = new manageWorks();
     $manageWorks->closeWork($workid);
     $manageWorks->addComment($workid, APPNAME, "<B>{$USERNAME}</B> 'Closed' task ");
     send_Action_Response('Success', "Closed Task {$workid} !");
     exit;
     break;
 case 'emailTaskDetails':
     $workid = get_POST_var('workid');
     $toemailId = get_POST_var('emailId');
     $includeDetails = get_POST_var('includeDetails');
     $includeAttachments = get_POST_var('attachments');
     $manageWorks = new manageWorks();
     $taskDetails = $manageWorks->get_workDetails($workid);
     $responseEmail = '';
     $comments_result = mysql_query("select comment_date, comment_by, comment from COMMENTS where workID='{$workid}' and comment_by != '" . APPNAME . "' ORDER BY commentID DESC");
     $COMMENTLOGMESSAGE = "<B>{$USERNAME}</B> emailed task details to {$toemailId} ";
     if ($includeDetails == 'yes') {