function fetch_data()
 {
     global $dbh;
     $req = "SELECT surloc_num, location_id,location_libelle, rel_date_parution,rel_libelle_numero, rel_comment_opac \n\t\tfrom perio_relance, abts_abts, docs_location\n\t\twhere  location_id=idlocation and rel_abt_num=abt_id and num_notice=" . $this->serial_id . " and rel_comment_opac!='' group by rel_abt_num,rel_date_parution,rel_libelle_numero order by rel_nb desc";
     $result = pmb_mysql_query($req);
     if (pmb_mysql_num_rows($result)) {
         $tr_class = "";
         while ($r = pmb_mysql_fetch_object($result)) {
             $surloc_libelle = "";
             if ($opac_sur_location_activate && $r->surloc_num) {
                 $req = "select surloc_libelle from sur_location where surloc_id = " . $r->surloc_num;
                 $res_surloc = pmb_mysql_query($req);
                 if (pmb_mysql_num_rows($res_surloc)) {
                     $surloc = pmb_mysql_fetch_object($res_surloc);
                     $surloc_libelle = $surloc->surloc_libelle . " / ";
                 }
             }
             $line = $bulletin_retard_line;
             $line = str_replace("!!location_libelle!!", $surloc_libelle . $r->location_libelle, $line);
             $line = str_replace("!!date_parution!!", $r->rel_date_parution, $line);
             $line = str_replace("!!libelle_numero!!", $r->rel_libelle_numero, $line);
             $line = str_replace("!!comment_opac!!", $r->rel_comment_opac, $line);
             if ($tr_class == 'even') {
                 $tr_class = "odd";
             } else {
                 $tr_class = 'even';
             }
             $line = str_replace("!!tr_class!!", $tr_class, $line);
             $lines .= $line;
         }
         $tpl = $bulletin_retard_form;
         $tpl = gen_plus("bulletin_retard", $msg["bulletin_retard_title"], str_replace("!!bulletin_retard_list!!", $lines, $tpl));
     }
 }
 public function get_documents_form($selected = array())
 {
     global $msg, $charset;
     $list = "\n\t\t<div class='row'>&nbsp</div>\n\t\t<hr />\n\t\t<script type='text/javascript'>\n\t\t\tfunction document_change_background(id){\n\t\t\t\tvar doc = dojo.byId('document_'+id);\n\t\t\t\tif(doc.className == 'document_item'){\n\t\t\t\t\tdoc.setAttribute('class','document_item document_item_selected');\n\t\t\t\t}else{\n\t\t\t\t\tdoc.setAttribute('class','document_item');\n\t\t\t\t}\n\t\t\t}\n\t\t</script>\n\t\t<h3>" . htmlentities($msg['cms_documents_add']) . "</h3>";
     foreach ($this->collections as $collection) {
         $coll_form = "<div class='row'>&nbsp;</div>";
         $coll_form = $collection->get_documents_form($selected);
         $coll_form .= "<div class='row'>&nbsp;</div>";
         $list .= gen_plus('collection' . $collection->id, $collection->title . " (" . $collection->nb_doc . " " . $msg['cms_document'] . ")", $coll_form);
     }
     return $list;
 }
 public function get_documents_form($selected = array())
 {
     global $msg, $charset;
     $list = "\n\t\t<div class='row'>&nbsp</div>\n\t\t<hr />\n\t\t<script type='text/javascript'>\n\t\t\tfunction document_change_background(id){\n\t\t\t\tvar doc = dojo.byId('document_'+id);\n\t\t\t\tif(doc.className == 'document_item'){\n\t\t\t\t\tdoc.setAttribute('class','document_item document_item_selected');\n\t\t\t\t}else{\n\t\t\t\t\tdoc.setAttribute('class','document_item');\n\t\t\t\t}\n\t\t\t}\n\t\t\trequire(['dojo/ready', 'dojox/widget/DialogSimple'], function(ready, Dialog) {\n\t\t\t\t\tready(function() {\n\t\t\t\t\t\topenEditDialog = function(id){\n\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\tvar dialog = dijit.byId('dialog_document');\n\t\t\t\t\t\t\t}catch(e){}\n\t\t\t\t\t\t\tif(!dialog){\n\t\t\t\t\t\t\t\tvar dialog = new Dialog({title:'',id:'dialog_document'});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar path ='./ajax.php?module=cms&categ=documents&caller=editorial_form&action=get_form&id='+id;\n\t\t\t\t\t\t\tdialog.attr('href', path);\n\t\t\t\t\t\t\tdialog.startup();\n\t\t\t\t\t\t\tdialog.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t</script>\n\t\t<h3>" . htmlentities($msg['cms_documents_add']) . "</h3>";
     foreach ($this->collections as $collection) {
         $coll_form = "<div class='row'>&nbsp;</div>";
         $coll_form = $collection->get_documents_form($selected);
         $coll_form .= "<div class='row'>&nbsp;</div>";
         $list .= gen_plus('collection' . $collection->id, $collection->title . " (" . $collection->nb_doc . " " . $msg['cms_document'] . ")", $coll_form);
     }
     return $list;
 }
Example #4
0
function show_infopages($dbh)
{
    global $msg, $charset, $opac_url_base, $PMBuserid;
    print "<script src='./javascript/classementGen.js' type='text/javascript'></script>";
    print "<div class='hmenu'>\n\t\t\t\t\t<span><a href='admin.php?categ=infopages&sub2=classementGen'>" . $msg["classementGen_list_libelle"] . "</a></span>\n\t\t\t\t</div><hr>";
    print "<div class='row'><a href='javascript:expandAll()'><img src='./images/expand_all.gif' id='expandall' border='0'></a>\n\t\t\t<a href='javascript:collapseAll()'><img src='./images/collapse_all.gif' id='collapseall' border='0'></a></div>";
    $requete = "select id_infopage, title_infopage, content_infopage, valid_infopage, infopage_classement from infopages order by valid_infopage DESC, title_infopage ";
    $res = pmb_mysql_query($requete, $dbh);
    $nbr = pmb_mysql_num_rows($res);
    $parity = 1;
    $arrayRows = array();
    for ($i = 0; $i < $nbr; $i++) {
        $row = pmb_mysql_fetch_object($res);
        if ($parity % 2) {
            $pair_impair = "even";
        } else {
            $pair_impair = "odd";
        }
        $parity += 1;
        $baselink = "./admin.php?categ=infopages";
        $classementRow = $row->infopage_classement;
        if (!trim($classementRow)) {
            $classementRow = classementGen::getDefaultLibelle();
        }
        $tr_javascript = "class='{$pair_impair}' style='cursor: pointer' onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
        $td_javascript = "onmousedown=\"document.location='./admin.php?categ=infopages&sub=infopages&action=modif&id={$row->id_infopage}';\" ";
        $rowPrint = "<tr {$tr_javascript}>";
        $rowPrint .= "<td {$td_javascript} align='right'><b>" . $row->id_infopage . "</b></td>";
        if ($row->valid_infopage) {
            $visible = "X";
        } else {
            $visible = "&nbsp;";
        }
        $rowPrint .= "<td {$td_javascript} align='center' class='erreur'>{$visible}</td>";
        $rowPrint .= "<td {$td_javascript}>" . htmlentities($row->title_infopage, ENT_QUOTES, $charset) . "</td>";
        $rowPrint .= "<td><a href=\"" . $opac_url_base . "index.php?lvl=infopages&pagesid=" . $row->id_infopage . "\" target=_blank>" . htmlentities($opac_url_base . "index.php?lvl=infopages&pagesid=" . $row->id_infopage, ENT_QUOTES, $charset) . "</a></td>";
        $classementGen = new classementGen('infopages', $row->id_infopage);
        $rowPrint .= "<td>" . $classementGen->show_selector($baselink, $PMBuserid) . "</td>";
        $rowPrint .= "</tr>";
        $arrayRows[$classementRow]["title"] = stripslashes($classementRow);
        $arrayRows[$classementRow]["infopage_list"] .= $rowPrint;
    }
    //on trie
    ksort($arrayRows);
    //on remplace les clés à cause des accents
    $arrayRows = array_values($arrayRows);
    foreach ($arrayRows as $key => $type) {
        print gen_plus($key, $type["title"], "<table><tr><th width='3%'>" . $msg['infopages_id_infopage'] . "</th><th width='3%'>" . $msg['infopage_valid_infopage'] . "</th><th>" . $msg['infopage_title_infopage'] . "</th><th>" . $msg['infopage_lien_direct'] . "</th><th width='3%'>&nbsp;</th></tr>" . $type["infopage_list"] . "</table>", 1);
    }
    print "\t<input class='bouton' type='button' value=\" " . $msg['infopages_bt_ajout'] . " \" onClick=\"document.location='./admin.php?categ=infopages&sub=infopages&action=add'\" />";
}
Example #5
0
function show_procs($dbh)
{
    global $msg;
    global $charset;
    global $PMBuserid, $javascript_path, $form_notice_tpl;
    print "\n\t\t<script type=\"text/javascript\" src=\"" . $javascript_path . "/tablist.js\"></script>\n\t\t<a href=\"javascript:expandAll()\"><img src='./images/expand_all.gif' border='0' id=\"expandall\"></a>\n\t\t<a href=\"javascript:collapseAll()\"><img src='./images/collapse_all.gif' border='0' id=\"collapseall\"></a>\n\t\t";
    // affichage du tableau des procédures
    $requete = "SELECT idproc, name, requete, comment, autorisations, libproc_classement, num_classement FROM procs left join procs_classements on idproc_classement=num_classement ORDER BY libproc_classement,name ";
    $res = mysql_query($requete, $dbh);
    $nbr = mysql_num_rows($res);
    $class_prec = $msg[proc_clas_aucun];
    $buf_tit = "";
    $buf_class = 0;
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = mysql_fetch_row($res);
        $rqt_autorisation = explode(" ", $row[4]);
        if (($PMBuserid == 1 || array_search($PMBuserid, $rqt_autorisation) !== FALSE) && pmb_strtolower(pmb_substr(trim($row[2]), 0, 6)) == 'select') {
            $classement = $row[5];
            if ($class_prec != $classement) {
                if (!$row[5]) {
                    $row[5] = $msg[proc_clas_aucun];
                }
                if ($buf_tit) {
                    $buf_contenu = "<table><tr><th colspan=4>" . $buf_tit . "</th></tr>" . $buf_contenu . "</table>";
                    print gen_plus("procclass" . $buf_class, $buf_tit, $buf_contenu);
                    $buf_contenu = "";
                }
                $buf_tit = $row[5];
                $buf_class = $row[6];
                $class_prec = $classement;
            }
            if ($parity % 2) {
                $pair_impair = "even";
            } else {
                $pair_impair = "odd";
            }
            $parity++;
            $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./edit.php?categ=procs&sub=&action=execute&id_proc={$row['0']}';\" ";
            $buf_contenu .= "\n<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'>\n\t\t\t\t\t<td><strong>{$row['1']}</strong><br />\n\t\t\t\t\t\t<small>{$row['3']}</small></td>\n\t\t\t\t</tr>";
        }
    }
    $buf_contenu = "<table><tr><th colspan=4>" . $buf_tit . "</th></tr>" . $buf_contenu . "</table>";
    print gen_plus("procclass" . $buf_class, $buf_tit, $buf_contenu);
}
 public function get_form()
 {
     $form = parent::get_form();
     $metadatas_list = $this->get_metas_list();
     $form .= "<div class='row'>\n\t\t\t\t\t\t<label for='cms_module_metadatas_datasource_metadatas_generic_def_metadatas'>" . $this->format_text($this->msg['cms_module_metadatas_datasource_metadatas_generic_def_metadatas']) . "</label>\n\t\t\t\t</div>";
     $metadatas_format_form = "";
     foreach ($metadatas_list as $key_metadata_list => $metadata_list) {
         $metadata_format_form = "";
         foreach ($metadata_list["items"] as $key => $metadata) {
             if (!isset($this->parameters[$this->get_form_value_name($key_metadata_list . "_" . $key)])) {
                 $active_template_content = $metadata["default_template"];
             } else {
                 $active_template_content = $this->parameters[$this->get_form_value_name($key_metadata_list . "_" . $key)];
             }
             $metadata_format_form .= "<div class='row'>\n\t\t\t\t\t<div class='left'>\n\t\t\t\t\t\t<label for='" . $this->get_form_value_name($key_metadata_list . "_" . $key) . "' title='" . $this->format_text($metadata["desc"]) . "'>" . $metadata["label"] . " (" . $metadata_list["prefix"] . $metadata_list["separator"] . $key . ")</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='right'>\n\t\t\t\t\t\t<textarea name='" . $this->get_form_value_name($key_metadata_list . "_" . $key) . "' id='" . $this->get_form_value_name($key_metadata_list . "_" . $key) . "'>" . $this->format_text($active_template_content) . "</textarea>\n\t\t\t\t\t</div>\n\t\t\t\t</div>";
         }
         $metadatas_format_form .= gen_plus("metadatas_parameters_" . $key_metadata_list, $this->format_text($metadata_list["name"]), $metadata_format_form, false);
     }
     $form .= "\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='cms_module_metadatas_datasource_metadatas_generic_django_template_content'>" . $this->format_text($this->msg['cms_module_metadatas_datasource_metadatas_generic_django_template_content']) . "</label>\n\t\t\t\t" . $this->get_format_data_structure_tree("") . "\n\t\t\t</div>\n\t\t\t<div class='left'>\n\t\t\t\t" . $metadatas_format_form . "\n\t\t\t</div>\n\t\t</div>";
     return $form;
 }
Example #7
0
function show_state_list()
{
    global $msg, $charset, $javascript_path;
    $query = "select id_editions_state, editions_state_name, editions_state_comment, libproc_classement, editions_state_num_classement from editions_states left join procs_classements on editions_state_num_classement = idproc_classement order by libproc_classement,editions_state_name asc";
    $result = mysql_query($query);
    print "\n\t\t<script type=\"text/javascript\" src=\"" . $javascript_path . "/tablist.js\"></script>\n\t\t<a href=\"javascript:expandAll()\"><img src='./images/expand_all.gif' border='0' id=\"expandall\"></a>\n\t\t<a href=\"javascript:collapseAll()\"><img src='./images/collapse_all.gif' border='0' id=\"collapseall\"></a>\n\t\t";
    if (mysql_num_rows($result)) {
        $class_prec = $msg['proc_clas_aucun'];
        $buf_tit = $msg['proc_clas_aucun'];
        $buf_class = 0;
        $parity = 1;
        while ($row = mysql_fetch_object($result)) {
            if (!$row->libproc_classement) {
                $row->libproc_classement = $msg['proc_clas_aucun'];
            }
            //Pour les états qui ne sont pas dans un classement
            if ($class_prec != $row->libproc_classement) {
                if ($buf_tit) {
                    $buf_contenu = "<table><tr><th colspan=4>" . $buf_tit . "</th></tr>" . $buf_contenu . "</table>";
                    print gen_plus("procclass" . $buf_class, $buf_tit, $buf_contenu);
                    $buf_contenu = "";
                }
                $buf_tit = $row->libproc_classement;
                $buf_class = $row->editions_state_num_classement;
                $class_prec = $row->libproc_classement;
            }
            if ($parity % 2) {
                $pair_impair = "even";
            } else {
                $pair_impair = "odd";
            }
            $parity++;
            $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
            $buf_contenu .= "\n<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'>\n\t\t\t\t\t<td width='10'><input type='button' class='bouton' onclick=\"document.location='./edit.php?categ=state&action=show&sub=tab&id=" . $row->id_editions_state . "';\" value='" . $msg['708'] . "'/></td>\n\t\t\t\t\t<td onmousedown=\"document.location='./edit.php?categ=state&action=edit&id=" . $row->id_editions_state . "';\" ><strong>" . htmlentities($row->editions_state_name, ENT_QUOTES, $charset) . "</strong><br />\n\t\t\t\t\t\t<small>" . htmlentities($row->editions_state_comment, ENT_QUOTES, $charset) . "</small></td>\n\t\t\t\t</tr>";
        }
        $buf_contenu = "<table><tr><th colspan=4>" . $buf_tit . "</th></tr>" . $buf_contenu . "</table>";
        print gen_plus("procclass" . $buf_class, $buf_tit, $buf_contenu);
    }
    print "\n\t\t<div class='row'>\n\t\t\t<input type='button' class='bouton' value='" . $msg['editions_state_add'] . "' onclick=\"document.location='./edit.php?categ=state&action=edit&id=0';\" />\n\t\t</div>";
}
function show_form_sug($update_action)
{
    global $dbh, $msg, $charset;
    global $id_bibli, $id_sug;
    global $sug_map;
    global $sug_modif_form;
    global $acquisition_poids_sugg, $lk_url_sug;
    global $acquisition_sugg_categ, $acquisition_sugg_categ_default;
    global $orig_form_mod;
    global $orig_champ_modif;
    global $id_notice;
    global $acquisition_sugg_localises;
    global $deflt_docs_location;
    global $sugg_location_id;
    global $javascript_path;
    $form = $sug_modif_form;
    //Récupération des pondérations de suggestions
    $tab_poids = explode(",", $acquisition_poids_sugg);
    $tab_poids[0] = substr($tab_poids[0], 2);
    //utilisateur
    $tab_poids[1] = substr($tab_poids[1], 2);
    //abonné
    $tab_poids[2] = substr($tab_poids[2], 2);
    //visiteur
    if (!$id_sug) {
        //Création de suggestion
        $titre = htmlentities($msg['acquisition_sug_cre'], ENT_QUOTES, $charset);
        //Récupération de l'utilisateur
        $requete_user = "******" . SESSlogin . "' limit 1 ";
        $res_user = pmb_mysql_query($requete_user, $dbh);
        $row_user = pmb_mysql_fetch_row($res_user);
        $orig = $row_user[0];
        $lib_orig = $row_user[1];
        if ($row_user[2]) {
            $lib_orig .= $row_user[2] . ", " . $row_user[1];
        }
        $form = str_replace('!!lib_orig!!', $orig_form_mod, $form);
        $form = str_replace('!!dat_cre!!', formatdate(today()), $form);
        $form = str_replace('!!orig!!', $orig, $form);
        $form = str_replace('!!lib_orig!!', htmlentities($lib_orig, ENT_QUOTES, $charset), $form);
        $form = str_replace('!!typ!!', '0', $form);
        $form = str_replace('!!poi!!', $tab_poids[0], $form);
        $form = str_replace('!!poi_tot!!', $tab_poids[0], $form);
        $statut = $sug_map->getFirstStateId();
        $form = str_replace('!!statut!!', $statut, $form);
        $form = str_replace('!!lib_statut!!', $sug_map->getHtmlComment($statut), $form);
        $form = str_replace('!!list_user!!', '', $form);
        $form = str_replace('!!creator_ajout!!', '', $form);
        $form = str_replace('!!lien!!', '', $form);
        if ($acquisition_sugg_categ != '1') {
            $sel_categ = "";
        } else {
            if (suggestions_categ::exists($acquisition_sugg_categ_default)) {
                $sugg_categ = new suggestions_categ($acquisition_sugg_categ_default);
            } else {
                $sugg_categ = new suggestions_categ('1');
            }
            $tab_categ = suggestions_categ::getCategList();
            $sel_categ = "<select class='saisie-25em' id='num_categ' name='num_categ'>";
            foreach ($tab_categ as $id_categ => $lib_categ) {
                $sel_categ .= "<option value='" . $id_categ . "' ";
                if ($id_categ == $sugg_categ->id_categ) {
                    $sel_categ .= "selected='selected' ";
                }
                $sel_categ .= ">";
                $sel_categ .= htmlentities($lib_categ, ENT_QUOTES, $charset) . "</option>";
            }
            $sel_categ .= "</select>";
        }
        $form = str_replace('!!nombre_expl!!', '1', $form);
        $list_locs = '';
        if ($acquisition_sugg_localises) {
            $sugg_location_id = (string) $sugg_location_id == "" ? $deflt_docs_location : $sugg_location_id;
            if ($sugg_location_id) {
                $temp_location = $sugg_location_id;
            } else {
                $temp_location = 0;
            }
            $locs = new docs_location();
            $list_locs = $locs->gen_combo_box_sugg($temp_location, 1, "");
        }
        $form = str_replace('<!-- sel_location -->', $list_locs, $form);
        // si suggestion concernant une notice avec 	$id_notice en parametre, on pre-rempli les champs
        if ($id_notice) {
            $notice = new notice($id_notice);
            $tit = htmlentities($notice->tit1, ENT_QUOTES, $charset);
            $edi = htmlentities($notice->ed1, ENT_QUOTES, $charset);
            $prix = $notice->prix;
            $cod = $notice->code;
            $url_sug = $notice->lien;
            $as = array_search("0", $notice->responsabilites["responsabilites"]);
            if ($as !== FALSE && $as !== NULL) {
                $auteur_0 = $notice->responsabilites["auteurs"][$as];
                $auteur = new auteur($auteur_0["id"]);
            }
            $aut = htmlentities($auteur->display, ENT_QUOTES, $charset);
            $form = str_replace('!!id_notice!!', $id_notice, $form);
        } else {
            $form = str_replace('!!id_notice!!', 0, $form);
        }
        $form = str_replace('!!categ!!', $sel_categ, $form);
        $form = str_replace('!!tit!!', $tit, $form);
        $form = str_replace('!!edi!!', $edi, $form);
        $form = str_replace('!!aut!!', $aut, $form);
        $form = str_replace('!!cod!!', $cod, $form);
        $form = str_replace('!!pri!!', $prix, $form);
        $form = str_replace('!!com!!', '', $form);
        $form = str_replace('!!com_gestion!!', '', $form);
        $form = str_replace('!!url_sug!!', $url_sug, $form);
        //Affichage du selecteur de source
        $req = "select * from suggestions_source order by libelle_source";
        $res = pmb_mysql_query($req, $dbh);
        $option = "<option value='0' selected>" . htmlentities($msg['acquisition_sugg_no_src'], ENT_QUOTES, $charset) . "</option>";
        while ($src = pmb_mysql_fetch_object($res)) {
            $option .= "<option value='" . $src->id_source . "' {$selected} >" . htmlentities($src->libelle_source, ENT_QUOTES, $charset) . "</option>";
            $selected = "";
        }
        $selecteur = "<select id='sug_src' name='sug_src'>" . $option . "</select>";
        $form = str_replace('!!liste_source!!', $selecteur, $form);
        $form = str_replace('!!date_publi!!', '', $form);
        $pj = "<div class='row'>\n\t\t\t\t\t<input type='file' id='piece_jointe_sug' name='piece_jointe_sug' class='saisie-80em' size='60' />\n\t\t\t  </div>";
        $form = str_replace('!!div_pj!!', $pj, $form);
    } else {
        //Modification de suggestion
        $titre = htmlentities($msg['acquisition_sug_mod'], ENT_QUOTES, $charset);
        $sug = new suggestions($id_sug);
        $q = suggestions_origine::listOccurences($id_sug);
        $list_orig = pmb_mysql_query($q, $dbh);
        $orig = 0;
        $poids_tot = 0;
        $users = array();
        while ($row_orig = pmb_mysql_fetch_object($list_orig)) {
            if (!$orig) {
                $orig = $row_orig->origine;
                $typ = $row_orig->type_origine;
                $poids = $tab_poids[$row_orig->type_origine];
            }
            array_push($users, $row_orig);
            $poids_tot = $poids_tot + $tab_poids[$row_orig->type_origine];
        }
        //On parcourt tous les créateurs de suggestions
        for ($i = 0; $i < sizeof($users); $i++) {
            $orig = $users[$i]->origine;
            $typ = $users[$i]->type_origine;
            //Récupération du nom du créateur de la suggestion
            switch ($typ) {
                default:
                case '0':
                    $requete_user = "******" . $orig . "'";
                    $res_user = pmb_mysql_query($requete_user, $dbh);
                    $row_user = pmb_mysql_fetch_row($res_user);
                    $lib_orig = $row_user[1];
                    if ($row_user[2]) {
                        $lib_orig .= ", " . $row_user[2];
                    }
                    if (empty($premier_user) || !isset($premier_user)) {
                        $premier_user = $lib_orig;
                    } else {
                        $list_user .= $lib_orig . "<br />";
                    }
                    break;
                case '1':
                    $requete_empr = "SELECT id_empr, empr_nom, empr_prenom FROM empr where id_empr = '" . $orig . "'";
                    $res_empr = pmb_mysql_query($requete_empr, $dbh);
                    $row_empr = pmb_mysql_fetch_row($res_empr);
                    $lib_orig = $row_empr[1];
                    if ($row_empr[2]) {
                        $lib_orig .= ", " . $row_empr[2];
                    }
                    if (empty($premier_user) || !isset($premier_user)) {
                        $premier_user = $lib_orig;
                    } else {
                        $list_user .= $lib_orig . "<br />";
                    }
                    break;
                case '2':
                    if ($orig) {
                        $lib_orig = $orig;
                    } else {
                        $lib_orig = $msg['suggest_anonyme'];
                    }
                    if (empty($premier_user) || !isset($premier_user)) {
                        $premier_user = $lib_orig;
                    } else {
                        $list_user .= $lib_orig . "<br />";
                    }
                    break;
            }
        }
        //Récupération du statut de la suggestion
        $lib_statut = $sug_map->getHtmlComment($sug->statut);
        $form = str_replace('!!dat_cre!!', formatdate($sug->date_creation), $form);
        $form = str_replace('!!orig!!', $orig, $form);
        //Ajout du champ de saisie du nouveau créateur
        $ajout_create = "<input id='creator_orig_id' type='hidden' name='creator_orig_id'>\n\t\t<input type='text' id='creator_lib_orig' name='creator_lib_orig' class='saisie-10emr'/>\n\t\t<input type='button' class='bouton_small' value='...' onclick=\"openPopUp('./select.php?what=origine&caller=sug_modif_form&param1=creator_orig_id&param2=creator_lib_orig&param3=typ&param4=&param5=&param6=&deb_rech=', 'select_creator_orig', 400, 400, -2, -2, 'scrollbars=yes, toolbar=no, dependent=yes, resizable=yes')\" />";
        if (sizeof($users) > 1) {
            //on ajoute le champ à la liste
            $list_user .= $ajout_create;
            $form = str_replace('!!creator_ajout!!', '', $form);
        } else {
            $form = str_replace('!!creator_ajout!!', "<br />" . $ajout_create, $form);
        }
        //Menu dépliant
        $deroul_user = gen_plus('ori', $msg['suggest_creator'] . " (" . (sizeof($users) - 1) . ")", $list_user, 0);
        if ($lib_orig) {
            $form = str_replace('!!lib_orig!!', htmlentities($premier_user, ENT_QUOTES, $charset), $form);
            if (sizeof($users) > 1) {
                $form = str_replace('!!list_user!!', $deroul_user, $form);
            } else {
                $form = str_replace('!!list_user!!', '', $form);
            }
        } else {
            $form = str_replace('!!lib_orig!!', '&nbsp;', $form);
            $form = str_replace('!!list_user!!', '', $form);
        }
        $form = str_replace('!!typ!!', $typ, $form);
        $form = str_replace('!!poi!!', $poids, $form);
        $form = str_replace('!!poi_tot!!', $poids_tot, $form);
        $form = str_replace('!!statut!!', $sug->statut, $form);
        $form = str_replace('!!lib_statut!!', $lib_statut, $form);
        if ($acquisition_sugg_categ != '1') {
            $sel_categ = "";
        } else {
            $state_name = $sug_map->getStateNameFromId($sug->statut);
            $categ = $sug_map->getState_CATEG($state_name);
            $sugg_categ = new suggestions_categ($sug->num_categ);
            if ($categ == 'YES') {
                $tab_categ = suggestions_categ::getCategList();
                $sel_categ = "<select class='saisie-25em' id='num_categ' name='num_categ'>";
                foreach ($tab_categ as $id_categ => $lib_categ) {
                    $sel_categ .= "<option value='" . $id_categ . "' ";
                    if ($id_categ == $sug->num_categ) {
                        $sel_categ .= "selected='selected' ";
                    }
                    $sel_categ .= ">";
                    $sel_categ .= htmlentities($lib_categ, ENT_QUOTES, $charset) . "</option>";
                }
                $sel_categ .= "</select>";
            } else {
                $sel_categ = htmlentities($sugg_categ->libelle_categ, ENT_QUOTES, $charset);
            }
        }
        //Nombre d'exemplaire
        $form = str_replace('!!nombre_expl!!', $sug->nb, $form);
        //Selecteur de localisation
        $list_locs = '';
        if ($acquisition_sugg_localises) {
            $sugg_location_id = $sug->sugg_location;
            if ($sugg_location_id) {
                $temp_location = $sugg_location_id;
            } else {
                $temp_location = 0;
            }
            $locs = new docs_location();
            $list_locs = $locs->gen_combo_box_sugg($temp_location, 1, "");
        }
        $form = str_replace('<!-- sel_location -->', $list_locs, $form);
        if ($sug->num_notice && $sug->num_notice != 0) {
            $req_ana = "select analysis_bulletin as bull , analysis_notice as noti from analysis where analysis_notice ='" . $sug->num_notice . "'";
            $res_ana = pmb_mysql_query($req_ana, $dbh);
            $num_rows_ana = pmb_mysql_num_rows($res_ana);
            if ($num_rows_ana) {
                $ana = pmb_mysql_fetch_object($res_ana);
                $url_view = "catalog.php?categ=serials&sub=bulletinage&action=view&bul_id={$ana->bull}&art_to_show=" . $ana->noti;
            } else {
                $url_view = "./catalog.php?categ=isbd&id=" . $sug->num_notice;
            }
            $lien = "<a href='{$url_view}'> " . $msg['acquisition_sug_view_not'] . "</a>";
            $form = str_replace('!!lien!!', $lien, $form);
        } else {
            $form = str_replace('!!lien!!', '', $form);
        }
        $form = str_replace('!!categ!!', $sel_categ, $form);
        $form = str_replace('!!tit!!', htmlentities($sug->titre, ENT_QUOTES, $charset), $form);
        $form = str_replace('!!edi!!', htmlentities($sug->editeur, ENT_QUOTES, $charset), $form);
        $form = str_replace('!!aut!!', htmlentities($sug->auteur, ENT_QUOTES, $charset), $form);
        $form = str_replace('!!cod!!', htmlentities($sug->code, ENT_QUOTES, $charset), $form);
        $form = str_replace('!!pri!!', round($sug->prix, 2), $form);
        $form = str_replace('!!com!!', htmlentities($sug->commentaires, ENT_QUOTES, $charset), $form);
        $form = str_replace('!!com_gestion!!', htmlentities($sug->commentaires_gestion, ENT_QUOTES, $charset), $form);
        $req = "select * from suggestions_source order by libelle_source";
        $res = pmb_mysql_query($req, $dbh);
        $selected = "";
        $option = "<option value='0' selected>" . htmlentities($msg['acquisition_sugg_no_src'], ENT_QUOTES, $charset) . "</option>";
        while ($src = pmb_mysql_fetch_object($res)) {
            $src->id_source == $sug->sugg_src ? $selected = " selected " : ($selected = "");
            $option .= "<option value='" . $src->id_source . "' {$selected}>" . htmlentities($src->libelle_source, ENT_QUOTES, $charset) . "</option>";
        }
        $selecteur = "<select id='sug_src' name='sug_src'>" . $option . "</select>";
        $form = str_replace('!!liste_source!!', $selecteur, $form);
        $form = str_replace("!!date_publi!!", htmlentities($sug->date_publi, ENT_QUOTES, $charset), $form);
        if (!$sug->get_explnum('id')) {
            $pj = "<div class='row'>\n\t\t\t\t\t<input type='file' id='piece_jointe_sug' name='piece_jointe_sug' class='saisie-80em' size='60' />\n\t\t\t  </div>";
        } else {
            $pj = "\n\t\t\t<input type='hidden' name='id_pj' id='id_pj' value='" . $sug->get_explnum('id') . "' />\n\t\t\t<div class='row'>" . $sug->get_explnum('nom') . "&nbsp;<input type='submit' class='bouton' name='del_pj' id='del_pj' value='X' onclick='this.form.action=\"./acquisition.php?categ=sug&action=del_pj&id_bibli=" . $id_bibli . "&id_sug=" . $id_sug . "\"' /> \n\t\t\t</div>";
        }
        $form = str_replace('!!div_pj!!', $pj, $form);
        if ($sug->url_suggestion) {
            $form = str_replace('<!-- url_sug -->', $lk_url_sug, $form);
        }
        $form = str_replace('!!url_sug!!', htmlentities($sug->url_suggestion, ENT_QUOTES, $charset), $form);
        $form = str_replace('!!id_notice!!', $sug->num_notice, $form);
        // Affichage du bouton supprimer
        $bt_sup = $sug_map->getButton_DELETED($sug->statut, $id_bibli, $id_sug);
        $form = str_replace('<!-- bouton_sup -->', $bt_sup, $form);
        if ($sug->num_notice) {
            //Eventuellement, lien vers la notice
        } else {
            // Affichage du bouton cataloguer
            $bt_cat = $sug_map->getButton_CATALOG($sug->statut, $id_bibli, $id_sug);
            $button = "<input type='radio' name='catal_type' id='not_type' value='0' checked /><label class='etiquette' for='not_type'>" . htmlentities($msg['acquisition_type_mono'], ENT_QUOTES, $charset) . "</label>\n\t\t\t<input type='radio' name='catal_type' value='1' id='art_type'/><label for='art_type' class='etiquette'>" . htmlentities($msg['acquisition_type_art'], ENT_QUOTES, $charset) . "</label>";
            if ($sug->sugg_noti_unimarc) {
                $bt_cat = str_replace('!!type_catal!!', "&nbsp;<label style='color:red'>Notice externe existante</label>", $bt_cat);
            } else {
                $bt_cat = str_replace('!!type_catal!!', $button, $bt_cat);
            }
            $form = str_replace('<!-- bouton_cat -->', $bt_cat, $form);
        }
    }
    //$action ="./acquisition.php?categ=sug&action=update&id_bibli=".$id_bibli."&id_sug=".$id_sug;
    $form = str_replace('!!action!!', $update_action, $form);
    $form = str_replace('!!form_title!!', $titre, $form);
    print "<script type=\"text/javascript\" src=\"" . $javascript_path . "/tablist.js\"></script>";
    print $form;
}
Example #9
0
 function getChilds($id_note)
 {
     global $dbh, $charset, $msg;
     $req = "select id_note, CONCAT(SUBSTRING(contenu,1,50),'','...') as titre, contenu, date_note, prive, rapport, notes_num_user,notes_type_user \n\t\tfrom demandes_notes where num_note_parent='" . $id_note . "' and num_action='" . $this->num_action . "' order by date_note desc, id_note desc";
     $res = pmb_mysql_query($req, $dbh);
     $display = "";
     if (pmb_mysql_num_rows($res)) {
         while ($fille = pmb_mysql_fetch_object($res)) {
             $createur = $this->getCreateur($fille->notes_num_user, $fille->notes_type_user);
             $contenu = "\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<div class='left'>\n\t\t\t\t\t\t\t<input type='image' src='./images/email_go.png' alt='" . htmlentities($msg['demandes_note_reply_icon'], ENT_QUOTES, $charset) . "' title='" . htmlentities($msg['demandes_note_reply_icon'], ENT_QUOTES, $charset) . "' \n\t\t\t\t\t\t\t\t\t\tonclick='document.forms[\"modif_notes\"].act.value=\"reponse\";document.forms[\"modif_notes\"].idnote.value=\"{$fille->id_note}\";' />\n\t\t\t\t\t\t\t<input type='image' src='./images/b_edit.png' alt='" . htmlentities($msg['demandes_note_modif_icon'], ENT_QUOTES, $charset) . "' title='" . htmlentities($msg['demandes_note_modif_icon'], ENT_QUOTES, $charset) . "' \n\t\t\t\t\t\t\t\t\t\tonclick='document.forms[\"modif_notes\"].act.value=\"modif_note\";document.forms[\"modif_notes\"].idnote.value=\"{$fille->id_note}\";' />\n\t\t\t\t\t\t\t<input type='image' src='./images/cross.png' alt='" . htmlentities($msg['demandes_note_suppression'], ENT_QUOTES, $charset) . "' title='" . htmlentities($msg['demandes_note_suppression'], ENT_QUOTES, $charset) . "' \n\t\t\t\t\t\t\t\t\t\tonclick='document.forms[\"modif_notes\"].act.value=\"suppr_note\";document.forms[\"modif_notes\"].idnote.value=\"{$fille->id_note}\";' />\n\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<label class='etiquette'>" . $msg['demandes_note_privacy'] . " : </label>&nbsp;\n\t\t\t\t\t\t" . ($fille->prive ? $msg['40'] : $msg['39']) . "\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<label class='etiquette'>" . $msg['demandes_note_rapport'] . " : </label>&nbsp;\n\t\t\t\t\t\t" . ($fille->rapport ? $msg['40'] : $msg['39']) . "\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<label class='etiquette'>" . $msg['demandes_note_contenu'] . " : </label>&nbsp;\n\t\t\t\t\t\t" . nl2br(htmlentities($fille->contenu, ENT_QUOTES, $charset)) . "\n\t\t\t\t\t</div>\n\t\t\t\t";
             $contenu .= $this->getChilds($fille->id_note);
             if (strlen($fille->titre) < 50) {
                 $fille->titre = str_replace('...', '', $fille->titre);
             }
             $display .= "<span style='margin-left:20px'>" . gen_plus("note_" . $fille->id_note, "[" . formatdate($fille->date_note) . "] " . $fille->titre . ($createur ? " <i>" . sprintf($msg['demandes_action_by'], $createur . "</i>") : ""), $contenu) . "</span>";
         }
     }
     return $display;
 }
