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

📄 menu.asp

📁 这是我根据动网新闻核心自行设计的校园新闻系统
💻 ASP
字号:
<!--#include file="../login/check.asp"-->
<!--#include file="../../inc/conn.asp"-->
<!--#include file="../../inc/config.asp"-->

<head>

<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
<title><%=rs_config("WebName")%>--管理页面</title>

<style type=text/css>
body  { background:#799AE1; margin:0px; font:9pt 宋体; 
scrollbar-face-color:#A8DA83;
scrollbar-highlight-color:#A8DA83;
scrollbar-3dlight-color:#CDE7BB;
scrollbar-darkshadow-color:#CDE7BB;
scrollbar-shadow-color:#A8DA83;
scrollbar-arrow-color:#53876D;
scrollbar-track-color:#CDE7BB;}
table  { border:0px; }
td  { font:normal 12px 宋体; }
img  { vertical-align:bottom; border:0px; }
a  { font:normal 12px 宋体; color:#53876D; text-decoration:none; }
a:hover  { color:#154A5F;text-decoration:none; }
.sec_menu  { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#D6DFF7; }
.menu_title  { }
.menu_title span  { position:relative; top:2px; left:8px; color:#154A5F; font-weight:bold; }
.menu_title2  { }
.menu_title2 span  { position:relative; top:2px; left:8px; color:#428EFF; font-weight:bold; }
</style>

<SCRIPT language=javascript1.2>
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
</SCRIPT>
<%
   Dim rs_menu,sql_menu,X_max
   set rs_menu=server.createobject("adodb.recordset")
   sql_menu="select distinct menu_1 from [menu]"
   rs_menu.open sql_menu,conn,1,1
   X_max=rs_menu.recordcount

dim menu()
redim menu(X_max-1,10)

Dim x
For x= 0 To (X_max-1)
	Dim rs_menu2,sql_menu2
	set rs_menu2=server.createobject("adodb.recordset")
	sql_menu2="select * from [menu] where menu_1=" & x & " order by menu_2"
	rs_menu2.open sql_menu2,conn,1,1
	Dim y
	y=0
	Do While Not rs_menu2.eof
	  If y=0 Then
	  menu(x,y)=rs_menu2("Menuname")
	  else
	  menu(x,y)="<a href="&rs_menu2("MenuUrl")&" target=main>"&rs_menu2("Menuname")&"</a>"
	  End If
	y=y+1
	rs_menu2.movenext
	Loop
	Set rs_menu2 = nothing
Next

%>
<base target="JyDown_w3">
</head>

<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" style="background-color: #CDE7BB">

<table width=100% cellpadding=0 cellspacing=0 border=0 align=left>
    <tr>
		<td valign=top>
		<table cellpadding=0 cellspacing=0 width=158 align=center>
			<tr>
				<td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title';>
				<a href="main.asp" target=_top><b>管理首页</b></a> | <a href="../login/logout.asp" target=_top><b>退出</b></a> | <a href="menu_list.asp" target=main><b>菜单</b></a></td>
			</tr>
		</table>
<%
	dim j
	dim tmpmenu
	dim menuname
	dim menurl
for i=0 to ubound(menu,1)
If menu(i,0)<>"" Then

%>
<div align="center">
<table cellpadding=0 cellspacing=0 width=185>
  <tr>
    <td  style="cursor:hand" height=24 class=menu_title onmouseout=this.className='menu_title'; bgcolor=#cccccc id=menuTitle1 onclick="showsubmenu(<%=i%>)" background="images/headtitle.gif" width="195">
	  <span><%=menu(i,0)%></span>
	</td>
  </tr>
  <tr>
    <td style="border:1px solid #53876D; display:" id='submenu<%=i%>' bgcolor="#CDE7BB">
<div style="width:183px; height:20px">
<table cellpadding=0 cellspacing=0 align=center width=135>
	<%
	for j=1 to ubound(menu,2)
	if isempty(menu(i,j)) then exit for
	%>
<tr height=24><td height=23><FONT COLOR="white"><%=menu(i,j)%></FONT></td></tr>
<%
	next
%>
</table>

	  </div>
	</td>
  </tr>
  <tr>

  <td height=8>

  </td></tr>
</table>


</div>
<%End If

next%>

	  </div>
	</td>
  </tr>
</table>

<%
rs_menu.close
Set rs_menu=nothing
Call configclose()
Call connclose()
%>

⌨️ 快捷键说明

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