<?php if(!defined('IN_SDCMS')) exit;?>{include file="mobile/top.php"}
<title>修改邮箱_{sdcms[web_name]}</title>
<meta name="keywords" content="{sdcms[seo_key]}">
<meta name="description" content="{sdcms[seo_desc]}">
</head>

<body class="bg-white">
	{include file="mobile/head.php"}

    <article>
    	<div class="pl-15 pr-15">
            
            <div class="menu menu-blue mb-20 mt">
            	<div class="menu-name">修改邮箱</div>
            </div>
            {sdcms:rs top="1" table="sd_user left join sd_user_group on sd_user.uid=sd_user_group.gid" where="id=$userid"}
            <form method="post" class="ui-form">
                <div class="form-group">
                    <input type="text" name="email" class="form-ip" value="{$rs[uemail]}" placeholder="请输入邮箱" data-rule="邮箱:required;email;">
                </div>
                <div class="form-group">
                    <input type="submit" class="btn btn-blue btn-block btn-big" value="修改邮箱">
                </div>
            </form>
            {/sdcms:rs}
        </div>
        
    </article>
    {include file="mobile/foot.php"}
	<script>
	$(function()
	{
		$(".ui-form").form(
		{
			type:2,
			align:'bottom-center',
			result:function(form)
			{
				$.ajax(
				{
					type:'post',
					cache:false,
					dataType:'json',
					url:'{THIS_LOCAL}',
					data:$(form).serialize(),
					error:function(e){alert(e.responseText);},
					success:function(d)
					{
						if(d.state=='success')
						{
							sdcms.success(d.msg);
							setTimeout(function(){location.href='{THIS_LOCAL}';},1500);
						}
						else
						{
							sdcms.error(d.msg);
						}  
					}
				});
			}
		});
	})
	</script>
</body>
</html>