function fetch_data() { global $dbh; $this->onglets_info = array(); $this->onglets_auth_list = array(); $authpersos = new authpersos(); // infos des autorités existantes $this->onglets_info = $authpersos->get_onglet_list(); if (!$this->id) { return; } // pour chaque autorités existantes récupérér les autorités affectés à la notice $req = "select * from authperso, notices_authperso,authperso_authorities where id_authperso=authperso_authority_authperso_num and notice_authperso_authority_num=id_authperso_authority and notice_authperso_notice_num=" . $this->id . "\n\t\torder by notice_authperso_order"; $res = pmb_mysql_query($req, $dbh); while ($r = pmb_mysql_fetch_object($res)) { // get isbd ... $this->auth_info[$r->notice_authperso_authority_num]['onglet_num'] = $r->authperso_notice_onglet_num; $this->auth_info[$r->notice_authperso_authority_num]['authperso_name'] = $r->authperso_name; $this->auth_info[$r->notice_authperso_authority_num]['infos_global'] = $r->authperso_infos_global; $this->auth_info[$r->notice_authperso_authority_num]['index_infos_global'] = $r->authperso_index_infos_global; $authperso = new authperso($r->id_authperso); $isbd = $authperso->get_isbd($r->notice_authperso_authority_num); $this->onglets_auth_list[$r->authperso_notice_onglet_num][$r->id_authperso][$r->notice_authperso_authority_num]['id'] = $r->notice_authperso_authority_num; $this->onglets_auth_list[$r->authperso_notice_onglet_num][$r->id_authperso][$r->notice_authperso_authority_num]['isbd'] = $isbd; $this->onglets_auth_list[$r->authperso_notice_onglet_num][$r->id_authperso][$r->notice_authperso_authority_num]['authperso_name'] = $r->authperso_name; $info_fields = $authperso->get_info_fields($r->notice_authperso_authority_num); $this->auth_info[$r->notice_authperso_authority_num]['isbd'] = $isbd; $this->auth_info[$r->notice_authperso_authority_num]['info_fields'] = $info_fields; //printr($info_fields); } }
function show_results($dbh, $user_input, $nbr_lignes = 0, $page = 0, $id = 0) { global $nb_per_page; global $base_url; global $caller; global $callback; global $msg; global $charset; global $no_display; global $authperso_id; $authperso = new authperso($authperso_id); print $authperso->get_list_selector(); }
function fetch_data() { global $dbh; $this->info = array(); if (!$this->id) { return; } $req = "select authperso_authority_authperso_num from authperso_authorities where id_authperso_authority=" . $this->id; $res = pmb_mysql_query($req, $dbh); if ($r = pmb_mysql_fetch_object($res)) { $authperso = new authperso($r->authperso_authority_authperso_num); $this->info['isbd'] = $authperso->get_isbd($this->id); $this->info['view'] = $authperso->get_view($this->id); $this->info['authperso'] = $authperso->get_data(); $this->info['data'] = $authperso->fetch_data_auth($this->id); $this->info['authperso_num'] = $r->authperso_authority_authperso_num; } }
function fetch_data() { global $dbh; $this->auth_info = array(); // pour chaque autorités existantes récupérér les autorités affectés à la notice $req = "select * from authperso, notices_authperso,authperso_authorities where id_authperso=authperso_authority_authperso_num and notice_authperso_authority_num=id_authperso_authority and notice_authperso_notice_num=" . $this->id . "\n\t\torder by notice_authperso_order"; $res = pmb_mysql_query($req, $dbh); while ($r = pmb_mysql_fetch_object($res)) { $this->auth_info[$r->notice_authperso_authority_num]['onglet_num'] = $r->authperso_notice_onglet_num; $this->auth_info[$r->notice_authperso_authority_num]['authperso_name'] = $r->authperso_name; $authperso = new authperso($r->id_authperso); $isbd = $authperso->get_isbd($r->notice_authperso_authority_num); $this->onglets_auth_list[$r->authperso_notice_onglet_num][$r->id_authperso][$r->notice_authperso_authority_num]['id'] = $r->notice_authperso_authority_num; $this->onglets_auth_list[$r->authperso_notice_onglet_num][$r->id_authperso][$r->notice_authperso_authority_num]['isbd'] = $isbd; $this->onglets_auth_list[$r->authperso_notice_onglet_num][$r->id_authperso][$r->notice_authperso_authority_num]['authperso_name'] = $r->authperso_name; $view = $authperso->get_view($r->notice_authperso_authority_num); $this->auth_info[$r->notice_authperso_authority_num]['isbd'] = $isbd; $this->auth_info[$r->notice_authperso_authority_num]['view'] = $view; $this->auth_info[$r->notice_authperso_authority_num]['auth_see'] = "<a href='./index.php?lvl=authperso_see&id=" . $r->notice_authperso_authority_num . "'>{$isbd}</a>"; } }
function fetch_data() { global $PMBuserid; $this->info = array(); $i = 0; $req = "select * from authperso "; $resultat = pmb_mysql_query($req); if (pmb_mysql_num_rows($resultat)) { while ($r = pmb_mysql_fetch_object($resultat)) { $authperso = new authperso($r->id_authperso); //$this->info[$i]=$authperso->get_data(); $this->info[$r->id_authperso] = $authperso->get_data(); $i++; } } }
function getdata() { global $dbh, $msg; global $aut_table_name_list; global $pmb_opac_url; $this->aut_table_name = $aut_table_name_list[$this->aut_table]; $this->aut_list = array(); $rqt = "select * from aut_link where (aut_link_from='" . $this->aut_table . "'\tand aut_link_from_num='" . $this->id . "' )\n\t\tor ( aut_link_to='" . $this->aut_table . "' and aut_link_to_num='" . $this->id . "' and aut_link_reciproc=1 )\n\t\torder by aut_link_type "; $aut_res = pmb_mysql_query($rqt, $dbh); $i = 0; while ($row = pmb_mysql_fetch_object($aut_res)) { $i++; $this->aut_list[$i]["to"] = $row->aut_link_to; $this->aut_list[$i]["to_num"] = $row->aut_link_to_num; $this->aut_list[$i]["type"] = $row->aut_link_type; $this->aut_list[$i]["reciproc"] = $row->aut_link_reciproc; $this->aut_list[$i]["comment"] = $row->aut_link_comment; if ($this->aut_table == $row->aut_link_to and $this->id == $row->aut_link_to_num) { $this->aut_list[$i]["flag_reciproc"] = 1; $this->aut_list[$i]["to"] = $row->aut_link_from; $this->aut_list[$i]["to_num"] = $row->aut_link_from_num; } else { $this->aut_list[$i]["flag_reciproc"] = 0; } switch ($this->aut_list[$i]["to"]) { case AUT_TABLE_AUTHORS: $auteur = new auteur($this->aut_list[$i]["to_num"]); $this->aut_list[$i]["isbd_entry"] = $auteur->isbd_entry; $this->aut_list[$i]["libelle"] = "[" . $msg[133] . "] " . $auteur->isbd_entry; break; case AUT_TABLE_CATEG: $categ = new category($this->aut_list[$i]["to_num"]); $this->aut_list[$i]["isbd_entry"] = $categ->libelle; $this->aut_list[$i]["libelle"] = "[" . $msg[134] . "] " . $categ->libelle; break; case AUT_TABLE_PUBLISHERS: $ed = new editeur($this->aut_list[$i]["to_num"]); $this->aut_list[$i]["isbd_entry"] = $ed->isbd_entry; $this->aut_list[$i]["libelle"] = "[" . $msg[135] . "] " . $ed->isbd_entry; break; case AUT_TABLE_COLLECTIONS: $subcollection = new collection($this->aut_list[$i]["to_num"]); $this->aut_list[$i]["isbd_entry"] = $subcollection->isbd_entry; $this->aut_list[$i]["libelle"] = "[" . $msg[136] . "] " . $subcollection->isbd_entry; break; case AUT_TABLE_SUB_COLLECTIONS: $collection = new subcollection($this->aut_list[$i]["to_num"]); $this->aut_list[$i]["isbd_entry"] = $collection->isbd_entry; $this->aut_list[$i]["libelle"] = "[" . $msg[137] . "] " . $collection->isbd_entry; break; case AUT_TABLE_SERIES: $serie = new serie($this->aut_list[$i]["to_num"]); $this->aut_list[$i]["isbd_entry"] = $serie->name; $this->aut_list[$i]["libelle"] = "[" . $msg[333] . "] " . $serie->name; break; case AUT_TABLE_TITRES_UNIFORMES: $tu = new titre_uniforme($this->aut_list[$i]["to_num"]); $this->aut_list[$i]["isbd_entry"] = $tu->name; $this->aut_list[$i]["libelle"] = "[" . $msg["aut_menu_titre_uniforme"] . "] " . $tu->name; break; case AUT_TABLE_INDEXINT: $indexint = new indexint($this->aut_list[$i]["to_num"]); $this->aut_list[$i]["isbd_entry"] = $indexint->display; $this->aut_list[$i]["libelle"] = "[" . $msg["indexint_menu"] . "] " . $indexint->display; break; case AUT_TABLE_CONCEPT: $concept = new concept($this->aut_list[$i]["to_num"]); $this->aut_list[$i]["isbd_entry"] = $concept->get_display_label(); $this->aut_list[$i]["libelle"] = "[" . $msg["concept_menu"] . "] " . $concept->get_display_label(); break; default: if ($this->aut_list[$i]["to"] > 1000) { // authperso $authperso = new authperso($this->aut_list[$i]["to"] - 1000); $isbd = $authperso->get_isbd($this->aut_list[$i]["to_num"]); $this->aut_list[$i]["isbd_entry"] = $isbd; $this->aut_list[$i]["libelle"] = "[" . $authperso->info['name'] . "] " . $isbd; $this->aut_list[$i]["url_to_gestion"] = "./autorites.php?categ=authperso&sub=authperso_form&id_authperso=&id=" . $this->aut_list[$i]["to_num"]; $this->aut_list[$i]["url_to_opac"] = $pmb_opac_url . "index.php?lvl=authperso_see&id=" . $this->aut_list[$i]["to_num"]; } break; } if ($this->aut_list[$i]["flag_reciproc"]) { $type_relation = new marc_select("relationtype_autup", "f_aut_link_type{$i}", $this->aut_list[$i]["type"]); } else { $type_relation = new marc_select("relationtype_aut", "f_aut_link_type{$i}", $this->aut_list[$i]["type"]); } $this->aut_list[$i]["relation_libelle"] = $type_relation->libelle; } }
function aut_notice_list() { global $msg; global $charset; global $aut_type, $mode, $aut_id; switch ($aut_type) { case "authperso": $authperso = new authperso($mode - 1000); $info = $authperso->get_data(); $isbd = $authperso->get_isbd($aut_id); $display = "<b>" . $info['name'] . "</b> " . htmlentities($isbd, ENT_QUOTES, $charset); $this->human_notice_query = $display; break; } $this->notice_list_common($display); }
public function get_query() { global $id; $post = $_POST; $get = $_GET; if ($post['lvl']) { $niveau = $post['lvl']; } elseif ($get['lvl']) { $niveau = $get['lvl']; } else { $niveau = ''; } $query = ""; if ($id) { $id += 0; switch ($niveau) { case 'notice_display': $query = "select notice_id as id, tit1 as title, n_resume as resume, code, thumbnail_url as logo_url, 'notice' as type from notices where notice_id=" . $id; break; case 'bulletin_display': $query = "select bulletin_id as id, bulletin_titre as title, n_resume as resume, code, thumbnail_url as logo_url, 'bulletin' as type from bulletins left join notices on notice_id=num_notice where bulletin_id=" . $id; break; case 'author_see': $query = "select author_id as id, concat(author_name,' ',author_rejete) as title, author_comment as resume, 'authority' as type from authors where author_id=" . $id; break; case 'titre_uniforme_see': $query = "select tu_id as id, tu_name as title, tu_comment as resume, 'authority' as type from titres_uniformes where tu_id=" . $id; break; case 'serie_see': $query = "select serie_id as id, serie_name as title, 'authority' as type from series where serie_id=" . $id; break; case 'categ_see': $query = "select num_noeud as id, libelle_categorie as title, comment_public as resume, 'authority' as type from categories where num_noeud=" . $id; break; case 'indexint_see': $query = "select indexint_id as id, indexint_name as title, indexint_comment as resume, 'authority' as type from indexint where indexint_id=" . $id; break; case 'publisher_see': $query = "select ed_id as id, ed_name as title, ed_comment as resume, 'authority' as type from publishers where ed_id=" . $id; break; case 'coll_see': $query = "select collection_id as id, collection_name as title, collection_comment as resume, 'authority' as type from collections where collection_id=" . $id; break; case 'subcoll_see': $query = "select sub_coll_id as id, sub_coll_name as title, subcollection_comment as resume, 'authority' as type from sub_collections where sub_coll_id=" . $id; break; case 'etagere_see': $query = "select idetagere as id, name as title, comment as resume, 'etagere' as type from etagere where idetagere=" . $id; break; case 'bannette_see': $query = "select id_bannette as id, nom_bannette as title, comment_public as resume, 'bannette' as type from bannettes where id_bannette=" . $id; break; case 'rss_see': $query = "select id_rss_flux as id, nom_rss_flux as title, descr_rss_flux as resume, 'rss' as type from rss_flux where id_rss_flux=" . $id; break; case 'concept_see': $query = "select id_item as id, value as title from skos_fields_global_index where code_champ =1 and code_ss_champ =1 and id_item = {$id}"; break; case "authperso_see": global $dbh; $query = "select num_type from authperso_custom_values join authperso_custom on authperso_custom_champ = idchamp where authperso_custom_origine = " . $id; $result = pmb_mysql_query($query, $dbh); if (pmb_mysql_num_rows($result)) { $row = pmb_mysql_fetch_object($result); $authperso = new authperso($row->num_type); $query = "select '" . $id . "' as id ,'" . addslashes($authperso->get_isbd($id)) . "' as title"; } default: break; } } return $query; }
public function get_oeuvre_events() { global $dbh; $query = 'select oeuvre_event_authperso_authority_num from tu_oeuvres_events where oeuvre_event_tu_num = "' . $this->id . '" order by oeuvre_event_order'; $result = pmb_mysql_query($query, $dbh); if ($result && pmb_mysql_num_rows($result)) { while ($auth = pmb_mysql_fetch_object($result)) { $this->oeuvre_events[] = array('id' => $auth->oeuvre_event_authperso_authority_num, 'isbd' => authperso::get_isbd($auth->oeuvre_event_authperso_authority_num)); } } }
<?php // +-------------------------------------------------+ // © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net) // +-------------------------------------------------+ // $Id: authperso.inc.php,v 1.6 2015-12-21 15:41:49 vtouchard Exp $ if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) { die("no access"); } require_once './autorites/auth_common.inc.php'; require_once "{$class_path}/authperso.class.php"; // gestion des authperso $authperso = new authperso($id_authperso, $id); print "<h1>" . $msg[140] . " : " . $authperso->info['name'] . "</h1>"; $url_base = "./autorites.php?categ=authperso&sub=&id_authperso={$id_authperso}&user_input=" . rawurlencode(stripslashes($user_input)) . "&exact={$exact}"; switch ($sub) { case 'reach': print $authperso->get_list(); break; case 'delete': $sup_result = $authperso->delete($id); if (!$sup_result) { print $authperso->get_list(); } else { error_message($msg[132], $sup_result, 1, "./autorites.php?categ=authperso&sub=authperso_form&id_authperso={$id_authperso}&id={$id}"); } break; case 'replace': if (!$by) { print $authperso->replace_form($id); } else {
public function set_vedette_element_from_database() { $auth = new authperso(0, $this->id); $this->isbd = $auth->get_isbd($this->id); }
$origine = "TABLEAU"; break; case 'music_form': // récupération des codes if (!count($s_func)) { $s_func = new marc_list('music_form'); } $origine = "TABLEAU"; break; default: $p = explode('_', $completion); if (count($p)) { switch ($p[0]) { case 'authperso': require_once $class_path . '/authperso.class.php'; $authperso = new authperso($p[1]); $array_selector = $authperso->get_ajax_list($start); $origine = 'ARRAY'; break; } } break; } switch ($origine) { case 'SQL': $resultat = pmb_mysql_query($requete) or die(pmb_mysql_error() . "<br />{$requete}"); $i = 1; while ($r = @pmb_mysql_fetch_array($resultat)) { if ($r[2]) { echo "<div id='" . "c" . $id . "_" . $i . "' style='display:none'>{$r['2']}</div>"; }
public function set_vedette_element_from_database() { $auth = new authperso($this->params['id_authority']); $this->isbd = $auth->get_isbd($this->id); }
function getdata() { global $dbh, $msg; global $aut_table_name_list; $this->aut_table_name = $aut_table_name_list[$this->aut_table]; $this->aut_list = array(); $rqt = "select * from aut_link where (aut_link_from='" . $this->aut_table . "'\tand aut_link_from_num='" . $this->id . "' )\n\t\tor ( aut_link_to='" . $this->aut_table . "' and aut_link_to_num='" . $this->id . "' and aut_link_reciproc=1 )\n\t\torder by aut_link_type "; $aut_res = pmb_mysql_query($rqt, $dbh); $i = 0; while ($row = pmb_mysql_fetch_object($aut_res)) { $i++; $this->aut_list[$i]['to'] = $row->aut_link_to; $this->aut_list[$i]['to_num'] = $row->aut_link_to_num; $this->aut_list[$i]['type'] = $row->aut_link_type; $this->aut_list[$i]['reciproc'] = $row->aut_link_reciproc; $this->aut_list[$i]['comment'] = $row->aut_link_comment; if ($this->aut_table == $row->aut_link_to and $this->id == $row->aut_link_to_num) { $this->aut_list[$i]['flag_reciproc'] = 1; $this->aut_list[$i]['to'] = $row->aut_link_from; $this->aut_list[$i]['to_num'] = $row->aut_link_from_num; } else { $this->aut_list[$i]['flag_reciproc'] = 0; } switch ($this->aut_list[$i]['to']) { case AUT_TABLE_AUTHORS: $auteur = new auteur($this->aut_list[$i]['to_num']); $this->aut_list[$i]['isbd_entry'] = $auteur->isbd_entry; $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_author'], $auteur->isbd_entry); break; case AUT_TABLE_CATEG: $categ = new category($this->aut_list[$i]['to_num']); $this->aut_list[$i]['isbd_entry'] = $categ->libelle; $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_categ'], $categ->libelle); break; case AUT_TABLE_PUBLISHERS: $ed = new publisher($this->aut_list[$i]['to_num']); $this->aut_list[$i]['isbd_entry'] = $ed->isbd_entry; $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_publisher'], $ed->isbd_entry); break; case AUT_TABLE_COLLECTIONS: $subcollection = new collection($this->aut_list[$i]['to_num']); $this->aut_list[$i]['isbd_entry'] = $subcollection->isbd_entry; $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_coll'], $subcollection->isbd_entry); break; case AUT_TABLE_SUB_COLLECTIONS: $collection = new subcollection($this->aut_list[$i]['to_num']); $this->aut_list[$i]['isbd_entry'] = $collection->isbd_entry; $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_subcoll'], $collection->isbd_entry); break; case AUT_TABLE_SERIES: $serie = new serie($this->aut_list[$i]['to_num']); $this->aut_list[$i]['isbd_entry'] = $serie->name; $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_serie'], $serie->name); break; case AUT_TABLE_TITRES_UNIFORMES: $tu = new titre_uniforme($this->aut_list[$i]['to_num']); $this->aut_list[$i]['isbd_entry'] = $tu->name; $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_tu'], $tu->name); break; case AUT_TABLE_INDEXINT: $indexint = new indexint($this->aut_list[$i]['to_num']); $this->aut_list[$i]['isbd_entry'] = $indexint->display; $this->aut_list[$i]['libelle'] = sprintf($msg['aut_link_indexint'], $indexint->display); break; case AUT_TABLE_CONCEPT: $concept = new skos_concept($this->aut_list[$i]['to_num']); $this->aut_list[$i]['isbd_entry'] = $concept->get_display_label(); $this->aut_list[$i]['libelle'] = $concept->get_display_label(); break; default: if ($this->aut_list[$i]['to'] > 1000) { // authperso $authperso = new authperso($this->aut_list[$i]['to'] - 1000); $isbd = $authperso->get_isbd($this->aut_list[$i]['to_num']); $this->aut_list[$i]['isbd_entry'] = $isbd; $this->aut_list[$i]['libelle'] = "[" . $authperso->info['name'] . "] " . $isbd; $this->aut_list[$i]["url_to_opac"] = $pmb_opac_url . "index.php?lvl=authperso_see&id=" . $this->aut_list[$i]['to_num']; } break; } if ($this->aut_list[$i]["flag_reciproc"]) { $type_relation = new marc_select("relationtype_autup", "f_aut_link_type{$i}", $this->aut_list[$i]['type']); } else { $type_relation = new marc_select("relationtype_aut", "f_aut_link_type{$i}", $this->aut_list[$i]['type']); } $this->aut_list[$i]['relation_libelle'] = $type_relation->libelle; } }
// $Id: authperso_browser.php,v 1.2 2015-04-03 11:16:29 jpermanne Exp $ // page d'affichage du browser de collections // définition du minimum nécéssaire $base_path = "../../../.."; $class_path = "{$base_path}/classes"; $include_path = "{$base_path}/classes"; $base_auth = "CATALOGAGE_AUTH"; $base_title = "\$msg[6]"; require_once "{$base_path}/includes/init.inc.php"; require_once "{$base_path}/classes/authperso.class.php"; // javascript pour retrouver l'offset dans la liste des titres uniformes $j_offset = "\n<script type='text/javascript'>\n<!--\nfunction jump_anchor(anc) {\n\t// récupération de l'index de l'ancre\n\tfor ( i = 0; i <= document.anchors.length; i++) {\n\t\tif(document.anchors[i].name == anc) {\n\t\t\tanc_index = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (document.all) {\n\t\t// code pour IE\n\t\tdocument.anchors[anc_index].scrollIntoView();\n\t} else {\n\t\t// mettre ici le code pour Mozilla et Netscape quand on aura trouvé\n\t}\n}\n// -->\njump_anchor('{$ancre}');\n</script>\n"; // url du présent browser $browser_url = "./authperso_browser.php"; print "<div id='contenu-frame'>"; if ($limite_affichage == "") { $restriction = " limit 0,30 "; } else { $restriction = ""; } print "<a href='{$browser_url}?limite_affichage=ALL'>{$msg['tout_afficher']}</a><br />"; // affichage de la liste $select = "window.parent.document.location='../../../../catalog.php?categ=search&mode={$mode}&etat=aut_search&aut_type=authperso&authperso_id=" . ($mode - 1000) . "&aut_id=!!auth_id!!&no_rec_history=1'; return(false);"; $authperso = new authperso($mode - 1000); print $authperso->get_search_list("<a href='#' onclick=\"{$select}\">!!isbd!!</a><br />", $restriction); if ($ancre) { print $j_offset; } pmb_mysql_close($dbh); // affichage du footer print "</div></body></html>";