<!--#include file="conn.asp"-->
<html>
<head>
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
end if
%>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css.css" rel="stylesheet" type="text/css">
<script language=JavaScript>
<%dim sql,i,j
	set rs_s=server.createobject("adodb.recordset")
	sql="select * From shop_szSheng order by shengorder"
	rs_s.open sql,conn,1,1
%>
	var selects=[];
	selects['xxx']=new Array(new Option('请选择城市……','xxx'));
<%
	for i=1 to rs_s.recordcount
%>
	selects['<%=rs_s("ShengNo")%>']=new Array(
<%
	set rs_s1=server.createobject("adodb.recordset")
	sql="select * From shop_szShi where shengid="&rs_s("id")&" order by shiorder"
	rs_s1.open sql,conn,1,1
	if rs_s1.recordcount>0 then 
		for j=1 to rs_s1.recordcount
		if j=rs_s1.recordcount then 
%>
		new Option('<%=trim(rs_s1("shiname"))%>','<%=trim(rs_s1("shiNo"))%>'));
<%		else
%>
		new Option('<%=trim(rs_s1("shiname"))%>','<%=trim(rs_s1("shiNo"))%>'),
<%
		end if
		rs_s1.movenext
		next
	else 
%>
		new Option('','0'));
<%
	end if
	rs_s1.close
	set rs_s1=nothing
	rs_s.movenext
	next
rs_s.close
set rs_s=nothing
%>
	function chsel(){
		with (document.form1){
			if(szSheng.value) {
				szShi.options.length=0;
				for(var i=0;i<selects[szSheng.value].length;i++){
					szShi.add(selects[szSheng.value][i]);
				}
			}
		}
	}

function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script>
</head>
<body>
<%dim userid
		userid=request.querystring("id")
		set rs=server.createobject("adodb.recordset")
		rs.open "select * from [shop_user] where userid="&userid ,conn,1,1%>
<table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
  <tr> 
    <td height="22" bgcolor="f1f1f1"> 
      <div align="center"><font color="#000000">用户详细资料</font></div>
    </td>
  </tr>
  <tr> 
    <td height="163" valign="top" bgcolor="#FFFFFF"> 
      <form name="form1" method="post" action="saveuser.asp?action=save&id=<%=userid%>">
        <br>
        <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
          <tr bgcolor="#FFFFFF"> 
            <td width="20%" style="PADDING-LEFT: 8px">用户名称：</td>
            <td width="15%" style="PADDING-LEFT: 8px"><font color=#FF0000><%=trim(rs("username"))%>　　　　 
              </font></td>
            <td style="PADDING-LEFT: 8px" width="65%"><font color=#FF0000>用户类型</font><font color=#FF0000> 
              <select name="reglx" class="wenbenkuang">
                <option value="1" <%if rs("reglx")=1 then%>selected<%end if%>>普通会员</option>
                <option value="2" <%if rs("reglx")=2 then%>selected<%end if%>>VIP 
                会员</option>
              </select>
              VIP 期限 </font> <input type="text" name="vipdate" size="10" value="<%=rs("vipdate")%>" class="wenbenkuang">
              2003-09-06</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">登录密码：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input name="userpassword" type="text" id="userpassword" size="12" class="wenbenkuang">
              不改密码请为空!</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">真实姓名：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input name="userzhenshiname" class="wenbenkuang" type="text" id="userzhenshiname" size="12" value="<%=trim(rs("userzhenshiname"))%>"> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">电子邮箱：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input name="useremail" type="text" class="wenbenkuang" id="useremail" value="<%=trim(rs("useremail"))%>">
              　 
              <%if rs("ifgongkai")=1 then %>
              (公开邮箱地址) 
              <%else%>
              (不公开邮箱地址) 
              <%end if%>
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">密码提问：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input name="quesion" type="text" class="wenbenkuang" id="quesion" value="<%=trim(rs("quesion"))%>"> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">密码答案：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input name="answer" type="text" class="wenbenkuang" id="answer">
              不改密码答案请为空! </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">身份证号码：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input name=sfz type=text class="wenbenkuang" value="<%=trim(rs("sfz"))%>" size="20" maxlength="18" onKeyPress="event.returnValue=IsDigit();"> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">性 别：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input type="radio" name="shousex" value="1" <%if rs("sex")=1 then%>checked<%end if%>>
              男　　 
              <input type="radio" name="shousex" value="2" <%if rs("sex")=2 then%>checked<%end if%>>
              女　　 
              <input type="radio" name="shousex" value="0" <%if rs("sex")=0 then%>checked<%end if%>>
              保密</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">年 龄：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input name=nianling type=text class="wenbenkuang" value="<%=trim(rs("nianling"))%>" size="4" maxlength="2" onKeyPress="event.returnValue=IsDigit();"> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">所在省/市：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <select size="1" class="wenbenkuang" name="szSheng" onChange=chsel()>
                <option value="xxx" selected>请选择省份……</option>
                <%dim tmpShengid
tmpShengid=0
set rs_s=server.createobject("adodb.recordset")
sql="select * From shop_szSheng  order by shengorder"
rs_s.open sql,conn,1,1
while not rs_s.eof
     if rs("szSheng")=rs_s("ShengNo") then
          tmpShengid=rs_s("id")
%>
                <option value="<%=rs_s("ShengNo")%>" selected ><%=trim(rs_s("ShengName"))%></option>
                <%
     else
