get_selected_selector(); if($selector){ $section_id = $selector->get_value(); $section_ids = $this->filter_datas("sections",array($section_id)); if($section_ids[0]){ $sections = array(); $section_id = $section_ids[0]; $datas = array(); $i=0; do { $i++; $query = "select id_section,section_num_parent from cms_sections where id_section = ".$section_id; $result = mysql_query($query); if(mysql_num_rows($result)){ $row = mysql_fetch_object($result); $section_id = $row->section_num_parent; $datas[] = $row->id_section; }else{ break; } //en théorie on sort toujours, mais comme c'est un pays formidable, on lock à 100 itérations... }while ($row->section_num_parent != 0 || $i>100); return array_reverse($datas); } } return false; } }