<?php

$source = $_POST['source'];

$email = $_POST['email'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$company = $_POST['company'];
$website = $_POST['website'];
$attending = $_POST['attending'];
$location = $_POST['location'];
$phone = $_POST['phone'];
$instrument = $_POST['instrument'];
$music = $_POST['music'];
$hearabout = $_POST['hearabout'];
$message = $_POST['message'];

if ($source === "4day") {

	$subject = "4 Day Camp Brochure Download";
	$msg = "First Name: " . $fname . "\n\n";
	$msg .= "Last Name: " . $lname . "\n\n";
	$msg .= "Email: " . $email . "\n\n";
	$msg .= "Phone: " . $phone . "\n\n";
	$msg .= "Instrument: " . $instrument . "\n\n";
	$msg .= "Music: " . $music . "\n\n";
	$msg .= "Hear About: " . $hearabout . "\n\n";
	$msg .= "Message: " . $message . "\n\n";

	$sendTo = "david@rockcamp.com";
	$sendTo1 = "keith@rockcamp.com";
}

if ($source === "corp") {

	$subject = "Corporate Brochure Download";
	$msg = "First Name: " . $fname . "\n\n";
	$msg .= "Last Name: " . $lname . "\n\n";
	$msg .= "Email: " . $email . "\n\n";
	$msg .= "Company: " . $company . "\n\n";
	$msg .= "Phone: " . $phone . "\n\n";
	$msg .= "Website: " . $website . "\n\n";
	$msg .= "People Attending: " . $attending . "\n\n";
	$msg .= "Location: " . $location . "\n\n";
	$msg .= "Hear About: " . $hearabout . "\n\n";
	$msg .= "Message: " . $message . "\n\n";

	$sendTo = "david@rockcamp.com";
	$sendTo1 = "keith@rockcamp.com";
	// $sendTo = "ep@emarketed.net";
	// $sendTo1 = "daniel@emarketed.net";
}

if ($source === "contact") {

	$subject = "Contact Form Submission";
	$msg = "First Name: " . $fname . "\n\n";
	$msg .= "Last Name: " . $lname . "\n\n";
	$msg .= "Email: " . $email . "\n\n";
	$msg .= "Message: " . $message . "\n\n";

	$sendTo = "david@rockcamp.com";
	$sendTo1 = "keith@rockcamp.com";
}




if ($email != "") {

	/* LET'S SEND THE VISITOR INFO */

	$subject2 = "Thank you for visiting Rock and Roll Fantasy Camp online";
	$body = '<div style="width: 650px;"><a href="http://rockcamp.com"><img src="http://rockcamp.imgix.net/rock-and-roll-fantasy-camp-logo-black.png" /></a><br /><br />';
	$body .= '<p>Hi ' . $fname . ',</p>';
	$body .= '<p>We are excited you want to learn more about our Rock &lsquo;n&rsquo; Roll Fantasy Camps!</p>';
	$body .= '<p>Rock &lsquo;n&rsquo; Roll Fantasy Camp has made rock and roll dreams come true for 25 years. Our camps are headlined by legendary and iconic rock music legends  along with our rock star counselors, who are in popular top touring bands.</p>';
	$body .= '<p>Immerse yourself in rock and roll for 4 incredible music filled days and nights jamming and learning from only the best! Jam with our rock star counselors, learn a thing or two at our master classes, hear what the headlliners have to say during the Q&A’s and perform on the same stage with music icons.</p>';
	$body .= '<p>This four day camp experience will change your life, make you a better musician and inspire you in all areas of your life!</p>';
	$body .= '<p><a href="https://www.youtube.com/watch?v=hEu8EDAYuzg&t=12s">Take a behind the scene tour</a> of what really happens at camp.</p>';
	$body .= '<p>Whether your an advanced player, just started playing or a music aficionado we have a package for you. Call me for details and I can walk you through the process, customize a package for you and answer all your questions.</p>';
	$body .= '<p><a href="http://www.rockcamp.com/upcoming-events.php">SEE OUR LIST OF UPCOMING EVENTS</a></p>';
	$body .= '<p><a href="http://www.rockcamp.com/downloads/RRFC-SAMPLE-ITINERARY.pdf">SEE A SAMPLE CAMP ITINERARY</a></p>';
	$body .= '<p>You have questions, I have answers.  Call me and let’s customize a camp package just for you.</p>';
	$body .= '<p>Rock on!</p>';
	$body .= '<p>Monica Michaels<br />888-762-2263 ex 7</p></div>';

	// To send HTML mail, the Content-type header must be set
	$headers  = 'MIME-Version: 1.0' . "\r\n";
	$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
	$headers .= 'From: Rock and Roll Fantasy Camp <info@rockcamp.com>' . "\r\n";
	mail($sendTo, $subject, $msg);
	mail($sendTo1, $subject, $msg);

	mail($email, $subject2, $body, $headers);

	echo "OK";
}
