function SaveNewAction() { $ruleid = $_GET["ruleid"]; $userid = $_GET["userid"]; $operation = $_GET["operation"]; if (isset($_GET["operations_days"])) { $operations_days = $_GET["operations_days"]; $operation_subject = $_GET["operation_subject"]; $operation_message = $_GET["operation_message"]; $operation_message = str_replace("\n", "<br>", $operation_message); $operation = "{$operations_days}||{$operation_subject}||{$operation_message}"; } $action = $_GET["SaveNewAction"]; $action_id = $_GET["action_id"]; if ($action == null) { return null; } $sieve = new clSieve($userid); $hash = $sieve->ParseSubActions($ruleid); if ($action_id == null) { $action_id = count($hash); } if ($operation == null) { $operation = 'NULL'; } $action = str_replace("\n", "<br>", $action); $sieve->_params[$ruleid]["action." . $action_id] = "<operation>{$operation}</operation><action>{$action}</action>"; $sieve->SaveToLDap(); }