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

📄 category_list.asp

📁 这是我根据动网新闻核心自行设计的校园新闻系统
💻 ASP
字号:
<%
pageadmin=10
%>
<!-- #include file="../login/check.asp" -->
<!-- #include file="../../inc/conn.asp" -->
<!-- #include file="../../inc/function.asp" -->
<!-- #include file="../category/category_class.asp" -->
<%
	dim deep
	dim categorytype
	categorytype=dishtml(request.querystring("categorytype"))
	if categorytype="" then
		response.write "参数错误"
		response.end
	end if
	deep=request.querystring("deep")
	if deep=empty then
		deep=0
	end if	
	dim ct
	set ct=new LBCategory
	ct.CategoryType=categorytype
	dim ctlist
	ctlist=ct.list("-1")
	set ct=nothing
	
%>
<head>
<link rel="stylesheet" type="text/css" href="../../inc/lbstyle.css">
</head>
<body>
<div align="center">

<div align="center">
	<table border="0" width="100%" id="table4" class="table" style="border-width: 0">
		<tr>
			<td><font class=headtext><%=CategoryType%>类别管理</font></td>
		</tr>
		<tr>
			<td> </td>
		</tr>
	</table>
</div>
<table border="1" width="100%" id="table1" class=table>
	<tr class=headtr><form name="form1" method="POST" action="category_save.asp?action=add&fid=-1&categorytype=<%=categorytype%>&deep=<%=deep%>">

		<td class=td>&nbsp;根目录 
		<input type="text" name="categoryname" size="20" class=text>
		<input type="submit" value="新增一级分类" name="B1" class=button>&nbsp;&nbsp;
		<a href="javascript:delall();">
		删除所有类别</a></td></form>
	</tr>
	<%for i=1 to ubound(ctlist)%>
	<tr>
	<form name="form<%=i%>" method="POST" action="category_save.asp?action=add&fid=<%=ctlist(i,2)%>&categorytype=<%=categorytype%>&deep=<%=deep%>">
		<td class=tr<%if i mod 2=0 then response.write "1"%> height="25">
		<table border="0" width="100%" id="table3">
			<tr>
				<td> <a title="" href="category_redirect.asp?categorytype=<%=ctlist(i,4)%>&categoryid=<%=ctlist(i,2)%>"><%=ctlist(i,0)%></a>&nbsp;
				<A HREF="category_order.asp?action=up&id=<%=ctlist(i,1)%>&categorytype=<%=categorytype%>&deep=<%=deep%>">上移</A>&nbsp;<A HREF="category_order.asp?action=down&id=<%=ctlist(i,1)%>&categorytype=<%=categorytype%>&deep=<%=deep%>">下移</A></td>
				<td width="319"> 
		<p align="center">&nbsp;
		<%if len(ctlist(i,2))/5<cint(deep) or deep=0 then%>
		<input type="text" name="categoryname" size="11" class=text>
		<input class=button type="submit" value="添加下级分类" name="B2">&nbsp; 
		<%end if%>		
		<a href="category_mod.asp?categoryid=<%=ctlist(i,2)%>&categorytype=<%=categorytype%>&deep=<%=deep%>">改名</a>&nbsp;
		<a href="javascript:del('<%=ctlist(i,2)%>','<%=categorytype%>','<%=deep%>');">删除</a></td>
			</tr>
		</table>
		</td></form>
	</tr>
	<%next%>
</table>
</div>
<script>
function delall()
{
	var ch;
	ch=window.confirm("是否删除所有类别?");
	if (ch)
	{
		location.href="category_save.asp?action=del&categoryid=-1&categorytype=<%=categorytype%>&deep=<%=deep%>";
	}
	
}
function del(categoryid,categorytype,deep)
{
	var ch;
	ch=window.confirm("是否删除该类别以及下面的所有类别?");
	if (ch)
	{
		location.href="category_save.asp?action=del&categoryid="+categoryid+"&categorytype=<%=categorytype%>&deep=<%=deep%>";
	}
}
</script>
</body>
<%
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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