<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
error_reporting(0);
ini_set('html_errors',false);
ini_set('display_errors',false);

session_start();



// Initialising the $error variable. At the start it is 0. Each field in this form is processed, and if something is wrong (empty input, wrong email address, invalid captcha code, etc) $error is incremented. Form will stop processing if $error is > 0.
$error = 0;
$name_text = '请输入您的验证码';
$name = '';
$email_text = '请输入您的邮箱';
$email = '';


// This piece of code decides whether to show the form or to process it
if (!isset($_POST['action']) || $_POST['action'] != 'submit') {
	show_form();
	die;
}

// Ok, let's process the form
else {
	
	// Checking email
	if (empty($_POST['email'])) {
		$error .= 1;
		Msgbox("Please enter your email");
		$email_text = '<span>请输入您的邮箱</span>';
	} elseif (!preg_match('/^[-!#$%&\'*+\\.\/0-9=?A-Z^_a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_a-z{|}~]+\.'.'[-!#$%&\'*+\\.\/0-9=?A-Z^_a-z{|}~]+$/i', $_POST['email'])) {
		$error .= 1;
		Msgbox("请输入您的邮箱");
		$email = strip_tags($_POST['email']);
	} else {
		$error .= 0;
		$email = strip_tags($_POST['email']);
	}
	

	
	// If $error is > 0, we'll show the form again
	if ($error > 0) {
		show_form();
		die;
	} else {
		// If everything is ok, we'll send an email
		$code = strip_tags(trim($_POST['code']));
		$email = strip_tags(trim($_POST['email']));
    $url = "http://ktweibo.applinzi.com/found_serial.php?code=".$code."&email=".$email; 
    $contents = file_get_contents($url); 
    
		//判断contents值并跳转到显示序列号的页面。
		if($contents == "0" || $contents == "" || strlen($contents) < 64){
			msgbox("未查找到您的授权码,您输入了错误的激活码或错误的邮箱。请加入官方QQ群:21638001,寻求帮助。");
			show_form();
		}else{
			show_success($contents);
			}
		die();
	}
}

function MsgBox($str){     
	echo("<script language=javascript>") ;    
	echo ("alert('$str');");                
	echo("</script>");   
	}
