$docwatch_item = new docwatch_item($item_id); $docwatch_item->set_interesting(0); if ($docwatch_item->save()) { $return["state"] = true; $return["item"] = $docwatch_item->get_normalized_item(); } } print encoding_normalize::json_encode($return); break; case "itemCreateNotice": $return = array(); $return["action"] = $action; $return["state"] = false; if ($item_id) { $docwatch_item = new docwatch_item($item_id); $record = $docwatch_item->create_notice(); if ($record['id']) { $return["state"] = true; $return["record"] = $record; $return["item"] = $docwatch_item->get_normalized_item(); } } print encoding_normalize::json_encode($return); break; case "itemCreateSection": $return = array(); $return["action"] = $action; $return["state"] = false; if ($item_id) { $docwatch_item = new docwatch_item($item_id); $section = $docwatch_item->create_section();