收藏文章 楼主
HadSky 插件开发变量、常量
版块:puyuetianPHP - 文档   类型:普通   作者:乐天   查看:8403   回复:1   获赞:3   时间:2016-04-26 10:28:24

HadSky程序中统一了变量的定义,一共两个变量,三个常量。

1.$C

存储请求页面名称的变量,通过Cstr函数过滤,允许1-255个字符

2.$_G

存储网站所有信息的数组,具体:

Array
(
    [SYSTEM] => Array
        (
            [STARTTIME] => 系统开始时间
            [PATH] => 网站所在的物理目录
            [DOMAIN] => 网站域名
            [PHPFULLPATH] => 当前脚本的完整路径
            [CLIENTIP] => 访问者IP
            [SERVERIP] => 服务器IP
            [LOCATION] => 当前页面的完整URL
            [REFERER] => 来源URL
            [CLOADPLUGNAME] => 当前系统加载的插件
            [SCRIPTPATH] => 当前加载的PHP脚本的物理路径
            [LOADTEMPLATENAME] => 当前系统加载的模板
            [COMPLETETIME] => 加载完成时间
            [LOADTIMES] => 框架加载耗时
        )

    [STRING] => Array
        (
            [UPPERCASE] => ABCDEFGHIJKLMNOPQRSTUVWXYZ
            [LOWERCASE] => abcdefghijklmnopqrstuvwxyz
            [NUMERICAL] => 1234567890
            [BBCODEMARKS] => <b><i><u><strong><font><pre><code><p><span><table><tbody><tr><td><th><a><div><em><h1><h2><h3><h4><h5><h6><img><label><ul><ol><li><br>
        )

    [DATETIME] => Array
        (
            [DATE] => 2016-04-26
            [TIME] => 09:56:31
        )

    [HTMLCODE] => Array
        (
            [404] => 脚本未找到时输出的HTML
            [OUTPUT] => 待输出的HTML
        )

    [MYSQL] => Array
        (
            [LOCATION] => MySQL数据库地址
            [USERNAME] => 用户名
            [PASSWORD] => 密码
            [DATABASE] => 数据库
            [CHARSET] => 编码
            [PREFIX] => 前缀
        )

    [SET] => Array
        (
            [AD1HTMLCODE] => 广告位1HTML
            [BBCODEMARKS] => bbcode安全标签
            [FOOTERHTMLCODE] => 				页脚HTML
            [HEADERHTMLCODE] => 页头HTML
            [QUOTES] => 站长寄语
            [TEMPLATENAME] => 加载的模板名称(目录)
            [WEBDESCRIPTION] => meta 描述
            [WEBKEYWORDS] => meta 关键词
            [WEBLOGO] => logo地址
            [WEBNAME] => 网站名称 title
            [REG] => 是否开启注册(1 or 0)
            [REGUSERQUANXIAN] => 新注册用户具有的权限
            [READLISTNUM] => 10  //文章列表数目
            [REPLYLISTNUM] => 10  //回复列表数目
            [LOGOTEXT] => 有天轻论坛  //网站文章logo
            [QIANDAOJIFEN] => 10  //签到奖励的积分
            [QIANDAOTIANDOU] => 10  //签到奖励的天豆
            [READSORT] => 发帖预标签
            [NAVHTMLCODE] => 																				导航HTML
            [UPLOADFILETYPES] => jpg|jpeg|gif|bmp|png|zip|rar|txt|doc  //上传文件类型
            [UPLOADFILESIZE] => 2000  //上传文件最大值KB
            [POSTREADJIFEN] => 5  //发帖奖励积分
            [POSTREADTIANDOU] => 5  //发帖奖励天豆
            [POSTREPLYJIFEN] => 2  //回复奖励积分
            [POSTREPLYTIANDOU] => 2  //回复奖励天豆
            [DEFAULTPAGE] => forum  //默认首页,phpscript目录内
            [AD2HTMLCODE] => 																																																																																								广告位2HTML
            [REWRITEURL] => 1  //开启伪静态1,0关闭
            [DOWNLOADFILERND] => 258  //下载安全码
            [OPENVERIFYCODE] => 0  //开启验证码1,0关闭
            [PHONETEMPLATENAME] => puyuetian_whitestyle  //手机模板
            [REGMESSAGE] => 恭喜您注册成功!  //注册欢迎词
            [DOWNLOADAD1HTMLCODE] => 下载广告位1
            [DOWNLOADAD2HTMLCODE] => 下载广告位2
            [HOME_SET1] => 1  //以下为门户设置
            [HOME_SET2] => 1,2,3,4,5
            [HOME_SET3] => 此处为活动
            [SLIDETYPE] => 0  //幻灯片类型,1:帖内图片,0:自定义
            [SLIDESHOWNUM] => 5  //幻灯片显示数目
            [SLIDEJSCODE] => //自定义幻灯片代码
            [JIFENNAME] => 经验  //积分自定义名称
            [TIANDOUNAME] => 金钱  //天豆自定义名称
            [REGJIFEN] => 0  //注册奖励的积分
            [REGTIANDOU] => 200  //注册奖励的天豆
            [FRIENDLINKS] => <a href="">友情链接</a>  //友链html
            [POSTINGTIMEINTERVAL] => 60  //发帖时间间隔(秒)
            [POSTAUDIT] => 1  //发帖审核,1审核,0不审核
            [NEWUSERPOSTWAITTIME] => 60  //新用户见习时长(分)
        )
//数据表对象
    [TABLES] => Array
        (
            [0] => download
            [1] => plug
            [2] => read
            [3] => readsort
            [4] => reply
            [5] => set
            [6] => upload
            [7] => user
            [8] => user_message
        )

    [TABLE] => Array
        (
            [DOWNLOAD] => Data Object
                (
                    [id] => 
                    [array] => 
                    [query] => 
                    [mysql_prefix] => 
                    [table] => pk_download
                    [index] => 
                    [array_keys:Data:private] => 
                    [array_values:Data:private] => 
                )

            [PLUG] => Data Object
                (
                    [id] => 
                    [array] => 
                    [query] => 
                    [mysql_prefix] => 
                    [table] => pk_plug
                    [index] => 
                    [array_keys:Data:private] => 
                    [array_values:Data:private] => 
                )

            [READ] => Data Object
                (
                    [id] => 
                    [array] => 
                    [query] => 
                    [mysql_prefix] => 
                    [table] => pk_read
                    [index] => 
                    [array_keys:Data:private] => 
                    [array_values:Data:private] => 
                )

            [READSORT] => Data Object
                (
                    [id] => 
                    [array] => 
                    [query] => 
                    [mysql_prefix] => 
                    [table] => pk_readsort
                    [index] => 
                    [array_keys:Data:private] => 
                    [array_values:Data:private] => 
                )

            [REPLY] => Data Object
                (
                    [id] => 
                    [array] => 
                    [query] => 
                    [mysql_prefix] => 
                    [table] => pk_reply
                    [index] => 
                    [array_keys:Data:private] => 
                    [array_values:Data:private] => 
                )

            [SET] => Data Object
                (
                    [id] => 
                    [array] => 
                    [query] => 
                    [mysql_prefix] => 
                    [table] => pk_set
                    [index] => 
                    [array_keys:Data:private] => 
                    [array_values:Data:private] => 
                )

            [UPLOAD] => Data Object
                (
                    [id] => 
                    [array] => 
                    [query] => 
                    [mysql_prefix] => 
                    [table] => pk_upload
                    [index] => 
                    [array_keys:Data:private] => 
                    [array_values:Data:private] => 
                )

            [USER] => Data Object
                (
                    [id] => 
                    [array] => 
                    [query] => 
                    [mysql_prefix] => 
                    [table] => pk_user
                    [index] => 
                    [array_keys:Data:private] => 
                    [array_values:Data:private] => 
                )

            [USER_MESSAGE] => Data Object
                (
                    [id] => 
                    [array] => 
                    [query] => 
                    [mysql_prefix] => 
                    [table] => pk_user_message
                    [index] => 
                    [array_keys:Data:private] => 
                    [array_values:Data:private] => 
                )

        )
//待输出的模板集
    [TEMPLATE] => Array
        (
            [HEADER] => header
            [BODY] => body
            [HDRIVE] => hdrive
            [SCRIPT] => script
            [FOOTER] => footer
        )
//当前登录用户的信息
    [USER] => Array
        (
            [ID] => 2
            [NICKNAME] => 匿名游客
            [USERNAME] => 游客
            [PASSWORD] => null
            [QUANXIAN] => bbcode,download,lookread,lookuser,reply
            [TIANDOU] => 74
            [JIFEN] => 74
            [QIANDAODAYS] => 15
            [QIANDAOTIME] => 1448337190
            [LOGININFO] => 
            [REGINFO] => 
            [SEX] => 机器人
            [BIRTHDAY] => 777744000
            [MAIL] => 632827168@qq.com
            [QQ] => 632827168
            [PHONE] => 
            [SIGN] => 系统用户组 - 游客
            [FRIENDS] => 
            [READLEVEL] => 0
            [ANDROIDAPPLOGINMD5] => 
            [QQOPENID] => 
            [DATA] => a:4:{s:6:"bbcode";s:5:"<img>";s:8:"signcode";s:0:"";s:10:"uploadsize";s:0:"";s:12:"lastposttime";i:1461071094;}
        )
//验证码是否被开启
    [VERIFYCODE_TEMPLATE] => Array
        (
            [STATUS] => 0
        )
//以下数据用作前台JS代码输出
    [JAVASCRIPT] => Array
        (
            [USER] => var $USER = Array();$USER['ID'] = "2";$USER['NICKNAME'] = "匿名游客";$USER['UCID'] = "0";$USER['USERNAME'] = "游客";$USER['QUANXIAN'] = "bbcode,download,lookread,lookuser,reply";$USER['TIANDOU'] = "74";$USER['JIFEN'] = "74";$USER['QIANDAODAYS'] = "15";$USER['QIANDAOTIME'] = "1448337190";$USER['SEX'] = "机器人";$USER['BIRTHDAY'] = "777744000";$USER['MAIL'] = "632827168@qq.com";$USER['QQ'] = "632827168";$USER['PHONE'] = "";$USER['SIGN'] = "系统用户组 - 游客";$USER['FRIENDS'] = "";$USER['READLEVEL'] = "0";$USER['QQOPENID'] = "";$USER['DATA'] = "a:4:{s:6:\"bbcode\";s:5:\"<img>\";s:8:\"signcode\";s:0:\"\";s:10:\"uploadsize\";s:0:\"\";s:12:\"lastposttime\";i:1461071094;}";
            [GET] => var $GET = Array();
            [SET] => var $SET = Array();$SET['QIANDAOJIFEN'] = "10";$SET['QIANDAOTIANDOU'] = "10";
            [ALL] => var $USER = Array();$USER['ID'] = "2";$USER['NICKNAME'] = "匿名游客";$USER['UCID'] = "0";$USER['USERNAME'] = "游客";$USER['QUANXIAN'] = "bbcode,download,lookread,lookuser,reply";$USER['TIANDOU'] = "74";$USER['JIFEN'] = "74";$USER['QIANDAODAYS'] = "15";$USER['QIANDAOTIME'] = "1448337190";$USER['SEX'] = "机器人";$USER['BIRTHDAY'] = "777744000";$USER['MAIL'] = "632827168@qq.com";$USER['QQ'] = "632827168";$USER['PHONE'] = "";$USER['SIGN'] = "系统用户组 - 游客";$USER['FRIENDS'] = "";$USER['READLEVEL'] = "0";$USER['QQOPENID'] = "";$USER['DATA'] = "a:4:{s:6:\"bbcode\";s:5:\"<img>\";s:8:\"signcode\";s:0:\"\";s:10:\"uploadsize\";s:0:\"\";s:12:\"lastposttime\";i:1461071094;}";var $GET = Array();var $SET = Array();$SET['QIANDAOJIFEN'] = "10";$SET['QIANDAOTIANDOU'] = "10";
        )
//插件相关
    [PLUG] => Array
        (
            [LOADINFO] => Load Frame Plugs Total 
Load Plugs Total //插件加载信息
//各个插件的数据信息
            [DATA] => Array
                (
                  
                    [PUYUETIAN_TURNTABLEGAME] => Array
                        (
                            [ID] => 8
                            [PLUGNAME] => puyuetian_turntablegame
                            [SCRIPTNAME] => data
                            [LOADPAGES] => plug
                            [RANK] => 0
                            [PLUGDATA] => T:10,T:10,O:谢谢参与,J:10,O:谢谢参与,JT:10,O:谢谢参与,R:1,O:谢谢参与
                            [OPEN] => 1
                            [P] => 
                        )

                    [PUYUETIAN_EMOTIONS] => Array
                        (
                            [ID] => 9
                            [PLUGNAME] => puyuetian_emotions
                            [SCRIPTNAME] => load
                            [LOADPAGES] => edit,read
                            [RANK] => 0
                            [PLUGDATA] => 
                            [OPEN] => 1
                            [P] => edit:p1,read:p1
                        )

                )

        )

)
3.常量

puyuetian:判断脚本是否运行在puyuetianPHP框架内的常量;

VERSION:当前系统版本

RELEASE:当前系统发布时间


有些梦虽然遥不可及,但并不是不可能实现。 
回复列表
默认   热门   正序   倒序
黑衣人
2F
这是个开发插件的好东西。。以前居然没发现。。藏这么深
 0   2021-04-20 11:23:29  回复

回复:HadSky 插件开发变量、常量

暂无用户组
退出
等级:0级
天豆:
游客:

公告

近期本站被人为恶意注册及发布垃圾帖,本站已开启普通用户发帖审核功能,VIP系列用户组不受影响,一但发现发布违法或垃圾帖的用户,该用户账号将会被永久封号,请大家共同维护互联网环境,共创美好互联网未来。

永久免费,购授权享豪礼

3年个人版授权+1940天豆仅需194元

终身个人版授权+3880天豆仅需388元

3年尊享版授权+13580天豆仅需1358元

终身尊享版授权+27160天豆仅需2716元

Powered by HadSky 7.7.15

©2015 - 2021 HadSky

购买产品 用户文档 加入QQ群 授权查询 网站绑定 客户案例 陕ICP备13005805号

您的IP:3.231.230.177,2021-07-29 00:34:28,Processed in 0.04083 second(s).

支持原创软件,抵制盗版,共创美好明天!
头像

用户名:

粉丝数:

签名:

资料 关注 好友 消息
已有0次打赏
(3) 分享
分享

请保存二维码或复制链接进行分享

取消