📄 bjadmin.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") or rs("adminid2")=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"> 当前位置:<a href="bjindex.asp?bid=<%=bid%>">班级首页</a> >> <a href="bjadmin.asp?bid=<%=bid%>">班级管理</a> >> 班级公告</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 [gg] where bjid="&bid&"",conn,1,1
If not Rs.eof Then
aa=rs("title")
bb=obj.HtmlDecode(rs("content"))
end if
rs.close%>
<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 width="20%" bgcolor="#FFCFCE"><div align="center">
公告标题:</div></td>
<td width="80%" height="20"><input name="ggtitle" type="text" class="formtext2" id="ggtitle" value="<%=aa%>" maxlength="30"></td>
</tr>
<tr>
<td height="20" bgcolor="#FFCFCE"><div align="center">公告内容:</div></td>
<td><textarea name="ggcontent" cols="60" rows="8" id="ggcontent"><%=bb%></textarea></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>
<%end sub
sub add
ggtitle=obj.regstr(request.form("ggtitle"))
ggcontent=obj.regstr(request.form("ggcontent"))
if ggtitle="" or ggcontent="" then ShowError("缺少参数")
rs.open "select * from [gg] where bjid="&bid&"",conn,1,3
If Rs.eof Then
rs.addnew
end if
rs("title")=obj.HtmlEncode(ggtitle)
rs("content")=obj.HtmlEncode(ggcontent)
rs("date")=now
rs("bjid")=bid
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 + -