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


PHP notice类代码示例

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


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

示例1: __construct

 /**
  * Constructeur
  * @param notice $notice Instance de la classe notice associée
  */
 public function __construct($record)
 {
     $this->record = $record;
     $this->tabs = array();
     $this->add_tab($this->get_tab_records_indexed_with_concept());
     $this->add_tab($this->get_tab_authorities_indexed_with_concept());
     $this->record->set_record_tabs($this);
     $this->record->get_records_list_ui();
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:13,代码来源:records_tabs.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: action_details

 public function action_details()
 {
     $plugin = Sprig::factory('plugin', array('id' => $this->request->param('id')))->load();
     if (!$plugin->loaded()) {
         notice::add(__('Invalid Plugin'), 'error');
         Request::instance()->redirect(Request::instance('admin')->uri(array('action' => 'list')));
     }
 }
开发者ID:Zeelot,项目名称:yuriko_cms,代码行数:8,代码来源:plugin.php

示例4: search

 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = notice::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'begindate' => $this->begindate, 'enddate' => $this->enddate, 'publishdate' => $this->publishdate]);
     $query->andFilterWhere(['like', 'title', $this->title])->andFilterWhere(['like', 'publisher', $this->publisher])->andFilterWhere(['like', 'importance', $this->importance])->andFilterWhere(['like', 'content', $this->content])->andFilterWhere(['like', 'category', $this->category]);
     return $dataProvider;
 }
开发者ID:wenlife207,项目名称:yii2-school-project,代码行数:21,代码来源:NoticeSearch.php

示例5: index_action

 function index_action($id = '')
 {
     @(include PLUS_PATH . 'cron.cache.php');
     if (is_array($cron) && !empty($cron)) {
         foreach ($cron as $key => $value) {
             if ($id) {
                 if ($value['id'] == $id) {
                     $timestamp[$value['nexttime']] = $value;
                     $timestamp[$value['nexttime']]['cronkey'] = $key;
                 }
             } else {
                 if ($value['nexttime'] <= time()) {
                     $timestamp[$value['nexttime']] = $value;
                     $timestamp[$value['nexttime']]['cronkey'] = $key;
                 }
             }
         }
         if ($timestamp) {
             krsort($timestamp);
             $croncache = current($timestamp);
             ignore_user_abort();
             set_time_limit(600);
             if (file_exists(LIB_PATH . 'cron/' . $croncache['dir'])) {
                 include LIB_PATH . 'cron/' . $croncache['dir'];
                 if ($croncache['dir'] == "notice.php") {
                     $notice = new notice($this->obj);
                     $notice->index();
                 }
             }
             $nexttime = $this->nextexe($croncache);
             $this->obj->DB_update_all("cron", "`nowtime`='" . time() . "',`nexttime`='" . strtotime($nexttime) . "'", "`id`='" . $value['id'] . "'");
             $cron[$croncache['cronkey']]['nexttime'] = strtotime($nexttime);
             $data['cron'] = ArrayToString($cron);
             made_web_array(PLUS_PATH . 'cron.cache.php', $data);
         }
     }
 }
开发者ID:justinyaoqi,项目名称:qyhr,代码行数:37,代码来源:index.class.php

示例6: NoticePMs

 public static function NoticePMs()
 {
     global $User;
     try {
         $message = notice::sendPMs();
     } catch (Exception $e) {
         $message = $e->getMessage();
     }
     if ($message) {
         print '<p class="notice">' . $message . '</p>';
     }
     $pms = self::getType('PM', 50);
     if (!count($pms)) {
         print '<div class="hr"></div>';
         print '<p class="notice">' . l_t('No private messages found; you can send them to other people on their profile page.') . '</p>';
         return;
     }
     print '<div class="hr"></div>';
     foreach ($pms as $pm) {
         print $pm->viewedSplitter();
         print $pm->html();
     }
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:23,代码来源:index.php

示例7: indexNotices

 function indexNotices()
 {
     global $msg, $dbh, $charset, $PMBusername;
     if (SESSrights & ADMINISTRATION_AUTH) {
         //NOTICES
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_notices"], ENT_QUOTES, $charset) . "</h3>";
         $query = mysql_query("SELECT notice_id FROM notices");
         if (mysql_num_rows($query)) {
             while ($row = mysql_fetch_object($query)) {
                 // constitution des pseudo-indexes
                 notice::majNotices($row->notice_id);
             }
             mysql_free_result($query);
         }
         $notices = mysql_query("SELECT count(1) FROM notices", $dbh);
         $count = mysql_result($notices, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_notices"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_notices"], ENT_QUOTES, $charset);
         //AUTEURS
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_authors"], ENT_QUOTES, $charset) . "</h3>";
         $query = mysql_query("SELECT author_id as id,concat(author_name,' ',author_rejete,' ', author_lieu, ' ',author_ville,' ',author_pays,' ',author_numero,' ',author_subdivision) as auteur from authors LIMIT {$start}, {$lot}", $dbh);
         if (mysql_num_rows($query)) {
             while ($row = mysql_fetch_object($query)) {
                 // constitution des pseudo-indexes
                 $ind_elt = strip_empty_chars($row->auteur);
                 $req_update = "UPDATE authors ";
                 $req_update .= " SET index_author=' {$ind_elt} '";
                 $req_update .= " WHERE author_id={$row->id} ";
                 $update = mysql_query($req_update, $dbh);
             }
             mysql_free_result($query);
         }
         $elts = mysql_query("SELECT count(1) FROM authors", $dbh);
         $count = mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_authors"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_authors"], ENT_QUOTES, $charset);
         //EDITEURS
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_publishers"], ENT_QUOTES, $charset) . "</h3>";
         $query = mysql_query("SELECT ed_id as id, ed_name as publisher, ed_ville, ed_pays from publishers");
         if (mysql_num_rows($query)) {
             while ($row = mysql_fetch_object($query)) {
                 // constitution des pseudo-indexes
                 $ind_elt = strip_empty_chars($row->publisher . " " . $row->ed_ville . " " . $row->ed_pays);
                 $req_update = "UPDATE publishers ";
                 $req_update .= " SET index_publisher=' {$ind_elt} '";
                 $req_update .= " WHERE ed_id={$row->id} ";
                 $update = mysql_query($req_update);
             }
             mysql_free_result($query);
         }
         $elts = mysql_query("SELECT count(1) FROM publishers", $dbh);
         $count = mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_publishers"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_publishers"], ENT_QUOTES, $charset);
         //CATEGORIES
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_categories"], ENT_QUOTES, $charset) . "</h3>";
         $req = "select num_noeud, langue, libelle_categorie from categories";
         $query = mysql_query($req, $dbh);
         if (mysql_num_rows($query)) {
             while ($row = mysql_fetch_object($query)) {
                 // constitution des pseudo-indexes
                 $ind_elt = strip_empty_words($row->libelle_categorie, $row->langue);
                 $req_update = "UPDATE categories ";
                 $req_update .= "SET index_categorie=' {$ind_elt} '";
                 $req_update .= "WHERE num_noeud='" . $row->num_noeud . "' and langue='" . $row->langue . "' ";
                 $update = mysql_query($req_update);
             }
             mysql_free_result($query);
         }
         $elts = mysql_query("SELECT count(1) FROM categories", $dbh);
         $count = mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_categories"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_categories"], ENT_QUOTES, $charset);
         //COLLECTIONS
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_collections"], ENT_QUOTES, $charset) . "</h3>";
         $query = mysql_query("SELECT collection_id as id, collection_name as collection from collections");
         if (mysql_num_rows($query)) {
             while ($row = mysql_fetch_object($query)) {
                 // constitution des pseudo-indexes
                 $ind_elt = strip_empty_words($row->collection);
                 $req_update = "UPDATE collections ";
                 $req_update .= " SET index_coll=' {$ind_elt} '";
                 $req_update .= " WHERE collection_id={$row->id} ";
                 $update = mysql_query($req_update);
             }
             mysql_free_result($query);
         }
         $elts = mysql_query("SELECT count(1) FROM collections", $dbh);
         $count = mysql_result($elts, 0, 0);
         $result .= "" . htmlentities($msg["nettoyage_reindex_collections"], ENT_QUOTES, $charset) . " {$count} " . htmlentities($msg["nettoyage_res_reindex_collections"], ENT_QUOTES, $charset);
         //SOUSCOLLECTIONS
         $result .= "<h3>" . htmlentities($msg["nettoyage_reindex_sub_collections"], ENT_QUOTES, $charset) . "</h3>";
         $query = mysql_query("SELECT sub_coll_id as id, sub_coll_name as sub_collection from sub_collections");
         if (mysql_num_rows($query)) {
             while ($row = mysql_fetch_object($query)) {
                 // constitution des pseudo-indexes
                 $ind_elt = strip_empty_words($row->sub_collection);
                 $req_update = "UPDATE sub_collections ";
                 $req_update .= " SET index_sub_coll=' {$ind_elt} '";
                 $req_update .= " WHERE sub_coll_id={$row->id} ";
                 $update = mysql_query($req_update);
             }
             mysql_free_result($query);
         }
//.........这里部分代码省略.........
开发者ID:bouchra012,项目名称:PMB,代码行数:101,代码来源:pmbesIndex.class.php

示例8: pmb_mysql_query

    $requete .= ", expl_comment='" . ${f_ex_comment} . "'";
    $requete .= ", expl_prix='{$f_ex_prix}'";
    $requete .= ", expl_owner='{$f_ex_owner}'";
    $requete .= ", type_antivol='{$type_antivol}'";
    $requete .= ", expl_nbparts='{$f_ex_nbparts}'";
    $requete .= $limiter;
    $result = pmb_mysql_query($requete, $dbh);
    if (!$expl_id) {
        $expl_id = pmb_mysql_insert_id();
        audit::insert_creation(AUDIT_EXPL, $expl_id);
    } else {
        $audit->get_new_infos("SELECT expl_statut, expl_location, transfert_location_origine, transfert_statut_origine, transfert_section_origine, expl_owner FROM exemplaires WHERE expl_cb='{$f_ex_cb}' ");
        $audit->save_info_modif(AUDIT_EXPL, $expl_id, "expl_update.inc.php");
    }
    // traitement des concepts
    if ($thesaurus_concepts_active == 1) {
        $index_concept = new index_concept($expl_id, TYPE_EXPL);
        $index_concept->save();
    }
    //Insertion des champs personalisés
    $p_perso->rec_fields_perso($expl_id);
    // Mise a jour de la table notices_mots_global_index
    notice::majNoticesMotsGlobalIndex($id, 'expl');
    // tout va bene, on réaffiche l'ISBD
    print "<div class='row'><div class='msg-perio'>" . $msg[maj_encours] . "</div></div>";
    $id_form = md5(microtime());
    $retour = "./catalog.php?categ=isbd&id={$id}";
    print "\n\t\t<form class='form-{$current_module}' name=\"dummy\" method=\"post\" action=\"{$retour}\" style=\"display:none\">\n\t\t\t<input type=\"hidden\" name=\"id_form\" value=\"{$id_form}\">\n\t\t</form>\n\t\t<script type=\"text/javascript\">document.dummy.submit();</script>\n\t\t";
} else {
    error_message($msg[301], $msg[303], 1, "./catalog.php?categ=isbd&id={$id}");
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:expl_update.inc.php

示例9: formatdate

 $resa_date_fin = formatdate($resa['resa_date_fin']);
 $resa_qty = $resa['resa_qty'];
 $resa_loc_retrait = $resa['location_libelle'];
 if ($resa_idnotice) {
     // affiche la notice correspondant à la réservation
     $requete = "SELECT * FROM notices WHERE notice_id='" . $resa_idnotice . "' ";
     $res = @pmb_mysql_query($requete, $dbh);
     $obj = pmb_mysql_fetch_object($res);
     $notice = new notice($obj);
     $titre = pmb_bidi($notice->print_resume(1, $css));
 } else {
     // c'est un bulletin donc j'affiche le nom de périodique et le nom du bulletin (date ou n°)
     $requete = "SELECT bulletin_id, bulletin_numero, bulletin_notice, mention_date, date_date, date_format(date_date, '" . $msg["format_date_sql"] . "') as aff_date_date FROM bulletins WHERE bulletin_id='{$resa_idbulletin}'";
     $res = pmb_mysql_query($requete, $dbh);
     $obj = pmb_mysql_fetch_object($res);
     $notice3 = new notice($obj->bulletin_notice);
     $titre = pmb_bidi($notice3->print_resume(1, $css));
     // affichage de la mention de date utile : mention_date si existe, sinon date_date
     if ($obj->mention_date) {
         $titre .= pmb_bidi("(" . $obj->mention_date . ")\n");
     } elseif ($obj->date_date) {
         $titre .= pmb_bidi("(" . $obj->aff_date_date . ")\n");
     }
 }
 $txt_dates = $msg['resa_planning_date_debut'] . $resa_date_debut . '<br />';
 $txt_dates .= $msg['resa_planning_date_fin'] . $resa_date_fin . '<br />';
 if ($resa['resa_perimee']) {
     $txt_dates .= $msg['resa_planning_overtime'];
 } else {
     $txt_dates .= $msg['resa_planning_attente_validation'];
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:resa_planning.inc.php

示例10: update_index

 static function update_index($id)
 {
     global $dbh;
     global $include_path;
     $indexation_authority = new indexation_authority($include_path . "/indexation/authorities/titres_uniformes/champs_base.xml", "authorities", AUT_TABLE_TITRES_UNIFORMES);
     $indexation_authority->maj($id);
     // On cherche tous les n-uplet de la table notice correspondant à ce titre_uniforme.
     $found = pmb_mysql_query("select ntu_num_notice from notices_titres_uniformes where ntu_num_tu = " . $id, $dbh);
     // Pour chaque n-uplet trouvés on met a jour la table notice_global_index avec l'auteur modifié :
     while ($mesNotices = pmb_mysql_fetch_object($found)) {
         $notice_id = $mesNotices->ntu_num_notice;
         notice::majNoticesGlobalIndex($notice_id);
         notice::majNoticesMotsGlobalIndex($notice_id, 'uniformtitle');
         //TODO preciser le datatype avant d'appeler cette fonction
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:16,代码来源:titre_uniforme.class.php

示例11: update_notice

 function update_notice($notice_id)
 {
     global $pmb_type_audit;
     global $webdav_current_user_name, $webdav_current_user_id;
     global $gestion_acces_active, $gestion_acces_user_notice, $gestion_acces_empr_notice;
     $obj = $this;
     $type = $obj->type;
     $obj->update_notice_infos($notice_id);
     while ($obj = $obj->parentNode) {
         if ($obj->type != $type) {
             $type = $obj->type;
             $obj->update_notice_infos($notice_id);
         }
     }
     if ($pmb_type_audit) {
         $query = "INSERT INTO audit SET ";
         $query .= "type_obj='1', ";
         $query .= "object_id='{$notice_id}', ";
         $query .= "user_id='{$webdav_current_user_id}', ";
         $query .= "user_name='{$webdav_current_user_name}', ";
         $query .= "type_modif=2 ";
         $result = @pmb_mysql_query($query);
     }
     \notice::majNoticesGlobalIndex($notice_id);
     \notice::majNoticesMotsGlobalIndex($notice_id);
     //TODO - Calcul des droits sur la notice dans les 2 domaines...
     $ac = new \acces();
     //pour la gestion
     if ($gestion_acces_active == 1 && $gestion_acces_user_notice == 1) {
         $dom_1 = $ac->setDomain(1);
         $dom_1->applyRessourceRights($notice_id);
     }
     //pour l'opac
     if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
         $dom_2 = $ac->setDomain(2);
         $dom_2->applyRessourceRights($notice_id);
     }
 }
开发者ID:hogsim,项目名称:PMB,代码行数:38,代码来源:Collection.php

示例12: pmb_mysql_query

    $p_perso->rec_fields_perso($expl_id);
    // Mise a jour de la table notices_mots_global_index pour toutes les notices en relation avec l'exemplaire
    $req_maj = "SELECT bulletin_notice,num_notice, analysis_notice FROM bulletins LEFT JOIN analysis ON analysis_bulletin=bulletin_id WHERE bulletin_id='" . $expl_bulletin . "'";
    $res_maj = pmb_mysql_query($req_maj);
    if ($res_maj && pmb_mysql_num_rows($res_maj)) {
        $first = true;
        //Pour la premiere ligne de résultat on doit indexer aussi la notice de périodique et de bulletin au besoin
        while ($ligne = pmb_mysql_fetch_object($res_maj)) {
            if ($first) {
                if ($ligne->bulletin_notice) {
                    notice::majNoticesMotsGlobalIndex($ligne->bulletin_notice, 'expl');
                }
                if ($ligne->num_notice) {
                    notice::majNoticesMotsGlobalIndex($ligne->num_notice, 'expl');
                }
            }
            if ($ligne->analysis_notice) {
                notice::majNoticesMotsGlobalIndex($ligne->analysis_notice, 'expl');
            }
            $first = false;
        }
    }
    $id_form = md5(microtime());
    print "<div class='row'><div class='msg-perio'>" . $msg[maj_encours] . "</div></div>";
    $retour = "./catalog.php?categ=serials&sub=view&sub=bulletinage&action=view&bul_id={$expl_bulletin}";
    if ($pointage) {
        $templates = "<script type='text/javascript'>\n\t\n\t\t\tfunction Fermer(obj,type_doc) {\t\t\n\t\t\t\tvar obj_1=obj+\"_1\";\t\n\t\t\t\tvar obj_2=obj+\"_2\";\t\n\t\t\t\tvar obj_3=obj+\"_3\";\t\t\n\t\t\t\tparent.document.getElementById(obj_1).disabled = true;\n\t\t\t\tparent.document.getElementById(obj_2).disabled = true;\n\t\t\t\tparent.document.getElementById(obj_3).disabled = true;\t\t\t\t\t\t\t\t\n\t\t\t \tparent.kill_frame_periodique();\n\t\t\t}\t\n\t\n\t\t</script>\n\t\t<script type='text/javascript'>Fermer('{$id_bull}','{$type_doc}');</script>\n\t\t";
    } else {
        print "<form class='form-{$current_module}' name=\"dummy\" method=\"post\" action=\"{$retour}\" style=\"display:none\">\n\t\t<input type=\"hidden\" name=\"id_form\" value=\"{$id_form}\">\n\t\t</form>\n\t\t<script type=\"text/javascript\">document.dummy.submit();</script>";
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:bul_expl_update.inc.php

示例13: show_notice_form

 function show_notice_form()
 {
     // affichage du form de création/modification d'une notice
     $myNotice = new notice($this->num_notice);
     if (!$myNotice->id) {
         $myNotice->tit1 = $this->titre_demande;
     }
     $myNotice->action = "./demandes.php?categ=gestion&act=upd_notice&iddemande=" . $this->id_demande . "&id=";
     $myNotice->link_annul = "./demandes.php?categ=gestion&act=see_dmde&iddemande=" . $this->id_demande;
     print $myNotice->show_form();
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:11,代码来源:demandes.class.php

示例14: update_in_database

 function update_in_database($id_notice = 0)
 {
     global $dbh;
     global $pmb_synchro_rdf;
     $new_notice = 2;
     $notice_retour = $id_notice;
     if (!$id_notice) {
         $retour = array(2, 0);
         return $retour;
     }
     //synchro_rdf
     if ($pmb_synchro_rdf) {
         $synchro_rdf = new synchro_rdf();
         $synchro_rdf->delRdf($notice_retour, 0);
     }
     // traitement des titres uniformes
     global $pmb_use_uniform_title;
     if ($pmb_use_uniform_title) {
         if (count($this->titres_uniformes)) {
             $ntu = new tu_notice($id_notice);
             $ntu->update($this->titres_uniformes);
         }
     }
     for ($i = 0; $i < 2; $i++) {
         if ($this->editors[$i]['id']) {
             $editor_ids[$i] = $this->editors[$i]['id'];
         } else {
             $editor_ids[$i] = editeur::import($this->editors[$i]);
         }
     }
     if ($this->collection["id"]) {
         $collection_id = $this->collection["id"];
     } else {
         $this->collection['parent'] = $editor_ids[0];
         $collection_id = collection::import($this->collection);
     }
     if ($this->subcollection["id"]) {
         $subcollection_id = $this->subcollection["id"];
     } else {
         $this->subcollection['coll_parent'] = $collection_id;
         $subcollection_id = subcollection::import($this->subcollection);
         $serie_id = serie::import(stripslashes($this->serie));
     }
     /* traitement de Dewey */
     if (!$this->internal_index) {
         if (!$this->dewey["new_comment"]) {
             $this->dewey["new_comment"] = "";
         }
         if (!$this->dewey["new_pclass"]) {
             $this->dewey["new_pclass"] = "";
         }
         $this->internal_index = indexint::import(clean_string($this->dewey[0]), clean_string($this->dewey["new_comment"]), clean_string($this->dewey["new_pclass"]));
     }
     $date_parution_z3950 = notice::get_date_parution($this->year);
     /* Origine de la notice */
     $this->orinot_id = origine_notice::import($this->origine_notice);
     if ($this->orinot_id == 0) {
         $this->orinot_id = 1;
     }
     $sql_ins = "update notices set\n\t\t\ttypdoc           \t='" . $this->document_type . "',\n\t\t\tcode        \t        ='" . $this->isbn . "',\t            \n\t\t\ttit1                    ='" . $this->titles[0] . "',             \n\t\t\ttit2                    ='" . $this->titles[1] . "',             \n\t\t\ttit3                    ='" . $this->titles[2] . "',             \n\t\t\ttit4                    ='" . $this->titles[3] . "',             \n\t\t\ttparent_id              ='" . $serie_id . "',                    \n\t\t\ttnvol                   ='" . $this->nbr_in_serie . "',          \n\t\t\ted1_id                  =" . $editor_ids[0] . " ,                \n\t\t\ted2_id                  =" . $editor_ids[1] . " ,                \n\t\t\tyear                    ='" . $this->year . "',                  \n\t\t\tnpages                  ='" . $this->page_nbr . "',              \n\t\t\till                     ='" . $this->illustration . "',          \n\t\t\tsize                    ='" . $this->size . "',                  \n\t\t\taccomp                  ='" . $this->accompagnement . "',        \n\t\t\tcoll_id                 =" . $collection_id . " ,                \n\t\t\tsubcoll_id              =" . $subcollection_id . " ,             \n\t\t\tnocoll                  ='" . $this->nbr_in_collection . "',     \n\t\t\tmention_edition         ='" . $this->mention_edition . "',       \n\t\t\tn_gen                   ='" . $this->general_note . "',          \n\t\t\tn_contenu               ='" . $this->content_note . "',          \n\t\t\tn_resume                ='" . $this->abstract_note . "',         \n\t\t\tindexint                ='" . $this->internal_index . "',          \n\t\t\tstatut\t\t\t\t\t='" . $this->statut . "',\n\t\t\tcommentaire_gestion\t\t='" . $this->commentaire_gestion . "',\n\t\t\tindexation_lang\t\t\t='" . $this->indexation_lang . "',\n\t\t\tthumbnail_url\t\t\t='" . $this->thumbnail_url . "',\n\t\t\tindex_l                 ='" . clean_tags($this->free_index) . "',                \n\t\t\tniveau_biblio           ='" . $this->bibliographic_level . "',   \n\t\t\tniveau_hierar           ='" . $this->hierarchic_level . "',      \n\t\t\tlien                    ='" . $this->link_url . "',              \n\t\t\teformat                 ='" . $this->link_format . "',           \n\t\t\torigine_catalogage      ='" . $this->orinot_id . "',             \n\t\t\tprix                    ='" . $this->prix . "',\n\t\t\tdate_parution \t\t\t='" . $date_parution_z3950 . "'             \n\t\t\twhere notice_id='{$id_notice}' ";
     //echo "<pre>";
     //print_r($this->aut_array);
     //echo "</pre>";
     //echo $sql_ins."<br />";
     //echo "<pre>";
     //print_r($this->categories);
     //echo "</pre>";
     //exit;
     $sql_result_ins = pmb_mysql_query($sql_ins) or die("Couldn't update notices : " . $sql_ins);
     $notice_retour = $id_notice;
     audit::insert_modif(AUDIT_NOTICE, $id_notice);
     // purge de la base des responsabilités de la notice intégrée...
     if ($notice_retour) {
         $rqt_del = "delete from responsability where responsability_notice='{$notice_retour}'";
         $sql_result_del = pmb_mysql_query($rqt_del) or die("Couldn't purge table responsability : " . $rqt_del);
     }
     $rqt_ins = "insert into responsability (responsability_author, responsability_notice, responsability_fonction, responsability_type, responsability_ordre) VALUES ";
     for ($i = 0; $i < sizeof($this->aut_array); $i++) {
         $aut['id'] = clean_string($this->aut_array[$i]['id']);
         $aut['name'] = clean_string($this->aut_array[$i]['entree']);
         $aut['rejete'] = clean_string($this->aut_array[$i]['rejete']);
         $aut['date'] = clean_string($this->aut_array[$i]['date']);
         $aut['type'] = $this->aut_array[$i]['type_auteur'];
         $aut['subdivision'] = clean_string($this->aut_array[$i]['subdivision']);
         $aut['numero'] = clean_string($this->aut_array[$i]['numero']);
         $aut['lieu'] = clean_string($this->aut_array[$i]['lieu']);
         $aut['ville'] = clean_string($this->aut_array[$i]['ville']);
         $aut['pays'] = clean_string($this->aut_array[$i]['pays']);
         $aut['web'] = clean_string($this->aut_array[$i]['web']);
         $aut['author_comment'] = clean_string($this->aut_array[$i]['author_comment']);
         $aut['authority_number'] = clean_string($this->aut_array[$i]['authority_number']);
         /* Origine de l'autorité : on reprend les infos d'origine de la notice pour les attribuées aux origines des autorités */
         $id_origine_auth = 0;
         $id_origine_auth = origin_authorities::import($this->origine_notice);
         if ($id_origine_auth == 0) {
             $id_origine_auth = 1;
         }
         // import de l'autorité auteur si elle n'existe pas et conservation des infos sur l'origine de l'autorité
         if ($aut['authority_number'] != '' && $id_origine_auth) {
             $this->aut_array[$i]["id"] = $this->insert_authority_infos($aut['authority_number'], "author", $id_origine_auth, $aut);
//.........这里部分代码省略.........
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:z3950_notice.class.php

示例15: delete_notice

 function delete_notice()
 {
     global $dbh;
     global $demandes_statut_notice, $pmb_type_audit;
     notice::del_notice($this->num_notice);
     // mise à jour de la demande
     $req = "UPDATE demandes SET num_notice=0 WHERE id_demande=" . $this->id_demande;
     pmb_mysql_query($req, $dbh);
     $this->num_notice = 0;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:10,代码来源:demandes.class.php


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