?? admin_user.asp
字號(hào):
<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">移動(dòng)到
<select name="UserLevel" id="UserLevel" disabled>
<option value="6">等待管理審核的用戶</option>
<option value="7">注冊(cè)用戶</option>
<option value="8">VIP用戶</option>
<option value="9">前臺(tái)管理員</option>
</select>
<input type="submit" name="Submit" value=" 執(zhí) 行 "> </td>
</tr>
</table>
</td>
</form></tr></table>
<%
end sub
sub ShowSearch()
%>
<form name="form2" method="post" action="admin_user.asp">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr class="tdbg">
<td width="120"><strong>用戶高級(jí)查詢:</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=98% border=0 align="center" cellpadding=2 cellspacing=1 bgcolor="#FFFFFF" class="border">
<TR align=center class='title'>
<TD height=22 colSpan=2><font color="#FFFFFF" class=en><b>添 加 新 用 戶</b></font></TD>
</TR>
<TR class="tdbg" >
<TD width="40%">用戶名:<BR>
不能超過14個(gè)字符(7個(gè)漢字)</TD>
<TD width="60%"> <INPUT maxLength=14 size=30 name=UserName> <font color="#FF0000">*</font></TD>
</TR>
<TR class="tdbg" >
<TD width="40%">密碼(至少6位):<BR>
請(qǐng)輸入密碼,區(qū)分大小寫。 請(qǐng)不要使用任何類似 '*'、' ' 或 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%">確認(rèn)密碼(至少6位):<BR>
請(qǐng)?jiān)佥斠槐榇_認(rèn)</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%">密碼問題:<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%">問題答案:<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%">性別:</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%">Email地址:</TD>
<TD width="60%"> <INPUT maxLength=50 size=30 name=Email> <font color="#FF0000">*</font></TD>
</TR>
<TR class="tdbg" >
<TD width="40%">主頁:</TD>
<TD width="60%"> <INPUT maxLength=100 size=30 name=homepage value="http://"></TD>
</TR>
<TR class="tdbg" >
<TD width="40%">QQ號(hào)碼:</TD>
<TD width="60%"> <INPUT maxLength=20 size=30 name=OICQ></TD>
</TR>
<TR class="tdbg" >
<TD width="40%">MSN:</TD>
<TD width="60%"> <INPUT maxLength=50 size=30 name=msn></TD>
</TR>
<TR class="tdbg" >
<TD width="40%">用戶級(jí)別:</TD>
<TD width="60%"><select name="UserLevel" id="UserLevel">
<option value="6">等待審核的用戶</option>
<option value="7" selected>注冊(cè)用戶</option>
<option value="8">VIP用戶</option>
<option value="9">前臺(tái)管理員</option>
</select></TD>
</TR>
<TR class="tdbg" >
<TD width="40%">用戶狀態(tài):</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>參數(shù)不足!</li>"
exit sub
else
UserID=Clng(UserID)
end if
Set rsUser=Server.CreateObject("Adodb.RecordSet")
sqlUser="select * from [user] where userID=" & UserID
rsUser.Open sqlUser,Conn,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="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
<TR class='title'>
<TD height=22 colSpan=2 align="center"><b><font color="#FFFFFF">修改注冊(cè)用戶信息</font></b></TD>
</TR>
<TR class="tdbg" >
<TD width="40%">用戶名:</TD>
<TD width="60%"><%=rsUser("userName")%> </TD>
</TR>
<tr class="tdbg" onmouseover="this.style.backgroundColor='#BFDFFF'" onmouseout="this.style.backgroundColor=''">
<td>blog名:</td>
<td><input name=blogname type=text id="blogname" value="<%=rsuser("blogname")%>" size=30 maxlength=20></td>
</tr>
<tr class="tdbg" onmouseover="this.style.backgroundColor='#BFDFFF'" onmouseout="this.style.backgroundColor=''">
<td>blog類別:</td>
<td><select name="usertype" id="usertype">
<option value="<%if rsUser("usertypeid")<>"" then response.Write(rsUser("usertypeid")) else response.Write("0")%>" selected>
<%
if rsUser("usertypeid")<>"" then
dim rs
set rs=conn.execute("select typename from usertype where id="&rsUser("usertypeid"))
if not rs.eof then
response.Write rs(0)
end if
else
response.Write "請(qǐng)選擇"
end if
%>
</option>
<%
set rs=conn.execute("select id,typename from usertype")
do while not rs.eof %>
<option value=<%=rs(0)%>><%=rs(1)%></option>
<%
rs.movenext
loop
set rs=nothing
%>
</select></td>
</tr>
<TR class="tdbg" >
<TD width="40%">密碼(至少6位):<BR>
請(qǐng)輸入密碼,區(qū)分大小寫。 請(qǐng)不要使用任何類似 '*'、' ' 或 HTML 字符 </TD>
<TD width="60%"> <INPUT type=password maxLength=16 size=30 name=Password>
<font color="#FF0000">如果不想修改,請(qǐng)留空</font> </TD>
</TR>
<TR class="tdbg" >
<TD>確認(rèn)密碼(至少6位):<br>
請(qǐng)?jiān)佥斠槐榇_認(rèn)</TD>
<TD><INPUT name=PwdConfirm type=password id="PwdConfirm" size=30 maxLength=12>
<font color="#FF0000">如果不想修改,請(qǐng)留空</font> </TD>
</TR>
<TR class="tdbg" >
<TD width="40%">密碼問題:<br>
忘記密碼的提示問題</TD>
<TD width="60%"> <INPUT name="Question" type=text value="<%=rsUser("Question")%>" size=30>
</TD>
</TR>
<TR class="tdbg" >
<TD width="40%">問題答案:<BR>
忘記密碼的提示問題答案,用于取回密碼</TD>
<TD width="60%"> <INPUT type=text size=30 name="Answer"> <font color="#FF0000">如果不想修改,請(qǐng)留空</font></TD>
</TR>
<TR class="tdbg" >
<TD width="40%">性別:</TD>
<TD width="60%"> <INPUT type=radio value="1" name=sex <%if rsUser("Sex")=1 then response.write "CHECKED"%>>
男 <INPUT type=radio value="0" name=sex <%if rsUser("Sex")=0 then response.write "CHECKED"%>>
女</TD>
</TR>
<TR class="tdbg" >
<TD width="40%">Email地址:</TD>
<TD width="60%"> <INPUT name=Email value="<%=rsUser("userEmail")%>" size=30 maxLength=50>
<a href="mailto:<%=rsUser("userEmail")%>">給此用戶發(fā)一封電子郵件</a>
</TD>
</TR>
<TR class="tdbg" >
<TD width="40%">主頁:</TD>
<TD width="60%"> <INPUT maxLength=100 size=30 name=homepage value="<%=rsUser("Homepage")%>"></TD>
</TR>
<TR class="tdbg" >
<TD width="40%">OICQ號(hào)碼:</TD>
<TD width="60%"> <INPUT name=OICQ value="<%=rsUser("oicq")%>" size=30 maxLength=20></TD>
</TR>
<TR class="tdbg" >
<TD width="40%">MSN:</TD>
<TD width="60%"> <INPUT name=msn value="<%=rsUser("Msn")%>" size=30 maxLength=50></TD>
</TR>
<TR class="tdbg" >
<TD width="40%">用戶級(jí)別:</TD>
<TD width="60%"><select name="UserLevel" id="UserLevel">
<option value="6">等待管理審核的用戶</option>
<option value="7" selected>注冊(cè)用戶</option>
<option value="8">vip用戶</option>
<option value="9">前臺(tái)管理員</option>
</select></TD>
</TR>
<tr class="tdbg" onmouseover="this.style.backgroundColor='#BFDFFF'" onmouseout="this.style.backgroundColor=''">
<td>用戶上傳文件:</td>
<td><input name=upfiles type=text id="upfiles" value="<%=rsuser("upfiles")%>" size=30 maxlength=20></td>
</tr>
<tr class="tdbg" onmouseover="this.style.backgroundColor='#BFDFFF'" onmouseout="this.style.backgroundColor=''">
<td>已上傳字節(jié):</td>
<td><input name=upfiles_size type=text id="upfiles_size" value="<%=rsuser("upfiles_size")%>" size=20 maxlength=20></td>
</tr>
<TR class="tdbg" >
<TD>是否為推薦博客:</TD>
<TD><input type="radio" name="isbest" value="true" <%if rsUser("userisbest")="true" then response.write "checked"%>>
是
<input type="radio" name="isbest" value="false" <%if rsUser("userisbest")<>"true" then response.write "checked"%>>
否</TD>
</TR>
<TR class="tdbg" >
<TD width="40%">用戶狀態(tài):</TD>
<TD width="60%"><input type="radio" name="LockUser" value="false" <%if rsUser("LockUser")="false" then response.write "checked"%>>
正常 <input type="radio" name="LockUser" value="true" <%if rsUser("LockUser")="true" then response.write "checked"%>>
鎖定</TD>
</TR>
<TR class="tdbg" >
<TD height="40" colspan="2" align="center"><input name="Action" type="hidden" id="Action" value="SaveModify">
<input name=Submit type=submit id="Submit" value="保存修改結(jié)果"> <input name="UserID" type="hidden" id="UserID" value="<%=rsUser("userID")%>"></TD>
</TR>
</TABLE>
</form>
<%
rsUser.close
set rsUser=nothing
end sub
sub UpdateUser()
%>
<FORM name="Form1" action="admin_user.asp" method="post">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
<tr align="center" class="title">
<td height="22" colspan="2"><strong><font color="#FFFFFF">更 新 用 戶 數(shù) 據(jù)</font></strong></td>
</tr>
<tr class="tdbg">
<td colspan="2"><p>說明:<br>
1、本操作將重新計(jì)算用戶的日志,評(píng)論,留言數(shù)。<br>
2、本操作可能將非常消耗服務(wù)器資源,而且更新時(shí)間很長(zhǎng),請(qǐng)仔細(xì)確認(rèn)每一步操作后執(zhí)行。</p>
</td>
</tr>
<tr class="tdbg">
<td height="25">開始用戶ID:</td>
<td height="25"><input name="BeginID" type="text" id="BeginID" value="1" size="10" maxlength="3">
用戶ID,可以填寫您想從哪一個(gè)ID號(hào)開始進(jìn)行修復(fù)</td>
</tr>
<tr class="tdbg">
<td height="25">結(jié)束用戶ID:</td>
<td height="25"><input name="EndID" type="text" id="EndID" value="1000" size="10" maxlength="3">
將更新開始到結(jié)束ID之間的用戶數(shù)據(jù),之間的數(shù)值最好不要選擇過大</td>
</tr>
<tr class="tdbg">
<td height="25"> </td>
<td height="25"><input name="Submit" type="submit" id="Submit" value="更新用戶數(shù)據(jù)"> <input name="Action" type="hidden" id="Action" value="DoUpdate"></td>
</tr>
</table>
</form>
<p>
<%
end sub
%>
</p>
</body>
</html>
<%
sub SaveAdd()
dim UserName,Password,PwdConfirm,Question,Answer,Sex,Email,Homepage,OICQ,MSN,UserLevel,LockUser
UserName=trim(request("UserName"))
Password=trim(request("Password"))
PwdConfirm=trim(request("PwdConfirm"))
Question=trim(request("Question"))
Answer=trim(request("Answer"))
Sex=trim(Request("Sex"))
Email=trim(request("Email"))
Homepage=trim(request("Homepage"))
OICQ=trim(request("OICQ"))
MSN=trim(request("MSN"))
UserLevel=trim(request("UserLevel"))
LockUser=trim(request("LockUser"))
if UserName="" or strLength(UserName)>14 or strLength(UserName)<4 then
founderr=true
errmsg=errmsg & "<br><li>請(qǐng)輸入用戶名(不能大于14小于4)</li>"
else
if Instr(UserName,"=")>0 or Instr(UserName,"%")>0 or Instr(UserName,chr(32))>0 or Instr(UserName,"?")>0 or Instr(UserName,"&")>0 or Instr(UserName,";")>0 or Instr(UserName,",")>0 or Instr(UserName,"'")>0 or Instr(UserName,",")>0 or Instr(UserName,chr(34))>0 or Instr(UserName,chr(9))>0 or Instr(UserName,"
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -