<%@ page language="C#" autoeventwireup="true" inherits="wap_user_user, kfenlei" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Cache-control" content="no-cache" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<title><%=sWebName %> - 个人资料</title>
<link rel="stylesheet" href="css.css" type="text/css" />
</head>
<body>
<%=qTemplate.Ac("wapUserTop.html") %>
<script type="text/javascript" src="/js/jquery.form.js"></script>
<div align="left">
<div class="wapPageTitle"><a href="/wap/user/" class="infoback">返回</a>个人资料</div>
<div class="clear10"></div>
<div class="infowrap">
<div class="userRightContent">
<form action="/inc/kfUpload.aspx?s=nowatermark" style="display:none;" id="upFileForm" name="upFileForm" method="post" enctype="multipart/form-data">
<input type="file" id="upFile" name="upFile" />
<input type="submit" value="上传">
</form>
<form action="action.aspx?s=editUser" onSubmit="return valiForm()" method="post" name="userMessEdit">
<input value="<%=pic1%>" name="pic" id="pic" type="hidden" />
<div class="postForm">
<div class="pfInput">
<div class="label">头像：</div>
<div class="inputDiv2"><img src="" id="imgpic" width="100" height="100" class="fl5" onClick="$('#upFile').click();" /><a href="#nogo" id="wapUploadBtn" class="btn_upfile fl5">上传</a></div>
<div class="clear"></div>
</div>
<div class="pfInput">
<div class="label">姓名：</div>
<div class="inputDiv"><input name="name" value="<%=name%>" type="text" class="textInput" size="25" /></div>
<div class="exDiv" id="exName"></div>
<div class="clear"></div>
</div>
<div class="pfInput">
<div class="label">电话：</div>
<div class="inputDiv"><input name="tel" value="<%=tel%>" type="text" class="textInput" size="25" /></div>
<div class="exDiv" id="exTel"></div>
<div class="clear"></div>
</div>
<div class="pfInput">
<div class="label">ＱＱ：</div>
<div class="inputDiv"><input name="qq" value="<%=qq%>" type="text" class="textInput" size="25" /></div>
<div class="exDiv" id="exQq"></div>
<div class="clear"></div>
</div>
<div class="pfInput">
<div class="label">微信：</div>
<div class="inputDiv"><input name="wx" value="<%=wx%>" type="text" class="textInput" size="25" /></div>
<div class="exDiv" id="exWx"></div>
<div class="clear"></div>
</div>
<div class="pfInput">
<div class="label">邮箱：</div>
<div class="inputDiv"><input name="email" value="<%=email%>" type="text" <%if(email!=""){%>disabled="disabled"<%}%> class="textInput" size="25" /></div>
<div class="inputDiv2"><div class="inputPs1">用于找回密码和接收系统信息，提交后不可修改！</div></div>
<div class="exDiv" id="exEmail"></div>
<div class="clear"></div>
</div>
</div>
<div class="pfInput">
<div class="label">个人说明：</div>
<div class="inputDiv"><textarea class="postTextarea" name="about" rows="6" cols="30"><%=about%></textarea></div>
<div class="exDiv" id="exAbout"></div>
<div class="clear"></div>
</div>
<div class="clear10"></div>
<div align="center"><input type="submit" class="postSubmit" value="修改资料" /></div>
</form>
<script language="javascript" type="text/javascript">
$("#wapUploadBtn").click(function(){
	$("#upFile").click();
});
$('#upFile').change(function(){
$("#imgpic").attr('src',"/images/wait.gif");
$("#upFileForm").ajaxSubmit(
{
	url:"/inc/kfUpload.aspx",type:"POST",
	success:function(response)
	{
		var data=eval("("+response+")");
		if(data.status=="1")
		{ 
			valiUpPic('pic','imgpic',data.pic);
		}
		else
		{
			valiUpPic('pic','imgpic',data.pic);
  			alert(data.ps);
		}
  	},
 	error:function(msg)
	{
	}
});
$('#upFile').val('');
});

function valiUpPic(picInputId,picId,picValue)
{
	if(picValue!="")
	{
		if($("#"+picInputId)!=null)
		{
  			$("#"+picInputId).val(picValue);
		}
	}
	if($("#"+picId)!=null)
	{
		if($("#"+picInputId).val()!="")
		{
		    if(picValue.toLowerCase().indexOf("http://")==-1)
		    {
			   	$("#"+picId).attr('src',"/"+$("#"+picInputId).val());
		    }
		    else
		    {
				$("#"+picId).attr('src',$("#"+picInputId).val());
			}
		}
		else
		{
			$("#"+picId).attr('src','/user/images/nophoto.png');
		}
	}
  }
  valiUpPic('pic','imgpic','<%=pic1%>');
  function valiForm()
  {
    return true
  }
</script>
</div>
</div>
</div>
<div class="clear80"></div>
</body>
</html>
