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 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 .= ', ' . $this->notice->tnvol; } } if ($serie_temp) { $this->notice_isbd .= $serie_temp . ". " . $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 .= " = " . $this->notice->tit3; } if ($this->notice->tit4) { $this->notice_isbd .= " : " . $this->notice->tit4; } if ($this->notice->tit2) { $this->notice_isbd .= " ; " . $this->notice->tit2; } if ($this->auteurs_tous) { $this->notice_isbd .= " / " . $this->auteurs_tous; } // mention d'edition if ($this->notice->mention_edition) { $this->notice_isbd .= " . - " . $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 .= ' : ' . 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 .= " . - {$editeurs}"; } // zone de la collation if ($this->notice->npages) { $collation = $this->notice->npages; } if ($this->notice->ill) { $collation .= ' : ' . $this->notice->ill; } if ($this->notice->size) { $collation .= ' ; ' . $this->notice->size; } if ($this->notice->accomp) { $collation .= ' + ' . $this->notice->accomp; } if ($collation) { $this->notice_isbd .= " . - {$collation}"; } if ($collections) { if ($this->notice->nocoll) { $collections .= '; ' . $this->notice->nocoll; } $this->notice_isbd .= ". - ({$collections})" . ' '; } $this->notice_isbd .= '.'; // ISBN ou NO. commercial if ($this->notice->code) { if (isISBN($this->notice->code)) { $zoneISBN = 'ISBN '; } else { $zoneISBN .= '. - '; } $zoneISBN .= $this->notice->code; } if ($this->notice->prix) { if ($this->notice->code) { $zoneISBN .= ' : ' . $this->notice->prix; } else { if ($zoneISBN) { $zoneISBN .= ' ' . $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> : " . $this->construit_liste_langues($this->langues); } if (count($this->languesorg)) { $langues .= " <b>{$msg[711]}</b> : " . $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(); } }
$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; } }
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; }
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; }
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; }
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; }
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); } } }
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 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; }