header('Location: https://benjamininstitute.com/courses');
require('inc/ajhjkahf8ue88ahd78.php');
$id = mysql_real_escape_string($_GET['id']);
if (!preg_match("/^[a-zA-Z0-9_]*$/",$id)) {
echo "Unauthorized Access Detected";
die();
}
session_start();
//get the referral code and set the cookie
if (isset($_GET['refCode'])) {
setcookie('refCode',$_GET['refCode'],time()+60*60*24*7);
}
if (isset($_GET['afillCode'])) {
setcookie('afillCode',$_GET['ref'],time()+60*60*24*3);
}
?>
Webinars - Ben Benjamin - Continuing Education for Massage Therapy with Ben Benjamin, Online Massage CEUs in Orthopedic Massage and Muscular Therapy
//is this a webinar or series
//webinar = 0; series = 1;
$pos = strpos($id, "S_");
if ($pos > -1) {
//this is a series
$is_series = 1;
//get the info needed
$webinar = mysql_fetch_assoc(mysql_query("SELECT PP_seminars.id,title,DATE_FORMAT(work_date,'%m%/%d%/%Y') as date1,descrip,paypal_id,has_PayPal FROM PP_seminars JOIN PP_seminarDescription ON PP_seminars.id = PP_seminarDescription.seminar_id JOIN PP_buttons ON PP_seminars.id = PP_buttons.seminar_id WHERE PP_seminars.id = '$id'"));
//get the master id
$master = str_replace("S_","",$id);
//get the title
$title2 = mysql_result(mysql_query("SELECT CONCAT(title,': A ',count(slave),' Part Series') FROM PP_seriesName JOIN PP_series ON PP_seriesName.master = PP_series.master WHERE PP_seriesName.master = '$master'"),0);
$title = str_replace(":",": ",$title2);
$cost = mysql_result(mysql_query("SELECT cost FROM PP_seriesName WHERE master = '$master'"),0);
//$date = $webinar['date1'];
$paypal_id = mysql_result(mysql_query("SELECT paypal_id FROM PP_buttons WHERE seminar_id = '$id'"),0);
$descrip = mysql_result(mysql_query("SELECT descrip FROM PP_seminarDescription WHERE seminar_id = '$id'"),0);
$seriesTotal = mysql_result(mysql_query("SELECT count(slave) FROM PP_series WHERE master = '$master'"),0);
}
else {
//this is not
$is_series = 0;
//get the info needed
$webinarQ1 = "SELECT PP_seminars.id,title,DATE_FORMAT(work_date,'%m%/%d%/%Y') as date1,descrip,paypal_id,is_free,showFreeLink,has_PayPal FROM PP_seminars JOIN PP_seminarDescription ON PP_seminars.id = PP_seminarDescription.seminar_id JOIN PP_buttons ON PP_seminars.id = PP_buttons.seminar_id WHERE PP_seminars.id = '$id'";
$webinarQ = mysql_query($webinarQ1);
$webinar = mysql_fetch_assoc($webinarQ);
$title2 = $webinar['title'];
$title = str_replace(":",": ",$webinar['title']);
$date = $webinar['date1'];
$paypal_id = $webinar['paypal_id'];
$descrip = $webinar['descrip'];
//adjust date if pre-recorded
if (strtotime($webinar['date1']) < (time() - (1 * 24 * 60 * 60))) {
$date = "Pre-Recorded";
}
else {
$date = $webinar['date1'];
}
}
echo '
';
echo "
$title $date
";
echo " ";
if ($webinar['is_free'] == 0 && ($webinar['has_PayPal'] == 1 || $is_series)) {
//figure out referral code
if (isset($_GET['refCode'])) $refCode = $_GET['refCode'];
else if (isset($_COOKIE['refCode'])) $refCode = $_COOKIE['refCode'];
else $refCode = "BenBenjamin";
if (isset($_GET['ref'])) $afillCode = $_GET['ref'];
else if (isset($_COOKIE['afillCode'])) $afillCode = $_COOKIE['afillCode'];
else $afillCode = "0";
echo '
';
if ($is_series) {
//want to use a coupon?
echo '
';
}
//show coupon for groupon like sales
/*if ($id=="S_972952002") {
echo "Did you purchase a Groupon? Click here to use your coupon. ";
echo "
";
echo "
**You must fill in all details to redeem your coupon
";
echo "
";
echo "";
}*/
if (isset($_SESSION['user_id'])) {
//check for coupons
$coupons = mysql_query("SELECT coupon_code FROM PP_userCoupons WHERE user_id = '$_SESSION[user_id]' AND used = 0 ORDER BY id LIMIT 1");
if (mysql_num_rows($coupons) > 0) {
$code = mysql_result($coupons,0);
//check if this is a series
if ($is_series) {
//get the series cost
$seriesCost = mysql_result(mysql_query("SELECT cost FROM PP_seriesName WHERE master = '$master'"),0);
$cost = $seriesCost-25;
//dev business = mhacke_1265231580_biz@hackercomputers.com
//production business = MM8DPFLU5Q84G
echo '
';
}
else {
//is pre recorded
if ($date == "Pre-Recorded") $seminar_id = "PV_".$id;
else $seminar_id = $id;
echo " ";
echo "
";
echo "";
echo "
";
}
}
}
}
else {
//this is a free webinar or it is a non-individual purchase series item
//Either give a link to register or link to watch
if ($webinar['showFreeLink'] == 1 && $webinar['is_free'] == 1) {
if ($date == "Pre-Recorded") {
echo "Click to view the webinar recording.";
}
else {
//echo "Click to register for the webinar. ";
}
}
}
echo " ";
echo $descrip;
echo "