1 | <?php |
---|
2 | // +-------------------------------------------------+ |
---|
3 | // © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net) |
---|
4 | // +-------------------------------------------------+ |
---|
5 | // $Id: export.class.php,v 1.73.4.1 2015-11-18 09:48:51 mbertin Exp $ |
---|
6 | |
---|
7 | //Export d'une notice PMB en XML PMB MARC |
---|
8 | |
---|
9 | if (stristr($_SERVER['REQUEST_URI'], ".class.php")) die("no access"); |
---|
10 | |
---|
11 | // le fichier spécifique d'import contient la fonction d'export spécifique des exemplaires |
---|
12 | if (!$pmb_import_modele) $pmb_import_modele= "func_bdp.inc.php" ; |
---|
13 | if (file_exists($base_path."/admin/import/".$pmb_import_modele)) { |
---|
14 | require_once ("$base_path/admin/import/$pmb_import_modele") ; |
---|
15 | } |
---|
16 | require_once($class_path."/parametres_perso.class.php"); |
---|
17 | require_once("$class_path/XMLlist.class.php"); |
---|
18 | |
---|
19 | class export { |
---|
20 | |
---|
21 | var $notice; |
---|
22 | var $xml_array = array(); |
---|
23 | var $notice_list = array(); |
---|
24 | var $current_notice = 0; |
---|
25 | var $notice_exporte=array(); |
---|
26 | //Enregistre les bulletins déja exporté |
---|
27 | var $bulletins_exporte=array(); |
---|
28 | //Pour savoir si il y des bulletins à exporter |
---|
29 | var $expl_bulletin_a_exporter=array(); |
---|
30 | |
---|
31 | //Initialisation avec une liste de numeros de notices (si liste vide alors on prend toute la base) |
---|
32 | function export($l_idnotices, $noti_exporte=array(),$bull_exporte=array()) { |
---|
33 | $this->notice_exporte = $noti_exporte; |
---|
34 | $this->bulletins_exporte = $bull_exporte; |
---|
35 | if (is_array($l_idnotices)) { |
---|
36 | $this -> notice_list = $l_idnotices; |
---|
37 | } else { |
---|
38 | if ($l_idnotices != "") { |
---|
39 | $this -> notice_list[] = $l_idnotices; |
---|
40 | } else { |
---|
41 | $requete = "select distinct notice_id from notices"; |
---|
42 | $resultat = pmb_mysql_query($requete); |
---|
43 | while (($res = pmb_mysql_fetch_object($resultat))) { |
---|
44 | $this -> notice_list[] = $res -> notice_id; |
---|
45 | } |
---|
46 | } |
---|
47 | } |
---|
48 | } |
---|
49 | |
---|
50 | //Conversion au format XML du tableau de donnees |
---|
51 | function toxml() { |
---|
52 | global $charset; |
---|
53 | $this -> notice = "<notice>\n"; |
---|
54 | //Record descriptor |
---|
55 | $desc=array("rs","dt","bl","hl","el","ru"); |
---|
56 | for ($i=0; $i<count($desc); $i++) { |
---|
57 | $this->notice.=" <".$desc[$i].">"; |
---|
58 | if ($this->xml_array[$desc[$i]]["value"]=="") $this->xml_array[$desc[$i]]["value"]="*"; |
---|
59 | $this->notice.=$this->xml_array[$desc[$i]]["value"]."</".$desc[$i].">\n"; |
---|
60 | } |
---|
61 | for ($i = 0; $i < count($this -> xml_array["f"]); $i ++) { |
---|
62 | $this -> notice.= " <f"; |
---|
63 | foreach ( $this -> xml_array["f"][$i] as $key => $value ) { //Pour chaque attribut |
---|
64 | if((!is_array($value)) && ($key!="ind") && ($key!="value")){ // Si c'est un attr et pas l'indicateur "ind" |
---|
65 | $this -> notice.= " ".$key."=\"".htmlspecialchars($value,ENT_QUOTES,$charset)."\""; //On construit le champ f avec nom de l'attribut = sa valeur |
---|
66 | } |
---|
67 | } |
---|
68 | if ($this -> xml_array["f"][$i]["value"] == "") { |
---|
69 | $this -> notice.= " ind=\"".$this -> xml_array["f"][$i]["ind"]."\""; |
---|
70 | } |
---|
71 | $this -> notice.= ">"; |
---|
72 | if ($this -> xml_array["f"][$i]["value"] == "") { |
---|
73 | $this->notice.="\n"; |
---|
74 | for ($j = 0; $j < count($this -> xml_array["f"][$i]["s"]); $j ++) { |
---|
75 | $this -> notice.= " <s c=\"".$this -> xml_array["f"][$i]["s"][$j]["c"]."\">".htmlspecialchars($this -> xml_array["f"][$i]["s"][$j]["value"],ENT_QUOTES,$charset)."</s>\n"; |
---|
76 | } |
---|
77 | $this->notice.=" "; |
---|
78 | } else { |
---|
79 | $this -> notice.=htmlspecialchars($this -> xml_array["f"][$i]["value"],ENT_QUOTES,$charset); |
---|
80 | } |
---|
81 | |
---|
82 | $this -> notice.= "</f>\n"; |
---|
83 | } |
---|
84 | $this -> notice.= "</notice>\n"; |
---|
85 | } |
---|
86 | |
---|
87 | function tojson() { |
---|
88 | $this->notice = json_encode($this->xml_array); |
---|
89 | } |
---|
90 | |
---|
91 | function toserialized() { |
---|
92 | $this->notice = serialize($this->xml_array); |
---|
93 | } |
---|
94 | |
---|
95 | function to_raw_array() { |
---|
96 | $this->notice = $this->xml_array; |
---|
97 | } |
---|
98 | |
---|
99 | //Ajout d'un champ dans le tableau de donnees |
---|
100 | function add_field($field_code, $field_ind, $sub_fields, $value = "",$attrs= "") { |
---|
101 | $f_ = array(); |
---|
102 | $f_["c"] = $field_code; |
---|
103 | |
---|
104 | if ($field_ind) |
---|
105 | $f_["ind"] = $field_ind; |
---|
106 | if(is_array($attrs)){ //Si on a un tableau d'attribut |
---|
107 | foreach ( $attrs as $key1 => $value1 ) {//Pour chaque couple (nom,valeur) de chaque attribut |
---|
108 | $f_[$key1] = $value1; |
---|
109 | } |
---|
110 | } |
---|
111 | if ($value == "" && is_array($sub_fields)) { |
---|
112 | $flag_s = 0; |
---|
113 | while (list ($key, $val) = each($sub_fields)) { |
---|
114 | if(is_array($val)){ |
---|
115 | foreach($val as $valeur){ |
---|
116 | $s = array(); |
---|
117 | $s["c"] = $key; |
---|
118 | $s["value"] = $valeur; |
---|
119 | $f_["s"][] = $s; |
---|
120 | $flag_s = 1; |
---|
121 | } |
---|
122 | } elseif ($val) { |
---|
123 | $s = array(); |
---|
124 | $s["c"] = $key; |
---|
125 | $s["value"] = $val; |
---|
126 | $f_["s"][] = $s; |
---|
127 | $flag_s = 1; |
---|
128 | } |
---|
129 | } |
---|
130 | } else { |
---|
131 | $f_["value"] = $value; |
---|
132 | $flag_s = 1; |
---|
133 | } |
---|
134 | if ($flag_s) |
---|
135 | $this -> xml_array["f"][] = $f_; |
---|
136 | } |
---|
137 | |
---|
138 | //Generation XML de la prochaine notice (renvoi true si prochaine notice, false si plus de notices disponibles) |
---|
139 | function get_next_notice($lender = "", $td = array(), $sd = array(), $keep_expl = false, $params=array()) { |
---|
140 | global $is_expl_caddie; |
---|
141 | global $include_path, $lang; |
---|
142 | global $opac_show_book_pics; |
---|
143 | global $dbh,$charset; |
---|
144 | |
---|
145 | if (!$is_expl_caddie) { |
---|
146 | $requete_panier="SHOW TABLES LIKE 'expl_cart_id'"; |
---|
147 | $res_panier=@pmb_mysql_query($requete_panier); |
---|
148 | if ($res_panier && pmb_mysql_num_rows($res_panier)) $is_expl_caddie=2; else $is_expl_caddie=1; |
---|
149 | } |
---|
150 | unset($this->xml_array); |
---|
151 | $this -> xml_array = array(); |
---|
152 | $this -> notice = ""; |
---|
153 | |
---|
154 | if (($this->current_notice!=-1)&&(array_search($this->notice_list[$this -> current_notice],$this->notice_exporte)!==false)) { |
---|
155 | $this -> current_notice++; |
---|
156 | if ($this -> current_notice >= count($this -> notice_list)) |
---|
157 | $this -> current_notice = -1; |
---|
158 | return true; |
---|
159 | } |
---|
160 | |
---|
161 | if ($this -> current_notice != -1) { |
---|
162 | //Recuperation des infos de la notice |
---|
163 | $requete = "select * from notices where notice_id=".$this -> notice_list[$this -> current_notice]; |
---|
164 | $resultat = pmb_mysql_query($requete); |
---|
165 | $res = pmb_mysql_fetch_object($resultat); |
---|
166 | |
---|
167 | if (!$res) |
---|
168 | return false; |
---|
169 | |
---|
170 | //Remplissage des champs immediats |
---|
171 | |
---|
172 | //Numero unique de la base |
---|
173 | $this -> add_field("001", "", "", $res -> notice_id); |
---|
174 | |
---|
175 | //Champ de traitement |
---|
176 | if($charset == "utf-8"){ |
---|
177 | $encodage="50 "; |
---|
178 | }else{ |
---|
179 | $encodage="0103"; |
---|
180 | } |
---|
181 | $c100=substr($res -> create_date, 0, 4).substr($res -> create_date, 5, 2).substr($res -> create_date, 8, 2)."u u u0frey".$encodage." ba"; |
---|
182 | $this-> add_field("100"," ",array("a"=>$c100),""); |
---|
183 | |
---|
184 | //Titre |
---|
185 | $titre[c] = "200"; |
---|
186 | $titre[ind] = "1 "; |
---|
187 | $labels = array("a", "c", "d", "e"); |
---|
188 | $subfields = array(); |
---|
189 | for ($i = 1; $i < 5; $i ++) { |
---|
190 | $v=""; |
---|
191 | eval("\$v=\$res->tit$i;"); |
---|
192 | $subfields[$labels[$i -1]] = $v; |
---|
193 | } |
---|
194 | |
---|
195 | if($res->niveau_biblio == 'b' && $res->niveau_hierar == '2'){ |
---|
196 | $req_bulletin = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero from bulletins WHERE num_notice=".$res->notice_id; |
---|
197 | $result_bull = pmb_mysql_query($req_bulletin); |
---|
198 | while(($bull=pmb_mysql_fetch_object($result_bull))){ |
---|
199 | $subfields["h"] = $bull -> bulletin_numero; |
---|
200 | $subfields["i"] = $bull -> bulletin_titre; |
---|
201 | $subfields["9"] = "id:".$bull->bulletin_id ; |
---|
202 | } |
---|
203 | } |
---|
204 | $this -> add_field("200", "1 ", $subfields); |
---|
205 | |
---|
206 | //Titres Uniformes |
---|
207 | $rqt_tu = "select * from notices_titres_uniformes,titres_uniformes where tu_id =ntu_num_tu and ntu_num_notice = '".$this->notice_list[$this->current_notice]."' order by ntu_ordre"; |
---|
208 | $result_tu = pmb_mysql_query($rqt_tu); |
---|
209 | if(pmb_mysql_num_rows($result_tu)){ |
---|
210 | while($row_tu = pmb_mysql_fetch_object($result_tu)){ |
---|
211 | $subfields = array(); |
---|
212 | $subfields["9"] = "id:".$row_tu->tu_id; |
---|
213 | $subfields["a"] = $row_tu->tu_name; |
---|
214 | $subfields["u"] = $row_tu->tu_tonalite; |
---|
215 | $subfields["n"] = $row_tu->tu_comment; |
---|
216 | $subfields["i"] = $row_tu->ntu_titr; |
---|
217 | $subfields["k"] = $row_tu->ntu_date; |
---|
218 | $subfields["l"] = $row_tu->ntu_sous_vedette; |
---|
219 | $subfields["m"] = $row_tu->ntu_langue; |
---|
220 | $subfields["q"] = $row_tu->ntu_version; |
---|
221 | $subfields["w"] = $row_tu->ntu_mention; |
---|
222 | $rqt_tucomp="SELECT * FROM tu_distrib WHERE distrib_num_tu='".$row_tu->tu_id."' ORDER BY distrib_ordre,distrib_name"; |
---|
223 | $result_tucomp = pmb_mysql_query($rqt_tucomp); |
---|
224 | if(pmb_mysql_num_rows($result_tucomp)){ |
---|
225 | while($row_tucomp = pmb_mysql_fetch_object($result_tucomp)){ |
---|
226 | $subfields["r"][] = $row_tucomp->distrib_name; |
---|
227 | } |
---|
228 | } |
---|
229 | $rqt_tucomp="SELECT * FROM tu_ref WHERE ref_num_tu='".$row_tu->tu_id."' ORDER BY ref_ordre,ref_name"; |
---|
230 | $result_tucomp = pmb_mysql_query($rqt_tucomp); |
---|
231 | if(pmb_mysql_num_rows($result_tucomp)){ |
---|
232 | while($row_tucomp = pmb_mysql_fetch_object($result_tucomp)){ |
---|
233 | $subfields["s"][] = $row_tucomp->ref_name; |
---|
234 | } |
---|
235 | } |
---|
236 | $rqt_tucomp="SELECT * FROM tu_subdiv WHERE subdiv_num_tu='".$row_tu->tu_id."' ORDER BY subdiv_ordre,subdiv_name"; |
---|
237 | $result_tucomp = pmb_mysql_query($rqt_tucomp); |
---|
238 | if(pmb_mysql_num_rows($result_tucomp)){ |
---|
239 | while($row_tucomp = pmb_mysql_fetch_object($result_tucomp)){ |
---|
240 | $subfields["j"][] = $row_tucomp->subdiv_name; |
---|
241 | } |
---|
242 | } |
---|
243 | |
---|
244 | $this->add_field("500", "10", $subfields); |
---|
245 | } |
---|
246 | } |
---|
247 | |
---|
248 | //Titre du pério pour les notices de bulletin |
---|
249 | $subfields=array(); |
---|
250 | if($res->niveau_biblio == 'b' && $res->niveau_hierar == '2'){ |
---|
251 | $req_bulletin = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero, tit1 as titre from bulletins, notices WHERE bulletin_notice=notice_id AND num_notice=".$res->notice_id; |
---|
252 | $result_bull = pmb_mysql_query($req_bulletin); |
---|
253 | while(($bull=pmb_mysql_fetch_object($result_bull))){ |
---|
254 | $subfields["a"] = $bull->titre; |
---|
255 | } |
---|
256 | } |
---|
257 | $this -> add_field("530", " ", $subfields); |
---|
258 | |
---|
259 | //Date en 210 pour les notices de bulletin |
---|
260 | $subfields=array(); |
---|
261 | if($res->niveau_biblio == 'b' && $res->niveau_hierar == '2'){ |
---|
262 | $req_bulletin = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero from bulletins WHERE num_notice=".$res->notice_id; |
---|
263 | $result_bull = pmb_mysql_query($req_bulletin); |
---|
264 | while(($bull=pmb_mysql_fetch_object($result_bull))){ |
---|
265 | $subfields["h"] = $bull->date_date; |
---|
266 | $subfields["d"] = $bull->mention_date; |
---|
267 | } |
---|
268 | } |
---|
269 | $this -> add_field("210", " ", $subfields); |
---|
270 | |
---|
271 | //isbn |
---|
272 | $subfields = array(); |
---|
273 | $subfields["a"] = $res -> code; |
---|
274 | $subfields["d"] = $res -> prix; |
---|
275 | $this -> add_field("010", " ", $subfields); |
---|
276 | |
---|
277 | // URL |
---|
278 | $subfields = array(); |
---|
279 | $subfields["u"] = $res -> lien; |
---|
280 | $subfields["q"] = $res -> eformat; |
---|
281 | $this -> add_field("856", " ", $subfields); |
---|
282 | |
---|
283 | //Langage |
---|
284 | $rqttmp_lang = "select type_langue,code_langue from notices_langues where num_notice='$res->notice_id' order by ordre_langue "; |
---|
285 | $restmp_lang = pmb_mysql_query($rqttmp_lang); |
---|
286 | $ind="0 "; |
---|
287 | $subfields_101 = array(); |
---|
288 | while (($tmp_lang = pmb_mysql_fetch_object($restmp_lang))) { |
---|
289 | if($tmp_lang->type_langue){ |
---|
290 | $ind="1 "; |
---|
291 | $subfields_101['c'][]=$tmp_lang->code_langue; |
---|
292 | } else { |
---|
293 | $subfields_101['a'][]=$tmp_lang->code_langue; |
---|
294 | } |
---|
295 | } |
---|
296 | $this->add_field('101',$ind,$subfields_101); |
---|
297 | |
---|
298 | //Mention d'edition |
---|
299 | $subfields = array(); |
---|
300 | $subfields["a"] = $res -> mention_edition; |
---|
301 | $this -> add_field("205", " ", $subfields); |
---|
302 | |
---|
303 | //Collation |
---|
304 | $subfields = array(); |
---|
305 | $subfields["a"] = $res -> npages; |
---|
306 | $subfields["c"] = $res -> ill; |
---|
307 | $subfields["d"] = $res -> size; |
---|
308 | $subfields["e"] = $res -> accomp; |
---|
309 | |
---|
310 | $this -> add_field("215", " ", $subfields); |
---|
311 | |
---|
312 | //Notes |
---|
313 | $subfields = array(); |
---|
314 | $subfields["a"] = $res -> n_gen; |
---|
315 | $this -> add_field("300", " ", $subfields); |
---|
316 | $subfields["a"] = $res -> n_contenu; |
---|
317 | $this -> add_field("327", " ", $subfields); |
---|
318 | $subfields["a"] = $res -> n_resume; |
---|
319 | $this -> add_field("330", " ", $subfields); |
---|
320 | |
---|
321 | //Auteurs |
---|
322 | |
---|
323 | //Recherche des auteurs; |
---|
324 | $requete = "select author_id, author_type, author_name, author_rejete, author_date, responsability_fonction, responsability_type |
---|
325 | ,author_subdivision, author_lieu,author_ville, author_pays,author_numero,author_web, author_comment |
---|
326 | from authors, responsability where responsability_notice=".$res->notice_id." and responsability_author=author_id order by responsability_ordre asc"; |
---|
327 | $resultat = pmb_mysql_query($requete) or die(pmb_mysql_error()."<br />".$requete); |
---|
328 | |
---|
329 | while (($auth=pmb_mysql_fetch_object($resultat))) { |
---|
330 | //Si c'est un 70 (individuel) alors on l'exporte |
---|
331 | $subfields = array(); |
---|
332 | $attrs = array(); |
---|
333 | if ($params["include_authorite_ids"]) |
---|
334 | $attrs["id"] = $auth->author_id; |
---|
335 | if ($auth->author_type == "70") { |
---|
336 | // Personne physique |
---|
337 | //Champ = author_type + responsability_type (70 + 0 pour auteur principal = 700 !) |
---|
338 | $auth_code = $auth->author_type.$auth->responsability_type; |
---|
339 | $subfields["a"] = $auth->author_name; |
---|
340 | $subfields["b"] = $auth->author_rejete; |
---|
341 | $subfields["c"] = $auth->author_comment; |
---|
342 | //Fonction |
---|
343 | $subfields["4"] = $auth->responsability_fonction; |
---|
344 | //Dates |
---|
345 | if ($auth->author_date!="") { |
---|
346 | $subfields["f"] = $auth->author_date ; |
---|
347 | } |
---|
348 | $subfields["N"] = $auth->author_web; |
---|
349 | $subfields["9"] = "id:".$auth->author_id; |
---|
350 | $this->add_field($auth_code," 1", $subfields, "", $attrs); |
---|
351 | } elseif (($auth->author_type == "71") || ($auth->author_type == "72")) { |
---|
352 | //Collectivité |
---|
353 | $auth_code = $auth->author_type.$auth->responsability_type; |
---|
354 | $subfields["a"] = $auth->author_name; |
---|
355 | $subfields["b"] = $auth->author_subdivision; |
---|
356 | $subfields["c"] = $auth->author_comment; |
---|
357 | $subfields["g"] = $auth->author_rejete; |
---|
358 | $subfields["d"] = $auth->author_numero; |
---|
359 | //Fonction |
---|
360 | $subfields["4"] = $auth->responsability_fonction; |
---|
361 | //Dates |
---|
362 | if ($auth->author_date!="") { |
---|
363 | $subfields["f"] = $auth->author_date ; |
---|
364 | } |
---|
365 | $lieu=$auth->author_lieu; |
---|
366 | if($auth->author_ville) { |
---|
367 | if($lieu) $lieu.="; "; |
---|
368 | $lieu.=$auth->author_ville; |
---|
369 | } |
---|
370 | if($auth->author_pays) { |
---|
371 | if($lieu) $lieu.="; "; |
---|
372 | $lieu.=$auth->author_pays; |
---|
373 | } |
---|
374 | $subfields["e"] = $lieu; |
---|
375 | $subfields["K"] = $auth->author_lieu; |
---|
376 | $subfields["L"] = $auth->author_ville; |
---|
377 | $subfields["M"] = $auth->author_pays; |
---|
378 | $subfields["N"] = $auth->author_web; |
---|
379 | $subfields["9"] = "id:".$auth->author_id; |
---|
380 | if ($auth->author_type == "71") { |
---|
381 | $auth_code = $auth->author_type.$auth->responsability_type; |
---|
382 | $this->add_field($auth_code,"02", $subfields, "", $attrs); |
---|
383 | } elseif ($auth->author_type == "72") { |
---|
384 | $auth_code = "71".$auth->responsability_type; |
---|
385 | $this->add_field($auth_code,"12", $subfields, "", $attrs); |
---|
386 | } |
---|
387 | |
---|
388 | } |
---|
389 | } |
---|
390 | |
---|
391 | //Editeurs et date de la notice |
---|
392 | $c102_export=false;//Le champ 102 n'est pas répétable |
---|
393 | $requete = "select * from publishers where ed_id =".$res -> ed1_id; |
---|
394 | $resultat = pmb_mysql_query($requete); |
---|
395 | $subfields = array(); |
---|
396 | $attrs = array(); |
---|
397 | if ($params["include_authorite_ids"]) |
---|
398 | $attrs["id"] = $res->ed1_id; |
---|
399 | if (($ed1 = pmb_mysql_fetch_object($resultat))) { |
---|
400 | $subfields["a"] = $ed1 -> ed_ville; |
---|
401 | $subfields["b"] = trim($ed1 -> ed_adr1."\n".$ed1 -> ed_adr2."\n".$ed1 -> ed_cp."\n".$ed1 -> ed_ville."\n".$ed1 -> ed_pays); |
---|
402 | $subfields["c"] = $ed1 -> ed_name; |
---|
403 | $subfields["d"] = $res -> year; |
---|
404 | $subfields["z"] = $ed1 -> ed_pays; |
---|
405 | if(trim($ed1 -> ed_pays)){ |
---|
406 | $parser = new XMLlist("$include_path/marc_tables/$lang/country.xml"); |
---|
407 | $parser->analyser(); |
---|
408 | if($tmp=array_search(trim($ed1->ed_pays),$parser->table)){ |
---|
409 | $subfields_102=array(); |
---|
410 | $subfields_102["a"]=mb_strtolower($tmp); |
---|
411 | $this -> add_field("102", " ", $subfields_102); |
---|
412 | $c102_export=true; |
---|
413 | } |
---|
414 | } |
---|
415 | $subfields["9"][] = "id:".$ed1->ed_id; |
---|
416 | if(trim($ed1->ed_web)) $subfields["9"][] = "web:".$ed1->ed_web; |
---|
417 | if(trim($ed1->ed_comment)) $subfields["9"][] = "comment:".$ed1->ed_comment; |
---|
418 | if(trim($ed1->ed_cp)) $subfields["9"][] = "cp:".$ed1->ed_cp; |
---|
419 | if(trim($ed1->ed_adr1)) $subfields["9"][] = "adr1:".$ed1->ed_adr1; |
---|
420 | if(trim($ed1->ed_adr2)) $subfields["9"][] = "adr2:".$ed1->ed_adr2; |
---|
421 | }elseif($res -> year && $res->niveau_biblio != 'b'){ |
---|
422 | $subfields["d"] = $res -> year; |
---|
423 | } |
---|
424 | $this -> add_field("210", " ", $subfields, "", $attrs); |
---|
425 | |
---|
426 | $requete = "select * from publishers where ed_id =".$res -> ed2_id; |
---|
427 | $resultat = pmb_mysql_query($requete); |
---|
428 | $subfields = array(); |
---|
429 | $attrs = array(); |
---|
430 | if ($params["include_authorite_ids"]) |
---|
431 | $attrs["id"] = $res->ed2_id; |
---|
432 | if (($ed1 = pmb_mysql_fetch_object($resultat))) { |
---|
433 | $subfields["a"] = $ed1 -> ed_ville; |
---|
434 | $subfields["b"] = trim($ed1 -> ed_adr1."\n".$ed1 -> ed_adr2."\n".$ed1 -> ed_cp."\n".$ed1 -> ed_ville."\n".$ed1 -> ed_pays); |
---|
435 | $subfields["c"] = $ed1 -> ed_name; |
---|
436 | $subfields["d"] = $res -> year; |
---|
437 | $subfields["z"] = $ed1 -> ed_pays; |
---|
438 | if(trim($ed1 -> ed_pays) && !$c102_export){ |
---|
439 | $parser = new XMLlist("$include_path/marc_tables/$lang/country.xml"); |
---|
440 | $parser->analyser(); |
---|
441 | if($tmp=array_search(trim($ed1->ed_pays),$parser->table)){ |
---|
442 | $subfields_102=array(); |
---|
443 | $subfields_102["a"]=mb_strtolower($tmp); |
---|
444 | $this -> add_field("102", " ", $subfields_102); |
---|
445 | } |
---|
446 | } |
---|
447 | $subfields["9"][] = "id:".$ed1->ed_id; |
---|
448 | if(trim($ed1->ed_web)) $subfields["9"][] = "web:".$ed1->ed_web; |
---|
449 | if(trim($ed1->ed_comment)) $subfields["9"][] = "comment:".$ed1->ed_comment; |
---|
450 | if(trim($ed1->ed_cp)) $subfields["9"][] = "cp:".$ed1->ed_cp; |
---|
451 | if(trim($ed1->ed_adr1)) $subfields["9"][] = "adr1:".$ed1->ed_adr1; |
---|
452 | if(trim($ed1->ed_adr2)) $subfields["9"][] = "adr2:".$ed1->ed_adr2; |
---|
453 | } |
---|
454 | $this->add_field("210", " ", $subfields, "", $attrs); |
---|
455 | |
---|
456 | //Collections |
---|
457 | $requete = "select * from collections where collection_id=".$res -> coll_id; |
---|
458 | $resultat = pmb_mysql_query($requete); |
---|
459 | $subfields = array(); |
---|
460 | $subfields_410 = array(); |
---|
461 | $subfields_411 = array(); |
---|
462 | $subfields_s = array(); |
---|
463 | $attrs = array(); |
---|
464 | if ($params["include_authorite_ids"]) |
---|
465 | $attrs["id"] = $res->coll_id; |
---|
466 | if (($col = pmb_mysql_fetch_object($resultat))) { |
---|
467 | $subfields["a"] = $col -> collection_name; |
---|
468 | $subfields_410["t"] = $col -> collection_name; |
---|
469 | $subfields["v"] = $res -> nocoll; |
---|
470 | $subfields_410["v"] = $res -> nocoll; |
---|
471 | $subfields["x"] = $col -> collection_issn; |
---|
472 | $subfields_410["x"] = $col -> collection_issn; |
---|
473 | $subfields["9"] ="id:".$res -> coll_id; |
---|
474 | $subfields_410["9"] ="id:".$res -> coll_id; |
---|
475 | } |
---|
476 | //Recherche des sous collections |
---|
477 | $requete = "select * from sub_collections where sub_coll_id=".$res -> subcoll_id; |
---|
478 | $resultat = pmb_mysql_query($requete); |
---|
479 | if (($subcol = pmb_mysql_fetch_object($resultat))) { |
---|
480 | $subfields_s["i"] = $subcol -> sub_coll_name; |
---|
481 | $subfields_411["t"] = $subcol -> sub_coll_name; |
---|
482 | $subfields_s["x"] = $subcol -> sub_coll_issn; |
---|
483 | $subfields_411["x"] = $subcol -> sub_coll_issn; |
---|
484 | $subfields_s["9"] = "id:".$res -> subcoll_id; |
---|
485 | $subfields_411["9"] ="id:".$res -> subcoll_id; |
---|
486 | } |
---|
487 | $attrs2 = array(); |
---|
488 | if ($params["include_authorite_ids"]) |
---|
489 | $attrs2["id"] = $res -> subcoll_id; |
---|
490 | $this -> add_field("225", "2 ", $subfields, "", $attrs); |
---|
491 | $this -> add_field("410", " 0", $subfields_410, "", $attrs); |
---|
492 | $this -> add_field("225", "2 ", $subfields_s, "", $attrs2); |
---|
493 | $this -> add_field("411", " 0", $subfields_411, "", $attrs2); |
---|
494 | |
---|
495 | $requete = "select * from series where serie_id=".$res -> tparent_id; |
---|
496 | $resultat = pmb_mysql_query($requete); |
---|
497 | $subfields = array(); |
---|
498 | $attrs = array(); |
---|
499 | if (($serie = pmb_mysql_fetch_object($resultat))) { |
---|
500 | $subfields["t"] = $serie -> serie_name; |
---|
501 | $subfields["v"] = $res -> tnvol; |
---|
502 | if ($params["include_authorite_ids"]){ |
---|
503 | $attrs["id"] = $serie -> serie_id; |
---|
504 | } |
---|
505 | } |
---|
506 | $this -> add_field("461", " 0", $subfields, '', $attrs); |
---|
507 | |
---|
508 | //dewey |
---|
509 | $subfields = array(); |
---|
510 | //Recher du code dewey |
---|
511 | $requete = "select * from indexint where indexint_id=".$res -> indexint; |
---|
512 | $resultat = pmb_mysql_query($requete); |
---|
513 | if (($code_dewey=pmb_mysql_fetch_object($resultat))) { |
---|
514 | $subfields["a"] = $code_dewey -> indexint_name; |
---|
515 | $subfields["l"] = $code_dewey -> indexint_comment; |
---|
516 | $subfields["9"] = "id:".$code_dewey -> indexint_id; |
---|
517 | $this -> add_field("676", " ", $subfields); |
---|
518 | } |
---|
519 | |
---|
520 | //Vignette |
---|
521 | if ($opac_show_book_pics) { |
---|
522 | $vignette=get_vignette($this -> notice_list[$this -> current_notice]); |
---|
523 | if ($vignette) { |
---|
524 | $this->add_field("896"," ",array("a"=>$vignette)); |
---|
525 | } |
---|
526 | } |
---|
527 | |
---|
528 | if ($keep_expl) { |
---|
529 | if($res->niveau_biblio == 'b' && $res->niveau_hierar == '2'){//Si c'est une notice de bulletin |
---|
530 | $requete="SELECT bulletin_id FROM bulletins WHERE num_notice='".$res -> notice_id."'"; |
---|
531 | $res_bull=pmb_mysql_query($requete); |
---|
532 | if(pmb_mysql_num_rows($res_bull)){ |
---|
533 | $id_bull=pmb_mysql_result($res_bull,0,0); |
---|
534 | if((array_search($id_bull,$this->bulletins_exporte)===false) && (array_search($id_bull,$this->expl_bulletin_a_exporter)===false)){ |
---|
535 | //Si on exporte les exemplaires on garde l'ID du bulletin pour exporter ses exemplaires |
---|
536 | $this->expl_bulletin_a_exporter[]=$id_bull; |
---|
537 | } |
---|
538 | } |
---|
539 | }else{//Si non |
---|
540 | //Traitement des exemplaires |
---|
541 | $this->processing_expl($lender,$td,$sd,$params,$res -> notice_id,0); |
---|
542 | } |
---|
543 | |
---|
544 | } |
---|
545 | |
---|
546 | //Mots cles |
---|
547 | $subfields = array(); |
---|
548 | $subfields["a"] = $res -> index_l; |
---|
549 | $this -> add_field("610", "0 ", $subfields); |
---|
550 | |
---|
551 | //Descripteurs |
---|
552 | $requete="SELECT libelle_categorie,categories.num_noeud,categories.langue,categories.num_thesaurus FROM categories, notices_categories WHERE notcateg_notice=".$res->notice_id." and categories.num_noeud = notices_categories.num_noeud ORDER BY ordre_categorie"; |
---|
553 | $resultat=pmb_mysql_query($requete); |
---|
554 | if (pmb_mysql_num_rows($resultat)) { |
---|
555 | for ($i=0; $i<pmb_mysql_num_rows($resultat); $i++) { |
---|
556 | $subfields=array(); |
---|
557 | $subfields["9"][]="id:".pmb_mysql_result($resultat,$i,1); |
---|
558 | $subfields["9"][]="lang:".pmb_mysql_result($resultat,$i,2); |
---|
559 | $subfields["9"][]="idthes:".pmb_mysql_result($resultat,$i,3); |
---|
560 | $subfields["a"]=pmb_mysql_result($resultat,$i,0); |
---|
561 | $this -> add_field("606"," 1",$subfields); |
---|
562 | } |
---|
563 | } |
---|
564 | |
---|
565 | //Champs perso de notice traite par la table notice_custom |
---|
566 | $this->processing_cp("notices",$res->notice_id); |
---|
567 | |
---|
568 | //Notices liées, relations entre notices |
---|
569 | if($params["genere_lien"]){ |
---|
570 | //On choisit d'exporter les notices mères |
---|
571 | if($params["mere"]){ |
---|
572 | $requete="SELECT num_notice, linked_notice, relation_type, rank from notices_relations where num_notice=".$res->notice_id." order by num_notice, rank asc"; |
---|
573 | $resultat=pmb_mysql_query($requete); |
---|
574 | while(($notice_fille=pmb_mysql_fetch_object($resultat))) { |
---|
575 | $requete_mere="SELECT * FROM notices WHERE notice_id=".$notice_fille->linked_notice; |
---|
576 | $resultat_mere=pmb_mysql_query($requete_mere); |
---|
577 | while(($notice_mere=pmb_mysql_fetch_object($resultat_mere))) { |
---|
578 | $subfields = array(); |
---|
579 | $list_titre = array(); |
---|
580 | $list_auteurs = array(); |
---|
581 | $list_options = array(); |
---|
582 | //On recopie les informations de la notice fille |
---|
583 | if($params["notice_mere"]) $subfields["0"] = $notice_mere->notice_id; |
---|
584 | $list_titre[] = ($notice_mere->tit1) ? $notice_mere->tit1 : " "; |
---|
585 | //auteur |
---|
586 | $rqt_aut = "select author_name, author_rejete from responsability join authors on author_id = responsability_author and responsability_notice=".$notice_mere->notice_id." where responsability_type != 2 order by responsability_type,responsability_ordre"; |
---|
587 | $res_aut=pmb_mysql_query($rqt_aut); |
---|
588 | $mere_aut = array(); |
---|
589 | while(($mere_aut=pmb_mysql_fetch_object($res_aut))) { |
---|
590 | $list_auteurs[] = $mere_aut->author_name.($mere_aut->author_rejete ? ", ".$mere_aut->author_rejete : ""); |
---|
591 | } |
---|
592 | $list_options[] = "bl:".$notice_mere->niveau_biblio.$notice_mere->niveau_hierar; |
---|
593 | $list_options[] = "id:".$notice_mere->notice_id; |
---|
594 | if($notice_fille->rank) $list_options[] = "rank:".$notice_fille->rank; |
---|
595 | if($notice_fille->relation_type) $list_options[] = "type_lnk:".$notice_fille->relation_type; |
---|
596 | $list_options[] = 'lnk:parent'; |
---|
597 | $subfields["9"] = $list_options; |
---|
598 | //Relation avec mono = ISBN |
---|
599 | if($notice_mere->niveau_biblio == 'm' && $notice_mere->niveau_hierar == '0'){ |
---|
600 | if($notice_mere->code) $subfields["y"] = $notice_mere->code; |
---|
601 | $subfields["t"] = $list_titre; |
---|
602 | $subfields["a"] = $list_auteurs; |
---|
603 | } |
---|
604 | //Relation avec pério = ISSN |
---|
605 | if($notice_mere->niveau_biblio == 's' && $notice_mere->niveau_hierar == '1'){ |
---|
606 | if($notice_mere->code) $subfields["x"] = $notice_mere->code; |
---|
607 | $subfields["t"] = $list_titre; |
---|
608 | } |
---|
609 | //Relation avec articles |
---|
610 | if($notice_mere->niveau_biblio == 'a' && $notice_mere->niveau_hierar == '2'){ |
---|
611 | $req_art = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero, tit1, code from analysis join bulletins on bulletin_id=analysis_bulletin join notices on bulletin_notice=notice_id where analysis_notice=".$notice_mere->notice_id; |
---|
612 | $result_art=pmb_mysql_query($req_art); |
---|
613 | while(($notice_art=pmb_mysql_fetch_object($result_art))){ |
---|
614 | $subfields["d"] = $notice_art->date_date; |
---|
615 | $subfields["e"] = $notice_art->mention_date; |
---|
616 | $subfields["v"] = $notice_art->bulletin_numero; |
---|
617 | if($notice_art->code) $subfields["x"] = $notice_art->code; |
---|
618 | $list_titre[] = ($notice_art->bulletin_titre) ? $notice_art->bulletin_titre : " "; |
---|
619 | $list_titre[] = ($notice_art->tit1) ? $notice_art->tit1 : " "; |
---|
620 | $subfields["t"] = $list_titre; |
---|
621 | if($keep_expl && (array_search($notice_art->bulletin_id,$this->bulletins_exporte)===false) && (array_search($notice_art->bulletin_id,$this->expl_bulletin_a_exporter)===false)){ |
---|
622 | //Si on exporte les exemplaires on garde l'ID du bulletin pour exporter ses exemplaires |
---|
623 | $this->expl_bulletin_a_exporter[]=$notice_art->bulletin_id; |
---|
624 | } |
---|
625 | } |
---|
626 | } |
---|
627 | //Relation avec bulletins |
---|
628 | if($notice_mere->niveau_biblio == 'b' && $notice_mere->niveau_hierar == '2'){ |
---|
629 | $req_bull = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero, tit1, code from bulletins join notices on bulletin_notice=notice_id WHERE num_notice=".$notice_mere->notice_id; |
---|
630 | $result_bull=pmb_mysql_query($req_bull); |
---|
631 | while(($notice_bull=pmb_mysql_fetch_object($result_bull))){ |
---|
632 | $subfields["d"] = $notice_bull->date_date; |
---|
633 | $subfields["e"] = $notice_bull->mention_date; |
---|
634 | $subfields["v"] = $notice_bull->bulletin_numero; |
---|
635 | if($notice_bull->code) $subfields["x"] = $notice_bull->code; |
---|
636 | $list_titre[] = ($notice_bull->bulletin_titre) ? $notice_bull->bulletin_titre : " "; |
---|
637 | $list_titre[] = ($notice_bull->tit1) ? $notice_bull->tit1 : " "; |
---|
638 | $subfields["t"] = $list_titre; |
---|
639 | if($keep_expl && (array_search($notice_bull->bulletin_id,$this->bulletins_exporte)===false) && (array_search($notice_bull->bulletin_id,$this->expl_bulletin_a_exporter)===false)){ |
---|
640 | //Si on exporte les exemplaires on garde l'ID du bulletin pour exporter ses exemplaires |
---|
641 | $this->expl_bulletin_a_exporter[]=$notice_bull->bulletin_id; |
---|
642 | } |
---|
643 | } |
---|
644 | } |
---|
645 | $list_attribut = new XMLlist("$include_path/marc_tables/$lang/relationtypeup_unimarc.xml"); |
---|
646 | $list_attribut->analyser(); |
---|
647 | $table_attribut = $list_attribut->table; |
---|
648 | //On teste si la relation est spéciale, de type contient dans une boite |
---|
649 | if($notice_fille->relation_type=='d') |
---|
650 | $indicateur="d0"; |
---|
651 | else $indicateur=" "; |
---|
652 | $this->add_field($table_attribut[$notice_fille->relation_type],$indicateur,$subfields); |
---|
653 | //On exporte les notices mères liées |
---|
654 | if($params["notice_mere"] && (array_search($notice_mere->notice_id,$this->notice_exporte)===false)){ |
---|
655 | $this->notice_list[]=$notice_mere->notice_id; |
---|
656 | } |
---|
657 | } |
---|
658 | } |
---|
659 | } |
---|
660 | //On choisit d'exporter les notices filles |
---|
661 | if($params["fille"]){ |
---|
662 | $requete="SELECT num_notice, linked_notice, relation_type, rank from notices_relations where linked_notice=".$res->notice_id." order by num_notice, rank asc"; |
---|
663 | $resultat=pmb_mysql_query($requete); |
---|
664 | while(($notice_mere=pmb_mysql_fetch_object($resultat))) { |
---|
665 | $requete_fille="SELECT * FROM notices WHERE notice_id=".$notice_mere->num_notice; |
---|
666 | $resultat_fille=pmb_mysql_query($requete_fille); |
---|
667 | while(($notice_fille=pmb_mysql_fetch_object($resultat_fille))) { |
---|
668 | $subfields = array(); |
---|
669 | $list_titre = array(); |
---|
670 | $list_options = array(); |
---|
671 | //On recopie les informations de la notice fille |
---|
672 | if($params["notice_fille"]) $subfields["0"] = $notice_fille->notice_id; |
---|
673 | $list_titre[] = ($notice_fille->tit1) ? $notice_fille->tit1 : " "; |
---|
674 | $list_options[] = "bl:".$notice_fille->niveau_biblio.$notice_fille->niveau_hierar; |
---|
675 | $list_options[] = "id:".$notice_fille->notice_id; |
---|
676 | if($notice_mere->rank) $list_options[] = "rank:".$notice_mere->rank; |
---|
677 | if($notice_mere->relation_type) $list_options[] = "type_lnk:".$notice_mere->relation_type; |
---|
678 | $list_options[] = 'lnk:child'; |
---|
679 | $subfields["9"] = $list_options; |
---|
680 | //Relation avec mono = ISBN |
---|
681 | if($notice_fille->niveau_biblio == 'm' && $notice_fille->niveau_hierar == '0'){ |
---|
682 | if($notice_fille->code) $subfields["y"] = $notice_fille->code; |
---|
683 | $subfields["t"] = $list_titre; |
---|
684 | } |
---|
685 | //Relation avec pério = ISSN |
---|
686 | if($notice_fille->niveau_biblio == 's' && $notice_fille->niveau_hierar == '1'){ |
---|
687 | if($notice_fille->code) $subfields["x"] = $notice_fille->code; |
---|
688 | $subfields["t"] = $list_titre; |
---|
689 | } |
---|
690 | //Relation avec articles |
---|
691 | if($notice_fille->niveau_biblio == 'a' && $notice_fille->niveau_hierar == '2'){ |
---|
692 | $req_art = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero, tit1, code from analysis join bulletins on bulletin_id=analysis_bulletin join notices on bulletin_notice=notice_id where analysis_notice=".$notice_fille->notice_id; |
---|
693 | $result_art=pmb_mysql_query($req_art); |
---|
694 | while(($notice_art=pmb_mysql_fetch_object($result_art))){ |
---|
695 | $subfields["d"] = $notice_art->date_date; |
---|
696 | $subfields["e"] = $notice_art->mention_date; |
---|
697 | $subfields["v"] = $notice_art->bulletin_numero; |
---|
698 | if($notice_art->code) $subfields["x"] = $notice_art->code; |
---|
699 | $list_titre[] = ($notice_art->bulletin_titre) ? $notice_art->bulletin_titre : " "; |
---|
700 | $list_titre[] = ($notice_art->tit1) ? $notice_art->tit1 : " "; |
---|
701 | $subfields["t"] = $list_titre; |
---|
702 | if($keep_expl && (array_search($notice_art->bulletin_id,$this->bulletins_exporte)===false) && (array_search($notice_art->bulletin_id,$this->expl_bulletin_a_exporter)===false)){ |
---|
703 | //Si on exporte les exemplaires on garde l'ID du bulletin pour exporter ses exemplaires |
---|
704 | $this->expl_bulletin_a_exporter[]=$notice_art->bulletin_id; |
---|
705 | } |
---|
706 | } |
---|
707 | } |
---|
708 | //Relation avec bulletins |
---|
709 | if($notice_fille->niveau_biblio == 'b' && $notice_fille->niveau_hierar == '2'){ |
---|
710 | $req_bull = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero, tit1, code from bulletins join notices on bulletin_notice=notice_id WHERE num_notice=".$notice_fille->notice_id; |
---|
711 | $result_bull=pmb_mysql_query($req_bull); |
---|
712 | while(($notice_bull=pmb_mysql_fetch_object($result_bull))){ |
---|
713 | $subfields["d"] = $notice_bull->date_date; |
---|
714 | $subfields["e"] = $notice_bull->mention_date; |
---|
715 | $subfields["v"] = $notice_bull->bulletin_numero; |
---|
716 | if($notice_bull->code) $subfields["x"] = $notice_bull->code; |
---|
717 | $list_titre[] = ($notice_bull->bulletin_titre) ? $notice_bull->bulletin_titre : " "; |
---|
718 | $list_titre[] = ($notice_bull->tit1) ? $notice_bull->tit1 : " "; |
---|
719 | $subfields["t"] = $list_titre; |
---|
720 | if($keep_expl && (array_search($notice_bull->bulletin_id,$this->bulletins_exporte)===false) && (array_search($notice_bull->bulletin_id,$this->expl_bulletin_a_exporter)===false)){ |
---|
721 | //Si on exporte les exemplaires on garde l'ID du bulletin pour exporter ses exemplaires |
---|
722 | $this->expl_bulletin_a_exporter[]=$notice_bull->bulletin_id; |
---|
723 | } |
---|
724 | } |
---|
725 | } |
---|
726 | $list_attribut = new XMLlist("$include_path/marc_tables/$lang/relationtypedown_unimarc.xml"); |
---|
727 | $list_attribut->analyser(); |
---|
728 | $table_attribut = $list_attribut->table; |
---|
729 | //On teste si la relation est spéciale, de type contient dans une boite |
---|
730 | if($notice_fille->relation_type=='d') |
---|
731 | $indicateur="d0"; |
---|
732 | else $indicateur=" "; |
---|
733 | $this->add_field($table_attribut[$notice_mere->relation_type],$indicateur,$subfields); |
---|
734 | //On exporte les notices filles liées |
---|
735 | if($params["notice_fille"] && (array_search($notice_fille->notice_id,$this->notice_exporte)===false)){ |
---|
736 | $this->notice_list[]=$notice_fille->notice_id; |
---|
737 | } |
---|
738 | } |
---|
739 | } |
---|
740 | } |
---|
741 | |
---|
742 | //On choisit d'exporter les liens vers les périodiques pour les notices d'article |
---|
743 | if($params["perio_link"]){ |
---|
744 | $req_perio_link = "SELECT notice_id, tit1, code from bulletins,analysis,notices WHERE bulletin_notice=notice_id and bulletin_id=analysis_bulletin and analysis_notice=".$res->notice_id; |
---|
745 | $result_perio_link=pmb_mysql_query($req_perio_link); |
---|
746 | while(($notice_perio_link=pmb_mysql_fetch_object($result_perio_link))){ |
---|
747 | $subfields_461=array(); |
---|
748 | $list_options=array(); |
---|
749 | if($params["notice_perio"]) $subfields_461["0"] = $notice_perio_link->notice_id; |
---|
750 | $subfields_461["t"] = ($notice_perio_link->tit1) ? $notice_perio_link->tit1 : " "; |
---|
751 | if($notice_perio_link->code) $subfields_461["x"] = $notice_perio_link->code; |
---|
752 | $attrs = array("id" => $notice_perio_link->notice_id); |
---|
753 | $list_options[] = "id:".$notice_perio_link->notice_id; |
---|
754 | $list_options[] = 'lnk:perio'; |
---|
755 | $subfields_461["9"] = $list_options; |
---|
756 | $this->add_field("461"," ",$subfields_461, '', $attrs); |
---|
757 | //On exporte les notices de pério liées |
---|
758 | if($params["notice_perio"] && (array_search($notice_perio_link->notice_id,$this->notice_exporte)===false)){ |
---|
759 | $this->notice_list[]=$notice_perio_link->notice_id; |
---|
760 | } |
---|
761 | } |
---|
762 | } |
---|
763 | |
---|
764 | //On génère le bulletinage pour les notices de pério |
---|
765 | if($params["bulletinage"]){ |
---|
766 | $req_bulletinage = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero from bulletins, notices WHERE bulletin_notice = notice_id AND notice_id=".$res->notice_id; |
---|
767 | $result_bulletinage=pmb_mysql_query($req_bulletinage); |
---|
768 | while(($notice_bulletinage=pmb_mysql_fetch_object($result_bulletinage))){ |
---|
769 | $subfields_462=array(); |
---|
770 | $list_options=array(); |
---|
771 | $attrs = array("id" => $notice_bulletinage->bulletin_id); |
---|
772 | $subfields_462["d"] = $notice_bulletinage->date_date; |
---|
773 | $subfields_462["e"] = $notice_bulletinage->mention_date; |
---|
774 | $subfields_462["v"] = $notice_bulletinage->bulletin_numero; |
---|
775 | $subfields_462["t"] = ($notice_bulletinage->bulletin_titre) ? $notice_bulletinage->bulletin_titre : " "; |
---|
776 | $list_options[] = "id:".$notice_bulletinage->bulletin_id; |
---|
777 | $list_options[] = 'lnk:bull'; |
---|
778 | $subfields_462["9"] = $list_options; |
---|
779 | $this->add_field("462"," ",$subfields_462, '', $attrs); |
---|
780 | if($keep_expl && (array_search($notice_bulletinage->bulletin_id,$this->bulletins_exporte)===false) && (array_search($notice_bulletinage->bulletin_id,$this->expl_bulletin_a_exporter)===false)){ |
---|
781 | //Si on exporte les exemplaires on garde l'ID du bulletin pour exporter ses exemplaires |
---|
782 | $this->expl_bulletin_a_exporter[]=$notice_bulletinage->bulletin_id; |
---|
783 | } |
---|
784 | } |
---|
785 | } |
---|
786 | |
---|
787 | //On choisit d'exporter les liens vers les bulletins pour les notices d'article |
---|
788 | if($params["bull_link"]){ |
---|
789 | $req_bull_link = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero from bulletins, analysis WHERE bulletin_id=analysis_bulletin and analysis_notice=".$res->notice_id; |
---|
790 | $result_bull_link=pmb_mysql_query($req_bull_link); |
---|
791 | while(($notice_bull_link=pmb_mysql_fetch_object($result_bull_link))){ |
---|
792 | $subfields_463 = array(); |
---|
793 | $list_options = array(); |
---|
794 | $attrs = array("id" => $notice_bull_link->bulletin_id); |
---|
795 | $subfields_463["d"] = $notice_bull_link->date_date; |
---|
796 | $subfields_463["e"] = $notice_bull_link->mention_date; |
---|
797 | $subfields_463["v"] = $notice_bull_link->bulletin_numero; |
---|
798 | $subfields_463["t"] = ($notice_bull_link->bulletin_titre) ? $notice_bull_link->bulletin_titre : " "; |
---|
799 | $list_options[] = "id:".$notice_bull_link->bulletin_id; |
---|
800 | $list_options[] = 'lnk:bull'; |
---|
801 | $subfields_463["9"] = $list_options; |
---|
802 | $this->add_field("463"," ",$subfields_463, '', $attrs); |
---|
803 | if($keep_expl && (array_search($notice_bull_link->bulletin_id,$this->bulletins_exporte)===false) && (array_search($notice_bull_link->bulletin_id,$this->expl_bulletin_a_exporter)===false)){ |
---|
804 | //Si on exporte les exemplaires on garde l'ID du bulletin pour exporter ses exemplaires |
---|
805 | $this->expl_bulletin_a_exporter[]=$notice_bull_link->bulletin_id; |
---|
806 | } |
---|
807 | } |
---|
808 | } |
---|
809 | |
---|
810 | //On choisit d'exporter les liens vers les articles pour les notices de pério |
---|
811 | if($params["art_link"]){ |
---|
812 | $req_art_link = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, analysis_notice, a.tit1 as titre, a.npages as page from notices p left join bulletins on bulletin_notice=p.notice_id left join analysis on analysis_bulletin=bulletin_id join notices a on a.notice_id=analysis_notice WHERE p.notice_id=".$res->notice_id; |
---|
813 | $result_art_link=pmb_mysql_query($req_art_link); |
---|
814 | while(($notice_art_link=pmb_mysql_fetch_object($result_art_link))){ |
---|
815 | $subfields_464=array(); |
---|
816 | $tab_titre=array(); |
---|
817 | $list_options=array(); |
---|
818 | $attrs = array("id" => $notice_art_link->analysis_notice); |
---|
819 | $tab_titre[]= ($notice_art_link->titre) ? $notice_art_link->titre : " "; |
---|
820 | $tab_titre[]= ($notice_art_link->bulletin_titre) ? $notice_art_link->bulletin_titre : " "; |
---|
821 | if($params["notice_art"]) $subfields_464["0"] = $notice_art_link->analysis_notice; |
---|
822 | $subfields_464["t"] = $tab_titre; |
---|
823 | $subfields_464["d"] = $notice_art_link->date_date; |
---|
824 | $subfields_464["e"] = $notice_art_link->mention_date; |
---|
825 | $subfields_464["v"] = $notice_art_link->bulletin_numero; |
---|
826 | $list_options[] = "id:".$notice_art_link->analysis_notice; |
---|
827 | $list_options[] = "page:".$notice_art_link->page; |
---|
828 | $list_options[] = 'lnk:art'; |
---|
829 | $subfields_464["9"] = $list_options; |
---|
830 | $this->add_field("464"," ",$subfields_464, '', $attrs); |
---|
831 | if($keep_expl && (array_search($notice_art_link->bulletin_id,$this->bulletins_exporte)===false) && (array_search($notice_art_link->bulletin_id,$this->expl_bulletin_a_exporter)===false)){ |
---|
832 | //Si on exporte les exemplaires on garde l'ID du bulletin pour exporter ses exemplaires |
---|
833 | $this->expl_bulletin_a_exporter[]=$notice_art_link->bulletin_id; |
---|
834 | } |
---|
835 | //On exporte les notices d'articles liées |
---|
836 | if($params["notice_art"] && (array_search($notice_art_link->analysis_notice,$this->notice_exporte)===false)){ |
---|
837 | $this->notice_list[]=$notice_art_link->analysis_notice; |
---|
838 | } |
---|
839 | } |
---|
840 | |
---|
841 | } |
---|
842 | } |
---|
843 | |
---|
844 | //Etat de collection |
---|
845 | if($res->niveau_biblio == 's' && $res->niveau_hierar == '1'){ |
---|
846 | $req="SELECT collections_state.*, archempla_libelle, archtype_libelle, archstatut_opac_libelle, archstatut_gestion_libelle, location_libelle FROM collections_state " . |
---|
847 | "LEFT JOIN arch_emplacement ON archempla_id=collstate_emplacement " . |
---|
848 | "LEFT JOIN arch_type ON archtype_id=collstate_type " . |
---|
849 | "LEFT JOIN arch_statut ON archstatut_id=collstate_statut " . |
---|
850 | "LEFT JOIN docs_location ON idlocation=location_id " . |
---|
851 | "WHERE id_serial='".$res->notice_id."'"; |
---|
852 | $res_etat=pmb_mysql_query($req); |
---|
853 | if($res_etat && pmb_mysql_num_rows($res_etat)){ |
---|
854 | while ($etat = pmb_mysql_fetch_object($res_etat)) { |
---|
855 | $subfields = array(); |
---|
856 | $attrs = array(); |
---|
857 | $subfields["9"]="id:".$etat->collstate_id; |
---|
858 | $subfields["a"]=$etat->location_libelle; |
---|
859 | $subfields["b"]=$etat->state_collections; |
---|
860 | $subfields["c"]=$etat->archempla_libelle; |
---|
861 | $subfields["d"]=$etat->archtype_libelle; |
---|
862 | $subfields["e"]=$etat->collstate_origine; |
---|
863 | $subfields["f"]=$etat->collstate_cote; |
---|
864 | $subfields["g"]=$etat->collstate_archive; |
---|
865 | $subfields["h"]=$etat->archstatut_opac_libelle; |
---|
866 | $subfields["i"]=$etat->collstate_lacune; |
---|
867 | $subfields["j"]=$etat->collstate_note; |
---|
868 | $subfields["k"]=$etat->archstatut_gestion_libelle; |
---|
869 | $this -> add_field("950", " ", $subfields, "", $attrs); |
---|
870 | //Export des cp d'etat de collection |
---|
871 | $this->processing_cp("collstate",$etat->collstate_id,$etat->collstate_id); |
---|
872 | } |
---|
873 | } |
---|
874 | } |
---|
875 | |
---|
876 | //Documents numeriques |
---|
877 | if ($params['docnum']) { |
---|
878 | |
---|
879 | // recuperation des documents numeriques |
---|
880 | $q = "select explnum_id from explnum where explnum_notice='".$res->notice_id."' "; |
---|
881 | $q.= "union "; |
---|
882 | $q.= "select explnum_id from explnum, bulletins where bulletin_id = explnum_bulletin and bulletins.num_notice='".$res->notice_id."' "; |
---|
883 | $r = pmb_mysql_query($q, $dbh); |
---|
884 | if(pmb_mysql_num_rows($r)) { |
---|
885 | while ($row=pmb_mysql_fetch_object($r)) { |
---|
886 | $subfields_897 = array(); |
---|
887 | $dn = new explnum($row->explnum_id); |
---|
888 | if($dn->isURL()) { //URL |
---|
889 | $subfields_897['a']=$dn->explnum_url; |
---|
890 | $subfields_897['b']=$dn->explnum_nom; |
---|
891 | $subfields_897['f']=''; |
---|
892 | $subfields_897['p']=''; |
---|
893 | } elseif ($dn->isEnUpload() && $params['docnum_rep']) { //Répertoire |
---|
894 | $dest_file = $dn->copy_to($params['docnum_rep'],true); |
---|
895 | if ($dest_file){ |
---|
896 | $subfields_897['a']=$dest_file; |
---|
897 | $subfields_897['b']=(($dn->explnum_nom)?$dn->explnum_nom:$dn->explnum_nomfichier); |
---|
898 | $subfields_897['f']=$dn->explnum_nomfichier; |
---|
899 | $subfields_897['p']=''; |
---|
900 | } |
---|
901 | } elseif ($dn->isEnBase() && $params['docnum_rep']) { //Base |
---|
902 | $dest_file = $dn->copy_to($params['docnum_rep'],true); |
---|
903 | if ($dest_file){ |
---|
904 | $subfields_897['a']=$dest_file; |
---|
905 | $subfields_897['b']=(($dn->explnum_nom)?$dn->explnum_nom:$dn->explnum_nomfichier); |
---|
906 | $subfields_897['f']=$dn->explnum_nomfichier; |
---|
907 | $subfields_897['p']=''; |
---|
908 | } |
---|
909 | } |
---|
910 | if (count($subfields_897)) { |
---|
911 | $this->add_field('897',' ',$subfields_897); |
---|
912 | } |
---|
913 | } |
---|
914 | } |
---|
915 | } |
---|
916 | |
---|
917 | //Record field |
---|
918 | $biblio = $res->niveau_biblio ; |
---|
919 | $hierar = $res->niveau_hierar ; |
---|
920 | if(($biblio=='b')&&($hierar=='2')){ |
---|
921 | //si on a un bulletin on modifie b2 en s2 |
---|
922 | $biblio='s'; |
---|
923 | $hierar='2'; |
---|
924 | } |
---|
925 | $this->xml_array['rs']['value']="n"; |
---|
926 | $this->xml_array['dt']['value']=$res->typdoc; |
---|
927 | $this->xml_array['bl']['value']=$biblio; |
---|
928 | $this->xml_array['hl']['value']=$hierar; |
---|
929 | $this->xml_array['el']['value']=1; |
---|
930 | $this->xml_array['ru']['value']="i"; |
---|
931 | if (array_search($res->notice_id,$this->notice_exporte)===false) { |
---|
932 | $this->notice_exporte[]=$res->notice_id; |
---|
933 | } |
---|
934 | $this -> toxml(); |
---|
935 | $this -> current_notice++; |
---|
936 | if ($this -> current_notice >= count($this -> notice_list)) |
---|
937 | $this -> current_notice = -1; |
---|
938 | return true; |
---|
939 | } else { |
---|
940 | return false; |
---|
941 | } |
---|
942 | } |
---|
943 | |
---|
944 | function get_next_bulletin($lender = "", $td = array(), $sd = array(), $keep_expl = false, $params=array()){ |
---|
945 | global $is_expl_caddie,$charset; |
---|
946 | |
---|
947 | unset($this->xml_array); |
---|
948 | $this -> xml_array = array(); |
---|
949 | $this -> notice = ""; |
---|
950 | |
---|
951 | //On regarde si on a encore des exemplaires a exporter |
---|
952 | //echo "Je passe ici : ".count($this->expl_bulletin_a_exporter)."<br>"; |
---|
953 | if(count($this->expl_bulletin_a_exporter)){ |
---|
954 | //Si mon tableau n'est pas vide |
---|
955 | $id_bulletin=array_shift($this->expl_bulletin_a_exporter); |
---|
956 | $this->bulletins_exporte[]=$id_bulletin; |
---|
957 | }else{ |
---|
958 | return false; |
---|
959 | } |
---|
960 | |
---|
961 | //On regarde si on a des exemplaires pour ce bulletin |
---|
962 | $requete="select expl_id from exemplaires where expl_bulletin='".$id_bulletin."'"; |
---|
963 | $res=pmb_mysql_query($requete); |
---|
964 | |
---|
965 | if(pmb_mysql_num_rows($res)){ |
---|
966 | //Si le bulletin a des exemplaires on créer une notice d'article bidon pour créer les exemplaires |
---|
967 | |
---|
968 | if (!$is_expl_caddie) { |
---|
969 | $requete_panier="SHOW TABLES LIKE 'expl_cart_id'"; |
---|
970 | $res_panier=@pmb_mysql_query($requete_panier); |
---|
971 | if ($res_panier && pmb_mysql_num_rows($res_panier)) $is_expl_caddie=2; else $is_expl_caddie=1; |
---|
972 | } |
---|
973 | |
---|
974 | //Numero unique de la base |
---|
975 | $this -> add_field("001", "", "", $id_bulletin."-bull"); |
---|
976 | |
---|
977 | //Champ de traitement |
---|
978 | if($charset == "utf-8"){ |
---|
979 | $c100=date("Ymd")."u u u0frey50 ba"; |
---|
980 | }else{ |
---|
981 | $c100=date("Ymd")."u u u0frey0103 ba"; |
---|
982 | } |
---|
983 | $this-> add_field("100"," ",array("a"=>$c100),""); |
---|
984 | |
---|
985 | |
---|
986 | $this->xml_array['rs']['value']="n"; |
---|
987 | $this->xml_array['dt']['value']="a"; |
---|
988 | $this->xml_array['bl']['value']="a"; |
---|
989 | $this->xml_array['hl']['value']="2"; |
---|
990 | $this->xml_array['el']['value']="1"; |
---|
991 | $this->xml_array['ru']['value']="i"; |
---|
992 | |
---|
993 | |
---|
994 | //Lien vers le bulletin et le perio pour recreer l'exemplaire |
---|
995 | $req_art = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero, tit1, code, notice_id from bulletins join notices on bulletin_notice=notice_id where bulletin_id=".$id_bulletin; |
---|
996 | $result_art=pmb_mysql_query($req_art); |
---|
997 | while(($notice_art=pmb_mysql_fetch_object($result_art))){ |
---|
998 | //Pour le cas ou l'article est récupéré en temps que monographie |
---|
999 | $subfields=array(); |
---|
1000 | $subfields["a"] = $notice_art->bulletin_titre ? $notice_art->bulletin_titre.", ".$notice_art->mention_date : $notice_art->mention_date; |
---|
1001 | if(!$subfields["a"]) $subfields["a"] = "Notice de bulletin"; |
---|
1002 | $subfields["d"] = "Article_expl_bulletin"; |
---|
1003 | $subfields["h"] = $notice_art->tit1; |
---|
1004 | $subfields["i"] = $notice_art->bulletin_numero; |
---|
1005 | $this -> add_field("200", "1 ", $subfields); |
---|
1006 | |
---|
1007 | $subfields=array(); |
---|
1008 | $date=explode("-",$notice_art->date_date); |
---|
1009 | $subfields["d"] = $date[0]; |
---|
1010 | $this -> add_field("210", " ", $subfields); |
---|
1011 | |
---|
1012 | $subfields_463 = array(); |
---|
1013 | $list_options = array(); |
---|
1014 | $list_titre = array(); |
---|
1015 | if($params["notice_perio"]) $subfields_463["0"] = $notice_art->notice_id; |
---|
1016 | $subfields_463["d"] = $notice_art->date_date; |
---|
1017 | $subfields_463["e"] = $notice_art->mention_date; |
---|
1018 | $subfields_463["v"] = $notice_art->bulletin_numero; |
---|
1019 | if($notice_art->code) $subfields_463["x"] = $notice_art->code; |
---|
1020 | $list_titre[] = ($notice_art->bulletin_titre) ? $notice_art->bulletin_titre : " "; |
---|
1021 | $list_titre[] = ($notice_art->tit1) ? $notice_art->tit1 : " "; |
---|
1022 | $subfields_463["t"] = $list_titre; |
---|
1023 | $list_options[] = "id:".$notice_art->bulletin_id; |
---|
1024 | $list_options[] = 'lnk:bull_expl'; |
---|
1025 | $subfields_463["9"] = $list_options; |
---|
1026 | $this->add_field("463"," ",$subfields_463); |
---|
1027 | } |
---|
1028 | |
---|
1029 | //Traitement des exemplaires |
---|
1030 | $this->processing_expl($lender,$td,$sd,$params,0,$id_bulletin); |
---|
1031 | $this -> toxml(); |
---|
1032 | |
---|
1033 | } |
---|
1034 | |
---|
1035 | if(!count($this->expl_bulletin_a_exporter)){ |
---|
1036 | //On vient de traiter le dernier |
---|
1037 | return false; |
---|
1038 | }else{ |
---|
1039 | return true; |
---|
1040 | } |
---|
1041 | } |
---|
1042 | |
---|
1043 | function processing_expl($lender,$td,$sd,$params,$expl_notice,$expl_bulletin){ |
---|
1044 | global $is_expl_caddie; |
---|
1045 | //Traitement des exemplaires |
---|
1046 | $requete = "select expl_id, create_date, expl_cb,expl_cote,expl_statut,statut_libelle, statusdoc_codage_import, expl_typdoc, tdoc_libelle, tdoc_codage_import, expl_note, expl_comment, expl_section, section_libelle, sdoc_codage_import, expl_owner, lender_libelle, codestat_libelle, statisdoc_codage_import, expl_date_retour, expl_date_depot, expl_note, pret_flag, location_libelle, locdoc_codage_import from exemplaires, docs_statut, docs_type, docs_section, docs_codestat, lenders, docs_location".($is_expl_caddie==2?",expl_cart_id":"")." where ".($expl_bulletin != 0 ?"expl_bulletin=".$expl_bulletin." AND expl_notice=0":"expl_notice=".$expl_notice." AND expl_bulletin=0")." and expl_statut=idstatut and expl_typdoc=idtyp_doc and expl_section=idsection and expl_owner=idlender and expl_codestat=idcode and expl_location=idlocation".($is_expl_caddie==2?" and expl_id=id":""); |
---|
1047 | if (($lender != "x")&&($lender!="")) |
---|
1048 | $requete.= " and expl_owner=".$lender; |
---|
1049 | if (count($td) != 0) |
---|
1050 | $requete.= " and expl_typdoc in (".implode(",", $td).")"; |
---|
1051 | if (count($sd) != 0) |
---|
1052 | $requete.= " and expl_statut in (".implode(",", $sd).")"; |
---|
1053 | $resultat = pmb_mysql_query($requete); |
---|
1054 | |
---|
1055 | while (($ex = pmb_mysql_fetch_object($resultat))) { |
---|
1056 | if ( (!is_array($params['export_only_expl_ids'])) || (!count($params['export_only_expl_ids'])) || (in_array($ex->expl_id,$params['export_only_expl_ids'])) ) { |
---|
1057 | $subfields = array(); |
---|
1058 | global $export996 ; |
---|
1059 | $export996 = array() ; |
---|
1060 | $subfields = export_traite_exemplaires ($ex); |
---|
1061 | $this -> add_field("995", " ", $subfields); |
---|
1062 | //J'ajoute dans le sous champs 996 tous ce qu'il faut à l'exemlaire pour le reconstruire |
---|
1063 | foreach($ex as $key => $value) { |
---|
1064 | if((trim($value) !== "" ) && ( $value != "0000-00-00")){ |
---|
1065 | $export996["9"][]=$key.":".$value; |
---|
1066 | } |
---|
1067 | } |
---|
1068 | if (count($export996) != 0) $this -> add_field("996", " ", $export996); |
---|
1069 | //Export des cp d'exemplaires |
---|
1070 | $this->processing_cp("expl",$ex->expl_id,$ex->expl_cb); |
---|
1071 | } |
---|
1072 | } |
---|
1073 | } |
---|
1074 | |
---|
1075 | function processing_cp($type,$id,$val_f=""){ |
---|
1076 | $mes_pp= new parametres_perso($type); |
---|
1077 | $mes_pp->get_values($id); |
---|
1078 | $values = $mes_pp->values; |
---|
1079 | foreach ( $values as $field_id => $vals ) { |
---|
1080 | //si on peut on exporte les infos du résolveur (DOI / PMID) |
---|
1081 | if(($type == "notices") && ($mes_pp->t_fields[$field_id]['TYPE'] == "resolve")){ |
---|
1082 | //les ids sont fixé en dur, on c'est traité : DOI = 2 , PMID = 1 |
---|
1083 | foreach ( $vals as $value ) { |
---|
1084 | $id_infos = explode('|',$value); |
---|
1085 | switch($id_infos[1]){ |
---|
1086 | case "1" : |
---|
1087 | $resolver = "PMID"; |
---|
1088 | break; |
---|
1089 | case "2" : |
---|
1090 | $resolver = "DOI"; |
---|
1091 | break; |
---|
1092 | default : |
---|
1093 | $resolver = ""; |
---|
1094 | } |
---|
1095 | if($resolver != ""){ |
---|
1096 | $subfields = array(); |
---|
1097 | $subfields["a"]= $id_infos[0]; |
---|
1098 | $subfields["b"]=$resolver; |
---|
1099 | $this->add_field("014"," ",$subfields); |
---|
1100 | } |
---|
1101 | } |
---|
1102 | } |
---|
1103 | if($mes_pp->t_fields[$field_id]["EXPORT"]) { //champ exportable |
---|
1104 | foreach ( $vals as $value ) { |
---|
1105 | $subfields = array(); |
---|
1106 | switch ($mes_pp->t_fields[$field_id]['TYPE']) { |
---|
1107 | case "resolve": |
---|
1108 | case "url": |
---|
1109 | $subfields["c"]=$value; |
---|
1110 | $id_infos = explode('|',$value); |
---|
1111 | $link=$mes_pp->get_formatted_output(array($value),$field_id);//Valeur |
---|
1112 | if((count($id_infos) == 2)){ |
---|
1113 | $subfields["a"]=$id_infos[0]; |
---|
1114 | $subfields["b"]=$link; |
---|
1115 | }else{ |
---|
1116 | $subfields["a"]=$link; |
---|
1117 | } |
---|
1118 | break; |
---|
1119 | case "query_auth": |
---|
1120 | case "query_list": |
---|
1121 | $subfields["c"]=$value; |
---|
1122 | //break; C'est voulu |
---|
1123 | default: |
---|
1124 | $subfields["a"]=$mes_pp->get_formatted_output(array($value),$field_id);//Val |
---|
1125 | break; |
---|
1126 | } |
---|
1127 | |
---|
1128 | $subfields["l"]=$mes_pp->t_fields[$field_id]["TITRE"];//Libelle du champ |
---|
1129 | $subfields["n"]=$mes_pp->t_fields[$field_id]["NAME"];//Nom du champ |
---|
1130 | $subfields["t"]=$mes_pp->t_fields[$field_id]["TYPE"];//Type du champ |
---|
1131 | if($val_f){ |
---|
1132 | $subfields["f"]=$val_f; |
---|
1133 | } |
---|
1134 | switch ( $type ) { |
---|
1135 | case "notices": |
---|
1136 | $this->add_field("900"," ",$subfields); |
---|
1137 | break; |
---|
1138 | case "expl": |
---|
1139 | $this->add_field("999"," ",$subfields); |
---|
1140 | break; |
---|
1141 | case "collstate": |
---|
1142 | $this->add_field("951"," ",$subfields); |
---|
1143 | break; |
---|
1144 | default: |
---|
1145 | break; |
---|
1146 | } |
---|
1147 | |
---|
1148 | } |
---|
1149 | } |
---|
1150 | } |
---|
1151 | } |
---|
1152 | } |
---|
1153 | ?> |
---|