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

📄 ad_user.asp

📁 该软件是帮助大学生更好的生活
💻 ASP
📖 第 1 页 / 共 3 页
字号:
					response.write "<font color=green>等待邮件验证的用户</font>"
				case 2000
					response.write "<font color=green>等待管理员认证的用户</font>"
				case 999
					response.write "普通注册用户"
				case 99
					response.write "<font color=blue>收费用户</font>"
				case 9
					response.write "<font color=blue>VIP用户</font>"
				case else
					response.write "<font color=red>异常用户</font>"
			end select
			%>	
			</td>
            <td align="center">
			<%
	if rs(db_User_UserLevel)=99 or rs(db_User_UserLevel)=9 then
		if rs(db_User_ChargeType)=1 then
			if rs(db_User_UserPoint)<=0 then
				response.write "<font color=red>" & rs(db_User_UserPoint) & "</font> 点"
			else
				if rs(db_User_UserPoint)<=10 then
					response.write "<font color=blue>" & rs(db_User_UserPoint) & "</font> 点"
				else
					response.write rs(db_User_UserPoint) & " 点"
				end if
			end if
		else
		  if rs(db_User_Valid_Unit)=1 then
			ValidDays=rs(db_User_Valid_Num)
		  elseif rs(db_User_Valid_Unit)=2 then
			ValidDays=rs(db_User_Valid_Num)*30
		  elseif rs(db_User_Valid_Unit)=3 then
			ValidDays=rs(db_User_Valid_Num)*365
		  end if
		  tmpDays=ValidDays-DateDiff("D",rs(db_User_BeginDate),now())
		  if tmpDays<=0 then
			response.write "<font color=red>" & tmpDays & "</font> 天"
		  else
		  	if tmpDays<=10 then
				response.write "<font color=blue>" & tmpDays & "</font> 天"
		    else
				response.write tmpDays & " 天"
			end if
		  end if
		end if
	else
		response.write "&nbsp;"
	end if
		%></td>
            <td align="center"> <%
	if rs(db_User_LastLoginIP)<>"" then
		response.write rs(db_User_LastLoginIP)
	else
		response.write "&nbsp;"
	end if
	%> </td>
            <td align="center"> <%
	if rs(db_User_LastLoginTime)<>"" then
		response.write rs(db_User_LastLoginTime)
	else
		response.write "&nbsp;"
	end if
	%> </td>
            <td width="60" align="center"> <%
	if rs(db_User_LoginTimes)<>"" then
		response.write rs(db_User_LoginTimes)
	else
		response.write "0"
	end if
	%> </td>
            <td width="40" align="center"><%
	  if rs(db_User_LockUser)=true then
	  	response.write "<font color=red>已锁定</font>"
	  else
	  	response.write "正常"
	  end if
	  %></td>
            <td width="120" align="center"><%
		response.write "<a href='ad_User.asp?Action=Modify&UserID=" & rs(db_User_ID) & "'>修改</a>&nbsp;"
		if rs(db_User_LockUser)=False then
			response.write "<a href='ad_User.asp?Action=Lock&UserID=" & rs(db_User_ID) & "'>锁定</a>&nbsp;"
		else
            response.write "<a href='ad_User.asp?Action=UnLock&UserID=" & rs(db_User_ID) & "'>解锁</a>&nbsp;"
		end if
        response.write "<a href='ad_User.asp?Action=Del&UserID=" & rs(db_User_ID) & "' onClick='return confirm(""确定要删除此用户吗?"");'>删除</a>&nbsp;"
		if rs(db_User_UserLevel)=99 or rs(db_User_UserLevel)=9 then
			response.write "<a href='ad_User.asp?Action=AddMoney&UserID=" & rs(db_User_ID) & "'>续费</a>"
		else
            response.write "&nbsp;&nbsp;&nbsp;&nbsp;"
		end if
		%> </td>
          </tr>
          <%
	i=i+1
	if i>=MaxPerPage then exit do
	rs.movenext
loop
%>
        </table>  
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
              选中本页显示的所有用户</td>
            <td> <strong>操作:</strong> 
              <input name="Action" type="radio" value="Del" checked onClick="document.myform.UserLevel.disabled=true">删除&nbsp;&nbsp;&nbsp;&nbsp;
              <input name="Action" type="radio" value="Lock" onClick="document.myform.UserLevel.disabled=true">锁定 &nbsp;&nbsp;&nbsp;
              <input name="Action" type="radio" value="UnLock" onClick="document.myform.UserLevel.disabled=true">解锁 &nbsp;&nbsp;&nbsp; 
              <input name="Action" type="radio" value="Move" onClick="document.myform.UserLevel.disabled=false">移动到
              <select name="UserLevel" id="UserLevel" disabled>
                <option value="3000">等待邮件认证的用户</option>
                <option value="2000">等待管理审核的用户</option>
                <option value="999">注册用户</option>
                <option value="99" selected>收费用户</option>
                <option value="9">VIP用户</option>
              </select>
              &nbsp;&nbsp; 
              <input type="submit" name="Submit" value=" 执 行 "> </td>
  </tr>
</table>
</td>
</form></tr></table>
<%
end sub

sub ShowSearch()
%>
<form name="form2" method="post" action="ad_User.asp">
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="border">
  <tr class="tdbg">
    <td width="120"><strong>用户高级查询:</strong></td>
    <td width="300">
      <select name="Field" id="Field">
      <option value="UserID" selected>用户ID</option>
      <option value="UserName">用户名</option>
      </select>
      <input name="Keyword" type="text" id="Keyword" size="20" maxlength="30">
      <input type="submit" name="Submit2" value=" 查 询 ">
      <input name="UserSearch" type="hidden" id="UserSearch" value="10">
	</td>
    <td>若为空,则查询所有用户</td>
  </tr>
</table>
    </form>
<%
end sub

sub AddUser()
%>
<form name="myform" action="ad_User.asp" method="post">
  <table width=100% border=0 cellpadding=2 cellspacing=1 class="border">
    <TR align=center class='title'> 
      <TD height=22 colSpan=2><font class=en><b>添 加 新 用 户</b></font></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><b>用户名:</b><BR>
        不能超过14个字符(7个汉字)</TD>
      <TD width="60%"> <INPUT   maxLength=14 size=30 name=UserName> <font color="#FF0000">*</font></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><B>密码(至少6位):</B><BR>
        请输入密码,区分大小写。 请不要使用任何类似 '*'、' ' 或 HTML 字符 </TD>
      <TD width="60%"> <INPUT   type=password maxLength=12 size=30 name=Password> 
        <font color="#FF0000">*</font> </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>确认密码(至少6位):</strong><BR>
        请再输一遍确认</TD>
      <TD width="60%"> <INPUT   type=password maxLength=12 size=30 name=PwdConfirm> 
        <font color="#FF0000">*</font> </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>密码问题:</strong><BR>
        忘记密码的提示问题</TD>
      <TD width="60%"> <INPUT   type=text maxLength=50 size=30 name="Question"> 
        <font color="#FF0000">*</font> </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>问题答案:</strong><BR>
        忘记密码的提示问题答案,用于取回密码</TD>
      <TD width="60%"> <INPUT   type=text maxLength=20 size=30 name="Answer"> 
        <font color="#FF0000">*</font> </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>性别:</strong></TD>
      <TD width="60%"> <INPUT type=radio CHECKED value="1" name=sex>
        男 &nbsp;&nbsp; <INPUT type=radio value="0" name=sex>
        女</TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>Email地址:</strong></TD>
      <TD width="60%"> <INPUT   maxLength=50 size=30 name=Email> <font color="#FF0000">*</font></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>主页:</strong></TD>
      <TD width="60%"> <INPUT   maxLength=100 size=30 name=homepage value="http://"></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>QQ号码:</strong></TD>
      <TD width="60%"> <INPUT maxLength=20 size=30 name=OICQ></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>MSN:</strong></TD>
      <TD width="60%"> <INPUT maxLength=50 size=30 name=msn></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>用户级别:</strong></TD>
      <TD width="60%"><select name="UserLevel" id="UserLevel">
          <option value="3000">等待邮件认证的用户</option>
          <option value="2000">等待管理审核的用户</option>
          <option value="999" selected>注册用户</option>
          <option value="99">收费用户</option>
          <option value="9">VIP用户</option>
        </select></TD>
    </TR>
    <TR class="tdbg" >
      <TD><strong>计费方式:</strong></TD>
      <TD><input name="ChargeType" type="radio" value="1" checked>
        扣点数<font color="#0000FF">(推荐)</font>:&nbsp;每阅读一篇收费文章,扣除相应点数。&nbsp;<br>
        <input type="radio" name="ChargeType" value="2">
        有效期:在有效期内,用户可以任意阅读收费内容</TD>
    </TR>
    <TR class="tdbg" >
      <TD><strong>用户点数:</strong><br>
        用于阅读需要“阅读点数”文章,在阅读文章时会减去相应的点数<br>
        此功能只有当计费方式为“扣点数”时才有效</TD>
      <TD><input name="UserPoint" type="text" id="UserPoint" value="500" size="10" maxlength="10">
        点</TD>
    </TR>
    <TR class="tdbg" >
      <TD><strong>有效期限:</strong><br>
        若超过此期限,则用户不能阅读收费内容<br>
        此功能只有当计费方式为“有效期限”时才有效</TD>
      <TD>开始日期:
        <input name="BeginDate" type="text" id="BeginDate" value="<%=FormatDateTime(now(),2)%>" size="20" maxlength="20">
      <br>
      有 效 期:
      <input name="Valid_Num" type="text" id="Valid_Num" value="1" size="10" maxlength="10">
      <select name="Valid_Unit" id="Valid_Unit">
      <option value="1">天</option>
      <option value="2">月</option>
      <option value="3" selected>年</option>
      </select>
      </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>用户状态:</strong></TD>
      <TD width="60%"><input name="LockUser" type="radio" value="False" checked>
        正常&nbsp;&nbsp; <input type="radio" name="LockUser" value="True">
        锁定</TD>
    </TR>
    <TR align="center" class="tdbg" > 
      <TD colspan="2"><input name="Action" type="hidden" id="Action" value="SaveAdd">
        <input type="submit" name="Submit" value=" 添 加 "></TD>
    </TR>
  </TABLE>
</form>
<%
end sub

sub Modify()
	dim UserID
	dim rsUser,sqlUser
	UserID=trim(request("UserID"))
	if UserID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>参数不足!</li>"
		exit sub
	else
		UserID=Clng(UserID)
	end if
	Set rsUser=Server.CreateObject("Adodb.RecordSet")
	sqlUser="select * from " & db_User_Table & " where " & db_User_ID & "=" & UserID
	rsUser.Open sqlUser,Conn_User,1,3
	if rsUser.bof and rsUser.eof then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>找不到指定的用户!</li>"
		rsUser.close
		set rsUser=nothing
		exit sub
	end if
%>
<FORM name="Form1" action="ad_User.asp" method="post">
  <table width="100%" border="0" cellspacing="1" cellpadding="2" class="border">
    <TR class='title'> 
      <TD height=22 colSpan=2 align="center"><b>修改注册用户信息</b></TD>
    </TR>
    <TR class="tdbg" > 

⌨️ 快捷键说明

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