📄 editusertitle.asp
字号:
<%
if not session("sfadmin") then response.redirect("welcome.asp")
%>
<!--#INCLUDE FILE="../inc/db_inc.asp"-->
<!--#INCLUDE FILE="../inc/md5_inc.asp"-->
<!--#INCLUDE FILE="../inc/char_inc.asp"-->
<HTML>
<HEAD>
<TITLE>Untitled Document</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK rel="stylesheet" href="image/style.css" type="text/css">
</HEAD>
<BODY bgcolor="#FFFFFF" text="#000000" leftmargin="5" topmargin="5">
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open StrConn
%>
<!--#INCLUDE FILE="checkadmin.asp"-->
<%
if request("step") = "2" then
errstr = ""
for i=1 to 10
if not IsNumeric(request("minposts" & i)) then errstr = errstr & "<LI>发贴数不能为空<BR>"
if request("title" & i) = "" then errstr = errstr & "<LI>头衔不能为空<BR>"
next
if errstr = "" then
for i=1 to 10
strsql = "update sf_usertitle set title='" & chksql(request("title" & i)) & "', minposts=" & request("minposts" & i) & " where usertitleid=" & i
Conn.Execute(strsql)
next
%>
<TABLE width="100%" border="0" cellspacing="1" cellpadding="4" align="center">
<TR>
<TD bgcolor="#D1E3BF" align="center">用户级别设置完毕</TD>
</TR>
</TABLE>
<%
else
%>
<TABLE width="100%" border="0" cellspacing="1" cellpadding="4" align="center">
<TR>
<TD bgcolor="#D1E3BF">错误:<BR><%= errstr %></TD>
</TR>
</TABLE>
<%
end if
else
%>
<!--#INCLUDE FILE="../inc/inc.js"-->
<FORM name="form1" method="post" action="editusertitle.asp">
<TABLE width="100%" border="0" cellspacing="1" cellpadding="4" align="center">
<TR>
<TD bgcolor="#D1E3BF" align="center" colspan="3"><B>编辑用户等级</B></TD>
</TR>
<TR bgcolor="#EEEEEE" align="center">
<TD width="20%">级别</TD><TD width="40%">发贴数</TD><TD width="40%">头衔</TD>
</TR>
<%
strsql = "select * from sf_usertitle"
Set rs = Conn.Execute(strsql)
if not(rs.bof or rs.eof) then
i = 0
do until rs.eof or i > 10
titlestr = rs("title")
titlestr = server.htmlencode(titlestr)
i = i + 1
if (i mod 2) = 0 then
response.write "<TR bgcolor=""#F5F5F5"">"
else
response.write "<TR bgcolor=""#FFFFFF"">"
end if
%>
<TD align="center"><% =i %></TD><TD><INPUT type="text" name="<% response.write "minposts" & i %>" size="8" value="<% = rs("minposts") %>"></TD>
<TD><INPUT type="text" name="<% response.write "title" & i %>" size="30" value="<% = titlestr %>"></TD>
</TR>
<%
rs.movenext
loop
end if
%>
<TR align="center">
<TD colspan="3">
<INPUT type="hidden" name="step" value="2">
<%
response.write "<INPUT type=""submit"" name=""Submit"" value=""确 定"" onclick=""MM_validateForm("
for i=1 to 10
response.write "'minposts" & i & "','序号为" & i & "的发贴数','RisNum',"
response.write "'title" & i & "','序号为" & i & "的头衔','R',"
next
response.write "'step','step','R');return document.MM_returnValue"">"
%>
</TD>
</TR>
</TABLE>
</FORM>
<B>注意:</B>级别越高发贴数必须越大.如果用户头衔不为空则以用户头衔为准,否则默认由这里的级别控制用户的头衔.
<%
end if
%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -