} // fonctions d'affichage des membres de la page switch ($action) { case 'add': $sub_collection_form = str_replace("!!deb_saisie!!", htmlentities(stripslashes($f_user_input), ENT_QUOTES, $charset), $sub_collection_form); print $sub_collection_form; break; case 'update': require_once "{$class_path}/editor.class.php"; require_once "{$class_path}/collection.class.php"; require_once "{$class_path}/subcollection.class.php"; $value['name'] = $collection_nom; $value['parent'] = $coll_id; $value['issn'] = $issn; $collection = new subcollection(); $collection->update($value); $sel_search_form = str_replace("!!bouton_ajouter!!", $bouton_ajouter, $sel_search_form); $sel_search_form = str_replace("!!deb_rech!!", htmlentities(stripslashes($f_user_input), ENT_QUOTES, $charset), $sel_search_form); print $sel_search_form; print $jscript; show_results($dbh, $collection_nom, 0, 0, $collection->id); break; default: $sel_search_form = str_replace("!!bouton_ajouter!!", $bouton_ajouter, $sel_search_form); $sel_search_form = str_replace("!!deb_rech!!", htmlentities(stripslashes($f_user_input), ENT_QUOTES, $charset), $sel_search_form); print $sel_search_form; print $jscript; show_results($dbh, $user_input, $nbr_lignes, $page); break; } function show_results($dbh, $user_input, $nbr_lignes = 0, $page = 0, $id = 0)
if (!$sup_result) { include './autorites/subcollections/sub_collections_list.inc.php'; } else { error_message($msg[132], $sup_result, 1, "./autorites.php?categ=souscollections&sub=collection_form&id={$id}"); } break; case 'duplicate': $subcollection = new subcollection($id); $id = 0; $subcollection->show_form(true); break; case 'update': // mise à jour d'une sous collection $collection = new subcollection($id); $coll = array('name' => $collection_nom, 'parent' => $coll_id, 'issn' => $issn, 'subcollection_web' => $subcollection_web, 'comment' => $comment, 'statut' => $authority_statut); $collection->update($coll); include './autorites/subcollections/sub_collections_list.inc.php'; break; case 'collection_form': // création d'une sous collection if (!$id) { // affichage du form pour création $collection = new subcollection(); $collection->show_form(); } else { // affichage du form pour modification $collection = new subcollection($id); $collection->show_form(); } break; case 'collection_last':