function read_notice_contenu($cmd)
{
    global $opac_notice_affichage_class, $pmb_logs_activate;
    $param = unserialize(stripslashes($cmd));
    if ($opac_notice_affichage_class == "") {
        $opac_notice_affichage_class = "notice_affichage";
    }
    $display = new $opac_notice_affichage_class($param['id'], $param['aj_liens'], $param['aj_cart'], $param['aj_to_print'], $param['aj_header_only'], !$param['aj_no_header']);
    //$display->do_header_without_html();
    if ($param['aj_nodocnum']) {
        $display->docnum_allowed = 0;
    }
    $type_aff = $param['aj_type_aff'];
    switch ($type_aff) {
        case AFF_ETA_NOTICES_ISBD:
            $display->do_isbd();
            $display->genere_simple(0, 'ISBD');
            break;
        case AFF_ETA_NOTICES_PUBLIC:
            $display->do_public();
            $display->genere_simple(0, 'PUBLIC');
            break;
        case AFF_ETA_NOTICES_BOTH:
            $display->do_isbd();
            $display->do_public();
            $display->genere_double(0, 'PUBLIC');
            break;
        case AFF_ETA_NOTICES_BOTH_ISBD_FIRST:
            $display->do_isbd();
            $display->do_public();
            $display->genere_double(0, 'ISBD');
            break;
        default:
            $display->do_isbd();
            $display->do_public();
            $display->genere_double(0, 'autre');
            $flag_no_onglet_perso = 1;
            break;
    }
    $html = $display->result;
    if (!$flag_no_onglet_perso) {
        $onglet_perso = new notice_onglets();
        $html = $onglet_perso->insert_onglets($param['id'], $html);
    }
    if ($param['id'] && $param['datetime'] && $param['token']) {
        if ($opac_notice_affichage_class::check_token($param['id'], $param['datetime'], $param['token'])) {
            add_value_session('tab_result_read', $param['id']);
            if ($pmb_logs_activate) {
                global $infos_notice, $infos_expl;
                $infos_notice = $opac_notice_affichage_class::get_infos_notice($param['id']);
                $infos_expl = $opac_notice_affichage_class::get_infos_expl($param['id']);
                generate_log();
            }
        }
    }
    return $param['id'] . '|*|' . $html;
}
Ejemplo n.º 2
0
        $display->genere_double(0, 'PUBLIC');
        break;
    case AFF_ETA_NOTICES_BOTH_ISBD_FIRST:
        $display->do_isbd();
        $display->do_public();
        $display->genere_double(0, 'ISBD');
        break;
    default:
        $display->do_isbd();
        $display->do_public();
        $display->genere_double(0, 'autre');
        $flag_no_onglet_perso = 1;
        break;
}
$html = $display->result;
if (!$flag_no_onglet_perso) {
    $onglet_perso = new notice_onglets();
    $html = $onglet_perso->insert_onglets($param['id'], $html);
}
if ($param['id'] && $param['datetime'] && $param['token']) {
    if ($opac_notice_affichage_class::check_token($param['id'], $param['datetime'], $param['token'])) {
        add_value_session('tab_result_read', $param['id']);
        if ($pmb_logs_activate) {
            global $infos_notice, $infos_expl;
            $infos_notice = $opac_notice_affichage_class::get_infos_notice($param['id']);
            $infos_expl = $opac_notice_affichage_class::get_infos_expl($param['id']);
            generate_log();
        }
    }
}
ajax_http_send_response($html);