Example #1
0
 function reservation($id_empr = 0, $id_notice = 0, $bulletinage = 0, $cb = '')
 {
     global $dbh;
     $this->id_empr = $id_empr;
     $this->id_notice = $id_notice;
     $this->service = new stdClass();
     if ($bulletinage) {
         $this->id_bulletin = $bulletinage;
         $this->id_notice = 0;
     }
     if ($cb) {
         $query = "select expl_id,expl_notice,expl_bulletin from exemplaires where expl_cb='{$cb}' limit 1";
         $result = pmb_mysql_query($query, $dbh);
         if ($expl = pmb_mysql_fetch_object($result)) {
             $this->id_notice = $expl->expl_notice;
             $this->id_bulletin = $expl->expl_bulletin;
             $this->expl_id = $expl->expl_id;
             $this->expl_cb = $cb;
         } else {
             $this->id_bulletin = 0;
             $this->id_notice = 0;
         }
     }
     if ($this->id_notice) {
         $notice = new notice_affichage($this->id_notice, 0, 0, 0);
         $notice->do_header();
         $this->notice = $notice->notice_header;
     } elseif ($this->id_bulletin) {
         $query = 'SELECT num_notice FROM bulletins WHERE bulletin_id=' . $this->id_bulletin;
         $result = pmb_mysql_query($query, $dbh);
         if (pmb_mysql_num_rows($result)) {
             while ($bulletin = pmb_mysql_fetch_object($result)) {
                 $notice = new notice_affichage($bulletin->num_notice, 0, 0, 0);
                 $notice->bulletin_id = $this->id_bulletin;
                 $notice->do_header();
                 $this->notice = $notice->notice_header;
             }
         }
     }
 }
