public function render($datas)
 {
     global $dbh;
     global $opac_url_base;
     global $opac_show_book_pics;
     global $opac_book_pics_url;
     global $opac_notice_affichage_class;
     global $opac_bannette_notices_depliables;
     global $opac_bannette_notices_format;
     global $opac_bannette_notices_order;
     global $liens_opac;
     if ($datas['id']) {
         $bannette = new bannette($datas['id']);
         $info_header = $bannette->construit_liens_HTML();
         $datas['info']['header'] = $info_header;
         $bannette->notice_tpl = $this->parameters['used_record_template'];
         $bannette->document_notice_tpl = $this->parameters['used_record_template'];
         $bannette->bannette_tpl_num = $this->parameters['used_bannette_template'];
         $bannette->get_datas_content();
         $datas = array_merge($datas, $bannette->data_document);
         $datas["content"] = bannette_tpl::render($bannette->bannette_tpl_num, $datas);
     }
     return parent::render($datas);
 }
Esempio n. 2
0
 function construit_diff()
 {
     global $base_path, $opac_url_base, $opac_default_style, $charset;
     $contenu = $this->construit_contenu_HTML();
     $data_document = $this->data_document;
     $contenu_total = $this->construit_contenu_HTML(0);
     $data_document_total = $this->data_document;
     $titre = $this->construit_liens_HTML();
     // récupération des fichiers de style commun
     $css_path = $base_path . "/opac_css/styles/common/dsi";
     if (is_dir($css_path)) {
         if ($dh = opendir($css_path)) {
             while (($css_file = readdir($dh)) !== false) {
                 if (filetype($css_path . "/" . $css_file) == 'file') {
                     if (substr($css_file, -4) == ".css") {
                         $css .= "<link rel='stylesheet' type='text/css' href='" . $opac_url_base . "styles/common/dsi/" . $css_file . "' title='lefttoright' />\n";
                     }
                 }
             }
             closedir($dh);
         }
     }
     // récupération des fichiers de style personnalisé
     $css_path = $base_path . "/opac_css/styles/" . $opac_default_style . "/dsi";
     if (is_dir($css_path)) {
         if ($dh = opendir($css_path)) {
             while (($css_file = readdir($dh)) !== false) {
                 if (filetype($css_path . "/" . $css_file) == 'file') {
                     if (substr($css_file, -4) == ".css") {
                         $css .= "<link rel='stylesheet' type='text/css' href='" . $opac_url_base . "styles/" . $opac_default_style . "/dsi/" . $css_file . "' title='lefttoright' />\n";
                     }
                 }
             }
             closedir($dh);
         }
     }
     if ($this->bannette_tpl_num) {
         $data_document['info']['header'] = $titre;
         $data_document['info']['footer'] = $this->piedpage_mail;
         $data_document['info']['opac_name'] = $this->comment_public;
         $data_document['info']['name'] = $this->nom_bannette;
         $data_document_total['info']['header'] = $titre;
         $data_document_total['info']['footer'] = $this->piedpage_mail;
         $data_document_total['info']['opac_name'] = $this->comment_public;
         $data_document_total['info']['name'] = $this->nom_bannette;
         $document_diffuse = bannette_tpl::render($this->bannette_tpl_num, $data_document);
         $document_diffuse_total = bannette_tpl::render($this->bannette_tpl_num, $data_document_total);
         $this->document_diffuse = $document_diffuse_total;
         if ($this->document_generate && $this->aff_document) {
             $this->document_diffuse = "<html><head><META HTTP-EQUIV='CONTENT-TYPE' CONTENT='text/html; charset=" . $charset . "'>{$css}</head><body>" . $document_diffuse . "</body></html>";
         }
         $this->texte_diffuse = "<html><head><META HTTP-EQUIV='CONTENT-TYPE' CONTENT='text/html; charset=" . $charset . "'>{$css}</head><body>";
         if ($this->diffusion_email) {
             $this->texte_diffuse .= $document_diffuse;
         }
         $this->texte_diffuse .= "</body></html>";
         $this->texte_diffuse = str_replace("!!nb_notice!!", $this->nb_notices, $this->texte_diffuse);
         $this->texte_export = "<html><head><META HTTP-EQUIV='CONTENT-TYPE' CONTENT='text/html; charset=" . $charset . "'>{$css}</head><body>" . $document_diffuse_total . "</body></html>";
         return;
     }
     if ($this->document_generate && $this->aff_document) {
         $this->document_diffuse = "<html><head><META HTTP-EQUIV='CONTENT-TYPE' CONTENT='text/html; charset=" . $charset . "'>{$css}</head><body>" . $titre . $this->aff_document . $this->piedpage_mail . "</body></html>";
     }
     $this->texte_diffuse = "<html><head><META HTTP-EQUIV='CONTENT-TYPE' CONTENT='text/html; charset=" . $charset . "'>{$css}</head><body>" . $titre;
     if ($this->diffusion_email) {
         $this->texte_diffuse .= $contenu;
     }
     $this->texte_diffuse .= $this->piedpage_mail;
     $this->texte_diffuse .= "</body></html>";
     $this->texte_diffuse = str_replace("!!nb_notice!!", $this->nb_notices, $this->texte_diffuse);
     $this->texte_export = "<html><head><META HTTP-EQUIV='CONTENT-TYPE' CONTENT='text/html; charset=" . $charset . "'>{$css}</head><body>" . $titre . $contenu_total . $this->piedpage_mail . "</body></html>";
 }
Esempio n. 3
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: bannette_tpl.inc.php,v 1.1 2014-10-20 13:38:20 ngantier Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once "{$class_path}/bannette_tpl.class.php";
$bannette_tpl = new bannette_tpl($id);
switch ($action) {
    case "edit":
        print $bannette_tpl->show_form();
        break;
    case "update":
        $bannette_tpl->update_from_form();
        print $bannette_tpl->show_list();
        break;
    case "delete":
        $bannette_tpl->delete();
        print $bannette_tpl->show_list();
        break;
    case 'duplicate':
        $bannette_tpl->id = 0;
        $bannette_tpl->duplicate_from_id = $id;
        print $bannette_tpl->show_form();
        break;
    default:
        print $bannette_tpl->show_list();
        break;