예제 #1
0
 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 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>";
     }
 }
예제 #4
0
 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;
     }
 }
예제 #5
0
 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>&nbsp;" . 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));
            }
        }
    }
 public function set_vedette_element_from_database()
 {
     $auth = new authperso(0, $this->id);
     $this->isbd = $auth->get_isbd($this->id);
 }
예제 #9
0
 public function set_vedette_element_from_database()
 {
     $auth = new authperso($this->params['id_authority']);
     $this->isbd = $auth->get_isbd($this->id);
 }
예제 #10
0
 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;
     }
 }