Exemple #1
0
		if($project->sendUpdateNotification(array("Removed rights for user_id ".$_REQUEST['user_id'])) === FALSE){
			$error_msg .= "Error sending update notification!\n";
			debug_message($project->getLastError());
		}
		$_REQUEST['mode'] = 'edit';
	}

}else if($_REQUEST['mode'] == 'delete_attachment'){
	$title = "Delete Attachment";
	$project->get($_REQUEST['id']);

	//Make sure the user is allowed to delete
	if(!$project->hasRights(PROJECT_RIGHT_FULL)){
		fatal_error('Insufficent access rights for this project!');
	}else{
		if($project->deleteAttachment($_REQUEST['attachment_id']) === FALSE){
			$error_msg .= "Error deleting attachment from project!\n";
			debug_message($project->getLastError());
		}
		if($project->sendUpdateNotification(array("Removed attachment ID ".$_REQUEST['attachment_id'])) === FALSE){
			$error_msg .= "Error sending update notification!\n";
			debug_message($project->getLastError());
		}
		$_REQUEST['mode'] = 'edit';
	}

}else if($_REQUEST['mode'] == 'delete_cc'){
	$title = "Delete CC";
	$project->get($_REQUEST['id']);

	//Make sure the user is allowed to delete