QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4134|回复: 8

[分享]兔兔开发的phpDMCA

[复制链接]
发表于 2005-3-11 09:26:02 | 显示全部楼层 |阅读模式
DMCA stands for Dynamic Module and Component Administration动态模块儿和组件管理

现在还是用面向过程的方法编写的dmca.php,但是从
[code:1]
$Id: dmca.class.php,v 1.0.0 2005/3/11 8:46:37 sirtoozee Exp $
[/code:1]
开始将DMCA封装,提供丰富的API

面向过程的方法编写的dmca.php源代码是:
[code:1]
<?php

/***************************************************************************
*                                dmca.php
*                            -------------------
*   begin                : Staurday, March 5, 2005
*   copyright            : (C) 2005 The sirtoozee Group
*   email                : [email protected]
*
*   $Id: dmca.php,v nature 2005/3/5 20:49:00 sirtoozee Exp $
*
***************************************************************************/

/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2.1 of the License, or
*   (at your option) any later version.
*
***************************************************************************/

if ( !defined('IN_NATURE') ) {
        die("Hacking attempt");
}

include_once($nature_root_path . 'mods/mod_login.php');

$sql = "SELECT mod_name
        FROM " . TABLE_PREFIX . "modules
        WHERE mod_visible = '1'
        AND mod_side = '0'
        ORDER BY mod_weight";
$mod_name = $db->getCol($sql);

for ($i = 0; $i < count($mod_name); $i++) {
        include_once($nature_root_path . 'mods/mod_' . $mod_name[$i] . '.php');
}

for ($i = 0; $i < count($mod_name); $i++) {
        $left_mod[$i] = 'mod_' . $mod_name[$i] . '.htm';
}

$template->assign("LEFT_MOD", $left_mod);

$sql = "SELECT mod_name
        FROM " . TABLE_PREFIX . "modules
        WHERE mod_visible = '1'
        AND mod_side = '1'
        ORDER BY mod_weight";
$mod_name = $db->getCol($sql);

for ($j = 0; $j < count($mod_name); $j++) {
        include_once($nature_root_path . 'mods/mod_' . $mod_name[$j] . '.php');
}

for ($j = 0; $j < count($mod_name); $j++) {
        $right_mod[$j] = 'mod_' . $mod_name[$j] . '.htm';
}

$template->assign("RIGHT_MOD", $right_mod);

?>
[/code:1]

我准备模仿phpGACL的类库架构,同样适用了数据抽象层ADOdb、模版引擎Smarty、面向对象的QuickForm等杰出的PHP类库

希望有爱好PHP编程的fans加入进来
发表于 2005-3-11 18:55:03 | 显示全部楼层

有空我会为你写插件的~~
回复

使用道具 举报

 楼主| 发表于 2005-3-11 19:27:57 | 显示全部楼层
谢谢涛涛
回复

使用道具 举报

发表于 2005-3-11 19:59:25 | 显示全部楼层
有空支持一下胖胖
回复

使用道具 举报

 楼主| 发表于 2005-3-12 11:25:50 | 显示全部楼层
https://sourceforge.net/projects/phpdmca/

现在开始编写主类:dmca.class.php和dmca_api.class.php
回复

使用道具 举报

发表于 2005-5-25 11:03:43 | 显示全部楼层
支持
回复

使用道具 举报

发表于 2005-8-10 16:23:12 | 显示全部楼层
这个东西做什么用的阿
回复

使用道具 举报

 楼主| 发表于 2005-8-10 16:29:05 | 显示全部楼层
如果你使用过XOOPS,可能会熟悉区块的布局——居左、居右、居中;排列顺序——第N个排列显示

不过我现在要把它用PHP5重写啦

PHP5最佳的选择
回复

使用道具 举报

发表于 2005-10-10 13:53:15 | 显示全部楼层
愿意做贡献
maomao_panatsohudotcom
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-3-29 19:29 , Processed in 0.070080 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表