check(true); $user->check_dossier($gDossier,true); $html=var_export($_REQUEST,true); switch($op) { /* ------------------------------------------------------------ */ /* Remove a attribut */ /* ------------------------------------------------------------ */ case 'rmfa': ob_start(); if( ! isset($_GET['ad_id']) || isNumber($_GET['ad_id']) ==0) throw new Exception ( "Parametre ad_id est invalide",11); $ad_id= $_GET['ad_id']; try { $cn->start(); $fa=new Fiche_Attr($cn,$ad_id); $fa->delete(); $cn->commit(); } catch (Exception $e) { $cn->rollback(); echo $e->getMessage(); } $html=ob_get_contents(); ob_clean(); break; /* ------------------------------------------------------------ */ /* Display card detail */ /* ------------------------------------------------------------ */ case 'dc': $f=new Fiche($cn); /* add title + close */ $html=HtmlInput::button_close($ctl); $html.=h2info('Détail fiche'); if ( $qcode != '') { $f->get_by_qcode($qcode); $can_modify=$user->check_action(FIC); if ( $can_modify==1) $card=$f->Display(false); else $card=$f->Display(true); if ( $card == 'FNT' ) { $html.='
Choississez la catégorie de fiche à laquelle vous aimeriez ajouter une fiche
'; $isel=new ISelect('fd_id'); $isel->value=$array; $r.=''; $html.=$r; } break; /*---------------------------------------------------------------------- * SC save card * save the new card (insert) * ----------------------------------------------------------------------*/ case 'sc': $html=HtmlInput::button_close($ctl); $html.=h2info('Nouvelle fiche'); if ( $user->check_action(FICADD)==1 ) { $f=new Fiche($cn); $f->insert($fd_id,$_POST); $html.='