예제 #1
0
 function fetch_serial_data()
 {
     global $dbh;
     global $fonction_auteur;
     $myQuery = pmb_mysql_query("SELECT * FROM notices WHERE notice_id='" . $this->serial_id . "' LIMIT 1", $dbh);
     $myPerio = pmb_mysql_fetch_object($myQuery);
     // type du document
     $this->typdoc = $myPerio->typdoc;
     // statut de la notice
     $this->statut = $myPerio->statut;
     $this->commentaire_gestion = $myPerio->commentaire_gestion;
     $this->thumbnail_url = $myPerio->thumbnail_url;
     // code-barre
     $this->code = $myPerio->code;
     // mentions de titre
     $this->tit1 = $myPerio->tit1;
     $this->tit3 = $myPerio->tit3;
     $this->tit4 = $myPerio->tit4;
     // libelle des auteurs
     $this->responsabilites = get_notice_authors($this->serial_id);
     // libelle des éditeurs
     if ($myPerio->ed1_id) {
         $this->ed1_id = $myPerio->ed1_id;
         $editeur = new editeur($this->ed1_id);
         $this->ed1 = $editeur->display;
     }
     if ($myPerio->ed2_id) {
         $this->ed2_id = $myPerio->ed2_id;
         $editeur = new editeur($this->ed2_id);
         $this->ed2 = $editeur->display;
     }
     // année d'édition
     $this->year = $myPerio->year;
     $this->date_parution_perio = serial::get_date_parution($this->year);
     // zone des notes
     $this->n_gen = $myPerio->n_gen;
     $this->n_contenu = $myPerio->n_contenu;
     $this->n_resume = $myPerio->n_resume;
     // mise à jour des catégories
     $this->categories = get_notice_categories($this->serial_id);
     // indexation interne
     if ($myPerio->indexint) {
         $this->indexint = $myPerio->indexint;
         $indexint = new indexint($this->indexint);
         if ($indexint->comment) {
             $this->indexint_lib = $indexint->name . " - " . $indexint->comment;
         } else {
             $this->indexint_lib = $indexint->name;
         }
     }
     // indexation libre
     $this->index_l = $myPerio->index_l;
     // libelle des langues
     $this->langues = get_notice_langues($this->serial_id, 0);
     // langues de la publication
     $this->languesorg = get_notice_langues($this->serial_id, 1);
     // langues originales
     // lien vers une ressource électronique
     $this->lien = $myPerio->lien;
     $this->eformat = $myPerio->eformat;
     $this->signature = $myPerio->signature;
     // Montrer ou pas le bulletinage en opac
     $this->opac_visible_bulletinage = $myPerio->opac_visible_bulletinage;
     // Autoriser la demande d'abonnement à l'OPAC
     $this->opac_serialcirc_demande = $myPerio->opac_serialcirc_demande;
     $this->indexation_lang = $myPerio->indexation_lang;
     $this->is_new = $myPerio->notice_is_new;
     $this->date_is_new = $myPerio->notice_date_is_new;
     $this->notice_link = array();
     //liens vers autres notices
     $requete = "\n\t\tSELECT notices_relations.* FROM notices_relations\n\t\tLEFT OUTER JOIN bulletins ON bulletins.num_notice=notices_relations.num_notice AND bulletins.bulletin_notice=notices_relations.linked_notice\n\t\tWHERE (notices_relations.num_notice=" . $this->serial_id . " OR notices_relations.linked_notice=" . $this->serial_id . ")\n\t\tAND (bulletin_notice IS NULL OR bulletins.bulletin_notice!=" . $this->serial_id . ")\n\t\tORDER BY rank";
     $result_rel = pmb_mysql_query($requete) or die(pmb_mysql_error());
     if (pmb_mysql_num_rows($result_rel)) {
         $i = 0;
         while ($r_rel = pmb_mysql_fetch_object($result_rel)) {
             if ($r_rel->linked_notice == $this->serial_id) {
                 //notice en cours est notice fille
                 $this->notice_link['down'][$i]['relation_direction'] = 'down';
                 $this->notice_link['down'][$i]['id_notice'] = $r_rel->num_notice;
                 $this->notice_link['down'][$i]['title_notice'] = $this->get_notice_title($r_rel->num_notice);
                 $this->notice_link['down'][$i]['rank'] = $r_rel->rank;
                 $this->notice_link['down'][$i]['relation_type'] = $r_rel->relation_type;
             } elseif ($r_rel->num_notice == $this->serial_id) {
                 //notice en cours est notice mere
                 $this->notice_link['up'][$i]['relation_direction'] = 'up';
                 $this->notice_link['up'][$i]['id_notice'] = $r_rel->linked_notice;
                 $this->notice_link['up'][$i]['title_notice'] = $this->get_notice_title($r_rel->linked_notice);
                 $this->notice_link['up'][$i]['rank'] = $r_rel->rank;
                 $this->notice_link['up'][$i]['relation_type'] = $r_rel->relation_type;
             }
             $i++;
         }
     }
     $this->create_date = $myPerio->create_date;
     $this->update_date = $myPerio->update_date;
     return $myQuery->nbr_rows;
 }
예제 #2
0
     $var_autfonc = "f_f1_code{$i}";
     $f_aut[] = array('id' => ${$var_autid}, 'fonction' => ${$var_autfonc}, 'type' => '1', 'ordre' => $i);
 }
 // auteurs secondaires
 for ($i = 0; $i < $max_aut2; $i++) {
     $var_autid = "f_aut2_id{$i}";
     $var_autfonc = "f_f2_code{$i}";
     $f_aut[] = array('id' => ${$var_autid}, 'fonction' => ${$var_autfonc}, 'type' => '2', 'ordre' => $i);
 }
 $table['ed1_id'] = $f_ed1_id;
 $table['ed2_id'] = $f_ed2_id;
 $table['year'] = $f_year;
 $table['n_gen'] = $f_n_gen;
 $table['n_contenu'] = $f_n_contenu;
 $table['n_resume'] = $f_n_resume;
 $date_parution = serial::get_date_parution($f_year);
 $table['date_parution'] = $date_parution;
 // categories
 if ($tab_categ_order) {
     $categ_order = explode(",", $tab_categ_order);
     $order = 0;
     foreach ($categ_order as $old_order) {
         $var_categid = "f_categ_id{$old_order}";
         if ($var_categid) {
             $f_categ[] = array('id' => ${$var_categid}, 'ordre' => $order);
             $order++;
         }
     }
 } else {
     for ($i = 0; $i < $max_categ; $i++) {
         $var_categid = "f_categ_id{$i}";