$page = "Submit a tablature";
include ("include/params.inc.php");
include ("include/stats.inc.php");
include ("include/header.inc.php");
print "
SUBMIT A TAB
";
if (isset($song) && isset($band) && isset($file)) {
if (($song == "") || ($band == "") || ($file == "")) {
if ($file == "") {
print "There is a problem with the file you sent.
Make sure that the file size don't exceed 300kb and that the file exists.
";
print "Contact the webmaster for further help.";
}else{
print "Please fill in the form.
";
}
} else {
if ($file == "none") { print "File Not Found.
"; } else {
$fext = strtolower(substr($file_name, strrpos($file_name, ".") + 1));
if ($fext == "doc" || $fext == "rtf"){
print "Sorry, you can't send a .$fext file.
Make sure you're using a fixed-width font in your word processor (ie. Courier New), then save your file as Text Only (*.txt).
";
print "Contact the webmaster for further explanations.";
include ("include/footer.inc.php");
exit;
}
if ($fext == "jpg" || $fext == "jpeg" || $fext == "gif" || $fext == "png" || $fext == "bmp"){
print "Sorry, you can't send a .$fext file.
Please only send text files.
";
print "Contact the webmaster for further explanations.";
include ("include/footer.inc.php");
exit;
}
if ($fext == "pdf"){
print "Sorry, you can't send a .$fext file.
Please only send 'plain text' files (ie *.txt, *.tab, *.crd).
";
print "Contact the webmaster for further explanations.";
include ("include/footer.inc.php");
exit;
}
$result = mysql_query("INSERT INTO tabsubmit (id, band, song, date, email) VALUES ('', '$band', '$song', NOW(''), '$email')");
$band = strtolower(str_replace(" ", "_", $band));
$song = strtolower(str_replace(" ", "_", $song));
@mkdir("./submittabs/" . $band, 0755);
@copy($file, "/home/max/etabs/www/submittabs/" . $band . "/" . $song . ".tab");
print "Thanks for your participation!";
@mail("webmaster@e-tabs.org", "[E-TABS] Submit", "$band - $song\n\n$email (".gethostbyaddr($REMOTE_ADDR).")", "From: e-tabs@e-tabs.org\r\nX-Reply: e-tabs@e-tabs.org");
}
}
} else {
print "Use this form to send us tabs that are not available on the archive.
Please post only PLAIN TEXT files (this means no Word documents).
";
print "If you want your name and/or email appears on the site,
you should include these informations in your tab.
";
print "Your tab will be added to our archive a few days after you submit it.
If not, repost it and take care not sending us unreadable files.
";
print "MS WORD DOCUMENTS CAN'T BE PUBLISHED, SO TAKE CARE!";
}
?>
include ("include/footer.inc.php");
?>