$bib_id))->get_display_list(); } $requete = "SELECT bib_nom, base, search_type FROM z_bib where bib_id ='$bib_id' or bib_id='$form_attr_bib_id' "; $res = pmb_mysql_query($requete); $row=pmb_mysql_fetch_object($res); echo "
$row->bib_nom - $row->base - $row->search_type
"; switch($action) { case 'update': global $form_attr_libelle; if(z_attr::check_data_from_form()) { $z_attr = new z_attr($bib_id, stripslashes($form_attr_libelle)); $z_attr->set_properties_from_form(); $z_attr->save(); } show_zattr($bib_id); break; case 'add': global $form_attr_libelle, $form_attr_attr; if(empty($form_attr_bib_id) || empty($form_attr_libelle) || empty($form_attr_attr)) { $z_attr = new z_attr($bib_id); $z_attr->libelle = stripslashes($form_attr_libelle); $z_attr->attr = stripslashes($form_attr_attr); print $z_attr->get_form(); } else { show_zattr($bib_id); } break; case 'modif': if($bib_id){ global $attr_libelle; $z_attr = new z_attr($bib_id, stripslashes($attr_libelle)); if(pmb_error::get_instance('z_attr')->has_error()) { pmb_error::get_instance('z_attr')->display(1, static::get_url_base()); } else { print $z_attr->get_form(); } } else { show_zattr($bib_id); } break; case 'del': global $attr_libelle; if (($bib_id) && ($attr_libelle)) { z_attr::delete($bib_id); } show_zattr($bib_id); break; default: show_zattr($bib_id); break; }