
<!--#include file="check.asp"-->
<%
dim action
Call hrPower(1.1,0)
action=request.QueryString("action")
Nowpage=cint(request.QueryString("page"))
search=request.QueryString("search")
hy=request.QueryString("hy")
id=cint(request.QueryString("id"))
upline=request.form("upline")


%>

<!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 http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>商户管理</title>
<link href="images/main.css" rel="stylesheet" type="text/css" media="all" />
</head>
<script src="images/city.js" type="text/javascript"></script>
<!--#include file="top.asp"-->

<div id="systime"><p id="servertime"></p></div>
<div id="mainBody" >

<div class="space">&nbsp;</div>
<div class="list">



          <%
		   select case action
           case "list"
		  %>

<script language="javascript">
try{
    var nav="H02";
    var subnav="L0201";
	
    document.getElementById(nav).className="current";
    document.getElementById(subnav).className="first current";
    document.getElementById(subnav).parentNode.parentNode.style.display="block";

}catch(e){
	document.getElementById("H02").className="current";
}
</script>


<table class="search_form">
<form action="?action=list" method="post">
<tr>
<td>
<input name="search" value="<%=search%>" id="query_string" type="text" size="15" class="inputw"  /><td  class="nowidthtd" style="padding-top:-1px" >

</td>
<td><select name="hy" id="hy">
<option value="0" selected="selected">普通商户</option>
<option value="1">高级商户</option>
<option value="2">黄金商户</option>	
<option value="3">白金商户</option>	
<option value="4">钻石商户</option>			 
</select></td>
<td>
<input type="submit" value="搜索" class="button" />
</td>


<td>
<input type="button" value="全部" class="button" onclick="location.href='?action=list'" />
</td>
<td>
<input type="button" value="已锁定商户" class="button" onclick="location.href='?action=check'" />
</td>
<td>
<input type="button" value="未审核商户" class="button" onclick="location.href='?action=novip'" />
</td>
<td align="right" width="100%"><b>用户[?]</b></td>
</tr></form></table>



<table class="listtable">
  <thead>
    <tr>
      <th scope="col" width="50">ID</th>
      <th scope="col">商户名</th>
	  <th scope="col">激活</th>
      <th scope="col" width="120"><div align="center">联系QQ</div></th>
      <th scope="col" width="100"><div align="center">级别</div></th>
	  <th scope="col" width="100"><div align="center">操作</div></th>     
    </tr>
  </thead>
  <tbody> 

           <%

		   searchstr=""
		   if search="" then search=request.form("search")

		   if search<>"" then searchstr="username like '%"&search&"%' or id like '%"&search&"%' or qq_msn like '%"&search&"%'"

		   if hy="" then hy=request.form("hy")
		   if hy<>"" then 
		   if not searchstr="" then searchstr=searchstr+" and "
		   searchstr=searchstr+"hy='"&hy&"'"
		   end if


		   if not searchstr="" then searchstr=" where "+searchstr	
		   'if searchstr="" then searchstr=" where state<>0"

		   set Rs=GrateRs("select * from member"&searchstr&"  order by vip desc,id desc",3)
		   Rs.PageSize=30
		   if not Rs.eof then 
		   If Nowpage=0 then Nowpage=1
		   Rs.AbsolutePage=Nowpage 
		   i=1
		   do while not Rs.eof and i<=Rs.pagesize
		   %>

<%if i mod 2 =0 then%>
         <tr class="listtr1" >
<%else%>
         <tr class="listtr2" >
<%end IF%>

		   
              <td><%=Rs("id")%></td>
              <td><%=Rs("username")%></td>
              <td><%
			  								if Rs("vip")=1 then 
												response.write("<font color=red>已经激活</font>")
											else
												response.write("没有激活")
											end if
										  %>
<%if Rs("state")=0 then%><font color=blue>(已锁定)</font><%end if%>

</td>
              <td>&nbsp;&nbsp;<%=Rs("qq_msn")%></td>
              <td><%select case Rs("hy")
			   case 0
			     response.write("普通会员")
			   case 1
  			     response.write("<font color=blue>高级会员</font>")
			   case 2
			     response.write("<font color=red>黄金商户</font>")
			   case 3
			     response.write("<font color=red>白金商户</font>")
			   case 4
			     response.write("<font color=red>钻石商户</font>")
			   case else
			     response.write("未知级别")
			   end select
			   %></td>
              <td><%=Rs("logdate")%> / <a href="siter.asp?action=show&id=<%=Rs("id")%>">详细</a> / <a href='javascript:if(confirm("确实要删除吗?"))location="siter.asp?action=del&id=<%=Rs("id")%>"'>删除</a> / <a href="send.asp?action=search&upline=<%=Rs("username")%>">定制详单</a> / <%if Rs("vip")=1 then%><a href='javascript:if(confirm("确实要取消吗?"))location="siter.asp?action=delvip&id=<%=Rs("id")%>"'>取消</a><%else%><a href='javascript:if(confirm("确实要激活吗?"))location="siter.asp?action=addvip&id=<%=Rs("id")%>"'>激活</a><%end if%> /  <%if Rs("state")=0 then%><a href='javascript:if(confirm("确实要解锁吗?"))location="siter.asp?action=checkreg&id=<%=Rs("id")%>"'>解锁</a><%else%><a href='javascript:if(confirm("确实要锁定吗?"))location="siter.asp?action=addsd&id=<%=Rs("id")%>"'>锁定</a></td><%end if%></td>
            </tr>
			<%
		   i=i+1
		   Rs.movenext
		   loop
		  %>
  
	    
         </tbody>
 <tfoot>

	   <tr class="listtr4">
      <th colspan="10" style=" text-align:right" scope="row"><div id="pagenav"></div></th>
      </tr>
 </tfoot>	
</table>


&nbsp;<strong>翻页: :</strong>
<%
  myurl="siter.asp?action=list&hy="&hy&"&search="&search&"&"
 response.write("共："&Rs.recordcount&"条记录，共:"&Rs.PageCount&"页,"&Rs.PageSize&"条/页,第"&NowPage&"页&nbsp;")
   response.write("<a href='"&myurl&"page=1'>"&"首页</a>&nbsp;")
  if NowPage>1 then response.write("<a href='"&myurl&"page="&Nowpage-1&"'>上一页</a>&nbsp;")
  if NowPage<Rs.PageCount then response.write("<a href='"&myurl&"page="&Nowpage+1&"'>下一页</a>&nbsp;")
  response.write("<a href='"&myurl&"page="&Rs.PageCount&"'>尾页</a>&nbsp;")
		%>&nbsp;

			  <%else%>
<tr onmouseover="this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='infobackground'" onmouseout="this.style.backgroundColor=this.oldcolor" style="color:#284775;background-color:White;">
              <td height="26" colspan="9">对不起,无记录!</td>
              </tr>
			  <%end if%>



<table  border="0" width="100%" cellspacing="0" cellpadding="0" class="infotable" id="returntop">
  <tr id="tr_returntop">
    <td class="2" align="right" width="100%"><a href="#top">返回顶部</a></td>
  </tr>
</table>

</div>
<br />
<br />




		  <%
		  case "check"
		  %>

<script language="javascript">
try{
    var nav="H02";
    var subnav="L0202";
	
    document.getElementById(nav).className="current";
    document.getElementById(subnav).className="first current";
    document.getElementById(subnav).parentNode.parentNode.style.display="block";

}catch(e){
	document.getElementById("H02").className="current";
}
</script>


<table class="listtable">
  <thead>
    <tr>
      <th scope="col" width="50">ID</th>
      <th scope="col">商户名</th>
	  <th scope="col">激活</th>
      <th scope="col" width="120"><div align="center">联系QQ</div></th>
      <th scope="col" width="100"><div align="center">级别</div></th>
	  <th scope="col" width="100"><div align="center">操作</div></th>     
    </tr>
  </thead>
  <tbody> 


           <%
		   set Rs=GrateRs("select * from member where state=0  order by id desc ",3)
		   Rs.PageSize=30
		   if not Rs.eof then 
		   If Nowpage=0 then Nowpage=1
		   Rs.AbsolutePage=Nowpage 
		   i=1
		   do while not Rs.eof and i<=Rs.pagesize
		   %>
