<!--#include file="../utf-8.asp" -->
<!--#include file="../js/Function.asp" -->
<!--#include file="../../inc/MD5.asp" -->
<!--#include file="../CheckAdmin.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META NAME="copyright" CONTENT="Copyright 2010-2012 - yidacms.com" />
<META NAME="Author" CONTENT="世纪伟成  yidacms.com" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../js/admin.css" rel="stylesheet" type="text/css">
<title>会员列表！</title>
</head>
<body>
<%
'版权：世纪伟成(http://yidacms.com)
'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
'如果您删除了这里的版权信息,将追究法律责任.

		set rs = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_user WHERE id= "&request("id")&""
		rs.open sql,dbok,1,1
%>

<table width="98%" height="205" border="0" cellpadding="10" cellspacing="0" bordercolor="#666666" style="border-collapse:collapse" align="center">
 <form id="form1" name="form1" method="post" action="admin_useredit.asp?yidacms=useredit&id=<%=rs("id")%>">
  <tr>
    <td></td>
    <td><input type=button onclick="window.location.href('admin_userlist.asp')"value="返 回" class="inanniu"></td>
  </tr>
  <tr>
    <td><div align="right">控制会员：</div></td>
    <td><input type="radio" name="shuaiweb_usercontrol" value="0" <%if rs("shuaiweb_usercontrol")="0" then response.write "checked" end if %> />
				正常
				  <input type="radio" name="shuaiweb_usercontrol" value="1" <%if rs("shuaiweb_usercontrol")="1" then response.write "checked" end if %>/>
			  锁定</td>
  </tr>
  <tr>
    <td><div align="right">E-mail账户：</div></td>
    <td><%=rs("shuaiweb_useremail")%></td>
  </tr>
  <tr>
    <td><div align="right">密码：</div></td>
    <td><input name="shuaiweb_userpass" type="password" id="shuaiweb_userpass" class="win"/>(不想修改密码则留空)</td>
  </tr>
  <tr>
    <td><div align="right">确认密码：</div></td>
    <td><input name="shuaiweb_userpass2" type="password" id="shuaiweb_userpass2" class="win" />(不想修改密码则留空)</td>
  </tr>
  <tr>
    <td><div align="right">姓名：</div></td>
    <td><input name="shuaiweb_username" type="text" id="shuaiweb_username" value="<%=rs("shuaiweb_username")%>" class="win"/></td>
  </tr>
  <tr>
    <td><div align="right">头像：</div></td>
    <td>
<select name="shuaiweb_userportrait" id="shuaiweb_userportrait" onchange="document.images['touxiang'].src=options[selectedIndex].value;" class="winla" >
<%For i=1 To 11%>
<option value=<%=sw_dizhi%>template/user/images/u<%=i%>.gif><%=i%></option>
<%Next%>
</select>
<img src="<%=rs("shuaiweb_userportrait")%>" id="touxiang">
</td>
  </tr>
  <tr>
    <td><div align="right">证件号码：</div></td>
    <td><input name="shuaiweb_usernumber" type="text" id="shuaiweb_usernumber" value="<%=rs("shuaiweb_usernumber")%>" class="win"/></td>
  </tr>
  <tr>
    <td><div align="right">电话：</div></td>
    <td><input name="shuaiweb_usertel" type="text" id="shuaiweb_usertel" value="<%=rs("shuaiweb_usertel")%>" class="win"/></td>
  </tr>
  <tr>
    <td><div align="right">QQ：</div></td>
    <td><input name="shuaiweb_userqq" type="text" id="shuaiweb_userqq" value="<%=rs("shuaiweb_userqq")%>" class="win"/></td>
  </tr>
  <tr>
    <td><div align="right">MSN：</div></td>
    <td><input name="shuaiweb_usermsn" type="text" id="shuaiweb_usermsn" value="<%=rs("shuaiweb_usermsn")%>" class="win"/></td>
  </tr>
  <tr>
    <td><div align="right">地址：</div></td>
    <td><input name="shuaiweb_useraddress" type="text" id="shuaiweb_useraddress" value="<%=rs("shuaiweb_useraddress")%>" class="win"/></td>
  </tr>
  <tr>
    <td><div align="right">签名：</div></td>
    <td><textarea name="shuaiweb_usernote" rows="5" id="shuaiweb_usernote" class="wtextarea"><%=rs("shuaiweb_usernote")%></textarea></td>
  </tr>
  <tr>
    <td><input type="hidden" name="shuaiweb_useremail" value="<%=rs("shuaiweb_useremail")%>" />
    </td>
    <td>                                            <input type="submit" name="Submit" value="提交"  class="inanniu" />
                                            <input type="reset" name="Submit2" value="重置"  class="inanniu" /> <input type=button onclick="window.location.href('admin_userlist.asp')"value="返 回" class="inanniu"></td>
  </tr>
</form>
</table>
<%
        if request("yidacms")="useredit" Then
		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_user WHERE id= "&request("id")&""  
		rs.open sql,dbok,1,1
			if Request.Form("shuaiweb_userpass")<>Request.Form("shuaiweb_userpass2") then 
				response.write "<script language=javascript> alert('两次输入的密码不一样！');history.go(-1);</script>"
				response.end
			end if
			if Request.Form("shuaiweb_username")="" then 
				response.write "<script language=javascript> alert('姓名不能为空！');history.go(-1);</script>"
				response.end
			end if
		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_user WHERE id= "&request("id")&""
		rs.open sql,dbok,1,3
		rs("shuaiweb_useremail")=trim(request.form("shuaiweb_useremail"))
			if Request.Form("shuaiweb_userpass")="" then
				rs("shuaiweb_userpass")=rs("shuaiweb_userpass")
					else
				rs("shuaiweb_userpass")=left(MD5(trim(request.form("shuaiweb_userpass"))),10)
			end if
			rs("shuaiweb_username")=trim(request.form("shuaiweb_username"))
			rs("shuaiweb_usertel")=trim(request.form("shuaiweb_usertel"))
			rs("shuaiweb_userqq")=trim(request.form("shuaiweb_userqq"))
			rs("shuaiweb_usermsn")=trim(request.form("shuaiweb_usermsn"))
			rs("shuaiweb_useraddress")=trim(request.form("shuaiweb_useraddress"))
			rs("shuaiweb_userportrait")=trim(request.form("shuaiweb_userportrait"))
			rs("shuaiweb_usernote")=trim(request.form("shuaiweb_usernote"))
			rs("shuaiweb_usernumber")=trim(request.form("shuaiweb_usernumber"))
			rs("shuaiweb_usercontrol")=trim(request.form("shuaiweb_usercontrol"))
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=javascript> alert('修改成功！');location.replace('admin_userList.asp');</script>"
        End If
%>
</body>
</html>
