$docwatch_watch->set_section_default_publication_status(stripslashes($section_status)); $result = $docwatch_watch->save(); $response = ""; if ($docwatch_watch->get_id()) { $response = $docwatch_watch->get_informations(); } $response = array('result' => $result, 'elementId' => $docwatch_watch->get_id(), 'response' => $response); print encoding_normalize::json_encode($response); } else { $response = array('result' => false, 'elementId' => $docwatch_watch->get_id(), 'response' => ""); print encoding_normalize::json_encode($response); } break; case "delete_watch": $docwatch_watch = new docwatch_watch($id); $result = $docwatch_watch->delete(); $response = ""; if (!$result) { $response = $docwatch_watch->get_error(); } $response = array('result' => $result, 'elementId' => $docwatch_watch->get_id(), 'response' => $response); print encoding_normalize::json_encode($response); break; case "update_children": switch ($type) { case "category": if (isset($children)) { $children = explode(",", $children); if (count($children)) { foreach ($children as $child) { $query = "UPDATE docwatch_categories SET category_num_parent='" . $id . "' WHERE id_category='" . $child . "'";