| 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 | 
           //
  | 
        
        
            | 
            | 
           15 | 
           // Ce fichier ne sera execute qu'une fois
  | 
        
        
            | 
            | 
           16 | 
           if (defined("_INC_CACHE")) return;
  | 
        
        
            | 
            | 
           17 | 
           define("_INC_CACHE", "1");
  | 
        
        
            | 
            | 
           18 | 
              | 
        
        
            | 
            | 
           19 | 
              | 
        
        
            | 
            | 
           20 | 
           //
  | 
        
        
            | 
            | 
           21 | 
           // Calcul du nom du fichier cache
  | 
        
        
            | 
            | 
           22 | 
           //
  | 
        
        
            | 
            | 
           23 | 
              | 
        
        
            | 
            | 
           24 | 
           function nettoyer_uri() {
  | 
        
        
            | 
            | 
           25 | 
           	$fichier_requete = $GLOBALS['REQUEST_URI'];
  | 
        
        
            | 
            | 
           26 | 
           	$fichier_requete = eregi_replace
  | 
        
        
            | 
            | 
           27 | 
           		('[?&](PHPSESSID|(var_[^=&]*))=[^&]*',
  | 
        
        
            | 
            | 
           28 | 
           		'', $fichier_requete);
  | 
        
        
            | 
            | 
           29 | 
           	return $fichier_requete;
  | 
        
        
            | 
            | 
           30 | 
           }
  | 
        
        
            | 
            | 
           31 | 
              | 
        
        
            | 
            | 
           32 | 
           //
  | 
        
        
            | 
            | 
           33 | 
           // Le format souhaite : "CACHE/a/bout-d-url.md5(.gz)"
  | 
        
        
            | 
            | 
           34 | 
           // Attention a modifier simultanement le sanity check de
  | 
        
        
            | 
            | 
           35 | 
           // la fonction retire_cache()
  | 
        
        
            | 
            | 
           36 | 
           //
  | 
        
        
            | 
            | 
           37 | 
           function generer_nom_fichier_cache($contexte='', $fond='') {
  | 
        
        
            | 
            | 
           38 | 
           	global $flag_gz;
  | 
        
        
            | 
            | 
           39 | 
              | 
        
        
            | 
            | 
           40 | 
           	if (!$contexte) {
  | 
        
        
            | 
            | 
           41 | 
           		$fichier_requete = nettoyer_uri();
  | 
        
        
            | 
            | 
           42 | 
           	} else {
  | 
        
        
            | 
            | 
           43 | 
           		$fichier_requete = $fond;
  | 
        
        
            | 
            | 
           44 | 
           		foreach ($contexte as $var=>$val)
  | 
        
        
            | 
            | 
           45 | 
           			$fichier_requete .= "&$var=$val";
  | 
        
        
            | 
            | 
           46 | 
           	}
  | 
        
        
            | 
            | 
           47 | 
              | 
        
        
            | 
            | 
           48 | 
           	$fichier_cache = ereg_replace('^/+', '', $fichier_requete);
  | 
        
        
            | 
            | 
           49 | 
           	$fichier_cache = ereg_replace('\.[a-zA-Z0-9]*', '', $fichier_cache);
  | 
        
        
            | 
            | 
           50 | 
           	$fichier_cache = ereg_replace('&[^&]+=([^&]+)', '&\1', $fichier_cache);
  | 
        
        
            | 
            | 
           51 | 
           	$fichier_cache = rawurlencode(strtr($fichier_cache, '/&-', '--_'));
  | 
        
        
            | 
            | 
           52 | 
           	if (strlen($fichier_cache) > 24)
  | 
        
        
            | 
            | 
           53 | 
           		$fichier_cache = substr(ereg_replace('([a-zA-Z]{1,3})[^-]*-',
  | 
        
        
            | 
            | 
           54 | 
           		'\1-', $fichier_cache), -22);
  | 
        
        
            | 
            | 
           55 | 
              | 
        
        
            | 
            | 
           56 | 
           	// Pour la page d'accueil
  | 
        
        
            | 
            | 
           57 | 
           	if (!$fichier_cache)
  | 
        
        
            | 
            | 
           58 | 
           		$fichier_cache = 'INDEX-';
  | 
        
        
            | 
            | 
           59 | 
              | 
        
        
            | 
            | 
           60 | 
           	// morceau de md5 selon HOST et $fond
  | 
        
        
            | 
            | 
           61 | 
           	$md_cache = md5($fichier_requete . $GLOBALS['HTTP_HOST'] . $fond);
  | 
        
        
            | 
            | 
           62 | 
           	$fichier_cache .= '.'.substr($md_cache, 1, 8);
  | 
        
        
            | 
            | 
           63 | 
              | 
        
        
            | 
            | 
           64 | 
           	// Sous-repertoires 0...9a..f/
  | 
        
        
            | 
            | 
           65 | 
           	$subdir = creer_repertoire(_DIR_CACHE, substr($md_cache, 0, 1));
  | 
        
        
            | 
            | 
           66 | 
              | 
        
        
            | 
            | 
           67 | 
           	include_ecrire('inc_acces.php3');
  | 
        
        
            | 
            | 
           68 | 
           	verifier_htaccess(_DIR_CACHE);
  | 
        
        
            | 
            | 
           69 | 
              | 
        
        
            | 
            | 
           70 | 
           	$gzip = $flag_gz ? '.gz' : '';
  | 
        
        
            | 
            | 
           71 | 
              | 
        
        
            | 
            | 
           72 | 
           	return _DIR_CACHE . $subdir.$fichier_cache.$gzip;
  | 
        
        
            | 
            | 
           73 | 
           }
  | 
        
        
            | 
            | 
           74 | 
              | 
        
        
            | 
            | 
           75 | 
           //
  | 
        
        
            | 
            | 
           76 | 
           // Destruction des fichiers caches invalides
  | 
        
        
            | 
            | 
           77 | 
           //
  | 
        
        
            | 
            | 
           78 | 
           // NE PAS appeler ces fonctions depuis l'espace prive
  | 
        
        
            | 
            | 
           79 | 
           // car openbase_dir peut leur interdire l'acces au repertoire de cache
  | 
        
        
            | 
            | 
           80 | 
              | 
        
        
            | 
            | 
           81 | 
           // Securite : est sur que c'est un cache
  | 
        
        
            | 
            | 
           82 | 
           function retire_cache($cache) {
  | 
        
        
            | 
            | 
           83 | 
           	if (!_DIR_RESTREINT) return;
  | 
        
        
            | 
            | 
           84 | 
           	if (preg_match('|^' . _DIR_CACHE .
  | 
        
        
            | 
            | 
           85 | 
           		"([0-9a-f]/)?([0-9]+/)?[^.][\-_\%0-9a-z]+\.[0-9a-f]+(\.gz)?$|i",
  | 
        
        
            | 
            | 
           86 | 
           		       $cache)) {
  | 
        
        
            | 
            | 
           87 | 
           		// supprimer le fichier (de facon propre)
  | 
        
        
            | 
            | 
           88 | 
           		supprimer_fichier($cache);
  | 
        
        
            | 
            | 
           89 | 
           	} else
  | 
        
        
            | 
            | 
           90 | 
           		spip_log("Impossible de retirer $cache");
  | 
        
        
            | 
            | 
           91 | 
           }
  | 
        
        
            | 
            | 
           92 | 
              | 
        
        
            | 
            | 
           93 | 
           // Supprimer les caches marques "x"
  | 
        
        
            | 
            | 
           94 | 
           function retire_caches($chemin = '') {
  | 
        
        
            | 
            | 
           95 | 
           	if (!_DIR_RESTREINT) return;
  | 
        
        
            | 
            | 
           96 | 
              | 
        
        
            | 
            | 
           97 | 
           	// recuperer la liste des caches voues a la suppression
  | 
        
        
            | 
            | 
           98 | 
           	$suppr = array();
  | 
        
        
            | 
            | 
           99 | 
              | 
        
        
            | 
            | 
           100 | 
           	// En priorite le cache qu'on appelle maintenant
  | 
        
        
            | 
            | 
           101 | 
           	if ($chemin) {
  | 
        
        
            | 
            | 
           102 | 
           		$q = spip_query("SELECT fichier FROM spip_caches
  | 
        
        
            | 
            | 
           103 | 
           		WHERE fichier = '".addslashes($chemin)."' AND type='x' LIMIT 0,1");
  | 
        
        
            | 
            | 
           104 | 
           		if ($r = spip_fetch_array($q))
  | 
        
        
            | 
            | 
           105 | 
           			$suppr[$r['fichier']] = true;
  | 
        
        
            | 
            | 
           106 | 
           	}
  | 
        
        
            | 
            | 
           107 | 
              | 
        
        
            | 
            | 
           108 | 
           	// Et puis une centaine d'autres
  | 
        
        
            | 
            | 
           109 | 
           	if (lire_meta('invalider_caches')) {
  | 
        
        
            | 
            | 
           110 | 
           		$compte = 1;
  | 
        
        
            | 
            | 
           111 | 
           		effacer_meta('invalider_caches'); # concurrence
  | 
        
        
            | 
            | 
           112 | 
           		ecrire_metas();
  | 
        
        
            | 
            | 
           113 | 
              | 
        
        
            | 
            | 
           114 | 
           		$q = spip_query("SELECT fichier FROM spip_caches
  | 
        
        
            | 
            | 
           115 | 
           		WHERE type='x' LIMIT 0,100");
  | 
        
        
            | 
            | 
           116 | 
           		while ($r = spip_fetch_array($q)) {
  | 
        
        
            | 
            | 
           117 | 
           			$compte ++;	# compte le nombre de resultats vus (y compris doublons)
  | 
        
        
            | 
            | 
           118 | 
           			$suppr[$r['fichier']] = true;
  | 
        
        
            | 
            | 
           119 | 
           		}
  | 
        
        
            | 
            | 
           120 | 
           	}
  | 
        
        
            | 
            | 
           121 | 
              | 
        
        
            | 
            | 
           122 | 
              | 
        
        
            | 
            | 
           123 | 
           	if ($n = count($suppr)) {
  | 
        
        
            | 
            | 
           124 | 
           		spip_log ("Retire $n caches");
  | 
        
        
            | 
            | 
           125 | 
           		foreach ($suppr as $cache => $ignore)
  | 
        
        
            | 
            | 
           126 | 
           			retire_cache($cache);
  | 
        
        
            | 
            | 
           127 | 
           		spip_query("DELETE FROM spip_caches WHERE "
  | 
        
        
            | 
            | 
           128 | 
           		.calcul_mysql_in('fichier', "'".join("','",array_keys($suppr))."'") );
  | 
        
        
            | 
            | 
           129 | 
           	}
  | 
        
        
            | 
            | 
           130 | 
              | 
        
        
            | 
            | 
           131 | 
           	// Si on a regarde (compte > 0), signaler s'il reste des caches invalides
  | 
        
        
            | 
            | 
           132 | 
           	if ($compte > 0) {
  | 
        
        
            | 
            | 
           133 | 
           		if ($compte > 100) # s'il y en a 101 c'est qu'on n'a pas fini
  | 
        
        
            | 
            | 
           134 | 
           			ecrire_meta('invalider_caches', 'oui');
  | 
        
        
            | 
            | 
           135 | 
           		else
  | 
        
        
            | 
            | 
           136 | 
           			effacer_meta('invalider');
  | 
        
        
            | 
            | 
           137 | 
           		ecrire_metas();
  | 
        
        
            | 
            | 
           138 | 
           	}
  | 
        
        
            | 
            | 
           139 | 
           }
  | 
        
        
            | 
            | 
           140 | 
              | 
        
        
            | 
            | 
           141 | 
           //
  | 
        
        
            | 
            | 
           142 | 
           // Retourne 0 s'il faut calculer le cache, 1 si on peut l'utiliser
  | 
        
        
            | 
            | 
           143 | 
           //
  | 
        
        
            | 
            | 
           144 | 
           function utiliser_cache($chemin_cache, $delais) {
  | 
        
        
            | 
            | 
           145 | 
           	global $_SERVER;
  | 
        
        
            | 
            | 
           146 | 
              | 
        
        
            | 
            | 
           147 | 
           	// ne jamais calculer pour les moteurs de recherche, proxies...
  | 
        
        
            | 
            | 
           148 | 
           	if ($_SERVER['REQUEST_METHOD'] == 'HEAD')
  | 
        
        
            | 
            | 
           149 | 
           		return 1;
  | 
        
        
            | 
            | 
           150 | 
              | 
        
        
            | 
            | 
           151 | 
           	//  calcul par forcage
  | 
        
        
            | 
            | 
           152 | 
           	if ($GLOBALS['var_mode'] &&
  | 
        
        
            | 
            | 
           153 | 
           		($GLOBALS['_COOKIE']['spip_session']
  | 
        
        
            | 
            | 
           154 | 
           		|| $GLOBALS['_COOKIE']['spip_admin']
  | 
        
        
            | 
            | 
           155 | 
           		|| @file_exists(_ACCESS_FILE_NAME))) # insuffisant...
  | 
        
        
            | 
            | 
           156 | 
           		return 0;
  | 
        
        
            | 
            | 
           157 | 
              | 
        
        
            | 
            | 
           158 | 
           	// calcul par absence
  | 
        
        
            | 
            | 
           159 | 
           	if (!@file_exists($chemin_cache)) return 0;
  | 
        
        
            | 
            | 
           160 | 
              | 
        
        
            | 
            | 
           161 | 
           	// calcul par obsolescence
  | 
        
        
            | 
            | 
           162 | 
           	return ((time() - @filemtime($chemin_cache)) > $delais) ? 0 : 1;
  | 
        
        
            | 
            | 
           163 | 
           }
  | 
        
        
            | 
            | 
           164 | 
              | 
        
        
            | 
            | 
           165 | 
              | 
        
        
            | 
            | 
           166 | 
           // Obsolete ?  Utilisee pour vider le cache depuis l'espace prive
  | 
        
        
            | 
            | 
           167 | 
           // (ou juste les squelettes si un changement de config le necessite)
  | 
        
        
            | 
            | 
           168 | 
           function purger_repertoire($dir, $age='ignore', $regexp = '') {
  | 
        
        
            | 
            | 
           169 | 
           	$handle = @opendir($dir);
  | 
        
        
            | 
            | 
           170 | 
           	if (!$handle) return;
  | 
        
        
            | 
            | 
           171 | 
              | 
        
        
            | 
            | 
           172 | 
           	while (($fichier = @readdir($handle)) != '') {
  | 
        
        
            | 
            | 
           173 | 
           		// Eviter ".", "..", ".htaccess", etc.
  | 
        
        
            | 
            | 
           174 | 
           		if ($fichier[0] == '.') continue;
  | 
        
        
            | 
            | 
           175 | 
           		if ($regexp AND !ereg($regexp, $fichier)) continue;
  | 
        
        
            | 
            | 
           176 | 
           		$chemin = "$dir/$fichier";
  | 
        
        
            | 
            | 
           177 | 
           		if (is_file($chemin))
  | 
        
        
            | 
            | 
           178 | 
           			@unlink($chemin);
  | 
        
        
            | 
            | 
           179 | 
           		else if (is_dir($chemin))
  | 
        
        
            | 
            | 
           180 | 
           			if ($fichier != 'CVS')
  | 
        
        
            | 
            | 
           181 | 
           				purger_repertoire($chemin);
  | 
        
        
            | 
            | 
           182 | 
           	}
  | 
        
        
            | 
            | 
           183 | 
           	closedir($handle);
  | 
        
        
            | 
            | 
           184 | 
           }
  | 
        
        
            | 
            | 
           185 | 
              | 
        
        
            | 
            | 
           186 | 
           function purger_cache() {
  | 
        
        
            | 
            | 
           187 | 
           	spip_log('vider le cache');
  | 
        
        
            | 
            | 
           188 | 
           	include_ecrire('inc_invalideur.php3');
  | 
        
        
            | 
            | 
           189 | 
           	supprime_invalideurs();
  | 
        
        
            | 
            | 
           190 | 
           	purger_repertoire(_DIR_CACHE, 0);
  | 
        
        
            | 
            | 
           191 | 
           }
  | 
        
        
            | 
            | 
           192 | 
              | 
        
        
            | 
            | 
           193 | 
           function purger_squelettes() {
  | 
        
        
            | 
            | 
           194 | 
           	spip_log('effacer les squelettes compiles');
  | 
        
        
            | 
            | 
           195 | 
           	purger_repertoire(_DIR_CACHE, 0, '^skel_');
  | 
        
        
            | 
            | 
           196 | 
           }
  | 
        
        
            | 
            | 
           197 | 
              | 
        
        
            | 
            | 
           198 | 
              | 
        
        
            | 
            | 
           199 | 
           // Determination du fichier cache (si besoin)
  | 
        
        
            | 
            | 
           200 | 
           function determiner_cache($delais, &$use_cache, &$chemin_cache) {
  | 
        
        
            | 
            | 
           201 | 
           	global $_SERVER;
  | 
        
        
            | 
            | 
           202 | 
              | 
        
        
            | 
            | 
           203 | 
           	$post = ($_SERVER['REQUEST_METHOD'] == 'POST');
  | 
        
        
            | 
            | 
           204 | 
              | 
        
        
            | 
            | 
           205 | 
           	// Le fichier cache est-il valide ?
  | 
        
        
            | 
            | 
           206 | 
           	if ($delais<>0 AND !$post)
  | 
        
        
            | 
            | 
           207 | 
           		$use_cache = utiliser_cache($chemin_cache, $delais);
  | 
        
        
            | 
            | 
           208 | 
              | 
        
        
            | 
            | 
           209 | 
           	// Sinon, tester qu'on a la connexion a la base
  | 
        
        
            | 
            | 
           210 | 
           	if (!$use_cache) {
  | 
        
        
            | 
            | 
           211 | 
           		include_local(_FILE_CONNECT);
  | 
        
        
            | 
            | 
           212 | 
           		if (!$GLOBALS['db_ok']) {
  | 
        
        
            | 
            | 
           213 | 
           			if (@file_exists($chemin_cache))
  | 
        
        
            | 
            | 
           214 | 
           				$use_cache = 1; // passer outre
  | 
        
        
            | 
            | 
           215 | 
           			else {
  | 
        
        
            | 
            | 
           216 | 
           				spip_log("Erreur base de donnees & "
  | 
        
        
            | 
            | 
           217 | 
           					. "impossible utiliser $chemin_cache");
  | 
        
        
            | 
            | 
           218 | 
           				if (!$GLOBALS['flag_preserver']) {
  | 
        
        
            | 
            | 
           219 | 
           					include_ecrire('inc_presentation.php3');
  | 
        
        
            | 
            | 
           220 | 
           					if (!headers_sent()) {
  | 
        
        
            | 
            | 
           221 | 
           						install_debut_html(_T('info_travaux_titre'));
  | 
        
        
            | 
            | 
           222 | 
           						echo _T('titre_probleme_technique');
  | 
        
        
            | 
            | 
           223 | 
           						install_fin_html();
  | 
        
        
            | 
            | 
           224 | 
           					}
  | 
        
        
            | 
            | 
           225 | 
           					else echo _T('titre_probleme_technique');
  | 
        
        
            | 
            | 
           226 | 
              | 
        
        
            | 
            | 
           227 | 
           				}
  | 
        
        
            | 
            | 
           228 | 
           				// continuer quand meme, ca n'ira pas loin.
  | 
        
        
            | 
            | 
           229 | 
              | 
        
        
            | 
            | 
           230 | 
           				// mais ne plus rien signaler, ne pas mettre en cache ...
  | 
        
        
            | 
            | 
           231 | 
           				$GLOBALS['flag_preserver'] = true;
  | 
        
        
            | 
            | 
           232 | 
           				define ('spip_interdire_cache', true);
  | 
        
        
            | 
            | 
           233 | 
           			  }
  | 
        
        
            | 
            | 
           234 | 
           		}
  | 
        
        
            | 
            | 
           235 | 
              | 
        
        
            | 
            | 
           236 | 
           		// En cas de POST (et si la connexion est ok) supprimer le cache
  | 
        
        
            | 
            | 
           237 | 
           		// histoire de faciliter la gestion de certaines balises dynamiques
  | 
        
        
            | 
            | 
           238 | 
           		else if ($post AND $chemin_cache) {
  | 
        
        
            | 
            | 
           239 | 
           			supprimer_fichier($chemin_cache);
  | 
        
        
            | 
            | 
           240 | 
           		}
  | 
        
        
            | 
            | 
           241 | 
              | 
        
        
            | 
            | 
           242 | 
           	}
  | 
        
        
            | 
            | 
           243 | 
           }
  | 
        
        
            | 
            | 
           244 | 
              | 
        
        
            | 
            | 
           245 | 
           // Fonctions pour le cache des images (vues reduites)
  | 
        
        
            | 
            | 
           246 | 
              | 
        
        
            | 
            | 
           247 | 
              | 
        
        
            | 
            | 
           248 | 
           function calculer_taille_dossier ($dir) {
  | 
        
        
            | 
            | 
           249 | 
           	$handle = @opendir($dir);
  | 
        
        
            | 
            | 
           250 | 
           	if (!$handle) return;
  | 
        
        
            | 
            | 
           251 | 
              | 
        
        
            | 
            | 
           252 | 
           	while (($fichier = @readdir($handle)) != '') {
  | 
        
        
            | 
            | 
           253 | 
           		// Eviter ".", "..", ".htaccess", etc.
  | 
        
        
            | 
            | 
           254 | 
           		if ($fichier[0] == '.') continue;
  | 
        
        
            | 
            | 
           255 | 
           		if ($regexp AND !ereg($regexp, $fichier)) continue;
  | 
        
        
            | 
            | 
           256 | 
           		if (is_file("$dir/$fichier")) {
  | 
        
        
            | 
            | 
           257 | 
           			$taille += filesize("$dir/$fichier");
  | 
        
        
            | 
            | 
           258 | 
           		}
  | 
        
        
            | 
            | 
           259 | 
           	}
  | 
        
        
            | 
            | 
           260 | 
           	closedir($handle);
  | 
        
        
            | 
            | 
           261 | 
           	return $taille;
  | 
        
        
            | 
            | 
           262 | 
           }
  | 
        
        
            | 
            | 
           263 | 
              | 
        
        
            | 
            | 
           264 | 
           function calculer_cache_vignettes() {
  | 
        
        
            | 
            | 
           265 | 
           	$handle = @opendir(_DIR_IMG);
  | 
        
        
            | 
            | 
           266 | 
           	if (!$handle) return;
  | 
        
        
            | 
            | 
           267 | 
              | 
        
        
            | 
            | 
           268 | 
           	while (($fichier = @readdir($handle)) != '') {
  | 
        
        
            | 
            | 
           269 | 
           		// Eviter ".", "..", ".htaccess", etc.
  | 
        
        
            | 
            | 
           270 | 
           		if ($fichier[0] == '.') continue;
  | 
        
        
            | 
            | 
           271 | 
           		if ($regexp AND !ereg($regexp, $fichier)) continue;
  | 
        
        
            | 
            | 
           272 | 
           		if (is_dir(_DIR_IMG.$fichier) AND ereg("^cache-", $fichier)) {
  | 
        
        
            | 
            | 
           273 | 
           			$taille += calculer_taille_dossier(_DIR_IMG.$fichier);
  | 
        
        
            | 
            | 
           274 | 
           		}
  | 
        
        
            | 
            | 
           275 | 
           	}
  | 
        
        
            | 
            | 
           276 | 
           	closedir($handle);
  | 
        
        
            | 
            | 
           277 | 
              | 
        
        
            | 
            | 
           278 | 
           	include_ecrire("inc_filtres.php3");
  | 
        
        
            | 
            | 
           279 | 
           	echo "<html><body>\n";
  | 
        
        
            | 
            | 
           280 | 
           	echo "<div style='font-family: verdana, arial, sans; font-size: 12px;'>";
  | 
        
        
            | 
            | 
           281 | 
           	echo "<p align='justify'>\n";
  | 
        
        
            | 
            | 
           282 | 
           	echo _T('ecrire:taille_cache_image', array('dir' => _DIR_IMG,
  | 
        
        
            | 
            | 
           283 | 
           		'taille' => "<b>".taille_en_octets($taille)."</b>"));
  | 
        
        
            | 
            | 
           284 | 
           	echo "</p></div></body></html>";
  | 
        
        
            | 
            | 
           285 | 
              | 
        
        
            | 
            | 
           286 | 
           }
  | 
        
        
            | 
            | 
           287 | 
              | 
        
        
            | 
            | 
           288 | 
           function purger_cache_images() {
  | 
        
        
            | 
            | 
           289 | 
           	purger_repertoire(_DIR_IMG, $age='ignore', $regexp = '^cache\-');
  | 
        
        
            | 
            | 
           290 | 
           }
  | 
        
        
            | 
            | 
           291 | 
              | 
        
        
            | 
            | 
           292 | 
              | 
        
        
            | 
            | 
           293 | 
              | 
        
        
            | 
            | 
           294 | 
           ?>
  |