<%
'乘风多用户计数器 Sql版
'作者QQ：178575
'作者EMail：yliangcf@163.com
'作者网站：http://www.qqcf.com
'详细简介：http://www.qqcf.com/cfcount.htm
'上面有程序在线演示，安装演示，使用疑难解答，最新版本下载等内容
'因为这些内容可能时常更新，就没有放在程序里，请自己上网站上查看
'有完整版本的演示
%>
<SCRIPT>
function ashow_1(){
a_1.style.display = "";
a_2.style.display = "";
}
function ashow_2(){
a_1.style.display = "none";
a_2.style.display = "none";
}

function bshow_1(){
b_1.style.display = "";
}
function bshow_2(){
b_1.style.display = "none";
}
</script>
<%

UserName=ChkStr(Request("UserName"),1)

Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select * From CFCount_User Where UserName='"&UserName&"'"
Rs.Open Sql,Conn,1,1

 If Rs("ParentName")="" Then  
  If Rs("VipState")=-1 Then
   show="ashow_1();"
  ElseIf  Rs("VipState")=0 Then
   show="ashow_2();"
  End If

 End If
%>     
          

  <form name="form2" method="post" action="AdminUser.aspx?Action=usermodifysave&UserName=<%=UserName%>&ParentName=<%=Rs("ParentName")%>&RefUrl=<%=Server.URLEncode(Request.ServerVariables("Http_Referer"))%>">
<table class="tb_1"><tr class="tr_1"> 
      <td colspan="2">修改资料 </td>
    </tr>
    <tr> 
      <td>用户名：</td>
      <td><%=Rs("UserName")%></td>
    </tr>
    <tr> 
      <td>账号状态：</td>
      <td><input type="radio" name="UserState" value="-1"<%If Rs("UserState")=-1 Then Response.write " checked"%>>
        有效 
        <input type="radio" name="UserState" value="0"<%If Rs("UserState")=0 Then Response.write " checked"%>>
        无效</td>
    </tr>
    <%If RsSet("UserUseDayState")=-1 Then%>
    <tr> 
      <td>账号到期：</td>
      <td><input name="EndDate" type="text" value="<%=Rs("EndDate")%>"></td>
    </tr>
    <%End If%>
    <%If Rs("ParentName")="" Then'为父账号时出现VIP状态%>
        <tr>
      <td>点卡折扣价：</td>
      <td>
<select name="AgentLevel">	 
<option value="100"<%If Rs("AgentLevel")=100 Then Response.write " selected"%>>不打折</option> 
<option value="90"<%If Rs("AgentLevel")=90 Then Response.write " selected"%>>9折</option>
<option value="80"<%If Rs("AgentLevel")=80 Then Response.write " selected"%>>8折</option>
<option value="70"<%If Rs("AgentLevel")=70 Then Response.write " selected"%>>7折</option>
<option value="60"<%If Rs("AgentLevel")=60 Then Response.write " selected"%>>6折</option>
<option value="50"<%If Rs("AgentLevel")=50 Then Response.write " selected"%>>5折</option>
<option value="40"<%If Rs("AgentLevel")=40 Then Response.write " selected"%>>4折</option>
<option value="30"<%If Rs("AgentLevel")=30 Then Response.write " selected"%>>3折</option>
<option value="20"<%If Rs("AgentLevel")=20 Then Response.write " selected"%>>2折</option>
<option value="10"<%If Rs("AgentLevel")=10 Then Response.write " selected"%>>1折</option>
</select>
 </tr>
    <tr> 
      <td>有无上传图片的权限：</td>
      <td><input type="radio" name="UpLoadState" value="-1"<%If Rs("UpLoadState")=-1 Then Response.write " checked"%>>
        有 
        <input type="radio" name="UpLoadState" value="0"<%If Rs("UpLoadState")=0 Then Response.write " checked"%>>
        无</td>
    </tr>
    <tr> 
      <td>Vip状态：</td>
      <td><input type="radio" name="VipState" value="-1"<%If Rs("VipState")=-1 Then Response.write " checked"%> onclick="ashow_1()">
        是 
        <input type="radio" name="VipState" value="0"<%If Rs("VipState")=0 Then Response.write " checked"%> onclick="ashow_2()">
        否</td>
    </tr>
    <tr id="a_1"> 
      <td>Vip到期：</td>
      <td><input type="text" name="VipEndDate" value="<%=Rs("VipEndDate")%>"></td>
    </tr>
    <tr id="a_2" class="td_wauto"> 
      <td>Vip最多开通子账号多少个：</td>
      <td><input type="text" name="VipAddSubNum" value="<%=Rs("VipAddSubNum")%>"></td>
    </tr>
    <%End If%>
    <tr> 
      <td>修改为新密码：</td>
      <td><input name="Pwd_New" type="text" id="Pwd_New">
        (留空则原密码不会被修改)</td>
    </tr>
    <tr> 
      <td class="td_wauto">修改为新密码找回答案：</td>
      <td><input name="PasswordAnswer_New" type="text" id="PasswordAnswer_New">
        (留空则原密码找回答案不会被修改)</td>
    </tr>
    <tr> 
      <td>管理员说明：</td>
      <td><textarea name="admindesc" cols="30" rows="6" id="notes"><%=rs("admindesc")%></textarea></td>
    </tr>
    <tr> 
      <td></td>  
	  <td>    
          <input type="submit" name="Submit3" value="修改">
          　　 
          <input type="reset" name="Submit523" value="取消" onClick="javascript:history.go(-1)">
      </td>
    </tr>
</table></form>
