当前位置: 首页>>代码示例>>PHP>>正文


PHP get_url_icon函数代码示例

本文整理汇总了PHP中get_url_icon函数的典型用法代码示例。如果您正苦于以下问题:PHP get_url_icon函数的具体用法?PHP get_url_icon怎么用?PHP get_url_icon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_url_icon函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render

 public function render($records)
 {
     $datas = array();
     global $opac_url_base;
     global $opac_show_book_pics;
     global $opac_book_pics_url;
     global $opac_notice_affichage_class;
     if (!$opac_notice_affichage_class) {
         $opac_notice_affichage_class = "notice_affichage";
     }
     if (is_array($records['records']) && count($records['records'])) {
         $query = "select notice_id,tit1,thumbnail_url,code from notices where notice_id in (" . implode(",", $records['records']) . ") order by field( notice_id, " . implode(",", $records['records']) . ")";
         $result = pmb_mysql_query($query);
         if ($result && pmb_mysql_num_rows($result)) {
             while ($row = pmb_mysql_fetch_object($result)) {
                 if ($opac_show_book_pics == '1' && ($opac_book_pics_url || $row->thumbnail_url)) {
                     $code_chiffre = pmb_preg_replace('/-|\\.| /', '', $row->code);
                     $url_image = $opac_book_pics_url;
                     $url_image = $opac_url_base . "getimage.php?url_image=" . urlencode($url_image) . "&noticecode=!!noticecode!!&vigurl=" . urlencode($row->thumbnail_url);
                     if ($row->thumbnail_url) {
                         $url_vign = $row->thumbnail_url;
                     } else {
                         if ($code_chiffre) {
                             $url_vign = str_replace("!!noticecode!!", $code_chiffre, $url_image);
                         } else {
                             $url_vign = get_url_icon("vide.png", 1);
                         }
                     }
                 }
                 $notice_class = new $opac_notice_affichage_class($row->notice_id, "");
                 $notice_class->do_header();
                 if ($this->parameters['used_template']) {
                     $tpl = new notice_tpl_gen($this->parameters['used_template']);
                     $content = $tpl->build_notice($row->notice_id);
                 } else {
                     $notice_class->do_isbd();
                     $content = $notice_class->notice_isbd;
                 }
                 $datas[] = array('id' => $row->notice_id, 'title' => $row->tit1, 'link' => $this->get_constructed_link("notice", $row->notice_id), 'vign' => $url_vign, 'header' => $notice_class->notice_header, 'content' => $content);
             }
         }
     }
     $datas = array('title' => $records['title'], 'records' => $datas);
     return parent::render($datas);
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:45,代码来源:cms_module_recordslist_view_carousel.class.php

示例2: construire_tableau

 /**
  * Affichage sous forme de tableau des exemplaires
  */
 function construire_tableau()
 {
     global $_mimetypes_bymimetype_, $_mimetypes_byext_, $dbh, $charset, $opac_url_base;
     global $opac_visionneuse_allow;
     if (!$this->tableau_id) {
         $this->display = "";
     } else {
         create_tableau_mimetype();
         $url_docnum = "";
         switch ($this->type_elt) {
             case DOCNUM_DMDE:
                 $url_docnum = "/explnum_doc.php?explnumdoc_id=";
                 $requete = "SELECT id_explnum_doc as explnum_id, explnum_doc_nomfichier as explnum_nom,  explnum_doc_mimetype as explnum_mimetype,\n\t\t\t\t\t\t explnum_doc_url as explnum_url, explnum_doc_data as explnum_data, explnum_doc_extfichier as explnum_extfichier\n\t\t\t\t\t\t  FROM explnum_doc join explnum_doc_actions on id_explnum_doc=num_explnum_doc WHERE prive=0 and num_action in (" . implode(',', $this->tableau_id) . ")";
                 break;
             case DOCNUM_SUGG:
                 $url_docnum = "/explnum_doc.php?explnumdoc_id=";
                 $requete = "SELECT id_explnum_doc as explnum_id, explnum_doc_nomfichier as explnum_nom,  explnum_doc_mimetype as explnum_mimetype,\n\t\t\t\t\t\t explnum_doc_url as explnum_url, explnum_doc_data as explnum_data, explnum_doc_extfichier as explnum_extfichier\n\t\t\t\t\t\t  FROM explnum_doc join explnum_doc_sugg on id_explnum_doc=num_explnum_doc WHERE num_suggestion in (" . implode(',', $this->tableau_id) . ")";
                 break;
             case DOCNUM_NOTI:
             default:
                 // récupération des infos des explnum
                 $requete = "SELECT explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype,\n\t\t\t\t\t\t explnum_url, explnum_data, explnum_vignette, explnum_nomfichier, explnum_extfichier\n\t\t\t\t\t\t  FROM explnum WHERE explnum_id in (" . implode(',', $this->tableau_id) . ")";
                 $url_docnum = "/doc_num.php?explnum_id=";
                 break;
         }
         $res = pmb_mysql_query($requete, $dbh);
         $i = 1;
         $allowed_mimetype = array();
         if ($opac_visionneuse_allow) {
             global $opac_photo_filtre_mimetype;
             $allowed_mimetype = explode(",", str_replace("'", "", $opac_photo_filtre_mimetype));
         }
         while ($expl = pmb_mysql_fetch_object($res)) {
             if ($expl->explnum_notice) {
                 $notice_aff = new notice_affichage($expl->explnum_notice, '');
                 $notice_aff->do_header_without_html();
                 $titre = $notice_aff->notice_header_without_html;
             } elseif ($expl->explnum_bulletin) {
                 $titre = $this->get_header_bulletin($expl->explnum_bulletin);
             }
             if ($i == 1) {
                 $ligne = "<div class='row'><div class='colonne3' >!!1!!</div><div class='colonne3' width='33%'>!!2!!</div><div class='colonne3' >!!3!!</div></div>";
             }
             $alt = htmlentities($expl->explnum_nom . " - " . $expl->explnum_mimetype, ENT_QUOTES, $charset);
             if ($expl->explnum_vignette) {
                 $obj = "<img src='" . $opac_url_base . "/vig_num.php?explnum_id={$expl->explnum_id}' alt='{$alt}' title='{$alt}' border='0'>";
             } else {
                 // trouver l'icone correspondant au mime_type
                 $obj = "<img src='" . get_url_icon('mimetype/' . icone_mimetype($expl->explnum_mimetype, $expl->explnum_extfichier), 1) . "' alt='{$alt}' title='{$alt}' border='0'>";
             }
             $lien = "";
             if ($expl->explnum_notice) {
                 $lien = "index.php?lvl=notice_display&id=" . $expl->explnum_notice;
             } elseif ($expl->explnum_bulletin) {
                 $lien = "index.php?lvl=bulletin_display&id=" . $expl->explnum_bulletin;
             }
             $words_to_find = "";
             if ($expl->explnum_mimetype == 'application/pdf' || $expl->explnum_mimetype == 'URL' && strpos($expl->explnum_nom, '.pdf') !== false) {
                 $words_to_find = "#search=\"" . $this->termes_recherche . "\"";
             }
             $expl_liste_obj = "<div class='explnum-titre' style=\"margin-top:20px;margin-bottom:10px;text-align:center;font-weight:bold;\" ><a href='{$lien}'>{$titre}</a></div>";
             $expl_liste_obj .= "<div style=\"text-align:center; word-wrap: break-word\">";
             if ($allowed_mimetype && in_array($expl->explnum_mimetype, $allowed_mimetype)) {
                 $link = "\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\tif(typeof(sendToVisionneuse) == 'undefined'){\n\t\t\t\t\t\t\t\tvar sendToVisionneuse = function (explnum_id){\n\t\t\t\t\t\t\t\t\tdocument.getElementById('visionneuseIframe').src = 'visionneuse.php?'+(typeof(explnum_id) != 'undefined' ? 'explnum_id='+explnum_id+\"\" : '\\'');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</script>\n\t\t\t\t\t\t<a href='#' onclick=\"open_visionneuse(sendToVisionneuse," . $expl->explnum_id . ");return false;\" alt='{$alt}' title='{$alt}'>" . $obj . "</a><br />";
                 $expl_liste_obj .= $link;
             } else {
                 $expl_liste_obj .= "<a href='" . $opac_url_base . $url_docnum . $expl->explnum_id . $words_to_find . "' alt='{$alt}' title='{$alt}' target='_blank'>" . $obj . "</a><br />";
             }
             if ($_mimetypes_byext_[$expl->explnum_extfichier]["label"]) {
                 $explmime_nom = $_mimetypes_byext_[$expl->explnum_extfichier]["label"];
             } elseif ($_mimetypes_bymimetype_[$expl->explnum_mimetype]["label"]) {
                 $explmime_nom = $_mimetypes_bymimetype_[$expl->explnum_mimetype]["label"];
             } else {
                 $explmime_nom = $expl->explnum_mimetype;
             }
             $expl_liste_obj .= htmlentities($expl->explnum_nom, ENT_QUOTES, $charset) . "<div class='explnum_type'>" . htmlentities($explmime_nom, ENT_QUOTES, $charset) . "</div>";
             $expl_liste_obj .= "</div>";
             $ligne = str_replace("!!{$i}!!", $expl_liste_obj, $ligne);
             $i++;
             if ($i == 4) {
                 $ligne_finale .= $ligne;
                 $i = 1;
             }
         }
         if (!$ligne_finale) {
             $ligne_finale = $ligne;
         } elseif ($i != 1) {
             $ligne_finale .= $ligne;
         }
         $ligne_finale = str_replace('!!2!!', "&nbsp;", $ligne_finale);
         $ligne_finale = str_replace('!!3!!', "&nbsp;", $ligne_finale);
         $this->display = $ligne_finale;
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:97,代码来源:explnum_affichage.class.php

示例3: aff_bull_for_art_expl_num_vign_reduit

function aff_bull_for_art_expl_num_vign_reduit($param)
{
    // Affiche pour une notice une icone cliquable pour ouvrir le document numérique
    // $param[0] = Est-ce que l'on tient compte des droits (0 ou vide -> Non, 1 -> Oui)
    // $param[1] = Texte de l'info-bulle dans le cas ou il y a plusieurs documents numériques // Si vide c'est celui par défaut qui est utilisé
    // $param[2] = Url de l'image dans le cas ou il y a plusieurs documents numériques // Si vide c'est celui par défaut qui est utilisé
    // $param[3] = Texte de l'info-bulle dans le cas ou il n'y a qu'un document numérique // Si vide c'est celui par défaut qui est utilisé
    // $param[4] = Url de l'image dans le cas ou il n'y a qu'un document numérique // Si vide c'est celui par défaut qui est utilisé
    global $parser_environnement, $dbh, $opac_visionneuse_allow, $opac_photo_filtre_mimetype, $msg, $opac_url_base;
    if (!$parser_environnement['id_notice']) {
        return "";
    }
    if (is_array($param) && count($param) && $param[0] == 1 && !explnum_test_rights($parser_environnement['id_notice'])) {
        return "";
    }
    //on va chercher le bulletin de l'article
    $requete = "SELECT analysis_bulletin FROM analysis WHERE analysis_notice='" . $parser_environnement['id_notice'] . "'";
    $result = pmb_mysql_query($requete, $dbh);
    if ($result && pmb_mysql_num_rows($result)) {
        $row = pmb_mysql_fetch_object($result);
        $bulletin_id = $row->analysis_bulletin;
    } else {
        return "";
    }
    $query = "SELECT explnum_id,explnum_mimetype,explnum_nom,explnum_nomfichier,explnum_url FROM explnum WHERE explnum_bulletin = '" . $bulletin_id . "'";
    $result = pmb_mysql_query($query);
    if ($result && pmb_mysql_num_rows($result)) {
        $tab_explnum = array();
        while ($explnum = pmb_mysql_fetch_object($result)) {
            if (explnum_test_rights_per_id($explnum->explnum_id)) {
                $tab_explnum[] = $explnum;
            }
        }
        if (count($tab_explnum) > 1) {
            $info_bulle = $msg["info_docs_num_notice"];
            if (is_array($param) && count($param) >= 2 && trim($param[1])) {
                $info_bulle = $param[1];
            }
            $img_multip_doc = get_url_icon("globe_rouge.png");
            if (is_array($param) && count($param) >= 3 && trim($param[2])) {
                $img_multip_doc = trim($param[2]);
            }
            return "<span class=\"expl_num_vign_reduit\" ><img src=\"" . $img_multip_doc . "\" alt=\"" . $info_bulle . "\" title=\"" . $info_bulle . "\" border=\"0\" align=\"middle\" hspace=\"3\"/></span>";
        } elseif (count($tab_explnum) == 1) {
            $explnumrow = $tab_explnum[0];
            $info_bulle = "";
            if (is_array($param) && count($param) >= 4 && trim($param[3])) {
                $info_bulle = $param[3];
            } else {
                if ($explnumrow->explnum_nomfichier) {
                    if ($explnumrow->explnum_nom == $explnumrow->explnum_nomfichier) {
                        $info_bulle = $msg["open_doc_num_notice"] . $explnumrow->explnum_nomfichier;
                    } else {
                        $info_bulle = $explnumrow->explnum_nom;
                    }
                } elseif ($explnumrow->explnum_url) {
                    if ($explnumrow->explnum_nom == $explnumrow->explnum_url) {
                        $info_bulle = $msg["open_link_url_notice"] . $explnumrow->explnum_url;
                    } else {
                        $info_bulle = $explnumrow->explnum_nom;
                    }
                }
            }
            $img_multip_doc = get_url_icon("globe_orange.png");
            if (is_array($param) && count($param) >= 5 && trim($param[4])) {
                $img_multip_doc = trim($param[4]);
            }
            $allowed_mimetype = array();
            if ($opac_visionneuse_allow) {
                $allowed_mimetype = explode(",", str_replace("'", "", $opac_photo_filtre_mimetype));
            }
            $ret = "<span class=\"expl_num_vign_reduit\" >";
            if ($opac_visionneuse_allow && in_array($explnumrow->explnum_mimetype, $allowed_mimetype)) {
                $ret .= "<script type='text/javascript'>\n\t\t\t\t\t\t\tif(typeof(sendToVisionneuse) == 'undefined'){\n\t\t\t\t\t\t\t\tvar sendToVisionneuse = function (explnum_id){\n\t\t\t\t\t\t\t\t\tdocument.getElementById('visionneuseIframe').src = 'visionneuse.php?'+(typeof(explnum_id) != 'undefined' ? 'explnum_id='+explnum_id+\"\" : '\\'');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</script>\n\t\t\t\t\t\t<a href='#' onclick=\"open_visionneuse(sendToVisionneuse," . $explnumrow->explnum_id . ");return false;\" alt=\"" . $info_bulle . "\" title=\"" . $info_bulle . "\">";
            } else {
                $ret .= "<a href=\"" . $opac_url_base . "doc_num.php?explnum_id=" . $explnumrow->explnum_id . "\" target=\"__LINK__\">";
            }
            $ret .= "<img src=\"" . $img_multip_doc . "\" border=\"0\" align=\"middle\" hspace=\"3\" alt=\"" . $info_bulle . "\" title=\"" . $info_bulle . "\"></a></span>";
            return $ret;
        }
    }
    return "";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:83,代码来源:notice_tpl.inc.php

示例4: number_format

 $moyenne = number_format($loc->m, 1, ',', '');
 $c_notice = new notice_affichage($noticeid, "");
 $etoiles_moyenne = $c_notice->stars();
 //liste des témoignages
 $requete = "select note,sujet,commentaire,DATE_FORMAT(dateajout,'" . $msg['format_date'] . "') as ladate,empr_login,empr_nom, empr_prenom\n\t\t\t\tfrom avis\n\t\t\t\tleft join empr on id_empr=num_empr\n\t\t\t\twhere valide=1 and num_notice='" . $noticeid . "'\n\t\t\t\torder by dateajout desc";
 $r = pmb_mysql_query($requete, $dbh);
 if (pmb_mysql_num_rows($r)) {
     echo "<div class='row'>\n\t\t\t\t\t<div class='left'><b>" . $msg['avis_titre_tous'] . ":</b> " . $msg['avis_note'] . ": {$moyenne}</div>\n\t\t\t\t\t<div class='right'>{$etoiles_moyenne}</div>&nbsp;\n\t\t\t\t\t</div>";
     $cpt_star = 4;
     while ($loc = pmb_mysql_fetch_object($r)) {
         $etoiles = "";
         for ($i = 1; $i <= $loc->note; $i++) {
             $etoiles .= "<img border=0 src='" . get_url_icon('star.png') . "' align='absmiddle'>";
         }
         for ($j = round($loc->note); $j <= $cpt_star; $j++) {
             $etoiles .= "<img border=0 src='" . get_url_icon('star_unlight.png') . "' align='absmiddle'>";
         }
         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 {
开发者ID:hogsim,项目名称:PMB,代码行数:31,代码来源:avis.php

示例5: str_replace

// RSS
$std_header = str_replace("!!liens_rss!!", genere_link_rss(), $std_header);
// l'image $logo_rss_si_rss est calculée par genere_link_rss() en global
$liens_bas = str_replace("<!-- rss -->", $logo_rss_si_rss, $liens_bas);
if ($opac_parse_html || $cms_active) {
    ob_start();
}
print $std_header;
if ($time_expired) {
    echo "<script>alert(\"" . sprintf($msg["session_expired"], round($opac_duration_session_auth / 60)) . "\");</script>";
}
if ($opac_autolevel2) {
    $es = new search();
}
require_once $base_path . '/includes/navigator.inc.php';
$link_to_print_search_result = "<span class=\"printSearchResult\">\n<a href='#' onClick=\"openPopUp('" . $base_path . "/print.php?lvl=search&current_search=" . ($_SESSION['last_query'] + 0) . "','print',500,600,-2,-2,'scrollbars=yes,menubar=0'); w.focus(); return false;\">\n\t<img src='" . get_url_icon('print.gif') . "' border='0' align='bottom' alt=\"" . $msg["histo_print"] . "\" title=\"" . $msg["histo_print"] . "\"/>\n</a>\n</span>";
if ($opac_cart_allow && !$opac_cart_only_for_subscriber || $opac_cart_allow && $_SESSION["user_code"]) {
    $add_cart_link = "<span class=\"addCart\"><a href='cart_info.php?lvl={$lvl}&id={$id}' target='cart_info' title='" . $msg["cart_add_result_in"] . "'>" . $msg["cart_add_result_in"] . "</a></span>";
    $add_cart_link_spe = "<span class=\"addCart\"><a href='cart_info.php?lvl={$lvl}&id={$id}!!spe!!' target='cart_info' title='" . $msg["cart_add_result_in"] . "'>" . $msg["cart_add_result_in"] . "</a></span>";
}
$link_to_visionneuse = "\n<script type='text/javascript' >var oldAction;</script>\n<span class=\"open_visionneuse\"><a href='#' onclick=\"open_visionneuse(sendToVisionneuse);return false;\">" . $msg["result_to_phototeque"] . "</a></span>";
//cas général
$sendToVisionneuseByPost = "\n<script type='text/javascript'>\n\tfunction sendToVisionneuse(explnum_id){\n\t\tif (typeof(explnum_id)!= 'undefined') {\n\t\t\tif(!document.form_values.explnum_id){\n\t\t\t\tvar explnum =document.createElement('input');\n\t\t\t\texplnum.setAttribute('type','hidden');\n\t\t\t\texplnum.setAttribute('name','explnum_id');\n\t\t\t\tdocument.form_values.appendChild(explnum);\n\t\t\t}\n\t\t\tdocument.form_values.explnum_id.value = explnum_id;\n\t\t}\n\t\toldAction=document.form_values.action;\n\t\tdocument.form_values.action='visionneuse.php';\n\t\tdocument.form_values.target='visionneuse';\n\t\tdocument.form_values.submit();\t\n\t}\n</script>";
//cas des autorités
$sendToVisionneuseByGet = "\n<script type='text/javascript'>\n\tfunction sendToVisionneuse(explnum_id){\n\t\tdocument.getElementById('visionneuseIframe').src = \"visionneuse.php?mode=!!mode!!&idautorite=!!idautorite!!\"+(typeof(explnum_id) != 'undefined' ? '&explnum_id='+explnum_id : \"\");\n\t}\n</script>";
//cas de notice display
$sendToVisionneuseNoticeDisplay = "\n<script type='text/javascript'>\n\tfunction sendToVisionneuse(explnum_id){\n\t\tdocument.getElementById('visionneuseIframe').src = 'visionneuse.php?'+(typeof(explnum_id) != 'undefined' ? 'explnum_id='+explnum_id+\"\" : '\\'');\n\t}\n</script>";
switch ($lvl) {
    case 'author_see':
        $author_type_aff = 0;
        if ($opac_congres_affichage_mode && $id) {
开发者ID:hogsim,项目名称:PMB,代码行数:31,代码来源:index_includes.inc.php

示例6: bulletin_affichage

function bulletin_affichage($id, $type = "")
{
    global $dbh, $msg;
    global $opac_show_exemplaires;
    $display = "";
    $requete = "SELECT bulletin_id, bulletin_numero, bulletin_notice, mention_date, date_date, bulletin_titre, bulletin_cb, date_format(date_date, '" . $msg["format_date_sql"] . "') as aff_date_date,num_notice FROM bulletins WHERE bulletin_id='{$id}'";
    $res = @pmb_mysql_query($requete, $dbh);
    while ($obj = pmb_mysql_fetch_array($res)) {
        $requete3 = "SELECT notice_id FROM notices WHERE notice_id='" . $obj["bulletin_notice"] . "' ";
        $res3 = @pmb_mysql_query($requete3, $dbh);
        while ($obj3 = pmb_mysql_fetch_object($res3)) {
            $notice3 = new notice($obj3->notice_id);
        }
        $notice3->fetch_visibilite();
        //on vient poser l'ancre des docnums...
        $req = "select explnum_id from explnum where explnum_bulletin = " . $obj["bulletin_id"];
        $resultat = pmb_mysql_query($req, $dbh) or die($req . " " . pmb_mysql_error());
        $nb_ex = pmb_mysql_num_rows($resultat);
        $res_print = "<h3><img src=./images/icon_per.gif> " . $notice3->print_resume(1, $css) . "." . " <b>" . $obj["bulletin_numero"] . "</b>" . ($nb_ex ? "&nbsp;<a href='#docnum'>" . ($nb_ex > 1 ? "<img src='" . get_url_icon("globe_rouge.png") . "' />" : "<img src='" . get_url_icon("globe_orange.png") . "' />") . "</a>" : "") . "</h3>\n";
        $num_notice = $obj['num_notice'];
        if ($obj['bulletin_titre']) {
            $res_print .= htmlentities($obj['bulletin_titre'], ENT_QUOTES, $charset) . "<br />";
        }
        if ($obj['mention_date']) {
            $res_print .= $msg['bull_mention_date'] . " &nbsp;" . $obj['mention_date'] . "\n";
        }
        if ($obj['date_date']) {
            $res_print .= "<br />" . $msg['bull_date_date'] . " &nbsp;" . $obj['aff_date_date'] . " \n";
        }
        if ($type != "visionneuse" && $nb_ex) {
            $res_print .= "<br /><a href='#docnum'>" . ($nb_ex > 1 ? "<img src='" . get_url_icon("globe_rouge.png") . "' />" : "<img src='" . get_url_icon("globe_orange.png") . "' />") . "</a>";
        }
        if ($obj['bulletin_cb']) {
            $res_print .= "<br />" . $msg["code_start"] . " " . htmlentities($obj['bulletin_cb'], ENT_QUOTES, $charset) . "\n";
            $code_cb_bulletin = $obj['bulletin_cb'];
        }
    }
    do_image($res_print, $code_cb_bulletin, 0);
    if ($num_notice) {
        // Il y a une notice de bulletin
        $display .= $res_print;
        $opac_notices_depliable = 0;
        $seule = 1;
        //$display .= pmb_bidi(aff_notice($num_notice,0,0)) ;
        if ($type == "visionneuse") {
            $display .= pmb_bidi(aff_notice($num_notice, 1, 1, 0, "", 0, 1));
        } else {
            $display .= pmb_bidi(aff_notice($num_notice, 0, 1, 0, "", 0));
        }
    } else {
        // construction des dépouillements
        $depouill = "<br /><h3>" . $msg['bull_dep'] . "</h3>";
        $requete = "SELECT * FROM analysis, notices, notice_statut WHERE analysis_bulletin='{$id}' AND notice_id = analysis_notice AND statut = id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0)" . ($_SESSION["user_code"] ? " or (notice_visible_opac_abon=1 and notice_visible_opac=1)" : "") . ") ";
        $res = @pmb_mysql_query($requete, $dbh);
        if (pmb_mysql_num_rows($res)) {
            if ($opac_notices_depliable) {
                $depouill .= $begin_result_liste;
            }
            if ($opac_cart_allow) {
                $depouill .= "<a href=\"cart_info.php?id=" . $id . "&lvl=analysis&header=" . rawurlencode(strip_tags($notice_header)) . "\" target=\"cart_info\" class=\"img_basket\" title='" . $msg["cart_add_result_in"] . "'>" . $msg["cart_add_result_in"] . "</a>";
            }
            $depouill .= "<blockquote>";
            while ($obj = pmb_mysql_fetch_array($res)) {
                $depouill .= pmb_bidi(aff_notice($obj["analysis_notice"]));
            }
            $depouill .= "</blockquote>";
        } else {
            $depouill = $msg["no_analysis"];
        }
        $display .= $res_print;
        $display .= $depouill;
        if ($notice3->visu_expl && (!$notice3->visu_expl_abon || $notice3->visu_expl_abon && $_SESSION["user_code"])) {
            if (!$opac_resa_planning) {
                $resa_check = check_statut(0, $id);
                if ($resa_check) {
                    $requete_resa = "SELECT count(1) FROM resa WHERE resa_idbulletin='{$id}'";
                    $nb_resa_encours = pmb_mysql_result(pmb_mysql_query($requete_resa, $dbh), 0, 0);
                    if ($nb_resa_encours) {
                        $message_nbresa = str_replace("!!nbresa!!", $nb_resa_encours, $msg["resa_nb_deja_resa"]);
                    }
                    if ($_SESSION["user_code"] && $allow_book && $opac_resa && !$popup_resa) {
                        $ret_resa .= "<h3>" . $msg["bulletin_display_resa"] . "</h3>";
                        if ($opac_max_resa == 0 || $opac_max_resa > $nb_resa_encours) {
                            if ($opac_resa_popup) {
                                $ret_resa .= "<a href='#' onClick=\"if(confirm('" . $msg["confirm_resa"] . "')){w=window.open('./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup','doresa','scrollbars=yes,width=500,height=600,menubar=0,resizable=yes'); w.focus(); return false;}else return false;\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                            } else {
                                $ret_resa .= "<a href='./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup' onClick=\"return confirm('" . $msg["confirm_resa"] . "')\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                            }
                            $ret_resa .= $message_nbresa;
                        } else {
                            $ret_resa .= str_replace("!!nb_max_resa!!", $opac_max_resa, $msg["resa_nb_max_resa"]);
                        }
                        $ret_resa .= "<br />";
                    } elseif (!$_SESSION["user_code"] && $opac_resa && !$popup_resa) {
                        // utilisateur pas connecté
                        // préparation lien réservation sans être connecté
                        $ret_resa .= "<h3>" . $msg["bulletin_display_resa"] . "</h3>";
                        if ($opac_resa_popup) {
                            $ret_resa .= "<a href='#' onClick=\"if(confirm('" . $msg["confirm_resa"] . "')){w=window.open('./do_resa.php?lvl=resa&id_bulletin=" . $id . "&oresa=popup','doresa','scrollbars=yes,width=500,height=600,menubar=0,resizable=yes'); w.focus(); return false;}else return false;\" id=\"bt_resa\">" . $msg["bulletin_display_place_resa"] . "</a>";
                        } else {
//.........这里部分代码省略.........
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:bulletin_affichage.inc.php

示例7: get_picture_url

 /**
  * Retourne l'URL calculée de l'image
  * @return string
  */
 public function get_picture_url()
 {
     if (!$this->picture_url && ($this->get_code() || $this->get_thumbnail_url())) {
         global $opac_show_book_pics, $opac_book_pics_url;
         global $opac_url_base;
         if ($opac_show_book_pics == '1' && ($opac_book_pics_url || $this->get_thumbnail_url())) {
             if ($this->get_thumbnail_url()) {
                 $this->picture_url = $this->get_thumbnail_url();
             } else {
                 $code_chiffre = pmb_preg_replace('/-|\\.| /', '', $this->get_code());
                 $url_image = $opac_book_pics_url;
                 $url_image = $opac_url_base . "getimage.php?url_image=" . urlencode($url_image) . "&noticecode=!!noticecode!!&vigurl=" . urlencode($this->get_thumbnail_url());
                 $this->picture_url = str_replace("!!noticecode!!", $code_chiffre, $url_image);
             }
         }
     }
     if (!$this->picture_url) {
         $this->picture_url = get_url_icon("no_image.jpg");
     }
     return $this->picture_url;
 }
开发者ID:hogsim,项目名称:PMB,代码行数:25,代码来源:record_datas.class.php

示例8: genere_simple

 function genere_simple($depliable = 1, $what = 'ISBD')
 {
     global $msg, $charset;
     global $dbh;
     global $cart_aff_case_traitement;
     global $opac_url_base;
     global $opac_avis_allow;
     global $opac_allow_add_tag;
     global $opac_visionneuse_allow;
     global $allow_tag;
     // l'utilisateur a-t-il le droit d'ajouter un tag
     $this->notice_childs = $this->genere_notice_childs();
     // preparation de la case a cocher pour traitement panier
     if ($cart_aff_case_traitement) {
         $case_a_cocher = "<input type='checkbox' value='!!id!!' name='notice[]'/>&nbsp;";
     } else {
         $case_a_cocher = "";
     }
     if ($this->cart_allowed) {
         if (isset($_SESSION["cart"]) && in_array($this->notice_id, $_SESSION["cart"])) {
             $basket = "<a href='#' class=\"img_basket_exist\" title=\"" . $msg['notice_title_basket_exist'] . "\"><img src=\"" . get_url_icon('basket_exist.gif', 1) . "\" align='absmiddle' border='0' alt=\"" . $msg['notice_title_basket_exist'] . "\" /></a>";
         } else {
             $basket = "<a href=\"cart_info.php?id=" . $this->notice_id . "&header=" . rawurlencode($this->notice_header) . "\" target=\"cart_info\" title=\"" . $msg[notice_title_basket] . "\"><img src='" . get_url_icon("basket_small_20x20.png", 1) . "' align='absmiddle' border='0' alt=\"" . $msg[notice_title_basket] . "\"></a>";
         }
     }
     //Avis
     if ($opac_avis_allow && $opac_avis_allow != 2 || $_SESSION["user_code"] && $opac_avis_allow == 2) {
         $basket .= "&nbsp;&nbsp;<a href='#' onclick=\"open('avis.php?todo=liste&noticeid={$this->notice_id}','avis','width=520,height=290,scrollbars=yes,resizable=yes'); return false;\"><img src='" . get_url_icon('avis.png', 1) . "' align='absmiddle' border='0' title=\"" . $msg[notice_title_avis] . "\" alt=\"" . $msg[notice_title_avis] . "\"></a>";
     }
     //add tags
     if ($opac_allow_add_tag == 1 || $opac_allow_add_tag == 2 && $_SESSION["user_code"] && $allow_tag) {
         $basket .= "&nbsp;&nbsp;<a href='#' onclick=\"open('addtags.php?noticeid={$this->notice_id}','ajouter_un_tag','width=350,height=150,scrollbars=yes,resizable=yes'); return false;\"><img src='" . get_url_icon('tag.png', 1) . "'align='absmiddle' border='0' title=\"" . $msg[notice_title_tag] . "\" alt=\"" . $msg[notice_title_tag] . "\"></a>";
     }
     if ($basket) {
         $basket = "<div>" . $basket . "</div>";
     }
     if ($this->notice->niveau_biblio == "s") {
         $icon = "icon_per_16x16.gif";
     } elseif ($this->notice->niveau_biblio == "a") {
         $icon = "icon_art_16x16.gif";
     } else {
         $icon = "icon_" . $this->notice->typdoc . "_16x16.gif";
     }
     $icon_is_new = "";
     if (!$this->no_header && $this->notice->notice_is_new) {
         $icon_is_new = "icone_nouveautes.png";
     }
     if (!$depliable && $this->notice->typdoc == "k") {
         $template = "\n\t\t\t<div id=\"el!!id!!Global\" class=\"notice-global-photo\">\n\t\t\t<div id=\"el!!id!!Parent\" class=\"notice-parent\">\n\n\t\t{$case_a_cocher}";
         if ($icon) {
             $template .= "\n\t\t\t\t<img src=\"" . get_url_icon($icon, 1) . "\" />";
         }
         $template .= "\n    \t\t<span class=\"notice-heada\">!!heada!!</span>";
         if ($icon_is_new) {
             $info_bulle_icon_new = $msg["notice_is_new_gestion"];
             $template .= "&nbsp;<img src=\"" . get_url_icon($icon_is_new, 1) . "\" alt='" . htmlentities($info_bulle_icon_new, ENT_QUOTES, $charset) . "' title='" . htmlentities($info_bulle_icon_new, ENT_QUOTES, $charset) . "'/>";
         }
         $template .= "\n\t\t    <center>!!DOCNUM1!!</center>\n\n    \t\t</div>\t\t\t\n\t\t\t<div id=\"el!!id!!Child\" class=\"notice-child-photo\" style=\"margin-bottom:6px;\">" . $basket . "!!ISBD!!\n\n\t\t\t</div>\n\n\t\t\t</div>\n";
     } else {
         $template = "\n\t\t\t<div id=\"el!!id!!Global\" class=\"notice-global-nophoto\">\n\n\t\t\t<div id=\"el!!id!!Parent\" class=\"notice-parent\">\n\n    \t{$case_a_cocher}";
         if ($icon) {
             $template .= "\n\t\t\t\t<img src=\"" . get_url_icon($icon, 1) . "\" />";
         }
         $template .= "\n    \t\t<span class=\"heada\">!!heada!!</span>";
         if ($icon_is_new) {
             $info_bulle_icon_new = $msg["notice_is_new_gestion"];
             $template .= "&nbsp;<img src=\"" . get_url_icon($icon_is_new, 1) . "\" alt='" . htmlentities($info_bulle_icon_new, ENT_QUOTES, $charset) . "' title='" . htmlentities($info_bulle_icon_new, ENT_QUOTES, $charset) . "'/>";
         }
         $template .= "\n    \t\t<br />\n\t    \t</div>\t\t\t\n\t\t\t\n<div id='el!!id!!Child' class='child' >" . $basket . "\n\t\t\t!!ISBD!!\n\t\t\t!!SUITE!!\n\t\t\t</div>\r\n</div>\n";
     }
     $no_notice = $this->notice_id;
     if ($this->notice->typdoc == "k") {
         // Affichage du premier exemplaire numerique
         if ($no_notice) {
             // Traitement exemplaire numerique
             $requete = "SELECT explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype, explnum_url, explnum_data, explnum_vignette, explnum_nomfichier, explnum_extfichier FROM explnum WHERE ";
             $requete .= "explnum_notice='{$no_notice}' ";
             $requete .= " order by explnum_id LIMIT 1";
             $res = pmb_mysql_query($requete, $dbh) or die($requete . " " . pmb_mysql_error());
             $nb_ex = pmb_mysql_num_rows($res);
         }
         if ($nb_ex) {
             // on recupere les donnees des exemplaires
             $i = 1;
             while ($expl = pmb_mysql_fetch_object($res)) {
                 $ligne = "!!1!!";
                 if ($link_expl) {
                     $tlink = str_replace("!!explnum_id!!", $expl->explnum_id, $link_expl);
                     $tlink = str_replace("!!notice_id!!", $expl->explnum_notice, $tlink);
                     $tlink = str_replace("!!bulletin_id!!", $expl->explnum_bulletin, $tlink);
                 }
                 $alt = htmlentities($expl->explnum_nom . " - " . $expl->explnum_mimetype, ENT_QUOTES, $charset);
                 global $prefix_url_image;
                 if ($prefix_url_image) {
                     $tmpprefix_url_image = $prefix_url_image;
                 } else {
                     $tmpprefix_url_image = "./";
                 }
                 if ($expl->explnum_vignette) {
                     $obj = "<img src='" . $tmpprefix_url_image . "vig_num.php?explnum_id={$expl->explnum_id}' alt='{$alt}' title='{$alt}' border='0'>";
//.........这里部分代码省略.........
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:notice_affichage.phototheque.class.php

示例9: str_replace

                    $tmpStr = str_replace("!!page_en_cours!!", urlencode($page_en_cours), $tmpStr);
                    $tmpStr = str_replace("!!page_en_cours1!!", $page_en_cours, $tmpStr);
                    $tmpStr = str_replace("!!action_suppr_tris!!", "get_sort_content(1, sortSupprIds('cases_a_cocher','cases_suppr'));", $tmpStr);
                    $display .= $tmpStr;
                    $tmpStr = $sort->show_sel_form();
                    $tmpStr = str_replace("!!page_en_cours!!", urlencode($page_en_cours), $tmpStr);
                    $tmpStr = str_replace("!!page_en_cours1!!", $page_en_cours, $tmpStr);
                    $display .= $tmpStr;
                } else {
                    $temp_tri = $_SESSION["nb_sortnotices"] - 1;
                    $display .= "<script> document.location='./index.php?" . $page_en_cours . "&get_last_query=" . $_SESSION["last_query"] . "&sort=" . $temp_tri . "';</script>";
                }
            } else {
                $display .= "<script> document.location='./index.php?" . $page_en_cours . "&get_last_query=" . $_SESSION["last_query"] . "';</script>";
            }
        } else {
            $tmpStr = $sort->show_tris_form();
            $tmpStr = str_replace("<!--bouton close-->", "<a href='#' onClick='parent.kill_sort_frame();return false;'><img src='" . get_url_icon('close.gif') . "' border='0' align='right'></a></div>", $tmpStr);
            $tmpStr = str_replace("!!page_en_cours!!", urlencode($page_en_cours), $tmpStr);
            $tmpStr = str_replace("!!page_en_cours1!!", $page_en_cours, $tmpStr);
            $tmpStr = str_replace("!!action_suppr_tris!!", "get_sort_content(1, sortSupprIds('cases_a_cocher','cases_suppr'));", $tmpStr);
            $display .= $tmpStr;
            $tmpStr = $sort->show_sel_form();
            $tmpStr = str_replace("!!page_en_cours!!", urlencode($page_en_cours), $tmpStr);
            $tmpStr = str_replace("!!page_en_cours1!!", $page_en_cours, $tmpStr);
            $display .= $tmpStr;
        }
        break;
}
ajax_http_send_response($display);
return;
开发者ID:hogsim,项目名称:PMB,代码行数:31,代码来源:sort.inc.php

示例10: show_explnum_per_id

/**
 * Fonction retournant les infos d'exemplaires numériques pour une notice ou un bulletin donné
 * @param int $explnum_id Identifiant du document numérique
 * @return string
 */
function show_explnum_per_id($explnum_id, $link_explnum = "")
{
    global $dbh;
    global $charset;
    global $opac_url_base;
    global $opac_visionneuse_allow;
    global $opac_photo_filtre_mimetype;
    global $opac_explnum_order;
    global $opac_show_links_invisible_docnums;
    global $gestion_acces_active, $gestion_acces_empr_notice, $gestion_acces_empr_docnum;
    global $search_terms;
    if (!$explnum_id) {
        return "";
    }
    global $_mimetypes_bymimetype_, $_mimetypes_byext_;
    create_tableau_mimetype();
    // récupération des infos du document
    $query = "select explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype, explnum_url, explnum_vignette, explnum_nomfichier, explnum_extfichier , explnum_docnum_statut FROM explnum WHERE explnum_id = " . $explnum_id;
    $result = pmb_mysql_query($query, $dbh);
    if ($result && pmb_mysql_num_rows($result)) {
        if ($explnum = pmb_mysql_fetch_object($result)) {
            $docnum_visible = true;
            $id_for_right = $explnum->explnum_notice;
            if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
                $ac = new acces();
                $dom_2 = $ac->setDomain(2);
                $docnum_visible = $dom_2->getRights($_SESSION['id_empr_session'], $id_for_right, 16);
            } else {
                $requete = "SELECT explnum_visible_opac, explnum_visible_opac_abon FROM notices, notice_statut WHERE notice_id ='" . $id_for_right . "' and id_notice_statut=statut ";
                $myQuery = pmb_mysql_query($requete, $dbh);
                if (pmb_mysql_num_rows($myQuery)) {
                    $statut_temp = pmb_mysql_fetch_object($myQuery);
                    if (!$statut_temp->explnum_visible_opac) {
                        $docnum_visible = false;
                    }
                    if ($statut_temp->explnum_visible_opac_abon && !$_SESSION['id_empr_session']) {
                        $docnum_visible = false;
                    }
                } else {
                    $docnum_visible = false;
                }
            }
            if ($docnum_visible) {
                if ($gestion_acces_active == 1 && $gestion_acces_empr_docnum == 1) {
                    $ac = new acces();
                    $dom_3 = $ac->setDomain(3);
                    $docnum_visible = $dom_3->getRights($_SESSION['id_empr_session'], $explnum->explnum_id, 16);
                } else {
                    $requete = "SELECT explnum_visible_opac, explnum_visible_opac_abon FROM explnum, explnum_statut WHERE explnum_id ='" . $explnum->explnum_id . "' and id_explnum_statut=explnum_docnum_statut ";
                    $myQuery = pmb_mysql_query($requete, $dbh);
                    if (pmb_mysql_num_rows($myQuery)) {
                        $statut_temp = pmb_mysql_fetch_object($myQuery);
                        if (!$statut_temp->explnum_visible_opac) {
                            $docnum_visible = false;
                        }
                        if ($statut_temp->explnum_visible_opac_abon && !$_SESSION['id_empr_session']) {
                            $docnum_visible = false;
                        }
                    } else {
                        $docnum_visible = false;
                    }
                }
            }
            if ($link_explnum) {
                $tlink = str_replace("!!explnum_id!!", $explnum->explnum_id, $link_explnum);
                $tlink = str_replace("!!notice_id!!", $explnum->explnum_notice, $tlink);
                $tlink = str_replace("!!bulletin_id!!", $explnum->explnum_bulletin, $tlink);
            }
            $alt = htmlentities($explnum->explnum_nom . " - " . $explnum->explnum_mimetype, ENT_QUOTES, $charset);
            // couleur de l'img en fonction du statut
            if ($expl->explnum_docnum_statut) {
                $rqt_st = "SELECT * FROM explnum_statut WHERE  id_explnum_statut='" . $expl->explnum_docnum_statut . "' ";
                $Query_statut = pmb_mysql_query($rqt_st, $dbh) or die($rqt_st . " " . pmb_mysql_error());
                $r_statut = pmb_mysql_fetch_object($Query_statut);
                $class_img = " class='docnum_" . $r_statut->class_html . "' ";
                if ($expl->explnum_docnum_statut > 1) {
                    $txt = $r_statut->opac_libelle;
                } else {
                    $txt = "";
                }
                $statut_libelle_div = "\r\n\t\t\t\t\t<div id='zoom_statut_docnum" . $expl->explnum_id . "' style='border: 2px solid rgb(85, 85, 85); background-color: rgb(255, 255, 255); position: absolute; z-index: 2000; display: none;'>\r\n\t\t\t\t\t\t<b>{$txt}</b>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t";
            } else {
                $class_img = " class='docnum_statutnot1' ";
                $txt = "";
            }
            if ($explnum->explnum_vignette) {
                $obj = "<img src='" . $opac_url_base . "vig_num.php?explnum_id={$explnum->explnum_id}' alt='{$alt}' title='{$alt}' border='0'>";
            } else {
                // trouver l'icone correspondant au mime_type
                $obj = "<img src='" . get_url_icon('mimetype/' . icone_mimetype($explnum->explnum_mimetype, $explnum->explnum_extfichier), 1) . "' alt='{$alt}' title='{$alt}' border='0'>";
            }
            $explnum_liste_obj = "<center>";
            $obj .= "{$statut_libelle_div}\r\n\t\t\t\t<a  href='#' onmouseout=\"z=document.getElementById('zoom_statut_docnum" . $expl->explnum_id . "'); z.style.display='none'; \" onmouseover=\"z=document.getElementById('zoom_statut_docnum" . $expl->explnum_id . "'); z.style.display=''; \">\r\n\t\t\t\t\t<div class='vignette_doc_num' ><img {$class_img} width='10' height='10' src='./images/spacer.gif'></div>\r\n\t\t\t\t</a>\r\n\t\t\t";
            $words_to_find = "";
            if ($explnum->explnum_mimetype == 'application/pdf' || $explnum->explnum_mimetype == 'URL' && strpos($explnum->explnum_nom, '.pdf') !== false) {
//.........这里部分代码省略.........
开发者ID:hogsim,项目名称:PMB,代码行数:101,代码来源:explnum.inc.php

示例11: get_url_icon

     $current->do_public($short, $ex);
     if ($vignette) {
         $current->do_image($current->notice_public, false);
     }
 } else {
     $current->do_isbd($short, $ex);
     if ($vignette) {
         $current->do_image($current->notice_isbd, false);
     }
 }
 //Icone type de Document
 $icon = $icon_doc[$current->notice->niveau_biblio . $current->notice->typdoc];
 $iconDoc = "";
 if ($icon) {
     $info_bulle_icon = $biblio_doc[$current->notice->niveau_biblio] . " : " . $tdoc->table[$current->notice->typdoc];
     $iconDoc = "<img src=\"" . get_url_icon($icon, 1) . "\" alt=\"{$info_bulle_icon}\" title=\"{$info_bulle_icon}\" align='top' />";
 }
 if ($header) {
     $notice_aff .= "<h3>" . $iconDoc . $current->notice_header . "</h3>";
 }
 if ($current->notice->niveau_biblio == 's') {
     $perio = "<span class='fond-mere'>[" . $msg['isbd_type_perio'] . $bulletins . "]</span>&nbsp;";
 } elseif ($current->notice->niveau_biblio == 'a') {
     $perio = "<span class='fond-article'>[" . $msg['isbd_type_art'] . "]</span>&nbsp;";
 } else {
     $perio = "";
 }
 if ($type == 'PUBLIC') {
     $notice_aff .= $perio . $current->notice_public;
 } else {
     $notice_aff .= $perio . $current->notice_isbd;
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:print.php

示例12: sprintf

            }
        }
    }
    $message = sprintf($msg["cart_add_notices"], $n, $nbtotal);
    if ($na) {
        $message .= ", " . sprintf($msg["cart_already_in"], $na);
    }
    if (count($cart_) == $opac_max_cart_items) {
        $message .= ", " . $msg["cart_full"];
    }
    return $message;
}
print "<script type='text/javascript'>\n\t\t\tvar msg_notice_title_basket_exist = '" . addslashes($msg["notice_title_basket_exist"]) . "';\n\t\t</script>";
print "<script type='text/javascript' src='" . $include_path . "/javascript/cart.js'></script>";
$vide_cache = filemtime("./styles/" . $css . "/" . $css . ".css");
print "<link rel=\"stylesheet\" href=\"./styles/" . $css . "/" . $css . ".css?" . $vide_cache . "\" />\n<span class='img_basket'><img src='" . get_url_icon("basket_small_20x20.png") . "' border='0' valign='center'/></span>&nbsp;";
$cart_ = $_SESSION["cart"];
if (!count($cart_)) {
    $cart_ = array();
}
$id = stripslashes($id);
// attention id peut etre du type es123 (recherche externe)
$location += 0;
if ($id && !$lvl) {
    if (count($cart_) < $opac_max_cart_items) {
        $as = array_search($id, $cart_);
        $notice_header = htmlentities(substr(strip_tags(stripslashes(html_entity_decode($header, ENT_QUOTES))), 0, 45), ENT_QUOTES, $charset);
        if ($notice_header != $header) {
            $notice_header .= "...";
        }
        if ($as !== null && $as !== false) {
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:cart_info.php

示例13: print_resume

 function print_resume($level = 2, $css = '')
 {
     global $css, $msg;
     if (!$this->id) {
         return;
     }
     // adaptation par rapport au niveau de détail souhaité
     switch ($level) {
         // case x :
         case 2:
         default:
             global $publisher_level2_display;
             $publisher_display = $publisher_level2_display;
             break;
     }
     $print = $publisher_display;
     // remplacement des champs statiques
     $print = str_replace("!!id!!", $this->id, $print);
     $print = str_replace("!!name!!", $this->name, $print);
     $print = str_replace("!!adr1!!", $this->adr1, $print);
     $print = str_replace("!!adr2!!", $this->adr2, $print);
     $print = str_replace("!!cp!!", $this->cp, $print);
     $print = str_replace("!!ville!!", $this->ville, $print);
     $print = str_replace("!!pays!!", $this->pays, $print);
     if ($this->web) {
         $print = str_replace("!!site_web!!", "<a href='{$this->web}' target='_blank' type='external_url_autor'><img src='" . get_url_icon("globe.gif") . "' border='0' /></a>", $print);
     } else {
         $print = str_replace("!!site_web!!", "", $print);
     }
     $print = str_replace("!!isbd!!", $this->isbd_entry, $print);
     $print = str_replace("!!aut_comment!!", $this->ed_comment, $print);
     if (preg_match("#!!colls!!#", $print)) {
         global $dbh;
         $query = "select collection_id, collection_name from collections where collection_parent='" . $this->id . "' order by index_coll";
         $result = pmb_mysql_query($query, $dbh);
         if (pmb_mysql_num_rows($result)) {
             $remplacement = $msg[publishers_collections] . "\n<ul>\n";
             while ($obj = pmb_mysql_fetch_object($result)) {
                 $remplacement .= "<li><a href='index.php?lvl=coll_see&id=" . $obj->collection_id . "'>" . $obj->collection_name . "</a></li>\n";
             }
             pmb_mysql_free_result($result);
             $remplacement .= "</ul><div class='row'></div>\n";
         } else {
             $remplacement = "";
         }
         $print = str_replace("!!colls!!", $remplacement, $print);
     }
     if (preg_match("#!!address!!#", $print)) {
         if ($this->adr1 != "" && $this->cp != "" && $this->ville != "") {
             $remplacement = $this->adr1;
             if ($this->adr2 != "") {
                 $remplacement .= "<br />\n" . $this->adr2;
             }
             $remplacement .= "<br />\n" . $this->cp . " " . $this->ville;
             if ($this->pays != "") {
                 $remplacement .= "<br />\n" . $this->pays;
             }
         } else {
             $remplacement = "";
         }
         $print = str_replace("!!address!!", $remplacement, $print);
     }
     return $print;
 }
开发者ID:hogsim,项目名称:PMB,代码行数:64,代码来源:publisher.class.php

示例14: affiche_public_bannette

function affiche_public_bannette($bannettes = "", $aff_notices_nb = 0, $mode_aff_notice = AFF_BAN_NOTICES_BOTH, $depliable = AFF_BAN_NOTICES_DEPLIABLES_OUI, $link_to_bannette = "", $liens_opac = array(), $date_diff = '', $htmldiv_id = "bannette-container", $htmldiv_class = "bannette-container", $htmldiv_zindex = "")
{
    global $dbh;
    global $msg, $charset;
    global $opac_notice_affichage_class;
    global $affiche_bannette_tpl;
    // récupération des bannettes
    global $id_empr;
    global $opac_websubscribe_show;
    global $id_empr;
    if ($bannettes) {
        $clause = " and id_bannette in ({$bannettes}) ";
    }
    //Récupération des infos des bannettes
    $requete = "select distinct id_bannette,comment_public, date_format(date_last_envoi, '" . $msg["format_date"] . "') as aff_date_last_envoi from bannettes where proprio_bannette = 0 {$clause} order by date_last_envoi DESC ";
    $resultat = pmb_mysql_query($requete);
    $tableau_bannettes = array();
    while ($r = pmb_mysql_fetch_object($resultat)) {
        $requete = "select count(1) as compte from bannette_contenu where num_bannette='{$r->id_bannette}'";
        $resnb = pmb_mysql_query($requete);
        $nb = pmb_mysql_fetch_object($resnb);
        if ($nb->compte) {
            $tableau_bannettes[] = array('id_bannette' => $r->id_bannette, 'comment_public' => $r->comment_public, 'aff_date_last_envoi' => $r->aff_date_last_envoi, 'nb_contenu' => $nb->compte);
        }
    }
    if (!sizeof($tableau_bannettes)) {
        return "";
    }
    // préparation du div comme il faut
    $retour_aff = "<div id='{$htmldiv_id}' class='{$htmldiv_class}'";
    if ($htmldiv_zindex) {
        $retour_aff .= " zindex='{$htmldiv_zindex}' ";
    }
    $retour_aff .= " >";
    for ($i = 0; $i < sizeof($tableau_bannettes); $i++) {
        $aff_banette = "";
        $id_bannette = $tableau_bannettes[$i]['id_bannette'];
        $comment_public = $tableau_bannettes[$i]['comment_public'];
        $aff_date_last_envoi = $tableau_bannettes[$i]['aff_date_last_envoi'];
        $aff_banette .= "\n<div class='bannette-titre'><h1>";
        $aff_banette .= "<a href='cart_info.php?lvl=dsi&id={$id_bannette}' target='cart_info' title=\"" . $msg[notice_title_basket] . "\"><img src='" . get_url_icon("basket_small_20x20.png") . "' border='0' alt=\"" . $msg[notice_title_basket] . "\"></a>";
        if ($link_to_bannette) {
            $aff_banette .= "<a href=\"" . str_replace("!!id_bannette!!", $id_bannette, $link_to_bannette) . "\">";
        }
        if ($date_diff) {
            $aff_banette .= htmlentities($comment_public . " - " . formatdate($date_diff), ENT_QUOTES, $charset);
        } else {
            $aff_banette .= htmlentities($comment_public . " - " . $aff_date_last_envoi, ENT_QUOTES, $charset);
        }
        if ($link_to_bannette) {
            $aff_banette .= "</a>";
        }
        //TODO
        if ($_SESSION['user_code']) {
            $aff_banette .= "\n\t\t\t<form name='bannette_subscription' method='post' action='./empr.php?tab=dsi&lvl=bannette_gerer'>\n\t\t\t\t<input type='hidden' name='enregistrer' value='PUB'/>\n\t\t\t\t<input type='hidden' name='lvl' value='bannette_gerer'/>\n\t\t\t\t<input type='hidden' name='bannette_abon[" . $id_bannette . "]' value='1' />";
            $query = "select num_bannette from bannette_abon where num_empr = " . $id_empr;
            $result = pmb_mysql_query($query);
            if (pmb_mysql_num_rows($result)) {
                while ($row = pmb_mysql_fetch_object($result)) {
                    $aff_banette .= "\n\t\t\t\t<input type='hidden' name='bannette_abon[" . $row->num_bannette . "]' value='1' />";
                }
            }
            $aff_banette .= "\n\t\t\t\t<input type='submit' class='bouton' value=\"" . $msg['bannette_abonn'] . "\"/>\n\t\t\t</form>";
        } else {
            if ($opac_websubscribe_show == 2) {
                $aff_banette .= "\n\t\t\t<form name='bannette_subscription' method='post' action='./do_resa.php'>\n\t\t\t\t<input type='hidden' name='enregistrer' value='PUB'/>\n\t\t\t\t<input type='hidden' name='lvl' value='bannette_gerer'/>\n\t\t\t\t<input type='hidden' name='new_connexion' value='1' /> \n\t\t\t\t<input type='hidden' name='tab' value='dsi'/>\n\t\t\t\t<input type='hidden' name='bannette_abon[" . $id_bannette . "]' value='1' />";
                $aff_banette .= "\n\t\t\t\t<input type='submit' class='bouton' value=\"" . $msg['bannette_abonn'] . "\"/>\n\t\t\t</form>";
            }
        }
        $aff_banette .= "</h1></div><hr/>";
        $notices = array();
        notices_bannette($id_bannette, $notices, $date_diff);
        if ($aff_notices_nb > 0) {
            $limite_notices = min($aff_notices_nb, count($notices));
        } elseif ($aff_notices_nb < 0) {
            $limite_notices = min($aff_notices_nb, count($notices));
        } else {
            $limite_notices = count($notices);
        }
        reset($notices);
        $limit = 0;
        if ($limite_notices) {
            $aff_banette .= "<div id='etagere-notice-list_!!id_bannette!!'>";
        }
        while ((list($idnotice, $niveau_biblio) = each($notices)) && $limit < $limite_notices) {
            $limit++;
            $notice = new $opac_notice_affichage_class($idnotice, $liens_opac, 1);
            // si notice visible
            if ($notice->visu_notice) {
                $notice->do_header();
                switch ($mode_aff_notice) {
                    case AFF_BAN_NOTICES_REDUIT:
                        $aff_banette .= "<div class='etagere-titre-reduit'>" . $notice->notice_header_with_link . "</div>";
                        break;
                    case AFF_BAN_NOTICES_ISBD:
                        $notice->do_isbd();
                        $notice->genere_simple($depliable, 'ISBD');
                        $aff_banette .= $notice->result;
                        break;
                    case AFF_BAN_NOTICES_PUBLIC:
//.........这里部分代码省略.........
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:bannette_func.inc.php

示例15: get_compare_wrapper

 /**
  * @return string les script js utile pour le comparateur
  */
 public static function get_compare_wrapper()
 {
     global $base_path;
     global $msg;
     $script = "\n\t\t\tfunction valid_facettes_compare(){\n\t\t\t\t\n\t\t\t\tvar form = document.facettes_multi;\n\t\t\t\tif(form.elements.length>0){\n\t\t\t\t\t\n\t\t\t\t\tvar form_values_compare_input_array=new Array();\n\t\t\t\t\t\n\t\t\t\t\tfor(var i=0; i<form.elements.length;i++){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(form.elements[i].name=='check_facette[]' && form.elements[i].checked){\n\t\t\t\t\t\t\t//on transforme les case à coché en element du tableau des facettes\t\n\t\t\t\t\t\t\t//on ajoute dans le tableau des facettes\n\t\t\t\t\t\t\tvar value=form.elements[i].value;\n\t\t\t\t\t\t\tvar jsonArray=JSON.parse(value);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//On ajoute dans le formulaire de postage général\n\t\t\t\t\t\t\tvar form_values_compare_input=document.createElement('input');\n\t\t\t\t\t\t\tform_values_compare_input.setAttribute('name','check_facette_compare[]');\n\t\t\t\t\t\t\tform_values_compare_input.setAttribute('type','hidden');\n\t\t\t\t\t\t\tform_values_compare_input.setAttribute('value',value);\n\t\t\t\t\t\t\tform_values_compare_input_array.push(form_values_compare_input);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar post=false;\n\t\t\t\t\tvar form_values=document.form_values;\n\t\t\t\t\tfor(var i=0;i<form_values_compare_input_array.length;i++) {\n\t\t\t\t\t\tform_values.appendChild(form_values_compare_input_array[i]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor(var i=0; i<form_values.elements.length;i++){\n\t\t\t\t\t\tif(form_values.elements[i].name=='check_facette_compare[]' && form_values.elements[i].value!=''){\n\t\t\t\t\t\t\tdocument.getElementById('filtre_compare_facette').value='compare';\n\t\t\t\t\t\t\tdocument.getElementById('filtre_compare_form_values').value='compare';\n\t\t\t\t\t\t\tform_values.submit();\n\t\t\t\t\t\t\tpost=true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(post=false){\n\t\t\t\t\t\talert('" . $msg['facette_compare_not_selected'] . "');\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\talert('" . $msg['facette_compare_not_selected'] . "');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfunction valid_compare(){\n\t\t\t\tvar form_values=document.form_values;\n\t\t\t\tvar post=false;\n\t\t\t\t\n\t\t\t\tfor(var i=0; i<form_values.elements.length;i++){\n\t\t\t\t\tif(form_values.elements[i].name=='check_facette_compare[]' && form_values.elements[i].value!=''){\n\t\t\t\t\t\tdocument.getElementById('filtre_compare_facette').value='compare';\n\t\t\t\t\t\tdocument.getElementById('filtre_compare_form_values').value='compare';\n\t\t\t\t\t\tform_values.submit();\n\t\t\t\t\t\tpost=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(post=false){\n\t\t\t\t\talert('" . $msg['facette_compare_not_selected'] . "');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfunction remove_compare_facette(value){\n\t\t\t\t\n\t\t\t\tvar jsonArray = JSON.parse(value);\n\t\t\t\t\n\t\t\t\t//on supprime l'élement du tableau des facettes\n\t\t\t\telem=document.getElementById('compare_facette_'+jsonArray[4]);\n\t\t\t\telem.parentNode.removeChild(elem);\n\t\t\t\t\n\t\t\t\t//on supprime l'élément du formulaire général aussi\n\t\t\t\tvar form_values=document.form_values;\n\t\t\t\tfor(var i in form_values.elements){\n\t\t\t\t\tif(form_values.elements[i] && form_values.elements[i].value && form_values.elements[i].name=='check_facette_compare[]'){\n\t\t\t\t\t\tform_values_json_array=JSON.parse(form_values.elements[i].value);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(form_values_json_array[4]==jsonArray[4]){\n\t\t\t\t\t\t\telem=form_values.elements[i];\n\t\t\t\t\t\t\telem.parentNode.removeChild(elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvar post=true;\n\t\t\t\tfor(var i in form_values.elements){\n\t\t\t\t\tif(form_values.elements[i] && form_values.elements[i].value && form_values.elements[i].name=='check_facette_compare[]'){\n\t\t\t\t\t\tvalid_facettes_compare();\n\t\t\t\t\t\tpost=false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(post){\n\t\t\t\t\tdocument.location.href='{$base_path}/index.php?lvl=more_results&get_last_query=1&reinit_compare=1';\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfunction group_by(groupBy){\n\t\t\t\t\n\t\t\t\tvar jsonArray=JSON.parse(groupBy);\n\t\t\t\n\t\t\t\t//on vide les elements group_by\n\t\t\t\tvar group_by_elements=document.getElementsByName('check_facette_groupby[]');\n\t\t\t\t\n\t\t\t\tvar nodes_to_remove;\n\t\t\t\t\n\t\t\t\tfor(var i in group_by_elements){\n\t\t\t\t\tif(group_by_elements[i].nodeName=='INPUT'){\n\t\t\t\t\t\tif(group_by_elements[i].getAttribute('id')!='facette_groupby_'+jsonArray[3]){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(group_by_elements[i].parentNode.getAttribute('name')!='form_values' && group_by_elements[i].parentNode.getAttribute('name')!='cart_values'){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar group_by_elements_img=group_by_elements[i].previousElementSibling.firstChild;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tgroup_by_elements_img.setAttribute('src','" . get_url_icon('group_by_grey.png') . "');\n\t\t\t\t\t\t\t\tgroup_by_elements[i].setAttribute('value','');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tnodes_to_remove=[i=[group_by_elements[i],group_by_elements[i].parentNode]];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(nodes_to_remove && nodes_to_remove.length>0){\n\t\t\t\t\tfor(var i in nodes_to_remove){\n\t\t\t\t\t\tnodes_to_remove[i][1].removeChild(nodes_to_remove[i][0]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telement=document.getElementById('facette_groupby_'+jsonArray[3]);\n\t\t\t\tvar img=element.previousElementSibling.firstChild;\n\t\t\t\t\n\t\t\t\tvar table_groupby=document.getElementById('facette_groupby');\n\t\t\t\t\n\t\t\t\tif(element.getAttribute('value')==''){\n\t\t\t\t\telement.setAttribute('value',JSON.stringify(groupBy));\n\t\t\t\t\t\n\t\t\t\t\t//On ajoute dans le formulaire de postage général\n\t\t\t\t\tvar form_values=document.form_values;\n\t\t\t\t\tvar form_values_groupby_input=document.createElement('input');\n\t\t\t\t\tform_values_groupby_input.setAttribute('name','check_facette_groupby[]');\n\t\t\t\t\tform_values_groupby_input.setAttribute('type','hidden');\n\t\t\t\t\tform_values_groupby_input.setAttribute('value',groupBy);\n\t\t\t\t\tform_values.appendChild(form_values_groupby_input);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tvalid_facettes_compare();\n\t\t\t}\n\t\t";
     return $script;
 }
开发者ID:hogsim,项目名称:PMB,代码行数:10,代码来源:facette_search_compare.class.php


注:本文中的get_url_icon函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。