Exemple #1
0
 function show_form($param = '')
 {
     global $msg, $pmb_lecteurs_localises;
     //paramètres pré-enregistré
     $lst_opt = array();
     if ($param['chk_reader']) {
         foreach ($param['chk_reader'] as $elem) {
             $lst_opt[$elem] = $elem;
         }
     }
     $loc_selected = $param["empr_location_id"] ? $param["empr_location_id"] : "";
     $statut_selected = $param["empr_statut_edit"] ? $param["empr_statut_edit"] : "";
     //Choix de l'action à réaliser
     $form_task .= "\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='loan'>" . $this->msg["planificateur_reader_abon"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t<input type='checkbox' name='chk_reader[]' value='reader_abon_fin_proche' " . ($lst_opt["reader_abon_fin_proche"] == "reader_abon_fin_proche" ? "checked" : "") . "/>" . $this->msg["planificateur_reader_abon_fin_proche"] . "\n\t\t\t\t<br /><input type='checkbox' name='chk_reader[]' value='reader_abon_depasse' " . ($lst_opt["reader_abon_depasse"] == "reader_abon_depasse" ? "checked" : "") . "/>" . $this->msg["planificateur_reader_abon_depasse"] . "";
     //				<input type='checkbox' name='chk_reader[]' value='reader_abon_fin_proche_mail' ".(($lst_opt["reader_abon_fin_proche_mail"] == "reader_abon_fin_proche_mail")  ? "checked" : "")."/>".$this->msg["planificateur_reader_abon_fin_proche_mail"]."
     //				<br /><input type='checkbox' name='chk_reader[]' value='reader_abon_fin_proche_pdf' ".(($lst_opt["reader_abon_fin_proche_pdf"] == "reader_abon_fin_proche_pdf")  ? "checked" : "")."/>".$this->msg["planificateur_reader_abon_fin_proche_pdf"]."
     //				<br /><input type='checkbox' name='chk_reader[]' value='reader_abon_depasse_mail' ".(($lst_opt["reader_abon_depasse_mail"] == "reader_abon_depasse_mail")  ? "checked" : "")."/>".$this->msg["planificateur_reader_abon_depasse_mail"]."
     //				<br /><input type='checkbox' name='chk_reader[]' value='reader_abon_depasse_pdf' ".(($lst_opt["reader_abon_depasse_pdf"] == "reader_abon_depasse_pdf")  ? "checked" : "")."/>".$this->msg["planificateur_reader_abon_depasse_pdf"]."
     $form_task .= "</div>\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>";
     //Choix de la localisation
     if ($pmb_lecteurs_localises) {
         $form_task .= "\n\t\t\t<div class='row'>\n\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t<label for='loan'>" . $this->msg["planificateur_reader_loc"] . "</label>\n\t\t\t\t</div>\n\t\t\t\t<div class='colonne_suite'>" . docs_location::gen_combo_box_empr($loc_selected) . "\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class='row'>&nbsp;</div>";
     }
     //Choix du statut
     $form_task .= "\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='loan'>" . $this->msg["planificateur_reader_statut"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>" . gen_liste("select idstatut, statut_libelle from empr_statut", "idstatut", "statut_libelle", "empr_statut_edit", "", $statut_selected, "", "", 0, $msg["all_statuts_empr"]) . "\n\t\t\t</div>\n\t\t</div>";
     return $form_task;
 }
 public function get_form()
 {
     global $nomenclature_instrument_form_tpl, $msg, $charset;
     global $msg;
     $tpl = $nomenclature_instrument_form_tpl;
     if ($this->id) {
         $tpl = str_replace('!!msg_title!!', $msg['admin_nomenclature_instrument_form_edit'], $tpl);
         $tpl = str_replace('!!delete!!', "<input type='button' class='bouton' value='" . $msg['admin_nomenclature_instrument_form_del'] . "'  onclick=\"document.getElementById('action').value='delete';this.form.submit();\"  />", $tpl);
         $name = $this->info['name'];
         $code = $this->info['code'];
         if ($this->info['standard']) {
             $checked = "checked";
         } else {
             $checked = "";
         }
     } else {
         $tpl = str_replace('!!msg_title!!', $msg['admin_nomenclature_instrument_form_add'], $tpl);
         $tpl_objet = "";
         $tpl = str_replace('!!delete!!', "", $tpl);
         $name = "";
         $code = "";
         $checked = "";
     }
     $tpl = str_replace('!!name!!', htmlentities($name, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!code!!', htmlentities($code, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!checked!!', $checked, $tpl);
     $req = "select id_musicstand, concat(musicstand_name,' ( ',family_name,' )')as label from nomenclature_musicstands,nomenclature_families where musicstand_famille_num=id_family order by musicstand_name";
     $musicstand = gen_liste($req, "id_musicstand", "label", "id_musicstand", "", $this->info['musicstand']['id'], 0, $msg["admin_nomenclature_instrument_form_musicstand_no"], 0, $msg["admin_nomenclature_instrument_form_musicstand_no_sel"]);
     $tpl = str_replace('!!musicstand!!', $musicstand, $tpl);
     $tpl = str_replace('!!id!!', $this->id, $tpl);
     return $tpl;
 }
 function get_form()
 {
     global $authperso_form_tpl, $msg, $charset;
     $tpl = $authperso_form_tpl;
     if ($this->id) {
         $tpl = str_replace('!!msg_title!!', $msg['admin_authperso_form_edit'], $tpl);
         $tpl = str_replace('!!delete!!', "<input type='button' class='bouton' value='" . $msg['admin_authperso_delete'] . "'  onclick=\"document.getElementById('auth_action').value='delete';this.form.submit();\"  />", $tpl);
         $name = $this->info['name'];
         $isbd_script = $this->info['isbd_script'];
         $view_script = $this->info['view_script'];
         $comment = $this->info['comment'];
     } else {
         $tpl = str_replace('!!msg_title!!', $msg['admin_authperso_form_add'], $tpl);
         $tpl_objet = "";
         $tpl = str_replace('!!delete!!', "", $tpl);
         $name = "";
         $isbd_script = "";
         $view_script = "";
         $comment = "";
     }
     $notice_onglet_list = gen_liste("SELECT * FROM notice_onglet", "id_onglet", "onglet_name", "notice_onglet", "", $this->info['onglet_num'], 0, $msg["admin_authperso_notice_onglet_no"], 0, $msg["admin_authperso_notice_onglet_sel"]);
     $multi_search_checked = "";
     if ($this->info['opac_multi_search']) {
         $search_multi_checked = " checked='checked' ";
     }
     $search_simple_checked[$this->info['opac_search'] + 0] = " checked='checked' ";
     $search_tpl = "\n\t\t\t<input type='radio' {$search_simple_checked['0']} name='search_simple' value='0' >" . $msg["admin_authperso_opac_search_no"] . "\n\t\t\t<input type='radio' {$search_simple_checked['1']} name='search_simple' value='1' >" . $msg["admin_authperso_opac_search_yes"] . "\n\t\t\t<input type='radio' {$search_simple_checked['2']} name='search_simple' value='2' >" . $msg["admin_authperso_opac_search_yes_active"] . "\n\t\t";
     if ($this->info['gestion_multi_search']) {
         $search_multi_checked_gestion = " checked='checked' ";
     }
     $search_simple_checked_gestion[$this->info['gestion_search'] + 0] = " checked='checked' ";
     $search_tpl_gestion = "\n\t\t\t<input type='radio' {$search_simple_checked_gestion['0']} name='gestion_search_simple' value='0' >" . $msg["admin_authperso_gestion_search_no"] . "\n\t\t\t<input type='radio' {$search_simple_checked_gestion['1']} name='gestion_search_simple' value='1' >" . $msg["admin_authperso_gestion_search_yes"] . "\n\t\t\t<input type='radio' {$search_simple_checked_gestion['2']} name='gestion_search_simple' value='2' >" . $msg["admin_authperso_gestion_search_yes_active"] . "\n\t\t";
     $fields_options = "<select id='fields_options' name='fields_options'>";
     $fields_options .= $this->get_fields_options();
     $fields_options .= "</select>";
     $fields_options_view = "<select id='fields_options_view' name='fields'>";
     $fields_options_view .= $this->get_fields_options();
     $fields_options_view .= "</select>";
     if ($this->info['oeuvre_event']) {
         $tpl = str_replace('!!oeuvre_event!!', " checked='checked' ", $tpl);
     } else {
         $tpl = str_replace('!!oeuvre_event!!', "", $tpl);
     }
     $tpl = str_replace('!!name!!', htmlentities($name, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!notice_onglet_list!!', $notice_onglet_list, $tpl);
     $tpl = str_replace('!!fields_options!!', $fields_options, $tpl);
     $tpl = str_replace('!!isbd_script!!', htmlentities($isbd_script, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!fields_options_view!!', $fields_options_view, $tpl);
     $tpl = str_replace('!!view_script!!', htmlentities($view_script, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!search_simple!!', $search_tpl, $tpl);
     $tpl = str_replace('!!search_multi!!', $search_multi_checked, $tpl);
     $tpl = str_replace('!!search_simple_gestion!!', $search_tpl_gestion, $tpl);
     $tpl = str_replace('!!search_multi_gestion!!', $search_multi_checked_gestion, $tpl);
     $tpl = str_replace('!!comment!!', htmlentities($comment, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!id_authperso!!', $this->id, $tpl);
     return $tpl;
 }
Exemple #4
0
function show_import_choix_fichier($dbh)
{
    global $msg, $deflt2docs_location;
    global $current_module, $PMBuserid;
    print "\n\t<script type='text/javascript'>\n\nfunction display_part(type)\n{\n\tvar type_import = document.getElementById('div_ensae');\n\tif(type == 'ensae')\n\t{\n\t\tvar div_ensae = document.getElementById('div_ensae');\n\t\tdiv_ensae.style.display = 'table-cell';\n\t\tvar div_ensai = document.getElementById('div_ensai');\n\t\tdiv_ensai.style.display = 'none';\t\n\t\ttype_import.value='maj_complete';\n\t\t\n\t} else {\n\t\tvar div_ensae = document.getElementById('div_ensae');\n\t\tdiv_ensae.style.display = 'none';\n\t\tvar div_ensai = document.getElementById('div_ensai');\n\t\tdiv_ensai.style.display = 'table-cell';\n\t\ttype_import.value='insert_or_update';\n\t}\n\t\n} \n</script>\n\t\n\t<form class='form-{$current_module}' name='form1' ENCTYPE=\"multipart/form-data\" method='post' action=\"./admin.php?categ=empr&sub=implec&action=1\">\n\t<h3>Choix du fichier d'import des élèves GENES</h3>\n\t<div class='form-contenu'>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='import_lec'>" . $msg["import_lec_fichier"] . "</label>\n\t        <input name='import_lec' id='import_lec' accept='text/plain' type='file' class='saisie-80em' size='80'>\n\t\t\t</div>\n\t\t<div class='row'>\n\t        <label class='etiquette' for='Sep_Champs'>" . $msg["import_lec_separateur"] . "</label>\n\t        <select name='Sep_Champs' id='Sep_Champs'>\n\t            <option value=';' selected>;</option>\n\t            <option value='.'>.</option>\n\t        </select>\n\t    </div>\n\t    <div class='row'>\n\t        <label class='etiquette' for='file_format'>Format du fichier</label>\n\t        <select name='file_format' id='file_format' onchange='display_part(this.value);'>\n\t            <option value='ensae' selected>ENSAE</option>\n\t            <option value='ensai'>ENSAI</option>\n\t        </select>\n\t    </div>\n\t    <br />\n\t    <div style='display:table'>\n\t    \t<div style='display:table-row'>\n\t\t    \t<div id=div_ensae style='display:table-cell;width:50%'>\n\t\t    \t\t<div class='row'>\n\t\t\t\t\t\t<p>L'ordre des colonnes dans votre fichier doit être :<br />\n\t\t\t\t\t\t<font size='1'>Identifiant de l'étudiant ; Code-barres ; Voie ; Nom ; Prénom ; Mail ; Mail perso ; Numéro de casier ; Civilité ; Année de date de naissance ; Téléphone 1 ; Téléphone 2 ; Identifiant OPAC</font>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t        <input type=hidden name='type_import' id='type_import' value='maj_complete' />\n\t\t\t\t        <label class='etiquette' for='type_import'>Mise à jour complète</label>\n\t\t\t\t        Marquer les lecteurs appartenant aux groupes ci-dessous et ayant pour catégorie et localisation les choix ci-dessous\n\t\t\t\t        <blockquote>" . "\n\t\t\t\t        Et les placer dans le panier suivant: ";
    $requete = "SELECT idemprcaddie, name FROM empr_caddie where (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') order by name ";
    print gen_liste($requete, "idemprcaddie", "name", "idemprcaddie", "", "", "", "", "", "", 0);
    print "</blockquote>\n\t\t\t\t    </div>\n\t\t\t\t    <div class='row'>\n\t\t\t\t\t    <blockquote>\n\t\t\t\t\t    \t<div class='colonne3'>";
    $requete = "SELECT id_groupe, libelle_groupe FROM groupe left join empr_groupe on id_groupe=groupe_id  group by id_groupe, libelle_groupe ORDER BY libelle_groupe ";
    $groupe_form_aff = gen_liste_multiple($requete, "id_groupe", "libelle_groupe", "id_groupe", "id_grp[]", "", $id, 0, $msg[empr_form_aucungroupe], 0, "", 60);
    print "<div class='row'>\n\t\t\t\t\t\t\t\t\t<label for='form_ajoutgroupe' class='etiquette'>Groupes :</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class='row'>" . $groupe_form_aff . "</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class='colonne3'>";
    $requete = "SELECT id_categ_empr, libelle FROM empr_categ ORDER BY libelle ";
    $categ_form_aff = gen_liste($requete, "id_categ_empr", "libelle", "id_categ_empr", "", 36, "", "", "", "", 0);
    print "<div class='row'>\n\t\t\t\t\t\t\t\t\t<label for='form_categ_empr' class='etiquette'>Catégorie de lecteurs :</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class='row'>" . $categ_form_aff . "</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class='colonne_suite'>";
    print "<div class='row'>\n\t\t\t\t\t\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t\t\t\t\t\t<label for='form_empr_location' class='etiquette'>{$msg['empr_location']}:</label>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t\t\t\t\t\t" . docs_location::gen_combo_box_empr($deflt2docs_location, 0) . "\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</blockquote>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id=div_ensai style='display:table-cell;width:50%;display:none'>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<p>L'ordre des colonnes dans votre fichier doit être :<br />\n\t\t\t\t\t\t<font size='1'>Nom ; Prénom ; Mail ; Mail perso ; Catégorie ; Groupe 1 ; Groupe 2 ; Groupe 3 ;  Libellé du statut ; Libellé de la localisation ; Pays ; Date d'adhésion du lecteur ; Date d'expiration du lecteur ; Code-barres ; Identifiant OPAC ; Téléphone 1 ; Téléphone 2</font>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t        \n\t\t\t\t        <label class='etiquette' for='type_import_1'>Insertion uniquement</label>\n\t\t\t\t    </div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>\n\t</div>\n\t<div class='row'>\n\t\t<input name='imp_elv' type='submit' class='bouton' value='Import des élèves'/>\n\t</div>\n\t</form>";
}
Exemple #5
0
function codstat_form($libelle = "", $statisdoc_codage_import = "", $statisdoc_owner = 0, $id = 0)
{
    global $msg;
    global $charset;
    global $admin_codstat_form;
    $admin_codstat_form = str_replace('!!id!!', $id, $admin_codstat_form);
    if (!$id) {
        $admin_codstat_form = str_replace('!!form_title!!', $msg[101], $admin_codstat_form);
    } else {
        $admin_codstat_form = str_replace('!!form_title!!', $msg[102], $admin_codstat_form);
    }
    $admin_codstat_form = str_replace('!!libelle!!', htmlentities($libelle, ENT_QUOTES, $charset), $admin_codstat_form);
    $admin_codstat_form = str_replace('!!libelle_suppr!!', addslashes($libelle), $admin_codstat_form);
    $admin_codstat_form = str_replace('!!statisdoc_codage_import!!', $statisdoc_codage_import, $admin_codstat_form);
    $combo_lender = gen_liste("select idlender, lender_libelle from lenders order by lender_libelle ", "idlender", "lender_libelle", "form_statisdoc_owner", "", $statisdoc_owner, 0, $msg[556], 0, $msg["proprio_generique_biblio"]);
    $admin_codstat_form = str_replace('!!lender!!', $combo_lender, $admin_codstat_form);
    print confirmation_delete("./admin.php?categ=docs&sub=codstat&action=del&id=");
    print $admin_codstat_form;
}
Exemple #6
0
function show_req_add_form($step = 0)
{
    global $dbh, $msg, $charset;
    global $rqt;
    global $req_add_form;
    global $bt_enr_form;
    $form_title = $msg['req_form_tit_add'];
    switch ($step) {
        default:
        case '0':
            $req_add_form = str_replace('!!form_title!!', $form_title, $req_add_form);
            $num_classement = 0;
            $combo_clas = gen_liste("SELECT idproc_classement,libproc_classement FROM procs_classements ORDER BY libproc_classement ", "idproc_classement", "libproc_classement", "form_classement", "", $num_classement, 0, $msg['proc_clas_aucun'], 0, $msg['proc_clas_aucun']);
            $req_add_form = str_replace('!!classement!!', $combo_clas, $req_add_form);
            $req_add_form = str_replace('!!req_name!!', '', $req_add_form);
            $req_add_form = str_replace('!!req_type!!', $rqt->getTypeSelector('1', 'req_typeChg();'), $req_add_form);
            $req_add_form = str_replace('!!req_univ!!', $rqt->getUnivSelector('1', 'req_univChg();'), $req_add_form);
            $req_add_form = str_replace('!!req_comm!!', '', $req_add_form);
            $req_add_form = str_replace('!!req_code!!', '', $req_add_form);
            $req_add_form = str_replace('!!req_auth!!', request::getAutorisationsForm(), $req_add_form);
            break;
    }
    print $req_add_form;
}
 function gen_liste_field($select_name = "p_perso_liste", $selected_id = 0, $msg_no_select)
 {
     global $msg;
     $onchange = "";
     $requete = "select idchamp, name, titre, type, datatype, multiple, obligatoire, ordre ,search, export,exclusion_obligatoire, opac_sort from " . $this->prefix . "_custom order by ordre";
     return gen_liste($requete, "idchamp", "titre", $select_name, $onchange, $selected_id, 0, $msg["parperso_no_field"], 0, $msg_no_select, 0);
 }
 static function gen_tpl_select($select_name = "notice_tpl", $selected_id = 0, $onchange = "", $no_affempty = 0, $no_aff_defaut = 0)
 {
     global $msg, $dbh;
     //
     $requete = "SELECT notpl_id, if(notpl_comment!='',concat(notpl_name,'. ',notpl_comment),notpl_name) as nom FROM notice_tpl where notpl_show_opac=1 ORDER BY notpl_name ";
     $result = pmb_mysql_query($requete, $dbh);
     if (!pmb_mysql_num_rows($result) && !$no_affempty) {
         return '';
     }
     if (!$no_aff_defaut) {
         return gen_liste($requete, "notpl_id", "nom", $select_name, $onchange, $selected_id, 0, $msg["notice_tpl_list_default"], 0, $msg["notice_tpl_list_default"], 0);
     } else {
         return gen_liste($requete, "notpl_id", "nom", $select_name, $onchange, $selected_id, 0, '', 0, '', 0);
     }
 }
 function show_form()
 {
     global $msg;
     global $dbh;
     global $charset, $lang;
     global $search_form_map;
     global $all_query, $typdoc_query, $statut_query, $docnum_query, $pmb_indexation_docnum_allfields, $pmb_indexation_docnum;
     global $categ_query, $thesaurus_auto_postage_search, $auto_postage_query;
     global $thesaurus_concepts_active, $concept_query;
     global $map_echelle_query, $map_projection_query, $map_ref_query, $map_equinoxe_query;
     global $pmb_map_size_search_edition;
     global $pmb_map_base_layer_type;
     global $pmb_map_base_layer_params;
     global $map_emprises_query;
     // on commence par créer le champ de sélection de document
     // récupération des types de documents utilisés.
     $query = "SELECT count(typdoc), typdoc ";
     $query .= "FROM notices where typdoc!='' GROUP BY typdoc";
     $result = @pmb_mysql_query($query, $dbh);
     $toprint_typdocfield .= "  <option value=''>{$msg['tous_types_docs']}</option>\n";
     $doctype = new marc_list('doctype');
     while ($rt = pmb_mysql_fetch_row($result)) {
         $obj[$rt[1]] = 1;
         $qte[$rt[1]] = $rt[0];
     }
     foreach ($doctype->table as $key => $libelle) {
         if ($obj[$key] == 1) {
             $toprint_typdocfield .= "  <option ";
             $toprint_typdocfield .= " value='{$key}'";
             if ($typdoc == $key) {
                 $toprint_typdocfield .= " selected='selected' ";
             }
             $toprint_typdocfield .= ">" . htmlentities($libelle . " (" . $qte[$key] . ")", ENT_QUOTES, $charset) . "</option>\n";
         }
     }
     // récupération des statuts de documents utilisés.
     $query = "SELECT count(statut), id_notice_statut, gestion_libelle ";
     $query .= "FROM notices, notice_statut where id_notice_statut=statut GROUP BY id_notice_statut order by gestion_libelle";
     $result = pmb_mysql_query($query, $dbh);
     $toprint_statutfield .= "  <option value=''>{$msg['tous_statuts_notice']}</option>\n";
     while ($obj = @pmb_mysql_fetch_row($result)) {
         $toprint_statutfield .= "  <option value='{$obj['1']}'";
         if ($statut_query == $obj[1]) {
             $toprint_statutfield .= " selected";
         }
         $toprint_statutfield .= ">" . htmlentities($obj[2] . "  (" . $obj[0] . ")", ENT_QUOTES, $charset) . "</OPTION>\n";
     }
     $search_form_map = str_replace("!!typdocfield!!", $toprint_typdocfield, $search_form_map);
     $search_form_map = str_replace("!!statutfield!!", $toprint_statutfield, $search_form_map);
     $search_form_map = str_replace("!!all_query!!", htmlentities(stripslashes($all_query), ENT_QUOTES, $charset), $search_form_map);
     $search_form_map = str_replace("!!categ_query!!", htmlentities(stripslashes($categ_query), ENT_QUOTES, $charset), $search_form_map);
     if ($thesaurus_concepts_active) {
         $search_form_map = str_replace("!!concept_query!!", htmlentities(stripslashes($concept_query), ENT_QUOTES, $charset), $search_form_map);
     }
     // map
     $layer_params = json_decode($pmb_map_base_layer_params, true);
     $baselayer = "baseLayerType: dojox.geo.openlayers.BaseLayerType." . $pmb_map_base_layer_type;
     if (count($layer_params)) {
         if ($layer_params['name']) {
             $baselayer .= ",baseLayerName:\"" . $layer_params['name'] . "\"";
         }
         if ($layer_params['url']) {
             $baselayer .= ",baseLayerUrl:\"" . $layer_params['url'] . "\"";
         }
         if ($layer_params['options']) {
             $baselayer .= ",baseLayerOptions:" . json_encode($layer_params['options']);
         }
     }
     $size = explode("*", $pmb_map_size_search_edition);
     if (count($size) != 2) {
         $map_size = "width:800px; height:480px;";
     }
     $map_size = "width:" . $size[0] . "px; height:" . $size[1] . "px;";
     if (!$map_emprises_query) {
         $map_emprises_query = array();
     }
     $map_holds = array();
     foreach ($map_emprises_query as $map_hold) {
         $map_holds[] = array("wkt" => $map_hold, "type" => "search", "color" => null, "objects" => array());
     }
     $r = "<div id='map_search' data-dojo-type='apps/map/map_controler' style='{$map_size}' data-dojo-props='" . $baselayer . ",mode:\"search_criteria\",hiddenField:\"map_emprises_query\",searchHolds:" . json_encode($map_holds, true) . "'></div>";
     $search_form_map = str_replace("!!map!!", $r, $search_form_map);
     //champs maps
     $requete = "SELECT map_echelle_id, map_echelle_name FROM map_echelles ORDER BY map_echelle_name ";
     $projections = gen_liste($requete, "map_echelle_id", "map_echelle_name", "map_echelle_query", "", $map_echelle_query, 0, "", 0, $msg['map_echelle_vide']);
     $search_form_map = str_replace("!!map_echelle_list!!", $projections, $search_form_map);
     $requete = "SELECT map_projection_id, map_projection_name FROM map_projections ORDER BY map_projection_name ";
     $projections = gen_liste($requete, "map_projection_id", "map_projection_name", "map_projection_query", "", $map_projection_query, 0, "", 0, $msg['map_projection_vide']);
     $search_form_map = str_replace("!!map_projection_list!!", $projections, $search_form_map);
     $requete = "SELECT map_ref_id, map_ref_name FROM map_refs ORDER BY map_ref_name ";
     $refs = gen_liste($requete, "map_ref_id", "map_ref_name", "map_ref_query", "", $map_ref_query, 0, "", 0, $msg['map_ref_vide']);
     $search_form_map = str_replace("!!map_ref_list!!", $refs, $search_form_map);
     $search_form_map = str_replace("!!map_equinoxe_value!!", $map_equinoxe_query, $search_form_map);
     $checkbox = "";
     if ($thesaurus_auto_postage_search) {
         $checkbox = "\n\t\t\t<div class='colonne'>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<input type='checkbox' !!auto_postage_checked!! id='auto_postage_query' name='auto_postage_query'/><label for='auto_postage_query'>" . $msg["search_autopostage_check"] . "</label>\n\t\t\t\t</div>\n\t\t\t</div>";
         $checkbox = str_replace("!!auto_postage_checked!!", $auto_postage_query ? 'checked' : '', $checkbox);
     }
     $search_form_map = str_replace("!!auto_postage!!", $checkbox, $search_form_map);
     if ($pmb_indexation_docnum) {
         $checkbox = "<div class='colonne'>\n\t\t\t<div class='row'>\n\t\t\t<input type='checkbox' !!docnum_query_checked!! id='docnum_query' name='docnum_query'/><label for='docnum_query'>{$msg['docnum_indexation']}</label>\n\t\t\t</div>\n\t\t\t</div>";
         $checkbox = str_replace("!!docnum_query_checked!!", $pmb_indexation_docnum_allfields || $docnum_query ? 'checked' : '', $checkbox);
         $search_form_map = str_replace("!!docnum_query!!", $checkbox, $search_form_map);
     } else {
         $search_form_map = str_replace("!!docnum_query!!", '', $search_form_map);
     }
     $search_form_map = str_replace("!!base_url!!", $this->base_url, $search_form_map);
     print pmb_bidi($search_form_map);
 }
Exemple #10
0
 if ($field == "deflt_styles") {
     $deflt_user_style = "\n\t\t\t\t\t\t<div class='colonne60'><div class='row'>" . $msg[$field] . "&nbsp;:&nbsp;</div></div>\n\n\t\t\t\t\t\t<div class='colonne_suite'><div_class='row'>" . make_user_style_combo($field_values[$i]) . "</div></div>\n";
 } elseif ($field == "deflt_docs_location") {
     //visibilité des exemplaires
     if ($pmb_droits_explr_localises && $explr_visible_mod) {
         $where_clause_explr = "idlocation in (" . $explr_visible_mod . ") and";
     } else {
         $where_clause_explr = "";
     }
     $selector = gen_liste("select distinct idlocation, location_libelle from docs_location, docsloc_section where {$where_clause_explr} num_location=idlocation order by 2 ", "idlocation", "location_libelle", 'form_' . $field, "account_calcule_section(this);", $field_values[$i], "", "", "", "", 0);
     $deflt_user .= "\n\t\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . "&nbsp;:&nbsp;</div>\n\n\t\t\t\t\t\t<div class='colonne_suite'>" . $selector . "</div></div>\n";
 } elseif ($field == "deflt_collstate_location") {
     $selector = gen_liste("select distinct idlocation, location_libelle from docs_location order by 2 ", "idlocation", "location_libelle", 'form_' . $field, "", $field_values[$i], "", "", "0", $msg["all_location"], 0);
     $deflt_user .= "\n\t\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . "&nbsp;:&nbsp;</div>\n\n\t\t\t\t\t\t<div class='colonne_suite'>" . $selector . "</div></div>\n";
 } elseif ($field == "deflt_resas_location") {
     $selector = gen_liste("select distinct idlocation, location_libelle from docs_location order by 2 ", "idlocation", "location_libelle", 'form_' . $field, "", $field_values[$i], "", "", "0", $msg["all_location"], 0);
     $deflt_user .= "\n\t\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . "&nbsp;:&nbsp;</div>\n\n\t\t\t\t\t\t<div class='colonne_suite'>" . $selector . "</div></div>\n";
 } elseif ($field == "deflt_docs_section") {
     // calcul des sections
     $selector = "";
     if ($pmb_droits_explr_localises && $explr_visible_mod) {
         $where_clause_explr = "where idlocation in (" . $explr_visible_mod . ")";
     } else {
         $where_clause_explr = "";
     }
     $rqtloc = "SELECT idlocation FROM docs_location {$where_clause_explr} order by location_libelle";
     $resloc = mysql_query($rqtloc, $dbh);
     while ($loc = mysql_fetch_object($resloc)) {
         $requete = "SELECT idsection, section_libelle FROM docs_section, docsloc_section where idsection=num_section and num_location='{$loc->idlocation}' order by section_libelle";
         $result = mysql_query($requete, $dbh);
         $nbr_lignes = mysql_num_rows($result);
 public function get_form()
 {
     global $dbh, $msg;
     global $map_edition_tpl;
     global $map_edition_all_tpl;
     $form_map = "";
     $map_edition_tpl = "\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<label class='etiquette' for='f_map_echelle'>" . $msg["map_echelle"] . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t!!map_echelle_list!!\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' for='f_map_projection'>" . $msg["map_projection"] . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t!!map_projection_list!!\n\t\t\t\t\t</div>\t\t\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<label class='etiquette' for='f_map_ref'>" . $msg["map_ref"] . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t!!map_ref_list!!\n\t\t\t\t\t</div>\t\t\t\t\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<label class='etiquette' for='f_map_equinoxe'>" . $msg["map_equinoxe"] . "</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<input id='f_map_equinoxe' class='saisie-80em' type='text' value='!!map_equinoxe_value!!' name='f_map_equinoxe'>\n\t\t\t\t\t</div>\n\t\t\t\t";
     $form_map = $map_edition_tpl;
     $requete = "SELECT map_echelle_id, map_echelle_name FROM map_echelles ORDER BY map_echelle_name ";
     $projections = gen_liste($requete, "map_echelle_id", "map_echelle_name", "f_map_echelle", "", $this->map['echelle_num'], 0, "", 0, $msg['map_echelle_vide']);
     $form_map = str_replace("!!map_echelle_list!!", $projections, $form_map);
     $requete = "SELECT map_projection_id, map_projection_name FROM map_projections ORDER BY map_projection_name ";
     $projections = gen_liste($requete, "map_projection_id", "map_projection_name", "f_map_projection", "", $this->map['projection_num'], 0, "", 0, $msg['map_projection_vide']);
     $form_map = str_replace("!!map_projection_list!!", $projections, $form_map);
     $requete = "SELECT map_ref_id, map_ref_name FROM map_refs ORDER BY map_ref_name ";
     $refs = gen_liste($requete, "map_ref_id", "map_ref_name", "f_map_ref", "", $this->map['ref_num'], 0, "", 0, $msg['map_ref_vide']);
     $form_map = str_replace("!!map_ref_list!!", $refs, $form_map);
     $form_map = str_replace("!!map_equinoxe_value!!", $this->map['equinoxe'], $form_map);
     $form_map = str_replace("!!id!!", $this->id, $form_map);
     return $form_map;
 }
function gen_liste_classement($type_classement = "BAN", $id_classement = 0, $onchange = "")
{
    global $msg;
    return gen_liste("select id_classement, nom_classement from classements where id_classement=1 UNION select id_classement, nom_classement from classements where type_classement='{$type_classement}' order by nom_classement", "id_classement", "nom_classement", "id_classement", $onchange, $id_classement, "", "", 0, $msg['dsi_all_classements'], 0);
}
Exemple #13
0
 static function gen_tpl_select($select_name = "notice_tpl", $selected_id = 0)
 {
     global $msg;
     $requete = "SELECT notpl_id, concat(notpl_name,'. ',notpl_comment) as nom  FROM notice_tpl ORDER BY notpl_name ";
     $onchange = "";
     return gen_liste($requete, "notpl_id", "nom", $select_name, $onchange, $selected_id, 0, $msg["notice_tpl_list_default"], 0, $msg["notice_tpl_list_default"], 0);
 }
function location_form($libelle = "", $locdoc_codage_import = "", $locdoc_owner = 0, $id = 0, $location_pic = "", $location_visible_opac = 1, $name = "", $adr1 = "", $adr2 = "", $cp = "", $town = "", $state = "", $country = "", $phone = "", $email = "", $website = "", $logo = "", $commentaire = "", $num_infopage = 0, $css_style = "", $surloc_used = 0)
{
    global $msg;
    global $admin_location_form;
    global $charset, $sur_loc_selector;
    $admin_location_form = str_replace('!!id!!', $id, $admin_location_form);
    if (!$id) {
        $admin_location_form = str_replace('!!form_title!!', $msg[106], $admin_location_form);
    } else {
        $admin_location_form = str_replace('!!form_title!!', $msg[107], $admin_location_form);
    }
    $admin_location_form = str_replace('!!libelle!!', htmlentities($libelle, ENT_QUOTES, $charset), $admin_location_form);
    $admin_location_form = str_replace('!!libelle_suppr!!', htmlentities(addslashes($libelle), ENT_QUOTES, $charset), $admin_location_form);
    $admin_location_form = str_replace('!!location_pic!!', htmlentities($location_pic, ENT_QUOTES, $charset), $admin_location_form);
    if ($location_visible_opac) {
        $checkbox = "checked";
    } else {
        $checkbox = "";
    }
    $admin_location_form = str_replace('!!checkbox!!', $checkbox, $admin_location_form);
    $admin_location_form = str_replace('!!locdoc_codage_import!!', $locdoc_codage_import, $admin_location_form);
    $combo_lender = gen_liste("select idlender, lender_libelle from lenders order by lender_libelle ", "idlender", "lender_libelle", "form_locdoc_owner", "", $locdoc_owner, 0, $msg[556], 0, $msg["proprio_generique_biblio"]);
    $admin_location_form = str_replace('!!lender!!', $combo_lender, $admin_location_form);
    $admin_location_form = str_replace('!!sur_loc_selector!!', $sur_loc_selector, $admin_location_form);
    if ($surloc_used) {
        $checkbox = "checked";
    } else {
        $checkbox = "";
    }
    $admin_location_form = str_replace('!!checkbox_use_surloc!!', $checkbox, $admin_location_form);
    $admin_location_form = str_replace('!!loc_name!!', htmlentities($name, ENT_QUOTES, $charset), $admin_location_form);
    $admin_location_form = str_replace('!!loc_adr1!!', htmlentities($adr1, ENT_QUOTES, $charset), $admin_location_form);
    $admin_location_form = str_replace('!!loc_adr2!!', htmlentities($adr2, ENT_QUOTES, $charset), $admin_location_form);
    $admin_location_form = str_replace('!!loc_cp!!', $cp, $admin_location_form);
    $admin_location_form = str_replace('!!loc_town!!', htmlentities($town, ENT_QUOTES, $charset), $admin_location_form);
    $admin_location_form = str_replace('!!loc_state!!', htmlentities($state, ENT_QUOTES, $charset), $admin_location_form);
    $admin_location_form = str_replace('!!loc_country!!', htmlentities($country, ENT_QUOTES, $charset), $admin_location_form);
    $admin_location_form = str_replace('!!loc_phone!!', $phone, $admin_location_form);
    $admin_location_form = str_replace('!!loc_email!!', $email, $admin_location_form);
    $admin_location_form = str_replace('!!loc_website!!', $website, $admin_location_form);
    $admin_location_form = str_replace('!!loc_logo!!', $logo, $admin_location_form);
    $admin_location_form = str_replace('!!loc_commentaire!!', htmlentities($commentaire, ENT_QUOTES, $charset), $admin_location_form);
    $requete = "SELECT id_infopage, title_infopage FROM infopages where valid_infopage=1 ORDER BY title_infopage ";
    $infopages = gen_liste($requete, "id_infopage", "title_infopage", "form_num_infopage", "", $num_infopage, 0, $msg["location_no_infopage"], 0, $msg["location_no_infopage"], 0);
    $admin_location_form = str_replace('!!loc_infopage!!', $infopages, $admin_location_form);
    $admin_location_form = str_replace('!!css_style!!', $css_style, $admin_location_form);
    print confirmation_delete("./admin.php?categ=docs&sub=location&action=del&id=");
    print $admin_location_form;
}
 public function get_form()
 {
     global $msg, $charset;
     global $editions_state_form;
     $form = str_replace('!!id!!', $this->id, $editions_state_form);
     //positionnement auto sur le dernier onglet, ca marche tout seul, pas besoin de s'en soucier !
     global $editionsstate_active_tab;
     $form = str_replace('!!active_tab!!', htmlentities($editionsstate_active_tab, ENT_QUOTES, $charset), $form);
     //Titre du formulaire
     if (!$this->id) {
         $form = str_replace('!!form_title!!', $msg[704], $form);
     } else {
         $form = str_replace('!!form_title!!', $msg["procs_modification"], $form);
     }
     //nom
     $form = str_replace('!!name!!', htmlentities($this->name, ENT_QUOTES, $charset), $form);
     //commentaire
     $form = str_replace('!!comment!!', htmlentities($this->comment, ENT_QUOTES, $charset), $form);
     //classement
     $combo_clas = gen_liste("SELECT idproc_classement,libproc_classement FROM procs_classements ORDER BY libproc_classement ", "idproc_classement", "libproc_classement", "editions_state_classement", "", $this->classement, 0, $msg[proc_clas_aucun], 0, $msg[proc_clas_aucun]);
     $form = str_replace('!!classement!!', $combo_clas, $form);
     //source de données
     $datasource_options = "\n\t\t\t<option value='0'>" . $msg['editions_state_datasource_choice'] . "</options>";
     $datasources_list = $this->datasource->get_datasources_list();
     foreach ($datasources_list as $data_key => $label) {
         $datasource_options .= "\n\t\t\t<option value='" . htmlentities($data_key, ENT_QUOTES, $charset) . "' " . ($this->used_datasource == $data_key ? "selected='selected'" : "") . ">" . htmlentities($label, ENT_QUOTES, $charset) . "</option>";
     }
     //
     //		$datasource_options.="
     //			<option value='editions_datasource_loans' ".($this->used_datasource == "editions_datasource_loans" ? "selected='selected'":"").">Prêts</option>";
     $form = str_replace('!!datasource_options!!', $datasource_options, $form);
     if (count($this->state_fields_list['filters']['content']) || count($this->state_fields_list['fields']['content'])) {
         //J'ai commencé à créer un état je ne peux donc pas changer de source
         $form = str_replace('!!datasource_readonly!!', "disabled='disabled'", $form);
         $form = str_replace('<!--editions_state_datasource-->', "<input type='hidden' name='editions_state_datasource' id='editions_state_datasource' value='" . $this->used_datasource . "'/>", $form);
     } else {
         $form = str_replace('!!datasource_readonly!!', "", $form);
     }
     if (!$this->used_datasource) {
         $form = str_replace("!!tabs!!", "", $form);
     } else {
         $form = str_replace("!!tabs!!", $this->get_tabs_form(), $form);
     }
     $del_button = "";
     if ($this->id) {
         $del_button = "<input type='button' class='bouton' value=' {$msg['supprimer']} ' onClick='confirm_delete(" . $this->id . ")' />\n\t\t\t<script type='text/javascript'>\n\t\t\t\tfunction confirm_delete(id){\n\t\t\t\t\tif(confirm('" . addslashes($msg['editions_state_confirm_delete']) . "')){\n\t\t\t\t\t\tdocument.location='./edit.php?categ=state&action=delete&id='+id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</script>\n\t\t\t";
     }
     $form = str_replace("!!del_button!!", $del_button, $form);
     return $form;
 }
Exemple #16
0
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once "{$include_path}/expl_info.inc.php";
// Titre de la fenêtre
echo window_title($database_window_title . $msg[transferts_circ_menu_reset] . $msg[1003] . $msg[1001]);
//creation de l'objet transfert
$obj_transfert = new transfert();
$form = do_cb_expl($msg[transferts_circ_menu_titre] . " > " . $msg[transferts_circ_menu_reset], $msg[661], $msg[transferts_circ_reset_exemplaire], "./circ.php?categ=trans&sub=" . $sub, 0);
if (!$f_ex_location) {
    $f_ex_location = $deflt_docs_location;
}
if (!$f_ex_statut) {
    $f_ex_statut = $deflt_docs_statut;
}
$form_suite = "\n\t<div class='row'>\n\t\t<label class='f_ex_location' for='form_cb_expl'>{$msg['298']}</label>\n\t</div>\n\t<div class='row'>\n\t\t" . gen_liste("select distinct idlocation, location_libelle from docs_location order by location_libelle", "idlocation", "location_libelle", 'f_ex_location', "calcule_section(this);", $f_ex_location, "", "", "", "", 0) . "\n\t</div>\n\t<script type='text/javascript'>\n\tfunction calcule_section(selectBox) {\n\t\tfor (i=0; i<selectBox.options.length; i++) {\n\t\t\tid=selectBox.options[i].value;\n\t\t    list=document.getElementById(\"docloc_section\"+id);\n\t\t    list.style.display=\"none\";\n\t\t}\n\t\n\t\tid=selectBox.options[selectBox.selectedIndex].value;\n\t\tlist=document.getElementById(\"docloc_section\"+id);\n\t\tlist.style.display=\"block\";\n\t}\n\t</script>\n\t<div class='row'>\n\t\t<label class='etiquette' for='f_ex_section'>{$msg['295']}</label>\n\t</div>\n\t<div class='row'>";
$expl = new exemplaire();
$form_suite .= $expl->do_selector();
$form_suite .= "\t</div>\n\t<div class='row'>\n\t\t<label class='etiquette' for='f_ex_statut'>{$msg['297']}</label>\n\t</div>\r\n\t<div class='row'>\r\n\t\t" . do_selector('docs_statut', 'f_ex_statut', $f_ex_statut) . "\r\n\t</div>";
$form = str_replace('<!-- !!suite!! -->', $form_suite, $form);
print $form;
//si cb
if ($form_cb_expl != "") {
    $formlocid = "f_ex_section" . $f_ex_location;
    $expl_section = ${$formlocid};
    $query = "select * from exemplaires where expl_cb='" . $form_cb_expl . "' ";
    $result = pmb_mysql_query($query, $dbh);
    $expl_info = pmb_mysql_fetch_object($result);
    if ($expl_info->expl_id) {
        // Reset des transferts en cours
        $rqt = "UPDATE transferts,transferts_demande, exemplaires set etat_transfert=1, etat_demande=7\t\t\t\t\t\t\t\n\t\t\t\tWHERE id_transfert=num_transfert and num_expl=expl_id  and etat_transfert=0 AND expl_cb='" . $form_cb_expl . "' ";
Exemple #17
0
 function do_form()
 {
     global $msg;
     global $tpl_sur_location_form, $tpl_docs_loc_table_line;
     global $charset;
     $tpl = $tpl_sur_location_form;
     $tpl = str_replace('!!id!!', $this->id, $tpl);
     if ($this->id) {
         $tpl = str_replace('!!form_title!!', $msg["sur_location_modifier_title"], $tpl);
     } else {
         $tpl = str_replace('!!form_title!!', $msg["sur_location_ajouter_title"], $tpl);
     }
     $tpl = str_replace('!!libelle!!', htmlentities($this->libelle, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!libelle_suppr!!', htmlentities(addslashes($this->libelle), ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!location_pic!!', htmlentities($this->pic, ENT_QUOTES, $charset), $tpl);
     if ($this->visible_opac) {
         $checkbox = "checked";
     } else {
         $checkbox = "";
     }
     $tpl = str_replace('!!checkbox!!', $checkbox, $tpl);
     $lines = "";
     $pair = "odd";
     foreach ($this->docs_location_data as $docs_loc) {
         $line = $tpl_docs_loc_table_line;
         if ($pair != "odd") {
             $pair = "odd";
         } else {
             $pair = "even";
         }
         $style = "cursor: pointer;";
         if ($docs_loc["surloc_num"] == $this->id) {
             $checked = " checked='checked' ";
         } else {
             $checked = "";
         }
         if ($docs_loc["location_visible_opac"]) {
             $visible = "X";
         } else {
             $visible = "&nbsp;";
         }
         $line = str_replace('!!docs_loc_visible_opac!!', $visible, $line);
         $line = str_replace('!!odd_even!!', $pair, $line);
         $line = str_replace('!!docs_loc_id!!', $docs_loc["idlocation"], $line);
         $line = str_replace('!!checkbox!!', $checked, $line);
         $line = str_replace('!!docs_loc_libelle!!', htmlentities($docs_loc["location_libelle"], ENT_QUOTES, $charset), $line);
         $line = str_replace('!!docs_loc_comment!!', htmlentities($docs_loc["commentaire"], ENT_QUOTES, $charset), $line);
         $lines .= $line;
     }
     $tpl = str_replace('!!docs_loc_lines!!', $lines, $tpl);
     $tpl = str_replace('!!loc_name!!', htmlentities($this->name, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!loc_adr1!!', htmlentities($this->adr1, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!loc_adr2!!', htmlentities($this->adr2, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!loc_cp!!', $this->cp, $tpl);
     $tpl = str_replace('!!loc_town!!', htmlentities($this->town, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!loc_state!!', htmlentities($this->state, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!loc_country!!', htmlentities($this->country, ENT_QUOTES, $charset), $tpl);
     $tpl = str_replace('!!loc_phone!!', $this->phone, $tpl);
     $tpl = str_replace('!!loc_email!!', $this->email, $tpl);
     $tpl = str_replace('!!loc_website!!', $this->website, $tpl);
     $tpl = str_replace('!!loc_logo!!', $this->logo, $tpl);
     $tpl = str_replace('!!loc_commentaire!!', htmlentities($this->comment, ENT_QUOTES, $charset), $tpl);
     $requete = "SELECT id_infopage, title_infopage FROM infopages where valid_infopage=1 ORDER BY title_infopage ";
     $infopages = gen_liste($requete, "id_infopage", "title_infopage", "form_num_infopage", "", $this->num_infopage, 0, $msg[location_no_infopage], 0, $msg[location_no_infopage], 0);
     $tpl = str_replace('!!loc_infopage!!', $infopages, $tpl);
     $tpl = str_replace('!!css_style!!', $this->css_style, $tpl);
     return confirmation_delete("./admin.php?categ=docs&sub=sur_location&action=del&id=") . $tpl;
 }
Exemple #18
0
$admin_chklnk_form = "\n\t<form class='form-{$current_module}' id='login' method='post' action='./admin.php'>\n\t<h3>" . $msg['chklnk_titre'] . "</h3>\n\t<div class='form-contenu'>\n\t\t<div class='row'>\n\t\t\t<input type='checkbox' checked name='chkrestrict' value='1'>&nbsp;<label class='etiquette' >" . $msg['chklnk_restrict'] . "</label>\n\t\t\t<blockquote>";
$requetenoti = "SELECT idcaddie, name FROM caddie where type='NOTI' and (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') order by name ";
$requetebull = "SELECT idcaddie, name FROM caddie where type='BULL' and (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') order by name ";
$requeteexpl = "SELECT idcaddie, name FROM caddie where type='EXPL' and (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') order by name ";
$admin_chklnk_form .= "\n\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t<label class='etiquette' >" . $msg['chklnk_restrict_by_basket_noti'] . "</label><br />\n\t\t\t\t\t" . gen_liste($requetenoti, "idcaddie", "name", "idcaddienoti[]", "", "", "", "", "", "", 1, "style='width:100%;'") . "\n\t\t\t\t</div>\n\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t<label class='etiquette' >" . $msg['chklnk_restrict_by_basket_bull'] . "</label><br />\n\t\t\t\t\t" . gen_liste($requetebull, "idcaddie", "name", "idcaddiebull[]", "", "", "", "", "", "", 1, "style='width:100%;'") . "\n\t\t\t\t</div>\n\t\t\t\t<div class='colonne3'>\n\t\t\t\t\t<label class='etiquette' >" . $msg['chklnk_restrict_by_basket_expl'] . "</label><br />\n\t\t\t\t\t" . gen_liste($requeteexpl, "idcaddie", "name", "idcaddieexpl[]", "", "", "", "", "", "", 1, "style='width:100%;'") . "\n\t\t\t\t</div>\n\t\t\t</blockquote>\n\t\t</div>\n\t\t<h3>" . $msg['chklnk_titre_notice'] . "</h3>\n\t\t<div class='row'>\n\t\t\t<input type='checkbox' checked name='chknoti' value='1'>&nbsp;<label class='etiquette' >" . $msg['chklnk_chk_noti'] . "</label>&nbsp;\n\t\t<blockquote>\n\t\t\t<input type='checkbox' name='ajtnoti' value='1'>&nbsp;" . $msg['chklnk_choix_caddie_noti'] . "\n\t        ";
$requetetmpcad = "SELECT idcaddie, name FROM caddie where type='NOTI' and (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') order by name ";
$admin_chklnk_form .= gen_liste($requetetmpcad, "idcaddie", "name", "idcaddienot", "", "", "", "", "", "", 0);
$admin_chklnk_form .= "</blockquote>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<input type='checkbox' checked name='chkcp' value='1'>&nbsp;<label class='etiquette' >" . $msg['chklnk_chk_cp'] . "</label>&nbsp;\n\t\t<blockquote>\n\t\t\t<input type='checkbox' name='ajtcp' value='1'>&nbsp;" . $msg['chklnk_choix_caddie_cp'] . "\n\t        ";
$requetetmpcad = "SELECT idcaddie, name FROM caddie where type='NOTI' and (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') order by name ";
$admin_chklnk_form .= gen_liste($requetetmpcad, "idcaddie", "name", "idcaddiecp", "", "", "", "", "", "", 0);
$admin_chklnk_form .= "</blockquote>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<input type='checkbox' checked name='chkenum' value='1'>&nbsp;<label class='etiquette' >" . $msg['chklnk_chk_enum'] . "</label>&nbsp;\n\t\t<blockquote>\n\t\t\t<input type='checkbox' name='ajtenum' value='1'>&nbsp;" . $msg['chklnk_choix_caddie_enum'] . "\n\t        ";
$requetetmpcad = "SELECT idcaddie, name FROM caddie where type='NOTI' and (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') order by name ";
$admin_chklnk_form .= gen_liste($requetetmpcad, "idcaddie", "name", "idcaddielnk", "", "", "", "", "", "", 0);
$admin_chklnk_form .= "</blockquote>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<input type='checkbox' checked name='chkbull' value='1'>&nbsp;<label class='etiquette' >" . $msg['chklnk_chk_bull'] . "</label>&nbsp;\n\t\t<blockquote>\n\t\t\t<input type='checkbox' name='ajtbull' value='1'>&nbsp;" . $msg['chklnk_choix_caddie_bull'] . "\n\t        ";
$requetetmpcad = "SELECT idcaddie, name FROM caddie where type='BULL' and (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') order by name ";
$admin_chklnk_form .= gen_liste($requetetmpcad, "idcaddie", "name", "idcaddiebul", "", "", "", "", "", "", 0);
$admin_chklnk_form .= "</blockquote>\n\t\t</div>\n\t\t<h3>" . $msg['chklnk_titre_autorites'] . "</h3>\n\t\t<div class='row'>\n\t\t\t<input type='checkbox' checked name='chkautaut' value='1'>&nbsp;<label class='etiquette' >" . $msg['chklnk_chk_autaut'] . "</label>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<input type='checkbox' checked name='chkautpub' value='1'>&nbsp;<label class='etiquette' >" . $msg['chklnk_chk_autpub'] . "</label>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<input type='checkbox' checked name='chkautcol' value='1'>&nbsp;<label class='etiquette' >" . $msg['chklnk_chk_autcol'] . "</label>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<input type='checkbox' checked name='chkautsco' value='1'>&nbsp;<label class='etiquette' >" . $msg['chklnk_chk_autsco'] . "</label>\n\t\t</div>";
if ($cms_active) {
    $admin_chklnk_form .= "<h3>" . $msg['chklnk_titre_editorial_content'] . "</h3>\n\t\t<div class='row'>\n\t\t\t<input type='checkbox' checked name='chkeditorialcontentcp' value='1'>&nbsp;<label class='etiquette' >" . $msg['chklnk_editorial_content_chk_cp'] . "</label>\n\t\t</div>";
}
$admin_chklnk_form .= "<h3>" . $msg['chklnk_curl_timeout'] . "</h3>\n\t\t<div class='row'>\n\t\t\t<input type='text' class='saisie-10em' name='chkcurltimeout' value='" . $pmb_curl_timeout . "' />\n\t\t</div>\n\t\t</div>\n\n\t<!--\tBouton d'envoi\t-->\n\t<div class='row'>\n\t\t<input type='hidden' name='suite' value='OK' />\n\t\t<input type='hidden' name='categ' value='chklnk' />\n\t\t<input type='submit' class='bouton' value=\"" . $msg['chklnk_bt_lancer'] . "\" />\n\t</div>\n\t</form>\n\t";
$admin_menu_infopages = "\n<h1><span>" . $msg['admin_menu_opac'] . " > !!menu_sous_rub!!</span></h1>\n";
// $admin_infopages_form : template form des pages d'info
$admin_infopages_form = "\n<form class='form-{$current_module}' name='infopagesform' method=post action=\"./admin.php?categ=infopages&sub=infopages&action=update&id=!!id!!\">\n<h3><span onclick='menuHide(this,event)'>!!form_title!!</span></h3>\n<!--    Contenu du form    -->\n<div class='form-contenu'>\n\t<div class='row'>\n\t<div class='colonne2'>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='form_title_infopage'>" . $msg['infopage_title_infopage'] . "</label>\n\t\t\t</div>\n\t\t<div class='row'>\n\t\t\t<input type=text name='form_title_infopage' value=\"!!title_infopage!!\" class='saisie-50em' />\n\t\t\t</div>\n\t</div>\n\t<div class='colonne_suite'>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='form_valid_infopage'>" . $msg['infopage_valid_infopage'] . "</label>\n\t\t\t<input type=checkbox name='form_valid_infopage' value='1' !!checkbox!! class='checkbox' /><br />\n\t\t\t<label class='etiquette' for='form_restrict_infopage'>" . $msg['infopage_restrict_infopage'] . "</label>\n\t\t\t<input type=checkbox name='form_restrict_infopage' value='1' !!restrict_checkbox!! class='checkbox' />\n\t\t</div>\n\t</div>\n\t<div class='row'>\n\t\t<label class='etiquette' for='form_content_infopage'>" . $msg['infopages_content_infopage'] . "</label>\n\t\t</div>\n\t<div class='row'>\n\t\t<textarea id='form_content_infopage' name='form_content_infopage' cols='120' rows='40'>!!content_infopage!!</textarea>\n\t\t</div>\n\n\t</div>\n<!-- Boutons -->\n<div class='row'>\n\t<div class='left'>\n\t\t<input class='bouton' type='button' value=' {$msg['76']} ' onClick=\"document.location='./admin.php?categ=infopages&sub=infopages'\" />&nbsp;\n\t\t<input class='bouton' type='submit' value=' {$msg['77']} ' onClick=\"return test_form(this.form)\" />\n\t\t</div>\n\t<div class='right'>\n\t\t<input class='bouton' type='button' value=' {$msg['supprimer']} ' onClick=\"javascript:confirmation_delete(!!id!!,'!!libelle_suppr!!')\" />\n\t\t</div>\n</div>\n<div class='row'></div>\n</form>\n<script type='text/javascript'>document.forms['infopagesform'].elements['form_title_infopage'].focus();</script>\n";
// $admin_group_form : template groupe
$admin_group_form = "\n<form class='form-{$current_module}' name='groupform' method=post action=\"./admin.php?categ=users&sub=groups&action=update&id=!!id!!\">\n<h3><span onclick='menuHide(this,event)'>!!form_title!!</span></h3>\n<!--    Contenu du form    -->\n<div class='form-contenu'>\n\t<div class='row'>\n\t\t<label class='etiquette' for='form_libelle'>" . $msg['admin_usr_grp_lib'] . "</label>\n\t\t</div>\n\t<div class='row'>\n\t\t<input type=text id='form_libelle' name='form_libelle' value='!!libelle!!' class='saisie-50em' />\n\t\t</div>\n\t</div>\n<!-- Boutons -->\n<div class='row'>\n\t<div class='left'>\n\t\t<input class='bouton' type='button' value=' {$msg['76']} ' onClick=\"document.location='./admin.php?categ=users&sub=groups'\" />&nbsp;\n\t\t<input class='bouton' type='submit' value=' {$msg['77']} ' onClick=\"return test_form(this.form)\" />\n\t</div>\n\t<div class='right'>\n\t\t<input class='bouton' type='button' value='" . $msg['supprimer'] . "' onClick=\"javascript:confirmation_delete(!!id!!,'!!libelle_suppr!!')\" />\n\t</div>\n</div>\n<div class='row'></div>\n</form>\n<script type='text/javascript'>document.forms['groupform'].elements['form_libelle'].focus();</script>\n";
//Planificateur
$admin_menu_planificateur = "\n<h1>" . $msg["admin_menu_modules"] . " > " . $msg["planificateur_admin_menu"] . "<span> > !!menu_sous_rub!!</span></h1>\n<div class='hmenu'>\n\t<span" . ongletSelect("categ=planificateur&sub=manager") . ">\n\t\t<a title='" . $msg["planificateur_admin_manager"] . "' href='./admin.php?categ=planificateur&sub=manager'>\n\t\t\t" . $msg["planificateur_admin_manager"] . "\n\t\t</a>\n\t</span>\n\t<span" . ongletSelect("categ=planificateur&sub=reporting") . ">\n\t\t<a title='" . $msg["planificateur_admin_reporting"] . "' href='./admin.php?categ=planificateur&sub=reporting'>\n\t\t\t" . $msg["planificateur_admin_reporting"] . "\n\t\t</a>\n\t</span>\n</div>";
// $admin_menu_authorities : menu Autorités
$admin_menu_authorities = "\n<h1>{$msg['admin_menu_authorities']} <span>> !!menu_sous_rub!!</span></h1>\n<div class='hmenu'>\n\t<span" . ongletSelect("categ=notices&sub=orinot") . ">\n\t\t<a title='" . $msg['origins'] . "' href='./admin.php?categ=authorities&sub=origins&action='>\n\t\t\t" . $msg['origins'] . "\n\t\t</a>\n\t</span>\n\t<span" . ongletSelect("categ=notices&sub=perso") . ">\n\t\t<a title='{$msg['admin_menu_docs_perso_author']}' href='./admin.php?categ=authorities&sub=perso&type_field=author&action='>\n\t\t\t{$msg['admin_menu_docs_perso_author']}\n\t\t</a>\n\t</span>\n\t<span" . ongletSelect("categ=notices&sub=perso") . ">\n\t\t<a title='{$msg['admin_menu_docs_perso_categ']}' href='./admin.php?categ=authorities&sub=perso&type_field=categ&action='>\n\t\t\t{$msg['admin_menu_docs_perso_categ']}\n\t\t</a>\n\t</span>\n\t<span" . ongletSelect("categ=notices&sub=perso") . ">\n\t\t<a title='{$msg['admin_menu_docs_perso_publisher']}' href='./admin.php?categ=authorities&sub=perso&type_field=publisher&action='>\n\t\t\t{$msg['admin_menu_docs_perso_publisher']}\n\t\t</a>\n\t</span>\n\t<span" . ongletSelect("categ=notices&sub=perso") . ">\n\t\t<a title='{$msg['admin_menu_docs_perso_collection']}' href='./admin.php?categ=authorities&sub=perso&type_field=collection&action='>\n\t\t\t{$msg['admin_menu_docs_perso_collection']}\n\t\t</a>\n\t</span>\n\t<span" . ongletSelect("categ=notices&sub=perso") . ">\n\t\t<a title='{$msg['admin_menu_docs_perso_subcollection']}' href='./admin.php?categ=authorities&sub=perso&type_field=subcollection&action='>\n\t\t\t{$msg['admin_menu_docs_perso_subcollection']}\n\t\t</a>\n\t</span>\n\t<span" . ongletSelect("categ=notices&sub=perso") . ">\n\t\t<a title='{$msg['admin_menu_docs_perso_serie']}' href='./admin.php?categ=authorities&sub=perso&type_field=serie&action='>\n\t\t\t{$msg['admin_menu_docs_perso_serie']}\n\t\t</a>\n\t</span>\n\t<span" . ongletSelect("categ=notices&sub=perso") . ">\n\t\t<a title='{$msg['admin_menu_docs_perso_tu']}' href='./admin.php?categ=authorities&sub=perso&type_field=tu&action='>\n\t\t\t{$msg['admin_menu_docs_perso_tu']}\n\t\t</a>\n\t</span>\n\t<span" . ongletSelect("categ=notices&sub=perso") . ">\n\t\t<a title='{$msg['admin_menu_docs_perso_indexint']}' href='./admin.php?categ=authorities&sub=perso&type_field=indexint&action='>\n\t\t\t{$msg['admin_menu_docs_perso_indexint']}\n\t\t</a>\n\t</span>\n\n</div>\n";
/* en cours...
Exemple #19
0
 function fill_form(&$form, $action)
 {
     global $charset;
     global $msg;
     global $pmb_antivol;
     global $option_num_auto;
     global $dbh;
     global $pmb_expl_show_dates;
     global $thesaurus_concepts_active;
     if (isset($option_num_auto)) {
         $requete = "DELETE from exemplaires_temp where sess not in (select SESSID from sessions)";
         pmb_mysql_query($requete, $dbh);
         //Appel à la fonction de génération automatique de cb
         $code_exemplaire = init_gen_code_exemplaire($this->id_notice, $this->id_bulletin);
         do {
             $code_exemplaire = gen_code_exemplaire($this->id_notice, $this->id_bulletin, $code_exemplaire);
             $requete = "select expl_cb from exemplaires WHERE expl_cb='{$code_exemplaire}'";
             $res0 = pmb_mysql_query($requete, $dbh);
             $requete = "select cb from exemplaires_temp WHERE cb='{$code_exemplaire}' AND sess <>'" . SESSid . "'";
             $res1 = pmb_mysql_query($requete, $dbh);
         } while (pmb_mysql_num_rows($res0) || pmb_mysql_num_rows($res1));
         //Memorise dans temps le cb et la session pour le cas de multi utilisateur session
         $this->cb = $code_exemplaire;
         $requete = "INSERT INTO exemplaires_temp (cb ,sess) VALUES ('{$this->cb}','" . SESSid . "')";
         pmb_mysql_query($requete, $dbh);
     }
     $form = str_replace('!!action!!', $action, $form);
     if ($this->id_notice) {
         $form = str_replace('!!id!!', $this->id_notice, $form);
     } else {
         $form = str_replace('!!id!!', $this->id_bulletin, $form);
     }
     $form = str_replace('!!cb!!', htmlentities($this->cb, ENT_QUOTES, $charset), $form);
     $form = str_replace('!!nbparts!!', htmlentities($this->nbparts, ENT_QUOTES, $charset), $form);
     $form = str_replace('!!note!!', htmlentities($this->note, ENT_QUOTES, $charset), $form);
     $form = str_replace('!!comment!!', htmlentities($this->expl_comment, ENT_QUOTES, $charset), $form);
     if ($this->id_notice) {
         $form = str_replace('!!cote!!', htmlentities(prefill_cote($this->id_notice, $this->cote), ENT_QUOTES, $charset), $form);
     } else {
         $form = str_replace('!!cote!!', htmlentities(prefill_cote($this->id_bulletin_notice, $this->cote), ENT_QUOTES, $charset), $form);
     }
     $form = str_replace('!!prix!!', htmlentities($this->prix, ENT_QUOTES, $charset), $form);
     // select "type document"
     $form = str_replace('!!type_doc!!', do_selector('docs_type', 'f_ex_typdoc', $this->typdoc_id), $form);
     // select "section"
     $form = str_replace('!!section!!', $this->do_selector(), $form);
     // select "statut"
     $form = str_replace('!!statut!!', do_selector('docs_statut', 'f_ex_statut', $this->statut_id), $form);
     // select "localisation"
     //visibilité des exemplaires
     global $explr_visible_mod, $pmb_droits_explr_localises;
     if ($pmb_droits_explr_localises) {
         $where_clause_explr = "idlocation in (" . $explr_visible_mod . ") and";
     }
     $form = str_replace('!!localisation!!', gen_liste("select distinct idlocation, location_libelle from docs_location, docsloc_section where {$where_clause_explr} num_location=idlocation order by 2 ", "idlocation", "location_libelle", 'f_ex_location', "calcule_section(this);", $this->location_id, "", "", "", "", 0), $form);
     // select "code statistique"
     $form = str_replace('!!codestat!!', do_selector('docs_codestat', 'f_ex_cstat', $this->codestat_id), $form);
     if ($pmb_antivol) {
         global $value_deflt_antivol;
         if ($this->type_antivol == "") {
             $this->type_antivol = $value_deflt_antivol;
         }
         // select "type_antivol"
         $selector = "<select name='type_antivol' id='type_antivol'>";
         $selector .= "<option value='0'";
         if ($this->type_antivol == 0) {
             $selector .= ' selected="selected"';
         }
         $selector .= '>';
         $selector .= $msg["type_antivol_aucun"] . '</option>';
         $selector .= "<option value='1'";
         if ($this->type_antivol == 1) {
             $selector .= ' selected="selected"';
         }
         $selector .= '>';
         $selector .= $msg["type_antivol_magnetique"] . '</option>';
         $selector .= "<option value='2'";
         if ($this->type_antivol == 2) {
             $selector .= ' selected="selected"';
         }
         $selector .= '>';
         $selector .= $msg["type_antivol_autre"] . '</option>';
         $selector .= '</select>';
     } else {
         $selector = "";
     }
     $form = str_replace('!!type_antivol!!', $selector, $form);
     // select "owner"
     $form = str_replace('!!owner!!', do_selector('lenders', 'f_ex_owner', $this->owner_id), $form);
     //dates creation / modification
     if ($this->expl_id && ($pmb_expl_show_dates == '1' || $pmb_expl_show_dates == '3')) {
         $form = str_replace('<!-- msg_exp_cre_date -->', "<label class='etiquette' >" . htmlentities($msg['exp_cre_date'], ENT_QUOTES, $charset) . "</label>", $form);
         $form = str_replace('<!-- exp_cre_date -->', format_date($this->create_date), $form);
         $form = str_replace('<!-- msg_exp_upd_date -->', "<label class='etiquette' >" . htmlentities($msg['exp_upd_date'], ENT_QUOTES, $charset) . "</label>", $form);
         $form = str_replace('<!-- exp_upd_date -->', format_date($this->update_date), $form);
     }
     //dates dépôt / retour
     if ($this->expl_id && ($pmb_expl_show_dates == '2' || $pmb_expl_show_dates == '3')) {
         $form = str_replace('<!-- msg_exp_filing_date -->', "<label class='etiquette' >" . htmlentities($msg['filing_date'], ENT_QUOTES, $charset) . "</label>", $form);
         $form = str_replace('<!-- exp_filing_date -->', format_date($this->date_depot), $form);
         $form = str_replace('<!-- msg_exp_return_date -->', "<label class='etiquette' >" . htmlentities($msg['return_date'], ENT_QUOTES, $charset) . "</label>", $form);
         $form = str_replace('<!-- exp_return_date -->', format_date($this->date_retour), $form);
     }
     // Indexation concept
     if ($thesaurus_concepts_active == 1) {
         $index_concept = new index_concept($this->expl_id, TYPE_EXPL);
         $form = str_replace('<!-- index_concept_form -->', $index_concept->get_form("expl"), $form);
     }
     $p_perso = new parametres_perso("expl");
     if (!$p_perso->no_special_fields) {
         $c = 0;
         $perso = "<hr />";
         $perso_ = $p_perso->show_editable_fields($this->expl_id);
         for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
             $p = $perso_["FIELDS"][$i];
             if ($c == 0) {
                 $perso .= "<div class='row'>\n";
             }
             $perso .= "<div class='colonne2'><label for='" . $p["NAME"] . "' class='etiquette'>" . $p["TITRE"] . "</label><div class='row'>" . $p["AFF"] . "</div></div>\n";
             $c++;
             if ($c == 2) {
                 $perso .= "</div>\n";
                 $c = 0;
             }
         }
         if ($c == 1) {
             $perso .= "<div class='colonne2'>&nbsp;</div>\n</div>\n";
         }
         $perso = $perso_["CHECK_SCRIPTS"] . "\n" . $perso;
     } else {
         $perso = "\n<script>function check_form() { return true; }</script>\n";
     }
     $form = str_replace("!!champs_perso!!", $perso, $form);
     //Remplissage ajax de la cote
     global $pmb_prefill_cote_ajax, $pmb_antivol;
     if ($pmb_prefill_cote_ajax) {
         $expl_ajax_cote = " completion='expl_cote' listfield='" . $this->ajax_cote_fields . ",f_ex_cb,f_ex_typdoc,f_ex_location,f_ex_owner,f_ex_statut,f_ex_cstat" . ($pmb_antivol > 0 ? ",type_antivol" : "") . "' ";
     } else {
         $expl_ajax_cote = "";
     }
     $form = str_replace("!!expl_ajax_cote!!", $expl_ajax_cote, $form);
 }
Exemple #20
0
 public static function gen_tpl_select($select_name = "form_bannette_tpl", $selected_id = 0, $onchange = "", $invisible_default = 0)
 {
     global $msg;
     $requete = "SELECT bannettetpl_id, concat(bannettetpl_name,'. ',bannettetpl_comment) as nom  FROM bannette_tpl ORDER BY bannettetpl_name ";
     if ($invisible_default) {
         return gen_liste($requete, "bannettetpl_id", "nom", $select_name, $onchange, $selected_id, 0, $msg["bannette_tpl_list_default"], "", "", 0);
     } else {
         return gen_liste($requete, "bannettetpl_id", "nom", $select_name, $onchange, $selected_id, 0, $msg["bannette_tpl_list_default"], 0, $msg["bannette_tpl_list_default"], 0);
     }
 }
 $sh->elt_r_list_values = array(0 => 'result', 1 => 'aff_date_echeance');
 $sh->action = "<a href='#' onclick=\"set_parent('!!abt_id!!', '!!code!!', '!!titre!!',  '!!editeur1!!', '!!periodicite!!', '!!duree!!', '!!aff_date_debut!!', '!!prix!!', '!!abt_name!!');\">!!display!!</a> ";
 $sh->action_values = array(0 => 'abt_id', 1 => 'code', 2 => 'titre', 3 => 'editeur1', 4 => 'periodicite', 5 => 'duree', 6 => 'aff_date_debut', 7 => 'prix', 8 => 'abt_name');
 $sh->back_script = "\n\t\t<script type='text/javascript'>\n\t\t\t<!--\n\t\t\tfunction set_parent(abt_id, code, titre, editeur1, periodicite, duree, aff_date_debut, prix, abt_name) {\n\n\t\t\t\tvar ex=window.opener.act_lineAlreadyExists(0, abt_id, '4');\n\t\t\t\tvar q,cr;\n\t\t\t\tvar v=1;\n\t\t\t\tif (ex!=false) {\n\t\t\t\t\tq=window.opener.document.forms['{$caller}'].elements['qte['+ex+']'];\n\t\t\t\t\tv=q.value;\n\t\t\t\t\tr=prompt('" . addslashes($msg['acquisition_act_mod_qte']) . "', v);\n\t\t\t\t\tif (r) {\n\t\t\t\t\t\tq.value=r;\n\t\t\t\t\t\twindow.opener.act_calc();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} return false;\n\t\t\t\t}\n\t\t\t\tif (window.opener.mod==1) {\n\t\t\t\t\tcr='{$cr}';\n\t\t\t\t} else {\n\t\t\t\t\tcr = window.opener.act_getEmptyLine(); \n\t\t\t\t} \n\t\t\t\twindow.opener.mod=0;\n\t\t\t\twindow.opener.document.forms['{$caller}'].elements['typ_lig['+cr+']'].value = '4';\n\t\t\t\twindow.opener.document.forms['{$caller}'].elements['id_prod['+cr+']'].value = abt_id;\n\t\t\t\twindow.opener.document.forms['{$caller}'].elements['code['+cr+']'].value = reverse_html_entities(code);\n\t\t\t\tvar tabt='" . addslashes($msg['pointage_label_abonnement']) . "'; \n\t\t\t\ttabt=tabt+' '+duree+' " . addslashes($msg['abonnements_periodicite_unite_mois']) . "';\n\t\t\t\ttabt=tabt+'\\n" . addslashes($msg['abonnements_date_debut']) . " : '+aff_date_debut;\n\t\t\t\ttabt=tabt+'\\n'+titre;\n\t\t\t\tif (editeur1!='') tabt=tabt+'\\n'+editeur1;";
 if ($acquisition_show_abt_in_cmde) {
     $sh->back_script .= "tabt=tabt+'\\n'+abt_name;";
 }
 $sh->back_script .= "\n\t\t\t\twindow.opener.document.forms['{$caller}'].elements['lib['+cr+']'].value = reverse_html_entities(tabt);\n\t\t\t\twindow.opener.document.forms['{$caller}'].elements['prix['+cr+']'].value = reverse_html_entities(prix);\n\t\t\t\twindow.opener.act_calc();\n\t\t\t\tq=window.opener.document.forms['{$caller}'].elements['qte['+cr+']'];\n\t\t\t\tq.value=v;\n\t\t\t\tq.focus();\n\t\t\t}\n\t\t\t\n\t\t\tfunction check_uncheck(do_check){\n\t\t\t\tif(do_check==1){\n\t\t\t\t\tdocument.getElementById('searcher_results_check_all').value='" . $msg['searcher_results_uncheck_all'] . "';\n\t\t\t\t\tdocument.getElementById('searcher_results_check_all').onclick=function(){check_uncheck(0);};\n\t\t\t\t}else{\n\t\t\t\t\tdocument.getElementById('searcher_results_check_all').value='" . $msg['searcher_results_check_all'] . "';\n\t\t\t\t\tdocument.getElementById('searcher_results_check_all').onclick=function(){check_uncheck(1);};\n\t\t\t\t}\n\t\t\t\tvar elts = document.forms['searcher_results_check_form'].elements['sel_searcher_select_[]'] ;\n\t\t\t\tvar elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0;\n\t\t\t\tif (elts_cnt) {\n\t\t\t\t\tfor (var i = 0; i < elts_cnt; i++) {\n\t\t\t\t\t\telts[i].checked = do_check;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\telts.checked = do_check;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\tfunction add_selection(){\n\t\t\t\tvar arrayChecked = [];\n\t\t\t\tvar elts = document.forms['searcher_results_check_form'].elements['sel_searcher_select_[]'] ;\n\t\t\t\tvar elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0;\n\t\t\t\tif (elts_cnt) {\n\t\t\t\t\tfor (var i = 0; i < elts_cnt; i++) {\n\t\t\t\t\t\tif(elts[i].checked){\n\t\t\t\t\t\t\tarrayChecked.push(elts[i].value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(elts.checked){\n\t\t\t\t\t\tarrayChecked.push(elts.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(arrayChecked.length>0){\n\t\t\t\t\tfor (var i = 0; i < arrayChecked.length; i++) {\n\t\t\t\t\t\tvar elt = document.getElementById('sel_searcher_select_[' + arrayChecked[i] + ']') ;\n\t\t\t\t\t\tset_parent(elt.getAttribute('attr_abt_id'),\n\t\t\t\t\t\t\t\t\telt.getAttribute('attr_code'),\n\t\t\t\t\t\t\t\t\telt.getAttribute('attr_titre'),\n\t\t\t\t\t\t\t\t\telt.getAttribute('attr_editeur1'),\n\t\t\t\t\t\t\t\t\telt.getAttribute('attr_ed_periodicite'),\n\t\t\t\t\t\t\t\t\telt.getAttribute('attr_duree'),\n\t\t\t\t\t\t\t\t\telt.getAttribute('attr_aff_date_debut'),\n\t\t\t\t\t\t\t\t\telt.getAttribute('attr_prix'),\n\t\t\t\t\t\t\t\t\telt.getAttribute('attr_abt_name'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t-->\n\t\t</script>";
 $sh->back_script_show_all = "\n\t\t<script type='text/javascript'>\n\t\t\t<!--\n\t\t\tfunction results_show_all(){\n\t\t\t\twindow.resizeTo(1024,opener.innerHeight);\n\t\t\t\tdocument.forms['form_query'].results_show_all.value=1;\n\t\t\t\tdocument.forms['form_query'].submit();\n\t\t\t}\n\t\t\t-->\n\t\t</script>";
 //extension de la recherche
 //localisation
 $q = "select distinct idlocation, location_libelle from docs_location, docsloc_section where num_location=idlocation order by 2 ";
 if (!$location_query) {
     $location_query = $deflt_docs_location;
 }
 $location_form = gen_liste($q, "idlocation", "location_libelle", 'location_query', "", $location_query, "", "", '-1', $msg['all_location'], 0);
 $extended_query = $location_form;
 //echeance
 if ($date_ech_query == '-1') {
     $date_ech_query_lib = $msg['parperso_nodate'];
 } elseif (!$date_ech_query) {
     $q = "select date_add(curdate(), interval 1 month) ";
     $r = mysql_query($q, $dbh);
     $date_ech_query = mysql_result($r, 0, 0);
     $date_ech_query_lib = format_date($date_ech_query);
 } else {
     $date_ech_query_lib = format_date($date_ech_query);
 }
 $date_ech_form = htmlentities($msg['acquisition_abt_ech'], ENT_QUOTES, $charset) . "&nbsp;&lt;<input type='hidden' id='date_ech_query' name='date_ech_query' value='" . $date_ech_query . "' />\n\t\t\t<input type='button' id='date_ech_query_lib' class='bouton_small' value='" . $date_ech_query_lib . "' onclick=\"var date_c='';if (this.form.elements['date_ech_query'].value!='-1') date_c=this.form.elements['date_ech_query'].value; openPopUp('./select.php?what=calendrier&caller='+this.form.name+'&date_caller='+date_c+'&param1=date_ech_query&param2=date_ech_query_lib&auto_submit=NO&date_anterieure=YES', 'date_date_test', 250, 300, -2, -2, 'toolbar=no, dependent=yes, resizable=yes')\" />\n\t\t\t<input type='button' class='bouton_small' style='width:25px;' value='" . $msg['raz'] . "' onclick=\"this.form.elements['date_ech_query_lib'].value='" . $msg['parperso_nodate'] . "'; this.form.elements['date_ech_query'].value='-1';\" />";
 $extended_query .= $date_ech_form;
 $extended_query .= "<input type='hidden' name='results_show_all' id='results_show_all' value='0'>";
Exemple #22
0
function user_form($login = "", $nom = "", $prenom = "", $flag = 3, $id = 0, $lang = "", $nb_per_page_search = 10, $nb_per_page_select = 10, $nb_per_page_gestion = 10, $form_param_default = "", $form_user_email = "", $form_user_alert_resamail = "0", $form_user_alert_demandesmail = "0", $form_user_alert_subscribemail = "0", $form_user_alert_suggmail = "0", $usr_grp = FALSE)
{
    global $msg;
    global $admin_user_form;
    global $charset;
    global $password_field;
    global $include_path;
    global $demandes_active;
    global $opac_websubscribe_show, $acquisition_active;
    $user_encours = $_COOKIE["PhpMyBibli-LOGIN"];
    if ($id == 1 || $login == $user_encours || $id == 0) {
        // $id est admin ou $login est l'utilisateur en cours
        $admin_user_form = str_replace('!!bouton_suppression!!', "", $admin_user_form);
    } else {
        $admin_user_form = str_replace('!!bouton_suppression!!', " <input class='bouton' type='button' value=' {$msg['63']} ' onClick=\"javascript:confirmation_delete(!!id!!,'{$login}')\" /> ", $admin_user_form);
    }
    if (!$id) {
        $title = $msg[85];
    } else {
        $title = $msg[90];
    }
    // modification
    $admin_user_form = str_replace('!!id!!', $id, $admin_user_form);
    $admin_user_form = str_replace('!!title!!', $title, $admin_user_form);
    $admin_user_form = str_replace('!!login!!', $login, $admin_user_form);
    $admin_user_form = str_replace('!!nom!!', $nom, $admin_user_form);
    $admin_user_form = str_replace('!!prenom!!', $prenom, $admin_user_form);
    $admin_user_form = str_replace('!!nb_per_page_search!!', $nb_per_page_search, $admin_user_form);
    $admin_user_form = str_replace('!!nb_per_page_select!!', $nb_per_page_select, $admin_user_form);
    $admin_user_form = str_replace('!!nb_per_page_gestion!!', $nb_per_page_gestion, $admin_user_form);
    if (!$id) {
        $admin_user_form = str_replace('!!password_field!!', $password_field, $admin_user_form);
    } else {
        $admin_user_form = str_replace('!!password_field!!', '', $admin_user_form);
    }
    $flag & ADMINISTRATION_AUTH ? $admin_flg_form = "checked " : ($admin_flg_form = "");
    $flag & CIRCULATION_AUTH ? $circ_flg_form = "checked " : ($circ_flg_form = "");
    $flag & CATALOGAGE_AUTH ? $catal_flg_form = "checked " : ($catal_flg_form = "");
    $flag & AUTORITES_AUTH ? $auth_flg_form = "checked " : ($auth_flg_form = "");
    $flag & EDIT_AUTH ? $edit_flg_form = "checked " : ($edit_flg_form = "");
    $flag & EDIT_FORCING_AUTH ? $edit_forcing_flg_form = "checked " : ($edit_forcing_flg_form = "");
    $flag & SAUV_AUTH ? $sauv_flg_form = "checked " : ($sauv_flg_form = "");
    $flag & DSI_AUTH ? $dsi_flg_form = "checked " : ($dsi_flg_form = "");
    $flag & PREF_AUTH ? $pref_flg_form = "checked " : ($pref_flg_form = "");
    $flag & ACQUISITION_AUTH ? $acquisition_flg_form = "checked " : ($acquisition_flg_form = "");
    $flag & RESTRICTCIRC_AUTH ? $restrictcirc_flg_form = "checked " : ($restrictcirc_flg_form = "");
    $flag & THESAURUS_AUTH ? $thesaurus_flg_form = "checked " : ($thesaurus_flg_form = "");
    $flag & TRANSFERTS_AUTH ? $transferts_flg_form = "checked " : ($transferts_flg_form = "");
    $flag & EXTENSIONS_AUTH ? $extensions_flg_form = "checked " : ($extensions_flg_form = "");
    $flag & DEMANDES_AUTH ? $demandes_flg_form = "checked " : ($extensions_flg_form = "");
    $flag & CMS_AUTH ? $cms_flg_form = "checked " : ($cms_flg_form = "");
    $flag & FICHES_AUTH ? $fiches_flg_form = "checked " : ($fiches_flg_form = "");
    $admin_user_form = str_replace('!!admin_flg!!', $admin_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!catal_flg!!', $catal_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!circ_flg!!', $circ_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!auth_flg!!', $auth_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!edit_flg!!', $edit_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!edit_forcing_flg!!', $edit_forcing_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!sauv_flg!!', $sauv_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!dsi_flg!!', $dsi_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!pref_flg!!', $pref_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!acquisition_flg!!', $acquisition_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!restrictcirc_flg!!', $restrictcirc_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!thesaurus_flg!!', $thesaurus_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!transferts_flg!!', $transferts_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!extensions_flg!!', $extensions_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!demandes_flg!!', $demandes_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!cms_flg!!', $cms_flg_form, $admin_user_form);
    $admin_user_form = str_replace('!!fiches_flg!!', $fiches_flg_form, $admin_user_form);
    if ($form_user_alert_resamail == 1) {
        $alert_resa_mail = " checked";
    } else {
        $alert_resa_mail = "";
    }
    $admin_user_form = str_replace('!!alter_resa_mail!!', $alert_resa_mail, $admin_user_form);
    if ($demandes_active) {
        if ($form_user_alert_demandesmail == 1) {
            $alert_demandes_mail = " checked";
        } else {
            $alert_demandes_mail = "";
        }
        $admin_user_form = str_replace('!!alert_demandes_mail!!', $alert_demandes_mail, $admin_user_form);
    }
    if ($opac_websubscribe_show) {
        if ($form_user_alert_subscribemail == 1) {
            $alert_subscribe_mail = " checked";
        } else {
            $alert_subscribe_mail = "";
        }
        $admin_user_form = str_replace('!!alert_subscribe_mail!!', $alert_subscribe_mail, $admin_user_form);
    }
    if ($acquisition_active) {
        if ($form_user_alert_suggmail == 1) {
            $alert_sugg_mail = " checked";
        } else {
            $alert_sugg_mail = "";
        }
        $admin_user_form = str_replace('!!alert_sugg_mail!!', $alert_sugg_mail, $admin_user_form);
    }
    $admin_user_form = str_replace('!!user_email!!', $form_user_email, $admin_user_form);
    if (!$id) {
        $form_type = '1';
    } else {
        $form_type = '0';
    }
    // récupération des codes langues
    $la = new XMLlist("{$include_path}/messages/languages.xml", 0);
    $la->analyser();
    $languages = $la->table;
    // constitution du sélecteur
    $selector = "<select name='user_lang'>\t";
    while (list($codelang, $libelle) = each($languages)) {
        // arabe seulement si on est en utf-8
        if ($charset != 'utf-8' and $codelang != 'ar' or $charset == 'utf-8') {
            if ($lang == $codelang) {
                $selector .= "<option value='" . htmlentities($codelang, ENT_QUOTES, $charset) . "' SELECTED>" . htmlentities($libelle, ENT_QUOTES, $charset) . "</option>";
            } else {
                $selector .= "<option value='" . htmlentities($codelang, ENT_QUOTES, $charset) . "'>" . htmlentities($libelle, ENT_QUOTES, $charset) . "</option>";
            }
        }
    }
    $selector .= '</select>';
    $admin_user_form = str_replace('!!select_lang!!', $selector, $admin_user_form);
    $admin_user_form = str_replace('!!form_type!!', $form_type, $admin_user_form);
    $admin_user_form = str_replace('!!form_param_default!!', $form_param_default, $admin_user_form);
    //groupes
    if ($usr_grp !== FALSE) {
        $q = "select * from users_groups order by grp_name ";
        $sel_group = gen_liste($q, 'grp_id', 'grp_name', 'sel_group', '', $usr_grp, '0', $msg[128], '0', $msg[128]);
        $sel_group = "<label class='etiquette'>" . htmlentities($msg['admin_usr_grp_aff'], ENT_QUOTES, $charset) . '</label><br />' . $sel_group;
        $admin_user_form = str_replace('<!-- sel_group -->', $sel_group, $admin_user_form);
    }
    print confirmation_delete("./admin.php?categ=users&sub=users&action=del&id=");
    print $admin_user_form;
}
Exemple #23
0
            }
            echo "{$bt_add_panier}\n\t\t\t\t</div>\n\t\t\t\t<div align='right'>\n\t\t\t\t\t" . $msg["empr_chang_statut"] . "&nbsp;\n\t\t\t\t\t" . gen_liste("select idstatut, statut_libelle from empr_statut", "idstatut", "statut_libelle", "empr_chang_statut_edit", "", "", 0, "", 0, "") . "  \n\t\t\t\t\t&nbsp;<input type='submit' class='bouton_small' value='" . $msg['empr_chang_statut_button'] . "' />\n\t\t\t\t</div>\n\t\t\t\t</form>";
            break;
    }
    //switch($dest)
} else {
    // la requête n'a produit aucun résultat
    switch ($dest) {
        case "TABLEAU":
            break;
        case "TABLEAUHTML":
            break;
        default:
            echo "\n\t\t\t\t<form class='form-{$current_module}' id='form-{$current_module}-list' name='form-{$current_module}-list' action='{$page_url}?categ={$categ}&sub={$sub}&limite_page={$limite_page}&numero_page={$numero_page}' method=post>\n\t\t\t \t<div class='left'>\n\t\t\t\t\t{$nav_bar} {$msg['circ_afficher']} <input type=text name=limite_page value='{$limite_page}' class='saisie-5em'> {$msg['1905']} &nbsp;\n\t\t\t\t</div>\n\t\t\t\t<div class='right'>\n\t\t\t\t\t<img  src='./images/tableur.gif' border='0' align='top' onMouseOver ='survol(this);' onclick=\"start_export('TABLEAU');\" alt='Export tableau EXCEL' title='Export tableau EXCEL'/>&nbsp;&nbsp;\n\t\t\t\t\t<img  src='./images/tableur_html.gif' border='0' align='top' onMouseOver ='survol(this);' onclick=\"start_export('TABLEAUHTML');\" alt='Export tableau HTML' title='Export tableau HTML'/>&nbsp;&nbsp;\n\t\t\t\t</div>\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\tfunction survol(obj){\n\t\t\t\t\t\tobj.style.cursor = 'pointer';\n\t\t\t\t\t}\n\t\t\t\t\tfunction start_export(type){\n\t\t\t\t\t\tdocument.forms['form-{$current_module}-list'].dest.value = type;\n\t\t\t\t\t\tdocument.forms['form-{$current_module}-list'].submit();\n\t\t\t\t\t}\t\n\t\t\t\t</script>\n\t\t\t";
            if ($pmb_lecteurs_localises) {
                echo docs_location::gen_combo_box_empr($empr_location_id);
            }
            echo gen_liste("select idstatut, statut_libelle from empr_statut", "idstatut", "statut_libelle", "empr_statut_edit", "", $empr_statut_edit, -1, "", 0, $msg["all_statuts_empr"]);
            $sort_params = array('empr_nom' => $msg['readerlist_name'], 'empr_cb' => $msg['readerlist_code'], 'empr_ville' => $msg['readerlist_ville'], 'empr_date_expiration' => $msg['readerlist_dateexpiration']);
            echo "&nbsp;" . $msg["sort_by"] . ":&nbsp;";
            echo '<select name="sortby">';
            foreach ($sort_params as $id => $caption) {
                echo '<option ' . ($id == $sortby ? 'selected' : '') . ' value="' . $id . '">' . $caption . '</option>';
            }
            echo '</select>';
            echo "&nbsp;<input type='submit' class='bouton' value='" . $msg['actualiser'] . "' onClick=\"this.form.dest.value='';\" />&nbsp;&nbsp;<input type='hidden' name='dest' value='' />";
            echo "\n\t\t\t\t<div class='row'></div></form><br />";
            echo "\n\t\t\t<div class='row'></div></form>";
            error_message($msg[46], str_replace('!!form_cb!!', $form_cb, $msg['edit_lect_aucun_trouve']), 1, './edit.php?categ=empr&sub=' . $sub);
    }
}
Exemple #24
0
 function do_form()
 {
     global $msg;
     global $collstate_form, $statut_field, $emplacement_field, $location_field, $support_field;
     global $deflt_docs_location;
     global $deflt_arch_statut, $deflt_arch_emplacement, $deflt_arch_type;
     global $charset;
     global $pmb_etat_collections_localise;
     // titre formulaire
     if ($this->id) {
         $libelle = $libelle = $msg["collstate_edit_collstate"];
         $link_delete = "<input type='button' class='bouton' value='{$msg['63']}' onClick=\"confirm_delete();\" />";
     } else {
         $libelle = $msg["collstate_add_collstate"];
         $link_delete = "";
     }
     $collstate_form = str_replace('!!id!!', htmlentities($this->id, ENT_QUOTES, $charset), $collstate_form);
     $collstate_form = str_replace('!!location_id!!', htmlentities($this->location_id, ENT_QUOTES, $charset), $collstate_form);
     $collstate_form = str_replace('!!serial_id!!', htmlentities($this->serial_id, ENT_QUOTES, $charset), $collstate_form);
     $action = "./catalog.php?categ=serials&sub=collstate_update&serial_id=" . rawurlencode($this->serial_id) . "&id=" . rawurlencode($this->id);
     $collstate_form = str_replace('!!action!!', $action, $collstate_form);
     $collstate_form = str_replace('!!delete!!', $link_delete, $collstate_form);
     $collstate_form = str_replace('!!libelle!!', $libelle, $collstate_form);
     $collstate_form = str_replace('!!origine!!', htmlentities($this->origine, ENT_QUOTES, $charset), $collstate_form);
     $collstate_form = str_replace('!!archive!!', htmlentities($this->archive, ENT_QUOTES, $charset), $collstate_form);
     $collstate_form = str_replace('!!cote!!', htmlentities($this->cote, ENT_QUOTES, $charset), $collstate_form);
     $collstate_form = str_replace('!!note!!', htmlentities($this->note, ENT_QUOTES, $charset), $collstate_form);
     $collstate_form = str_replace('!!lacune!!', htmlentities($this->lacune, ENT_QUOTES, $charset), $collstate_form);
     $collstate_form = str_replace('!!state_collections!!', htmlentities($this->state_collections, ENT_QUOTES, $charset), $collstate_form);
     // champs des localisations
     if ($pmb_etat_collections_localise) {
         if (!$this->location_id) {
             $this->location_id = $deflt_docs_location;
         }
         $select = gen_liste("select distinct idlocation, location_libelle from docs_location order by 2 ", "idlocation", "location_libelle", 'location_id', "", $this->location_id, "", "", "", "", 0);
         $field = "";
         if ($select) {
             $field = str_replace('!!location!!', $select, $location_field);
         }
         $collstate_form = str_replace('!!location_field!!', $field, $collstate_form);
     } else {
         $field = "<input type='hidden' name='location_id' id='location_id' value=''/> ";
         $collstate_form = str_replace('!!location_field!!', $field, $collstate_form);
     }
     // champs des emplacements
     if (!$this->emplacement) {
         $this->emplacement = $deflt_arch_emplacement;
     }
     $select = gen_liste("select archempla_id, archempla_libelle from arch_emplacement order by 2", "archempla_id", "archempla_libelle", "archempla_id", "", $this->emplacement, "", "", "", "", "", 0);
     $field = "";
     if ($select) {
         $field = str_replace('!!emplacement!!', $select, $emplacement_field);
     }
     $collstate_form = str_replace('!!emplacement_field!!', $field, $collstate_form);
     // champs des supports
     if (!$this->type) {
         $this->type = $deflt_arch_type;
     }
     $select = gen_liste("select archtype_id, archtype_libelle from arch_type order by 2", "archtype_id", "archtype_libelle", "archtype_id", "", $this->type, "", "", "", "", 0);
     $field = "";
     if ($select) {
         $field = str_replace('!!support!!', $select, $support_field);
     }
     $collstate_form = str_replace('!!support_field!!', $field, $collstate_form);
     // champs des statuts
     if (!$this->statut) {
         $this->statut = $deflt_arch_statut;
     }
     $select = gen_liste("select archstatut_id, archstatut_gestion_libelle from arch_statut order by 2", "archstatut_id", "archstatut_gestion_libelle", "archstatut_id", "", $this->statut, "", "", "", "", 0);
     $field = "";
     if ($select) {
         $field = str_replace('!!statut!!', $select, $statut_field);
     }
     $collstate_form = str_replace('!!statut_field!!', $field, $collstate_form);
     // Champs perso
     $p_perso = new parametres_perso("collstate");
     $parametres_perso = "";
     if (!$p_perso->no_special_fields) {
         $perso_ = $p_perso->show_editable_fields($this->id);
         $perso = "";
         for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
             $p = $perso_["FIELDS"][$i];
             $perso .= "\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<label for='" . $p["NAME"] . "' class='etiquette'>" . $p["TITRE"] . "</label>\n\t\t\t\t</div>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t" . $p["AFF"] . "\n\t\t\t\t</div>";
         }
         $perso .= $perso_["CHECK_SCRIPTS"];
         $parametres_perso .= $perso;
     }
     $collstate_form = str_replace('!!parametres_perso!!', $parametres_perso, $collstate_form);
     $link_annul = "onClick=\"unload_off();history.go(-1);\"";
     $collstate_form = str_replace('!!annul!!', $link_annul, $collstate_form);
     //vérification de la présence de champs perso
     //si non, on confirme la soumission du formulaire
     if ($p_perso->no_special_fields) {
         $return_form = "return true";
     } else {
         $return_form = "return check_form()";
     }
     $collstate_form = str_replace('!!return_form!!', $return_form, $collstate_form);
     return $collstate_form;
 }
Exemple #25
0
 function show_form($type = "pro")
 {
     global $msg, $charset;
     global $dsi_bannette_form;
     global $dsi_bannette_form_abo, $dsi_bannette_form_selvars;
     global $nom_prenom_abo;
     global $dsi_bannette_notices_template, $PMBuserid;
     global $form_cb, $id_classement;
     global $page, $nbr_lignes, $nb_per_page;
     if ($type == "abo") {
         $dsi_bannette_form = $dsi_bannette_form_abo;
     }
     if ($this->id_bannette) {
         $link_pagination = "";
         if ($page > 1) {
             $link_pagination .= "&page=" . $page . "&nbr_lignes=" . $nbr_lignes . "&nb_per_page=" . $nb_per_page;
         }
         $action = "./dsi.php?categ=bannettes&sub={$type}&id_bannette={$this->id_bannette}&suite=update&id_classement={$id_classement}&form_cb={$form_cb}{$link_pagination}";
         $link_duplicate = "<input type='button' class='bouton' value='" . $msg['bannette_duplicate_bouton'] . "' onclick='document.location=\"./dsi.php?categ=bannettes&sub={$type}&id_bannette={$this->id_bannette}&suite=duplicate&id_classement={$id_classement}&form_cb={$form_cb}{$link_pagination}\"' />";
         $link_annul = "<input type='button' class='bouton' value='{$msg['76']}' onClick=\"document.location='./dsi.php?categ=bannettes&sub={$type}&id_bannette=&suite=search&id_classement={$id_classement}&form_cb={$form_cb}{$link_pagination}';\" />";
         $button_delete = "<input type='button' class='bouton' value='{$msg['63']}' onClick=\"confirm_delete();\">";
         $libelle = $msg['dsi_ban_form_modif'];
     } else {
         $action = "./dsi.php?categ=bannettes&sub={$type}&id_bannette=0&suite=update";
         $link_duplicate = "";
         $link_annul = "<input type='button' class='bouton' value='{$msg['76']}' onClick=\"history.go(-1);\" />";
         $libelle = $msg['dsi_ban_form_creat'];
         $button_delete = "";
         $this->notice_tpl = $dsi_bannette_notices_template;
     }
     $bannette_tpl_list = bannette_tpl::gen_tpl_select("bannette_tpl_num", $this->bannette_tpl_num);
     $dsi_bannette_form = str_replace('!!libelle!!', $libelle, $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!type!!', $type, $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!id_bannette!!', $this->id_bannette, $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!action!!', $action, $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!link_duplicate!!', $link_duplicate, $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!link_annul!!', $link_annul, $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!nom_bannette!!', htmlentities($this->nom_bannette, ENT_QUOTES, $charset), $dsi_bannette_form);
     if ($type == "pro") {
         $dsi_bannette_form = str_replace('!!num_classement!!', show_classement_utilise('BAN', $this->num_classement, 0), $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace('!!num_classement!!', "<input type=hidden name=num_classement value=0 />", $dsi_bannette_form);
     }
     global $id_empr;
     $dsi_bannette_form = str_replace('!!id_empr!!', $id_empr, $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!comment_gestion!!', htmlentities($this->comment_gestion, ENT_QUOTES, $charset), $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!comment_public!!', htmlentities($this->comment_public, ENT_QUOTES, $charset), $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!bannette_tpl_list!!', $bannette_tpl_list, $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!entete_mail!!', htmlentities($this->entete_mail, ENT_QUOTES, $charset), $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!piedpage_mail!!', htmlentities($this->piedpage_mail, ENT_QUOTES, $charset), $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!date_last_remplissage!!', htmlentities($this->aff_date_last_remplissage, ENT_QUOTES, $charset), $dsi_bannette_form);
     $date_clic = "onClick=\"openPopUp('./select.php?what=calendrier&caller=saisie_bannette&date_caller=" . substr(preg_replace('/-/', '', $this->date_last_envoi), 0, 8) . "&param1=form_date_last_envoi&param2=form_aff_date_last_envoi&auto_submit=NO&date_anterieure=YES', 'date_last_envoi', 250, 300, -2, -2, 'toolbar=no, dependent=yes, resizable=yes')\"  ";
     $date_last_envoi = "\n\t\t\t\t\t<input type='hidden' name='form_date_last_envoi' value='" . str_replace(' ', '', str_replace('-', '', str_replace(':', '', $this->date_last_envoi))) . "' />\n\t\t\t\t\t<input class='bouton' type='button' name='form_aff_date_last_envoi' value='" . $this->aff_date_last_envoi . "' " . $date_clic . " />";
     $dsi_bannette_form = str_replace('!!date_last_envoi!!', $date_last_envoi, $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!archive_number!!', $this->archive_number, $dsi_bannette_form);
     if ($type == "pro") {
         $dsi_bannette_form = str_replace('!!proprio_bannette!!', htmlentities($msg['dsi_ban_no_proprio'], ENT_QUOTES, $charset), $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace('!!proprio_bannette!!', htmlentities($nom_prenom_abo, ENT_QUOTES, $charset), $dsi_bannette_form);
     }
     if ($this->bannette_auto) {
         $dsi_bannette_form = str_replace('!!bannette_auto!!', "checked", $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace('!!bannette_auto!!', "", $dsi_bannette_form);
     }
     $dsi_bannette_form = str_replace('!!periodicite!!', htmlentities($this->periodicite, ENT_QUOTES, $charset), $dsi_bannette_form);
     if ($this->diffusion_email) {
         $dsi_bannette_form = str_replace('!!diffusion_email!!', "checked='checked'", $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace('!!diffusion_email!!', "", $dsi_bannette_form);
     }
     $dsi_bannette_form = str_replace('!!nb_notices_diff!!', htmlentities($this->nb_notices_diff, ENT_QUOTES, $charset), $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!notice_tpl!!', notice_tpl_gen::gen_tpl_select("notice_tpl", $this->notice_tpl), $dsi_bannette_form);
     if ($this->statut_not_account) {
         $dsi_bannette_form = str_replace('!!statut_not_account!!', "checked", $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace('!!statut_not_account!!', "", $dsi_bannette_form);
     }
     // group_type, group_pperso, group_facettes
     if ($this->group_type) {
         $dsi_bannette_form = str_replace('!!checked_group_facette!!', " checked='checked' ", $dsi_bannette_form);
         $dsi_bannette_form = str_replace('!!checked_group_pperso!!', "", $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace('!!checked_group_facette!!', "", $dsi_bannette_form);
         $dsi_bannette_form = str_replace('!!checked_group_pperso!!', " checked='checked' ", $dsi_bannette_form);
     }
     $liste_p_perso = $this->p_perso->gen_liste_field("group_pperso", $this->group_pperso, $msg["dsi_ban_form_regroupe_pperso_no"]);
     $dsi_bannette_form = str_replace('!!pperso_group!!', $liste_p_perso, $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!facette_group!!', $this->gen_facette_selection(), $dsi_bannette_form);
     if ($this->display_notice_in_every_group) {
         $dsi_bannette_form = str_replace("!!display_notice_in_every_group!!", "checked", $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace("!!display_notice_in_every_group!!", "", $dsi_bannette_form);
     }
     if ($type == "pro") {
         $requete = "SELECT id_categ_empr, libelle FROM empr_categ ORDER BY libelle ";
         $onchange = "res=confirm('" . htmlentities($msg['dsi_ban_confirm_modif_categ'], ENT_QUOTES, $charset) . "'); if (res) this.form.majautocateg.value=1; else this.form.majautocateg.value=0;";
         $categ_lect_aff = gen_liste($requete, "id_categ_empr", "libelle", "categorie_lecteurs", $onchange, $this->categorie_lecteurs, 0, $msg['dsi_ban_aucune_categ'], 0, $msg['dsi_ban_aucune_categ'], 0);
         $dsi_bannette_form = str_replace('!!categorie_lecteurs!!', $categ_lect_aff, $dsi_bannette_form);
         $requete = "SELECT id_groupe, libelle_groupe FROM groupe ORDER BY libelle_groupe ";
         $onchange = "res=confirm('" . htmlentities($msg['dsi_ban_confirm_modif_groupe'], ENT_QUOTES, $charset) . "'); if (res) this.form.majautogroupe.value=1; else this.form.majautogroupe.value=0;";
         $groupe_lect_aff = gen_liste($requete, "id_groupe", "libelle_groupe", "groupe_lecteurs", $onchange, $this->groupe_lecteurs, 0, $msg['dsi_ban_aucun_groupe'], 0, $msg['dsi_ban_aucun_groupe'], 0);
         $dsi_bannette_form = str_replace('!!groupe_lecteurs!!', $groupe_lect_aff, $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace('!!categorie_lecteurs!!', "<input type=hidden name=categorie_lecteurs value=0 />", $dsi_bannette_form);
         $dsi_bannette_form = str_replace('!!groupe_lecteurs!!', "<input type=hidden name=groupe_lecteurs value=0 />", $dsi_bannette_form);
     }
     $dsi_bannette_form = str_replace('!!desc_fields!!', $this->build_sel_descriptor(), $dsi_bannette_form);
     $requete = "SELECT idcaddie, name FROM caddie where type='NOTI' ";
     if ($PMBuserid != 1) {
         $requete .= " and (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') ";
     }
     $requete .= " ORDER BY name ";
     $panier_bann_aff = gen_liste($requete, "idcaddie", "name", "num_panier", "", $this->num_panier, 0, $msg['dsi_panier_aucun'], 0, $msg['dsi_panier_aucun'], 0);
     $dsi_bannette_form = str_replace('!!num_panier!!', $panier_bann_aff, $dsi_bannette_form);
     switch ($this->limite_type) {
         case "D":
             $selectn = "";
             $selecti = "";
             $selectd = " SELECTED ";
             break;
         case "I":
             $selectn = "";
             $selectd = "";
             $selecti = " SELECTED ";
             break;
         default:
         case "":
             $selecti = "";
             $selectd = "";
             $selectn = " SELECTED ";
             break;
     }
     $limite_type = "<select name='limite_type' id='limite_type'>\n\t\t\t\t\t\t<option value='' {$selectn}>" . $msg['dsi_ban_non_cumul'] . "</option>\n\t\t\t\t\t\t<option value='D' {$selectd}>" . $msg['dsi_ban_cumul_jours'] . "</option>\n\t\t\t\t\t\t<option value='I' {$selecti}>" . $msg['dsi_ban_cumul_notice'] . "</option>\n\t\t\t\t\t\t</select>";
     $dsi_bannette_form = str_replace('!!limite_type!!', $limite_type, $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!limite_nombre!!', $this->limite_nombre, $dsi_bannette_form);
     // update_type: se baser sur la date de création ou la date de mise à jour des notices ?
     switch ($this->update_type) {
         case "C":
             $selectu = "";
             $selectc = " SELECTED ";
             break;
         case "U":
             $selectc = "";
             $selectu = " SELECTED ";
             break;
         default:
         case "":
             $selectu = "";
             $selectc = " SELECTED ";
             break;
     }
     $update_type = "<select name='update_type' id='update_type'>\n\t\t\t\t\t\t<option value='C' {$selectc}>" . $msg['dsi_ban_update_type_c'] . "</option>\n\t\t\t\t\t\t<option value='U' {$selectu}>" . $msg['dsi_ban_update_type_u'] . "</option>\n\t\t\t\t\t\t</select>";
     $dsi_bannette_form = str_replace('!!update_type!!', $update_type, $dsi_bannette_form);
     $exp = start_export::get_exports();
     $liste_exports = "<select name='typeexport' onchange=\"if(this.selectedIndex==0) document.getElementById('liste_parametre').style.display='none'; else document.getElementById('liste_parametre').style.display=''; \">";
     if (!$this->typeexport) {
         $liste_exports .= "<option value='' selected>" . $msg['dsi_ban_noexport'] . "</option>";
     } else {
         $liste_exports .= "<option value=''>" . $msg['dsi_ban_noexport'] . "</option>";
     }
     for ($i = 0; $i < count($exp); $i++) {
         if ($this->typeexport == $exp[$i]["PATH"]) {
             $liste_exports .= "<option value='" . $exp[$i]["PATH"] . "' selected>" . $exp[$i]["NAME"] . "</option>";
         } else {
             $liste_exports .= "<option value='" . $exp[$i]["PATH"] . "' >" . $exp[$i]["NAME"] . "</option>";
         }
     }
     $liste_exports .= "</select>";
     $dsi_bannette_form = str_replace('!!typeexport!!', $liste_exports, $dsi_bannette_form);
     $dsi_bannette_form = str_replace('!!prefixe_fichier!!', $this->prefixe_fichier, $dsi_bannette_form);
     if ($this->bannette_opac_accueil) {
         $bannette_opac_accueil_check = " checked ";
     } else {
         $bannette_opac_accueil_check = "";
     }
     $dsi_bannette_form = str_replace('!!bannette_opac_accueil_check!!', $bannette_opac_accueil_check, $dsi_bannette_form);
     if ($this->document_generate) {
         $dsi_bannette_form = str_replace('!!document_generate!!', "checked=checked", $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace('!!document_generate!!', "", $dsi_bannette_form);
     }
     $dsi_bannette_form = str_replace('!!document_notice_tpl!!', notice_tpl_gen::gen_tpl_select("document_notice_tpl", $this->document_notice_tpl), $dsi_bannette_form);
     if ($this->document_insert_docnum) {
         $dsi_bannette_form = str_replace('!!document_insert_docnum!!', "checked=checked", $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace('!!document_insert_docnum!!', "", $dsi_bannette_form);
     }
     if ($this->document_group) {
         $dsi_bannette_form = str_replace('!!document_group!!', "checked=checked", $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace('!!document_group!!', "", $dsi_bannette_form);
     }
     if ($this->document_add_summary) {
         $dsi_bannette_form = str_replace('!!document_add_summary!!', "checked=checked", $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace('!!document_add_summary!!', "", $dsi_bannette_form);
     }
     $dsi_bannette_form = str_replace('!!delete!!', $button_delete, $dsi_bannette_form);
     // afin de revenir où on était : $form_cb, le critère de recherche
     $dsi_bannette_form = str_replace('!!form_cb!!', $form_cb, $dsi_bannette_form);
     if ($this->param_export) {
         $param = new export_param(EXP_DSI_CONTEXT, $this->param_export);
     } else {
         $param = new export_param(EXP_DEFAULT_GESTION);
     }
     if (!$this->typeexport) {
         $dsi_bannette_form = str_replace('!!display_liste_param!!', 'display:none', $dsi_bannette_form);
     } else {
         $dsi_bannette_form = str_replace('!!display_liste_param!!', '', $dsi_bannette_form);
     }
     $dsi_bannette_form = str_replace('!!form_param!!', $param->check_default_param(), $dsi_bannette_form);
     //ajout champs emprunteur
     $dsi_bannette_form = str_replace('!!info_empr!!', $dsi_bannette_form_selvars, $dsi_bannette_form);
     print $dsi_bannette_form;
 }
Exemple #26
0
 function get_rights_form()
 {
     global $dbh, $msg, $charset;
     global $gestion_acces_active, $gestion_acces_empr_notice;
     global $gestion_acces_empr_notice_def;
     if ($gestion_acces_active != 1) {
         return '';
     }
     $ac = new acces();
     $form = '';
     $c_form = "<label class='etiquette'><!-- domain_name --></label>\n\t\t\t\t\t\t<div class='row'>\n\t\t\t\t    \t<div class='colonne3'>" . htmlentities($msg['dom_cur_prf'], ENT_QUOTES, $charset) . "</div>\n\t\t\t\t    \t<div class='colonne_suite'><!-- prf_rad --></div>\n\t\t\t\t    \t</div>\n\t\t\t\t    \t<div class='row'>\n\t\t\t\t    \t<div class='colonne3'>" . htmlentities($msg['dom_cur_rights'], ENT_QUOTES, $charset) . "</div>\n\t\t\t\t\t    <div class='colonne_suite'><!-- r_rad --></div>\n\t\t\t\t\t    <div class='row'><!-- rights_tab --></div>\n\t\t\t\t\t    </div>";
     if ($gestion_acces_empr_notice == 1) {
         $r_form = $c_form;
         $dom_2 = $ac->setDomain(2);
         $r_form = str_replace('<!-- domain_name -->', htmlentities($dom_2->getComment('long_name'), ENT_QUOTES, $charset), $r_form);
         if ($this->analysis_id) {
             //profil ressource
             $def_prf = $dom_2->getComment('res_prf_def_lib');
             $res_prf = $dom_2->getResourceProfile($this->analysis_id);
             $q = $dom_2->loadUsedResourceProfiles();
             //Recuperation droits generiques utilisateur
             $user_rights = $dom_2->getDomainRights(0, $res_prf);
             if ($user_rights & 2) {
                 $p_sel = gen_liste($q, 'prf_id', 'prf_name', 'res_prf[2]', '', $res_prf, '0', $def_prf, '0', $def_prf);
                 $p_rad = "<input type='radio' name='prf_rad[2]' value='R' ";
                 if ($gestion_acces_empr_notice_def != '1') {
                     $p_rad .= "checked='checked' ";
                 }
                 $p_rad .= ">" . htmlentities($msg['dom_rad_calc'], ENT_QUOTES, $charset) . "</input><input type='radio' name='prf_rad[2]' value='C' ";
                 if ($gestion_acces_empr_notice_def == '1') {
                     $p_rad .= "checked='checked' ";
                 }
                 $p_rad .= ">" . htmlentities($msg['dom_rad_def'], ENT_QUOTES, $charset) . " {$p_sel}</input>";
                 $r_form = str_replace('<!-- prf_rad -->', $p_rad, $r_form);
             } else {
                 $r_form = str_replace('<!-- prf_rad -->', htmlentities($dom_2->getResourceProfileName($res_prf), ENT_QUOTES, $charset), $r_form);
             }
             //droits/profils utilisateurs
             if ($user_rights & 1) {
                 $r_rad = "<input type='radio' name='r_rad[2]' value='R' ";
                 if ($gestion_acces_empr_notice_def != '1') {
                     $r_rad .= "checked='checked' ";
                 }
                 $r_rad .= ">" . htmlentities($msg['dom_rad_calc'], ENT_QUOTES, $charset) . "</input><input type='radio' name='r_rad[2]' value='C' ";
                 if ($gestion_acces_empr_notice_def == '1') {
                     $r_rad .= "checked='checked' ";
                 }
                 $r_rad .= ">" . htmlentities($msg['dom_rad_def'], ENT_QUOTES, $charset) . "</input>";
                 $r_form = str_replace('<!-- r_rad -->', $r_rad, $r_form);
             }
             //recuperation profils utilisateurs
             $t_u = array();
             $t_u[0] = $dom_2->getComment('user_prf_def_lib');
             //niveau par defaut
             $qu = $dom_2->loadUsedUserProfiles();
             $ru = pmb_mysql_query($qu, $dbh);
             if (pmb_mysql_num_rows($ru)) {
                 while ($row = pmb_mysql_fetch_object($ru)) {
                     $t_u[$row->prf_id] = $row->prf_name;
                 }
             }
             //recuperation des controles dependants de l'utilisateur
             $t_ctl = $dom_2->getControls(0);
             //recuperation des droits
             $t_rights = $dom_2->getResourceRights($this->analysis_id);
             if (count($t_u)) {
                 $h_tab = "<div class='dom_div'><table class='dom_tab'><tr>";
                 foreach ($t_u as $k => $v) {
                     $h_tab .= "<th class='dom_col'>" . htmlentities($v, ENT_QUOTES, $charset) . "</th>";
                 }
                 $h_tab .= "</tr><!-- rights_tab --></table></div>";
                 $c_tab = '<tr>';
                 foreach ($t_u as $k => $v) {
                     $c_tab .= "<td><table style='border:1px solid;'><!-- rows --></table></td>";
                     $t_rows = "";
                     foreach ($t_ctl as $k2 => $v2) {
                         $t_rows .= "\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td style='width:25px;' ><input type='checkbox' name='chk_rights[2][" . $k . "][" . $k2 . "]' value='1' ";
                         if ($t_rights[$k][$res_prf] & pow(2, $k2 - 1)) {
                             $t_rows .= "checked='checked' ";
                         }
                         if (($user_rights & 1) == 0) {
                             $t_rows .= "disabled='disabled' ";
                         }
                         $t_rows .= "/></td>\n\t\t\t\t\t\t\t\t\t\t<td>" . htmlentities($v2, ENT_QUOTES, $charset) . "</td>\n\t\t\t\t\t\t\t\t\t</tr>";
                     }
                     $c_tab = str_replace('<!-- rows -->', $t_rows, $c_tab);
                 }
                 $c_tab .= "</tr>";
             }
             $h_tab = str_replace('<!-- rights_tab -->', $c_tab, $h_tab);
             $r_form = str_replace('<!-- rights_tab -->', $h_tab, $r_form);
         } else {
             $r_form = str_replace('<!-- prf_rad -->', htmlentities($msg['dom_prf_unknown'], ENT_QUOTES, $charset), $r_form);
             $r_form = str_replace('<!-- r_rad -->', htmlentities($msg['dom_rights_unknown'], ENT_QUOTES, $charset), $r_form);
         }
         $form .= $r_form;
     }
     return $form;
 }
function bul_do_form($obj)
{
    // $obj = objet contenant les propriétés de l'exemplaire associé
    global $bul_expl_form1, $expl_bulletinage_tpl;
    global $msg;
    // pour texte du bouton supprimer
    global $dbh, $charset;
    global $pmb_type_audit, $select_categ_prop, $pmb_antivol;
    global $id_bull, $bul_id, $serial_id, $numero, $pmb_rfid_activate, $pmb_rfid_serveur_url;
    global $deflt_explnum_statut;
    if (!$obj->abt_numeric) {
        $bul_expl_form1 = str_replace('!!expl_bulletinage_tpl!!', $expl_bulletinage_tpl, $bul_expl_form1);
    } else {
        $bul_expl_form1 = str_replace('!!expl_bulletinage_tpl!!', "", $bul_expl_form1);
    }
    $action = "./pointage_exemplarise.php?act=update&id_bull={$id_bull}&bul_id={$bul_id}";
    // statut
    $select_statut = gen_liste_multiple("select id_explnum_statut, gestion_libelle from explnum_statut order by 2", "id_explnum_statut", "gestion_libelle", "id_explnum_statut", "f_explnum_statut", "", $deflt_explnum_statut, "", "", "", "", 0);
    $bul_expl_form1 = str_replace('!!statut_list!!', $select_statut, $bul_expl_form1);
    // mise à jour des champs de gestion
    $bul_expl_form1 = str_replace('!!bul_id!!', $obj->expl_bulletin, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!id_form!!', md5(microtime()), $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!org_cb!!', $obj->expl_cb, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!expl_id!!', $obj->expl_id, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!action!!', $action, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!id!!', $obj->expl_notice, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!cb!!', $obj->expl_cb, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!note!!', $obj->expl_note, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!comment!!', $obj->expl_comment, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!cote!!', htmlentities($obj->expl_cote, ENT_QUOTES, $charset), $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!prix!!', $obj->expl_prix, $bul_expl_form1);
    if (!$obj->abt_numeric) {
        $bul_expl_form1 = str_replace('!!focus!!', $obj->focus, $bul_expl_form1);
    } else {
        $bul_expl_form1 = str_replace('!!focus!!', "", $bul_expl_form1);
    }
    // select "type document"
    $bul_expl_form1 = str_replace('!!type_doc!!', do_selector('docs_type', 'expl_typdoc', $obj->expl_typdoc), $bul_expl_form1);
    // select "section"
    $bul_expl_form1 = str_replace('!!section!!', do_selector_bul_section($obj->expl_section, $obj->expl_location), $bul_expl_form1);
    // select "statut"
    $bul_expl_form1 = str_replace('!!statut!!', do_selector('docs_statut', 'expl_statut', $obj->expl_statut), $bul_expl_form1);
    // select "localisation"
    $bul_expl_form1 = 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", 'expl_location', "calcule_section(this);", $obj->expl_location, "", "", "", "", 0), $bul_expl_form1);
    // select "code statistique"
    $bul_expl_form1 = str_replace('!!codestat!!', do_selector('docs_codestat', 'expl_codestat', $obj->expl_codestat), $bul_expl_form1);
    // select "owner"
    $bul_expl_form1 = str_replace('!!owner!!', do_selector('lenders', 'expl_owner', $obj->expl_owner), $bul_expl_form1);
    $selector = "";
    if ($pmb_antivol > 0) {
        // select "type_antivol"
        $selector = "\n\t\t<div class='colonne3'>\n\t\t<!-- code stat -->\n\t\t<label class='etiquette' for='type_antivol'>{$msg['type_antivol']}</label>\n\t\t<div class='row'>\n\t\t<select name='type_antivol' id='type_antivol'>";
        $selector .= "<option value='0'";
        if ($obj->type_antivol == 0) {
            $selector .= ' SELECTED';
        }
        $selector .= '>';
        $selector .= $msg["type_antivol_aucun"] . '</option>';
        $selector .= "<option value='1'";
        if ($obj->type_antivol == 1) {
            $selector .= ' SELECTED';
        }
        $selector .= '>';
        $selector .= $msg["type_antivol_magnetique"] . '</option>';
        $selector .= "<option value='2'";
        if ($obj->type_antivol == 2) {
            $selector .= ' SELECTED';
        }
        $selector .= '>';
        $selector .= $msg["type_antivol_autre"] . '</option>';
        $selector .= '</select></div></div>';
    }
    $bul_expl_form1 = str_replace('!!type_antivol!!', $selector, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!bul_id!!', $bul_id, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!expl_id!!', $obj->expl_id, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!bul_no!!', htmlentities($obj->bul_no, ENT_QUOTES, $charset), $bul_expl_form1);
    $date_date_formatee = formatdate_input($obj->date_date);
    $date_clic = "onClick=\"openPopUp('./../../../select.php?what=calendrier&caller=expl&date_caller=" . str_replace('-', '', $obj->date_date) . "&param1=date_date&param2=date_date_lib&auto_submit=NO&date_anterieure=YES', 'date_date', 250, 300, -2, -2, 'toolbar=no, dependent=yes, resizable=yes')\"  ";
    $date_date = "<input type='hidden' name='date_date' value='" . str_replace('-', '', $obj->date_date) . "' />\n\t\t<input class='saisie-10em' type='text' name='date_date_lib' value='" . $date_date_formatee . "' placeholder='" . $msg["format_date_input_placeholder"] . "'/>\n\t\t<input class='bouton_small' type='button' name='date_date_lib_bouton' value='" . $msg["bouton_calendrier"] . "' " . $date_clic . " />";
    $bul_expl_form1 = str_replace('!!date_date!!', $date_date, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!bul_date!!', htmlentities($obj->bul_date, ENT_QUOTES, $charset), $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!bul_titre!!', htmlentities($obj->bul_titre, ENT_QUOTES, $charset), $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!serial_id!!', $serial_id, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!numero!!', $obj->bul_titre, $bul_expl_form1);
    $bul_expl_form1 = str_replace('!!destinataire!!', $obj->destinataire, $bul_expl_form1);
    $p_perso = new parametres_perso("expl");
    if (!$p_perso->no_special_fields) {
        $c = 0;
        $perso = "";
        $perso_ = $p_perso->show_editable_fields($obj->expl_id);
        for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
            $p = $perso_["FIELDS"][$i];
            if ($c == 0) {
                $perso .= "<div class='row'>\n";
            }
            $perso .= "<div class='colonne3'><label for='" . $p["NAME"] . "' class='etiquette'>" . $p["TITRE"] . " </label>" . $p["COMMENT_DISPLAY"] . "<div class='row'>" . $p["AFF"] . "</div></div>\n";
            $c++;
            if ($c == 3) {
                $perso .= "</div>\n";
                $c = 0;
            }
        }
        if ($c == 1) {
            $perso .= "<div class='colonne2'>&nbsp;</div>\n</div>\n";
        }
        $perso = $perso_["CHECK_SCRIPTS"] . "\n" . $perso;
    } else {
        $perso = "\n<script>function check_form() { return true; }</script>\n";
    }
    $bul_expl_form1 = str_replace("!!champs_perso!!", $perso, $bul_expl_form1);
    if ($pmb_rfid_activate == 1 && $pmb_rfid_serveur_url && !$obj->abt_numeric) {
        $script_rfid_encode = "if(script_rfid_encode()==false) return false;";
        $bul_expl_form1 = str_replace('!!questionrfid!!', $script_rfid_encode, $bul_expl_form1);
    } else {
        $bul_expl_form1 = str_replace('!!questionrfid!!', '', $bul_expl_form1);
    }
    $bul_expl_form1 = str_replace('!!create_notice_bul!!', '<input type="checkbox" value="1" id="create_notice_bul" name="create_notice_bul">&nbsp;' . $msg['bulletinage_create_notice'], $bul_expl_form1);
    return $bul_expl_form1;
}
Exemple #28
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;
 }
 function get_form_list()
 {
     global $msg, $charset, $serialcirc_asklist_filter_tpl, $serialcirc_asklist_tpl;
     global $serialcirc_asklist_tr;
     $tpl = $serialcirc_asklist_filter_tpl;
     $tpl = str_replace('!!localisation_filter!!', gen_liste("select distinct idlocation, location_libelle from docs_location, docsloc_section where num_location=idlocation order by 2 ", "idlocation", "location_libelle", 'location_id', "calcule_section(this);", $this->location_filter, "", "", 0, $msg["serialcirc_asklist_location_all"], 0), $tpl);
     $tpl = str_replace('!!type_filter!!', $this->gen_selector('type_filter', array(0 => $msg['serialcirc_asklist_type_all'], 1 => $msg['serialcirc_asklist_type_0'], 2 => $msg['serialcirc_asklist_type_1']), $this->type_filter), $tpl);
     $tpl = str_replace('!!statut_filter!!', $this->gen_selector('statut_filter', array(0 => $msg['serialcirc_asklist_statut_all'], 1 => $msg['serialcirc_asklist_statut_0'], 2 => $msg['serialcirc_asklist_statut_1'], 3 => $msg['serialcirc_asklist_statut_2'], 4 => $msg['serialcirc_asklist_statut_3']), $this->statut_filter), $tpl);
     if (!count($this->asklist)) {
         return $tpl . $msg["serialcirc_asklist_no"];
     }
     $tpl .= $serialcirc_asklist_tpl;
     $tpl = str_replace('!!location_filter!!', $this->location_filter, $tpl);
     $tpl = str_replace('!!type_filter!!', $this->type_filter, $tpl);
     $tpl = str_replace('!!statut_filter!!', $this->statut_filter, $tpl);
     foreach ($this->asklist as $ask) {
         $tr = $serialcirc_asklist_tr;
         $tr = str_replace("!!date!!", $ask['date'], $tr);
         $tr = str_replace("!!type!!", $msg['serialcirc_asklist_type_' . $ask['type']], $tr);
         $name = "<a href='" . $ask['empr']['view_link'] . "'>" . htmlentities($ask['empr']["empr_libelle"], ENT_QUOTES, $charset) . "</a><br />";
         $tr = str_replace("!!destinataire!!", $name, $tr);
         $abt_list = "";
         if ($ask['type'] == 0) {
             foreach ($ask['abts'] as $abt) {
                 $abt_list .= "<br /><a href='" . $abt['link_diff'] . "' >" . $abt['name'] . " </a>";
             }
         }
         $tr = str_replace("!!perio!!", "<a href='" . $ask['perio']['view_link'] . "'>" . $ask['perio']['header'] . $abt_list, $tr);
         $tr = str_replace("!!statut!!", $msg['serialcirc_asklist_statut_' . $ask['statut']], $tr);
         $tr = str_replace("!!comment!!", $ask['comment'], $tr);
         $tr = str_replace("!!id_ask!!", $ask['id'], $tr);
         $tr = str_replace("!!num_empr!!", $ask['num_empr'], $tr);
         $list_tr .= $tr;
     }
     $tpl = str_replace("!!asklist!!", $list_tr, $tpl);
     return $tpl;
 }
Exemple #30
0
function statut_form($libelle = "", $pret = 1, $trans = 1, $statusdoc_codage_import = "", $statusdoc_owner = 0, $id = 0, $libelle_opac = "", $visible_opac = 1, $allow_resa = 1)
{
    global $msg;
    global $admin_statut_form;
    global $charset;
    $admin_statut_form = str_replace('!!id!!', $id, $admin_statut_form);
    if (!$id) {
        $admin_statut_form = str_replace('!!form_title!!', $msg[115], $admin_statut_form);
    } else {
        $admin_statut_form = str_replace('!!form_title!!', $msg[118], $admin_statut_form);
    }
    $admin_statut_form = str_replace('!!libelle!!', htmlentities($libelle, ENT_QUOTES, $charset), $admin_statut_form);
    $admin_statut_form = str_replace('!!libelle_suppr!!', addslashes($libelle), $admin_statut_form);
    $admin_statut_form = str_replace('!!libelle_opac!!', htmlentities($libelle_opac, ENT_QUOTES, $charset), $admin_statut_form);
    if ($pret) {
        $checkbox = "checked";
    } else {
        $checkbox = "";
    }
    $admin_statut_form = str_replace('!!checkbox!!', $checkbox, $admin_statut_form);
    $admin_statut_form = str_replace('!!pret!!', $pret, $admin_statut_form);
    if ($allow_resa) {
        $checkbox = "checked";
    } else {
        $checkbox = "";
    }
    $admin_statut_form = str_replace('!!checkbox_allow_resa!!', $checkbox, $admin_statut_form);
    if ($trans) {
        $checkbox = "checked";
    } else {
        $checkbox = "";
    }
    $admin_statut_form = str_replace('!!checkbox_trans!!', $checkbox, $admin_statut_form);
    $admin_statut_form = str_replace('!!trans!!', $trans, $admin_statut_form);
    if ($visible_opac) {
        $checkbox = "checked";
    } else {
        $checkbox = "";
    }
    $admin_statut_form = str_replace('!!checkbox_visible_opac!!', $checkbox, $admin_statut_form);
    $admin_statut_form = str_replace('!!visible_opac!!', $visible_opac, $admin_statut_form);
    $admin_statut_form = str_replace('!!statusdoc_codage_import!!', $statusdoc_codage_import, $admin_statut_form);
    $combo_lender = gen_liste("select idlender, lender_libelle from lenders order by lender_libelle ", "idlender", "lender_libelle", "form_statusdoc_owner", "", $statusdoc_owner, 0, $msg[556], 0, $msg["proprio_generique_biblio"]);
    $admin_statut_form = str_replace('!!lender!!', $combo_lender, $admin_statut_form);
    print confirmation_delete("./admin.php?categ=docs&sub=statut&action=del&id=");
    print $admin_statut_form;
}