コード例 #1
0
ファイル: browse.php プロジェクト: benbruscella/Grammafone
            mp3act_connect();
            $last_timestamp = 0;
            $getID3 = new getID3();
            $songsAdded = 0;
            $num_files = count($queuefiles);
            foreach ($queuefiles as $importfile) {
                echo "<li>Importing file {$importfile}</li>";
                /* Set the database status */
                $cur_fileno++;
                // update (at most) every second!
                $current_timestamp = time();
                if ($current_timestamp != $last_timestamp) {
                    $addMusic->outputProgressJavascript((int) ($cur_fileno * 100 / $num_files));
                    $last_timestamp = $current_timestamp;
                }
                $songsAdded += $addMusic->importOneSong($getID3, $importfile);
            }
            $addMusic->outputProgressJavascript(100);
            echo "<li>Added <strong>{$songsAdded} Songs</strong> To The Database</li>";
        }
        echo "</ul></div>";
    }
}
?>

</div>
<br/>
<a href="#" onclick="window.close()" title="Close The Add Music Window">Close Window</a>
</body>
</html>