getMessage().' // '; } define ("_DEBUG", false); define ("_ADVANCED_DEBUG",false); $table_name=_RECORD_LIST_VIEW; $id=$_REQUEST["parent_id"]; $coll_id="letterbox_coll"; // N'est indiqué que parce que la gestion des collections n'est pas encore intégrée $db=new dbquery(); $where_clause=$_SESSION['user']['security'][$coll_id]['CLASS']['where']; $sql="select classified_mr_res_record_multi_id, mr_full_classification_code, title from $table_name where parent_mr_aggregation_id=$id and $where_clause order by mr_full_classification_code"; try { if(_DEBUG){echo "List_document_page_controler: $sql // ";} $db->connect(); $db->query($sql); $result = array(); // Constructing result while($queryLine=$db->fetch_object()){ $result[]="{ 'res_id':'".$queryLine->classified_mr_res_record_multi_id."','title':'".$queryLine->title."', 'tooltip':'Code: ".$queryLine->mr_full_classification_code."' } "; } // String formating in JSON $result="[".implode(",",$result)."]"; $db->disconnect(); } catch (Exception $e) { echo "Impossible to get objects from parent id=$id // "; } header('Content-type: application/json'); echo $result;