function servePostRequest($params) { //logger("POST Params : ".print_r($params, true) ); switch ($params['task']) { case 'UPDATE_MODULE': $ret = updateLineItem($params); break; // Handles the case when a module/project/item has to be marked complete. Identifiers in $params['identifier'] // Handles the case when a module/project/item has to be marked complete. Identifiers in $params['identifier'] case 'MARK_COMPLETE': $tmp = $params['identifier']['project_name']; $tmp_proj = new ProjectController(); $tmp_proj->markAsComplete($params); logger("{$tmp} is COMPLETE"); break; // Handles the case when a module/project/item is to be marked invalid. Identifiers in $params['identifier'] // Handles the case when a module/project/item is to be marked invalid. Identifiers in $params['identifier'] case 'MARK_DISABLED': $tmp = $params['identifier']['project_name']; $tmp_proj = new ProjectController(); $tmp_proj->markAsInactive($params); logger("{$tmp} is INVALID"); break; case 'NEW_PROJECT': $ret = addNewProject($params); //$ret = "New project initiated"; break; default: # code... break; } return $ret; }