%>
                <option value="<%=rs_s("ShengNo")%>" ><%=trim(rs_s("ShengName"))%></option>
                <%
     end if
    rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
              </select> <select size="1" name="szShi" class="wenbenkuang">
                <%
set rs_s=server.createobject("adodb.recordset")
sql="select * From shop_szShi where shengid="&tmpShengid&" order by shiorder"
rs_s.open sql,conn,1,1
while not rs_s.eof
%>
                <option value="<%=rs_s("ShiNo")%>" <%if rs("szShi")=rs_s("ShiNo") then%>selected<%end if%>><%=trim(rs_s("ShiName"))%></option>
                <%
    rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
              </select> </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">详细地址：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input name="shouhuodizhi" type="text" class="wenbenkuang" id="shouhuodizhi" size="35" value="<%=trim(rs("shouhuodizhi"))%>"> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">邮政编码：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input name="youbian" type="text" class="wenbenkuang" id="youbian" size="12" value="<%=rs("youbian")%>" maxlength=6 onKeyPress="event.returnValue=IsDigit();"> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">联系电话：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input name="usertel" type="text" class="wenbenkuang" id="usertel" size="12" value="<%=trim(rs("usertel"))%>"> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">在线QQ：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input name=QQ type=text class="wenbenkuang" value="<%=trim(rs("oicq"))%>" size="12" maxlength="12"> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">个人主页：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <input name=homepage class="wenbenkuang" type=text value="<%=trim(rs("homepage"))%>" size="35"> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">个人简介：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> <textarea name="content" cols="50" rows="5" class="wenbenkuang"><%=trim(rs("content"))%></textarea> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">预存款：</td>
            <td colspan="2" style="PADDING-LEFT: 8px"> <input name=yucun class="wenbenkuang" type=text value="<%=trim(rs("yucun"))%>" size="20" maxlength="8" onKeyPress="event.returnValue=IsDigit();"> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px">用户积分：</td>
            <td colspan="2" style="PADDING-LEFT: 8px"><input name=jifen type=text class="wenbenkuang" id="jifen" onKeyPress="event.returnValue=IsDigit();" value="<%=trim(rs("jifen"))%>" size="20" maxlength="8"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">送货方式：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> 
              <%
	set rs_s=Server.createobject("adodb.recordset")
	rs_s.open "select * from shop_songhuo where songid="&rs("songhuofangshi"),conn,1,1
	if rs_s.recordcount=0 then
	response.write "暂未选择"
	else
	response.write rs_s("subject")
	end if
	rs_s.close
	set rs_s=nothing
	%>
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">支付方式：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> 
              <%
	set rs_s=Server.createobject("adodb.recordset")
	rs_s.open "select * from shop_songhuo where songid="&rs("zhifufangshi"),conn,1,1
	if rs_s.recordcount=0 then
	response.write "暂未选择"
	else
	response.write rs_s("subject")
	end if
	rs_s.close
	set rs_s=nothing
	%>
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">注册时间：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"><%=rs("adddate")%></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">最后登录：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"><%=rs("lastlogin")%></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">登录次数：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"><%=rs("logins")%>次</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td style="PADDING-LEFT: 8px" width="20%">已下订单数：</td>
            <td style="PADDING-LEFT: 8px" colspan="2"> 
              <%dim rs2
			set rs2=server.CreateObject("adodb.recordset")
			rs2.open "select distinct(dingdan) from shop_action where username='"&trim(rs("username"))&"' and zhuangtai<=5",conn,1,1
			response.write rs2.recordcount&"笔订单"
			rs2.close
			set rs2=nothing
			%>
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="28" colspan="3" style="PADDING-LEFT: 8px">查找此用户的所有订单： 
              <select name="zhuangtai" class="wenbenkuang" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" ><base target=Right> 
                <option value="" selected>--选择查讯状态--</option>
                <option value="editdingdan.asp?zhuangtai=0&namekey=<%=trim(rs("username"))%>" >全部订单状态</option>
                <option value="editdingdan.asp?zhuangtai=1&namekey=<%=trim(rs("username"))%>" >未作任何处理</option>
                <option value="editdingdan.asp?zhuangtai=2&namekey=<%=trim(rs("username"))%>" >用户已经划出款</option>
                <option value="editdingdan.asp?zhuangtai=3&namekey=<%=trim(rs("username"))%>" >服务商已经收到款</option>
                <option value="editdingdan.asp?zhuangtai=4&namekey=<%=trim(rs("username"))%>" >服务商已经发货</option>
                <option value="editdingdan.asp?zhuangtai=5&namekey=<%=trim(rs("username"))%>" >用户已经收到货</option>
              </select> </td>
          </tr>
          <%rs.close
			set rs=nothing
			conn.close
			set conn=nothing%>
          <tr bgcolor="#FFFFFF"> 
            <td height="28" colspan="3"> <div align="center"> 
                <input type="submit" name="Submit" class="go-wenbenkuang" value="确认提交">
                &nbsp;&nbsp;&nbsp; 
                <input type="button" name="Submit2" class="go-wenbenkuang" value="返回上一页" onClick='javascript:history.go(-1)'>
              </div></td>
          </tr>
        </table>
      <br></form>
    </td>
  </tr>
</table>
<!--#include file="copyright.asp"-->

</body>
</html>
