Пример #1
0
         $section = $docwatch_item->create_section();
         if ($section['id']) {
             $return["state"] = true;
             $return["section"] = $section;
             $return["item"] = $docwatch_item->get_normalized_item();
         }
     }
     print encoding_normalize::json_encode($return);
     break;
 case "itemCreateArticle":
     $return = array();
     $return["action"] = $action;
     $return["state"] = false;
     if ($item_id) {
         $docwatch_item = new docwatch_item($item_id);
         $article = $docwatch_item->create_article();
         if ($article['id']) {
             $return["state"] = true;
             $return["article"] = $article;
             $return["item"] = $docwatch_item->get_normalized_item();
         }
     }
     print encoding_normalize::json_encode($return);
     break;
 case "deleteItem":
     $return = array();
     $return["action"] = $action;
     $return["state"] = false;
     if ($item_id) {
         $docwatch_item = new docwatch_item($item_id);
         if ($docwatch_item->mark_as_deleted()) {