⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listuser.asp

📁 asp商城之王
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="session2.asp"-->
<html>
<head>
<title>查看用户信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
<script language=JavaScript>
<%dim sql,i,j
	set rs_s=server.createobject("adodb.recordset")
	sql="select * from sh_province 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 sh_city 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(province.value) {
				city.options.length=0;
				for(var i=0;i<selects[province.value].length;i++){
					city.add(selects[province.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 [sh_user] where userid="&userid ,conn,1,1%>
<form name="form1" method="post" action="saveuser.asp?action=save&id=<%=userid%>">
  <table cellpadding="3" cellspacing="1" border="0" width="100%" class="tableBorder" align=center>
    <tr align="center"> 
      <th class="tableHeaderText" colspan=4 height=25>用户详细资料</th>
    </tr>
    <tr> 
      <td width="20%" class="forumRowHighlight">用户名称:</td>
      <td width="15%" class="forumRowHighlight"><%=trim(rs("username"))%>     </td>
      <td class="forumRowHighlight" width="65%">用户类型 <select name="reglx">
          <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 期限 
        <input type="text" name="vipdate" size="10" value="<%=rs("vipdate")%>">
        2003-09-06</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">登陆密码:</td>
      <td class="forumRowHighlight" colspan="2"> <input name="userpassword" type="text" id="userpassword" size="12">
        不改密码请为空!</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">真实姓名:</td>
      <td class="forumRowHighlight" colspan="2"> <input name="userzhenshiname" type="text" id="userzhenshiname" size="12" value="<%=trim(rs("userzhenshiname"))%>"> 
      </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">电子邮件:</td>
      <td class="forumRowHighlight" colspan="2"> <input name="useremail" type="text" id="useremail" value="<%=trim(rs("useremail"))%>">
          
        <%if rs("ifgongkai")=1 then %>
        (公开邮箱地址) 
        <%else%>
        (不公开邮箱地址) 
        <%end if%> </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">密码提问:</td>
      <td class="forumRowHighlight" colspan="2"> <input name="quesion" type="text" id="quesion" value="<%=trim(rs("quesion"))%>"> 
      </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">密码答案:</td>
      <td class="forumRowHighlight" colspan="2"> <input name="answer" type="text" id="answer">
        不改密码答案请为空! </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">身份证号码:</td>
      <td class="forumRowHighlight" colspan="2"> <input name=sfz type=text value="<%=trim(rs("sfz"))%>" size="20" maxlength="18" onKeyPress="event.returnValue=IsDigit();"> 
      </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">性别:</td>
      <td class="forumRowHighlight" 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> 
      <td class="forumRowHighlight" width="20%">年龄:</td>
      <td class="forumRowHighlight" colspan="2"> <input name=nianling type=text value="<%=trim(rs("nianling"))%>" size="4" maxlength="2" onKeyPress="event.returnValue=IsDigit();"> 
      </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">所在省/市:</td>
      <td class="forumRowHighlight" colspan="2"> <select size="1" name="province" onChange=chsel()>
          <option value="xxx" selected>请选择省份……</option>
          <%dim tmpShengid
tmpShengid=0
set rs_s=server.createobject("adodb.recordset")
sql="select * from sh_province  order by shengorder"
rs_s.open sql,conn,1,1
while not rs_s.eof
     if rs("province")=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="city">
          <%
set rs_s=server.createobject("adodb.recordset")
sql="select * from sh_city 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("city")=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> 
      <td class="forumRowHighlight" width="20%">详细地址:</td>
      <td class="forumRowHighlight" colspan="2"> <input name="shouhuodizhi" type="text" id="shouhuodizhi" size="35" value="<%=trim(rs("shouhuodizhi"))%>"> 
      </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">邮编:</td>
      <td class="forumRowHighlight" colspan="2"> <input name="youbian" type="text" id="youbian" size="12" value="<%=rs("youbian")%>" maxlength=6 onKeyPress="event.returnValue=IsDigit();"> 
      </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">联系电话:</td>
      <td class="forumRowHighlight" colspan="2"> <input name="usertel" type="text" id="usertel" size="12" value="<%=trim(rs("usertel"))%>"> 
      </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">QQ:</td>
      <td class="forumRowHighlight" colspan="2"> <input name=QQ type=text value="<%=trim(rs("oicq"))%>" size="12" maxlength="12"> 
      </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">个人主页:</td>
      <td class="forumRowHighlight" colspan="2"> <input name=homepage type=text value="<%=trim(rs("homepage"))%>" size="35"> 
      </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">简介:</td>
      <td class="forumRowHighlight" colspan="2"> <textarea name="content"><%=trim(rs("content"))%></textarea> 
      </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">预存款:</td>
      <td class="forumRowHighlight" colspan="2"> <input name=yucun type=text value="<%=trim(rs("yucun"))%>" size="10" maxlength="8" onKeyPress="event.returnValue=IsDigit();"> 
      </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">积分:</td>
      <td class="forumRowHighlight" colspan="2"> <%=trim(rs("point"))%></td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">送货方式:</td>
      <td class="forumRowHighlight" colspan="2"> <%
	set rs_s=Server.createobject("adodb.recordset")
	rs_s.open "select * from sh_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> 
      <td class="forumRowHighlight" width="20%">支付方式:</td>
      <td class="forumRowHighlight" colspan="2"> <%
	set rs_s=Server.createobject("adodb.recordset")
	rs_s.open "select * from sh_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> 
      <td class="forumRowHighlight" width="20%">注册时间:</td>
      <td class="forumRowHighlight" colspan="2"><%=rs("adddate")%></td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">最后登陆:</td>
      <td class="forumRowHighlight" colspan="2"><%=rs("lastlogin")%></td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">登陆次数:</td>
      <td class="forumRowHighlight" colspan="2"><%=rs("logins")%>次</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%">已下订单数:</td>
      <td class="forumRowHighlight" colspan="2"> <%dim rs2
			set rs2=server.CreateObject("adodb.recordset")
			rs2.open "select distinct(dingdan) from sh_action where username='"&trim(rs("username"))&"' and zhuangtai<=5",conn,1,1
			response.write rs2.recordcount&"笔订单"
			rs2.close
			set rs2=nothing
			%> </td>
    </tr>
    <tr> 
      <td height="28" colspan="3" class="forumRowHighlight">查找此用户的所有定单: 
        <select name="zhuangtai" 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="editorderform.asp?zhuangtai=0&namekey=<%=trim(rs("username"))%>" >全部订单状态</option>
          <option value="editorderform.asp?zhuangtai=1&namekey=<%=trim(rs("username"))%>" >未作任何处理</option>
          <option value="editorderform.asp?zhuangtai=2&namekey=<%=trim(rs("username"))%>" >用户已经划出款</option>
          <option value="editorderform.asp?zhuangtai=3&namekey=<%=trim(rs("username"))%>" >服务商已经收到款</option>
          <option value="editorderform.asp?zhuangtai=4&namekey=<%=trim(rs("username"))%>" >服务商已经发货</option>
          <option value="editorderform.asp?zhuangtai=5&namekey=<%=trim(rs("username"))%>" >用户已经收到货</option>
        </select> </td>
    </tr>
    <%rs.close
			set rs=nothing
			conn.close
			set conn=nothing%>
    <tr> 
      <td height="28" colspan="3" bgcolor="#E8F1FF"> <div align="center"> 
          <input class=button type="submit" name="Submit" value="确认提交">
          &nbsp;&nbsp;&nbsp; 
          <input class=button type="button" name="Submit2" value="返回上一页" onClick='javascript:history.go(-1)'>
        </div></td>
    </tr>
  </table>
</form>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -