当前位置: 首页>>代码示例>>PHP>>正文


PHP pmb_mysql_fetch_object函数代码示例

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


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

示例1: genere_page_rss

function genere_page_rss($id = 0)
{
    global $dbh, $opac_url_base, $charset, $msg;
    global $opac_view_filter_class;
    if ($id) {
        $clause = " where id_rss_flux='{$id}' ";
    }
    $rqt = "select id_rss_flux, nom_rss_flux, img_url_rss_flux from rss_flux {$clause} order by 2 ";
    $res = pmb_mysql_query($rqt, $dbh);
    while ($obj = pmb_mysql_fetch_object($res)) {
        if ($opac_view_filter_class) {
            if (!$opac_view_filter_class->is_selected("flux_rss", $obj->id_rss_flux)) {
                continue;
            }
        }
        $liens .= "\n\t\t<tr>\n\t\t\t<td width=10%>";
        if ($obj->img_url_rss_flux) {
            $liens .= "<a href=\"index.php?lvl=rss_see&id=" . $obj->id_rss_flux . "\"><img src='" . $obj->img_url_rss_flux . "' border=none /></a>";
        }
        $liens .= "</td><td width=50%><a href=\"index.php?lvl=rss_see&id=" . $obj->id_rss_flux . "\">" . htmlentities($obj->nom_rss_flux, ENT_QUOTES, $charset) . "</a>\n\t\t\t</td><td><a href=\"" . $opac_url_base . "rss.php?id=" . $obj->id_rss_flux . "\" alt=\"" . $msg[abonne_rss_dispo] . "\" title=\"" . $msg[abonne_rss_dispo] . "\"><img id=\"rss_logo\" src='" . $opac_url_base . "images/rss.png' border=none /></a>\n\t\t\t" . htmlentities($opac_url_base . "rss.php?id=" . $obj->id_rss_flux, ENT_QUOTES, $charset) . "\n\t\t\t\t</td></tr>";
    }
    if ($liens) {
        $liens = "<table> {$liens} </table>";
    }
    return $liens;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:26,代码来源:includes_rss.inc.php

示例2: get_rights

 function get_rights($group, $method)
 {
     global $msg;
     $this->clear_error();
     //Vérification que le groupe / méthode existe
     if (!$method && $this->es->group_exists($group) || $this->es->method_exists($group, $method)) {
         $es_r = new es_rights($group, $method);
         $requete = "select available, num_user, anonymous from es_methods, es_methods_users where groupe='" . addslashes($group) . "' and method='" . addslashes($method) . "' and id_method=num_method";
         $resultat = pmb_mysql_query($requete);
         if ($resultat) {
             $first = true;
             while ($r = pmb_mysql_fetch_object($resultat)) {
                 if ($first) {
                     $es_r->available = $r->available;
                 }
                 if ($r->anonymous) {
                     $es_r->anonymous_user = $r->num_user;
                 } else {
                     $es_r->users[] = $r->num_user;
                 }
             }
         }
         return $es_r;
     } else {
         $this->set_error(ES_RIGHTS_UNKNOWN_GROUP_OR_METHOD, $msg["es_rights_error_unknown_group"]);
         return false;
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:28,代码来源:external_services_rights.class.php

示例3: fetch_datas

 public function fetch_datas()
 {
     global $dbh;
     $this->instruments = array();
     $this->instruments_data = array();
     $this->label = "";
     $this->num_nomenclature = 0;
     $this->order = 0;
     if ($this->id) {
         //le nom de l'atelier
         $query = "select * from nomenclature_workshops where id_workshop = " . $this->id . " order by workshop_order asc, workshop_label";
         $result = pmb_mysql_query($query, $dbh);
         if (pmb_mysql_num_rows($result)) {
             if ($row = pmb_mysql_fetch_object($result)) {
                 $this->label = $row->workshop_label;
                 $this->num_nomenclature = $row->workshop_num_nomenclature;
                 $this->order = $row->workshop_order;
                 //récupération des instruments
                 $query = "select workshop_instrument_num_instrument, workshop_instrument_number,workshop_instrument_order from nomenclature_workshops_instruments where workshop_instrument_num_workshop = " . $this->id . " order by workshop_instrument_order asc";
                 $result = pmb_mysql_query($query, $dbh);
                 if (pmb_mysql_num_rows($result)) {
                     while ($row = pmb_mysql_fetch_object($result)) {
                         $this->add_instrument(new nomenclature_instrument($row->workshop_instrument_num_instrument));
                         $this->instruments_data[$row->workshop_instrument_num_instrument]['effective'] = $row->workshop_instrument_number;
                         $this->instruments_data[$row->workshop_instrument_num_instrument]['order'] = $row->workshop_instrument_order;
                     }
                 }
             }
         }
     }
 }
开发者ID:hogsim,项目名称:PMB,代码行数:31,代码来源:nomenclature_workshop.class.php

示例4: param_perso_form

function param_perso_form(&$p_perso)
{
    global $dbh;
    global $param_perso_900;
    for ($i = 0; $i < count($param_perso_900); $i++) {
        $req = " select idchamp, type, datatype from notices_custom where name='" . $param_perso_900[$i]['n'] . "'";
        $res = pmb_mysql_query($req, $dbh);
        if (pmb_mysql_num_rows($res)) {
            $perso = pmb_mysql_fetch_object($res);
            if ($perso->idchamp) {
                if ($perso->type == 'list') {
                    $requete = "select notices_custom_list_value from notices_custom_lists where notices_custom_list_lib='" . addslashes($param_perso_900[$i]['a']) . "' and notices_custom_champ={$perso->idchamp}";
                    $resultat = pmb_mysql_query($requete);
                    if (pmb_mysql_num_rows($resultat)) {
                        $value = pmb_mysql_result($resultat, 0, 0);
                    } else {
                        $requete = "select max(notices_custom_list_value*1) from notices_custom_lists where notices_custom_champ={$perso->idchamp}";
                        $resultat = pmb_mysql_query($requete);
                        $max = @pmb_mysql_result($resultat, 0, 0);
                        $n = $max + 1;
                        $requete = "insert into notices_custom_lists (notices_custom_champ,notices_custom_list_value,notices_custom_list_lib) values({$perso->idchamp},{$n},'" . addslashes($param_perso_900[$i]['a']) . "')";
                        pmb_mysql_query($requete);
                        $value = $n;
                    }
                    $p_perso->values[$perso->idchamp][] = $value;
                } else {
                    $p_perso->values[$perso->idchamp][] = $param_perso_900[$i]['a'];
                }
            }
        }
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:32,代码来源:func_customfields.inc.php

示例5: get_primaldata

 function get_primaldata()
 {
     global $dbh;
     $requete = "SELECT * FROM sub_collections WHERE sub_coll_id='" . addslashes($this->id) . "' ";
     $result = pmb_mysql_query($requete, $dbh);
     if (pmb_mysql_num_rows($result)) {
         $obj = pmb_mysql_fetch_object($result);
         pmb_mysql_free_result($result);
         $this->get_primaldatafrom($obj);
     } else {
         // pas de sous-collection avec cette clé
         $this->id = 0;
         $this->name = '';
         $this->parent = '';
         $this->parent_libelle = '';
         $this->parent_isbd = '';
         $this->publisher = '';
         $this->publisher_libelle = '';
         $this->publisher_isbd = '';
         $this->display = '';
         $this->issn = '';
         $this->isbd_entry = '';
         $this->comment = '';
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:25,代码来源:subcollection.class.php

示例6: build_tree_sections

 protected function build_tree_sections($id_parent, $depth = 0)
 {
     global $dbh;
     if ($this->parameters['max_depth'] == 0 || $depth < $this->parameters['max_depth']) {
         $items = $ids = $rows = array();
         $query = "select id_section,section_title from cms_sections where section_num_parent = " . $id_parent . " order by section_order asc";
         $result = pmb_mysql_query($query, $dbh);
         if (pmb_mysql_num_rows($result)) {
             while ($row = pmb_mysql_fetch_object($result)) {
                 $ids[] = $row->id_section;
                 $rows[] = $row;
             }
             $ids = $this->filter_datas("sections", $ids);
             foreach ($rows as $row) {
                 if (in_array($row->id_section, $ids)) {
                     $section = cms_provider::get_instance("section", $row->id_section);
                     $item = array('id' => $row->id_section, 'title' => $row->section_title, 'link' => $this->get_constructed_link("section", $row->id_section), 'details' => $section->format_datas(false, false));
                     $sub_query = "select count(id_section) from cms_sections where section_num_parent = " . $row->id_section;
                     $sub_result = pmb_mysql_query($sub_query, $dbh);
                     if (pmb_mysql_num_rows($result) && pmb_mysql_result($sub_result, 0, 0) > 0) {
                         $item['children'] = $this->build_tree_sections($row->id_section, $depth + 1);
                     }
                     $items[] = $item;
                 }
             }
         }
     }
     return $items;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:29,代码来源:cms_module_menu_datasource_menu_editorial.class.php

示例7: get_datas

 public function get_datas()
 {
     global $opac_url_base;
     global $opac_show_book_pics;
     global $opac_book_pics_url;
     $datas = parent::get_datas();
     $notices = $datas['records'];
     $query = "select notice_id,tit1,thumbnail_url,code from notices where notice_id in(" . implode(",", $notices) . ")";
     $result = pmb_mysql_query($query);
     $notices = array();
     if (pmb_mysql_num_rows($result)) {
         while ($row = pmb_mysql_fetch_object($result)) {
             if ($opac_show_book_pics == '1' && ($opac_book_pics_url || $row->thumbnail_url)) {
                 $code_chiffre = pmb_preg_replace('/-|\\.| /', '', $row->code);
                 $url_image = $opac_book_pics_url;
                 $url_image = $opac_url_base . "getimage.php?url_image=" . urlencode($url_image) . "&noticecode=!!noticecode!!&vigurl=" . urlencode($row->thumbnail_url);
                 if ($row->thumbnail_url) {
                     $url_vign = $row->thumbnail_url;
                 } else {
                     if ($code_chiffre) {
                         $url_vign = str_replace("!!noticecode!!", $code_chiffre, $url_image);
                     } else {
                         $url_vign = $opac_url_base . "images/vide.png";
                     }
                 }
             }
             $notices[] = array('title' => $row->tit1, 'link' => $opac_url_base . "?lvl=notice_display&id=" . $row->notice_id, 'vign' => $url_vign);
         }
     }
     return array('records' => $notices);
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:cms_module_carousel_datasource_notices.class.php

示例8: list_author_notices

 function list_author_notices($author_id, $OPACUserId = -1)
 {
     global $dbh;
     global $msg;
     $result = array();
     $author_id += 0;
     if (!$author_id) {
         throw new Exception("Missing parameter: author_id");
     }
     $rqt_auteurs = "select author_id as aut from authors where author_see='{$author_id}' and author_id!=0 ";
     $rqt_auteurs .= "union select author_see as aut from authors where author_id='{$author_id}' and author_see!=0 ";
     $res_auteurs = pmb_mysql_query($rqt_auteurs, $dbh);
     $clause_auteurs = " in ('{$author_id}' ";
     while ($id_aut = pmb_mysql_fetch_object($res_auteurs)) {
         $clause_auteurs .= ", '" . $id_aut->aut . "' ";
         $rqt_auteursuite = "select author_id as aut from authors where author_see='{$id_aut->aut}' and author_id!=0 ";
         $res_auteursuite = pmb_mysql_query($rqt_auteursuite, $dbh);
         while ($id_autsuite = pmb_mysql_fetch_object($res_auteursuite)) {
             $clause_auteurs .= ", '" . $id_autsuite->aut . "' ";
         }
     }
     $clause_auteurs .= " ) ";
     $requete = "SELECT distinct notices.notice_id FROM notices, responsability ";
     $requete .= "where responsability_author {$clause_auteurs} and notice_id=responsability_notice ";
     $requete .= "ORDER BY index_serie,tnvol,index_sew";
     $res = pmb_mysql_query($requete, $dbh);
     if ($res) {
         while ($row = pmb_mysql_fetch_assoc($res)) {
             $result[] = $row["notice_id"];
         }
     }
     //Je filtre les notices en fonction des droits
     $result = $this->filter_tabl_notices($result);
     return $result;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:35,代码来源:pmbesAuthors.class.php

示例9: get_datas

 public function get_datas()
 {
     $selector = $this->get_selected_selector();
     if ($selector) {
         $return = array();
         if (count($selector->get_value()) > 0) {
             foreach ($selector->get_value() as $value) {
                 $return[] = $value;
             }
         }
         $return = $this->filter_datas("articles", $return);
         if (count($return)) {
             $query = "select id_article,if(article_start_date != '0000-00-00 00:00:00',article_start_date,article_creation_date) as publication_date from cms_articles where id_article in (" . implode(",", $return) . ")";
             if ($this->parameters["sort_by"] != "") {
                 $query .= " order by " . $this->parameters["sort_by"];
                 if ($this->parameters["sort_order"] != "") {
                     $query .= " " . $this->parameters["sort_order"];
                 }
             }
             $result = pmb_mysql_query($query);
             if (pmb_mysql_num_rows($result)) {
                 $return = array();
                 while ($row = pmb_mysql_fetch_object($result)) {
                     $return[] = $row->id_article;
                 }
             }
         }
         return $return;
     }
     return false;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:cms_module_common_datasource_articles.class.php

示例10: show_orinot

function show_orinot($dbh)
{
    global $msg;
    global $charset;
    print "<table>\n\t<tr>\n\t\t<th>{$msg['orinot_nom']}</th>\n\t\t<th>{$msg['orinot_pays']}</th>\n\t\t<th>{$msg['orinot_diffusable']}</th>\n\t</tr>";
    // affichage du tableau des statuts
    $requete = "SELECT orinot_id, orinot_nom, orinot_pays, orinot_diffusion FROM origine_notice ORDER BY orinot_nom ";
    $res = pmb_mysql_query($requete, $dbh);
    $nbr = pmb_mysql_num_rows($res);
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = pmb_mysql_fetch_object($res);
        if ($parity % 2) {
            $pair_impair = "even";
        } else {
            $pair_impair = "odd";
        }
        $parity += 1;
        $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./admin.php?categ=notices&sub=orinot&action=modif&id={$row->orinot_id}';\" ";
        print pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'><td>" . htmlentities($row->orinot_nom, ENT_QUOTES, $charset) . "</td><td>" . htmlentities($row->orinot_pays, ENT_QUOTES, $charset) . "</td>");
        if ($row->orinot_diffusion) {
            print "<td>{$msg['orinot_diffusable_oui']}</td>";
        } else {
            print "<td>{$msg['orinot_diffusable_non']}</td>";
        }
        print "</tr>";
    }
    print "</table>\n\t\t<input class='bouton' type='button' value=' {$msg['orinot_ajout']} ' onClick=\"document.location='./admin.php?categ=notices&sub=orinot&action=add'\" />";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:29,代码来源:origine_notice.inc.php

示例11: update_avis

function update_avis($id)
{
    global $dbh, $desc, $sujet, $msg, $charset;
    header('Content-Type: text/html;charset=' . $charset);
    $req = "update avis set sujet='" . $sujet . "', commentaire='" . $desc . "' where id_avis='" . $id . "'";
    pmb_mysql_query($req, $dbh);
    $requete = "select avis.note, avis.sujet, avis.commentaire, avis.id_avis, DATE_FORMAT(avis.dateAjout,'" . $msg[format_date] . "') as ladate, ";
    $requete .= "empr_login, empr_nom, empr_prenom, ";
    $requete .= "niveau_biblio, niveau_biblio, valide, notice_id ";
    $requete .= "from avis ";
    $requete .= "left join empr on empr.id_empr=avis.num_empr ";
    $requete .= "left join notices on notices.notice_id=avis.num_notice ";
    $requete .= "where id_avis='" . $id . "'";
    $requete .= "order by index_serie, tnvol, index_sew ,dateAjout desc ";
    $res = pmb_mysql_query($requete, $dbh);
    while ($loc = pmb_mysql_fetch_object($res)) {
        $display = "\n\t\t\t<div class='left'>\n\t\t\t\t<input type='checkbox' name='valid_id_avis[]' id='valid_id_avis[]' value='{$loc->id_avis}' onClick=\"stop_evenement(event);\" />";
        if (!$loc->valide) {
            $display .= "<font color='#CC0000'>" . $msg[gestion_avis_note] . " <span >" . htmlentities($loc->note, ENT_QUOTES, $charset) . " <b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        } else {
            $display .= "<font color='#00BB00'>" . $msg[gestion_avis_note] . " <span >" . htmlentities($loc->note, ENT_QUOTES, $charset) . " <b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        }
        if ($charset != "utf-8") {
            $loc->commentaire = cp1252Toiso88591($loc->commentaire);
        }
        $display .= ", " . htmlentities($loc->ladate, ENT_QUOTES, $charset) . " " . htmlentities($loc->empr_prenom . " " . $loc->empr_nom, ENT_QUOTES, $charset) . "\n\t\t\t</div>\n\t\t\t<div class='row'>" . do_bbcode($loc->commentaire) . "\t</div>\n\t\t";
    }
    print $display;
}
开发者ID:hogsim,项目名称:PMB,代码行数:29,代码来源:avis_ajax.inc.php

示例12: fetch_data

 function fetch_data()
 {
     global $dbh;
     $this->selected_list = array();
     $req = "SELECT * FROM opac_filters where opac_filter_view_num=" . $this->id_vue . " and  opac_filter_path='" . $this->path . "' ";
     $myQuery = pmb_mysql_query($req, $dbh);
     if (pmb_mysql_num_rows($myQuery)) {
         $r = pmb_mysql_fetch_object($myQuery);
         $param = unserialize($r->opac_filter_param);
         $this->selected_list = $param["selected"];
     }
     $myQuery = pmb_mysql_query("SELECT * FROM docs_location order by location_libelle ", $dbh);
     $this->liste_item = array();
     $link = "";
     $i = 0;
     if (pmb_mysql_num_rows($myQuery)) {
         while ($r = pmb_mysql_fetch_object($myQuery)) {
             $this->liste_item[$i] = new stdClass();
             $this->liste_item[$i]->id = $r->idlocation;
             $this->liste_item[$i]->name = $r->location_libelle;
             if (in_array($r->idlocation, $this->selected_list)) {
                 $this->liste_item[$i]->selected = 1;
             } else {
                 $this->liste_item[$i]->selected = 0;
             }
             $i++;
         }
     }
     return true;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:30,代码来源:nav_sections.class.php

示例13: get_value

 public function get_value()
 {
     global $dbh;
     if ($this->parameters['sub_selector']) {
         $sub_selector = new $this->parameters['sub_selector']($this->get_sub_selector_id($this->parameters['sub_selector']));
         $values = $sub_selector->get_value();
         if (!is_array($values)) {
             if ($values != "") {
                 $values = array($values);
             } else {
                 $values = array();
             }
         }
         if (count($values)) {
             $tagslist = array();
             switch ($this->parameters['sub_selector']) {
                 case "cms_module_item_selector_item_generic":
                     $query = "select id_tag from docwatch_tags left join docwatch_items_tags on num_tag=id_tag where num_item in (" . implode(",", $values) . ")";
                     $result = pmb_mysql_query($query, $dbh);
                     if ($result) {
                         while ($row = pmb_mysql_fetch_object($result)) {
                             $tagslist[] = $row->id_tag;
                         }
                     }
                     return $tagslist;
                     break;
                 case "cms_module_common_selector_env_var":
                     return $values;
                     break;
             }
         }
     }
     return array();
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:34,代码来源:cms_module_itemslist_selector_itemstags.class.php

示例14: get_value

 public function get_value()
 {
     if (!$this->value) {
         $parent = new cms_module_common_selector_sections($this->get_sub_selector_id("cms_module_common_selector_sections"));
         $cp = new cms_module_common_selector_type_section_filter($this->get_sub_selector_id("cms_module_common_selector_type_section_filter"));
         $parents = $parent->get_value();
         $field = $cp->get_value();
         $var = new cms_module_common_selector_env_var($this->get_sub_selector_id("cms_module_common_selector_env_var"));
         $this->value = array();
         if (is_array($parents) && count($parents)) {
             $query = "select id_section from cms_sections where section_num_parent in (" . implode(",", $parents) . ")";
             $result = pmb_mysql_query($query);
             $fields = new cms_editorial_parametres_perso($field['type']);
             if (pmb_mysql_num_rows($result)) {
                 while ($row = pmb_mysql_fetch_object($result)) {
                     $fields->get_values($row->id_section);
                     if (in_array($var->get_value(), $fields->values[$field['field']])) {
                         $this->value[] = $row->id_section;
                     }
                 }
             }
         }
     }
     return $this->value;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:25,代码来源:cms_module_common_selector_sections_by_parent_and_cp.class.php

示例15: parametres_perso

 function parametres_perso($prefix)
 {
     global $_custom_prefixe_;
     $this->prefix = $prefix;
     $this->base_url = $base_url;
     $_custom_prefixe_ = $prefix;
     //Lecture des champs
     $this->no_special_fields = 0;
     $this->t_fields = array();
     $requete = "select idchamp, name, titre, type, datatype, obligatoire, options, multiple, export, search, opac_sort from " . $this->prefix . "_custom order by ordre";
     $resultat = pmb_mysql_query($requete);
     if (pmb_mysql_num_rows($resultat) == 0) {
         $this->no_special_fields = 1;
     } else {
         while ($r = pmb_mysql_fetch_object($resultat)) {
             $this->t_fields[$r->idchamp]["DATATYPE"] = $r->datatype;
             $this->t_fields[$r->idchamp]["NAME"] = $r->name;
             $this->t_fields[$r->idchamp]["TITRE"] = $r->titre;
             $this->t_fields[$r->idchamp]["TYPE"] = $r->type;
             $this->t_fields[$r->idchamp]["OPTIONS"] = $r->options;
             $this->t_fields[$r->idchamp]["MANDATORY"] = $r->obligatoire;
             $this->t_fields[$r->idchamp]["OPAC_SHOW"] = $r->multiple;
             $this->t_fields[$r->idchamp]["EXPORT"] = $r->export;
             $this->t_fields[$r->idchamp]["SEARCH"] = $r->search;
             $this->t_fields[$r->idchamp]["OPAC_SORT"] = $r->opac_sort;
         }
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:28,代码来源:parametres_perso.class.php


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