📄 adminbj.asp
字号:
<!--#include file="bjhead.asp"-->
<TABLE style="BORDER-RIGHT: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid"
cellSpacing=0 cellPadding=0 width=778 align=center bgColor=#ffffff>
<TBODY>
<TR vAlign=top>
<TD bgColor=#cccccc><IMG height=1 alt="" src="../image/stu.htm" width=1
name=""></TD>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center
bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD height=8 bgColor=#f4f4f4></TD></TR>
<TD>
<TABLE id=AutoNumber3 style="BORDER-COLLAPSE: collapse"
cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top height=52>
<TABLE width="100%"
border=0 align="center" cellPadding=3 cellSpacing=0
borderColor=#111111 id=AutoNumber5 style="BORDER-COLLAPSE: collapse">
<TBODY>
<TR>
<TD class=6 width=495 background=../image/type_bg.gif
height=30><IMG height=12 src="../image/type01.gif" width=12
align=absMiddle> <span class="style4">当前位置:</span> <A
href="index.asp?clas=<%=session("clas")%>">网站首页</A> - <A
href="?clas=<%=session("clas")%>" style="color: #FF99CC"><%=session("clas")%>班级管理</A></TD>
<TD width=100 background=../image/type_bg.gif>
<DIV align=center><IMG
src="../image/more.gif"
border=0></DIV></TD></TR><TR>
<TD colSpan=2>
<DIV align=center>
<%dim username,sql,type2,rs
username=Session("wzname")
clas=Session("clas")
type2=request.queryString("type2")
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from bj where bjname ='"&clas&"'"
rs.open sql,conn,1,1
if rs("adminname")<>Session("wzname") then
Response.Write("兄弟,你的权力不够啊!快来给我送点礼吧")
Response.Write("<br>")
Response.Write("<a href='javascript:history.go(-1)'><font color=red size=2>哎,回去吧</font></a>")
rs.close
set rs=nothing
else
Select Case type2
Case "add":
Call add
Case Else:
call show
End Select
end if
sub show
%>
<table width="100%" cellspacing="0">
<tr>
<td><table width="100%" cellspacing="0">
<tr>
<td width="19%"><a href="adminbj.asp">班级资料</a></td>
<td width="19%"><a href="admingg.asp">发布公告</a></td>
<td width="19%"><a href="adminvip.asp">成员管理</a></td>
<td width="13%"><a href="adminvote.asp">班级投票</a></td>
<td width="11%"><a href="adminsong.asp">歌曲管理</a></td>
<td width="19%"><a href="adminmove.asp">移交大权</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table width="100%" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFD31C">
<form name="form1" method="post" action="?type2=add">
<tr>
<td width="14%">班名:</td>
<td width="86%"><FONT color=red><%=rs("bjname")%></FONT></td>
</tr>
<tr>
<td>班主任:</td>
<td>
<input name="sir" type="text" id="sir" value="<%=rs("sir")%>">
</td>
</tr>
<tr>
<td>类型:</td>
<td>
<select name="bjtype" size="1">
<%dim rt,bjtype
Set rt = Server.CreateObject("ADODB.Recordset")
sql="select bjtype from bj where bjname = '" &clas& "'"
rt.open sql,conn,1,1
bjtype=rt("bjtype")
rt.close
set rt= nothing
Set rt = Server.CreateObject("ADODB.Recordset")
sql="select bytype from bytype"
rt.open sql,conn,1,1
%>
<%do while not rt.eof%>
<option <%if bjtype=rt("bytype") then%>selected<%end if%>><%=rt("bytype")%></option>
<%rt.movenext
loop
rt.close
set rt= nothing%>
</select>
</td>
</tr>
<tr>
<td>班级简介:</td>
<td><textarea name="bjjz" cols="60" rows="8" id="bjjz"><%=rs("bjjz")%></textarea></td>
</tr>
<tr>
<td> </td>
<td>
<input type="submit" name="Submit" value="修改">
<input type="reset" name="Submit" value="重置"></td>
</tr>
</form>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<%
end sub
sub add
dim bjjz,bjtype,sir
bjjz=request.form("bjjz")
bjtype=request.form("bjtype")
sir=request.form("sir")
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from bj where bjname = '" &clas& "'"
rs.open sql,conn,1,3
rs("bjjz")=bjjz
rs("bjtype")=bjtype
rs("sir")=sir
rs.update
rs.close
set rs=nothing
response.redirect "adminbj.asp"
end sub%>
</DIV></TR></TBODY>
</TABLE>
</TD></TR></TBODY></TABLE></TD></TR></TABLE></TD></TR></TBODY></TABLE>
<!--#include file="../bottom.asp"--></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -