-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f715b90
Showing
2,177 changed files
with
524,768 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.idea | ||
composer.lock | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<IfModule mod_rewrite.c> | ||
Options +FollowSymlinks -Multiviews | ||
RewriteEngine On | ||
|
||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 | ||
版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn) | ||
All rights reserved。 | ||
ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 | ||
|
||
Apache Licence是著名的非盈利开源组织Apache采用的协议。 | ||
该协议和BSD类似,鼓励代码共享和尊重原作者的著作权, | ||
允许代码修改,再作为开源或商业软件发布。需要满足 | ||
的条件: | ||
1. 需要给代码的用户一份Apache Licence ; | ||
2. 如果你修改了代码,需要在被修改的文件中说明; | ||
3. 在延伸的代码中(修改和有源代码衍生的代码中)需要 | ||
带有原来代码中的协议,商标,专利声明和其他原来作者规 | ||
定需要包含的说明; | ||
4. 如果再发布的产品中包含一个Notice文件,则在Notice文 | ||
件中需要带有本协议内容。你可以在Notice中增加自己的 | ||
许可,但不可以表现为对Apache Licence构成更改。 | ||
具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
DolphinPHP | ||
=============== | ||
|
||
DophinPHP(海豚PHP)是一个基于ThinkPHP5.0.3开发的一套开源PHP快速开发框架,DophinPHP秉承极简、极速、极致的开发理念,为开发集成了基于数据-角色的权限管理机制,集成多种灵活快速构建工具,可方便快速扩展的模块、插件、钩子、数据包。统一了模块、插件、钩子、数据包之间的版本和依赖关系,进一步降低了代码和数据的沉余,以方便开发者快速构建自己的应用。 | ||
|
||
## 功能特性 | ||
### 万事俱备-ZBuilder构建神器 | ||
使用DophinPHP(海豚PHP)自主开发的ZBuilder类,您可以轻松的应对复杂多变的表单、数据列表。数据列表集成类似EXCEL的快速筛选、排序、模糊搜索、AJAX编辑等功能,表单页集成常用的文本、下拉框、单选、多选、关键词、编辑器、文件上传、图片上传、图片裁切等控件,除此之外,您还可以灵活的扩展自己的控件,以便在自己的项目中重复使用。ZBuilder让您更加专注业务逻辑。 | ||
|
||
### 相得益彰-模块化组合 | ||
千变万化的事物之间总是有着千丝万缕的关系,在应用开发的时候,不同的功能、模块甚至数据之间也存在各种依赖关系。在保证模块、插件独立的同时,为了降低代码、数据的沉余,我们将每个模块、插件、数据包加上了唯一的标示和版本号以及彼此之间的依赖关系,保证了应用程序的高内聚低耦合。 | ||
|
||
### 一举多得-夸平台支持 | ||
DophinPHP(海豚PHP)集成BootStrap、JQuery、Xeditable、Select2等优秀的前端开源框架,基于ThinkPHP5出色的性能和REST支持、远程调试和更好的支持API开发。让您可以一次开发即可直接兼容PC、移动设备和微信界面,通过简单的配置即可快速构建属于自己的Android、IOS的APP。 | ||
|
||
## 鸣谢 | ||
感谢[ThinkPHP](http://www.thinkphp.cn)、[JQuery](http://jquery.com/)、[Bootstrap](http://getbootstrap.com/)、[Xeditable](http://vitalets.github.io/x-editable)、[Select2](https://github.com/select2/select2)等优秀开源项目。 | ||
|
||
## 官方网站 | ||
[www.dolphinphp.com](http://www.dolphinphp.com) | ||
|
||
## 版权信息 | ||
|
||
DolphinPHP遵循Apache2开源协议发布,并提供免费使用。 | ||
|
||
本项目包含的第三方源码和二进制文件之版权信息另行标注。 | ||
|
||
版权所有Copyright © 2016 河源市卓锐科技有限公司 (http://www.zrthink.com) | ||
|
||
All rights reserved。 | ||
|
||
更多细节参阅 [LICENSE.txt](LICENSE.txt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
// +---------------------------------------------------------------------- | ||
// | 海豚PHP框架 [ DolphinPHP ] | ||
// +---------------------------------------------------------------------- | ||
// | 版权所有 2016~2017 河源市卓锐科技有限公司 [ http://www.zrthink.com ] | ||
// +---------------------------------------------------------------------- | ||
// | 官方网站:http://dolphinphp.com | ||
// +---------------------------------------------------------------------- | ||
// | 开源协议 ( http://www.apache.org/licenses/LICENSE-2.0 ) | ||
// +---------------------------------------------------------------------- | ||
// | 作者: 蔡伟明 <314013107@qq.com> | ||
// +---------------------------------------------------------------------- | ||
|
||
// [ 应用入口文件 ] | ||
|
||
// 定义应用目录 | ||
define('APP_PATH', __DIR__ . '/application/'); | ||
|
||
// 检查是否安装 | ||
if(!is_file('./data/install.lock')){ | ||
define('BIND_MODULE', 'install'); | ||
} | ||
|
||
// 定义入口为admin | ||
define('ENTRANCE', 'admin'); | ||
|
||
// 加载框架引导文件 | ||
require './thinkphp/start.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
deny from all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
// +---------------------------------------------------------------------- | ||
// | 海豚PHP框架 [ DolphinPHP ] | ||
// +---------------------------------------------------------------------- | ||
// | 版权所有 2016~2017 河源市卓锐科技有限公司 [ http://www.zrthink.com ] | ||
// +---------------------------------------------------------------------- | ||
// | 官方网站: http://dolphinphp.com | ||
// +---------------------------------------------------------------------- | ||
// | 开源协议 ( http://www.apache.org/licenses/LICENSE-2.0 ) | ||
// +---------------------------------------------------------------------- | ||
|
||
namespace app\admin\controller; | ||
|
||
use app\common\builder\ZBuilder; | ||
use app\admin\model\Action as ActionModel; | ||
use app\admin\model\Module as ModuleModel; | ||
|
||
/** | ||
* 行为管理控制器 | ||
* @package app\admin\controller | ||
*/ | ||
class Action extends Admin | ||
{ | ||
/** | ||
* 首页 | ||
* @author 蔡伟明 <314013107@qq.com> | ||
* @return mixed | ||
*/ | ||
public function index() | ||
{ | ||
// 查询 | ||
$map = $this->getMap(); | ||
// 数据列表 | ||
$data_list = ActionModel::where($map)->order('id desc')->paginate(); | ||
// 所有模块的名称和标题 | ||
$list_module = ModuleModel::getModule(); | ||
|
||
// 新增或编辑页面的字段 | ||
$fields = [ | ||
['hidden', 'id'], | ||
['select', 'module', '所属模块', '', $list_module], | ||
['text', 'name', '行为标识', '由英文字母和下划线组成'], | ||
['text', 'title', '行为名称', ''], | ||
['textarea', 'remark', '行为描述'], | ||
['textarea', 'rule', '行为规则', '不写则只记录日志'], | ||
['textarea', 'log', '日志规则', '记录日志备注时按此规则来生成,支持[变量|函数]。目前变量有:user,time,model,record,data,details'], | ||
['radio', 'status', '立即启用', '', ['否', '是'], 1] | ||
]; | ||
|
||
// 使用ZBuilder快速创建数据表格 | ||
return ZBuilder::make('table') | ||
->setPageTitle('行为管理') // 设置页面标题 | ||
->setSearch(['name' => '标识', 'title' => '名称']) // 设置搜索框 | ||
->addColumns([ // 批量添加数据列 | ||
['id', 'ID'], | ||
['name', '标识'], | ||
['title', '名称'], | ||
['remark', '描述'], | ||
['module', '所属模块', 'callback', function($module, $list_module){ | ||
return isset($list_module[$module]) ? $list_module[$module] : '未知'; | ||
}, $list_module], | ||
['status', '状态', 'switch'], | ||
['right_button', '操作', 'btn'] | ||
]) | ||
->autoAdd($fields, '', true, true) // 添加自动新增按钮 | ||
->autoEdit($fields, '', true, true) // 添加自动编辑按钮 | ||
->addTopButtons('enable,disable,delete') // 批量添加顶部按钮 | ||
->addRightButtons('delete') // 批量添加右侧按钮 | ||
->addFilter('module', $list_module) | ||
->setRowList($data_list) // 设置表格数据 | ||
->fetch(); // 渲染模板 | ||
} | ||
} |
Oops, something went wrong.