• 我们的专业品牌服务商:网站建设、品牌策划设计、网站优化、网站推广等业务
    • 龙诚微博
    • 站点导航
    • 免费建站
专业的互联网络解决方案、完善的售后服务体系 —— 龙诚互联(温州网络公司 温州网站建设),当前IP:
龙诚简介 | 企业文化 | 我们的优势 | 龙诚人 | 招兵募马
龙诚动态 | 行业新闻 | 我们的观点 | 公司公告
标准企业站 | 外贸商务站| 商城门户站 | 品牌动画站 | 在线订制
网站制作流程 | 建站知识 | 网站SEO优化 | 域名&空间 | 网站备案 | 下载中心
联系方式 | 留言反馈
  • 新闻中心
    • 龙诚动态
      行业新闻
      我们的观点
      公司公告
      建站技术
      网站SEO优化
      网站制作流程
      产品报价
      联系我们
      • 联系电话:0577-55882408
      • 传真号码:0577-55882411
      • 联系手机:15224122065
      • 联系地址:温州市瓯海站南商贸城C幢306
      • 新闻中心 首页-新闻中心-我们的观点
      • ASPXML制作菜单管理
      • 发布时间:2011-9-11 18:02:03 ‖ 
      • menu.asp 这个是前台执行部分

        以下是引用片段:
        QUOTE:
        <%

        ’读取XML文件函数
        Function YCMS_menu()
        dim menu_temp,m
        Set goxml=Server.CreateObject("Microsoft.XMLDOM")
        goxml.load(Server.MapPath("menu.xml"))
        Set goroot=goxml.documentElement.selectSingleNode("menu")
        m=0
        For each child in goroot.childNodes
        set childmenu=goroot.childnodes.item(m)

        Dim menu_open,menu_title,menu_url
        menu_open=childmenu.getAttributeNode("open").nodeValue
        menu_name=childmenu.getAttributeNode("name").nodeValue
        menu_url=goroot.childNodes.item(m).text
        ’判断是否是弹出窗口
        If menu_open=0 Then
        ’判断是否是第一个,若是第一个则去掉"┊"
        If m=0 Then
        menu_temp=menu_temp&"<a href=’"&menu_url&"’>"&menu_name&"</a>"
        Else
        menu_temp=menu_temp&"┊<a href=’"&menu_url&"’>"&menu_name&"</a>"
        End If
        Else
        If m=0 Then
        menu_temp=menu_temp&"<a href=’"&menu_url&"’ target=’o’>"&menu_name&"</a>"
        Else
        menu_temp=menu_temp&"┊<a href=’"&menu_url&"’ target=’o’>"&menu_name&"</a>"
        End If
        End If
        set childmenu=nothing
        m=m+1
        next
        set goroot=nothing
        set goxml=nothing
        YCMS_menu=menu_temp
        End Function
        ’输出XML菜单
        response.write(YCMS_menu())
        %>


        menu.xml XML数据文件

         

        以下是引用片段:
        QUOTE:
        <?xml version="1.0" encoding="gb2312"?>
        <xml>
        <menu>
        <url name="网站首页" open="0">index.asp</url>
        <url name="新闻动态" open="0">News.asp</url>
        <url name="文章中心" open="0">Art.asp</url>
        <url name="图片展示" open="0">Pic.asp</url>
        <url name="影音娱乐" open="0">Dj.asp</url>
        <url name="资源下载" open="0">Down.asp</url>
        <url name="留言讨论" open="0">Book.asp</url>
        <url name="友情连接" open="0">Link.asp</url>
        </menu>
        </xml>

        admin_menu.asp 后台管理XML文件部分

         
        以下是引用片段:
        QUOTE:
        <%
        ’利用ADO.Stream组件保存文件
        Function Save(file_body,file_name)
        Set OS=Server.CreateObject("ADODB.Stream")
        OS.Type=2
        OS.Open
        OS.Charset="GB2312"
        OS.Position=OS.Size
        OS.WriteText=file_body
        OS.SaveToFile Server.MapPath(file_name),2
        OS.Close
        Set OS=Nothing
        End Function
        if Request.QueryString("action")="ok" then
        call Save(Request.Form("content"),"menu.xml")
        end if
        %>
        <html>
        <head>
        <title></title>
        </head>
        <body>
        <form action="?action=ok" method="post">
        <textarea style=’width:500px;height:200px;’ name=’content’>
        <%=server.execute("menu.xml")%>
        </textarea>
        <input type=’submit’ value=’修 改’ />
        </form>
        </body>
        </html>

        转载请注明:原文出自 http://www.lcnt.net/news_show/lcnt_details_3_197.html
        上一篇:一日精通Ajax技术
        下一篇:
        云叫板百度搜索底气在哪
        【置顶】 【关闭本页】 【打印本页】
      分享到: QQ空间 新浪微博 人人网 开心网 更多


  • 地址:温州市瓯海区站南商贸城C幢306室
    总机:0577-55882408;传真:0577-55882411
    E-mail:115047027@qq.com
  • 业务咨询:0577-55882401
    售后热线:0577-55882408
    技术咨询:0577-55882411
  • 龙诚互联在线服务
    龙诚互联在线服务
    龙诚互联在线服务
  • copyright © 温州龙诚互联 版权所有
    浙ICP备11044124号-1
    您是第 位访客