"; echo "

New Music is being added. This could take several minutes.
"; echo "

"; } elseif(isset($_GET['musicpath']) && is_dir($_GET['musicpath']) ){ echo "

"; $path = $_GET['musicpath']; if($path{strlen($path)-1} != '/'){ $path .= "/"; } $addMusic = new addMusic; $addMusic->setPath($path); $addMusic->getSongs($path,$songs); $songsAdded = $addMusic->insertSongs(); //$songsAdded = $addMusic->insertSongs($addMusic->getSongs($path,&$songs)); echo "
Added $songsAdded Songs To The Database"; echo "

"; } elseif(isset($_FILES['musicfile']['name'])){ /* Copy the file to the repository */ echo "
";
            print_r($_FILES);
            echo "
"; // echo $_FILES['musicfile']['tmp_name']; // echo "
".$_FILES['musicfile']['name']; if (move_uploaded_file($_FILES['musicfile']['tmp_name'], $GLOBALS[upload_path]."/".$_FILES['musicfile']['name'])) { echo "
The File has been uploaded succesfully."; /* Add the file to the database */ echo "
\n"; echo "



"; echo "

Be Patient While Music is Added. It could take several minutes.

"; echo "
"; } else { echo "
The was an error uploading the file, the maximum file size permited is 20MB.
"; } } elseif(isset($_POST['musicfile'])){ echo "
Uploading File
"; } else{ echo "
\n"; echo "



"; echo "

Be Patient While Music is Added. It could take several minutes.

"; echo "
"; /* UPLOADING */ if(isset($GLOBALS[upload_path]) && is_dir($GLOBALS[upload_path]) ){ echo "
"; echo ""; echo "

Upload a File (.mp3 .zip .tar)
\n"; echo "

\n"; echo "

"; echo "
"; } } ?>