<%if i mod 2 =0 then%>
         <tr class="listtr1" >
<%else%>
         <tr class="listtr2" >
<%end IF%>
              <td><%=Rs("id")%></td>
              <td><%=Rs("username")%></td>
              <td><%
			  								if Rs("vip")=1 then 
												response.write("<font color=red>已经激活</font>")
											else
												response.write("没有激活")
											end if
										  %></td>
              <td>&nbsp;&nbsp;<%=Rs("qq_msn")%></td>
              <td><%select case Rs("hy")
			   case 0
			     response.write("普通会员")
			   case 1
  			     response.write("<font color=blue>高级会员</font>")
			   case 2
			     response.write("<font color=red>黄金商户</font>")
			   case 3
			     response.write("<font color=red>白金商户</font>")
			   case 4
			     response.write("<font color=red>钻石商户</font>")
			   case else
			     response.write("未知级别")
			   end select
			   %></td>

              <td><a href="siter.asp?action=show&id=<%=Rs("id")%>">详细</a> / <a href='javascript:if(confirm("确实要删除吗?"))location="siter.asp?action=del&id=<%=Rs("id")%>"'>删除</a> / <a href="send.asp?action=search&upline=<%=Rs("username")%>">定制详单</a> / <a href='javascript:if(confirm("确实要解锁吗?"))location="siter.asp?action=checkreg&id=<%=Rs("id")%>"'>解锁</a> <%=Rs("logdate")%></td>

            </tr>
			<%
		   i=i+1
		   Rs.movenext
		   loop
		  %>
		   <%else%>
<tr onmouseover="this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='infobackground'" onmouseout="this.style.backgroundColor=this.oldcolor" style="color:#284775;background-color:White;">
              <td height="30" colspan="7">对不起,无数据!</td>
              </tr>
		<%
		  end if
		%>
<tr onmouseover="this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='infobackground'" onmouseout="this.style.backgroundColor=this.oldcolor" style="color:#284775;background-color:White;">
		      <td height="26" colspan="7">&nbsp;<strong>翻页: :</strong>
<%
  myurl="siter.asp?action=check&"
 response.write("共："&Rs.recordcount&"条记录，共:"&Rs.PageCount&"页,"&Rs.PageSize&"条/页,第"&NowPage&"页&nbsp;")
   response.write("<a href='"&myurl&"page=1'>"&"首页</a>&nbsp;")
  if NowPage>1 then response.write("<a href='"&myurl&"page="&Nowpage-1&"'>上一页</a>&nbsp;")
  if NowPage<Rs.PageCount then response.write("<a href='"&myurl&"page="&Nowpage+1&"'>下一页</a>&nbsp;")
  response.write("<a href='"&myurl&"page="&Rs.PageCount&"'>尾页</a>&nbsp;")
		%>&nbsp;</td>
		      </tr>
			 
          </table>
		  <%
		  case "novip"
		  %>

<script language="javascript">
try{
    var nav="H02";
    var subnav="L0203";
	
    document.getElementById(nav).className="current";
    document.getElementById(subnav).className="first current";
    document.getElementById(subnav).parentNode.parentNode.style.display="block";

}catch(e){
	document.getElementById("H02").className="current";
}
</script>


<table class="listtable">
  <thead>
    <tr>
      <th scope="col" width="50">ID</th>
      <th scope="col">商户名</th>
      <th scope="col" width="120"><div align="center">联系QQ</div></th>
	  <th scope="col" width="100"><div align="center">操作</div></th>     
    </tr>
  </thead>
  <tbody> 



           <%
		   set Rs=GrateRs("select * from member where vip=0  order by id desc",3)
		   Rs.PageSize=30
		   if not Rs.eof then 
		   If Nowpage=0 then Nowpage=1
		   Rs.AbsolutePage=Nowpage 
		   i=1
		   do while not Rs.eof and i<=Rs.pagesize
		   %>
<%if i mod 2 =0 then%>
         <tr class="listtr1" >
<%else%>
         <tr class="listtr2" >
<%end IF%>
              <td><%=Rs("id")%></td>
              <td><%=Rs("username")%></td>
              <td><%=Rs("qq_msn")%></td>
              <td><a href="siter.asp?action=show&id=<%=Rs("id")%>">详细</a> / <a href='javascript:if(confirm("确实要删除吗?"))location="siter.asp?action=del&id=<%=Rs("id")%>"'>删除</a> / <%if Rs("vip")=1 then%><a href="siter.asp?action=delvip&id=<%=Rs("id")%>">取消联盟</a><%else%><a href="siter.asp?action=addvip&id=<%=Rs("id")%>">激活</a><%end if%> / <a href="email.asp?email=<%=Rs("username")%>">重发激活邮件</a></td>
            </tr>
			<%
		   i=i+1
		   Rs.movenext
		   loop
		  %>
		   <%else%>
<tr onmouseover="this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='infobackground'" onmouseout="this.style.backgroundColor=this.oldcolor" style="color:#284775;background-color:White;">
              <td height="30" colspan="5">对不起,还没有未审核站长!</td>
              </tr>
		<%
		  end if
		%>
<tr onmouseover="this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='infobackground'" onmouseout="this.style.backgroundColor=this.oldcolor" style="color:#284775;background-color:White;">
		      <td height="26" colspan="5">&nbsp;<strong>翻页: :</strong>
<%
  myurl="siter.asp?action=novip&"
 response.write("共："&Rs.recordcount&"条记录，共:"&Rs.PageCount&"页,"&Rs.PageSize&"条/页,第"&NowPage&"页&nbsp;")
   response.write("<a href='"&myurl&"page=1'>"&"首页</a>&nbsp;")
  if NowPage>1 then response.write("<a href='"&myurl&"page="&Nowpage-1&"'>上一页</a>&nbsp;")
  if NowPage<Rs.PageCount then response.write("<a href='"&myurl&"page="&Nowpage+1&"'>下一页</a>&nbsp;")
  response.write("<a href='"&myurl&"page="&Rs.PageCount&"'>尾页</a>&nbsp;")
		%>&nbsp;</td>
		      </tr>
			 
          </table>
		  <%
		 case "show"
 			set Rs=GrateRs("select * from member where id="&id,1)
 			if not Rs.eof then 
			%>

<script language="javascript">
try{
    var nav="H02";
    var subnav="L0201";
	
    document.getElementById(nav).className="current";
    document.getElementById(subnav).className="first current";
    document.getElementById(subnav).parentNode.parentNode.style.display="block";

}catch(e){
	document.getElementById("H02").className="current";
}
</script>

<script   language="JavaScript">   
  function   ValidateInput()   
  {   
	if(confirm('确定操作吗...'))
	{
      document.form2.submit();   
      document.form2.Submit.disabled=true;   
	}
  }   
  </script>  




<form name="form2" method="post" action="siter.asp?action=up">
<table  border="0" cellspacing="0" cellpadding="0" class="titletable" >

  <tr class="ftitle">
    <td colspan="2" ><a href="#" name="pwd"></a>商户资料修改</td>    
  </tr>
  <tr ><td colspan="2" ><hr color="#B5CFD9" class="hr" /></td></tr>
</table>
<table  border="0" cellspacing="0" cellpadding="0" class="formtable" id="baseinfo1">



		  <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                商户ID
                                &nbsp;</td>
                            <td height="34" valign="middle" width="*" class="dotted">
                                <input name="id" type="text" value="<%=Rs("id")%>" maxlength="20" readonly="readonly" id="id" onkeypress="return false" style="color:Gray;background-color:White;width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                登录帐号
                                &nbsp;</td>
                            <td height="34" valign="middle" width="*" class="dotted">
                                <input name="username" type="text" value="<%=Rs("username")%>" maxlength="20" readonly="readonly" id="username" onkeypress="return false" style="color:Gray;background-color:White;width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                登录密码
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="passwd" type="text" maxlength="150" id="passwd" style="width:200px;" />密码由 6-20 个英文字母、数字或符号组成（如不需要更改新的密码，请保留）
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                真实姓名
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_full_name" value='<%=Rs("full_name")%>'>
		<input name="full_name" type="text" maxlength="150" id="full_name" value="<%=Rs("full_name")%>" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                电话号码
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_phone" value='<%=Rs("phone")%>'>
		<input name="phone" type="text" maxlength="150" id="phone" value="<%=Rs("phone")%>" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                手机号码
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_mobile" value='<%=Rs("mobile")%>'>
		<input name="mobile" type="text" maxlength="150" id="mobile" value="<%=Rs("mobile")%>" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                电子邮箱
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_email" value='<%=Rs("email")%>'>
		<input name="email" type="text" maxlength="150" id="email" value="<%=Rs("email")%>" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                网站名称
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_site_name" value='<%=Rs("site_name")%>'>
		<input name="site_name" type="text" maxlength="150" id="site_name" value="<%=Rs("site_name")%>" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                网站地址
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_site_url" value='<%=Rs("site_url")%>'>
		<input name="site_url" type="text" maxlength="150" id="site_url" value="<%=Rs("site_url")%>" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                QQ
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_qq_msn" value='<%=Rs("qq_msn")%>'>
		<input name="qq_msn" type="text" maxlength="150" id="qq_msn" value="<%=Rs("qq_msn")%>" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                开户名
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_payee" value='<%=Rs("payee")%>'>
		<input name="payee" type="text" maxlength="150" id="payee" value="<%=Rs("payee")%>" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                开户银行
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_bankname" value='<%=Rs("bankname")%>'>
		<input name="bankname" type="text" maxlength="150" id="bankname" value="<%=Rs("bankname")%>" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                开户银行所在省份
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="bank_prv" type="text" maxlength="150" id="bank_prv" value="<%=Rs("bank_prv")%>" style="width:200px;" />

                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                开户银行所在城市
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="bank_city" type="text" maxlength="150" id="bank_city" value="<%=Rs("bank_city")%>" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                银行帐号
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_bank_card" value='<%=Rs("bank_card")%>'>
		<input name="bank_card" type="text" maxlength="150" id="bank_card" value="<%=Rs("bank_card")%>" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                开户行支行名称
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_bank_address" value='<%=Rs("bank_address")%>'>
		<input name="bank_address" type="text" maxlength="150" id="bank_address" value="<%=Rs("bank_address")%>" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                全登录省份
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_diqu" value='<%=Rs("diqu")%>'>
		<input name="diqu" type="text" maxlength="150" id="diqu" value="<%=Rs("diqu")%>" style="width:200px;" />如省：山东，只允许填写一个省份 设置为0则不启用此功能
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                级别
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_hy" value='<%=Rs("hy")%>'>
<select size="1" name="hy">
<%select case Rs("hy")
			   case 0
			     response.write("<option selected value=""0"">普通会员</option><option value=""1"">高级会员</option><option value=""2"">黄金商户</option><option value=""3"">白金商户</option><option value=""4"">钻石商户</option></select>")
			   case 1
  			     response.write("<option value=""0"">普通会员</option><option selected value=""1"">高级会员</option><option value=""2"">黄金商户</option><option value=""3"">白金商户</option><option value=""4"">钻石商户</option></select>")
			   case 2
			     response.write("<option value=""0"">普通会员</option><option value=""1"">高级会员</option><option selected value=""2"">黄金商户</option><option value=""3"">白金商户</option><option value=""4"">钻石商户</option></select>")
			   case 3
			     response.write("<option value=""0"">普通会员</option><option value=""1"">高级会员</option><option value=""2"">黄金商户</option><option selected value=""3"">白金商户</option><option value=""4"">钻石商户</option></select>")
			   case 4
			     response.write("<option value=""0"">普通会员</option><option value=""1"">高级会员</option><option value=""2"">黄金商户</option><option value=""3"">白金商户</option><option selected value=""4"">钻石商户</option></select>")
			   case else
			     response.write("<option selected value=""0"">未知级别</option></select>")
			   end select
			   %>
                            </td>
                        </tr>

                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                短信扣量
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_dxk" value='<%=Rs("dxk")%>'>
		<input name="dxk" type="text" maxlength="150" id="dxk" value="<%=Rs("dxk")%>" readonly="readonly" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                卡类扣量
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_kak" value='<%=Rs("kak")%>'>
		<input name="kak" type="text" maxlength="150" id="kak" value="<%=Rs("kak")%>" readonly="readonly" style="width:200px;" />
                            </td>
                        </tr>

                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                安全码
                                &nbsp;</td>
                            <td height="34" valign="middle" width="*" class="dotted">
                                <input name="safepassword" type="text" value="<%=Rs("safepassword")%>" maxlength="20" readonly="readonly" id="safepassword" onkeypress="return false" style="color:Gray;background-color:White;width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                积分
                                &nbsp;</td>
                            <td height="34" valign="middle" width="*" class="dotted">
                                <input name="jifen" type="text" value="<%=Rs("jifen")%>" maxlength="20" readonly="readonly" id="jifen" onkeypress="return false" style="color:Gray;background-color:White;width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                余额
                                &nbsp;</td>
                            <td height="34" valign="middle" width="*" class="dotted">
                                <input name="money" type="text" value="<%=zero(formatnumber(Rs("moneyTotal")-Rs("removeMoney")))%>" maxlength="20" readonly="readonly" id="money" onkeypress="return false" style="color:Gray;background-color:White;width:100px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                推广
                                &nbsp;</td>
                            <td height="34" valign="middle" width="*" class="dotted">
                                <input name="tuiguang" type="text" value="<%=Rs("tuiguang")%>" maxlength="20" readonly="readonly" id="tuiguang" onkeypress="return false" style="color:Gray;background-color:White;width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                补充充值功能
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input type="hidden" name="old_bufa" value='<%=Rs("bufa")%>'>
<select size="1" name="bufa">
<%select case Rs("bufa")
			   case 0
			     response.write("<option selected value=""0"">关闭</option><option value=""1"">开启</option>></select>")
			   case 1
  			     response.write("<option value=""0"">关闭</option><option selected value=""1"">开启</option></select>")
			   case else
			     response.write("<option value=""0"">关闭</option><option value=""1"">开启</option></select>")
			   end select
			   %>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
                                <input type="button" name="Submit" onClick="JavaScript:ValidateInput();" value="提交修改" id="Submit" /></td>
                        </tr>
                    </table></form>

<table class="listtable">
  <thead>
    <tr>
      <th scope="col" width="50">ID</th>
      <th scope="col">帐号</th>
	  <th scope="col">登录时间</th>
            <th scope="col">登录IP</th>
	  <th scope="col" width="100"><div align="center">信息</div></th>     
    </tr>
  </thead>
  <tbody> 


          <%
		   set Rs=GrateRs("select top 10 * from login_log where username='"&Rs("username")&"' order by id desc",1)
		   Rs.PageSize=30
		   if not Rs.eof then 
		   If Nowpage=0 then Nowpage=1
		   Rs.AbsolutePage=Nowpage 
		   i=1
		   do while not Rs.eof and i<=Rs.pagesize
		   %>
<%if i mod 2 =0 then%>
         <tr class="listtr1" >
<%else%>
         <tr class="listtr2" >
<%end IF%>
                                            <td class="date"> <span class="large-orange"><%=rs("id")%></span></td>
                                            <td class="date"><%=rs("username")%></td>
                                            <td class="date"><%=rs("logdate")%></td>
                                            <td class="date"><%=rs("ip")%>(<%=showCountry(""&rs("ip")&"") %>)</td>
                                            <td class="date"><%=rs("Errstr")%></td>
            </tr>

          <%
		   i=i+1
		   Rs.movenext
		   loop
		   else
		   %>
