📄 admin_classmana.asp
字号:
<!--#include file="function.asp"-->
<%checkadmint
mclassid=request("classid")%>
<!--#include file="top.asp"-->
<script language="javascript">
<!--
function test() {
return confirm("警告!\n将同时删除该栏目的所有内容!是否继续?");
}
//-->
</script>
<table border="0" width=770 align=center cellspacing="1" cellpadding="1" bgcolor="<%=Tablebackcolor%>">
<tr>
<td bgcolor="<%=Tabletitlecolor%>" align="center" width="163" valign="top"> <br>
<!--#include file="admin_left.asp"-->
</td>
<td bgcolor="<%=Tablebodycolor%>" width="600" height="2" align="center">
<table width="534" border="0" cellspacing="1" cellpadding="3" bgcolor="#333333" align="center">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from class"
rs.open sql,conn,1,1
if rs.eof then
response.write "<form name=form method=post action=admin_classsave.asp?action=add>"&_
"<tr bgcolor="&Tabletitlecolor&" align=center> "&_
"<td colspan=3>一级栏目管理</td>"&_
"</tr>"&_
"<tr bgcolor=#FFFFEE> "&_
"<td width=113 align=right nowrap><font color=#663333>增加栏目:</font></td>"&_
"<td width=272>"&_
" <input type=text name=Newclass size=30>"&_
"</td>"&_
" <td width=127 align=center> "&_
" <input type=submit name=add value=增 加>"&_
" </td>"&_
" </tr>"&_
" </form>"&_
"</table>"&_
"</td></tr></table>"
%>
<!--#include file=copyright.asp-->
<%response.end
else
if mclassid="" then
mclassid=rs("classid")
end if
%>
<form name="form" method="post" action="admin_classsave.asp?action=add">
<tr bgcolor="<%=Tabletitlecolor%>" align="center">
<td colspan="3">一级栏目管理</td>
</tr>
<tr bgcolor="#FFFFEE">
<td width="113" align="right" nowrap><font color="#663333">增加栏目:</font></td>
<td width="272">
<input type="text" name="Newclass" size="30">
</td>
<td width="127" align="center">
<input type="submit" name="add" value="增 加">
</td>
</tr>
</form>
<form name="form" method="post" action="admin_classsave.asp?action=edit">
<tr bgcolor="#FFFFEE">
<td width="113" align="right" nowrap><font color="#663333">修改栏目:</font></td>
<td width="272">
<input type="text" name="Newclass" size="20">
<select name="classid">
<% do while not rs.eof
response.write"<option value="&rs("Classid")&">"&rs("Class")&"</option>"
rs.movenext
loop
%>
</select>
</td>
<td width="127" align="center">
<input type="submit" name="edit" value="修 改">
</td>
</tr>
</form>
<%rs.MoveFirst%>
<form name="form" method="post" action="admin_classsave.asp?action=del" onsubmit="return test();">
<tr bgcolor="#FFFFEE">
<td width="113" align="right" nowrap><font color="#663333">删除栏目:</font></td>
<td width="272">
<select name="classid">
<% do while not rs.eof
response.write"<option value="&rs("Classid")&">"&rs("Class")&"</option>"
rs.movenext
loop
%>
</select>
</td>
<td width="127" align="center">
<input type="submit" name="del" value="删 除">
</td>
</tr>
</form>
</table>
<br>
<table width="534" border="0" cellspacing="1" cellpadding="3" bgcolor="#333333" align="center">
<tr bgcolor="<%=Tabletitlecolor%>">
<td colspan="3" align="center">二级栏目管理</td>
</tr>
<form name="form" method="post" action="admin_nclasssave.asp?action=add&classid=<%=mclassid%>">
<tr bgcolor="<%=Tabletitlecolor%>">
<td align="right">选择二级:</td>
<td colspan="2">
<select name="classid" size="1" onchange="window.open('admin_classmana.asp?classid='+this.options[this.selectedIndex].value,'_self')">
<%
rs.MoveFirst
do while not rs.eof
response.write "<option"
if cstr(request("classid"))=cstr(rs("classid")) and request("classid")<>"" then
mclassid=request("classid")
response.write " selected"
end if
response.write" value="&CStr(rs("classID"))&" name=classid>"&rs("class")&"</option>"
rs.movenext
loop
%>
</select>
(请先选择栏目再进行下面的相应操作!) </td>
</tr>
<%end if
rs.close%>
<tr bgcolor="#FFFFEE">
<td width="113" align="right" nowrap><font color="#663333">增加栏目:</font></td>
<td width="272">
<input type="text" name="NewNclass" size="30">
</td>
<td width="127" align="center">
<input type="submit" name="add" value="增 加">
</td>
</tr>
</form>
<form name="form" method="post" action="admin_nclasssave.asp?action=edit&classid=<%=mclassid%>">
<tr bgcolor="#FFFFEE">
<td width="113" align="right" nowrap><font color="#663333">修改栏目:</font></td>
<td width="272">
<input type="text" name="NewNclass" size="20">
<select name="Nclassid">
<%
sql="select * from nclass where Classid="&mclassid
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
response.write"<option value="&rs("NClassid")&">"&rs("NClass")&"</option>"
rs.movenext
loop
%>
</select>
</td>
<td width="127" align="center">
<input type="submit" name="edit" value="修 改">
</td>
</tr>
</form>
<%rs.MoveFirst%>
<form name="form" method="post" action="admin_nclasssave.asp?action=del&classid=<%=mclassid%>" onsubmit="return test();">
<tr bgcolor="#FFFFEE">
<td width="113" align="right" nowrap><font color="#663333">删除栏目:</font></td>
<td width="272">
<select name="Nclassid">
<%
do while not rs.eof
response.write"<option value="&rs("NClassid")&">"&rs("NClass")&"</option>"
rs.movenext
loop
%>
</select>
</td>
<td width="127" align="center">
<input type="submit" name="del" value="删 除">
</td>
</tr>
</form>
<%else
response.write"<option>暂无栏目</option>"&_
"</select>"&_
"</td>"&_
"<td width=127 align=center> "&_
" <input type=submit name=edit value=修 改 disabled>"&_
"</td>"&_
"</tr>"&_
"</form>"&_
"<tr bgcolor=#FFFFEE>"&_
"<td width=113 align=right nowrap><font color=#663333>删除栏目:</font></td>"&_
"<td width=272> "&_
"<select name=Nclassid>"&_
"<option>暂无栏目</option>"&_
"</select>"&_
"</td>"&_
"<td width=127 align=center>"&_
"<input type=submit name=del value=删 除 disabled>"&_
"</td>"&_
"</tr>"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</table>
</td>
</tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -