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

📄 sysadm_modiclass.asp

📁 功能非常完整的校友录
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp" -->
<!--#include file=char.asp-->
<!--#include file=checkuser.asp-->
<title><%=SchoolmateName%>--管理页面</title>
<link rel="stylesheet" type="text/css" href="txl.css">

<body alink=#333333 vlink=#333333 link=#333333 topmargin=0 bgcolor=<%=bodycolor%>>
<%
	if  issystemadmin(0)=false or session("adminlogin")<>"OK" then
		Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=admin_index.asp target=_top>登陆</a>后进入。"
		call Error(errmsg)
	else
		call main()
		set rs=nothing
		conn.close
		set conn=nothing
	end if

	sub main()
%><BR>
<table cellpadding=0 cellspacing=0 border=0 width=<%=tablewidth%> bgcolor=<%=tablebordercolor%> align=center>
  <tr>
    <td>
      <table cellpadding=3 cellspacing=1 border=0 width=100%>
        <tr bgcolor='<%=Tabletitlecolor%>'>
        <td><font color="<%=TablefontColor%>">欢迎<b><%=membername%></b>进入管理页面</font>
        </td>
        </tr>
            <tr bgcolor=<%=tablebodycolor2%>>
              <td width="100%" valign=top><font color="<%=TableContentColor%>">
<%
if request("action")="save" then
call update()
else
call classinfo()
end if
%></font>
	      </td>
            </tr>
        </table>
        </td>
    </tr>
</table>
<%
end sub

sub classinfo()
	set rs=server.createobject("adodb.recordset")
	sql="Select * from [class] where classname='"&trim(request("name"))&"'"
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		errmsg=errmsg+"<br>"+"<li>该班级不存在。"
		call error(errmsg)
		exit sub
	else
%>
<BR>
<form method="POST" action=sysadm_modiclass.asp?action=save>
<table width="95%" border="0" cellspacing="1" cellpadding="3"  align=center bgcolor=<%=Tablebordercolor%>>
<tr bgcolor=<%=Tabletitlecolor%>> 
<td height="11" colspan="2" ><font color="<%=TableContentColor%>"><b><%=htmlencode(rs("classname"))%>的班级信息</b></font></td>
</tr>
<tr  bgcolor=<%=Tablebodycolor2%>> 
<td width="41%" height="18"><font color="<%=TableContentColor%>">班级名</font></td>
<td width="59%" height="18"> 
<input type="text" name="classname" size="35" value="<%=htmlencode(rs("classname"))%>">
<input type="hidden" name="Name" size="35" value="<%=request("name")%>">
</td>
</tr>
<tr   bgcolor=<%=Tablebodycolor2%> >
<td width="41%" height="18"><font color="<%=TableContentColor%>">班级密码</font></td>
<td width="59%" height="18"> 
        <input type="text" name="classpwd" size="35" value="<%=htmlencode(rs("classpwd"))%>">
</td>
</tr>
<tr  bgcolor=<%=Tablebodycolor2%>> 
<td height="11" ><font color="<%=TableContentColor%>">入学年份</font></td>
<td height="11" > 
<input type="text" name="enyear" size="35" value="<%=rs("enyear")%>">
</td>
</tr>

<tr  bgcolor=<%=Tablebodycolor2%>> 
<td width="41%" height="18"><font color="<%=TableContentColor%>">班级主页</font></td>
<td width="59%" height="18"> 
<input type="text" name="homepage" size="35" value="<%=rs("homepage")%>">
</td>
</tr>
<tr   bgcolor=<%=Tablebodycolor2%>> 
<td width="41%" height="18"><font color="<%=TableContentColor%>">班级宣言</font></td>
<td width="59%" height="18"> 
<TEXTAREA name=pronouncement rows=5  cols=33><%=htmlencode(rs("pronouncement"))%></TEXTAREA>
</td>
</tr>
<tr  bgcolor=<%=Tablebodycolor2%>> 
<td width="41%" height="18"><font color="<%=TableContentColor%>">开放等级</font></td>
<td width="59%" height="18"> 
<select name="openlevel">
<option value="0" <%if rs("openlevel")=0 then%>selected<%end if%>>完全开放 
<option value="1" <%if rs("openlevel")=1 then%>selected<%end if%>>密码验证 
<option value="2" <%if rs("openlevel")=2 then%>selected<%end if%>>班长审核 
<option value="3" <%if rs("openlevel")=3 then%>selected<%end if%>>锁定班级 
</select>
</td>
</tr>
<tr bgcolor=<%=Tabletitlecolor%>> 
<td height="23" colspan="2" > 
<input type="submit" name="Submit" value="更 新">
</td>
</tr>
</table>
</form>
<%
	end if
	rs.close
	set rs=nothing
end sub

sub update()
	set rs=server.createobject("adodb.recordset")
	sql="Select * from [class] where classname='"&trim(request("name"))&"'"
	rs.open sql,conn,1,3
	if rs.eof and rs.bof then
		errmsg=errmsg+"<br>"+"<li>该班级不存在。"
		call error(errmsg)
		exit sub
	else
		rs("classname")=request.form("classname")
		rs("classpwd")=request.form("classpwd")
		rs("enyear")=request.form("enyear")
		rs("homepage")=request.form("homepage")
		rs("pronouncement")=request.form("pronouncement")
		rs("openlevel")=cint(request.form("openlevel"))
		rs.update
        rs.close
	end if
	set rs=nothing
%><center><p><b>更新班级数据成功!</b>
<%
end sub
%>

⌨️ 快捷键说明

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