コード例 #1
0
ファイル: index_includes.inc.php プロジェクト: hogsim/PMB
}
// pour les étagères et les nouveaux affichages
require_once $base_path . "/includes/isbn.inc.php";
require_once $base_path . "/classes/notice_affichage.class.php";
require_once $base_path . "/includes/etagere_func.inc.php";
require_once $base_path . "/includes/templates/etagere.tpl.php";
// RSS
require_once $base_path . "/includes/includes_rss.inc.php";
if ($is_opac_included) {
    $std_header = $inclus_header;
    $footer = $inclus_footer;
}
//Enrichissement OPAC
if ($opac_notice_enrichment) {
    require_once $base_path . "/classes/enrichment.class.php";
    $enrichment = new enrichment();
    $std_header = str_replace("!!enrichment_headers!!", $enrichment->getHeaders(), $std_header);
} else {
    $std_header = str_replace("!!enrichment_headers!!", "", $std_header);
}
// si $opac_show_homeontop est à 1 alors on affiche le lien retour à l'accueil sous le nom de la bibliothèque
if ($opac_show_homeontop == 1) {
    $std_header = str_replace("!!home_on_top!!", $home_on_top, $std_header);
} else {
    $std_header = str_replace("!!home_on_top!!", "", $std_header);
}
// mise à jour du contenu opac_biblio_main_header
$std_header = str_replace("!!main_header!!", $opac_biblio_main_header, $std_header);
// 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
コード例 #2
0
// +-------------------------------------------------+
// © 2002-2010 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: ajax_enrichment.inc.php,v 1.5 2015-04-03 11:16:27 jpermanne Exp $
require_once $class_path . "/enrichment.class.php";
require_once $class_path . "/parametres_perso.class.php";
$return = array('state' => 0, 'notice_id' => $id, 'result' => array(), 'error' => "");
if (!$id) {
    $return['error'] = "no input";
} else {
    $rqt = "select niveau_biblio, typdoc from notices where notice_id='" . $id . "'";
    $res = pmb_mysql_query($rqt);
    if (pmb_mysql_num_rows($res)) {
        $r = pmb_mysql_fetch_object($res);
        $enrichment = new enrichment($r->niveau_biblio, $r->typdoc);
        switch ($action) {
            case "gettype":
                $typeofenrichment = $enrichment->getTypeOfEnrichment($id);
                $return["result"] = $typeofenrichment;
                break;
            default:
                if ($enrichPage) {
                    $enhance = $enrichment->getEnrichment($id, $type, $enrich_params, $enrichPage);
                } else {
                    $enhance = $enrichment->getEnrichment($id, $type, $enrich_params);
                }
                $return["result"] = $enhance;
                break;
        }
        $return["state"] = 1;
コード例 #3
0
ファイル: notice_view.php プロジェクト: noble82/proyectos-ULS
$templates = "\n\t<html>\n\t\t<head>\n\t\t\t!!styles!!\n\t\t\t!!scripts!!\n\t\t</head>\n\t\t<body>";
if ($opac_notice_enrichment == 0) {
    $templates .= "<script type='text/javascript'>\n\t\tfunction findNoticeElement(id){\n\t\t\tvar ul=null;\n\t\t\t//cas des notices classiques\n\t\t\tvar domNotice = document.getElementById('el'+id+'Child');\n\t\t\t//notice_display\n\t\t\tif(!domNotice) domNotice = document.getElementById('notice');\n\t\t\tif(domNotice){\n\t\t\t\tvar uls = domNotice.getElementsByTagName('ul');\n\t\t\t\tfor (var i=0 ; i<uls.length ; i++){\n\t\t\t\t\tif(uls[i].getAttribute('id') == 'onglets_isbd_public'+id){\n\t\t\t\t\t\tvar ul = uls[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\tvar li = document.getElementById('onglet_isbd'+id);\n\t\t\t\tif(!li) var li = document.getElementById('onglet_public'+id);\n\t\t\t\tif(li) var ul = li.parentNode;\n\t\t\t}\n\t\t\treturn ul;\n\t\t}\n\t\tfunction show_what(quoi, id) {\n\t\t\tswitch(quoi){\n\t\t\t\tcase 'EXPL_LOC' :\n\t\t\t\t\tdocument.getElementById('div_expl_loc' + id).style.display = 'block';\n\t\t\t\t\tdocument.getElementById('div_expl' + id).style.display = 'none';\t\t\n\t\t\t\t\tdocument.getElementById('onglet_expl' + id).className = 'isbd_public_inactive';\t\t\n\t\t\t\t\tdocument.getElementById('onglet_expl_loc' + id).className = 'isbd_public_active';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'EXPL' :\n\t\t\t\t\tdocument.getElementById('div_expl_loc' + id).style.display = 'none';\n\t\t\t\t\tdocument.getElementById('div_expl' + id).style.display = 'block';\n\t\t\t\t\tdocument.getElementById('onglet_expl' + id).className = 'isbd_public_active';\n\t\t\t\t\tdocument.getElementById('onglet_expl_loc' + id).className = 'isbd_public_inactive';\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\tquoi= quoi.toLowerCase();\n\t\t\t\t\t\tvar ul = findNoticeElement(id);\n\t\t\t\t\t\tif (ul) {\n\t\t\t\t\t\t\tvar items  = ul.getElementsByTagName('li');\n\t\t\t\t\t\t\tfor (var i=0 ; i<items.length ; i++){\n\t\t\t\t\t\t\t\tif(items[i].getAttribute('id') == 'onglet_'+quoi+id){\n\t\t\t\t\t\t\t\t\titems[i].className = 'isbd_public_active';\n\t\t\t\t\t\t\t\t\tdocument.getElementById('div_'+quoi+id).style.display = 'block';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tif(items[i].className != 'onglet_tags' && items[i].className != 'onglet_avis' && items[i].className != 'onglet_sugg' && items[i].className != 'onglet_basket'){\n\t\t\t\t\t\t\t\t\t\titems[i].className = 'isbd_public_inactive';\t\n\t\t\t\t\t\t\t\t\t\tdocument.getElementById(items[i].getAttribute('id').replace('onglet','div')).style.display = 'none';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t  \t\n\t\t</script>";
}
$templates .= "<!--<div id='bouton_fermer_notice_preview' class='right'><a href='#' onClick='parent.kill_frame();return false;'>X</a></div>//-->\n\t\t\t<div id='notice'>\n\t\t\t\t#FILES\n\t\t\t</div>\n\t\t</body>\n\t</html>";
$liens_opac = 0;
$opac_notices_depliable = 0;
// paramétrages avancés dans fichier si existe
if (file_exists($base_path . "/includes/notice_view_param.inc.php")) {
    include $base_path . "/includes/notice_view_param.inc.php";
}
$templates = str_replace("!!styles!!", $stylescsscodehtml, $templates);
//Enrichissement OPAC
if ($opac_notice_enrichment) {
    require_once $base_path . "/classes/enrichment.class.php";
    $enrichment = new enrichment();
    $templates = str_replace("!!scripts!!", "<script type='text/javascript' src='includes/javascript/http_request.js'></script>" . $enrichment->getHeaders(), $templates);
} else {
    $templates = str_replace("!!scripts!!", "", $templates);
}
$id = $_GET["id"];
if ($opac_parse_html || $cms_active) {
    ob_start();
}
//Affichage d'une notice
$notice = aff_notice($id, 1);
print str_replace("#FILES", $notice, $templates);
if ($opac_parse_html || $cms_active) {
    if ($opac_parse_html) {
        $htmltoparse = parseHTML(ob_get_contents());
    } else {
コード例 #4
0
<?php

// +-------------------------------------------------+
// © 2002-2010 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: enrichment.inc.php,v 1.1 2011-04-15 15:16:02 arenou Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
if ($opac_notice_enrichment) {
    require_once $class_path . "/enrichment.class.php";
    $enrichment = new enrichment();
    switch ($action) {
        case "update":
            $enrichment->update();
            $enrichment->show_form();
            break;
        default:
            $enrichment->show_form();
            break;
    }
} else {
    error_message("plop", $msg['admin_connecteurs_enrichment_active_param']);
}