$ord, "nome" => $nome, "dir" => $CONF['mod_dir'].$file."/"); } } closedir($handle); if(count($MOD_DIR_1) < $c) d_err("Ci sono moduli con nome uguale !!!"); //ordino if($c > 0) { natsort($MOD_DIR_1); //riordino while(list($k, $v)=@each($MOD_DIR_1)) { $MOD_DIR_INFO[$k] = $MOD_DIR_INFO_TMP[$k]; } } else d_err("Nessun modulo presente "); unset($MOD_DIR_INFO_TMP); }else { d_err("Cartella moduli non esiste"); mkdir($CONF['moduli_dir']); } } function mod_moduli_init() { global $MOD_DIR, $MOD_DIR_INFO; while(list($k, $v)=@each($MOD_DIR_INFO)) { //apro cartelle e creo ARRAY struttura $mod_mod = $v['dir']; $handle2 = opendir($mod_mod); while (false !== ($file2 = readdir($handle2))) { if(is_dir($mod_mod.$file2) and $file2{0} == "_" and $file2{0} != "-" ) { //trovo i file $mod_mod2 = $mod_mod.$file2; $handle3 = opendir($mod_mod2); while (false !== ($file3 = readdir($handle3))) { if($file3 != "." and $file3 != ".." and $file{0} != "-") { $indi_mod_file_def = $mod_mod2."/".$file3; //css if($file2 == "_css" or $file2 == "_javascript") { //calcolo x cache $indi_mod_mtime = $indi_mod_mtime + filemtime($indi_mod_file_def); if($file2 == "_css") { $MOD_DIR["css"][$file][] = $indi_mod_file_def; } elseif($file2 == "_javascript") { $MOD_DIR["javascripts"][$file][] = $indi_mod_file_def; } $MOD_DIR["mtime_css_js"] = $indi_mod_mtime; } //raw $MOD_DIR["raw"][$mod_mod2."/".$file3] = $mod_mod2."/".$file3; } } closedir($handle3); // include($mod_dir.$file); } else { } } closedir($handle2); } } ?>