Admin_Menu.asp
资源名称:haohj.rar [点击查看]
上传用户:angela
上传日期:2022-05-11
资源大小:853k
文件大小:7k
源码类别:
外挂编程
开发平台:
ASP/ASPX
- <!--#include file="setup.asp"-->
- <!--#include file="check.asp"-->
- <%
- If Not CheckAdmin("MenuList") Then
- Server.Transfer("showerr.asp")
- Response.End
- End If
- '=====================================================================
- ' 作者声明:转载请保留版权信息,鄙视不要脸的人
- '=====================================================================
- ' 程序名称:蓝宇网络发布系统
- ' 程序作者:蓝宇 QQ:18159079 ╲、随心゛ QQ:6821845
- ' 文件名称:Admin_Menu.asp
- ' 更新日期:2007-6-5
- '=====================================================================
- ' 联系方式:Tel:13203117383,QQ:18159079,hi.baidu.com/hezeyu
- ' 程序开发:蓝宇,╲、随心゛
- ' 官方网站:蓝宇网络(http://hi.baidu.com/hezeyu)
- '=====================================================================
- ' Copyright 2004-2007 蓝宇 - All Rights Reserved.
- '=====================================================================
- Dim NewMenuID, num
- titlename="网站导航管理"
- Admin_header
- Response.Write "<table border=""0"" cellspacing=""1"" cellpadding=""3"" align=center class=""tableBorder"">"
- Response.Write " <tr>"
- Response.Write " <th colspan=6>网站菜单管理</th>"
- Response.Write " </tr>"
- Response.Write "<tr>"
- Response.Write "<td " & LeftClass & "><b>管理选项:</b><a href=""Admin_Menu.asp"">菜单列表</a> | <a href=""?action=newmenu"">添加菜单</a></td>"
- Response.Write "</tr>"
- Response.Write "</table>"
- Response.Write "<br>"
- sql="select * from Gq_menu order by menuid asc"
- set rs=server.CreateObject("adodb.recordset")
- rs.open sql,conn,1,3
- newmenuid=rs.recordcount+1
- select case request("action")
- case "newmenu"
- call newmenu()
- Case Else
- call menu()
- end select
- sub newmenu()%>
- <table width=98% align="center" border="0" cellspacing="1" cellpadding="2" class="tableBorder">
- <form method="post" name="form" id="form">
- <tr>
- <th colspan="2">菜单管理--添加菜单</th>
- </tr>
- <tr>
- <td width="15%" align="right" class="TableRow1">菜单名称:</td>
- <td class="TableRow1"><input name="menutitle" type="text" id="menutitle" size="20"></td>
- </tr>
- <tr>
- <td width="15%" align="right" class="TableRow1">菜单顺序:</td>
- <td class="TableRow1"><input name="menuid" type="text" id="menuid" size="20" value="<%=newmenuid%>"></td>
- </tr>
- <tr>
- <td width="15%" align="right" class="TableRow1">菜单地址:</td>
- <td class="TableRow1"><input name="menuurl" type="text" id="menuurl" size="20"></td>
- </tr>
- <tr>
- <td width="15%" align="right" class="TableRow1">菜单说明:</td>
- <td class="TableRow1"><input name="menucontent" type="text" id="menucontent" size="20"></td>
- </tr>
- <tr>
- <td width="15%" align="right" class="TableRow1">打开方式:</td>
- <td class="TableRow1"><input type="radio" name="menuopen" value=true> 新窗口 <input name="menuopen" type="radio" value=false checked> 原窗口</td>
- </tr>
- <tr>
- <td width="15%" align="right" class="TableRow1">显示方式:</td>
- <td class="TableRow1"><input type="radio" name="menufoot" value=false checked> 顶部导航 <input name="menufoot" type="radio" value=true > 底部导航</td>
- </tr>
- <tr>
- <td class="TableRow1" colspan="2" height="30" align="center"><input name="menupass" value="1" type="hidden"><input class=Button name="new" type="submit" id="new" value=" 发 布 "> <input class=Button name="Submit2" type="reset" value=" 清 空 "></td>
- </tr>
- </form>
- </table>
- <%end sub
- sub menu()%>
- <table width=98% align="center" border="0" cellspacing="1" cellpadding="2" class="tableBorder">
- <tr>
- <th width="4%">开关</th>
- <th width="8%">菜单顺序</th>
- <th width="18%">菜单名称</th>
- <th width="*">菜单地址</th>
- <th width="15%">菜单说明</th>
- <th width="12%">显示方式</th>
- <th width="12%">打开方式</th>
- <th width="12%">操作</th>
- </tr>
- <%if not rs.bof and not rs.eof then
- num=1
- do while not rs.eof%>
- <tr height="25" class="TableRow2" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#efefef'">
- <form method="post">
- <td align=center class="TableRow2"><input name="menupass" type="checkbox" id="menupass" value=true <%if rs("menupass")=true then response.write "checked" end if%>></td>
- <td align=center class="TableRow2"><input name="menuid" type="text" id="menuid" value="<%=rs("menuid")%>" size="3"></td>
- <td align=center class="TableRow2"><input name="menutitle" type="text" id="menutitle" value="<%=rs("menutitle")%>" size="12"></td>
- <td align=center class="TableRow2"><input name="menuurl" type="text" id="menuurl" value="<%=rs("menuurl")%>" size="16"></td>
- <td align=center class="TableRow2"><input name="menucontent" type="text" id="menucontent" value="<%=rs("menucontent")%>" size="12"></td>
- <td align=center class="TableRow2">
- <select name=menufoot>
- <option value=false <%if rs("menufoot")=false then response.write "selected"%>>顶部导航</option>
- <option value=true <%if rs("menufoot")=true then response.write "selected"%>>底部导航</option>>
- </select>
- </td>
- <td align=center class="TableRow2"><input type="radio" name="menuopen" value=true <%if rs("menuopen")=true then response.Write"checked" end if%>> 新窗口<br><input name="menuopen" type="radio" value=false <%if rs("menuopen")=false then response.Write"checked" end if%>> 原窗口 </td>
- <td align=center class="TableRow2"><input class=Button type="submit" name="edit" id=edit value="修改"> <input class=Button name="del" type="submit" id="del" value="删除">
- <input name="id" type="hidden" id="id" value="<%=rs("id")%>"></td></tr>
- </form>
- <%
- num=num+1
- rs.movenext
- loop
- end if
- rs.close
- set rs=nothing
- Response.Write("</table>")
- end sub
- if request.Form("del")<>""then
- Conn.Execute("Delete * From Gq_menu Where id="&Request.Form("id"))
- Response.Write("<script language=javascript>alert('删除成功!');this.location.href='admin_menu.asp';</script>")
- call CloseConn()
- response.end
- elseif request.form("edit")<>"" then
- set rs=server.CreateObject("adodb.recordset")
- sql="select * from Gq_menu where id="&request("id")
- rs.open sql,conn,1,3
- rs("menutitle")=request.Form("menutitle")
- rs("menuid")=request.Form("menuid")
- rs("menuurl")=request.Form("menuurl")
- rs("menucontent")=request.Form("menucontent")
- rs("menuopen")=request.Form("menuopen")
- rs("menufoot")=request.Form("menufoot")
- if trim(request.form("menupass"))="" then
- rs("menupass")="false"
- end if
- if trim(request.form("menupass"))="true" then
- rs("menupass")="true"
- end if
- rs.update
- rs.close
- Response.Write("<script language=javascript>alert('修改成功!');this.location.href='admin_menu.asp';</script>")
- call CloseConn()
- response.end
- set rs=nothing
- elseif request.form("new")<>"" then
- set rs=server.CreateObject("adodb.recordset")
- rs.open "Gq_menu",conn,1,3
- rs.addnew
- rs("menutitle")=request.Form("menutitle")
- rs("menuid")=request.Form("menuid")
- rs("menuurl")=request.Form("menuurl")
- rs("menuopen")=request.Form("menuopen")
- rs("menufoot")=request.Form("menufoot")
- rs("menupass")=request.Form("menupass")
- if trim(request.form("menufoot"))="true" then
- rs("menucontent")=request.Form("menucontent")
- end if
- rs.update
- rs.close
- set rs=nothing
- response.write"<script>alert('添加成功!');location.href='admin_menu.asp';</script>"
- end if
- Admin_footer
- CloseConn
- %>