Example #10
0
 function get_config_form()
 {
     global $charset, $dbh, $pmb_url_base;
     $result = parent::get_config_form();
     //on attributs/initialise certaines valeurs par défaut
     if (!$this->config['activeTabs']) {
         $this->config['activeTabs'] = array();
     }
     if (!$this->config['shelf_nbResultsByPage']) {
         $this->config['shelf_nbResultsByPage'] = 20;
     }
     if (!$this->config['search_nbResultsByPage']) {
         $this->config['search_nbResultsByPage'] = 20;
     }
     if (!$this->config['bulletinsList_nbResultsByPage']) {
         $this->config['bulletinsList_nbResultsByPage'] = 10;
     }
     if (!$this->config['analysisList_nbResultsByPage']) {
         $this->config['analysisList_nbResultsByPage'] = 10;
     }
     //Adresse d'utilisation
     $result .= "<div class=row><label class='etiquette' for='api_exported_functions'>" . $this->msg['mobile_service_endpoint'] . "</label><br />";
     if ($this->id) {
         $result .= "<a target='_blank' href='" . $pmb_url_base . "ws/connector_out.php?source_id=" . $this->id . "'>" . $pmb_url_base . "ws/connector_out.php?source_id=" . $this->id . "</a>";
     } else {
         $result .= $this->msg["mobile_service_endpoint_unrecorded"];
     }
     $result .= "</div>";
     //Connecteur dédié
     $connecteurs = new connecteurs_out();
     foreach ($connecteurs->connectors as $conn) {
         if ($conn->name == 'JSON-RPC') {
             $sources = $conn->sources;
         }
     }
     //on génère l'affichage du sélecteur
     $proxyIsInList = false;
     if (sizeof($sources) == 0) {
         $selectWS = $this->msg['mobile_admin_error_proxy'];
     } else {
         $selectWS = "<select name='proxyUrl'>";
         foreach ($sources as $source) {
             if ($this->config['proxyUrl'] == $pmb_url_base . "ws/connector_out.php?source_id=" . $source->id) {
                 $proxyIsInList = true;
             }
             $selectWS .= "<option value='" . $pmb_url_base . "ws/connector_out.php?source_id=" . $source->id . "'" . ($this->config['proxyUrl'] == $pmb_url_base . "ws/connector_out.php?source_id=" . $source->id ? " selected" : "") . ">" . $source->name . "</option>";
         }
         $selectWS .= "</select>";
     }
     //maintenant l'entrée manuelle...
     $writeWS = "<input type='text' id='proxyUrl' name='proxyUrl' value='" . $this->config['proxyUrl'] . "' />";
     $result .= "\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='proxyUrl'>" . $this->msg['mobile_admin_proxyUrl'] . "</label><br />\n\t\t\t" . $this->msg['mobile_admin_pickWSInList_yes'] . "\n\t\t\t&nbsp;<input type='radio' name='pickWSInList' value='yes' " . ($proxyIsInList == true ? "checked='checked'" : "") . " onchange='switchWSMethod();'/>\n\t\t\t&nbsp;" . $this->msg['mobile_admin_pickWSInList_no'] . "\t\t\t\n\t\t\t&nbsp;<input type='radio' name='pickWSInList' value='no' " . ($proxyIsInList == true ? "" : "checked='checked'") . " onchange='switchWSMethod();' /><br /><br />\n\t\t\t<div id='selectWS'></div>\n\t\t\t";
     $result .= "\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>";
     //Onglets dispo dans l'appli
     $result .= "\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' >" . $this->msg['mobile_admin_tabs_title'] . "</label><br />\n\t\t\t<div class='notice-child'>\n\t\t\t<table class='quadrille'>\n\t\t\t\t<tr>\n\t\t\t\t\t<th style='text-align:right;'>" . $this->msg['mobile_admin_form_tabs_label'] . "</th>\n\t\t\t\t\t<th style='text-align:center;' >" . $this->msg['mobile_admin_form_tabs_valid'] . "</th>\n\t\t\t\t\t<th style='text-align:center;'>" . $this->msg['mobile_admin_firstTab'] . "</th>\n\t\t\t\t\t<th style='text-align:left;'>" . $this->msg['mobile_admin_form_tabs_desc'] . "</th>\n\t\t\t\t\t\n\t\t\t\t</tr>";
     $i = 0;
     $first_onglet_check = false;
     foreach ($this->onglets as $onglet => $value) {
         $check_first_onglet = "";
         if ($this->config['firstTab'] && $this->config['activeTabs'][$this->config['firstTab']]) {
             if ($this->config['firstTab'] === $onglet) {
                 $check_first_onglet = " checked ";
                 $first_onglet_check = true;
             }
         } elseif (!$first_onglet_check) {
             $check_first_onglet = " checked ";
         }
         $result .= "\n\t\t\t\t<tr >\n\t\t\t\t\t<td style='text-align:right;'>" . $value['label'] . "</td>\n\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t" . $this->msg['mobile_admin_form_tabs_yes'] . "&nbsp;\n\t\t\t\t\t\t<input type='radio' id='tab_" . $onglet . "_ok' name='{$onglet}' value='1'" . ($this->config['activeTabs'][$onglet] == 1 ? " checked " : " ") . "onchange='checkParam(\"{$onglet}\",false);' />&nbsp;\n\t\t\t\t\t\t" . $this->msg['mobile_admin_form_tabs_no'] . "&nbsp;\n\t\t\t\t\t\t<input type='radio' id='tab_" . $onglet . "_ko' name='{$onglet}' value='0' " . ($this->config['activeTabs'][$onglet] == 0 ? " checked " : " ") . "onchange='checkParam(\"{$onglet}\",false);' />\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t<input type='radio' id='firstTab_{$onglet}' name='firstTab' value='{$onglet}' " . $check_first_onglet . "/>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style='text-align:left;'>" . $value['desc'] . "</td>\n\t\t\t\t</tr>";
         $i++;
     }
     $result .= "\n\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>";
     //param pour l'onglet 'Accueil'
     $form_infoPage = "\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='firstInfoPage'>" . $this->msg['mobile_admin_firstInfoPage'] . "</label><br />";
     $requete = "select id_infopage as id, title_infopage as title from infopages where valid_infopage = 1 order by title DESC";
     $res = mysql_query($requete);
     if (mysql_num_rows($res)) {
         $form_infoPage .= "\n\t\t\t<select id ='firstInfoPage' name='firstInfoPage'>";
         while ($infopage = mysql_fetch_object($res)) {
             $form_infoPage .= "\n\t\t\t\t<option value='" . $infopage->id . "'" . ($this->config["firstInfoPage"] == $infopage->id ? " selected" : "") . ">" . $infopage->title . "</option>";
         }
         $form_infoPage .= "\n\t\t\t</select>";
     } else {
         $form_infoPage .= $this->msg['mobile_admin_error_infopage'];
     }
     $form_infoPage .= "\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>\n\t\t";
     $result .= gen_plus("form_infoPage", $this->msg['mobile_admin_form_infoPagesTitle'], $form_infoPage) . "<div class='row'>&nbsp;</div>";
     //param pour l'onglet 'Etagère coup de coeur'
     $form_shelf .= "\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='heartShelf'>" . $this->msg['mobile_admin_heatShelf'] . "</label><br />";
     $etageres = etagere::get_etagere_list();
     $etagere_valid = false;
     $select = "\n\t\t\t<select id='heartShelf' name='heartShelf'>";
     foreach ($etageres as $etagere) {
         if ($etagere['validite'] == 1 && $etagere['visible_accueil'] == 1) {
             $select .= "\n\t\t\t\t<option value='" . $etagere['idetagere'] . "'" . ($this->config['heartShelf'] == $etagere['idetagere'] ? " selected" : "") . ">" . $etagere['name'] . "</option>";
             $etagere_valid = true;
         }
     }
     $select .= "\n\t\t\t</select>";
     if ($etagere_valid == true) {
         $form_shelf .= $select;
     } else {
         $form_shelf .= $this->msg['mobile_admin_error_etageres'];
     }
     $form_shelf .= "\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='shelf_nbResultsByPage'>" . $this->msg['mobile_admin_nbResultsByPage'] . "</label><br />\n\t\t\t<input type='text' id='shelf_nbResultsByPage' name='shelf_nbResultsByPage' value='" . $this->config['shelf_nbResultsByPage'] . "' />\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>";
     $result .= gen_plus("form_shelf", $this->msg['mobile_admin_form_shelfTitle'], $form_shelf) . "<div class='row'>&nbsp;</div>";
     //param pour l'onglet 'Recherche Simple'
     $form_search = "\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='search_nbResultsByPage'>" . $this->msg['mobile_admin_nbResultsByPage'] . "</label><br />\n\t\t\t<input type='text' id='search_nbResultsByPage' name='search_nbResultsByPage' value='" . $this->config['search_nbResultsByPage'] . "' />\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='allowTypDocFilter'>" . $this->msg["mobile_admin_form_search_allowSearchByTypeDoc"] . "</label><br />\n\t\t\t" . $this->msg['mobile_admin_form_search_allowSearchByTypeDoc_yes'] . "&nbsp;<input type='radio' id='allowTypDocFilter_yes' name='allowTypDocFilter' value='1' " . ($this->config["allowTypDocFilter"] == 1 ? " checked " : " ") . " />&nbsp;\n\t\t\t" . $this->msg['mobile_admin_form_search_allowSearchByTypeDoc_no'] . "&nbsp;<input type='radio' id='allowTypDocFilter_no' name='allowTypDocFilter' value='0' " . ($this->config["allowTypDocFilter"] == 0 ? " checked " : " ") . "/>\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>";
     $result .= gen_plus("form_search", $this->msg['mobile_admin_form_searchTitle'], $form_search) . "<div class='row'>&nbsp;</div>";
     //param pour Mon Compte
     $form_myAccount = "\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>&nbsp;</div>";
     $result .= gen_plus("form_myAccount", $this->msg['mobile_admin_form_myAccountTitle'], $form_myAccount) . "<div class='row'>&nbsp;</div>";
     //param pour Pret Autonome
     $form_selfCheck = "\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='allowCheckIn'>" . $this->msg["mobile_admin_form_selfCheck_allowCheckIn"] . "</label><br />\n\t\t\t" . $this->msg['mobile_admin_form_selfCheck_allowCheckIn_yes'] . "&nbsp;<input type='radio' id='allowCheckIn_yes' name='allowCheckIn' value='1' " . ($this->config["allowCheckIn"] == 1 ? " checked " : " ") . " />&nbsp;\n\t\t\t" . $this->msg['mobile_admin_form_selfCheck_allowCheckIn_no'] . "&nbsp;<input type='radio' id='allowCheckIn_no' name='allowCheckIn' value='0' " . ($this->config["allowCheckIn"] == 0 ? " checked " : " ") . "/>\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>";
     $result .= gen_plus("form_selfCheck", $this->msg['mobile_admin_form_selfCheckTitle'], $form_selfCheck) . "<div class='row'>&nbsp;</div>";
     //param d'affichage général
     $param_gen = "\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='bulletinsList_nbResultsByPage'>" . $this->msg['mobile_admin_form_bulletinsList_nbResultsByPage'] . "</label><br />\n\t\t\t<input type='text' id='bulletinsList_nbResultsByPage' name='bulletinsList_nbResultsByPage' value='" . $this->config['bulletinsList_nbResultsByPage'] . "' />\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='analysisList_nbResultsByPage'>" . $this->msg['mobile_admin_form_analysisList_nbResultsByPage'] . "</label><br />\n\t\t\t<input type='text' id='analysisList_nbResultsByPage' name='analysisList_nbResultsByPage' value='" . $this->config['analysisList_nbResultsByPage'] . "' />\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>";
     $result .= gen_plus("paramGen", $this->msg['mobile_admin_form_paramsGen'], $param_gen) . "<div class='row'>&nbsp;</div>";
     $result .= "\n\t\t<script type='text/javascript' src='javascript/tablist.js'></script>\n\t\t<script type='text/javascript'>\n\t\t\t// on génère une fonction d'initialisation\n\t\t\tfunction init(){";
     foreach ($this->onglets as $onglet => $value) {
         $result .= "\n\t\t\t\tswitchWSMethod();\n\t\t\t\tcheckParam('{$onglet}');\n\t\t\t\texpandBase('paramGen',true);\n\t\t\t";
     }
     $result .= "\n\t\t\t}\n\n\t\t\tonload = init;\n\n\t\t\tfunction switchWSMethod(){\n\t\t\t\tif(document.form_connectorout.pickWSInList[0].checked){\n\t\t\t\t\tvar pickWSInList = document.form_connectorout.pickWSInList[0].value\n\t\t\t\t}else{\n\t\t\t\t\tvar pickWSInList = document.form_connectorout.pickWSInList[1].value\t\n\t\t\t\t}\n\t\t\t\tif (pickWSInList == 'yes'){\n\t\t\t\t\tdocument.getElementById('selectWS').innerHTML = \"{$selectWS}\";\n\t\t\t\t}else{\n\t\t\t\t\tdocument.getElementById('selectWS').innerHTML = \"{$writeWS}\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// on s'assure que l'application dispose bien d'une première page à la soumission du formulaire...\n\t\t\tdocument.forms['form_connectorout'].onsubmit = function(){\n\t\t\t\tfor(var i=0 ; i<document.forms['form_connectorout'].firstTab.length ; i++){\n\t\t\t\t\tif(document.forms['form_connectorout'].firstTab[i].checked == true)\n\t\t\t\t\treturn true;\n\t\t\t\t}";
     foreach ($this->onglets as $onglet => $value) {
         $result .= "\n\t\t\t\tif(document.getElementById('tab_'+'{$onglet}'+'_ok').checked == true){\n\t\t\t\t\tdocument.getElementById('firstTab_{$onglet}').checked = true;\n\t\t\t\t\treturn true;\n\t\t\t\t}";
     }
     $result .= "\t\n\t\t\t\talert('" . $this->msg['mobile_admin_form_needOneTab'] . "');\n\t\t\t\treturn false;\t\t\t\n\t\t\t}\n\n\t\t\tfunction checkParam(onglet){\n\t\t\t\tif(document.getElementById('tab_'+onglet+'_ok').checked == true){\n\t\t\t\t\tswitchParamValue('firstTab_'+onglet,'disabled','active');\n\t\t\t\t\tif(document.getElementById('form_'+onglet+'Child').style.display == 'none')\n\t\t\t\t\t\texpandBase('form_'+onglet,true);\n\t\t\t\t\tswitchParamsValues(onglet,'active');\n\t\t\t\t}else{\n\t\t\t\t\tswitchParamValue('firstTab_'+onglet,'disabled','inactive');\n\t\t\t\t\tdocument.getElementById('firstTab_'+onglet).checked = false;\n\t\t\t\t\tif(document.getElementById('form_'+onglet+'Child').style.display == 'block')\n\t\t\t\t\t\texpandBase('form_'+onglet,true);\n\t\t\t\t\tswitchParamsValues(onglet,'inactive');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction switchParamsValues(onglet,state){\n\t\t\t\tswitch (onglet){\n\t\t\t\t\tcase 'infoPage' :\n\t\t\t\t\t\tswitchParamValue('firstInfoPage','disabled',state);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'selfCheck' :\n\t\t\t\t\t\tswitchParamValue('allowCheckIn_yes','disabled',state);\n\t\t\t\t\t\tif(document.getElementById('allowCheckIn_yes').checked ==true)\n\t\t\t\t\t\t\tswitchParamValue('allowCheckIn_yes','checked',state);\n\t\t\t\t\t\tswitchParamValue('allowCheckIn_no','disabled',state);\n\t\t\t\t\t\tif(document.getElementById('allowCheckIn_no').checked ==true)\n\t\t\t\t\t\t\tswitchParamValue('allowCheckIn_no','checked',state);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'myAccount' :\n\t\t\t\t\t\tswitchParamValue('tab_selfCheck_ok','disabled',state);\n\t\t\t\t\t\tif(state == 'inactive')\n\t\t\t\t\t\t\tswitchParamValue('tab_selfCheck_ko','checked','active');\n\t\t\t\t\t\tcheckParam('selfCheck');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'search' :\n\t\t\t\t\t\tswitchParamValue('search_nbResultsByPage','disabled',state);\n\t\t\t\t\t\tswitchParamValue('allowTypDocFilter_yes','disabled',state);\n\t\t\t\t\t\tswitchParamValue('allowTypDocFilter_no','disabled',state);\n\t\t\t\t\t\tif(document.getElementById('allowTypDocFilter_no').checked ==true)\n\t\t\t\t\t\t\tswitchParamValue('allowTypDocFilter_no','checked',state);\n\t\t\t\t\t\tif(document.getElementById('allowTypDocFilter_yes').checked ==true)\n\t\t\t\t\t\t\tswitchParamValue('allowTypDocFilter_yes','checked',state);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'shelf':\n\t\t\t\t\t\tswitchParamValue('heartShelf','disabled',state);\n\t\t\t\t\t\tswitchParamValue('shelf_nbResultsByPage','disabled',state);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\tfunction switchParamValue(id,param,state){\n\t\t\t\tvar newState = false;\n\t\t\t\tif(state == 'active'){\n\t\t\t\t\tswitch(param){\n\t\t\t\t\t\tcase 'disabled' :\n\t\t\t\t\t\t\tnewState = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'checked' :\n\t\t\t\t\t\t\tnewState = true;\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}else if(state == 'inactive'){\n\t\t\t\t\tswitch(param){\n\t\t\t\t\t\tcase 'disabled' :\n\t\t\t\t\t\t\tnewState = true;\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'checked' :\n\t\t\t\t\t\t\tnewState = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tdocument.getElementById(id)[param] = newState;\n\t\t\t}\n\t\t</script>";
     return $result;
 }
Example #11
0
 function source_get_property_form($source_id)
 {
     global $charset, $base_path, $catalog, $reload;
     if (!$reload) {
         $params = $this->get_source_params($source_id);
         if ($params["PARAMETERS"]) {
             //Affichage du formulaire avec $params["PARAMETERS"]
             $vars = unserialize($params["PARAMETERS"]);
             foreach ($vars as $key => $val) {
                 global ${$key};
                 ${$key} = $val;
             }
         }
     } else {
         global $z3950_profil, $url, $z3950_base, $z3950_login, $z3950_password, $z3950_format, $z3950_port, $z3950_convert, $z3950_max_notices;
     }
     if (!($z3950_max_notices * 1)) {
         $z3950_max_notices = 100;
     }
     //Liste des transformations possibles avant import
     $this->parse_convert_catalog();
     //Création de la liste des types d'import
     $export_type = "<select name=\"z3950_convert\" id=\"z3950_convert\">\n";
     $export_type .= "<option value=\"0\">" . $this->msg["z3950_no_convert"] . "</option>\n";
     for ($i = 0; $i < count($this->convert_path_order); $i++) {
         $export_type .= "<option value=\"" . $this->convert_path_order[$i]["PATH"] . "\"" . ($z3950_convert == $this->convert_path_order[$i]["PATH"] ? " selected" : "") . ">" . $this->convert_path_order[$i]["NAME"] . "</option>\n";
     }
     $export_type .= "</select>";
     $form = "\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='url'>" . $this->msg["z3950_url"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-60em' name='url' id='url' value='" . htmlentities($url, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_base'>" . $this->msg["z3950_port"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-10em' name='z3950_port' id='z3950_port' value='" . htmlentities($z3950_port, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_base'>" . $this->msg["z3950_base"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-30em' name='z3950_base' id='z3950_base' value='" . htmlentities($z3950_base, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_login'>" . $this->msg["z3950_login"] . "</label>&nbsp;\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-20em' name='z3950_login' id='z3950_login' value='" . htmlentities($z3950_login, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_password'>" . $this->msg["z3950_password"] . "</label>&nbsp;\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-20em' name='z3950_password' id='z3950_password' value='" . htmlentities($z3950_password, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_format'>" . $this->msg["z3950_format"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-30em' name='z3950_format' id='z3950_format' value='" . htmlentities($z3950_format, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_max_notices'>" . $this->msg["z3950_max_notices"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-10em' name='z3950_max_notices' id='z3950_max_notices' value='" . htmlentities($z3950_max_notices, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_convert'>" . $this->msg["z3950_convert"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t" . $export_type . "\n\t\t\t</div>\n\t\t</div>";
     $xsl_exemplaire_input = "";
     if ($xslt_exemplaire) {
         $xsl_exemplaire_input .= '<select name="action_xsl_expl"><option value="keep">' . sprintf($this->msg["z3950_keep_xsl_exemplaire"], $xslt_exemplaire["name"]) . '</option><option value="delete">' . $this->msg["z3950_delete_xsl_exemplaire"] . '</option></select>';
     }
     $xsl_exemplaire_input .= '&nbsp;<input onchange="document.source_form.action_xsl_expl.selectedIndex=1" type="file" name="xsl_exemplaire"/>';
     $form .= "\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_profils'>" . $this->msg["z3950_xsl_exemplaire"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t" . $xsl_exemplaire_input . "\n\t\t\t</div>\n\t\t</div>\n\t\t";
     //Lecture des profils
     $this->get_profiles();
     $profils = "<input type='hidden' name='reload' value=''/>\n\t\t\t<select name='z3950_profil' id='z3950_profils'>\n\t\t\t\t<option value=''>Manuel</option>\n\t\t";
     for ($i = 0; $i < count($this->profiles); $i++) {
         $profils .= "<option value='" . $this->profiles[$i]["name"] . "'" . ($z3950_profil == $this->profiles[$i]["name"] ? " selected" : "") . ">" . htmlentities($this->profiles[$i]["comment"], ENT_QUOTES, $charset) . "</option>\n";
     }
     $profils .= "</select><input type='button' value='" . $this->msg["z3950_bib1_calculate"] . "' class='bouton_small' onClick='this.form.reload.value=1; this.form.action=\"" . basename($_SERVER["REQUEST_URI"]) . "\"; this.form.act.value=\"add_source\"; this.form.submit();'/>&nbsp;" . $this->msg["z3950_warning_bib1"] . "\n";
     $form .= "\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_profils'>" . $this->msg["z3950_profils"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t" . $profils . "\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t";
     $fields = $this->get_unimarc_search_fields();
     //Si c'est un recalcul
     if ($reload) {
         //Recherche du profil
         for ($i = 0; $i < count($this->profiles); $i++) {
             if ($this->profiles[$i]["name"] == $z3950_profil) {
                 $profil = $this->profiles[$i];
                 break;
             }
         }
     }
     $form_bib1 = "<table class='quadrille'><tr><th>Unimarc</th><th>Champ</th><th>Propriétés</th></tr>\n";
     foreach ($fields as $ufield => $values) {
         if ($ufield != "FORBIDDEN") {
             $form_bib1 .= "<tr><td>" . htmlentities(" (" . $ufield . ")", ENT_QUOTES, $charset) . "</td><td>" . nl2br(htmlentities(implode("\n", $values["TITLE"]), ENT_QUOTES, $charset)) . "</td><td>";
             $form_bib1 .= "<table class='quadrille'>\n";
             $form_bib1 .= "<tr><th>Opérateur</th><th>Att. 1 (Use)</th><th>Att. 2 (Relation)</th><th>Att. 3 (Position)</th><th>Att. 4 (Structure)</th><th>Att. 5 (Truncation)</th><th>Att. 6 (Completeness)</th></tr>\n";
             //Calcul du Att1 si reload
             if ($reload) {
                 foreach ($values["OPERATORS"] as $op => $top) {
                     $bibli = "bib1_" . str_replace("\$", "", $ufield) . "_" . $op . "_0";
                     global ${$bibli};
                     ${$bibli} = $profil["ufields"][$ufield];
                     if ($profil["operators"][$op]) {
                         $ops = explode(",", $profil["operators"][$op]);
                         for ($i = 0; $i < count($ops); $i++) {
                             $ops_ = explode("=", $ops[$i]);
                             $opst[$ops_[0]] = $ops_[1];
                         }
                         for ($i = 1; $i < 6; $i++) {
                             $bibli = "bib1_" . str_replace("\$", "", $ufield) . "_" . $op . "_" . $i;
                             global ${$bibli};
                             ${$bibli} = "";
                             if ($opst[$i + 1]) {
                                 ${$bibli} = $opst[$i + 1];
                             }
                         }
                     } else {
                         for ($i = 1; $i < 6; $i++) {
                             $bibli = "bib1_" . str_replace("\$", "", $ufield) . "_" . $op . "_" . $i;
                             global ${$bibli};
                             ${$bibli} = "";
                         }
                     }
                 }
             } else {
                 if (count($z3950_bib1)) {
                     foreach ($z3950_bib1 as $bib1 => $bib1_value) {
                         global ${$bib1};
                         ${$bib1} = $bib1_value;
                     }
                 }
             }
             foreach ($values["OPERATORS"] as $op => $top) {
                 $form_bib1 .= "<tr><td>" . htmlentities($top ? $top : $op, ENT_QUOTES, $charset) . "</td>";
                 for ($i = 0; $i < 6; $i++) {
                     $bibli = "bib1_" . str_replace("\$", "", $ufield) . "_" . $op . "_" . $i;
                     global ${$bibli};
                     $form_bib1 .= "<td class='quadrille_sub'><input type='text' name='bib1_" . str_replace("\$", "", $ufield) . "_" . $op . "_" . $i . "' value='" . htmlentities(${$bibli}, ENT_QUOTES, $charset) . "' style='width:4em'/></td>";
                 }
                 $form_bib1 .= "</tr>";
             }
             $form_bib1 .= "</table>\n";
             $form_bib1 .= "</td></tr>\n";
         }
     }
     $form_bib1 .= "</table>\n";
     $form .= "<script src='javascript/tablist.js'></script>\n";
     $form .= gen_plus("bib1", $this->msg["z3950_bib1"], $form_bib1);
     $form .= "\n\t\t</div>\n\t\t<div class='row'></div>";
     return $form;
 }
Example #12
0
         $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
         $print_cart[$ctype]["cart_list"] .= pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} ><td><input type='checkbox' id='id_" . $ca->idcaddie . "' name='caddie[" . $ca->idcaddie . "]' value='" . $ca->idcaddie . "' />&nbsp;");
         $link = "print_cart.php?action=print&object_type=" . $object_type . "&idcaddie=" . $ca->idcaddie . "&item={$item}&current_print={$current_print}";
         $print_cart[$ctype]["cart_list"] .= pmb_bidi("<a href='javascript:document.getElementById(\"id_" . $ca->idcaddie . "\").checked=true;document.forms[\"print_options\"].submit();' /><strong>" . $ca->name . "</strong>");
         if ($ca->comment) {
             $print_cart[$ctype]["cart_list"] .= pmb_bidi("<br /><small>(" . $ca->comment . ")</small>");
         }
         $print_cart[$ctype]["cart_list"] .= pmb_bidi("</td>\n            \t<td><b>" . $ca->nb_flags . "</b>" . $msg['caddie_contient_pointes'] . " / <b>{$ca->nb_objects}</b> </td>\n            \t<td>{$aff_lien}</td>\n\t\t\t\t</tr>");
     }
 }
 print "\n\t\t<input type='radio' name='pager' value='1'/>&nbsp;" . $msg["print_size_current_page"] . "<br />\n\t\t<input type='radio' name='pager' value='0' checked='checked' />&nbsp;" . $msg["print_size_all"] . "<br />\t\n\t\t<input type='checkbox' id='include_child' name='include_child' />&nbsp;" . $msg["cart_include_child"];
 print "<hr />";
 print pmb_bidi("<div class='row'><a href='javascript:expandAll()'><img src='./images/expand_all.gif' id='expandall' border='0'></a>\n\t\t<a href='javascript:collapseAll()'><img src='./images/collapse_all.gif' id='collapseall' border='0'></a>" . $msg['caddie_add_search'] . "</div>");
 if (count($print_cart)) {
     foreach ($print_cart as $key => $cart_type) {
         print gen_plus($key, $cart_type["titre"], "<table border='0' cellspacing='0' width='100%'>" . $cart_type["cart_list"] . "</table>", 1);
     }
 }
 print "<input type='hidden' name='current_print' value='{$current_print}'/>";
 $boutons_select = '';
 if (count($print_cart)) {
     $boutons_select = "<input type='submit' value='" . $msg['print_cart_add'] . "' class='bouton' />";
 }
 $boutons_select .= "&nbsp;<input type='button' value='" . $msg['print_cancel'] . "' class='bouton' onClick='self.close();' />";
 $lien_creation = 1;
 $object_type = "NOTI";
 if ($lien_creation) {
     print "<div class='row'><hr />\n\t\t\t{$boutons_select}&nbsp;<input class='bouton' type='button' value=' " . $msg['new_cart'] . " ' onClick=\"document.location='./cart.php?action=new_cart&object_type=" . $object_type . "&item={$item}&current_print={$current_print}'\" />\n\t\t\t</div>";
 } else {
     print "<div class='row'><hr />\n\t\t\t{$boutons_select}\n\t\t\t</div>";
 }
Example #13
0
function aff_paniers($item = 0, $object_type = "NOTI", $lien_origine = "./cart.php?", $action_click = "add_item", $titre = "Cliquez sur le nom d'un panier pour y déposer la notice", $restriction_panier = "", $lien_edition = 0, $lien_suppr = 0, $lien_creation = 1, $nocheck = false, $lien_pointage = 0)
{
    global $msg;
    global $PMBuserid;
    global $charset;
    global $myCart;
    global $action;
    global $baselink;
    if ($lien_edition) {
        $lien_edition_panier_cst = "<input type=button class=bouton value='{$msg['caddie_editer']}' onclick=\"document.location='{$lien_origine}&action=edit_cart&idcaddie=!!idcaddie!!';\" />";
    } else {
        $lien_edition_panier_cst = "";
    }
    $liste = caddie::get_cart_list($restriction_panier);
    print "<script type='text/javascript' src='./javascript/tablist.js'></script>";
    if ($item && $nocheck) {
        print "<form name='print_options' action='{$lien_origine}&action={$action_click}&object_type=" . $object_type . "&item={$item}' method='post'>";
        print "<input type='hidden' id='idcaddie' name='idcaddie' >";
        if ($lien_pointage) {
            print "<input type='hidden' id='idcaddie_selected' name='idcaddie_selected' >";
        }
    }
    if ($item && !$nocheck) {
        print "<form name='print_options' action='{$lien_origine}&action={$action_click}&object_type=" . $object_type . "&item={$item}' method='post'>";
        if ($action != "save_cart") {
            print "<input type='checkbox' name='include_child' >&nbsp;" . $msg["cart_include_child"];
        }
    }
    print "<hr />";
    if ($lien_creation) {
        print "<div class='row'>\n\t\t{$boutons_select}<input class='bouton' type='button' value=' {$msg['new_cart']} ' onClick=\"document.location='{$lien_origine}&action=new_cart&object_type=" . $object_type . "&item={$item}'\" />\n\t\t</div><br>";
    }
    if (sizeof($liste)) {
        print pmb_bidi("<div class='row'><a href='javascript:expandAll()'><img src='./images/expand_all.gif' id='expandall' border='0'></a>\n\t\t<a href='javascript:collapseAll()'><img src='./images/collapse_all.gif' id='collapseall' border='0'></a>{$titre}</div>");
        print confirmation_delete("{$lien_origine}&action=del_cart&object_type=" . $object_type . "&item={$item}&idcaddie=");
        while (list($cle, $valeur) = each($liste)) {
            $rqt_autorisation = explode(" ", $valeur['autorisations']);
            if (array_search($PMBuserid, $rqt_autorisation) !== FALSE || $PMBuserid == 1) {
                $aff_lien = str_replace('!!idcaddie!!', $valeur['idcaddie'], $lien_edition_panier_cst);
                if (!$myCart) {
                    $myCart = new caddie(0);
                }
                $myCart->nb_item = $valeur['nb_item'];
                $myCart->nb_item_pointe = $valeur['nb_item_pointe'];
                $myCart->type = $valeur['type'];
                $print_cart[$myCart->type]["titre"] = "<b>" . $msg["caddie_de_" . $myCart->type] . "</b><br />";
                if (!trim($valeur["caddie_classement"])) {
                    $valeur["caddie_classement"] = classementGen::getDefaultLibelle();
                }
                $parity[$myCart->type] = 1 - $parity[$myCart->type];
                if ($parity[$myCart->type]) {
                    $pair_impair = "even";
                } else {
                    $pair_impair = "odd";
                }
                $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
                if ($item && $action != "save_cart") {
                    $rowPrint = pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} ><td class='classement60'>" . (!$nocheck ? "<input type='checkbox' id='id_" . $valeur['idcaddie'] . "' name='caddie[" . $valeur['idcaddie'] . "]' value='" . $valeur['idcaddie'] . "'>" : "") . "&nbsp;");
                    $link = "{$lien_origine}&action={$action_click}&object_type=" . $object_type . "&idcaddie=" . $valeur['idcaddie'] . "&item={$item}";
                    if (!$nocheck) {
                        $rowPrint .= pmb_bidi("<a href='#' onclick='javascript:document.getElementById(\"id_" . $valeur['idcaddie'] . "\").checked=true;document.forms[\"print_options\"].submit();' /><strong>" . $valeur['name'] . "</strong>");
                    } else {
                        if ($lien_pointage) {
                            $rowPrint .= pmb_bidi("<a href='#' onclick='javascript:document.getElementById(\"idcaddie\").value=" . $item . ";document.getElementById(\"idcaddie_selected\").value=" . $valeur['idcaddie'] . ";document.forms[\"print_options\"].submit();' /><strong>" . $valeur['name'] . "</strong>");
                        } else {
                            $rowPrint .= pmb_bidi("<a href='#' onclick='javascript:document.getElementById(\"idcaddie\").value=" . $valeur['idcaddie'] . ";document.forms[\"print_options\"].submit();' /><strong>" . $valeur['name'] . "</strong>");
                        }
                    }
                    if ($valeur['comment']) {
                        $rowPrint .= pmb_bidi("<br /><small>(" . $valeur['comment'] . ")</small>");
                    }
                    $rowPrint .= pmb_bidi("</td>\n\t            \t\t" . aff_cart_nb_items_reduit($myCart) . "\n\t            \t\t<td class='classement20'>{$aff_lien}</td>\n\t\t\t\t\t\t</tr>");
                } else {
                    $link = "{$lien_origine}&action={$action_click}&object_type=" . $object_type . "&idcaddie=" . $valeur['idcaddie'] . "&item={$item}";
                    $rowPrint = pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} >");
                    $rowPrint .= pmb_bidi("<td class='classement60'><a href='{$link}' /><strong>" . $valeur['name'] . "</strong>");
                    if ($valeur['comment']) {
                        $rowPrint .= pmb_bidi("<br /><small>(" . $valeur['comment'] . ")</small>");
                    }
                    $rowPrint .= pmb_bidi("</a></td>");
                    $rowPrint .= pmb_bidi(aff_cart_nb_items_reduit($myCart));
                    if ($lien_creation) {
                        $classementGen = new classementGen('caddie', $valeur['idcaddie']);
                        $rowPrint .= pmb_bidi("<td class='classement15'>" . $aff_lien . "&nbsp;" . caddie::show_actions($valeur['idcaddie'], $valeur['type']) . "</td>");
                        $rowPrint .= pmb_bidi("<td class='classement5'>" . $classementGen->show_selector($baselink, $PMBuserid) . "</td>");
                    } else {
                        $rowPrint .= pmb_bidi("<td class='classement20'>{$aff_lien}</td>");
                    }
                    $rowPrint .= pmb_bidi("</tr>");
                }
                $print_cart[$myCart->type]["classement_list"][$valeur["caddie_classement"]]["titre"] = stripslashes($valeur["caddie_classement"]);
                $print_cart[$myCart->type]["classement_list"][$valeur["caddie_classement"]]["cart_list"] .= $rowPrint;
            }
        }
        if ($lien_creation) {
            print "<script src='./javascript/classementGen.js' type='text/javascript'></script>";
        }
        //Tri des classements
        foreach ($print_cart as $key => $cart_type) {
            ksort($print_cart[$key]["classement_list"]);
        }
        // affichage des paniers par type
        foreach ($print_cart as $key => $cart_type) {
            //on remplace les clés à cause des accents
            $cart_type["classement_list"] = array_values($cart_type["classement_list"]);
            $contenu = "";
            foreach ($cart_type["classement_list"] as $keyBis => $cart_typeBis) {
                $contenu .= gen_plus($key . $keyBis, $cart_typeBis["titre"], "<table border='0' cellspacing='0' width='100%' class='classementGen_tableau'>" . $cart_typeBis["cart_list"] . "</table>", 1);
            }
            print gen_plus($key, $cart_type["titre"], $contenu, 1);
        }
    } else {
        print $msg[398];
    }
    if (!$nocheck) {
        if ($item && $action != "save_cart") {
            $boutons_select = "<input type='submit' value='" . $msg["print_cart_add"] . "' class='bouton'/>&nbsp;<input type='button' value='" . $msg["print_cancel"] . "' class='bouton' onClick='self.close();'/>&nbsp;";
        }
        if ($lien_creation) {
            print "<div class='row'><hr />\n\t\t\t\t{$boutons_select}<input class='bouton' type='button' value=' {$msg['new_cart']} ' onClick=\"document.location='{$lien_origine}&action=new_cart&object_type=" . $object_type . "&item={$item}'\" />\n\t\t\t\t</div>";
        } else {
            print "<div class='row'><hr />\n\t\t\t\t{$boutons_select}\n\t\t\t\t</div>";
        }
    } else {
        if ($lien_creation) {
            print "<div class='row'><hr />\n\t\t\t{$boutons_select}<input class='bouton' type='button' value=' {$msg['new_cart']} ' onClick=\"document.location='{$lien_origine}&action=new_cart&object_type=" . $object_type . "&item={$item}'\" />\n\t\t\t</div>";
        }
    }
    //if(($item)&&(!$nocheck)) print"</form>";
    if ($item) {
        print "</form>";
    }
}
Example #14
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;
}
Example #15
0
function aff_etagere($action, $bouton_ajout = 1)
{
    global $msg;
    global $PMBuserid;
    global $charset, $opac_url_base;
    $liste = etagere::get_etagere_list();
    if (sizeof($liste)) {
        if ($action == "edit_etagere") {
            print "<script src='./javascript/classementGen.js' type='text/javascript'></script>";
            print "<div class='hmenu'>\n\t\t\t\t\t<span><a href='catalog.php?categ=etagere&sub=classementGen'>" . $msg["classementGen_list_libelle"] . "</a></span>\n\t\t\t\t</div><hr>";
            if ($bouton_ajout) {
                print "<div class='row'>\n\t\t\t\t<input class='bouton' type='button' value=' " . $msg["etagere_new_etagere"] . " ' onClick=\"document.location='./catalog.php?categ=etagere&sub=gestion&action=new_etagere'\" />\n\t\t\t\t</div><br>";
            }
        }
        print pmb_bidi("<div class='row'><a href='javascript:expandAll()'><img src='./images/expand_all.gif' id='expandall' border='0'></a>\n\t\t\t<a href='javascript:collapseAll()'><img src='./images/collapse_all.gif' id='collapseall' border='0'></a></div>");
        $parity = 1;
        $arrayRows = array();
        while (list($cle, $valeur) = each($liste)) {
            $rqt_autorisation = explode(" ", $valeur['autorisations']);
            if (array_search($PMBuserid, $rqt_autorisation) !== FALSE || $PMBuserid == 1) {
                $classementRow = $valeur['etagere_classement'];
                if (!trim($classementRow)) {
                    $classementRow = classementGen::getDefaultLibelle();
                }
                $baselink = "./catalog.php?categ=etagere";
                $link = $baselink . "&sub={$action}&action=edit_etagere&idetagere=" . $valeur['idetagere'];
                if ($parity % 2) {
                    $pair_impair = "even";
                } else {
                    $pair_impair = "odd";
                }
                $parity += 1;
                $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
                $td_javascript_click = " onmousedown=\"document.location='{$link}';\" ";
                $rowPrint = pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} >");
                $rowPrint .= pmb_bidi("<td {$td_javascript_click} style='cursor: pointer'><strong>" . $valeur['name'] . "</strong>" . ($valeur['comment'] ? " (" . $valeur['comment'] . ")" : "") . "</td>");
                $rowPrint .= pmb_bidi("<td {$td_javascript_click} style='cursor: pointer'>" . $valeur['nb_paniers'] . "</td>");
                $rowPrint .= pmb_bidi("<td {$td_javascript_click} style='cursor: pointer'>" . ($valeur['validite'] ? $msg['etagere_visible_date_all'] : $msg['etagere_visible_date_du'] . " " . $valeur['validite_date_deb_f'] . " " . $msg['etagere_visible_date_fin'] . " " . $valeur['validite_date_fin_f']) . "</td>");
                $rowPrint .= pmb_bidi("<td>" . ($valeur['visible_accueil'] ? "X" : "") . "<br /><a href='" . $opac_url_base . "index.php?lvl=etagere_see&id=" . $valeur['idetagere'] . "' target=_blank>" . $opac_url_base . "index.php?lvl=etagere_see&id=" . $valeur['idetagere'] . "</a></td>");
                if ($action == "edit_etagere") {
                    $classementGen = new classementGen('etagere', $valeur['idetagere']);
                    $rowPrint .= pmb_bidi("<td>" . $classementGen->show_selector($baselink, $PMBuserid) . "</td>");
                }
                $rowPrint .= pmb_bidi("</tr>");
                $arrayRows[$classementRow]["title"] = stripslashes($classementRow);
                $arrayRows[$classementRow]["etagere_list"] .= $rowPrint;
            }
        }
        //on trie
        ksort($arrayRows);
        //on remplace les clés à cause des accents
        $arrayRows = array_values($arrayRows);
        foreach ($arrayRows as $key => $type) {
            if ($action == "edit_etagere") {
                print gen_plus($key, $type["title"], "<table class='classementGen_tableau'><tr><th class='classement40'>" . $msg['etagere_name'] . "</th><th class='classement10'>" . $msg["etagere_cart_count"] . "</th><th class='classement10'>" . $msg['etagere_visible_date'] . "</th><th class='classement35'>" . $msg['etagere_visible_accueil'] . "</th><th class='classement5'>&nbsp;</th></tr>" . $type["etagere_list"] . "</table>", 1);
            } else {
                print gen_plus($key, $type["title"], "<table class='classementGen_tableau'><tr><th class='classement40'>" . $msg['etagere_name'] . "</th><th class='classement10'>" . $msg["etagere_cart_count"] . "</th><th class='classement10'>" . $msg['etagere_visible_date'] . "</th><th class='classement40'>" . $msg['etagere_visible_accueil'] . "</th></tr>" . $type["etagere_list"] . "</table>", 1);
            }
        }
    } else {
        print $msg['etagere_no_etagere'];
    }
    if ($bouton_ajout) {
        print "<div class='row'>\n\t<input class='bouton' type='button' value=' " . $msg["etagere_new_etagere"] . " ' onClick=\"document.location='./catalog.php?categ=etagere&sub=gestion&action=new_etagere'\" />\n\t</div>";
    }
}
Example #16
0
 function get_bulletin_retard($serial_id)
 {
     global $opac_sur_location_activate, $msg;
     $bulletin_retard_form = "\t\n\t<h3><span id='titre_exemplaires' class='bulletin_retard' >" . $msg["bulletin_retard_title"] . "</span></h3>\n\t<table class='bulletin_retard'>\n\t\t<tr>\n\t\t\t<th class='expl_header_location_libelle'>" . $msg["bulletin_retard_location"] . "</th>\n\t\t\t<th class='expl_header_location_libelle'>" . $msg["bulletin_retard_date_parution"] . "</th>\n\t\t\t<th class='expl_header_location_libelle'>" . $msg["bulletin_retard_libelle_numero"] . "</th>\n\t\t\t<th class='expl_header_location_libelle'>" . $msg["bulletin_retard_comment"] . "</th>\n\t\t</tr>\n\t\t!!bulletin_retard_list!!\n\t</table> \n\t";
     $bulletin_retard_line = "\n\t\t<tr class='!!tr_class!!' onmouseout=\"this.className='!!tr_class!!'\" onmouseover=\"this.className='surbrillance'\">\n\t\t\t<td>!!location_libelle!!</td>\n\t\t\t<td>!!date_parution!!</td>\n\t\t\t<td>!!libelle_numero!!</td>\n\t\t\t<td>!!comment_opac!!</td>\t\t\n\t\t</tr>\n\t";
     $tpl = "";
     $req = "SELECT surloc_num, location_id,location_libelle, rel_date_parution,rel_libelle_numero, rel_comment_opac \n\t\tfrom perio_relance, abts_abts, docs_location\n\t\twhere  location_id=idlocation and rel_abt_num=abt_id and num_notice={$serial_id} and rel_comment_opac!='' group by rel_abt_num,rel_date_parution,\trel_libelle_numero order by rel_nb desc";
     $result = pmb_mysql_query($req);
     if (pmb_mysql_num_rows($result)) {
         $tr_class = "";
         while ($r = pmb_mysql_fetch_object($result)) {
             $surloc_libelle = "";
             if ($opac_sur_location_activate && $r->surloc_num) {
                 $req = "select surloc_libelle from sur_location where surloc_id = " . $r->surloc_num;
                 $res_surloc = pmb_mysql_query($req);
                 if (pmb_mysql_num_rows($res_surloc)) {
                     $surloc = pmb_mysql_fetch_object($res_surloc);
                     $surloc_libelle = $surloc->surloc_libelle . " / ";
                 }
             }
             $line = $bulletin_retard_line;
             $line = str_replace("!!location_libelle!!", $surloc_libelle . $r->location_libelle, $line);
             $line = str_replace("!!date_parution!!", $r->rel_date_parution, $line);
             $line = str_replace("!!libelle_numero!!", $r->rel_libelle_numero, $line);
             $line = str_replace("!!comment_opac!!", $r->rel_comment_opac, $line);
             if ($tr_class == 'even') {
                 $tr_class = "odd";
             } else {
                 $tr_class = 'even';
             }
             $line = str_replace("!!tr_class!!", $tr_class, $line);
             $lines .= $line;
         }
         $tpl = $bulletin_retard_form;
         $tpl = gen_plus("bulletin_retard", $msg["bulletin_retard_title"], str_replace("!!bulletin_retard_list!!", $lines, $tpl));
     }
     return $tpl;
 }
Example #17
0
 public function show_issue_display($opened_expl = 0)
 {
     global $opac_notices_depliable;
     global $msg, $charset;
     $query = "select expl_bulletin from exemplaires where expl_id =" . $this->num_expl;
     $result = mysql_query($query);
     if (mysql_num_rows($result)) {
         $id_issue = mysql_result($result, 0, 0);
     }
     $serialcirc = new serialcirc($this->num_serialcirc);
     $content = bulletin_affichage($id_issue);
     $query = "select date_add('" . $this->serialcirc_expl['start_date_sql'] . "', interval " . $this->serialcirc['duration_before_send'] . " day)";
     $res = mysql_query($query);
     if (mysql_num_rows($res)) {
         $end_subscription = mysql_result($res, 0, 0);
         $query = "select datediff('" . $end_subscription . "',now())";
         $res = mysql_query($query);
         if (mysql_num_rows($res)) {
             $test = mysql_result($res, 0, 0);
         } else {
             $test = -1;
         }
         if ($test >= 0 && !serialcirc_empr_circ::is_subscribe($_SESSION['id_empr_session'], $this->num_expl)) {
             $form = "\n\t\t\t\t<input type='submit' class='bouton' value='" . htmlentities(sprintf($msg['serialcirc_subscribe_list'], formatdate($end_subscription)), ENT_QUOTES, $charset) . "' />";
         } else {
             $form = "\n\t\t\t\t<input type='submit' class='bouton' disabled='disabled' value='" . htmlentities(sprintf($msg['serialcirc_subscribe_list'], formatdate($end_subscription)), ENT_QUOTES, $charset) . "' />";
         }
     }
     $content .= "\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<form action='empr.php?tab=serialcirc&lvl=list_abo' method='post' name='actions_form_" . $this->num_serialcirc . "_" . $this->num_expl . "' style='display:inline;'>\n\t\t\t\t<input type='hidden' name='id_serialcirc' value='" . htmlentities($this->num_serialcirc, ENT_QUOTES, $charset) . "'/>\n\t\t\t\t<input type='hidden' name='expl_id' value='" . htmlentities($this->num_expl, ENT_QUOTES, $charset) . "'/>\n\t\t\t\t<input type='hidden' name='actions_form_submit' value ='1' />\n\t\t\t\t<input type='hidden' name='subscription' value='1' />\n\t\t\t\t{$form}\n\t\t\t</form>";
     if ($serialcirc->allow_copy) {
         $content .= "&nbsp;\n\t\t\t<form action='empr.php?tab=serialcirc&lvl=list_virtual_abo&action=ask_copy' method='post' style='display:inline;'>\n\t\t\t\t<input type='hidden' name='expl_id' value='" . htmlentities($this->num_expl, ENT_QUOTES, $charset) . "'/>\n\t\t\t\t<input type='submit' class='bouton' value='" . htmlentities($msg['serialcirc_ask_copy'], ENT_QUOTES, $charset) . "' />\n\t\t\t</form>\n\t\t";
     }
     $content .= "\t\t\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>\n\t\t";
     if ($opac_notices_depliable) {
         if ($opened_expl == $this->num_expl) {
             $open = 1;
         } else {
             $open = 0;
         }
         $display = gen_plus("serialcirc_issue" . $id_issue, bulletin_header($id_issue), $content, $open);
     } else {
         $display = $content;
     }
     return $display;
 }
 function genere_bulletin($bulletin_infos)
 {
     global $opac_notices_depliable;
     $html .= "<div id='es_bull_" . $bulletin_infos->bulletin_id . "' class='notice-parent'></div>";
     $titre = $bulletin_infos->bulletin_num;
     if ($bulletin_infos->bulletin_date) {
         $titre .= " (" . format_date($bulletin_infos->bulletin_date) . ")";
     }
     if ($bulletin_infos->bulletin_titre) {
         $titre .= ": " . $bulletin_infos->bulletin_titre;
     }
     $contenu = "";
     $analysis = explode(",", $bulletin_infos->analysis);
     $opac_notices_depliable = 1;
     foreach ($analysis as $article) {
         $contenu .= aff_notice_unimarc($article);
     }
     $opac_notices_depliable = 0;
     return gen_plus("es_bull_" . $bulletin_infos->bulletin_id, $titre, $contenu);
 }
