本文整理汇总了PHP中notice::get_date_parution方法的典型用法代码示例。如果您正苦于以下问题:PHP notice::get_date_parution方法的具体用法?PHP notice::get_date_parution怎么用?PHP notice::get_date_parution使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类notice
的用法示例。
在下文中一共展示了notice::get_date_parution方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: genDateTri
function genDateTri()
{
global $msg, $dbh, $charset, $PMBusername;
if (SESSrights & ADMINISTRATION_AUTH) {
$result .= "<h3>" . htmlentities($msg["gen_date_tri_msg"], ENT_QUOTES, $charset) . "</h3>";
$query = mysql_query("select notice_id, year, niveau_biblio, niveau_hierar from notices order by notice_id");
if (mysql_num_rows($query)) {
while ($mesNotices = mysql_fetch_assoc($query)) {
switch ($mesNotices['niveau_biblio'] . $mesNotices['niveau_hierar']) {
case 'a2':
//Si c'est un article, on récupère la date du bulletin associé
$reqAnneeArticle = "SELECT date_date FROM bulletins, analysis WHERE analysis_bulletin=bulletin_id AND analysis_notice='" . $mesNotices['notice_id'] . "'";
$queryArt = mysql_query($reqAnneeArticle, $dbh);
if (!mysql_num_rows($queryArt)) {
$dateArt = "";
} else {
$dateArt = mysql_result($queryArt, 0, 0);
}
if ($dateArt == '0000-00-00' || !isset($dateArt) || $dateArt == "") {
$annee_art_tmp = "";
} else {
$annee_art_tmp = substr($dateArt, 0, 4);
}
//On met à jour, les notices avec la date de parution et l'année
$reqMajArt = "UPDATE notices SET date_parution='" . $dateArt . "', year='" . $annee_art_tmp . "'\n\t\t\t\t\t\t\t\t\t\tWHERE notice_id='" . $mesNotices['notice_id'] . "'";
mysql_query($reqMajArt, $dbh);
break;
case 'b2':
//Si c'est une notice de bulletin, on récupère la date pour connaitre l'année
$reqAnneeBulletin = "SELECT date_date FROM bulletins WHERE num_notice='" . $mesNotices['notice_id'] . "'";
$queryAnnee = mysql_query($reqAnneeBulletin, $dbh);
if (!mysql_num_rows($queryAnnee)) {
$dateBulletin = "";
} else {
$dateBulletin = mysql_result($queryAnnee, 0, 0);
}
if ($dateBulletin == '0000-00-00' || !isset($dateBulletin) || $dateBulletin == "") {
$annee_tmp = "";
} else {
$annee_tmp = substr($dateBulletin, 0, 4);
}
//On met à jour date de parution et année
$reqMajBull = "UPDATE notices SET date_parution='" . $dateBulletin . "', year='" . $annee_tmp . "'\n\t\t\t\t\t\t\t\t\tWHERE notice_id='" . $mesNotices['notice_id'] . "'";
mysql_query($reqMajBull, $dbh);
break;
default:
// Mise à jour du champ date_parution des notices (monographie et pério)
$date_parution = notice::get_date_parution($mesNotices['year']);
$reqMaj = "UPDATE notices SET date_parution='" . $date_parution . "' WHERE notice_id='" . $mesNotices['notice_id'] . "'";
mysql_query($reqMaj, $dbh);
break;
}
}
mysql_free_result($query);
}
$not = mysql_query("SELECT count(1) FROM notices", $dbh);
$count = mysql_result($not, 0, 0);
$result .= $count . " " . htmlentities($msg['gen_date_tri_msg'], ENT_QUOTES, $charset);
} else {
$result .= sprintf($msg["planificateur_rights_bad_user_rights"], $PMBusername);
}
return $result;
}
示例2: 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);
//.........这里部分代码省略.........
示例3: array
$f_categ[] = array('id' => ${$var_categid}, 'ordre' => $order);
$order++;
}
}
} else {
for ($i = 0; $i < $max_categ; $i++) {
$var_categid = "f_categ_id{$i}";
$f_categ[] = array('id' => ${$var_categid}, 'ordre' => $i);
}
}
$f_indexint ? $t_notice['indexint'] = $f_indexint_id : ($t_notice['indexint'] = 0);
$f_lien ? $t_notice['lien'] = $f_lien : ($t_notice['lien'] = '');
$t_notice['lien'] && $f_eformat ? $t_notice['eformat'] = $f_eformat : ($t_notice['eformat'] = '');
$b_level ? $t_notice['b_level'] = $b_level : ($t_notice['b_level'] = 'm');
$h_level ? $t_notice['h_level'] = $h_level : ($t_notice['h_level'] = '0');
$date_parution_notice = notice::get_date_parution($t_notice['year']);
//Champ signature
$t_notice['signature'] = $signature;
$t_notice['indexation_lang'] = $indexation_lang;
$requete .= " typdoc='{$t_notice['typdoc']}'";
$requete .= ", tit1='{$t_notice['tit1']}'";
$requete .= ", tit2='{$t_notice['tit2']}'";
$requete .= ", tit3='{$t_notice['tit3']}'";
$requete .= ", tit4='{$t_notice['tit4']}'";
$requete .= ", tparent_id={$t_notice['tparent_id']}";
$requete .= ", tnvol='{$t_notice['tnvol']}'";
$requete .= ", ed1_id='{$t_notice['ed1_id']}'";
$requete .= ", ed2_id='{$t_notice['ed2_id']}'";
$requete .= ", coll_id='{$t_notice['coll_id']}'";
$requete .= ", subcoll_id='{$t_notice['subcoll_id']}'";
$requete .= ", year='{$t_notice['year']}'";
示例4: notice
//.........这里部分代码省略.........
// importance materielle (nombre de pages, d'elements...)
$this->ill = $notice->ill;
// mention d'illustration
$this->size = $notice->size;
// format
$this->prix = $notice->prix;
// Prix du document
$this->accomp = $notice->accomp;
// materiel d'accompagnement
$this->n_gen = $notice->n_gen;
// note generale
$this->n_contenu = $notice->n_contenu;
// note de contenu
$this->n_resume = $notice->n_resume;
// resume/extrait
$this->categories = get_notice_categories($this->id);
$this->indexint = $notice->indexint;
// indexation interne
$this->index_l = $notice->index_l;
// indexation libre
$this->langues = get_notice_langues($this->id, 0);
// langues de la publication
$this->languesorg = get_notice_langues($this->id, 1);
// langues originales
$this->lien = $notice->lien;
// URL de la ressource electronique associee
$this->eformat = $notice->eformat;
// format de la ressource electronique associee
$this->biblio_level = $notice->niveau_biblio;
// niveau bibliographique
$this->hierar_level = $notice->niveau_hierar;
// niveau hierarchique
$this->statut = $notice->statut;
$this->date_parution = notice::get_date_parution($notice->year);
$this->indexation_lang = $notice->indexation_lang;
$this->is_new = $notice->notice_is_new;
$this->date_is_new = $notice->notice_date_is_new;
//liens vers autres notices
$requete = "SELECT * FROM notices_relations WHERE num_notice=" . $this->id . " OR linked_notice=" . $this->id . " order by rank";
$result_rel = pmb_mysql_query($requete);
if (pmb_mysql_num_rows($result_rel)) {
$i = 0;
while ($r_rel = pmb_mysql_fetch_object($result_rel)) {
if ($r_rel->linked_notice == $this->id) {
//notice en cours est notice fille
$this->notice_link['down'][$i]['relation_direction'] = 'down';
$this->notice_link['down'][$i]['id_notice'] = $r_rel->num_notice;
$this->notice_link['down'][$i]['title_notice'] = $this->get_notice_title($r_rel->num_notice);
$this->notice_link['down'][$i]['rank'] = $r_rel->rank;
$this->notice_link['down'][$i]['relation_type'] = $r_rel->relation_type;
} elseif ($r_rel->num_notice == $this->id) {
//notice en cours est notice mere
$this->notice_link['up'][$i]['relation_direction'] = 'up';
$this->notice_link['up'][$i]['id_notice'] = $r_rel->linked_notice;
$this->notice_link['up'][$i]['title_notice'] = $this->get_notice_title($r_rel->linked_notice);
$this->notice_link['up'][$i]['rank'] = $r_rel->rank;
$this->notice_link['up'][$i]['relation_type'] = $r_rel->relation_type;
}
$i++;
}
}
$this->commentaire_gestion = $notice->commentaire_gestion;
$this->thumbnail_url = $notice->thumbnail_url;
$this->create_date = $notice->create_date;
$this->update_date = $notice->update_date;
} else {
示例5: import_new_notice
//.........这里部分代码省略.........
$coll_id = 0;
$subcoll_id = 0;
$serie_id = 0;
$tnvol_ins = "";
$ed1_id = 0;
$ed2_id = 0;
$year = "";
$date_parution = "0000-00-00";
//On récupère le tableau des notices créées à partir du fichier temporaire (rechargement d'iframe)
if ($link_generate && !isset($notices_crees)) {
$tabimport_id = file_get_contents("{$base_path}/temp/liste_id" . SESSid . ".txt");
if ($tabimport_id) {
$tabimport_id = unserialize($tabimport_id);
$notices_crees = $tabimport_id['notices_existantes'];
$notices_a_creer = $tabimport_id['notices_a_creer'];
$bulletins_crees = $tabimport_id['bulletins_crees'];
$bulletins_a_creer = $tabimport_id['bulletins_a_creer'];
}
}
if (!is_array($notices_crees)) {
$notices_crees = array();
}
//Pour le cas ou on est sur une notice (bidon) d'article juste pour les exemplaires de bulletin
if ($bibliographic_level == "a" && $tit_200d[0] == "Article_expl_bulletin") {
//On importe rien
return;
} elseif ($tit_200d[0] == "Article_expl_bulletin") {
//Pour le cas ou on import sans les liens un fichier exporter avec les exemplaires et les liens
$tit_200d[0] = "";
}
if ($bibliographic_level != "a" && $bibliographic_level != "b") {
//Pour les articles et les bulletins on ne garde pas les informations suivantes
$year = clean_string($editeur_date[0]);
$date_parution = notice::get_date_parution($year);
//traitement des éditeurs
$editor = array();
foreach ($editeur_nom as $key_nom1 => $nom1) {
foreach ($nom1 as $key_nom2 => $nom2) {
$mon_ed = array();
$mon_ed["c"] = $nom2;
if ($editeur_adr[$key_nom1][$key_nom2]) {
$mon_ed["b"] = $editeur_adr[$key_nom1][$key_nom2];
}
if ($editeur_lieu[$key_nom1][$key_nom2]) {
$mon_ed["a"] = $editeur_lieu[$key_nom1][$key_nom2];
}
if ($editeur_pays[$key_nom1][$key_nom2]) {
$mon_ed["z"] = $editeur_pays[$key_nom1][$key_nom2];
}
if ($editeur_pmbfields[$key_nom1][$key_nom2]) {
//Si j'ai ces informations c'est un export PMB donc je n'ai pas deux editeurs dans le même 210
foreach ($editeur_pmbfields[$key_nom1] as $val9) {
if (preg_match("/^(.+?):(.+)\$/", $val9, $matches)) {
$mon_ed[trim($matches[1])] = $matches[2];
}
}
}
$editor[] = $mon_ed;
}
}
$ed = array();
$ed['name'] = clean_string($editor[0]['c']);
$ed['adr'] = clean_string($editor[0]['b']);
if ($editor[0]['adr1']) {
$ed['adr'] = clean_string($editor[0]['adr1']);
}
示例6: pmb_mysql_result
$dateBulletin = "";
} else {
$dateBulletin = pmb_mysql_result($queryAnnee, 0, 0);
}
if ($dateBulletin == '0000-00-00' || !isset($dateBulletin) || $dateBulletin == "") {
$annee_tmp = "";
} else {
$annee_tmp = substr($dateBulletin, 0, 4);
}
//On met à jour date de parution et année
$reqMajBull = "UPDATE notices SET date_parution='" . $dateBulletin . "', year='" . $annee_tmp . "'\n\t\t\t\t\t\tWHERE notice_id='" . $mesNotices['notice_id'] . "'";
pmb_mysql_query($reqMajBull, $dbh);
break;
default:
// Mise à jour du champ date_parution des notices (monographie et pério)
$date_parution = notice::get_date_parution($mesNotices['year']);
$reqMaj = "UPDATE notices SET date_parution='" . $date_parution . "' WHERE notice_id='" . $mesNotices['notice_id'] . "'";
pmb_mysql_query($reqMaj, $dbh);
break;
}
}
pmb_mysql_free_result($query);
$next = $start + $lot;
print "\n\t<form class='form-{$current_module}' name='current_state' action='./clean.php' method='post'>\n\t<input type='hidden' name='v_state' value=\"" . urlencode($v_state) . "\">\n\t<input type='hidden' name='spec' value=\"{$spec}\">\n\t<input type='hidden' name='start' value=\"{$next}\">\n\t<input type='hidden' name='count' value=\"{$count}\">\n\t</form>\n\t<script type=\"text/javascript\"><!-- \n\tsetTimeout(\"document.forms['current_state'].submit()\",1000); \n\t-->\n\t</script>";
} else {
$spec = $spec - GEN_DATE_TRI;
$not = pmb_mysql_query("SELECT count(1) FROM notices", $dbh);
$compte = pmb_mysql_result($not, 0, 0);
$v_state .= "<br /><img src=../../images/d.gif hspace=3>" . htmlentities($msg['gen_date_tri_msg'], ENT_QUOTES, $charset) . " : ";
$v_state .= $compte . " " . htmlentities($msg['gen_date_tri_msg'], ENT_QUOTES, $charset);
print "\n\t\t<form class='form-{$current_module}' name='process_state' action='./clean.php' method='post'>\n\t\t<input type='hidden' name='v_state' value=\"" . urlencode($v_state) . "\">\n\t\t<input type='hidden' name='spec' value=\"{$spec}\">\n\t\t</form>\n\t\t<script type=\"text/javascript\"><!--\n\t\t\tdocument.forms['process_state'].submit();\n\t\t\t-->\n\t\t</script>";