<!--#include file="byshop_conn.asp"-->
<!--#include file="session.asp"-->
<html>
<%
Public Function FilterHtml(Str)
    If Trim(Str) = "" Or IsNull(Str) Then
        FilterHtml=""
    Else
    Str = Replace(Str, "&lt;p&gt;&lt;/p&gt;", "</p><p>" )
    Str = Replace(Str, "&lt;br&gt;" ,"<br>")
    FilterHtml = Str
    End If
End Function
%>
<link href="css/style.css" rel="stylesheet" type="text/css">
<body>
<%dim userid
		id=request.querystring("id")
		set rs=server.createobject("adodb.recordset")
		rs.open "select * from [byshop_user] where id="&id ,conn,1,1%>
		<form name="form1" method="post" action="saveuser.asp?action=save&id=<%=id%>">
  <div align="center">
  <table cellpadding="3" cellspacing="1" border="1" width="100%" class="tableBorder" style="border-collapse: collapse" bordercolor="#C0C0C0">
    <tr align="center"> 
      <th class="tableHeaderText" colspan=2 height=25 bgcolor="#E8F1FF">会员详细资料</th>
    </tr>
    <tr>
      <td width="100%" class="forumRowHighlight" colspan="2" bgcolor="#F7F7F7">
		<p align="right">　审核：</font><select name="reglx">
          <option value="1" <%if rs("reglx")=1 then%>selected<%end if%>>通过审核</option>
          <option value="0" <%if rs("reglx")=0 then%>selected<%end if%>>待审核</option>
           <option value="-1" <%if rs("reglx")=-1 then%>selected<%end if%>>未通过审核</option>
          </select></span>&nbsp; <span lang="zh-cn"> 
        </select></span></td>
    </tr>
    <tr>
      <td width="100%" class="forumRowHighlight" colspan="2" bgcolor="#F7F7F7">
		　</td>
    </tr>
    <tr>
      <td width="20%" class="forumRowHighlight" bgcolor="#F7F7F7">
		<p align="right">用 户 名：</td>
      <td width="80%" class="forumRowHighlight" bgcolor="#F7F7F7"><%=trim(rs("user"))%>　　　　 　</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 码：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7"> <input name="pass" type="text" id="password" size="30" maxlength=20>不改密码请为空! 
		4-20个字符内</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right"><span lang="zh-cn">电子邮箱</span>：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7">   
		<input name="email" type="text" maxlength=40 value="<%=trim(rs("email"))%>" size=30>40个字符内</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right">真实姓名：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7"> <input name="name" type="text" maxlength=10 value="<%=trim(rs("name"))%>" size=30>10个字符内</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		　</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7"> 　</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right">会员类型：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7">  
		<select id="Select10" name="usersort">
		
		<option value="2" <%if rs("usersort")=2 then%> selected <%end if%>>中介</option>
		<option value="3" <%if rs("usersort")=3 then%> selected <%end if%>>个人</option>
		</select></td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right">中介公司：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7">  
		<input name="company" type="text"   value="<%=trim(rs("company"))%>" size="30"  maxlength="40"></td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right">性&nbsp;&nbsp;&nbsp; 别：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7"> <input type="radio" name="sex" value="0" <%if rs("sex")=0 then%>checked<%end if%> class="input1">
        男　　 
        <input type="radio" name="sex" value="1" <%if rs("sex")=1 then%>checked<%end if%> class="input1">
        女　　 
        </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right"><span lang="zh-cn">公司地址</span>：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7"> 
		<input name=address type=text value="<%=trim(rs("address"))%>" size="30" maxlength="40">30个字符内</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right">电话号码：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7"> 
		<input name="tel" type="text"  maxlength=15  value="<%=trim(rs("tel"))%>" size=30>15个字符内</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right"><span lang="zh-cn">手机号码</span>：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7"> 
		<input name=mobile type=text value="<%=trim(rs("mobile"))%>"  maxlength="11" size=30>11个字符</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right"><span lang="zh-cn">传真号码</span>：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7">  
		<input name="fax" type="text" maxlength=15 value="<%=trim(rs("fax"))%>" size=30>15个字符内</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right">联系方式：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7">   
		<input class="input1" id="Contract_QQ" type="radio" <%if rs("contract")="qq" then%> CHECKED <%end if%> value="qq" name="Contract"><label for="Contract_QQ">QQ</label>
		<input class="input1" id="Contract_MSN" type="radio" <%if rs("contract")="msn" then%> CHECKED <%end if%> value="msn" name="Contract"><label for="Contract_MSN">MSN</label>
		<input class="wenbenkuang" maxLength="15" size="16" name="Contract2" value="<%=rs("Contract2")%>"></td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right"><span lang="zh-cn">公司网址</span>：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7">   
		<input name="web" type="text"  maxlength="30"  value="<%=trim(rs("web"))%>" size=30>30个字符内</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right"><span lang="zh-cn">主要业务</span>：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7"> 
		<input name=jyfw type=text value="<%=trim(rs("jyfw"))%>" size="30"  maxlength="60">60个字符内</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right">公司简介：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7">
		<textarea name="message" rows=7  cols=47><%=FilterHtml(rs("message"))%></textarea>500个字符内</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right">注册时间：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7"><%=rs("addtime")%></td>
    </tr>
    
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right">登陆次数：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7"><%=rs("logins")%>次　</td>
    </tr><tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right">最后登陆：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7"><%=rs("lastlogin")%></td>
    </tr>
    <tr> 
      <td class="forumRowHighlight" width="20%" bgcolor="#F7F7F7">
		<p align="right">登后登录<span lang="en-us">IP</span>：</td>
      <td class="forumRowHighlight" bgcolor="#F7F7F7"><%
IP=rs("lastip")
response.write ip&"-"
	Function cacuIp(ip)
	On Error Resume Next
Dim srIp, aIp
	srIp=0
	aIp = Split(ip,".")
If UBound(aIP)<>3 Then
cacuIP=0
	Exit Function
End If
	For i=0 To 3
	srIp=srIp+(CInt(aIP(i))*(256^(3-i)))
Next
	cacuIp=srIp-1
If Err Then cacuIp=0
End Function 

Set CONN2=Server.CreateObject("ADODB.Connection")
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("byshop.cn.ip.asp")
conn2.open connstr
iip=cacuIp(IP)
SQL = "SELECT bz,ct FROM byshop WHERE jiu1<=" & iip & " AND hu2>=" & iip
Set rs2 = CONN2.Execute ( SQL )
If rs2.Eof Then
	sPlace="查询错误！"
Else
	sPlace=rs2(0)&""&rs2(1)
End If
	Set rs2=Nothing
	Response.Write "[<font color=red>"&sPlace&"</font>]"
	    rs.close
			set rs=nothing
%></td>
    </tr>    <%

%>
    <tr> 
      <td height="28" colspan="2" class="forumRowHighlight" bgcolor="#F7F7F7">　</td>
    </tr>

    <tr> 
      <td height="28" colspan="2" class="forumRowHighlight"> <div align="center"> 
     <input type="submit" name="submit" value="确认提交">
          &nbsp;&nbsp;&nbsp; 
        
          <input  type="button" name="Submit2" value="返回上一页" onClick='javascript:history.go(-1)'> 
        
        </div></td>
    </tr>
  </table>
  </div>
  </form> 
  