首页 > 网站 > joekoe cms4中主要类的作用及文件位置

joekoe cms4中主要类的作用及文件位置

2009年5月29日 发表评论 阅读评论

joekoe虽然设计比较不错,但是文档实在是太少了,这里以网站首页分析一下,为修改其他的方面做个参考。

<%
‘##########################################################
‘common\include\web.asp 文件,包含页面的公共处理方法
‘##########################################################
‘common\include\VOPS\FunctionSkin.asp 文件,,包含页面的皮肤方法
set skin=new FunctionSkin
‘##########################################################
‘common\include\config.asp 文件
sub doClear()
set ops=new VOPS
‘ops 控制着客户端请求和服务器的返回信息;
‘该类中定义了下面的几个对象;并为public类型
        set db=new VOPSDB
        set client=new VOPSClient
        set request=new VOPSRequest
        set server=new VOPSServer
        set time=new VOPSTime
‘##########################################################
‘common\include\VOPS\libConfig.asp 文件,
set cfg=new libConfig ‘作用是 读取系统的参数;

set app=new libConfigApp ‘应用程序对象
‘##########################################################
‘common\include\VOPS\PublicUser.asp 文件,
set user=new PublicUser
‘##########################################################
‘common\include\VOPS\FunctionChannel.asp 文件,
set chn=new FunctionChannel
‘##########################################################
‘common\include\VOPS\FunctionWeb.asp 文件,
set web=new FunctionWeb
‘##########################################################
‘common\include\VOPS\VOPS.Test.asp 文件,调试程序时使用,可以在页面中输出
set opsTest=new VOPSTest

%>
‘##########################################################
cms4的调试方法挺方便的,只需要增加一行代码:
输出数组:
debug opsTest.toArrayString(tmpAry,"tmpAry")
输出Tree 对象:
debug opsTest.toTreeString(tmpTree,"tmpTree")
输出Table 对象:
debug opsTest.toTableString(tmpTable,"tmpTable")
输出variable 对象:
debug opsTest.toVariable(tmpvariable,"tmpvariable")

以网站首页分析:
1、所有包含的页面:
<!– #include file="common/include/web.asp" –>
    <!– #include file="config.asp" –>
        <!– #include file="VOPS/VOPS.asp" –>
            <!– #include file="VOPS.util.asp" –>
            <!– #include file="VOPS.DB.asp" –>
            <!– #include file="VOPS.Client.asp" –>
            <!– #include file="VOPS.Request.asp" –>
            <!– #include file="VOPS.Server.asp" –>
            <!– #include file="VOPS.Time.asp" –>
            <!– #include file="VOPS.Template.asp" –>
            <!– #include file="VOPS.Function.asp" –>
            <!– #include file="VOPS.Test.asp" –>
        <!– #include file="../config/configure.asp" –>  ‘定义的系统常量,不可轻易改变
        <!– #include file="VOPS/libConfig.asp" –>
    <!– #include file="VOPS/PublicUser.asp" –>
    <!– #include file="VOPS/FunctionChannel.asp" –>
    <!– #include file="VOPS/FunctionLinkURL.asp" –>
    <!– #include file="VOPS/FunctionWeb.asp" –>
    <!– #include file="VOPS/FunctionSkin.asp" –>
<!– #include file="common/include/inc.channel.asp" –>
    <!– #include file="VOPS/FunctionLabel.asp" –>
    <!– #include file="VOPS/ModelClass.asp" –>
    <!– #include file="VOPS/ModelSpecial.asp" –>
    <!– #include file="VOPS/libSearch.asp" –>
2、代码分析;
<%
‘获的网站名称,我的站名就是“亲亲宝宝”
cfg.getWeb("name")
‘设置页面的当前位置,在title中显示
web.setLocation(cfg.getWeb("name"))
‘页面初始化
call doWebHead()
    sub doWebHead()
        if APP_STATUS="close" then
            call skin.doParse("common","page/update","")
            doWebEnd()
            response.end
            exit sub
        end if
        web.doInit()
        ‘if web.isNewday then        ‘新的一天的执行操作
        ‘    …
        ‘end if
        call doPageInit()        ‘页面初始化
        call doUserAuth()        ‘用户检测,用户的自动登陆,获取用户信息等
        call doPageLoad()        ‘页面载入
        web.doOnlineUpdate()
        call doPageParse()        ‘页面处理
    end sub

call doSkinParse("index","")
    sub doSkinParse(byval strPage,byval strModule)
        dim tmpFormat:tmpFormat=skin.getFormat()
        if len(tmpFormat)>0 then
            web.setPage(false)
            if len(strModule)>0 then
                strModule=strModule&("."&tmpFormat)
            else
                strModule=tmpFormat
            end if
        end if
        call skin.doParseLoad("",strPage,strModule)
        call doSkinPage()
        call doSkinPages()
        call skin.doParseDispose()
        call skin.doParseExecute()
    end sub
call doWebEnd()
    sub doWebEnd()
        doPageDestroy()            ‘页面对像消毁
        doPageClear()            ‘页面清理
        if web.isPage then
            ‘if ops.server.isLocalHost("") then debug opsTest.toTreeString(ops.db.getQuerySQLTree(),"getQuerySQLTree")
        end if
        call doClear()
    end sub

    %>

分类: 网站 标签: 2,086 次阅读
原文链接:http://www.wenhq.com/article/view_318.html
欢迎转载,请注明出处:亲亲宝宝
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.