// This function shows the form
function show_form() {
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="order.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.order_Div1 {width:230px; float:left; border:1px solid #999999; border-right:0px; height:330px; margin-top:40px; text-align:center; background:url(images/order-bg1.jpg) repeat-y #f7f7ef right top;}
.order_Div12 {width:230px; float:left; border:1px solid #009900; border-right:0px; height:330px; margin-top:40px; text-align:center; background:url(images/order-bg1.jpg) repeat-y #f7f7ef right top;}
.order_Div2 {width:300px; float:left; border:3px solid #CC9966; height:380px; text-align:center; background-color:#ffffff; font-family:Arial, Helvetica, sans-serif;}
.order_Div22 { width:300px; float:left; border:3px solid #009900; height:380px; text-align:center; background-color:#F4FFFF; font-family:Arial, Helvetica, sans-serif;}
.order_Div3 {width:230px; float:left; border:1px solid #999999; border-left:0px; height:330px; margin-top:40px; text-align:center; background:url(images/order-bg2.jpg) repeat-y #f7f7ef left top;}
.order_Div32 {width:230px; float:left; border:1px solid #009900; border-left:0px; height:330px; margin-top:40px; text-align:center; background:url(images/order-bg2.jpg) repeat-y #f7f7ef left top;}
.order_Div4 { border:1px solid #999999;width:414px; PADding:10px; text-align:center; background:url(images/serial.jpg) 10px 35px no-repeat; PADding-left:340px;}
.order_Div42 { border:1px solid #009900;width:414px; PADding:10px; text-align:center; background:url(images/serial.jpg) 10px 35px no-repeat; PADding-left:340px;}
#myform { padding: 1%; }
#myform div { margin-bottom: 0.5em; }
#myform span { color: #FF0000; font-weight: 700; }
#myform input { border: 1px solid #CCCCCC; padding: 0.2em; background-color: #F9FDFF; }
#myform textarea { border: 1px solid #CCCCCC; padding: 0.2em; background-color: #F9FDFF; }
#myform button { border: 1px solid; background-color: #3366CC; color: #FFFFEE; border-left-color: #6DBFFF; border-top-color: #6DBFFF; border-bottom-color: #0C3F67; border-right-color: #0C3F67; }
-->
</style>
</head>

<body>


<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="generate">
	<input type="hidden" name="action" value="submit">
<div id="body-min">
  <div style="PADding:0px 30px 0px 20px;">
  	<div style="background:url(images/security.gif) no-repeat; width:760px; margin:0 auto; height:90px; text-align:center;">
	
  	  <h1 style="text-align:center; font-size:32px; line-height:40px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#333333; PADding-bottom:13px;">在线找回您的 <font color=red>官方正版授权码</font></h1>
  	  <p style="text-align:center; font-size:18px; color:#999999;">ImapBox | ImageBox | ImovieBox | IbookBox | IurlBox</p>
  	</div>
    <div style="width:780px; margin:0 auto;">
      <div class="ClearAll"></div>
      <br />
      <div class="order_Div4" onmouseover="this.className='order_Div42'" onmouseout="this.className='order_Div4'">
        <p style="font-size:35px; font-weight:bold; PADding-top:15px; color:#333333;">正版授权码 <span style="font-size:14px; font-weight:bold; color:#ff0000; ">实时在线找回 </span></p>
        <p style="font-size:18px; PADding-top:12px; color:#999999;" align="left"> &nbsp;&nbsp;您支付后会得到一串激活码:  <a style="color:blue;text-decoration:underline;font-size:12px;" href="http://www.imapbox.com/index.php/2013/09/26/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E5%B7%B2%E8%B4%AD%E4%B9%B0%E7%9A%84%E6%BF%80%E6%B4%BB%E7%A0%81/" target="_blank">如何激活?</a> <a style="color:blue;text-decoration:underline;font-size:12px;" href="http://www.imapbox.com/index.php/2013/12/15/%E5%A6%82%E4%BD%95%E8%B4%AD%E4%B9%B0imapbox%E7%B3%BB%E5%88%97%E8%BD%AF%E4%BB%B6%E4%BA%A7%E5%93%81%E7%9A%84%E6%AD%A3%E7%89%88%E5%BA%8F%E5%88%97%E5%8F%B7/" target="_blank">软件激活图示</a> <a style="color:blue;text-decoration:underline;font-size:12px;"  href="http://www.imapbox.com//wp-content/plugins/alipay/includes/tpl.cart.php?proid=100" target="_blank">购买</a></p>
         <p style="font-size:12px; PADding-top:12px; color:#999999;" align="left"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;激活码样例: 8e4BOK1JRAo1EFmlBkFhAlGAlr5xJvfu </p>
         <br>
         <p style="font-size:14px; PADding-top:12px; color:#999999;" align="left"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;通过我的激活码找回 </p>
         <p style="font-size:30px; PADding-top:16px; PADding-bottom:10px; color:#FF6633; font-weight:bold;"><input style="height: 40px; text-indent: 10px; border: 3px solid #bbbbbb; background: #feffa0; line-height: 40px; width: 280px;" id="code" name="code" type="text" maxlength="40" value="输入您的32位激活码" onclick="if (value =='输入您的32位激活码'){value =''}" onblur="if (value ==''){value='输入您的32位激活码'}"/></p>
         <br>
         <p style="font-size:14px; PADding-top:12px; color:#999999;" align="left"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;或者 通过我原来绑定的邮箱找回 </p>
         <p style="font-size:30px; PADding-top:16px; PADding-bottom:10px; color:#FF6633; font-weight:bold;"><input style="height: 40px; text-indent: 10px; border: 3px solid #bbbbbb; background: #feffa0; line-height: 40px; width: 280px;" id="email" name="email" type="text" maxlength="40" value="填写您的邮箱帐号 ..." onclick="if (value =='填写您的邮箱帐号 ...'){value =''}" onblur="if (value ==''){value='填写您的邮箱帐号 ...'}"/></p>
        <br>
<p style="border-bottom:1px dashed #999999; PADding:5px;"></p>
        <p style="font-size:18px; PADding:6px; font-weight:bold; color:#FF6633;">确保您的激活码 或 邮箱正确无误</p>
        <p style="font-size:12px; color:#999999; PADding-bottom:10px;"><font color="#FF6633"><b>点击下面的按钮开始找回!</b></font></p>
        <br> 
        <p><a href="#"><input type="image" src="images/reget.jpg" width="246" height="70" border="0" onmouseover="this.src='images/reget_hover.jpg'" onmouseout="this.src='images/reget.jpg'"/></p>
        <br>
        <p style="font-size:12px; color:#999999; PADding-top:10px;">当您点击 "找回我的授权码" 按钮,您将在此页面看到您的正版授权码!</p>
        <br>
      </div>
      </div>
</div>
</form>
</body>
</html>
<?php
}
?>

<?php
function show_success($serial) {
?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="order.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.order_Div1 {width:230px; float:left; border:1px solid #999999; border-right:0px; height:330px; margin-top:40px; text-align:center; background:url(images/order-bg1.jpg) repeat-y #f7f7ef right top;}
.order_Div12 {width:230px; float:left; border:1px solid #009900; border-right:0px; height:330px; margin-top:40px; text-align:center; background:url(images/order-bg1.jpg) repeat-y #f7f7ef right top;}
.order_Div2 {width:300px; float:left; border:3px solid #CC9966; height:380px; text-align:center; background-color:#ffffff; font-family:Arial, Helvetica, sans-serif;}
.order_Div22 { width:300px; float:left; border:3px solid #009900; height:380px; text-align:center; background-color:#F4FFFF; font-family:Arial, Helvetica, sans-serif;}
.order_Div3 {width:230px; float:left; border:1px solid #999999; border-left:0px; height:330px; margin-top:40px; text-align:center; background:url(images/order-bg2.jpg) repeat-y #f7f7ef left top;}
.order_Div32 {width:230px; float:left; border:1px solid #009900; border-left:0px; height:330px; margin-top:40px; text-align:center; background:url(images/order-bg2.jpg) repeat-y #f7f7ef left top;}
.order_Div4 { border:1px solid #999999;width:414px; PADding:10px; text-align:center; background:url(images/serial.jpg) 10px 35px no-repeat; PADding-left:340px;}
.order_Div42 { border:1px solid #009900;width:414px; PADding:10px; text-align:center; background:url(images/serial.jpg) 10px 35px no-repeat; PADding-left:340px;}
#myform { padding: 1%; }
#myform div { margin-bottom: 0.5em; }
#myform span { color: #FF0000; font-weight: 700; }
#myform input { border: 1px solid #CCCCCC; padding: 0.2em; background-color: #F9FDFF; }
#myform textarea { border: 1px solid #CCCCCC; padding: 0.2em; background-color: #F9FDFF; }
#myform button { border: 1px solid; background-color: #3366CC; color: #FFFFEE; border-left-color: #6DBFFF; border-top-color: #6DBFFF; border-bottom-color: #0C3F67; border-right-color: #0C3F67; }
-->
</style>
</head>

<body>



	
<div id="body-min">
  <div style="PADding:0px 30px 0px 20px;">
  	<div style="background:url(images/security.gif) no-repeat; width:760px; margin:0 auto; height:90px; text-align:center;">
	
  	  <h1 style="text-align:center; font-size:32px; line-height:40px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#333333; PADding-bottom:13px;">您的 iMapBox <font color=red>产品授权码</font> 成功找到!</h1>
  	  <p style="text-align:center; font-size:18px; color:#999999;">授权码成功显示! 恭喜您! 请复制到本地并妥善保存!</p>
  	</div>
    <div style="width:780px; margin:0 auto;">
      <div class="ClearAll"></div>
      <br />
      <div class="order_Div4" onmouseover="this.className='order_Div42'" onmouseout="this.className='order_Div4'">
        <p style="font-size:35px; font-weight:bold; PADding-top:15px; color:#333333;">成功显示 <span style="font-size:14px; font-weight:bold; color:#99CC00; "> 请复制您的授权码. </span></p>
        <p style="font-size:18px; PADding-top:12px; color:#999999;" align="left"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;将下列授权码复制到您的软件中!</p>
         <p style="font-size:12px; PADding-top:12px; color:#999999;" align="left"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=red>授权码面板:</font></p>
         <p style="font-size:30px; PADding-top:16px; PADding-bottom:10px; color:#FF6633; font-weight:bold;"><textarea style="height: 240px; text-indent: 10px; border: 3px solid #bbbbbb; background: #feffa0; line-height: 20px; width: 340px;overflow:hidden" id="serial" name="serial" type="text" maxlength="400"/><?php echo $serial;?></textarea></></p>
        
        <br>
<p style="border-bottom:1px dashed #999999; PADding:5px;"></p>
        <p style="font-size:18px; PADding:6px; font-weight:bold; color:#FF6633;">授权码同时也会发送到您的邮箱中!</p>
        <p style="font-size:12px; color:#999999;"> 你也可以在邮箱中收取您的授权码！ </p>
         <p style="font-size:12px; color:#999999; PADding-bottom:10px;"><font color="#FF6633"><b>如果没有找到建议在邮箱垃圾箱中找到.</b></font></p>
         <br> 
           <br>
        <p style="font-size:12px; color:#999999; PADding-top:10px;">激活方法：打开您的软件，找到下方的菜单，点击“帮助” -> "注册激活..", 复制上方的授权码粘帖到软件中的授权码框. 点击“激活”按钮，完成激活!</p>
        <br>
        <p style="font-size:12px; color:#ff0000;text-decoration:underline; PADding-bottom:10px;"><font color="blue"><b><a href="mailto:admin@imapbox.com"><font color=red>有任何关于激活方面的问题，欢迎随时垂询 <br>给我们发送邮件,或加入官方QQ群：21638001，寻求帮助!</font></a></b></font></p>
      </div>

      </div>
    <div style="color: #666666; margin:0 auto; width:780px; margin-top:20px;">
			<p><strong>Note: </strong><br />
	  </p>
			<p>When you click &quot;<strong>Buy Now</strong>&quot;, you will be directed to Regnow who sells our products. After completing your payment you should click the &quot;<strong>Complete Secure Order</strong>&quot; to get your paid code.</p>
			<br />
			<p align="center"><span style="color: #666666"><a href="order.html#" target="_self"><img src="images/buy-now.gif" alt="payment methods" width="170" height="34" border="0"/></a></p>
			<br />
			<p align="center"><span style="color: #666666"><img src="images/cc.gif" alt="payment methods" width="419" height="28" /><br />
&nbsp; &nbsp;(We also accept Bravo, EuroCard, JCB, Novus, MasterDebit and VisaDebit)</span></p>
			<p style="border-bottom:1px dashed #CCCCCC; margin-top:20px; margin-bottom:20px;"></p>
			<p><img alt="encrypt" height="15" src="images/encrypt.gif" width="12" /> <strong>Your online order is 100% SAFE and SECURE!</strong><br />
			Regnow sells our products - they are a trusted online retailer specializing in digitally delivered products. All your information remains private and secure. We guarantee the safety and protection of your personal information.</p>
			<br />
			<p>
				<img alt="money back guarantee" height="15" src="images/guarantee.jpg" width="13" /><strong> Is my purchase guaranteed?</strong><br />
				A: Absolutely! All orders are backed by our unconditional 30-day money back guarantee.If you are unhappy with your purchase, for any reason, simply contact us via e-mail for a full refund.<br />
	  </p>
			<br />
			<p><strong>Order IMAPBOX now, completely Risk-Free!</strong></p>
			<br />
			<p>
				<img alt="privacy protected" height="44" src="images/privacy1.gif" width="154" />&nbsp;&nbsp; <img alt="secure order" height="31" src="images/secure.gif" width="88" /></p>
    </div>
    <br />
  </div>
</div>
</body>
</html>
<?php
}
?>