| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1031 人关注过本帖
标题:函数封装问题
只看楼主 加入收藏
bossyy2
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-6-17
收藏
 问题点数:0 回复次数:7 
函数封装问题
asp菜鸟问题 我想改asp模板时候发现 有几个1级菜单无法修改连接地址

请问大大们 怎么改 ...



'=================================================
'过程名:ShowRootClass_Menu
'作  用:显示一级栏目(下拉菜单效果)
'参  数:Language     -----语言    1-中文  2-英文   
'=================================================
sub ShowRootClass_Menu(Language)
    response.write "<script type='text/javascript' language='JavaScript1.2'>" & vbcrlf & "<!--" & vbcrlf
    response.write "stm_bm(['uueoehr',400,'','images/blank.gif',0,'','',0,0,0,0,0,1,0,0]);" & vbcrlf
    response.write "stm_bp('p0',[0,4,0,0,2,2,0,0,100,'',-2,'',-2,90,0,0,'#000000','transparent','',3,0,0,'#000000']);" & vbcrlf
    response.write "stm_ai('p0i0',[0,'','','',-1,-1,0,'','_self','','','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#000000','#000000','#000000','9pt Tahoma','9pt Tahoma',0,0]);" & vbcrlf
    if Language=1 then
    response.write "stm_aix('p0i1','p0i0',[0,'首页','','',-1,-1,0,'index_1.asp ','_self','index_1.asp','','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#ff0000','#333333','#cc0000','9pt Tahoma','9pt Tahoma']);" & vbcrlf
    else
    response.write "stm_aix('p0i1','p0i0',[0,'Home','','',-1,-1,0,'Enindex.asp ','_self','Enindex.asp','','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#ff0000','#000000','#cc0000','9pt Tahoma','9pt Tahoma']);" & vbcrlf
    end if
    response.write "stm_aix('p0i2','p0i0',[0,'|','','',-1,-1,0,'','_self','','','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#ffffff','#333333','#ffffff','9pt Tahoma','9pt Tahoma',0,0]);" & vbcrlf

    dim sqlRoot,rsRoot,j
    if Language=1 then
      sqlRoot="select ClassID,ClassName,Depth,NextID,LinkUrl,Child,Readme From MenuClass"
    else
      sqlRoot="select ClassID,ClassName,Depth,NextID,LinkUrl,Child,Readme From EnMenuClass"
    end if  
    sqlRoot= sqlRoot & " where Depth=0 and ShowOnTop=True order by RootID"
    Set rsRoot= Server.CreateObject("ADODB.Recordset")
    rsRoot.open sqlRoot,conn,1,1
    if not(rsRoot.bof and rsRoot.eof) then
        j=3
        do while not rsRoot.eof
            if rsRoot(4)<>"" then
                response.write "stm_aix('p0i"&j&"','p0i0',[0,'" & rsRoot(1) & "','','',-1,-1,0,'" & rsRoot(4) & "','_self','" & rsRoot(4) & "','" & rsRoot(6) & "','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#ff0000','#333333','#cc0000','9pt Tahoma','9pt Tahoma']);" & vbcrlf                            
            end if
            if rsRoot(5)>0 then
                if Language=1 then
                  call GetClassMenu(rsRoot(0),0,1)
                else
                  call GetClassMenu(rsRoot(0),0,2)
                end if   
            end if
            j=j+1
            response.write "stm_aix('p0i2','p0i0',[0,'|','','',-1,-1,0,'','_self','','','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#000000','#333333','#000000','9pt Tahoma','9pt Tahoma',0,0]);" & vbcrlf             
            j=j+1
            rsRoot.movenext
        loop
    end if
    rsRoot.close
    set rsRoot=nothing
    response.write "stm_em();" & vbcrlf
    response.write "//-->" & vbcrlf & "</script>" & vbcrlf    
end sub

