?? admin_user.asp
字號:
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 " "
end if
%></td>
<td align="center"> <%
if rs(db_User_LastLoginIP)<>"" then
response.write rs(db_User_LastLoginIP)
else
response.write " "
end if
%> </td>
<td align="center"> <%
if rs(db_User_LastLoginTime)<>"" then
response.write rs(db_User_LastLoginTime)
else
response.write " "
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='Admin_User.asp?Action=Modify&UserID=" & rs(db_User_ID) & "'>修改</a> "
if rs(db_User_LockUser)=False then
response.write "<a href='Admin_User.asp?Action=Lock&UserID=" & rs(db_User_ID) & "'>鎖定</a> "
else
response.write "<a href='Admin_User.asp?Action=UnLock&UserID=" & rs(db_User_ID) & "'>解鎖</a> "
end if
response.write "<a href='Admin_User.asp?Action=Del&UserID=" & rs(db_User_ID) & "' onClick='return confirm(""確定要刪除此用戶嗎?"");'>刪除</a> "
if rs(db_User_UserLevel)=99 or rs(db_User_UserLevel)=9 then
response.write "<a href='Admin_User.asp?Action=AddMoney&UserID=" & rs(db_User_ID) & "'>續費</a>"
else
response.write " "
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">刪除
<input name="Action" type="radio" value="Lock" onClick="document.myform.UserLevel.disabled=true">鎖定
<input name="Action" type="radio" value="UnLock" onClick="document.myform.UserLevel.disabled=true">解鎖
<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>
<input type="submit" name="Submit" value=" 執 行 "> </td>
</tr>
</table>
</td>
</form></tr></table>
<%
end sub
sub ShowSearch()
%>
<form name="form2" method="post" action="Admin_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="Admin_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>
男 <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>OICQ號碼:</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>: 每閱讀一篇收費文章,扣除相應點數。 <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>
正常 <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="Admin_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>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -