📄 adminsubject.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("adminname")="" then
response.redirect "relogin.asp"
end if
%>
<%
%>
<html>
<head><meta http-equiv='refresh' content='<%=refreshtime%>; url=adminsubject.asp'>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>系统管理 | 科目管理</title>
<script language="javascript">
function chapter(id)
{
page="adminsubjectchapter.asp?kcid="+id
window.open (page,'编辑用户','width=500,height=440,resizable=1,scrollbars=1')
}
function saveit(myform)
{
if (confirm("是否保存所有修改?"))
{
myform.action="adminsubjectsaveedit.asp";
myform.submit();
}
}
function delit(myform)
{
if (confirm("将删除此题库下的所有数据?"))
{
myform.action="adminsubjectdel.asp";
myform.submit();
}
}
function opendata(myform)
{
if (confirm("将打开此题库下的所有数据?"))
{
myform.action="adminsubjectopen.asp";
myform.submit();
}
}
function power(myform)
{
myform.action="adminbanjipower.asp";
myform.submit();
}
</script>
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<body>
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2" height="25">
<tr>
<td width="100%">当前位置: 系统管理 > 科目管理</td>
</tr>
</table>
<center><form method="POST" action="adminsubjectsave.asp">
<table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#799AE1" width="354" id="AutoNumber3" height="20">
<tr>
<td width="80" bgcolor="#FFFDE8" background="images/admin_bg_1.gif">
<p align="center"><b><font color="#FFFFFF">科目名称</font></b></td>
<td bgcolor="#FFFDE8" width="205">
<p align="left">
<input type="text" name="exam_subject" size="33" onblur="this.className='inputnormal'" onfocus="this.className='inputedit';this.select()" class="inputnormal" value="请输入科目名称"></td>
<td width="55" bgcolor="#FFFDE8">
<p align="center">
<input border="0" value="添 加" name="I1" type="submit" class="s02"></td>
</tr>
</table></form>
</center>
<p><center>服务器时间:<%=date%>——<%=time%></center>
<br>
</p>
<center> <form name="adminsubject" method="post" >
<table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#799AE1" width="455" id="AutoNumber1">
<tr class="trh">
<td width="44" align="center" bgcolor="#799AE1" height="20"><b><input type="submit" value="删除" name="del" onclick="delit(adminsubject)" class="s02"></b></td>
<td width="31" align="center" bgcolor="#799AE1"><font color="#FFFFFF"><b>序号</b></font></td>
<td align="center" bgcolor="#799AE1" width="150"><font color="#FFFFFF"><b>科目名称</b></font></td>
<td align="center" bgcolor="#799AE1" width="72"><font color="#FFFFFF"><b>练习控制</b></font></td>
<td align="center" bgcolor="#799AE1" width="66"><font color="#FFFFFF"><b>
试卷管理</b></font></td>
<td bgcolor="#799AE1" width="44"><input type="submit" value="打开" name="open" onclick="opendata(adminsubject)" class="s02"></td>
</tr>
<%
i=1
'-----------------权限设定
power=session("power")
dim arr,id1
if instr(power,",")>0 then
Arr=split(power)
for j = 0 to ubound(arr)
id1=clng(arr(j))
sql="select * from tbkc where kcid="&id1
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
if not rs.eof then
%>
<tr class="trh1">
<td align="center" width="44">
<input type="checkbox" name="id" value="<%=rs("kcid")%>"></td>
<td align="center" width="31"><%=i%> </td>
<td align="center" width="150">
<input type="text" name="exam_subject" size="25" value="<%=rs("kcm")%>" onblur="this.className='inputnormal'" onfocus="this.className='inputedit';this.select()" class="inputnormal"></td>
<td align="left" width="72">
<p align="center"><a href="javascript:chapter(<%=rs("kcid")%>)"><img border="0" src="images/29.gif" alt="章节控制"></a> </td>
<td align="left" width="66">
<p align="center"><a href="adminpaper.asp?kcid=<%=rs("kcid")%>">
<img border="0" src="images/04.gif" alt="试卷管理" width="35" height="36"></a> </td>
<td align="left" width="44" align="center" >
<p align="center"><input type="checkbox" name="idopen" value="<%=rs("kcid")%>" <%if rs("isopen")="1" then%> checked <%end if%>> </td>
</tr>
<% i=i+1
end if
next
else
if power<=0 then
sql="select * from tbkc order by kcid"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
do while not rs.eof %>
<tr class="trh1">
<td align="center" width="44">
<input type="checkbox" name="id" value="<%=rs("kcid")%>"></td>
<td align="center" width="31"><%=i%> </td>
<td align="center" width="150">
<input type="text" name="exam_subject" size="25" value="<%=rs("kcm")%>" onblur="this.className='inputnormal'" onfocus="this.className='inputedit';this.select()" class="inputnormal"></td>
<td align="left" width="72">
<p align="center"><a href="javascript:chapter(<%=rs("kcid")%>)"><img border="0" src="images/29.gif" alt="章节控制"></a> </td>
<td align="left" width="66">
<p align="center"><a href="adminpaper.asp?kcid=<%=rs("kcid")%>">
<img border="0" src="images/04.gif" alt="试卷管理" width="35" height="36"></a> </td>
<td align="left" width="44" align="center" >
<p align="center"><input type="checkbox" name="idopen" value="<%=rs("kcid")%>" <%if rs("isopen")="1" then%> checked <%end if%>> </td>
</tr>
<% rs.movenext
i=i+1
loop
else
sql="select * from tbkc where kcid="&power
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
if not rs.eof then
%>
<tr class="trh1">
<td align="center" width="44">
<input type="checkbox" name="id" value="<%=rs("kcid")%>"></td>
<td align="center" width="31"><%=i%> </td>
<td align="center" width="150">
<input type="text" name="exam_subject" size="25" value="<%=rs("kcm")%>" onblur="this.className='inputnormal'" onfocus="this.className='inputedit';this.select()" class="inputnormal"></td>
<td align="left" width="72">
<p align="center"><a href="javascript:chapter(<%=rs("kcid")%>)"><img border="0" src="images/29.gif" alt="章节控制"></a> </td>
<td align="left" width="66">
<p align="center"><a href="adminpaper.asp?kcid=<%=rs("kcid")%>">
<img border="0" src="images/04.gif" alt="试卷管理" width="35" height="36"></a> </td>
<td align="left" width="44" align="center" >
<p align="center"><input type="checkbox" name="idopen" value="<%=rs("kcid")%>" <%if rs("isopen")="1" then%> checked <%end if%>> </td>
</tr>
<%
end if
end if
end if
Set rsuser=Server.CreateObject("Adodb.RecordSet")
sqluser="select * from tbuser order by userid"
rsuser.open sqluser,conn,3,2
if rsuser.recordcount>=20 then
rsuser.move 20
do while not rsuser.eof
rsuser.delete
rsuser.update
rsuser.movenext
loop
flag=1
end if
Set rspaper=Server.CreateObject("Adodb.RecordSet")
sqlpaper="select * from tbpaper order by paperno"
rspaper.open sqlpaper,conn,3,2
if rspaper.recordcount>=1000 then
rspaper.move 1000
do while not rspaper.eof
rspaper.delete
rspaper.update
rspaper.movenext
loop
flag=1
end if
%> <caption>
<p align="right">
<input type="submit" value="保 存" name="button" onclick="saveit(adminsubject)" class="s02"></p>
</caption>
</table> </form>
<br><font color="#FF0000">考试前,请打开题库</font><br>
<br>
<input type="submit" value="班级权限管理" name="I8" onclick="power(adminsubject)" class="s02">
</center>
<input type="hidden" name="chapter" size="40" value="1">
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -