post('cat'); $prefix=$http->post('prefix'); $catDoc->insert($cat, $prefix); } catch (Exception $exc) { echo $exc->getMessage(); error_log($exc->getTraceAsString()); } } if (isset($_POST['save'])) { try { $dt_id=$http->post("dt_id", "number"); $name= $prefix= $catDoc=new Document_Type($cn, $dt_id); $catDoc->get(); $catDoc->dt_value=trim($http->post("dt_name"));; $catDoc->dt_prefix=trim($http->post("dt_prefix")); if ($catDoc->dt_value=="") { alert(_("Le nom ne peut pas ĂȘtre vide")); } else { $catDoc->update(); } if ($_POST['seq']!=0&&isNumber($_POST['seq'])==1) { $catDoc->set_number($_POST['seq']); } } catch (Exception $exc) { alert ($exc->getMessage()); error_log($exc->getTraceAsString()); } } $aList=Document_Type::get_list($cn); $addCat=new IText('cat'); $addPrefix=new IText('prefix'); $str_addCat=$addCat->input(); $str_addPrefix=$addPrefix->input(); $str_submit=HtmlInput::submit('add', _('Ajout')); echo '