예제 #1
0
function update_avis($id)
{
    global $dbh, $desc, $sujet, $msg, $charset;
    header('Content-Type: text/html;charset=' . $charset);
    $req = "update avis set sujet='" . $sujet . "', commentaire='" . $desc . "' where id_avis='" . $id . "'";
    pmb_mysql_query($req, $dbh);
    $requete = "select avis.note, avis.sujet, avis.commentaire, avis.id_avis, DATE_FORMAT(avis.dateAjout,'" . $msg[format_date] . "') as ladate, ";
    $requete .= "empr_login, empr_nom, empr_prenom, ";
    $requete .= "niveau_biblio, niveau_biblio, valide, notice_id ";
    $requete .= "from avis ";
    $requete .= "left join empr on empr.id_empr=avis.num_empr ";
    $requete .= "left join notices on notices.notice_id=avis.num_notice ";
    $requete .= "where id_avis='" . $id . "'";
    $requete .= "order by index_serie, tnvol, index_sew ,dateAjout desc ";
    $res = pmb_mysql_query($requete, $dbh);
    while ($loc = pmb_mysql_fetch_object($res)) {
        $display = "\n\t\t\t<div class='left'>\n\t\t\t\t<input type='checkbox' name='valid_id_avis[]' id='valid_id_avis[]' value='{$loc->id_avis}' onClick=\"stop_evenement(event);\" />";
        if (!$loc->valide) {
            $display .= "<font color='#CC0000'>" . $msg[gestion_avis_note] . " <span >" . htmlentities($loc->note, ENT_QUOTES, $charset) . " <b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        } else {
            $display .= "<font color='#00BB00'>" . $msg[gestion_avis_note] . " <span >" . htmlentities($loc->note, ENT_QUOTES, $charset) . " <b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        }
        if ($charset != "utf-8") {
            $loc->commentaire = cp1252Toiso88591($loc->commentaire);
        }
        $display .= ", " . htmlentities($loc->ladate, ENT_QUOTES, $charset) . " " . htmlentities($loc->empr_prenom . " " . $loc->empr_nom, ENT_QUOTES, $charset) . "\n\t\t\t</div>\n\t\t\t<div class='row'>" . do_bbcode($loc->commentaire) . "\t</div>\n\t\t";
    }
    print $display;
}
예제 #2
0
 function fetch_data()
 {
     global $base_path, $charset;
     global $opac_show_book_pics;
     global $opac_book_pics_url;
     global $opac_book_pics_msg;
     global $opac_url_base, $use_opac_url_base;
     global $opac_sur_location_activate;
     global $fonction_auteur, $msg;
     global $tdoc, $icon_doc, $biblio_doc;
     global $pmb_map_activate;
     global $pmb_url_base;
     if (!$this->notice_id) {
         return false;
     }
     //Recuperation des infos de la notice
     $requete = "select * from notices where notice_id=" . $this->notice_id;
     $resultat = pmb_mysql_query($requete);
     $res = pmb_mysql_fetch_object($resultat);
     $this->notice = $res;
     $this->memo_isbn = $this->notice->code;
     $this->memo_typdoc = $tdoc->table[$this->notice->typdoc];
     //Icone type de Document
     $icon = $icon_doc[$this->notice->niveau_biblio . $this->notice->typdoc];
     if ($icon) {
         $info_bulle_icon = $biblio_doc[$this->notice->niveau_biblio] . " : " . $tdoc->table[$this->notice->typdoc];
         if ($use_opac_url_base) {
             $this->memo_icondoc = "<img src=\"" . $opac_url_base . "images/{$icon}\" alt=\"{$info_bulle_icon}\" title=\"{$info_bulle_icon}\" align='top' />";
         } else {
             $this->memo_icondoc = "<img src=\"" . $pmb_url_base . "images/{$icon}\" alt=\"{$info_bulle_icon}\" title=\"{$info_bulle_icon}\" align='top' />";
         }
     }
     if ($use_opac_url_base) {
         if (isset($_SESSION["cart"]) && in_array($this->notice_id, $_SESSION["cart"])) {
             $this->memo_iconcart = "<span id='baskets" . $this->notice_id . "'><a href='#' class=\"img_basket_exist\" title=\"" . $msg['notice_title_basket_exist'] . "\"><img src=\"" . $opac_url_base . "images/basket_exist.gif\" border=\"0\" alt=\"" . $msg['notice_title_basket_exist'] . "\" /></a></span>";
         } else {
             $title = $this->notice_header;
             if (!$title) {
                 $title = $this->notice->tit1;
             }
             $this->memo_iconcart = "<span id='baskets" . $this->notice_id . "'><a href=\"cart_info.php?id=" . $this->notice_id . "&header=" . rawurlencode(strip_tags($title)) . "\" target=\"cart_info\" class=\"img_basket\" title=\"" . $msg['notice_title_basket'] . "\"><img src=\"" . $opac_url_base . "images/basket_small_20x20.gif\" border=\"0\" title=\"" . $msg['notice_title_basket'] . "\" alt=\"" . $msg['notice_title_basket'] . "\" /></a></span>";
         }
     } else {
         $this->memo_iconcart = "<img src=\"" . $pmb_url_base . "images/basket_small_20x20.gif\" align='absmiddle' border='0' title='" . $msg["400"] . "' alt='" . $msg["400"] . "' />";
     }
     $this->niveau_biblio = $this->notice->niveau_biblio;
     $this->niveau_hierar = $this->notice->niveau_hierar;
     //Recherche des infos du périodique
     $this->fetch_analysis_info();
     //Recherche des etats de collection
     $this->fetch_collstate();
     //Titres
     //Titre de serie et composition du titre
     $this->memo_series[] = array();
     if ($res->tparent_id) {
         $requete = "select * from series where serie_id=" . $res->tparent_id;
         $resultat = pmb_mysql_query($requete);
         if ($serie = pmb_mysql_fetch_object($resultat)) {
             $this->memo_series[] = $serie;
             $this->memo_titre = $serie->serie_name;
             $this->memo_titre_serie = $serie->serie_name;
             $this->isbd = $this->serie_name;
             if ($this->notice->tnvol) {
                 $this->memo_titre .= ', ' . $res->tnvol;
                 $this->memo_titre_serie .= ', ' . $res->tnvol;
                 $this->isbd .= ',&nbsp;' . $this->tnvol;
             }
         }
     } elseif ($this->notice->tnvol) {
         $this->memo_titre .= $res->tnvol;
     }
     $this->memo_titre ? $this->memo_titre .= '. ' . $res->tit1 : ($this->memo_titre = $res->tit1);
     $this->isbd ? $this->isbd .= '.&nbsp;' . $this->notice->tit1 : ($this->isbd = $this->notice->tit1);
     $tit2 = $this->notice->tit2;
     $tit3 = $this->notice->tit3;
     $tit4 = $this->notice->tit4;
     if ($tit3) {
         $this->isbd .= "&nbsp;= {$tit3}";
     }
     if ($tit4) {
         $this->isbd .= "&nbsp;: {$tit4}";
     }
     if ($tit2) {
         $this->isbd .= "&nbsp;; {$tit2}";
     }
     $this->isbd .= ' [' . $tdoc->table[$this->notice->typdoc] . ']';
     $this->memo_notice_bulletin = new stdClass();
     $this->memo_bulletin = new stdClass();
     if ($res->niveau_biblio == 'b') {
         $rqt = "select tit1, date_format(date_date, '" . $msg["format_date"] . "') as aff_date_date, bulletin_numero as num_bull,bulletin_notice from bulletins,notices where bulletins.num_notice='" . $this->notice_id . "' and notices.notice_id=bulletins.bulletin_notice";
         $execute_query = pmb_mysql_query($rqt);
         $row = pmb_mysql_fetch_object($execute_query);
         $this->memo_titre .= " " . (!$row->aff_date_date ? sprintf($msg["bul_titre_perio"], $row->tit1) : sprintf($msg["bul_titre_perio"], $row->tit1 . ", " . $row->num_bull . " [" . $row->aff_date_date . "]"));
         // recherche editeur de la notice de perio
         $rqt_perio = "select * from notices where notice_id=" . $row->bulletin_notice;
         $execute_query_perio = pmb_mysql_query($rqt_perio);
         $row_perio = pmb_mysql_fetch_object($execute_query_perio);
         if (!$this->notice->ed1_id) {
             $this->notice->ed1_id = $row_perio->ed1_id;
         }
         //issn pour les notices de bulletin
         if (!$this->notice->code) {
             $this->memo_isbn = $row_perio->code;
         }
     } elseif ($res->niveau_biblio == 'a' && $res->niveau_hierar == 2) {
         $requete = "SELECT b.* ";
         $requete .= "from analysis a, notices b, bulletins c";
         $requete .= " WHERE a.analysis_notice=" . $this->notice_id;
         $requete .= " AND c.bulletin_id=a.analysis_bulletin";
         $requete .= " AND c.bulletin_notice=b.notice_id";
         $requete .= " LIMIT 1";
         $myQuery = pmb_mysql_query($requete);
         if (pmb_mysql_num_rows($myQuery)) {
             $row_perio = pmb_mysql_fetch_object($myQuery);
             if (!$this->notice->ed1_id) {
                 $this->notice->ed1_id = $row_perio->ed1_id;
             }
             //issn pour les notice de dépouillement
             if (!$this->notice->code) {
                 $this->memo_isbn = $row_perio->code;
             }
         }
         //	info du bulletin de ce dépouillement
         $req_bulletin = "SELECT  c.* from analysis a, bulletins c WHERE c.bulletin_id=a.analysis_bulletin AND analysis_notice=" . $res->notice_id;
         $result_bull = pmb_mysql_query($req_bulletin);
         if ($bull = pmb_mysql_fetch_object($result_bull)) {
             $this->memo_bulletin = $bull;
             $this->memo_notice_bulletin = $bull;
             $this->bulletin_mention_date = $bull->mention_date;
             $this->bulletin_date_date = formatdate($bull->date_date);
             $this->bulletin_numero = $bull->bulletin_numero;
         }
     }
     $this->memo_complement_titre = $res->tit4;
     $this->memo_titre_parallele = $res->tit3;
     $this->memo_notice = $res;
     //mention d'édition
     $this->memo_mention_edition = $res->mention_edition;
     //Titre du pério pour les notices de bulletin
     if ($res->niveau_biblio == 'b' && $res->niveau_hierar == '2') {
         $req_bulletin = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero, tit1 as titre from bulletins, notices WHERE bulletin_notice=notice_id AND num_notice=" . $res->notice_id;
         $result_bull = pmb_mysql_query($req_bulletin);
         while ($bull = pmb_mysql_fetch_object($result_bull)) {
             $this->memo_notice_bulletin = $bull;
             $this->memo_bulletin = $bull;
             $this->serial_title = $bull->titre;
             $this->bulletin_mention_date = $bull->mention_date;
             $this->bulletin_date_date = formatdate($bull->date_date);
             $this->bulletin_numero = $bull->bulletin_numero;
             $this->bulletin_id = $bull->bulletin_id;
         }
     }
     //Langage
     $this->memo_lang = get_notice_langues($this->notice_id, 0);
     // langues de la publication
     $this->memo_lang_or = get_notice_langues($this->notice_id, 1);
     // langues originales
     //Auteurs
     $this->authors = array();
     //Recherche des auteurs;
     $this->responsabilites = get_notice_authors($this->notice_id);
     $mention_resp = $mention_resp_1 = $mention_resp_2 = array();
     $isbd_entry_1 = $isbd_entry_2 = array();
     $as = array_search("0", $this->responsabilites["responsabilites"]);
     if ($as !== FALSE && $as !== NULL) {
         $auteur_0 = $this->responsabilites["auteurs"][$as];
         $auteur = new auteur($auteur_0["id"]);
         $auteur->fonction = $fonction_auteur[$auteur_0["fonction"]];
         $this->authors[] = $auteur;
         if ($this->print_mode) {
             $mention_resp_lib = $auteur->isbd_entry;
         } else {
             $mention_resp_lib = $auteur->isbd_entry_lien_gestion;
         }
         if (!$this->print_mode) {
             $mention_resp_lib .= $auteur->author_web_link;
         }
         if ($auteur_0["fonction"]) {
             $mention_resp_lib .= ", " . $fonction_auteur[$auteur_0["fonction"]];
         }
         $mention_resp[] = $mention_resp_lib;
         $this->memo_auteur_principal = $auteur->isbd_entry;
     }
     $as = array_keys($this->responsabilites["responsabilites"], "1");
     for ($i = 0; $i < count($as); $i++) {
         $indice = $as[$i];
         $auteur_1 = $this->responsabilites["auteurs"][$indice];
         $auteur = new auteur($auteur_1["id"]);
         $auteur->fonction = $fonction_auteur[$auteur_1["fonction"]];
         $this->authors[] = $auteur;
         if ($this->print_mode) {
             $mention_resp_lib = $auteur->isbd_entry;
         } else {
             $mention_resp_lib = $auteur->isbd_entry_lien_gestion;
         }
         if (!$this->print_mode) {
             $mention_resp_lib .= $auteur->author_web_link;
         }
         if ($auteur_1["fonction"]) {
             $mention_resp_lib .= ", " . $fonction_auteur[$auteur_1["fonction"]];
         }
         $mention_resp[] = $mention_resp_lib;
         $mention_resp_1[] = $mention_resp_lib;
         $isbd_entry_1[] = $auteur->isbd_entry;
     }
     $this->memo_mention_resp_1 = implode("; ", $mention_resp_1);
     $this->memo_auteur_autre_tab = $isbd_entry_1;
     $this->memo_auteur_autre = implode("; ", $isbd_entry_1);
     $as = array_keys($this->responsabilites["responsabilites"], "2");
     for ($i = 0; $i < count($as); $i++) {
         $indice = $as[$i];
         $auteur_2 = $this->responsabilites["auteurs"][$indice];
         $auteur = new auteur($auteur_2["id"]);
         $auteur->fonction = $fonction_auteur[$auteur_2["fonction"]];
         $this->authors[] = $auteur;
         if ($this->print_mode) {
             $mention_resp_lib = $auteur->isbd_entry;
         } else {
             $mention_resp_lib = $auteur->isbd_entry_lien_gestion;
         }
         if (!$this->print_mode) {
             $mention_resp_lib .= $auteur->author_web_link;
         }
         if ($auteur_2["fonction"]) {
             $mention_resp_lib .= ", " . $fonction_auteur[$auteur_2["fonction"]];
         }
         $mention_resp[] = $mention_resp_lib;
         $mention_resp_2[] = $mention_resp_lib;
         $isbd_entry_2[] = $auteur->isbd_entry;
     }
     $this->memo_mention_resp_2 = implode("; ", $mention_resp_2);
     $this->memo_auteur_secondaire_tab = $isbd_entry_2;
     $this->memo_auteur_secondaire = implode("; ", $isbd_entry_2);
     $this->memo_libelle_mention_resp = implode("; ", $mention_resp);
     if ($this->memo_libelle_mention_resp) {
         $this->isbd .= "&nbsp;/ {$this->memo_libelle_mention_resp}";
     }
     // on récupère la collection au passage, si besoin est
     if ($this->notice->subcoll_id) {
         $collection = new subcollection($this->notice->subcoll_id);
         $info = $this->get_info_editeur($collection->editeur);
         $this->memo_collection = $collection->isbd_entry;
         $this->memo_ed1 = $info["isbd_entry"];
         $this->memo_ed1_name = $info["name"];
         $this->memo_ed1_place = $info["place"];
         $editeurs = $info["isbd_entry"];
     } elseif ($this->notice->coll_id) {
         $collection = new collection($this->notice->coll_id);
         $info = $this->get_info_editeur($collection->parent);
         $this->memo_collection = $collection->isbd_entry;
         $this->memo_ed1 = $info["isbd_entry"];
         $this->memo_ed1_name = $info["name"];
         $this->memo_ed1_place = $info["place"];
         $editeurs = $info["isbd_entry"];
     } elseif ($this->notice->ed1_id) {
         $info = $this->get_info_editeur($this->notice->ed1_id);
         $this->memo_ed1 = $info["isbd_entry"];
         $this->memo_ed1_name = $info["name"];
         $this->memo_ed1_place = $info["place"];
         $editeurs = $info["isbd_entry"];
     }
     if ($this->notice->ed2_id) {
         $info = $this->get_info_editeur($this->notice->ed2_id);
         $this->memo_ed2 = $info["isbd_entry"];
         $this->memo_ed2_name = $info["name"];
         $this->memo_ed2_place = $info["place"];
         $editeurs ? $editeurs .= '&nbsp;; ' . $info["isbd_entry"] : ($editeurs = $info["isbd_entry"]);
     }
     if ($this->notice->year) {
         $editeurs ? $editeurs .= ', ' . $this->notice->year : ($editeurs = $this->notice->year);
     } elseif ($this->notice->niveau_biblio != 'b') {
         $editeurs ? $editeurs .= ', [s.d.]' : ($editeurs = "[s.d.]");
     }
     $this->memo_year = $this->notice->year;
     if ($editeurs) {
         $this->isbd .= ".&nbsp;-&nbsp;{$editeurs}";
     }
     // zone de la collation (ne concerne que a2)
     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->isbd .= ".&nbsp;-&nbsp;{$collation}";
     }
     $this->memo_collation = $collation;
     // map
     $this->memo_map_isbd = "";
     $this->memo_map_id = 0;
     $this->memo_map_echelle = "";
     $this->memo_map_projection = "";
     $this->memo_map_ref = "";
     $this->memo_map_equinoxe = "";
     $this->memo_map = "";
     if ($pmb_map_activate) {
         $ids[] = $this->notice_id;
         $this->map = new map_objects_controler(TYPE_RECORD, $ids);
         $this->map_info = new map_info($this->notice_id);
         $this->memo_map_isbd = $this->map_info->get_isbd();
         if ($this->memo_map_isbd) {
             $this->isbd .= ".&nbsp;-&nbsp;" . $this->memo_map_isbd;
         }
         $this->memo_map_id = $this->map_info->map['id'];
         $this->memo_map_echelle = $this->map_info->map['echelle'];
         $this->memo_map_projection = $this->map_info->map['projection'];
         $this->memo_map_ref = $this->map_info->map['ref'];
         $this->memo_map_equinoxe = $this->map_info->map['equinoxe'];
         $this->memo_map = $this->map->get_map();
     }
     //Recherche du code dewey
     $requete = "select * from indexint where indexint_id=" . $res->indexint;
     $resultat = pmb_mysql_query($requete);
     if ($code_dewey = pmb_mysql_fetch_object($resultat)) {
         $this->memo_dewey = $code_dewey;
     }
     if ($collections = $this->memo_collection) {
         if ($this->notice->nocoll) {
             $collections .= '; ' . $this->notice->nocoll;
         }
         $this->isbd .= ".&nbsp;-&nbsp;({$collections})" . ' ';
     }
     if (substr(trim($this->isbd), -1) != ".") {
         $this->isbd .= '.';
     }
     //Traitement des exemplaires
     $this->memo_exemplaires = array();
     $requete = "select expl_id, expl_cb, expl_cote, expl_statut,statut_libelle, expl_typdoc, tdoc_libelle, expl_note, expl_comment, expl_section, section_libelle, ";
     $requete .= "expl_owner, lender_libelle, expl_codestat, codestat_libelle, expl_date_retour, expl_date_depot, expl_note, pret_flag, expl_location, location_libelle, expl_prix ";
     if ($opac_sur_location_activate) {
         $requete .= ", ifnull(surloc_id,0) as surloc_id, ifnull(surloc_libelle,'') as surloc_libelle ";
     }
     $requete .= "from exemplaires, docs_statut, docs_type, docs_section, docs_codestat, lenders, docs_location ";
     if ($opac_sur_location_activate) {
         $requete .= "left join sur_location on surloc_num=surloc_id ";
     }
     $requete .= "where expl_notice=" . $res->notice_id . " and expl_statut=idstatut and expl_typdoc=idtyp_doc and expl_section=idsection and expl_owner=idlender and expl_codestat=idcode ";
     $requete .= "and expl_location=idlocation ";
     $requete .= "union ";
     $requete .= "select expl_id, expl_cb, expl_cote, expl_statut,statut_libelle, expl_typdoc, tdoc_libelle, expl_note, expl_comment, expl_section, section_libelle, ";
     $requete .= "expl_owner, lender_libelle, expl_codestat, codestat_libelle, expl_date_retour, expl_date_depot, expl_note, pret_flag, expl_location, location_libelle, expl_prix ";
     if ($opac_sur_location_activate) {
         $requete .= ", ifnull(surloc_id,0) as surloc_id, ifnull(surloc_libelle,'') as surloc_libelle ";
     }
     $requete .= "from exemplaires, bulletins, docs_statut, docs_type, docs_section, docs_codestat, lenders, docs_location ";
     if ($opac_sur_location_activate) {
         $requete .= "left join sur_location on surloc_num=surloc_id ";
     }
     $requete .= "where bulletins.num_notice=" . $res->notice_id . " and expl_bulletin=bulletin_id and expl_statut=idstatut and expl_typdoc=idtyp_doc and expl_section=idsection and expl_owner=idlender and expl_codestat=idcode ";
     $requete .= "and expl_location=idlocation";
     $resultat = pmb_mysql_query($requete);
     while ($ex = pmb_mysql_fetch_object($resultat)) {
         //Champs perso d'exemplaires
         $parametres_perso = array();
         $mes_pp = new parametres_perso("expl");
         if (!$mes_pp->no_special_fields) {
             $mes_pp->get_values($ex->expl_id);
             $values = $mes_pp->values;
             foreach ($values as $field_id => $vals) {
                 $parametres_perso[$mes_pp->t_fields[$field_id]["NAME"]]["TITRE"] = $mes_pp->t_fields[$field_id]["TITRE"];
                 foreach ($vals as $value) {
                     $parametres_perso[$mes_pp->t_fields[$field_id]["NAME"]]["VALUE"][] = $mes_pp->get_formatted_output(array($value), $field_id);
                 }
             }
         }
         $ex->parametres_perso = $parametres_perso;
         $this->memo_exemplaires[] = $ex;
     }
     //Descripteurs
     $requete = "SELECT libelle_categorie FROM categories, notices_categories WHERE notcateg_notice=" . $res->notice_id . " and categories.num_noeud = notices_categories.num_noeud ORDER BY ordre_categorie";
     $resultat = pmb_mysql_query($requete);
     $this->memo_categories = array();
     while ($cat = pmb_mysql_fetch_object($resultat)) {
         $this->memo_categories[] = $cat;
     }
     $authperso = new authperso_notice($this->notice_id);
     $this->memo_authperso_all_isbd .= $authperso->get_notice_display();
     $this->memo_authperso_all_isbd_list = $authperso->get_notice_display_list();
     foreach ($authperso->auth_info as $fields) {
         foreach ($fields["info_fields"] as $field) {
             if (is_array($field["values"]) && count($field["values"])) {
                 $tvalues = array();
                 foreach ($field["values"] as $values) {
                     $tvalues[] = $values["format_value"];
                 }
                 $this->parametres_auth_perso[$field["name"]]["TITRE"][] = $field["label"];
                 $this->parametres_auth_perso[$field["name"]]["VALUE"][] = $tvalues;
             }
         }
     }
     //Champs perso de notice traite par la table notice_custom
     $mes_pp = new parametres_perso("notices");
     $mes_pp->get_values($res->notice_id);
     $values = $mes_pp->values;
     $this->parametres_perso = array();
     foreach ($values as $field_id => $vals) {
         $this->parametres_perso[$mes_pp->t_fields[$field_id]["NAME"]]["TITRE"] = $mes_pp->t_fields[$field_id]["TITRE"];
         foreach ($vals as $value) {
             $this->parametres_perso[$mes_pp->t_fields[$field_id]["NAME"]]["VALUE"][] = $mes_pp->get_formatted_output(array($value), $field_id);
             $this->parametres_perso[$mes_pp->t_fields[$field_id]["NAME"]]["VALUE_IN_DATABASE"][] = $value;
         }
     }
     //Notices liées, relations entre notices
     //les notices mères
     $requete = "SELECT num_notice, linked_notice, relation_type, rank from notices_relations where num_notice=" . $res->notice_id . " order by num_notice, rank asc";
     $resultat = pmb_mysql_query($requete);
     $i = 0;
     while ($notice_fille = pmb_mysql_fetch_object($resultat)) {
         $this->memo_notice_mere[$i] = $notice_fille->linked_notice;
         $this->memo_notice_mere_relation_type[$i] = $notice_fille->relation_type;
         $i++;
     }
     // les notices filles
     $requete = "SELECT num_notice, linked_notice, relation_type, rank from notices_relations where linked_notice=" . $res->notice_id . " order by num_notice, rank asc";
     $resultat = pmb_mysql_query($requete);
     $i = 0;
     while ($notice_mere = pmb_mysql_fetch_object($resultat)) {
         $this->memo_notice_fille[$i] = $notice_mere->num_notice;
         $this->memo_notice_fille_relation_type[$i] = $notice_mere->relation_type;
         $i++;
     }
     // liens vers les périodiques pour les notices d'article
     $req_perio_link = "SELECT notice_id, tit1, code from bulletins,analysis,notices WHERE bulletin_notice=notice_id and bulletin_id=analysis_bulletin and analysis_notice=" . $res->notice_id;
     $result_perio_link = pmb_mysql_query($req_perio_link);
     while ($notice_perio_link = pmb_mysql_fetch_object($result_perio_link)) {
         $this->memo_notice_article[] = $notice_perio_link->notice_id;
     }
     // bulletinage pour les notices de pério
     $req_bulletinage = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero from bulletins, notices WHERE bulletin_notice = notice_id AND notice_id=" . $res->notice_id;
     $result_bulletinage = pmb_mysql_query($req_bulletinage);
     while ($notice_bulletinage = pmb_mysql_fetch_object($result_bulletinage)) {
         $this->memo_bulletinage[] = $notice_bulletinage->bulletin_id;
     }
     // liens vers les bulletins pour les notices d'article
     $req_bull_link = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero from bulletins, analysis WHERE bulletin_id=analysis_bulletin and analysis_notice=" . $res->notice_id;
     $result_bull_link = pmb_mysql_query($req_bull_link);
     while ($notice_bull_link = pmb_mysql_fetch_object($result_bull_link)) {
         $this->memo_article_bulletinage[] = $notice_bull_link->bulletin_id;
     }
     $paramaff["mine_type"] = 1;
     $this->memo_explnum_assoc = show_explnum_per_notice($res->notice_id, 0, "", $paramaff);
     if ($this->notice->code || $this->notice->thumbnail_url) {
         if ($opac_show_book_pics == '1' && ($opac_book_pics_url || $this->notice->thumbnail_url)) {
             $code_chiffre = pmb_preg_replace('/-|\\.| /', '', $this->notice->code);
             $url_image = $opac_book_pics_url;
             $url_image = $opac_url_base . "getimage.php?url_image=" . urlencode($url_image) . "&amp;noticecode=!!noticecode!!&amp;vigurl=" . urlencode($this->notice->thumbnail_url);
             if ($this->notice->thumbnail_url) {
                 $url_image_ok = $this->notice->thumbnail_url;
                 $title_image_ok = "";
             } else {
                 $url_image_ok = str_replace("!!noticecode!!", $code_chiffre, $url_image);
                 $title_image_ok = htmlentities($opac_book_pics_msg, ENT_QUOTES, $charset);
             }
             $this->memo_image = "<img class='vignetteimg' src='" . $url_image_ok . "' title=\"" . $title_image_ok . "\" align='right' hspace='4' vspace='2' style='max-width : 140px; max-height: 200px;' >";
             $this->memo_url_image = $url_image_ok;
         } else {
             $this->memo_image = "";
             $this->memo_url_image = "";
         }
     }
     //calcul du permalink...
     if ($this->notice->niveau_biblio != "b") {
         $this->permalink = $opac_url_base . "index.php?lvl=notice_display&id=" . $this->notice_id;
     } else {
         $this->permalink = $opac_url_base . "index.php?lvl=bulletin_display&id=" . $this->bulletin_id;
     }
     //Traitement des avis
     $this->memo_avis = array();
     $requete = "SELECT id_avis,note,sujet,commentaire,DATE_FORMAT(dateajout,'" . $msg['format_date'] . "') as ladate,empr_login,empr_nom, empr_prenom, valide\n\t\tfrom avis left join empr on id_empr=num_empr where num_notice='" . $res->notice_id . "' and valide=1 order by avis_rank, dateajout desc";
     $resultat = pmb_mysql_query($requete);
     if ($resultat) {
         while ($avis = pmb_mysql_fetch_object($resultat)) {
             $avis->note_textuelle = $msg['avis_detail_note_' . $avis->note];
             if ($charset != "utf-8") {
                 $avis->commentaire = cp1252Toiso88591($avis->commentaire);
             }
             $avis->commentaire = do_bbcode($avis->commentaire);
             $this->memo_avis[] = $avis;
         }
     }
     //Titres uniformes
     $requete = "select * from notices_titres_uniformes where ntu_num_notice=" . $res->notice_id . " order by ntu_ordre";
     $resultat = pmb_mysql_query($requete);
     if (pmb_mysql_num_rows($resultat)) {
         while ($tu = pmb_mysql_fetch_object($resultat)) {
             $tu_memo = new titre_uniforme($tu->ntu_num_tu);
             $tu_memo->parametres_perso = array();
             $mes_pp = new parametres_perso("tu");
             $mes_pp->get_values($tu->ntu_num_tu);
             $values = $mes_pp->values;
             foreach ($values as $field_id => $vals) {
                 $tu_memo->parametres_perso[$mes_pp->t_fields[$field_id]["NAME"]]["TITRE"] = $mes_pp->t_fields[$field_id]["TITRE"];
                 foreach ($vals as $value) {
                     $tu_memo->parametres_perso[$mes_pp->t_fields[$field_id]["NAME"]]["VALUE"][] = $mes_pp->get_formatted_output(array($value), $field_id);
                 }
             }
             $this->memo_tu[] = $tu_memo;
         }
     }
     //statut
     $this->memo_statut['id_notice_statut'] = $res->statut;
     $this->memo_statut['gestion_statut_libelle'] = '';
     $this->memo_statut['opac_statut_libelle'] = '';
     if ($this->memo_statut['id_notice_statut']) {
         $requete = "SELECT * FROM notice_statut WHERE id_notice_statut=" . $this->memo_statut['id_notice_statut'] * 1;
         $resultat = pmb_mysql_query($requete);
         if ($resultat) {
             $statut = pmb_mysql_fetch_object($resultat);
             $this->memo_statut['gestion_statut_libelle'] = $statut->gestion_libelle;
             $this->memo_statut['opac_statut_libelle'] = $statut->opac_libelle;
         }
     }
     return true;
 }
