4 |
david |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/***************************************************************************\
|
|
|
4 |
* SPIP, Systeme de publication pour l'internet *
|
|
|
5 |
* *
|
|
|
6 |
* Copyright (c) 2001-2005 *
|
|
|
7 |
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
|
|
|
8 |
* *
|
|
|
9 |
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
|
|
|
10 |
* Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
|
|
|
11 |
\***************************************************************************/
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
include ("inc.php3");
|
|
|
15 |
|
|
|
16 |
include_ecrire ("inc_admin.php3");
|
|
|
17 |
|
|
|
18 |
debut_page(_T('onglet_vider_cache'), "administration", "cache");
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
echo "<br><br><br>";
|
|
|
22 |
gros_titre(_T('titre_admin_vider'));
|
|
|
23 |
// barre_onglets("administration", "vider");
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
debut_gauche();
|
|
|
27 |
|
|
|
28 |
debut_boite_info();
|
|
|
29 |
|
|
|
30 |
echo _T('info_gauche_admin_vider');
|
|
|
31 |
|
|
|
32 |
fin_boite_info();
|
|
|
33 |
|
|
|
34 |
debut_droite();
|
|
|
35 |
|
|
|
36 |
if ($connect_statut != '0minirezo' OR !$connect_toutes_rubriques) {
|
|
|
37 |
echo _T('avis_non_acces_page');
|
|
|
38 |
fin_page();
|
|
|
39 |
exit;
|
|
|
40 |
}
|
|
|
41 |
|
|
|
42 |
if ($purger_index == "oui") {
|
|
|
43 |
if (verifier_action_auteur("purger_index", $hash)) {
|
|
|
44 |
include_ecrire('inc_index.php3');
|
|
|
45 |
purger_index();
|
|
|
46 |
creer_liste_indexation();
|
|
|
47 |
}
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
//
|
|
|
54 |
// Purger le cache
|
|
|
55 |
//
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
debut_cadre_trait_couleur("cache-24.gif", false, "", _T('texte_vider_cache'));
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
echo "\n<p align='justify'>"._T('texte_suppression_fichiers')."</p>",
|
|
|
62 |
"<p align='justify'>"._T('texte_recalcul_page')."</p>";
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
echo "\n<div> </div>";
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
//
|
|
|
70 |
// Quota et taille du cache
|
|
|
71 |
//
|
|
|
72 |
debut_cadre_relief("", false, "", _T('taille_repertoire_cache'));
|
|
|
73 |
|
|
|
74 |
list ($taille) = spip_fetch_array(spip_query("SELECT SUM(taille) FROM spip_caches WHERE type='t'"));
|
|
|
75 |
|
|
|
76 |
if ($taille>0) {
|
|
|
77 |
$info = _T('taille_cache_octets', array('octets' => taille_en_octets($taille)));
|
|
|
78 |
} else
|
|
|
79 |
$info = _T('taille_cache_vide');
|
|
|
80 |
|
|
|
81 |
echo "<p align='justify'><b>$info</b></p>\n";
|
|
|
82 |
|
|
|
83 |
echo "\n<p align='justify'>";
|
|
|
84 |
if ($quota_cache) {
|
|
|
85 |
echo _T('taille_cache_maxi',
|
|
|
86 |
array('octets' => taille_en_octets($quota_cache*1024*1024)));
|
|
|
87 |
} else {
|
|
|
88 |
echo _T('taille_cache_infinie');
|
|
|
89 |
}
|
|
|
90 |
echo ' ('._T('cache_modifiable_webmestre').')</p>';
|
|
|
91 |
|
|
|
92 |
echo "\n<FORM ACTION='../spip_cache.php3' METHOD='post'>";
|
|
|
93 |
echo "\n<INPUT TYPE='hidden' NAME='id_auteur' VALUE='$connect_id_auteur'>";
|
|
|
94 |
echo "\n<INPUT TYPE='hidden' NAME='hash' VALUE='" . calculer_action_auteur("purger_cache") . "'>";
|
|
|
95 |
echo "\n<INPUT TYPE='hidden' NAME='purger_cache' VALUE='oui'>";
|
|
|
96 |
echo "\n<INPUT TYPE='hidden' NAME='redirect' VALUE='" . _DIR_RESTREINT_ABS . "admin_vider.php3'>";
|
|
|
97 |
echo "\n<p><DIV align='right'><INPUT CLASS='fondo' TYPE='submit' NAME='valider' VALUE=\"".str_replace('"', '"', _T('bouton_vider_cache'))."\"></FORM></DIV>";
|
|
|
98 |
|
|
|
99 |
fin_cadre_relief();
|
|
|
100 |
|
|
|
101 |
|
|
|
102 |
debut_cadre_relief("image-24.gif", false, "", _T('info_images_auto'));
|
|
|
103 |
echo "<div style='text-align: center;'>";
|
|
|
104 |
echo "<iframe width='530px' height='65px' src='../spip_cache.php3?id_auteur=$connect_id_auteur&hash=".calculer_action_auteur("afficher_cache_images")."&afficher_cache_images=oui&lang=$spip_lang'></iframe>";
|
|
|
105 |
echo "</div>";
|
|
|
106 |
|
|
|
107 |
echo "\n<FORM ACTION='../spip_cache.php3' METHOD='post'>";
|
|
|
108 |
echo "\n<INPUT TYPE='hidden' NAME='id_auteur' VALUE='$connect_id_auteur'>";
|
|
|
109 |
echo "\n<INPUT TYPE='hidden' NAME='hash' VALUE='" . calculer_action_auteur("purger_cache_images") . "'>";
|
|
|
110 |
echo "\n<INPUT TYPE='hidden' NAME='purger_cache_images' VALUE='oui'>";
|
|
|
111 |
echo "\n<INPUT TYPE='hidden' NAME='redirect' VALUE='" . _DIR_RESTREINT_ABS . "admin_vider.php3'>";
|
|
|
112 |
echo "\n<p><DIV align='right'><INPUT CLASS='fondo' TYPE='submit' NAME='valider' VALUE=\"".str_replace('"', '"', _T('bouton_vider_cache'))."\"></FORM></DIV>";
|
|
|
113 |
fin_cadre_relief();
|
|
|
114 |
|
|
|
115 |
fin_cadre_trait_couleur();
|
|
|
116 |
|
|
|
117 |
//
|
|
|
118 |
// Purger la base d'indexation
|
|
|
119 |
//
|
|
|
120 |
debut_cadre_trait_couleur("racine-site-24.gif", false, "", _T('texte_effacer_donnees_indexation'));
|
|
|
121 |
|
|
|
122 |
echo "\n<p align='justify'>";
|
|
|
123 |
if (lire_meta('activer_moteur') == 'oui')
|
|
|
124 |
echo _T('texte_moteur_recherche_active');
|
|
|
125 |
else {
|
|
|
126 |
echo "<b>"._T('texte_moteur_recherche_non_active')."</b> ";
|
|
|
127 |
$row = spip_fetch_array(spip_query("SELECT COUNT(*) AS cnt FROM spip_index_articles"));
|
|
|
128 |
if ($row['cnt'])
|
|
|
129 |
echo _T('texte_commande_vider_tables_indexation');
|
|
|
130 |
else
|
|
|
131 |
echo _T('texte_tables_indexation_vides');
|
|
|
132 |
|
|
|
133 |
}
|
|
|
134 |
|
|
|
135 |
echo "\n<FORM ACTION='admin_vider.php3' METHOD='post'>";
|
|
|
136 |
|
|
|
137 |
$hash = calculer_action_auteur("purger_index");
|
|
|
138 |
|
|
|
139 |
echo "\n<INPUT TYPE='hidden' NAME='hash' VALUE='$hash'>";
|
|
|
140 |
echo "\n<INPUT TYPE='hidden' NAME='purger_index' VALUE='oui'>";
|
|
|
141 |
echo "\n<p><DIV align='right'><INPUT CLASS='fondo' TYPE='submit' NAME='valider' VALUE=\""._T('bouton_effacer_index')."\"></FORM></DIV>";
|
|
|
142 |
|
|
|
143 |
fin_cadre_trait_couleur();
|
|
|
144 |
|
|
|
145 |
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
echo "<BR>";
|
|
|
149 |
|
|
|
150 |
fin_page();
|
|
|
151 |
|
|
|
152 |
|
|
|
153 |
?>
|
|
|
154 |
|