get("ag_id"); } catch (Exception $exc) { echo $exc->getMessage(); error_log($exc->getTraceAsString()); return; } /* * security Who can do it ? */ if ( ! $g_user->can_write_action($ag_id) ) { record_log(__FILE__."security : access refused"); return; } $r=HtmlInput::title_box(_("Détail fiche"), 'search_card'); //-------------------------------------------------------------------------------------------------------------------- // Form search //-------------------------------------------------------------------------------------------------------------------- $r.='
'; $query=$http->get("query", "string",""); $sql_array['query']=$query; $sql_array['typecard']='all'; $sql_array['search_in']=$select->selected; $sql_array['inactive_card']=$inactive; $sql_array['search_cat']=$sel_Category->selected; $fiche=new Card_Multiple($cn); /* Build the SQL and show result */ $sql=$fiche->build_sql($sql_array); $count_card=$fiche->count_sql($sql_array); //-------------------------------------------------------------------------------------------------------------------- // Result //-------------------------------------------------------------------------------------------------------------------- /* We limit the search to MAX_SEARCH_CARD records */ $a=$cn->get_array($sql); $r.=''; $response=ob_get_contents(); ob_end_clean(); $html=escape_xml($response); if ( !headers_sent() ) { header('Content-type: text/xml; charset=UTF-8');} else {echo $response;echo $html;} echo <<$html
EOF;
?>