Example #19
0
 function source_get_property_form($source_id)
 {
     global $charset, $base_path;
     $params = $this->get_source_params($source_id);
     if ($params["PARAMETERS"] != "") {
         //Affichage du formulaire avec $params["PARAMETERS"]
         $vars = unserialize($params["PARAMETERS"]);
         foreach ($vars as $key => $val) {
             global ${$key};
             ${$key} = $val;
         }
     } else {
         $file_params = file_get_contents($base_path . "/admin/connecteurs/in/openurl/conf.xml");
         $params = _parser_text_no_function_($file_params, "CONFIGURATION");
         foreach ($params as $section => $parameters) {
             switch ($section) {
                 case "TRANSPORT":
                     $protocole = $parameters[0]['PROTOCOLE'][0]['value'];
                     $method = $parameters[0]['METHOD'][0]['value'];
                     $tparameters = $parameters[0]['PARAMETERS'][0]['value'];
                     break;
                 case "SERIALIZATION":
                     $serialization = $parameters[0]['value'];
                     break;
                 case "ENTITIES":
                     foreach ($parameters[0]['ENTITY'] as $entity) {
                         switch ($entity['TYPE']) {
                             case "referent":
                                 foreach ($entity['IDENTIFIERS'][0]['IDENTIFIER'] as $identifier) {
                                     switch ($identifier['NAME']) {
                                         case "issn":
                                             $rft_issn = $identifier['ALLOW'] == "yes" ? 1 : 0;
                                             break;
                                         case "isbn":
                                             $rft_isbn = $identifier['ALLOW'] == "yes" ? 1 : 0;
                                             break;
                                         case "pmid":
                                             $rft_pmid = $identifier['ALLOW'] == "yes" ? 1 : 0;
                                             break;
                                         case "doi":
                                             $rft_doi = $identifier['ALLOW'] == "yes" ? 1 : 0;
                                             break;
                                     }
                                 }
                                 $rft_byval = $entity['BYVALUE'][0]['ALLOW'] == "yes" ? 1 : 0;
                                 $rft_byref = $entity['BYREFERENCE'][0]['ALLOW'] == "yes" ? 1 : 0;
                                 $rft_private = $entity['PRIVATE'][0]['ALLOW'] == "yes" ? 1 : 0;
                                 break;
                             case "referring_entity":
                                 $rfe_allow = $entity['ALLOW'] == "yes" ? 1 : 0;
                                 foreach ($entity['IDENTIFIERS'][0]['IDENTIFIER'] as $identifier) {
                                     switch ($identifier['NAME']) {
                                         case "issn":
                                             $rfe_issn = $identifier['ALLOW'] == "yes" ? 1 : 0;
                                             break;
                                         case "isbn":
                                             $rfe_isbn = $identifier['ALLOW'] == "yes" ? 1 : 0;
                                             break;
                                         case "pmid":
                                             $rfe_pmid = $identifier['ALLOW'] == "yes" ? 1 : 0;
                                             break;
                                         case "doi":
                                             $rfe_doi = $identifier['ALLOW'] == "yes" ? 1 : 0;
                                             break;
                                     }
                                 }
                                 $rfe_byval = $entity['BYVALUE'][0]['ALLOW'] == "yes" ? 1 : 0;
                                 $rfe_byref = $entity['BYREFERENCE'][0]['ALLOW'] == "yes" ? 1 : 0;
                                 $rfe_private = $entity['PRIVATE'][0]['ALLOW'] == "yes" ? 1 : 0;
                                 break;
                             case "requester":
                                 $req_allow = $entity['ALLOW'] == "yes" ? 1 : 0;
                                 $req_parameter = $entity['PARAMETER'][0]['value'];
                                 break;
                             case "service_type":
                                 $svc_allow = $entity['ALLOW'] == "yes" ? 1 : 0;
                                 $svc_services = array();
                                 foreach ($entity['SERVICE'] as $service) {
                                     $svc_services[] = array('name' => $service['NAME'], 'value' => $service['DEFAULT_VALUE']);
                                 }
                                 break;
                             case "resolver":
                                 $res_allow = $entity['ALLOW'] == "yes" ? 1 : 0;
                                 $res_parameter = $entity['PARAMETER'][0]['value'];
                                 break;
                             case "referrer":
                                 $rfr_allow = $entity['ALLOW'] == "yes" ? 1 : 0;
                                 $rfr_parameter = $entity['PARAMETER'][0]['value'];
                                 break;
                         }
                     }
                     break;
             }
         }
     }
     if (!isset($libelle)) {
         $libelle = "OpenURL";
     }
     if (!isset($source_name)) {
         $source_name = "OpenURL";
     }
     if (!isset($iwidth)) {
         $iwidth = "640";
     }
     if (!isset($iheight)) {
         $iheight = "350";
     }
     if (!isset($infobulle)) {
         $infobulle = "";
     }
     //		$result ="
     //			<div class='row'>&nbsp;</div>
     //			<div class='row'>
     //				<div class='colonne3'>
     //					<label for='conf_file'>".$this->msg["openurl_conf_file"]."</label>
     //				</div>
     //				<div class='colonne_suite'>
     //					<input type='file' name='conf_file'/>
     //				</div>
     //			</div>";
     //VISUEL
     $form_visuel = "\n\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t<div class='row'>\n\t\t\t\t<div class='colonne3'><label for='libelle'>" . $this->msg["openurl_libelle"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'><input type='text' name='libelle' value='" . htmlentities($libelle, ENT_QUOTES, $charset) . "'/></div>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<div class='colonne3'><label for='infobulle'>" . $this->msg["openurl_infobulle"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'><input type='text' name='infobulle' value='" . htmlentities($infobulle, ENT_QUOTES, $charset) . "'/></div>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<div class='colonne3'><label for='iwidth'>" . $this->msg["openurl_iwidth"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'><input type='text' name='iwidth' value='" . htmlentities($iwidth, ENT_QUOTES, $charset) . "'/></div>\n\t\t\t\t<div class='colonne3'><label for='iheight'>" . $this->msg["openurl_iheight"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'><input type='text' name='iheight' value='" . htmlentities($iheight, ENT_QUOTES, $charset) . "'/></div>\n\t\t\t\t<div class='colonne3'><label for='source_name'>" . $this->msg["openurl_source_name"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'><input type='text' name='source_name' value='" . htmlentities($source_name, ENT_QUOTES, $charset) . "'/></div>\n\t\t\t</div>\n\t\t\t<div class='row'>&nbsp;</div>";
     $result .= gen_plus("form_opac", $this->msg['openurl_form_param_visuel'], $form_visuel, 1);
     //TRANSPORT
     $form_transport = "\n\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t<div class='row'>\n\t\t\t\t<div class='colonne3'><label for='protocole'>" . $this->msg["openurl_protocole"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t<select name ='protocole'>\n\t\t\t\t\t\t<option value='http' " . ($protocole == "http" ? "selected='selected'" : "") . ">" . $this->msg["openurl_protocole_http"] . "</option>\n\t\t\t\t\t\t<option value='https' " . ($protocole == "https" ? "selected='selected'" : "") . ">" . $this->msg["openurl_protocole_https"] . "</option>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<div class='colonne3'><label for='method'>" . $this->msg["openurl_method"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t<select name='method'>\n\t\t\t\t\t\t<option value='byval' " . ($method == "byval" ? "selected=\"selected\"" : "") . ">" . $this->msg["openurl_method_byval"] . "</option>\n\t\t\t\t\t\t<option value='byref' " . ($method == "byref" ? "selected=\"selected\"" : "") . ">" . $this->msg["openurl_method_byref"] . "</option>\n\t\t\t\t\t\t<option value='inline' " . ($method == "inline" ? "selected=\"selected\"" : "") . ">" . $this->msg["openurl_method_inline"] . "</option>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t\t<div class='colonne3'><label for='tparameters'>" . $this->msg["openurl_tparameters"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'><input type='text' name='tparameters' value='" . htmlentities($tparameters, ENT_QUOTES, $charset) . "'/></div>\n\t\t\t\t<div class='colonne3'><label for='byref_url'>" . $this->msg["openurl_byref_url"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'><input type='text' name='byref_url' value='" . htmlentities($byref_url, ENT_QUOTES, $charset) . "'/></div>\n\t\t\t</div>\n\t\t\t<div class='row'>&nbsp;</div>";
     //TODO : voir pour genre plus générique tparameters... doit pouvoir renvoyer une chaine ou un tableau...
     $result .= gen_plus("form_transport", $this->msg['openurl_form_param_transport'], $form_transport, 1);
     $form_serialize = "\n\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t<div class='row'>\n\t\t\t\t<div class='colonne3'><label for='serialization'>" . $this->msg["openurl_serialize"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t<span>" . $this->msg['openurl_serialization_kev'] . "&nbsp;<input type='radio' name='serialization' value='kev' " . ($serialization == "kev" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t\t<span>" . $this->msg['openurl_serialization_xml'] . "&nbsp;<input type='radio' name='serialization' value='xml' " . ($serialization == "xml" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class='row'>&nbsp;</div>";
     $result .= gen_plus("form_serialize", $this->msg['openurl_form_param_serialization'], $form_serialize, 1);
     $form_entities = "\n\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t<div class='row'>";
     //REFERENT
     $referent = "\n\t\t\t\t\t<table >\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th style='text-align:center;'>" . $this->msg['openurl_descriptors_type'] . "</th>\n\t\t\t\t\t\t\t<th style='text-align:center;' >" . $this->msg['openurl_descriptors_stype'] . "</th>\n\t\t\t\t\t\t\t<th style='text-align:center;'>" . $this->msg['openurl_descriptors_stype_allow'] . "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='even'>\n\t\t\t\t\t\t\t<td style='text-align:center;' rowspan='4'>" . $this->msg['openurl_descriptors_identifier'] . "</td>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t" . $this->msg['openurl_descriptors_identifier_isbn'] . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rft_isbn' value='1' " . ($rft_isbn == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rft_isbn' value='0' " . ($rft_isbn == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='even'>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t" . $this->msg['openurl_descriptors_identifier_issn'] . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rft_issn' value='1' " . ($rft_issn == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rft_issn' value='0' " . ($rft_issn == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='even'>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t" . $this->msg['openurl_descriptors_identifier_pmid'] . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rft_pmid' value='1' " . ($rft_pmid == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rft_pmid' value='0' " . ($rft_pmid == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='even'>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t" . $this->msg['openurl_descriptors_identifier_doi'] . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rft_doi' value='1' " . ($rft_doi == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rft_doi' value='0' " . ($rft_doi == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='odd'>\n\t\t\t\t\t\t\t<td style='text-align:center;'>" . $this->msg['openurl_descriptors_byval'] . "</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rft_byval' value='1' " . ($rft_byval == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rft_byval' value='0' " . ($rft_byval == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='even'>\n\t\t\t\t\t\t\t<td style='text-align:center;'>" . $this->msg['openurl_descriptors_byref'] . "</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rft_byref' value='1' " . ($rft_byref == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rft_byref' value='0' " . ($rft_byref == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr class='odd'>\n\t\t\t\t\t\t\t<td style='text-align:center;'>" . $this->msg['openurl_descriptors_private'] . "</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rft_private' value='1' " . ($rft_private == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rft_private' value='0' " . ($rft_private == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t</table>";
     $form_entities .= gen_plus("referent", $this->msg['openurl_entities_referent'], $referent, 1);
     //REFERRING ENTITY
     $referring_entity = "\n\t\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t\t<div class='colonne3'><label for='rfe_allow'>" . $this->msg["openurl_entity_allow"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rfe_allow' value='1' " . ($rfe_allow == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t\t<span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rfe_allow' value='0' " . ($rfe_allow == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t</div>\t\n\t\t\t\t<div class='row'>&nbsp;</div>\t\n\t\t\t\t\t<table >\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th style='text-align:center;'>" . $this->msg['openurl_descriptors_type'] . "</th>\n\t\t\t\t\t\t\t<th style='text-align:center;' >" . $this->msg['openurl_descriptors_stype'] . "</th>\n\t\t\t\t\t\t\t<th style='text-align:center;'>" . $this->msg['openurl_descriptors_stype_allow'] . "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='even'>\n\t\t\t\t\t\t\t<td style='text-align:center;' rowspan='4'>" . $this->msg['openurl_descriptors_identifier'] . "</td>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t" . $this->msg['openurl_descriptors_identifier_isbn'] . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rfe_isbn' value='1' " . ($rfe_isbn == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rfe_isbn' value='0' " . ($rfe_isbn == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='even'>\t\t\t\t\t\n\t\t\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t\t\t" . $this->msg['openurl_descriptors_identifier_issn'] . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rfe_issn' value='1' " . ($rfe_issn == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rfe_issn' value='0' " . ($rfe_issn == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='even'>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t" . $this->msg['openurl_descriptors_identifier_pmid'] . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rfe_pmid' value='1' " . ($rfe_pmid == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rfe_pmid' value='0' " . ($rfe_pmid == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='even'>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t" . $this->msg['openurl_descriptors_identifier_doi'] . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style='text-align:center;' >\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rfe_doi' value='1' " . ($rfe_doi == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rfe_doi' value='0' " . ($rfe_doi == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='odd'>\n\t\t\t\t\t\t\t<td style='text-align:center;'>" . $this->msg['openurl_descriptors_byval'] . "</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rfe_byval' value='1' " . ($rfe_byval == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rfe_byval' value='0' " . ($rfe_byval == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='even'>\n\t\t\t\t\t\t\t<td style='text-align:center;'>" . $this->msg['openurl_descriptors_byref'] . "</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rfe_byref' value='1' " . ($rfe_byref == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rfe_byref' value='0' " . ($rfe_byref == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t\t<tr class='odd'>\n\t\t\t\t\t\t\t<td style='text-align:center;'>" . $this->msg['openurl_descriptors_private'] . "</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rfe_private' value='1' " . ($rfe_private == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rfe_private' value='0' " . ($rfe_private == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span><br/>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\t\t\t\t\t\t\n\t\t\t\t\t</table>";
     $form_entities .= gen_plus("referring_entity", $this->msg['openurl_entities_referring_entity'], $referring_entity, 1);
     //REQUESTER
     $requester = "\n\t\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t\t<div class='colonne3'><label for='req_allow'>" . $this->msg["openurl_entity_allow"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='req_allow' value='1' " . ($req_allow == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t\t<span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='req_allow' value='0' " . ($req_allow == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t</div>\n\t\t\t\t<div class='colonne3'><label for='req_parameter'>" . $this->msg['openurl_requester_param'] . "</label></div>\n\t\t\t\t<div class='colonne-suite'><input type='text' name='req_parameter' value='" . htmlentities($req_parameter, ENT_QUOTES, $charset) . "'/></div>\n\t\t\t\t<div class='row'>&nbsp;</div>";
     $form_entities .= gen_plus("requester", $this->msg['openurl_entities_requester'], $requester, 1);
     //SERVICE TYPE
     $service_type = "\n\t\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t\t<div class='colonne3'><label for='svc_allow'>" . $this->msg["openurl_entity_allow"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='svc_allow' value='1' " . ($req_allow == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t\t<span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='svc_allow' value='0' " . ($req_allow == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t</div>\t\n\t\t\t\t<table >\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th style='text-align:center;'>" . $this->msg['openurl_service'] . "</th>\n\t\t\t\t\t\t<th style='text-align:center;' >" . $this->msg['openurl_service_use'] . "</th>\n\t\t\t\t\t</tr>";
     for ($i = 0; $i < count($svc_services); $i++) {
         $service_type .= "\n\t\t\t\t\t<tr class='" . ($i % 2 ? "odd" : "even") . "'>\n\t\t\t\t\t\t<td style='text-align:center;'>" . htmlentities($svc_services[$i]['name'], ENT_QUOTES, $charset) . "<input type='hidden' name='svc_services[{$i}][name]' value='" . htmlentities($svc_services[$i]['name'], ENT_QUOTES, $charset) . "'</td>\n\t\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='svc_services[{$i}][value]' value='1' " . ($svc_services[$i]['value'] == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t\t\t\t<span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='svc_services[{$i}][value]' value='0' " . ($svc_services[$i]['value'] == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>";
     }
     $service_type .= "\t\t\t\n\t\t\t\t</table>\n\t\t\t\t<div class='row'>&nbsp;</div>";
     $form_entities .= gen_plus("service_type", $this->msg['openurl_entities_service_type'], $service_type, 1);
     //RESOLVER
     $resolver = "\n\t\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t\t<div class='colonne3'><label for='res_allow'>" . $this->msg['openurl_entity_allow'] . "</label></div>\n\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='res_allow' value='1' " . ($res_allow == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t\t<span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='res_allow' value='0' " . ($res_allow == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t</div>\n\t\t\t\t<div class='colonne3'><label for='res_parameter'>" . $this->msg['openurl_resolver_param'] . "</label></div>\n\t\t\t\t<div class='colonne-suite'><input type='text' name='res_parameter' value='" . htmlentities($res_parameter, ENT_QUOTES, $charset) . "'/></div>\n\t\t\t\t<div class='row'>&nbsp;</div>";
     $form_entities .= gen_plus("resolver", $this->msg['openurl_entities_resolver'], $resolver, 1);
     //REFERRER
     $referrer = "\n\t\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t\t<div class='colonne3'><label for='rfr_allow'>" . $this->msg["openurl_entity_allow"] . "</label></div>\n\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t<span>" . $this->msg['openurl_yes'] . "&nbsp;<input type='radio' name='rfr_allow' value='1' " . ($rfr_allow == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t\t<span>" . $this->msg['openurl_no'] . "&nbsp;<input type='radio' name='rfr_allow' value='0' " . ($rfr_allow == "0" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t</div>\n\t\t\t\t<div class='colonne3'><label for='rfr_parameter'>" . $this->msg['openurl_referrer_param'] . "</label></div>\n\t\t\t\t<div class='colonne-suite'><input type='text' name='rfr_parameter' value='" . htmlentities($rfr_parameter, ENT_QUOTES, $charset) . "'/></div>\n\t\t\t\t<div class='row'>&nbsp;</div>\t\n\t\t";
     $form_entities .= gen_plus("referrer", $this->msg['openurl_entities_referrer'], $referrer, 1);
     $result .= gen_plus("form_entities", $this->msg['openurl_form_param_entities'], $form_entities, 1);
     $result .= "\n\t\t\t<div class='row'>&nbsp;</div>\n\t\t\t<script type='text/javascript' src='javascript/tablist.js'></script>";
     return $result;
 }
function affichage_liste_bulletins_depliable($res)
{
    global $charset, $dbh;
    $resultat_aff = "";
    while ($tableau = pmb_mysql_fetch_array($res)) {
        $sql = "SELECT COUNT(1) FROM explnum WHERE explnum_bulletin='" . $tableau["bulletin_id"] . "'";
        $result = @pmb_mysql_query($sql, $dbh);
        $count = pmb_mysql_result($result, 0, 0);
        $titre = "";
        if ($count) {
            $titre .= '<img src="' . get_url_icon('attachment.png') . '">';
        }
        $titre .= $tableau['bulletin_numero'];
        if ($tableau['mention_date']) {
            $titre .= pmb_bidi(" (" . $tableau['mention_date'] . ")\n");
        } elseif ($tableau['date_date']) {
            $titre .= pmb_bidi(" (" . formatdate($tableau['date_date']) . ")\n");
        }
        if ($tableau['bulletin_titre']) {
            $titre .= pmb_bidi(" : " . htmlentities($tableau['bulletin_titre'], ENT_QUOTES, $charset) . "\n");
        }
        //	($id,$titre,$contenu,$maximise=0) {
        $resultat_aff .= gen_plus("bull_id_" . $tableau['bulletin_id'], $titre, get_bulletin_list_func($tableau['bulletin_id']));
    }
    print $resultat_aff;
}
Example #21
0
 function make_display()
 {
     $this->display = $this->tit1;
     if ($this->bulletin_numero) {
         $this->display .= '. ' . $this->bulletin_numero;
     }
     // affichage de la mention de date utile : mention_date si existe, sinon date_date
     if ($this->mention_date) {
         $date_affichee = " (" . $this->mention_date . ")";
     } else {
         if ($this->date_date) {
             $date_affichee = " [" . $this->aff_date_date . "]";
         } else {
             $date_affichee = "";
         }
     }
     $this->display .= $date_affichee;
     if ($this->bulletin_titre) {
         $this->display .= " : " . $this->bulletin_titre;
     }
     if ($this->bulletin_cb) {
         $this->display .= ". " . $this->bulletin_cb;
     }
     if ($this->bull_num_notice) {
         $m_display = new mono_display($this->bull_num_notice, 5);
         $this->display .= "<blockquote>" . gen_plus($m_display->notice_id, $m_display->header, $m_display->isbd) . "</blockquote>";
     }
 }
Example #22
0
 function gen_circ_form($cb = "")
 {
     global $charset, $serialcirc_circ_form, $serialcirc_circ_liste;
     global $serialcirc_circ_liste_alerter, $serialcirc_circ_liste_alerter_tr, $serialcirc_circ_liste_is_alerted_tr;
     global $serialcirc_circ_liste_circuler, $serialcirc_circ_liste_circuler_tr;
     global $serialcirc_circ_liste_circulation, $serialcirc_circ_liste_circulation_rotative_tr, $serialcirc_circ_liste_circulation_star_tr;
     global $serialcirc_circ_liste_retard, $serialcirc_circ_liste_retard_rotative_tr, $serialcirc_circ_liste_retard_star_tr;
     global $serialcirc_copy, $serialcirc_copy_tr, $serialcirc_copy_ok_tr;
     global $serialcirc_circ_liste_reservation, $serialcirc_circ_liste_reservation_tr;
     global $deflt_docs_location, $msg, $pmb_lecteurs_localises;
     $circ_form = $serialcirc_circ_form;
     $circ_form = str_replace("!!message!!", "", $circ_form);
     $circ_form .= $serialcirc_circ_liste;
     // select "localisation"
     if ($pmb_lecteurs_localises) {
         $circ_form = str_replace("!!localisation!!", gen_liste("select distinct idlocation, location_libelle from docs_location, docsloc_section where num_location=idlocation order by 2 ", "idlocation", "location_libelle", 'location_id', "document.forms['form_pointage'].submit();", $this->id_location, "", "", "", "", 0), $circ_form);
     } else {
         $circ_form = str_replace("!!localisation!!", "", $circ_form);
     }
     $liste_alerter = $tr_list = "";
     if ($nb_liste_alerter = count($this->classement['alert'])) {
         $liste_alerter = $serialcirc_circ_liste_alerter;
         foreach ($this->classement['alert'] as $expl_id) {
             if ($this->is_alerted($expl_id)) {
                 $tr = $serialcirc_circ_liste_is_alerted_tr;
             } else {
                 $tr = $serialcirc_circ_liste_alerter_tr;
             }
             $tr_list .= $this->build_expl_form($expl_id, $tr, "alert");
         }
         $liste_alerter = str_replace("!!liste_alerter!!", $tr_list, $liste_alerter);
     }
     $liste_circuler = $tr_list = "";
     if ($nb_liste_circuler = count($this->classement['to_be_circ'])) {
         $liste_circuler = $serialcirc_circ_liste_circuler;
         foreach ($this->classement['to_be_circ'] as $expl_id) {
             $tr = $serialcirc_circ_liste_circuler_tr;
             $tr_list .= $this->build_expl_form($expl_id, $tr, "to_be_circ");
         }
         $liste_circuler = str_replace("!!liste_circuler!!", $tr_list, $liste_circuler);
     }
     $liste_circulation = $tr_list = "";
     if ($nb_liste_circulation = count($this->classement['in_circ'])) {
         $liste_circulation = $serialcirc_circ_liste_circulation;
         foreach ($this->classement['in_circ'] as $expl_id) {
             if ($this->info_expl[$expl_id]['serialcirc_diff']->circ_type == SERIALCIRC_TYPE_rotative) {
                 $tr = $serialcirc_circ_liste_circulation_rotative_tr;
             } else {
                 $tr = $serialcirc_circ_liste_circulation_star_tr;
             }
             $tr_list .= $this->build_expl_form($expl_id, $tr, "in_circ");
         }
         $liste_circulation = str_replace("!!liste_circulation!!", $tr_list, $liste_circulation);
     }
     $liste_retard = $tr_list = "";
     if ($nb_liste_retard = count($this->classement['retard'])) {
         $liste_retard = $serialcirc_circ_liste_retard;
         foreach ($this->classement['retard'] as $expl_id) {
             if ($this->info_expl[$expl_id]['serialcirc_diff']->circ_type == SERIALCIRC_TYPE_rotative) {
                 $tr = $serialcirc_circ_liste_retard_rotative_tr;
             } else {
                 $tr = $serialcirc_circ_liste_retard_star_tr;
             }
             $tr_list .= $this->build_expl_form($expl_id, $tr, "in_late");
         }
         $liste_retard = str_replace("!!liste_retard!!", $tr_list, $liste_retard);
     }
     $liste_reproduction = $tr_list = "";
     if ($nb_liste_reproduction = count($this->info_copy)) {
         $liste_reproduction = $serialcirc_copy;
         foreach ($this->info_copy as $copy) {
             if ($copy['state'] == 1) {
                 $tr = $serialcirc_copy_ok_tr;
             } else {
                 $tr = $serialcirc_copy_tr;
             }
             $tr = str_replace("!!date!!", htmlentities(format_date($copy['date']), ENT_QUOTES, $charset), $tr);
             $tr = str_replace("!!periodique!!", "<a href='" . $copy['serial_link'] . "'>" . htmlentities($copy['perio'], ENT_QUOTES, $charset) . "</a>", $tr);
             $tr = str_replace("!!numero!!", "<a href='" . $copy['bull_link'] . "'>" . htmlentities($copy['numero'], ENT_QUOTES, $charset) . " " . $copy['mention_date'] . "</a>", $tr);
             $tr = str_replace("!!empr_name!!", "<a href='" . $copy['empr']['view_link'] . "'>" . htmlentities($copy['empr']['empr_libelle'], ENT_QUOTES, $charset) . "</a>", $tr);
             $tr = str_replace("!!empr_message!!", htmlentities($copy['comment'], ENT_QUOTES, $charset), $tr);
             $tpl = str_replace("!!zone!!", "copy", $tpl);
             $tr = str_replace("!!id_copy!!", $copy['id'], $tr);
             $tr_list .= $tr;
         }
         $liste_reproduction = str_replace("!!liste_reproduction!!", $tr_list, $liste_reproduction);
     }
     $liste_resa = $tr_list = "";
     if ($nb_liste_resa = count($this->info_resa)) {
         $liste_resa = $serialcirc_circ_liste_reservation;
         foreach ($this->info_resa as $resa) {
             $tr = $serialcirc_circ_liste_reservation_tr;
             $tr = str_replace("!!periodique!!", htmlentities($resa['perio'], ENT_QUOTES, $charset), $tr);
             $tr = str_replace("!!numero!!", htmlentities($resa['numero'], ENT_QUOTES, $charset) . " " . $resa['mention_date'], $tr);
             $tr = str_replace("!!empr_name!!", "<a href='" . $resa['empr']['view_link'] . "'>" . htmlentities($resa['empr']['empr_libelle'], ENT_QUOTES, $charset) . "</a>", $tr);
             $tpl = str_replace("!!zone!!", "resa", $tpl);
             $tr = str_replace("!!empr_id!!", $resa['id_empr'], $tr);
             $tr = str_replace("!!expl_id!!", $resa['id_expl'], $tr);
             $tr = str_replace("!!id_serialcirc_circ!!", $resa['id'], $tr);
             $tr_list .= $tr;
         }
         $liste_resa = str_replace("!!liste_resa!!", $tr_list, $liste_resa);
     }
     $liste_resa = str_replace("!!liste_resa!!", $liste_resa, $liste_resa);
     if ($nb_liste_alerter) {
         $circ_form = str_replace("!!liste_alerter!!", gen_plus("liste_alerter", $msg["serialcirc_circ_list_bull_alerter"] . " ({$nb_liste_alerter})", $liste_alerter), $circ_form);
     } else {
         $circ_form = str_replace("!!liste_alerter!!", "", $circ_form);
     }
     if ($nb_liste_circuler) {
         $circ_form = str_replace("!!liste_circuler!!", gen_plus("liste_circuler", $msg["serialcirc_circ_list_bull_circuler"] . " ({$nb_liste_circuler})", $liste_circuler), $circ_form);
     } else {
         $circ_form = str_replace("!!liste_circuler!!", "", $circ_form);
     }
     if ($nb_liste_circulation) {
         $circ_form = str_replace("!!liste_circulation!!", gen_plus("liste_circulation", $msg["serialcirc_circ_list_bull_circulation"] . " ({$nb_liste_circulation})", $liste_circulation), $circ_form);
     } else {
         $circ_form = str_replace("!!liste_circulation!!", "", $circ_form);
     }
     if ($nb_liste_retard) {
         $circ_form = str_replace("!!liste_retard!!", gen_plus("liste_retard", $msg["serialcirc_circ_list_bull_retards"] . " ({$nb_liste_retard})", $liste_retard), $circ_form);
     } else {
         $circ_form = str_replace("!!liste_retard!!", "", $circ_form);
     }
     if ($nb_liste_reproduction) {
         $circ_form = str_replace("!!liste_reproduction!!", gen_plus("liste_reproduction", $msg["serialcirc_circ_list_bull_reproduction"] . " ({$nb_liste_reproduction})", $liste_reproduction), $circ_form);
     } else {
         $circ_form = str_replace("!!liste_reproduction!!", "", $circ_form);
     }
     if ($nb_liste_resa) {
         $circ_form = str_replace("!!liste_resa!!", gen_plus("liste_resa", $msg["serialcirc_circ_list_bull_reservation"] . " ({$nb_liste_resa})", $liste_resa), $circ_form);
     } else {
         $circ_form = str_replace("!!liste_resa!!", "", $circ_form);
     }
     return $circ_form;
 }
 public function get_form()
 {
     if (!isset($this->parameters["advanced_parameters"])) {
         $this->parameters["advanced_parameters"] = $this->default_advanced_parameters;
     }
     if (!isset($this->parameters["no_image"])) {
         $this->parameters["no_image"] = "no_image_carousel.jpg";
     }
     //valeur par défaut des paramètres généraux
     if (!isset($this->parameters["mode"])) {
         $this->parameters["mode"] = "horizontal";
     }
     if (!isset($this->parameters["speed"])) {
         $this->parameters["speed"] = 500;
     }
     if (!isset($this->parameters["pause"])) {
         $this->parameters["pause"] = 4000;
     }
     if (!isset($this->parameters["pager"])) {
         $this->parameters["pager"] = true;
     }
     if (!isset($this->parameters["autostart"])) {
         $this->parameters["autostart"] = true;
     }
     if (!isset($this->parameters["autotransition"])) {
         $this->parameters["autotransition"] = true;
     }
     if (!isset($this->parameters["autohover"])) {
         $this->parameters["autohover"] = true;
     }
     if (!isset($this->parameters["display_min_quantity"])) {
         $this->parameters["display_min_quantity"] = 2;
     }
     if (!isset($this->parameters["display_max_quantity"])) {
         $this->parameters["display_max_quantity"] = 3;
     }
     if (!isset($this->parameters["slide_quantity"])) {
         $this->parameters["slide_quantity"] = 0;
     }
     if (!isset($this->parameters["slide_width"])) {
         $this->parameters["slide_width"] = 90;
     }
     //valeur par défaut des paramètres avancés
     if (!isset($this->parameters["slide_margin"])) {
         $this->parameters["slide_margin"] = 0;
     }
     if (!isset($this->parameters["random_start"])) {
         $this->parameters["random_start"] = false;
     }
     if (!isset($this->parameters["easing"])) {
         $this->parameters["easing"] = null;
     }
     if (!isset($this->parameters["captions"])) {
         $this->parameters["captions"] = false;
     }
     if (!isset($this->parameters["adaptive_height"])) {
         $this->parameters["adaptive_height"] = false;
     }
     if (!isset($this->parameters["adaptive_height_speed"])) {
         $this->parameters["adaptive_height_speed"] = "500";
     }
     if (!isset($this->parameters["pager_type"])) {
         $this->parameters["pager_type"] = "full";
     }
     if (!isset($this->parameters["pager_short_separator"])) {
         $this->parameters["pager_short_separator"] = "/";
     }
     if (!isset($this->parameters["controls"])) {
         $this->parameters["controls"] = true;
     }
     if (!isset($this->parameters["next_text"])) {
         $this->parameters["next_text"] = "Suivant";
     }
     if (!isset($this->parameters["previous_text"])) {
         $this->parameters["previous_text"] = "Précédent";
     }
     if (!isset($this->parameters["auto_controls"])) {
         $this->parameters["auto_controls"] = false;
     }
     if (!isset($this->parameters["start_text"])) {
         $this->parameters["start_text"] = "Jouer";
     }
     if (!isset($this->parameters["stop_text"])) {
         $this->parameters["stop_text"] = "Stop";
     }
     if (!isset($this->parameters["autocontrols_combine"])) {
         $this->parameters["autocontrols_combine"] = false;
     }
     if (!isset($this->parameters["auto_direction"])) {
         $this->parameters["auto_direction"] = "next";
     }
     if (!isset($this->parameters["auto_delay"])) {
         $this->parameters["auto_delay"] = 0;
     }
     $general_form = "\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_mode'>" . $this->format_text($this->msg['cms_module_common_view_carousel_mode']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<select name='cms_module_common_view_carousel_mode'>\n\t\t\t\t\t\t\t<option value='horizontal' " . ($this->parameters['mode'] == "horizontal" ? "selected='selected'" : "") . ">" . $this->format_text($this->msg['cms_module_common_view_carousel_mode_horizontal']) . "</option>\n\t\t\t\t\t\t\t<option value='vertical' " . ($this->parameters['mode'] == "vertical" ? "selected='selected'" : "") . ">" . $this->format_text($this->msg['cms_module_common_view_carousel_mode_vertical']) . "</option>\n\t\t\t\t\t\t\t<option value='fade' " . ($this->parameters['mode'] == "fade" ? "selected='selected'" : "") . ">" . $this->format_text($this->msg['cms_module_common_view_carousel_mode_fade']) . "</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_speed'>" . $this->format_text($this->msg['cms_module_common_view_carousel_speed']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_speed' value='" . $this->format_text($this->parameters['speed']) . "'/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_pause'>" . $this->format_text($this->msg['cms_module_common_view_carousel_pause']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_pause' value='" . $this->format_text($this->parameters['pause']) . "'/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_display_max_quantity'>" . $this->format_text($this->msg['cms_module_common_view_carousel_display_max_quantity']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_display_max_quantity' value='" . $this->format_text($this->parameters['display_max_quantity']) . "'/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_display_min_quantity'>" . $this->format_text($this->msg['cms_module_common_view_carousel_display_min_quantity']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_display_min_quantity' value='" . $this->format_text($this->parameters['display_min_quantity']) . "'/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_slide_quantity'>" . $this->format_text($this->msg['cms_module_common_view_carousel_slide_quantity']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_slide_quantity' value='" . $this->format_text($this->parameters['slide_quantity']) . "'/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\t\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_slide_width'>" . $this->format_text($this->msg['cms_module_common_view_carousel_slide_width']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_slide_width' value='" . $this->format_text($this->parameters['slide_width']) . "'/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_autostart'>" . $this->format_text($this->msg['cms_module_common_view_carousel_autostart']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='radio' name='cms_module_common_view_carousel_autostart' value='1' " . ($this->parameters['autostart'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_yes']) . "\n\t\t\t\t  &nbsp;<input type='radio' name='cms_module_common_view_carousel_autostart' value='0' " . (!$this->parameters['autostart'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_no']) . "\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_autotransition'>" . $this->format_text($this->msg['cms_module_common_view_carousel_autotransition']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='radio' name='cms_module_common_view_carousel_autotransition' value='1' " . ($this->parameters['autotransition'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_yes']) . "\n\t\t\t\t  &nbsp;<input type='radio' name='cms_module_common_view_carousel_autotransition' value='0' " . (!$this->parameters['autotransition'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_no']) . "\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_autohover'>" . $this->format_text($this->msg['cms_module_common_view_carousel_autohover']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='radio' name='cms_module_common_view_carousel_autohover' value='1' " . ($this->parameters['autohover'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_yes']) . "\n\t\t\t\t  &nbsp;<input type='radio' name='cms_module_common_view_carousel_autohover' value='0' " . (!$this->parameters['autohover'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_no']) . "\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_pager'>" . $this->format_text($this->msg['cms_module_common_view_carousel_pager']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='radio' name='cms_module_common_view_carousel_pager' value='1' " . ($this->parameters['pager'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_yes']) . "\n\t\t\t\t  &nbsp;<input type='radio' name='cms_module_common_view_carousel_pager' value='0' " . (!$this->parameters['pager'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_no']) . "\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_no_image'>" . $this->format_text($this->msg['cms_module_common_view_carousel_no_image']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_no_image' value='" . $this->format_text($this->parameters['no_image']) . "'/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>";
     $advanced_parameters = "\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_slide_margin'>" . $this->format_text($this->msg['cms_module_common_view_carousel_slide_margin']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_slide_margin' value='" . $this->format_text($this->parameters['slide_margin']) . "'/>\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_random_start'>" . $this->format_text($this->msg['cms_module_common_view_carousel_random_start']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='radio' name='cms_module_common_view_carousel_random_start' value='1' " . ($this->parameters['random_start'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_yes']) . "\n\t\t\t\t  &nbsp;<input type='radio' name='cms_module_common_view_carousel_random_start' value='0' " . (!$this->parameters['random_start'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_no']) . "\n\t\t\t\t\t</div>\n \t\t\t\t</div>\t\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_auto_delay'>" . $this->format_text($this->msg['cms_module_common_view_carousel_auto_delay']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_auto_delay' value='" . $this->format_text($this->parameters['auto_delay']) . "'/>\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_auto_direction'>" . $this->format_text($this->msg['cms_module_common_view_carousel_auto_direction']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<select name='cms_module_common_view_carousel_auto_direction'>\n\t\t\t\t\t\t\t\t<option value='next' " . ($this->parameters['auto_direction'] == "next" ? "selected='selected'" : "") . ">" . $this->format_text($this->msg['cms_module_common_view_carousel_auto_direction_next']) . "</option>\n\t\t\t\t\t\t\t\t<option value='prev' " . ($this->parameters['auto_direction'] == "prev" ? "selected='selected'" : "") . ">" . $this->format_text($this->msg['cms_module_common_view_carousel_auto_direction_prev']) . "</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_easing'>" . $this->format_text($this->msg['cms_module_common_view_carousel_easing']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<select name='cms_module_common_view_carousel_easing'>\n\t\t\t\t\t\t\t\t<option value='linear' " . ($this->parameters['easing'] == "linear" ? "selected='selected'" : "") . ">" . $this->format_text($this->msg['cms_module_common_view_carousel_easing_linear']) . "</option>\n\t\t\t\t\t\t\t\t<option value='ease' " . ($this->parameters['easing'] == "ease" ? "selected='selected'" : "") . ">" . $this->format_text($this->msg['cms_module_common_view_carousel_easing_ease']) . "</option>\n\t\t\t\t\t\t\t\t<option value='ease-in' " . ($this->parameters['easing'] == "ease-in" ? "selected='selected'" : "") . ">" . $this->format_text($this->msg['cms_module_common_view_carousel_easing_ease_in']) . "</option>\n\t\t\t\t\t\t\t\t<option value='ease-out' " . ($this->parameters['easing'] == "ease-out" ? "selected='selected'" : "") . ">" . $this->format_text($this->msg['cms_module_common_view_carousel_easing_ease_out']) . "</option>\n\t\t\t\t\t\t\t\t<option value='ease-in-out' " . ($this->parameters['easing'] == "ease-in-out" ? "selected='selected'" : "") . ">" . $this->format_text($this->msg['cms_module_common_view_carousel_easing_ease_in_out']) . "</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_captions'>" . $this->format_text($this->msg['cms_module_common_view_carousel_captions']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='radio' name='cms_module_common_view_carousel_captions' value='1' " . ($this->parameters['captions'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_yes']) . "\n\t\t\t\t  &nbsp;<input type='radio' name='cms_module_common_view_carousel_captions' value='0' " . (!$this->parameters['captions'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_no']) . "\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_adaptive_height'>" . $this->format_text($this->msg['cms_module_common_view_carousel_adaptive_height']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='radio' name='cms_module_common_view_carousel_adaptive_height' value='1' " . ($this->parameters['adaptive_height'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_yes']) . "\n\t\t\t\t  &nbsp;<input type='radio' name='cms_module_common_view_carousel_adaptive_height' value='0' " . (!$this->parameters['adaptive_height'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_no']) . "\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_adaptive_height_speed'>" . $this->format_text($this->msg['cms_module_common_view_carousel_adaptive_height_speed']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_adaptive_height_speed' value='" . $this->format_text($this->parameters['adaptive_height_speed']) . "'/>\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_page_type'>" . $this->format_text($this->msg['cms_module_common_view_carousel_page_type']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<select name='cms_module_common_view_carousel_page_type'>\n\t\t\t\t\t\t\t\t<option value='full' " . ($this->parameters['page_type'] == "full" ? "selected='selected'" : "") . ">" . $this->format_text($this->msg['cms_module_common_view_carousel_page_type_full']) . "</option>\n\t\t\t\t\t\t\t\t<option value='short' " . ($this->parameters['page_type'] == "short" ? "selected='selected'" : "") . ">" . $this->format_text($this->msg['cms_module_common_view_carousel_page_type_short']) . "</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_pager_short_separator'>" . $this->format_text($this->msg['cms_module_common_view_carousel_pager_short_separator']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_pager_short_separator' value='" . $this->format_text($this->parameters['pager_short_separator']) . "'/>\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_controls'>" . $this->format_text($this->msg['cms_module_common_view_carousel_controls']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='radio' name='cms_module_common_view_carousel_controls' value='1' " . ($this->parameters['controls'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_yes']) . "\n\t\t\t\t  &nbsp;<input type='radio' name='cms_module_common_view_carousel_controls' value='0' " . (!$this->parameters['controls'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_no']) . "\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_next_text'>" . $this->format_text($this->msg['cms_module_common_view_carousel_next_text']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_next_text' value='" . $this->format_text($this->parameters['next_text']) . "'/>\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_previous_text'>" . $this->format_text($this->msg['cms_module_common_view_carousel_previous_text']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_previous_text' value='" . $this->format_text($this->parameters['previous_text']) . "'/>\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_auto_controls'>" . $this->format_text($this->msg['cms_module_common_view_carousel_auto_controls']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='radio' name='cms_module_common_view_carousel_auto_controls' value='1' " . ($this->parameters['auto_controls'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_yes']) . "\n\t\t\t\t  &nbsp;<input type='radio' name='cms_module_common_view_carousel_auto_controls' value='0' " . (!$this->parameters['auto_controls'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_no']) . "\n\t\t\t\t\t</div>\n \t\t\t\t</div>\t\t\t\t\t\t\t\t\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_start_text'>" . $this->format_text($this->msg['cms_module_common_view_carousel_start_text']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_start_text' value='" . $this->format_text($this->parameters['start_text']) . "'/>\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_stop_text'>" . $this->format_text($this->msg['cms_module_common_view_carousel_stop_text']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='text' name='cms_module_common_view_carousel_stop_text' value='" . $this->format_text($this->parameters['stop_text']) . "'/>\n\t\t\t\t\t</div>\n \t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_carousel_auto_controls_combine'>" . $this->format_text($this->msg['cms_module_common_view_carousel_auto_controls_combine']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t<input type='radio' name='cms_module_common_view_carousel_auto_controls_combine' value='1' " . ($this->parameters['auto_controls_combine'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_yes']) . "\n\t\t\t\t  &nbsp;<input type='radio' name='cms_module_common_view_carousel_auto_controls_combine' value='0' " . (!$this->parameters['auto_controls_combine'] ? "checked='checked'" : "") . "/>&nbsp;" . $this->format_text($this->msg['cms_module_common_view_carousel_no']) . "\n\t\t\t\t\t</div>\n \t\t\t\t</div>";
     $form .= gen_plus("general_parameters", $this->format_text($this->msg['cms_module_common_view_carousel_general_parameters']), $general_form, true);
     $form .= gen_plus("advanced_parameters", $this->format_text($this->msg['cms_module_common_view_carousel_advanced_parameters']), $advanced_parameters);
     $form .= parent::get_form() . "\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t\t<label for='cms_module_common_view_django_template_record_content'>" . $this->format_text($this->msg['cms_module_common_view_django_template_record_content']) . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t\t" . notice_tpl::gen_tpl_select("cms_module_common_view_django_template_record_content", $this->parameters['used_template']) . "\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t";
     return $form;
 }
Example #24
0
 function show_form($link = "./edit.php")
 {
     global $msg;
     global $notice_tpl_form, $notice_tpl_form_code;
     global $charset;
     $form = $notice_tpl_form;
     $action = $link . "?categ=tpl&sub=notice&action=update&id=!!id!!";
     if ($this->id) {
         $libelle = $msg["notice_tpl_modifier"];
         $button_delete = "<input type='button' class='bouton' value='" . $msg[63] . "' onClick=\"confirm_delete();\">";
         $action_delete = $link . "?categ=tpl&sub=notice&action=delete&id=!!id!!";
         $button_duplicate = "<input type='button' class='bouton' value='" . $msg["edit_tpl_duplicate_button"] . "' onClick=\"document.location='./edit.php?categ=tpl&sub=notice&action=duplicate&id=" . $this->id . "';\" />";
         if ($this->show_opac) {
             $show_opac = " checked='checked' ";
         } else {
             $show_opac = "";
         }
     } else {
         $libelle = $msg["notice_tpl_ajouter"];
         $button_delete = "";
         $button_duplicate = "";
         $action_delete = "";
     }
     foreach ($this->code as $id_location => $tab_typenotice) {
         $form_typenotice_all = '';
         foreach ($tab_typenotice as $typenotice => $tab_typedoc) {
             $form_code_typedoc = '';
             foreach ($tab_typedoc as $typedoc => $code) {
                 $form_code_temp = str_replace("!!loc!!", $id_location, $notice_tpl_form_code);
                 $form_code_temp = str_replace("!!typenotice!!", $typenotice, $form_code_temp);
                 $form_code_temp = str_replace("!!typedoc!!", $typedoc, $form_code_temp);
                 $form_code_temp = str_replace("!!code!!", htmlentities($code, ENT_QUOTES, $charset), $form_code_temp);
                 $form_code_typedoc .= gen_plus("plus_typedoc" . $id_location . "_" . $typenotice . "_" . $typedoc, $this->type_doc_label["{$typedoc}"], $form_code_temp);
                 if ($code != "") {
                     $form_code_typedoc .= "<script type='text/javascript'>\n\t\t\t\t\t\t\tdocument.getElementById('plus_typedoc" . $id_location . "_" . $typenotice . "_" . $typedoc . "Child').setAttribute('style','margin-bottom:6px; display:block;width:94%');\n\t\t\t\t\t\t\tif (document.getElementById('plus_typedoc" . $id_location . "_" . $typenotice . "_" . $typedoc . "Child').parentNode) {\n\t\t\t\t\t\t\t\tdocument.getElementById('plus_typedoc" . $id_location . "_" . $typenotice . "_" . $typedoc . "Child').parentNode.setAttribute('style','margin-bottom:6px; display:block;width:94%');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</script>";
                 }
             }
             $form_typenotice_all .= gen_plus("plus_typenotice" . $id_location . "_" . $typenotice . "_", $this->type_notice["{$typenotice}"], $form_code_typedoc);
         }
         $form_code .= gen_plus("plus_location" . $id_location, $this->location_label[$id_location], $form_typenotice_all);
     }
     $form = str_replace("!!libelle!!", $libelle, $form);
     $form = str_replace("!!name!!", htmlentities($this->name, ENT_QUOTES, $charset), $form);
     $form = str_replace("!!comment!!", htmlentities($this->comment, ENT_QUOTES, $charset), $form);
     $form = str_replace("!!id_test!!", htmlentities($this->id_test, ENT_QUOTES, $charset), $form);
     $form = str_replace("!!show_opac!!", $show_opac, $form);
     $form = str_replace("!!code_part!!", $form_code, $form);
     $form = str_replace("!!action!!", $action, $form);
     $form = str_replace("!!duplicate!!", $button_duplicate, $form);
     $form = str_replace("!!delete!!", $button_delete, $form);
     $form = str_replace("!!action_delete!!", $action_delete, $form);
     $form = str_replace("!!id!!", $this->id, $form);
     return $form;
 }
Example #25
0
 public function get_display()
 {
     global $msg, $base_path;
     $simple_circ_form_tpl = "\n\t\t<script>\n\t\t</script>\n\t\t<form class='form-{$current_module}' id='simple_circ_form' name='simple_circ_form' method='post' action=''>\n\t\t\t<h3>" . $msg["serial_simple_circ_edit_title"] . "</h3>\n\t\t\t<div class='form-contenu'>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<label class='etiquette' for='start_date'>" . $msg["serial_simple_circ_edit_start_date"] . "</label>\n\t\t\t\t\t<input type='hidden' name='start_date' id='start_date' value='!!start_date!!' />\n\t\t\t\t\t<input type='button' class='button' id='form_start_date' name='form_start_date' \n\t\t\t\t\tonclick='openPopUp(\"{$base_path}/select.php?what=calendrier&caller=\"+this.form.name+\"&date_caller=!!day!!&param1=start_date&param2=form_start_date&auto_submit=NO&date_anterieure=YES\", \"" . $msg["serial_simple_circ_edit_start_date"] . "\", 250, 300, -2, -2, \"toolbar=no, dependent=yes, resizable=yes\")' value='!!form_start_date!!'/>\n\n\t\t\t\t\t<label class='etiquette' for='end_date'>" . $msg["serial_simple_circ_edit_end_date"] . "</label>\n\t\t\t\t\t<input type='hidden' name='end_date' id='end_date' value='!!end_date!!' />\n\t\t\t\t\t<input type='button' class='button' id='form_end_date' name='form_end_date' \n\t\t\t\t\tonclick='openPopUp(\"{$base_path}/select.php?what=calendrier&caller=\"+this.form.name+\"&date_caller=!!day!!&param1=end_date&param2=form_end_date&auto_submit=NO&date_anterieure=YES\", \"" . $msg["serial_simple_circ_edit_end_date"] . "\", 250, 300, -2, -2, \"toolbar=no, dependent=yes, resizable=yes\")' value='!!form_end_date!!'/>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<input type='button' value='" . $msg["serial_simple_circ_edit_calculate"] . "' class='bouton' onclick=\"this.form.setAttribute('action','');this.form.submit();\"   />\t\t\n\t\t\t\t</div>\t\t\t\t\n\t\t\t\t!!contents_to_print!!\n\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t" . gen_plus("circ_edit_format", $msg["serial_simple_circ_edit_format"], aff_choix_quoi_impr_cote()) . "\n\t\t\t\t</div>\t\t\t\n\t\t\t</div>\t\n\t\t\t<div class='row'>\n\t\t\t\t<div class='left'>\n\t\t\t\t\t<input type='button' value='" . $msg["serial_simple_circ_edit_print"] . "' class='bouton' onclick=\"this.form.setAttribute('action','./edit/serials_simple_circ_suite.php');this.form.submit();\" />\t\t\n\t\t\t\t</div>\n\t\t\t\t<div class='right'>\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class='row'></div>\n\t\t</form>\n\t\t\t\t\t\t\n\t\t<script>\n\t\t\tfunction add_cb(){\n\t\t\t\tvar circ_cb=document.getElementById('circ_cb').value;\n\t\t\t\tif(circ_cb=='')return;\n\t\t\t\tvar url= './edit/serials_simple_circ_suite.php?action=add_circ_cb&circ_cb=' + circ_cb;\n\t\t\t\t\n\t\t\t\tvar req = new http_request();\t\n\t\t\t\tif(req.request(url,1)){\n\t\t\t\t\talert ( req.get_text() );\t\t\t\n\t\t\t\t} else { \n\t\t\t\t\tdata=req.get_text();\n\t\t\t\t}\n\t\t\t\tif(!data.length){\n\t\t\t\t\talert('" . $msg["serial_simple_circ_edit_print_error"] . "');\t\t\t\t\t\n    \t\t\t\tdocument.getElementById('circ_cb').value='';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar data = JSON.parse(data);\n\t\t\t\t\n\t\t\t\tdata=data[0];\n\t\t\t\n\t\t\t\tvar elmt=document.getElementById('cb_list');\n\t\t\t\tvar tr = document.createElement('tr');\n    \t\t\telmt.appendChild(tr);\n     \n    \t\t\tvar td = document.createElement('td');\n    \t\t\ttr.appendChild(td);\n    \t\t\tvar tdText = document.createTextNode(data.tit1);\n    \t\t\ttd.appendChild(tdText);\n    \t\t\t\n    \t\t\tvar td = document.createElement('td');\n    \t\t\ttr.appendChild(td);\n    \t\t\tvar tdText = document.createTextNode(data.abt_name);\n    \t\t\ttd.appendChild(tdText);\n    \t\t\t\n    \t\t\tvar td = document.createElement('td');\n    \t\t\ttr.appendChild(td);\n    \t\t\tvar newButton = document.createElement('input');\n\t\t\t\tnewButton.setAttribute('type','button');\t\t\t\t\n\t        \tnewButton.className='bouton';\n\t\t\t\tnewButton.setAttribute('value','X');\t\t\t\t\n\t        \tnewButton.onclick= function (){raz_line(this);};\n    \t\t\ttd.appendChild(newButton);\n    \t\t\t\n\t\t\t\tvar input = document.createElement('input');\n\t\t\t\tinput.setAttribute('type','hidden');\n\t\t\t\tinput.setAttribute('name','abt_cb[]');\n\t\t\t\tinput.setAttribute('value',circ_cb);\t\t\n    \t\t\ttd.appendChild(input);\n    \t\t\tdocument.getElementById('circ_cb').value='';\n    \t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tfunction raz_all(){\t\t\t\t\n\t\t\t\tvar elmt = document.getElementById('cb_list');\n\t\t\t\tvar all_tr = elmt.getElementsByTagName('tr'); \n\t\t\t\tvar nb=all_tr.length;\n\t\t\t\tfor(var i=0;i<nb;i++){\n\t\t\t\t\tif(i){\t\t\t\t\t\n\t\t\t\t\t\telmt.removeChild(all_tr[nb-i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfunction raz_line(e){\n\t\t\t\tvar elmt = document.getElementById('cb_list');\n\t\t\t\tvar td=e.parentNode;\n\t\t\t\telmt.removeChild(td.parentNode);\n\t\t\t}\n\t\t\t\n\t\t\tfunction testForEnter(event){    \n\t\t\t\tif (event.keyCode == 13){        \n\t\t\t\t\tevent.cancelBubble = true;\n\t\t\t\t\tevent.returnValue = false;\n\t\t\t\t\tadd_cb();\n\t\t\t\t\treturn false;\n\t\t\t    }\n\t\t\t}\n\t\t\t \n\t\t</script>\t\n\t\t<form class='form-{$current_module}' id='simple_circ_form_list' name='simple_circ_form_list' method='post' action=''>\n\t\t\t<h3>" . $msg["serial_simple_circ_edit_list_title"] . "</h3>\n\t\t\t<div class='form-contenu'>\n\t\t\t\t<div class='row'>\t\t\t\t\t\n\t\t\t\t\t<label class='etiquette' for='circ_cb'>" . $msg["serial_simple_circ_edit_cb"] . "</label>\t\n\t\t\t\t</div>\t\n\t\t\t\t<div class='row'>\t\n\t\t\t\t\t<input type='text' id='circ_cb' name='circ_cb' value='' onkeydown=\"return testForEnter(event);\" />\t\t\t\n\t\t\t\t\t<input type='button' value='" . $msg["serial_simple_circ_edit_list_add"] . "' class='bouton' onclick=\"add_cb();\" />\t\t\t\t\n\t\t\t\t</div>\t\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<table class='sortable' width='100%' id='cb_list'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>" . $msg["serial_simple_circ_edit_list_table_perio"] . "</th>\n\t\t\t\t\t\t\t<th>" . $msg["serial_simple_circ_edit_list_table_abt"] . "</th>\n\t\t\t\t\t\t\t<th></th>\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t</tr>\t\t\n\t\t\t\t\t</table>\n\t\t\t\t</div>\t\n\t\t\t</div>\t\n\t\t\t<div class='row'>\n\t\t\t\t<div class='left'>\n\t\t\t\t\t<input type='button' value='" . $msg["serial_simple_circ_edit_print"] . "' class='bouton' onclick=\"this.form.setAttribute('action','./edit/serials_simple_circ_suite.php?action=print_list');this.form.submit();\" />\t\t\t\n\t\t\t\t</div>\n\t\t\t\t<div class='right'>\t\n\t\t\t\t\t<input type='button' value='" . $msg["serial_simple_circ_edit_raz"] . "' class='bouton' onclick=\"raz_all();document.getElementById('circ_cb').focus();\" />\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class='row'></div>\n\t\t</form>\t\t\t\t\t\t\t\n\t\t";
     $simple_circ_day_tpl = "\n\t\t\t<h3>!!date_sortie!!</h3>\n\t\t\t<div class='row'>\n\t\t\t\t!!abt_list!!\n\t\t\t</div>";
     $simple_circ_abt_tpl = "\n\t\t\t<div class='row'>\t\t\t\t\n\t\t\t\t<label class='etiquette'>!!tit1!!</label><br />\n\t\t\t\t<label class='etiquette'>!!abt_name!!</label>\n\t\t\t\t!!diff_list!!\n\t\t\t</div>";
     $simple_circ_diff_group_tpl = "\n\t\t\t<br />!!name!!<br />\n\t\t\t";
     $display = "";
     $display_day_list = "";
     /* plus demandé ...
     		foreach ($this->data_tri_day as $date_sortie => $index_list){
     			$day_tpl=$simple_circ_day_tpl;
     			$day_tpl=str_replace("!!date_sortie!!", formatDate($date_sortie), $day_tpl);
     			$display_abt_list="";
     			foreach ($index_list as $index){
     				$abt=$this->data[$index];
     				//printr($abt);
     				$abt_tpl=$simple_circ_abt_tpl;
     				$abt_tpl=str_replace("!!tit1!!", $abt["tit1"], $abt_tpl);
     				$abt_tpl=str_replace("!!abt_name!!", $abt["abt_name"], $abt_tpl);
     				$abt_tpl=str_replace("!!date_sortie!!", formatDate($date_sortie), $abt_tpl);
     				$display_diff_list="";
     				foreach($abt["diff"] as $diff){
     					if($diff["is_group"]){
     						$diff_group_tpl=$simple_circ_diff_group_tpl;
     						$diff_group_tpl=str_replace("!!name!!", $diff["group_name"], $diff_group_tpl);
     						
     						$display_diff_list.=$diff_group_tpl;
     					}else{
     						
     					}	
     					
     				}
     				$abt_tpl=str_replace("!!diff_list!!", $display_diff_list, $abt_tpl);
     				$display_abt_list.=$abt_tpl;
     			}
     			$day_tpl=str_replace("!!abt_list!!", $display_abt_list, $day_tpl);
     
     			$display_day_list.=$day_tpl;
     		}
     		*/
     $display_day_list = "<label class='etiquette'>" . $msg["serial_simple_circ_number"] . " " . count($this->data) . "</label>";
     $form_tpl = $simple_circ_form_tpl;
     $form_tpl = str_replace("!!contents_to_print!!", $display_day_list, $form_tpl);
     $form_tpl = str_replace("!!day!!", date("Ymd"), $form_tpl);
     $form_tpl = str_replace("!!start_date!!", $this->start_date, $form_tpl);
     $form_tpl = str_replace("!!form_start_date!!", formatDate($this->start_date), $form_tpl);
     $form_tpl = str_replace("!!end_date!!", $this->end_date, $form_tpl);
     $form_tpl = str_replace("!!form_end_date!!", formatDate($this->end_date), $form_tpl);
     $display .= $form_tpl;
     return $display;
 }
Example #26
0
function show_procs($dbh)
{
    global $msg, $javascript_path, $pmb_procedure_server_address, $pmb_procedure_server_credentials, $charset;
    print "\n\t\t<script type=\"text/javascript\" src=\"" . $javascript_path . "/tablist.js\"></script>\n\t\t<a href=\"javascript:expandAll()\"><img src='./images/expand_all.gif' border='0' id=\"expandall\"></a>\n\t\t<a href=\"javascript:collapseAll()\"><img src='./images/collapse_all.gif' border='0' id=\"collapseall\"></a>\n\t\t";
    // affichage du tableau des procédures
    $requete = "SELECT idproc, name, requete, comment, libproc_classement, num_classement FROM procs left join procs_classements on idproc_classement=num_classement ORDER BY libproc_classement,name ";
    $res = mysql_query($requete, $dbh);
    $nbr = mysql_num_rows($res);
    $class_prec = $msg[proc_clas_aucun];
    $buf_tit = "";
    $buf_class = 0;
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = mysql_fetch_row($res);
        $classement = $row[4];
        if ($class_prec != $classement) {
            if (!$row[4]) {
                $row[4] = $msg[proc_clas_aucun];
            }
            if ($buf_tit) {
                $buf_contenu = "<table><tr><th colspan=4>" . $buf_tit . "</th></tr>" . $buf_contenu . "</table>";
                print gen_plus("procclass" . $buf_class, $buf_tit, $buf_contenu);
                $buf_contenu = "";
            }
            $buf_tit = $row[4];
            $buf_class = $row[5];
            $class_prec = $classement;
        }
        if ($parity % 2) {
            $pair_impair = "even";
        } else {
            $pair_impair = "odd";
        }
        $parity += 1;
        $action = "onmousedown=\"document.location='./admin.php?categ=proc&sub=proc&action=modif&id={$row['0']}';\"";
        $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\"  ";
        $buf_contenu .= "\n<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'>\n\t\t\t\t<td width='10'>\n\t\t\t\t\t<input class='bouton' type='button' value=' {$msg['708']} ' onClick=\"document.location='./admin.php?categ=proc&sub=proc&action=execute&id={$row['0']}'\" />\n\t\t\t\t\t</td>\n\t\t\t\t<td {$action}>\n\t\t\t\t\t<strong>{$row['1']}</strong><br />\n\t\t\t\t\t<small>{$row['3']}&nbsp;</small>\n\t\t\t\t\t</td>";
        if (preg_match_all("|!!(.*)!!|U", $row[2], $query_parameters)) {
            $buf_contenu .= "<td>\n\t\t\t\t\t\t\t\t<a href='admin.php?categ=proc&sub=proc&action=configure&id_query=" . $row[0] . "'>" . $msg["procs_options_config_param"] . "</a>";
        } else {
            $buf_contenu .= "<td {$action}>";
        }
        $buf_contenu .= "</td>";
        $buf_contenu .= "<td><input class='bouton' type='button' value=\"" . $msg[procs_bt_export] . "\" onClick=\"document.location='./export.php?quoi=procs&sub=actionsperso&id={$row['0']}'\" /></td>\n\t\t\t\t\t</tr>";
    }
    $buf_contenu = "<table><tr><th colspan=4>" . $buf_tit . "</th></tr>" . $buf_contenu . "</table>";
    print gen_plus("procclass" . $buf_class, $buf_tit, $buf_contenu);
    //
    //Procédures Externes
    //
    $pmb_procedure_server_credentials_exploded = explode("\n", $pmb_procedure_server_credentials);
    if ($pmb_procedure_server_address && count($pmb_procedure_server_credentials_exploded) == 2) {
        $aremote_procedure_client = new remote_procedure_client($pmb_procedure_server_address, trim($pmb_procedure_server_credentials_exploded[0]), trim($pmb_procedure_server_credentials_exploded[1]));
        $procedures = $aremote_procedure_client->get_procs("AP");
        if ($procedures) {
            if ($procedures->error_information->error_code) {
                $buf_contenu = $msg['remote_procedures_error_server'] . ":<br><i>" . $procedures->error_information->error_string . "</i>";
                print gen_plus("procclass_remote", $msg["remote_procedures"], $buf_contenu);
            } else {
                if (isset($procedures->elements)) {
                    $buf_contenu = "";
                    $current_set = "";
                    foreach ($procedures->elements as $aprocedure) {
                        if ($aprocedure->current_attached_set != $current_set) {
                            $parity = 0;
                            $current_set = $aprocedure->current_attached_set;
                            $buf_contenu .= '<tr><th colspan=4>' . htmlentities($current_set, ENT_QUOTES, $charset) . '</th>';
                        }
                        if ($parity % 2) {
                            $pair_impair = "even";
                        } else {
                            $pair_impair = "odd";
                        }
                        $parity += 1;
                        $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
                        $buf_contenu .= "\n<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'>\n\t\t\t\t\t\t\t<td width='10'>\n\t\t\t\t\t\t\t\t<input class='bouton' type='button' value=' {$msg['708']} ' onClick=\"document.location='./admin.php?categ=proc&sub=proc&action=execute_remote&id={$aprocedure->id}'\" />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td onmousedown=\"document.location='./admin.php?categ=proc&sub=proc&action=view_remote&id={$aprocedure->id}';\">\n\t\t\t\t\t\t\t\t" . ($aprocedure->untested ? "[<i>" . $msg["remote_procedures_procedure_non_validated"] . "</i>]&nbsp;&nbsp;" : '') . "<strong>{$aprocedure->name}</strong><br/>\n\t\t\t\t\t\t\t\t<small>{$aprocedure->comment}&nbsp;</small>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>";
                        //if (preg_match_all("|!!(.*)!!|U",$row[2],$query_parameters)) $buf_contenu.="<a href='admin.php?categ=proc&sub=proc&action=configure&id_query=".$row[0]."'>".$msg["procs_options_config_param"]."</a>";
                        $buf_contenu .= "</td>";
                        $buf_contenu .= "<td><input class='bouton' type='button' value=\"" . $msg[remote_procedures_import] . "\" onClick=\"document.location='./admin.php?categ=proc&sub=proc&action=import_remote&id={$aprocedure->id}'\" /></td>\n\t\t\t\t\t\t\t\t</tr>";
                    }
                    $buf_contenu = "<table></tr>" . $buf_contenu . "</table>";
                    print gen_plus("procclass_remote", $msg["remote_procedures"], $buf_contenu);
                } else {
                    $buf_contenu = "<br>" . $msg["remote_procedures_no_procs"] . "<br><br>";
                    print gen_plus("procclass_remote", $msg["remote_procedures"], $buf_contenu);
                }
            }
        }
    }
    print "<br>\n\t\t<input class='bouton' type='button' value=' {$msg['704']} ' onClick=\"document.location='./admin.php?categ=proc&sub=proc&action=add'\" />\n\t\t<input class='bouton' type='button' value=' {$msg['procs_bt_import']} ' onClick=\"document.location='./admin.php?categ=proc&sub=proc&action=import'\" />\n\t\t<input class='bouton' type='button' value=' {$msg['admin_menu_req']} ' onClick=\"document.location='./admin.php?categ=proc&sub=req&action=add'\" />";
}
Example #27
0
 function showRapport()
 {
     global $form_rapport, $charset, $base_path, $tab_traite;
     $tab_traite = array();
     $liste = "";
     if ($this->export_elements) {
         $liste = "";
         for ($i = 0; $i < count($this->export_elements); $i++) {
             $id = $this->export_elements[$i]['id'];
             $titre = htmlentities($this->export_elements[$i]['titre'], ENT_QUOTES, $charset);
             $contenu = htmlentities($this->export_elements[$i]['contenu'], ENT_QUOTES, $charset);
             $date = htmlentities($this->export_elements[$i]['date'], ENT_QUOTES, $charset);
             $sujet = htmlentities($this->export_elements[$i]['sujet'], ENT_QUOTES, $charset);
             $id_parent = $this->export_elements[$i]['id_parent'];
             $drag = "<span id=\"elt_handle_{$id}\" style='padding-left:7px'  ><img src=\"" . $base_path . "/images/notice_drag.png\" /></span>";
             $liste .= "<div id='elt_{$id}' idelt='{$id}' draggable=\"yes\" dragtype=\"export\" dragtext=\"{$titre}\" \n\t\t\t\t\tdragicon=\"" . $base_path . "/images/icone_drag_notice.png\" handler='elt_handle_{$id}'>" . gen_plus("elt_" . $id, "[" . formatdate($date) . "] " . $sujet . " : " . $titre . $drag, $contenu) . "</div>";
         }
     }
     if ($this->rapport_elements) {
         $liste_rap = "";
         for ($i = 0; $i < count($this->rapport_elements); $i++) {
             $id = $this->rapport_elements[$i]['id_item'];
             $style = "";
             if (!$this->rapport_elements[$i]['num_element']) {
                 //Ajout manuel
                 switch ($this->rapport_elements[$i]['type']) {
                     case '1':
                         //Titre
                         $style = "style='background-color:#DECDEC' titre='yes'";
                         $contenu = htmlentities($this->rapport_elements[$i]['contenu'], ENT_QUOTES, $charset);
                         break;
                     case '0':
                         //Commmentaire
                         $contenu = "* " . htmlentities($this->rapport_elements[$i]['contenu'], ENT_QUOTES, $charset);
                         break;
                 }
             } else {
                 $contenu = htmlentities($this->rapport_elements[$i]['contenu'], ENT_QUOTES, $charset);
             }
             $titre = htmlentities(substr($this->rapport_elements[$i]['contenu'], 0, 15) . "...", ENT_QUOTES, $charset);
             $ordre = $this->rapport_elements[$i]['ordre'];
             if ($this->rapport_elements[$i]['sujet']) {
                 $contenu = "<u>" . htmlentities($this->rapport_elements[$i]['sujet'], ENT_QUOTES, $charset) . "</u> : " . $contenu;
             }
             $drag = "<span id=\"rap_handle_{$id}\" style='padding-left:7px'  ><img src=\"" . $base_path . "/images/notice_drag.png\" /></span>";
             $del = "<span id=\"rap_del_{$id}\" style='padding-left:7px;' onclick='delete_item({$id});' ><img src=\"" . $base_path . "/images/cross.png\" style='cursor:pointer;width:10px;vertical-align:middle;'/></span>";
             $modif = "<span id=\"rap_modif_{$id}\" style='padding-left:7px;' onclick='modif_item({$id});' ><img src=\"" . $base_path . "/images/b_edit.png\" style='cursor:pointer;width:10px;vertical-align:middle;'/></span>";
             $liste_rap .= "\n\t\t\t\t\t<div class='row' {$style} id='rap_drag_{$id}' draggable=\"yes\" dragtype=\"rapport\" dragtext=\"{$titre}\" dragicon=\"" . $base_path . "/images/icone_drag_notice.png\"\n\t\t\t\t\t\thandler=\"rap_handle_{$id}\" recepttype=\"rapport\" recept=\"yes\" highlight=\"rap_highlight\" downlight=\"rap_downlight\" iditem='{$id}' order='{$ordre}'>" . $contenu . $drag . $modif . $del . "</div>\t\t\t\n\t\t\t\t";
         }
     }
     $form_rapport = str_replace('!!cancel_action!!', $this->cancel_action, $form_rapport);
     $form_rapport = str_replace('!!form_action!!', $this->form_action, $form_rapport);
     $form_rapport = str_replace('!!titre_gauche!!', htmlentities($this->titre_gauche, ENT_QUOTES, $charset), $form_rapport);
     $form_rapport = str_replace('!!list_obj_rapport!!', $liste_rap, $form_rapport);
     $form_rapport = str_replace('!!list_obj!!', $liste, $form_rapport);
     //Définition des boutons du format d'export
     $file = $base_path . "/demandes/export_format/catalog.xml";
     $file_subst = $base_path . "/demandes/export_format/catalog_subst.xml";
     if (file_exists($file_subst)) {
         $xml = file_get_contents($file_subst, "r");
     } else {
         $xml = file_get_contents($file, "r") or die("Can't find XML file {$file}");
     }
     //Parse le fichier dans un tableau
     $param = _parser_text_no_function_($xml, "CATALOG");
     $exp_btn = "";
     for ($i = 0; $i < count($param['ITEM']); $i++) {
         $exp_btn .= "<input type='submit' class='bouton' id='" . $param['ITEM'][$i]['NAME'] . "' name='" . $param['ITEM'][$i]['NAME'] . "'\n\t\t\t\tvalue='" . htmlentities($param['ITEM'][$i]['LIBELLE'], ENT_QUOTES, $charset) . "' onClick='this.form.act.value=\"" . $param['ITEM'][$i]['CLASSNAME'] . "\"' />&nbsp;";
     }
     $form_rapport = str_replace('!!liste_export!!', $exp_btn, $form_rapport);
     print $form_rapport;
 }
 function show_form()
 {
     global $msg;
     global $admin_enrichment_form;
     if (count($this->enhancer)) {
         //création du sélecteur...
         $select = "<select name='enrichment_select_source[!!key!!][]' id='enrichment_select_source_!!key!!' multiple>";
         foreach ($this->enhancer as $source) {
             $select .= "<option value='" . $source['id'] . "'>" . $source['name'] . "</option>";
         }
         $typnoti = array('m' => $msg['type_mono'], 's' => $msg['type_serial'], 'a' => $msg['type_art'], 'b' => $msg['type_bull'], 'n' => $msg['type_aut']);
         //pour chaque type de document...
         $typdoc = new marc_list("doctype");
         $form_content = $this->generateSelectorScript();
         foreach ($typnoti as $tnoti => $notice) {
             if ($notice == 'Auteur') {
                 $content = "\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<table class='quadrille'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th colspan='2'>" . $msg['admin_connecteurs_enrichment_default_value_form'] . "</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td colspan='2'>\n\t\t\t\t\t\t\t\t  " . $this->generateSelector($tnoti) . "\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\n\t\t    \t\t\t</table>\n\t\t\t\t\t</div>";
             } else {
                 $content = "\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<table class='quadrille'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th colspan='2'>" . $msg['admin_connecteurs_enrichment_default_value_form'] . "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan='2'>\n\t\t\t\t\t\t\t " . $this->generateSelector($tnoti) . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=2>&nbsp;</td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>" . $msg['admin_connecteurs_enrichment_type_form'] . "</th>\n\t\t\t\t\t\t\t<th>" . $msg['admin_connecteurs_enrichment_enhancer_form'] . "</th>\n\t\t\t\t\t\t</tr>";
                 $parity_source = 0;
                 foreach ($typdoc->table as $tdoc => $document) {
                     if ($parity_source % 2) {
                         $pair_impair_type = "even";
                     } else {
                         $pair_impair_type = "odd";
                     }
                     $parity_source++;
                     $content .= "\n    \t\t\t\t<tr class='{$pair_impair_type}'>\n\t\t\t\t\t\t\t<td>" . $typdoc->table[$tdoc] . "</td>\n\t\t\t\t\t\t\t<td>" . $this->generateSelector($tnoti . $tdoc, 1) . "</td>\n\t\t\t\t\t\t</tr>";
                 }
                 $content .= "\n\t\t\t\t\t</table>\n\t\t\t\t</div>";
             }
             $form_content .= gen_plus("enrichment_" . $tnoti, $typnoti[$tnoti], $content);
         }
         $form = str_replace("!!table!!", $form_content, $admin_enrichment_form);
     } else {
         $form = str_replace("!!table!!", $msg['admin_connecteurs_enrichment_no_sources'], $admin_enrichment_form);
     }
     print $form;
 }
Example #29
0
 function show_expl_per_notice($no_notice, $link_expl = '', $expl_bulletin = 0)
 {
     global $msg, $dbh, $base_path, $class_path;
     global $explr_invisible, $explr_visible_unmod, $explr_visible_mod, $pmb_droits_explr_localises, $transferts_gestion_transferts;
     global $pmb_expl_list_display_comments;
     global $pmb_sur_location_activate;
     global $pmb_url_base, $pmb_expl_data, $charset;
     global $pmb_expl_display_location_without_expl;
     global $pmb_html_allow_expl_cote;
     // params :
     // $no_notice= id de la notice
     // $link_expl= lien associé à l'exemplaire avec !!expl_id!! et !!expl_cb!! à mettre à jour
     if (!$no_notice && !$expl_bulletin) {
         return;
     }
     $explr_tab_invis = explode(",", $explr_invisible);
     $explr_tab_unmod = explode(",", $explr_visible_unmod);
     $explr_tab_modif = explode(",", $explr_visible_mod);
     // récupération du nombre total d'exemplaires
     if ($expl_bulletin) {
         $requete = "SELECT COUNT(1) FROM exemplaires WHERE expl_bulletin='{$expl_bulletin}' ";
     } else {
         $requete = "SELECT COUNT(1) FROM exemplaires WHERE expl_notice='{$no_notice}' ";
     }
     $res = pmb_mysql_query($requete, $dbh);
     $nb_ex = pmb_mysql_result($res, 0, 0);
     if ($nb_ex) {
         // on récupère les données des exemplaires
         // visibilité des exemplaires:
         if ($pmb_droits_explr_localises && $explr_invisible) {
             $where_expl_localises = "and expl_location not in ({$explr_invisible})";
         } else {
             $where_expl_localises = "";
         }
         //Liste des champs d'exemplaires
         if ($pmb_sur_location_activate) {
             $surloc_field = "surloc_libelle,";
         }
         if (!$pmb_expl_data) {
             $pmb_expl_data = "expl_cb,expl_cote," . $surloc_field . "location_libelle,section_libelle,statut_libelle,tdoc_libelle";
         }
         $colonnesarray = explode(",", $pmb_expl_data);
         if (!in_array("expl_cb", $colonnesarray)) {
             array_unshift($colonnesarray, "expl_cb");
         }
         $total_columns = count($colonnesarray);
         //Présence de champs personnalisés
         if (strstr($pmb_expl_data, "#")) {
             require_once $class_path . "/parametres_perso.class.php";
             $cp = new parametres_perso("expl");
         }
         if ($expl_bulletin) {
             $where_expl_notice_expl_bulletin = " expl_bulletin='{$expl_bulletin}' ";
         } else {
             $where_expl_notice_expl_bulletin = " expl_notice='{$no_notice}' ";
         }
         $requete = "SELECT exemplaires.*, pret.*, docs_location.*, docs_section.*, docs_statut.*, docs_codestat.*, lenders.*, tdoc_libelle, ";
         if (in_array("surloc_libelle", $colonnesarray)) {
             $requete .= "sur_location.*, ";
         }
         $requete .= " date_format(pret_date, '" . $msg["format_date"] . "') as aff_pret_date, ";
         $requete .= " date_format(pret_retour, '" . $msg["format_date"] . "') as aff_pret_retour, ";
         $requete .= " IF(pret_retour>sysdate(),0,1) as retard ";
         $requete .= " FROM exemplaires LEFT JOIN pret ON exemplaires.expl_id=pret.pret_idexpl ";
         $requete .= " left join docs_location on exemplaires.expl_location=docs_location.idlocation ";
         if (in_array("surloc_libelle", $colonnesarray)) {
             $requete .= " left join sur_location on docs_location.surloc_num=sur_location.surloc_id ";
         }
         $requete .= " left join docs_section on exemplaires.expl_section=docs_section.idsection ";
         $requete .= " left join docs_statut on exemplaires.expl_statut=docs_statut.idstatut ";
         $requete .= " left join docs_codestat on exemplaires.expl_codestat=docs_codestat.idcode ";
         $requete .= " left join lenders on exemplaires.expl_owner=lenders.idlender ";
         $requete .= " left join docs_type on exemplaires.expl_typdoc=docs_type.idtyp_doc  ";
         $requete .= " WHERE {$where_expl_notice_expl_bulletin} {$where_expl_localises} ";
         if (in_array("surloc_libelle", $colonnesarray)) {
             $requete .= " order by surloc_libelle,location_libelle, section_libelle, expl_cote, expl_cb ";
         } else {
             $requete .= " order by location_libelle, section_libelle, expl_cote, expl_cb ";
         }
         $result = pmb_mysql_query($requete, $dbh) or die("<br />" . pmb_mysql_error() . "<br />" . $requete);
         $nbr_expl = pmb_mysql_num_rows($result);
         if ($nbr_expl) {
             while ($expl = pmb_mysql_fetch_object($result)) {
                 //visibilité des exemplaires
                 if ($pmb_droits_explr_localises) {
                     $as_invis = array_search($expl->idlocation, $explr_tab_invis);
                     $as_unmod = array_search($expl->idlocation, $explr_tab_unmod);
                     $as_modif = array_search($expl->idlocation, $explr_tab_modif);
                 } else {
                     $as_invis = false;
                     $as_unmod = false;
                     $as_modif = true;
                 }
                 if ($link_expl) {
                     if ($expl_bulletin) {
                         $tlink = "./catalog.php?categ=serials&sub=bulletinage&action=expl_form&bul_id=!!bull_id!!&expl_id=!!expl_id!!";
                         $tlink = str_replace('!!bull_id!!', $expl_bulletin, $tlink);
                         $tlink = str_replace('!!expl_id!!', $expl->expl_id, $tlink);
                         $tlink = str_replace('!!expl_cb!!', rawurlencode($expl->expl_cb), $tlink);
                     } else {
                         $tlink = str_replace('!!expl_id!!', $expl->expl_id, $link_expl);
                         $tlink = str_replace('!!expl_cb!!', rawurlencode($expl->expl_cb), $tlink);
                         $tlink = str_replace('!!notice_id!!', $expl->expl_notice, $tlink);
                     }
                 }
                 $expl_liste .= "<tr>";
                 for ($i = 0; $i < count($colonnesarray); $i++) {
                     if (!(substr($colonnesarray[$i], 0, 1) == "#")) {
                         eval("\$colencours=\$expl->" . $colonnesarray[$i] . ";");
                     }
                     if ($i == 0 && ($expl->expl_note || $expl->expl_comment) && $pmb_expl_list_display_comments) {
                         $expl_rowspan = "rowspan='2'";
                     } else {
                         $expl_rowspan = "";
                     }
                     $aff_column = "";
                     if (substr($colonnesarray[$i], 0, 1) == "#") {
                         //champs personnalisés
                         $id = substr($colonnesarray[$i], 1);
                         $cp->get_values($expl->expl_id);
                         if (!$cp->no_special_fields) {
                             $temp = $cp->get_formatted_output($cp->values[$id], $id);
                             if (!$temp) {
                                 $temp = "&nbsp;";
                             }
                             $aff_column .= $temp;
                         }
                     } else {
                         if ($colonnesarray[$i] == "expl_cb") {
                             if ($tlink && ($as_modif !== FALSE && $as_modif !== NULL)) {
                                 $aff_column .= "<a href='{$tlink}'>" . $colencours . "</a>";
                             } else {
                                 $aff_column .= $colencours;
                             }
                         } else {
                             if ($colonnesarray[$i] == "expl_cote") {
                                 if ($pmb_html_allow_expl_cote) {
                                     $aff_column .= "<strong>" . $colencours . "</strong>";
                                 } else {
                                     $aff_column .= "<strong>" . htmlentities($colencours, ENT_QUOTES, $charset) . "</strong>";
                                 }
                             } else {
                                 if ($colonnesarray[$i] == "statut_libelle") {
                                     if ($expl->pret_retour) {
                                         // exemplaire sorti
                                         $rqt_empr = "SELECT empr_nom, empr_prenom, id_empr, empr_cb FROM empr WHERE id_empr='{$expl->pret_idempr}' ";
                                         $res_empr = pmb_mysql_query($rqt_empr, $dbh);
                                         $res_empr_obj = pmb_mysql_fetch_object($res_empr);
                                         $situation = "<strong>{$msg[358]} " . $expl->aff_pret_retour . "</strong>";
                                         global $empr_show_caddie, $selector_prop_ajout_caddie_empr;
                                         if ($empr_show_caddie && SESSrights & CIRCULATION_AUTH) {
                                             $img_ajout_empr_caddie = "<img src='" . $base_path . "/images/basket_empr.gif' align='middle' alt='basket' title=\"{$msg[400]}\" onClick=\"openPopUp('" . $base_path . "/cart.php?object_type=EMPR&item=" . $expl->pret_idempr . "', 'cart', 600, 700, -2, -2, '{$selector_prop_ajout_caddie_empr}')\">&nbsp;";
                                         } else {
                                             $img_ajout_empr_caddie = "";
                                         }
                                         switch ($this->print_mode) {
                                             case '2':
                                                 $situation .= "<br />{$res_empr_obj->empr_prenom} {$res_empr_obj->empr_nom}";
                                                 break;
                                             default:
                                                 $situation .= "<br />{$img_ajout_empr_caddie}<a href='" . $base_path . "/circ.php?categ=pret&form_cb=" . rawurlencode($res_empr_obj->empr_cb) . "'>{$res_empr_obj->empr_prenom} {$res_empr_obj->empr_nom}</a>";
                                                 break;
                                         }
                                     } else {
                                         // tester si réservé
                                         $result_resa = pmb_mysql_query("select 1 from resa where resa_cb='" . addslashes($expl->expl_cb) . "' ", $dbh) or die("<br />" . pmb_mysql_error() . "<br />" . $requete);
                                         $reserve = pmb_mysql_num_rows($result_resa);
                                         // tester à ranger
                                         $result_aranger = pmb_mysql_query(" select 1 from resa_ranger where resa_cb='" . addslashes($expl->expl_cb) . "' ", $dbh) or die("<br />" . pmb_mysql_error() . "<br />" . $requete);
                                         $aranger = pmb_mysql_num_rows($result_aranger);
                                         if ($reserve) {
                                             $situation = "<strong>" . $msg['expl_reserve'] . "</strong>";
                                         } elseif ($expl->expl_retloc) {
                                             $situation = $msg['resa_menu_a_traiter'];
                                         } elseif ($aranger) {
                                             $situation = "<strong>" . $msg['resa_menu_a_ranger'] . "</strong>";
                                         } elseif ($expl->pret_flag) {
                                             $situation = "<strong>{$msg[359]}</strong>";
                                         } else {
                                             $situation = "";
                                         }
                                     }
                                     $aff_column .= htmlentities($colencours, ENT_QUOTES, $charset);
                                     if ($situation) {
                                         $aff_column .= "<br />{$situation}";
                                     }
                                 } else {
                                     $aff_column = htmlentities($colencours, ENT_QUOTES, $charset);
                                 }
                             }
                         }
                     }
                     $expl_liste .= "<td {$expl_rowspan}>" . $aff_column . "</td>";
                 }
                 if ($this->print_mode) {
                     $expl_liste .= "<td>&nbsp;</td>";
                 } else {
                     if (SESSrights & CATALOGAGE_AUTH) {
                         //le panier d'exemplaire
                         $cart_click = "onClick=\"openPopUp('" . $base_path . "/cart.php?object_type=EXPL&item=" . $expl->expl_id . "', 'cart', 600, 700, -2, -2, 'toolbar=no, dependent=yes, width=500, height=400, resizable=yes, scrollbars=yes')\"";
                         $cart_link = "<a href='#' {$cart_click}><img src='" . $base_path . "/images/basket_small_20x20.gif' align='center' alt='basket' title=\"{$msg[400]}\"></a>";
                         //l'icon pour le drag&drop de panier
                         $drag_link = "<span onMouseOver='if(init_drag) init_drag();' id='EXPL_drag_" . $expl->expl_id . "'  dragicon=\"" . $base_path . "/images/icone_drag_notice.png\" dragtext=\"" . htmlentities($expl->expl_cb, ENT_QUOTES, $charset) . "\" draggable=\"yes\" dragtype=\"notice\" callback_before=\"show_carts\" callback_after=\"\" style=\"padding-left:7px\"><img src=\"" . $base_path . "/images/notice_drag.png\"/></span>";
                     } else {
                         $cart_click = "";
                         $cart_link = "";
                         $drag_link = "";
                     }
                     //l'impression de la fiche exemplaire
                     $fiche_click = "onClick=\"openPopUp('" . $base_path . "/pdf.php?pdfdoc=fiche_catalographique&expl_id=" . $expl->expl_id . "', 'Fiche', 500, 400, -2, -2, 'toolbar=no, dependent=yes, resizable=yes, scrollbars=yes')\"";
                     $fiche_link = "<a href='#' {$fiche_click}><img src='" . $base_path . "/images/print.gif' align='center' alt='" . $msg['print_fiche_catalographique'] . "' title='" . $msg['print_fiche_catalographique'] . "'></a>";
                     global $pmb_transferts_actif;
                     //si les transferts sont activés
                     if ($pmb_transferts_actif) {
                         //si l'exemplaire n'est pas transferable on a une image vide
                         $transfer_link = "<img src='" . $base_path . "/images/spacer.gif' align='center' height=20 width=20>";
                         $dispo_pour_transfert = transfert::est_transferable($expl->expl_id);
                         if (SESSrights & TRANSFERTS_AUTH && $dispo_pour_transfert) {
                             //l'icon de demande de transfert
                             $transfer_link = "<a href=\"#\" onClick=\"openPopUp('" . $base_path . "/catalog/transferts/transferts_popup.php?expl=" . $expl->expl_id . "', 'cart', 600, 450, -2, -2, 'toolbar=no, dependent=yes, resizable=yes, scrollbars=yes');\"><img src='" . $base_path . "/images/peb_in.png' align='center' border=0 alt=\"" . $msg["transferts_alt_libelle_icon"] . "\" title=\"" . $msg["transferts_alt_libelle_icon"] . "\"></a>";
                         }
                     }
                     //on met tout dans la colonne
                     $expl_liste .= "<td>{$fiche_link} {$cart_link} {$transfer_link} {$drag_link}</td>";
                 }
                 $expl_liste .= "</tr>";
                 if (($expl->expl_note || $expl->expl_comment) && $pmb_expl_list_display_comments) {
                     $notcom = array();
                     $expl_liste .= "<tr><td colspan='" . $total_columns . "'>";
                     if ($expl->expl_note && $pmb_expl_list_display_comments & 1) {
                         $notcom[] .= "<span class='erreur'>{$expl->expl_note}</span>";
                     }
                     if ($expl->expl_comment && $pmb_expl_list_display_comments & 2) {
                         $notcom[] .= "{$expl->expl_comment}";
                     }
                     $expl_liste .= implode("<br />", $notcom);
                     $expl_liste .= "</tr>";
                 }
             }
             // fin while
         }
         // fin il y a des expl visibles
         if ($expl_liste) {
             $entry = "<table border='0' class='expl-list'><tr>";
             for ($i = 0; $i < count($colonnesarray); $i++) {
                 if (substr($colonnesarray[$i], 0, 1) == "#") {
                     //champs personnalisés
                     if (!$cp->no_special_fields) {
                         $id = substr($colonnesarray[$i], 1);
                         $entry .= "<th>" . htmlentities($cp->t_fields[$id][TITRE], ENT_QUOTES, $charset) . "</th>";
                     }
                 } else {
                     eval("\$colencours=\$msg[expl_header_" . $colonnesarray[$i] . "];");
                     $entry .= "<th>" . htmlentities($colencours, ENT_QUOTES, $charset) . "</th>";
                 }
             }
             $entry .= "<th>&nbsp;</th></tr>{$expl_liste}</table>";
         } else {
             $entry = "";
         }
         if ($pmb_expl_display_location_without_expl) {
             if ($pmb_sur_location_activate) {
                 $array_surloc = array();
                 $requete = "SELECT * FROM sur_location ORDER BY surloc_libelle";
                 $result = pmb_mysql_query($requete, $dbh) or die("<br />" . pmb_mysql_error() . "<br />" . $requete);
                 $nb_surloc = pmb_mysql_num_rows($result);
                 if ($nb_surloc) {
                     while ($surloc = pmb_mysql_fetch_object($result)) {
                         $array_surloc[] = array("id" => $surloc->surloc_id, "libelle" => $surloc->surloc_libelle, "locations" => array());
                     }
                 }
                 if (count($array_surloc)) {
                     foreach ($array_surloc as $key => $surloc) {
                         $requete = "SELECT idlocation, location_libelle from docs_location where surloc_num=" . $surloc["id"] . " AND \n\t\t\t\t\t\tidlocation not in (SELECT expl_location from exemplaires WHERE expl_notice={$no_notice}) order by location_libelle";
                         $result = pmb_mysql_query($requete, $dbh) or die("<br />" . pmb_mysql_error() . "<br />" . $requete);
                         $nb_loc = pmb_mysql_num_rows($result);
                         if ($nb_loc) {
                             while ($loc = pmb_mysql_fetch_object($result)) {
                                 $array_surloc[$key]["locations"][] = array("id" => $loc->idlocation, "libelle" => $loc->location_libelle);
                             }
                         } else {
                             unset($array_surloc[$key]);
                         }
                     }
                 }
                 //Au moins une surloc à afficher
                 if (count($array_surloc)) {
                     $tr_surloc = "";
                     foreach ($array_surloc as $key => $surloc) {
                         $tr_surloc .= "<tr><td>";
                         $tr_loc = "";
                         foreach ($surloc["locations"] as $keyloc => $loc) {
                             $tr_loc .= "<tr><td>" . $loc["libelle"] . "</td></tr>";
                         }
                         $tpl_surloc = "\n\t\t\t\t\t\t\t<table border='0' class='expl-list'>\n\t\t\t\t\t\t\t\t{$tr_loc}\n\t\t\t\t\t\t\t</table>";
                         $tr_surloc .= gen_plus('surlocation_without_expl' . $key . '_' . $no_notice, $surloc["libelle"], $tpl_surloc, 0);
                         $tr_surloc .= "</td></tr>";
                     }
                     $tpl = "\n\t\t\t\t\t<table border='0' class='expl-list'>\n\t\t\t\t\t\t{$tr_surloc}\n\t\t\t\t\t</table>";
                     $entry .= gen_plus('location_without_expl' . $no_notice, $msg['expl_surlocation_without_expl'], $tpl, 0);
                 }
             } else {
                 $requete = "SELECT location_libelle from docs_location where\n\t\t\t\tidlocation not in (SELECT expl_location from exemplaires WHERE expl_notice={$no_notice}) order by location_libelle";
                 $result = pmb_mysql_query($requete, $dbh) or die("<br />" . pmb_mysql_error() . "<br />" . $requete);
                 $nb_loc = pmb_mysql_num_rows($result);
                 if ($nb_loc) {
                     $items = "";
                     while ($loc = pmb_mysql_fetch_object($result)) {
                         $items .= "<tr><td>" . $loc->location_libelle . "</td></tr>";
                     }
                     $tpl = "\n\t\t\t\t\t<table border='0' class='expl-list'>\n\t\t\t\t\t\t{$items}\n\t\t\t\t\t</table>";
                     $tpl = gen_plus('location_without_expl' . $no_notice, $msg['expl_location_without_expl'], $tpl, 0);
                     $entry .= $tpl;
                 }
             }
         }
         $this->nb_expl = $nbr_expl;
         return $entry;
     } else {
         return "";
     }
 }
Example #30
0
function show_empr_form($form_action, $form_cancel, $link, $id, $cb, $duplicate_empr_from_id = "")
{
    global $empr_form;
    global $dbh, $msg, $charset;
    global $biblio_email;
    global $aff_list_empr;
    global $deflt2docs_location;
    global $pmb_lecteurs_localises;
    global $pmb_gestion_abonnement, $pmb_gestion_financiere, $empr_abonnement_default_debit;
    global $empr_prolong_calc_date_adhes_depassee;
    global $database_window_title;
    global $lang;
    global $pmb_rfid_activate, $pmb_rfid_serveur_url;
    global $pmb_opac_view_activate;
    // si $id est fourni, il s'agit d'une modification. on recupere les donnees dans $link
    if ($id) {
        // modification
        echo window_title($database_window_title . $msg[55]);
        $entete = $msg[55];
        if ($pmb_rfid_activate == 1 && $pmb_rfid_serveur_url) {
            $script_rfid_encode = "if(script_rfid_encode()==false) return false;";
        } else {
            $script_rfid_encode = '';
        }
        $empr_form = str_replace("!!questionrfid!!", $script_rfid_encode, $empr_form);
        $requete = "SELECT * FROM empr WHERE id_empr='{$id}' ";
        $res = mysql_query($requete, $link);
        if ($res) {
            $empr = mysql_fetch_object($res);
        } else {
            error_message($msg[53], $msg[54], 0);
        }
    } else {
        // création
        $empr = new stdClass();
        $entete = $msg[15];
        $empr_form = str_replace("!!questionrfid!!", '', $empr_form);
    }
    if ($duplicate_empr_from_id) {
        $empr_form = str_replace("!!id!!", "", $empr_form);
        $empr_form = str_replace("!!entete!!", $msg["empr_duplicate"], $empr_form);
    } else {
        $empr_form = str_replace("!!id!!", $id, $empr_form);
        $empr_form = str_replace("!!entete!!", $entete, $empr_form);
    }
    $empr_form = str_replace("!!form_action!!", $form_action, $empr_form);
    if ($empr->empr_cb) {
        //Si il y a un code lecteur
        if (!$duplicate_empr_from_id) {
            $empr_form = str_replace("!!cb!!", $empr->empr_cb, $empr_form);
        } else {
            $empr_form = str_replace("!!cb!!", $cb, $empr_form);
        }
        $date_adhesion = !$duplicate_empr_from_id ? $empr->empr_date_adhesion : date('Y-m-d');
        $date_clic = "onClick=\"openPopUp('./select.php?what=calendrier&caller=empr_form&date_caller=" . preg_replace('/-/', '', $date_adhesion) . "&param1=form_adhesion&param2=form_adhesion_lib&auto_submit=NO&date_anterieure=YES', 'date_adhesion', 250, 300, -2, -2, 'toolbar=no, dependent=yes, resizable=yes')\"  ";
        $adhesion = "\n\t\t\t\t<input type='hidden' name='form_adhesion' value='" . preg_replace('/-/', '', $date_adhesion) . "' />\n\t\t\t\t<input class='bouton' type='button' name='form_adhesion_lib' value='" . formatdate($date_adhesion) . "' " . $date_clic . " />";
        $empr_form = str_replace("!!adhesion!!", $adhesion, $empr_form);
        $date_clic = "onClick=\"openPopUp('./select.php?what=calendrier&caller=empr_form&date_caller=" . preg_replace('/-/', '', $empr->empr_date_expiration) . "&param1=form_expiration&param2=form_expiration_lib&auto_submit=NO&date_anterieure=YES', 'date_adhesion', 205, 300, -2, -2, 'toolbar=no, dependent=yes, resizable=yes')\"  ";
        $expiration = "\n\t\t\t\t<input type='hidden' id='form_expiration' name='form_expiration' value='" . preg_replace('/-/', '', $empr->empr_date_expiration) . "' />\n\t\t\t\t<input class='bouton' type='button' id='form_expiration_lib' name='form_expiration_lib' value='" . formatdate($empr->empr_date_expiration) . "' " . $date_clic . " />";
        $empr_form = str_replace("!!expiration!!", $expiration, $empr_form);
        // ajout ici des trucs sur la relance adhésion
        $empr_temp = new emprunteur($id, '', FALSE, 0);
        $aff_relance = "";
        if ($empr_temp->adhesion_renouv_proche() || $empr_temp->adhesion_depassee()) {
            if ($empr_temp->adhesion_depassee()) {
                $mess_relance = $msg[empr_date_depassee];
            } else {
                $mess_relance = $msg[empr_date_renouv_proche];
            }
            $rqt = "select duree_adhesion from empr_categ where id_categ_empr='{$empr_temp->categ}'";
            $res_dur_adhesion = mysql_query($rqt, $dbh);
            $row = mysql_fetch_row($res_dur_adhesion);
            $nb_jour_adhesion_categ = $row[0];
            if ($empr_prolong_calc_date_adhes_depassee && $empr_temp->adhesion_depassee()) {
                $rqt_date = "select date_add(curdate(),INTERVAL 1 DAY) as nouv_date_debut,\n\t\t\t\t\t\tdate_add(curdate(),INTERVAL {$nb_jour_adhesion_categ} DAY) as nouv_date_fin ";
            } else {
                $rqt_date = "select date_add('{$empr_temp->date_expiration}',INTERVAL 1 DAY) as nouv_date_debut,\n\t\t\t\t\t\tdate_add('{$empr_temp->date_expiration}',INTERVAL {$nb_jour_adhesion_categ} DAY) as nouv_date_fin ";
            }
            $resultatdate = mysql_query($rqt_date) or die("<br /> {$rqt_date} " . mysql_error());
            $resdate = mysql_fetch_object($resultatdate);
            $nouv_date_debut = $resdate->nouv_date_debut;
            $nouv_date_fin = $resdate->nouv_date_fin;
            $nouv_date_debut_formatee = formatdate($nouv_date_debut);
            $nouv_date_fin_formatee = formatdate($nouv_date_fin);
            // on conserve la date d'adhésion initiale
            $action_prolonger = "this.form.form_expiration.value = '{$nouv_date_fin}';\n\t\t\t\tthis.form.form_expiration_lib.value = '{$nouv_date_fin_formatee}';\n\t\t\t\t";
            $action_relance_courrier = "openPopUp('./pdf.php?pdfdoc=lettre_relance_adhesion&id_empr={$id}', 'lettre', 600, 500, -2, -2, 'toolbar=no, dependent=yes, resizable=yes'); return(false) ";
            $aff_relance = "<div class='row'>\n\t\t\t\t\t\t<span class='erreur'>{$mess_relance}</span><br />\n\t\t\t\t\t\t<input class='bouton' type='button' value=\"" . $msg[prolonger] . "\" onClick=\"{$action_prolonger}\" />&nbsp;\n\t\t\t\t\t\t<input class='bouton' type='button' value=\"" . $msg[prolong_courrier] . "\" onClick=\"{$action_relance_courrier}\" />";
            if ($empr_temp->mail && $biblio_email) {
                $action_relance_mail = "if (confirm('" . $msg["mail_retard_confirm"] . "')) {openPopUp('./mail.php?type_mail=mail_relance_adhesion&id_empr={$id}', 'mail', 600, 500, -2, -2, 'toolbar=no, dependent=yes, resizable=yes, scrollbars=yes'); } return(false) ";
                $aff_relance .= "&nbsp;<input class='bouton' type='button' value=\"" . $msg['prolong_mail'] . "\" onClick=\"{$action_relance_mail}\" />";
            }
            $aff_relance .= "</div>";
            if ($pmb_gestion_financiere && $pmb_gestion_abonnement) {
                $aff_relance .= "<div class='row'><input type='radio' name='debit' value='0' id='debit_0' " . (!$empr_abonnement_default_debit ? "checked" : "") . " /><label for='debit_0'>" . $msg["finance_abt_no_debit"] . "</label>&nbsp;<input type='radio' name='debit' value='1' id='debit_1' " . ($empr_abonnement_default_debit == 1 ? "checked" : "") . " />";
                $aff_relance .= "<label for='debit_1'>" . $msg["finance_abt_debit_wo_caution"] . "</label>&nbsp;";
                if ($pmb_gestion_abonnement == 2) {
                    $aff_relance .= "<input type='radio' name='debit' value='2' id='debit_2' " . ($empr_abonnement_default_debit == 2 ? "checked" : "") . " /><label for='debit_2'>" . $msg["finance_abt_debit_wt_caution"] . "</label>";
                }
                $aff_relance .= "</div>";
            }
        }
        $empr_form = str_replace("!!adhesion_proche_depassee!!", $aff_relance, $empr_form);
        //Liste des types d'abonnement
        $list_type_abt = "";
        if ($pmb_gestion_abonnement == 2 && $pmb_gestion_financiere) {
            $requete = "select * from type_abts order by type_abt_libelle ";
            $resultat_abt = mysql_query($requete);
            $user_loc = $deflt2docs_location;
            $t_type_abt = array();
            while ($res_abt = mysql_fetch_object($resultat_abt)) {
                $locs = explode(",", $res_abt->localisations);
                $as = array_search($user_loc, $locs);
                if ($as !== false && $as !== null || !$res_abt->localisations) {
                    $t_type_abt[] = $res_abt;
                }
            }
            if (count($t_type_abt)) {
                $list_type_abt = "<div class='row'>\n<label for='type_abt'>" . $msg["finance_type_abt"] . "</label></div>\n<div class='row'>\n<select name='type_abt' id='type_abt'>\n";
                for ($i = 0; $i < count($t_type_abt); $i++) {
                    $list_type_abt .= "<option value='" . $t_type_abt[$i]->id_type_abt . "'";
                    if ($empr->type_abt == $t_type_abt[$i]->id_type_abt) {
                        $list_type_abt .= " selected";
                    }
                    $list_type_abt .= ">" . htmlentities($t_type_abt[$i]->type_abt_libelle, ENT_QUOTES, $charset) . "</option>\n";
                }
                $list_type_abt .= "</select></div>";
            }
        }
        $empr_form = str_replace("!!typ_abonnement!!", $list_type_abt, $empr_form);
    } else {
        // création de lecteur
        $empr->empr_date_adhesion = today();
        $empr_form = str_replace('!!cb!!', $cb, $empr_form);
        $date_clic = "onClick=\"openPopUp('./select.php?what=calendrier&caller=empr_form&date_caller=" . preg_replace('/-/', '', $empr->empr_date_adhesion) . "&param1=form_adhesion&param2=form_adhesion_lib&auto_submit=NO&date_anterieure=YES', 'date_adhesion', 250, 260, -2, -2, 'toolbar=no, dependent=yes, resizable=yes')\"  ";
        $adhesion = "{$msg['1401']}{$msg['1901']}\n\t\t\t\t<input type='hidden' name='form_adhesion' value='" . preg_replace('/-/', '', $empr->empr_date_adhesion) . "'>\n\t\t\t\t<input class='bouton' type='button' name='form_adhesion_lib' value='" . formatdate($empr->empr_date_adhesion) . "' " . $date_clic . " />";
        $empr_form = str_replace("!!adhesion!!", $adhesion, $empr_form);
        $empr_form = str_replace("!!adhesion_proche_depassee!!", "", $empr_form);
        $empr_form = str_replace("!!expiration!!", "<input type='hidden' name='form_expiration' value=''>", $empr_form);
        //Liste des types d'abonnement
        $list_type_abt = "";
        if ($pmb_gestion_abonnement == 2 && $pmb_gestion_financiere) {
            $requete = "select * from type_abts";
            $resultat_abt = mysql_query($requete);
            $user_loc = $deflt2docs_location;
            $t_type_abt = array();
            while ($res_abt = mysql_fetch_object($resultat_abt)) {
                $locs = explode(",", $res_abt->localisations);
                $as = array_search($user_loc, $locs);
                if ($as !== false && $as !== null || !$res_abt->localisations) {
                    $t_type_abt[] = $res_abt;
                }
            }
            if (count($t_type_abt)) {
                $list_type_abt = "<div class='row'>\n<label for='type_abt'>" . $msg["finance_type_abt"] . "</label></div>\n<div class='row'>\n<select name='type_abt' id='type_abt'>\n";
                for ($i = 0; $i < count($t_type_abt); $i++) {
                    $list_type_abt .= "<option value='" . $t_type_abt[$i]->id_type_abt . "'>" . htmlentities($t_type_abt[$i]->type_abt_libelle, ENT_QUOTES, $charset) . "</option>\n";
                }
                $list_type_abt .= "</select></div>";
            }
        }
        $empr_form = str_replace("!!typ_abonnement!!", $list_type_abt, $empr_form);
    }
    $empr_form = str_replace("!!nom!!", htmlentities($empr->empr_nom, ENT_QUOTES, $charset), $empr_form);
    $empr_form = str_replace("!!prenom!!", htmlentities($empr->empr_prenom, ENT_QUOTES, $charset), $empr_form);
    $empr_form = str_replace("!!adr1!!", htmlentities($empr->empr_adr1, ENT_QUOTES, $charset), $empr_form);
    $empr_form = str_replace("!!adr2!!", htmlentities($empr->empr_adr2, ENT_QUOTES, $charset), $empr_form);
    $empr_form = str_replace("!!cp!!", htmlentities($empr->empr_cp, ENT_QUOTES, $charset), $empr_form);
    $empr_form = str_replace("!!ville!!", htmlentities($empr->empr_ville, ENT_QUOTES, $charset), $empr_form);
    $empr_form = str_replace("!!pays!!", htmlentities($empr->empr_pays, ENT_QUOTES, $charset), $empr_form);
    $empr_form = str_replace("!!mail!!", htmlentities($empr->empr_mail, ENT_QUOTES, $charset), $empr_form);
    $empr_form = str_replace("!!tel1!!", htmlentities($empr->empr_tel1, ENT_QUOTES, $charset), $empr_form);
    if (!$empr->empr_sms) {
        $empr_sms_chk = '';
    } else {
        $empr_sms_chk = "checked='checked'";
    }
    $empr_form = str_replace('!!sms!!', $empr_sms_chk, $empr_form);
    $empr_form = str_replace("!!tel2!!", htmlentities($empr->empr_tel2, ENT_QUOTES, $charset), $empr_form);
    $empr_form = str_replace("!!prof!!", htmlentities($empr->empr_prof, ENT_QUOTES, $charset), $empr_form);
    if ($empr->empr_year != 0) {
        $empr_form = str_replace("!!year!!", htmlentities($empr->empr_year, ENT_QUOTES, $charset), $empr_form);
    } else {
        $empr_form = str_replace("!!year!!", "", $empr_form);
    }
    if (!$empr->empr_lang) {
        $empr->empr_lang = $lang;
    }
    $empr_form = str_replace('!!combo_empr_lang!!', make_empr_lang_combo($empr->empr_lang), $empr_form);
    if (!$duplicate_empr_from_id) {
        $empr_form = str_replace('!!empr_login!!', $empr->empr_login, $empr_form);
        $empr_form = str_replace("!!empr_msg!!", htmlentities($empr->empr_msg, ENT_QUOTES, $charset), $empr_form);
    } else {
        $empr_form = str_replace('!!empr_login!!', "", $empr_form);
        $empr_form = str_replace("!!empr_msg!!", "", $empr_form);
    }
    // on récupère le select catégorie
    $requete = "SELECT id_categ_empr, libelle, duree_adhesion FROM empr_categ ORDER BY libelle ";
    $res = mysql_query($requete, $link);
    $nbr_lignes = mysql_num_rows($res);
    $categ_content = '';
    $empr_grille_categ = "<select id='empr_grille_categ' style='display:none;'><option value='0' selected='selected' >" . $msg['all_categories_empr'] . "</value>";
    for ($i = 0; $i < $nbr_lignes; $i++) {
        $row = mysql_fetch_row($res);
        $categ_content .= "<option value='{$row['0']}'";
        if ($row[0] == $empr->empr_categ) {
            $categ_content .= " selected='selected'";
        }
        $categ_content .= ">{$row['1']}</option>";
        $empr_grille_categ .= "<option value='{$row['0']}'>{$row['1']}</option>";
    }
    $empr_grille_categ .= '</select>';
    $empr_form = str_replace("!!categ!!", $categ_content, $empr_form);
    // Ajout des categories et localisations pour edition des grilles
    $empr_form = str_replace("<!-- empr_grille_categ -->", $empr_grille_categ, $empr_form);
    if ($pmb_lecteurs_localises) {
        $empr_grille_location = docs_location::get_html_select(array(0), array('id' => 0, 'msg' => $msg['all_locations_empr']), array('id' => 'empr_grille_location', 'class' => 'saisie-20em', 'style' => 'display:none;'));
    } else {
        $empr_grille_location = "<input type='hidden' id='empr_grille_location' value='0' />";
    }
    $empr_form = str_replace("<!-- empr_grille_location -->", $empr_grille_location, $empr_form);
    $requete = "SELECT id_categ_empr, libelle, duree_adhesion FROM empr_categ ORDER BY libelle ";
    $res = mysql_query($requete, $link);
    $grille_categ = "<option value='0' selected='selected'>" . $msg['all_categories_empr'] . "</value>";
    for ($i = 0; $i < $nbr_lignes; $i++) {
        $row = mysql_fetch_row($res);
        $categ_content .= "<option value='{$row['0']}'";
        if ($row[0] == $empr->empr_categ) {
            $categ_content .= " selected='selected'";
        }
        $categ_content .= ">{$row['1']}</option>";
        $grille_categ .= "<option value='{$row['0']}'>{$row['1']}</option>";
    }
    $empr_form = str_replace("!!categ!!", $categ_content, $empr_form);
    // on récupère le select statut
    $requete = "SELECT idstatut, statut_libelle FROM empr_statut ORDER BY statut_libelle ";
    //Si il n'y a pas de statut on prend celui définit pour l'utilisateur
    if (!$empr->empr_statut) {
        global $deflt_empr_statut;
        $empr->empr_statut = $deflt_empr_statut;
    }
    $res = mysql_query($requete, $link);
    $nbr_lignes = mysql_num_rows($res);
    for ($i = 0; $i < $nbr_lignes; $i++) {
        $row = mysql_fetch_row($res);
        $statut_content .= "<option value='{$row['0']}'";
        if ($row[0] == $empr->empr_statut) {
            $statut_content .= " selected='selected'";
        }
        $statut_content .= ">{$row['1']}</option>";
    }
    $empr_form = str_replace("!!statut!!", $statut_content, $empr_form);
    // et le select code stat
    // on récupère le select cod stat
    $requete = "SELECT idcode, libelle FROM empr_codestat ORDER BY libelle ";
    $res = mysql_query($requete, $link);
    $nbr_lignes = mysql_num_rows($res);
    for ($i = 0; $i < $nbr_lignes; $i++) {
        $row = mysql_fetch_row($res);
        $cstat_content .= "<option value='{$row['0']}'";
        if ($row[0] == $empr->empr_codestat) {
            $cstat_content .= " selected='selected'";
        }
        $cstat_content .= ">{$row['1']}</option>";
    }
    // mise à jour du sexe
    switch ($empr->empr_sexe) {
        case 1:
            $empr_form = str_replace("sexe_select_1", 'selected', $empr_form);
            break;
        case 2:
            $empr_form = str_replace("sexe_select_2", 'selected', $empr_form);
            break;
        default:
            $empr_form = str_replace("sexe_select_0", 'selected', $empr_form);
            break;
    }
    $empr_form = preg_replace("/sexe_select_[0-2]/m", '', $empr_form);
    $empr_form = str_replace("!!cstat!!", $cstat_content, $empr_form);
    // mise à jour du groupe
    if ($id) {
        $requete = "SELECT id_groupe, libelle_groupe, ifnull(empr_id,0) as inscription FROM groupe left join empr_groupe on (id_groupe=groupe_id  and empr_id=" . $id . ")  ORDER BY libelle_groupe";
    } else {
        $requete = "SELECT id_groupe, libelle_groupe, 0 as inscription FROM groupe ORDER BY libelle_groupe";
    }
    $groupe_form_aff = gen_liste_multiple($requete, "id_groupe", "libelle_groupe", "inscription", "id_grp[]", "", $id, 0, $msg[empr_form_aucungroupe], 0, $msg[empr_form_nogroupe], 5);
    $empr_form = str_replace("!!groupe_ajout!!", $groupe_form_aff, $empr_form);
    $empr_form = str_replace('!!cancel!!', $form_cancel, $empr_form);
    // ldap MaxMan
    if ($empr->empr_ldap) {
        $form_ldap = "checked";
    } else {
        $form_ldap = "";
    }
    //$empr_form = str_replace('!!empr_password!!', $empr_password, $empr_form);
    $empr_form = str_replace("!!ldap!!", $form_ldap, $empr_form);
    $empr_form = str_replace('!!empr_password!!', '', $empr_form);
    if (!$empr->empr_location) {
        $empr->empr_location = $deflt2docs_location;
    }
    if ($pmb_lecteurs_localises) {
        $loc = "\n\t\t<div class='row' id='g2_r1' etirable='yes' recept='yes' recepttype='circrow' highlight='circrow_highlight' downlight='circrow_downlight' >\n\t\t\t<div class='colonne4' id='g2_r1_f0' movable='yes' draggable='yes' dragtype='circcell' recept='yes' recepttype='circcell' highlight='circcell_highlight' downlight='circcell_downlight' title='" . htmlentities($msg['empr_location'], ENT_QUOTES, $charset) . "'>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<label for='form_empr_location' class='etiquette'>" . $msg['empr_location'] . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t!!localisation!!\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t<div class='row'></div>\n\t\t</div>";
        //$loc = str_replace('!!localisation!!', docs_location::gen_combo_box_empr($empr->empr_location, 0), $loc);
        $loc = str_replace('!!localisation!!', docs_location::get_html_select(array($empr->empr_location), array(), array('id' => 'empr_location_id', 'name' => 'empr_location_id')), $loc);
    } else {
        $loc = "<input type='hidden' name='empr_location_id' id='empr_location_id' value='" . $empr->empr_location . "'>";
        $empr_form = str_replace('<!-- !!localisation!! -->', $loc, $empr_form);
    }
    $empr_form = str_replace('<!-- !!localisation!! -->', $loc, $empr_form);
    if ($pmb_opac_view_activate) {
        $opac_view_tpl = "\n\t\t\t<div class='row' id='g4_r1_f0' movable='yes' draggable='yes' dragtype='circcell' recept='yes' recepttype='circcell' highlight='circcell_highlight' downlight='circcell_downlight' title='" . htmlentities($msg['empr_form_opac_view'], ENT_QUOTES, $charset) . "'>\t\t\t\t\n\t\t\t\t\t!!opac_view!!\n\t\t\t</div>";
        $opac_view = new opac_view(0, $id);
        $opac_view_tpl = str_replace("!!opac_view!!", gen_plus("opac_view", $msg["empr_form_opac_view"], $opac_view->do_sel_list(), 0), $opac_view_tpl);
    }
    $empr_form = str_replace('<!-- !!opac_view!! -->', $opac_view_tpl, $empr_form);
    //Champs persos
    $p_perso = new parametres_perso("empr");
    $perso_ = $p_perso->show_editable_fields($id);
    if (count($perso_["FIELDS"])) {
        $perso = "<div class='row'></div>";
    } else {
        $perso = "";
    }
    $class = "colonne2";
    for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
        $p = $perso_["FIELDS"][$i];
        $perso .= "<div class='{$class}' id='g6_r0_f" . $i . "' movable='yes' draggable='yes' dragtype='circcell' recept='yes' recepttype='circcell' highlight='circcell_highlight' downlight='circcell_downlight' title='" . htmlentities($p['TITRE'], ENT_QUOTES, $charset) . "' >";
        $perso .= "<div class='row'><label for='" . $p["NAME"] . "' class='etiquette'>" . $p["TITRE"] . "</label></div>\n";
        $perso .= "<div class='row'>";
        $perso .= $p["AFF"] . "</div>";
        $perso .= "</div>";
        if ($class == "colonne2") {
            $class = "colonne_suite";
        } else {
            $class = "colonne2";
        }
    }
    if ($class == "colonne_suite") {
        $perso .= "<div class='{$class}'>&nbsp;</div>";
    }
    $perso .= $perso_["CHECK_SCRIPTS"];
    $empr_form = str_replace("!!champs_perso!!", $perso, $empr_form);
    $empr_form = str_replace('!!empr_notice_override!!', get_rights_form($id), $empr_form);
    print pmb_bidi($empr_form);
}