<?php include_once("includes.php"); ?>
<?php include_once('header.php'); ?>
<?php
$message = urlencode(str_replace(array(" ","&"),array("%20","%26"),"Please reply 'Y' to this message to confirm your registration!"));
$replyMessage = urlencode(str_replace(array(" ","&"),array("%20","%26"),"Thank you for your confirmation. You are now registered. We look forward to seeing you at " . $dealerInfo[$_SESSION['tradeup']['selectedDealer']]['name'] . "."));
//$message = urlencode("Please reply 'Y' to this message to confirm your registration!");
//$replyMessage = urlencode("Thank you for your confirmation. You are now registered. We look forward to seeing you at " . $dealerInfo[$_SESSION['register']['selectedDealer']]['name'] . ".");
//$message = str_replace(array("+"),array("%20"),urlencode("Please reply 'Y' to this message to confirm your registration!"));
//$replyMessage = str_replace(array("+"),array("%20"),urlencode("Thank you for your confirmation. You are now registered. We look forward to seeing you at " . $dealerInfo[$_SESSION['register']['selectedDealer']]['name'] . "."));
if($_SESSION['tradeup']['mobile'] != "" && $_SESSION['tradeup']['selectedDealer'] != "")
{
?>
<iframe height="0" width="0" frameborder="0" src="http://ar.absoluteresults.com/blackbook/email.php?regID=<?= urlencode(serialize($_SESSION['tradeup'])) ?>"></iframe>
<iframe height="0" width="0" frameborder="0" src="https://x1.knfrmd.com/sms/create?mobile_number=1<?= trim(preg_replace("/[^0-9]/","", $_SESSION['tradeup']['mobile'])) ?>&message=<?= $message ?>&access_token=e9ef6aacc17289b5238fe42a56a697fe&contact_name=<?= urlencode($_SESSION['tradeup']['firstname'] . ' ' . $_SESSION['tradeup']['lastname']) ?>&email_addr=<?= urlencode($_SESSION['tradeup']['email']) ?>&reply_msg=<?= $replyMessage ?>&sender_ref=<?= $_SESSION['tradeup']['selectedDealer'] ?>"></iframe>
<?php } ?>
<center>
<table cellspacing="0" cellpadding="0" style="width:100%">
<tr>
<td style="padding-left:40px;text-align:left;">
<center>
<img src="images/thankYou.jpg">
<div style="color:white;background-color:#111;padding-top:10px;text-align:left;padding-left:50px">
Thank you for registering!
<br>You should receive an email and text message from us shortly.
<br>You will need to reply to the text message to confirm your registration.
<br><br>
Please visit our dealership:
<br><br>
<font style="color:red">
<b><?= $dealerInfo[$_SESSION['tradeup']['selectedDealer']]['name']?> </b>
</font>
<br>
<?= $dealerInfo[$_SESSION['tradeup']['selectedDealer']]['address'] ?>
</div>
<img src="images/roundBottom.jpg">
</center>
</td>
</tr>
</table>
<br><br>
<a href="index.php">Go Back</a></center>
<?php unset($_SESSION['tradeup']); ?>
<?php include_once('footer.php'); ?>