// Fichiers $fp = @file("pic-manager.txt"); // La première ligne du tableau est un commentaire settype($fp[1], "integer"); $Max_thumb = $fp[1]; settype($fp[2], "integer"); $refresh = $fp[2]; if ($refresh == 0) { $refresh = 3600; } $rep_cache = $racine_fma . "/cache/"; $rep_cache_encrypt = rawurlencode(encrypt($rep_cache)); $cache_prefix = $cookie[1] . md5(str_replace("/", ".", str_replace($racine_fma . "/", "", $cur_nav))); if ($Max_thumb > 0) { $files = "<div id=\"photo\">"; while ($obj->NextFile()) { if (fma_autorise("f", $obj->FieldName)) { $suf = strtolower($obj->FieldView); if ($suf == "gif" or $suf == "jpg" or $suf == "png" or $suf == "swf" or $suf == "mp3") { if ($ficpres_fma[1]) { $ibid = rawurlencode(encrypt(rawurldecode($cur_nav_encrypt) . "#fma#" . encrypt($obj->FieldName))); $imagette = ""; if ($suf == "gif" or $suf == "jpg") { if (function_exists('gd_info') or extension_loaded('gd')) { //cached or not ? if (file_exists($rep_cache . $cache_prefix . "." . $obj->FieldName)) { if (filemtime($rep_cache . $cache_prefix . "." . $obj->FieldName) > time() - $refresh) { if (filesize($rep_cache . $cache_prefix . "." . $obj->FieldName) > 0) { $cache = true; $image = imagesize($obj->FieldName, $Max_thumb); $imagette = rawurlencode(encrypt(rawurldecode($rep_cache_encrypt) . "#fma#" . encrypt($cache_prefix . "." . $obj->FieldName)));