[分享]兔兔开发的phpDMCA
DMCA stands for Dynamic Module and Component Administration动态模块儿和组件管理现在还是用面向过程的方法编写的dmca.php,但是从
$Id: dmca.class.php,v 1.0.0 2005/3/11 8:46:37 sirtoozee Exp $
开始将DMCA封装,提供丰富的API
面向过程的方法编写的dmca.php源代码是:
<?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);
?>
我准备模仿phpGACL的类库架构,同样适用了数据抽象层ADOdb、模版引擎Smarty、面向对象的QuickForm等杰出的PHP类库
希望有爱好PHP编程的fans加入进来 :P :roll:
有空我会为你写插件的~~ 谢谢涛涛 有空支持一下胖胖 :P https://sourceforge.net/projects/phpdmca/
现在开始编写主类:dmca.class.php和dmca_api.class.php 支持 这个东西做什么用的阿 如果你使用过XOOPS,可能会熟悉区块的布局——居左、居右、居中;排列顺序——第N个排列显示
不过我现在要把它用PHP5重写啦 :mrgreen:
PHP5最佳的选择 :P 愿意做贡献
maomao_panatsohudotcom
页:
[1]