本文整理汇总了PHP中parametres_perso::show_fields方法的典型用法代码示例。如果您正苦于以下问题:PHP parametres_perso::show_fields方法的具体用法?PHP parametres_perso::show_fields怎么用?PHP parametres_perso::show_fields使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parametres_perso
的用法示例。
在下文中一共展示了parametres_perso::show_fields方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: do_retour
function do_retour($stuff, $confirmed = 1)
{
global $dbh;
global $msg;
global $alert_sound_list, $pmb_play_pret_sound;
global $pmb_gestion_amende, $pmb_gestion_financiere, $pmb_blocage_retard, $pmb_blocage_max, $pmb_blocage_delai, $pmb_blocage_coef;
global $deflt_docs_location;
$erreur_affichage = '';
if (!is_object($stuff)) {
die("erreur dans le module ./circ/retour.inc [do_retour()]. Contactez l'admin");
}
// récupération localisation exemplaire
$query = "SELECT t.tdoc_libelle as type_doc";
$query .= ", l.location_libelle as location";
$query .= ", s.section_libelle as section";
$query .= " FROM docs_type t";
$query .= ", docs_location l";
$query .= ", docs_section s";
$query .= " WHERE t.idtyp_doc=" . $stuff->expl_typdoc;
$query .= " AND l.idlocation=" . $stuff->expl_location;
$query .= " AND s.idsection=" . $stuff->expl_section;
$query .= " LIMIT 1";
$result = mysql_query($query, $dbh);
$info_doc = mysql_fetch_object($result);
print pmb_bidi("<br /><form><div class='row'><div class='left'><strong>" . $stuff->libelle . "</strong></div>");
// flag confirm retour
if (!$confirmed and $stuff->pret_idempr) {
print "\n\t\t\t<div class='right'>\n\t\t\t<input type='button' class='bouton' \n\t\t\t\t\tname='confirm_ret' value='" . $msg['retour_confirm'] . "'\n\t\t\t\t\tonClick=\"document.location='./circ.php?categ=retour&cb_expl=" . $stuff->expl_cb . "'\">\n\t\t\t</div>";
} elseif ($stuff->pret_idempr) {
print "\n\t\t\t\t<div class='right'>\n\t\t\t\t\t<font color='RED'><b>{$msg['retour_ok']}</b></font>\n\t\t\t\t</div>";
}
print "</div>";
print pmb_bidi("<br /><b>" . $stuff->expl_cb . "</b> " . $info_doc->type_doc);
print pmb_bidi('. ' . $info_doc->location);
print pmb_bidi('. ' . $info_doc->section);
print pmb_bidi('. ' . $stuff->expl_cote);
print " <input class='bouton' type='button' value=\"" . $msg[375] . "\" onClick=\"document.location='circ.php?categ=visu_ex&form_cb_expl=" . $stuff->expl_cb . "';\" />";
print "</form>";
//Champs personalisés
$p_perso = new parametres_perso("expl");
$perso_aff = "";
if (!$p_perso->no_special_fields) {
$perso_ = $p_perso->show_fields($stuff->expl_id);
for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
$p = $perso_["FIELDS"][$i];
if ($p["AFF"]) {
$perso_aff .= "<br />" . $p["TITRE"] . " " . $p["AFF"];
}
}
}
if ($perso_aff) {
print "<div class='row'>" . $perso_aff . "</div>";
}
$script_magnetique = "\n<script language='javascript' type='text/javascript'>\nvar requete = null;\n\nfunction creerRequette(){\n\tif(window.XMLHttpRequest) // Firefox\n\t\trequete = new XMLHttpRequest();\n\telse if(window.ActiveXObject) // Internet Explorer\n \t\trequete = new ActiveXObject('Microsoft.XMLHTTP');\n\telse { // XMLHttpRequest non supporté par le navigateur\n \t\talert('Votre navigateur ne supporte pas les objets XMLHTTPRequest...');\n \treturn;\n\t}\n}\n\nfunction magnetise(commande){\n\tcreerRequette();\n\tif(netscape.security.PrivilegeManager)netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');\t\n\trequete.open('GET', 'http://localhost:30000/?send_value='+commande+'&command=Send', false);\n\trequete.send(null);\n\tif(requete.readyState != 4) alert('Requête antivol non effectuée !');\n}\n\n";
global $pmb_antivol;
if ($pmb_antivol > 0) {
if ($stuff->type_antivol == 1) {
// c'est un support non magnétique (livre, revue...)
print "{$script_magnetique}" . "magnetise('RRR');</script>";
}
if ($stuff->type_antivol == 2) {
//c'est un support magnétique (cassette)
print "{$script_magnetique}" . "magnetise('SSS');</script>";
}
}
//si le retour se passe sur un site différent de ce lui de l'exemplaire
global $pmb_transferts_actif;
$transfert_mauvais_site = false;
if ($stuff->expl_location != $deflt_docs_location) {
$alert_sound_list[] = "critique";
$html_erreur_site = "<hr /><div class='erreur'>";
//on agit pour faire l'action par defaut
//et que c'est un retour d'emprunt
if ($pmb_transferts_actif && $stuff->pret_idempr) {
global $transferts_retour_action_defaut;
global $transferts_retour_action_autorise_autre;
$trans = new transfert();
//pour afficher le site de l'exemplaire
$rqtSite = "SELECT location_libelle FROM docs_location WHERE idlocation=" . $stuff->expl_location;
$resSite = mysql_result(mysql_query($rqtSite), 0);
//si on propose une autre action
if ($transferts_retour_action_autorise_autre == "1") {
$texte_change_loc = str_replace("!!lbl_site!!", $resSite, $msg["transferts_circ_retour_lbl_change_localisation"]);
}
$texte_change_loc = str_replace("!!liste_sections!!", "<select onchange='enregLoc(this)'>!!liste!!</select>", $texte_change_loc);
//on genere la liste des sections
$rqt = "SELECT idsection, section_libelle FROM docs_section ORDER BY section_libelle";
$res_section = mysql_query($rqt);
$liste_section = "";
while ($value = mysql_fetch_object($res_section)) {
$liste_section .= "<option value='" . $value->idsection . "'";
if ($value->idsection == $stuff->expl_section) {
$liste_section .= " selected";
$expl_section_libelle = $value->section_libelle;
}
$liste_section .= ">" . $value->section_libelle . "</option>";
}
$texte_change_loc = addslashes(str_replace("!!liste!!", $liste_section, $texte_change_loc));
$html_erreur_site .= "\n<form name='actionTrans'>\n<input type='hidden' name='typeTrans' value='" . $transferts_retour_action_defaut . "'>\n<input type='hidden' name='explTrans' value='" . $stuff->expl_id . "'>\n<script language='javascript'>\nmsg_inf_loc = '" . $texte_change_loc . "';\nmsg_bt_loc = '" . str_replace("'", "\\'", $msg["transferts_circ_retour_bt_retour_mauvaise_localisation"]) . "';\nmsg_inf_trans = '" . str_replace("'", "\\'", str_replace("!!lbl_site!!", $resSite, $msg["transferts_circ_retour_lbl_transfert"])) . "';\nmsg_bt_trans = '" . str_replace("'", "\\'", $msg["transferts_circ_retour_bt_changement_localisation"]) . "';\n\nfunction changeAction() {\n\n\tvar actionTrans = new http_request();\n\tvar url= './ajax.php?module=circ&categ=transferts&idexpl=' + document.actionTrans.explTrans.value + '&action=';\n\t\t\t\t\n\tswitch (document.actionTrans.typeTrans.value) {\n\t\tcase '0':\n\t\t\t//il y a eu un changement localisation\n\t\t\t//on propose un transfert\n\t\t\tif (confirm('" . addslashes($msg["transferts_circ_retour_confirm_gen_transfert"]) . "')) {\n\n\t\t\t\turl = url + 'gen_transfert¶m=' + document.actionTrans.paramTrans.value ;\n\t\t\t\n\t\t\t\tif (actionTrans.request(url)) {\n\t\t\t\t\t// Il y a une erreur. Afficher le message retourné\n\t\t\t\t\talert ( '" . addslashes($msg["540"]) . " : ' + actionTrans.get_text() );\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t//tout c'est bien passe\n\t\t\t\t\t\n\t\t\t\t\t//on recupere les infos\n\t\t\t\t\tdocument.actionTrans.typeTrans.value = '1';\n\t\t\t\t\tdocument.actionTrans.paramTrans.value = actionTrans.get_text();\n\t\t\t\t\t\n\t\t\t\t\t//on change les textes\n\t\t\t\t\tdocument.actionTrans.btActionTrans.value = msg_bt_trans;\n\t\t\t\t\tdocument.getElementById('libInfoTransfert').innerHTML = msg_inf_trans; \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}//if confirm\n\t\t\t\n\t\t\t\n\t\t\tbreak;\n\t\n\t\tcase '1':\n\t\t\t//il y a eu un transfert\n\t\t\t//on propose un changement de localisation\n\t\t\tif (confirm('" . addslashes($msg["transferts_circ_retour_confirm_change_loc"]) . "')) {\n\n\t\t\t\turl = url + 'change_loc¶m=' + document.actionTrans.paramTrans.value ;\n\t\t\t\n\t\t\t\tif (actionTrans.request(url)) {\n\t\t\t\t\t// Il y a une erreur. Afficher le message retourné\n\t\t\t\t\talert ( '" . addslashes($msg["540"]) . " : ' + actionTrans.get_text() );\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t//tout c'est bien passe\n\t\t\t\t\t\n\t\t\t\t\t//on recupere les infos\n\t\t\t\t\tdocument.actionTrans.typeTrans.value = '0';\n\t\t\t\t\tdocument.actionTrans.paramTrans.value = actionTrans.get_text();\n\t\t\t\t\t\n\t\t\t\t\t//on change les textes\n\t\t\t\t\tdocument.actionTrans.btActionTrans.value = msg_bt_loc;\n\t\t\t\t\tdocument.getElementById('libInfoTransfert').innerHTML = msg_inf_loc; \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t} //if confirm\n\t\t\tbreak;\n\t} //switch\n\t\t\n}\n\nfunction enregLoc(obj) {\n\tval = obj.options[obj.selectedIndex].value;\n\t\n\tvar actionTrans = new http_request();\n\tvar url= './ajax.php?module=circ&categ=transferts&idexpl=' + document.actionTrans.explTrans.value + '&action=change_section¶m='+val;\n\t\n\tif (actionTrans.request(url)) {\n\t\t// Il y a une erreur. Afficher le message retourné\n\t\talert ( '" . addslashes($msg["540"]) . " : ' + actionTrans.get_text() );\t\t\t\n\t}\n}\n</script>";
if ($stuff->resa_idempr) {
//.........这里部分代码省略.........
示例2: extrait_info_empr
function extrait_info_empr($sql = "", $entete = 1, $flag = "")
{
global $dbh;
global $dest;
global $worksheet;
global $entete_bloc;
global $msg;
global $charset;
global $debligne_excel;
global $etat_table;
// permet de savoir si les tag table sont ouverts ou fermés
global $max_perso;
global $res_compte1;
if (!$debligne_excel) {
$debligne_excel = 0;
}
$res = @pmb_mysql_query($sql, $dbh);
$nbr_lignes = @pmb_mysql_num_rows($res);
$nbr_champs = @pmb_mysql_num_fields($res);
if ($nbr_lignes) {
switch ($dest) {
case "TABLEAU":
if ($entete) {
$worksheet->write_string(1 + $debligne_excel, 0, $msg["caddie_mess_edition_" . $entete_bloc]);
$debligne_excel++;
}
for ($i = 0; $i < $nbr_champs; $i++) {
// entête de colonnes
$fieldname = pmb_mysql_field_name($res, $i);
if ($entete) {
$worksheet->write_string(1 + $debligne_excel, 0, $msg['caddie_action_marque']);
$worksheet->write_string(1 + $debligne_excel, $i + 1, ${fieldname});
}
}
if ($entete) {
$worksheet->write_string(1 + $debligne_excel, $nbr_champs + 1, "DESCR");
for ($i = 0; $i < $max_perso; $i++) {
$perso = pmb_mysql_fetch_object($res_compte1);
$worksheet->write_string(1 + $debligne_excel, $nbr_champs + 2 + $i, $perso->titre);
}
}
if ($entete) {
$debligne_excel++;
}
for ($i = 0; $i < $nbr_lignes; $i++) {
$debligne_excel++;
$row = pmb_mysql_fetch_row($res);
$id_notice = $row[0];
if ($flag) {
$worksheet->write_string($i + $debligne_excel, 0, "X");
}
$j = 0;
foreach ($row as $dummykey => $col) {
if (!$col) {
$col = " ";
}
$worksheet->write_string($i + $debligne_excel, $j + 1, $col);
$j++;
}
$p_perso = new parametres_perso("empr");
//Champs personalisés
if (!$p_perso->no_special_fields) {
$perso_ = $p_perso->show_fields($id_notice);
for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
$p = $perso_["FIELDS"][$i];
$worksheet->write_string($debligne_excel, $nbr_champs + 2 + $i, html_entity_decode($p["AFF"], ENT_QUOTES | ENT_COMPAT, $charset));
}
}
}
break;
case "TABLEAUHTML":
if ($entete) {
if ($etat_table) {
echo "\n</table>";
}
echo "<h3>" . $msg["caddie_mess_edition_" . $entete_bloc] . "</h3>";
echo "\n<table><th align='left'>" . $msg['caddie_action_marque'] . "</th>";
$etat_table = 1;
for ($i = 0; $i < $nbr_champs; $i++) {
$fieldname = pmb_mysql_field_name($res, $i);
print "<th align='left'>{$fieldname}</th>";
}
print "<th align='left'>DESCR</th>";
for ($i = 0; $i < $max_perso; $i++) {
$perso = pmb_mysql_fetch_object($res_compte1);
print "<th align='left'>" . $perso->titre . "</th>";
}
}
for ($i = 0; $i < $nbr_lignes; $i++) {
$row = pmb_mysql_fetch_row($res);
$id_notice = $row[0];
echo "<tr>";
if ($flag) {
print "<td>X</td>";
} else {
print "<td> </td>";
}
foreach ($row as $dummykey => $col) {
if (is_numeric($col)) {
$col = "'" . $col;
//.........这里部分代码省略.........
示例3: htmlentities
function show_consult_form($last_modified = 0)
{
global $idetat, $iduser, $idempr, $user_input;
global $date_debut, $date_fin, $id_type, $id_theme, $dmde_loc;
global $form_consult_dmde, $charset, $msg, $dbh, $demandes_init_workflow, $form_consult_linked_record;
global $pmb_type_audit, $opac_demandes_no_action, $opac_demandes_allow_from_record;
$form_consult_dmde = str_replace('!!form_title!!', htmlentities($this->titre_demande, ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!sujet_dmde!!', htmlentities($this->sujet_demande, ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!etat_dmde!!', htmlentities($this->workflow->getStateCommentById($this->etat_demande), ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!date_dmde!!', htmlentities(formatdate($this->date_demande), ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!date_butoir_dmde!!', htmlentities(formatdate($this->deadline_demande), ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!date_prevue_dmde!!', htmlentities(formatdate($this->date_prevue), ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!progression_dmde!!', htmlentities($this->progression . '%', ENT_QUOTES, $charset), $form_consult_dmde);
for ($i = 0; $i < sizeof($this->users); $i++) {
if ($i == sizeof($this->users) - 1) {
$users .= htmlentities($this->users[$i]['nom'], ENT_QUOTES, $charset);
} else {
$users .= htmlentities($this->users[$i]['nom'], ENT_QUOTES, $charset) . " / ";
}
}
$carac_empr = $this->getCaracEmpr($this->num_demandeur);
$nom = $carac_empr['nom'];
$cb = $carac_empr['empr_cb'];
$nom_emprunteur = "";
if (SESSrights & CIRCULATION_AUTH) {
$nom_emprunteur = "<a href=\"circ.php?categ=pret&form_cb={$cb}\" >" . htmlentities($nom, ENT_QUOTES, $charset) . "</a>";
}
$form_consult_dmde = str_replace('!!demandeur!!', $nom_emprunteur ? $nom_emprunteur : $nom, $form_consult_dmde);
$form_consult_dmde = str_replace('!!attribution!!', $users, $form_consult_dmde);
$form_consult_dmde = str_replace('!!iddemande!!', $this->id_demande, $form_consult_dmde);
$form_consult_dmde = str_replace('!!theme_dmde!!', htmlentities($this->theme_libelle, ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!type_dmde!!', htmlentities($this->type_libelle, ENT_QUOTES, $charset), $form_consult_dmde);
if ($opac_demandes_allow_from_record && $this->num_linked_notice) {
$record_datas = record_display::get_record_datas($this->num_linked_notice);
$form_consult_dmde = str_replace('!!form_linked_record!!', $form_consult_linked_record, $form_consult_dmde);
$form_consult_dmde = str_replace('!!linked_record!!', htmlentities($record_datas->get_tit1(), ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!linked_record_id!!', htmlentities($this->num_linked_notice, ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!linked_record_link!!', htmlentities($record_datas->get_permalink(), ENT_QUOTES, $charset), $form_consult_dmde);
} else {
$form_consult_dmde = str_replace('!!form_linked_record!!', "", $form_consult_dmde);
}
//Champs personalisés
$perso_aff = "";
$p_perso = new parametres_perso("demandes");
if (!$p_perso->no_special_fields) {
$perso_ = $p_perso->show_fields($this->id_demande);
for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
$p = $perso_["FIELDS"][$i];
if ($p["AFF"] && $p["OPAC_SHOW"]) {
$perso_aff .= "<br />" . $p["TITRE"] . " " . nl2br($p["AFF"]);
}
}
}
if ($perso_aff) {
$form_consult_dmde = str_replace("!!champs_perso!!", $perso_aff, $form_consult_dmde);
} else {
$form_consult_dmde = str_replace("!!champs_perso!!", "", $form_consult_dmde);
}
if (self::is_notice_visible($this)) {
$link_noti = "<a href='" . $opac_url_base . "index.php?lvl=notice_display&id=" . $this->num_notice . "' alt='" . $msg['demandes_see_notice'] . "' title='" . $msg['demandes_see_notice'] . "'><img src='{$base_path}/images/mois.gif' /></a>";
} else {
$link_noti = "";
}
$form_consult_dmde = str_replace('!!icone!!', $link_noti, $form_consult_dmde);
//construction de l'url de retour
$params_retour = '';
if ($idetat) {
$params_retour .= "&idetat=" . $idetat;
}
// if($iduser){
// $params_retour.="&iduser=".$iduser;
// }
// if($idempr){
// $params_retour.="&idempr=".$idempr;
// }
if ($user_input) {
$params_retour .= "&user_input=" . $user_input;
}
if ($date_debut) {
$params_retour .= "&date_debut=" . $date_debut;
}
if ($date_fin) {
$params_retour .= "&date_fin=" . $date_fin;
}
if ($id_type) {
$params_retour .= "&id_type=" . $id_type;
}
if ($id_theme) {
$params_retour .= "&id_theme=" . $id_theme;
}
if ($dmde_loc) {
$params_retour .= "&dmde_loc=" . $dmde_loc;
}
if ($params_retour) {
$form_consult_dmde = str_replace('!!params_retour!!', htmlentities(stripslashes($params_retour), ENT_QUOTES, $charset), $form_consult_dmde);
} else {
$form_consult_dmde = str_replace('!!params_retour!!', "", $form_consult_dmde);
}
if (sizeof($this->users) && $demandes_init_workflow !== "2" && !$opac_demandes_no_action) {
$listActionButton = ' ' . $msg['demandes_action_type_add'] . ' ';
//.........这里部分代码省略.........
示例4: array
function fetch_empr($empr_cb = '', $empr_id = '')
{
global $dbh;
global $msg;
global $charset;
$result = array('empr_id' => 0, 'empr_cb' => "", 'nom' => "", 'prenom' => "", 'sexe' => 0, 'birth' => "", 'adr1' => "", 'adr2' => "", 'cp' => "", 'ville' => "", 'pays' => "", 'mail' => "", 'tel1' => "", 'sms' => 0, 'tel2' => "", 'prof' => "", 'categ' => "", 'cat_l' => "", 'cstat' => "", 'cstat_l' => "", 'cdate' => "", 'mdate' => "", 'login' => "", 'pwd' => "", 'type_abt' => 0, 'location' => 0, 'location_l' => "", 'date_blocage' => "", 'statut' => 0, 'statut_libelle' => "", 'total_loans' => 0, 'allow_loan' => 0, 'allow_book' => 0, 'allow_opac' => 0, 'allow_dsi' => 0, 'allow_dsi_priv' => 0, 'allow_sugg' => 0, 'allow_prol' => 0, 'date_adhesion' => "", 'date_expiration' => "", 'last_loan_date' => "", 'nb_pret' => 0, 'msg' => "", 'ldap' => 0, 'pperso_list' => array(), 'groupe_list' => array(), 'prets' => array(), 'reservations' => array(), 'nb_retard' => 0, 'nb_resa' => 0, 'nb_previsions' => 0);
$empr_cb = $this->clean_field($empr_cb);
$empr_id += 0;
if (!$empr_id && $empr_cb == '') {
return $this->build_ok($result, "idempr et empr_cb vide.", false);
}
if ($empr_id) {
$where = " id_empr = {$empr_id} ";
} else {
$where = " empr_cb = '" . addslashes($empr_cb) . "' ";
}
$sql = "SELECT id_empr, empr_cb FROM empr WHERE {$where}";
$res = pmb_mysql_query($sql);
if (!$res || !pmb_mysql_num_rows($res)) {
return $this->build_ok($result, "Lecteur inconnu.", false);
}
$empr_res = pmb_mysql_fetch_object($res);
$empr_id = $empr_res->id_empr;
$empr = new emprunteur($empr_id, '', false, 1);
if (!$empr->cb) {
return $this->build_ok($result, "Lecteur inconnu.", false);
}
$sql = "select id_groupe, libelle_groupe from groupe, empr_groupe where empr_id='" . $empr_id . "' and id_groupe=groupe_id order by libelle_groupe";
$res = pmb_mysql_query($sql);
$i = 0;
$groupes_infos = array();
while ($res_info = pmb_mysql_fetch_object($res)) {
$groupes_infos[$i]['id'] = $res_info->id_groupe;
$groupes_infos[$i]['libelle'] = $res_info->libelle_groupe;
$i++;
}
$requete_nb_pret = "select count(1) as nb_pret from pret where pret_idempr=" . $empr_id;
$result_nb_pret = pmb_mysql_query($requete_nb_pret, $dbh);
$r_nb_pret = pmb_mysql_fetch_object($result_nb_pret);
$nb_pret = $r_nb_pret->nb_pret;
$resa_list = array();
$sql = "SELECT resa_idnotice, resa_idbulletin, resa_date, resa_date_debut, resa_date_fin, resa_cb, resa_confirmee, resa_idempr, ifnull(expl_cote,'') as expl_cote, empr_nom, empr_prenom, empr_cb, location_libelle, resa_loc_retrait, ";
$sql .= " trim(concat(if(series_m.serie_name <>'', if(notices_m.tnvol <>'', concat(series_m.serie_name,', ',notices_m.tnvol,'. '), concat(series_m.serie_name,'. ')), if(notices_m.tnvol <>'', concat(notices_m.tnvol,'. '),'')), ";
$sql .= " if(series_s.serie_name <>'', if(notices_s.tnvol <>'', concat(series_s.serie_name,', ',notices_s.tnvol,'. '), series_s.serie_name), if(notices_s.tnvol <>'', concat(notices_s.tnvol,'. '),'')), ";
$sql .= "\tifnull(notices_m.tit1,''),ifnull(notices_s.tit1,''),' ',ifnull(bulletin_numero,''), if (mention_date, concat(' (',mention_date,')') ,''))) as tit, id_resa, ";
$sql .= " ifnull(notices_m.typdoc,notices_s.typdoc) as typdoc, ";
$sql .= " IF(resa_date_fin>=sysdate() or resa_date_fin='0000-00-00',0,1) as perimee, date_format(resa_date_debut, '" . $msg["format_date"] . "') as aff_resa_date_debut, if(resa_date_fin='0000-00-00', '', date_format(resa_date_fin, '" . $msg["format_date"] . "')) as aff_resa_date_fin, date_format(resa_date, '" . $msg["format_date"] . "') as aff_resa_date ";
$sql .= " FROM ((((resa LEFT JOIN notices AS notices_m ON resa_idnotice = notices_m.notice_id ";
$sql .= " LEFT JOIN series AS series_m ON notices_m.tparent_id = series_m.serie_id ) ";
$sql .= " LEFT JOIN bulletins ON resa_idbulletin = bulletins.bulletin_id) ";
$sql .= " LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id ";
$sql .= " LEFT JOIN series AS series_s ON notices_s.tparent_id = series_s.serie_id ) ";
$sql .= " LEFT JOIN exemplaires ON resa_cb = exemplaires.expl_cb), ";
$sql .= " empr, docs_location ";
$sql .= " WHERE resa_idempr = id_empr AND idlocation = empr_location AND id_empr='{$empr_id}'";
$res = pmb_mysql_query($sql);
while ($res_info = pmb_mysql_fetch_object($res)) {
$resa["title"] = $res_info->tit;
$resa["typdoc"] = $res_info->typdoc;
$resa["date"] = $res_info->aff_resa_date;
$resa["date_debut"] = $res_info->aff_resa_date_debut;
$resa["date_fin"] = $res_info->aff_resa_date_fin;
$resa["cb"] = $res_info->resa_cb;
$resa["confirmee"] = $res_info->resa_confirmee;
$resa["perimee"] = $res_info->perimee;
$resa["id"] = $res_info->id_resa;
$resa_list[] = $resa;
}
$p_perso = new parametres_perso("empr");
$perso_ = $p_perso->show_fields($empr_id);
$pperso_list = array();
if (count($perso_)) {
for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
$p = $perso_["FIELDS"][$i];
$pperso_list[$i]["id"] = $p["ID"];
$pperso_list[$i]["name"] = $p["NAME"];
$pperso_list[$i]["libelle"] = $p["TITRE"];
$pperso_list[$i]["aff"] = $p["AFF"];
}
}
$result = array('empr_id' => $empr_id, 'empr_cb' => $empr->cb, 'nom' => $empr->nom, 'prenom' => $empr->prenom, 'sexe' => $empr->sexe, 'birth' => $empr->birth, 'adr1' => $empr->adr1, 'adr2' => $empr->adr2, 'cp' => $empr->cp, 'ville' => $empr->ville, 'pays' => $empr->pays, 'mail' => $empr->mail, 'tel1' => $empr->tel1, 'sms' => $empr->sms, 'tel2' => $empr->tel2, 'prof' => $empr->prof, 'categ' => $empr->categ, 'cat_l' => $empr->cat_l, 'cstat' => $empr->cstat, 'cstat_l' => $empr->cstat_l, 'cdate' => $empr->cdate, 'mdate' => $empr->mdate, 'login' => $empr->login, 'pwd' => $empr->pwd, 'type_abt' => $empr->type_abt, 'location' => $empr->empr_location, 'location_l' => $empr->empr_location_l, 'date_blocage' => $empr->date_blocage, 'statut' => $empr->empr_statut, 'statut_libelle' => $empr->empr_statut_libelle, 'total_loans' => $empr->total_loans, 'allow_loan' => $empr->allow_loan, 'allow_book' => $empr->allow_book, 'allow_opac' => $empr->allow_opac, 'allow_dsi' => $empr->allow_dsi, 'allow_dsi_priv' => $empr->allow_dsi_priv, 'allow_sugg' => $empr->allow_sugg, 'allow_prol' => $empr->allow_prol, 'date_adhesion' => $empr->date_adhesion, 'date_expiration' => $empr->date_expiration, 'last_loan_date' => $empr->last_loan_date, 'nb_pret' => $nb_pret, 'msg' => $empr->empr_msg, 'ldap' => $empr->empr_ldap, 'pperso_list' => $pperso_list, 'groupe_list' => $groupes_infos, 'prets' => $empr->prets, 'reservations' => $resa_list, 'nb_retard' => $empr->retard, 'nb_resa' => $empr->nb_reservations, 'nb_previsions' => $empr->nb_previsions);
return $this->build_ok($result);
}
示例5: get_p_perso
/**
* Retourne les paramètres persos
* @return array
*/
public function get_p_perso()
{
if (!$this->p_perso) {
global $memo_p_perso_notices;
$this->p_perso = array();
if (!$memo_p_perso_notices) {
$memo_p_perso_notices = new parametres_perso("notices");
}
$ppersos = $memo_p_perso_notices->show_fields($this->id);
// Filtre ceux qui ne sont pas visibles à l'OPAC ou qui n'ont pas de valeur
foreach ($ppersos['FIELDS'] as $pperso) {
if ($pperso['OPAC_SHOW'] && $pperso['AFF']) {
$this->p_perso[] = $pperso;
}
}
}
return $this->p_perso;
}
示例6: htmlentities
function show_consult_form($last_modified = 0)
{
global $idetat, $iduser, $idempr, $user_input;
global $date_debut, $date_fin, $id_type, $id_theme, $dmde_loc;
global $form_consult_dmde, $charset, $msg, $dbh, $demandes_init_workflow, $form_consult_linked_record;
global $pmb_type_audit, $reponse_finale;
$form_consult_dmde = str_replace('!!form_title!!', htmlentities($this->titre_demande, ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!sujet_dmde!!', htmlentities($this->sujet_demande, ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!etat_dmde!!', htmlentities($this->workflow->getStateCommentById($this->etat_demande), ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!date_dmde!!', htmlentities(formatdate($this->date_demande), ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!date_butoir_dmde!!', htmlentities(formatdate($this->deadline_demande), ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!date_prevue_dmde!!', htmlentities(formatdate($this->date_prevue), ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!progression_dmde!!', htmlentities($this->progression . '%', ENT_QUOTES, $charset), $form_consult_dmde);
$nom_user = '';
if (sizeof($this->users)) {
foreach ($this->users as $id => $user) {
if ($user['statut'] == 1) {
if ($nom_user) {
$nom_user .= "/ ";
}
$nom_user .= $user['nom'];
}
}
}
$carac_empr = $this->getCaracEmpr($this->num_demandeur);
$nom = $carac_empr['nom'];
$cb = $carac_empr['empr_cb'];
$nom_emprunteur = "";
if (SESSrights & CIRCULATION_AUTH) {
$nom_emprunteur = "<a href=\"circ.php?categ=pret&form_cb={$cb}\" >" . htmlentities($nom, ENT_QUOTES, $charset) . "</a>";
}
$form_consult_dmde = str_replace('!!demandeur!!', $nom_emprunteur ? $nom_emprunteur : $nom, $form_consult_dmde);
$form_consult_dmde = str_replace('!!attribution!!', $nom_user, $form_consult_dmde);
$form_consult_dmde = str_replace('!!iddemande!!', $this->id_demande, $form_consult_dmde);
$form_consult_dmde = str_replace('!!theme_dmde!!', htmlentities($this->theme_libelle, ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!type_dmde!!', htmlentities($this->type_libelle, ENT_QUOTES, $charset), $form_consult_dmde);
if ($this->num_linked_notice) {
$display = new mono_display($this->num_linked_notice, 0, '', 0, '', '', '', 0, 0, 0, 0, "", 0, false, true);
$form_consult_dmde = str_replace('!!form_linked_record!!', $form_consult_linked_record, $form_consult_dmde);
$form_consult_dmde = str_replace('!!linked_record!!', htmlentities($display->result, ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!linked_record_id!!', htmlentities($this->num_linked_notice, ENT_QUOTES, $charset), $form_consult_dmde);
$form_consult_dmde = str_replace('!!linked_record_link!!', htmlentities($url_base . "catalog.php?categ=isbd&id=" . $this->num_linked_notice, ENT_QUOTES, $charset), $form_consult_dmde);
} else {
$form_consult_dmde = str_replace('!!form_linked_record!!', " ", $form_consult_dmde);
}
//Champs personalisés
$perso_aff = "";
$p_perso = new parametres_perso("demandes");
if (!$p_perso->no_special_fields) {
$perso_ = $p_perso->show_fields($this->id_demande);
for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
$p = $perso_["FIELDS"][$i];
if ($p["AFF"]) {
$perso_aff .= "<br />" . $p["TITRE"] . " " . nl2br($p["AFF"]);
}
}
}
if ($perso_aff) {
$form_consult_dmde = str_replace("!!champs_perso!!", $perso_aff, $form_consult_dmde);
} else {
$form_consult_dmde = str_replace("!!champs_perso!!", "", $form_consult_dmde);
}
//afficher la liste des boutons de changement d'état
if ($this->etat_demande && sizeof($this->users) || $demandes_init_workflow !== "2") {
$states = $this->workflow->getStateList($this->etat_demande);
$states_btn = $this->getDisplayStateBtn($states);
$form_consult_dmde = str_replace('!!btn_etat!!', $states_btn, $form_consult_dmde);
} else {
$form_consult_dmde = str_replace('!!btn_etat!!', "", $form_consult_dmde);
}
//afficher la liste des boutons de la notice
if ($this->num_notice != 0) {
$notice = "<a onclick=\"show_notice('" . $this->num_notice . "')\" href='#'><img border='0' align='top' src='./images/search.gif' alt='" . htmlentities($msg['demandes_see_notice'], ENT_QUOTES, $charset) . "' title='" . htmlentities($msg['demandes_see_notice'], ENT_QUOTES, $charset) . "' /></a>";
} else {
$notice = "";
}
$form_consult_dmde = str_replace('!!icone!!', $notice, $form_consult_dmde);
if (sizeof($this->users) || $demandes_init_workflow !== "2") {
$req = "select count(1) as nb from demandes join demandes_actions on id_demande=num_demande join explnum_doc_actions on num_action=id_action where id_demande='" . $this->id_demande . "'";
$res = pmb_mysql_query($req, $dbh);
$docnum = pmb_mysql_fetch_object($res);
// bouton doc num
if ($docnum->nb) {
$btn_attach = " <input type='submit' class='bouton' value='" . $msg['demandes_attach_docnum'] . "' onClick='this.form.act.value=\"attach\" ; ' />";
} else {
$btn_attach = "";
}
// boutons notice
if ($this->num_notice != 0) {
$btn_notices = "<input type='submit' class='bouton' value='" . $msg['demandes_complete_notice'] . "' onClick='this.form.act.value=\"notice\" ; ' />" . $btn_attach . " <input type='submit' class='bouton' value='" . $msg['demandes_generate_rapport'] . "' onClick='this.form.act.value=\"rapport\" ; ' />";
$btn_suppr_notice = "<input type='submit' class='bouton' value='" . $msg['demandes_delete_notice'] . "' onClick='this.form.act.value=\"delete_notice\" ; return confirm_delete(); ' />";
} else {
$btn_notices = "<input type='submit' class='bouton' value='" . $msg['demandes_create_notice'] . "' onClick='this.form.act.value=\"create_notice\" ; ' />" . $btn_attach . " <input type='hidden' class='bouton' value='" . $msg['demandes_generate_rapport'] . "' onClick='this.form.act.value=\"rapport\" ; ' />" . $btn_attach . " <input type='submit' class='bouton' value='" . $msg['demandes_generate_rapport'] . "' onClick='this.form.act.value=\"rapport\" ; ' />";
$btn_suppr_notice = "";
}
// bouton audit
if ($pmb_type_audit) {
$btn_audit = " <input class='bouton' type='button' onClick=\"openPopUp('./audit.php?type_obj=14&object_id={$this->id_demande}', 'audit_popup', 700, 500, -2, -2, 'scrollbars=yes, toolbar=no, dependent=yes, resizable=yes')\" title=\"" . $msg['audit_button'] . "\" value=\"" . $msg['audit_button'] . "\" /> ";
} else {
$btn_audit = "";
//.........这里部分代码省略.........
示例7: extrait_info_notice
//.........这里部分代码省略.........
$thes_list = thesaurus::getThesaurusList();
$q = '';
foreach ($thes_list as $id_thesaurus => $libelle_thesaurus) {
$thes = new thesaurus($id_thesaurus);
$q = "INSERT INTO catdef ";
$q .= "SELECT categories.num_noeud, noeuds.num_thesaurus, categories.libelle_categorie ";
$q .= "FROM noeuds, categories, notices_categories ";
$q .= "WHERE noeuds.num_thesaurus={$id_thesaurus} and notices_categories.notcateg_notice = '" . $id_notice . "' ";
$q .= "AND categories.langue = '" . $thes->langue_defaut . "' ";
$q .= "AND categories.num_noeud = notices_categories.num_noeud ";
$q .= "AND categories.num_noeud = noeuds.id_noeud ";
$q .= "ORDER BY ordre_categorie";
$r = mysql_query($q, $dbh);
}
$q = "select catdef.num_thesaurus as num_thesaurus, ";
$q .= "if (catlg.num_noeud is null, catdef.libelle_categorie, catlg.libelle_categorie) as libelle_categorie ";
$q .= "from catdef left join catlg on catdef.num_noeud = catlg.num_noeud ";
if (!$thesaurus_mode_pmb) {
$q .= "where catdef.num_thesaurus = '" . $thesaurus_defaut . "' ";
}
$res_desc = mysql_query($q, $dbh);
$lib_desc = "";
while ($desc = mysql_fetch_object($res_desc)) {
$lib_desc .= $lib_desc ? $pmb_keyword_sep : "";
if ($thesaurus_mode_pmb) {
$lib_desc .= '[' . thesaurus::getLibelle($desc->num_thesaurus) . '] ';
}
$lib_desc .= $desc->libelle_categorie;
}
$worksheet->write_string($debligne_excel, $max_aut * 6 + $nbr_champs + 1, "{$lib_desc}");
$p_perso = new parametres_perso($libelle_caddie_type);
//Champs personalisés
if (!$p_perso->no_special_fields) {
$perso_ = $p_perso->show_fields($id_notice);
for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
$p = $perso_["FIELDS"][$i];
$worksheet->write_string($debligne_excel, $max_aut * 6 + $nbr_champs + 2 + $i, html_entity_decode($p["AFF"], ENT_QUOTES | ENT_COMPAT, "iso-8859-15"));
}
}
}
break;
case "TABLEAUHTML":
if ($entete) {
if ($etat_table) {
echo "\n</table>";
}
echo "<h3>" . $msg["caddie_mess_edition_" . $entete_bloc] . "</h3>";
echo "\n<table><th align='left'>" . $msg['caddie_action_marque'] . "</th>";
for ($i = 0; $i < $nbr_champs; $i++) {
$fieldname = mysql_field_name($res, $i);
print "<th align='left'>{$fieldname}</th>";
}
for ($i = 0; $i < $max_aut; $i++) {
print pmb_bidi("<th align='left'>aut_entree_{$i}</th>");
print pmb_bidi("<th align='left'>aut_rejete_{$i}</th>");
print pmb_bidi("<th align='left'>aut_dates_{$i}</th>");
print pmb_bidi("<th align='left'>aut_fonction_{$i}</th>");
print pmb_bidi("<th align='left'>aut_type_{$i}</th>");
print pmb_bidi("<th align='left'>aut_resp_type_{$i}</th>");
}
print "<th align='left'>DESCR</th>";
for ($i = 0; $i < $max_perso; $i++) {
$perso = mysql_fetch_object($res_compte3);
print "<th align='left'>" . $perso->titre . "</th>";
}
$etat_table = 1;
示例8: in
//.........这里部分代码省略.........
}
}
$requete_resa = "SELECT count(1) from resa where resa_cb='{$expl->expl_cb}' ";
$flag_resa = mysql_result(mysql_query($requete_resa, $dbh), 0, 0);
$requete_resa = "SELECT count(1) from resa_ranger where resa_cb='{$expl->expl_cb}' ";
$flag_resa = $flag_resa + mysql_result(mysql_query($requete_resa, $dbh), 0, 0);
$situation = "";
if ($expl->statut_libelle_opac != "") {
$situation .= $expl->statut_libelle_opac . "<br />";
}
if ($flag_resa) {
$nb_resa--;
$situation .= "<strong>{$msg['expl_reserve']}</strong>";
} else {
if ($expl->pret_flag) {
if ($expl->pret_retour) {
// exemplaire sorti
global $opac_show_empr;
if ($opac_show_empr == 1 && $_SESSION["user_code"] || $opac_show_empr == 2) {
$rqt_empr = "SELECT empr_nom, empr_prenom, id_empr, empr_cb FROM empr WHERE id_empr='{$expl->pret_idempr}' ";
$res_empr = mysql_query($rqt_empr, $dbh);
$res_empr_obj = mysql_fetch_object($res_empr);
$situation .= $msg[entete_show_empr] . htmlentities(" {$res_empr_obj->empr_prenom} {$res_empr_obj->empr_nom}", ENT_QUOTES, $charset) . "<br />";
}
$situation .= "<strong>{$msg['out_until']} " . formatdate($expl->pret_retour) . '</strong>';
// ****** Affichage de l'emprunteur
} else {
// pas sorti
$situation .= "<strong>" . $msg['available'] . "</strong>";
}
} else {
// pas prêtable
// exemplaire pas prêtable, on affiche juste "exclu du pret"
if ($pmb_transferts_actif == "1" && "" . $expl->expl_statut . "" == $transferts_statut_transferts) {
$situation .= "<strong>" . $msg['reservation_lib_entransfert'] . "</strong>";
} else {
$situation .= "<strong>" . $msg['exclu'] . "</strong>";
}
}
}
// fin if else $flag_resa
$expl_liste .= "<td class='expl_situation'>{$situation} </td>";
//Champs personalisés
$perso_aff = "";
if (!$memo_p_perso_expl->no_special_fields) {
$perso_ = $memo_p_perso_expl->show_fields($expl->expl_id);
for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
$p = $perso_["FIELDS"][$i];
if ($p['OPAC_SHOW']) {
if (!$header_found_p_perso) {
$header_perso_aff .= "<th class='expl_header_tdoc_libelle'>" . $p["TITRE_CLEAN"] . "</th>";
$nb_perso_aff++;
}
if ($p["AFF"]) {
$perso_aff .= "<td class='p_perso'>" . $p["AFF"] . "</td>";
} else {
$perso_aff .= "<td class='p_perso'> </td>";
}
}
}
}
$header_found_p_perso = 1;
$expl_liste .= $perso_aff;
$expl_liste .= "</tr>";
$expl_liste_all .= $expl_liste;
if ($opac_aff_expl_localises && $_SESSION["empr_location"]) {
if ($expl->expl_location == $_SESSION["empr_location"]) {
$expl_liste_loc .= $expl_liste;
} else {
$nb_expl_autre_loc++;
}
}
$expl_liste = "";
}
// fin while
//S'il y a des titres de champs perso dans les exemplaires
if ($header_perso_aff) {
$expl_list_header_deb .= $header_perso_aff;
}
if ($opac_aff_expl_localises && $_SESSION["empr_location"] && $nb_expl_autre_loc) {
// affichage avec onglet selon la localisation
if (!$expl_liste_loc) {
$expl_liste_loc = "<tr class=even><td colspan='" . (count($colonnesarray) + 1 + $nb_perso_aff) . "'>" . $msg["no_expl"] . "</td></tr>";
}
$expl_liste_all = str_replace("!!EXPL!!", $expl_list_header_deb . $expl_liste_all, $expl_list_header_loc_tpl);
$expl_liste_all = str_replace("!!EXPL_LOC!!", $expl_list_header_deb . $expl_liste_loc, $expl_liste_all);
$expl_liste_all = str_replace("!!mylocation!!", $_SESSION["empr_location_libelle"], $expl_liste_all);
$expl_liste_all = str_replace("!!id!!", $id + $bull_id, $expl_liste_all);
} else {
// affichage de la liste d'exemplaires calculée ci-dessus
if (!$expl_liste_all && $opac_show_empty_items_block == 1) {
$expl_liste_all = $expl_list_header . $expl_list_header_deb . "<tr class=even><td colspan='" . (count($colonnesarray) + 1) . "'>" . $msg["no_expl"] . "</td></tr>" . $expl_list_footer;
} elseif (!$expl_liste_all && $opac_show_empty_items_block == 0) {
$expl_liste_all = "";
} else {
$expl_liste_all = $expl_list_header . $expl_list_header_deb . $expl_liste_all . $expl_list_footer;
}
}
return $expl_liste_all;
}
示例9: die
//.........这里部分代码省略.........
// libellé code statistique. voir ce bug avec Eric
$this->allow_loan = $empr->allow_loan;
$this->allow_book = $empr->allow_book;
$this->allow_opac = $empr->allow_opac;
$this->allow_dsi = $empr->allow_dsi;
$this->allow_dsi_priv = $empr->allow_dsi_priv;
$this->allow_sugg = $empr->allow_sugg;
$this->allow_prol = $empr->allow_prol;
global $selector_prop_ajout_caddie_empr, $empr_show_caddie;
if ($empr_show_caddie) {
$this->img_ajout_empr_caddie = "<img src='./images/basket_empr.gif' align='middle' alt='basket' title=\"{$msg[400]}\" onClick=\"openPopUp('./cart.php?object_type=EMPR&item=" . $this->id . "', 'cart', 600, 700, -2, -2, '{$selector_prop_ajout_caddie_empr}')\">";
} else {
$this->img_ajout_empr_caddie = "";
}
$this->lien_nom_prenom = "<a href='./circ.php?categ=pret&form_cb=" . rawurlencode($this->cb) . "'>{$this->nom}, {$this->prenom}</a>";
$date_blocage = array();
$date_blocage = explode("-", $this->date_fin_blocage);
if (mktime(0, 0, 0, $date_blocage[1], $date_blocage[2], $date_blocage[0]) > time()) {
$this->blocage_active = true;
}
//Groupes
$requete = "select id_groupe, libelle_groupe from groupe, empr_groupe where empr_id='" . $this->id . "' and id_groupe=groupe_id";
$result = pmb_mysql_query($requete);
if (pmb_mysql_num_rows($result)) {
while ($grp_temp = pmb_mysql_fetch_object($result)) {
$this->groupes[] = "<a href='./circ.php?categ=groups&action=showgroup&groupID=" . $grp_temp->id_groupe . "'>" . htmlentities($grp_temp->libelle_groupe, ENT_QUOTES, $charset) . "</a>";
}
} else {
$this->groupes = array();
}
//Paramètres perso
//Liste des champs
$p_perso = new parametres_perso("empr");
$perso_ = $p_perso->show_fields($this->id_empr);
$perso = "";
$class = "colonne3";
$c = 0;
if (count($perso_["FIELDS"])) {
for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
$p = $perso_["FIELDS"][$i];
$perso .= "<div class='{$class}'>";
$perso .= "<div class='row'>" . $p["TITRE"];
$perso .= $p["AFF"] . "</div>";
$perso .= "</div>";
if ($c == 0) {
$c = 1;
} else {
if ($c == 1) {
$class = "colonne_suite";
$c = 2;
} else {
if ($c == 2) {
$class = "colonne3";
$c = 0;
}
}
}
}
$reste = 2 - $c;
if ($c != 0) {
for ($i = 0; $i < $reste; $i++) {
$perso .= "<div class='colonne3'> </div>";
$c++;
}
$perso .= "<div class='colonne_suite'> </div>";
}
示例10: elseif
//.........这里部分代码省略.........
$this->piege_resa = 1;
}
}
if (!$expl_no_checkout && $this->piege || $this->piege_resa && $piege_resa != 1) {
// il y a des pieges, on marque comme exemplaire à problème dans la localisation qui fait le retour
$sql = "UPDATE exemplaires set expl_retloc='" . $deflt_docs_location . "' where expl_cb='" . addslashes($this->expl_cb) . "' limit 1";
} else {
// pas de pièges, ou pièges résolus, on démarque
$sql = "UPDATE exemplaires set expl_retloc=0 where expl_cb='" . addslashes($this->expl_cb) . "' limit 1";
}
pmb_mysql_query($sql);
$form_retour_tpl_temp = str_replace('!!piege_resa_ici!!', $question_resa, $form_retour_tpl_temp);
if ($this->expl->pret_idempr) {
$this->empr = new emprunteur($this->expl->pret_idempr, "", FALSE, 2);
}
if ($pmb_rfid_activate && $pmb_rfid_serveur_url) {
$form_retour_tpl_temp = str_replace('<!--antivol_script-->', $script_antivol_rfid, $form_retour_tpl_temp);
$this->cb_tmpl = str_replace("//antivol_test//", "if(0)", $this->cb_tmpl);
} elseif ($pmb_antivol > 0) {
// gestion de l'antivol magnétique 3M
if ($this->expl->type_antivol == 1) {
// c'est un support non magnétique (livre, revue...)
$script_magnetique = str_replace('<!--call_script_magnetique-->', "magnetise('RRR');", $script_magnetique);
}
if ($this->expl->type_antivol == 2) {
//c'est un support magnétique (cassette)
$script_magnetique = str_replace('<!--call_script_magnetique-->', "magnetise('SSS');", $script_magnetique);
}
$form_retour_tpl_temp = str_replace('<!--antivol_script-->', $script_magnetique, $form_retour_tpl_temp);
}
if ($this->flag_rendu && $pmb_play_pret_sound) {
$alert_sound_list[] = "information";
}
$form_retour_tpl_temp = str_replace('!!message_del_pret!!', $message_del_pret, $form_retour_tpl_temp);
$form_retour_tpl_temp = str_replace('!!message_resa!!', $message_resa, $form_retour_tpl_temp);
$form_retour_tpl_temp = str_replace('!!message_resa_planning!!', $message_resa_planning, $form_retour_tpl_temp);
$form_retour_tpl_temp = str_replace('!!message_transfert!!', $message_transfert, $form_retour_tpl_temp);
$form_retour_tpl_temp = str_replace('!!libelle!!', $this->expl->libelle, $form_retour_tpl_temp);
// si la loc à été modifier:
if ($pmb_transferts_actif) {
// pour mettre les données modifiées à jour
$this->fetch_data();
}
$form_retour_tpl_temp = str_replace('!!type_doc!!', $this->info_doc->type_doc, $form_retour_tpl_temp);
$form_retour_tpl_temp = str_replace('!!location!!', $this->info_doc->location, $form_retour_tpl_temp);
$form_retour_tpl_temp = str_replace('!!section!!', $this->info_doc->section, $form_retour_tpl_temp);
$form_retour_tpl_temp = str_replace('!!statut!!', $this->info_doc->statut, $form_retour_tpl_temp);
$form_retour_tpl_temp = str_replace('!!expl_cote!!', $this->expl->expl_cote, $form_retour_tpl_temp);
$form_retour_tpl_temp = str_replace('!!expl_cb!!', $this->expl_cb, $form_retour_tpl_temp);
$form_retour_tpl_temp = str_replace('!!expl_owner!!', $this->expl_owner_name, $form_retour_tpl_temp);
$form_retour_tpl_temp = str_replace('!!expl_id!!', $this->expl_id, $form_retour_tpl_temp);
if ($this->flag_rendu) {
$form_retour_tpl_temp = str_replace('!!message_retour!!', $retour_ok_tpl, $form_retour_tpl_temp);
} elseif ($categ != "ret_todo" && !$piege_resa && !$this->piege) {
$form_retour_tpl_temp = str_replace('!!message_retour!!', $retour_intouvable_tpl, $form_retour_tpl_temp);
} else {
$form_retour_tpl_temp = str_replace('!!message_retour!!', "", $form_retour_tpl_temp);
}
//Champs personalisés
$p_perso = new parametres_perso("expl");
$perso_aff = "";
if (!$p_perso->no_special_fields) {
$perso_ = $p_perso->show_fields($this->expl_id);
for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
$p = $perso_["FIELDS"][$i];
if ($p["AFF"]) {
$perso_aff .= "<br />" . $p["TITRE"] . " " . $p["AFF"];
}
}
}
if ($perso_aff) {
$perso_aff = "<div class='row'>" . $perso_aff . "</div>";
}
$form_retour_tpl_temp = str_replace('!!perso_aff!!', $perso_aff, $form_retour_tpl_temp);
if ($this->expl->expl_note) {
$alert_sound_list[] = "critique";
$expl_note .= pmb_bidi("<hr /><div class='erreur'>{$msg[377]} :</div><div class='message_important'>" . $this->expl->expl_note . "</div>");
}
$form_retour_tpl_temp = str_replace('!!expl_note!!', $expl_note, $form_retour_tpl_temp);
if ($this->expl->expl_comment) {
if (!$this->expl->expl_note) {
$expl_comment .= pmb_bidi("<hr />");
}
$expl_comment .= pmb_bidi("<div class='erreur'>{$msg[expl_zone_comment]} :</div><div class='expl_comment'>" . $this->expl->expl_comment . "</div>");
}
$form_retour_tpl_temp = str_replace('!!expl_comment!!', $expl_comment, $form_retour_tpl_temp);
// zone du dernier emrunteur
if ($pmb_expl_show_lastempr && $this->expl->expl_lastempr) {
$dernier_empr = "<hr /><div class='row'>{$msg['expl_prev_empr']} ";
$link = "<a href='./circ.php?categ=pret&form_cb=" . rawurlencode($this->expl->lastempr_cb) . "'>";
$dernier_empr .= $link . $this->expl->lastempr_prenom . ' ' . $this->expl->lastempr_nom . ' (' . $this->expl->lastempr_cb . ')</a>';
$dernier_empr .= "</div><hr />";
}
$form_retour_tpl_temp = str_replace('!!expl_lastempr!!', $dernier_empr, $form_retour_tpl_temp);
if ($this->empr) {
$expl_empr = pmb_bidi($this->empr->fiche_affichage);
}
$form_retour_tpl_temp = str_replace('!!expl_empr!!', $expl_empr, $form_retour_tpl_temp);
$this->expl_form = $form_retour_tpl_temp;
}
示例11: htmlentities
function expl_info_display($affichage_emprunteurs = 1, $affichage_zone_notes = 1)
{
global $msg, $expl_view_form, $pmb_expl_show_dates, $charset;
$expl_aff = $expl_view_form;
$expl_aff = str_replace('!!code_barre!!', htmlentities($this->expl_data->expl_cb, ENT_QUOTES, $charset), $expl_aff);
$expl_aff = str_replace('!!cote!!', htmlentities($this->expl_data->expl_cote, ENT_QUOTES, $charset), $expl_aff);
$expl_aff = str_replace('!!type_doc!!', htmlentities($this->expl_data->tdoc_libelle, ENT_QUOTES, $charset), $expl_aff);
$expl_aff = str_replace('!!localisation!!', htmlentities($this->expl_data->location_libelle, ENT_QUOTES, $charset), $expl_aff);
$expl_aff = str_replace('!!section!!', htmlentities($this->expl_data->section_libelle, ENT_QUOTES, $charset), $expl_aff);
$expl_aff = str_replace('!!owner!!', htmlentities($this->expl_data->lender_libelle, ENT_QUOTES, $charset), $expl_aff);
$expl_aff = str_replace('!!statut!!', htmlentities($this->expl_data->statut_libelle, ENT_QUOTES, $charset), $expl_aff);
$expl_aff = str_replace('!!codestat!!', htmlentities($this->expl_data->codestat_libelle, ENT_QUOTES, $charset), $expl_aff);
$expl_aff = str_replace('!!note!!', htmlentities($this->expl_data->expl_note, ENT_QUOTES, $charset), $expl_aff);
$expl_aff = str_replace('!!comment!!', htmlentities($this->expl_data->expl_comment, ENT_QUOTES, $charset), $expl_aff);
//on compte de nombre de prets pour cet exemplaire
$req = "select count(arc_expl_id) as nb_prets from pret_archive where arc_expl_id = " . $this->expl_data->expl_id;
$res = pmb_mysql_query($req);
if (pmb_mysql_num_rows($res)) {
$arch_pret = pmb_mysql_fetch_object($res);
$nb_prets = $arch_pret->nb_prets;
} else {
$nb_prets = 0;
}
$expl_aff = str_replace('!!nb_prets!!', $nb_prets, $expl_aff);
//Date de création / modification
if ($pmb_expl_show_dates == '1' || $pmb_expl_show_dates == '3') {
$tmp = "<tr>\n\t\t\t<td align='right'><label class='etiquette'>" . htmlentities($msg['exp_cre_date'], ENT_QUOTES, $charset) . "</label></td>\n\t\t\t<td align='left'>" . htmlentities(format_date($this->expl_data->create_date), ENT_QUOTES, $charset) . "</td>\n\t\t\t<td align='right'><label class='etiquette'>" . htmlentities($msg['exp_upd_date'], ENT_QUOTES, $charset) . "</label></td>\n\t\t\t<td align='left'>" . htmlentities(format_date($this->expl_data->update_date), ENT_QUOTES, $charset) . "</td>\t\t\t\t\t\n\t\t</tr>";
$expl_aff = str_replace('<!-- exp_date_admin -->', $tmp, $expl_aff);
}
//Date de dépôt / retour
if ($pmb_expl_show_dates == '2' || $pmb_expl_show_dates == '3') {
$tmp = "<tr>\n\t\t\t<td align='right'><label class='etiquette'>" . htmlentities($msg['filing_date'], ENT_QUOTES, $charset) . "</label></td>\n\t\t\t<td align='left'>" . htmlentities(format_date($this->expl_data->expl_date_depot), ENT_QUOTES, $charset) . "</td>\n\t\t\t<td align='right'><label class='etiquette'>" . htmlentities($msg['return_date'], ENT_QUOTES, $charset) . "</label></td>\n\t\t\t<td align='left'>" . htmlentities(format_date($this->expl_data->expl_date_retour), ENT_QUOTES, $charset) . "</td>\t\t\t\t\t\n\t\t</tr>";
$expl_aff = str_replace('<!-- exp_date_filing -->', $tmp, $expl_aff);
}
$p_perso = new parametres_perso("expl");
if (!$p_perso->no_special_fields) {
$c = 0;
$perso = "";
$perso_ = $p_perso->show_fields($this->expl_data->expl_id);
$nb_param = count($perso_["FIELDS"]);
$perso_aff = '';
for ($i = 0; $i < $nb_param; $i++) {
$nb_colonne = 2;
$perso_aff .= "<tr>\n";
for ($i; $i < $nb_param; $i++) {
$p = $perso_["FIELDS"][$i];
$perso_aff .= "<td align='right'><label class='etiquette'>" . $p["TITRE"] . "</label></td>";
$perso_aff .= "<td align='left'>" . $p["AFF"] . "</td>";
if (!--$nb_colonne) {
break;
}
}
$perso_aff .= "</tr>\n";
}
}
$expl_aff = str_replace('!!champs_perso!!', $perso_aff, $expl_aff);
return $expl_aff;
}
示例12: array
if ($empr_mail) {
$tab_empr_info[$i]["titre"] = $msg["empr_mail"];
$tab_empr_info[$i++]["val"] = "<a href='mailto:{$empr_mail}'>{$empr_mail}</a>";
}
if ($empr_prof) {
$tab_empr_info[$i]["titre"] = $msg["empr_tpl_prof"];
$tab_empr_info[$i++]["val"] = $empr_prof;
}
if ($empr_year) {
$tab_empr_info[$i]["titre"] = $msg["empr_tpl_year"];
$tab_empr_info[$i++]["val"] = $empr_year;
}
//Paramètres perso
require_once "{$class_path}/parametres_perso.class.php";
$p_perso = new parametres_perso("empr");
$perso_ = $p_perso->show_fields($id_empr);
if (count($perso_["FIELDS"])) {
for ($ipp = 0; $ipp < count($perso_["FIELDS"]); $ipp++) {
$p = $perso_["FIELDS"][$ipp];
if ($p[OPAC_SHOW] == 1) {
$tab_empr_info[$i]["titre"] = $p["TITRE_CLEAN"];
$tab_empr_info[$i++]["val"] = $p["AFF"];
}
}
}
$adhesion = str_replace("!!date_adhesion!!", "<strong>" . $aff_empr_date_adhesion . "</strong>", $msg["empr_format_adhesion"]);
$adhesion = str_replace("!!date_expiration!!", "<strong>" . $aff_empr_date_expiration . "</strong>", $adhesion);
$tab_empr_info[$i]["titre"] = $msg["empr_tpl_adh"];
$tab_empr_info[$i++]["val"] = $adhesion;
if ($date_fin_blocage != "0000-00-00") {
$date_blocage = array();
示例13: die
//.........这里部分代码省略.........
global $selector_prop_ajout_caddie_empr, $empr_show_caddie;
if ($empr_show_caddie) {
$this->img_ajout_empr_caddie = "<img src='./images/basket_empr.gif' alt='basket' title=\"{$msg[400]}\" ";
$this->img_ajout_empr_caddie .= "onClick=\"openPopUp('./cart.php?object_type=EMPR&item=" . $this->id . "', 'cart', 600, 700, -2, -2, '{$selector_prop_ajout_caddie_empr}');\">";
} else {
$this->img_ajout_empr_caddie = "";
}
$this->lien_nom_prenom = "<a href='./circ.php?categ=pret&form_cb=" . rawurlencode($this->cb) . "'>{$this->nom}, {$this->prenom}</a>";
if ($pmb_opac_view_activate) {
$this->opac_view = new opac_view(0, $this->id);
}
if ($pmb_sur_location_activate) {
$sur_loc = sur_location::get_info_surloc_from_location($expl->idlocation);
}
$date_blocage = array();
$date_blocage = explode("-", $this->date_blocage);
if (mktime(0, 0, 0, $date_blocage[1], $date_blocage[2], $date_blocage[0]) > time()) {
$this->blocage_active = true;
}
//Groupes
$requete = "select id_groupe, libelle_groupe from groupe, empr_groupe where empr_id='" . $this->id . "' and id_groupe=groupe_id";
$result = mysql_query($requete);
if (mysql_num_rows($result)) {
while ($grp_temp = mysql_fetch_object($result)) {
$this->groupes[] = "<a href='./circ.php?categ=groups&action=showgroup&groupID=" . $grp_temp->id_groupe . "'>" . htmlentities($grp_temp->libelle_groupe, ENT_QUOTES, $charset) . "</a>";
}
} else {
$this->groupes = array();
}
if ($empr->empr_ldap) {
$this->ldap = 'LDAP';
// flag AuthLdap
} else {
$this->ldap = 'MYSQL';
}
$this->date_adhesion = $empr->empr_date_adhesion;
// début adhésion
$this->date_expiration = $empr->empr_date_expiration;
// fin adhésion
$this->last_loan_date = $empr->last_loan_date;
// date du dernier emprunt
$this->aff_date_adhesion = $empr->aff_empr_date_adhesion;
// début adhésion
$this->aff_date_expiration = $empr->aff_empr_date_expiration;
// fin adhésion
$this->aff_last_loan_date = $empr->aff_last_loan_date;
// date du dernier emprunt
$this->empr_msg = $empr->empr_msg;
// message emprunteur
$this->cat_l = $empr->code1;
// libellé catégorie emprunteur
$this->cstat_l = $empr->code2;
// libellé code statistique. voir ce bug avec Eric
//Paramètres perso
//Liste des champs
$p_perso = new parametres_perso("empr");
$perso_ = $p_perso->show_fields($this->id);
$perso = "";
$header_format = "";
$class = "colonne3";
$c = 0;
if (count($perso_["FIELDS"])) {
for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
$p = $perso_["FIELDS"][$i];
if ($empr_header_format) {
$s = explode(",", $empr_header_format);
if (array_search($p["ID"], $s) !== FALSE) {
$header_format .= $p["TITRE"] . $p["AFF"] . " ";
}
}
$perso .= "<div class='{$class}'>";
$perso .= "<div class='row'>" . $p["TITRE"];
$perso .= $p["AFF"] . "</div>";
$perso .= "</div>";
if ($c == 0) {
$c = 1;
} else {
if ($c == 1) {
$class = "colonne_suite";
$c = 2;
} else {
if ($c == 2) {
$class = "colonne3";
$c = 0;
}
}
}
}
$reste = 2 - $c;
if ($c != 0) {
for ($i = 0; $i < $reste; $i++) {
$perso .= "<div class='colonne3'> </div>";
$c++;
}
$perso .= "<div class='colonne_suite'> </div>";
}
}
$this->header_format = $header_format;
$this->perso = $perso;
}
示例14: get_p_perso
/**
* Retourne les paramètres persos
* @return array
*/
public function get_p_perso()
{
if (!$this->p_perso) {
$this->p_perso = array();
if ($this->get_type_object() != AUT_TABLE_CONCEPT) {
$parametres_perso = new parametres_perso($this->get_prefix_for_pperso());
$ppersos = $parametres_perso->show_fields($this->num_object);
if (is_array($ppersos['FIELDS'])) {
foreach ($ppersos['FIELDS'] as $pperso) {
$this->p_perso[] = $pperso;
}
}
}
}
return $this->p_perso;
}
示例15: get_display_expl_responsive_list
/**
* Génère la liste des exemplaires
* @param int $notice_id Identifiant de la notice
* @return string
*/
public static function get_display_expl_responsive_list($notice_id)
{
global $dbh;
global $msg, $charset;
global $expl_list_header, $expl_list_footer;
global $opac_expl_data, $opac_expl_order, $opac_url_base;
global $pmb_transferts_actif, $transferts_statut_transferts;
global $memo_p_perso_expl;
global $opac_show_empty_items_block;
global $opac_show_exemplaires_analysis;
global $expl_list_header_loc_tpl, $opac_aff_expl_localises;
global $opac_sur_location_activate;
$nb_expl_autre_loc = 0;
$nb_perso_aff = 0;
$record_datas = static::get_record_datas($notice_id);
$type = $record_datas->get_niveau_biblio();
$id = $record_datas->get_id();
$bull = $record_datas->get_bul_info();
$bull_id = $bull['bulletin_id'];
// les dépouillements ou périodiques n'ont pas d'exemplaire
if ($type == "a" && !$opac_show_exemplaires_analysis || $type == "s") {
return "";
}
if (!$memo_p_perso_expl) {
$memo_p_perso_expl = new parametres_perso("expl");
}
$header_found_p_perso = 0;
$expls_datas = $record_datas->get_expls_datas();
$expl_list_header_deb = "<tr class='thead'>";
foreach ($expls_datas['colonnesarray'] as $colonne) {
$expl_list_header_deb .= "<th class='expl_header_" . $colonne . "'>" . htmlentities($msg['expl_header_' . $colonne], ENT_QUOTES, $charset) . "</th>";
}
$expl_list_header_deb .= "<th class='expl_header_statut'>" . $msg['statut'] . "</th>";
$expl_liste = "";
foreach ($expls_datas['expls'] as $expl) {
$expl_liste .= "<tr class='item_expl !!class_statut!!'>";
$colencours = "";
foreach ($expls_datas['colonnesarray'] as $colonne) {
$colencours = $expl[$colonne];
if ($colonne == "location_libelle" && $expl['num_infopage']) {
if ($expl['surloc_id'] != "0") {
$param_surloc = "&surloc=" . $expl['surloc_id'];
} else {
$param_surloc = "";
}
$expl_liste .= "<td class='" . htmlentities($msg['expl_header_' . $colonne], ENT_QUOTES, $charset) . "'><a href=\"" . $opac_url_base . "index.php?lvl=infopages&pagesid=" . $expl['num_infopage'] . "&location=" . $expl['expl_location'] . $param_surloc . "\" alt=\"" . $msg['location_more_info'] . "\" title=\"" . $msg['location_more_info'] . "\">" . htmlentities($expl[$colonne], ENT_QUOTES, $charset) . "</a></td>";
} else {
$expl_liste .= "<td class='" . htmlentities($msg['expl_header_' . $colonne], ENT_QUOTES, $charset) . "'>" . htmlentities($expl[$colonne], ENT_QUOTES, $charset) . "</td>";
}
}
$situation = "";
if ($expl['statut_libelle_opac'] != "") {
$situation .= $expl['statut_libelle_opac'] . "<br />";
}
if ($expl['flag_resa']) {
$situation .= "<strong>" . $msg['expl_reserve'] . "</strong>";
$class_statut = "expl_reserve";
} else {
if ($expl['pret_flag']) {
if ($expl['pret_retour']) {
// exemplaire sorti
global $opac_show_empr;
if ($opac_show_empr == 1 && $_SESSION["user_code"] || $opac_show_empr == 2) {
$situation .= $msg['entete_show_empr'] . htmlentities(" " . $expl['empr_prenom'] . " " . $expl['empr_nom'], ENT_QUOTES, $charset) . "<br />";
}
$situation .= "<strong>" . $msg['out_until'] . " " . formatdate($expl['pret_retour']) . "</strong>";
$class_statut = "expl_out";
// ****** Affichage de l'emprunteur
} else {
// pas sorti
$situation .= "<strong>" . $msg['available'] . "</strong>";
$class_statut = "expl_available";
}
} else {
// pas prêtable
// exemplaire pas prêtable, on affiche juste "exclu du pret"
if ($pmb_transferts_actif == "1" && "" . $expl['expl_statut'] . "" == $transferts_statut_transferts) {
$situation .= "<strong>" . $msg['reservation_lib_entransfert'] . "</strong>";
$class_statut = "expl_transfert";
} else {
$situation .= "<strong>" . $msg['exclu'] . "</strong>";
$class_statut = "expl_unavailable";
}
}
}
// fin if else $flag_resa
$expl_liste .= "<td class='" . $msg['statut'] . "'>" . $situation . " </td>";
$expl_liste = str_replace("!!class_statut!!", $class_statut, $expl_liste);
//Champs personalisés
$perso_aff = "";
if (!$memo_p_perso_expl->no_special_fields) {
$perso_ = $memo_p_perso_expl->show_fields($expl['expl_id']);
for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
$p = $perso_["FIELDS"][$i];
if ($p['OPAC_SHOW']) {
//.........这里部分代码省略.........