Here you go. I have 4 scripts. Sorry about the first one being lengthy. Included are links to the screenshots as mentioned in my first post.
http://www.foxenews.com/submitscreenshot.png
http://www.foxenews.com/emailscreenshot.png
[php]<?php include("privateheader.php"); ?>
Article Submission Form
Use this form to submit your article. Please follow these guidelines so I don't have to contact you to ask questions.
Your name
Date you want to appear on the web page next to your article.
Title for your article (47 characters max. including spaces).
Brief summery to go under your title. This is for the front page only. Possibly may be used when we archive. (250 characters max. including spaces)
Category is your article going to be placed under. (Sports, Tech, News, Video, Entertainment or new category
if you have more articles you would like to submit)
Submit 2 photos that have not been shrunk down to any size. If it is a lengthy article, submit a few more photos up to 5.
Rename the photos so they identify with the article and please keep the name in all lower case letters with no spaces,
it makes it much easier for me to post. Please don't name the photo july4thparade.jpg, name it something like july4thfiretruck2012.jpg.
Adding the year in the name of the photo is a good idea because next year we may cover the 4th of July parade again.
Please make sure spell checking and grammar is done prior to submitting. I do not check your articles before they are posted.
If you want to submit a link to your personal web page, feel free to do so. It will be placed at the bottom of your article as a link.
This form does not automatically post your article when you submit it. This post will be emailed to me and then I will manually put it up on the web page.
If this form gives you some sort of error, please email me all the info you would normally fill out to [email protected]
If you would like to include a small profile picture of your face to go with your article, include it in your attachments when sending your article.
Full Name |
|
Your Email |
|
Date for Article |
|
Title |
|
Article Summery |
|
Category |
|
Link |
|
Article |
Copy and paste your article in here or browse to the file by using the ATTACH DOCUMENT button below. |
Filename:
|
|
<?php include("privatefooter.php"); ?>[/php]
Script #2
[php]<?php
include(‘init.inc.php’);
if (isset($_POST[‘name’], $_FILES[‘file’])){
$body = <<<BODY
From: {$_POST[‘name’]}
Details:
Name: {$_FILES['file']['name']}
Size: {$_FILES['file']['size']}
Type: {$_FILES['file']['type']}
BODY;
mail_file(‘[email protected]’, ‘Article Submission’, $body, $_FILES[‘file’]);
}
$to=‘[email protected]’;
$subject='Article Submission from ’ . $name;
$name=$_POST[‘name’];
$email=$_POST[‘email’];
$date=$_POST[‘date’];
$title=$_POST[‘title’];
$summery=$_POST[‘summery’];
$category=$_POST[‘category’];
$link=$_POST[‘link’];
$message=$_POST[‘message’];
$message="Name: ".$name. “\r\n” . "Email: " .$email . “\r\n” . "Article Date: " .$date . “\r\n” . "Title: " .$title . “\r\n” . "Summery: " .$summery . “\r\n” . "Category: " .$category . “\r\n” . "Link: " .$link . “\r\n” . "Message: " .$message;
mail($to,$subject,$message);
echo ‘Thanks for your submission. I will post your article soon!’;
?>
back to home page
[/php]
Script #3
[php]<?php
$path = dirname(FILE);
include("{$path}/mail.inc.php");
?>[/php]
Script #4
[php]<?php
function mail_file($to, $from, $subject, $body, $file){
$boundary = md5(rand());
$headers = array(
'MIME-Version: 1.0',
"Content-Type: multipart/mixed: boundary=\"{$boundary}\"",
"From: {$from}"
);
$message = array(
"--{$boundary}",
'Content-Type: text/plain',
'Content-Transfer-Encoding: 7bit',
'',
chunk-split($body),
"--{$boundary}",
"Content-Type: {$file['type']}; name=\"{$file['name']}\"",
"Content-Disposition: attachment; filename=\"{$file['name']}\"",
"Content-Transfer-Encoding: base64",
'',
chunk_split(base64_encode(file_get_contents($file['tmp_name']))),
"--{$boundary}--"
);
mail($to, $subjet, implode("\r\n", $message), implode("\r\n", $headers));
}
?>[/php]