<?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="ui-bg-white">
	{include file="mobile/head.php"}
    
    {sdcms:rs top="1" table="sd_user left join sd_user_group on sd_user.uid=sd_user_group.gid" where="id=$userid"}
    <article class="user_center">
    	
        <div class="user_info">
            <div class="face"><img src="{if strlen($rs[uface])}{$rs[uface]}{else}{WEB_ROOT}upfile/noface.gif{/if}" class="dropzone" id="uface" config="uface" url="{U('face','','',1)}" maxsize="{sdcms[upload_image_max]}" title="修改头像"></div>
            <div class="info">
                <p><span>{get_user_info('uname')}</span>{$rs[gname]}</p>
            </div>
            <a href="{N('pay')}" class="ui-btn ui-btn-yellow ui-mb-20">在线充值</a>
        </div>
        
    </article>
    
    <div class="ui-mwidth wp">
        <div class="boxs ui-pl ui-pr">
        	{if C('bbs_open')==1}
        	<div class="ui-menu ui-menu-blue ui-mt">
            	<div class="ui-menu-name">我的社区</div>
            </div>
            <ul class="ui-list ui-mb">
                <li><a href="{U('home/bbs/mytopic','uid='.$userid.'')}"><span class="ui-icon-solution ui-mr ui-text-blue"></span>我的主题</a><span class="arrow"></span></li>
                <li><a href="{U('home/bbs/myreply','uid='.$userid.'')}"><span class="ui-icon-filedone ui-mr ui-text-blue"></span>我的帖子</a><span class="arrow"></span></li>
            </ul>
            {/if}
            <div class="ui-menu ui-menu-blue">
            	<div class="ui-menu-name">个人中心</div>
            </div>
            <ul class="ui-list ui-mb">
            	<li><a href="{N('mymoney')}"><span class="ui-icon-rmb ui-mr ui-text-blue"></span>账户余额</a><div class="list-right"><span class="ui-badge ui-badge-red">{$rs[umoney]}</span><span class="arrow"></span></div></li>
                <li><a href="{N('myorder')}"><span class="ui-icon-cart ui-mr ui-text-blue"></span>我的订单</a><span class="arrow"></span></li>
                <li><a href="{N('editemail')}"><span class="ui-icon-mail ui-mr ui-text-blue"></span>修改邮箱</a><span class="arrow"></span></li>
                <li><a href="{N('editpass')}"><span class="ui-icon-lock ui-mr ui-text-blue"></span>修改密码</a><span class="arrow"></span></li>
                {if !(isweixin() && C('api_wx_open')==1)}<li><a href="{N('out')}"><span class="ui-icon-logout ui-mr ui-text-blue"></span>退出登录</a><span class="arrow"></span></li>{/if}
            </ul>
        </div>
    </div>
	{/sdcms:rs}
    {include file="mobile/foot.php"}
    <script src="{WEB_ROOT}public/js/dropzone.js"></script>
    <script>
	$(".dropzone").dropzone(
	{
		params:{token:"{$token}"},
		maxFiles:1,
		success:function(file,data,that)
		{
			data=jQuery.parseJSON(data);
			this.removeFile(file);
			if(data.state=="success")
			{
				sdcms.success("上传成功");
				$(that).attr("src",data.msg);
				$("#face").attr("src",data.msg);
			}
			else
			{
				sdcms.error("上传失败："+data.msg);
			}
		},
		sending:function(file)
		{
			sdcms.loading("正在上传，请稍等");
		},
		totaluploadprogress:function(progress)
		{
			$.progress((Math.round(progress*100)/100)+"%");
		},
		queuecomplete:function(progress)
		{
			$.progress('close');
		},
		error:function(file,msg)
		{
			sdcms.error(msg);
		}
	});
	</script>

</body>
</html>