本文整理汇总了PHP中categories::getlibelle方法的典型用法代码示例。如果您正苦于以下问题:PHP categories::getlibelle方法的具体用法?PHP categories::getlibelle怎么用?PHP categories::getlibelle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类categories
的用法示例。
在下文中一共展示了categories::getlibelle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: make_serialized_human_query
//.........这里部分代码省略.........
$requete = str_replace("!!statut_r!!", "", $requete);
}
if ($this->fixedfields[$s[1]]["INPUT_OPTIONS"]["QUERY"][0]["USE_GLOBAL"]) {
$use_global = explode(",", $this->fixedfields[$s[1]]["INPUT_OPTIONS"]["QUERY"][0]["USE_GLOBAL"]);
for ($j = 0; $j < count($use_global); $j++) {
$var_global = $use_global[$j];
global ${$var_global};
$requete = str_replace("!!" . $var_global . "!!", ${$var_global}, $requete);
}
}
$resultat = pmb_mysql_query($requete);
$opt = array();
while ($r_ = @pmb_mysql_fetch_row($resultat)) {
$opt[$r_[0]] = $r_[1];
}
for ($j = 0; $j < count($field); $j++) {
$field_aff[$j] = $opt[$field[$j]];
}
break;
case "marc_list":
$opt = new marc_list($this->fixedfields[$s[1]]["INPUT_OPTIONS"]["NAME"][0]["value"]);
for ($j = 0; $j < count($field); $j++) {
$field_aff[$j] = $opt->table[$field[$j]];
}
break;
case "date":
$field_aff[0] = format_date($field[0]);
break;
case "authoritie":
for ($j = 0; $j < sizeof($field); $j++) {
if (is_numeric($field[$j]) && ${$op} == "AUTHORITY") {
switch ($ff['INPUT_OPTIONS']['SELECTOR']) {
case "categorie":
$field[$j] = categories::getlibelle($field[$j], $lang);
break;
case "auteur":
$aut = new auteur($field[$j]);
if ($aut->rejete) {
$field[$j] = $aut->name . ', ' . $aut->rejete;
} else {
$field[$j] = $aut->name;
}
if ($aut->date) {
$field[$j] .= " ({$aut->date})";
}
break;
case "editeur":
$ed = new editeur($field[$j]);
$field[$j] = $ed->name;
if ($ed->ville) {
if ($ed->pays) {
$field[$j] .= " ({$ed->ville} - {$ed->pays})";
} else {
$field[$j] .= " ({$ed->ville})";
}
}
break;
case "collection":
$coll = new collection($field[$j]);
$field[$j] = $coll->name;
break;
case "subcollection":
$coll = new subcollection($field[$j]);
$field[$j] = $coll->name;
break;
case "serie":
示例2: getAuthorityLabel
function getAuthorityLabel($id, $type)
{
global $lang;
switch ($type) {
case "author":
$aut = new auteur($id);
if ($aut->rejete) {
$libelle = $aut->name . ', ' . $aut->rejete;
} else {
$libelle = $aut->name;
}
if ($aut->date) {
$libelle .= " ({$aut->author_date})";
}
break;
case "category":
$libelle = categories::getlibelle($id, $lang);
break;
case "publisher":
$ed = new publisher($id);
$libelle = $ed->name;
if ($ed->ville) {
if ($ed->pays) {
$libelle .= " ({$ed->ville} - {$ed->pays})";
} else {
$libelle .= " ({$ed->ville})";
}
}
break;
case "collection":
$coll = new collection($id);
$libelle = $coll->name;
break;
case "subcollection":
$coll = new subcollection($id);
$libelle = $coll->name;
break;
case "serie":
$serie = new serie($id);
$libelle = $serie->name;
break;
case "indexint":
$indexint = new indexint($id);
$libelle = $indexint->display;
break;
case "titre_uniforme":
$tu = new titre_uniforme($id);
$libelle = $tu->name;
break;
default:
$libelle = "";
break;
}
return $libelle;
}
示例3: get_human_field
protected function get_human_field($field, $values)
{
global $msg, $charset;
switch ($field["INPUT_TYPE"]) {
case "list":
$options = $field["INPUT_OPTIONS"]["OPTIONS"][0];
$opt = array();
for ($j = 0; $j < count($options["OPTION"]); $j++) {
if (substr($options["OPTION"][$j]["value"], 0, 4) == "msg:") {
$opt[$options["OPTION"][$j]["VALUE"]] = $msg[substr($options["OPTION"][$j]["value"], 4, strlen($options["OPTION"][$j]["value"]) - 4)];
} else {
$opt[$options["OPTION"][$j]["VALUE"]] = $options["OPTION"][$j]["value"];
}
}
for ($j = 0; $j < count($values); $j++) {
$field_aff[$j] = $opt[$values[$j]];
}
break;
case "query_list":
$requete = $field["INPUT_OPTIONS"]["QUERY"][0]["value"];
if ($field["FILTERING"] == "yes") {
$requete = str_replace("!!acces_j!!", "", $requete);
$requete = str_replace("!!statut_j!!", "", $requete);
$requete = str_replace("!!statut_r!!", "", $requete);
}
if ($field["INPUT_OPTIONS"]["QUERY"][0]["USE_GLOBAL"]) {
$use_global = explode(",", $field["INPUT_OPTIONS"]["QUERY"][0]["USE_GLOBAL"]);
for ($j = 0; $j < count($use_global); $j++) {
$var_global = $use_global[$j];
global ${$var_global};
$requete = str_replace("!!" . $var_global . "!!", ${$var_global}, $requete);
}
}
$resultat = pmb_mysql_query($requete);
$opt = array();
while ($r_ = @pmb_mysql_fetch_row($resultat)) {
$opt[$r_[0]] = $r_[1];
}
for ($j = 0; $j < count($values); $j++) {
$field_aff[$j] = $opt[$values[$j]];
}
break;
case "marc_list":
$opt = new marc_list($field["INPUT_OPTIONS"]["NAME"][0]["value"]);
for ($j = 0; $j < count($values); $j++) {
$field_aff[$j] = $opt->table[$values[$j]];
}
break;
case "date":
$field_aff[0] = format_date($values[0]);
break;
case "authoritie":
for ($j = 0; $j < sizeof($values); $j++) {
if (is_numeric($values[$j]) && ${$op} == "AUTHORITY") {
switch ($field['INPUT_OPTIONS']['SELECTOR']) {
case "categorie":
$thes = thesaurus::getByEltId($values[$j]);
$values[$j] = categories::getlibelle($values[$j], $lang) . " [" . $thes->libelle_thesaurus . "]";
if (isset($fieldvar["id_thesaurus"])) {
unset($fieldvar["id_thesaurus"]);
}
break;
case "auteur":
$aut = new auteur($values[$j]);
if ($aut->rejete) {
$values[$j] = $aut->name . ', ' . $aut->rejete;
} else {
$values[$j] = $aut->name;
}
if ($aut->date) {
$values[$j] .= " ({$aut->date})";
}
break;
case "editeur":
$ed = new editeur($values[$j]);
$values[$j] = $ed->name;
if ($ed->ville) {
if ($ed->pays) {
$values[$j] .= " ({$ed->ville} - {$ed->pays})";
} else {
$values[$j] .= " ({$ed->ville})";
}
}
break;
case "collection":
$coll = new collection($values[$j]);
$values[$j] = $coll->name;
break;
case "subcollection":
$coll = new subcollection($values[$j]);
$values[$j] = $coll->name;
break;
case "serie":
$serie = new serie($values[$j]);
$values[$j] = $serie->name;
break;
case "indexint":
$indexint = new indexint($values[$j]);
if ($indexint->comment) {
$values[$j] = $indexint->name . " - " . $indexint->comment;
//.........这里部分代码省略.........
示例4: make_serialized_human_query
//.........这里部分代码省略.........
}
break;
case "query_list":
$requete = $this->fixedfields[$s[1]]["INPUT_OPTIONS"]["QUERY"][0]["value"];
if ($ff["INPUT_FILTERING"] == "yes") {
$this->access_rights();
$requete = str_replace("!!acces_j!!", $this->tableau_access_rights["acces_j"], $requete);
$requete = str_replace("!!statut_j!!", $this->tableau_access_rights["statut_j"], $requete);
$requete = str_replace("!!statut_r!!", $this->tableau_access_rights["statut_r"], $requete);
}
$resultat = mysql_query($requete);
$opt = array();
while ($r_ = @mysql_fetch_row($resultat)) {
$opt[$r_[0]] = $r_[1];
}
for ($j = 0; $j < count($field); $j++) {
$field_aff[$j] = $opt[$field[$j]];
}
break;
case "marc_list":
$opt = new marc_list($this->fixedfields[$s[1]]["INPUT_OPTIONS"]["NAME"][0]["value"]);
for ($j = 0; $j < count($field); $j++) {
$field_aff[$j] = $opt->table[$field[$j]];
}
break;
case "date":
$field_aff[0] = format_date($field[0]);
break;
case "authoritie":
for ($j = 0; $j < sizeof($field); $j++) {
if (is_numeric($field[$j]) && ${$op} == "AUTHORITY") {
switch ($ff['INPUT_OPTIONS']['SELECTOR']) {
case "categorie":
$field[$j] = categories::getlibelle($field[$j], $lang);
break;
case "auteur":
$aut = new auteur($field[$j]);
if ($aut->rejete) {
$field[$j] = $aut->name . ', ' . $aut->rejete;
} else {
$field[$j] = $aut->name;
}
if ($aut->date) {
$field[$j] .= " ({$aut->date})";
}
break;
case "editeur":
$ed = new publisher($field[$j]);
$field[$j] = $ed->name;
if ($ed->ville) {
if ($ed->pays) {
$field[$j] .= " ({$ed->ville} - {$ed->pays})";
} else {
$field[$j] .= " ({$ed->ville})";
}
}
break;
case "collection":
$coll = new collection($field[$j]);
$field[$j] = $coll->name;
break;
case "subcollection":
$coll = new subcollection($field[$j]);
$field[$j] = $coll->name;
break;
case "serie":