source: pmb4.2/trunk/fuentes/pmb/load_notice_pos.php @ 828

Last change on this file since 828 was 815, checked in by jrpelegrina, 4 years ago

Initial release of pmb 4.2

  • Property svn:executable set to *
File size: 13.0 KB
Line 
1<?php
2// +-------------------------------------------------+
3// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
4// +-------------------------------------------------+
5// $Id: load_notice_pos.php,v 1.30 2015-06-02 15:17:03 jpermanne Exp $
6
7$base_path=".";
8$base_noheader=1;
9$base_nobody=1;
10
11
12$base_auth = "CATALOGAGE_AUTH";
13require_once("includes/init.inc.php");
14
15header("Content-Type: text/xml");
16print "<?xml version='1.0' encoding='iso-8859-1'?>\n";
17
18if (!$grille_typdoc) $grille_typdoc='a' ;
19if (!$grille_niveau_biblio) $grille_niveau_biblio='m' ;
20
21$requete = "select name from notices_custom order by ordre ";
22$res = pmb_mysql_query($requete, $dbh) or die(pmb_mysql_error()."<br />$requete");
23
24if ($grille_niveau_biblio=='m') {
25                $grille_standard="<formpage relative='yes'>
26                  <etirable id='el0Child' visible='yes' order='1' />
27                  <etirable id='el1Child' visible='yes' order='2' />
28                  <etirable id='el2Child' visible='yes' order='3' />
29                  <etirable id='el3Child' visible='yes' order='4' />
30                  <etirable id='el4Child' visible='yes' order='5' />";
31                  if ($pmb_map_activate) $grille_standard.="<etirable id='el14Child' visible='yes' order='6' />";
32                  if ($pmb_nomenclature_activate) $grille_standard.="<etirable id='el15Child' visible='yes' order='7' />";
33                $grille_standard.="<etirable id='el5Child' visible='yes' order='8' />
34                  <etirable id='el6Child' visible='yes' order='9' />";
35                  if ($pmb_use_uniform_title) $grille_standard.="<etirable id='el230Child' visible='yes' order='10' />";
36                $grille_standard.="<etirable id='el7Child' visible='yes' order='11' />
37                  <etirable id='el8Child' visible='yes' order='12' />".
38                  (pmb_mysql_num_rows($res)?"<etirable id='el9Child' visible='yes' order='13' />":"")."
39                  <etirable id='el11Child' visible='yes' order='14' />
40                  <etirable id='el10Child' visible='yes' order='15' />
41                  <movable id='el0Child_0' visible='yes' parent='el0Child'/>
42                  <movable id='el0Child_1' visible='yes' parent='el0Child'/>
43                  <movable id='el0Child_2' visible='yes' parent='el0Child'/>
44                  <movable id='el0Child_3' visible='yes' parent='el0Child'/>
45                  <movable id='el0Child_4' visible='yes' parent='el0Child'/>
46                  <movable id='el1Child_0' visible='yes' parent='el1Child'/>
47                  <movable id='el1Child_2' visible='yes' parent='el1Child'/>
48                  <movable id='el1Child_3' visible='yes' parent='el1Child'/>
49                  <movable id='el2Child_0' visible='yes' parent='el2Child'/>
50                  <movable id='el2Child_1' visible='yes' parent='el2Child'/>
51                  <movable id='el2Child_3' visible='yes' parent='el2Child'/>
52                  <movable id='el2Child_4' visible='yes' parent='el2Child'/>
53                  <movable id='el2Child_7' visible='yes' parent='el2Child'/>
54                  <movable id='el3Child_0' visible='yes' parent='el3Child'/>
55                  <movable id='el4Child_0' visible='yes' parent='el4Child'/>
56                  <movable id='el4Child_1' visible='yes' parent='el4Child'/>
57                  <movable id='el4Child_2' visible='yes' parent='el4Child'/>
58                  <movable id='el4Child_3' visible='yes' parent='el4Child'/>
59                  <movable id='el4Child_4' visible='yes' parent='el4Child'/>
60                  <movable id='el5Child_0' visible='yes' parent='el5Child'/>
61                  <movable id='el5Child_1' visible='yes' parent='el5Child'/>
62                  <movable id='el5Child_2' visible='yes' parent='el5Child'/>
63                  <movable id='el6Child_0' visible='yes' parent='el6Child'/>
64                  <movable id='el6Child_1' visible='yes' parent='el6Child'/>
65                  <movable id='el6Child_2' visible='yes' parent='el6Child'/>";
66        if ($pmb_use_uniform_title)     $grille_standard.="<movable id='el230Child_0' visible='yes' parent='el230Child'/>";
67                $grille_standard.="<movable id='el7Child_0' visible='yes' parent='el7Child'/>
68                  <movable id='el7Child_1' visible='yes' parent='el7Child'/>
69                  <movable id='el8Child_0' visible='yes' parent='el8Child'/>
70                  <movable id='el8Child_1' visible='yes' parent='el8Child'/>";
71                while ($champ=pmb_mysql_fetch_object($res)) 
72                        $grille_standard.="  <movable id='move_".$champ->name."' visible='yes' parent='el9Child'/>\n";
73                $grille_standard.="
74                  <movable id='el11Child_0' visible='yes' parent='el11Child'/>
75                  <movable id='el10Child_4' visible='yes' parent='el10Child'/>
76                  <movable id='el10Child_0' visible='yes' parent='el10Child'/>
77                  <movable id='el10Child_7' visible='yes' parent='el10Child'/>
78                  <movable id='el10Child_1' visible='yes' parent='el10Child'/>
79                  <movable id='el10Child_2' visible='yes' parent='el10Child'/>
80                  <movable id='el10Child_6' visible='yes' parent='el10Child'/>
81                  <movable id='el10Child_3' visible='yes' parent='el10Child'/>
82                  <movable id='el10Child_9' visible='yes' parent='el10Child'/>
83                </formpage>";
84        }
85
86if ($grille_niveau_biblio=='s') {
87                $grille_standard="              <formpage relative='yes'>
88                  <etirable id='el0Child' visible='yes' order='1' />
89                  <etirable id='el1Child' visible='yes' order='2' />
90                  <etirable id='el2Child' visible='yes' order='3' />
91                  <etirable id='el30Child' visible='yes' order='4' />
92                  <etirable id='el5Child' visible='yes' order='5' />
93                  <etirable id='el6Child' visible='yes' order='6' />
94                  <etirable id='el7Child' visible='yes' order='7' />
95                  <etirable id='el8Child' visible='yes' order='8' />".
96                  (pmb_mysql_num_rows($res)?"<etirable id='el9Child' visible='yes' order='10' />":"")."
97                  <etirable id='el11Child' visible='yes' order='9' />
98                  <etirable id='el10Child' visible='yes' order='10' />";
99                  if ($pmb_map_activate) $grille_standard.="<etirable id='el14Child' visible='no' order='11' />";
100                $grille_standard.="
101                  <movable id='el0Child_0' visible='yes' parent='el0Child'/>
102                  <movable id='el0Child_1' visible='yes' parent='el0Child'/>
103                  <movable id='el0Child_2' visible='yes' parent='el0Child'/>
104                  <movable id='el1Child_0' visible='yes' parent='el1Child'/>
105                  <movable id='el1Child_2' visible='yes' parent='el1Child'/>
106                  <movable id='el1Child_3' visible='yes' parent='el1Child'/>
107                  <movable id='el2Child_0' visible='yes' parent='el2Child'/>
108                  <movable id='el2Child_4' visible='yes' parent='el2Child'/>
109                  <movable id='el2Child_7' visible='yes' parent='el2Child'/>
110                  <movable id='el30Child_0' visible='yes' parent='el30Child'/>
111                  <movable id='el5Child_0' visible='yes' parent='el5Child'/>
112                  <movable id='el5Child_2' visible='yes' parent='el5Child'/>
113                  <movable id='el6Child_0' visible='yes' parent='el6Child'/>
114                  <movable id='el6Child_1' visible='yes' parent='el6Child'/>
115                  <movable id='el6Child_2' visible='yes' parent='el6Child'/>
116                  <movable id='el7Child_0' visible='yes' parent='el7Child'/>
117                  <movable id='el7Child_1' visible='yes' parent='el7Child'/>
118                  <movable id='el11Child_0' visible='yes' parent='el11Child'/>
119                  <movable id='el8Child_0' visible='yes' parent='el8Child'/>
120                  <movable id='el8Child_1' visible='yes' parent='el8Child'/>";
121                while ($champ=pmb_mysql_fetch_object($res)) 
122                        $grille_standard.="  <movable id='move_".$champ->name."' visible='yes' parent='el9Child'/>\n";
123                $grille_standard.="  <movable id='el10Child_5' visible='yes' parent='el10Child'/>
124                  <movable id='el10Child_0' visible='yes' parent='el10Child'/>
125                  <movable id='el10Child_7' visible='yes' parent='el10Child'/>
126                  <movable id='el10Child_1' visible='yes' parent='el10Child'/>
127                  <movable id='el10Child_2' visible='yes' parent='el10Child'/>
128                  <movable id='el10Child_6' visible='yes' parent='el10Child'/>
129                  <movable id='el10Child_3' visible='yes' parent='el10Child'/>
130                  <movable id='el10Child_4' visible='yes' parent='el10Child'/>
131                  <movable id='el10Child_8' visible='yes' parent='el10Child'/>
132                  <movable id='el10Child_9' visible='yes' parent='el10Child'/>
133                  <movable id='el11Child_0' visible='yes' parent='el11Child'/>
134                </formpage>";
135        }
136
137if ($grille_niveau_biblio=='a') {
138                $grille_standard="              <formpage relative='yes'>
139                  <etirable id='el0Child' visible='yes' order='1' />
140                  <etirable id='el1Child' visible='yes' order='2' />
141                  <etirable id='el2Child' visible='yes' order='3' />
142                  <etirable id='el5Child' visible='yes' order='4' />
143                  <etirable id='el6Child' visible='yes' order='5' />";
144                  if ($pmb_map_activate) $grille_standard.="<etirable id='el14Child' visible='yes' order='6' />";
145                $grille_standard.="
146                  <etirable id='el7Child' visible='yes' order='7' />
147                  <etirable id='el8Child' visible='yes' order='8' />".
148                  (pmb_mysql_num_rows($res)?"<etirable id='el9Child' visible='yes' order='9' />":"")."
149                  <etirable id='el11Child' visible='yes' order='10' />
150                  <etirable id='el10Child' visible='yes' order='11' />
151                <movable id='el0Child_0' visible='yes' parent='el0Child'/>
152                <movable id='el0Child_1' visible='yes' parent='el0Child'/>
153                <movable id='el0Child_2' visible='yes' parent='el0Child'/>
154                <movable id='el1Child_0' visible='yes' parent='el1Child'/>
155                <movable id='el1Child_2' visible='yes' parent='el1Child'/>
156                <movable id='el1Child_3' visible='yes' parent='el1Child'/>
157                <movable id='el2Child_0' visible='yes' parent='el2Child'/>
158                <movable id='el5Child_0' visible='yes' parent='el5Child'/>
159                <movable id='el5Child_2' visible='yes' parent='el5Child'/>
160                <movable id='el6Child_0' visible='yes' parent='el6Child'/>
161                <movable id='el6Child_1' visible='yes' parent='el6Child'/>
162                <movable id='el6Child_2' visible='yes' parent='el6Child'/>
163                <movable id='el7Child_0' visible='yes' parent='el7Child'/>
164                <movable id='el7Child_1' visible='yes' parent='el7Child'/>
165                <movable id='el8Child_0' visible='yes' parent='el8Child'/>
166                <movable id='el8Child_1' visible='yes' parent='el8Child'/>";
167                while ($champ=pmb_mysql_fetch_object($res)) 
168                        $grille_standard.="  <movable id='move_".$champ->name."' visible='yes' parent='el9Child'/>\n";
169                $grille_standard.="  <movable id='el10Child_5' visible='yes' parent='el10Child'/>
170                  <movable id='el10Child_0' visible='yes' parent='el10Child'/>
171                  <movable id='el10Child_7' visible='yes' parent='el10Child'/>
172                  <movable id='el10Child_1' visible='yes' parent='el10Child'/>
173                  <movable id='el10Child_2' visible='yes' parent='el10Child'/>
174                  <movable id='el10Child_6' visible='yes' parent='el10Child'/>
175                  <movable id='el10Child_4' visible='yes' parent='el10Child'/>
176                  <movable id='el10Child_9' visible='yes' parent='el10Child'/>
177                  <movable id='el11Child_0' visible='yes' parent='el11Child'/>
178                </formpage>";
179        }
180
181if ($grille_niveau_biblio=='b') {
182                $grille_standard="              <formpage relative='yes'>
183                  <etirable id='el5Child' visible='yes' order='4' />
184                  <etirable id='el6Child' visible='yes' order='5' />
185                  <etirable id='el41Child' visible='yes' order='5' />
186                  <etirable id='el7Child' visible='yes' order='6' />
187                  <etirable id='el8Child' visible='yes' order='7' />".
188                  (pmb_mysql_num_rows($res)?"<etirable id='el9Child' visible='yes' order='8' />":"")."
189                  <etirable id='el11Child' visible='yes' order='9' />
190                  <etirable id='el10Child' visible='yes' order='10' />";
191                  if ($pmb_map_activate) $grille_standard.="<etirable id='el14Child' visible='no' order='11' />";
192                $grille_standard.="
193                <movable id='el5Child_0' visible='yes' parent='el5Child'/>
194                <movable id='el5Child_1' visible='yes' parent='el5Child'/>
195                <movable id='el5Child_2' visible='yes' parent='el5Child'/>
196                <movable id='el6Child_0' visible='yes' parent='el6Child'/>
197                <movable id='el6Child_1' visible='yes' parent='el6Child'/>
198                <movable id='el6Child_2' visible='yes' parent='el6Child'/>
199                <movable id='el41Child_0' visible='yes' parent='el41Child'/>
200                <movable id='el41Child_1' visible='yes' parent='el41Child'/>
201                <movable id='el41Child_2' visible='yes' parent='el41Child'/>
202                <movable id='el41Child_3' visible='yes' parent='el41Child'/>
203                <movable id='el41Child_4' visible='yes' parent='el41Child'/>
204                <movable id='el7Child_0' visible='yes' parent='el7Child'/>
205                <movable id='el7Child_1' visible='yes' parent='el7Child'/>
206                <movable id='el8Child_0' visible='yes' parent='el8Child'/>
207                <movable id='el8Child_1' visible='yes' parent='el8Child'/>";
208                while ($champ=pmb_mysql_fetch_object($res)) 
209                        $grille_standard.="  <movable id='move_".$champ->name."' visible='yes' parent='el9Child'/>\n";
210                $grille_standard.="  <movable id='el10Child_5' visible='yes' parent='el10Child'/>
211                  <movable id='el10Child_0' visible='yes' parent='el10Child'/>
212                  <movable id='el10Child_7' visible='yes' parent='el10Child'/>
213                  <movable id='el10Child_1' visible='yes' parent='el10Child'/>
214                  <movable id='el10Child_2' visible='yes' parent='el10Child'/>
215                  <movable id='el10Child_6' visible='yes' parent='el10Child'/>
216                  <movable id='el10Child_4' visible='yes' parent='el10Child'/>
217                  <movable id='el10Child_9' visible='yes' parent='el10Child'/>
218                  <movable id='el11Child_0' visible='yes' parent='el11Child'/>
219                </formpage>";
220        }
221
222$requete = "select grille_typdoc, grille_niveau_biblio, grille_localisation, descr_format from grilles where grille_niveau_biblio='$grille_niveau_biblio' and grille_typdoc='$grille_typdoc' ";
223$res = pmb_mysql_query($requete, $dbh) or die(pmb_mysql_error()."<br />$requete");
224if (!$grille_location) $grille_location=$deflt_docs_location;
225while ($grille=pmb_mysql_fetch_object($res)) {
226        if (($grille->grille_localisation==$grille_location)&&($grille->descr_format)) {
227                $descr_format=$grille->descr_format;
228                break;
229        } else if (($grille->grille_localisation==0)&&($grille->descr_format)) {
230                $descr_format=$grille->descr_format;
231        }
232}
233if ($descr_format) {
234        print $descr_format;
235} else print $grille_standard;
236
237               
Note: See TracBrowser for help on using the repository browser.