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

PHP pmb_substr函数代码示例

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

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



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

示例1: limitstring

 public static function limitstring($string, $max = 50, $ends = "[...]")
 {
     if (pmb_strlen($string) > $max) {
         $string = pmb_substr($string, 0, $max - pmb_strlen($ends)) . $ends;
     }
     return $string;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:7,代码来源:pmb_h2o.inc.php


示例2: prefill_cote

function prefill_cote($id_notice = 0, $cote = "")
{
    global $dbh;
    global $deflt_docs_location;
    global $value_prefix_cote;
    $res_dewey = '';
    $res_author = '';
    $res_title = '';
    $res_nvol = '';
    $res_cote = '';
    if (!$cote) {
        // fetch the dewey code
        $requete = "SELECT indexint_name FROM indexint, notices where notice_id='{$id_notice}' and indexint=indexint_id ";
        $result = @pmb_mysql_query($requete, $dbh);
        $nbr_lignes = pmb_mysql_num_rows($result);
        if ($nbr_lignes) {
            $res = pmb_mysql_fetch_object($result);
            $res_dewey = $res->indexint_name;
        }
        // fetch the title and the volume number
        $requete = "SELECT index_sew, tnvol FROM notices WHERE notice_id= '{$id_notice}' ";
        $result = @pmb_mysql_query($requete, $dbh);
        $res = pmb_mysql_fetch_object($result);
        $res_title = pmb_strtoupper(pmb_str_replace(" ", "", $res->index_sew));
        $res_nvol = $res->tnvol;
        // récupération du libellé de la localisation par défaut du catalogueur
        // si la localisation a dans son libellé ou son codage d'import ENSAI, on récupèrera 4 lettres pour l'auteur, dans les autres cas, on récupèrera 3 lettres
        $requete = "SELECT location_libelle, locdoc_codage_import FROM docs_location WHERE idlocation= '" . $deflt_docs_location . "' ";
        $result = @pmb_mysql_query($requete, $dbh);
        $res = pmb_mysql_fetch_object($result);
        if (preg_match("#ENSAI#", $res->location_libelle) || preg_match("#ENSAI#", $res->locdoc_codage_import)) {
            $nb_car_auteur_cote = 4;
        } else {
            $nb_car_auteur_cote = 3;
        }
        // fetch the first author, but only if his responsability_type is 0
        $requete = "SELECT index_author, responsability_type FROM authors, responsability WHERE author_id=responsability_author and responsability_notice = '{$id_notice}' ORDER BY responsability_type, responsability_ordre LIMIT 1";
        $result = @pmb_mysql_query($requete, $dbh);
        $nbr_lignes = pmb_mysql_num_rows($result);
        // build the code using also the author name
        if ($nbr_lignes) {
            $res = pmb_mysql_fetch_object($result);
            $res_author = pmb_strtoupper(pmb_substr(pmb_str_replace(" ", "", $res->index_author), 0, $nb_car_auteur_cote));
            $res_cote = $res_dewey . " " . $res_author;
        } else {
            // no author at responsability_type 0 so build the code using only the title
            $res_title = pmb_substr($res_title, 0, $nb_car_auteur_cote);
            $res_cote = $res_dewey . " " . $res_title . " " . $res_nvol;
        }
        return $value_prefix_cote . $res_cote;
    } else {
        return $cote;
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:54,代码来源:custom_cote_genes.inc.php


示例3: prefill_cote

function prefill_cote($id_notice = 0, $cote = "")
{
    global $dbh;
    global $value_prefix_cote;
    $res_dewey = '';
    $res_author = '';
    $res_title = '';
    $res_nvol = '';
    $res_cote = '';
    if (!$cote) {
        // fetch the dewey code
        $requete = "SELECT indexint_name FROM indexint, notices where notice_id='{$id_notice}' and indexint=indexint_id ";
        $result = @mysql_query($requete, $dbh);
        $nbr_lignes = mysql_num_rows($result);
        if ($nbr_lignes) {
            $res = mysql_fetch_object($result);
            $res_dewey = $res->indexint_name;
        }
        // fetch the title and the volume number
        $requete = "SELECT index_sew, tnvol FROM notices WHERE notice_id= '{$id_notice}' ";
        $result = @mysql_query($requete, $dbh);
        $res = mysql_fetch_object($result);
        $res_title = pmb_strtoupper(pmb_str_replace(" ", "", $res->index_sew));
        $res_nvol = $res->tnvol;
        // fetch the editor
        $requete = "SELECT ed_name, index_publisher FROM publishers, notices WHERE ed1_id=ed_id and notice_id = '{$id_notice}'";
        $result = @mysql_query($requete, $dbh);
        $nbr_lignes = mysql_num_rows($result);
        // build the code using also the author name
        if ($nbr_lignes) {
            $res = mysql_fetch_object($result);
            if (strpos($res->ed_name, '(') > 0) {
                $res_editor = substr(stristr($res->ed_name, '('), 1, 4);
            } else {
                $res_editor = strtoupper(substr($res->ed_name, 0, 4));
            }
            $res_title = pmb_substr($res_title, 0, 3);
            $res_cote = $res_dewey . " " . $res_editor;
        } else {
            // no author at responsability_type 0 so build the code using only the title
            $res_title = pmb_substr($res_title, 0, 4);
            $res_cote = $res_dewey . " " . $res_title . " " . $res_nvol;
        }
        return $value_prefix_cote . $res_cote;
    } else {
        return $cote;
    }
}
开发者ID:bouchra012,项目名称:PMB,代码行数:48,代码来源:custom_cote_pnrp.inc.php


示例4: show_procs

function show_procs($dbh)
{
    global $msg;
    global $charset;
    global $PMBuserid, $javascript_path, $form_notice_tpl;
    print "\n\t\t<script type=\"text/javascript\" src=\"" . $javascript_path . "/tablist.js\"></script>\n\t\t<a href=\"javascript:expandAll()\"><img src='./images/expand_all.gif' border='0' id=\"expandall\"></a>\n\t\t<a href=\"javascript:collapseAll()\"><img src='./images/collapse_all.gif' border='0' id=\"collapseall\"></a>\n\t\t";
    // affichage du tableau des procédures
    $requete = "SELECT idproc, name, requete, comment, autorisations, libproc_classement, num_classement FROM procs left join procs_classements on idproc_classement=num_classement ORDER BY libproc_classement,name ";
    $res = mysql_query($requete, $dbh);
    $nbr = mysql_num_rows($res);
    $class_prec = $msg[proc_clas_aucun];
    $buf_tit = "";
    $buf_class = 0;
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = mysql_fetch_row($res);
        $rqt_autorisation = explode(" ", $row[4]);
        if (($PMBuserid == 1 || array_search($PMBuserid, $rqt_autorisation) !== FALSE) && pmb_strtolower(pmb_substr(trim($row[2]), 0, 6)) == 'select') {
            $classement = $row[5];
            if ($class_prec != $classement) {
                if (!$row[5]) {
                    $row[5] = $msg[proc_clas_aucun];
                }
                if ($buf_tit) {
                    $buf_contenu = "<table><tr><th colspan=4>" . $buf_tit . "</th></tr>" . $buf_contenu . "</table>";
                    print gen_plus("procclass" . $buf_class, $buf_tit, $buf_contenu);
                    $buf_contenu = "";
                }
                $buf_tit = $row[5];
                $buf_class = $row[6];
                $class_prec = $classement;
            }
            if ($parity % 2) {
                $pair_impair = "even";
            } else {
                $pair_impair = "odd";
            }
            $parity++;
            $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./edit.php?categ=procs&sub=&action=execute&id_proc={$row['0']}';\" ";
            $buf_contenu .= "\n<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'>\n\t\t\t\t\t<td><strong>{$row['1']}</strong><br />\n\t\t\t\t\t\t<small>{$row['3']}</small></td>\n\t\t\t\t</tr>";
        }
    }
    $buf_contenu = "<table><tr><th colspan=4>" . $buf_tit . "</th></tr>" . $buf_contenu . "</table>";
    print gen_plus("procclass" . $buf_class, $buf_tit, $buf_contenu);
}
开发者ID:bouchra012,项目名称:PMB,代码行数:45,代码来源:procs.inc.php


示例5: prefill_cote

function prefill_cote($id_notice = 0, $cote = "")
{
    global $dbh;
    global $value_prefix_cote;
    $res_dewey = '';
    $res_author = '';
    $res_title = '';
    $res_nvol = '';
    $res_cote = '';
    if (!$cote) {
        // fetch the dewey code
        $requete = "SELECT indexint_name FROM indexint, notices where notice_id='{$id_notice}' and indexint=indexint_id ";
        $result = @mysql_query($requete, $dbh);
        $nbr_lignes = mysql_num_rows($result);
        if ($nbr_lignes) {
            $res = mysql_fetch_object($result);
            $res_dewey = $res->indexint_name;
        }
        // fetch the title and the volume number
        $requete = "SELECT index_sew, tnvol FROM notices WHERE notice_id= '{$id_notice}' ";
        $result = @mysql_query($requete, $dbh);
        $res = mysql_fetch_object($result);
        $res_title = pmb_strtoupper(pmb_str_replace(" ", "", $res->index_sew));
        $res_nvol = $res->tnvol;
        // fetch the first author, but only if his responsability_type is 0
        $requete = "SELECT index_author, responsability_type FROM authors, responsability WHERE author_id=responsability_author and responsability_notice = '{$id_notice}' and responsability_type = '0' LIMIT 1";
        $result = @mysql_query($requete, $dbh);
        $nbr_lignes = mysql_num_rows($result);
        // build the code using also the author name
        if ($nbr_lignes) {
            $res = mysql_fetch_object($result);
            $res_author = pmb_strtoupper(pmb_substr(pmb_str_replace(" ", "", $res->index_author), 0, 3));
            $res_title = pmb_substr($res_title, 0, 3);
            $res_cote = $res_dewey . " " . $res_author . "-" . $res_title . " " . $res_nvol;
        } else {
            // no author at responsability_type 0 so build the code using only the title
            $res_title = pmb_substr($res_title, 0, 7);
            $res_cote = $res_dewey . " " . $res_title . " " . $res_nvol;
        }
        return $value_prefix_cote . $res_cote;
    } else {
        return $cote;
    }
}
开发者ID:bouchra012,项目名称:PMB,代码行数:44,代码来源:custom_cote_01.inc.php


示例6: recurse_analyse


//.........这里部分代码省略.........
                 $c = pmb_getcar($this->current_car, $this->input);
                 $this->current_car++;
                 //Si parentèse fermante et sous expression en cours d'analyse => fin d'analyse de la sous expression
                 if ($c == ")" && $this->parenthesis) {
                     $end = true;
                     //Enregistrement du dernier terme
                     if (is_array($this->term)) {
                         $t = new term("", $this->literal, $this->neg, $this->start_with, $this->operator, $this->term);
                     } else {
                         $t = new term($this->term, $this->literal, $this->neg, $this->start_with, $this->operator, null);
                     }
                     $this->store_in_tree($t, $this->search_linked_words);
                     break;
                 }
                 //Sinon, si ce n'est pas un espace, alors erreur (ce n'est pas le séparateur attendu)
                 if ($c != " " && $c != "+" && ($c != "-" && $cprec != " ")) {
                     $end = true;
                     $this->error_message = $msg["aq_missing_space"];
                     $this->error = 1;
                     break;
                 }
                 //Si tout va bien, on attend le prochain terme
                 if ($c != " ") {
                     $this->current_car--;
                 }
                 $s = "space_wait";
                 break;
                 //Attente du prochain terme : on saute tous les espaces avant de renvoyer à la lecture du nouveau terme !
             //Attente du prochain terme : on saute tous les espaces avant de renvoyer à la lecture du nouveau terme !
             case "space_wait":
                 if ($this->current_car > pmb_strlen($this->input) - 1) {
                     //Si prentèse ouverte et fin de la chaine => erreur
                     if ($this->parenthesis) {
                         $end = true;
                         $this->error_message = $msg["aq_missing_p"];
                         $this->error = 1;
                         break;
                     }
                     //Sinon, si fin de la chaine, enregistrement du terme précédent et fin d'analyse
                     if (is_array($this->term)) {
                         $t = new term("", $this->literal, $this->neg, $this->start_with, $this->operator, $this->term);
                     } else {
                         $t = new term($this->term, $this->literal, $this->neg, $this->start_with, $this->operator, null);
                     }
                     $this->store_in_tree($t, $this->search_linked_words);
                     $end = true;
                     break;
                 }
                 //Lecture du caractère suivant
                 $c = pmb_getcar($this->current_car, $this->input);
                 $this->current_car++;
                 //Si ) et sous expression en cours d'analyse, fin de l'analyse de la sous expression
                 if ($c == ")" && $this->parenthesis == 1) {
                     //Enregistrement du terme et fin d'analyse
                     if (is_array($this->term)) {
                         $t = new term("", $this->literal, $this->neg, $this->start_with, $this->operator, $this->term);
                     } else {
                         $t = new term($this->term, $this->literal, $this->neg, $this->start_with, $this->operator, null);
                     }
                     $this->store_in_tree($t, $this->search_linked_words);
                     $end = true;
                     break;
                 }
                 //Si le caractère n'est pas un espace, alors c'est le début du prochain terme
                 if ($c != " ") {
                     $this->current_car--;
                     //Enregistrement du dernier terme
                     if (is_array($this->term)) {
                         $t = new term("", $this->literal, $this->neg, $this->start_with, $this->operator, $this->term);
                     } else {
                         $t = new term($this->term, $this->literal, $this->neg, $this->start_with, $this->operator, null);
                     }
                     $this->store_in_tree($t, $this->search_linked_words);
                     //Remise à zéro des indicateurs
                     $this->operator = "";
                     $this->term = "";
                     $this->neg = 0;
                     $this->literal = 0;
                     $this->start_with = 0;
                     //Passage à nouveau terme
                     $s = "new_word";
                     break;
                 }
                 //Sinon on reste en attente
                 break;
         }
     }
     if ($this->error) {
         $this->input_html = pmb_substr($this->input, 0, $this->current_car - 1) . "!!red!!" . pmb_substr($this->input, $this->current_car - 1, 1) . "!!s_red!!" . pmb_substr($this->input, $this->current_car);
     } else {
         $this->input_html = $this->input;
     }
     if (!$this->error && !count($this->tree)) {
         $this->error = 1;
         $this->error_message = $msg["aq_no_term"];
     }
     $this->input_html = htmlentities($this->input_html, ENT_QUOTES, $charset);
     $this->input_html = str_replace("!!red!!", "<font color='#DD0000'><b><u>", $this->input_html);
     $this->input_html = str_replace("!!s_red!!", "</u></b></font>", $this->input_html);
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:101,代码来源:analyse_query.class.php


示例7: get_onglet

 function get_onglet($onglet_sel = '1_1')
 {
     global $dbh, $msg, $charset, $base_path;
     global $a2z_perio_display, $onglet_a2z, $a2z_perio, $a2z_tpl_ajax;
     global $filtre_select;
     $myArray = explode("_", $onglet_sel);
     $onglet_sel = $myArray[0];
     $ongletSub_sel = $myArray[1];
     $form = $a2z_tpl_ajax;
     $form_list = "";
     if (count($this->onglets_sub_contens[$onglet_sel])) {
         foreach ($this->onglets_sub_contens[$onglet_sel] as $onglet_num => $onglet) {
             if ($onglet_num == $ongletSub_sel) {
                 // onglet actif
                 $line = str_replace('!!onglet_class!!', "isbd_public_active", $line);
                 // liste des périodiques
                 $perio_list = "";
                 $view = 0;
                 $perio_id_list = "";
                 if (is_array($onglet["id"])) {
                     //tri de la liste par titre
                     $serials_ids = implode(",", $onglet["id"]);
                     foreach ($onglet["id"] as $id_brute) {
                         if (pmb_substr($id_brute, 0, 2) == "es") {
                             //notice externe
                             if ($filtre_select != 2) {
                                 // si cataloguée, on ne l'affiche pas. sauf si on filtre par fonds externe ($filtre_select!=2)
                                 if ($this->get_doublon_ex($this->extract_external_id($id_brute))) {
                                     continue;
                                 }
                             }
                             $requete = "SELECT source_id FROM external_count WHERE rid=" . addslashes($this->extract_external_id($id_brute));
                             $myQuery = pmb_mysql_query($requete, $dbh);
                             $source_id = pmb_mysql_result($myQuery, 0, 0);
                             $query = "select ufield,value from entrepot_source_{$source_id} where recid='" . addslashes($this->extract_external_id($id_brute)) . "' and ((ufield='200' and usubfield='a') or (ufield='461' and usubfield='t') or (ufield='bl') or (ufield='hl')) ";
                             $result = pmb_mysql_query($query, $dbh);
                             if ($result) {
                                 while ($row = pmb_mysql_fetch_object($result)) {
                                     $infos[$row->ufield] = $row->value;
                                 }
                                 switch ($infos['bl'] . $infos['hl']) {
                                     case "a2":
                                     case "s2":
                                         $tit1 = $infos['461'];
                                         break;
                                     default:
                                         $tit1 = $infos['200'];
                                         break;
                                 }
                                 $perio = $a2z_perio;
                                 $perio = str_replace('!!id!!', $id_brute, $perio);
                                 $perio = str_replace('!!perio_title!!', $tit1, $perio);
                                 $perio = str_replace('!!abt_actif!!', $this->get_external_icon($id_brute), $perio);
                                 $perio_list .= $perio;
                                 if (!$view) {
                                     $view++;
                                     $form = str_replace('!!perio_display!!', $this->get_perio($id_brute), $form);
                                 }
                             }
                         } else {
                             $query = "select notice_id,tit1 from notices where notice_id ={$id_brute}";
                             //print $query."<br>";
                             $result = pmb_mysql_query($query, $dbh);
                             if ($result) {
                                 if ($notice = pmb_mysql_fetch_object($result)) {
                                     $perio = $a2z_perio;
                                     $perio = str_replace('!!id!!', $notice->notice_id, $perio);
                                     $perio = str_replace('!!perio_title!!', $notice->tit1, $perio);
                                     $req = "select abt_id from abts_abts  where num_notice=" . $notice->notice_id . " and date_fin >= CURDATE() ";
                                     $res = pmb_mysql_query($req);
                                     if (pmb_mysql_num_rows($res)) {
                                         $perio = str_replace('!!abt_actif!!', "<img src='" . get_url_icon('check.png') . "'>", $perio);
                                     } else {
                                         $perio = str_replace('!!abt_actif!!', "", $perio);
                                     }
                                     $perio_list .= $perio;
                                     if (!$view) {
                                         $view++;
                                         $form = str_replace('!!perio_display!!', $this->get_perio($notice->notice_id), $form);
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
             $form_list .= $line;
         }
     } else {
         $perio_list = $msg["a2z_abt_actif_filter_no_result"];
         $form = str_replace('!!perio_display!!', "", $form);
     }
     $form = str_replace('!!perio_id_list!!', $perio_id_list, $form);
     $form = str_replace('!!a2z_perio_list!!', $perio_list, $form);
     return $form;
 }
开发者ID:hogsim,项目名称:PMB,代码行数:96,代码来源:perio_a2z.class.php


示例8: pmb_split

 $line = pmb_split("\n", $hp->final_query);
 $nb_element_avant = $myCart->nb_item;
 while (list($cle, $valeur) = each($line)) {
     if ($valeur != '') {
         if (pmb_strtolower(pmb_substr($valeur, 0, 6)) == "select" || pmb_strtolower(pmb_substr($valeur, 0, 6)) == "create") {
         } else {
             echo pmb_substr($valeur, 0, 6);
             error_message_history($msg['caddie_action_invalid_query'], $msg['requete_selection'], 1);
             exit;
         }
         $result_selection = mysql_query($valeur, $dbh);
         if (!$result_selection) {
             error_message_history($msg['caddie_action_invalid_query'], $msg['requete_echouee'] . mysql_error(), 1);
             exit;
         }
         if (pmb_strtolower(pmb_substr($valeur, 0, 6)) == "select") {
             $nb_element_a_ajouter += mysql_num_rows($result_selection);
             if (mysql_num_rows($result_selection)) {
                 while ($obj_selection = mysql_fetch_object($result_selection)) {
                     $myCart->add_item($obj_selection->object_id);
                 }
             }
             // fin if mysql_num_rows
             $myCart->compte_items();
         }
         // fin if rqt sélection
     }
     //fin valeur nonvide
 }
 // fin while list $cle
 $nb_element_apres = $myCart->nb_item;
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:collecte_selection.inc.php


示例9: preg_replace

         if ($virgule) {
             $tri .= ", ";
         }
         // regarde si le champ est déjà dans la liste des champs à trier et le remplace si besoin
         $new_s = preg_replace("/{$sortfield}, /", "", $s);
         $new_s = preg_replace("/{$sortfield}/", "", $new_s);
         // ajoute la clause order by correcte
         $new_s = preg_replace("/order\\s+by\\s+/i", "order by {$tri}", $new_s);
         // replace l'ancienne chaîne par la nouvelle
         $valeur = str_replace($s, $new_s, $valeur);
     } else {
         $valeur .= " order by {$tri}";
     }
 }
 print pmb_bidi("<strong>{$msg['procs_ligne']} {$cle} </strong>:&nbsp;{$valeur}<br /><br />");
 if (pmb_strtolower(pmb_substr($valeur, 0, 6)) == "select" || pmb_strtolower(pmb_substr($valeur, 0, 6)) == "create") {
 } else {
     echo "rqt=" . $valeur . "=<br />";
     error_message_history("Requête invalide", "Vous ne pouvez tester que des requêtes de sélection", 1);
     exit;
 }
 if (!explain_requete($valeur)) {
     die("<br /><br />" . $valeur . "<br /><br />" . $msg["proc_param_explain_failed"] . "<br /><br />" . $erreur_explain_rqt);
 }
 $res = @pmb_mysql_query($valeur, $dbh);
 $nbr_lignes = @pmb_mysql_num_rows($res);
 $nbr_champs = @pmb_mysql_num_fields($res);
 if ($nbr_lignes) {
     echo "<table >";
     for ($i = 0; $i < $nbr_champs; $i++) {
         // ajout de liens pour trier les pages
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:execute.inc.php


示例10: set_parent

//-------------------------------------------
$jscript = "\n<script type='text/javascript'>\n<!--\nfunction set_parent(id_value, libelle_value)\n{\n\twindow.opener.document.forms['{$caller}'].elements['{$p1}'].value = id_value;\n\twindow.opener.document.forms['{$caller}'].elements['{$p2}'].value = reverse_html_entities(libelle_value);\n\twindow.close();\n}\n-->\n</script>\n";
$sel_header = "\n<div class='row'>\n\t<label for='titre_select_music_form' class='etiquette'>" . $msg['aut_oeuvre_form_forme_list'] . "</label>\n\t</div>\n<div class='row'>\n";
//-------------------------------------------
//	$sel_footer : footer
//-------------------------------------------
$sel_footer = "\n</div>\n";
$baseurl = "./select.php?what=music_form&caller={$caller}&p1={$p1}&p2={$p2}&no_display={$no_display}&bt_ajouter={$bt_ajouter}";
require_once "{$class_path}/marc_table.class.php";
// récupération des codes music_form
if (!count($s_music_form)) {
    $s_music_form = new marc_list('music_form');
}
$amusic_form = $s_music_form->table;
foreach ($amusic_form as $key => $val) {
    $alphabet[] = strtoupper(convert_diacrit(pmb_substr($val, 0, 1)));
}
$alphabet = array_unique($alphabet);
print $sel_header;
print $jscript;
// affichage d'un sommaire par lettres
print "<div class='row'>";
foreach ($alphabet as $dummykey => $char) {
    $present = pmb_preg_grep("/^{$char}/i", $s_music_form->table);
    if (sizeof($present) && strcasecmp($letter, $char)) {
        print "<a href='{$baseurl}&letter={$char}'>{$char}</a> ";
    } else {
        if (!strcasecmp($letter, $char)) {
            print "<font size='+1'><strong><u>{$char}</u></strong></font> ";
        }
    }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:music_form.inc.php


示例11: caddie

}
if ($idcaddie) {
    $myCart = new caddie($idcaddie);
    print pmb_bidi(aff_cart_titre($myCart));
    $droit = verif_droit_proc_caddie($id);
    switch ($action) {
        case 'form_proc':
            $hp = new parameters($id);
            $hp->gen_form("./catalog.php?categ=caddie&sub=pointage&moyen=selection&action=pointe_item&idcaddie={$idcaddie}&id={$id}");
            break;
        case 'pointe_item':
            if ($droit) {
                $hp = new parameters($id);
                $hp->get_final_query();
                echo "<hr />" . $hp->final_query . "<hr />";
                if (pmb_strtolower(pmb_substr($hp->final_query, 0, 6)) != "select") {
                    error_message_history($msg['caddie_action_invalid_query'], $msg['requete_echouee'], 1);
                    exit;
                }
                if (!explain_requete($hp->final_query)) {
                    die("<br /><br />" . $hp->final_query . "<br /><br />" . $msg["proc_param_explain_failed"] . "<br /><br />" . $erreur_explain_rqt);
                }
                $result_selection = pmb_mysql_query($hp->final_query, $dbh);
                if (!$result_selection) {
                    error_message_history($msg['caddie_action_invalid_query'], $msg['requete_echouee'] . pmb_mysql_error(), 1);
                    exit;
                }
                if (pmb_mysql_num_rows($result_selection)) {
                    while ($obj_selection = pmb_mysql_fetch_object($result_selection)) {
                        $myCart->pointe_item($obj_selection->object_id, $obj_selection->object_type);
                    }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:selection.inc.php


示例12: pmb_alphabetic

 $form_empr_login = pmb_alphabetic('^a-z0-9\\.\\_\\-\\@', '', $form_empr_login);
 if ($form_empr_login != "") {
     $form_empr_login = pmb_strtolower($form_empr_login);
     if (strlen($form_empr_login) < 2) {
         $error_message .= "<p>{$form_empr_login} : {$msg['empr_form_login']}</p>";
         $nberrors++;
     }
     $requete = "SELECT id_empr, empr_login FROM empr WHERE empr_login='{$form_empr_login}' and id_empr!='{$id}' ";
     $res = pmb_mysql_query($requete, $dbh);
     $nbr_lignes = pmb_mysql_num_rows($res);
     if ($nbr_lignes) {
         $error_message .= "<p>{$form_empr_login} : {$msg['empr_form_login_existant']}</p>";
         $nberrors++;
     }
 } else {
     $form_empr_login = pmb_substr($form_prenom, 0, 1) . $form_nom;
     $form_empr_login = str_replace(CHR(32), "", $form_empr_login);
     $form_empr_login = pmb_strtolower($form_empr_login);
     $form_empr_login = clean_string($form_empr_login);
     $form_empr_login = convert_diacrit(pmb_strtolower($form_empr_login));
     $form_empr_login = pmb_alphabetic('^a-z0-9\\.\\_\\-\\@', '', $form_empr_login);
     $form_empr_login_original = $form_empr_login;
     $pb = 1;
     $num_login = 1;
     while ($pb == 1) {
         $requete = "SELECT empr_login FROM empr WHERE empr_login='{$form_empr_login}' LIMIT 1 ";
         $res = pmb_mysql_query($requete, $dbh);
         $nbr_lignes = pmb_mysql_num_rows($res);
         if ($nbr_lignes) {
             $form_empr_login = $form_empr_login_original . $num_login;
             $num_login++;
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:empr_update.inc.php


示例13: foreach

     if (!$nb_per_page) {
         $nb_per_page = $nb_per_page_select;
     }
     //parcours du tableau de mots, découpage en colonne et détermination des valeurs par rapport à la pagination et la lettre
     foreach ($words_for_syn as $key => $valeur_syn) {
         if ($valeur_syn != "") {
             if ($letter != 'My') {
                 if (preg_match("/^{$letter}/i", convert_diacrit(pmb_strtolower($valeur_syn)))) {
                     if ($compt >= ($page - 1) * $nb_per_page && $compt < $page * $nb_per_page) {
                         $affichage_mots .= "<a href='#' onClick=\"set_parent('" . $key . "','" . htmlentities(addslashes($valeur_syn), ENT_QUOTES, $charset) . "')\">";
                         $affichage_mots .= htmlentities($valeur_syn, ENT_QUOTES, $charset) . "</a><br />\n";
                     }
                     $compt++;
                 }
             } else {
                 if (pmb_substr($valeur_syn, 0, 1) == '0' || !array_search(convert_diacrit(pmb_strtolower(pmb_substr($valeur_syn, 0, 1))), $alphabet)) {
                     if ($compt >= ($page - 1) * $nb_per_page && $compt < $page * $nb_per_page) {
                         $affichage_mots .= "<a href='#' onClick=\"set_parent('" . $key . "','" . htmlentities(addslashes($valeur_syn), ENT_QUOTES, $charset) . "')\">";
                         $affichage_mots .= htmlentities($valeur_syn, ENT_QUOTES, $charset) . "</a><br />\n";
                     }
                 }
                 $compt++;
             }
         }
     }
     $affichage_mots .= "</div>";
     $affichage_mots .= "<div class='row'>&nbsp;</div><hr />\n";
     //affichage de la pagination
     $affichage_mots .= aff_pagination($baseurl . "&user_input={$user_input}&letter=" . $letter, $compt, $nb_per_page, $page);
     $affichage_mots .= "<div class='row'>&nbsp;</div>\n";
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:sel_word.inc.php


示例14: preg_replace

             // autre procédure
             $final_query = preg_replace("/CADDIE\\(.*[^\\)]\\)/i", implode(",", $liste_flag), $hp->final_query);
             $result_selection_flag = @pmb_mysql_query($final_query, $dbh);
             if ($result_selection_flag) {
                 $nb_elements_flag = pmb_mysql_affected_rows($dbh);
             } else {
                 $error_message_flag = pmb_mysql_error();
             }
         }
         // fin if autre procédure
     }
 }
 if ($elt_no_flag) {
     $liste_no_flag = $myCart->get_cart("NOFLAG");
     if (count($liste_no_flag)) {
         if (pmb_strtolower(pmb_substr($hp->final_query, 0, 6)) == 'insert') {
             // procédure insert
             for ($icount = 0; $icount < count($liste_no_flag); $icount++) {
                 $final_query = str_replace("CADDIE(NOTI)", $liste_no_flag[$icount], $hp->final_query);
                 $final_query = str_replace("CADDIE(EXPL)", $liste_no_flag[$icount], $final_query);
                 $final_query = str_replace("CADDIE(BULL)", $liste_no_flag[$icount], $final_query);
                 $result_selection_no_flag = @pmb_mysql_query($final_query, $dbh);
                 $nb_elts_traites = pmb_mysql_affected_rows($dbh);
                 if ($nb_elts_traites > 0) {
                     $nb_elements_no_flag += $nb_elts_traites;
                 }
             }
             // fin for
         } else {
             // autre procédure
             $final_query = preg_replace("/CADDIE\\(.*[^\\)]\\)/i", implode(",", $liste_no_flag), $hp->final_query);
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:selection.inc.php


示例15: marc_list

// récupération des codes de fonction
if (!count($s_func)) {
    $s_func = new marc_list('function');
}
print $sel_header;
print $jscript;
$afunc = $s_func->table;
$special = false;
$favorite = false;
$alphabet = array();
asort($afunc);
foreach ($afunc as $key => $val) {
    if ($key >= 900) {
        $special = true;
    } else {
        $alphabet[] = pmb_substr($val, 0, 1);
    }
    if ($s_func->tablefav[$key]) {
        $favorite = true;
    }
}
$alphabet = array_unique($alphabet);
if (!$letter) {
    if ($favorite) {
        $letter = "Fav";
    } elseif ($special) {
        $letter = "My";
    } else {
        $letter = "a";
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:func.inc.php


示例16: Body

 function Body()
 {
     /*---------------------------------------------------------*
       ! Create the body of the catalographic card               !
       *---------------------------------------------------------*/
     global $width;
     global $length;
     global $height;
     global $exemplaire;
     global $notice;
     global $auteur;
     global $pmb_pdf_font;
     $body = "";
     $body = $body . $notice->tit1 . " : ";
     /* book title(s) */
     if (strlen($notice->tit2) > 0) {
         $body = $body . $notice->tit2 . " : ";
         if (strlen($notice->tit3) > 0) {
             $body = $body . $notice->tit3 . " : ";
             if (strlen($notice->tit4) > 0) {
                 $body = $body . $notice->tit4 . " : ";
             }
         }
     }
     $body = pmb_substr($body, 0, pmb_strlen($body) - 3) . " / ";
     /* book author(s) */
     for ($i = 0; $i < count($notice->responsabilites["auteurs"]); $i++) {
         unset($auteur);
         $auteur = new auteur($notice->responsabilites["auteurs"][$i]["id"]);
         $body = $body . $auteur->name . ", ";
     }
     $body = pmb_substr($body, 0, pmb_strlen($body) - 2) . ".&nbsp;-";
     /* book edition */
     if (strlen($notice->mention_edition) > 0) {
         $body .= $notice->mention_edition . ".&nbsp;-";
     }
     /* book editor(s) */
     if (strlen($notice->ed1) > 0) {
         $body = $body . $notice->ed1 . ", ";
         if (strlen($notice->ed2) > 0) {
             $body = $body . $notice->ed2 . ", ";
         }
     }
     if (strlen($notice->ed1) > 0 || strlen($notice->ed2) > 0) {
         $body = pmb_substr($body, 0, pmb_strlen($body) - 2);
     }
     if (strlen($notice->year) > 0) {
         $body = $body . " :" . $notice->year;
     }
     $body = $body . ".&nbsp;-";
     /* book format */
     if (strlen($notice->npage) > 0) {
         $body = $body . $notice->npage;
         if (strlen($notice->size) > 0) {
             $body = $body . "; " . $notice->size;
         }
         $body = $body . ".&nbsp;-";
     }
     /* book collection */
     if (strlen($notice->coll) > 0) {
         $body = $body . "(" . $notice->coll;
         if (strlen($notice->nocoll) > 0) {
             $body = $body . "; " . $notice->nocoll;
         }
         $body = $body . ").&nbsp;-";
     }
     /* book note */
     if (strlen(trim($notice->n_contenu)) > 0) {
         $body = $body . trim($notice->n_contenu) . ".&nbsp;-";
     }
     $this->setFont($pmb_pdf_font, "", 10);
     $this->Ln();
     $this->MultiCell($length * 9 / 10, $height, $body);
     $this->Cell($length, $height, "ISBN : " . $notice->code);
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:75,代码来源:fiche_catalographique.inc.php



注:本文中的pmb_substr函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP pmidsarr函数代码示例发布时间:2022-05-15
下一篇:
PHP pmb_preg_replace函数代码示例发布时间: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