<?php
$globalpagetitle = "Payment Successful!";
include('views/_header_shop.tpl.php');

if (isset($_GET['rec'])) {
	$receiptID = filter_var($_GET['rec'], FILTER_SANITIZE_STRING);
	$receipt_info=htmlentities($receiptID, ENT_QUOTES, 'UTF-8');
}
if (isset($_GET['oid'])) {
	$orderID = filter_var($_GET['oid'], FILTER_SANITIZE_STRING);
	$order_id=htmlentities($orderID, ENT_QUOTES, 'UTF-8');
}
?>

<script type="text/javascript">
	$(document).ready(function() {

		// IF THEY CLICK GRAYED OUT PLACE ORDER BUTTON
//		$("#placeorder").click(function() {
//			alert('Please click the Ok, got it button to continue placing your order.');
//		});
	});
</script>

<style type="text/css">
	body, html {
		background: #fff;
	}
	body {
		height: 100%;
	}
	.spacer {
		padding-top: 57px;
	}
	p {
		font-size: 17px;
	}
	label, label.payments {
		color: #000;
	margin-bottom: 17px;
	height: 25px;
	}
	input[type="text"] {
		width: 100%;
		padding: 15px;
		border: 1px solid #ccc;
		border-radius: 6px;
	-moz-border-radius: 6px;
	-webkit-border-radius: 6px;
		background: #fff;
		font-size: 17px;
		font-weight: 300;
		margin: 10px 0;
	}
	input[type="submit"], input[type="button"] {
		background: #000;
		color: #fff;
		border: 0px;
		font-size: 17px;
		height: auto;
		width: 100%;
		padding: 15px 15px;
		border-radius: 50px;
	-moz-border-radius: 50px;
	-webkit-border-radius: 50px;
	}
	input.gray {
		background: #ccc;
	}
	div.inputfields {
		display: inline-block;
	float: left;
	width: 50%;
	padding: 10px;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	}
	.cashpmtid {
		text-align: center;
	margin: 0 auto;
	background: #f3f3f3;
	padding: 10px 15px 8px;
	text-shadow: 0px 1px 0px #fff;
		border-radius: 50px;
	-moz-border-radius: 50px;
	-webkit-border-radius: 50px;
	max-width: 375px;
	width: auto;
	border: 2px solid #f0f0f0;
	}
	/* CASH ORDER SUCCESSFUL STYLES */
	.btn-o a {
		background: rgba(0,0,0,.5);
	font-size: 15px;
	font-weight: 300;
	}
	.btn-o a:hover {
		background: #82be55;
	font-size: 15px;
	}
	/* green 82be55*/
	h1 {
		color: #000;
	font-weight: 400 !important;
	text-transform: capitalize;
		letter-spacing: normal;
	font-size: 38px;
	}
	a, a:link, a:visited, a:active, a:hover {
		color: #04a7ff;
	text-decoration: none;
	font-weight: 400;
	}
	a:hover {
		color: #047eff;
	}

	/* ################################### */
	/*                       MOBILE STYLES                       */
	/* ################################### */

	/* Portrait tablet to landscape and desktop */
	@media (min-width: 768px) and (max-width: 979px) {

	}

	/* Landscape phone to portrait tablet */
	@media (max-width: 767px) {

	}

	/* Landscape phones and down */
	@media (max-width: 586px) {

	}

	/* Landscape phones and down */
	@media (max-width: 480px) {

	}

	/* Older phones with super small screens */
	@media (max-width: 320px) {

	}
</style>

<!-- background: #fff url('/static/client/topborder.png') top repeat-x; background-size:150px;  -->
<div class="home-feature-category" style="border:none; margin-top:2px">
	<div class="container_12 clearfix">
		<div class="grid_12 marked-category" style="text-align:center; font-weight:300; color:#222;
        		font-family: Montserrat,Arial, sans-serif; font-size:17px; line-height:28px;">

			<!--<center><img src="/static/client/crest_black_on_white.png" alt="Your Logo"
			style="max-width:200px; width:99%; max-height:250px;"></center>-->
			<br />
			<h1 style="">Thank You for your order.</h1>

			<span style="font-size:19px;">Your payment was successfully received. We&rsquo;ve
			also just sent a digital receipt to your email and a confirmation text message, as well.</span>
			<br /><br />
			<img src="/static/system/receipt_icon.png" alt="R" style="height:25px; margin:-5px 0 0;" align="absmiddle" /> Receipt ID#:
			<a href="https://squareup.com/receipt/preview/<?php echo $receipt_info; ?>"><?php echo $receipt_info; ?></a>
			<br />

			<img src="/static/system/order_status_trackingicon.png" alt="X" style="height:50px; margin:5px 0 -10px;" align="absmiddle" />
			<br /><br />


			<img src="https://orderitfrom.com/static/system/foodtracking.gif" alt="X"
			style="height:80px; margin-left:-40px; margin-right:-35px; margin-top:-10px"
			align="absmiddle" />
			<a href="/track/<?php echo $order_id; ?>"
        	title="Click to view Order Status Tracking"
			style="font-size:15px; color:#000; font-weight:600;">Track Order Status &raquo;</a>

			<br /><br />

			<div style="background:red; max-width:300px; margin:0 auto;">
				<div class="btn-o">
					<a href="/checkout"
		        style="float:left; color:#fff; border:3px solid rgba(255,255,255,.7); padding:10px 10px; border-radius:50px;
		        text-decoration:none; width:100px; font-weight:300;">&laquo; Checkout</a>
				</div>

				<div class="btn-o">
					<a href="/shop"
		        style="float:right; color:#fff; border:3px solid rgba(255,255,255,.7); padding:10px 10px; border-radius:50px;
		        text-decoration:none; width:100px; font-weight:300;">Shop &raquo;</a>
				</div>
			</div>
			<br /><br /><br />

		</div><!-- GRID 12 -->
	</div><!-- CONTAINER 12 -->
</div><!-- HOME FEATURE -->

<div class="clear"></div>

<?php
if (!$payment_id) {
	echo "<br /><br /><br />"; } ?>

<div style="width:100%; height:200px; background:#ccc; text-align:center; padding:35px 25px; font-family: Montserrat,Arial, sans-serif;
box-sizing:border-box; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; color:#fff; font-size:11px; font-weight:400;">
	powered by<br />
	<img src="/static/client/devshares_icon_white_flat.png" alt="DevShares" 
	style="height:100px; margin:5px 0 -15px;" align="absmiddle" />
</div>

<?php
include('views/_footer_m.tpl.php');
?>