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'> </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'> </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; }
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'> </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>"; }
function get_cb_dsi($title_form, $message, $form_action, $form_cb = "") { global $dsi_search_tmpl; global $deflt2docs_location, $empr_location_id, $pmb_lecteurs_localises; $dsi_search_tmpl = str_replace("!!titre_formulaire!!", $title_form, $dsi_search_tmpl); $dsi_search_tmpl = str_replace("!!form_action!!", $form_action, $dsi_search_tmpl); $dsi_search_tmpl = str_replace("!!message!!", $message, $dsi_search_tmpl); $dsi_search_tmpl = str_replace("!!cb_initial!!", $form_cb, $dsi_search_tmpl); if ((string) $empr_location_id == "") { $empr_location_id = $deflt2docs_location; } if ($pmb_lecteurs_localises) { $dsi_search_tmpl = str_replace("!!restrict_location!!", docs_location::gen_combo_box_empr($empr_location_id), $dsi_search_tmpl); } else { $dsi_search_tmpl = str_replace("!!restrict_location!!", "", $dsi_search_tmpl); } return $dsi_search_tmpl; }
function show_form($param = '') { global $msg, $pmb_transferts_actif, $pmb_location_reservation; //paramètres pré-enregistré $lst_opt = array(); if ($param['chk_resa']) { foreach ($param['chk_resa'] as $elem) { $lst_opt[$elem] = $elem; } } $empr_location_id = $param['empr_location_id']; //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='resa'>" . $this->msg["planificateur_resa_empr"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='checkbox' name='chk_resa[]' value='resa_en_cours_noconf' " . ($lst_opt["resa_en_cours_noconf"] == "resa_en_cours_noconf" ? "checked" : "") . " />" . $this->msg["resa_en_cours_noconf"] . "\n\t\t\t\t<br /><input type='checkbox' name='chk_resa[]' value='resa_depassee_noconf' " . ($lst_opt["resa_depassee_noconf"] == "resa_depassee_noconf" ? "checked" : "") . " />" . $this->msg["resa_depassee_noconf"] . "\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row' > </div>"; if ($pmb_transferts_actif == "1" || $pmb_location_reservation) { //Choix de la localisation $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='resa'>" . $this->msg["planificateur_resa_loc"] . "</label>\n\t\t\t\t</div>\n\t\t\t\t<div class='colonne_suite'>" . docs_location::gen_combo_box_empr($empr_location_id) . "\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class='row' > </div>"; } return $form_task; }
function generate_form_inscription() { global $subs_form_create, $msg; global $f_nom, $f_prenom, $f_email; global $f_msg, $f_adr1, $f_adr2, $f_cp, $f_ville, $f_pays, $f_tel1; $subs_form_create = str_replace("!!f_nom!!", stripslashes($f_nom), $subs_form_create); $subs_form_create = str_replace("!!f_prenom!!", stripslashes($f_prenom), $subs_form_create); $subs_form_create = str_replace("!!f_email!!", stripslashes($f_email), $subs_form_create); $subs_form_create = str_replace("!!f_login!!", stripslashes($f_login), $subs_form_create); $subs_form_create = str_replace("!!f_password!!", "", $subs_form_create); $subs_form_create = str_replace("!!f_passwordv!!", "", $subs_form_create); $subs_form_create = str_replace("!!f_adr1!!", stripslashes($f_adr1), $subs_form_create); $subs_form_create = str_replace("!!f_adr2!!", stripslashes($f_adr2), $subs_form_create); $subs_form_create = str_replace("!!f_cp!!", stripslashes($f_cp), $subs_form_create); $subs_form_create = str_replace("!!f_ville!!", stripslashes($f_ville), $subs_form_create); $subs_form_create = str_replace("!!f_pays!!", stripslashes($f_pays), $subs_form_create); $subs_form_create = str_replace("!!f_tel1!!", stripslashes($f_tel1), $subs_form_create); $subs_form_create = str_replace("!!f_msg!!", stripslashes($f_msg), $subs_form_create); $subs_form_create = str_replace("!!f_loc!!", docs_location::gen_combo_box_empr("", 0), $subs_form_create); $subs_form_create = str_replace("!!others_informations!!", prepare_post_others_informations(), $subs_form_create); return $subs_form_create; }
} 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"] . " \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 <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']} \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'/> \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'/> \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 " " . $msg["sort_by"] . ": "; echo '<select name="sortby">'; foreach ($sort_params as $id => $caption) { echo '<option ' . ($id == $sortby ? 'selected' : '') . ' value="' . $id . '">' . $caption . '</option>'; } echo '</select>'; echo " <input type='submit' class='bouton' value='" . $msg['actualiser'] . "' onClick=\"this.form.dest.value='';\" /> <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); } }
function show_serial_info($serial_id, $page, $nbr_lignes) { global $serial_action_bar; global $dbh; global $msg; global $nb_per_page_a_search; global $charset; global $deflt_collstate_location, $location; global $pmb_etat_collections_localise, $pmb_droits_explr_localises, $explr_invisible, $explr_visible_unmod; // barre de restriction des bulletins affichés global $aff_bulletins_restrict_numero, $aff_bulletins_restrict_date, $aff_bulletins_restrict_periode; global $view; global $sort_children; global $pmb_opac_url; if ($pmb_etat_collections_localise) { if ($view == "collstate") { global $id; if (isset($id) && $deflt_collstate_location === "0") { //Affiche tous les états de collection après création/modification $location = $deflt_collstate_location; } else { $location = (string) $location == "" ? $deflt_collstate_location : $location; } } else { $location = (string) $location == "" ? $deflt_collstate_location : $location; } } // lien d'ajout d'une notice mère à un caddie $selector_prop = "toolbar=no, dependent=yes, width=500, height=400, resizable=yes, scrollbars=yes"; $cart_click_noti = "onClick=\"openPopUp('./cart.php?object_type=NOTI&item=!!item!!', 'cart', 600, 700, -2, -2, '{$selector_prop}')\""; $cart_link = "<img src='./images/basket_small_20x20.gif' align='middle' alt='basket' title=\"{$msg[400]}\" {$cart_click_noti}>"; if ($current !== false) { $print_action = " <a href='#' onClick=\"openPopUp('./print.php?current_print={$current}¬ice_id=" . $serial_id . "&action_print=print_prepare','print',500,600,-2,-2,'scrollbars=yes,menubar=0'); w.focus(); return false;\"><img src='./images/print.gif' border='0' align='center' alt=\"" . $msg["histo_print"] . "\" title=\"" . $msg["histo_print"] . "\"/></a>"; } $visualise_click_notice = "\n\t<script type=\"text/javascript\" src='./javascript/select.js'></script>\n\t\n\t<a href='#' onClick='show_frame(\"{$pmb_opac_url}" . "notice_view.php?id={$serial_id}\")'><img src='./images/search.gif' align='middle' title=\"{$msg["noti_see_gestion"]}\" name='imEx' border='0' /></a>"; $base_url = "./catalog.php?categ=serials&sub=view&serial_id={$serial_id}"; $serial_action_bar = str_replace('!!serial_id!!', $serial_id, $serial_action_bar); if ($serial_id) { $myQuery = pmb_mysql_query("SELECT * FROM notices WHERE notice_id={$serial_id} ", $dbh); } if ($serial_id && pmb_mysql_num_rows($myQuery)) { //Bulletins $myPerio = pmb_mysql_fetch_object($myQuery); // function serial_display ($id, $level='1', $action_serial='', $action_analysis='', $action_bulletin='', $lien_suppr_cart="", $lien_explnum="", $bouton_explnum=1,$print=0,$show_explnum=1, $show_statut=0, $show_opac_hidden_fields=true ) { $isbd = new serial_display($myPerio, 5, "", "", "", "", "./catalog.php?categ=serials&sub=explnum_form&serial_id=!!serial_id!!&explnum_id=!!explnum_id!!"); $perio_header = $isbd->header; // isbd du périodique $perio_isbd = $isbd->isbd; $isbd->get_etat_periodique(); $perio_isbd .= $isbd->print_etat_periodique(); global $avis_quoifaire, $valid_id_avis; $perio_isbd = str_replace('<!-- !!avis_notice!! -->', avis_notice($serial_id, $avis_quoifaire, $valid_id_avis), $perio_isbd); if (!$page) { $page = 1; } $debut = ($page - 1) * $nb_per_page_a_search; switch ($view) { case "abon": $base_url = "./catalog.php?categ=serials&sub=view&serial_id={$serial_id}&view=abon"; require_once "views/view_abon.inc.php"; break; case "modele": require_once "views/view_modeles.inc.php"; break; case "collstate": $base_url = "./catalog.php?categ=serials&sub=view&serial_id={$serial_id}&view=collstate"; require_once "views/view_collstate.inc.php"; break; default: // barre de restriction des bulletins affichés $clause = ""; if ($aff_bulletins_restrict_numero) { $clause = " and bulletin_numero like '%" . str_replace("*", "%", $aff_bulletins_restrict_numero) . "%' "; $base_url .= "&aff_bulletins_restrict_numero=" . urlencode($aff_bulletins_restrict_numero); } if ($aff_bulletins_restrict_date) { $aff_bulletins_restrict_date_traite = str_replace("*", "%", $aff_bulletins_restrict_date); $tab_bulletins_restrict_date = explode($msg[format_date_input_separator], $aff_bulletins_restrict_date_traite); if (count($tab_bulletins_restrict_date) == 3) { $aff_bulletins_restrict_date_traite = $tab_bulletins_restrict_date[2] . "-" . $tab_bulletins_restrict_date[1] . "-" . $tab_bulletins_restrict_date[0]; } if (count($tab_bulletins_restrict_date) == 2) { $aff_bulletins_restrict_date_traite = $tab_bulletins_restrict_date[1] . "-" . $tab_bulletins_restrict_date[0]; } if (count($tab_bulletins_restrict_date) == 1) { $aff_bulletins_restrict_date_traite = $tab_bulletins_restrict_date[0]; } $clause .= " and date_date like '%" . $aff_bulletins_restrict_date_traite . "%'"; $base_url .= "&aff_bulletins_restrict_date=" . urlencode($aff_bulletins_restrict_date); } if ($aff_bulletins_restrict_periode) { $aff_bulletins_restrict_periode_traite = str_replace("*", "%", $aff_bulletins_restrict_periode); $clause .= " and mention_date like '%" . $aff_bulletins_restrict_periode_traite . "%'"; $base_url .= "&aff_bulletins_restrict_periode=" . urlencode($aff_bulletins_restrict_periode); } //On compte les expl de la localisation $rqt = "SELECT COUNT(1) FROM bulletins " . ($location ? ", exemplaires" : "") . " WHERE " . ($location ? "(expl_bulletin=bulletin_id and expl_location='{$location}' or expl_location is null) and " : "") . " bulletin_notice='{$serial_id}' "; $myQuery = pmb_mysql_query($rqt, $dbh); $nb_expl_loc = pmb_mysql_result($myQuery, 0, 0); //On compte les bulletins de la localisation $rqt = "SELECT count(distinct bulletin_id) FROM bulletins " . ($location ? ",exemplaires " : "") . " WHERE " . ($location ? "(expl_bulletin=bulletin_id and expl_location='{$location}') and " : "") . " bulletin_notice='{$serial_id}' "; $myQuery = pmb_mysql_query($rqt, $dbh); if ($execute_query && pmb_mysql_num_rows($myQuery)) { $nb_bull_loc = pmb_mysql_result($myQuery, 0, 0); } //On compte les bulletinsà afficher $rqt = "SELECT count(distinct bulletin_id) FROM bulletins " . ($location ? ", exemplaires" : "") . " WHERE " . ($location ? "(expl_bulletin=bulletin_id and expl_location='{$location}' or expl_location is null) and " : "") . " bulletin_notice='{$serial_id}' {$clause} "; $myQuery = pmb_mysql_query($rqt, $dbh); $nbr_lignes = pmb_mysql_result($myQuery, 0, 0); require_once "views/view_bulletins.inc.php"; break; } // Gestion de la supression de la notice si les droits de modification des exemplaires sont localisés. $flag_no_delete_notice = 0; //visibilité des exemplaires if ($pmb_droits_explr_localises) { global $explr_visible_mod; $explr_tab_modif = explode(",", $explr_visible_mod); $requete = "SELECT expl_location from exemplaires, bulletins,notices where\n\t\t\t\texpl_bulletin=bulletin_id and bulletin_notice=notice_id and notice_id= {$serial_id}"; $execute_query = pmb_mysql_query($requete); if ($execute_query && pmb_mysql_num_rows($execute_query)) { while ($r = pmb_mysql_fetch_object($execute_query)) { if (!in_array($r->expl_location, $explr_tab_modif)) { $flag_no_delete_notice = 1; } } } } if (!$flag_no_delete_notice) { $serial_action_bar = str_replace('!!delete_serial_button!!', "<input type='button' class='bouton' onclick=\"confirm_serial_delete();\" value='{$msg['63']}' />", $serial_action_bar); } else { $serial_action_bar = str_replace('!!delete_serial_button!!', "", $serial_action_bar); } $serial_action_bar = str_replace('!!issn!!', $myPerio->code, $serial_action_bar); // action_bar : serials.tpl.php... // mise à jour des info du javascript $serial_action_bar = str_replace('!!nb_bulletins!!', $isbd->serial_nb_bulletins, $serial_action_bar); $serial_action_bar = str_replace('!!nb_articles!!', $isbd->serial_nb_articles, $serial_action_bar); $serial_action_bar = str_replace('!!nb_expl!!', $isbd->serial_nb_exemplaires, $serial_action_bar); $serial_action_bar = str_replace('!!nb_etat_coll!!', $isbd->serial_nb_etats_collection, $serial_action_bar); $serial_action_bar = str_replace('!!nb_abo!!', $isbd->serial_nb_abo_actif, $serial_action_bar); // titre général du périodique print pmb_bidi("<div class='row'>\n\t \t\t\t<div class='notice-perio'>{$isbd->aff_statut}\n\t\t\t\t\t<h2 style='display: inline;'>" . str_replace('!!item!!', $serial_id, $cart_link) . $print_action . $visualise_click_notice . " " . $perio_header . "</h2>\n\t \t\t\t\t\t<div class='row'>{$perio_isbd}</div>\n\t\t\t\t\t\t\t<div class='row'>{$collections_state}</div>\n\t \t\t\t\t<hr />\n\t \t\t\t\t<div class='row'>\n\t \t\t\t\t\t{$serial_action_bar}\n\t \t\t\t\t\t</div>\n\t \t\t\t\t</div>\n\t \t\t\t</div>"); // bulletinage $onglets = "\n\t\t<div id='content_onglet_perio'>\n\t\t\t<span class='" . (!$view ? "onglet-perio-selected'>" : "onglets-perio'>") . "<a href=\"#\" onClick=\"document.location='catalog.php?categ=serials&sub=view&serial_id=" . $serial_id . "'\">" . $msg["abts_onglet_bull"] . "</a></span>\n\t\t\t<span class='" . ($view == "abon" ? "onglet-perio-selected'>" : "onglets-perio'>") . "<a href=\"#\" onClick=\"document.location='catalog.php?categ=serials&sub=view&serial_id=" . $serial_id . "&view=abon'\">" . $msg["abts_onglet_abt"] . "</a></span>\n\t\t\t<span class='" . ($view == "modele" ? "onglet-perio-selected'>" : "onglets-perio'>") . "<a href=\"#\" onClick=\"document.location='catalog.php?categ=serials&sub=view&serial_id=" . $serial_id . "&view=modele'\">" . $msg["abts_onglet_modele"] . "</a></span>\n\t\t\t<span class='" . ($view == "collstate" ? "onglet-perio-selected'>" : "onglets-perio'>") . "<a href=\"#\" onClick=\"document.location='catalog.php?categ=serials&sub=view&serial_id=" . $serial_id . "&view=collstate'\">" . $msg["abts_onglet_collstate"] . "</a></span>\n\t\t</div>\n\t\t"; print $onglets; $totaux_loc = ""; $temp_location = 0; $list_locs = ""; switch ($view) { case "modele": $list_locs = ""; break; case "abon": if ($location) { $temp_location = $location; } $list_locs = docs_location::gen_combo_box_empr($temp_location, 1, "document.filter_form.location.value=this.options[this.selectedIndex].value; document.filter_form.submit();"); $link_bulletinage = "<a href='./catalog.php?categ=serials&sub=pointage&serial_id={$serial_id}&location_view={$location}'>" . $msg["link_notice_to_bulletinage"] . "</a>"; break; case "collstate": if ($pmb_etat_collections_localise) { if ($location) { $temp_location = $location; } $list_locs = docs_location::gen_combo_box_empr($temp_location, 1, "document.filter_form.location.value=this.options[this.selectedIndex].value; document.filter_form.submit();"); } $link_bulletinage = "<input type='button' class='bouton' value='" . $msg["collstate_add_collstate"] . "' \n\t\t\t\tonClick=\"document.location='./catalog.php?categ=serials&sub=collstate_form&serial_id={$serial_id}&id=';\">"; break; default: if ($location) { $temp_location = $location; } $list_locs = docs_location::gen_combo_box_empr($temp_location, 1, "document.filter_form.location.value=this.options[this.selectedIndex].value; document.filter_form.submit();"); $link_bulletinage = "<a href='./catalog.php?categ=serials&sub=pointage&serial_id={$serial_id}&location_view={$location}'>" . $msg["link_notice_to_bulletinage"] . "</a>"; if ($nb_bull_loc) { if ($temp_location && $list_locs) { $totaux_loc = "<strong>{$nb_bull_loc}</strong> " . $msg["serial_nb_bulletin"] . "\n\t\t\t\t\t\t<strong>{$nb_expl_loc}</strong> " . $msg["bulletin_nb_ex"]; } } break; } print pmb_bidi("\n\t\t<div class='bulletins-perio'>\n\t\t\t<div class='row'>\n\t\t\t\t<h3>" . ($view == "abon" ? $msg["perio_abts_title"] : ($view == "modele" ? $msg["perio_modeles_title"] : ($view == "collstate" ? $msg["abts_onglet_collstate"] : $msg["4001"]))) . " {$list_locs}\n\t\t\t\t{$link_bulletinage}\n\t\t\t\t</h3>\n\t\t\t\t{$totaux_loc}\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<div align='center'>\n\t\t\t\t\t{$pages_display}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t{$bulletins}\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<div align='center'>\n\t\t\t\t\t{$pages_display}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>"); } }
function get_cb($title, $message, $title_form, $form_action, $check = 0, $cb_initial = "", $creation = 0) { global $empr_cb_tmpl; global $empr_cb_tmpl_create; global $script1; global $script2; global $deflt2docs_location, $pmb_lecteurs_localises, $empr_location_id, $param_allloc; if ($cb_initial === 0) { $cb_initial = ""; } if ($creation == 1) { $empr_cb_tmpl = $empr_cb_tmpl_create; } switch ($check) { case '1': // script javascript 1 : checke seulement si le champ contient des trucs $empr_cb_tmpl = str_replace("!!script!!", $script1, $empr_cb_tmpl); break; case '2': // script javascript 2 : checke si le champ ne contient que de l'alpha $empr_cb_tmpl = str_replace("!!script!!", $script2, $empr_cb_tmpl); break; case '0': default: // aucun test $empr_cb_tmpl = str_replace("!!script!!", "", $empr_cb_tmpl); break; } $empr_cb_tmpl = str_replace("!!titre_formulaire!!", $title_form, $empr_cb_tmpl); $empr_cb_tmpl = str_replace("!!form_action!!", $form_action, $empr_cb_tmpl); $empr_cb_tmpl = str_replace("!!title!!", $title, $empr_cb_tmpl); $empr_cb_tmpl = str_replace("!!message!!", $message, $empr_cb_tmpl); $empr_cb_tmpl = str_replace("!!cb_initial!!", (string) $cb_initial, $empr_cb_tmpl); if ($pmb_lecteurs_localises) { if ($empr_location_id) { $deflt2docs_location = $empr_location_id; } elseif ($param_allloc) { $deflt2docs_location = 0; } $empr_cb_tmpl = str_replace("!!restrict_location!!", docs_location::gen_combo_box_empr($deflt2docs_location), $empr_cb_tmpl); } else { $empr_cb_tmpl = str_replace("!!restrict_location!!", "", $empr_cb_tmpl); } print pmb_bidi($empr_cb_tmpl); }
if (count($not_all_mail) > 0) { print "\n\t\t\t\t\t<form name='print_empr_ids' action='pdf.php?pdfdoc=lettre_retard{$restrict_localisation}' target='lettre' method='post'>\n\t\t\t\t\t"; for ($i = 0; $i < count($not_all_mail); $i++) { print "<input type='hidden' name='empr_print[]' value='" . $not_all_mail[$i] . "'/>"; } print "\t<script>openPopUp('','lettre', 600, 500, -2, -2, 'toolbar=no, dependent=yes, resizable=yes');\n\t\t\t\t\t\tdocument.print_empr_ids.submit();\n\t\t\t\t\t\t</script>\n\t\t\t\t\t</form>\n\t\t\t\t\t"; } } break; } //switch($dest) } else { // la requête n'a produit aucun résultat switch ($dest) { case "TABLEAU": break; case "TABLEAUHTML": break; default: echo $msg['n_retards_sur_total_de']; // formulaire de restriction echo "\n\t\t\t\t<form class='form-{$current_module}' id='form-{$current_module}-list' name='form-{$current_module}-list' action='{$url_page}?categ={$categ}&sub={$sub}&limite_page={$nb_per_page}&page={$page}' method='post'>\n\t\t\t \t<div class='left'>\n\t\t\t\t\t{$msg['circ_afficher']}\n\t\t\t \t\t<input type=text name=limite_page size=2 value={$nb_per_page} class='petit' /> {$msg['1905']} "; if ($pmb_lecteurs_localises) { echo " / " . $msg['editions_filter_empr_location'] . " : " . docs_location::gen_combo_box_empr($empr_location_id); echo $msg['editions_filter_docs_location'] . " : " . docs_location::gen_combo_box_docs($docs_location_id); } echo '</div>'; echo "\n\t\t\t\t<input type='button' class='bouton' value='" . $msg['actualiser'] . "' onClick=\"this.form.dest.value=''; this.form.submit();\"> <input type='hidden' name='dest' value='' />\n\t\t\t\t</form>\n\t\t\t\t<br />"; error_message($msg[46], str_replace('!!form_cb!!', $form_cb, $msg['edit_lect_aucun_trouve']), 1, './edit.php?categ=empr&sub=' . $sub); } }