예제 #3
0
파일: banned.php 프로젝트: BGmot/kitchen
<h3>Banned users</h3>
<table border="1">
<tr>
<th>Username</th>
<th>Reason</th>
<th>Moderator</th>
<th>Ban ends</th>
</tr>
<?php 
while ($row = mysql_fetch_assoc($result)) {
    $username = htmlentities($row['username'], HTML_ENTITIES, 'UTF-8');
    $translit_done = false;
    $reason = translit($row['ban_reason'], $translit_done);
    $reason = htmlentities($reason, HTML_ENTITIES, 'UTF-8');
    $reason = before_bbcode($reason);
    $reason = do_bbcode($reason);
    $reason = nl2br($reason);
    $reason = after_bbcode($reason);
    $banned_by = htmlentities($row['banned_by'], HTML_ENTITIES, 'UTF-8');
    $ban_ends = $row['ban_end'];
    print '<tr><td>' . $username . '</td><td>' . $reason . '</td><td>' . $banned_by . '</td><td>' . $ban_ends . '</td></tr>';
}
?>
</table>
</BODY>
</HTML>
<?php 
require 'tail_inc.php';
?>

예제 #4
0
파일: bbcode.php 프로젝트: BGmot/kitchen
/**
 * Renderers
 */
function render_for_display($msgbody)
{
    $msgbody = htmlentities($msgbody, HTML_ENTITIES, 'UTF-8');
    $msgbody = before_bbcode($msgbody);
    $msgbody = do_bbcode($msgbody);
    $msgbody = nl2br($msgbody);
    $msgbody = after_bbcode($msgbody);
    return $msgbody;
}
예제 #5
0
파일: parser.php 프로젝트: BogusCurry/Luna
function parse_signature($text)
{
    global $luna_config, $luna_user;
    if ($luna_config['o_censoring'] == '1') {
        $text = censor_words($text);
    }
    // Convert applicable characters to HTML entities
    $text = luna_htmlspecialchars($text);
    if (strpos($text, '[') !== false && strpos($text, ']') !== false) {
        $text = do_bbcode($text, true);
    }
    if ($luna_config['o_smilies_sig'] == '1' && $luna_user['show_smilies'] == '1') {
        $text = do_smilies($text);
    }
    // Deal with newlines, tabs and multiple spaces
    $pattern = array("\n", "\t", '  ', '  ');
    $replace = array('<br />', '&#160; &#160; ', '&#160; ', ' &#160;');
    $text = str_replace($pattern, $replace, $text);
    return clean_paragraphs($text);
}
예제 #6
0
파일: m_post.php 프로젝트: BGmot/kitchen
</b>!<br/><p>
            Your article has been sent to forum.</p><p>