function bulletin_affichage($id, $type = "")
{
    global $dbh, $msg;
    global $opac_show_exemplaires;
    $display = "";
    $requete = "SELECT bulletin_id, bulletin_numero, bulletin_notice, mention_date, date_date, bulletin_titre, bulletin_cb, date_format(date_date, '" . $msg["format_date_sql"] . "') as aff_date_date,num_notice FROM bulletins WHERE bulletin_id='{$id}'";
    $res = @pmb_mysql_query($requete, $dbh);
    while ($obj = pmb_mysql_fetch_array($res)) {
        $requete3 = "SELECT notice_id FROM notices WHERE notice_id='" . $obj["bulletin_notice"] . "' ";
        $res3 = @pmb_mysql_query($requete3, $dbh);
        while ($obj3 = pmb_mysql_fetch_object($res3)) {
            $notice3 = new notice($obj3->notice_id);
        }
        $notice3->fetch_visibilite();
        //on vient poser l'ancre des docnums...
        $req = "select explnum_id from explnum where explnum_bulletin = " . $obj["bulletin_id"];
        $resultat = pmb_mysql_query($req, $dbh) or die($req . " " . pmb_mysql_error());
        $nb_ex = pmb_mysql_num_rows($resultat);
        $res_print = "<h3><img src=./images/icon_per.gif> " . $notice3->print_resume(1, $css) . "." . " <b>" . $obj["bulletin_numero"] . "</b>" . ($nb_ex ? "&nbsp;<a href='#docnum'>" . ($nb_ex > 1 ? "<img src='" . get_url_icon("globe_rouge.png") . "' />" : "<img src='" . get_url_icon("globe_orange.png") . "' />") . "</a>" : "") . "</h3>\n";
        $num_notice = $obj['num_notice'];
        if ($obj['bulletin_titre']) {
            $res_print .= htmlentities($obj['bulletin_titre'], ENT_QUOTES, $charset) . "<br />";
        }
        if ($obj['mention_date']) {
            $res_print .= $msg['bull_mention_date'] . " &nbsp;" . $obj['mention_date'] . "\n";
        }
        if ($obj['date_date']) {
            $res_print .= "<br />" . $msg['bull_date_date'] . " &nbsp;" . $obj['aff_date_date'] . " \n";
        }
        if ($type != "visionneuse" && $nb_ex) {
            $res_print .= "<br /><a href='#docnum'>" . ($nb_ex > 1 ? "<img src='" . get_url_icon("globe_rouge.png") . "' />" : "<img src='" . get_url_icon("globe_orange.png") . "' />") . "</a>";
        }
        if ($obj['bulletin_cb']) {
            $res_print .= "<br />" . $msg["code_start"] . " " . htmlentities($obj['bulletin_cb'], ENT_QUOTES, $charset) . "\n";
            $code_cb_bulletin = $obj['bulletin_cb'];
        }
    }
    do_image($res_print, $code_cb_bulletin, 0);
    if ($num_notice) {
        // Il y a une notice de bulletin
        $display .= $res_print;
        $opac_notices_depliable = 0;
        $seule = 1;
        //$display .= pmb_bidi(aff_notice($num_notice,0,0)) ;
        if ($type == "visionneuse") {
            $display .= pmb_bidi(aff_notice($num_notice, 1, 1, 0, "", 0, 1));
        } else {
            $display .= pmb_bidi(aff_notice($num_notice, 0, 1, 0, "", 0));
        }
    } else {
        // construction des dépouillements
        $depouill = "<br /><h3>" . $msg['bull_dep'] . "</h3>";
        $requete = "SELECT * FROM analysis, notices, notice_statut WHERE analysis_bulletin='{$id}' AND notice_id = analysis_notice AND statut = id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0)" . ($_SESSION["user_code"] ? " or (notice_visible_opac_abon=1 and notice_visible_opac=1)" : "") . ") ";
        $res = @pmb_mysql_query($requete, $dbh);
        if (pmb_mysql_num_rows($res)) {
            if ($opac_notices_depliable) {
                $depouill .= $begin_result_liste;
            }
            if ($opac_cart_allow) {
                $depouill .= "<a href=\"cart_info.php?id=" . $id . "&lvl=analysis&header=" . rawurlencode(strip_tags($notice_header)) . "\" target=\"cart_info\" class=\"img_basket\" title='" . $msg["cart_add_result_in"] . "'>" . $msg["cart_add_result_in"] . "</a>";
            }
            $depouill .= "<blockquote>";
            while ($obj = pmb_mysql_fetch_array($res)) {
                $depouill .= pmb_bidi(aff_notice($obj["analysis_notice"]));
            }
            $depouill .= "</blockquote>";
        } else {
            $depouill = $msg["no_analysis"];
        }
        $display .= $res_print;
        $display .= $depouill;
        if ($notice3->visu_expl && (!$notice3->visu_expl_abon || $notice3->visu_expl_abon && $_SESSION["user_code"])) {
            if (!$opac_resa_planning) {
                $resa_check = check_statut(0, $id);
                if ($resa_check) {
                    $requete_resa = "SELECT count(1) FROM resa WHERE resa_idbulletin='{$id}'";
                    $nb_resa_encours = pmb_mysql_result(pmb_mysql_query($requete_resa, $dbh), 0, 0);
                    if ($nb_resa_encours) {
                        $message_nbresa = str_replace("!!nbresa!!", $nb_resa_encours, $msg["resa_nb_deja_resa"]);
                    }
                    if ($_SESSION["user_code"] && $allow_book && $opac_resa && !$popup_resa) {
                        $ret_resa .= "<h3>" . $msg["bulletin_display_resa"] . "</h3>";
                        if ($opac_max_resa == 0 || $opac_max_resa > $nb_resa_encours) {
                            if ($opac_resa_popup) {
                                $ret_resa .= "<a href='#' onClick=\"if(confirm('" . $msg["confirm_resa"] . "')){w=window.open('./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup','doresa','scrollbars=yes,width=500,height=600,menubar=0,resizable=yes'); w.focus(); return false;}else return false;\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                            } else {
                                $ret_resa .= "<a href='./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup' onClick=\"return confirm('" . $msg["confirm_resa"] . "')\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                            }
                            $ret_resa .= $message_nbresa;
                        } else {
                            $ret_resa .= str_replace("!!nb_max_resa!!", $opac_max_resa, $msg["resa_nb_max_resa"]);
                        }
                        $ret_resa .= "<br />";
                    } elseif (!$_SESSION["user_code"] && $opac_resa && !$popup_resa) {
                        // utilisateur pas connecté
                        // préparation lien réservation sans être connecté
                        $ret_resa .= "<h3>" . $msg["bulletin_display_resa"] . "</h3>";
                        if ($opac_resa_popup) {
                            $ret_resa .= "<a href='#' onClick=\"if(confirm('" . $msg["confirm_resa"] . "')){w=window.open('./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup','doresa','scrollbars=yes,width=500,height=600,menubar=0,resizable=yes'); w.focus(); return false;}else return false;\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                        } else {
                            $ret_resa .= "<a href='./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup' onClick=\"return confirm('" . $msg["confirm_resa"] . "')\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                        }
                        $ret_resa .= $message_nbresa;
                        $ret_resa .= "<br />";
                    } elseif ($fonction == 'notice_affichage_custom_bretagne') {
                        if ($opac_resa_popup) {
                            $reserver = "<a href='#' onClick=\"if(confirm('" . $msg["confirm_resa"] . "')){w=window.open('./do_resa.php?lvl=resa&id_notice=" . $this->notice_id . "&oresa=popup','doresa','scrollbars=yes,width=500,height=600,menubar=0,resizable=yes'); w.focus(); return false;}else return false;\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                        } else {
                            $reserver = "<a href='./do_resa.php?lvl=resa&id_notice=" . $this->notice_id . "&oresa=popup' onClick=\"return confirm('" . $msg["confirm_resa"] . "')\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                        }
                        $reservernbre = $message_nbresa;
                    } else {
                        $ret_resa = "";
                    }
                    $display .= pmb_bidi($ret_resa);
                }
            }
            if ($opac_show_exemplaires) {
                if ($fonction == 'notice_affichage_custom_bretagne') {
                    $display .= pmb_bidi(notice_affichage_custom_bretagne::expl_list("m", 0, $id));
                } else {
                    $display .= pmb_bidi(notice_affichage::expl_list("m", 0, $id));
                }
            }
        }
        if ($type != "visionneuse" && $notice3->visu_explnum && (!$notice3->visu_explnum_abon || $notice3->visu_explnum_abon && $_SESSION["user_code"])) {
            if ($explnum = show_explnum_per_notice(0, $id, '')) {
                $display .= pmb_bidi("<a name='docnum'><h3>" . $msg["explnum"] . "</h3></a>" . $explnum);
            }
        }
    }
    pmb_mysql_free_result($res);
    $display .= notice_affichage::autres_lectures(0, $id);
    return $display;
}
Example #3
0
            $aff .= "<span>" . $result->message . "</span><br />";
        }
    }
    //	if($result->title) $aff.="<h2>".$result->title."</h2>";
    //	if($result->message) $aff.="<span>".$result->message."</span><br />";
    if ($result->message_loc) {
        $aff .= "<span>" . $result->message_loc . "</span><br />";
    }
    if ($result->message_resa) {
        $aff .= "<span>" . $result->message_resa . "</span><br />";
    }
    if ($result->message_retard) {
        $aff .= "<span>" . $result->message_retard . "</span><br />";
    }
    if ($result->message_amende) {
        $aff .= "<span>" . $result->message_amende . "</span><br />";
    }
    print $aff;
    $requete = "select expl_notice, expl_bulletin from exemplaires where expl_cb ='{$cb_expl}'";
    $resultat = mysql_query($requete);
    $prix = 0;
    if ($r = mysql_fetch_object($resultat)) {
        $current = new notice_affichage($r->expl_notice + $r->expl_bulletin, 0, 1);
        $current->do_header();
        $current->do_isbd();
        $current->do_public();
        $current->genere_double(0, "public");
        $output_final .= $current->result;
        print "<br />" . $output_final;
    }
}
Example #4
0
function doc_num_get_list($id_notices)
{
    global $msg, $dbh, $gestion_acces_active, $gestion_acces_empr_notice;
    $cpt_doc_num = 0;
    foreach ($id_notices as $notice_id) {
        $query = "SELECT explnum_id from explnum where explnum_statut=0 and explnum_notice={$notice_id} and explnum_mimetype IN ('application/pdf','application/x-pdf') ";
        $query .= " union ";
        $query .= " select explnum_id from explnum ,bulletins where explnum_statut=0 and explnum_bulletin=bulletin_id and num_notice={$notice_id} and explnum_mimetype IN ('application/pdf','application/x-pdf')";
        $result = pmb_mysql_query($query, $dbh);
        $nb_result = pmb_mysql_num_rows($result);
        if (!$nb_result) {
            continue;
        }
        // pour tout les pdf de la notice
        while ($row = pmb_mysql_fetch_object($result)) {
            $explnum_id = $row->explnum_id;
            $res = pmb_mysql_query("SELECT explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype, explnum_url, explnum_data, length(explnum_data) as taille,explnum_path, concat(repertoire_path,explnum_path,explnum_nomfichier) as path, repertoire_id FROM explnum left join upload_repertoire on repertoire_id=explnum_repertoire WHERE explnum_id = '{$explnum_id}' ", $dbh);
            $ligne = pmb_mysql_fetch_object($res);
            $id_for_rigths = $ligne->explnum_notice;
            if ($ligne->explnum_bulletin != 0) {
                //si bulletin, les droits sont rattachés à la notice du bulletin, à défaut du pério...
                $req = "select bulletin_notice,num_notice from bulletins where bulletin_id =" . $ligne->explnum_bulletin;
                $res = pmb_mysql_query($req, $dbh);
                if (pmb_mysql_num_rows($res)) {
                    $r = pmb_mysql_fetch_object($res);
                    $id_for_rigths = $r->num_notice;
                    if (!$id_for_rigths) {
                        $id_for_rigths = $r->bulletin_notice;
                    }
                }
            }
            //droits d'acces emprunteur/notice
            if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
                $ac = new acces();
                $dom_2 = $ac->setDomain(2);
                $rights = $dom_2->getRights($_SESSION['id_empr_session'], $id_for_rigths);
            }
            //Accessibilité des documents numériques aux abonnés en opac
            $req_restriction_abo = "SELECT explnum_visible_opac, explnum_visible_opac_abon ,notice_id FROM notice_statut, explnum, notices WHERE explnum_notice=notice_id AND statut=id_notice_statut  AND explnum_id='{$explnum_id}' ";
            $res_restriction_abo = pmb_mysql_query($req_restriction_abo, $dbh);
            if (!pmb_mysql_num_rows($res_restriction_abo)) {
                // bulletin
                $req_restriction_abo = "SELECT explnum_visible_opac, explnum_visible_opac_abon,notice_id\n\t\t\t\t\tFROM notice_statut, explnum, bulletins, notices\n\t\t\t\t\tWHERE explnum_bulletin = bulletin_id\n\t\t\t\t\tAND num_notice = notice_id\n\t\t\t\t\tAND statut = id_notice_statut\n\t\t\t\t\tAND explnum_id='{$explnum_id}' ";
                $res_restriction_abo = pmb_mysql_query($req_restriction_abo, $dbh);
            }
            $expl_num = pmb_mysql_fetch_array($res_restriction_abo);
            if ($rights & 16 || is_null($dom_2) && $expl_num["explnum_visible_opac"] && (!$expl_num["explnum_visible_opac_abon"] || $expl_num["explnum_visible_opac_abon"] && $_SESSION["user_code"])) {
                if ($ligne->explnum_data || $ligne->explnum_path) {
                    $notice = new notice_affichage($expl_num["notice_id"], $liens_opac);
                    $notice->do_header_without_html();
                    $tpl .= "<input id='doc_num_list_" . $explnum_id . "' type='checkbox' name='doc_num_list[]' value='" . $explnum_id . "'> " . $notice->notice_header_without_html . " : " . $ligne->explnum_nom . "<br />";
                    $cpt_doc_num++;
                }
            }
        }
    }
    if ($cpt_doc_num) {
        $tpl = " \t\t\n\t\t<br /><b>" . $msg["print_output_docnum_list"] . "</b>\n\t\t<input type='button' id='list_lecture_cart_checked_all' class='bouton' value=\"" . $msg["list_docnum_checked_all"] . "\" title=\"" . $msg["list_docnum_checked_all"] . "\" onClick=\"setCheckboxes('print_options', 'doc_num_list', true); return false;\" />\t\t\n\t\t<input type='button' id='list_lecture_cart_checked_all' class='bouton' value=\"" . $msg["list_docnum_unchecked_all"] . "\" title=\"" . $msg["list_docnum_unchecked_all"] . "\" onClick=\"setCheckboxes('print_options', 'doc_num_list', false); return false;\" />\n\t\t<br />" . $tpl;
    } else {
        $tpl = "<b>" . $msg["print_output_docnum_list_no_file"] . "<br /></b>";
    }
    return $tpl;
}
                                 $resas_datas['onclick'] = "if(confirm('" . $msg["confirm_resa"] . "')){w=window.open('./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup','doresa','scrollbars=yes,width=500,height=600,menubar=0,resizable=yes'); w.focus(); return false;}else return false;";
                             } else {
                                 $resas_datas['href'] = "./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup";
                                 $resas_datas['onclick'] = "return confirm('" . $msg["confirm_resa"] . "')";
                             }
                         } else {
                             $resas_datas['flag_resa_possible'] = false;
                         }
                     } else {
                         $resas_datas['flag_resa_possible'] = false;
                     }
                 } else {
                     $resas_datas['flag_resa_possible'] = false;
                 }
                 if ($opac_show_exemplaires) {
                     $obj['display_expls'] = pmb_bidi(notice_affichage::expl_list("m", 0, $id));
                 }
             } else {
                 $resas_datas['flag_resa_visible'] = false;
             }
             // On envoie le tout au template
             if (file_exists($include_path . "/templates/record/" . $opac_notices_format_django_directory . "/bulletin_without_record_extended_display.tpl.html")) {
                 $template = $include_path . "/templates/record/" . $opac_notices_format_django_directory . "/bulletin_without_record_extended_display.tpl.html";
             } else {
                 $template = $include_path . "/templates/record/common/bulletin_without_record_extended_display.tpl.html";
             }
             $h2o = new H2o($template);
             print $h2o->render(array('bulletin' => $obj, 'parent' => $notice3, 'liens_opac' => $liens_opac, 'resas_datas' => $resas_datas));
         }
     }
 }
 function genere_notice_childs()
 {
     global $msg, $opac_notice_affichage_class;
     $this->antiloop[$this->notice_id] = true;
     //Notices liees
     if ($this->notice_childs) {
         return $this->notice_childs;
     }
     if (count($this->childs) && !$this->to_print) {
         if ($this->seule) {
             $affichage = "";
         } else {
             $affichage = "<a href='" . str_replace("!!id!!", "es" . $this->notice_id, $this->lien_rech_notice) . "&seule=1'>" . $msg[voir_contenu_detail] . "</a>";
         }
         global $relation_typedown;
         if (!$relation_typedown) {
             $relation_typedown = new marc_list("relationtypedown");
         }
         reset($this->childs);
         $affichage .= "<br />";
         while (list($rel_type, $child_notices) = each($this->childs)) {
             $affichage = "<b>" . $relation_typedown->table[$rel_type] . "</b>";
             if ($this->seule) {
             } else {
                 $affichage .= "<ul>";
             }
             $bool = false;
             for ($i = 0; $i < count($child_notices) && ($i < 20 || $this->seule); $i++) {
                 if (!$this->antiloop[$child_notices[$i]]) {
                     if ($opac_notice_affichage_class) {
                         $child_notice = new $opac_notice_affichage_class($child_notices[$i], $this->liens, $this->cart_allowed, $this->to_print);
                     } else {
                         $child_notice = new notice_affichage($child_notices[$i], $this->liens, $this->cart_allowed, $this->to_print);
                     }
                     if ($child_notice->notice->niveau_biblio != 'b' || $child_notice->notice->niveau_biblio == 'b' && $this->notice->niveau_biblio != "s") {
                         $child_notice->antiloop = $this->antiloop;
                         $child_notice->do_header();
                         if ($this->seule) {
                             $child_notice->do_isbd();
                             $child_notice->do_public();
                             if ($this->double_ou_simple == 2) {
                                 $child_notice->genere_double(1, $this->premier);
                             }
                             $child_notice->genere_simple(1, $this->premier);
                             $affichage .= $child_notice->result;
                         } else {
                             $child_notice->visu_expl = 0;
                             $child_notice->visu_explnum = 0;
                             $affichage .= "<li><a href='" . str_replace("!!id!!", "es" . $child_notices[$i], $this->lien_rech_notice) . "'>" . $child_notice->notice_header . "</a></li>";
                         }
                         $bool = true;
                     }
                 }
             }
             if ($bool == true) {
                 $aff_childs .= $affichage;
             }
             if (count($child_notices) > 20 && !$this->seule) {
                 $aff_childs .= "<br />";
                 if ($this->lien_rech_notice) {
                     $aff_childs .= "<a href='" . str_replace("!!id!!", "es" . $this->notice_id, $this->lien_rech_notice) . "&seule=1'>";
                 }
                 $aff_childs .= sprintf($msg["see_all_childs"], 20, count($child_notices), count($child_notices) - 20);
                 if ($this->lien_rech_notice) {
                     $aff_childs .= "</a>";
                 }
             }
             if ($this->seule) {
             } else {
                 $aff_childs .= "</ul>";
             }
         }
         $this->notice_childs = $aff_childs . "<br />";
     } else {
         $this->notice_childs = "";
     }
     return $this->notice_childs;
 }
 private function aff_notices_list($notices_list)
 {
     global $dbh, $charset, $opac_url_base;
     global $opac_notice_affichage_class;
     $retour_aff = "";
     foreach ($notices_list as $notice_id) {
         $req = "select notice_id, notice_date_is_new from notices where notice_id={$notice_id}";
         $res = @pmb_mysql_query($req, $dbh);
         if ($r = pmb_mysql_fetch_object($res)) {
             if ($opac_notice_affichage_class != "") {
                 $notice = new $opac_notice_affichage_class($r->notice_id, "", "", 1);
             } else {
                 $notice = new notice_affichage($r->notice_id, "", "", 1);
             }
             $notice->visu_expl = 0;
             $notice->visu_explnum = 0;
             $notice->do_header_without_html();
             $retour_aff .= "<item>\r\n\t\t\t\t\t<title>" . htmlspecialchars($notice->notice_header_without_html, ENT_QUOTES, $charset) . "</title>\r\n\t\t\t\t\t<pubDate>" . htmlspecialchars($r->notice_date_is_new, ENT_QUOTES, $charset) . "</pubDate>\r\n\t\t\t\t\t<link>" . htmlspecialchars($opac_url_base . "index.php?lvl=notice_display&id=" . $r->notice_id, ENT_QUOTES, $charset) . "</link>";
             $notice->do_isbd(1, 0);
             $desc = $notice->notice_isbd;
             $retour_aff .= "\t<description>" . htmlspecialchars($desc, ENT_QUOTES, $charset) . "</description>";
             $retour_aff .= "</item>";
         }
     }
     return $retour_aff;
 }
