コード例 #1
0
ファイル: filldb.php プロジェクト: h3xstream/bandlogos
                            continue;
                        }
                    }
                }
                $prev = $name;
                ///---Insert in db
                if (artistExist($name)) {
                    continue;
                }
                echo $name . " - ";
                $newDate = filemtime(Config::FOLDER_LOGOS . $file);
                //Date of modification (new file)
                $newArtist = new Artist($name, $file, "", -1, $newDate);
                Artists::addArtist($newArtist);
                $nbInsert++;
            }
            closedir($handle);
        }
    }
}
//--Ini
set_time_limit(360);
$start = microtime(true);
//--Empty list
if (isset($_GET['clear'])) {
    Artists::emptyList();
}
//--Fill db base on the file this folder
loadLogos(Config::FOLDER_LOGOS);
$end = microtime(true);
echo $nbInsert . " artists inserted in " . round($end - $start, 3) . " sec.";