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


PHP notice::majNoticesTotal方法代码示例

本文整理汇总了PHP中notice::majNoticesTotal方法的典型用法代码示例。如果您正苦于以下问题:PHP notice::majNoticesTotal方法的具体用法?PHP notice::majNoticesTotal怎么用?PHP notice::majNoticesTotal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在notice的用法示例。


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

示例1: reindexRecords

 function reindexRecords($list_notices = array())
 {
     global $msg, $dbh, $charset, $PMBusername;
     $result = array();
     $result['nb_reindexed_records'] = 0;
     if (SESSrights & ADMINISTRATION_AUTH) {
         $req = "SELECT notice_id FROM notices ";
         if (count($list_notices)) {
             $req .= "WHERE notice_id IN (" . implode(",", $list_notices) . ") ";
         } else {
             //Si on fait toute la base
             //remise a zero de la table au début
             //mysql_query("truncate notices_global_index",$dbh);
             //mysql_query("truncate notices_mots_global_index",$dbh);
         }
         $req .= " ORDER BY notice_id";
         $query = mysql_query($req, $dbh);
         if ($query && mysql_num_rows($query)) {
             $result['nb_total_records'] = mysql_num_rows($query);
             while ($mesNotices = mysql_fetch_assoc($query)) {
                 notice::majNoticesTotal($mesNotices['notice_id']);
             }
             mysql_free_result($query);
         }
         $req = "SELECT count(1) FROM notices_global_index ";
         if (count($list_notices)) {
             $req .= "WHERE num_notice IN (" . implode(",", $list_notices) . ") ";
         }
         $not = mysql_query($req, $dbh);
         $result['nb_reindexed_records'] = mysql_result($not, 0, 0);
     }
     return $result;
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:33,代码来源:pmbesIndex.class.php

示例2: update_notice_categories_from_form

function update_notice_categories_from_form($id_notice = 0, $id_bulletin = 0)
{
    global $dbh;
    global $f_nb_categ;
    if (!$id_notice && $id_bulletin) {
        $query = "select * from bulletins where bulletin_id=" . $id_bulletin;
        $result = pmb_mysql_query($query, $dbh);
        if ($result) {
            $row = mysql_fetch_object($result);
            if ($row->num_notice) {
                $id_notice = $row->num_notice;
            } else {
                //on crée la notice de bulletin
                global $xmlta_doctype_bulletin, $deflt_notice_statut;
                pmb_mysql_query("INSERT INTO notices SET \n\t\t\t\t\ttit1 = '" . $row->bulletin_numero . ($row->mention_date ? " - " . $row->mention_date : "") . ($row->bulletin_titre ? " - " . $row->bulletin_titre : "") . "',\n\t\t\t\t\tstatut = '" . $deflt_notice_statut . "',\t\t\n\t\t\t\t\ttypdoc = '" . $xmlta_doctype_bulletin . "',\n\t\t\t\t\tcreate_date=sysdate(), update_date=sysdate() ", $dbh);
                $id_notice = pmb_mysql_insert_id($dbh);
                // Mise à jour des index de la notice
                notice::majNoticesTotal($id_notice);
                audit::insert_creation(AUDIT_NOTICE, $id_notice);
                //Mise à jour du bulletin
                $requete = "update bulletins set num_notice=" . $id_notice . " where bulletin_id=" . $id_bulletin;
                pmb_mysql_query($requete);
                //Mise à jour des liens bulletin -> notice mère
                $requete = "insert into notices_relations (num_notice,linked_notice,relation_type,rank) values(" . $id_notice . "," . $row->bulletin_notice . ",'b',1)";
                pmb_mysql_query($requete);
            }
        }
    }
    if (!$id_notice) {
        return;
    }
    $query = "SELECT max(ordre_categorie) as ordre FROM notices_categories WHERE notcateg_notice='" . $id_notice . "' ";
    $result = pmb_mysql_query($query);
    $ordre_categ = 0;
    if ($result) {
        $row = mysql_fetch_object($result);
        if (isset($row->ordre)) {
            $ordre_categ = $row->ordre;
        }
    }
    if ($f_nb_categ) {
        $rqt_ins = "INSERT INTO notices_categories (notcateg_notice, num_noeud, ordre_categorie) VALUES ";
        for ($i = 0; $i < $f_nb_categ; $i++) {
            $var_categ = "f_categ{$i}";
            global ${$var_categ};
            if (${$var_categ}) {
                $var_categid = "f_categ_id{$i}";
                global ${$var_categid};
                $rqt_sel = "SELECT notcateg_notice FROM notices_categories WHERE notcateg_notice='" . $id_notice . "' and num_noeud='" . ${$var_categid} . "' ";
                $res_sel = pmb_mysql_query($rqt_sel, $dbh);
                if ($res_sel && !pmb_mysql_num_rows($res_sel)) {
                    $ordre_categ++;
                    $rqt = $rqt_ins . " ('" . $id_notice . "','" . ${$var_categid} . "',{$ordre_categ}) ";
                    $res_ins = @pmb_mysql_query($rqt, $dbh);
                }
            }
        }
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:59,代码来源:notice_categories.inc.php

示例3: move

 function move($to_bul)
 {
     global $msg;
     global $dbh;
     global $pmb_synchro_rdf;
     // rattachement du dépouillement
     $requete = 'UPDATE analysis SET analysis_bulletin=' . $to_bul . ' WHERE analysis_notice=' . $this->analysis_id;
     @pmb_mysql_query($requete, $dbh);
     //dates
     $myBul = new bulletinage($to_bul);
     $year = substr($myBul->date_date, 0, 4);
     $date_parution = $myBul->date_date;
     $requete = 'UPDATE notices SET year="' . $year . '", date_parution="' . $date_parution . '", update_date=sysdate() WHERE notice_id=' . $this->analysis_id . ' LIMIT 1';
     @pmb_mysql_query($requete, $dbh);
     //Indexation du dépouillement
     notice::majNoticesTotal($this->analysis_id);
     audit::insert_modif(AUDIT_NOTICE, $this->analysis_id);
     if ($pmb_synchro_rdf) {
         $synchro_rdf = new synchro_rdf();
         $synchro_rdf->delRdf($this->analysis_id, 0);
         $synchro_rdf->addRdf($this->analysis_id, 0);
     }
     return false;
 }
开发者ID:hogsim,项目名称:PMB,代码行数:24,代码来源:serials.class.php

示例4: mysql_query

                 $res = mysql_query($requete);
                 if (mysql_num_rows($res)) {
                     $row = mysql_fetch_object($res);
                     if ($row->expl_notice) {
                         notice::majNoticesTotal($row->expl_notice);
                     } else {
                         $requete = "SELECT bulletin_titre, num_notice FROM bulletins WHERE bulletin_id='" . $row->expl_bulletin . "'";
                         $res2 = mysql_query($requete);
                         if (mysql_num_rows($res2)) {
                             $element = mysql_fetch_object($res2);
                             if (trim($element->bulletin_titre)) {
                                 $requete = "UPDATE bulletins SET index_titre=' " . addslashes(strip_empty_words($element->bulletin_titre)) . " ' WHERE bulletin_id='" . $row->expl_bulletin . "'";
                                 mysql_query($requete);
                             }
                             if ($element->num_notice) {
                                 notice::majNoticesTotal($element->num_notice);
                             }
                         }
                     }
                 }
                 $pb->progress();
             }
         }
         $pb->hide();
     }
     print "<br /><h3>{$msg['caddie_situation_reindex']}</h3>";
     print sprintf($msg["caddie_action_flag_processed"], $nb_elements_flag) . "<br />";
     print sprintf($msg["caddie_action_no_flag_processed"], $nb_elements_no_flag) . "<br />";
     print "<b>" . sprintf($msg["caddie_action_total_processed"], $nb_elements_total) . "</b><br /><br />";
     print aff_cart_nb_items($myCart);
 default:
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:reindex.inc.php

示例5: majNotices_clean_tags

 static function majNotices_clean_tags($notice = 0, $with_reindex = true)
 {
     global $dbh;
     $requete = "select index_l ,notice_id from notices where index_l is not null and index_l!='' ";
     if ($notice) {
         $requete .= " and notice_id = {$notice} ";
     }
     $res = pmb_mysql_query($requete, $dbh);
     if ($res && pmb_mysql_num_rows($res)) {
         while ($r = pmb_mysql_fetch_object($res)) {
             $val = clean_tags($r->index_l);
             $requete = "update notices set index_l='" . addslashes($val) . "' where notice_id=" . $r->notice_id;
             pmb_mysql_query($requete, $dbh);
             if ($with_reindex && $val != $r->index_l) {
                 //On réindexe la notice si le nettoyage à réalisé des changements
                 notice::majNoticesTotal($r->notice_id);
             }
         }
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:20,代码来源:notice.class.php

示例6: analysis_update

 function analysis_update($values)
 {
     global $dbh, $pmb_notice_img_folder_id, $opac_url_base, $pmb_notice_img_pics_max_size;
     if (is_array($values)) {
         $this->analysis_biblio_level = 'a';
         $this->analysis_hierar_level = '2';
         $this->analysis_typdoc = $values['typdoc'];
         $this->analysis_statut = $values['statut'];
         $this->analysis_commentaire_gestion = $values['f_commentaire_gestion'];
         $this->analysis_thumbnail_url = $values['f_thumbnail_url'];
         $this->analysis_tit1 = $values['f_tit1'];
         $this->analysis_tit2 = $values['f_tit2'];
         $this->analysis_tit3 = $values['f_tit3'];
         $this->analysis_tit4 = $values['f_tit4'];
         $this->analysis_n_gen = $values['f_n_gen'];
         $this->analysis_n_contenu = $values['f_n_contenu'];
         $this->analysis_n_resume = $values['f_n_resume'];
         $this->analysis_indexint = $values['f_indexint_id'];
         $this->analysis_index_l = $values['f_indexation'];
         $this->analysis_lien = $values['f_lien'];
         $this->analysis_eformat = $values['f_eformat'];
         $this->analysis_pages = $values['pages'];
         $this->analysis_signature = $values['signature'];
         $this->analysis_indexation_lang = $values['indexation_lang'];
         // insert de year à partir de la date de parution du bulletin
         if ($this->date_date) {
             $this->analysis_year = substr($this->date_date, 0, 4);
         }
         $this->date_parution_perio = $this->date_date;
         // construction de la requête :
         $data = "typdoc='" . $this->analysis_typdoc . "'";
         $data .= ", statut='" . $this->analysis_statut . "'";
         $data .= ", tit1='" . $this->analysis_tit1 . "'";
         $data .= ", tit3='" . $this->analysis_tit3 . "'";
         $data .= ", tit4='" . $this->analysis_tit4 . "'";
         $data .= ", year='" . $this->analysis_year . "'";
         $data .= ", npages='" . $this->analysis_pages . "'";
         $data .= ", n_contenu='" . $this->analysis_n_contenu . "'";
         $data .= ", n_gen='" . $this->analysis_n_gen . "'";
         $data .= ", n_resume='{$this->analysis_n_resume}'";
         $data .= ", lien='" . $this->analysis_lien . "'";
         $data .= ", eformat='" . $this->analysis_eformat . "'";
         $data .= ", indexint='" . $this->analysis_indexint . "'";
         $data .= ", index_l='" . clean_tags($this->analysis_index_l) . "'";
         $data .= ", niveau_biblio='" . $this->analysis_biblio_level . "'";
         $data .= ", niveau_hierar='" . $this->analysis_hierar_level . "'";
         $data .= ", commentaire_gestion='" . $this->analysis_commentaire_gestion . "'";
         $data .= ", thumbnail_url='" . $this->analysis_thumbnail_url . "'";
         $data .= ", signature='" . $this->analysis_signature . "'";
         $data .= ", date_parution='" . $this->date_parution_perio . "'";
         $data .= ", indexation_lang='" . $this->analysis_indexation_lang . "'";
         $result = 0;
         if (!$this->analysis_id) {
             // si c'est une création
             // fabrication de la requête finale
             $requete = "INSERT INTO notices SET {$data} , create_date=sysdate(), update_date=sysdate() ";
             $myQuery = mysql_query($requete, $dbh);
             $this->analysis_id = mysql_insert_id($dbh);
             if ($myQuery) {
                 $result = $this->analysis_id;
             }
             // si l'insertion est OK, il faut créer l'entrée dans la table 'analysis'
             if ($this->analysis_id) {
                 // Mise à jour des index de la notice
                 notice::majNoticesTotal($this->analysis_id);
                 audit::insert_creation(AUDIT_NOTICE, $this->analysis_id);
                 $requete = 'INSERT INTO analysis SET';
                 $requete .= ' analysis_bulletin=' . $this->id_bulletinage;
                 $requete .= ', analysis_notice=' . $this->analysis_id;
                 $myQuery = mysql_query($requete, $dbh);
             }
         } else {
             $requete = "UPDATE notices SET {$data} , update_date=sysdate() WHERE notice_id='" . $this->analysis_id . "' LIMIT 1";
             $myQuery = mysql_query($requete, $dbh);
             // Mise à jour des index de la notice
             notice::majNoticesTotal($this->analysis_id);
             audit::insert_modif(AUDIT_NOTICE, $this->analysis_id);
             if ($myQuery) {
                 $result = $this->analysis_id;
             }
         }
         // vignette de la notice uploadé dans un répertoire
         $id = $this->analysis_id;
         if ($_FILES['f_img_load']['name'] && $pmb_notice_img_folder_id) {
             $poids_fichier_max = 1024 * 1024;
             //Limite la taille de l'image à 1 Mo
             $req = "select repertoire_path from upload_repertoire where repertoire_id ='" . $pmb_notice_img_folder_id . "'";
             $res = mysql_query($req, $dbh);
             if (mysql_num_rows($res)) {
                 $rep = mysql_fetch_object($res);
                 $filename_output = $rep->repertoire_path . "img_" . $id;
             }
             if (($fp = @fopen($_FILES['f_img_load']['tmp_name'], "rb")) && $filename_output) {
                 $image = "";
                 $size = 0;
                 $flag = true;
                 while (!feof($fp)) {
                     $image .= fread($fp, 4096);
                     $size = strlen($image);
                     if ($size > $poids_fichier_max) {
//.........这里部分代码省略.........
开发者ID:bouchra012,项目名称:PMB,代码行数:101,代码来源:serials.class.php

示例7: get_notice_id

 public function get_notice_id($metas, $mimetype = "", $name = "")
 {
     global $pmb_keyword_sep;
     $this->metas = $metas;
     $this->mimetype = $mimetype;
     $this->name = $name;
     $notice_id = 0;
     $this->data = array();
     $this->data['tit1'] = $this->data['tit4'] = $this->data['authors'] = $this->data['co_authors'] = $this->data['code'] = $this->data['npages'] = $this->data['year'] = $this->data['index_l'] = $this->data['url'] = $this->data['thumbnail_content'] = $this->data['publisher'] = $this->data['n_resume'] = "";
     if ($this->mimetype == "application/epub+zip") {
         //pour les ebook, on gère ca directement ici !
         $this->data['tit1'] = $this->metas['title'][0];
         $this->data['authors'] = $this->metas['creator'];
         $this->data['co_authors'] = $this->metas['contributor'];
         if ($this->metas['identifier']['isbn']) {
             $this->data['code'] = \formatISBN($this->metas['identifier']['isbn'], 13);
         } else {
             if ($this->metas['identifier']['ean']) {
                 $this->data['code'] = \EANtoISBN($this->metas['identifier']['ean']);
                 $this->data['code'] = \formatISBN($code, 13);
             }
         }
         if ($this->metas['identifier']['uri']) {
             $this->data['url'] = \clean_string($this->metas['identifier']['uri']);
         }
         $this->data['publisher'] = $this->metas['publisher'][0];
         $this->data['year'] = $this->metas['date'][0]['value'];
         if (strlen($this->data['year']) && strlen($this->data['year']) != 4) {
             $this->data['year'] = \formatdate(detectFormatDate($this->data['year']));
         }
         $this->data['lang'] = $this->metas['language'];
         $this->data['n_resume'] = implode("\n", $this->metas['description']);
         $this->data['keywords'] = implode($pmb_keyword_sep, $this->metas['subject']);
         $this->data['thumbnail_content'] = $this->metas['thumbnail_content'];
     } else {
         $this->exec_map();
     }
     if (!$this->data['tit1']) {
         $this->data['tit1'] = $this->name;
     }
     $notice_id = $this->create_notice();
     $notice_id = $this->dedoublonne($notice_id);
     // Indexation
     \notice::majNoticesTotal($notice_id);
     return $notice_id;
 }
开发者ID:hogsim,项目名称:PMB,代码行数:46,代码来源:metasMapper.class.php

示例8: buildNotice


//.........这里部分代码省略.........
                        } elseif ($id === 1) {
                            $entry['ed2_id'] = \editeur::import($publisher);
                        }
                    }
                }
            }
            //la collection
            if (sizeof($entry['collections']) && $entry['ed1_id']) {
                $entry['collections']['parent'] = $entry['ed1_id'];
                $entry['coll_id'] = \collection::import($entry['collections']);
            }
            $first = true;
            $query = 'INSERT INTO notices SET ';
            foreach ($entry as $fieldName => $value) {
                if (!is_array($value) && $value != '') {
                    if (!$first) {
                        $query .= ',';
                    }
                    $query .= $fieldName . '="' . addslashes(trim($value)) . '"';
                    $first = false;
                }
            }
            mysql_query($query) or die('Echec d\'execution de la requete ' . $query . '  : ' . mysql_error());
            $entry['notice_id'] = mysql_insert_id();
            if ($pmb_type_audit && ($webdav_current_user_id || $webdav_current_user_name) && $entry['create_date']) {
                //ajout des informations d'audit
                $query = 'INSERT INTO audit (type_obj,object_id,user_id,user_name,type_modif,quand) VALUES (1,' . $entry['notice_id'] . ',' . $webdav_current_user_id . ',"' . addslashes($webdav_current_user_name) . '",1,"' . $entry['create_date'] . '")';
                mysql_query($query) or die('Echec d\'execution de la requete ' . $query . '  : ' . mysql_error());
            }
        }
        //les champs persos
        if (sizeof($entry['cp'])) {
            foreach ($entry['cp'] as $cp) {
                \parametres_perso::import($entry['notice_id'], $cp['field'], $cp['value'], 'notices');
            }
        }
        //ajout dans les tables annexes a la notice
        if (sizeof($entry['annexes'])) {
            foreach ($entry['annexes'] as $typeAnnexe => $annexes) {
                foreach ($annexes as $id => $annexe) {
                    switch ($typeAnnexe) {
                        case 'responsability':
                            //Import et récupération des identifiants auteurs
                            $entry['annexes'][$typeAnnexe][$id]['responsability_author'] = \auteur::import($entry['annexes'][$typeAnnexe][$id]['authors']);
                            $entry['annexes'][$typeAnnexe][$id]['responsability_notice'] = $entry['notice_id'];
                            break;
                        case 'notices_categories':
                            //Import et récupération des identifiants catégories
                            $query = 'SELECT num_noeud FROM categories WHERE libelle_categorie="' . addslashes(trim($entry['annexes'][$typeAnnexe][$id]['categories']['libelle_categorie'])) . '" AND num_thesaurus=' . $entry['annexes'][$typeAnnexe][$id]['categories']['num_thesaurus'] . ' AND langue="' . $entry['annexes'][$typeAnnexe][$id]['categories']['langue'] . '"';
                            $result = mysql_query($query) or die('Echec d\'execution de la requete ' . $query . '  : ' . mysql_error());
                            if (mysql_num_rows($result)) {
                                //le noeud existe déjà
                                $entry['annexes'][$typeAnnexe][$id]['num_noeud'] = mysql_result($result, 0, 0);
                            } else {
                                //le noeud n'existe pas, on cherche le parent non classé
                                $query = 'SELECT id_noeud FROM noeuds WHERE autorite="NONCLASSES" AND num_thesaurus=' . $entry['annexes'][$typeAnnexe][$id]['categories']['num_thesaurus'];
                                $result = mysql_query($query) or die('Echec d\'execution de la requete ' . $query . '  : ' . mysql_error());
                                if (mysql_num_rows($result)) {
                                    //on ajoute le noeud
                                    $query = 'INSERT INTO noeuds SET num_parent=' . mysql_result($result, 0, 0) . ', visible=1, num_thesaurus=' . $entry['annexes'][$typeAnnexe][$id]['categories']['num_thesaurus'];
                                    mysql_query($query) or die('Echec d\'execution de la requete ' . $query . '  : ' . mysql_error());
                                    $entry['annexes']['notices_categories'][$id]['num_noeud'] = mysql_insert_id();
                                    //on ajoute la catégorie
                                    $categorie = new \categories($entry['annexes'][$typeAnnexe][$id]['num_noeud'], $entry['annexes'][$typeAnnexe][$id]['categories']['langue']);
                                    $categorie->libelle_categorie = trim($entry['annexes'][$typeAnnexe][$id]['categories']['libelle_categorie']);
                                    $categorie->save();
                                }
                            }
                            $entry['annexes'][$typeAnnexe][$id]['notcateg_notice'] = $entry['notice_id'];
                            break;
                        case 'notices_langues':
                            $entry['annexes'][$typeAnnexe][$id]['num_notice'] = $entry['notice_id'];
                            break;
                        case 'notices_authorities_sources':
                            $entry['annexes'][$typeAnnexe][$id]['num_notice'] = $entry['notice_id'];
                            break;
                        case 'notices_relations':
                            $entry['annexes'][$typeAnnexe][$id]['num_notice'] = $entry['notice_id'];
                            break;
                        case 'notices_titres_uniformes':
                            $entry['annexes'][$typeAnnexe][$id]['ntu_num_notice'] = $entry['notice_id'];
                            break;
                    }
                    $first = true;
                    $query = 'INSERT IGNORE INTO ' . $typeAnnexe . ' SET ';
                    foreach ($entry['annexes'][$typeAnnexe][$id] as $fieldName => $value) {
                        if (!is_array($value) && $value != '') {
                            if (!$first) {
                                $query .= ',';
                            }
                            $query .= $fieldName . '="' . addslashes(trim($value)) . '"';
                            $first = false;
                        }
                    }
                    mysql_query($query) or die('Echec d\'execution de la requete ' . $query . '  : ' . mysql_error());
                }
            }
        }
        \notice::majNoticesTotal($entry['notice_id']);
    }
开发者ID:bouchra012,项目名称:PMB,代码行数:101,代码来源:RootNode.php


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