<!DOCTYPE html>
<?php
// change the below keyword to what you want

$keyword = "thepub";

// end change

$display = false;
if (isset($_POST['p']) && isset($_POST['k'])) {
	$url = "http://api.cell4deals.com/websignup/signup";
	$fields = array(
		'p' => urlencode($_POST['p']),
		'k' => urlencode($_POST['k'])
	);
	// url-ify the data for the POST
	foreach($fields as $key=>$value) { 
		$fields_string .= $key.'='.$value.'&'; 
	}
	$fields_string = rtrim($fields_string, '&');
	// open connection
	$ch = curl_init();
	curl_setopt($ch,CURLOPT_URL, $url);
	curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);
	curl_setopt($ch,CURLOPT_POST, count($fields));
	curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
	$recived_content = curl_exec($ch);
	$data = json_decode($recived_content, true);
	// close connection
	curl_close($ch);
	if ($data['error']) {
		if (isset($data['message']) && $data['message'] != "") {
			$message = $data['message'];
		} else {
			$message = "We had an error processing that phone number. Please contact support.";
		}
		$title = "Failure";
		$border = "1px solid #dd3c10";
		$bc = "#ffebe8";
		$display = true;
	} else {
		$message = "Phone number added!";
		$title = "Success";
		$border = "1px solid #10DC10";
		$bc = "#E7FFE8";
		$display = true;
	}
	$style = "margin: 0 auto; background-color: $bc; border: $border; color: #333333; padding: 10px; font-size: 14px; width: 95%; margin-bottom: 10px;";
}
?>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Menuetta</title>
<!--[if IE]>
 <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<link rel="apple-touch-icon" href="images/touch-icon-iphone.png" />
<link rel="apple-touch-icon" sizes="72x72" href="images/touch-icon-ipad.png" />
<link rel="apple-touch-icon" sizes="114x114" href="images/touch-icon-iphone4.png" />

<link rel="stylesheet" href="css/mobile_style.css" />
<link rel="stylesheet" href="css/accordian-style.css" />

<link rel="stylesheet" href="css/add2home.css">
<script type="application/javascript" src="js/add2home.js"></script>


<meta name="viewport" content="width=device-width"/> 

</head>


<body>



<div id="header-menuetta">
<img src="images/grey-header.png">
</div>




<section id="content">

<div id="navcontainer">
<div id="navigation">
<br />
<?php if ($display) { ?>
<div style="<?php echo $style; ?>"><?php echo "$title<br />$message"; ?></div>
<?php } ?>
<div id="left-pad5" style="text-align:center;"><span class="menu-title">Marketing Made Simple</span></div>
<br />
<div id="buttons">
<ul>

        <li>
		<div id="home-buttons">
			<a href="http://youtu.be/rz2USRik6QU"><img src="images/video-button-m.png" alt="Video"></a>
		</div>
			<div id="button-text">
            <p>Got 2 Minutes?<br />- it explains the program well </p>
            </div>
		<div style="clear:both;"></div>
	</li>
    
    
     <li>
		<div id="home-buttons">
			<a href="http://www.joespizzasite.com"><img src="images/demo-button.png" alt="Demo"></a>
		</div>
			<div id="button-text">
            <p>View a brief demonstration</p>
            </div>
		<div style="clear:both;"></div>
	</li>
    
    	<li>
		<div id="home-buttons">
			<a href="offer.php"><img src="images/offer-button.png" alt="Register"></a>
		</div>
			<div id="button-text">
            <p>Exclusive offer for our<br />Valued Customers</p>
            </div>
		<div style="clear:both;"></div>
	</li>
    
        <li>
		<div id="home-buttons">
			<a href="register.php"><img src="images/register-button.png" alt="Register"></a>
		</div>
			<div id="button-text">
            <p>Sign up for the deal</p>
            </div>
		<div style="clear:both;"></div>
	</li>
    
    <li>
    
<p style="padding-top:.5em;padding-bottom:.5em;">Enter your phone number to sign up <br />for our text messaging club.<br/>
You will receive a confirmation text msg.</p>
<form action="indexm.php" method ="POST">
    <input type="hidden" name="k" value="<?php echo $keyword; ?>"/> <!-- Put your Keyword in here -->
    <input type="text" name="p" size="20"/>
    <input type="submit" value="Submit"/>
</form>
<p>Please reply with 'Y' <br />to that confirmation msg.</p>
<br />
    </li>
    
    
</ul>
</div>
<br />
<div id="header-menuetta">
<img src="images/grey-footer.png">
</div>


</div>
</div>
</section>


<script type="text/javascript" src="javascripts/script.js"></script>

<script type="text/javascript">

var parentAccordion=new TINY.accordion.slider("parentAccordion");
parentAccordion.init("acc","h3",1,-1);

var nestedAccordion=new TINY.accordion.slider("nestedAccordion");
nestedAccordion.init("nested","h3",1,-1,"acc-selected");

var nestedAccordion2=new TINY.accordion.slider("nestedAccordion2");
nestedAccordion2.init("nested2","h3",1,-1,"acc-selected");