if (!defined('ALLOWED')) die('Appel direct ne sont pas permis'); require_once NOALYSS_INCLUDE."/class/anc_account_table.class.php"; /** * @file * @brief Insert , update delete anc accounting */ $http=new HttpInput(); $cn=Dossier::connect(); $action=$http->request("action"); $p_id=$http->request("p_id", "number"); $ctl_id=$http->request("ctl"); $pa_id=$http->request("pa_id"); $anc=new Poste_analytique_SQL($cn, $p_id); $anc->pa_id=$pa_id; $accounting=new Anc_Account_Table($anc); $accounting->set_object_name($ctl_id); $accounting->set_callback("ajax_misc.php"); $accounting->add_json_param("op", "anc_accounting"); if ($action=="input") { $accounting->send_header(); echo $accounting->ajax_input()->saveXML(); } elseif ($action=="save") { $accounting->send_header(); echo $accounting->ajax_save()->saveXML(); } elseif ($action=="delete") { $accounting->send_header(); echo $accounting->ajax_delete()->saveXML(); }