', '-fzader@zader.com'); session_start(); $filename = $_GET['f']; if($_POST) { $forinterviewee = $_POST['forinterviewee']; $sname = $_POST['sname']; $semail = $_POST['semail']; $remail = $_POST['remail']; $subject = $_POST['subject']; $message = $_POST['message']; $_SESSION['SESSremail'] = $remail; $_SESSION['SESSemessage'] = $message; $_SESSION['SESSesubject'] = $subject; $istatus = $forinterviewee == 1 ? '-i' : ''; $duration = '30'; // number of days for which cookies will persist if($sname != '') { setcookie('EIname', "$sname", time()+3600*24*$duration, '/') or die("Couldn't set cookie for name!"); } if($semail != '') { setcookie('EIemail', "$semail", time()+3600*24*$duration, '/') or die("Couldn't set cookie for email!"); } if($remail == '') { $error = 'Please enter the TO e-mail address'; } else if($remail == !preg_match("(^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,4})$)", $remail)) { $error = 'Invalid TO e-mail. Please enter a valid e-mail address'; } else if($sname == '') { $error = 'Please enter the FROM name'; } else if($semail == '') { $error = 'Please enter the FROM e-mail address'; } else if($semail == !preg_match("(^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,4})$)", $semail)) { $error = 'Invalid FROM e-mail. Please enter a valid e-mail address'; } else if($message == '') { $error = 'Please enter your message'; } $_SESSION['SESSerror'] = $error; if(!$error) { // try to send the message $to = $remail; $body = wordwrap($message, 85); $from = "From: ".$sname." <".$semail.">"; if($forinterviewee == 1) { $from .= "\nReply-To: jim@jbsba.com, admin@jbsba.com"; } $errors = "-fbliss@jbsba.com"; $sent = mail($to, $subject, $body, $from, $errors); if($sent) { $_SESSION['SESSemessage'] = ''; $_SESSION['SESSremail'] = ''; $_SESSION['SESSalert'] = 'Message sent successfully. You may send another, below, if you wish.'; } else { $_SESSION['SESSerror'] = 'Your message could not be sent! (Server Error)'; } } header("Location: email".$istatus.".php?f=".$filename); exit; } if($filename) { /* $PGconnection = pg_connect("host=drop.eyecentric.com dbname=sba user=askjim password=b@s1c"); $PGsql = " SELECT archives.archive_num, archives.archive_title, archives.archive_url, archives.archive_date, archives.archive_description, brain_trust.bt_fname, brain_trust.bt_lname FROM archives, bt_to_archives, brain_trust WHERE archives.archive_url = '$filename' AND bt_to_archives.archive_num = archives.archive_num AND bt_to_archives.bt_num = brain_trust.bt_num "; */ //$PGresult = pg_exec($PGconnection,$PGsql); //$row = pg_fetch_array($PGresult); //$topic = $row['archive_description']; //$guest = trim(trim($row['bt_fname']).' '.trim($row['bt_lname'])); //$firstname = trim($row['bt_fname']); $topic = 'test description'; //$row['archive_description']; $guest = 'test guest name'; //trim(trim($row['bt_fname']).' '.trim($row['bt_lname'])); $firstname = 'testfname'; //trim($row['bt_fname']); } $page = $forinterviewee == 1 ? 'link-i' : 'link'; $fullurl = 'http://www.askjim.biz/embed/'.$page.'.php?f='.$filename; $sname = $_COOKIE['EIname']; $semail = $_COOKIE['EIemail']; if($forinterviewee == 1) { $sname = 'Jim Blasingame'; $semail = 'jim@jbsba.com'; } $remail = $_SESSION['SESSremail']; $subject = $_SESSION['SESSesubject']; $message = $_SESSION['SESSemessage']; if($forinterviewee == 1) { $subject = $subject != '' ? $subject : 'Your recent interview with me'; } else { $subject = $subject != '' ? $subject : 'SBA Interview Link'; } if($message == '' && $forinterviewee == 1) { // default message for interviewees $message = " Dear $firstname, It was a pleasure having you share your wisdom and expertise with me and my audience today. You inspired and helped many people around the world. Thanks for classing up my show. One of the ways we add value to your experience on The Small Business Advocate Show is to give you the ability to post this interview on your website and blog so your visitors can listen by MP3 streaming and/or podcasting. Plus, your visitors will be able to post this interview on their sites, too. Can you say, \"viral marketing\"? Just click here to check out this really cool resource: $fullurl Be sure to email or call us if you have any questions or problems; and make sure we have your correct contact and bio information. Please, use the following email for questions or edits: mailto:admin@jbsba.com. Thanks again for your support and especially for your friendship. I'm already looking forward to our next visit. Sincerely, Jim Blasingame The Small Business Advocate "; } else if($message == '') { // default message for general public $message = "\n\n\nHere is a link to the page for embedding this interview from the Small Business Advocate show:\n\n".$fullurl; } $pagetitle = "SBA Embed Player"; $section = ""; include("_header.php"); ?>

E-mail the link for embedding this interview

GUEST:
TOPIC:
TO e-mail
FROM name
FROM e-mail
Subject
Message