$time_start = time()+microtime();
include("include/required.php");
$basedir = "./nfos/nfo-archive";
echo "
";
$nr = 0;
if ($handle = opendir("$basedir")) {
while (false !== ($section = readdir($handle))) {
if ($section != "." && $section != ".." && is_dir("$basedir/$section")) {
if ($handle2 = opendir("$basedir/$section")) {
while (false !== ($release = readdir($handle2))) {
if ($release != "." && $release != ".." && is_dir("$basedir/$section/$release")) {
if ($handle3 = opendir("$basedir/$section/$release")) {
while (false !== ($file = readdir($handle3))) {
if(substr($file,-3) == 'nfo') {
$path = "$basedir/$section/$release/$file";
$querynew = "INSERT INTO `nfo` VALUES (NULL, '$release', LOAD_FILE('$path'), '$file');";
$resultnew=mysql_query($querynew);
if ($resultnew) {
$nr++;
//echo "| ".$nr." | ".$file.'/'.$files." |
";
}
}
}
}
closedir($handle3);
}
}
}
closedir($handle2);
}
}
closedir($handle);
}
$time_end = time()+microtime(); //The search is done, so what time is it now?
$page_time = round($time_end - $time_start, 5);
echo "
";
echo "Done, imported $nr .nfo's in $page_time seconds";
?>