📄 classmana.asp
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<%option explicit%>
<!--#include file="conn.asp"-->
<%
if session("admin")="" then
response.redirect "admin.asp"
else
if session("flag")>1 then
response.write "<br><p align=center>您没有操作的权限</p>"
response.end
end if
end if
dim sql,sql2
dim rs
dim rs2
dim i
set rs=server.createobject("adodb.recordset")
sql="select * from Dclass order by classid"
rs.open sql,conn,1,1
set rs2=server.createobject("adodb.recordset")
sql2="select * from DNclass order by Nclassid"
rs2.open sql2,conn,1,1
if err.Number<>0 then
err.clear %>
<html><head><title>数据库操作失败</title></head><body><center> 数 据 库 操 作 失 败 !</center></body>
<% else %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>专题管理</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<script language="javascript">
<!--
function test(form) {
if ((form.options.value == "rename" && form.reTitle.value == "") || (form.options.value == "new" && form.newTitle.value == ""))
{alert("您没有填写专题名称,请填写");return false;}
if (form.options.value == "del")
{return confirm("将同时删除该专题中的所有内容!是否继续?");}
return true;
}
//-->
</script>
<body>
<br><br>
<form method="POST" action="classmana1.asp" align="center" language="javascript" onsubmit="return test(this);">
<input type="hidden" name="options" value>
<table border="0" cellpadding="0" cellspacing="0" width="95%" align="center">
<tr>
<td><div align="center"><center><p>类别: <select name="subject" size="1"
style="font-size: 9pt">
<%
Do while not rs.eof
response.write "<option value='" + Cstr(rs("classid")) + "'>" + rs("class") + "</option>"
rs.MoveNext
Loop
%>
</select>
<input type="submit" value="删除" name="B2" class=buttonface onclick="form.options.value='del'" ></td>
</tr>
<tr align="center">
<td><br>
</td>
</tr>
<tr align="center">
<td><p>新名字:<input type="text" name="reTitle" size="20" class=smallinput>
<input type="submit" value="改名" name="B1" class=buttonface onclick="form.options.value='rename'">
</td>
</tr>
<tr align="center">
<td><br>
</td>
</tr>
<tr align="center">
<td><p>新类别:<input type="text" name="newTitle" size="20" class=smallinput>
<input type="submit" value="新增" name="B3" class=buttonface onclick="form.options.value='new'"></td>
</tr>
</table>
</form>
<form method="POST" action="classmana2.asp" align="center" language="javascript" onsubmit="return test(this);">
<input type="hidden" name="options" value>
<table border="0" cellpadding="0" cellspacing="0" width="95%" align="center">
<tr>
<td align="center"><hr><b>子专题管理</b></td>
</tr>
<tr align="center">
<td><br>
</td>
</tr>
<tr>
<td><div align="center"><center><p>子专题: <select name="subject" size="1"
style="font-size: 9pt">
<%
Do while not rs2.eof
response.write "<option value='" + Cstr(rs2("Nclassid")) + "'>" + rs2("Nclass") + "</option>"
rs2.MoveNext
Loop
%>
</select>
<input type="submit" value="删除" name="B2" class=buttonface onclick="form.options.value='del'"></td>
</tr>
<tr align="center">
<td><br>
</td>
</tr>
<tr align="center">
<td><p>专题修改:<input type="text" name="reTitle" size="20" class=smallinput>
在 <select name="classid" size="1"
style="font-size: 9pt">
<%
rs.MoveFirst
Do while not rs.eof
response.write "<option value='" + Cstr(rs("classid")) + "'>" + rs("class") + "</option>"
rs.MoveNext
Loop
%>
</select> 中
<input type="submit" value="改名" name="B1" class=buttonface onclick="form.options.value='rename'"><br>(请选择上方相应子类别,然后输入新名字和选择类别)
</td>
</tr>
<tr align="center">
<td><br>
</td>
</tr>
<tr align="center">
<td><p>新专题:<input type="text" name="newTitle" size="20" class=smallinput>
在 <select name="psubject" size="1"
style="font-size: 9pt">
<%
rs.MoveFirst
Do while not rs.eof
response.write "<option value='" + Cstr(rs("classid")) + "'>" + rs("class") + "</option>"
rs.MoveNext
Loop
%>
</select> 中
<input type="submit" value="新增" name="B3" class=buttonface onclick="form.options.value='new'"></td>
</tr>
</table>
</form>
</body>
</html>
<%
rs.close
rs2.close
conn.close
set conn=nothing
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -