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

📄 bjadminer.asp

📁 进入后台
💻 ASP
字号:
<!--#include file="config.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!--#include file="head.asp"-->
<%bid=clng(request("bid"))
if bid="" or bid<1 then ShowError("访问的班级不存在")
rs.open "select * from bj where id="&bid&"",conn,1,1
	If Rs.eof Then ShowError("访问的班级不存在")
	if rs("isopen")=1 and session("xyluserid")="" then ShowError("你访问的班级禁止游客访问")
	if rs("isopen")=2 then
	if session("xyluserid")="" then ShowError("你访问的班级禁止非班级成员访问")
	if obj.inbj(session("xyluserid"),bid,SiteDatabase)<>1 then ShowError("你访问的班级禁止非班级成员访问")
	end if
	if rs("adminid")=session("xyluserid") then
	else
	ShowError("你无权访问此页面")
	end if
	bjname=rs("bjname")
	rs.close%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Sitename%>-<%=bjname%>-班级管理</title>
<LINK href="css.css" type=text/css rel=stylesheet>
</head>
<body>
<%call bjhead(bid,bjname)%>
<table width="760"  border="0" align="center" cellpadding="0" cellspacing="0" class="border">
        <tr>
          <td height="291" valign="top">
            <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" class="border">
        <tr>
          <td height="25">  <img src="skins/1/xb3.gif">&nbsp;当前位置:<a href="bjindex.asp?bid=<%=bid%>">班级首页</a> &gt;&gt; <a href="bjadmin.asp?bid=<%=bid%>">班级管理</a> &gt;&gt; 管理员</td>
          </tr>
      </table>
	      <%bjadmin(bid)
Select Case request("type2")
	Case "add":
		Call add
	Case Else:
		 call show
End Select
sub show%>
            <br><%rs.open "select * from [bj] where id="&bid&"",conn,1,1
	If Rs.eof Then ShowError("班级不存在")%>
<table width="95%" border="0" align="center" cellpadding="1" cellspacing="2" class="border">
<form name="form1" method="post" action="?type2=add&bid=<%=bid%>">
  <tr>
    <td height="20" bgcolor="#FFCFCE"><div align="center">正管理员:</div></td>
    <td><input name="adminid" type="text" class="formtext2" id="adminid" value="<%=rs("adminid")%>" maxlength="30">
填写ID号,新管理员必须是本班成员,改变后你将不再是本班管理员</td>
  </tr><tr>
<td width="20%" bgcolor="#FFCFCE"><div align="center">
  副管理员:</div></td>
    <td width="80%" height="20"><input name="adminid2" type="text" class="formtext2" id="adminid2" value="<%=rs("adminid2")%>" maxlength="30">
    填写ID号,新管理员必须是本班成员</td>
    </tr>
<tr>
<td width="20%" bgcolor="#FFCFCE"><div align="center"></div></td>
    <td width="80%" height="20"><input name="Submit" type="submit" class="bottom" value="提交"></td>
</tr>  </form>
</table>
<%rs.close:set rs=nothing
end sub
sub add
adminid=clng(request.form("adminid"))
adminid2=clng(request.form("adminid2"))
if adminid="" or adminid2="" then ShowError("缺少参数")
if obj.inbj(adminid, bid, sitedatabase)<>1 then ShowError("正管理ID不是本班用户")
if obj.inbj(adminid2, bid, sitedatabase)<>1 then ShowError("副管理ID不是本班用户")
rs.open "select * from [bj] where id="&bid&"",conn,1,3
	rs("adminid")=adminid
	rs("adminid2")=adminid2
	rs.update
	rs.close:set rs=nothing
	closeconn
	a=obj.gourl(" 页面三秒后将自动返回班级管理员管理页,可以继续选择以下操作:<br><br> 返回<A href='bjindex.asp?bid="&bid&"'>[班级首页]</a><br><br> 到<A href='?bid="&bid&"'>[班级管理员管理]</a>","?bid="&bid&"")
end sub%>
<br>
</td></tr>
</table>
<%sitebottom%>
</body>
</html>

⌨️ 快捷键说明

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