本文整理汇总了PHP中notice::indexation_restaure方法的典型用法代码示例。如果您正苦于以下问题:PHP notice::indexation_restaure方法的具体用法?PHP notice::indexation_restaure怎么用?PHP notice::indexation_restaure使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类notice
的用法示例。
在下文中一共展示了notice::indexation_restaure方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create_notice
public function create_notice()
{
global $dbh;
global $pmb_keyword_sep;
$fields = "\n\t\t\ttit1='" . addslashes($this->title) . "',\n\t\t\tn_resume='" . addslashes($this->summary) . "',\n\t\t\tlien='" . addslashes($this->url) . "',\n\t\t\tthumbnail_url='" . addslashes($this->logo_url) . "',\n\t\t\tdate_parution='" . addslashes($this->publication_date) . "',\n\t\t\tindex_l='" . addslashes(implode($pmb_keyword_sep, $this->tags)) . "'\n\t\t";
$req = "INSERT INTO notices SET {$fields} ";
pmb_mysql_query($req, $dbh);
$num_notice = pmb_mysql_insert_id();
if (!$num_notice) {
return array();
}
$query .= "update docwatch_items set\titem_num_notice = '" . $num_notice . "' where id_item = '" . $this->id . "'";
pmb_mysql_query($query, $dbh);
// permet de charger la bonne langue, mot vide...
$info = notice::indexation_prepare($num_notice);
// Mise a jour des index de la notice
notice::majNotices($num_notice);
// Mise a jour de la table notices_global_index
notice::majNoticesGlobalIndex($num_notice);
// Mise a jour de la table notices_mots_global_index
notice::majNoticesMotsGlobalIndex($num_notice);
// restaure l'environnement de langue
notice::indexation_restaure($info);
return array('id' => $num_notice, 'title' => $this->title, 'link' => "./catalog.php?categ=isbd&id=" . $num_notice);
}
示例2: create_notice
public function create_notice()
{
global $dbh;
global $pmb_keyword_sep;
if (docwatch_watch::check_watch_rights($this->num_watch)) {
/** Récupération des paramètres défini dans la veille pour la création de notice à partir de ses items **/
$query = "select watch_record_default_type, watch_record_default_status from docwatch_watches where id_watch =" . $this->num_watch;
$result = pmb_mysql_query($query, $dbh);
if (pmb_mysql_num_rows($result)) {
$row = pmb_mysql_fetch_object($result);
$record_type = $row->watch_record_default_type;
$record_status = $row->watch_record_default_status;
} else {
return array();
}
$tab_tag = array();
foreach ($this->tags as $tag) {
$tab_tag[] = $tag["label"];
}
$fields = "\n\t\t\t\ttit1='" . addslashes($this->title) . "',\n\t\t\t\tn_resume='" . addslashes($this->summary) . "',\n\t\t\t\tlien='" . addslashes($this->url) . "',\n\t\t\t\tthumbnail_url='" . addslashes($this->logo_url) . "',\n\t\t\t\tdate_parution='" . addslashes($this->publication_date) . "',\n\t\t\t\tyear='" . addslashes(format_date($this->publication_date)) . "',\n\t\t\t\ttypdoc='" . addslashes($record_type) . "',\n\t\t\t\tstatut='" . addslashes($record_status) . "',\n\t\t\t\tindex_l='" . addslashes(implode($pmb_keyword_sep, $tab_tag)) . "'\n\t\t\t";
$req = "INSERT INTO notices SET {$fields} ";
pmb_mysql_query($req, $dbh);
$num_notice = pmb_mysql_insert_id();
if (!$num_notice) {
return array();
}
foreach ($this->descriptors as $num_categ => $label) {
$query = "insert into notices_categories set notcateg_notice = '" . $num_notice . "', num_noeud='" . $num_categ . "'";
pmb_mysql_query($query, $dbh);
}
$query = "update docwatch_items set\titem_num_notice = '" . $num_notice . "' where id_item = '" . $this->id . "'";
pmb_mysql_query($query, $dbh);
$this->set_num_notice($num_notice);
// permet de charger la bonne langue, mot vide...
$info = notice::indexation_prepare($num_notice);
// Mise a jour des index de la notice
notice::majNotices($num_notice);
// Mise a jour de la table notices_global_index
notice::majNoticesGlobalIndex($num_notice);
// Mise a jour de la table notices_mots_global_index
notice::majNoticesMotsGlobalIndex($num_notice);
// restaure l'environnement de langue
notice::indexation_restaure($info);
return array('id' => $num_notice, 'title' => $this->title, 'link' => "./catalog.php?categ=isbd&id=" . $num_notice);
}
}
示例3: create_record_child
public function create_record_child($id_parent, $data)
{
global $dbh;
global $pmb_nomenclature_record_children_link;
$tit1 = "Notice fille temporaire de la nomenclature {$id_parent}";
$fields = "\r\n\t\ttit1='" . addslashes($tit1) . "'\r\n\t\t";
$req = "INSERT INTO notices SET {$fields} ";
pmb_mysql_query($req, $dbh);
$this->id = pmb_mysql_insert_id();
if (!$this->id) {
return 0;
}
if (!$data["rank"]) {
$data["rank"] = 1;
}
$requete = 'INSERT INTO notices_relations VALUES("' . $this->id . '","' . $id_parent . '","' . $pmb_nomenclature_record_children_link . '","' . $data["rank"] . '")';
pmb_mysql_query($requete, $dbh);
$this->save($data);
$this->fetch_datas();
$data = $this->get_data();
$tit1 = $data["instrument_name"] . $data["voice_name"];
if ($data["musicstand_name"]) {
$tit1 .= " / " . $data["musicstand_name"];
}
if ($data["formation_label"]) {
$tit1 .= " / " . $data["formation_label"];
}
$fields = "\r\n\t\ttit1='" . addslashes($tit1) . "'\r\n\t\t";
$req = "UPDATE notices SET {$fields} where notice_id= " . $this->id;
pmb_mysql_query($req, $dbh);
// permet de charger la bonne langue, mot vide...
$info = notice::indexation_prepare($this->id);
// Mise a jour des index de la notice
notice::majNotices($this->id);
// Mise a jour de la table notices_global_index
notice::majNoticesGlobalIndex($this->id);
// Mise a jour de la table notices_mots_global_index
notice::majNoticesMotsGlobalIndex($this->id);
// restaure l'environnement de langue
notice::indexation_restaure($info);
return array('id' => $this->id, 'title' => $tit1);
}
示例4: error_message
} else {
// echec de la requete
error_message($libelle, $msg[281], 1, "./catalog.php");
}
//Recherche du titre uniforme automatique
global $opac_enrichment_bnf_sparql;
$opac_enrichment_bnf_sparql = 1;
$titre_uniforme = notice::getAutomaticTu($id);
// permet de charger la bonne langue, mot vide...
$info = notice::indexation_prepare($id);
// Mise a jour des index de la notice
notice::majNotices($id);
// Mise a jour de la table notices_global_index
notice::majNoticesGlobalIndex($id);
// Mise a jour de la table notices_mots_global_index
notice::majNoticesMotsGlobalIndex($id);
// restaure l'environnement de langue
notice::indexation_restaure($info);
//synchro_rdf
if ($pmb_synchro_rdf) {
$synchro_rdf->addRdf($id, 0);
}
} else {
if ($f_tit1 == "") {
// erreur : le champ tit1 est vide
error_message($libelle, $notitle_message, 1, "./catalog.php");
} else {
error_message_history($msg["notice_champs_perso"], $p_perso->error_message, 1);
}
}
}
示例5: majNoticesTotal
static function majNoticesTotal($notice)
{
$info = notice::indexation_prepare($notice);
notice::majNotices($notice);
notice::majNoticesGlobalIndex($notice);
notice::majNoticesMotsGlobalIndex($notice);
notice::indexation_restaure($info);
}
示例6: pmb_init_indexation_records
function pmb_init_indexation_records()
{
global $dbh, $msg;
$result = pmb_mysql_query("select notice_id from notices", $dbh);
if ($result) {
$count = pmb_mysql_num_rows($result);
if ($count) {
while ($mesNotices = pmb_mysql_fetch_assoc($result)) {
// permet de charger la bonne langue, mot vide...
$info = notice::indexation_prepare($mesNotices['notice_id']);
// Mise à jour de la table "notices_global_index"
notice::majNoticesGlobalIndex($mesNotices['notice_id']);
// Mise à jour de la table "notices_mots_global_index"
notice::majNoticesMotsGlobalIndex($mesNotices['notice_id']);
// restaure l'environnement de langue
notice::indexation_restaure($info);
}
pmb_indexation_display($msg["nettoyage_reindex_notices"], $count . " " . $msg["nettoyage_res_reindex_notices"]);
}
}
}