THE BUNGHOLE - Submit site for $action\n";
?>
You have given no title for the resource you're submitting. Please, re-enter the correct data";
echo " in the form below.
\n";
$showold = 1;
return;
}
if(!$url) {
echo "You have given no url for the resource you're submitting. Please, re-enter the correct data";
echo " in the form below.
\n";
$showold = 1;
return;
}
if(!$oldurl && ($action == "modification")) {
echo "You have given no old title or url of the resource you're modifying. Please, re-enter the correct data";
echo " in the form below.
\n";
$showold = 1;
return;
}
if(!$contact_email || !strpos($contact_email, "@")) {
echo "You have given no valid e-mail adress so that we can contact you. Please, re-enter the correct data";
echo " in the form below.
\n";
$showold = 1;
return;
}
$db = connect_to_db();
if($action == "modification") {
// Find if previous record exists.
$query = mysql_query("SELECT id FROM bunghole_links WHERE title LIKE '$oldurl%' OR url = '$oldurl';");
if(!mysql_num_rows($query)) {
echo "No previous record found with the information you have provided. Please re-enter the correct data";
echo " in the form below.
\n";
$showold = 1;
mysql_close($db);
return;
}
else {
$result = mysql_fetch_array($query);
$oldid = $result["id"];
}
}
if(!$oldid)
$oldid = "NULL";
$query = mysql_query("INSERT INTO bunghole_validation VALUES(NULL, '$action', $oldid, '$title', '$url', '$category', '$description', '$contact_name', '$contact_email');");
// Send notification letter to $webmaster_email
$msg = "The following link is waiting for $action:\n\n";
$msg .= " Old id: $oldid\n";
$msg .= " Title: $title\n";
$msg .= " URL: $url\n";
$msg .= " Category: $category\n";
$msg .= " Description: $description\n";
$msg .= " Contact name: $contact_name\n";
$msg .= " Contact email: $contact_email\n";
$msg .= "\nVisit http://www.ravencrypt.com/bunghole/admin/ to validate this link.";
$msg .= "\n\nStay heavy,\nBunghole\n";
mail("$webmaster_email", "Bunghole: $action is waiting: $title", $msg);
echo "Submission successful
\n";
echo "Your submission was successful. The resource will be reviewed and validated as soon as possible";
echo " and you will be notified of the addition of your resource. Thank you for supporting Bunghole.\n";
echo "
If you want to submit another site for $action as well, you can use the form below.\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "
\n";
echo "\n";
echo "\n";
return;
}
echo " Processing submission...\n";
echo " | \n";
echo "
\n";
echo "
\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
process_submission();
?>
| Submit site for
|