This repository was archived by the owner on May 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategorie.php
More file actions
69 lines (57 loc) · 1.8 KB
/
categorie.php
File metadata and controls
69 lines (57 loc) · 1.8 KB
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
<?php
include 'init.inc.php';
include_once $racine . '/inc/fonctions.inc.php';
eval(variablesAvantConfig());
foreach (cheminsInc($racine, 'config') as $cheminFichier)
{
include $cheminFichier;
}
if (!empty($_GET['langue']))
{
$getLangue = securiseTexte($_GET['langue']);
}
if (!empty($_GET['id']))
{
$getId = $_GET['id'];
$idCategorie = $getId;
$categories = super_parse_ini_file(cheminConfigCategories($racine), TRUE);
if (!empty($categories))
{
$idReel = idCategorie($categories, $idCategorie);
if (!empty($idReel))
{
$idCategorie = $idReel;
}
}
if (!empty($getLangue))
{
$langue = $getLangue;
}
elseif (!empty($categories[$idCategorie]['langue']))
{
$langue = $categories[$idCategorie]['langue'];
}
else
{
$langue = $langueParDefaut;
}
phpGettext('.', $langue); // Nécessaire à la traduction.
if ($categories !== FALSE && estCatSpeciale($idCategorie) && !empty($getLangue))
{
$categories = ajouteCategoriesSpeciales($racine, $urlRacine, $getLangue, $categories, array ($idCategorie), $nombreItemsFluxRss, $galerieFluxRssAuteurEstAuteurParDefaut, $auteurParDefaut, $galerieLienOriginalTelecharger, $galerieLegendeMarkdown);
}
}
if (
empty($idCategorie) ||
!isset($categories[$idCategorie]) ||
(empty($getLangue) && estCatSpeciale($idCategorie)) ||
(!empty($getLangue) && !estCatSpeciale($idCategorie)) ||
(!empty($categories[$idCategorie]['url']) && (strpos($categories[$idCategorie]['url'], 'categorie.php?') !== 0 || !preg_match('/(\?|&|&)id=' . preg_quote(filtreChaine($idCategorie), '/') . '(&|$)/', $categories[$idCategorie]['url']))) || // Empêcher la duplication de contenu dans les moteurs de recherche.
($getId != filtreChaine($getId)) // Idem.
)
{
$erreur404 = TRUE;
}
include $racine . '/inc/premier.inc.php';
include $racine . '/inc/dernier.inc.php';
?>