sub GetClassMenu(ID,ShowType,Language)
    dim sqlClass,rsClass,k
    '1,4,0,4,2,3,6,7,100前4个数字控制菜单位置和大小
    if pNum=1 then
        response.write "stm_bp('p" & pNum & "',[1,4,0,4,2,3,6,7,100,'progid:DXImageTransform.Microsoft.Fade(overlap=.5,enabled=0,Duration=0.43)',-2,'',-2,67,2,3,'#999999','#EBEBEB','',3,1,1,'#aca899']);" & vbcrlf
    else
        if ShowType=0 then
            response.write "stm_bpx('p" & pNum & "','p" & pNum2 & "',[1,4,0,0,2,3,6]);" & vbcrlf
        else
            response.write "stm_bpx('p" & pNum & "','p" & pNum2 & "',[1,2,-2,-3,2,3,0]);" & vbcrlf
        end if
    end if
    
    k=0
    if Language=1 then
     sqlClass="select ClassID,ClassName,Depth,NextID,LinkUrl,Child,Readme From MenuClass"
    else
       sqlClass="select ClassID,ClassName,Depth,NextID,LinkUrl,Child,Readme From EnMenuClass"
    end if   
    sqlClass= sqlClass & " where ParentID=" & ID & " order by OrderID asc"
    Set rsClass= Server.CreateObject("ADODB.Recordset")
    rsClass.open sqlClass,conn,1,1
    do while not rsClass.eof
        if rsClass(4)<>"" then
            if rsClass(5)>0 then
                response.write "stm_aix('p"&pNum&"i"&k&"','p"&pNum2&"i0',[0,'" & rsClass(1) & "','','',-1,-1,0,'" & rsClass(4) & "','_self','" & rsClass(4) & "','" & rsClass(6) & "','','',6,0,0,'images/arrow_r.gif','images/arrow_w.gif',7,7,0,0,1,'#FFFFFF',0,'#cccccc',0,'','',3,3,0,0,'#fffff7','#ff0000','#000000','#cc0000','9pt Tahoma']);" & vbcrlf
                pNum=pNum+1
                pNum2=pNum2+1
                if Language=1 then
                  call GetClassMenu(rsClass(0),1,1)
                else
                  call GetClassMenu(rsClass(0),1,2)
                end if   
            else
                response.write "stm_aix('p"&pNum&"i"&k&"','p"&pNum2&"i0',[0,'" & rsClass(1) & "','','',-1,-1,0,'" & rsClass(4) & "','_self','" & rsClass(4) & "','" & rsClass(6) & "','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#FFFFFF',0,'','',3,3,0,0,'#fffff7','#ff0000','#000000','#cc0000','9pt Tahoma']);" & vbcrlf
            end if            
        end if
        k=k+1
        rsClass.movenext
    loop
    rsClass.close
    set rsClass=nothing
    response.write "stm_ep();" & vbcrlf    
end sub







我想修改网站首页 和企业简介的连接!!!

在线等回答  急用 谢谢大家了

123222.gif (88.37 KB)
图片附件: 游客没有浏览图片的权限,请 登录注册
搜索更多相关主题的帖子: 函数 封装 Language Menu 模板 
2008-06-22 11:00
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 
response.write "stm_aix('p0i1','p0i0',[0,'首页','','',-1,-1,0,'index_1.asp ','_self','index_1.asp','','','',0,0,0,'','',0,0,0,0,1,'#f1f2ee',1,'#cccccc',1,'','',3,3,0,0,'#fffff7','#ff0000','#333333','#cc0000','9pt Tahoma','9pt Tahoma']);" & vbcrlf

这个应该是首页。

企业简介的连接在数据库里改。

你也不给完整代码,只能瞎猜了
2008-06-22 11:17
bossyy2
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-6-17
收藏
得分:0 
回复 2# multiple1902 的帖子
恩 是的     问题是我找不到这个函数在那个数据库
2008-06-22 11:20
bossyy2
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-6-17
收藏
得分:0 
各位大大们 帮帮忙 真的很是急用谢谢了
2008-06-22 11:25
bossyy2
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-6-17
收藏
得分:0 
是不是在class_menu中调用,  可我找不到文件中有这个.asp的...
太烦躁了
2008-06-22 11:29
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 
stm_aix是客户端的函数,着重在“js”文件里找。

用查找功能查找含有“stm_aix”的代码,或者在客户端访问一个有效的网页查看stm_aix被包含在哪个脚本里,就这样
2008-06-22 11:35
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 
你可以动态跟踪程序运行嘛
2008-06-22 11:36
bossyy2
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2008-6-17
收藏
得分:0 
谢谢你 虽然我还是找不到怎么修改 就你一个人回答了.....

不知道怎么修改
2008-06-22 13:47
快速回复:函数封装问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.049096 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved