首页付款方式帮助中心 欢迎来到一站通! 登录免费注册

虚拟主机

数据库

  • 帮助中心
  • 怎样在系统中增加自定义功能页

  • 一、如果仅仅是增加个自定义页,不计较文件所在目录和名称,可以在后台增加专题,会自动在news/project/下增加目录和文件

    二、如果要增加有特别功能的页面,可以自定义页面。会员功能页和非会员功能页的区别是:

    1、会员功能页有SecureMember();? 调用这个函数时,访问页面时会判断是否登录,没有登录会跳转到login.php
    2、会员功能页要包含member.inc.php
    3、会员功能页PageSet函数的第一个参数是member,否则是news (即模块名):

    会员功能页程序样例:

    define("ROOTPATH", "../");   #定义文件相对路径,如程序在一级目录下就是../,如果在二级目录下就是../../ 依次类推
    include(ROOTPATH."includes/common.inc.php");   #包含函数库
    include(ROOTPATH."member/includes/member.inc.php");   #会员页面要包含member函数库
    include("language/".$sLan.".php");   #包含当前模块语言包
    include("includes/news.inc.php");  #包含本模块函数库

    SecureMember();   #会员身份验证

    //定义模块名和页面名
    PageSet("member","mytest");

    然后在_base_pageset数据表中插入一条记录


    name varchar(50) ASCIICHARSOUNDEXLCASEUCASEPASSWORDOLD_PASSWORDMD5SHA1ENCRYPTCOMPRESSUNCOMPRESSLAST_INSERT_IDUSERCONCAT--------NOWRANDCOUNTAVGSUMCURDATECURTIMEFROM_DAYSFROM_UNIXTIMEPERIOD_ADDPERIOD_DIFFTO_DAYSUNIX_TIMESTAMPWEEKDAY  
    coltype varchar(50) ASCIICHARSOUNDEXLCASEUCASEPASSWORDOLD_PASSWORDMD5SHA1ENCRYPTCOMPRESSUNCOMPRESSLAST_INSERT_IDUSERCONCAT--------NOWRANDCOUNTAVGSUMCURDATECURTIMEFROM_DAYSFROM_UNIXTIMEPERIOD_ADDPERIOD_DIFFTO_DAYSUNIX_TIMESTAMPWEEKDAY  
    pagename varchar(50) ASCIICHARSOUNDEXLCASEUCASEPASSWORDOLD_PASSWORDMD5SHA1ENCRYPTCOMPRESSUNCOMPRESSLAST_INSERT_IDUSERCONCAT--------NOWRANDCOUNTAVGSUMCURDATECURTIMEFROM_DAYSFROM_UNIXTIMEPERIOD_ADDPERIOD_DIFFTO_DAYSUNIX_TIMESTAMPWEEKDAY  


    非会员功能页程序样例:

    define("ROOTPATH", "../");
    include(ROOTPATH."includes/common.inc.php");
    include("language/".$sLan.".php");
    include("includes/news.inc.php");

    //定义模块名和页面名
    PageSet("news","mytest");

    然后在_base_pageset数据表中插入一条记录


    name varchar(50) ASCIICHARSOUNDEXLCASEUCASEPASSWORDOLD_PASSWORDMD5SHA1ENCRYPTCOMPRESSUNCOMPRESSLAST_INSERT_IDUSERCONCAT--------NOWRANDCOUNTAVGSUMCURDATECURTIMEFROM_DAYSFROM_UNIXTIMEPERIOD_ADDPERIOD_DIFFTO_DAYSUNIX_TIMESTAMPWEEKDAY  
    coltype varchar(50) ASCIICHARSOUNDEXLCASEUCASEPASSWORDOLD_PASSWORDMD5SHA1ENCRYPTCOMPRESSUNCOMPRESSLAST_INSERT_IDUSERCONCAT--------NOWRANDCOUNTAVGSUMCURDATECURTIMEFROM_DAYSFROM_UNIXTIMEPERIOD_ADDPERIOD_DIFFTO_DAYSUNIX_TIMESTAMPWEEKDAY  
    pagename varchar(50) ASCIICHARSOUNDEXLCASEUCASEPASSWORDOLD_PASSWORDMD5SHA1ENCRYPTCOMPRESSUNCOMPRESSLAST_INSERT_IDUSERCONCAT--------NOWRANDCOUNTAVGSUMCURDATECURTIMEFROM_DAYSFROM_UNIXTIMEPERIOD_ADDPERIOD_DIFFTO_DAYSUNIX_TIMESTAMPWEEKDAY