Example #8
0
File: avis.php Project: hogsim/PMB
     }
     //ajout d'un avis
     echo $avis_tpl_form;
     break;
 default:
 case 'liste':
     if ($log_ok && $allow_avis && $allow_avis_ajout) {
         echo "<p align='right'><a href=\"avis.php?todo=add&noticeid={$noticeid}&login={$user_code}\">" . $msg[avis_lien_ajout] . "</a></p>";
     }
     //affichage de la liste des avis
     //moyenne des notes
     $sql = "select avg(note) as m from avis where valide=1 and num_notice='" . $noticeid . "' group by num_notice";
     $r = pmb_mysql_query($sql, $dbh);
     $loc = pmb_mysql_fetch_object($r);
     $moyenne = number_format($loc->m, 1, ',', '');
     $c_notice = new notice_affichage($noticeid, "");
     $etoiles_moyenne = $c_notice->stars();
     //liste des témoignages
     $requete = "select note,sujet,commentaire,DATE_FORMAT(dateajout,'" . $msg['format_date'] . "') as ladate,empr_login,empr_nom, empr_prenom\n\t\t\t\tfrom avis\n\t\t\t\tleft join empr on id_empr=num_empr\n\t\t\t\twhere valide=1 and num_notice='" . $noticeid . "'\n\t\t\t\torder by dateajout desc";
     $r = pmb_mysql_query($requete, $dbh);
     if (pmb_mysql_num_rows($r)) {
         echo "<div class='row'>\n\t\t\t\t\t<div class='left'><b>" . $msg['avis_titre_tous'] . ":</b> " . $msg['avis_note'] . ": {$moyenne}</div>\n\t\t\t\t\t<div class='right'>{$etoiles_moyenne}</div>&nbsp;\n\t\t\t\t\t</div>";
         $cpt_star = 4;
         while ($loc = pmb_mysql_fetch_object($r)) {
             $etoiles = "";
             for ($i = 1; $i <= $loc->note; $i++) {
                 $etoiles .= "<img border=0 src='" . get_url_icon('star.png') . "' align='absmiddle'>";
             }
             for ($j = round($loc->note); $j <= $cpt_star; $j++) {
                 $etoiles .= "<img border=0 src='" . get_url_icon('star_unlight.png') . "' align='absmiddle'>";
             }
Example #9
0
 function fetch_resa()
 {
     global $dbh;
     global $msg;
     // on commence par vérifier si l'emprunteur a des réservations
     $query = "select count(1) from resa where resa_idempr=" . $this->id;
     $result = mysql_query($query, $dbh);
     if (!@mysql_result($result, 0, 0)) {
         return $msg["empr_no_resa"];
     }
     // si le lecteur a réservé un ou des documents, on récupère tout
     $query = "select * from resa ";
     $query .= " where resa.resa_idempr=" . $this->id;
     $result = mysql_query($query, $dbh);
     while ($resa = mysql_fetch_object($result)) {
         // constitution du tableau des réservations
         // on récupère le rang du réservataire
         $rang = $this->get_rank($this->id, $resa->resa_idnotice);
         // maintenant, on s'accroche : détermination de la date à afficher dans la case retour :
         // disponible, réservé ou date de retour du premier exemplaire
         // on compte le nombre total d'exemplaires pour la notice
         $query = "select count(1) from exemplaires, docs_statut where expl_notice=" . $resa->resa_idnotice;
         $query .= " and expl_statut=idstatut and pret_flag=1";
         $tresult = @mysql_query($query, $dbh);
         $total_ex = @mysql_result($tresult, 0, 0);
         // on compte le nombre total de réservations sur la notice
         $query = "select count(1) from resa where resa_idnotice=" . $resa->resa_idnotice;
         $tresult = @mysql_query($query, $dbh);
         $total_resa = @mysql_result($tresult, 0, 0);
         // on compte le nombre d'exemplaires sortis
         $query = "select count(1) from exemplaires e, pret p";
         $query .= " where e.expl_notice=" . $resa->resa_idnotice;
         $query .= " and p.pret_idexpl=e.expl_id";
         $tresult = @mysql_query($query, $dbh);
         $total_sortis = @mysql_result($tresult, 0, 0);
         // on en déduit le nombre d'exemplaires disponibles
         $total_dispo = $total_ex - $total_sortis;
         if ($rang <= $total_dispo) {
             // un exemplaire est disponible pour le réservataire (affichage : disponible)
             $situation = "<font color='#ff0000'><strong>" . $msg["available"] . "</strong></font>";
         } else {
             if ($total_dispo) {
                 // un ou des exemplaires sont disponibles, mais pas pour ce réservataire (affichage : reservé)
                 $situation = $msg["expl_reserve"];
             } else {
                 // rien n'est disponible, on trouve la date du premier retour
                 $query = 'select (pret_retour) from pret p, exemplaires e';
                 $query .= ' where e.expl_notice=' . $resa->resa_idnotice;
                 $query .= ' and e.expl_id=p.pret_idexpl';
                 $query .= ' order by p.pret_retour limit 1';
                 $tresult = mysql_query($query, $dbh);
                 $first_ret = mysql_fetch_object($tresult);
                 $situation = formatdate($first_ret->pret_retour);
             }
         }
         $notice = new notice_affichage($resa->resa_idnotice, 0, 0, 0);
         $notice->do_header();
         $affiche .= "<tr><td class='strip'>" . $notice->notice_header;
         $affiche .= "<td class='strip'>{$rang}/{$total_resa}</td>";
         $affiche .= "<td class='strip'>{$situation}</td>";
         $del_link = "<a href='./circ.php?categ=resa&id_empr=" . $this->id . '&id_notice=' . $resa->resa_idnotice . "&delete=1'>";
         $affiche .= "<td align='center'>{$del_link}<img border='0' src='./images/trash.gif'></a></td></tr>";
     }
     return $affiche;
 }
Example #10
0
 function items_notices()
 {
     global $dbh, $liens_opac;
     global $charset;
     global $opac_flux_rss_notices_order;
     global $opac_notice_affichage_class;
     if (!$this->nb_bannettes && !$this->nb_paniers) {
         $this->notices = "";
         return;
     }
     if (!$opac_flux_rss_notices_order) {
         $opac_flux_rss_notices_order = "index_serie, tnvol, index_sew";
     }
     if (!$charset) {
         $charset = 'ISO-8859-1';
     }
     if ($this->nb_bannettes) {
         $rqt[] = "select distinct notice_id, index_sew, create_date, update_date, index_serie, tnvol \n\t\t\t\t\tfrom notices join bannette_contenu on num_notice=notice_id \n\t\t\t\t\t\t\tjoin notice_statut on statut=id_notice_statut \n\t\t\t\t\twhere notice_visible_opac=1 and notice_visible_opac_abon=0 and num_bannette in (" . implode(",", $this->num_bannettes) . ") ";
     }
     if ($this->nb_paniers) {
         $rqt[] = "select distinct notice_id, index_sew, create_date, update_date, index_serie, tnvol \n\t\t\t\t\tfrom notices join caddie_content on object_id=notice_id \n\t\t\t\t\t\t\tjoin notice_statut on statut=id_notice_statut \n\t\t\t\t\twhere notice_visible_opac=1 and notice_visible_opac_abon=0 and caddie_id in (" . implode(",", $this->num_paniers) . ") ";
     }
     $rqtfinale = implode(' union ', $rqt);
     pmb_mysql_query("create temporary table tmpfluxrss ENGINE=MyISAM {$rqtfinale} ", $dbh);
     // Thu, 27 Apr 2006 23:40:11 +0100
     $query_not = "select distinct notice_id, index_sew, DATE_FORMAT(create_date,'%a, %e %b %Y %T +0100') as pubdate from tmpfluxrss order by {$opac_flux_rss_notices_order}";
     $res = pmb_mysql_query($query_not, $dbh);
     while ($tmp = pmb_mysql_fetch_object($res)) {
         if ($opac_notice_affichage_class != "") {
             $notice = new $opac_notice_affichage_class($tmp->notice_id, $liens_opac, "", 1);
         } else {
             $notice = new notice_affichage($tmp->notice_id, $liens_opac, "", 1);
         }
         $notice->visu_expl = 0;
         $notice->visu_explnum = 0;
         $notice->do_header_without_html();
         $retour_aff .= "<item>\n\t\t\t\t\t\t\t\t<title>" . htmlspecialchars($notice->notice_header_without_html, ENT_QUOTES, $charset) . "</title>\n\t\t\t\t\t\t\t\t<pubDate>" . htmlspecialchars($tmp->pubdate, ENT_QUOTES, $charset) . "</pubDate>\n\t\t\t\t\t\t\t\t<link>" . htmlspecialchars(str_replace("!!id!!", $tmp->notice_id, $liens_opac['lien_rech_notice']), ENT_QUOTES, $charset) . "</link>";
         $desc = '';
         $desc_explnum = '';
         if ($this->export_court_flux) {
             $notice->do_isbd(1, 0);
             $desc = $notice->notice_isbd;
         } elseif ($this->tpl_rss_flux) {
             $noti_tpl = new notice_tpl_gen($this->tpl_rss_flux);
             $desc .= $noti_tpl->build_notice($tmp->notice_id, $deflt2docs_location);
         } else {
             switch ($this->format_flux) {
                 case 'TITLE':
                     $desc = '';
                     break;
                 case 'ABSTRACT':
                     $desc = $notice->notice->n_resume . '<br />';
                     break;
                 case 'ISBD':
                 default:
                     $notice->do_isbd(0, 0);
                     $desc = $notice->notice_isbd;
                     $desc_explnum = $this->do_explnum($tmp->notice_id);
             }
         }
         if (!$this->tpl_rss_flux) {
             $image = $this->do_image($notice->notice->code, $notice->notice->thumbnail_url, $notice->notice->tit1);
             $desc = str_replace("<br />", "<br/>", $desc);
             $retour_aff .= "\t<description>" . htmlspecialchars(strip_tags($image . $desc, "<table><tr><td><br/><img>"), ENT_QUOTES, $charset) . "</description>";
             $retour_aff .= $desc_explnum;
         } else {
             $retour_aff .= "\t<description>" . htmlspecialchars($desc, ENT_QUOTES, $charset) . "</description>";
         }
         $retour_aff .= "</item>";
     }
     $this->notices = $retour_aff;
 }
 function genere_notice_childs()
 {
     global $msg, $opac_url_base, $opac_notice_affichage_class;
     global $memo_notice;
     global $icon_doc, $biblio_doc, $tdoc;
     global $relation_typedown;
     $onglet_perso = new notice_onglets();
     $this->antiloop[$this->notice_id] = true;
     //Notices liées
     if ($this->notice_childs) {
         return $this->notice_childs;
     }
     if (count($this->childs) && !$this->to_print) {
         if ($this->seule) {
             $affichage = "";
         } else {
             $affichage = "<a href='" . str_replace("!!id!!", $this->notice_id, $this->lien_rech_notice) . "&seule=1'>" . $msg[voir_contenu_detail] . "</a>";
         }
         if (!$relation_typedown) {
             $relation_typedown = new marc_list("relationtypedown");
         }
         reset($this->childs);
         $affichage .= "<br />";
         while (list($rel_type, $child_notices) = each($this->childs)) {
             $affichage = "<br /><b>" . $relation_typedown->table[$rel_type] . "</b>";
             if ($this->seule) {
             } else {
                 $affichage .= "<ul>";
             }
             $bool = false;
             for ($i = 0; $i < count($child_notices); $i++) {
                 if (!$this->antiloop[$child_notices[$i]]) {
                     //if(!$this->seule && $memo_notice[$child_notices[$i]]["niveau_biblio"]!='b' && $memo_notice[$child_notices[$i]]["header"]) {
                     if (!$this->seule && $memo_notice[$child_notices[$i]]["niveau_biblio"] != 'b' && $memo_notice[$child_notices[$i]]["header_without_doclink"]) {
                         //$affichage.="<li><a href='".str_replace("!!id!!",$child_notices[$i],$this->lien_rech_notice)."'>".$memo_notice[$child_notices[$i]]["header"]."</a></li>";
                         $icon = $icon_doc[$memo_notice[$child_notices[$i]]["niveau_biblio"] . $memo_notice[$child_notices[$i]]["typdoc"]];
                         if ($icon) {
                             $info_bulle_icon = str_replace("!!niveau_biblio!!", $biblio_doc[$memo_notice[$child_notices[$i]]["niveau_biblio"]], $msg["info_bulle_icon"]);
                             $info_bulle_icon = str_replace("!!typdoc!!", $tdoc->table[$memo_notice[$child_notices[$i]]["typdoc"]], $info_bulle_icon);
                             $html_icon = "<img src=\"" . $opac_url_base . "images/{$icon}\" alt='" . $info_bulle_icon . "' title='" . $info_bulle_icon . "'/>";
                         } else {
                             $html_icon = "";
                         }
                         $affichage .= "<br /><table><tr><td width='3%'><li style='list-style-type: none;'>" . $html_icon . "</td><td width='87%'><a href='" . str_replace("!!id!!", $child_notices[$i], $this->lien_rech_notice) . "'>" . $memo_notice[$child_notices[$i]]["header_without_doclink"] . "</a></td><td>" . $child_notice->notice_header_doclink . "</td></tr></table></li>";
                         $bool = true;
                     } else {
                         if (!$memo_notice[$child_notices[$i]]["niveau_biblio"]) {
                             if ($this->seule) {
                                 $header_only = 0;
                             } else {
                                 $header_only = 1;
                             }
                             if ($opac_notice_affichage_class) {
                                 $child_notice = new $opac_notice_affichage_class($child_notices[$i], $this->liens, $this->cart_allowed, $this->to_print, $header_only);
                             } else {
                                 $child_notice = new notice_affichage($child_notices[$i], $this->liens, $this->cart_allowed, $this->to_print, $header_only);
                             }
                             if ($child_notice->notice->niveau_biblio != 'b' || $child_notice->notice->niveau_biblio == 'b' && $this->notice->niveau_biblio != "s") {
                                 $child_notice->antiloop = $this->antiloop;
                                 $child_notice->do_header();
                                 if ($this->seule) {
                                     $child_notice->do_isbd();
                                     $child_notice->do_public();
                                     if ($this->double_ou_simple == 2) {
                                         $child_notice->genere_double(1, $this->premier);
                                     }
                                     $child_notice->genere_simple(1, $this->premier);
                                     $child_notice->result = $onglet_perso->insert_onglets($child_notices[$i], $child_notice->result);
                                     $affichage .= $child_notice->result;
                                 } else {
                                     $child_notice->visu_expl = 0;
                                     $child_notice->visu_explnum = 0;
                                     $icon = $icon_doc[$child_notice->notice->niveau_biblio . $child_notice->notice->typdoc];
                                     if ($icon) {
                                         $info_bulle_icon = str_replace("!!niveau_biblio!!", $biblio_doc[$child_notice->notice->niveau_biblio], $msg["info_bulle_icon"]);
                                         $info_bulle_icon = str_replace("!!typdoc!!", $tdoc->table[$child_notice->notice->typdoc], $info_bulle_icon);
                                         $html_icon = "<img src=\"" . $opac_url_base . "images/{$icon}\" alt='" . $info_bulle_icon . "' title='" . $info_bulle_icon . "'/>";
                                     } else {
                                         $html_icon = "";
                                     }
                                     $affichage .= "<br /><table><tr><td width='3%'><li style='list-style-type: none;'>" . $html_icon . "</td><td width='87%'><a href='" . str_replace("!!id!!", $child_notices[$i], $this->lien_rech_notice) . "'>" . $child_notice->notice_header . "</a></td><td>" . $child_notice->notice_header_doclink . "</td></tr></table></li>";
                                 }
                                 $bool = true;
                             }
                         }
                     }
                 }
             }
             if ($bool) {
                 $aff_childs .= $affichage;
             }
             if ($this->seule) {
             } else {
                 $aff_childs .= "</ul>";
             }
         }
         $this->notice_childs = $aff_childs . "<br />";
     } else {
         $this->notice_childs = "";
     }
     return $this->notice_childs;
 }
Example #12
0
function alert_mail_users_pmb($id_notice = 0, $id_bulletin = 0, $id_empr, $annul = 0)
{
    global $dbh;
    global $msg, $charset;
    global $opac_biblio_name, $opac_biblio_email;
    global $opac_url_base;
    // paramétrage OPAC: choix du nom de la bibliothèque comme expéditeur
    $requete = "select location_libelle, email from empr, docs_location where empr_location=idlocation and id_empr='{$id_empr}' ";
    $res = mysql_query($requete, $dbh);
    $loc = mysql_fetch_object($res);
    $PMBusernom = $loc->location_libelle;
    $PMBuserprenom = '';
    $PMBuseremail = $loc->email;
    if ($PMBuseremail) {
        $query = "select distinct empr_prenom, empr_nom, empr_cb, empr_mail, empr_tel1, empr_tel2, empr_ville, location_libelle, nom, prenom, user_email, date_format(sysdate(), '" . $msg["format_date_heure"] . "') as aff_quand from empr, docs_location, users where id_empr='{$id_empr}' and empr_location=idlocation and user_email like('%@%') and user_alert_resamail=1";
        $result = @mysql_query($query, $dbh);
        $headers = "MIME-Version: 1.0\n";
        $headers .= "Content-type: text/html; charset=" . $charset . "\n";
        $output_final = '';
        while ($empr = @mysql_fetch_object($result)) {
            if (!$output_final) {
                $output_final = "<html><body>";
                if ($annul == 1) {
                    $output_final .= "<a href='" . $opac_url_base . "'><font color=red><strong>" . $msg["mail_obj_resa_canceled"];
                    $sujet = $msg["mail_obj_resa_canceled"];
                } elseif ($annul == 2) {
                    $output_final .= "<a href='" . $opac_url_base . "'><font color=blue><strong>" . $msg["mail_obj_resa_reaffected"];
                    $sujet = $msg["mail_obj_resa_reaffected"];
                } else {
                    $output_final .= "<a href='" . $opac_url_base . "'><font color=green><strong>" . $msg["mail_obj_resa_added"];
                    $sujet = $msg["mail_obj_resa_added"];
                }
                $output_final .= "</strong></font></a> " . $empr->aff_quand . "\n\t\t\t\t\t\t\t\t\t<br /><strong>" . $empr->empr_prenom . " " . $empr->empr_nom . "</strong>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<br /><i>" . $empr->empr_mail . " / " . $empr->empr_tel1 . " / " . $empr->empr_tel2 . "</i>";
                if ($empr->empr_cp || $empr->empr_ville) {
                    $output_final .= "<br /><u>" . $empr->empr_cp . " " . $empr->empr_ville . "</u>";
                }
                $output_final .= "<hr />" . $msg[situation] . ": " . $empr->location_libelle . "<hr />";
                if ($id_notice) {
                    $current = new notice_affichage($id_notice, array(), 0, 1);
                    $current->do_header();
                    $current->do_isbd(1, 1);
                    $output_final .= "<h3>" . $current->notice_header . "</h3>";
                    $output_final .= $current->notice_isbd;
                    $output_final .= $current->affichage_expl;
                } else {
                    $output_final .= bulletin_affichage_reduit($id_bulletin);
                    $output_final .= notice_affichage::expl_list("m", 0, $id_bulletin);
                }
                $output_final .= "<hr /></body></html> ";
            }
            $res_envoi = mailpmb($empr->nom . " " . $empr->prenom, $empr->user_email, $sujet . " " . $empr->aff_quand, $output_final, $PMBusernom, $PMBuseremail, $headers, "", "", 1);
        }
    }
}
Example #13
0
require_once $base_path . "/includes/opac_version.inc.php";
// fonctions de gestion de formulaire
require_once $base_path . "/includes/javascript/form.inc.php";
require_once $base_path . "/includes/templates/common.tpl.php";
require_once $base_path . "/includes/divers.inc.php";
// classe de gestion des catégories
require_once $base_path . "/classes/categorie.class.php";
require_once $base_path . "/classes/notice.class.php";
require_once $base_path . "/classes/notice_display.class.php";
// classe indexation interne
require_once $base_path . "/classes/indexint.class.php";
require_once $base_path . "/includes/marc_tables/" . $pmb_indexation_lang . "/empty_words";
// pour l'affichage correct des notices
require_once $base_path . "/includes/templates/common.tpl.php";
require_once $base_path . "/includes/templates/notice.tpl.php";
require_once $base_path . "/includes/list_notices.inc.php";
require_once $base_path . "/includes/navbar.inc.php";
require_once $base_path . "/includes/notice_authors.inc.php";
require_once $base_path . "/includes/notice_categories.inc.php";
require_once $base_path . "/includes/notice_affichage.inc.php";
// les nouveaux affichages
require_once $base_path . "/includes/isbn.inc.php";
require_once $base_path . "/classes/notice_affichage.class.php";
require_once $base_path . '/includes/templates/notice_display.tpl.php';
require_once $base_path . '/includes/explnum.inc.php';
$notice = new notice_affichage(32, $liens_opac);
$notice->do_header();
$notice->do_isbd();
$notice->do_public();
$notice->genere_double($depliable, 'PUBLIC');
print $notice->result;
 function do_isbd($short = 0, $ex = 1)
 {
     global $dbh;
     global $msg;
     global $tdoc;
     global $charset, $opac_url_base;
     $this->notice_isbd = "";
     //In
     //Recherche des notices parentes
     $requete = "select linked_notice, relation_type, rank from notices_relations where num_notice=" . $this->notice_id . " order by relation_type,rank";
     $result_linked = mysql_query($requete, $dbh);
     //Si il y en a, on prépare l'affichage
     if (mysql_num_rows($result_linked)) {
         global $relation_listup;
         if (!$relation_listup) {
             $relation_listup = new marc_list("relationtypeup");
         }
     }
     $r_type = array();
     $ul_opened = false;
     //Pour toutes les notices liées
     while ($r_rel = mysql_fetch_object($result_linked)) {
         $parent_notice = new notice_affichage($r_rel->linked_notice, $this->liens, 1, $this->to_print);
         $parent_notice->visu_expl = 0;
         $parent_notice->visu_explnum = 0;
         $parent_notice->do_header();
         //Presentation differente si il y en a un ou plusieurs
         if (mysql_num_rows($result_linked) == 1) {
             $this->notice_isbd .= "<br /><b>" . $relation_listup->table[$r_rel->relation_type] . "</b> <a href='" . str_replace("!!id!!", $r_rel->linked_notice, $this->lien_rech_notice) . "&seule=1'>" . $parent_notice->notice_header . "</a><br /><br />";
         } else {
             if (!$r_type[$r_rel->relation_type]) {
                 $r_type[$r_rel->relation_type] = 1;
                 if ($ul_opened) {
                     $this->notice_isbd .= "</ul>";
                 } else {
                     $this->notice_isbd .= "<br />";
                     $ul_opened = true;
                 }
                 $this->notice_isbd .= "<b>" . $relation_listup->table[$r_rel->relation_type] . "</b>";
                 $this->notice_isbd .= "<ul class='notice_rel'>\n";
             }
             $this->notice_isbd .= "<li><a href='" . str_replace("!!id!!", $r_rel->linked_notice, $this->lien_rech_notice) . "&seule=1'>" . $parent_notice->notice_header . "</a></li>\n";
         }
         if (mysql_num_rows($result_linked) > 1) {
             $this->notice_isbd .= "</ul>\n";
         }
     }
     // constitution de la mention de titre
     if ($this->notice->serie_name) {
         $serie_temp .= inslink($this->notice->serie_name, str_replace("!!id!!", $this->notice->tparent_id, $this->lien_rech_serie));
         if ($this->notice->tnvol) {
             $serie_temp .= ',&nbsp;' . $this->notice->tnvol;
         }
     }
     if ($serie_temp) {
         $this->notice_isbd .= $serie_temp . ".&nbsp;" . $this->notice->tit1;
     } else {
         $this->notice_isbd .= $this->notice->tit1;
     }
     //commentaire du type de document
     //$this->notice_isbd .= ' ['.$tdoc->table[$this->notice->typdoc].']';
     if ($this->notice->tit3) {
         $this->notice_isbd .= "&nbsp;= " . $this->notice->tit3;
     }
     if ($this->notice->tit4) {
         $this->notice_isbd .= "&nbsp;: " . $this->notice->tit4;
     }
     if ($this->notice->tit2) {
         $this->notice_isbd .= "&nbsp;; " . $this->notice->tit2;
     }
     if ($this->auteurs_tous) {
         $this->notice_isbd .= " / " . $this->auteurs_tous;
     }
     // mention d'edition
     if ($this->notice->mention_edition) {
         $this->notice_isbd .= " &nbsp;. -&nbsp; " . $this->notice->mention_edition;
     }
     // zone de collection et editeur
     if ($this->notice->subcoll_id) {
         $collection = new subcollection($this->notice->subcoll_id);
         $editeurs .= inslink($collection->publisher_isbd, str_replace("!!id!!", $collection->publisher, $this->lien_rech_editeur));
         $collections = inslink($collection->isbd_entry, str_replace("!!id!!", $this->notice->subcoll_id, $this->lien_rech_subcollection));
     } elseif ($this->notice->coll_id) {
         $collection = new collection($this->notice->coll_id);
         $editeurs .= inslink($collection->publisher_isbd, str_replace("!!id!!", $collection->parent, $this->lien_rech_editeur));
         $collections = inslink($collection->isbd_entry, str_replace("!!id!!", $this->notice->coll_id, $this->lien_rech_collection));
     } elseif ($this->notice->ed1_id) {
         $editeur = new publisher($this->notice->ed1_id);
         $editeurs .= inslink($editeur->isbd_entry, str_replace("!!id!!", $this->notice->ed1_id, $this->lien_rech_editeur));
     }
     if ($this->notice->ed2_id) {
         $editeur = new publisher($this->notice->ed2_id);
         $editeurs ? $editeurs .= '&nbsp;: ' . inslink($editeur->isbd_entry, str_replace("!!id!!", $this->notice->ed2_id, $this->lien_rech_editeur)) : ($editeurs = inslink($editeur->isbd_entry, str_replace("!!id!!", $this->notice->ed2_id, $this->lien_rech_editeur)));
     }
     if ($this->notice->year) {
         $editeurs ? $editeurs .= ', ' . $this->notice->year : ($editeurs = $this->notice->year);
     } elseif ($this->notice->niveau_biblio == 'm' && $this->notice->niveau_hierar == 0) {
         $editeurs ? $editeurs .= ', [s.d.]' : ($editeurs = "[s.d.]");
     }
     if ($editeurs) {
         $this->notice_isbd .= "&nbsp;.&nbsp;-&nbsp;{$editeurs}";
     }
     // zone de la collation
     if ($this->notice->npages) {
         $collation = $this->notice->npages;
     }
     if ($this->notice->ill) {
         $collation .= '&nbsp;: ' . $this->notice->ill;
     }
     if ($this->notice->size) {
         $collation .= '&nbsp;; ' . $this->notice->size;
     }
     if ($this->notice->accomp) {
         $collation .= '&nbsp;+ ' . $this->notice->accomp;
     }
     if ($collation) {
         $this->notice_isbd .= "&nbsp;.&nbsp;-&nbsp;{$collation}";
     }
     if ($collections) {
         if ($this->notice->nocoll) {
             $collections .= '; ' . $this->notice->nocoll;
         }
         $this->notice_isbd .= ".&nbsp;-&nbsp;({$collections})" . ' ';
     }
     $this->notice_isbd .= '.';
     // ISBN ou NO. commercial
     if ($this->notice->code) {
         if (isISBN($this->notice->code)) {
             $zoneISBN = 'ISBN ';
         } else {
             $zoneISBN .= '.&nbsp;- ';
         }
         $zoneISBN .= $this->notice->code;
     }
     if ($this->notice->prix) {
         if ($this->notice->code) {
             $zoneISBN .= '&nbsp;: ' . $this->notice->prix;
         } else {
             if ($zoneISBN) {
                 $zoneISBN .= '&nbsp; ' . $this->notice->prix;
             } else {
                 $zoneISBN = $this->notice->prix;
             }
         }
     }
     if ($zoneISBN) {
         $this->notice_isbd .= "<br />" . $zoneISBN;
     }
     // note generale
     if ($this->notice->n_gen) {
         $zoneNote = nl2br(htmlentities($this->notice->n_gen, ENT_QUOTES, $charset));
     }
     if ($zoneNote) {
         $this->notice_isbd .= "<br />" . $zoneNote;
     }
     // langues
     if (count($this->langues)) {
         $langues = "<b>{$msg[537]}</b>&nbsp;: " . $this->construit_liste_langues($this->langues);
     }
     if (count($this->languesorg)) {
         $langues .= " <b>{$msg[711]}</b>&nbsp;: " . $this->construit_liste_langues($this->languesorg);
     }
     if ($langues) {
         $this->notice_isbd .= "<br />" . $langues;
     }
     if (!$short) {
         $this->notice_isbd .= "<br />\n\t    \t\t<img class='img_plus' src=\"./getgif.php?nomgif=plus\" name=\"imEx\" id=\"el_notes_" . $this->notice_id . "Img\" title=\"" . $msg["expandable_notice"] . "\" border=\"0\" onClick=\"expandBase('el_notes_" . $this->notice_id . "', true); return false;\" hspace=\"3\">\n\t    \t\t<b>notes</b>\t\t\n\t\t\t\t<div id=\"el_notes_" . $this->notice_id . "Child\" class=\"child\" style=\"margin-bottom:6px;display:none;\">    \n\t    \t\t<table>";
         $this->notice_isbd .= $this->aff_suite();
         $this->notice_isbd .= "</table></div>";
     } else {
         $this->notice_isbd .= $this->genere_in_perio();
     }
     //Notices liees
     // ajoutees en dehors de l'onglet PUBLIC ailleurs
     if ($ex) {
         $this->affichage_resa_expl = $this->aff_resa_expl();
     }
 }
Example #15
0
 function construit_contenu_HTML($use_limit = 1)
 {
     global $dbh;
     global $msg;
     global $opac_url_base;
     global $liens_opac;
     $url_base_opac = $opac_url_base . "index.php?database=" . DATA_BASE . "&lvl=notice_display&id=";
     if ($this->nb_notices_diff && $use_limit) {
         $limitation = " LIMIT {$this->nb_notices_diff} ";
     }
     $requete = "select num_notice from bannette_contenu, notices where num_bannette='" . $this->id_bannette . "' and notice_id=num_notice order by index_serie, tnvol, index_sew {$limitation} ";
     $resultat = pmb_mysql_query($requete, $dbh);
     // paramétrage :
     $environement["short"] = 6;
     $environement["ex"] = 0;
     $environement["exnum"] = 0;
     if ($this->nb_notices_diff >= $this->nb_notices || !$this->nb_notices_diff) {
         $nb_envoyees = $this->nb_notices;
     } else {
         $nb_envoyees = $this->nb_notices_diff;
     }
     $resultat_aff .= "<hr />";
     $resultat_aff .= sprintf($msg["dsi_diff_n_notices"], $nb_envoyees, $this->nb_notices);
     $resultat_aff .= "<hr />";
     while ($r = pmb_mysql_fetch_object($resultat)) {
         // afin de ne pas afficher les liens pour réservation de doc dans le mail :
         global $opac_resa;
         $opac_resa = 0;
         $depliable = 0;
         $notice = new notice_affichage($r->num_notice, $liens_opac);
         $notice->do_header();
         $notice->do_isbd();
         $notice->genere_simple($depliable, 'ISBD');
         $resultat_aff .= "<a href='" . $url_base_opac . $r->num_notice . "'><b>" . $notice->notice_header . "</b></a><br /><br />\r\n";
         $resultat_aff .= $notice->notice_isbd;
         $resultat_aff .= "<hr />\r\n";
     }
     if ($this->typeexport) {
         $this->export_contenu = cree_export_notices($this->liste_id_notice, start_export::get_id_by_path($this->typeexport), 1);
     }
     return $resultat_aff;
 }
Example #16
0
                    }
                    if ($opac_show_exemplaires) {
                        if ($fonction == 'notice_affichage_custom_bretagne') {
                            print pmb_bidi(notice_affichage_custom_bretagne::expl_list("m", 0, $id));
                        } else {
                            print pmb_bidi(notice_affichage::expl_list("m", 0, $id));
                        }
                    }
                }
                if ($docnum_visible || $opac_show_links_invisible_docnums) {
                    if ($explnum = show_explnum_per_notice(0, $id, '')) {
                        print pmb_bidi("<a name='docnum'><h3>" . $msg["explnum"] . "</h3></a>" . $explnum);
                    }
                }
            }
            print notice_affichage::autres_lectures(0, $id);
        }
    }
}
mysql_free_result($resdep);
function do_carroussel($bull)
{
    global $gestion_acces_active, $gestion_acces_empr_notice;
    global $msg;
    if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
        $ac = new acces();
        $dom_2 = $ac->setDomain(2);
        $join_noti = $dom_2->getJoin($_SESSION["id_empr_session"], 4, "bulletins.num_notice");
        $join_bull = $dom_2->getJoin($_SESSION["id_empr_session"], 4, "bulletins.bulletin_notice");
    } else {
        $join_noti = "join notices on bulletins.num_notice = notices.notice_id join notice_statut on notices.statut = notice_statut.id_notice_statut AND ((notice_visible_opac=1 and notice_visible_opac_abon=0)" . ($_SESSION["user_code"] ? " or (notice_visible_opac_abon=1 and notice_visible_opac=1)" : "") . ")";
function get_bulletin_list_func($id)
{
    global $charset, $dbh, $msg, $css;
    global $opac_visionneuse_allow, $icon_doc, $opac_cart_allow, $opac_max_resa;
    global $begin_result_liste, $notice_header, $opac_resa_planning;
    global $opac_show_exemplaires, $fonction, $opac_resa_popup, $opac_resa, $popup_resa, $allow_book;
    global $opac_perio_a2z_show_bulletin_notice;
    $resultat_aff = "";
    $libelle = $msg[270];
    $largeur = 500;
    $requete = "SELECT bulletin_id, bulletin_numero, bulletin_notice, mention_date, date_date, bulletin_titre, bulletin_cb, date_format(date_date, '" . $msg["format_date_sql"] . "') as aff_date_date,num_notice FROM bulletins WHERE bulletin_id='{$id}'";
    $res = @pmb_mysql_query($requete, $dbh);
    while ($obj = pmb_mysql_fetch_array($res)) {
        //on cherches des documents numériques
        $req = "select explnum_id from explnum where explnum_bulletin = " . $obj["bulletin_id"];
        $resultat = pmb_mysql_query($req, $dbh) or die($req . " " . pmb_mysql_error());
        $nb_ex = pmb_mysql_num_rows($resultat);
        //on met le nécessaire pour la visionneuse
        if ($opac_visionneuse_allow && $nb_ex) {
            $resultat_aff .= "\n\t\t\t<script type='text/javascript'>\n\t\t\t\tfunction sendToVisionneuse(explnum_id){\n\t\t\t\t\tdocument.getElementById('visionneuseIframe').src = 'visionneuse.php?mode=perio_bulletin&idperio=" . $obj['bulletin_notice'] . "'+(typeof(explnum_id) != 'undefined' ? '&explnum_id='+explnum_id+\"\" : '\\'');\n\t\t\t\t}\n\t\t\t</script>";
        }
        $typdocchapeau = "a";
        $icon = "";
        $requete3 = "SELECT notice_id,typdoc FROM notices WHERE notice_id='" . $obj["bulletin_notice"] . "' ";
        $res3 = @pmb_mysql_query($requete3, $dbh);
        while ($obj3 = pmb_mysql_fetch_object($res3)) {
            $notice3 = new notice($obj3->notice_id);
            $typdocchapeau = $obj3->typdoc;
        }
        $notice3->fetch_visibilite();
        if (!$icon) {
            $icon = "icon_per.gif";
        }
        $icon = $icon_doc["b" . $typdocchapeau];
        $res_print .= "<h3><img src='" . get_url_icon($icon) . "' /> " . $notice3->print_resume(1, $css) . "." . " <b>" . $obj["bulletin_numero"] . "</b></h3>\n";
        $num_notice = $obj['num_notice'];
        if ($obj['date_date']) {
            $res_print .= $msg['bull_date_date'] . " &nbsp;" . $obj['aff_date_date'] . " \n";
        }
        if ($obj['bulletin_cb']) {
            $res_print .= "<br />" . $msg["code_start"] . " " . htmlentities($obj['bulletin_cb'], ENT_QUOTES, $charset) . "\n";
            $code_cb_bulletin = $obj['bulletin_cb'];
        }
    }
    do_image($res_print, $code_cb_bulletin, 0);
    if ($opac_perio_a2z_show_bulletin_notice && $num_notice) {
        // Il y a une notice de bulletin
        $resultat_aff .= $res_print;
        global $opac_notices_depliable;
        global $seule;
        $memo_opac_notices_depliable = $opac_notices_depliable;
        $memo_seule = $seule;
        $opac_notices_depliable = 0;
        $seule = 1;
        $resultat_aff .= pmb_bidi(aff_notice($num_notice, 0, 0));
        $opac_notices_depliable = $memo_opac_notices_depliable;
        $seule = $memo_seule;
    } else {
        // construction des dépouillements
        $requete = "SELECT * FROM analysis, notices, notice_statut WHERE analysis_bulletin='{$id}' AND notice_id = analysis_notice AND statut = id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0)" . ($_SESSION["user_code"] ? " or (notice_visible_opac_abon=1 and notice_visible_opac=1)" : "") . ") ";
        $res = @pmb_mysql_query($requete, $dbh);
        if (pmb_mysql_num_rows($res)) {
            $depouill = "<h3>" . $msg['bull_dep'] . "</h3>";
            if ($opac_notices_depliable) {
                $depouill .= $begin_result_liste;
            }
            if ($opac_cart_allow) {
                $depouill .= "<a href=\"cart_info.php?id=" . $id . "&lvl=analysis&header=" . rawurlencode(strip_tags($notice_header)) . "\" target=\"cart_info\" class=\"img_basket\" title='" . $msg["cart_add_result_in"] . "'>" . $msg["cart_add_result_in"] . "</a>";
            }
            $depouill .= "<blockquote>";
            while ($obj = pmb_mysql_fetch_array($res)) {
                $depouill .= pmb_bidi(aff_notice($obj["analysis_notice"]));
            }
            $depouill .= "</blockquote>";
        }
        $resultat_aff .= $res_print;
        $resultat_aff .= $depouill;
        if ($notice3->visu_expl && (!$notice3->visu_expl_abon || $notice3->visu_expl_abon && $_SESSION["user_code"])) {
            if (!$opac_resa_planning) {
                $resa_check = check_statut(0, $id);
                if ($resa_check) {
                    $requete_resa = "SELECT count(1) FROM resa WHERE resa_idbulletin='{$id}'";
                    $nb_resa_encours = pmb_mysql_result(pmb_mysql_query($requete_resa, $dbh), 0, 0);
                    if ($nb_resa_encours) {
                        $message_nbresa = str_replace("!!nbresa!!", $nb_resa_encours, $msg["resa_nb_deja_resa"]);
                    }
                    if ($_SESSION["user_code"] && $allow_book && $opac_resa && !$popup_resa) {
                        $ret_resa .= "<h3>" . $msg["bulletin_display_resa"] . "</h3>";
                        if ($opac_max_resa == 0 || $opac_max_resa > $nb_resa_encours) {
                            if ($opac_resa_popup) {
                                $ret_resa .= "<a href='#' onClick=\"if(confirm('" . $msg["confirm_resa"] . "')){w=window.open('./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup','doresa','scrollbars=yes,width=500,height=600,menubar=0,resizable=yes'); w.focus(); return false;}else return false;\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                            } else {
                                $ret_resa .= "<a href='./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup' onClick=\"return confirm('" . $msg["confirm_resa"] . "')\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                            }
                            $ret_resa .= $message_nbresa;
                        } else {
                            $ret_resa .= str_replace("!!nb_max_resa!!", $opac_max_resa, $msg["resa_nb_max_resa"]);
                        }
                        $ret_resa .= "<br />";
                    } elseif (!$_SESSION["user_code"] && $opac_resa && !$popup_resa) {
                        // utilisateur pas connecté
                        // préparation lien réservation sans être connecté
                        $ret_resa .= "<h3>" . $msg["bulletin_display_resa"] . "</h3>";
                        if ($opac_resa_popup) {
                            $ret_resa .= "<a href='#' onClick=\"if(confirm('" . $msg["confirm_resa"] . "')){w=window.open('./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup','doresa','scrollbars=yes,width=500,height=600,menubar=0,resizable=yes'); w.focus(); return false;}else return false;\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                        } else {
                            $ret_resa .= "<a href='./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup' onClick=\"return confirm('" . $msg["confirm_resa"] . "')\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                        }
                        $ret_resa .= $message_nbresa;
                        $ret_resa .= "<br />";
                    } else {
                        $ret_resa = "";
                    }
                    $resultat_aff .= pmb_bidi($ret_resa);
                }
            }
            if ($opac_show_exemplaires) {
                if ($fonction == 'notice_affichage_custom_bretagne') {
                    $resultat_aff .= pmb_bidi(notice_affichage_custom_bretagne::expl_list("m", 0, $id));
                } else {
                    $resultat_aff .= pmb_bidi(notice_affichage::expl_list("m", 0, $id, 0));
                }
            }
        }
        if ($notice3->visu_explnum && (!$notice3->visu_explnum_abon || $notice3->visu_explnum_abon && $_SESSION["user_code"])) {
            if ($explnum = show_explnum_per_notice(0, $id, '')) {
                $resultat_aff .= pmb_bidi("<a name='docnum'><h3>" . $msg["explnum"] . "</h3></a>" . $explnum);
            }
        }
    }
    pmb_mysql_free_result($res);
    $resultat_aff .= notice_affichage::autres_lectures(0, $id);
    return $resultat_aff;
}
 /**
  * Affichage sous forme de tableau des exemplaires
  */
 function construire_tableau()
 {
     global $_mimetypes_bymimetype_, $_mimetypes_byext_, $dbh, $charset, $opac_url_base;
     global $opac_visionneuse_allow;
     if (!$this->tableau_id) {
         $this->display = "";
     } else {
         create_tableau_mimetype();
         $url_docnum = "";
         switch ($this->type_elt) {
             case DOCNUM_DMDE:
                 $url_docnum = "/explnum_doc.php?explnumdoc_id=";
                 $requete = "SELECT id_explnum_doc as explnum_id, explnum_doc_nomfichier as explnum_nom,  explnum_doc_mimetype as explnum_mimetype,\n\t\t\t\t\t\t explnum_doc_url as explnum_url, explnum_doc_data as explnum_data, explnum_doc_extfichier as explnum_extfichier\n\t\t\t\t\t\t  FROM explnum_doc join explnum_doc_actions on id_explnum_doc=num_explnum_doc WHERE prive=0 and num_action in (" . implode(',', $this->tableau_id) . ")";
                 break;
             case DOCNUM_SUGG:
                 $url_docnum = "/explnum_doc.php?explnumdoc_id=";
                 $requete = "SELECT id_explnum_doc as explnum_id, explnum_doc_nomfichier as explnum_nom,  explnum_doc_mimetype as explnum_mimetype,\n\t\t\t\t\t\t explnum_doc_url as explnum_url, explnum_doc_data as explnum_data, explnum_doc_extfichier as explnum_extfichier\n\t\t\t\t\t\t  FROM explnum_doc join explnum_doc_sugg on id_explnum_doc=num_explnum_doc WHERE num_suggestion in (" . implode(',', $this->tableau_id) . ")";
                 break;
             case DOCNUM_NOTI:
             default:
                 // récupération des infos des explnum
                 $requete = "SELECT explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype,\n\t\t\t\t\t\t explnum_url, explnum_data, explnum_vignette, explnum_nomfichier, explnum_extfichier\n\t\t\t\t\t\t  FROM explnum WHERE explnum_id in (" . implode(',', $this->tableau_id) . ")";
                 $url_docnum = "/doc_num.php?explnum_id=";
                 break;
         }
         $res = mysql_query($requete, $dbh);
         $i = 1;
         $allowed_mimetype = array();
         if ($opac_visionneuse_allow) {
             global $opac_photo_filtre_mimetype;
             $allowed_mimetype = explode(",", str_replace("'", "", $opac_photo_filtre_mimetype));
         }
         while ($expl = mysql_fetch_object($res)) {
             if ($expl->explnum_notice) {
                 $notice_aff = new notice_affichage($expl->explnum_notice, '');
                 $notice_aff->do_header_without_html();
                 $titre = $notice_aff->notice_header_without_html;
             } elseif ($expl->explnum_bulletin) {
                 $titre = $this->get_header_bulletin($expl->explnum_bulletin);
             }
             if ($i == 1) {
                 $ligne = "<div class='row'><div class='colonne3' >!!1!!</div><div class='colonne3' width='33%'>!!2!!</div><div class='colonne3' >!!3!!</div></div>";
             }
             $alt = htmlentities($expl->explnum_nom . " - " . $expl->explnum_mimetype, ENT_QUOTES, $charset);
             if ($expl->explnum_vignette) {
                 $obj = "<img src='" . $opac_url_base . "/vig_num.php?explnum_id={$expl->explnum_id}' alt='{$alt}' title='{$alt}' border='0'>";
             } else {
                 // trouver l'icone correspondant au mime_type
                 $obj = "<img src='" . $opac_url_base . "/images/mimetype/" . icone_mimetype($expl->explnum_mimetype, $expl->explnum_extfichier) . "' alt='{$alt}' title='{$alt}' border='0'>";
             }
             $lien = "";
             if ($expl->explnum_notice) {
                 $lien = "index.php?lvl=notice_display&id=" . $expl->explnum_notice;
             } elseif ($expl->explnum_bulletin) {
                 $lien = "index.php?lvl=bulletin_display&id=" . $expl->explnum_bulletin;
             }
             $words_to_find = "";
             if ($expl->explnum_mimetype == 'application/pdf' || $expl->explnum_mimetype == 'URL' && strpos($expl->explnum_nom, '.pdf') !== false) {
                 $words_to_find = "#search=\"" . $this->termes_recherche . "\"";
             }
             $expl_liste_obj = "<div class='explnum-titre' style=\"margin-top:20px;margin-bottom:10px;text-align:center;font-weight:bold;\" ><a href='{$lien}'>{$titre}</a></div>";
             $expl_liste_obj .= "<div style=\"text-align:center; word-wrap: break-word\">";
             if ($allowed_mimetype && in_array($expl->explnum_mimetype, $allowed_mimetype)) {
                 $link = "\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\tif(typeof(sendToVisionneuse) == 'undefined'){\n\t\t\t\t\t\t\t\tvar sendToVisionneuse = function (explnum_id){\n\t\t\t\t\t\t\t\t\tdocument.getElementById('visionneuseIframe').src = 'visionneuse.php?'+(typeof(explnum_id) != 'undefined' ? 'explnum_id='+explnum_id+\"\" : '\\'');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</script>\n\t\t\t\t\t\t<a href='#' onclick=\"open_visionneuse(sendToVisionneuse," . $expl->explnum_id . ");return false;\" alt='{$alt}' title='{$alt}'>" . $obj . "</a><br />";
                 $expl_liste_obj .= $link;
             } else {
                 $expl_liste_obj .= "<a href='" . $opac_url_base . $url_docnum . $expl->explnum_id . $words_to_find . "' alt='{$alt}' title='{$alt}' target='_blank'>" . $obj . "</a><br />";
             }
             if ($_mimetypes_byext_[$expl->explnum_extfichier]["label"]) {
                 $explmime_nom = $_mimetypes_byext_[$expl->explnum_extfichier]["label"];
             } elseif ($_mimetypes_bymimetype_[$expl->explnum_mimetype]["label"]) {
                 $explmime_nom = $_mimetypes_bymimetype_[$expl->explnum_mimetype]["label"];
             } else {
                 $explmime_nom = $expl->explnum_mimetype;
             }
             $expl_liste_obj .= htmlentities($expl->explnum_nom, ENT_QUOTES, $charset) . "<div class='explnum_type'>" . htmlentities($explmime_nom, ENT_QUOTES, $charset) . "</div>";
             $expl_liste_obj .= "</div>";
             $ligne = str_replace("!!{$i}!!", $expl_liste_obj, $ligne);
             $i++;
             if ($i == 4) {
                 $ligne_finale .= $ligne;
                 $i = 1;
             }
         }
         if (!$ligne_finale) {
             $ligne_finale = $ligne;
         } elseif ($i != 1) {
             $ligne_finale .= $ligne;
         }
         $ligne_finale = str_replace('!!2!!', "&nbsp;", $ligne_finale);
         $ligne_finale = str_replace('!!3!!', "&nbsp;", $ligne_finale);
         $this->display = $ligne_finale;
     }
 }
 function genere_notice_childs()
 {
     global $msg, $opac_notice_affichage_class;
     global $memo_notice;
     global $relation_typedown;
     /* début modif */
     //Je ne veux que les liens vers les notices liées, pas de notices dépliables.
     $this->seule = 0;
     /* fin modif */
     $onglet_perso = new notice_onglets();
     $this->antiloop[$this->notice_id] = true;
     //Notices liées
     if ($this->notice_childs) {
         return $this->notice_childs;
     }
     if (count($this->childs) && !$this->to_print) {
         if ($this->seule) {
             $affichage = "";
         } else {
             $affichage = "<a href='" . str_replace("!!id!!", $this->notice_id, $this->lien_rech_notice) . "&seule=1'>" . $msg[voir_contenu_detail] . "</a>";
         }
         if (!$relation_typedown) {
             $relation_typedown = new marc_list("relationtypedown");
         }
         reset($this->childs);
         $affichage .= "<br />";
         while (list($rel_type, $child_notices) = each($this->childs)) {
             /* début modif */
             $affichage = "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>" . $relation_typedown->table[$rel_type] . " :</span></td>\n";
             if ($this->seule) {
             } else {
                 $affichage .= "<td>";
             }
             /* fin modif */
             $bool = false;
             for ($i = 0; $i < count($child_notices) && ($i < 100 || $this->seule); $i++) {
                 if (!$this->antiloop[$child_notices[$i]]) {
                     //if(!$this->seule && $memo_notice[$child_notices[$i]]["niveau_biblio"]!='b' && $memo_notice[$child_notices[$i]]["header"]) {
                     if (!$this->seule && $memo_notice[$child_notices[$i]]["niveau_biblio"] != 'b' && $memo_notice[$child_notices[$i]]["header_without_doclink"]) {
                         //$affichage.="<li><a href='".str_replace("!!id!!",$child_notices[$i],$this->lien_rech_notice)."'>".$memo_notice[$child_notices[$i]]["header"]."</a></li>";
                         $affichage .= "<a href='" . str_replace("!!id!!", $child_notices[$i], $this->lien_rech_notice) . "'>" . $memo_notice[$child_notices[$i]]["header_without_doclink"] . "</a><br/>";
                         $bool = true;
                     } else {
                         if (!$memo_notice[$child_notices[$i]]["niveau_biblio"]) {
                             if ($this->seule) {
                                 $header_only = 0;
                             } else {
                                 $header_only = 1;
                             }
                             if ($opac_notice_affichage_class) {
                                 $child_notice = new $opac_notice_affichage_class($child_notices[$i], $this->liens, $this->cart_allowed, $this->to_print, $header_only);
                             } else {
                                 $child_notice = new notice_affichage($child_notices[$i], $this->liens, $this->cart_allowed, $this->to_print, $header_only);
                             }
                             if ($child_notice->notice->niveau_biblio != 'b' || $child_notice->notice->niveau_biblio == 'b' && $this->notice->niveau_biblio != "s") {
                                 $child_notice->antiloop = $this->antiloop;
                                 $child_notice->do_header();
                                 if ($this->seule) {
                                     $child_notice->do_isbd();
                                     $child_notice->do_public();
                                     if ($this->double_ou_simple == 2) {
                                         $child_notice->genere_double(1, $this->premier);
                                     }
                                     $child_notice->genere_simple(1, $this->premier);
                                     $child_notice->result = $onglet_perso->insert_onglets($child_notices[$i], $child_notice->result);
                                     $affichage .= $child_notice->result;
                                 } else {
                                     $child_notice->visu_expl = 0;
                                     $child_notice->visu_explnum = 0;
                                     /* début modif */
                                     $affichage .= "<a href='" . str_replace("!!id!!", $child_notices[$i], $this->lien_rech_notice) . "'>" . $child_notice->notice_header . "</a><br/>";
                                     /* fin modif */
                                 }
                                 $bool = true;
                             }
                         }
                     }
                 }
             }
             if ($bool) {
                 $aff_childs .= $affichage;
             }
             if ($bool && count($child_notices) > 100 && !$this->seule) {
                 $aff_childs .= "<br />";
                 if ($this->lien_rech_notice) {
                     $aff_childs .= "<a href='" . str_replace("!!id!!", $this->notice_id, $this->lien_rech_notice) . "&seule=1'>";
                 }
                 $aff_childs .= sprintf($msg["see_all_childs"], 20, count($child_notices), count($child_notices) - 20);
                 if ($this->lien_rech_notice) {
                     $aff_childs .= "</a>";
                 }
             }
             /* début modif */
             if ($this->seule) {
             } else {
                 $aff_childs .= "</td>\n</tr>\n";
             }
             /* fin modif */
         }
         $this->notice_childs = $aff_childs . "<br />";
     } else {
         $this->notice_childs = "";
     }
     return $this->notice_childs;
 }