{:tpl member_head}
<div id="position">您现在的位置：<a href="{:Url::getUrl('member')}">会员中心</a>&gt;个人设置 - 个人头像</div>
<div id="main">
 <div class="left">
  <div class="avatar"><img src="{:Tag::avatar($member['userid'], 'b')}" width="180" height="180" /></div>
  <div class="username">{:$member['username']}</div>
  <ul class="sub_nav">
   <li><a href="{:Url::getUrl('member', 'profile')}">个人资料</a></li>
   <li class="active"><a href="{:Url::getUrl('member', 'avatar')}">个人头像</a></li>
   <li><a href="{:Url::getUrl('member', 'password')}">密码安全</a></li>
  </ul>
 </div>
 <div class="right">
  <h4 class="title">我的头像</h4>
  <div id="avatarContent"></div>
 </div>
 <div class="clear"></div>
</div>
<script type="text/javascript" src="../../statics/js/swfobject.js"></script>
<script type="text/javascript">
function uploadevent(status){
	status += '';
	switch(status){
		case '1':
			alert('恭喜，头像保存成功');
			break;
		case '-1':
			window.location.reload();
			break;
		case '-2':
			alert('抱歉，头像保存失败');
			break;
		default:
			alert(typeof(status) + ' ' + status);
	}
}
var flashvars = {
	"jsfunc":"uploadevent",
	"imgUrl":"{:Tag::avatar($member['userid'], 'b')}?s="+Math.random(),
	"uploadUrl":"../../api/avatar.php?action=upload",
	"uid":"{:$member['userid']}"
};
swfobject.embedSWF("../../statics/swf/avatar.swf", "avatarContent", "650", "460", "9.0.0", "expressInstall.swf", flashvars);
</script>
{:tpl member_foot}