<?php 
    } else {
        if (!is_null($preview)) {
            $author = $user;
            $subject = $subj;
            $created = $time = strftime('%Y-%m-%d %H:%M:%S');
            $translit_done = false;
            $msgbody = translit($new_body, $translit_done);
            if (!is_null($msgbody) && strlen($msgbody) > 0 && !is_null($prefix) && strlen($prefix) > 0) {
                $msgbody = $prefix . ' ' . str_replace("\n", "\n" . $prefix . ' ', $msgbody);
            }
            $msgbody = htmlentities($msgbody, HTML_ENTITIES, 'UTF-8');
            $msgbody = before_bbcode($msgbody);
            $msgbody = do_bbcode($msgbody);
            $msgbody = nl2br($msgbody);
            $msgbody = after_bbcode($msgbody);
            $trans_body = $msgbody;
            if ($translit_done === true) {
                $trans_body .= '<BR><BR>[Message was transliterated]';
            }
        }
    }
} else {
    // validation error
    print $err;
    http_response_code(400);
}
require_once 'tail_inc.php';
?>
예제 #7
0
        if ($row2['status'] == 3) {
            print '<font color="red">Censor (Мат)</font>';
        } elseif ($row2['status'] == 4) {
            print '<font color="red">Censor (Хамство)</font>';
        } elseif ($row2['status'] == 5) {
            print '<font color="red">Censor (Наезд)</font>';
        } elseif ($row2['status'] == 2) {
            print '<font color="red">Delete message</font>';
        } else {
            $translit_done = false;
            $s_mess = trim($row2['body']);
            $s_mess = str_replace($n_ff, "", $s_mess);
            $s_mess = translit($s_mess, $translit_done);
            if (!is_null($s_mess) && strlen($s_mess) > 0 && !is_null($prefix) && strlen($prefix) > 0) {
                $s_mess = $prefix . ' ' . str_replace("\n", "\n" . $prefix . ' ', $s_mess);
            }
            $s_mess = htmlentities($s_mess, HTML_ENTITIES, 'UTF-8');
            $s_mess = before_bbcode($s_mess);
            $s_mess = do_bbcode($s_mess);
            $s_mess = nl2br($s_mess);
            $s_mess = after_bbcode($s_mess);
            echo trim($s_mess);
        }
    }
    $query = 'UPDATE confa_posts SET views=views + 1 where id=' . $mess_id;
    $result = mysql_query($query);
}
require_once 'tail_inc.php';
?>

예제 #8
0
파일: avis.php 프로젝트: hogsim/PMB
                }
                for ($j = round($loc->note); $j <= $cpt_star; $j++) {
                    $etoiles .= "<img border=0 src='" . get_url_icon('star_unlight.png') . "' align='absmiddle'>";
                }
                echo "<hr /><div class='row'>\n\t\t\t\t\t<div class='left'><b>{$loc->sujet}</b>, " . $loc->ladate;
                if ($opac_avis_show_writer == 1 && $loc->empr_nom) {
                    echo " " . $msg['avis_de'] . " {$loc->empr_prenom} {$loc->empr_nom} ";
                }
                if ($opac_avis_show_writer == 2 && $loc->empr_login) {
                    echo " " . $msg['avis_de'] . " {$loc->empr_login} ";
                }
                echo "</div><div class='right'>{$etoiles}</div>";
                if ($charset != "utf-8") {
                    $loc->commentaire = cp1252Toiso88591($loc->commentaire);
                }
                echo "\n\t\t\t\t\t<div class='row'>" . do_bbcode($loc->commentaire) . "</div>\n\t\t\t\t\t</div>";
            }
        } else {
            echo "<div align='center'><br /><br />" . $msg['avis_aucun_popup'] . "</div>";
        }
        break;
}
if (!$log_ok && $opac_avis_allow == 2) {
    $lvl = 'avis_' . $todo;
    print do_formulaire_connexion();
}
//Enregistrement du log
global $pmb_logs_activate;
if ($pmb_logs_activate) {
    global $log;
    $log->add_log('num_session', session_id());
예제 #9
0
function avis_notice($id, $avis_quoifaire, $valid_id_avis)
{
    global $dbh, $msg, $charset, $gestion_acces_active, $gestion_acces_user_notice;
    global $PMBuserid;
    global $avis_tpl_form1;
    global $opac_avis_allow;
    global $base_path;
    global $pmb_javascript_office_editor, $pmb_avis_note_display_mode;
    if (!$opac_avis_allow) {
        return;
    }
    if ($avis_quoifaire) {
        $acces_jm = '';
        $acces_jl = '';
        if ($gestion_acces_active == 1 && $gestion_acces_user_notice == 1) {
            $ac = new acces();
            $dom_1 = $ac->setDomain(1);
            $acces_jm = $dom_1->getJoin($PMBuserid, 8, 'num_notice');
            //modification
            $acces_jl = $dom_1->getJoin($PMBuserid, 4, 'num_notice');
            //lecture
        }
        switch ($avis_quoifaire) {
            case 'valider':
                for ($i = 0; $i < sizeof($valid_id_avis); $i++) {
                    $acces_m = 1;
                    if ($acces_jm) {
                        $q = "select count(1) from avis {$acces_jm} where id_avis=" . $valid_id_avis[$i];
                        $r = pmb_mysql_query($q, $dbh);
                        if (pmb_mysql_result($r, 0, 0) == 0) {
                            $acces_m = 0;
                        }
                    }
                    if ($acces_m != 0) {
                        $rqt = "update avis set valide=1 where id_avis='" . $valid_id_avis[$i] . "' ";
                        pmb_mysql_query($rqt, $dbh);
                    }
                }
                break;
            case 'invalider':
                for ($i = 0; $i < sizeof($valid_id_avis); $i++) {
                    $acces_m = 1;
                    if ($acces_jm) {
                        $q = "select count(1) from avis {$acces_jm} where id_avis=" . $valid_id_avis[$i];
                        $r = pmb_mysql_query($q, $dbh);
                        if (pmb_mysql_result($r, 0, 0) == 0) {
                            $acces_m = 0;
                        }
                    }
                    if ($acces_m != 0) {
                        $rqt = "update avis set valide=0 where id_avis='" . $valid_id_avis[$i] . "' ";
                        pmb_mysql_query($rqt, $dbh);
                    }
                }
                break;
            case 'supprimer':
                for ($i = 0; $i < sizeof($valid_id_avis); $i++) {
                    $acces_m = 1;
                    if ($acces_jm) {
                        $q = "select count(1) from avis {$acces_jm} where id_avis=" . $valid_id_avis[$i];
                        $r = pmb_mysql_query($q, $dbh);
                        if (pmb_mysql_result($r, 0, 0) == 0) {
                            $acces_m = 0;
                        }
                    }
                    if ($acces_m != 0) {
                        $rqt = "delete from avis where id_avis='" . $valid_id_avis[$i] . "' ";
                        pmb_mysql_query($rqt, $dbh);
                    }
                }
                break;
            case 'ajouter':
                global $avis_note, $avis_sujet, $avis_commentaire;
                if (!$avis_note) {
                    $avis_note = "NULL";
                }
                if ($charset != "utf-8") {
                    $avis_commentaire = cp1252Toiso88591($avis_commentaire);
                }
                $sql = "insert into avis (num_empr,num_notice,note,sujet,commentaire) values ('0','{$id}','{$avis_note}','{$avis_sujet}','" . $avis_commentaire . "')";
                pmb_mysql_query($sql, $dbh);
                break;
            default:
                break;
        }
    }
    $aff = "";
    $req_avis = "select id_avis,note,sujet,commentaire,DATE_FORMAT(dateajout,'" . $msg['format_date'] . "') as ladate,empr_login,empr_nom, empr_prenom, valide\n\t\tfrom avis left join empr on id_empr=num_empr where num_notice='" . $id . "' order by avis_rank, dateajout desc";
    $r = pmb_mysql_query($req_avis, $dbh);
    $nb_avis = 0;
    $nb_avis = pmb_mysql_num_rows($r);
    $aff = "\n\t\t\t<script type='text/javascript' src='javascript/tablist.js'></script>\n\t\t\t<script type=\"text/javascript\" src='./javascript/dyn_form.js'></script>\n\t\t\t<script type=\"text/javascript\" src='./javascript/http_request.js'></script>\n\t\t\t<script type='text/javascript' src='./javascript/bbcode.js'></script>\n\t\t\t<script type='text/javascript' src='./javascript/avis_drop.js'></script>\n\n\t\t\t<script type='text/javascript'>\n\t\t\t\tfunction setCheckboxes(the_form, the_objet, do_check) {\n\t\t\t\t\tvar elts = document.forms[the_form].elements[the_objet+'[]'] ;\n\t\t\t\t\tvar elts_cnt  = (typeof(elts.length) != 'undefined')\n\t\t\t                  ? elts.length\n\t\t\t                  : 0;\n\t\t\t\t\tif (elts_cnt) {\n\t\t\t\t\t\tfor (var i = 0; i < elts_cnt; i++) {\n\t\t\t\t\t\t\telts[i].checked = do_check;\n\t\t\t\t\t\t\t} // end for\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telts.checked = do_check;\n\t\t\t\t\t\t\t} // end if... else\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t</script>\n\n\t\t\t<form class='form-catalog' method='post' id='validation_avis_{$id}' name='validation_avis_{$id}' >\n\t\t";
    $i = 0;
    while ($loc = pmb_mysql_fetch_object($r)) {
        if ($pmb_javascript_office_editor) {
            $office_editor_cmd = " if (typeof(tinyMCE) != 'undefined') tinyMCE.execCommand('mceAddControl', true, 'avis_desc_" . $loc->id_avis . "');\t ";
        }
        $avis_notice = "\n\t\t\t\t<div id='avis_{$loc->id_avis}' onclick=\" make_form('" . $loc->id_avis . "');{$office_editor_cmd}\">\n\t\t\t\t\t<div class='left'>\n\t\t\t\t\t\t<input type='checkbox' name='valid_id_avis[]' id='valid_id_avis[]' value='{$loc->id_avis}' onClick=\"stop_evenement(event);\" />";
        if ($pmb_avis_note_display_mode) {
            if ($pmb_avis_note_display_mode != 1) {
                $categ_avis = $msg['avis_detail_note_' . $loc->note];
            }
            if ($pmb_avis_note_display_mode != 2) {
                $etoiles = "";
                $cpt_star = 4;
                for ($i = 1; $i <= $loc->note; $i++) {
                    $etoiles .= "<img border=0 src='images/star.png' align='absmiddle' />";
                }
                for ($j = round($loc->note); $j <= $cpt_star; $j++) {
                    $etoiles .= "<img border=0 src='images/star_unlight.png' align='absmiddle' />";
                }
            }
            if ($pmb_avis_note_display_mode == 3 || $pmb_avis_note_display_mode == 5) {
                $note = $etoiles . "<br />" . $categ_avis;
            } else {
                if ($pmb_avis_note_display_mode == 4) {
                    $note = $etoiles;
                } else {
                    $note = $etoiles . $categ_avis;
                }
            }
        } else {
            $note = "";
        }
        if (!$loc->valide) {
            $avis_notice .= "<font color='#CC0000'><span >{$note}<b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        } else {
            $avis_notice .= "<font color='#00BB00'><span >{$note}<b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        }
        if ($charset != "utf-8") {
            $loc->commentaire = cp1252Toiso88591($loc->commentaire);
        }
        $avis_notice .= ", " . $loc->ladate . "  {$loc->empr_prenom} {$loc->empr_nom}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>" . do_bbcode($loc->commentaire) . "\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id='update_{$loc->id_avis}'></div>\n\t\t\t\t<br />\n\t\t\t";
        //Drag pour tri
        $id_elt = $loc->id_avis;
        $drag_avis = "<div id=\"drag_" . $id_elt . "\" handler=\"handle_" . $id_elt . "\" dragtype='avisdrop' draggable='yes' recepttype='avisdrop' id_avis='{$id_elt}'\n\t\t\t\trecept='yes' dragicon=\"" . $base_path . "/images/icone_drag_notice.png\" dragtext='" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "' downlight=\"avis_downlight\" highlight=\"avis_highlight\"\n\t\t\t\torder='{$i}' style='' >\n\n\t\t\t\t<span id=\"handle_" . $id_elt . "\" style=\"float:left; padding-right : 7px\"><img src=\"" . $base_path . "/images/sort.png\" style='width:12px; vertical-align:middle' /></span>";
        $aff .= $drag_avis . $avis_notice . "</div>";
        $i++;
    }
    $avis_tpl_form = $avis_tpl_form1;
    $avis_tpl_form = str_replace("!!notice_id!!", $id, $avis_tpl_form);
    $add_avis_onclick = "show_add_avis(" . $id . ");";
    $aff .= "\t{$avis_tpl_form}\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='left'>\n\t\t\t\t\t\t<input type='hidden' name='avis_quoifaire' value='' />\n\t\t\t\t\t\t<input type='button' class='bouton' name='selectionner' value='" . $msg[avis_bt_selectionner] . "' onClick=\"setCheckboxes('validation_avis_{$id}', 'valid_id_avis', true); return false;\" />&nbsp;\n\t\t\t\t\t\t<input type='button' class='bouton' name='valider' value='" . $msg[avis_bt_valider] . "' onclick='this.form.avis_quoifaire.value=\"valider\"; this.form.submit()' />&nbsp;\n\t\t\t\t\t\t<input type='button' class='bouton' name='invalider' value='" . $msg[avis_bt_invalider] . "' onclick='this.form.avis_quoifaire.value=\"invalider\"; this.form.submit()' />&nbsp;\n\t\t\t\t\t\t<input type='button' class='bouton' name='ajouter' value='" . $msg[avis_bt_ajouter] . "' onclick='{$add_avis_onclick}' />&nbsp;\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='right'>\n\t\t\t\t\t\t<input type='button' class='bouton' name='supprimer' value='" . $msg[avis_bt_supprimer] . "' onclick='this.form.avis_quoifaire.value=\"supprimer\"; this.form.submit()' />&nbsp;\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='row'></div>\n\t\t\t</form>\n\n\t\t\t\t";
    if ($avis_quoifaire) {
        $deplier = 1;
    }
    $aff = gen_plus("plus_avis_notice_" . $id, $msg["avis_notice_titre"] . " ({$nb_avis})", $aff, $deplier, '', "recalc_recept();");
    return $aff;
}
예제 #10
0
파일: parser.php 프로젝트: ZerGabriel/punbb
function parse_signature($text)
{
    global $forum_config, $lang_common, $forum_user;
    $return = ($hook = get_hook('ps_parse_signature_start')) ? eval($hook) : null;
    if ($return != null) {
        return $return;
    }
    if ($forum_config['o_censoring'] == '1') {
        $text = censor_words($text);
    }
    $return = ($hook = get_hook('ps_parse_signature_post_censor')) ? eval($hook) : null;
    if ($return != null) {
        return $return;
    }
    // Convert applicable characters to HTML entities
    $text = forum_htmlencode($text);
    $return = ($hook = get_hook('ps_parse_signature_pre_bbcode')) ? eval($hook) : null;
    if ($return != null) {
        return $return;
    }
    if ($forum_config['p_sig_bbcode'] == '1' && strpos($text, '[') !== false && strpos($text, ']') !== false) {
        $text = do_bbcode($text, true);
    }
    if ($forum_config['o_smilies_sig'] == '1' && $forum_user['show_smilies'] == '1') {
        $text = do_smilies($text);
    }
    $return = ($hook = get_hook('ps_parse_signature_post_bbcode')) ? eval($hook) : null;
    if ($return != null) {
        return $return;
    }
    // Deal with newlines, tabs and multiple spaces
    $pattern = array("\n", "\t", '  ', '  ');
    $replace = array('<br />', '&nbsp; &nbsp; ', '&nbsp; ', ' &nbsp;');
    $text = str_replace($pattern, $replace, $text);
    $return = ($hook = get_hook('ps_parse_signature_end')) ? eval($hook) : null;
    if ($return != null) {
        return $return;
    }
    return $text;
}
예제 #11
0
파일: testbb.php 프로젝트: BGmot/kitchen
    die("Specify message ID");
}
// 1 retrieve and print as is
$query = 'SELECT * from confa_posts where id = ' . $msg_id;
// $query = "alter table confa_users add last_pm_check_time timestamp default '0000-00-00 00:00:00'";
// $query = "update confa_users set last_pm_check_time = CURRENT_TIMEstamp";
$result = mysql_query($query);
if (!$result) {
    mysql_log(__FILE__, 'Query page count failed: ' . mysql_error() . ' QUERY: ' . $query);
    die('Query failed.' . mysql_error() . ' QUERY: ' . $query);
}
while ($row = mysql_fetch_assoc($result)) {
    $body = $row['body'];
    print "Original:<br/>" . $body;
    $body = before_bbcode($body);
    print "<br/><b>before_bbcode:</b><br/>" . $body;
    $body = do_bbcode($body);
    print "<br/><b>do_bbcode:</b><br/>" . $body;
    $body = nl2br($body);
    print "<br/><b>nl2br:</b><br/>" . $body;
    $body = after_bbcode($body);
    print "<br/><b>after_bbcode:</b><br/>" . $body;
    // bbcode, print
    // after bbcode, print
}
print "<br/>The end";
require_once 'tail_inc.php';
?>


예제 #12
0
function parse_signature($text)
{
    global $pun_config, $pun_user, $lang_common, $lang_topic;
    if ($pun_config['o_censoring'] == '1') {
        $text = censor_words($text);
    }
    if ($pun_config['o_make_links'] == '1') {
        $text = do_clickable($text);
    }
    $text = pun_htmlspecialchars($text);
    if ($pun_config['o_smilies_sig'] == '1' && $pun_user['show_smilies'] != '0') {
        $text = do_smilies($text);
    }
    if ($pun_config['p_sig_bbcode'] == '1' && strpos($text, '[') !== false && strpos($text, ']') !== false) {
        $text = do_bbcode($text, true);
    }
    // Deal with newlines, tabs and multiple spaces
    $pattern = array("\n", "\t", '    ', '  ', '<p><br />');
    $replace = array('<br />', '&nbsp; &nbsp; ', '&nbsp; ', ' &nbsp;', '<p>');
    $text = str_replace($pattern, $replace, $text);
    return $text;
}
예제 #13
0
 function avis_detail()
 {
     global $dbh, $msg;
     global $action;
     // pour gérer l'affichage des avis en impression de panier
     global $allow_avis_ajout;
     global $avis_tpl_form1;
     global $opac_avis_note_display_mode, $charset;
     global $opac_avis_allow;
     $avis_tpl_form = $avis_tpl_form1;
     $avis_tpl_form = str_replace("!!notice_id!!", $this->notice_id, $avis_tpl_form);
     $add_avis_onclick = "show_add_avis(" . $this->notice_id . ");";
     $sql_avis = "select note, commentaire, sujet from avis where num_notice='{$this->notice_id}' and valide=1 order by avis_rank, note desc, id_avis desc";
     $r_avis = mysql_query($sql_avis, $dbh) or die("<br />" . mysql_error() . "<br />" . $sql_avis . "<br />");
     $sql_avisnb = "select note, count(id_avis) as nb_by_note from avis where num_notice='{$this->notice_id}' and valide=1 group by note ";
     $r_avisnb = mysql_query($sql_avisnb, $dbh) or die("<br />" . mysql_error() . "<br />" . $sql_avisnb . "<br />");
     while ($datanb = mysql_fetch_object($r_avisnb)) {
         $rowspan[$datanb->note] = $datanb->nb_by_note;
     }
     if (mysql_num_rows($r_avis)) {
         $pair_impair = "odd";
         $ret = "";
         while ($data = mysql_fetch_object($r_avis)) {
             // on affiche les résultats
             if ($pair_impair == "odd") {
                 $pair_impair = "even";
             } else {
                 $pair_impair = "odd";
             }
             $ret .= "<tr  class='{$pair_impair}' >";
             if ($opac_avis_note_display_mode) {
                 if ($opac_avis_note_display_mode != 1) {
                     $categ_avis = $msg['avis_detail_note_' . $data->note];
                 }
                 if ($opac_avis_note_display_mode != 2) {
                     $etoiles = "";
                     $cpt_star = 4;
                     for ($i = 1; $i <= $data->note; $i++) {
                         $etoiles .= "<img src='images/star.png' width='15' height='15' align='absmiddle' />";
                     }
                     for ($j = round($data->note); $j <= $cpt_star; $j++) {
                         $etoiles .= "<img border=0 src='images/star_unlight.png' align='absmiddle' />";
                     }
                 }
                 if ($opac_avis_note_display_mode == 3) {
                     $aff = $etoiles . "<br />" . $categ_avis;
                 } else {
                     $aff = $etoiles . $categ_avis;
                 }
                 $ret .= "<td class='avis_detail_note_" . $data->note . "'  >" . $aff . "</td>";
             }
             $ret .= "\n\t\t\t\t\t<td class='avis_detail_commentaire_" . $data->note . "'>" . do_bbcode($data->commentaire) . "\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<span class='avis_detail_signature'>" . htmlentities($data->sujet, ENT_QUOTES, $charset) . "</span>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n";
         }
         if ($opac_avis_note_display_mode != 2 && $opac_avis_note_display_mode) {
             $etoiles_moyenne = $this->stars($this->avis_moyenne);
         }
         if ($action == "print" || $opac_avis_allow == 1 && !$_SESSION["user_code"]) {
             $ret = "<h3 class='avis_detail'>" . $msg['avis_detail'] . " :\n\t\t\t\t\t" . str_replace("!!nb_avis!!", $this->avis_qte, $msg['avis_detail_nb_auth_ajt']) . "\n\t\t\t\t\t</h3>\n\t\t\t\t\t<table style='width:100%;'>" . $ret . "</table>";
         } else {
             $ret = "<h3 class='avis_detail'>" . $msg['avis_detail'] . " {$etoiles_moyenne}\n\t\t\t\t\t\t<span class='lien_ajout_avis'> : \n\t\t\t\t\t\t\t<a href='#' onclick=\"{$add_avis_onclick} return false;\">" . str_replace("!!nb_avis!!", $this->avis_qte, $msg['avis_detail_nb_ajt']) . "</a>\t\t\t\t\t\n\t\t\t\t\t\t</span></h3>\n\t\t\t\t\t\t{$avis_tpl_form}\n\t\t\t\t\t\t<table style='width:100%;'>" . $ret . "</table>";
         }
     } else {
         if ($action == "print" || $opac_avis_allow == 1 && !$_SESSION["user_code"]) {
             $ret = "<h3 class='avis_detail'>" . $msg['avis_detail_aucun_auth_ajt'] . "\n\t\t\t\t\t</h3>";
         } else {
             $ret = "<h3 class='avis_detail'>" . $msg['avis_detail'] . "\n\t\t\t\t\t\t<span class='lien_ajout_avis'>\n\t\t\t\t\t\t\t<a href='#' onclick=\"{$add_avis_onclick} return false;\">" . $msg['avis_detail_aucun_ajt'] . "</a>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</span></h3>\n\t\t\t\t\t\t{$avis_tpl_form}";
         }
     }
     return $ret;
 }
예제 #14
0
파일: parser.php 프로젝트: highpictv/forum
function parse_signature($text)
{
    global $pun_config, $lang_common, $pun_user;
    if ($pun_config['o_censoring'] == '1') {
        $text = censor_words($text);
    }
    // Convert applicable characters to HTML entities
    $text = pun_htmlspecialchars($text);
    if ($pun_config['p_sig_bbcode'] == '1' && strpos($text, '[') !== false && strpos($text, ']') !== false) {
        $text = do_bbcode($text, true);
    }
    if ($pun_config['o_smilies_sig'] == '1' && $pun_user['show_smilies'] == '1') {
        $text = do_smilies($text);
    }
    // Deal with newlines, tabs and multiple spaces
    $pattern = array("\n", "\t", '  ', '  ');
    $replace = array('<br />', '&#160; &#160; ', '&#160; ', ' &#160;');
    $text = str_replace($pattern, $replace, $text);
    // Add paragraph tag around post, but make sure there are no empty paragraphs
    $text = preg_replace('#<br />\\s*?<br />((\\s*<br />)*)#i', "</p>\$1<p>", $text);
    $text = str_replace('<p><br />', '<p>', $text);
    $text = str_replace('<p></p>', '', '<p>' . $text . '</p>');
    return $text;
}
예제 #15
0
function parse_signature($text)
{
    global $pun_config, $lang_common, $pun_user;
    if ($pun_config['o_censoring'] == 1) {
        $text = censor_words($text);
    }
    $text = pun_htmlspecialchars($text);
    if ($pun_config['o_make_links'] == 1) {
        $text = do_clickable($text);
    }
    if ($pun_config['o_smilies_sig'] == 1 && $pun_user['show_smilies']) {
        $text = do_smilies($text);
    }
    if ($pun_config['p_sig_bbcode'] && strpos($text, '[') !== false && strpos($text, ']') !== false) {
        $text = do_bbcode($text);
        if ($pun_config['p_sig_img_tag']) {
            $text = preg_replace_callback('#\\[img\\]((ht|f)tps?://)([^\\s<"]*?)\\[/img\\]#', '_replace_signature_img', $text);
        }
    }
    // Deal with newlines, tabs and multiple spaces
    return str_replace(array("\n", "\t", '  ', '  '), array('<br />', '&#160; &#160; ', '&#160; ', ' &#160;'), $text);
}
예제 #16
0
파일: avis.inc.php 프로젝트: bouchra012/PMB
                for ($j = round($loc->note); $j <= $cpt_star; $j++) {
                    $etoiles .= "<img border=0 src='images/star_unlight.png' align='absmiddle' />";
                }
            }
            if ($pmb_avis_note_display_mode == 3) {
                $note = $etoiles . "<br />" . $categ_avis;
            } else {
                $note = $etoiles . $categ_avis;
            }
        } else {
            $note = "";
        }
        if (!$loc->valide) {
            $res_final .= "<font color='#CC0000'><span >{$note}<b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        } else {
            $res_final .= "<font color='#00BB00'><span >{$note}<b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        }
        if ($charset != "utf-8") {
            $loc->commentaire = cp1252Toiso88591($loc->commentaire);
        }
        $res_final .= ", " . $loc->ladate . "  {$loc->empr_prenom} {$loc->empr_nom} \n\t\t\t\t</div>\n\n\t\t\t\t<div class='row'>\n\t\t\t\t\t" . do_bbcode($loc->commentaire) . "\n\t\t\t\t</div>\n\t\t\t</div><div id='update_{$loc->id_avis}'></div>\n\t\t\t<br />";
    }
    $res_final .= "</ul><br />";
    print $res_final;
}
print aff_pagination($url_base, $nbr_lignes, $nb_per_page, $page, 10, false, true);
echo "</div>";
echo "\n\t\t<div class='row'>\n\t\t\t<div class='left'>\n\t\t\t\t<input type='hidden' name='quoifaire' value='' />\n\t\t\t\t<input type='button' class='bouton' name='valider' value='" . $msg[avis_bt_valider] . "' onclick='this.form.quoifaire.value=\"valider\"; this.form.submit()' />&nbsp;\n\t\t\t\t<input type='button' class='bouton' name='invalider' value='" . $msg[avis_bt_invalider] . "' onclick='this.form.quoifaire.value=\"invalider\"; this.form.submit()' />&nbsp;\n\t\t\t\t<input type='button' class='bouton' name='supprimer' value='" . $msg[avis_bt_supprimer] . "' onclick='this.form.quoifaire.value=\"supprimer\"; this.form.submit()' />&nbsp;\n\t\t\t\t</div>\n\t\t\t<div class='right'>\n\t\t\t\t<input type='button' class='bouton' name='selectionner' value='" . $msg[avis_bt_selectionner] . "' onClick=\"setCheckboxes('validation_avis', 'valid_id_avis', true); return false;\" />&nbsp;\n\t\t\t\t</div>\n\t\t\t</div>\n<div class='row'></div>\n\t\t\t</form>";
jscript_checkbox();
?>
		
예제 #17
0
파일: parser.php 프로젝트: Razze/hamsterpaj
function parse_message($text, $html = 'off')
{
    if ($html != 'on') {
        // Convert applicable characters to HTML entities
        $text = pun_htmlspecialchars($text);
    }
    // If the message contains a code tag we have to split it up (text within [code][/code] shouldn't be touched)
    if (strpos($text, '[code]') !== false && strpos($text, '[/code]') !== false) {
        list($inside, $outside) = split_text($text, '[code]', '[/code]');
        $outside = array_map('ltrim', $outside);
        $text = implode('<">', $outside);
    }
    $text = do_clickable($text);
    if (strpos($text, '[') !== false && strpos($text, ']') !== false) {
        $text = do_bbcode($text);
        $text = preg_replace('#\\[img\\]((ht|f)tps?://)([^\\s<"]*?)\\[/img\\]#e', 'handle_img_tag(\'$1$3\')', $text);
    }
    // Deal with newlines, tabs and multiple spaces
    $pattern = array("\n", "\t", '  ', '  ');
    $replace = array('<br />', '&nbsp; &nbsp; ', '&nbsp; ', ' &nbsp;');
    $text = str_replace($pattern, $replace, $text);
    // If we split up the message before we have to concatenate it together again (code tags)
    if (isset($inside)) {
        $outside = explode('<">', $text);
        $text = '';
        $num_tokens = count($outside);
        for ($i = 0; $i < $num_tokens; ++$i) {
            $text .= $outside[$i];
            if (isset($inside[$i])) {
                $num_lines = (substr_count($inside[$i], "\n") + 3) * 1.5;
                $height_str = $num_lines > 35 ? '35em' : $num_lines . 'em';
                $text .= '</p><div class="codebox"><div class="incqbox"><h4>Kod:</h4><div class="scrollbox" style="height: ' . $height_str . '"><pre>' . $inside[$i] . '</pre></div></div></div><p>';
            }
        }
    }
    // Add paragraph tag around post, but make sure there are no empty paragraphs
    $text = str_replace('<p></p>', '', '<p class="IE_wrap">' . $text . '</p>');
    $pattern = '/@([0-9a-zA-Z_\\-åäöÅÄÖ]+)@/';
    $replacement = '<div style="font-weight: bold; font-style: italic;">Svarar till <a href="/traffa/quicksearch.php?username=$1">$1</a></div>';
    $text = preg_replace($pattern, $replacement, $text);
    $pattern = '/@([0-9a-zA-Z_\\-åäöÅÄÖ]+):([0-9]+)@/';
    function fix_postid($matches)
    {
        $query = 'SELECT timestamp FROM forum_posts, login WHERE forum_posts.id = ' . $matches[2] . ' AND login.username LIKE "' . $matches[1] . '" AND login.id = forum_posts.user';
        $result = mysql_query($query);
        $data = mysql_fetch_assoc($result);
        if (mysql_num_rows($result) > 0) {
            $extra_text .= '<strong><i> <a href="javascript: void(0);" onclick="window.open(\'read_post_popup.php?id=' . $matches[2] . '\'';
            $extra_text .= ', \'_blank\', \'width=600, height=450, scrollbars=yes\');">';
            $extra_text .= 'Svarar på inlägg skrivet av ' . $matches[1] . ', ' . date('Y-m-d H:i', $data['timestamp']) . '</a></strong></i>';
        }
        return $extra_text;
    }
    $text = preg_replace_callback($pattern, "fix_postid", $text);
    return $text;
}
예제 #18
0
function update_avis($id)
{
    global $dbh, $desc, $sujet, $msg, $charset;
    global $pmb_avis_note_display_mode;
    header('Content-Type: text/html;charset=' . $charset);
    $req = "update avis set sujet='" . $sujet . "', commentaire='" . $desc . "' where id_avis='" . $id . "'";
    pmb_mysql_query($req, $dbh);
    $requete = "select avis.note, avis.sujet, avis.commentaire, avis.id_avis, DATE_FORMAT(avis.dateAjout,'" . $msg[format_date] . "') as ladate, ";
    $requete .= "empr_login, empr_nom, empr_prenom, ";
    $requete .= "niveau_biblio, niveau_biblio, valide, notice_id ";
    $requete .= "from avis ";
    $requete .= "left join empr on empr.id_empr=avis.num_empr ";
    $requete .= "left join notices on notices.notice_id=avis.num_notice ";
    $requete .= "where id_avis='" . $id . "'";
    $requete .= "order by index_serie, tnvol, index_sew ,dateAjout desc ";
    $res = pmb_mysql_query($requete, $dbh);
    while ($loc = pmb_mysql_fetch_object($res)) {
        $display = "\n\t\t\t<div class='left'>\n\t\t\t\t<input type='checkbox' name='valid_id_avis[]' id='valid_id_avis[]' value='{$loc->id_avis}' onClick=\"stop_evenement(event);\" />";
        if ($pmb_avis_note_display_mode) {
            if ($pmb_avis_note_display_mode != 1) {
                $categ_avis = $msg['avis_detail_note_' . $loc->note];
            }
            if ($pmb_avis_note_display_mode != 2) {
                $etoiles = "";
                $cpt_star = 4;
                for ($i = 1; $i <= $loc->note; $i++) {
                    $etoiles .= "<img border=0 src='images/star.png' align='absmiddle' />";
                }
                for ($j = round($loc->note); $j <= $cpt_star; $j++) {
                    $etoiles .= "<img border=0 src='images/star_unlight.png' align='absmiddle' />";
                }
            }
            if ($pmb_avis_note_display_mode == 3 || $pmb_avis_note_display_mode == 5) {
                $note = $etoiles . "<br />" . $categ_avis;
            } else {
                if ($pmb_avis_note_display_mode == 4) {
                    $note = $etoiles;
                } else {
                    $note = $etoiles . $categ_avis;
                }
            }
        } else {
            $note = "";
        }
        if (!$loc->valide) {
            $display .= "<font color='#CC0000'><span >{$note}<b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        } else {
            $display .= "<font color='#00BB00'><span >{$note}<b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        }
        if ($charset != "utf-8") {
            $loc->commentaire = cp1252Toiso88591($loc->commentaire);
        }
        $display .= ", " . htmlentities($loc->ladate, ENT_QUOTES, $charset) . " " . htmlentities($loc->empr_prenom . " " . $loc->empr_nom, ENT_QUOTES, $charset) . "\n\t\t\t</div>\n\t\t\t<div class='row'>" . do_bbcode($loc->commentaire) . "\t</div>\n\t\t";
    }
    print $display;
}
예제 #19
0
function parse_signature($text)
{
    global $pun_config, $lang_common, $pun_user;
    if ($pun_config['o_censoring'] == '1') {
        $text = censor_words($text);
    }
    $text = pun_htmlspecialchars($text);
    if ($pun_config['o_make_links'] == '1') {
        $text = do_clickable($text);
    }
    if ($pun_config['o_smilies_sig'] == '1' && $pun_user['show_smilies'] != '0') {
        $text = do_smilies($text);
    }
    if ($pun_config['p_sig_bbcode'] == '1' && strpos($text, '[') !== false && strpos($text, ']') !== false) {
        $text = do_bbcode($text);
        if ($pun_config['p_sig_img_tag'] == '1') {
            //			$text = preg_replace('#\[img\]((ht|f)tps?://)([^\s<"]*?)\.(jpg|jpeg|png|gif)\[/img\]#e', 'handle_img_tag(\'$1$3.$4\', true)', $text);
            $text = preg_replace('#\\[img\\]((ht|f)tps?://)([^\\s<"]*?)\\[/img\\]#e', 'handle_img_tag(\'$1$3\', true)', $text);
        }
    }
    // Deal with newlines, tabs and multiple spaces
    $pattern = array("\n", "\t", '  ', '  ');
    $replace = array('<br />', '&nbsp; &nbsp; ', '&nbsp; ', ' &nbsp;');
    $text = str_replace($pattern, $replace, $text);
    return $text;
}
예제 #20
0
 public static function get_display_avis_detail($notice_id)
 {
     global $dbh, $msg;
     global $action;
     // pour gérer l'affichage des avis en impression de panier
     global $allow_avis_ajout;
     global $avis_tpl_form1;
     global $opac_avis_note_display_mode, $charset;
     global $opac_avis_allow;
     $record_datas = static::get_record_datas($notice_id);
     $avis = $record_datas->get_avis();
     $avis_tpl_form = $avis_tpl_form1;
     $avis_tpl_form = str_replace("!!notice_id!!", $record_datas->get_id(), $avis_tpl_form);
     $add_avis_onclick = "show_add_avis(" . $record_datas->get_id() . ");";
     if (isset($avis['avis']) && count($avis['avis'])) {
         $pair_impair = "odd";
         $ret = "";
         foreach ($avis['avis'] as $data) {
             // on affiche les résultats
             if ($pair_impair == "odd") {
                 $pair_impair = "even";
             } else {
                 $pair_impair = "odd";
             }
             $ret .= "<tr  class='{$pair_impair}' >";
             if ($opac_avis_note_display_mode) {
                 if ($opac_avis_note_display_mode != 1) {
                     $categ_avis = $msg['avis_detail_note_' . $data['note']];
                 }
                 if ($opac_avis_note_display_mode != 2) {
                     $etoiles = static::get_stars($data['note']);
                 }
                 if ($opac_avis_note_display_mode == 3 || $opac_avis_note_display_mode == 5) {
                     $aff = $etoiles . "<br />" . $categ_avis;
                 } else {
                     if ($opac_avis_note_display_mode == 4) {
                         $aff = $etoiles;
                     } else {
                         $aff = $etoiles . $categ_avis;
                     }
                 }
                 $ret .= "<td class='avis_detail_note_" . $data['note'] . "'  >" . $aff . "</td>";
             }
             $ret .= "\n\t\t\t\t\t<td class='avis_detail_commentaire_" . $data['note'] . "'>" . do_bbcode($data['commentaire']) . "\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<span class='avis_detail_signature'>" . htmlentities($data['sujet'], ENT_QUOTES, $charset) . "</span>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n";
         }
         if ($opac_avis_note_display_mode != 2 && $opac_avis_note_display_mode) {
             $etoiles_moyenne = static::get_stars($avis['moyenne']);
         }
         if ($action == "print" || $opac_avis_allow == 1 && !$_SESSION["user_code"]) {
             $ret = "<h3 class='avis_detail'>" . $msg['avis_detail'] . " :\n\t\t\t\t\t" . str_replace("!!nb_avis!!", $avis['qte'], $msg['avis_detail_nb_auth_ajt']) . "\n\t\t\t\t\t</h3>\n\t\t\t\t\t<table style='width:100%;'>" . $ret . "</table>";
         } else {
             $ret = "<h3 class='avis_detail'>" . $msg['avis_detail'] . " {$etoiles_moyenne}\n\t\t\t\t\t\t<span class='lien_ajout_avis'> : \n\t\t\t\t\t\t\t<a href='#' onclick=\"{$add_avis_onclick} return false;\">" . str_replace("!!nb_avis!!", $avis['qte'], $msg['avis_detail_nb_ajt']) . "</a>\t\t\t\t\t\n\t\t\t\t\t\t</span></h3>\n\t\t\t\t\t\t{$avis_tpl_form}\n\t\t\t\t\t\t<table style='width:100%;'>" . $ret . "</table>";
         }
     } else {
         if ($action == "print" || $opac_avis_allow == 1 && !$_SESSION["user_code"]) {
             $ret = "<h3 class='avis_detail'>" . $msg['avis_detail_aucun_auth_ajt'] . "\n\t\t\t\t\t</h3>";
         } else {
             $ret = "<h3 class='avis_detail'>" . $msg['avis_detail'] . "\n\t\t\t\t\t\t<span class='lien_ajout_avis'>\n\t\t\t\t\t\t\t<a href='#' onclick=\"{$add_avis_onclick} return false;\">" . $msg['avis_detail_aucun_ajt'] . "</a>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</span></h3>\n\t\t\t\t\t\t{$avis_tpl_form}";
         }
     }
     return $ret;
 }