本文整理汇总了PHP中parametres_perso::get_values方法的典型用法代码示例。如果您正苦于以下问题:PHP parametres_perso::get_values方法的具体用法?PHP parametres_perso::get_values怎么用?PHP parametres_perso::get_values使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parametres_perso
的用法示例。
在下文中一共展示了parametres_perso::get_values方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute_ajax
public function execute_ajax()
{
global $id_cp;
$id_cp += 0;
if ($id_cp) {
$response['content'] .= "\r\n\t\t\t<div class='colonne3'>\r\n\t\t\t<label>" . $this->format_text($this->msg['cms_module_common_selector_record_cp_val_cp_val_label']) . "</label>\r\n\t\t\t</div>\r\n\t\t\t<div class='colonne_suite'>";
//on regarde la nature du CP...
$query = "select type from notices_custom where idchamp = '" . $id_cp . "'";
$pp = new parametres_perso("notices");
$pp->get_values(0);
$response['content'] .= $pp->get_field_form($id_cp, $this->get_form_value_name("cp_val"), $this->parameters['cp_val']);
} else {
$response['content'] = "";
}
$response['content-type'] = "text/html";
return $response;
}
示例2: explode
//.........这里部分代码省略.........
$as_unmod = array_search($expl->idlocation, $explr_tab_unmod);
$as_modif = array_search($expl->idlocation, $explr_tab_modif);
} else {
$as_invis = false;
$as_unmod = false;
$as_modif = true;
}
if ($link_expl) {
if ($expl_bulletin) {
$tlink = "./catalog.php?categ=serials&sub=bulletinage&action=expl_form&bul_id=!!bull_id!!&expl_id=!!expl_id!!";
$tlink = str_replace('!!bull_id!!', $expl_bulletin, $tlink);
$tlink = str_replace('!!expl_id!!', $expl->expl_id, $tlink);
$tlink = str_replace('!!expl_cb!!', rawurlencode($expl->expl_cb), $tlink);
} else {
$tlink = str_replace('!!expl_id!!', $expl->expl_id, $link_expl);
$tlink = str_replace('!!expl_cb!!', rawurlencode($expl->expl_cb), $tlink);
$tlink = str_replace('!!notice_id!!', $expl->expl_notice, $tlink);
}
}
$expl_liste .= "<tr>";
for ($i = 0; $i < count($colonnesarray); $i++) {
if (!(substr($colonnesarray[$i], 0, 1) == "#")) {
eval("\$colencours=\$expl->" . $colonnesarray[$i] . ";");
}
if ($i == 0 && ($expl->expl_note || $expl->expl_comment) && $pmb_expl_list_display_comments) {
$expl_rowspan = "rowspan='2'";
} else {
$expl_rowspan = "";
}
$aff_column = "";
if (substr($colonnesarray[$i], 0, 1) == "#") {
//champs personnalisés
$id = substr($colonnesarray[$i], 1);
$cp->get_values($expl->expl_id);
if (!$cp->no_special_fields) {
$temp = $cp->get_formatted_output($cp->values[$id], $id);
if (!$temp) {
$temp = " ";
}
$aff_column .= $temp;
}
} else {
if ($colonnesarray[$i] == "expl_cb") {
if ($tlink && ($as_modif !== FALSE && $as_modif !== NULL)) {
$aff_column .= "<a href='{$tlink}'>" . $colencours . "</a>";
} else {
$aff_column .= $colencours;
}
} else {
if ($colonnesarray[$i] == "expl_cote") {
if ($pmb_html_allow_expl_cote) {
$aff_column .= "<strong>" . $colencours . "</strong>";
} else {
$aff_column .= "<strong>" . htmlentities($colencours, ENT_QUOTES, $charset) . "</strong>";
}
} else {
if ($colonnesarray[$i] == "statut_libelle") {
if ($expl->pret_retour) {
// exemplaire sorti
$rqt_empr = "SELECT empr_nom, empr_prenom, id_empr, empr_cb FROM empr WHERE id_empr='{$expl->pret_idempr}' ";
$res_empr = pmb_mysql_query($rqt_empr, $dbh);
$res_empr_obj = pmb_mysql_fetch_object($res_empr);
$situation = "<strong>{$msg[358]} " . $expl->aff_pret_retour . "</strong>";
global $empr_show_caddie, $selector_prop_ajout_caddie_empr;
if ($empr_show_caddie && SESSrights & CIRCULATION_AUTH) {
$img_ajout_empr_caddie = "<img src='" . $base_path . "/images/basket_empr.gif' align='middle' alt='basket' title=\"{$msg[400]}\" onClick=\"openPopUp('" . $base_path . "/cart.php?object_type=EMPR&item=" . $expl->pret_idempr . "', 'cart', 600, 700, -2, -2, '{$selector_prop_ajout_caddie_empr}')\"> ";
示例3: foreach
function processing_cp($type, $id, $val_f = "")
{
$mes_pp = new parametres_perso($type);
$mes_pp->get_values($id);
$values = $mes_pp->values;
foreach ($values as $field_id => $vals) {
//si on peut on exporte les infos du résolveur (DOI / PMID)
if ($type == "notices" && $mes_pp->t_fields[$field_id]['TYPE'] == "resolve") {
//les ids sont fixé en dur, on c'est traité : DOI = 2 , PMID = 1
foreach ($vals as $value) {
$id_infos = explode('|', $value);
switch ($id_infos[1]) {
case "1":
$resolver = "PMID";
break;
case "2":
$resolver = "DOI";
break;
default:
$resolver = "";
}
if ($resolver != "") {
$subfields = array();
$subfields["a"] = $id_infos[0];
$subfields["b"] = $resolver;
$this->add_field("014", " ", $subfields);
}
}
}
if ($mes_pp->t_fields[$field_id]["EXPORT"]) {
//champ exportable
foreach ($vals as $value) {
$subfields = array();
switch ($mes_pp->t_fields[$field_id]['TYPE']) {
case "resolve":
case "url":
$subfields["c"] = $value;
$id_infos = explode('|', $value);
$link = $mes_pp->get_formatted_output(array($value), $field_id);
//Valeur
if (count($id_infos) == 2) {
$subfields["a"] = $id_infos[0];
$subfields["b"] = $link;
} else {
$subfields["a"] = $link;
}
break;
case "query_auth":
case "query_list":
$subfields["c"] = $value;
//break; C'est voulu
//break; C'est voulu
default:
$subfields["a"] = $mes_pp->get_formatted_output(array($value), $field_id);
//Val
break;
}
$subfields["l"] = $mes_pp->t_fields[$field_id]["TITRE"];
//Libelle du champ
$subfields["n"] = $mes_pp->t_fields[$field_id]["NAME"];
//Nom du champ
$subfields["t"] = $mes_pp->t_fields[$field_id]["TYPE"];
//Type du champ
if ($val_f) {
$subfields["f"] = $val_f;
}
switch ($type) {
case "notices":
$this->add_field("900", " ", $subfields);
break;
case "expl":
$this->add_field("999", " ", $subfields);
break;
case "collstate":
$this->add_field("951", " ", $subfields);
break;
default:
break;
}
}
}
}
}
示例4: aff_authors_by_type_with_tpl
function aff_authors_by_type_with_tpl($param)
{
global $fonction_auteur;
// $param[0] = 0=principal seul, 1=principal+autres, 2=tous, 3=autres, 4=secondaires, 5=autres+secondaires
// $param[1] = nombre maxi d'auteurs à afficher
// $param[2] = séparateur entre auteurs
// $param[3] = séparateur entre principal/autres/secondaires
// $param[4] = afficher la fonction : 0=non, 1=toujours
// $param[5] = afficher "et al." si plus d'auteurs que le maxi
// $param[6] = 70=physique, 71=collectivités, 72=congrès (séparé parune virgule...)
// $param[7] = template d'affichage de l'autorité
// $param[8] = filtre sur code fonction
global $parser_environnement, $dbh;
if (!$parser_environnement['id_notice']) {
return "";
}
$notice = gere_global();
$param[6] = explode(",", $param[6]);
$param[6] = implode("','", $param[6]);
if ($param[8]) {
$filtre_fonctions = " and responsability_fonction='" . addslashes($param[8]) . "'";
} else {
$filtre_fonctions = "";
}
$rqt_count = "select count(*) as nb from responsability, authors \n\t\t\twhere responsability_notice='" . $parser_environnement['id_notice'] . "' \n\t\t\t\tand responsability_author=author_id\n\t\t\t\tand author_type in('" . $param[6] . "')";
if ($param[0] <= 2) {
$rqt_count .= " and responsability_type<='" . $param[0] . "'";
} else {
if ($param[0] == 3) {
$rqt_count .= " and responsability_type='1'";
} else {
if ($param[0] == 4) {
$rqt_count .= " and responsability_type='2'";
} else {
if ($param[0] == 5) {
$rqt_count .= " and responsability_type in('1','2')";
}
}
}
}
$rqt_count .= $filtre_fonctions;
$res_sql_count = pmb_mysql_query($rqt_count, $dbh);
$res_count = pmb_mysql_fetch_object($res_sql_count);
$rqt = "select author_id, responsability_fonction, responsability_type \n\t\t\tfrom responsability, authors \n\t\t\twhere responsability_notice='" . $parser_environnement['id_notice'] . "' \n\t\t\t\tand responsability_author=author_id\n\t\t\t\tand author_type in('" . $param[6] . "')";
if ($param[0] <= 2) {
$rqt .= " and responsability_type<='" . $param[0] . "' ";
} else {
if ($param[0] == 3) {
$rqt .= " and responsability_type='1' ";
} else {
if ($param[0] == 4) {
$rqt .= " and responsability_type='2' ";
} else {
if ($param[0] == 5) {
$rqt .= " and responsability_type in('1','2') ";
}
}
}
}
$rqt .= $filtre_fonctions;
$rqt .= " order by responsability_type, responsability_ordre ";
if ($param[1] > 0) {
$rqt .= " limit 0," . $param[1];
}
$res_sql = pmb_mysql_query($rqt, $dbh);
while ($authors = pmb_mysql_fetch_object($res_sql)) {
$aut_detail = new auteur($authors->author_id);
$aut_pp = new parametres_perso("author");
$aut_pp->get_values($authors->author_id);
$values_pp = $aut_pp->values;
$aut_detail->parametres_perso = array();
foreach ($values_pp as $field_id => $vals) {
$aut_detail->parametres_perso[$aut_pp->t_fields[$field_id]["NAME"]]["TITRE"] = $aut_pp->t_fields[$field_id]["TITRE"];
foreach ($vals as $value) {
$aut_detail->parametres_perso[$aut_pp->t_fields[$field_id]["NAME"]]["VALUE"][] = $aut_pp->get_formatted_output(array($value), $field_id);
}
}
if ($authors->responsability_fonction && $param[4] == 1) {
$aut_detail->function = $fonction_auteur[$authors->responsability_fonction];
}
if ($authors->responsability_type == 0) {
$aut[] = _get_aut_infos($aut_detail, $param[7]);
}
if ($authors->responsability_type == 1) {
$aut1[] = _get_aut_infos($aut_detail, $param[7]);
}
if ($authors->responsability_type == 2) {
$aut2[] = _get_aut_infos($aut_detail, $param[7]);
}
}
if (count($aut1)) {
$aut[] = implode($param[2], $aut1);
}
if (count($aut2)) {
$aut[] = implode($param[2], $aut2);
}
if ($param[1] != 0 && $param[5] && $res_count->nb > $param[1]) {
$aut[] = "et al.";
}
if (count($aut)) {
//.........这里部分代码省略.........
示例5: get_expl
//.........这里部分代码省略.........
//l'icon de demande de transfert
$ajout_expl_panier .= "<a href=\"#\" onClick=\"openPopUp('./catalog/transferts/transferts_popup.php?expl=" . $exemplaire->expl_id . "', 'cart', 600, 450, -2, -2, 'toolbar=no, dependent=yes, resizable=yes, scrollbars=yes');\">" . "<img src='./images/peb_in.png' align='center' border=0 alt=\"" . $msg["transferts_alt_libelle_icon"] . "\" title=\"" . $msg["transferts_alt_libelle_icon"] . "\"></a>";
} else {
$ajout_expl_panier .= "<img src='./images/spacer.gif' align='center' height=20 width=20>";
}
}
$as_invis = false;
$as_unmod = false;
$as_modif = true;
global $flag_no_delete_bulletin;
$flag_no_delete_bulletin = 0;
//visibilité des exemplaires
if ($pmb_droits_explr_localises) {
$as_invis = in_array($exemplaire->expl_location, $explr_tab_invis);
$as_unmod = in_array($exemplaire->expl_location, $explr_tab_unmod);
//$as_modif = in_array($exemplaire->expl_location,$explr_tab_modif);
if (!($as_modif = in_array($exemplaire->expl_location, $explr_tab_modif))) {
$flag_no_delete_bulletin = 1;
}
}
if ($show_in_reception || $cart_link_non || !(SESSrights & CATALOGAGE_AUTH)) {
$link = htmlentities($exemplaire->expl_cb, ENT_QUOTES, $charset);
} else {
if ($as_modif) {
$link = "<a href=\"./catalog.php?categ=serials&sub=bulletinage&action=expl_form&bul_id=" . $exemplaire->expl_bulletin . "&expl_id=" . $exemplaire->expl_id . "\">" . htmlentities($exemplaire->expl_cb, ENT_QUOTES, $charset) . "</a>";
} else {
$link = htmlentities($exemplaire->expl_cb, ENT_QUOTES, $charset);
}
}
if ($situation) {
$situation = "<br />" . $situation;
}
if (!$show_in_reception && SESSrights & CATALOGAGE_AUTH) {
$ajout_expl_panier .= "<span id='EXPL_drag_" . $exemplaire->expl_id . "' dragicon=\"{$base_path}/images/icone_drag_notice.png\" dragtext=\"" . htmlentities($exemplaire->expl_cb, ENT_QUOTES, $charset) . "\" draggable=\"yes\" dragtype=\"notice\" callback_before=\"show_carts\" callback_after=\"\" style=\"padding-left:7px\"><img src=\"" . $base_path . "/images/notice_drag.png\"/></span>";
}
global $pmb_serialcirc_subst;
if ($pmb_serialcirc_subst) {
$ajout_expl_panier .= "<img src='./images/print.gif' alt='Imprimer...' title='Imprimer...' align='middle' border='0'\tstyle='padding-left:7px' \t\t\t\n\t\t\t\t\tonclick=\"openPopUp('./ajax.php?module=circ&categ=periocirc&sub=print_cote&expl_id=" . $exemplaire->expl_id . "', 'circulation', 600, 500, -2, -2, 'toolbar=no, dependent=yes, resizable=yes');\"\n\t\t\t\t>";
}
$line = "<tr>";
for ($i = 0; $i < count($colonnesarray); $i++) {
if ($i == 0 && ($exemplaire->expl_note || $exemplaire->expl_comment) && $pmb_expl_list_display_comments) {
$expl_rowspan = "rowspan='2'";
} else {
$expl_rowspan = "";
}
$aff_column = "";
if (substr($colonnesarray[$i], 0, 1) == "#") {
//champs personnalisés
$id = substr($colonnesarray[$i], 1);
$cp->get_values($exemplaire->expl_id);
if (!$cp->no_special_fields) {
$temp = $cp->get_formatted_output($cp->values[$id], $id);
if (!$temp) {
$temp = " ";
}
$aff_column .= $temp;
}
} else {
eval("\$colencours=\$exemplaire->" . $colonnesarray[$i] . ";");
if ($colonnesarray[$i] == "expl_cb") {
$aff_column = $link;
} else {
if ($colonnesarray[$i] == "expl_cote") {
$aff_column = "<strong>" . htmlentities($colencours, ENT_QUOTES, $charset) . "</strong>";
} else {
if ($colonnesarray[$i] == "surloc_libelle") {
$aff_column = htmlentities($exemplaire->sur_loc_libelle, ENT_QUOTES, $charset);
} else {
if ($colonnesarray[$i] == "statut_libelle") {
$aff_column = htmlentities($colencours, ENT_QUOTES, $charset) . $situation;
} else {
$aff_column = htmlentities($colencours, ENT_QUOTES, $charset);
}
}
}
}
}
$line .= "<td {$expl_rowspan}>" . $aff_column . "</td>";
}
$line .= "<td>{$ajout_expl_panier}</td>";
$line .= "</tr>";
if (($exemplaire->expl_note || $exemplaire->expl_comment) && $pmb_expl_list_display_comments) {
$notcom = array();
$line .= "<tr><td colspan='" . $total_columns . "'>";
if ($exemplaire->expl_note && $pmb_expl_list_display_comments & 1) {
$notcom[] .= "<span class='erreur'>{$exemplaire->expl_note}</span>";
}
if ($exemplaire->expl_comment && $pmb_expl_list_display_comments & 2) {
$notcom[] .= "{$exemplaire->expl_comment}";
}
$line .= implode("<br />", $notcom);
$line .= "</tr>";
}
$result .= $line;
}
$result .= "</table>";
}
return $result;
}
示例6: array
function fetch_collstate()
{
if ($this->niveau_biblio == 's' && $this->niveau_hierar == 1) {
global $dbh;
global $opac_sur_location_activate;
//Traitement des exemplaires
$this->memo_collstate = array();
$q = "select collstate_id, id_serial, state_collections, collstate_origine, collstate_cote, collstate_archive, collstate_lacune, collstate_note, ";
$q .= "idlocation, location_libelle, ";
$q .= "archempla_id, archempla_libelle, ";
$q .= "archtype_id, archtype_libelle, ";
$q .= "archstatut_id, archstatut_opac_libelle ";
if ($opac_sur_location_activate) {
$q .= ", ifnull(surloc_id,0) as surloc_id, ifnull(surloc_libelle,'') as surloc_libelle ";
}
$q .= "from collections_state ";
$q .= "join docs_location on location_id=idlocation ";
if ($opac_sur_location_activate) {
$q .= "left join sur_location on surloc_num=surloc_id ";
}
$q .= "join arch_emplacement on collstate_emplacement=archempla_id ";
$q .= "join arch_type on collstate_type=archtype_id ";
$q .= "join arch_statut on collstate_statut=archstatut_id ";
$q .= "where id_serial = '" . $this->notice_id . "' ";
//pour l'opac
//$q.= "and ((archstatut_visible_opac=1 and archstatut_visible_opac_abon=0)".($_SESSION["user_code"]?" or (archstatut_visible_opac_abon=1 and archstatut_visible_opac=1)":"").")";
$r = pmb_mysql_query($q, $dbh);
if ($r) {
while ($cs = pmb_mysql_fetch_object($r)) {
//Champs perso d'etats de collection
$parametres_perso = array();
$pp = new parametres_perso("collstate");
if (!$pp->no_special_fields) {
$pp->get_values($cs->expl_id);
$values = $pp->values;
foreach ($values as $field_id => $vals) {
foreach ($vals as $value) {
$parametres_perso[$pp->t_fields[$field_id]["NAME"]]["TITRE"] = $pp->t_fields[$field_id]["TITRE"];
$parametres_perso[$pp->t_fields[$field_id]["NAME"]]["VALUE"] = $pp->get_formatted_output(array($value), $field_id);
}
}
}
$cs->parametres_perso = $parametres_perso;
$this->memo_collstate[] = $cs;
}
}
}
}
示例7: _export_
//.........这里部分代码省略.........
$notice .= " <f c='" . $auth->author_type . $auth->responsability_type . "' ind=' 1'>\n";
$notice .= " <s c='a'>" . htmlspecialchars($auth->author_name, ENT_QUOTES, $charset) . "</s>\n";
if ($auth->author_rejete != '') {
$notice .= " <s c='b'>" . htmlspecialchars($auth->author_rejete, ENT_QUOTES, $charset) . "</s>\n";
}
if ($auth->responsability_fonction != '') {
$notice .= " <s c='4'>" . $auth->responsability_fonction . "</s>\n";
}
if ($auth->author_date != "") {
$notice .= " <s c='f'>" . htmlspecialchars($auth->author_date, ENT_QUOTES, $charset) . "</s>\n";
}
if ($auth->author_web != '') {
$notice .= " <s c='N'>" . htmlspecialchars($auth->author_web, ENT_QUOTES, $charset) . "</s>\n";
}
$notice .= " </f>\n";
} elseif ($auth->author_type == "71" || $auth->author_type == "72") {
//Collectivité
$notice .= " <f c='" . $auth->author_type . $auth->responsability_type;
if ($auth->author_type == "71") {
$notice .= "' ind='02'>\n";
} elseif ($auth->author_type == "72") {
$notice .= "' ind='12'>\n";
}
$notice .= " <s c='a'>" . htmlspecialchars($auth->author_name, ENT_QUOTES, $charset) . "</s>\n";
if ($auth->author_subdivision != '') {
$notice .= " <s c='b'>" . htmlspecialchars($auth->author_subdivision, ENT_QUOTES, $charset) . "</s>\n";
}
if ($auth->author_rejete != '') {
$notice .= " <s c='g'>" . htmlspecialchars($auth->author_rejete, ENT_QUOTES, $charset) . "</s>\n";
}
if ($auth->author_numero != '') {
$notice .= " <s c=d'>" . htmlspecialchars($auth->author_numero, ENT_QUOTES, $charset) . "</s>\n";
}
if ($auth->responsability_fonction != '') {
$notice .= " <s c='4'>" . $auth->responsability_fonction . "</s>\n";
}
if ($auth->author_date != "") {
$notice .= " <s c='f'>" . htmlspecialchars($auth->author_date, ENT_QUOTES, $charset) . "</s>\n";
}
$lieu = $auth->author_lieu;
if ($auth->author_ville) {
if ($lieu) {
$lieu .= "; ";
}
$lieu .= $auth->author_ville;
}
if ($auth->author_pays) {
if ($lieu) {
$lieu .= "; ";
}
$lieu .= $auth->author_pays;
}
if ($lieu != '') {
$notice .= " <s c='e'>" . htmlspecialchars($lieu, ENT_QUOTES, $charset) . "</s>\n";
}
if ($auth->author_lieu != '') {
$notice .= " <s c='K'>" . htmlspecialchars($auth->author_lieu, ENT_QUOTES, $charset) . "</s>\n";
}
if ($auth->author_ville != '') {
$notice .= " <s c='L'>" . htmlspecialchars($auth->author_ville, ENT_QUOTES, $charset) . "</s>\n";
}
if ($auth->author_pays != '') {
$notice .= " <s c='M'>" . htmlspecialchars($auth->author_pays, ENT_QUOTES, $charset) . "</s>\n";
}
if ($auth->author_web != '') {
$notice .= " <s c='N'>" . htmlspecialchars($auth->author_web, ENT_QUOTES, $charset) . "</s>\n";
}
$notice .= " </f>\n";
}
}
//URL
if ($rn->lien != '') {
$notice .= " <f c='856'>\n";
$notice .= " <s c='u'>" . htmlspecialchars($rn->lien, ENT_QUOTES, $charset) . "</s>\n";
if ($rn->eformat != '') {
$notice .= " <s c='q'>" . htmlspecialchars($rn->eformat, ENT_QUOTES, $charset) . "</s>\n";
}
$notice .= " </f>\n";
}
//Champs perso de notice traite par la table notice_custom
$mes_pp = new parametres_perso("notices");
$mes_pp->get_values($id);
$values = $mes_pp->values;
foreach ($values as $field_id => $vals) {
if ($mes_pp->t_fields[$field_id]["EXPORT"]) {
//champ exportable
foreach ($vals as $value) {
if ($value) {
$notice .= " <f c='900' ind=' '>\n";
$notice .= " <s c='a'>" . htmlspecialchars($mes_pp->get_formatted_output(array($value), $field_id), ENT_QUOTES, $charset) . "</s>\n";
$notice .= " <s c='l'>" . htmlspecialchars($mes_pp->t_fields[$field_id]["TITRE"], ENT_QUOTES, $charset) . "</s>\n";
$notice .= " <s c='n'>" . htmlspecialchars($mes_pp->t_fields[$field_id]["NAME"], ENT_QUOTES, $charset) . "</s>\n";
$notice .= " </f>\n";
}
}
}
}
$notice .= "</notice>\n";
return $notice;
}
示例8: in
function get_display_list($base_url, $filtre, $debut = 0, $page = 0, $type = 0)
{
global $dbh, $msg, $nb_per_page_a_search, $tpl_collstate_liste, $tpl_collstate_liste_line, $tpl_collstate_surloc_liste, $tpl_collstate_surloc_liste_line;
global $opac_sur_location_activate, $opac_view_filter_class;
global $collstate_list_header, $collstate_list_footer;
global $opac_collstate_data, $opac_collstate_order, $opac_url_base;
global $charset, $class_path;
$location = $filtre->location;
if ($opac_view_filter_class) {
if (!$opac_view_filter_class->params["nav_collections"]) {
$opac_view_filter_class->params["nav_collections"][0] = "0";
}
$req = "SELECT collstate_id , location_id, num_infopage, surloc_id FROM arch_statut, collections_state \n\t\t\t\tLEFT JOIN arch_emplacement ON collstate_emplacement=archempla_id, docs_location\n\t\t\t\tLEFT JOIN sur_location on docs_location.surloc_num=surloc_id \n\t\t\t\tWHERE " . ($location ? "(location_id='{$location}') and " : "") . "id_serial='" . $this->serial_id . "' \n\t\t\t\tand location_id=idlocation and idlocation in(" . implode(",", $opac_view_filter_class->params["nav_collections"]) . ")\n\t\t\t\tand archstatut_id=collstate_statut \n\t\t\t\tand ((archstatut_visible_opac=1 and archstatut_visible_opac_abon=0)" . ($_SESSION["user_code"] ? " or (archstatut_visible_opac_abon=1 and archstatut_visible_opac=1)" : "") . ")";
if ($opac_collstate_order) {
$req .= " ORDER BY " . $opac_collstate_order;
} else {
$req .= " ORDER BY " . ($type ? "location_libelle, " : "") . "archempla_libelle, collstate_cote";
}
} else {
$req = "SELECT collstate_id , location_id, num_infopage, surloc_id FROM arch_statut, collections_state \n\t\t\t\tLEFT JOIN docs_location ON location_id = idlocation\n\t\t\t\tLEFT JOIN sur_location on docs_location.surloc_num=surloc_id \n\t\t\t\tLEFT JOIN arch_emplacement ON collstate_emplacement=archempla_id\n\t\t\t\tWHERE " . ($location ? "(location_id='{$location}') and " : "") . "id_serial='" . $this->serial_id . "' \n\t\t\t\tand archstatut_id=collstate_statut \n\t\t\t\tand ((archstatut_visible_opac=1 and archstatut_visible_opac_abon=0)" . ($_SESSION["user_code"] ? " or (archstatut_visible_opac_abon=1 and archstatut_visible_opac=1)" : "") . ")";
if ($opac_collstate_order) {
$req .= " ORDER BY " . $opac_collstate_order;
} else {
$req .= " ORDER BY " . ($type ? "location_libelle, " : "") . "archempla_libelle, collstate_cote";
}
}
$myQuery = pmb_mysql_query($req, $dbh);
if (!pmb_mysql_error() && ($this->nbr = pmb_mysql_num_rows($myQuery))) {
if ($opac_sur_location_activate) {
$tpl_collstate_liste[$type] = str_replace('<!-- surloc -->', $tpl_collstate_surloc_liste, $tpl_collstate_liste[$type]);
$tpl_collstate_liste_line[$type] = str_replace('<!-- surloc -->', $tpl_collstate_surloc_liste_line, $tpl_collstate_liste_line[$type]);
}
if ($opac_collstate_data) {
if (strstr($opac_collstate_data, "#")) {
require_once $class_path . "/parametres_perso.class.php";
$cp = new parametres_perso("collstate");
}
$colonnesarray = explode(",", $opac_collstate_data);
$collstate_list_header_deb = "<tr>";
for ($i = 0; $i < count($colonnesarray); $i++) {
if (substr($colonnesarray[$i], 0, 1) == "#") {
//champs personnalisés
$id = substr($colonnesarray[$i], 1);
if (!$cp->no_special_fields) {
$collstate_list_header_deb .= "<th class='collstate_header_cp_" . str_replace('#', '', $colonnesarray[$i]) . "'>" . htmlentities($cp->t_fields[$id]["TITRE"], ENT_QUOTES, $charset) . "</th>";
}
} else {
eval("\$colencours=\$msg['collstate_header_" . $colonnesarray[$i] . "'];");
$collstate_list_header_deb .= "<th class='collstate_header_" . $colonnesarray[$i] . "'>" . htmlentities($colencours, ENT_QUOTES, $charset) . "</th>";
}
}
$collstate_list_header_deb .= "</tr>";
$parity = 1;
$liste = "";
while ($coll = pmb_mysql_fetch_object($myQuery)) {
$my_collstate = new collstate($coll->collstate_id);
if ($parity++ % 2) {
$pair_impair = "even";
} else {
$pair_impair = "odd";
}
$tr_surbrillance = "onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='" . $pair_impair . "'\" ";
$liste .= "<tr class='" . $pair_impair . "' " . $tr_surbrillance . " >";
$colencours = "";
for ($i = 0; $i < count($colonnesarray); $i++) {
if (substr($colonnesarray[$i], 0, 1) == "#") {
//champs personnalisés
$id = substr($colonnesarray[$i], 1);
$cp->get_values($coll->collstate_id);
if (!$cp->no_special_fields) {
$temp = $cp->get_formatted_output($cp->values[$id], $id);
if (!$temp) {
$temp = " ";
}
$liste .= "<td class='" . $colonnesarray[$i] . "' >" . htmlentities($temp, ENT_QUOTES, $charset) . "</td>";
}
} else {
eval("\$colencours=\$my_collstate->" . $colonnesarray[$i] . ";");
if ($colonnesarray[$i] == "location_libelle" && $my_collstate->num_infopage) {
if ($my_collstate->surloc_id != "0") {
$param_surloc = "&surloc=" . $my_collstate->surloc_id;
} else {
$param_surloc = "";
}
$collstate_location = "<a href=\"" . $opac_url_base . "index.php?lvl=infopages&pagesid=" . $my_collstate->num_infopage . "&location=" . $my_collstate->location_id . $param_surloc . "\" alt=\"" . $msg['location_more_info'] . "\" title=\"" . $msg['location_more_info'] . "\">" . $my_collstate->location_libelle . "</a>";
$liste .= "<td class='" . $colonnesarray[$i] . "'>" . $collstate_location . "</td>";
} else {
$liste .= "<td class='" . $colonnesarray[$i] . "'>" . htmlentities($colencours, ENT_QUOTES, $charset) . "</td>";
}
}
}
$liste .= "</tr>";
}
$liste = $collstate_list_header . $collstate_list_header_deb . $liste . $collstate_list_footer;
} else {
$parity = 1;
while ($coll = pmb_mysql_fetch_object($myQuery)) {
$my_collstate = new collstate($coll->collstate_id);
if ($parity++ % 2) {
$pair_impair = "even";
//.........这里部分代码省略.........
示例9: getEnrichment
function getEnrichment($notice_id, $source_id, $type = "", $enrich_params = array())
{
global $charset;
$enrichment = array();
$this->noticeToEnrich = $notice_id;
// récupération du code sudoc (PPN) de la notice stocké dans le champ perso de type "resolve" avec pour label "SUDOC"
$mes_pp = new parametres_perso("notices");
$mes_pp->get_values($notice_id);
$values = $mes_pp->values;
foreach ($values as $field_id => $vals) {
if ($mes_pp->t_fields[$field_id]['TYPE'] == "resolve") {
$field_options = _parser_text_no_function_("<?xml version='1.0' encoding='" . $charset . "'?>\n" . $mes_pp->t_fields[$field_id]['OPTIONS'], "OPTIONS");
foreach ($field_options['RESOLVE'] as $resolve) {
if (strtoupper($resolve['LABEL']) == "SUDOC") {
$infos = explode('|', $vals[0]);
$ppn = $infos[0];
}
}
}
}
if ($ppn == "") {
return $this->build_error();
}
$url = "carmin.sudoc.abes.fr";
$port = "210";
$base = "abes-z39-public";
$format = "unimarc";
$term = "@attr 1=12 @attr 2=3 \"{$ppn}\" ";
$id = yaz_connect("{$url}:{$port}/{$base}", array("piggyback" => false));
yaz_range($id, 1, 1);
yaz_syntax($id, strtolower($format));
yaz_search($id, "rpn", $term);
$options = array("timeout" => 45);
//Override le timeout du serveur mysql, pour être sûr que le socket dure assez longtemps pour aller jusqu'aux ajouts des résultats dans la base.
$sql = "set wait_timeout = 120";
mysql_query($sql);
yaz_wait($options);
$error = yaz_error($id);
$error_info = yaz_addinfo($id);
if (!empty($error)) {
yaz_close($id);
return $this->build_error();
} else {
$hits = yaz_hits($id);
$hits += 0;
if ($hits) {
$rec = yaz_record($id, 1, "raw");
$record = new iso2709_record($rec);
if (!$record->valid()) {
yaz_close($id);
return $this->build_error();
}
$lines = "";
$document->document_type = $record->inner_guide[dt];
$document->bibliographic_level = $record->inner_guide[bl];
$document->hierarchic_level = $record->inner_guide[hl];
if ($document->hierarchic_level == "") {
if ($document->bibliographic_level == "s") {
$document->hierarchic_level = "1";
}
if ($document->bibliographic_level == "m") {
$document->hierarchic_level = "0";
}
}
$indicateur = array();
$cle_list = array();
for ($i = 0; $i < count($record->inner_directory); $i++) {
$cle = $record->inner_directory[$i]['label'];
$indicateur[$cle][] = substr($record->inner_data[$i]['content'], 0, 2);
$field_array = $record->get_subfield_array_array($cle);
$line = "";
if (!$cle_list[$cle]) {
foreach ($field_array as $field) {
$line .= $cle . " ";
foreach ($field as $ss_field) {
$line .= "\$" . $ss_field["label"] . $ss_field["content"];
}
$line .= "<br>";
}
}
$cle_list[$cle] = 1;
$lines .= $line;
}
if ($lines == "") {
yaz_close($id);
return $this->build_error();
}
} else {
yaz_close($id);
return $this->build_error();
}
}
yaz_close($id);
$enrichment['sudoc']['content'] = $lines;
$enrichment['source_label'] = $this->msg['sudoc_enrichment_source'];
return $enrichment;
}
示例10: in
echo "</div><div class='row'>";
$q = "select distinct id_section, section_title from cms_sections join cms_editorial_custom_values on id_section = cms_editorial_custom_origine join cms_editorial_custom on idchamp = cms_editorial_custom_champ where type in ('url','resolve')";
$r = pmb_mysql_query($q) or die(pmb_mysql_error() . "<br />" . $q);
if ($r) {
$rc = pmb_mysql_num_rows($r);
} else {
$rc = 0;
}
$pb->count = $rc;
$pb->nb_progress_call = 0;
$pb->set_text($msg['chklnk_verifurl_editorial_content_cp']);
flush();
$pp = new parametres_perso("cms_editorial");
if ($r) {
while ($o = pmb_mysql_fetch_object($r)) {
$pp->get_values($o->id_section);
foreach ($pp->values as $id_cp => $values) {
if ($pp->t_fields[$id_cp]['TYPE'] == "url") {
foreach ($values as $value) {
$link = "";
if (strpos($value, "|") !== false) {
$link = substr($value, 0, strpos($value, "|"));
} else {
$link = $value;
}
$response = $curl->get($link);
if (!$response) {
echo "<div class='row'><a href=\"./cms.php?categ=editorial&sub=list\">" . $o->section_title . "</a> <a href=\"" . $link . "\">" . $link . "</a> <span class='erreur'>" . $curl->error . "</span></div>";
} elseif ($response->headers['Status-Code'] != '200') {
if ($response->headers['Status-Code']) {
$tmp = $curl->reponsecurl[$response->headers['Status-Code']];
示例11: explode
function display_result()
{
global $class_path, $charset, $msg;
$aff = "";
if ($this->query) {
$execute_query = mysql_query($this->query);
$aff .= "<table class='" . $this->css["table"]["class"] . "' style='" . $this->css["table"]["style"] . "'>";
$parity = 0;
$header = "";
$s = explode(",", $this->displaycolumns);
for ($n = 0; $n < count($s); $n++) {
if (substr($s[$n], 0, 1) == "#" && $this->params["REFERENCE"][0]["DYNAMICFIELDS"] == "yes") {
//champs perso
require_once $class_path . "/parametres_perso.class.php";
$cp = new parametres_perso($this->params["REFERENCE"][0]["PREFIXNAME"]);
if (!$cp->no_special_fields) {
$id = substr($s[$n], 1);
$header .= "<th>" . htmlentities($cp->t_fields[$id][TITRE], ENT_QUOTES, $charset) . "</th>";
}
} elseif (array_key_exists($s[$n], $this->fixedfields)) {
//champs fixes
$header .= "<th>" . $msg[str_replace("msg:", "", $this->fixedfields[$s[$n]]["NAME"])] . "</th>";
} elseif (array_key_exists($s[$n], $this->specialfields)) {
//champs spéciaux
$header .= "<th>" . $msg[str_replace("msg:", "", $this->specialfields[$s[$n]]["NAME"])] . "</th>";
} else {
$header .= "<th> </th>";
}
}
$aff .= $header;
while ($result = mysql_fetch_array($execute_query)) {
$onmouseout = $this->scripts["row"]["onmouseout"];
$onmouseover = $this->scripts["row"]["onmouseover"];
$onmousedown = $this->scripts["row"]["onmousedown"];
if ($parity % 2) {
$pair_impair = $this->css["row_even"]["class"];
$pair_impair_style = $this->css["row_even"]["style"];
$onmouseout = str_replace('!!parity!!', $this->css["row_even"]["class"], $onmouseout);
$onmouseover = str_replace('!!parity!!', $this->css["row_even"]["class"], $onmouseover);
$onmouseout = str_replace('!!parity!!', $this->css["row_even"]["class"], $onmouseout);
} else {
$pair_impair = $this->css["row_odd"]["class"];
$pair_impair_style = $this->css["row_odd"]["style"];
$onmouseout = str_replace('!!parity!!', $this->css["row_odd"]["class"], $onmouseout);
$onmouseover = str_replace('!!parity!!', $this->css["row_odd"]["class"], $onmouseover);
$onmousedown = str_replace('!!parity!!', $this->css["row_odd"]["class"], $onmousedown);
}
$ligne = "";
$s = explode(",", $this->displaycolumns);
//parcours des champs
for ($i = 0; $i < count($s); $i++) {
//détermination de la valeur
if (substr($s[$i], 0, 1) == "#" && $this->params["REFERENCE"][0]["DYNAMICFIELDS"] == "yes") {
//champs perso
require_once $class_path . "/parametres_perso.class.php";
$cp = new parametres_perso($this->params["REFERENCE"][0]["PREFIXNAME"]);
$id = substr($s[$i], 1);
$cp->get_values($result[$this->params["REFERENCEKEY"][0]["value"]]);
if (!$cp->no_special_fields) {
// $temp=$result[$this->params["REFERENCE"][0]["PREFIXNAME"]."_custom_".$cp->t_fields[$id]["DATATYPE"].$id];
$onmouseout = str_replace("!!" . $s[$i] . "!!", rawurlencode($temp), $onmouseout);
$onmouseover = str_replace("!!" . $s[$i] . "!!", rawurlencode($temp), $onmouseover);
$onmousedown = str_replace("!!" . $s[$i] . "!!", rawurlencode($temp), $onmousedown);
$temp = $cp->get_formatted_output($cp->values[$id], $id);
if (!$temp) {
$temp = " ";
}
$ligne .= "<td class='" . $this->css["cols"][$i]["class"] . "' style='" . $this->css["cols"][$i]["style"] . "'>" . $temp . "</td>";
}
} elseif (array_key_exists($s[$i], $this->fixedfields)) {
//champs fixes
$f = array();
if ($this->fixedfields[$s[$i]]["LINK"]) {
for ($x = 0; $x < count($this->fixedfields[$s[$i]]["LINK"]); $x++) {
if ($this->fixedfields[$s[$i]]["LINK"][$x]["TYPE"] == "nn") {
if ($this->fixedfields[$s[$i]]["TABLEALIAS"][0]["NAME"]) {
$f[0] = $this->fixedfields[$s[$i]]["TABLEALIAS"][0]["NAME"];
} else {
$f[0] = $this->fixedfields[$s[$i]]["TABLEFIELD"][0]["NAME"];
}
} else {
if ($this->fixedfields[$s[$i]]["TABLEALIAS"][0][value]) {
$f[0] = $this->fixedfields[$s[$i]]["TABLEALIAS"][0][value];
} else {
$f[0] = $this->fixedfields[$s[$i]]["TABLEFIELD"][0][value];
}
}
}
} else {
if ($this->fixedfields[$s[$i]]["TABLEALIAS"][0][value]) {
$f = explode(",", $this->fixedfields[$s[$i]]["TABLEALIAS"][0][value]);
} else {
$f = explode(",", $this->fixedfields[$s[$i]]["TABLEFIELD"][0][value]);
}
}
$b = 0;
$ligne .= "<td class='" . $this->css["cols"][$i]["class"] . "' style='" . $this->css["cols"][$i]["style"] . "'>";
while ($b < count($f)) {
$temp = $result[$f[$b]];
if ($temp == '') {
//.........这里部分代码省略.........
示例12: getEnrichment
function getEnrichment($notice_id, $source_id, $type = "", $enrich_params = array())
{
global $charset;
$params = $this->get_source_params($source_id);
if ($params["PARAMETERS"]) {
//Affichage du formulaire avec $params["PARAMETERS"]
$vars = unserialize($params["PARAMETERS"]);
}
$enrichment = array();
switch ($type) {
case "artevod":
default:
$perso_params = new parametres_perso("notices");
$perso_params->get_values($notice_id);
$values = $perso_params->values;
$link = "http://www.mediatheque-numerique.com/ws/films/" . $values[$vars['cp_field']][0];
$infos = unserialize($this->parameters);
$curl = new Curl();
if (isset($infos['accesskey']) && $infos['accesskey']) {
$curl->set_option("CURLOPT_USERPWD", $infos['accesskey'] . ":" . $infos['secretkey']);
}
$result = $curl->get($link);
$result = _parser_text_no_function_($result->body, "WSOBJECTQUERY");
$content = "";
$film = array();
// Titre
$film['title'] = $result['FILM'][0]['EDITORIAL'][0]['TITLE'][0]['value'];
$film['original_title'] = $result['FILM'][0]['EDITORIAL'][0]['ORIGINAL_TITLE'][0]['value'];
// Genres
$film['genres'] = array();
foreach ($result['FILM'][0]['EDITORIAL'][0]['GENRE'] as $genre) {
foreach ($genre['LABEL'] as $label) {
if ($label['LANG'] == 'fr') {
$film['genres'][] = $label['value'];
}
}
}
// Sous-genres
$film['subgenres'] = array();
foreach ($result['FILM'][0]['EDITORIAL'][0]['SUB_GENRE'] as $genre) {
foreach ($genre['LABEL'] as $label) {
if ($label['LANG'] == 'fr') {
$film['subgenres'][] = $label['value'];
}
}
}
// Auteurs
$film['authors'] = array();
foreach ($result['FILM'][0]['STAFF'][0]['AUTHORS'][0]['PERSON'] as $author) {
if ($author['FULL_NAME'][0]['value']) {
$film['authors'][] = $author['FULL_NAME'][0]['value'];
} else {
$film['authors'][] = $author['FIRST_NAME'][0]['value'] . " " . $author['LAST_NAME'][0]['value'];
}
}
// Acteurs
$film['actors'] = array();
foreach ($result['FILM'][0]['STAFF'][0]['ACTORS'][0]['PERSON'] as $actor) {
if ($actor['FULL_NAME'][0]['value']) {
$film['actors'][] = $actor['FULL_NAME'][0]['value'];
} else {
$film['actors'][] = $actor['FIRST_NAME'][0]['value'] . " " . $actor['LAST_NAME'][0]['value'];
}
}
// Couverture
$film['poster'] = $result['FILM'][0]['MEDIA'][0]['POSTERS'][0]['MEDIA'][0]['SRC'];
// Durée
$film['duration'] = array('raw_value' => $result['FILM'][0]['TECHNICAL'][0]['DURATION'][0]['value'], 'format_value' => floor($result['FILM'][0]['TECHNICAL'][0]['DURATION'][0]['value'] / 60) . ":" . str_pad($result['FILM'][0]['TECHNICAL'][0]['DURATION'][0]['value'] % 60, 2, '0', STR_PAD_LEFT));
// Description
$film['description'] = $result['FILM'][0]['EDITORIAL'][0]['DESCRIPTION'][0]['value'];
// Résumé
$film['body'] = $result['FILM'][0]['EDITORIAL'][0]['BODY'][0]['value'];
// Extraits
$film['trailers'] = array();
foreach ($result['FILM'][0]['MEDIA'][0]['TRAILERS'][0]['MEDIA'] as $trailer) {
$film['trailers'][] = $trailer['SRC'];
}
// Photos
$film['photos'] = array();
foreach ($result['FILM'][0]['MEDIA'][0]['PHOTOS'][0]['MEDIA'] as $photo) {
$film['photos'][] = $photo['SRC'];
}
// Public
$film['target_audience'] = $result['FILM'][0]['TECHNICAL'][0]['TARGET_AUDIENCE'][0]['LABEL'][0]['value'];
// Année de production
$film['production_year'] = $result['FILM'][0]['TECHNICAL'][0]['PRODUCTION_YEAR'][0]['value'];
// Pays de production
$film['production_countries'] = array();
foreach ($result['FILM'][0]['TECHNICAL'][0]['PRODUCTION_COUNTRIES'][0]['COUNTRY'] as $country) {
foreach ($country['LABEL'] as $label) {
if ($label['LANG'] == 'fr') {
$film['production_countries'] = $label['value'];
}
}
}
// Langues
$film['languages'] = array();
foreach ($result['FILM'][0]['TECHNICAL'][0]['LANGUAGES'][0]['LANGUAGE'] as $language) {
foreach ($language['LABEL'] as $label) {
if ($label['LANG'] == 'fr') {
//.........这里部分代码省略.........
示例13: in
function get_display_list($base_url, $filtre, $debut = 0, $page = 0, $type = 0, $form = 1, $no_pagination = false)
{
global $dbh, $msg, $nb_per_page_a_search, $tpl_collstate_liste, $tpl_collstate_liste_line, $tpl_collstate_liste_form, $tpl_collstate_surloc_liste, $tpl_collstate_surloc_liste_line;
global $explr_invisible, $pmb_droits_explr_localises, $pmb_etat_collections_localise, $deflt_docs_location;
global $pmb_sur_location_activate;
global $pmb_collstate_data, $class_path, $collstate_list_header, $collstate_list_footer;
$location = $filtre->location;
if (!$pmb_etat_collections_localise) {
$location = "";
}
if ($pmb_droits_explr_localises && $explr_invisible) {
$restrict_location = " location_id not in (" . $explr_invisible . ") and ";
} else {
$restrict_location = "";
}
if ($pmb_sur_location_activate) {
$join_sur_loc = " left join sur_location on docs_location.surloc_num=sur_location.surloc_id ";
$order_sur_loc = "surloc_libelle,";
} else {
$join_sur_loc = "";
$order_sur_loc = "";
}
//On compte les bulletins à afficher
$rqt = "SELECT count( collstate_id) FROM collections_state WHERE {$restrict_location} " . ($location ? "(location_id='{$location}') and " : "") . " id_serial='" . $this->serial_id . "' ";
$myQuery = pmb_mysql_query($rqt, $dbh);
$nbr_lignes = pmb_mysql_result($myQuery, 0, 0);
$req = "SELECT collstate_id , location_id FROM collections_state LEFT JOIN docs_location ON location_id=idlocation " . $join_sur_loc . " LEFT JOIN arch_emplacement ON collstate_emplacement=archempla_id WHERE {$restrict_location} " . ($location ? "(location_id='{$location}') and " : "") . "\n\tid_serial='" . $this->serial_id . "' ORDER BY " . $order_sur_loc . " " . ($pmb_etat_collections_localise ? "location_libelle, " : "") . "archempla_libelle, collstate_cote " . ($no_pagination ? '' : "LIMIT {$debut},{$nb_per_page_a_search}");
$myQuery = pmb_mysql_query($req, $dbh);
if (pmb_mysql_num_rows($myQuery)) {
if ($pmb_sur_location_activate) {
$tpl_collstate_liste[$type] = str_replace('<!-- surloc -->', $tpl_collstate_surloc_liste, $tpl_collstate_liste[$type]);
$tpl_collstate_liste_line[$type] = str_replace('<!-- surloc -->', $tpl_collstate_surloc_liste_line, $tpl_collstate_liste_line[$type]);
}
if ($pmb_collstate_data) {
if (strstr($pmb_collstate_data, "#")) {
require_once $class_path . "/parametres_perso.class.php";
$cp = new parametres_perso("collstate");
}
$colonnesarray = explode(",", $pmb_collstate_data);
$collstate_list_header_deb = "<tr>";
for ($i = 0; $i < count($colonnesarray); $i++) {
if (substr($colonnesarray[$i], 0, 1) == "#") {
//champs personnalisés
$id = substr($colonnesarray[$i], 1);
if (!$cp->no_special_fields) {
$collstate_list_header_deb .= "<th class='collstate_header_" . $colonnesarray[$i] . "'>" . htmlentities($cp->t_fields[$id]["TITRE"], ENT_QUOTES, $charset) . "</th>";
}
} else {
eval("\$colencours=\$msg['collstate_header_" . $colonnesarray[$i] . "'];");
$collstate_list_header_deb .= "<th class='collstate_header_" . $colonnesarray[$i] . "'>" . htmlentities($colencours, ENT_QUOTES, $charset) . "</th>";
}
}
$collstate_list_header_deb .= "</tr>";
$parity = 1;
$liste = "";
while ($coll = pmb_mysql_fetch_object($myQuery)) {
$my_collstate = new collstate($coll->collstate_id);
if ($parity++ % 2) {
$pair_impair = "even";
} else {
$pair_impair = "odd";
}
$tr_surbrillance = "onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='" . $pair_impair . "'\" ";
$liste .= "<tr class='" . $pair_impair . "' style='cursor: pointer' " . $tr_surbrillance . " >";
$colencours = "";
for ($i = 0; $i < count($colonnesarray); $i++) {
if ($my_collstate->explr_acces_autorise == "MODIF") {
$tr_javascript = " onmousedown=\"document.location='./catalog.php?categ=serials&sub=collstate_form&id=" . $coll->collstate_id . "&serial_id=" . $this->serial_id . "';\" ";
} else {
$tr_javascript = "";
}
if (substr($colonnesarray[$i], 0, 1) == "#") {
//champs personnalisés
$id = substr($colonnesarray[$i], 1);
$cp->get_values($coll->collstate_id);
if (!$cp->no_special_fields) {
$temp = $cp->get_formatted_output($cp->values[$id], $id);
if (!$temp) {
$temp = " ";
}
$liste .= "<td class='" . $colonnesarray[$i] . "' " . $tr_javascript . " >" . htmlentities($temp, ENT_QUOTES, $charset) . "</td>";
}
} else {
eval("\$colencours=\$my_collstate->" . $colonnesarray[$i] . ";");
$liste .= "<td class='" . $colonnesarray[$i] . "' " . $tr_javascript . " >" . htmlentities($colencours, ENT_QUOTES, $charset) . "</td>";
}
}
$liste .= "</tr>";
}
$liste = $collstate_list_header . $collstate_list_header_deb . $liste . $collstate_list_footer;
} else {
$parity = 1;
while ($coll = pmb_mysql_fetch_object($myQuery)) {
$my_collstate = new collstate($coll->collstate_id);
/*
Avoir comment gerer un + pour des grands etats de collections
if (count($my_collstate->state_collections)>80 || count($my_collstate->lacune)>80) {
$plus_statecollection="<img src='images/plus.gif' class='img_plus' onClick='if (event) e=event; else e=window.event; e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); show_sources(\"!!id!!\"); '/>";
$texte_statecollection="<tr class='$pair_impair' style='display:none' id='".$coll->collstate_id."'><td> </td><td colspan='3'><table style='border:1px solid'>
<td>".str_replace("\n","<br />",$my_collstate->state_collections)."</td>
//.........这里部分代码省略.........
示例14: inslink
function do_public($short = 0, $ex = 1)
{
global $dbh;
global $msg;
global $tdoc;
global $charset;
global $memo_notice;
global $opac_notice_affichage_class;
$this->notice_public = $this->genere_in_perio();
if (!$this->notice_id) {
return;
}
/* début modif */
// Notices parentes
//$this->notice_public.=$this->parents;
/* fin modif */
$this->notice_public .= "<table>";
//Titre
// constitution de la mention de titre
if ($this->notice->serie_name) {
$this->notice_public .= "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>" . $msg['tparent_start'] . "</span></td><td>" . inslink($this->notice->serie_name, str_replace("!!id!!", $this->notice->tparent_id, $this->lien_rech_serie));
if ($this->notice->tnvol) {
$this->notice_public .= ', ' . $this->notice->tnvol;
}
$this->notice_public .= "</td></tr>";
}
$this->notice_public .= "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>" . $msg['title'] . " :</span></td>";
$this->notice_public .= "<td><span class='public_title'>" . $this->notice->tit1;
//if($tdoc->table[$this->notice->typdoc]) $this->notice_public .= " [".$tdoc->table[$this->notice->typdoc]."]";
if ($this->notice->tit4) {
$this->notice_public .= " : " . $this->notice->tit4;
}
if ($this->notice->tit3) {
$this->notice_public .= " = " . $this->notice->tit3;
}
if ($this->notice->mention_edition) {
$this->notice_public .= " - " . $this->notice->mention_edition;
}
$this->notice_public .= "</span></td></tr>";
//Préparation des champs personnalisés
if (!$this->p_perso->no_special_fields) {
if (!$this->memo_perso_) {
$this->memo_perso_ = $this->p_perso->show_fields($this->notice_id);
}
}
if (!$this->memo_perso_) {
$this->memo_perso_["FIELDS"] = array();
}
//PPN
foreach ($this->memo_perso_["FIELDS"] as $i => $value) {
$p = $this->memo_perso_["FIELDS"][$i];
if ($p["AFF"] && $p["NAME"] == "ppn001") {
$this->notice_public .= "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>" . strip_tags($p["TITRE"]) . "</span></td><td>" . str_replace("Sudoc : ", "", $p["AFF"]) . "</td></tr>";
unset($this->memo_perso_["FIELDS"][$i]);
break;
}
}
//ISSN
// ISBN ou NO. commercial
$issn = $this->notice->code;
$mes_pp = new parametres_perso("notices");
$mes_pp->get_values($this->notice_id);
$values = $mes_pp->values;
foreach ($values as $field_id => $vals) {
if ($mes_pp->t_fields[$field_id]["NAME"] == "cp_issn_autres") {
foreach ($vals as $value) {
if ($issn) {
$issn .= ". ";
}
$issn .= $mes_pp->get_formatted_output(array($value), $field_id);
//Val
}
}
}
if ($issn) {
$this->notice_public .= "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>" . $msg['code_start'] . "</span></td><td>" . htmlentities($issn, ENT_QUOTES, $charset) . "</td></tr>";
}
//Auteurs
if ($this->auteurs_tous) {
$this->notice_public .= "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>" . $msg['auteur_start'] . "</span></td><td>" . $this->auteurs_tous . "</td></tr>";
}
if ($this->congres_tous) {
$this->notice_public .= "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>" . $msg['congres_aff_public_libelle'] . "</span></td><td>" . $this->congres_tous . "</td></tr>";
}
//Editeurs
foreach ($this->memo_perso_["FIELDS"] as $i => $value) {
$p = $this->memo_perso_["FIELDS"][$i];
if ($p["AFF"] && $p["NAME"] == "cp_editeurs") {
$this->notice_public .= "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>" . strip_tags($p["TITRE"]) . "</span></td><td>" . $p["AFF"] . "</td></tr>";
unset($this->memo_perso_["FIELDS"][$i]);
break;
}
}
//if ($this->notice->tit2) $this->notice_public .= "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>".$msg['other_title_t2']." :</span></td><td>".$this->notice->tit2."</td></tr>" ;
//if ($this->notice->tit3) $this->notice_public .= "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>".$msg['other_title_t3']." :</span></td><td>".$this->notice->tit3."</td></tr>" ;
//if ($tdoc->table[$this->notice->typdoc]) $this->notice_public .= "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>".$msg['typdocdisplay_start']."</span></td><td>".$tdoc->table[$this->notice->typdoc]."</td></tr>";
// mention d'édition
//if ($this->notice->mention_edition) $this->notice_public .= "<tr><td align='left' class='bg-grey'><span class='etiq_champ'>".$msg['mention_edition_start']."</span></td><td>".$this->notice->mention_edition."</td></tr>";
// Années de publication
if ($this->notice->year) {
//.........这里部分代码省略.........