
<style>
	html{height:100%;overflow-x: hidden; overflow-y: hidden;}
	body{margin 0;min-height: 100%;background-color: #F4F4F4;}
	.recharge-main{overflow: hidden;margin: 0px auto;}
	.recharge-main form{width: 100%; margin: 0px;}
	.recharge-input{width: 96%;height: 40px;font-size: 12px; float: right;}
	.recharge-main form p{width: 100%;font-size: 12px;margin-top: 12px;color: #979797;text-indent: 4%;}
	.recharge-main form input[type=button]{width: 92%;height: 35px;display: block; margin: 0px auto; font-size: 13px;border-radius: 3px;color: #fff;background-color: #78BD50;margin-top: 24px;}
	.recharge_form_inputbox{overflow:hidden;background-color:#fff;margin-top:8px; border-bottom:1px solid #ECECEC;}
		:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
    color: #ADADAD;  
}

::-moz-placeholder { /* Mozilla Firefox 19+ */
    color: #ADADAD;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: #ADADAD;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: #ADADAD;
}

</style>
<body>
	<div class="recharge-main">

		<form id="myForm" action="<?php echo empty($eid) ? MOCUZ_DIR.'/index.php' : site_url('/scorefront/goods/update_exchange/'.$eid);?>" method="<?php echo empty($eid) ? 'get' : 'post';?>">
			<input type="hidden" name="mod" value="score" >
			<input type="hidden" name="action" value="exchange" >
			<input type="hidden" name="gid" value="<?php echo $gid;?>" >
			<input type="hidden" name="auth" value="<?php echo $auth;?>" >
			<input type="hidden" name="eid" value="<?php echo $eid;?>" >
			<div class="recharge_form_inputbox">
				<input type="text" name="extra" class="recharge-input" placeholder="请输入代充账号" style="border-bottom:1px solid #ECECEC;">
				<input type="text" name="rextra" class="recharge-input" placeholder="请再次输入账号">
			</div>			
			<p>提示：请填写真实有效的信息，以便代充顺利到账</p>
			<input type="button" value="确定">
		</form>
	</div>
	<script>
	jQuery(document).ready(function($) {
		$("input[type=button]").on('click',function(event) {
			event.preventDefault();
			/* Act on the event */
			var extra = $("input[name=extra]").val();
			var rextra = $("input[name=rextra]").val();
			if(extra == '')
			{
				alert("请输入代充账号");
			}else if(extra != rextra)
			{
				alert("两次账号不一致");
			}else
			{
				<?php if(empty($eid)){ ?>
					var get_data = $('#myForm').serialize();
					$.get('<?php echo MOCUZ_DIR;?>/index.php',get_data,function(data){
						if(data.code == 1){
							window.location.href = '/mocuz/manage/index.php?/scorefront/goods/success/'+data.gid
						}
						if(data.code == 3){
							alert('<?php echo $score_name;?>不足')
						}
						if(data.code == 5)
						{
							alert('超过兑换次数');
						}
					},'json')
				<?php }else{?>
				$("#myForm").submit();
				<?php } ?>
			}
		});
	});
	</script>
</body>
</html>