<?php
	include('views/_header.tpl.php');
	
	// LET'S MASK THE SUBSCRIBER'S EMAIL
	
	//$subcode = $phone_info['ver_code'];
	
	$stars = 4; // Min Stars to use
	
	// LET'S MASK THE SUBSCRIBER'S PHONE
	if ($phone_info) {
		$phone = $phone_info['phoneNo'];

		$phone_1 = substr( $phone, 0, 2 ); // Get the first two digits
		$phone_2 = str_repeat( '*', ( strlen( $phone ) - 4 ) ); // Apply enough asterisks to cover the middle numbers
		$phone_3 = substr( $phone, -3 ); // Get the last two digits

		$subscriber_phone  = $phone_1 . $phone_2 . $phone_3;
	} else {
		$subscriber_phone = "Not valid or found.";
	}
	
	if (isset($msg)) {
		$msg = "You successfully confirmed your number.";
		$bgcolor = "#00941e";
		echo "<center><b>$msg</b></center><br /><br />";
	}
	
	if (isset($_GET['ooops'])) {
		$msg = "Phone number not found";
		$bgcolor = "#bd0000";
		//echo "<center><b>$msg</b></center><br /><br />";
	}
	
	if (isset($_GET['nomatch'])) {
		$msg = "You cannot verify this phone number with this link. Please contact support at support@chattrboxx.com";
		$bgcolor = "#bd0000";
		//echo "<center><b>$msg</b></center><br /><br />";
	}

	if (isset($_GET['msg'])) {
		$message = "You successfully confirmed your number.";
		$msg = htmlentities(strip_tags($message));
		$bgcolor = "#00941e";
		// ORIG $msg = htmlentities(strip_tags($_GET['msg']));
	}
	
?>

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

});	
</script>

<!-- MAY WANT TO REMOVE THE OVERFLOW HIDDEN STYLES, SO THE PAGE IS SCROLLABLE -->
<style type="text/css">
	html {
		overflow:auto !important;
		font-family: Montserrat,'Open Sans', Helvetica, Verdana,sans-serif;
	}
	body { height:100%; overflow:auto; font-family: Montserrat,'Open Sans', Helvetica, Verdana,sans-serif; }
	.spacer { padding-top: 60px; }
	
	h1 {
		font-family: Montserrat,'Open Sans', Helvetica, Verdana,sans-serif;
	}
	.prefstable a { 
		background:#333;
		color:#fff;
		padding:5px 5px;
		font-size:13px;
		border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px;
	}
	.prefstable a:hover { 
		background:#555;
	}
	
	#errordiv a,
	#errordiv a:active,
	#errordiv a:visited {
		background: #fff;
		color: #28d52d;
		border-radius: 50px; -moz-border-radius: 50px; -webkit-border-radius: 50px;
		padding: 3px 10px;
		font-weight: 800;
	}

	#errordiv a:hover {
		color: #fff;
		background: #28d52d;
	}	
	
/* ###################################################################### */
/* ###############              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>


<div class="home-feature-category" style="background:none; border:none;">
    <div class="container_12 clearfix">
        <div class="grid_12 marked-category">
        	<br />
			<div class="form form-profile aif" style="max-width:400px; margin:0 auto; background:#fff; padding:15px 25px; 
				border:1px solid #eee; font-size:15px; line-height:23px; font-family:Montserrat,'Open Sans', Helvetica, Verdana,sans-serif;">	
        
				<h1 style="text-shadow:0px 0px 0px rgba(255,255,255,0); margin:5px 0 15px; 
				font-weight:600; color:#aaa;">SMS Text Message Phone Number Confirmation</h1>
				
				<?php
				if (isset($msg)) {
					echo "<div id='errordiv' style='line-height:25px; background:$bgcolor; color:#fff; padding:11px 15px;
					margin:5px 0px 15px 0px; border:1px solid #fff; font-weight:300; text-align:center;
					 font-size:15px;'>$msg</div>";
				}
				?>	
				
				Your Phone Number on file:<br />
				<?= $subscriber_phone ?>				
				<br /><br />
				Thank you, 
				<br />
				ChattrBox Team
				
				<br /><br />
				<div style="display:none; color:#999; font-size:14px; line-height:19px;">
					You can turn these settings back on at any time by 
					logging into your ChattrBox Account
					and going to the Notifications section on your Edit Account page.
				</div>
				<br />
				
				<div style="border-top:1px solid #ccc;">&nbsp;</div>
				
			</div>
		
		</div><!-- GRID 12 DIV ENDS HERE -->
	</div><!-- CONTAINER 12 DIV END HERE -->
</div><!-- HOME FEATURE CATEGORY DIV ENDS HERE -->

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