<!--#include file="sd_mdb.asp"-->
<!--#include file="../sd_md5.asp"-->
<%
if session("User")="" then
	response.write"<SCRIPT language=JavaScript>alert('您尚未登录！');"
	response.write"location.href=""sd_admin_login.asp"";</SCRIPT>"
end if
%>
<%
	if request("act") = "save" then
		act=request.QueryString("act")
		userid=request.form("txt_user_id")
		name=request.form("txt_user_name")
		pass=request.form("txt_pass_word")
		points=request.form("txt_user_points")
		qq=request.form("txt_user_qq")
		email=request.form("txt_user_email")
		call addsave()
	ELSE
%>
<HTML>
<HEAD>
<TITLE>雨过天晴工作室 www.zzcodes.net</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<LINK href="images/Admin_css.css" type=text/css rel=stylesheet>
</HEAD>
<BODY>
<%
	userid=request("id")
	set rs=server.createobject("adodb.recordset")
	sql="select * from [sd_user] where sd_userid="&userid
	rs.open sql,conn,1,3
	if not (rs.bof or rs.eof) then
%>
<FORM name="form1" action="sd_user_edit.asp?act=save" method="post">
<table height="1" border="0" cellpadding="3"  cellspacing="1" bgcolor="#F2F9E8" class="admintable1">
  <tr>
    <td colspan="2" class="admintitle">修改会员信息</td>
  </tr>
  <tr>
    <td width="20%" height="30" align="right" bgcolor="#FFFFFF">会 员 名：</td>
    <td width="80%" bgcolor="#FFFFFF"><input name="txt_user_name" type="text" id="txt_user_name" size="25" value="<%=rs("sd_user")%>">&nbsp;唯一帐号，4位以上，推荐用Email地址。</td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">会员密码：</td>
    <td bgcolor="#FFFFFF"><input name="txt_pass_word" type="password" id="txt_pass_word" size="27">&nbsp;不修改请留空。</td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">金币：</td>
    <td bgcolor="#FFFFFF"><input name="txt_user_points" type="text" id="txt_user_points" value="<%=rs("sd_points")%>" onKeyUp="value=value.replace(/[^\d.]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))">&nbsp;必须为数字。</td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">腾讯QQ：</td>
    <td bgcolor="#FFFFFF"><input name="txt_user_qq" type="text" id="txt_user_qq" value="<%=rs("sd_qq")%>">&nbsp;真实QQ号，方便您与他人交换链接</td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">Email：</td>
    <td bgcolor="#FFFFFF"><input name="txt_user_email" type="text" id="txt_user_email" value="<%=rs("sd_email")%>">&nbsp;真实Email，方便您与他人交换链接</td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF"></td>
    <td bgcolor="#FFFFFF"><input name="txt_user_id" type="hidden" id="txt_user_id" size="25" value="<%=rs("sd_userid")%>"><input name="api_type" type="hidden" id="api_type" value="system_user" /><input type="submit" name="Submit" value="确认提交"></td>
  </tr>
</table>
</form>
<%
end if
end if%>
<%sub addsave()	
	set rs=server.createobject("adodb.recordset")
	sql="select * from [sd_user] where sd_userid="&userid
	rs.open sql,conn,1,3
	if not (rs.bof or rs.eof) then
		if trim(name)<>"" then
		rs("sd_User")=name
		end if
		if trim(pass)<>"" then
		rs("sd_Pass")=md5(pass)
		end if
		rs("sd_points")=points
		rs("sd_qq")=qq
		rs("sd_Email")=email
		rs.update
		rs.close
		set rs=nothing
		response.write"<SCRIPT language=JavaScript>alert('用户资料修改成功！');location='sd_index_users.asp';</SCRIPT>"
	else
		rs.close
		set rs=nothing
		response.write"<SCRIPT language=JavaScript>alert('该用户不存在！');javascript:history.back();</SCRIPT>"
	end if
end sub%>
<!--#include file="sd_copy.asp"-->
</BODY>
</HTML>