• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP isISBN函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中isISBN函数的典型用法代码示例。如果您正苦于以下问题:PHP isISBN函数的具体用法?PHP isISBN怎么用?PHP isISBN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了isISBN函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: critere_isbn

function critere_isbn($val1)
{
    $val = $val1;
    if (isEAN($val1)) {
        // la saisie est un EAN -> on tente de le formater en ISBN
        $val1 = z_EANtoISBN($val1);
        // si échec, on prend l'EAN comme il vient
        if (!$val1) {
            $val1 = $val;
        }
    } else {
        if (isISBN($val1)) {
            // si la saisie est un ISBN
            $val1 = z_formatISBN($val1, 13);
            // si échec, ISBN erroné on le prend sous cette forme
            if (!$val1) {
                $val1 = $val;
            }
        } else {
            // ce n'est rien de tout ça, on prend la saisie telle quelle
            $val1 = $val;
        }
    }
    return $val1;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:25,代码来源:z_progression_cache.php


示例2: traite_val

function traite_val($value, $idf)
{
    switch ($idf) {
        case "22":
            if (isISBN($value)) {
                // si la saisie est un ISBN
                $code = formatISBN($value);
                // si échec, ISBN erroné on le prend sous cette forme
                if (!$code) {
                    $code = $value;
                }
            } else {
                $code = $value;
            }
            $ret = $code;
            break;
        default:
            $ret = $value;
            break;
    }
    return $ret;
}
开发者ID:bouchra012,项目名称:PMB,代码行数:22,代码来源:export_z3950_new.php


示例3: doContent


//.........这里部分代码省略.........
         $mention_resp_lib = $auteur->isbd_entry;
         if ($auteur_1["fonction"]) {
             $mention_resp_lib .= ", " . $fonction_auteur[$auteur_1["fonction"]];
         }
         $mention_resp[] = $mention_resp_lib;
     }
     $as = array_keys($this->responsabilites["responsabilites"], "2");
     for ($i = 0; $i < count($as); $i++) {
         $indice = $as[$i];
         $auteur_2 = $this->responsabilites["auteurs"][$indice];
         $auteur = new auteur($auteur_2["id"]);
         $mention_resp_lib = $auteur->isbd_entry;
         if ($auteur_2["fonction"]) {
             $mention_resp_lib .= ", " . $fonction_auteur[$auteur_2["fonction"]];
         }
         $mention_resp[] = $mention_resp_lib;
     }
     $libelle_mention_resp = implode("; ", $mention_resp);
     if ($libelle_mention_resp) {
         $this->isbd .= "&nbsp;/ {$libelle_mention_resp}";
     }
     // mention edition
     if ($this->notice->mention_edition) {
         $this->isbd .= ".&nbsp;-&nbsp;" . $this->notice->mention_edition;
     }
     // zone de l'adresse
     // on récupère la collection au passage, si besoin est
     if ($this->notice->subcoll_id) {
         $collection = new subcollection($this->notice->subcoll_id);
         $ed_obj = new editeur($collection->editeur);
         $editeurs .= $ed_obj->isbd_entry;
         $collections = $collection->isbd_entry;
     } elseif ($this->notice->coll_id) {
         $collection = new collection($this->notice->coll_id);
         $ed_obj = new editeur($collection->parent);
         $editeurs .= $ed_obj->isbd_entry;
         $collections = $collection->isbd_entry;
     } elseif ($this->notice->ed1_id) {
         $editeur = new editeur($this->notice->ed1_id);
         $editeurs .= $editeur->isbd_entry;
     }
     if ($this->notice->ed2_id) {
         $editeur = new editeur($this->notice->ed2_id);
         $ed_isbd = $editeur->isbd_entry;
         $editeurs ? $editeurs .= '&nbsp;; ' . $ed_isbd : ($editeurs = $ed_isbd);
     }
     if ($this->notice->year) {
         $editeurs ? $editeurs .= ', ' . $this->notice->year : ($editeurs = $this->notice->year);
     }
     if ($editeurs) {
         $this->isbd .= ".&nbsp;-&nbsp;{$editeurs}";
     }
     // zone de la collation
     if ($this->notice->npages) {
         $collation = $this->notice->npages;
     }
     if ($this->notice->ill) {
         $collation .= ': ' . $this->notice->ill;
     }
     if ($this->notice->size) {
         $collation .= '; ' . $this->notice->size;
     }
     if ($this->notice->accomp) {
         $collation .= '+ ' . $this->notice->accomp;
     }
     if ($collation) {
         $this->isbd .= ".&nbsp;-&nbsp;{$collation}";
     }
     if ($collections) {
         if ($this->notice->nocoll) {
             $collections .= '; ' . $this->notice->nocoll;
         }
         $this->isbd .= ".&nbsp;-&nbsp;({$collections})" . ' ';
     }
     if (substr(trim($this->isbd), -1) != ".") {
         $this->isbd .= '.';
     }
     // ISBN ou NO. commercial
     if ($this->notice->code) {
         if (isISBN($this->notice->code)) {
             $zoneNote = 'ISBN ';
         }
         $zoneNote .= $this->notice->code;
     }
     //prix code
     if ($this->notice->prix) {
         if ($this->notice->code) {
             $zoneNote .= '&nbsp;: ' . $this->notice->prix;
         } else {
             if ($zoneNote) {
                 $zoneNote .= '&nbsp; ' . $this->notice->prix;
             } else {
                 $zoneNote = $this->notice->prix;
             }
         }
     }
     if ($zoneNote) {
         $this->isbd .= "<br /><br />{$zoneNote}.";
     }
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:101,代码来源:sel_display.class.php


示例4: EANtoISBN

 $EAN = '';
 $isbn = '';
 $code = '';
 if (isEAN($ex_query)) {
     // la saisie est un EAN -> on tente de le formater en ISBN
     $EAN = $ex_query;
     $isbn = EANtoISBN($ex_query);
     // si échec, on prend l'EAN comme il vient
     if (!$isbn) {
         $code = str_replace("*", "%", $ex_query);
     } else {
         $code = $isbn;
         $code10 = formatISBN($code, 10);
     }
 } else {
     if (isISBN($ex_query)) {
         // si la saisie est un ISBN
         $isbn = formatISBN($ex_query);
         // si échec, ISBN erroné on le prend sous cette forme
         if (!$isbn) {
             $code = str_replace("*", "%", $ex_query);
         } else {
             $code10 = $isbn;
             $code = formatISBN($code10, 13);
         }
     } else {
         // ce n'est rien de tout ça, on prend la saisie telle quelle
         $code = str_replace("*", "%", $ex_query);
         // filtrer par typdoc_query si selectionné
         if ($typdoc_query) {
             $where_typedoc = " and typdoc='{$typdoc_query}' ";
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:visu_ex.inc.php


示例5: make_search


//.........这里部分代码省略.........
             //Pour chaque valeur du champ
             for ($j = 0; $j < count($field); $j++) {
                 //Pour chaque requete
                 $field_origine = $field[$j];
                 for ($z = 0; $z < count($q) - 1; $z++) {
                     //Pour chaque valeur du cha
                     //Si le nettoyage de la saisie est demande
                     if ($q[$z]["KEEP_EMPTYWORD"]) {
                         $field[$j] = strip_empty_chars($field_origine);
                     } elseif ($q[$z]["REGDIACRIT"]) {
                         $field[$j] = strip_empty_words($field_origine);
                     } elseif ($q[$z]["DETECTDATE"]) {
                         $field[$j] = detectFormatDate($field_origine, $q[$z]["DETECTDATE"]);
                     }
                     $main = $q[$z]["MAIN"];
                     //Si il y a plusieurs termes possibles on construit la requete avec le terme !!multiple_term!!
                     if ($q[$z]["MULTIPLE_WORDS"]) {
                         $terms = explode(" ", $field[$j]);
                         //Pour chaque terme,
                         $multiple_terms = array();
                         for ($k = 0; $k < count($terms); $k++) {
                             $multiple_terms[] = str_replace("!!p!!", $terms[$k], $q[$z]["MULTIPLE_TERM"]);
                         }
                         $final_term = implode(" " . $q[$z]["MULTIPLE_OPERATOR"] . " ", $multiple_terms);
                         $main = str_replace("!!multiple_term!!", $final_term, $main);
                         //Si la saisie est un ISBN
                     } else {
                         if ($q[$z]["ISBN"]) {
                             //Code brut
                             $terms[0] = $field[$j];
                             //EAN ?
                             if (isEAN($field[$j])) {
                                 //C'est un isbn ?
                                 if (isISBN($field[$j])) {
                                     $rawisbn = preg_replace('/-|\\.| /', '', $field[$j]);
                                     //On envoi tout ce qu'on sait faire en matiere d'ISBN, en raw et en formatte, en 10 et en 13
                                     $terms[1] = formatISBN($rawisbn, 10);
                                     $terms[2] = formatISBN($rawisbn, 13);
                                     $terms[3] = preg_replace('/-|\\.| /', '', $terms[1]);
                                     $terms[4] = preg_replace('/-|\\.| /', '', $terms[2]);
                                 }
                             } else {
                                 if (isISBN($field[$j])) {
                                     $rawisbn = preg_replace('/-|\\.| /', '', $field[$j]);
                                     //On envoi tout ce qu'on sait faire en matiere d'ISBN, en raw et en formatte, en 10 et en 13
                                     $terms[1] = formatISBN($rawisbn, 10);
                                     $terms[2] = formatISBN($rawisbn, 13);
                                     $terms[3] = preg_replace('/-|\\.| /', '', $terms[1]);
                                     $terms[4] = preg_replace('/-|\\.| /', '', $terms[2]);
                                 }
                             }
                             //Pour chaque terme,
                             $multiple_terms = array();
                             for ($k = 0; $k < count($terms); $k++) {
                                 $multiple_terms[] = str_replace("!!p!!", $terms[$k], $q[$z]["MULTIPLE_TERM"]);
                             }
                             $final_term = implode(" " . $q[$z]["MULTIPLE_OPERATOR"] . " ", $multiple_terms);
                             $main = str_replace("!!multiple_term!!", $final_term, $main);
                         } else {
                             if ($q[$z]["BOOLEAN"]) {
                                 if ($q[$z]['STEMMING']) {
                                     $stemming = $pmb_search_stemming_active;
                                 } else {
                                     $stemming = 0;
                                 }
                                 $aq = new analyse_query($field[$j], 0, 0, 1, 0, $stemming);
开发者ID:hogsim,项目名称:PMB,代码行数:67,代码来源:search.class.php


示例6: convert_ris

function convert_ris($notice, $s, $islast, $isfirst, $param_path)
{
    global $cols;
    global $ty;
    global $intitules;
    global $base_path, $origine;
    global $tab_functions;
    global $lot;
    global $charset;
    if (mb_detect_encoding($notice) == 'UTF-8' && $charset == "iso-8859-1") {
        $notice = utf8_decode($notice);
    }
    if (!$tab_functions) {
        $tab_functions = new marc_list('function');
    }
    $fields = explode("\n", $notice);
    $error = "";
    if ($fields) {
        $data = "<notice>\n";
    }
    $lignes = organize_line($fields);
    foreach ($lignes as $champ => $value) {
        switch ($champ) {
            case 'CT':
            case 'TI':
            case 'T1':
                //Titre principal
                $titre = $value;
                break;
            case 'T2':
                //Autre info sur titre
                $titre_other = $value;
                break;
            case 'PB':
                //Editeur
                $editeur_nom = $value;
                break;
            case 'CY':
                //Editeur
                $editeur_ville = $value;
                break;
            case 'AU':
                //Autres auteurs
                $autres_auteurs = $value;
                break;
            case 'A1':
                //Auteur principal
                $auteur_principal = $value;
                break;
            case 'A2':
                //Auteur secondaire
                $auteur_secondaire = $value;
                break;
            case 'SN':
                //ISBN/ISSN
                $code = trim($value);
                $pos = strpos($code, "(");
                if ($pos !== false) {
                    $code = substr($code, 0, $pos);
                }
                if (isISBN($code)) {
                    $infos_isbn = $code;
                } elseif (isISSN($code)) {
                    $infos_issn = $code;
                } else {
                    $error = "wrong ISBN/ISSN \n";
                }
                break;
            case 'UR':
                //URL
                $url = $value;
                break;
            case 'PY':
                //Date de publication (YYYY/MM/DD)
                $dates = explode("/", $value);
                if ($dates[0]) {
                    $year = $dates[0];
                }
                if ($dates[1]) {
                    $month = $dates[1];
                }
                if ($dates[2]) {
                    $day = $dates[2];
                }
                $publication_date = $year;
                if ($year && $month && $day) {
                    $date_sql = str_replace("/", "-", $value);
                    $mention_date = $value;
                } else {
                    if ($year && $month && !$day) {
                        $date_sql = $year . "-" . $month . "-01";
                        $mention_date = $year . "/" . $month;
                    } else {
                        if ($year && !$month && !$day) {
                            $date_sql = $year . "-01-01";
                            $mention_date = $year;
                        }
                    }
                }
                break;
//.........这里部分代码省略.........
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:ris2pmbxml.inc.php


示例7: print_resume


//.........这里部分代码省略.........
     } else {
         $print = str_replace("!!ed1!!", "", $print);
     }
     if ($this->ed2 != "") {
         $print = str_replace("!!ed2!!", "<b>{$msg['ed2_start']}</b>" . $this->ed2 . "<br />", $print);
     } else {
         $print = str_replace("!!ed2!!", "", $print);
     }
     if ($this->coll != "") {
         $print = str_replace("!!coll!!", "<b>{$msg['coll_start']}</b>" . $this->coll . "<br />", $print);
     } else {
         $print = str_replace("!!coll!!", "", $print);
     }
     if ($this->subcoll != "") {
         $print = str_replace("!!subcoll!!", "<b>{$msg['subcoll_start']}</b>" . $this->subcoll . "<br />", $print);
     } else {
         $print = str_replace("!!subcoll!!", "", $print);
     }
     if ($this->year != "") {
         $print = str_replace("!!year!!", "<b>{$msg['year_start']}</b>" . $this->year . "<br />", $print);
     } else {
         $print = str_replace("!!year!!", "", $print);
     }
     if ($this->nocoll != "") {
         $print = str_replace("!!nocoll!!", "<b>{$msg['nocoll_start']}</b>" . $this->nocoll . "<br />", $print);
     } else {
         $print = str_replace("!!nocoll!!", "", $print);
     }
     if ($this->code != "") {
         // Si c'est un livre, c'est magique alors on affiche l'image tirée de chez amazon europe.
         if ($this->typdoc == 'a' && $opac_show_book_pics == '1') {
             $code_chiffre = pmb_preg_replace('/-|\\.| /', '', $this->code);
             //if (@fopen("http://images-eu.amazon.com/images/P/".$code_chiffre.".08.MZZZZZZZ.jpg","r"))
             if (isISBN($this->code)) {
                 $print = str_replace("!!image_petit!!", "<img src='http://images-eu.amazon.com/images/P/" . $code_chiffre . ".08.MZZZZZZZ.jpg' align='right' hspace='4' vspace='2'>", $print);
             } else {
                 $print = str_replace("!!image_petit!!", "", $print);
             }
         } else {
             $print = str_replace("!!image_petit!!", "", $print);
         }
         $print = str_replace("!!code!!", "<b>{$msg['code_start']}</b>" . $this->code . "<br />", $print);
     } else {
         $print = str_replace("!!image_petit!!", "", $print);
         $print = str_replace("!!code!!", "", $print);
     }
     if ($this->npages != "") {
         $print = str_replace("!!npages!!", "<b>{$msg['npages_start']}</b>" . $this->npages . "<br />", $print);
     } else {
         $print = str_replace("!!npages!!", "", $print);
     }
     if ($this->ill != "") {
         $print = str_replace("!!ill!!", "<b>{$msg['ill_start']}</b>" . $this->ill . "<br />", $print);
     } else {
         $print = str_replace("!!ill!!", "", $print);
     }
     if ($this->size != "") {
         $print = str_replace("!!size!!", "<b>{$msg['size_start']}</b>" . $this->size . "<br />", $print);
     } else {
         $print = str_replace("!!size!!", "", $print);
     }
     if ($this->accomp != "") {
         $print = str_replace("!!accomp!!", "<b>{$msg['accomp_start']}</b>" . $this->accomp . "<br />", $print);
     } else {
         $print = str_replace("!!accomp!!", "", $print);
     }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:67,代码来源:notice.class.php


示例8: process_isbn

 function process_isbn($isbn)
 {
     /* We've got everything, let's have a look if ISBN already exists in notices table */
     $isbn_nettoye = preg_replace('/-|\\.| |\\(|\\)|\\[|\\]|\\:|\\;|[A-WY-Z]/i', '', $isbn);
     $isbn_nettoye_13 = substr($isbn_nettoye, 0, 13);
     $isbn_nettoye_10 = substr($isbn_nettoye, 0, 10);
     $isbn_OK = "";
     if (isEAN($isbn_nettoye_13)) {
         /* it's an EAN -> convert it to ISBN */
         $isbn_OK = EANtoISBN($isbn_nettoye_13);
     }
     if (!$isbn_OK) {
         if (isISBN($isbn_nettoye_10)) {
             $isbn_OK = formatISBN($isbn_nettoye_10);
         }
     }
     if (!$isbn_OK) {
         $isbn_OK = clean_string($isbn);
     }
     return $isbn_OK;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:21,代码来源:z3950_notice.class.php


示例9: die

    die("no access");
}
// les requis par display.inc.php
include "{$include_path}/marc_tables/{$pmb_indexation_lang}/empty_words";
include "{$class_path}/iso2709.class.php";
$rqsql = "select * from z_notices, z_bib where znotices_query_id ='{$last_query_id}' and bib_id=znotices_bib_id order by {$tri1}, {$tri2}";
$resultat3 = mysql_query($rqsql);
$test_resultat = 0;
$retour_affichage = "";
$i = 0;
while ($ligne3 = mysql_fetch_array($resultat3)) {
    $znotices_id = $ligne3["znotices_id"];
    $resultat_titre = $ligne3["titre"];
    $resultat_auteur = $ligne3["auteur"];
    $resultat_isbd = $ligne3["isbd"];
    if (isISBN($ligne3["isbn"])) {
        $resultat_isbn = formatISBN($ligne3["isbn"]);
    } else {
        $resultat_isbn = $ligne3["isbn"];
    }
    $resultat_bib_name = $ligne3["bib_nom"];
    $resultat_bib_format = $ligne3["format"];
    $test_resultat++;
    $lien = "<a ";
    if ($i == 0) {
        $lien .= " id='premierresultat' ";
    }
    $i++;
    $lien .= " href='./catalog.php?categ=z3950&action=import&id_notice={$id_notice}&znotices_id=" . $znotices_id . "&last_query_id=" . $last_query_id . "&tri1=" . $tri1 . "&tri2=" . $tri2 . "' >" . $resultat_titre . " / " . $resultat_auteur . "</a>";
    $retour_affichage .= zshow_isbd($resultat_isbd, $lien);
    $retour_affichage .= "<small><strong>( {$resultat_bib_name} / {$resultat_bib_format} )<br /></strong></small><br />";
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:display.inc.php


示例10: do_isbd

 function do_isbd($short = 0, $ex = 1)
 {
     global $dbh;
     global $msg;
     global $tdoc;
     global $charset;
     global $opac_notice_affichage_class;
     $this->notice_isbd = "";
     if ($this->notice_expired) {
         return $this->notice_isbd;
     }
     // constitution de la mention de titre
     if ($this->notice->serie_name) {
         $serie_temp .= inslink($this->notice->serie_name, str_replace("!!id!!", "es" . $this->notice->tparent_id, $this->lien_rech_serie));
         if ($this->notice->tnvol) {
             $serie_temp .= ',&nbsp;' . $this->notice->tnvol;
         }
     }
     if ($serie_temp) {
         $this->notice_isbd .= $serie_temp . ".&nbsp;" . $this->notice->tit1;
     } else {
         $this->notice_isbd .= $this->notice->tit1;
     }
     $this->notice_isbd .= ' [' . $tdoc->table[$this->notice->typdoc] . ']';
     if ($this->notice->tit3) {
         $this->notice_isbd .= "&nbsp;= " . $this->notice->tit3;
     }
     if ($this->notice->tit4) {
         $this->notice_isbd .= "&nbsp;: " . $this->notice->tit4;
     }
     if ($this->notice->tit2) {
         $this->notice_isbd .= "&nbsp;; " . $this->notice->tit2;
     }
     if ($this->auteurs_tous) {
         $this->notice_isbd .= " / " . $this->auteurs_tous;
     }
     // mention d'edition
     if ($this->notice->mention_edition) {
         $this->notice_isbd .= " &nbsp;. -&nbsp; " . $this->notice->mention_edition;
     }
     if ($this->notice->coll) {
         $collections = $this->notice->coll->titre . ($this->notice->coll->num ? ", " . $this->notice->coll->num : "");
     }
     if (is_array($this->publishers)) {
         for ($i = 0; $i < count($this->publishers); $i++) {
             $editeur[$i] = $this->publishers[$i]["name"] . ($this->publishers[$i]["city"] ? " (" . $this->publishers[$i]["city"] . ")" : "");
         }
         $editeurs = implode("&nbsp;: ", $editeur);
     }
     if ($this->notice->year) {
         $editeurs ? $editeurs .= ', ' . $this->notice->year : ($editeurs = $this->notice->year);
     } else {
         if ($this->notice->niveau_biblio == 'm' && $this->notice->niveau_hierar == 0) {
             $editeurs ? $editeurs .= ', [s.d.]' : ($editeurs = "[s.d.]");
         }
     }
     if ($editeurs) {
         $this->notice_isbd .= "&nbsp;.&nbsp;-&nbsp;{$editeurs}";
     }
     // zone de la collation
     if ($this->notice->npages) {
         $collation = $this->notice->npages;
     }
     if ($this->notice->ill) {
         $collation .= '&nbsp;: ' . $this->notice->ill;
     }
     if ($this->notice->size) {
         $collation .= '&nbsp;; ' . $this->notice->size;
     }
     if ($this->notice->accomp) {
         $collation .= '&nbsp;+ ' . $this->notice->accomp;
     }
     if ($collation) {
         $this->notice_isbd .= "&nbsp;.&nbsp;-&nbsp;{$collation}";
     }
     if ($collections) {
         $this->notice_isbd .= ".&nbsp;-&nbsp;({$collections})" . ' ';
     }
     $this->notice_isbd .= '.';
     // ISBN ou NO. commercial
     if ($this->notice->code) {
         if (isISBN($this->notice->code)) {
             $zoneISBN = '<b>ISBN</b>&nbsp;: ';
         } else {
             $zoneISBN .= '<b>' . $msg["issn"] . '</b>&nbsp;: ';
         }
         $zoneISBN .= $this->notice->code;
     }
     if ($this->notice->prix) {
         if ($this->notice->code) {
             $zoneISBN .= '&nbsp;: ' . $this->notice->prix;
         } else {
             if ($zoneISBN) {
                 $zoneISBN .= '&nbsp; ' . $this->notice->prix;
             } else {
                 $zoneISBN = $this->notice->prix;
             }
         }
     }
     if ($zoneISBN) {
//.........这里部分代码省略.........
开发者ID:bouchra012,项目名称:PMB,代码行数:101,代码来源:notice_affichage_unimarc.class.php


示例11: convert_medline

function convert_medline($notice, $s, $islast, $isfirst, $param_path)
{
    global $cols;
    global $ty;
    global $intitules;
    global $base_path, $origine;
    global $tab_functions;
    global $lot;
    global $charset;
    if (!$tab_functions) {
        $tab_functions = new marc_list('function');
    }
    $fields = explode("\n", $notice);
    $error = "";
    if ($fields) {
        $data = "<notice>\n";
    }
    $lignes = organize_line($fields);
    foreach ($lignes as $champ => $value) {
        switch ($champ) {
            case 'TI':
                //Titre principal
                $titre = $value;
                break;
            case 'PL':
                //Editeur
                $editeur = $value;
                break;
            case 'AU':
                //Auteur principal
                $auteur = explode(", ", $value);
                break;
            case 'IS':
                //ISBN/ISSN
                $code = $value;
                $pos = strpos($code, "(");
                $endcode = substr($code, $pos);
                $code = trim(substr($code, 0, $pos));
                if (isISBN($code)) {
                    $infos_isbn = $code . " " . $endcode;
                } elseif (isISSN($code)) {
                    $infos_issn = $code . " " . $endcode;
                } else {
                    $error = "wrong ISBN/ISSN \n";
                }
                break;
            case 'DP':
                //Date de publication
                $date = $value;
                if ($date) {
                    $date_elt = explode(' ', $date);
                    if ($date_elt[0]) {
                        $year = $date_elt[0];
                    }
                    if ($date_elt[2]) {
                        $day = $date_elt[2];
                    }
                    if ($date_elt[1]) {
                        $mois = $date_elt[1];
                        switch ($mois) {
                            case 'Jan':
                                $month = "01";
                                break;
                            case 'Feb':
                                $month = "02";
                                break;
                            case 'Mar':
                                $month = "03";
                                break;
                            case 'Apr':
                                $month = "04";
                                break;
                            case 'May':
                                $month = "05";
                                break;
                            case 'Jun':
                                $month = "06";
                                break;
                            case 'Jul':
                                $month = "07";
                                break;
                            case 'Aug':
                                $month = "08";
                                break;
                            case 'Sep':
                                $month = "09";
                                break;
                            case 'Oct':
                                $month = "10";
                                break;
                            case 'Nov':
                                $month = "11";
                                break;
                            case 'Dec':
                                $month = "12";
                                break;
                        }
                    }
                    if ($year && $month && $day) {
                        $date_sql = $year . "-" . $month . "-" . $day;
//.........这里部分代码省略.........
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:medline2pmbxml.inc.php


示例12: pmb_bidi

     $format = $ligne_format["format"];
 }
 $resultat_titre = $ligne["titre"];
 $resultat_auteur = $ligne["auteur"];
 $resultat_isbd = $ligne["isbd"];
 $test_resultat++;
 $lien = $resultat_titre . " / " . $resultat_auteur;
 print pmb_bidi(zshow_isbd($resultat_isbd, $lien));
 if ($action != "integrerexpl") {
     if ($source == 'form') {
         $notice = new z3950_notice('form');
     } else {
         // avant affichage du formulaire : détecter si notice déjà présente pour proposer MAJ
         $isbn_verif = traite_code_isbn($ligne['isbn']);
         $suite_rqt = "";
         if (isISBN($isbn_verif)) {
             if (strlen($isbn_verif) == 13) {
                 $suite_rqt = " or code='" . formatISBN($isbn_verif, 13) . "' ";
             } else {
                 $suite_rqt = "or code='" . formatISBN($isbn_verif, 10) . "' ";
             }
         }
         if ($isbn_verif) {
             $requete = "SELECT notice_id FROM notices WHERE code='{$isbn_verif}' " . $suite_rqt;
             $myQuery = mysql_query($requete, $dbh);
             $temp_nb_notice = mysql_num_rows($myQuery);
             if ($temp_nb_notice) {
                 $not_id = mysql_result($myQuery, 0, 0);
             } else {
                 $not_id = 0;
             }
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:import.inc.php


示例13: EANtoISBN

 $EAN = '';
 $isbn = '';
 $code = '';
 if (isEAN($ref)) {
     // la saisie est un EAN -> on tente de le formater en ISBN
     $EAN = $ref;
     $isbn = EANtoISBN($ref);
     // si échec, on prend l'EAN comme il vient
     if (!$isbn) {
         $code = str_replace("*", "%", $ref);
     } else {
         $code = $isbn;
         $code10 = formatISBN($code, 10);
     }
 } else {
     if (isISBN($ref)) {
         // si la saisie est un ISBN
         $isbn = formatISBN($ref);
         // si échec, ISBN erroné on le prend sous cette forme
         if (!$isbn) {
             $code = str_replace("*", "%", $ref);
         } else {
             $code10 = $isbn;
             $code = formatISBN($code10, 13);
         }
     } else {
         // ce n'est rien de tout ça, on prend la saisie telle quelle
         $code = str_replace("*", "%", $ref);
     }
 }
 if ($EAN && $isbn) {
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:notice_display.inc.php


示例14: getAutomaticTu

 static function getAutomaticTu($notice)
 {
     global $dbh, $charset, $opac_enrichment_bnf_sparql;
     if (!$opac_enrichment_bnf_sparql) {
         return 0;
     }
     $requete = "select code, responsability_author from notices left join responsability on (responsability_notice={$notice} and responsability_type=0)\n\t\t\tleft join notices_titres_uniformes on notice_id=ntu_num_notice where notice_id={$notice} and ntu_num_notice is null";
     $resultat = pmb_mysql_query($requete, $dbh);
     if (pmb_mysql_num_rows($resultat, $dbh)) {
         $code = pmb_mysql_result($resultat, 0, 0, $dbh);
         $id_author = pmb_mysql_result($resultat, 0, 1, $dbh);
     } else {
         $code = "";
     }
     $id_tu = 0;
     if (isISBN($code)) {
         $uri = titre_uniforme::get_data_bnf_uri($code);
         if ($uri) {
             //Recherche du titre uniforme déjà existant ?
             $requete = "select tu_id from titres_uniformes where tu_databnf_uri='" . addslashes($uri) . "'";
             $resultat = pmb_mysql_query($requete, $dbh);
             if (pmb_mysql_num_rows($resultat, $dbh)) {
                 $id_tu = pmb_mysql_result($resultat, 0, 0, $dbh);
             } else {
                 //Interrogation de data.bnf pour obtenir les infos !
                 $configbnf = array('remote_store_endpoint' => 'http://data.bnf.fr/sparql');
                 $storebnf = ARC2::getRemoteStore($configbnf);
                 $sparql = "\n\t\t\t\t\t\tPREFIX dc: <http://purl.org/dc/terms/>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tSELECT ?title ?date ?description WHERE {\n\t\t\t\t\t\t  <" . $uri . "> dc:title ?title.\n\t\t\t\t\t\t  OPTIONAL { <" . $uri . "> dc:date ?date. }\n\t\t\t\t\t\t  OPTIONAL { <" . $uri . "> dc:description ?description. }\n\t\t\t\t\t\t}";
                 $rows = $storebnf->query($sparql, 'rows');
                 // On vérifie qu'il n'y a pas d'erreur sinon on stoppe le programme et on renvoi une chaine vide
                 $err = $storebnf->getErrors();
                 if (!$err) {
                     $value = array("name" => encoding_normalize::charset_normalize($rows[0]['title'], "utf-8"), "num_author" => $id_author, "date" => encoding_normalize::charset_normalize($rows[0]['date'], "utf-8"), "comment" => encoding_normalize::charset_normalize($rows[0]['description'], "utf-8"), "databnf_uri" => $uri);
                     $id_tu = titre_uniforme::import($value);
                 }
             }
         }
     }
     if ($id_tu) {
         $titres_uniformes = array(array("num_tu" => $id_tu));
         $ntu = new tu_notice($notice);
         $ntu->update($titres_uniformes);
     }
     return $id_tu;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:45,代码来源:notice.class.php


示例15: do_isbd


//.........这里部分代码省略.........
     } else {
         $editeurs ? $editeurs .= ', [s.d.]' : ($editeurs = "[s.d.]");
     }
     $this->isbd .= ".&nbsp;-&nbsp;{$editeurs}";
     // zone de la collation (ne concerne que a2)
     if ($this->notice->npages) {
         $collation = $this->notice->npages;
     }
     if ($this->notice->ill) {
         $collation .= ': ' . $this->notice->ill;
     }
     if ($this->notice->size) {
         $collation .= '; ' . $this->notice->size;
     }
     if ($this->notice->accomp) {
         $collation .= '+ ' . $this->notice->accomp;
     }
     if ($collation) {
         $this->isbd .= ".&nbsp;-&nbsp;{$collation}";
     }
     if ($collections) {
         if ($this->notice->nocoll) {
             $collections .= '; ' . $this->notice->nocoll;
         }
         $this->isbd .= ".&nbsp;-&nbsp;({$collections})" . ' ';
     }
     $this->isbd .= '.';
     // note générale
     if ($this->notice->n_gen) {
         $zoneNote = nl2br(htmlentities($this->notice->n_gen, ENT_QUOTES, $charset)) . ' ';
     }
     // ISBN ou NO. commercial
     if ($this->notice->code) {
         if (isISBN($this->notice->code)) {
             if ($zoneNote) {
                 $zoneNote .= '.&nbsp;-&nbsp;ISBN ';
             } else {
                 $zoneNote = 'ISBN ';
             }
         } else {
             if ($zoneNote) {
                 $zoneNote .= '.&nbsp;-&nbsp;';
             }
         }
         $zoneNote .= $this->notice->code;
     }
     if ($this->notice->prix) {
         if ($this->notice->code) {
             $zoneNote .= '&nbsp;: ' . $this->notice->prix;
         } else {
             if ($zoneNote) {
                 $zoneNote .= '&nbsp; ' . $this->notice->prix;
             } else {
                 $zoneNote = $this->notice->prix;
             }
         }
     }
     if ($zoneNote) {
         $this->isbd .= "<br /><br />{$zoneNote}.";
     }
     if ($pmb_show_notice_id || $pmb_show_permalink) {
         $this->isbd .= "<br />";
     }
     if ($pmb_show_notice_id) {
         $prefixe = explode(",", $pmb_show_notice_id);
         $this->isbd .= "<b>" . $msg['notice_id_libelle'] . "&nbsp;</b>" . ($prefixe[1] ? $prefixe[1] : '') . $this->notice_id . "<br />";
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:67,代码来源:mono_display_unimarc.class.php


示例16: str_replace

         if (!$isbn) {
             $code = str_replace("*", "%", $ex_query);
         } else {
             $code10 = $isbn;
             $code = formatISBN($code10, 13);
         }
     } else {
         // ce n'est rien de tout ça, on prend la saisie telle quelle
         $code = str_replace("*", "%", $ex_query);
     }
 }
 $isbn_OK = $code;
 $new_notice = 0;
 $notice_id = 0;
 // le paramétrage est-il : dédoublonnage sur code ? / Ne dédoublonner que sur code ISBN (ignorer les ISSN) ?
 if ($isbn_dedoublonnage && !$isbn_only || $isbn_dedoublonnage && $isbn_only && isISBN($isbn)) {
     $trouvees = 0;
     if ($EAN && $isbn) {
         // cas des EAN purs : constitution de la requête
         $requete = "SELECT distinct notice_id FROM notices ";
         $requete .= " WHERE notices.code in ('{$code}','{$EAN}'" . ($code10 ? ",'{$code10}'" : "") . ") limit 1";
         $myQuery = pmb_mysql_query($requete, $dbh);
         $trouvees = pmb_mysql_num_rows($myQuery);
     } elseif ($isbn) {
         // recherche d'un isbn
         $requete = "SELECT distinct notice_id FROM notices ";
         $requete .= " WHERE notices.code in ('{$code}'" . ($code10 ? ",'{$code10}'" : "") . ") limit 1";
         $myQuery = pmb_mysql_query($requete, $dbh);
         $trouvees = pmb_mysql_num_rows($myQuery);
     } elseif ($code) {
         // note : le code est recherché dans le champ code des notices
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:iimport_expl.php


示例17: EANtoISBN

if (!$objet_appelant) {
    $objet_appelant = "f_cb";
}
// traitement de la soumission
if ($suite) {
    // un CB a été soumis
    if ($cb) {
        if (isEAN($cb)) {
            // la saisie est un EAN -> on tente de le formater en ISBN
            $code = EANtoISBN($cb);
            // si échec, on prend l'EAN comme il vient
            if (!$code) {
                $code = $cb;
            }
        } else {
            if (isISBN($cb)) {
                // si la saisie est un ISBN
                $code = formatISBN($cb, 13);
                // si échec, ISBN erroné on le prend sous cette forme
                if (!$code) {
                    $code = $cb;
                }
            } else {
                // ce n'est rien de tout ça, on prend la saisie telle quelle
                $code = $cb;
            }
        }
        $code_temp = $code;
    }
    if ($code_temp) {
        if ($bulletin) {
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:setcb.php


示例18: show_results

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP isId函数代码示例发布时间:2022-05-15
下一篇:
PHP isID函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap