">
" onclick="document.upload.submit(upload);alert('');"/>
PHP "._("Error Processing")."! "._("No file provided")." "._("Please select a file to upload")."";
} else {
echo "
PHP "._("Error Processing")." ".htmlentities($_FILES['mohfile']['name'])."! "._("Check")." upload_max_filesize "._("in")." /etc/php.ini
";
}
}
if (isset($_FILES['mohfile']['tmp_name']) && is_uploaded_file($_FILES['mohfile']['tmp_name'])) {
//echo $_FILES['mohfile']['name']." uploaded OK";
move_uploaded_file($_FILES['mohfile']['tmp_name'], $path_to_dir."/orig_".$_FILES['mohfile']['name']);
$process_err = process_mohfile($_FILES['mohfile']['name'],($_REQUEST['onlywav'] != ''));
if (isset($process_err)) {
echo "
"._("Error Processing").": \"$process_err\" for ".htmlentities($_FILES['mohfile']['name'])."!
\n";
echo "
"._("This is not a fatal error, your Music on Hold may still work.")."
\n";
} else {
echo "
"._("Completed processing")." ".htmlentities($_FILES['mohfile']['name'])."!
";
}
needreload();
//kill_mpg123();
}
//build the array of files
$file_array = build_list();
$numf = count($file_array);
if (isset($_REQUEST['del'])) {
$del = $_REQUEST['del'];
if (strpos($del, "\"") || strpos($del, "\'") || strpos($del, "\;")) {
print "You're trying to use an invalid character. Please don't.\n";
exit;
}
if (($numf == 1) && ($category == "default") ){
echo "
"._("You must have at least one file for On Hold Music. Please upload one before deleting this one.")."
";
} else {
if (@unlink($path_to_dir."/".$del)) {
echo "
"._("Deleted")." ".$del."!
";
} else {
echo "
".sprintf(_("Error Deleting %s"),$del)."!
";
}
//kill_mpg123();
needreload();
}
}
$file_array = build_list();
draw_list($file_array, $path_to_dir, $category);
?>