📄 menu_list.asp
字号:
<%
pageadmin=10
%>
<!--#include file="../login/check.asp"-->
<!--#include file="../../inc/conn.asp"-->
<!--#include file="../../inc/function.asp"-->
<!--#include file="../../inc/sql.asp"-->
<script>
function del(id)
{
var ch;
ch=window.confirm("是否删除此菜单,其子菜单也同时全部删除?");
if (ch)
{
location.href="menu_save.asp?action=del&id="+id;
}
}
</script>
<link rel="stylesheet" type="text/css" href="../../inc/lbstyle.css">
<body marginheight=0 marginwidth=0 leftmargin=0>
<%
Dim maxperpage
maxperpage=40
Dim tablename
tablename="menu"
Dim condition
condition="order by Menu_1,Menu_2"
Dim Totalput
Dim Currentpage
Dim Totalpages
Dim I,j
If Not Isempty(request("page")) Then
Currentpage=cint(request("page"))
Else
Currentpage=1
End If
Dim Rs
Dim Sql
Dim Idlist,menu
set rs=server.createobject("adodb.recordset")
sql="select * from ["&tablename&"] "&condition&""
rs.open sql,conn,1,1
totalcount=rs.recordcount
'***********************************分页
count=40
if count<=0 then
count=40
end if
if not rs.eof then
rs.pagesize=count
pagecount=rs.pagecount
if request("page")="" then
nowpage=1
else
nowpage=int(request("page"))
end if
if nowpage>=rs.pagecount then
nowpage=rs.pagecount
elseif nowpage<=1 then
nowpage=1
end if
rs.absolutepage=nowpage
else
pagecount=1
nowpage=1
end if
a=1
Call showContent()
function showContent
%>
<center>
<TABLE border="0" cellspacing="1" cellpadding="1" bgcolor="#efefef">
<TR height=20 bgcolor="#235497" class="headtr">
<TD width="40" align="center">排序</td>
<TD width="120" align="center">菜单名</td>
<form name="addclass" method="post" action="menu_save.asp?action=add">
<TD width="450" align="center">添加一级菜单
<input type="text" name="MenuName" size="15" class="text">
<input type=submit value="添加" class="button"> <a href="menu.asp" target=menu>刷新左侧菜单</a>
</td>
</form>
<TD width="32" align="center">删除
</TR>
<%do while not rs.eof And a<count%>
<% If rs("Menu_2")="0" Then %>
<TR bgcolor="#f0f0f0">
<TD width="40" align="center">
<A HREF="setMenuOrder.asp?action=up&id=<%=rs("id")%>&place=menu_1&menu_1=<%=rs("Menu_1")%>" title="上移"><B><FONT COLOR="red">↑</FONT></B></A>
<A HREF="setMenuOrder.asp?action=down&id=<%=rs("id")%>&place=menu_1&menu_1=<%=rs("Menu_1")%>" title="下移"><B><FONT COLOR="red">↓</FONT></B></A>
</td>
<form name="editclass" method="post" action="menu_save.asp?id=<%=rs("id")%>&action=edit">
<TD align="left">
<input type="text" name="MenuName" size="15" style="border:0px;background-color:#f0f0f0;height=14px;font-size=12;" value="<%=rs("MenuName")%>">
<input type=submit value="修改" style="border:0px solid ;font-size=12">
</td>
</form>
<form name="addsmallclass" method="POST" action="menu_save_small_class.asp?menu_1=<%=rs("menu_1")%>">
<TD align="right">
分类名:<input type="text" name="smallclassname" size="15" style="border: 1px solid #154A5F;background-color:#f0f0f0;height=15px">
Url:<input type="text" name="smallclassurl" size="30"style="border: 1px solid #154A5F;background-color:#f0f0f0;height=15px">
<input type=submit value="添加子菜单" style="border:0px solid ;font-size=12;width=65px">
</td>
</form>
<% Else %>
<TR bgcolor="#ffffff">
<TD width="40" align="center">
<A HREF="setMenuOrder.asp?action=up&id=<%=rs("id")%>&place=menu_2&menu_1=<%=rs("Menu_1")%>&menu_2=<%=rs("Menu_2")%>" title="上移"><B><FONT COLOR="green">↑</FONT></B></A>
<A HREF="setMenuOrder.asp?action=down&id=<%=rs("id")%>&place=menu_2&menu_1=<%=rs("Menu_1")%>&menu_2=<%=rs("Menu_2")%>" title="下移"><B><FONT COLOR="green">↓</FONT></B></A>
</td>
<form name="editsmallclass" method="post" action="menu_save.asp?id=<%=rs("id")%>&action=edit">
<TD align="left">
<input type="text" name="MenuName" size="20" style="border:0px;background-color:white;height=14px;font-size=12" value="<%=rs("MenuName")%>">
</td>
<TD align="left">
<input type="text" name="MenuUrl" size="75" style="border:0px;background-color:white;height=14px;font-size=12" value="<%=rs("MenuUrl")%>">
<input type=submit value="修改" style="border:0px solid ;font-size=12">
</td>
</form>
<%End if%>
<TD align="center"><A HREF="menu_list.asp?selAnnounce=<%=cstr(rs("id"))%>">
<a href="javascript:del('<%=cstr(rs("id"))%>');">
<FONT COLOR="purple">删除</FONT></a>
</td>
</TR>
<% a=a+1
rs.movenext
LOOP
%>
<TR><TD colspan="8" bgcolor="#ffffff"><%Call showpage (totalcount,pagecount,currentpage,"menu_list.asp")%></TD></TR>
</TABLE>
<%
end function
Call connclose()
%>
</CENTER>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -