-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml_4db1c96efec9c947142764ef17ed1488.php
356 lines (330 loc) · 11.9 KB
/
html_4db1c96efec9c947142764ef17ed1488.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
<?php
/*
* Squelette : squelettes/json_homeSlider.html
* Date : Fri, 30 Sep 2016 09:56:26 GMT
* Compile : Thu, 10 Nov 2016 09:26:39 GMT
* Boucles : _slider1, _slider2, _slider3
*/
function BOUCLE_slider1html_4db1c96efec9c947142764ef17ed1488(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
$doublons_index = array();
// Initialise le(s) critère(s) doublons
if (!isset($doublons[$d = 'articles'.'xx'])) { $doublons[$d] = ''; }
if (!isset($command['table'])) {
$command['table'] = 'articles';
$command['id'] = '_slider1';
$command['from'] = array('articles' => 'spip_articles','L1' => 'spip_mots_liens','L2' => 'spip_mots');
$command['type'] = array();
$command['groupby'] = array("articles.id_article");
$command['select'] = array("articles.date",
"articles.titre",
"articles.texte",
"articles.descriptif",
"articles.chapo",
"articles.ps",
"articles.id_article",
"articles.lang");
$command['orderby'] = array('articles.date DESC');
$command['join'] = array('L1' => array('articles','id_objet','id_article','L1.objet='.sql_quote('article')), 'L2' => array('L1','id_mot'));
$command['limit'] = '0,1';
$command['having'] =
array();
}
$command['where'] =
array(
array('=', 'L2.titre', "'HomeHighlights1'"),
array(sql_in('articles.id_article', $doublons[$doublons_index[]= ('articles'.'xx')], 'NOT')));
if (defined("_BOUCLE_PROFILER")) $timer = time()+microtime();
$t0 = "";
// REQUETE
$iter = IterFactory::create(
"SQL",
$command,
array('squelettes/json_homeSlider.html','html_4db1c96efec9c947142764ef17ed1488','_slider1',4,$GLOBALS['spip_lang'])
);
if (!$iter->err()) {
lang_select($GLOBALS['spip_lang']);
$SP++;
// RESULTATS
while ($Pile[$SP]=$iter->fetch()) {
foreach($doublons_index as $k) $doublons[$k] .= "," . $Pile[$SP]['id_article']; // doublons
lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
$t0 .= (
'
{
"node":
{
"title":' .
interdire_scripts(json_encode(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))) .
',
"lead":' .
interdire_scripts(json_encode(filtre_introduction_dist($Pile[$SP]['descriptif'], (strlen($Pile[$SP]['descriptif']))
? ''
: $Pile[$SP]['chapo'] . "\n\n" . $Pile[$SP]['texte'], 500, $connect, null))) .
',
"author":' .
interdire_scripts(json_encode(((($a = textebrut(propre($Pile[$SP]['ps'], $connect, $Pile[0]))) OR (is_string($a) AND strlen($a))) ? $a : interdire_scripts(typo(supprimer_numero(@$Pile[0]['nom']), "TYPO", $connect, $Pile[0]))))) .
',
"body":' .
interdire_scripts(json_encode(liens_absolus(propre($Pile[$SP]['texte'], $connect, $Pile[0]),spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'],'.'))))) .
',
"created":"' .
interdire_scripts(jour(normaliser_date($Pile[$SP]['date']))) .
'\\/' .
interdire_scripts(mois(normaliser_date($Pile[$SP]['date']))) .
'\\/' .
interdire_scripts(annee(normaliser_date($Pile[$SP]['date']))) .
' ' .
interdire_scripts(heures(normaliser_date($Pile[$SP]['date']))) .
(($t1 = strval(interdire_scripts(minutes(normaliser_date($Pile[$SP]['date'])))))!=='' ?
(':' . $t1) :
'') .
'",
"field_image_fid":"http://www.igihe.com/IMG/' .
quete_logo('id_article', 'ON', $Pile[$SP]['id_article'],'', -1) .
'",
"news_url":"http://www.igihe.com/' .
vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_article'], 'article', '', '', true))) .
'",
"news_id":' .
json_encode($Pile[$SP]['id_article']) .
'
}
},
');
lang_select();
}
lang_select();
$iter->free();
}
if (defined("_BOUCLE_PROFILER")
AND 1000*($timer = (time()+microtime())-$timer) > _BOUCLE_PROFILER)
spip_log(intval(1000*$timer)."ms BOUCLE_slider1 @ squelettes/json_homeSlider.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
function BOUCLE_slider2html_4db1c96efec9c947142764ef17ed1488(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
$doublons_index = array();
// Initialise le(s) critère(s) doublons
if (!isset($doublons[$d = 'articles'.'xx'])) { $doublons[$d] = ''; }
if (!isset($command['table'])) {
$command['table'] = 'articles';
$command['id'] = '_slider2';
$command['from'] = array('articles' => 'spip_articles','L1' => 'spip_mots_liens','L2' => 'spip_mots');
$command['type'] = array();
$command['groupby'] = array("articles.id_article");
$command['select'] = array("articles.date",
"articles.titre",
"articles.texte",
"articles.descriptif",
"articles.chapo",
"articles.ps",
"articles.id_article",
"articles.lang");
$command['orderby'] = array('articles.date DESC');
$command['join'] = array('L1' => array('articles','id_objet','id_article','L1.objet='.sql_quote('article')), 'L2' => array('L1','id_mot'));
$command['limit'] = '0,4';
$command['having'] =
array();
}
$command['where'] =
array(
array('=', 'L2.titre', "'HomeHighlights'"),
array(sql_in('articles.id_article', $doublons[$doublons_index[]= ('articles'.'xx')], 'NOT')));
if (defined("_BOUCLE_PROFILER")) $timer = time()+microtime();
$t0 = "";
// REQUETE
$iter = IterFactory::create(
"SQL",
$command,
array('squelettes/json_homeSlider.html','html_4db1c96efec9c947142764ef17ed1488','_slider2',19,$GLOBALS['spip_lang'])
);
if (!$iter->err()) {
lang_select($GLOBALS['spip_lang']);
$SP++;
// RESULTATS
while ($Pile[$SP]=$iter->fetch()) {
foreach($doublons_index as $k) $doublons[$k] .= "," . $Pile[$SP]['id_article']; // doublons
lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
$t0 .= (
'
{
"node":
{
"title":' .
interdire_scripts(json_encode(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))) .
',
"lead":' .
interdire_scripts(json_encode(filtre_introduction_dist($Pile[$SP]['descriptif'], (strlen($Pile[$SP]['descriptif']))
? ''
: $Pile[$SP]['chapo'] . "\n\n" . $Pile[$SP]['texte'], 500, $connect, null))) .
',
"author":' .
interdire_scripts(json_encode(((($a = textebrut(propre($Pile[$SP]['ps'], $connect, $Pile[0]))) OR (is_string($a) AND strlen($a))) ? $a : interdire_scripts(typo(supprimer_numero(@$Pile[0]['nom']), "TYPO", $connect, $Pile[0]))))) .
',
"body":' .
interdire_scripts(json_encode(liens_absolus(propre($Pile[$SP]['texte'], $connect, $Pile[0]),spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'],'.'))))) .
',
"created":"' .
interdire_scripts(jour(normaliser_date($Pile[$SP]['date']))) .
'\\/' .
interdire_scripts(mois(normaliser_date($Pile[$SP]['date']))) .
'\\/' .
interdire_scripts(annee(normaliser_date($Pile[$SP]['date']))) .
' ' .
interdire_scripts(heures(normaliser_date($Pile[$SP]['date']))) .
(($t1 = strval(interdire_scripts(minutes(normaliser_date($Pile[$SP]['date'])))))!=='' ?
(':' . $t1) :
'') .
'",
"field_image_fid":"http://www.igihe.com/IMG/' .
quete_logo('id_article', 'ON', $Pile[$SP]['id_article'],'', -1) .
'",
"news_url":"http://www.igihe.com/' .
vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_article'], 'article', '', '', true))) .
'",
"news_id":' .
json_encode($Pile[$SP]['id_article']) .
'
}
},
');
lang_select();
}
lang_select();
$iter->free();
}
if (defined("_BOUCLE_PROFILER")
AND 1000*($timer = (time()+microtime())-$timer) > _BOUCLE_PROFILER)
spip_log(intval(1000*$timer)."ms BOUCLE_slider2 @ squelettes/json_homeSlider.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
function BOUCLE_slider3html_4db1c96efec9c947142764ef17ed1488(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
$doublons_index = array();
// Initialise le(s) critère(s) doublons
if (!isset($doublons[$d = 'articles'.'xx'])) { $doublons[$d] = ''; }
if (!isset($command['table'])) {
$command['table'] = 'articles';
$command['id'] = '_slider3';
$command['from'] = array('articles' => 'spip_articles','L1' => 'spip_mots_liens','L2' => 'spip_mots');
$command['type'] = array();
$command['groupby'] = array("articles.id_article");
$command['select'] = array("articles.date",
"articles.titre",
"articles.texte",
"articles.descriptif",
"articles.chapo",
"articles.ps",
"articles.id_article",
"articles.lang");
$command['orderby'] = array('articles.date DESC');
$command['join'] = array('L1' => array('articles','id_objet','id_article','L1.objet='.sql_quote('article')), 'L2' => array('L1','id_mot'));
$command['limit'] = '0,1';
$command['having'] =
array();
}
$command['where'] =
array(
array('=', 'L2.titre', "'HomeHighlights'"),
array(sql_in('articles.id_article', $doublons[$doublons_index[]= ('articles'.'xx')], 'NOT')));
if (defined("_BOUCLE_PROFILER")) $timer = time()+microtime();
$t0 = "";
// REQUETE
$iter = IterFactory::create(
"SQL",
$command,
array('squelettes/json_homeSlider.html','html_4db1c96efec9c947142764ef17ed1488','_slider3',34,$GLOBALS['spip_lang'])
);
if (!$iter->err()) {
lang_select($GLOBALS['spip_lang']);
$SP++;
// RESULTATS
while ($Pile[$SP]=$iter->fetch()) {
foreach($doublons_index as $k) $doublons[$k] .= "," . $Pile[$SP]['id_article']; // doublons
lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
$t0 .= (
'
{
"node":
{
"title":' .
interdire_scripts(json_encode(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))) .
',
"lead":' .
interdire_scripts(json_encode(filtre_introduction_dist($Pile[$SP]['descriptif'], (strlen($Pile[$SP]['descriptif']))
? ''
: $Pile[$SP]['chapo'] . "\n\n" . $Pile[$SP]['texte'], 500, $connect, null))) .
',
"author":' .
interdire_scripts(json_encode(((($a = textebrut(propre($Pile[$SP]['ps'], $connect, $Pile[0]))) OR (is_string($a) AND strlen($a))) ? $a : interdire_scripts(typo(supprimer_numero(@$Pile[0]['nom']), "TYPO", $connect, $Pile[0]))))) .
',
"body":' .
interdire_scripts(json_encode(liens_absolus(propre($Pile[$SP]['texte'], $connect, $Pile[0]),spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'],'.'))))) .
',
"created":"' .
interdire_scripts(jour(normaliser_date($Pile[$SP]['date']))) .
'\\/' .
interdire_scripts(mois(normaliser_date($Pile[$SP]['date']))) .
'\\/' .
interdire_scripts(annee(normaliser_date($Pile[$SP]['date']))) .
' ' .
interdire_scripts(heures(normaliser_date($Pile[$SP]['date']))) .
(($t1 = strval(interdire_scripts(minutes(normaliser_date($Pile[$SP]['date'])))))!=='' ?
(':' . $t1) :
'') .
'",
"field_image_fid":"http://www.igihe.com/IMG/' .
quete_logo('id_article', 'ON', $Pile[$SP]['id_article'],'', -1) .
'",
"news_url":"http://www.igihe.com/' .
vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_article'], 'article', '', '', true))) .
'",
"news_id":' .
json_encode($Pile[$SP]['id_article']) .
'
}
}
');
lang_select();
}
lang_select();
$iter->free();
}
if (defined("_BOUCLE_PROFILER")
AND 1000*($timer = (time()+microtime())-$timer) > _BOUCLE_PROFILER)
spip_log(intval(1000*$timer)."ms BOUCLE_slider3 @ squelettes/json_homeSlider.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
//
// Fonction principale du squelette squelettes/json_homeSlider.html
// Temps de compilation total: 206.949 ms
//
function html_4db1c96efec9c947142764ef17ed1488($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0) {
if (isset($Pile[0]["doublons"]) AND is_array($Pile[0]["doublons"]))
$doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
$connect = '';
$page = (
'<'.'?php header("X-Spip-Cache: 0"); ?'.'>'.'<'.'?php header("Cache-Control: no-cache, must-revalidate"); ?'.'><'.'?php header("Pragma: no-cache"); ?'.'>{
"nodes":[
' .
BOUCLE_slider1html_4db1c96efec9c947142764ef17ed1488($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
BOUCLE_slider2html_4db1c96efec9c947142764ef17ed1488($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
BOUCLE_slider3html_4db1c96efec9c947142764ef17ed1488($Cache, $Pile, $doublons, $Numrows, $SP) .
'
]
}
');
return analyse_resultat_skel('html_4db1c96efec9c947142764ef17ed1488', $Cache, $page, 'squelettes/json_homeSlider.html');
}
?>