📄 clsadm_apply.asp
字号:
<!--#INCLUDE FILE="conn.asp" -->
<!--#INCLUDE FILE="const.asp" -->
<!--#INCLUDE FILE="char.asp" -->
<!--#INCLUDE FILE="checkuser.asp" -->
<!--#INCLUDE FILE="theme.asp" -->
<html><head>
<meta NAME=GENERATOR Content="Microsoft FrontPage 4.0" CHARSET=GB2312>
<title><%=SchoolmateName%>——班级管理员申请</title>
<link rel=stylesheet type=text/css href=txl.css>
<script language="JavaScript" src="script/jsfun.js"></script>
</head>
<body alink=#333333 vlink=#333333 link=#333333 topmargin=0 bgcolor=<%=bodycolor%>>
<%
if request("action")="apply" then
call isjoinclass(1)
call apply()
else
call duty()
end if
set rs=nothing
call endconnection()
sub duty()
%>
<br><br>
<FORM action="clsadm_apply.asp?action=apply" method=post name="userform" onsubmit="return submitonce(this);">
<table cellpadding=0 cellspacing=0 border=0 width=480 bgcolor=#ccccff align=center>
<tr>
<td>
<table cellpadding=6 cellspacing=1 border=0 width=100% bgcolor=<%=tablebordercolor%>>
<TBODY>
<TR align=middle bgcolor=<%=tabletitlecolor%>>
<TD height=24><b>班级管理员申请</b>
</TD>
</TR>
<TR bgcolor=<%=tablebodycolor2%>>
<TD height=120 valign=center class=mp><b>班级管理员必须具备以下条件:</b>
<li>较好的上网条件,且有充足的上网时间,这样便于你管理!
</li>
<li>必须是本班成员。</li>
<li>必须在该班有10次以上的访问量。</li><br><br>
<b>班级管理员具有以下职责:</b>
<li>管理本班资料留言、照片,删除有害信息。
</li>
<li>对班内的成员进行管理,将其他班级的成员从本班删除。
</li>
<li>如果你觉的没有条件管理班级,你可以将此身份移交给其他人。
</li>
</TD>
</TR>
<TR bgcolor=<%=tablebodycolor2%>>
<TD>您是否要申请做本班的管理员?</TD>
</TR>
<TR align=middle bgcolor=<%=Tabletitlecolor%>>
<TD><DIV align=center><INPUT value="我要申请" name=Submit type=submit class=btn>
</DIV></TD></TR></TBODY></TABLE></td></tr></table>
</FORM>
<p align="center"><br>
<br>
</p>
</body>
</html>
<%
end sub
sub apply()
if issystemadmin(0)=true then
Errmsg=Errmsg+"<br>"+"<li>系统管理员可以直接行使班级管理员的权利无需再申请班级管理员。"
call error(Errmsg)
exit sub
end if
sql = "Select admin from [class] where classid="&clsid
set rs=conn.execute(sql)
if (not rs.eof) and rs("admin")=membername then
Errmsg=Errmsg+"<br>"+"<li>你已经是本班管理员了。"
founderr=true
elseif not isnull(rs("admin")) and rs("admin")<>"" then
Errmsg=Errmsg+"<br>"+"<li>每个班级只能有一位管理员,本班的管理员是<font color=blue>"&htmlencode(getrealname(rs("admin")))&"</font>。"
founderr=true
end if
if founderr=true then
call error(Errmsg)
exit sub
end if
if clng(getcount())<10 then
Errmsg=Errmsg+"<br>"+"<li>您的访问次数还不满10。"
call error(Errmsg)
exit sub
end if
sql="update class set admin='"&membername&"' where classid="&clsid
conn.execute(sql)
sql="update student set isadmin=1,point=point+"&pApplyAdmin&" where userid='"&membername&"'"
conn.execute(sql)
stitle="申请班级管理员"
smsg="您已经成为本班的管理员,请注意行使管理员的权利和履行管理员义务。"
call success(stitle,smsg)
end sub
function getcount()
tmpsql="select visitcount from [student] where userid='"&membername&"'"
tmprs=conn.execute(tmpsql)
getcount=tmprs(0)
set tmprs=nothing
if isnull(getcount) then getcount= 0
end function
%>
<!--#INCLUDE FILE="footer.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -