Пример #1
0
                 //TODO: Comme pour la veille
                 $docwatch_datasource->set_from_form();
                 $docwatch_datasource->set_num_watch($num_watch);
                 $result = $docwatch_datasource->save();
                 if ($docwatch_datasource->get_id()) {
                     $response = $docwatch_datasource->get_normalized_datasource();
                 }
                 $response = array('result' => $result, 'elementId' => $docwatch_datasource->get_id(), 'response' => $response);
                 print encoding_normalize::json_encode($response);
             }
             break;
         case "delete_source":
             $docwatch_datasource = new docwatch_datasource($id);
             $result = $docwatch_datasource->delete();
             if ($result) {
                 $response = array('result' => $result, 'elementId' => $docwatch_datasource->get_id(), 'response' => $response);
                 print encoding_normalize::json_encode($response);
             }
             break;
         case "get_env":
             $element = new $elem();
             print $element->get_page_env_select($pageid, $name, $var);
             break;
     }
     break;
 case "forms":
     require_once $class_path . "/docwatch/docwatch_ui.class.php";
     switch ($action) {
         case "get_form":
             switch ($form) {
                 case "docwatch_watch_form_tpl":