File: /home/imensosw/www/imenso.co/demo/mcm/single-courses-382017.php
<div class="loading-container" id="loading_page">
<div class="loading"></div>
<div id="loading-text"></div>
</div>
<script type="text/javascript">
// document.getElementById("loading_page").style.display = "flex";
</script>
<?php
if(isset($_POST['stripeToken']))
{
?>
<script type="text/javascript">
document.getElementById("loading_page").style.display = "flex";
</script>
<?php
}
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package MCM
*/
get_header(); ?>
<style type="text/css">
.red_border{
border: 1px solid red !important;
color: red !important;
}
.has-error{
border: 1px solid red !important;
color: red !important;
}
.boder-none {
border: none !important;
}
#myModalreview
{
background: #fff none repeat scroll 0 0 !important;
}
.cart-type{
color: #5FB328;
}
</style>
<?php
error_reporting(0);
/**
* Stripe - Payment Gateway integration example
* ==============================================================================
*
* @version v1.0: stripe_pay_demo.php 2016/09/29
* @copyright Copyright (c) 2016, http://www.mcmschool.com
* @author Jay Parihar <jparihar69@gmail.com>
* You are free to use, distribute, and modify this software
* ==============================================================================
*
*/
function olddb()
{
$conn=mysql_connect("localhost","school_mcmweb","Mcm@123") or die(mysql_error());
$db=mysql_select_db("school_mcmweb",$conn) or die(mysql_error());
/* $conn=mysql_connect("localhost","root","") or die(mysql_error());
$db=mysql_select_db("mcm",$conn) or die(mysql_error()); */
}
$week2=$week1=$order_id=$title=$FirstName=$LastName=$email=$phoneno="";
// This snippet (and some of the curl code) due to the Facebook SDK.
if (!function_exists('curl_init')) {
throw new Exception('Stripe needs the CURL PHP extension.');
}
if (!function_exists('json_decode')) {
throw new Exception('Stripe needs the JSON PHP extension.');
}
if (!function_exists('mb_detect_encoding')) {
throw new Exception('Stripe needs the Multibyte String PHP extension.');
}
// Stripe singleton
require(dirname(__FILE__) . '/stripe/Stripe/Stripe.php');
// Utilities
require(dirname(__FILE__) . '/stripe/Stripe/Util.php');
require(dirname(__FILE__) . '/stripe/Stripe/Util/Set.php');
// Errors
require(dirname(__FILE__) . '/stripe/Stripe/Error.php');
require(dirname(__FILE__) . '/stripe/Stripe/ApiError.php');
require(dirname(__FILE__) . '/stripe/Stripe/ApiConnectionError.php');
require(dirname(__FILE__) . '/stripe/Stripe/AuthenticationError.php');
require(dirname(__FILE__) . '/stripe/Stripe/CardError.php');
require(dirname(__FILE__) . '/stripe/Stripe/InvalidRequestError.php');
require(dirname(__FILE__) . '/stripe/Stripe/RateLimitError.php');
// Plumbing
require(dirname(__FILE__) . '/stripe/Stripe/Object.php');
require(dirname(__FILE__) . '/stripe/Stripe/ApiRequestor.php');
require(dirname(__FILE__) . '/stripe/Stripe/ApiResource.php');
require(dirname(__FILE__) . '/stripe/Stripe/SingletonApiResource.php');
require(dirname(__FILE__) . '/stripe/Stripe/AttachedObject.php');
require(dirname(__FILE__) . '/stripe/Stripe/List.php');
require(dirname(__FILE__) . '/stripe/Stripe/RequestOptions.php');
// Stripe API Resources
require(dirname(__FILE__) . '/stripe/Stripe/Account.php');
require(dirname(__FILE__) . '/stripe/Stripe/Card.php');
require(dirname(__FILE__) . '/stripe/Stripe/Balance.php');
require(dirname(__FILE__) . '/stripe/Stripe/BalanceTransaction.php');
require(dirname(__FILE__) . '/stripe/Stripe/Charge.php');
require(dirname(__FILE__) . '/stripe/Stripe/Customer.php');
require(dirname(__FILE__) . '/stripe/Stripe/FileUpload.php');
require(dirname(__FILE__) . '/stripe/Stripe/Invoice.php');
require(dirname(__FILE__) . '/stripe/Stripe/InvoiceItem.php');
require(dirname(__FILE__) . '/stripe/Stripe/Plan.php');
require(dirname(__FILE__) . '/stripe/Stripe/Subscription.php');
require(dirname(__FILE__) . '/stripe/Stripe/Token.php');
require(dirname(__FILE__) . '/stripe/Stripe/Coupon.php');
require(dirname(__FILE__) . '/stripe/Stripe/Event.php');
require(dirname(__FILE__) . '/stripe/Stripe/Transfer.php');
require(dirname(__FILE__) . '/stripe/Stripe/Recipient.php');
require(dirname(__FILE__) . '/stripe/Stripe/Refund.php');
require(dirname(__FILE__) . '/stripe/Stripe/ApplicationFee.php');
require(dirname(__FILE__) . '/stripe/Stripe/ApplicationFeeRefund.php');
require(dirname(__FILE__) . '/stripe/Stripe/BitcoinReceiver.php');
require(dirname(__FILE__) . '/stripe/Stripe/BitcoinTransaction.php');
?>
<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
<!-- TO DO : Place below JS code in js file and include that JS file -->
<script type="text/javascript" src="https://www.mcmschool.com/creditly.js"></script>
<?php
$Amount=get_field('price');
$Course_name=the_title();
echo $Course_name;
if(isset($_POST['item_number']))
{
olddb();
$id = $_POST['item_number'];
$update="update SaveContactForm7_5 set paid_unpaid ='paid' where id=".$id;
$q=mysql_query($update) or die(mysql_error());
$select="select * from SaveContactForm7_5 where id=".$id;
$qselect=mysql_query($select) or die(mysql_error());
$row=mysql_fetch_assoc($qselect);
//print_r($row);
//echo $row['email'];
$title = $row['Tittle'];
$FirstName = $row['Daniel'];
$LastName = $row['Appelbee'];
$email = $row['email'];
$phoneno = $row['phoneno'];
$cuname= $row['Course_name'];
$cls="blockclass";
$week=explode("To",$row['Week']);
if(count($week)>1)
{
$week1=$week[0];
$week2=$week[1];
}
$to = $row['email'];
$subject = get_field('course_subject');
$from = get_field('course_email');
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Create email headers
$headers .= 'From: '.$from."\r\n".
'Reply-To: '.$from."\r\n" .
'X-Mailer: PHP/' . phpversion();
// Compose a simple HTML email message
$message = '<html><body>';
$message .= '<h1 style="color:#f40;">Hi '.$FirstName.'!</h1>';
$message .= get_field('course_content');
$message .= '<p style="color:#080;font-size:18px;">Course: "'.$cuname.'"</p>';
$message .= '<p style="color:#080;font-size:18px;">Start Date -:'.$week1.'</p>';
$message .= '<p style="color:#080;font-size:18px;">End Date -:'.$week2.'</p>';
$message .= '<p style="color:#080;font-size:18px;">Price : $'.$Amount.'</p>';
$message .= '<p style="color:#080;font-size:18px;">Booking reference no: '.$id.'</p>';
$message .= '</body></html>';
// Sending email
if(mail($to, $subject, $message, $headers)){
// echo 'Your mail has been sent successfully.';
} else{
// echo 'Unable to send email. Please try again.';
}
//start email for administrator
$to_admin = get_field('administrator_email');
$subject_admin =$FirstName.' '.$LastName.' : Booked for '.the_title();
$from_admin = get_field('course_email');
// To send HTML mail, the Content-type header must be set
$headers_admin = 'MIME-Version: 1.0' . "\r\n";
$headers_admin .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Create email headers
$headers_admin .= 'From: '.$from."\r\n".
'Reply-To: '.$from."\r\n" .
'X-Mailer: PHP/' . phpversion();
// Compose a simple HTML email message
$message_admin = '<html><body>';
$message_admin .= $FirstName.' '.$LastName.' booked for the '.$cuname.' below are the details';
$message_admin .= '<p style="color:#080;font-size:18px;">Course: "'.$cuname.'"</p>';
$message_admin .= '<p style="color:#080;font-size:18px;">Start Date -:'.$week1.'</p>';
$message_admin .= '<p style="color:#080;font-size:18px;">End Date -:'.$week2.'</p>';
$message_admin .= '<p style="color:#080;font-size:18px;">Price : $'.$Amount.'</p>';
$message_admin .= '<p style="color:#080;font-size:18px;">Booking reference no: '.$id.'</p>';
$message_admin .= '</body></html>';
// Sending email
if(mail($to_admin, $subject_admin, $message_admin, $headers_admin)){
// echo 'Your mail has been sent successfully.';
} else{
// echo 'Unable to send email. Please try again.';
}
//end email for administrator
}
// Stripe library
//include("http://192.168.1.3/mcm-wp/test.php");
//require '../../mcm-wp/test.php';
$params = array(
"testmode" => "on",
"private_live_key" => "sk_live_WMIPZ1LdvHKwsQAewdqqzRak",
"public_live_key" => "sk_live_WMIPZ1LdvHKwsQAewdqqzRak",
"private_test_key" => "sk_test_S1fCgaaB46VML0cVZUYt0U6d",
"public_test_key" => "pk_test_PuroXKb9Rtn0zqh1ZVbYg42H"
);
if ($params['testmode'] == "on") {
Stripe::setApiKey($params['private_test_key']);
$pubkey = $params['public_test_key'];
} else {
Stripe::setApiKey($params['private_live_key']);
$pubkey = $params['public_live_key'];
}
if(isset($_POST['stripeToken']))
{
$amount_cents = str_replace(".","",$Amount); // Chargeble amount
$invoiceid = "14526321"; // Invoice ID
$description = "Invoice #" . $invoiceid . " - " . $invoiceid;
try {
$charge = Stripe_Charge::create(array(
"amount" => $amount_cents,
"currency" => "usd",
"source" => $_POST['stripeToken'],
"description" => $description)
);
if ($charge->card->address_zip_check == "fail") {
throw new Exception("zip_check_invalid");
} else if ($charge->card->address_line1_check == "fail") {
throw new Exception("address_check_invalid");
} else if ($charge->card->cvc_check == "fail") {
throw new Exception("cvc_check_invalid");
}
// Payment has succeeded, no exceptions were thrown or otherwise caught
$result = "success";
} catch(Stripe_CardError $e) {
$error = $e->getMessage();
$result = "declined";
} catch (Stripe_InvalidRequestError $e) {
$result = "declined";
} catch (Stripe_AuthenticationError $e) {
$result = "declined";
} catch (Stripe_ApiConnectionError $e) {
$result = "declined";
} catch (Stripe_Error $e) {
$result = "declined";
} catch (Exception $e) {
if ($e->getMessage() == "zip_check_invalid") {
$result = "declined";
} else if ($e->getMessage() == "address_check_invalid") {
$result = "declined";
} else if ($e->getMessage() == "cvc_check_invalid") {
$result = "declined";
} else {
$result = "declined";
}
}
if(isset($_POST['Daniel']) && $result=="success")
{
olddb();
$create_date = date('y-m-d');
//$sql="insert into SaveContactForm7_3(created_on,Daniel,Week,Appelbee,email,Tittle,FirstName,Housenumber,ZipCode, country)values('".$create_date."','".$_POST['Daniel']."','".$_POST['week']."','".$_POST['surname']."','".$_POST['email']."','".$_POST['title']."','".$_POST['firstname']."','".$_POST['housenumber']."','".$_POST['zipcode']."','".$_POST['country']."')";
//echo "hello";
//die();
$sql="insert into SaveContactForm7_5(Course_name,Payment_status,created_on,First_name,Week,Last_name,Email,Title,Phone,Payment_mode,Amount)values('".$_POST['Course_name']."','paid','".$create_date."','".$_POST['Daniel']."','".$_POST['week']."','".$_POST['surname']."','".$_POST['email']."','".$_POST['title']."','".$_POST['phone_no']."','Stripe','".$Amount."')";
$q=mysql_query($sql) or die(mysql_error());
$order_id="000".mysql_insert_id();
$cls="blockclass";
$select="select * from SaveContactForm7_5 where id=".mysql_insert_id();
$qselect=mysql_query($select) or die(mysql_error());
$row=mysql_fetch_assoc($qselect);
$title = $row['Title'];
$FirstName = $row['First_name'];
$LastName = $row['Last_name'];
$email = $row['Email'];
$phoneno = $row['Phone'];
$cuname=$row['Course_name'];
$week=explode("To",$_POST['week']);
if(count($week)>1)
{
$week1=$week[0];
$week2=$week[1];
$title = $row['Title'];
$FirstName = $row['First_name'];
$LastName = $row['Last_name'];
$email = $row['Email'];
$phoneno = $row['Phone'];
}
$to = $_POST['email'];
$subject = get_field('course_subject');
$from = get_field('course_email');
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Create email headers
$headers .= 'From: '.$from."\r\n".
'Reply-To: '.$from."\r\n" .
'X-Mailer: PHP/' . phpversion();
// Compose a simple HTML email message
$message = '<html><body>';
$message .= '<h1 style="color:#f40;">Hi '.$FirstName.'!</h1>';
$message .= get_field('course_content');
$message .= '<p style="color:#080;font-size:18px;">Course: "'.$cuname.'"</p>';
$message .= '<p style="color:#080;font-size:18px;">Start Date -:'.$week1.'</p>';
$message .= '<p style="color:#080;font-size:18px;">End Date -:'.$week2.'</p>';
$message .= '<p style="color:#080;font-size:18px;">Price : $'.$Amount.'</p>';
$message .= '<p style="color:#080;font-size:18px;">Booking reference no: '.$order_id.'</p>';
$message .= '</body></html>';
// Sending email
if(mail($to, $subject, $message, $headers)){
// echo 'Your mail has been sent successfully.';
} else{
// echo 'Unable to send email. Please try again.';
}
//start email for administrator
$to_admin = get_field('administrator_email');
$subject_admin = $FirstName.' : Booked for '.$cuname;
$from_admin = get_field('course_email');
// To send HTML mail, the Content-type header must be set
$headers_admin = 'MIME-Version: 1.0' . "\r\n";
$headers_admin .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Create email headers
$headers_admin .= 'From: '.$from."\r\n".
'Reply-To: '.$from."\r\n" .
'X-Mailer: PHP/' . phpversion();
// Compose a simple HTML email message
$message_admin = '<html><body>';
$message_admin .= $FirstName.' '.$LastName.' booked for the '.$cuname.' below are the details';
$message_admin .= '<p style="color:#080;font-size:18px;">Course: "'.$cuname.'"</p>';
$message_admin .= '<p style="color:#080;font-size:18px;">Start Date -:'.$week1.'</p>';
$message_admin .= '<p style="color:#080;font-size:18px;">End Date -:'.$week2.'</p>';
$message_admin .= '<p style="color:#080;font-size:18px;">Price : $'.$Amount.'</p>';
$message_admin .= '<p style="color:#080;font-size:18px;">Booking reference no: '.$order_id.'</p>';
$message_admin .= '</body></html>';
// Sending email
if(mail($to_admin, $subject_admin, $message_admin, $headers_admin)){
// echo 'Your mail has been sent successfully.';
} else{
// echo 'Unable to send email. Please try again.';
}
//end email for administrator
/*
$txnid = $_POST['txnid'];
$sql="insert into payments(txnid) values('".$txnid."')";
$q=mysql_query($sql) or die(mysql_error());*/
}
else
{
//echo "error";
}
/*echo "<BR>Stripe Payment Status : ".$result;
echo "<BR>Stripe Response : ";
print_r($charge); exit;*/
}
?>
<section class="white-text" id="banner">
<div class="container">
<div class="row pad-t-75">
<div class="col-md-12 text-center">
<header class="entry-header">
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
echo '<p>'.get_field('banner_sub_heading').'</p>';
else :
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
endif;
if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta">
<?php mcm_posted_on(); ?>
</div><!-- .entry-meta -->
<?php
endif; ?>
<?php echo the_content() ;?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
the_content( sprintf(
/* translators: %s: Name of current post. */
wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', 'mcm' ), array( 'span' => array( 'class' => array() ) ) ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'mcm' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
</div>
</div>
</div>
</section>
<div id="cd-intro-tagline"></div>
<nav class="sub-nav">
<div class="container">
<ul>
<li><a href="#overview"> Overview </a></li>
<li><a href="#details"> Course Details </a></li>
<li><a href="#reviews"> Reviews </a></li>
<li><a href="#instructor"> Instructor </a></li>
<li class="hidden-xs"><a href="#location"> Location </a></li>
<!-- <li class="no-nav pull-right res_nav"><a href="/pricing" id="" class="no-nav nav_btn_mt btn-s btn-alpha">Book a Course</a></li> -->
</ul>
</div>
</nav>
<main class="cd-main-content">
<section class="" id="features">
<div class="container">
<div class="row" id="">
<div class="col-md-8" id="video_wrp">
<article id="overview" class="cd-section burger-t">
<div class="learning_skill ">
<h2 class="rsp_txt_cntr"><?php echo get_field('overview_heading') ;?></h2>
<p class="pad-t-20"> <?php echo get_field('overview_paragraph');?> </p>
</div>
<div class="pad-t-40">
<?php echo get_field('overview_vedio');?>
</div>
<div class="learning_skill">
<div class="row mt5" id="learnings">
<div class="col-md-6 col-lg-6 col-sm-6 col-xs-12">
<div class="media">
<figure class="pull-left">
<?php
$image = get_field('overview_icon_1');
if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" class="img-responsive center-block"/>
<?php endif; ?>
</figure>
<div class="media-body">
<h4 class="media-heading"> <?php echo get_field('overview_title_1');?> </h4>
<p> <?php echo get_field('overview_description_1');?> </p>
</div>
</div>
</div><!--/col-->
<div class="col-md-6 col-lg-6 col-sm-6 col-xs-12">
<div class="media">
<figure class="pull-left">
<?php
$image = get_field('overview_icon_2');
if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" class="img-responsive center-block"/>
<?php endif; ?>
</figure>
<div class="media-body">
<h4 class="media-heading"> <?php echo get_field('overview_title_2');?> </h4>
<p><?php echo get_field('overview_description_2');?> </p>
</div>
</div>
</div><!--/col-->
<div class="col-md-6 col-lg-6 col-sm-6 col-xs-12">
<div class="media">
<figure class="pull-left">
<?php
$image = get_field('overview_icon_3');
if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" class="img-responsive center-block"/>
<?php endif; ?>
</figure>
<div class="media-body">
<h4 class="media-heading"> <?php echo get_field('overview_title_3');?> </h4>
<p><?php echo get_field('overview_description_3');?></p>
</div>
</div>
</div><!--/col-->
<div class="col-md-6 col-lg-6 col-sm-6 col-xs-12">
<div class="media">
<figure class="pull-left">
<?php
$image = get_field('overview_icon_4');
if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" class="img-responsive center-block"/>
<?php endif; ?>
</figure>
<div class="media-body">
<h4 class="media-heading"> <?php echo get_field('overview_title_4');?> </h4>
<p> <?php echo get_field('overview_description_4');?> </p>
</div>
</div>
</div><!--/col-->
<div class="col-md-6 col-lg-6 col-sm-6 col-xs-12">
<div class="media">
<figure class="pull-left">
<?php
$image = get_field('overview_icon_5');
if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" class="img-responsive center-block"/>
<?php endif; ?>
</figure>
<div class="media-body">
<h4 class="media-heading"> <?php echo get_field('overview_title_5');?> </h4>
<p> <?php echo get_field('overview_description_5');?> </p>
</div>
</div>
</div><!--/col-->
<div class="col-md-6 col-lg-6 col-sm-6 col-xs-12">
<div class="media">
<figure class="pull-left">
<?php
$image = get_field('overview_icon_6');
if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" class="img-responsive center-block"/>
<?php endif; ?>
</figure>
<div class="media-body">
<h4 class="media-heading"><?php echo get_field('overview_title_6');?> </h4>
<p><?php echo get_field('overview_description_6');?></p>
</div>
</div>
</div><!--/col-->
<div class="clearfix"></div>
</div><!--/row-->
</div>
<div class="bdr_bt pad-t-75"></div>
</article>
<article class="cd-section" id="details">
<div class="review_sec">
<div id="learnings">
<h2 class="pad-t-20"> <?php echo get_field('detail_heading');?> </h2>
<p class="pad-t-20"><?php echo get_field('detail_description');?></p>
<?php echo get_field('detail_of_course');?>
</div> <!-- Reviwe_sec -->
</div>
</article>
<article class="cd-section" id="reviews">
<div class="review_sec">
<div class="learning_skill rsp_mar_b30">
<h2 class="pad-t-20 rsp_mb30"> <?php echo get_field('review_heading'); ?> </h2>
<p class="pad-t-20 mb0">
<?php echo get_field('review_description'); ?> </p>
</div>
<div id="testimonials" class="hidden-xs">
<div class="pad-t-75">
<?php
global $wp_query;
global $query_string;
$args = array('post_type' => 'testimonial',
'posts_per_page' => 6,
'order' => 'ASC',
);
query_posts( $args );
if ( have_posts() ) : ;
while ( have_posts() ) : the_post();
$feture_image1 = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
$feture_image_link = $feture_image1[0];
$title=the_title('', false,'');
$feture_image_link=$feture_image_link;
$auther_name=get_field('auther_name');
$content=get_the_content('Read more');
?>
<div class="media review">
<figure href="#" class="pull-left text-center">
<img src="<?php echo $feture_image_link ;?>" class="media-object" alt="Sample Image" width="140">
<p class="t_name"><?php echo $auther_name;?></p>
</figure>
<div class="media-body">
<div class="rating">
<?php
for($i=1;$i<=5;$i++)
{
if(get_field('star_rating')>=$i)
{
echo '<i class="fa fa-star"></i>';
}
else
{
echo '<i class="fa fa-star-o"></i>';
}
}
?>
</div>
<p><?php echo $content; ?></p>
</div><!--/media-->
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
</div>
</div>
<div id="testimonials_responsive" class="responsive_slidr_test carousel slide carousel hidden-lg hidden-sm" data-interval="3000" data-ride="carousel">
<div class="carousel-inner">
<?php
global $wp_query;
global $query_string;
$args = array('post_type' => 'testimonial',
'posts_per_page' => 6,
'order' => 'ASC',
);
query_posts( $args );
if ( have_posts() ) : $x=1; $y=11;
while ( have_posts() ) : the_post();
$feture_image1 = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
$feture_image_link = $feture_image1[0];
$title=the_title('', false,'');
$feture_image_link=$feture_image_link;
$auther_name=get_field('auther_name');
$content=get_the_content('Read more');
if($y==11){
echo '<div class="active item">';
$y=111;
}
else
{
echo '<div class="item">';
}
?>
<div class="col-md-6 col-lg-6">
<div class="media">
<figure class="text-center">
<img src="<?php echo $feture_image_link ;?>" class="media-object" alt="Sample Image" width="140">
<p class="t_name"><?php echo $auther_name;?></p>
</figure>
<div class="media-body">
<h4 class="media-heading"><?php echo $title ;?></h4>
<div class="rating"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i> </div>
<p><?php echo $content; ?> </p>
</div>
</div><!--/media-->
</div>
</div><!--/item-->
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
</div>
<ol class="carousel-indicators">
<li data-target="#testimonials_responsive" data-slide-to="0" class="active"></li>
<li data-target="#testimonials_responsive" data-slide-to="1"></li>
<li data-target="#testimonials_responsive" data-slide-to="2"></li>
</ol>
<!-- Carousel nav -->
<div class="slide_control">
<a class="carousel-control left" href="#testimonials_responsive" data-slide="prev">
<i class="fa fa-chevron-left"></i>
</a>
<a class="carousel-control right" href="#testimonials_responsive" data-slide="next">
<i class="fa fa-chevron-right"></i>
</a>
</div>
</div><!--testimonial-->
</div> <!-- Reviwe_sec -->
</article>
<article class="cd-section burger-t" id="instructor">
<div class="teaching_sec">
<h3>See who’s teaching</h3>
<?php $instrutor= get_field('instructors')->ID ;?>
<div class="bdr_bt pad-t-20 mb5"></div>
<?php
global $wp_query;
global $query_string;
$args = array('post_type' => 'instructor',
'posts_per_page' => -1,
'category_name' => 'about-team',
'order' => 'ASC',
);
query_posts( $args );
?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
if($post->ID== $instrutor)
{
$feture_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
$feture_image_link = $feture_image[0];
?>
<div class="media">
<figure href="#" class="pull-left text-center marg_0">
<img src="<?php echo $feture_image_link ;?>" class="img-responsive" alt="Sample Image" width="250">
</figure>
<div class="media-body team_box">
<h3> <?php the_title() ;?> </h3>
<p class="skyblue_col"> <?php echo get_field('designation') ;?> </p>
<p><?php
$content = get_the_content();
$content = strip_tags($content);
echo substr($content, 0, 80);
echo apply_filters('the_content', $mycontent);
?>...
</p>
<a href="#instructor<?php echo $post->ID ?>" class="skyblue_col link-item" data-toggle="modal"> Read More
<i class="fa fa-angle-double-right" aria-hidden="true"></i>
</a>
</div>
</div><!--/media-->
<!-- Modal HTML -->
<div id="instructor<?php echo $post->ID ?>" class="modal fade">
<div class="modal-dialog my-profile mt10">
<div class="">
<div class="my-profile-header">
<button id="CloseModalButton" type="button" class="dismiss-item modal_close_btn" data-dismiss="modal"> </button></div>
<img align="left" class="my-image-profile thumbnail" src="<?php echo $feture_image_link ;?>" alt="" />
<div class="my-profile-text">
<h3> <?php the_title() ;?> </h3>
<p class="skyblue_col"><?php echo get_field('designation') ;?></p>
<?php the_content() ;?>
</div>
</div>
</div>
</div>
<!-- Modal HTML -->
<?php } endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
</div>
<div class="bdr_bt burger-t"></div>
</article>
<article class="cd-section" id="location">
<div class="learning_skill">
<h2 class="pad-t-20"> <?php echo get_field('location_heading') ;?> </h2>
<p class="pad-t-20"><?php echo get_field('location_description') ;?> </p>
</div>
<div class="location pad-t-20">
<?php echo get_field('location_map',9) ;?>
<div class="learning_skill pad-t-50">
<h3 class="mb2"><?php echo get_field('we’re_based_location', 9) ;?></h3>
<p> <?php echo get_field('were_based_content', 9) ;?>
</p>
<p class="pad-t-20"> <strong> <?php echo get_field('address_heading', 9) ;?> </strong></p>
<p>
<?php echo get_field('location_address', 9) ;?></p>
</div>
</div>
<div class="bdr_bt pad-t-75"></div>
</article>
<article class="" id="other">
<div class="learning_skill">
<h2 class="pad-t-20"> Other courses </h2>
<p class="pad-t-20">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod <br/> tempor incididunt ut labore. </p>
</div>
<div class="pad-t-75">
<?php
// the query
$the_query = new WP_Query( array('post_type' => 'courses', 'posts_per_page' => 6,'order' => 'ASC', 'post__not_in' => array( $post->ID )) ); ?>
<?php if ( $the_query->have_posts() ) : ?>
<!-- pagination here -->
<!-- the loop -->
<?php while ( $the_query->have_posts() ) : $the_query->the_post();
$postindex==1;
if($postindex==1)
{
?>
<div class="course-item text-center course-item_indi marg-r-20">
<?php
$postindex=2;
}
else
{
?>
<div class="course-item text-center course-item_indi">
<?php
}
?>
<span class="course-title"><?php the_title(); ?> </span>
<span class="course-price"><?php
if(is_numeric( get_field('price')))
{
$meta = get_field('price');
setlocale(LC_MONETARY, 'en_US');
echo money_format('%.0n', $meta) . "\n";
}
else
{
echo get_field('price');
}
?></span>
<span class="course-text opac"><?php echo get_field('info') ;?></span>
<span class="course-hr"></span>
<span class="course-text opac"><?php echo get_field('amazon_sales_between') ;?>:</span>
<span class="course-text bold"><?php echo get_field('per_month') ;?></span>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" class="course-link">View More</a>
</div>
<?php endwhile; ?>
<!-- end of the loop -->
<!-- pagination here -->
<?php wp_reset_postdata(); ?>
<?php else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
</div>
<div class="clearfix"></div>
<div class="policy">
<div class="learning_skill">
<h4> Refund Policy </h4>
<p><?php echo get_field('refund_policy'); ?></p>
</div>
</div>
</article>
</div>
<div class="col-md-4">
<article id="bookform" class="burger-t book_modal">
<div class="modal_headr hidden-lg "><button type="button" class="close">×</button><h4 >Book</h4> </div>
<div class="course-item text-center">
<span class="course-title"><?php the_title(); ?></span>
<span class="course-price">
<?php
if(is_numeric( get_field('price')))
{
$meta = get_field('price');
setlocale(LC_MONETARY, 'en_US');
echo money_format('%.0n', $meta) . "\n";
}
else
{
echo get_field('price');
}
?>
</span>
<span class="course-text opac"><?php echo get_field('info') ;?></span>
<span class="course-hr"></span>
<span class="course-text opac"><?php echo get_field('amazon_sales_between') ;?>:</span>
<span class="course-text bold"><?php echo get_field('per_month') ;?><br/></span>
</div>
<?php
if(is_numeric( get_field('price')))
{
?>
<div class="calender_sidebar">
<div class="cal-pad">
<h4> Welcome to our Bachelors course. Our courses run from Monday - Friday. </h4>
<p> When would you like to take the course? </p>
</div>
<div class="item active bdr_bt book_modal_controlr">
<a prev="0" class="prev_class_left prev_class" href="#" data-slide="prev">
<span class="fa fa-angle-left"></span>
</a>
<h5 class="text-center monthyear"> JANUARY 2017 </h5>
<a class="next_class_right next_class" href="#" data-slide="next" next="0">
<span class="fa fa-angle-right"></span>
</a>
</div>
<div class="radio_btn">
<div class="bdr_bt">
<input type="radio" id="radio01" name="radio" />
<label for="radio01"><span></span> 02-Jan, 2017 - 06 Jan, 2017 </label>
</div>
<div class="bdr_bt ">
<input type="radio" id="radio02" name="radio" />
<label for="radio02"><span></span> 02-Jan, 2017 - 06 Jan, 2017 </label>
</div>
<div class="bdr_bt">
<input type="radio" id="radio03" name="radio" />
<label for="radio03"><span></span> 02-Jan, 2017 - 06 Jan, 2017 </label>
</div>
<span class="radio_error"></span>
</div>
<div class="add_location">
<div class="media">
<figure class="pull-left">
<i class="fa fa-map-marker"></i>
</figure>
<div class="media-body">
<h4 class=""> Course Location </h4>
<p>Location: <?php echo get_field('course_address') ;?></p>
</div>
</div>
</div>
</div>
<?php } ?>
<div class="contact_form ">
<?php
if(is_numeric( get_field('price')))
{
?>
<div class="form-group">
<label class="name1_head boder-none">What’s your first name?<sup>*</sup></label>
<input id="week1" class="form-control input_field" name="week1" type="hidden" placeholder="" />
<input id="name1" class="form-control input_field" name="name1" type="text" placeholder="" />
<span class="name1_error boder-none"></span>
</div>
<div class="form-group">
<label class="surname1_head boder-none">What’s your surname?<sup>*</sup></label>
<input id="surname1" class="form-control input_field" name="surname1" type="text" placeholder="" />
<span class="surname1_error boder-none"></span>
</div>
<div class="form-group">
<label class="email1_head boder-none">What’s your email?<sup>*</sup></label>
<input id="email1" class="form-control input_field" autocomplete="off" name="email" type="email" placeholder="" />
<span class="email1_error boder-none"></span>
</div>
<!-- <p class="text-center"><a href="" class="btn-alpha btn-l no-nav btn-l-marg">Book a Course</a></p>-->
<p class="text-center"><button id="submit" type="submit" class="btn-alpha btn-l no-nav btn-l-marg hide_btn btn-block"> Book Course </button></p>
<?php }
else
{
echo do_shortcode('[contact-form-7 id="800" title="Contact Us Booking"]');
}?>
<div class="pad-t-20 no-spam">
<div class="media">
<figure class="pull-left">
<i class="fa fa-lock"></i>
</figure>
<div class="media-body">
<p>We hate spam and always keep your details secure.</p>
</div>
</div>
</div>
<div class="bdr_bt pad-t-20"></div>
<div class="form_cont">
<h4> Contact us </h4>
<p class="cont_p"> <?php echo get_field('contact_us_description') ;?> </p>
</div>
<div class="form_cont_icons">
<a href="tel:<?php echo get_field('phone_number') ;?>" class="contact_icon marg-r-20"><i class="fa fa-phone" aria-hidden="true"></i></a>
<a href="mailto:<?php echo get_field('email') ;?>" class="contact_icon"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
</div>
</div>
<h4 class="pad-t-20 pbd text-center">Any Questions? <a href="https://www.mcmschool.com/faq" class="skyblue_col"> <u>Read our FAQs</u></a> </h4>
</article>
</div>
</div><!---/row-->
</div>
</section>
<!-- Review popup code -->
<section class="modal review_popup_sec" id="myModal">
<nav class="navbar-default">
<div class="wrapper">
<div class="navbar-header">
<?php $logo = mcm_opt('custom_logo', false, 'url'); ?>
<?php if($logo !== '') { ?>
<a class="navbar-brand" href="<?php bloginfo( 'url' ) ?>/" title="<?php bloginfo( 'name' ) ?>" rel="homepage"><img class="img-responsive" src="<?php echo $logo ?>" alt="<?php bloginfo( 'name' ) ?>" ></a>
<?php } else { ?>
<a class="navbar-brand" href="<?php bloginfo( 'url' ) ?>/" title="<?php bloginfo( 'name' ) ?>" rel="homepage"><?php bloginfo( 'name' ) ?></a>
<?php } ?>
<?php /* <a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php bloginfo( 'name' ) ?>" rel="homepage"><?php bloginfo( 'name' ) ?></a> */?>
</div>
<div class="back">
<a href="javascript:;" onclick="$('#myModal').hide()"><i class="fa fa-angle-double-left" aria-hidden="true"></i></i> Back</a>
</div>
</div>
</nav>
<div class="pad-t-20">
<div class="container">
<div class="row review-header">
<div class="col-md-6 col-xs-6">
<p> <i class="fa fa-lock" aria-hidden="true"></i> Secure Checkout </p>
</div>
<div class="col-md-6 col-xs-6 text-right review_header_text">
<?php $phoneno = mcm_phoneno('custom_phoneno', false, 'url'); ?>
<p> <i class="fa fa-phone" aria-hidden="true"></i> <span> <?php echo $phoneno ?></span> </p>
</div>
</div>
</div>
<div class="pad-t-20 bdr_bt"></div>
<div class="container">
<div class="row ">
<div class="col-lg-12 mt3">
<!--
<div class="divider_review"><p> <span class="review_tab"> 1 </span><br> Review & Pay </p></div>
<div class=""><p><span class="review_tab_grey"> 2 </span> <br/> Receipt </p> </div>-->
<ul id="progressbar">
<li class="active">Review & Pay</li>
<li>Receipt</li>
</ul>
</div>
</div>
<div class="pad-t-50 payment_form_wrp rsp_ped0">
<h2 class="rsp_mt20"> Review & Pay </h2>
<div class="bdr_bt mt15"></div>
<div class="col-md-8 col-md-offset-2">
<div class="review_form pad-t-50 rsp_ped0">
<div class="row">
<div class="col-md-4 mt2">
</div>
<form action="" class="review_place creditly-card-form " method="POST" id="payment-form">
<section class="creditly-wrapper blue-theme">
<div class="credit-card-wrapper">
<div class="summary">
<div class="row">
<div class="col-md-12">
<h3> Your Course Summary </h3> </div>
</div>
<div class="bdr_bt mt15 mb2"></div>
<h4 class="review_course_item"> <?php the_title(); ?> </h4>
<h3 class="review_heading_h4"> $<?php echo $Amount; ?> </h3>
<h4 class="review_course_item"> Duration: 5 Days </h4>
<div class="media">
<figure class="pull-left">
<i class="fa fa-map-marker fa-2x"></i>
</figure>
<div class="media-body">
<p class="review_form_text"> Location: <?php echo get_field('course_address') ;?></p>
</div>
</div>
<P class="review_form_text mt2"> Course Start Date: <span id="week_start_date"></span></P>
<P class="review_form_text">Course End Date: <span id="week_end_date"></span></P>
<div class="total_pay">
<div class="row">
<div class="col-lg-6 col-xs-6">
<h4 > Total to pay </h4>
</div>
<div class="col-lg-6 col-xs-6 text-right">
<h4> $<?php echo get_field('price') ;?> </h4>
</div>
</div>
</div>
<h3 class="pad-t-75 ur_detail_text"> Your Details </h3>
<div class="bdr_bt mt15"></div>
<div class="row mt3">
<div class="col-md-4">
<div class="form-group">
<p> Title <sup>*</sup></p>
<select name="title" id="title" class="form-control input_field" placeholder="Mr">
<option value=""> Select </option>
<option value="Mr"> Mr </option>
<option value="Mrs"> Mrs </option>
<option value="Mrs"> Ms </option>
<option value="Mrs"> Dr </option>
</select>
<!--<input type="text" name="title" id="title" class="form-control input_field" placeholder="Mr">-->
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<p class="name_head boder-none"> First Name<sup>*</sup> </p>
<input type="text" name="Daniel" id="name" class="form-control input_field" placeholder="First Name">
<span class="name_errors boder-none" > </span>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<p class="surname_head boder-none"> Last Name<sup>*</sup> </p>
<input type="text" name="surname" id="surname" class="input_field form-control" placeholder="Last Name">
<span class="surname_errors boder-none" > </span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<p class="email_head boder-none"> Email<sup>*</sup> </p>
<input type="text" name="email" id="email" class="input_field form-control" placeholder="dan@test.com">
<span class="email_errors boder-none" > </span>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<p class="phone_no_head boder-none">Phone number<sup>*</sup> </p>
<input type="text" class="form-control input_field" name="phone_no" id="phone_no" placeholder="Phone number">
<span class="phone_no_errors boder-none" > </span>
</div>
</div>
</div>
<div class="payment-item mt3">
<h3> Payment Details <img src="<?php bloginfo('template_directory'); ?>/images/card-payment-icons.png" alt="" style="float: right;" width="100"> </h3>
<div class="bdr_bt mt15"></div>
<span class="payment-errors"></span>
<div class="row mt3">
<div class="col-md-7">
<div class="form-group">
<p class="card_nu_head boder-none"> Card Number<sup>*</sup>
<span class="card-type"><span class='cc_card cc_no_input'></span>
</span></p>
<input type="text" id="card_nu" data-stripe="number" class="number input_field credit-card-number form-control"
inputmode="numeric" autocomplete="cc-number" autocompletetype="cc-number" x-autocompletetype="cc-number"
placeholder="•••• •••• •••• ••••" >
<span class="card_nu_errors boder-none"> </span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<p class="card_exp_month_head boder-none"> Expiry Month<sup>*</sup> </p>
<input type="text" maxlength="2" id="card_exp_month" data-stripe="exp_month" class=" expiration-month input_field form-control" placeholder="MM">
<span class="card_exp_month_errors boder-none" > </span>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<p class="card_exp_year_head boder-none"> Expiry Year<sup>*</sup> </p>
<input type="text" maxlength="2" data-validation="numbers" id="card_exp_year" data-stripe="exp_year" class="expiration-year input_field form-control" placeholder="YY">
<span class="card_exp_year_errors boder-none"></span>
</div>
</div>
<div class="col-md-4 col-xs-8">
<div class="form-group">
<p class="card_csv_head boder-none"> Security Number<sup>*</sup> </p>
<input type="text" maxlength="3" id="card_csv" data-stripe="cvc" class="input_field security-code form-control"
inputmode="numeric"
pattern="\d*"
placeholder="•••">
<span class=" boder-none card_csv_errors"> </span>
</div>
</div>
<div class="col-md-2 col-xs-3">
<div class="card_cvc">
<img src="<?php bloginfo('template_directory'); ?>/images/cvc.png" class="img-responsive" width="40">
</div>
</div>
</div>
</div>
<div class="form-group">
<input type="text" name="Course_name" value="<?php the_title(); ?>" id="Course_name" class="form-control input_field hidden" placeholder="week">
<input type="text" name="week" id="week" class="form-control input_field hidden" placeholder="week">
<span id=""> </span>
</div>
<div class="row">
<div class="col-md-5">
<p class="mt3">
<button id="submit_payment" type="submit" class="btn-alpha btn-block btn-l no-nav btn-l-marg submit">Pay Now </button>
</p>
</div>
<div class="col-md-7"></div>
</div>
</div>
</div>
</section>
</form>
<div class="media">
<figure class="pull-left">
<i class="fa fa-lock"></i>
</figure>
<div class="media-body">
<p> This is secure 256-bit SSl encrypted payment.</p>
</div>
</div>
<div class="row">
<div class="col-md-5">
<div class="line-heading"><h4>OR</h4></div>
<form action="<?php bloginfo('template_directory'); ?>/ajax.php" method="post" class="wpcf7-form" >
<div class="form-group">
<input type="text" name="week" id="weekp" class="form-control input_field hidden" placeholder="week">
<span id=""> </span>
</div>
<div class="form-group">
<input type="text" name="Daniel" id="namep" class="form-control input_field hidden" placeholder="week">
<span id=""> </span>
</div>
<div class="form-group">
<input type="text" name="surname" id="surnamep" class="input_field form-control hidden" placeholder="Appelbee">
<span> </span>
</div>
<div class="form-group">
<input type="text" name="email" id="emailp" class="input_field form-control hidden" placeholder="dan@test.com">
<span> </span>
</div>
<button type="submit" class="btn-paypal paypal_buton"> Checkout with <img src="<?php bloginfo('template_directory'); ?>/images/paypal-btn.png" width="80"></button>
</form>
</div>
<div class="col-md-7"></div>
</div>
<div class="clearfix"></div>
<h3 class="mt2 mcm_terms"><u> <a href="https://www.mcmschool.com/terms-service"> Terms and Conditions </a></u></h3>
<?php echo get_field('terms'); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="bdr_bt mt10"></div>
<div class="container">
<div class="row mb5">
<div class="pad-t-20">
<div class="col-md-6">
<?php echo get_field('payment_review_footer_left') ;?>
</div>
<div class="col-md-6 text-right">
<?php echo get_field('payment_review_footer_right') ;?>
</div>
</div>
<!-- <button type="button" class="btn btn-default" data-dismiss="modal" style="float: right; margin-top: 30px;">Close</button> -->
</div>
</div>
</section>
<!-- review resipt -->
<section class="modal " id="myModalreview">
<nav class="navbar-default">
<div class="wrapper">
<div class="navbar-header">
<?php $logo = mcm_opt('custom_logo', false, 'url'); ?>
<?php if($logo !== '') { ?>
<a class="navbar-brand" href="<?php bloginfo( 'url' ) ?>/" title="<?php bloginfo( 'name' ) ?>" rel="homepage"><img class="img-responsive" src="<?php echo $logo ?>" alt="<?php bloginfo( 'name' ) ?>" ></a>
<?php } else { ?>
<a class="navbar-brand" href="<?php bloginfo( 'url' ) ?>/" title="<?php bloginfo( 'name' ) ?>" rel="homepage"><?php bloginfo( 'name' ) ?></a>
<?php } ?>
<?php /* <a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php bloginfo( 'name' ) ?>" rel="homepage"><?php bloginfo( 'name' ) ?></a> */?>
</div>
<div class="back">
<a href="<?php bloginfo( 'url' ) ?>" onclick="$('#myModal').hide()"><i class="fa fa-angle-double-left" aria-hidden="true"></i></i> Home</a>
</div>
</div>
</nav>
<div class="pad-t-20">
<div class="container">
<div class="row review-header">
<div class="col-md-6 col-xs-6">
<p> <i class="fa fa-lock" aria-hidden="true"></i> Secure Checkout </p>
</div>
<div class="col-md-6 col-xs-6 text-right review_header_text">
<p> <i class="fa fa-phone" aria-hidden="true"></i> <?php echo $phoneno ?></span> </p>
</div>
</div>
</div>
<div class="pad-t-20 bdr_bt"></div>
<div class="container">
<div class="row ">
<div class="col-lg-12 mt3">
<!--
<div class="divider_review"><p> <span class="review_tab"> 1 </span><br> Review & Pay </p></div>
<div class=""><p><span class="review_tab_grey"> 2 </span> <br/> Receipt </p> </div>-->
<ul id="progressbar">
<li class="active">Review & Pay</li>
<li class="active">Receipt</li>
</ul>
</div>
</div>
<div class="row pad-t-50">
<h2> Receipt </h2>
<div class="bdr_bt mt15"></div>
<div class="col-md-12 text-center">
<?php echo get_field('receipt_thank_you_note'); ?>
<div class="mt5"></div>
<div class="br_box">
<h4> BOOKING REFERENCE </h4>
<p class="p"> <?php echo $order_id; ?></p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 pad-t-20">
<h4 class="review_heading_h4"> Your Course Summary </h4> </div>
</div>
<div class="bdr_bt mt15"></div>
<h4> <?php the_title(); ?> </h4>
<h4 class="review_heading_h4"> $<?php echo $Amount; ?> </h4>
<p> Duration: 5 Days </p>
<p class="review_form_text"> Location: <?php echo get_field('course_address') ;?> </p>
<P class="review_form_text"> Course Start Date: <span ><?php echo $week1; ?></span></P>
<P class="review_form_text">Course End Date: <span ><?php echo $week2; ?></span></P>
<P class="review_form_text">Name: <span ><?php echo $title." ".$FirstName." ".$LastName; ?></span></P>
<P class="review_form_text">Email: <span ><?php echo $email; ?></span></P>
<P class="review_form_text">Phone number: <span ><?php echo $phoneno; ?></span></P>
<div class="bdr_bt mt15"></div>
<div class="location-item">
<h3 class="pad-t-20"> Any Questions? </h3>
<p> Email : <a href="mailto:<?php echo get_field('email') ;?>"> <?php echo get_field('email'); ?> </a> or visit our <a href="https://www.mcmschool.com/faq/"> FAQs </a></p>
</div>
</div>
</div>
<div class="bdr_bt pad-t-50"></div>
<div class="container">
<div class="row mb5">
<div class="pad-t-20">
<div class="col-md-6">
<?php echo get_field('payment_review_footer_left'); ?>
</div>
<div class="col-md-6 text-right">
<?php echo get_field('payment_review_footer_right'); ?>
</div>
</div>
<!-- <button type="button" class="btn btn-default" data-dismiss="modal" style="float: right; margin-top: 30px;">Close</button> -->
</div>
</div>
</section>
</main>
<div class="cta-mob hidden-lg book_course_wrp">
<a id="bachlar_modal_btn" class="btn-alpha btn-l" href="javascript:;">Book <?php the_title(); ?></a>
</div>
<script>
$(document).ready(function(){
var d = new Date();
var y = d.getFullYear();
var n = d.getMonth();
n=Number(n)+1;
var site_url="";
$('.next_class').attr('month',n);
$('.next_class').attr('year',y);
$('.prev_class').attr('month',n);
$('.prev_class').attr('year',y);
loadfirst(n,y);
$(document).on('click','.prev_class',function(e){
e.preventDefault();
var year=$(this).attr('year');
var month=$(this).attr('month');
nmonth=Number(month)-1;
nyear=Number(year);
if(month==1)
{
nmonth=12;
nyear=Number(year)-1;
}
$('.prev_class').attr('month',nmonth);
$('.prev_class').attr('year',nyear);
$('.next_class').attr('month',nmonth);
$('.next_class').attr('year',nyear);
$.ajax({
type: 'POST',
dataType:'json',
url: 'https://www.mcmschool.com/wp-content/themes/mcm/'+'ajax.php',
data: {
month:nmonth,
year:nyear,
sheats:"<?php echo get_field('seats'); ?>",
course_name:"<?php echo the_title(); ?>",
week_date:<?php echo json_encode(get_field('reserved_weeks')); ?>
},
success: function(responseData) {
//
(responseData.week);
$('.radio_btn').html(responseData.week);
$('.monthyear').html(responseData.monthyear);
if(responseData.checkid!=0)
{
we_id=responseData.checkid;
week1= $('#'+we_id).val();
$('#week').val(week1);
$('#weekp').val(week1);
$('#week1').val(week1);
$('#'+we_id).trigger('click');
start_date=$('#'+we_id).attr('start_date');
end_date=$('#'+we_id).attr('end_date');
$('#week1').attr('start_date',start_date);
$('#week1').attr('end_date',end_date);
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
//TODO
}
});
});
$(document).on('click','.next_class',function(e){
e.preventDefault();
var year=$(this).attr('year');
var month=$(this).attr('month');
nmonth=Number(month)+1;
nyear=Number(year);
if(month==12)
{
nmonth=1;
nyear=Number(year)+1;
}
$('.next_class').attr('month',nmonth);
$('.next_class').attr('year',nyear);
$('.prev_class').attr('month',nmonth);
$('.prev_class').attr('year',nyear);
$.ajax({
type: 'POST',
dataType:'json',
url: 'https://www.mcmschool.com/wp-content/themes/mcm/'+'ajax.php',
data: {
month:nmonth,
year:nyear,
sheats:"<?php echo get_field('seats'); ?>",
course_name:"<?php echo the_title(); ?>",
week_date:<?php echo json_encode(get_field('reserved_weeks')); ?>
},
success: function(responseData) {
// alert(responseData.week);
$('.radio_btn').html(responseData.week);
$('.monthyear').html(responseData.monthyear);
if(responseData.checkid!=0)
{
we_id=responseData.checkid;
week1= $('#'+we_id).val();
$('#week').val(week1);
$('#weekp').val(week1);
$('#week1').val(week1);
$('#'+we_id).trigger('click');
start_date=$('#'+we_id).attr('start_date');
end_date=$('#'+we_id).attr('end_date');
$('#week1').attr('start_date',start_date);
$('#week1').attr('end_date',end_date);
}
else
{
$('.next_class').trigger('click');
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
//TODO
}
});
});
function loadfirst(nmonth,nyear)
{
$.ajax({
type: 'POST',
dataType:'json',
url: 'https://www.mcmschool.com/wp-content/themes/mcm/ajax.php',
data: {
month:nmonth,
year:nyear,
sheats:"<?php echo get_field('seats'); ?>",
course_name:"<?php echo the_title(); ?>",
week_date:<?php echo json_encode(get_field('reserved_weeks')); ?>
},
success: function(responseData) {
// alert(responseData.week);
$('.radio_btn').html(responseData.week);
$('.monthyear').html(responseData.monthyear);
if(responseData.checkid!=0)
{
we_id=responseData.checkid;
week1=$('#'+we_id).val();
$('#'+we_id).trigger('click');
$('#week').val(week1);
$('#weekp').val(week1);
$('#week1').val(week1);
start_date=$('#'+we_id).attr('start_date');
end_date=$('#'+we_id).attr('end_date');
$('#week1').attr('start_date',start_date);
$('#week1').attr('end_date',end_date);
$('#week_start_date').html(start_date);
$('#week_end_date').html(end_date);
}
else
{
$('.next_class').trigger('click');
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
//TODO
}
});
}
$(document).on('change','input:radio[name="radio2"]',function(){
rs=$(this).val();
$('#week1').val(rs);
var start_date=$(this).attr('start_date');
var end_date=$(this).attr('end_date');
$('#week1').attr('start_date',start_date);
$('#week1').attr('end_date',end_date);
});
$(document).on('click','#submit',function(){
var filter = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
flag=1;
if(!$("input:radio[name='radio2']").is(":checked")) {
$('.radio_error').addClass("red_border");
$('.radio_error').html("Booking Week is required");
flag=0;
}
else
{
$('.radio_error').removeClass("red_border");
$('.radio_error').html("");
}
if($("#name1").val()=="") {
$('#name1,.name1_head,.name1_error').addClass("red_border");
$('.name1_error').html("First name is required");
flag=0;
}
else
{
$('#name1,.name1_head,.name1_error').removeClass("red_border");
$('.name1_error').html("");
}
if($("#surname1").val()=="") {
$('#surname1,.surname1_head,.surname1_error').addClass("red_border");
$('.surname1_error').html("Surname name is required");
flag=0;
}
else
{
$('#surname1,.surname1_head,surname1_error').removeClass("red_border");
$('.surname1_error').html("");
}
if($("#email1").val()=="")
{
$('#email1,.email1_head,.email1_error').addClass("red_border");
$('.email1_error').html("Email is required");
flag=0;
}
else if (!filter.test($("#email1").val()))
{
$('#email1,.email1_head,.email1_error').addClass("red_border");
$('.email1_error').html("Please enter vaild email");
flag=0;
}
else
{
$('#email1,.email1_head,.email1_error').removeClass("red_border");
$('.email1_error').html("");
}
if(flag==0)
{
return false;
}
else
{
week1=$('#week1').val();
$('#week').val(week1);
$('#weekp').val(week1);
var start_date=$('#week1').attr('start_date');
var end_date=$('#week1').attr('end_date');
$('#week_start_date').html(start_date);
$('#week_end_date').html(end_date);
name1=$('#name1').val();
$('#name').val(name1);
$('#namep').val(name1);
var surname1=$('#surname1').val();
$('#surname').val(surname1);
$('#surnamep').val(surname1);
$('#email').val($('#email1').val());
$('#emailp').val($('#email1').val());
$('.review_popup_sec').show();
return false;
}
});
$(document).on('keyup','#name1,#surname1,#email1',function(){
var filter = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
if($(this).attr('id')=="name1")
{
if($("#name1").val()=="") {
/*$('#name1,.name1_head,.name1_error').addClass("red_border");
$('.name1_error').html("First name is required");*/
flag=0;
}
else
{
$('#name1,.name1_head,.name1_error').removeClass("red_border");
$('.name1_error').html("");
}
}
if($(this).attr('id')=="surname1")
{
if($("#surname1").val()=="") {
/*$('#surname1,.surname1_head,.surname1_error').addClass("red_border");
$('.surname1_error').html("Surname name is required");*/
flag=0;
}
else
{
$('#surname1,.surname1_head,surname1_error').removeClass("red_border");
$('.surname1_error').html("");
}
}
if($(this).attr('id')=="email1")
{
if($("#email1").val()=="")
{
/* $('#email1,.email1_head,.email1_error').addClass("red_border");
$('.email1_error').html("Email is required");*/
flag=0;
}
else if (!filter.test($("#email1").val()))
{
//$('#email1,.email1_head,.email1_error').addClass("red_border");
//$('.email1_error').html("Please Enter Vaild Email");
flag=0;
}
else
{
$('#email1,.email1_head,.email1_error').removeClass("red_border");
$('.email1_error').html("");
}
}
});
$(document).on('keyup','#name,#surname,#email,#phone_no,#card_nu,#card_exp_month,#card_exp_year,#card_csv',function(){
var filter = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
flag=1;
if($(this).attr('id')=="name")
{
if($("#name").val()=="") {
$('#name,.name_head,.name_errors').addClass("red_border");
$('.name_errors').html("First name is required");
flag=0;
}
else
{
$('#name,.name_head,.name_errors').removeClass("red_border");
$('.name_errors').html("");
}
}
if($(this).attr('id')=="surname")
{
if($("#surname").val()=="") {
$('#surname,.surname_head,.surname_errors').addClass("red_border");
$('.surname_errors').html("Surname name is required");
flag=0;
}
else
{
$('#surname,.surname_head,surname_errors').removeClass("red_border");
$('.surname_errors').html("");
}
}
if($(this).attr('id')=="email")
{
if($("#email").val()=="")
{
$('#email,.email_head,.email_errors').addClass("red_border");
$('.email_errors').html("Email is required");
flag=0;
}
else if (!filter.test($("#email").val()))
{
$('#email,.email_head,.email_errors').addClass("red_border");
$('.email_errors').html("Please enter vaild email");
flag=0;
}
else
{
$('#email,.email_head,.email_errors').removeClass("red_border");
$('.email_errors').html("");
}
}
if($(this).attr('id')=="phone_no")
{
$(this).val($(this).val().replace(/\D/, ''));
if($("#phone_no").val()=="")
{
/*$('#phone_no,.phone_no_head,.phone_no_error').addClass("red_border");
$('.phone_no_errors').html("Phone number is required");*/
flag=0;
}
else if(isNaN($('#phone_no').val()))
{
flag=0;
/* $('.phone_no_errors').html('This must be number');
$('#phone_no,.phone_no_head,.phone_no_errors').addClass("red_border");*/
}
else if($('#phone_no').val().length<10)
{
flag=0;
/*$('.phone_no_errors').html('This must be valid number');
$('#phone_no,.phone_no_head,.phone_no_errors').addClass("red_border");*/
}
else
{
$('.phone_no_errors').html('');
$('#phone_no,.phone_no_head,.phone_no_error').removeClass("red_border");
}
}
if($(this).attr('id')=="card_nu")
{
if($('#card_nu').val()=="")
{
/* $('.card_nu_errors').html('Enter card number');
$('#card_nu,.card_nu_errors,.card_nu_head').addClass('has-error');*/
}
else if($('#card_nu').val().length<12)
{
/*$('.card_nu_errors').html('This must be between 12 and 19 digits.');
$('#card_nu,.card_nu_errors,.card_nu_head').addClass('has-error');*/
}
else
{
$('.card_nu_errors').html('');
$('#card_nu,.card_nu_errors,.card_nu_head').removeClass('has-error');
}
}
if($(this).attr('id')=="card_csv")
{
if($('#card_csv').val()=="")
{
/* $('.card_csv_errors').html('Enter security number ');
$('#card_csv,.card_csv_errors,.card_csv_head').addClass('has-error');*/
}
else if(isNaN($('#card_csv').val()))
{
$('.card_csv_errors').html('Enter valid security number ');
$('#card_csv,.card_csv_errors,.card_csv_head').addClass('has-error');
}
else
{
$('.card_csv_errors').html('');
$('#card_csv,.card_csv_errors,.card_csv_head').removeClass('has-error');
}
}
if($(this).attr('id')=="card_exp_year")
{
$(this).val($(this).val().replace(/\D/, ''));
if($('#card_exp_year').val()=="")
{
/*$('#card_exp_year,.card_exp_year_errors,.card_exp_year_head').addClass('has-error');
$('.card_exp_year_errors').html('Please enter year');*/
}
else if(isNaN($('#card_exp_year').val()))
{
$('#card_exp_year,.card_exp_year_errors,.card_exp_year_head').addClass('has-error');
$('.card_exp_year_errors').html('Please enter valid expiry year');
}
else if($('#card_exp_year').val().length!=2)
{
/* $('#card_exp_year,.card_exp_year_errors,.card_exp_year_head').addClass('has-error');
$('.card_exp_year_errors').html('Please make sure your card is not expired ');*/
}
else
{
$('#card_exp_year,.card_exp_year_errors,.card_exp_year_head').removeClass('has-error');
$('.card_exp_year_errors').html('');
}
}
if($(this).attr('id')=="card_exp_month")
{
if($('#card_exp_month').val()=="")
{
/* $('#card_exp_month,.card_exp_month_errors,.card_exp_month_head').addClass('has-error');
$('.card_exp_month_errors').html('Enter Month');*/
}
else if(isNaN($('#card_exp_month').val()))
{
$('#card_exp_month,.card_exp_month_errors,.card_exp_month_head').addClass('has-error');
$('.card_exp_month_errors').html('Please be sure to enter valid month');
}
else if($('#card_exp_month').val()>12)
{
$('#card_exp_month,.card_exp_month_errors,.card_exp_month_head').addClass('has-error');
$('.card_exp_month_errors').html('Please enter valid month');
}
else if($('#card_exp_month').val().length!=2)
{
/* $('#card_exp_month,.card_exp_month_errors,.card_exp_month_head').addClass('has-error');
$('.card_exp_month_errors').html('Please be Sure to enter valid month');*/
}
else
{
$('#card_exp_month,.card_exp_month_errors,.card_exp_month_head').removeClass('has-error');
$('.card_exp_month_errors').html('');
}
}
});
function testp()
{
$("#paypal_form").submit();
$("#paypal_form").trigger('submit');
}
$(document).on('submit','#paypal_form',function(){
$(this).submit();
});
});
</script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/creditly.js"></script>
<!-- TO DO : Place below JS code in js file and include that JS file -->
<script type="text/javascript">
Stripe.setPublishableKey('<?php echo $params['public_test_key']; ?>');
$(function() {
var creditly = Creditly.initialize(
'.expiration-month',
'.credit-card-number',
'.security-code',
'.card-type'
);
var $form = $('#payment-form');
$form.submit(function(event) {
var output = creditly.validate();
// Disable the submit button to prevent repeated clicks:
$form.find('.submit').prop('disabled', true);
if($('#card_nu').val()=="")
{
$('.card_nu_errors').html('Enter card number');
$('#card_nu,.card_nu_errors,.card_nu_head').addClass('has-error');
}
else if($('#card_nu').val().length<12)
{
$('.card_nu_errors').html('This must be between 12 and 19 digits.');
$('#card_nu,.card_nu_errors,.card_nu_head').addClass('has-error');
}
else
{
$('.card_nu_errors').html('');
$('#card_nu,.card_nu_errors,.card_nu_head').removeClass('has-error');
}
if($('#card_csv').val()=="")
{
$('.card_csv_errors').html('Enter security number ');
$('#card_csv,.card_csv_errors,.card_csv_head').addClass('has-error');
}
else if(isNaN($('#card_csv').val()))
{
$('.card_csv_errors').html('Enter valid security number ');
$('#card_csv,.card_csv_errors,.card_csv_head').addClass('has-error');
}
else
{
$('.card_csv_errors').html('');
$('#card_csv,.card_csv_errors,.card_csv_head').removeClass('has-error');
}
if($('#card_exp_year').val()=="")
{
$('#card_exp_year,.card_exp_year_errors,.card_exp_year_head').addClass('has-error');
$('.card_exp_year_errors').html('Please enter year');
}
else if(isNaN($('#card_exp_year').val()))
{
$('#card_exp_year,.card_exp_year_errors,.card_exp_year_head').addClass('has-error');
$('.card_exp_year_errors').html('Please enter valid expiry year');
}
else if($('#card_exp_year').val().length!=2)
{
$('#card_exp_year,.card_exp_year_errors,.card_exp_year_head').addClass('has-error');
$('.card_exp_year_errors').html('Please make sure your card is not expired ');
}
else
{
$('#card_exp_year,.card_exp_year_errors,.card_exp_year_head').removeClass('has-error');
$('.card_exp_year_errors').html('');
}
if($('#card_exp_month').val()=="")
{
$('#card_exp_month,.card_exp_month_errors,.card_exp_month_head').addClass('has-error');
$('.card_exp_month_errors').html('Enter Month');
}
else if(isNaN($('#card_exp_month').val()))
{
$('#card_exp_month,.card_exp_month_errors,.card_exp_month_head').addClass('has-error');
$('.card_exp_month_errors').html('Please be sure to enter valid month');
}
else if($('#card_exp_month').val()>12)
{
$('#card_exp_month,.card_exp_month_errors,.card_exp_month_head').addClass('has-error');
$('.card_exp_month_errors').html('Please enter valid month');
}
else if($('#card_exp_month').val().length!=2)
{
$('#card_exp_month,.card_exp_month_errors,.card_exp_month_head').addClass('has-error');
$('.card_exp_month_errors').html('Please be Sure to enter valid month');
}
else
{
$('#card_exp_month,.card_exp_month_errors,.card_exp_month_head').removeClass('has-error');
$('.card_exp_month_errors').html('');
}
// Request a token from Stripe:
Stripe.card.createToken($form, stripeResponseHandler);
// Prevent the form from being submitted:
return false;
});
});
function stripeResponseHandler(status, response) {
// Grab the form:
var $form = $('#payment-form');
var filter = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
flag=1;
if($("#name").val()=="") {
$('#name,.name_head,.name_errors').addClass("red_border");
$('.name_errors').html("First name is required");
flag=0;
}
else
{
$('#name,.name_head,.name_errors').removeClass("red_border");
$('.name1_errors').html("");
}
if($("#surname").val()=="") {
$('#surname,.surname_head,.surname_errors').addClass("red_border");
$('.surname_errors').html("Surname name is required");
flag=0;
}
else
{
$('#surname,.surname_head,surname_errors').removeClass("red_border");
$('.surname_errors').html("");
}
if($("#email").val()=="")
{
$('#email,.email_head,.email_errors').addClass("red_border");
$('.email_errors').html("Email is required");
flag=0;
}
else if (!filter.test($("#email").val()))
{
$('#email,.email_head,.email_errors').addClass("red_border");
$('.email_errors').html("Please enter vaild email");
flag=0;
}
else
{
$('#email,.email_head,.email_errors').removeClass("red_border");
$('.email_errors').html("");
}
if($("#phone_no").val()=="")
{
$('#phone_no,.phone_no_head,.phone_no_errors').addClass("red_border");
$('.phone_no_errors').html("Phone number is required");
flag=0;
}
else if(isNaN($('#phone_no').val()))
{
flag=0;
$('.phone_no_errors').html('This must be number');
$('#phone_no,.phone_no_head,.phone_no_errors').addClass("red_border");
}
else if($('#phone_no').val().length<10)
{
flag=0;
$('.phone_no_errors').html('This must be valid number');
$('#phone_no,.phone_no_head,.phone_no_errors').addClass("red_border");
}
else
{
$('.phone_no_errors').html('');
$('#phone_no,.phone_no_head,.phone_no_errors').removeClass("red_border");
}
if(flag==0)
{
$('#myModal').animate({
scrollTop: $(".ur_detail_text").offset().top
}, 10);
$form.find('.submit').prop('disabled', false); // Re-enable submission
return false;
}
if (response.error) { // Problem!
$('#myModal').animate({
scrollTop: $(".ur_detail_text").offset().top-55
}, 10);
// Show the errors on the form:
$form.find('.payment-errors').text(response.error.message);
$form.find('.submit').prop('disabled', false); // Re-enable submission
} else { // Token was created!
// Get the token ID:
var token = response.id;
document.getElementById("loading_page").style.display = "flex";
// Insert the token ID into the form so it gets submitted to the server:
$form.append($('<input type="hidden" name="stripeToken">').val(token));
// Submit the form:
$('#payment-form').get(0).submit();
}
};
</script>
<?php
if($cls!="")
{
?>
<script type="text/javascript">
$('#myModalreview').modal('show');
document.getElementById("loading_page").style.display = "none";
</script>
<?php
}
?>
<script>
document.getElementById("loading_page").style.display = "none";
$(document).ready(function(){
$("#bachlar_modal_btn").on("click", function(){
$('#bookform').addClass('book_modal_open');
if($('#bookform').hasClass('book_modal_open'))
{
$('body').addClass('over_flw_none');
$('#bookform').parent().css('position','static');
}
});
jQuery('.close').click(function(){
$('body').removeClass('over_flw_none');
$('#bookform').removeClass('book_modal_open');
});
});
</script>
<?php
get_sidebar();
get_footer();
?>