<tr onmouseover="this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='infobackground'" onmouseout="this.style.backgroundColor=this.oldcolor" style="color:#284775;background-color:White;">
            <td height="20" colspan="6">无日志</td>
            </tr>
		   <%
		   end if
		  %>
              </tr>
          </table>

                </td>
            </tr>
        </table>


		  <%
			 end if
		  case "checkreg"
 			set Rs=GrateRs("select * from member where id="&id,3)
 			if not Rs.eof then 
 			  Rs("state")=1
 			  Rs.update
			 end if
			response.Write("<script>alert('该商户已经通过验证!');history.back();</script>")
		    response.end
		  case "addvip"
 			set Rs=GrateRs("select * from member where id="&id,3)
 			if not Rs.eof then 
 			  Rs("vip")=1
 			  Rs.update
			 end if
			response.Write("<script>alert('该商户已经激活!');history.back();</script>")
		    response.end
		  case "addsd"
 			set Rs=GrateRs("select * from member where id="&id,3)
 			if not Rs.eof then 
 			  Rs("state")=0
 			  Rs.update
			 end if
			response.Write("<script>alert('该商户已经锁定!');history.back();</script>")
		    response.end
		  case "delvip"
 			set Rs=GrateRs("select * from member where id="&id,3)
 			if not Rs.eof then 
 			  Rs("vip")=0
 			  Rs.update
			 end if
			response.Write("<script>alert('该商户已经取消激活!');history.back();</script>")
		    response.end

		 
		  case "del"
 			set Rs=GrateRs("select * from member where id="&id,3)
 			if not Rs.eof then 

	set rsw = GrateRs("select * from L_fenzu where userid="& Cint(ID) &" ",3)
	do while not rsw.eof

	set rss = GrateRs("select * from L_woool where userid="& Cint(ID) &" ",3)
	do while not rss.eof


	set rsq = GrateRs("select * from L_jiangli where userid="& rs("ID") &" ",3)
	do while not rsq.eof

	rsq.delete
	rsq.update
		rsq.movenext
	Loop
	rsq.close
	set rsq = nothing


	rss.delete
	rss.update
		rss.movenext
	Loop
	rss.close
	set rss = nothing

	rsw.delete
	rsw.update
		rsw.movenext
	Loop
	rsw.close
	set rsw = nothing


 			  Rs.delete
 			  Rs.update
			 end if
			response.Write("<script>alert('该商户已经被删除!');history.back();</script>")
		    response.end
			case "up"
			set Rs=GrateRs("select * from member where id="&request("id"),3)
 			if not Rs.eof then 
			if not request.form("passwd")="" then Rs("passwd")=md5(trim(request("passwd")))		
			rs("full_name")=trim(request("full_name"))
			rs("phone")=trim(request("phone"))
			rs("mobile")=trim(request("mobile"))
			rs("email")=trim(request("email"))
			rs("site_name")=trim(request("site_name"))
			rs("site_url")=trim(request("site_url"))
			rs("qq_msn")=trim(request("qq_msn"))
			rs("bank_user")=trim(request("bank_user"))
			rs("bank_prv")=trim(request("provinceCode"))
			rs("bank_city")=trim(request("cityCode"))
			rs("bankname")=trim(request("bankname"))
			rs("postcode")=trim(request("postcode"))
			rs("payee")=trim(request("payee"))
			rs("bank_card")=trim(request("bank_card"))
			rs("bank_address")=trim(request("bank_address"))
			rs("diqu")=trim(request("diqu"))
			rs("hy")=trim(request("hy"))
			rs("dxk")=trim(request("dxk"))
			rs("kak")=trim(request("kak"))
			rs("reportaddress")=trim(request("reportaddress"))
			rs("bufa")=trim(request("bufa"))
			rs.update


	'//修改记录信息//////////////////////////////////////////////////////////////////////////////////////
	log_Txt=""
	id = Request("id")
	if not request.form("passwd")="" Then log_Txt=log_Txt&"商户ID:"&id&"的的密码：对密码进行了修改;"
	If (Request("old_full_name")<>Request("full_name")) Then log_Txt=log_Txt&"商户ID"&id&"的真实姓名:由"&Request("old_full_name")&"修改为"&Request("full_name")&";"
	If (Request("old_phone")<>Request("phone")) Then log_Txt=log_Txt&"商户ID"&id&"的电话号码:由"&Request("old_phone")&"修改为"&Request("phone")&";"
	If (Request("old_mobile")<>Request("mobile")) Then log_Txt=log_Txt&"商户ID"&id&"的手机号码:由"&Request("old_mobile")&"修改为"&Request("mobile")&";"
	If (Request("old_email")<>Request("email")) Then log_Txt=log_Txt&"商户ID"&id&"的电子邮箱:由"&Request("old_email")&"修改为"&Request("email")&";"
	If (Request("old_site_name")<>Request("site_name")) Then log_Txt=log_Txt&"商户ID"&id&"的网站名称:由"&Request("old_site_name")&"修改为"&Request("site_name")&";"
	If (Request("old_site_url")<>Request("site_url")) Then log_Txt=log_Txt&"商户ID"&id&"的网站地址:由"&Request("old_site_url")&"修改为"&Request("site_url")&";"
	If (Request("old_qq_msn")<>Request("qq_msn")) Then log_Txt=log_Txt&"商户ID"&id&"的QQ:由"&Request("old_qq_msn")&"修改为"&Request("qq_msn")&";"
	If (Request("old_payee")<>Request("payee")) Then log_Txt=log_Txt&"商户ID"&id&"的开户名:由"&Request("old_payee")&"修改为"&Request("payee")&";"
	If (Request("old_bankname")<>Request("bankname")) Then log_Txt=log_Txt&"商户ID"&id&"的开户银行:由"&Request("old_bankname")&"修改为"&Request("bankname")&";"
	If (Request("old_bank_card")<>Request("bank_card")) Then log_Txt=log_Txt&"商户ID"&id&"的银行帐号:对卡号进行了修改;"
	If (Request("old_bank_address")<>Request("bank_address")) Then log_Txt=log_Txt&"商户ID"&id&"的开户行支行名称:由"&Request("old_bank_address")&"修改为"&Request("bank_address")&";"
	If (Request("old_diqu")<>Request("diqu")) Then log_Txt=log_Txt&"商户ID"&id&"的全登录省份:由"&Request("old_diqu")&"修改为"&Request("diqu")&";"
	If (Request("old_hy")<>Request("hy")) Then log_Txt=log_Txt&"商户ID"&id&"的级别:由"&Request("old_hy")&"修改为"&Request("hy")&";"
	If (Request("old_dxk")<>Request("dxk")) Then log_Txt=log_Txt&"商户ID"&id&"的短信扣量:由"&Request("old_dxk")&"修改为"&Request("dxk")&";"
	If (Request("old_kak")<>Request("kak")) Then log_Txt=log_Txt&"商户ID"&id&"的卡类扣量:由"&Request("old_kak")&"修改为"&Request("kak")&";"
	If (Request("old_bufa")<>Request("bufa")) Then log_Txt=log_Txt&"商户ID"&id&"的补充充值功能:由"&Request("old_bufa")&"修改为"&Request("bufa")&";"
	If (log_Txt="") Then log_Txt="没有进行信息修改。"
	'//END修改记录信息////////////////////////////////////////////////////////////////////////////////////
	
	
	Call WriteLog(""&log_Txt&"",2)


			response.Write("<script>alert('资料修改成功!');window.location.href='"&Request.ServerVariables("HTTP_REFERER")&"';</script>")
			end if
		  end select
		  %>
       </td>
      </tr>
	  

    </table></td>
  </tr>
</table>
</body>
</html>
<%
call DBConnEnd
%>
