create_record_child($id_parent, $record_child_data)); break; case "get_child" : print $record_child->get_child($id_parent, $record_child_data); break; case "get_possible_values" : print encoding_normalize::json_encode($record_child->get_possible_values($id_parent)); break; case "create_children": $child_id = $record_child->get_child($id_parent, $record_child_data); if($child_id){ print encoding_normalize::json_encode(array('new_record' => false, 'id'=>$child_id)); }else{ $return = $record_child->create_record_child($id_parent, $record_child_data); $return['new_record'] = true; print encoding_normalize::json_encode($return); } break; case "update_record": $record_child->update_record_child($record_child_data); break; case "delete_record": $record_child->delete_record_child(); break; } break; case 'record_formation': require_once($class_path."/nomenclature/nomenclature_record_formation.class.php"); $record_formation = new nomenclature_record_formation($record_formation_id); switch($action){ case 'save_nomenclature': $data = $record_formation->save_form(${$formation_hash}); if($data){ print encoding_normalize::json_encode($data); }else{ print 0; } break; } break; }