作者 Karson

新增插件功能

新增后台版本检测功能
新增插件命令行操作
新增citypicker城市选择插件
新增Backend.api.open的callback功能
新增Backend.api.close方法用于回调
新增Menu菜单类
新增Version版本类
新增rmdirs和copydirs函数
新增btn-ajax类直接发送AJAX请求功能
新增$this->assignconfig渲染数据到JS中的功能
启用全新网站首页

变更上传和表单的接口参数
变更菜单栏折叠时的展现方式
修复在包含下线划表的关联模型下的搜索错误
移除auth_rule表中name的admin前缀
移除从DOM中绑定上传和表单的事件
移除插件化后的模块及数据库
移除使用$this->code和$this->data功能
移除前台冗余的控制器和类
正在显示 73 个修改的文件 包含 1131 行增加2798 行删除

要显示太多修改。

为保证性能只显示 73 of 73+ 个文件。

... ... @@ -16,8 +16,9 @@ FastAdmin是一款基于ThinkPHP5+Bootstrap的极速后台开发框架。
* 基于`Bower`进行前端组件包管理
* 数据库表一键生成`CRUD`,包括控制器、模型、视图、JS、语言包
* 一键压缩打包JS和CSS文件
* 强大的插件扩展功能,在线安装卸载插件
* 多语言支持,服务端及客户端支持
* 无缝整合又拍云上传功能
* 无缝整合又拍云、七牛上传等云存储功能
* 第三方登录(QQ、微信、微博)整合
* Ucenter整合
... ...
<?php
namespace app\admin\command;
use think\addons\AddonException;
use think\addons\Service;
use think\console\Command;
use think\console\Input;
use think\console\input\Option;
use think\console\Output;
use think\Exception;
class Addon extends Command
{
protected function configure()
{
$this
->setName('addon')
->addOption('name', 'a', Option::VALUE_REQUIRED, 'addon name', null)
->addOption('action', 'c', Option::VALUE_REQUIRED, 'action(create/enable/disable/install/uninstall/refresh)', 'create')
->addOption('force', 'f', Option::VALUE_OPTIONAL, 'force override', null)
->setDescription('Addon manager');
}
protected function execute(Input $input, Output $output)
{
$name = $input->getOption('name') ?: '';
$action = $input->getOption('action') ?: '';
//强制覆盖
$force = $input->getOption('force');
include dirname(__DIR__) . DS . 'common.php';
if (!$name)
{
throw new Exception('Addon name could not be empty');
}
if (!$action || !in_array($action, ['create', 'disable', 'enable', 'install', 'uninstall', 'refresh']))
{
throw new Exception('Please input correct action name');
}
$addonDir = ADDON_PATH . $name;
switch ($action)
{
case 'create':
//非覆盖模式时如果存在则报错
if (is_dir($addonDir) && !$force)
{
throw new Exception("addon already exists!\nIf you need to create again, use the parameter --force=true ");
}
//如果存在先移除
if (is_dir($addonDir))
{
rmdirs($addonDir);
}
mkdir($addonDir);
$data = [
'name' => $name,
'addon' => $name,
'addonClassName' => ucfirst($name)
];
$this->writeToFile("addon", $data, $addonDir . DS . ucfirst($name) . '.php');
$this->writeToFile("config", $data, $addonDir . DS . 'config.php');
$this->writeToFile("info", $data, $addonDir . DS . 'info.ini');
$output->info("Create Successed!");
break;
case 'disable':
case 'enable':
try
{
//调用启用、禁用的方法
Service::$action($name, 0);
}
catch (AddonException $e)
{
if ($e->getCode() != -3)
{
throw new Exception($e->getMessage());
}
//如果有冲突文件则提醒
$data = $e->getData();
foreach ($data['conflictlist'] as $k => $v)
{
$output->warning($v);
}
$output->info("Are you sure you want to " . ($action == 'enable' ? 'override' : 'delete') . " all those files? Type 'yes' to continue: ");
$line = fgets(STDIN);
if (trim($line) != 'yes')
{
throw new Exception("Operation is aborted!");
}
//调用启用、禁用的方法
Service::$action($name, 1);
}
catch (Exception $e)
{
throw new Exception($e->getMessage());
}
$output->info(ucfirst($action) . " Successed!");
break;
case 'install':
//非覆盖模式时如果存在则报错
if (is_dir($addonDir) && !$force)
{
throw new Exception("addon already exists!\nIf you need to install again, use the parameter --force=true ");
}
//如果存在先移除
if (is_dir($addonDir))
{
rmdirs($addonDir);
}
try
{
Service::install($name, 0);
}
catch (AddonException $e)
{
if ($e->getCode() != -3)
{
throw new Exception($e->getMessage());
}
//如果有冲突文件则提醒
$data = $e->getData();
foreach ($data['conflictlist'] as $k => $v)
{
$output->warning($v);
}
$output->info("Are you sure you want to override all those files? Type 'yes' to continue: ");
$line = fgets(STDIN);
if (trim($line) != 'yes')
{
throw new Exception("Operation is aborted!");
}
Service::install($name, 1);
}
catch (Exception $e)
{
throw new Exception($e->getMessage());
}
$output->info("Install Successed!");
break;
case 'uninstall':
//非覆盖模式时如果存在则报错
if (!$force)
{
throw new Exception("If you need to uninstall addon, use the parameter --force=true ");
}
try
{
Service::uninstall($name, 0);
}
catch (AddonException $e)
{
if ($e->getCode() != -3)
{
throw new Exception($e->getMessage());
}
//如果有冲突文件则提醒
$data = $e->getData();
foreach ($data['conflictlist'] as $k => $v)
{
$output->warning($v);
}
$output->info("Are you sure you want to delete all those files? Type 'yes' to continue: ");
$line = fgets(STDIN);
if (trim($line) != 'yes')
{
throw new Exception("Operation is aborted!");
}
Service::uninstall($name, 1);
}
catch (Exception $e)
{
throw new Exception($e->getMessage());
}
$output->info("Uninstall Successed!");
break;
case 'refresh':
Service::refresh();
$output->info("Refresh Successed!");
break;
default :
break;
}
}
/**
* 写入到文件
* @param string $name
* @param array $data
* @param string $pathname
* @return mixed
*/
protected function writeToFile($name, $data, $pathname)
{
$search = $replace = [];
foreach ($data as $k => $v)
{
$search[] = "{%{$k}%}";
$replace[] = $v;
}
$stub = file_get_contents($this->getStub($name));
$content = str_replace($search, $replace, $stub);
if (!is_dir(dirname($pathname)))
{
mkdir(strtolower(dirname($pathname)), 0755, true);
}
return file_put_contents($pathname, $content);
}
/**
* 获取基础模板
* @param string $name
* @return string
*/
protected function getStub($name)
{
return __DIR__ . '/Addon/stubs/' . $name . '.stub';
}
}
... ...
<?php
namespace addons\{%name%};
use think\Addons;
/**
* 插件
*/
class {%addonClassName%} extends Addons
{
/**
* 插件安装方法
* @return bool
*/
public function install()
{
return true;
}
/**
* 插件卸载方法
* @return bool
*/
public function uninstall()
{
return true;
}
/**
* 实现钩子方法
* @return mixed
*/
public function testhook($param)
{
// 调用钩子时候的参数信息
print_r($param);
// 当前插件的配置信息,配置信息存在当前目录的config.php文件中,见下方
print_r($this->getConfig());
// 可以返回模板,模板文件默认读取的为插件目录中的文件。模板名不能为空!
//return $this->fetch('view/info');
}
}
... ...
<?php
return [
[
//配置唯一标识
'name' => 'usernmae',
//显示的标题
'title' => '用户名',
//类型
'type' => 'string',
//数据字典
'content' => [
],
//值
'value' => '',
//验证规则
'rule' => 'required',
//错误消息
'msg' => '',
//提示消息
'tip' => '',
//成功消息
'ok' => '',
//扩展信息
'extend' => ''
],
[
'name' => 'password',
'title' => '密码',
'type' => 'string',
'content' => [
],
'value' => '',
'rule' => 'required',
'msg' => '',
'tip' => '',
'ok' => '',
'extend' => ''
],
];
... ...
name = {%name%}
title = 插件名称
intro = FastAdmin插件
author = yourname
website = http://www.fastadmin.net
version = 1.0.0
state = 1
\ No newline at end of file
... ...
... ... @@ -45,6 +45,11 @@ class Crud extends Command
protected $switchSuffix = ['switch'];
/**
* 城市后缀
*/
protected $citySuffix = ['city'];
/**
* Selectpage对应的后缀
*/
protected $selectpageSuffix = ['_id', '_ids'];
... ... @@ -114,6 +119,7 @@ class Crud extends Command
->addOption('filefield', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate file component with suffix', null)
->addOption('intdatesuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate date component with suffix', null)
->addOption('switchsuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate switch component with suffix', null)
->addOption('citysuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate citypicker component with suffix', null)
->addOption('selectpagesuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate selectpage component with suffix', null)
->addOption('selectpagessuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate multiple selectpage component with suffix', null)
->addOption('sortfield', null, Option::VALUE_OPTIONAL, 'sort field', null)
... ... @@ -162,6 +168,8 @@ class Crud extends Command
$intdatesuffix = $input->getOption('intdatesuffix');
//开关后缀
$switchsuffix = $input->getOption('switchsuffix');
//城市后缀
$citysuffix = $input->getOption('citysuffix');
//selectpage后缀
$selectpagesuffix = $input->getOption('selectpagesuffix');
//selectpage多选后缀
... ... @@ -182,6 +190,8 @@ class Crud extends Command
$this->intDateSuffix = $intdatesuffix;
if ($switchsuffix)
$this->switchSuffix = $switchsuffix;
if ($citysuffix)
$this->citySuffix = $citysuffix;
if ($selectpagesuffix)
$this->selectpageSuffix = $selectpagesuffix;
if ($selectpagessuffix)
... ... @@ -447,7 +457,7 @@ class Crud extends Command
$defaultValue = $v['COLUMN_DEFAULT'];
$editValue = "{\$row.{$field}}";
// 如果默认值非null,则是一个必选项
if (!is_null($v['COLUMN_DEFAULT']))
if ($v['IS_NULLABLE'] == 'NO')
{
$attrArr['data-rule'] = 'required';
}
... ... @@ -556,6 +566,13 @@ class Crud extends Command
$formEditElement .= sprintf(Form::label("{$attrArr['id']}", "%s abcdefg"), Form::checkbox($fieldName, $yes, 0, $attrArr));
$formEditElement = str_replace('type="checkbox"', 'type="checkbox" {in name="' . "\$row.{$field}" . '" value="' . $yes . '"}checked{/in}', $formEditElement);
}
else if ($inputType == 'citypicker')
{
$attrArr['class'] = implode(' ', $cssClassArr);
$attrArr['data-toggle'] = "city-picker";
$formAddElement = sprintf("<div class='control-relative'>%s</div>", Form::input('text', $fieldName, $defaultValue, $attrArr));
$formEditElement = sprintf("<div class='control-relative'>%s</div>", Form::input('text', $fieldName, $editValue, $attrArr));
}
else
{
$search = $replace = '';
... ... @@ -1077,6 +1094,11 @@ EOD;
{
$inputType = "switch";
}
// 指定后缀结尾城市选择框
if ($this->isMatchSuffix($fieldsName, $this->citySuffix) && ($v['DATA_TYPE'] == 'varchar' || $v['DATA_TYPE'] == 'char'))
{
$inputType = "citypicker";
}
return $inputType;
}
... ... @@ -1126,19 +1148,20 @@ EOD;
*/
protected function getImageUpload($field, $content)
{
$filter = '';
$uploadfilter = $selectfilter = '';
if ($this->isMatchSuffix($field, $this->imageField))
{
$filter = ' data-mimetype="image/*"';
$uploadfilter = ' data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"';
$selectfilter = ' data-mimetype="image/*"';
}
$multiple = substr($field, -1) == 's' ? ' data-multiple="true"' : ' data-multiple="false"';
$preview = $filter ? ' data-preview-id="p-' . $field . '"' : '';
$preview = $uploadfilter ? ' data-preview-id="p-' . $field . '"' : '';
$previewcontainer = $preview ? '<ul class="row list-inline plupload-preview" id="p-' . $field . '"></ul>' : '';
return <<<EOD
<div class="form-inline">
{$content}
<span><button type="button" id="plupload-{$field}" class="btn btn-danger plupload" data-input-id="c-{$field}"{$filter}{$multiple}{$preview}><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-{$field}" class="btn btn-primary fachoose" data-input-id="c-{$field}"{$filter}{$multiple}><i class="fa fa-list"></i> {:__('Choose')}</button></span>
<span><button type="button" id="plupload-{$field}" class="btn btn-danger plupload" data-input-id="c-{$field}"{$uploadfilter}{$multiple}{$preview}><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-{$field}" class="btn btn-primary fachoose" data-input-id="c-{$field}"{$selectfilter}{$multiple}><i class="fa fa-list"></i> {:__('Choose')}</button></span>
{$previewcontainer}
</div>
EOD;
... ...
... ... @@ -4,7 +4,7 @@
官网: http://www.fastadmin.net
演示: http://demo.fastadmin.net
Date: 07/11/2017 23:52:44 PM
Date: 08/08/2017 23:19:44 PM
*/
SET FOREIGN_KEY_CHECKS = 0;
... ... @@ -35,7 +35,7 @@ CREATE TABLE `fa_admin` (
-- Records of `fa_admin`
-- ----------------------------
BEGIN;
INSERT INTO `fa_admin` VALUES ('1', 'admin', 'Admin', '075eaec83636846f51c152f29b98a2fd', 's4f3', '/assets/img/avatar.png', 'admin@fastadmin.net', '0', '1497070325', '1492186163', '1497070325', 'c586728f-0687-4e1a-84c0-c3b9f9003850', 'normal'), ('2', 'admin2', 'admin2', '9a28ce07ce875fbd14172a9ca5357d3c', '2dHDmj', '/assets/img/avatar.png', 'admin2@fastadmin.net', '0', '0', '1492186163', '1492186163', '', 'normal'), ('3', 'admin3', 'admin3', '1c11f945dfcd808a130a8c2a8753fe62', 'WOKJEn', '/assets/img/avatar.png', 'admin3@fastadmin.net', '0', '0', '1492186201', '1492186201', '', 'normal'), ('4', 'admin22', 'admin22', '1c1a0aa0c3c56a8c1a908aab94519648', 'Aybcn5', '/assets/img/avatar.png', 'admin22@fastadmin.net', '0', '0', '1492186240', '1492186240', '', 'normal'), ('5', 'admin32', 'admin32', 'ade94d5d7a7033afa7d84ac3066d0a02', 'FvYK0u', '/assets/img/avatar.png', 'admin32@fastadmin.net', '0', '0', '1492186263', '1492186263', '', 'normal'), ('6', 'test123', 'test', '2a9020e6ef15245399f00d5cda5fb1e6', 'unbBZH', '', 'test@163.com', '0', '1497062737', '1497062728', '1497070313', '', 'normal');
INSERT INTO `fa_admin` VALUES ('1', 'admin', 'Admin', '075eaec83636846f51c152f29b98a2fd', 's4f3', '/assets/img/avatar.png', 'admin@fastadmin.net', '0', '1502029281', '1492186163', '1502029281', 'd3992c3b-5ecc-4ecb-9dc2-8997780fcadc', 'normal'), ('2', 'admin2', 'admin2', '9a28ce07ce875fbd14172a9ca5357d3c', '2dHDmj', '/assets/img/avatar.png', 'admin2@fastadmin.net', '0', '1502015003', '1492186163', '1502029266', '', 'normal'), ('3', 'admin3', 'admin3', '1c11f945dfcd808a130a8c2a8753fe62', 'WOKJEn', '/assets/img/avatar.png', 'admin3@fastadmin.net', '0', '1501980868', '1492186201', '1501982377', '', 'normal'), ('4', 'admin22', 'admin22', '1c1a0aa0c3c56a8c1a908aab94519648', 'Aybcn5', '/assets/img/avatar.png', 'admin22@fastadmin.net', '0', '0', '1492186240', '1492186240', '', 'normal'), ('5', 'admin32', 'admin32', 'ade94d5d7a7033afa7d84ac3066d0a02', 'FvYK0u', '/assets/img/avatar.png', 'admin32@fastadmin.net', '0', '0', '1492186263', '1492186263', '', 'normal');
COMMIT;
-- ----------------------------
... ... @@ -54,36 +54,7 @@ CREATE TABLE `fa_admin_log` (
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '操作时间',
PRIMARY KEY (`id`),
KEY `name` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='管理员日志表';
-- ----------------------------
-- Records of `fa_admin_log`
-- ----------------------------
BEGIN;
INSERT INTO `fa_admin_log` VALUES ('1', '1', 'admin', '/public/admin.php/ajax/upload', '', '{\"name\":\"phone-bg.png\",\"signature\":\"e6afb5fb65947ba639810670d67535f2\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499768230\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499681848'), ('2', '1', 'admin', '/public/admin.php/category/edit/ids/5?dialog=1', '分类管理 编辑', '{\"dialog\":\"1\",\"row\":{\"type\":\"page\",\"pid\":\"0\",\"name\":\"\\u8f6f\\u4ef6\\u4ea7\\u54c1\",\"nickname\":\"software\",\"flag\":[\"recommend\"],\"image\":\"\\/uploads\\/20170710\\/52ecad420fc9bb113e588de3b3593b90.png\",\"keywords\":\"\",\"description\":\"\",\"weigh\":\"0\",\"status\":\"normal\"},\"ids\":\"5\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499681850'), ('3', '1', 'admin', '/public/admin.php/test/add/ids?dialog=1', '测试管理 添加', '{\"dialog\":\"1\",\"row_category_id_text\":\"\\u6d4b\\u8bd51\",\"row\":{\"category_id\":\"12\",\"category_ids\":\"12,13\",\"user_id\":\"3\",\"user_ids\":\"3\",\"week\":\"monday\",\"flag\":[\"hot\",\"index\"],\"genderdata\":\"male\",\"hobbydata\":[\"music\",\"reading\"],\"title\":\"\\u6211\\u662f\\u4e00\\u7bc7\\u6d4b\\u8bd5\\u6587\\u7ae0\",\"content\":\"<p>\\u6211\\u662f\\u6d4b\\u8bd5\\u5185\\u5bb9<\\/p>\",\"image\":\"\\/assets\\/img\\/avatar.png\",\"images\":\"\\/assets\\/img\\/avatar.png,\\/assets\\/img\\/qrcode.png\",\"attachfile\":\"\\/assets\\/img\\/avatar.png\",\"keywords\":\"\\u5173\\u952e\\u5b57\",\"description\":\"\\u63cf\\u8ff0\",\"price\":\"0.00\",\"views\":\"0\",\"startdate\":\"2017-07-10\",\"activitytime\":\"2017-07-10 18:24:45\",\"year\":\"2017\",\"times\":\"18:24:45\",\"refreshtime\":\"2017-07-10 18:24:45\",\"weigh\":\"0\",\"status\":\"normal\",\"state\":\"1\"},\"row_category_ids_text\":\"\",\"row_user_id_text\":\"admin\",\"row_user_ids_text\":\"\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499682526'), ('4', '1', 'admin', '/public/admin/test/add/ids?dialog=1', '测试管理 添加', '{\"dialog\":\"1\",\"row_category_id_text\":\"\\u6d4b\\u8bd52\",\"row\":{\"category_id\":\"13\",\"category_ids\":\"13\",\"user_id\":\"3\",\"user_ids\":\"3\",\"week\":\"monday\",\"flag\":[\"hot\",\"index\"],\"genderdata\":\"male\",\"hobbydata\":[\"music\",\"reading\"],\"title\":\"tes\",\"content\":\"<p>test<\\/p>\",\"image\":\"a\",\"images\":\"b\",\"attachfile\":\"c\",\"keywords\":\"a\",\"description\":\"a\",\"price\":\"0.00\",\"views\":\"0\",\"startdate\":\"2017-07-11\",\"activitytime\":\"2017-07-11 16:12:03\",\"year\":\"2017\",\"times\":\"16:12:03\",\"refreshtime\":\"2017-07-11 16:12:03\",\"weigh\":\"0\",\"status\":\"normal\",\"state\":\"1\"},\"row_category_ids_text\":\"\",\"row_user_id_text\":\"admin\",\"row_user_ids_text\":\"\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499760748'), ('5', '1', 'admin', '/public/admin/ajax/upload', '', '{\"name\":\"qrcode.png\",\"signature\":\"45fd8c9bd10632cabd23ba0ce7070533\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499847826\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499761445'), ('6', '1', 'admin', '/public/admin/auth/rule/edit/ids/11291?dialog=1', '权限管理 规则管理 编辑', '{\"dialog\":\"1\",\"row\":{\"ismenu\":\"1\",\"pid\":\"11290\",\"name\":\"\\/admin\\/wechat\\/autoreply\",\"title\":\"\\u5fae\\u4fe1\\u81ea\\u52a8\\u56de\\u590d\\u7ba1\\u7406\",\"icon\":\"fa fa-reply-all\",\"weigh\":\"26\",\"condition\":\"\\u7528\\u6237\\u5728\\u5fae\\u4fe1\\u516c\\u4f17\\u53f7\\u4e2d\\u8f93\\u5165\\u7279\\u5b9a\\u7684\\u6587\\u5b57\\u540e\\uff0c\\u670d\\u52a1\\u5668\\u54cd\\u5e94\\u4e0d\\u540c\\u7684\\u4e8b\\u4ef6\",\"remark\":\"\",\"status\":\"normal\"},\"ids\":\"11291\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499761628'), ('7', '1', 'admin', '/public/admin/auth/group/del/ids/1', '权限管理 角色组 删除', '{\"action\":\"del\",\"ids\":\"1\",\"params\":\"\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499762290'), ('8', '1', 'admin', '/public/admin/auth/group/del/ids/1', '权限管理 角色组 删除', '{\"action\":\"del\",\"ids\":\"1\",\"params\":\"\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499762464'), ('9', '1', 'admin', '/public/admin/auth/group/del/ids/1', '权限管理 角色组 删除', '{\"action\":\"del\",\"ids\":\"1\",\"params\":\"\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499762761'), ('10', '1', 'admin', '/public/admin/auth/group/del/ids/1', '权限管理 角色组 删除', '{\"action\":\"del\",\"ids\":\"1\",\"params\":\"\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499762770'), ('11', '1', 'admin', '/public/admin/auth/group/del/ids/1', '权限管理 角色组 删除', '{\"action\":\"del\",\"ids\":\"1\",\"params\":\"\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499762943'), ('12', '1', 'admin', '/public/admin.php/ajax/upload', '', '{\"name\":\"14558668_1350878795288.jpg\",\"signature\":\"99d25cbae44dab9ed570f7db53ef28fb\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499850578\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499764194'), ('13', '1', 'admin', '/public/admin.php/ajax/upload', '', '{\"name\":\"14558668_1350878795290.jpg\",\"signature\":\"99d25cbae44dab9ed570f7db53ef28fb\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499850578\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499764194'), ('14', '1', 'admin', '/public/admin.php/ajax/upload', '', '{\"name\":\"14558668_1350878795282.jpg\",\"signature\":\"99d25cbae44dab9ed570f7db53ef28fb\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499850578\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499764194'), ('15', '1', 'admin', '/public/admin.php/ajax/upload', '', '{\"name\":\"14558668_1350878795283.jpg\",\"signature\":\"99d25cbae44dab9ed570f7db53ef28fb\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499850578\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499764194'), ('16', '1', 'admin', '/public/admin.php/ajax/upload', '', '{\"name\":\"14558668_1350878795292.jpg\",\"signature\":\"99d25cbae44dab9ed570f7db53ef28fb\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499850578\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499764194'), ('17', '1', 'admin', '/public/admin.php/ajax/upload', '', '{\"name\":\"14558668_1350878795286.jpg\",\"signature\":\"99d25cbae44dab9ed570f7db53ef28fb\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499850578\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499764195'), ('18', '1', 'admin', '/public/admin.php/ajax/upload', '', '{\"name\":\"14558668_1350878795293.jpg\",\"signature\":\"99d25cbae44dab9ed570f7db53ef28fb\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499850578\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499764245'), ('19', '1', 'admin', '/public/admin.php/ajax/upload', '', '{\"name\":\"14558668_1350878795277.jpg\",\"signature\":\"99d25cbae44dab9ed570f7db53ef28fb\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499850578\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499764259'), ('20', '1', 'admin', '/public/admin.php/ajax/upload', '', '{\"name\":\"14558668_1350878795284.jpg\",\"signature\":\"99d25cbae44dab9ed570f7db53ef28fb\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499850578\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499764270'), ('21', '1', 'admin', '/public/admin.php/ajax/upload', '', '{\"name\":\"14558668_1350878795287.jpg\",\"signature\":\"99d25cbae44dab9ed570f7db53ef28fb\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499850578\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499764281'), ('22', '1', 'admin', '/public/admin.php/ajax/upload', '', '{\"name\":\"14558668_1350878795289.jpg\",\"signature\":\"99d25cbae44dab9ed570f7db53ef28fb\",\"bucket\":\"yourbucketname\",\"save-key\":\"\\/uploads\\/{year}{mon}{day}\\/{filemd5}{.suffix}\",\"expiration\":\"1499850578\",\"notify-url\":\"http:\\/\\/www.yoursite.com\\/upyun\\/notify\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499764291'), ('23', '1', 'admin', '/public/admin.php/general/crontab/get_schedule_future', '', '{\"schedule\":\"* * * * *\",\"days\":\"7\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499765449'), ('24', '1', 'admin', '/public/admin.php/general/crontab/check_schedule', '', '{\"row\":{\"schedule\":\"* * * * *\"}}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499765451'), ('25', '1', 'admin', '/public/admin.php/general/crontab/get_schedule_future', '', '{\"schedule\":\"* * * * *\",\"days\":\"7\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499765451'), ('26', '1', 'admin', '/public/admin.php/general/crontab/edit/ids/1?dialog=1', '常规管理 定时任务 编辑', '{\"dialog\":\"1\",\"row\":{\"title\":\"\\u8bf7\\u6c42FastAdmin\",\"type\":\"url\",\"content\":\"http:\\/\\/www.fastadmin.net\",\"schedule\":\"* * * * *\",\"maximums\":\"0\",\"begintime\":\"2017-01-01 00:00:00\",\"endtime\":\"2019-01-01 00:00:00\",\"weigh\":\"1\",\"status\":\"normal\"},\"ids\":\"1\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499765451'), ('27', '1', 'admin', '/public/admin.php/general/crontab/get_schedule_future', '', '{\"schedule\":\"* * * * *\",\"days\":\"7\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499765453'), ('28', '1', 'admin', '/public/admin.php/general/crontab/check_schedule', '', '{\"row\":{\"schedule\":\"* * * * *\"}}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499765456'), ('29', '1', 'admin', '/public/admin.php/general/crontab/get_schedule_future', '', '{\"schedule\":\"* * * * *\",\"days\":\"7\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499765456'), ('30', '1', 'admin', '/public/admin.php/general/crontab/edit/ids/2?dialog=1', '常规管理 定时任务 编辑', '{\"dialog\":\"1\",\"row\":{\"title\":\"\\u67e5\\u8be2\\u4e00\\u6761SQL\",\"type\":\"sql\",\"content\":\"SELECT 1;\",\"schedule\":\"* * * * *\",\"maximums\":\"0\",\"begintime\":\"2017-01-01 00:00:00\",\"endtime\":\"2019-01-01 00:00:00\",\"weigh\":\"2\",\"status\":\"normal\"},\"ids\":\"2\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499765456'), ('31', '1', 'admin', '/public/admin.php/general/crontab/get_schedule_future', '', '{\"schedule\":\"* * * * *\",\"days\":\"7\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499765460'), ('32', '1', 'admin', '/public/admin.php/page/add/ids?dialog=1', '单页管理 添加', '{\"dialog\":\"1\",\"row_category_id_text\":\"Android\\u5f00\\u53d1\",\"row\":{\"category_id\":\"4\",\"title\":\"test\",\"keywords\":\"test\",\"flag\":\"recommend\",\"image\":\"\\/assets\\/img\\/qrcode.png\",\"content\":\"<p>test<\\/p>\",\"icon\":\"\",\"views\":\"0\",\"comments\":\"0\",\"weigh\":\"0\",\"status\":\"normal\"}}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499769482'), ('33', '1', 'admin', '/public/admin.php/example/bootstraptable/change/ids/31', '', '{\"action\":\"\",\"ids\":\"31\",\"params\":\"\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499769813'), ('34', '1', 'admin', '/public/admin.php/example/bootstraptable/change/ids/31', '', '{\"action\":\"\",\"ids\":\"31\",\"params\":\"\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499769814'), ('35', '1', 'admin', '/public/admin.php/example/bootstraptable/change/ids/33', '', '{\"action\":\"\",\"ids\":\"33\",\"params\":\"\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499769815'), ('36', '1', 'admin', '/public/admin.php/example/bootstraptable/change/ids/35', '', '{\"action\":\"\",\"ids\":\"35\",\"params\":\"\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', '1499769816');
COMMIT;
-- ----------------------------
-- Table structure for `fa_article`
-- ----------------------------
DROP TABLE IF EXISTS `fa_article`;
CREATE TABLE `fa_article` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '分类ID',
`flag` set('h','i','r') NOT NULL DEFAULT '' COMMENT '标志',
`title` varchar(50) NOT NULL DEFAULT '' COMMENT '标题',
`content` text NOT NULL COMMENT '内容',
`image` varchar(100) NOT NULL DEFAULT '' COMMENT '图片',
`keywords` varchar(255) NOT NULL DEFAULT '' COMMENT '关键字',
`description` varchar(255) NOT NULL DEFAULT '' COMMENT '描述',
`views` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '点击',
`comments` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '评论数',
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
`status` enum('normal','hidden') NOT NULL DEFAULT 'normal' COMMENT '状态',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='文章表';
) ENGINE=InnoDB AUTO_INCREMENT=1218 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='管理员日志表';
-- ----------------------------
-- Table structure for `fa_attachment`
... ... @@ -104,9 +75,8 @@ CREATE TABLE `fa_attachment` (
`uploadtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上传时间',
`storage` enum('local','upyun') NOT NULL DEFAULT 'local' COMMENT '存储位置',
`sha1` varchar(40) NOT NULL DEFAULT '' COMMENT '文件 sha1编码',
PRIMARY KEY (`id`),
UNIQUE KEY `sha1` (`sha1`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='附件表';
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='附件表';
-- ----------------------------
-- Records of `fa_attachment`
... ... @@ -134,7 +104,7 @@ CREATE TABLE `fa_auth_group` (
-- Records of `fa_auth_group`
-- ----------------------------
BEGIN;
INSERT INTO `fa_auth_group` VALUES ('1', '0', '超级管理员', '*', '1490883540', '1490883540', 'normal'), ('2', '1', '二级管理员', '11180,11181,11182,11183,11184,11185,11198,11199,11200,11201,11202,11203,11204,11205,11206,11207,11208,11209,11210,11211,11212,11213,11214,11215,11216,11217,11218,11219,11220,11221,11222,11223,11224,11225,11226,11227,11228,11229,11230,11231,11232,11233,11234,11235,11236,11237,11238,11239,11240,11241,11242,11243,11244,11245,11246,11247,11248,11249,11250,11251,11252,11253,11254,11255,11256,11257,11258,11259,11260,11261,11262,11263,11264,11265,11266,11267,11268,11269,11270,11271,11272,11273,11274,11275,11276,11277,11278,11279,11280,11281,11282,11283,11284,11285,11286,11287,11288,11289', '1490883540', '1497431170', 'normal'), ('3', '2', '三级管理员', '11180,11181,11182,11183,11184,11185,11198,11199,11200,11201,11202,11203,11204,11205,11206,11207,11208,11209,11210,11211,11212,11213,11214,11215,11216,11217', '1490883540', '1497431183', 'normal'), ('4', '1', '二级管理员2', '11174,11175,11176,11177,11178,11179,11180,11181,11182,11183,11184,11185,11290,11291,11292,11293,11294,11295,11296,11297,11298,11299,11300,11301,11302,11303,11304,11305,11306,11307,11308,11309,11310,11311,11312,11313,11314,11315,11316', '1490883540', '1497431177', 'normal'), ('5', '2', '三级管理员2', '11180,11181,11182,11183,11184,11185,11218,11219,11220,11221,11222,11223,11224,11225,11226,11227,11228,11229,11230,11231,11232,11233,11234,11235,11236,11237,11238,11239,11240,11241,11242,11243,11244,11245,11246,11247,11248,11249,11250,11251,11252,11253,11254,11255,11256,11257,11258,11259,11260,11261,11262,11263,11264,11265,11266,11267,11268,11269,11270,11271,11272,11273,11274,11275,11276,11277,11278,11279,11280,11281,11282,11283,11284,11285,11286,11287,11288,11289', '1490883540', '1497431190', 'normal');
INSERT INTO `fa_auth_group` VALUES ('1', '0', '超级管理员', '*', '1490883540', '149088354', 'normal'), ('2', '1', '二级管理员', '1,2,4,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,40,41,42,43,44,45,46,47,48,49,50,55,56,57,58,59,60,61,62,63,64,65,5', '1490883540', '1502205308', 'normal'), ('3', '2', '三级管理员', '1,4,9,10,11,13,14,15,16,17,40,41,42,43,44,45,46,47,48,49,50,55,56,57,58,59,60,61,62,63,64,65,5', '1490883540', '1502205322', 'normal'), ('4', '1', '二级管理员2', '1,4,13,14,15,16,17,55,56,57,58,59,60,61,62,63,64,65', '1490883540', '1502205350', 'normal'), ('5', '2', '三级管理员2', '1,2,6,7,8,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34', '1490883540', '1502205344', 'normal');
COMMIT;
-- ----------------------------
... ... @@ -153,7 +123,7 @@ CREATE TABLE `fa_auth_group_access` (
-- Records of `fa_auth_group_access`
-- ----------------------------
BEGIN;
INSERT INTO `fa_auth_group_access` VALUES ('1', '1'), ('2', '2'), ('3', '3'), ('4', '5'), ('5', '5'), ('6', '2');
INSERT INTO `fa_auth_group_access` VALUES ('1', '1'), ('2', '2'), ('3', '3'), ('4', '5'), ('5', '5');
COMMIT;
-- ----------------------------
... ... @@ -178,13 +148,13 @@ CREATE TABLE `fa_auth_rule` (
UNIQUE KEY `name` (`name`) USING BTREE,
KEY `pid` (`pid`),
KEY `weigh` (`weigh`)
) ENGINE=InnoDB AUTO_INCREMENT=11324 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='节点表';
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='节点表';
-- ----------------------------
-- Records of `fa_auth_rule`
-- ----------------------------
BEGIN;
INSERT INTO `fa_auth_rule` VALUES ('11174', 'file', '0', '/admin/category', '分类管理', 'fa fa-list\r', '', '用于统一管理网站的所有分类,分类可进行无限级分类\r', '1', '1497429920', '1497429920', '119', 'normal'), ('11175', 'file', '11174', '/admin/category/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '142', 'normal'), ('11176', 'file', '11174', '/admin/category/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '141', 'normal'), ('11177', 'file', '11174', '/admin/category/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '140', 'normal'), ('11178', 'file', '11174', '/admin/category/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '139', 'normal'), ('11179', 'file', '11174', '/admin/category/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '138', 'normal'), ('11180', 'file', '0', '/admin/dashboard', '控制台', 'fa fa-dashboard\r', '', '用于展示当前系统中的统计数据、统计报表及重要实时数据\r', '1', '1497429920', '1497429920', '143', 'normal'), ('11181', 'file', '11180', '/admin/dashboard/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '136', 'normal'), ('11182', 'file', '11180', '/admin/dashboard/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '135', 'normal'), ('11183', 'file', '11180', '/admin/dashboard/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '134', 'normal'), ('11184', 'file', '11180', '/admin/dashboard/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '133', 'normal'), ('11185', 'file', '11180', '/admin/dashboard/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '132', 'normal'), ('11186', 'file', '0', '/admin/page', '单页管理', 'fa fa-tags', '', '用于管理普通的单页面,通常用于关于我们、联系我们、商务合作等单一页面\r\n', '1', '1497429920', '1497430149', '125', 'normal'), ('11187', 'file', '11186', '/admin/page/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '130', 'normal'), ('11188', 'file', '11186', '/admin/page/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '129', 'normal'), ('11189', 'file', '11186', '/admin/page/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '128', 'normal'), ('11190', 'file', '11186', '/admin/page/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '127', 'normal'), ('11191', 'file', '11186', '/admin/page/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '126', 'normal'), ('11192', 'file', '0', '/admin/version', '版本管理', 'fa fa-file-text-o', '', '', '1', '1497429920', '1497430600', '27', 'normal'), ('11193', 'file', '11192', '/admin/version/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '124', 'normal'), ('11194', 'file', '11192', '/admin/version/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '123', 'normal'), ('11195', 'file', '11192', '/admin/version/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '122', 'normal'), ('11196', 'file', '11192', '/admin/version/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '121', 'normal'), ('11197', 'file', '11192', '/admin/version/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '120', 'normal'), ('11198', 'file', '0', '/admin/auth', '权限管理', 'fa fa-group', '', '', '1', '1497429920', '1497430092', '99', 'normal'), ('11199', 'file', '11198', '/admin/auth/admin', '管理员管理', 'fa fa-user', '', '一个管理员可以有多个角色组,左侧的菜单根据管理员所拥有的权限进行生成', '1', '1497429920', '1497430320', '118', 'normal'), ('11200', 'file', '11199', '/admin/auth/admin/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '117', 'normal'), ('11201', 'file', '11199', '/admin/auth/admin/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '116', 'normal'), ('11202', 'file', '11199', '/admin/auth/admin/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '115', 'normal'), ('11203', 'file', '11199', '/admin/auth/admin/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '114', 'normal'), ('11204', 'file', '11198', '/admin/auth/adminlog', '管理员日志', 'fa fa-list-alt', '', '管理员可以查看自己所拥有的权限的管理员日志', '1', '1497429920', '1497430307', '113', 'normal'), ('11205', 'file', '11204', '/admin/auth/adminlog/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '112', 'normal'), ('11206', 'file', '11204', '/admin/auth/adminlog/detail', '详情', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '111', 'normal'), ('11207', 'file', '11204', '/admin/auth/adminlog/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '110', 'normal'), ('11208', 'file', '11198', '/admin/auth/group', '角色组', 'fa fa-group', '', '角色组可以有多个,角色有上下级层级关系,如果子角色有角色组和管理员的权限则可以派生属于自己组别下级的角色组或管理员', '1', '1497429920', '1497429920', '109', 'normal'), ('11209', 'file', '11208', '/admin/auth/group/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '108', 'normal'), ('11210', 'file', '11208', '/admin/auth/group/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '107', 'normal'), ('11211', 'file', '11208', '/admin/auth/group/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '106', 'normal'), ('11212', 'file', '11208', '/admin/auth/group/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '105', 'normal'), ('11213', 'file', '11198', '/admin/auth/rule', '规则管理', 'fa fa-bars', '', '规则通常对应一个控制器的方法,同时左侧的菜单栏数据也从规则中体现,通常建议通过控制台进行生成规则节点', '1', '1497429920', '1497430581', '104', 'normal'), ('11214', 'file', '11213', '/admin/auth/rule/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '103', 'normal'), ('11215', 'file', '11213', '/admin/auth/rule/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '102', 'normal'), ('11216', 'file', '11213', '/admin/auth/rule/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '101', 'normal'), ('11217', 'file', '11213', '/admin/auth/rule/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '100', 'normal'), ('11218', 'file', '0', '/admin/example', '示例管理', 'fa fa-magic', '', '', '1', '1497429920', '1497430123', '131', 'normal'), ('11219', 'file', '11218', '/admin/example/bootstraptable', '表格完整示例', 'fa fa-table', '', '在使用Bootstrap-table中的常用方式,更多使用方式可查看:http://bootstrap-table.wenzhixin.net.cn/zh-cn/', '1', '1497429920', '1497429920', '98', 'normal'), ('11220', 'file', '11219', '/admin/example/bootstraptable/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '97', 'normal'), ('11221', 'file', '11219', '/admin/example/bootstraptable/detail', '详情', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '96', 'normal'), ('11222', 'file', '11219', '/admin/example/bootstraptable/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '95', 'normal'), ('11223', 'file', '11219', '/admin/example/bootstraptable/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '94', 'normal'), ('11224', 'file', '11219', '/admin/example/bootstraptable/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '93', 'normal'), ('11225', 'file', '11219', '/admin/example/bootstraptable/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '92', 'normal'), ('11226', 'file', '11218', '/admin/example/colorbadge', '彩色角标', 'fa fa-table', '', '在JS端控制角标的显示与隐藏,请注意左侧菜单栏角标的数值变化', '1', '1497429920', '1497429920', '91', 'normal'), ('11227', 'file', '11226', '/admin/example/colorbadge/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '90', 'normal'), ('11228', 'file', '11226', '/admin/example/colorbadge/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '89', 'normal'), ('11229', 'file', '11226', '/admin/example/colorbadge/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '88', 'normal'), ('11230', 'file', '11226', '/admin/example/colorbadge/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '87', 'normal'), ('11231', 'file', '11226', '/admin/example/colorbadge/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '86', 'normal'), ('11232', 'file', '11218', '/admin/example/controllerjump', '控制器间跳转', 'fa fa-table', '', 'FastAdmin支持在控制器间跳转,点击后将切换到另外一个TAB中,无需刷新当前页面', '1', '1497429920', '1497429920', '85', 'normal'), ('11233', 'file', '11232', '/admin/example/controllerjump/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '84', 'normal'), ('11234', 'file', '11232', '/admin/example/controllerjump/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '83', 'normal'), ('11235', 'file', '11232', '/admin/example/controllerjump/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '82', 'normal'), ('11236', 'file', '11232', '/admin/example/controllerjump/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '81', 'normal'), ('11237', 'file', '11232', '/admin/example/controllerjump/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '80', 'normal'), ('11238', 'file', '11218', '/admin/example/cxselect', '多级联动', 'fa fa-table', '', 'FastAdmin使用了jQuery-cxselect实现多级联动,更多文档请参考https://github.com/karsonzhang/cxSelect', '1', '1497429920', '1497429920', '79', 'normal'), ('11239', 'file', '11238', '/admin/example/cxselect/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '78', 'normal'), ('11240', 'file', '11238', '/admin/example/cxselect/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '77', 'normal'), ('11241', 'file', '11238', '/admin/example/cxselect/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '76', 'normal'), ('11242', 'file', '11238', '/admin/example/cxselect/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '75', 'normal'), ('11243', 'file', '11238', '/admin/example/cxselect/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '74', 'normal'), ('11244', 'file', '11218', '/admin/example/multitable', '多表格示例', 'fa fa-table', '', '当一个页面上存在多个Bootstrap-table时该如何控制按钮和表格', '1', '1497429920', '1497429920', '73', 'normal'), ('11245', 'file', '11244', '/admin/example/multitable/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '72', 'normal'), ('11246', 'file', '11244', '/admin/example/multitable/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '71', 'normal'), ('11247', 'file', '11244', '/admin/example/multitable/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '70', 'normal'), ('11248', 'file', '11244', '/admin/example/multitable/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '69', 'normal'), ('11249', 'file', '11244', '/admin/example/multitable/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '68', 'normal'), ('11250', 'file', '11218', '/admin/example/relationmodel', '多模型关联', 'fa fa-table', '', '当使用到关联模型时需要重载index方法', '1', '1497429920', '1497429920', '67', 'normal'), ('11251', 'file', '11250', '/admin/example/relationmodel/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '66', 'normal'), ('11252', 'file', '11250', '/admin/example/relationmodel/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '65', 'normal'), ('11253', 'file', '11250', '/admin/example/relationmodel/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '64', 'normal'), ('11254', 'file', '11250', '/admin/example/relationmodel/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '63', 'normal'), ('11255', 'file', '11250', '/admin/example/relationmodel/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '62', 'normal'), ('11256', 'file', '0', '/admin/general', '常规管理', 'fa fa-cogs', '', '', '1', '1497429920', '1497430169', '137', 'normal'), ('11257', 'file', '11256', '/admin/general/attachment', '附件管理', 'fa fa-file-image-o', '', '主要用于管理上传到又拍云的数据或上传至本服务的上传数据\r\n', '1', '1497429920', '1497430699', '53', 'normal'), ('11258', 'file', '11257', '/admin/general/attachment/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '59', 'normal'), ('11259', 'file', '11257', '/admin/general/attachment/select', '选择附件', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '58', 'normal'), ('11260', 'file', '11257', '/admin/general/attachment/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '57', 'normal'), ('11261', 'file', '11257', '/admin/general/attachment/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '56', 'normal'), ('11262', 'file', '11257', '/admin/general/attachment/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '55', 'normal'), ('11263', 'file', '11257', '/admin/general/attachment/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '54', 'normal'), ('11264', 'file', '11256', '/admin/general/config', '系统配置', 'fa fa-cog', '', '', '1', '1497429920', '1497430683', '60', 'normal'), ('11265', 'file', '11264', '/admin/general/config/index', 'index', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '52', 'normal'), ('11266', 'file', '11264', '/admin/general/config/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '51', 'normal'), ('11267', 'file', '11264', '/admin/general/config/edit', 'edit', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '50', 'normal'), ('11268', 'file', '11264', '/admin/general/config/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '49', 'normal'), ('11269', 'file', '11264', '/admin/general/config/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '48', 'normal'), ('11270', 'file', '11256', '/admin/general/crontab', '定时任务', 'fa fa-tasks', '', '类似于Linux的Crontab定时任务,可以按照设定的时间进行任务的执行,目前仅支持三种任务:请求URL、执行SQL、执行Shell', '1', '1497429920', '1497429920', '47', 'normal'), ('11271', 'file', '11270', '/admin/general/crontab/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '46', 'normal'), ('11272', 'file', '11270', '/admin/general/crontab/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '45', 'normal'), ('11273', 'file', '11270', '/admin/general/crontab/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '44', 'normal'), ('11274', 'file', '11270', '/admin/general/crontab/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '43', 'normal'), ('11275', 'file', '11270', '/admin/general/crontab/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '42', 'normal'), ('11276', 'file', '11256', '/admin/general/database', '数据库管理', 'fa fa-database', '', '可在线进行一些简单的数据库表优化或修复,查看表结构和数据。也可以进行SQL语句的操作', '1', '1497429920', '1497429920', '41', 'normal'), ('11277', 'file', '11276', '/admin/general/database/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '40', 'normal'), ('11278', 'file', '11276', '/admin/general/database/query', 'SQL查询', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '39', 'normal'), ('11279', 'file', '11276', '/admin/general/database/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '38', 'normal'), ('11280', 'file', '11276', '/admin/general/database/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '37', 'normal'), ('11281', 'file', '11276', '/admin/general/database/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '36', 'normal'), ('11282', 'file', '11276', '/admin/general/database/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '35', 'normal'), ('11283', 'file', '11256', '/admin/general/profile', '个人配置', 'fa fa-user\r', '', '', '1', '1497429920', '1497429920', '34', 'normal'), ('11284', 'file', '11283', '/admin/general/profile/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '33', 'normal'), ('11285', 'file', '11283', '/admin/general/profile/update', '更新个人信息', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '32', 'normal'), ('11286', 'file', '11283', '/admin/general/profile/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '31', 'normal'), ('11287', 'file', '11283', '/admin/general/profile/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '30', 'normal'), ('11288', 'file', '11283', '/admin/general/profile/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '29', 'normal'), ('11289', 'file', '11283', '/admin/general/profile/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '28', 'normal'), ('11290', 'file', '0', '/admin/wechat', '微信管理', 'fa fa-wechat', '', '', '1', '1497429920', '1497430064', '61', 'normal'), ('11291', 'file', '11290', '/admin/wechat/autoreply', '微信自动回复管理', 'fa fa-reply-all', '用户在微信公众号中输入特定的文字后,服务器响应不同的事件', '', '1', '1497429920', '1499761628', '26', 'normal'), ('11292', 'file', '11291', '/admin/wechat/autoreply/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '25', 'normal'), ('11293', 'file', '11291', '/admin/wechat/autoreply/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '24', 'normal'), ('11294', 'file', '11291', '/admin/wechat/autoreply/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '23', 'normal'), ('11295', 'file', '11291', '/admin/wechat/autoreply/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '22', 'normal'), ('11296', 'file', '11291', '/admin/wechat/autoreply/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '21', 'normal'), ('11297', 'file', '11290', '/admin/wechat/config', '微信配置管理', 'fa fa-cog', '', '', '1', '1497429920', '1497430632', '20', 'normal'), ('11298', 'file', '11297', '/admin/wechat/config/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '19', 'normal'), ('11299', 'file', '11297', '/admin/wechat/config/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '18', 'normal'), ('11300', 'file', '11297', '/admin/wechat/config/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '17', 'normal'), ('11301', 'file', '11297', '/admin/wechat/config/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '16', 'normal'), ('11302', 'file', '11297', '/admin/wechat/config/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '15', 'normal'), ('11303', 'file', '11290', '/admin/wechat/menu', '菜单管理', 'fa fa-bars', '', '', '1', '1497429920', '1497430652', '14', 'normal'), ('11304', 'file', '11303', '/admin/wechat/menu/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '13', 'normal'), ('11305', 'file', '11303', '/admin/wechat/menu/edit', '修改', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '12', 'normal'), ('11306', 'file', '11303', '/admin/wechat/menu/sync', '同步', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '11', 'normal'), ('11307', 'file', '11303', '/admin/wechat/menu/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '10', 'normal'), ('11308', 'file', '11303', '/admin/wechat/menu/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '9', 'normal'), ('11309', 'file', '11303', '/admin/wechat/menu/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '8', 'normal'), ('11310', 'file', '11290', '/admin/wechat/response', '资源管理', 'fa fa-list-alt', '', '', '1', '1497429920', '1497429920', '7', 'normal'), ('11311', 'file', '11310', '/admin/wechat/response/select', '选择素材', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '6', 'normal'), ('11312', 'file', '11310', '/admin/wechat/response/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '5', 'normal'), ('11313', 'file', '11310', '/admin/wechat/response/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '4', 'normal'), ('11314', 'file', '11310', '/admin/wechat/response/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '3', 'normal'), ('11315', 'file', '11310', '/admin/wechat/response/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '2', 'normal'), ('11316', 'file', '11310', '/admin/wechat/response/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '1', 'normal'), ('11317', 'file', '11218', '/admin/example/tabletemplate', '表格模板示例', 'fa fa-table', '', '可以通过使用表格模板将表格中的行渲染成一样的展现方式,基于此功能可以任意定制自己想要的展示列表', '1', '1497968508', '1497968508', '0', 'normal'), ('11318', 'file', '11317', '/admin/example/tabletemplate/index', '查看', 'fa fa-circle-o', '', '', '0', '1497968508', '1497968508', '0', 'normal'), ('11319', 'file', '11317', '/admin/example/tabletemplate/detail', '详情', 'fa fa-circle-o', '', '', '0', '1497968508', '1497968508', '0', 'normal'), ('11320', 'file', '11317', '/admin/example/tabletemplate/add', '添加', 'fa fa-circle-o', '', '', '0', '1497968508', '1497968508', '0', 'normal'), ('11321', 'file', '11317', '/admin/example/tabletemplate/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497968508', '1497968508', '0', 'normal'), ('11322', 'file', '11317', '/admin/example/tabletemplate/del', '删除', 'fa fa-circle-o', '', '', '0', '1497968508', '1497968508', '0', 'normal'), ('11323', 'file', '11317', '/admin/example/tabletemplate/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497968508', '1497968508', '0', 'normal');
INSERT INTO `fa_auth_rule` VALUES ('1', 'file', '0', 'dashboard', '控制台', 'fa fa-dashboard\r', '', '用于展示当前系统中的统计数据、统计报表及重要实时数据\r', '1', '1497429920', '1497429920', '143', 'normal'), ('2', 'file', '0', 'general', '常规管理', 'fa fa-cogs', '', '', '1', '1497429920', '1497430169', '137', 'normal'), ('3', 'file', '0', 'category', '分类管理', 'fa fa-list\r', '', '用于统一管理网站的所有分类,分类可进行无限级分类\r', '1', '1497429920', '1497429920', '119', 'normal'), ('4', 'file', '0', 'addon', '插件管理', 'fa fa-rocket', '', '可在线安装、卸载、禁用、启用插件,同时支持添加本地插件', '1', '1502035509', '1502035509', '0', 'normal'), ('5', 'file', '0', 'auth', '权限管理', 'fa fa-group', '', '', '1', '1497429920', '1497430092', '99', 'normal'), ('6', 'file', '2', 'general/config', '系统配置', 'fa fa-cog', '', '', '1', '1497429920', '1497430683', '60', 'normal'), ('7', 'file', '2', 'general/attachment', '附件管理', 'fa fa-file-image-o', '', '主要用于管理上传到又拍云的数据或上传至本服务的上传数据\r\n', '1', '1497429920', '1497430699', '53', 'normal'), ('8', 'file', '2', 'general/profile', '个人配置', 'fa fa-user\r', '', '', '1', '1497429920', '1497429920', '34', 'normal'), ('9', 'file', '5', 'auth/admin', '管理员管理', 'fa fa-user', '', '一个管理员可以有多个角色组,左侧的菜单根据管理员所拥有的权限进行生成', '1', '1497429920', '1497430320', '118', 'normal'), ('10', 'file', '5', 'auth/adminlog', '管理员日志', 'fa fa-list-alt', '', '管理员可以查看自己所拥有的权限的管理员日志', '1', '1497429920', '1497430307', '113', 'normal'), ('11', 'file', '5', 'auth/group', '角色组', 'fa fa-group', '', '角色组可以有多个,角色有上下级层级关系,如果子角色有角色组和管理员的权限则可以派生属于自己组别下级的角色组或管理员', '1', '1497429920', '1497429920', '109', 'normal'), ('12', 'file', '5', 'auth/rule', '规则管理', 'fa fa-bars', '', '规则通常对应一个控制器的方法,同时左侧的菜单栏数据也从规则中体现,通常建议通过控制台进行生成规则节点', '1', '1497429920', '1497430581', '104', 'normal'), ('13', 'file', '1', 'dashboard/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '136', 'normal'), ('14', 'file', '1', 'dashboard/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '135', 'normal'), ('15', 'file', '1', 'dashboard/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '133', 'normal'), ('16', 'file', '1', 'dashboard/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '134', 'normal'), ('17', 'file', '1', 'dashboard/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '132', 'normal'), ('18', 'file', '6', 'general/config/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '52', 'normal'), ('19', 'file', '6', 'general/config/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '51', 'normal'), ('20', 'file', '6', 'general/config/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '50', 'normal'), ('21', 'file', '6', 'general/config/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '49', 'normal'), ('22', 'file', '6', 'general/config/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '48', 'normal'), ('23', 'file', '7', 'general/attachment/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '59', 'normal'), ('24', 'file', '7', 'general/attachment/select', '选择附件', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '58', 'normal'), ('25', 'file', '7', 'general/attachment/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '57', 'normal'), ('26', 'file', '7', 'general/attachment/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '56', 'normal'), ('27', 'file', '7', 'general/attachment/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '55', 'normal'), ('28', 'file', '7', 'general/attachment/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '54', 'normal'), ('29', 'file', '8', 'general/profile/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '33', 'normal'), ('30', 'file', '8', 'general/profile/update', '更新个人信息', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '32', 'normal'), ('31', 'file', '8', 'general/profile/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '31', 'normal'), ('32', 'file', '8', 'general/profile/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '30', 'normal'), ('33', 'file', '8', 'general/profile/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '29', 'normal'), ('34', 'file', '8', 'general/profile/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '28', 'normal'), ('35', 'file', '3', 'category/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '142', 'normal'), ('36', 'file', '3', 'category/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '141', 'normal'), ('37', 'file', '3', 'category/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '140', 'normal'), ('38', 'file', '3', 'category/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '139', 'normal'), ('39', 'file', '3', 'category/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '138', 'normal'), ('40', 'file', '9', 'auth/admin/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '117', 'normal'), ('41', 'file', '9', 'auth/admin/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '116', 'normal'), ('42', 'file', '9', 'auth/admin/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '115', 'normal'), ('43', 'file', '9', 'auth/admin/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '114', 'normal'), ('44', 'file', '10', 'auth/adminlog/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '112', 'normal'), ('45', 'file', '10', 'auth/adminlog/detail', '详情', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '111', 'normal'), ('46', 'file', '10', 'auth/adminlog/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '110', 'normal'), ('47', 'file', '11', 'auth/group/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '108', 'normal'), ('48', 'file', '11', 'auth/group/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '107', 'normal'), ('49', 'file', '11', 'auth/group/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '106', 'normal'), ('50', 'file', '11', 'auth/group/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '105', 'normal'), ('51', 'file', '12', 'auth/rule/index', '查看', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '103', 'normal'), ('52', 'file', '12', 'auth/rule/add', '添加', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '102', 'normal'), ('53', 'file', '12', 'auth/rule/edit', '编辑', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '101', 'normal'), ('54', 'file', '12', 'auth/rule/del', '删除', 'fa fa-circle-o', '', '', '0', '1497429920', '1497429920', '100', 'normal'), ('55', 'file', '4', 'addon/index', '查看', 'fa fa-circle-o', '', '', '0', '1502035509', '1502035509', '0', 'normal'), ('56', 'file', '4', 'addon/add', '添加', 'fa fa-circle-o', '', '', '0', '1502035509', '1502035509', '0', 'normal'), ('57', 'file', '4', 'addon/edit', '修改', 'fa fa-circle-o', '', '', '0', '1502035509', '1502035509', '0', 'normal'), ('58', 'file', '4', 'addon/del', '删除', 'fa fa-circle-o', '', '', '0', '1502035509', '1502035509', '0', 'normal'), ('59', 'file', '4', 'addon/local', '本地安装', 'fa fa-circle-o', '', '', '0', '1502035509', '1502035509', '0', 'normal'), ('60', 'file', '4', 'addon/state', '禁用启用', 'fa fa-circle-o', '', '', '0', '1502035509', '1502035509', '0', 'normal'), ('61', 'file', '4', 'addon/install', '安装', 'fa fa-circle-o', '', '', '0', '1502035509', '1502035509', '0', 'normal'), ('62', 'file', '4', 'addon/uninstall', '卸载', 'fa fa-circle-o', '', '', '0', '1502035509', '1502035509', '0', 'normal'), ('63', 'file', '4', 'addon/config', '配置', 'fa fa-circle-o', '', '', '0', '1502035509', '1502035509', '0', 'normal'), ('64', 'file', '4', 'addon/refresh', '刷新', 'fa fa-circle-o', '', '', '0', '1502035509', '1502035509', '0', 'normal'), ('65', 'file', '4', 'addon/multi', '批量更新', 'fa fa-circle-o', '', '', '0', '1502035509', '1502035509', '0', 'normal');
COMMIT;
-- ----------------------------
... ... @@ -209,13 +179,13 @@ CREATE TABLE `fa_category` (
PRIMARY KEY (`id`),
KEY `weigh` (`weigh`,`id`),
KEY `pid` (`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='分类表';
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='分类表';
-- ----------------------------
-- Records of `fa_category`
-- ----------------------------
BEGIN;
INSERT INTO `fa_category` VALUES ('1', '0', 'page', '官方新闻', 'news', 'recommend', '/assets/img/qrcode.png', '', '', 'news', '1495262190', '1495262190', '1', 'normal'), ('2', '0', 'page', '移动应用', 'mobileapp', 'hot', '/assets/img/qrcode.png', '', '', 'mobileapp', '1495262244', '1495262244', '2', 'normal'), ('3', '2', 'page', '微信公众号', 'wechatpublic', 'index', '/assets/img/qrcode.png', '', '', 'wechatpublic', '1495262288', '1495262288', '3', 'normal'), ('4', '2', 'page', 'Android开发', 'android', 'recommend', '/assets/img/qrcode.png', '', '', 'android', '1495262317', '1495262317', '4', 'normal'), ('5', '0', 'page', '软件产品', 'software', 'recommend', '/assets/img/qrcode.png', '', '', 'software', '1495262336', '1499681850', '5', 'normal'), ('6', '5', 'page', '网站建站', 'website', 'recommend', '/assets/img/qrcode.png', '', '', 'website', '1495262357', '1495262357', '6', 'normal'), ('7', '5', 'page', '企业管理软件', 'company', 'index', '/assets/img/qrcode.png', '', '', 'company', '1495262391', '1495262391', '7', 'normal'), ('8', '6', 'page', 'PC端', 'website-pc', 'recommend', '/assets/img/qrcode.png', '', '', 'website-pc', '1495262424', '1495262424', '8', 'normal'), ('9', '6', 'page', '移动端', 'website-mobile', 'recommend', '/assets/img/qrcode.png', '', '', 'website-mobile', '1495262456', '1495262456', '9', 'normal'), ('10', '7', 'page', 'CRM系统 ', 'company-crm', 'recommend', '/assets/img/qrcode.png', '', '', 'company-crm', '1495262487', '1495262487', '10', 'normal'), ('11', '7', 'page', 'SASS平台软件', 'company-sass', 'recommend', '/assets/img/qrcode.png', '', '', 'company-sass', '1495262515', '1495262515', '11', 'normal'), ('12', '0', 'test', '测试1', 'test1', 'recommend', '/assets/img/qrcode.png', '', '', 'test1', '1497015727', '1497015727', '12', 'normal'), ('13', '0', 'test', '测试2', 'test2', 'recommend', '/assets/img/qrcode.png', '', '', 'test2', '1497015738', '1497015738', '13', 'normal');
INSERT INTO `fa_category` VALUES ('1', '0', 'page', '官方新闻', 'news', 'recommend', '/assets/img/qrcode.png', '', '', 'news', '1495262190', '1495262190', '1', 'normal'), ('2', '0', 'page', '移动应用', 'mobileapp', 'hot', '/assets/img/qrcode.png', '', '', 'mobileapp', '1495262244', '1495262244', '2', 'normal'), ('3', '2', 'page', '微信公众号', 'wechatpublic', 'index', '/assets/img/qrcode.png', '', '', 'wechatpublic', '1495262288', '1495262288', '3', 'normal'), ('4', '2', 'page', 'Android开发', 'android', 'recommend', '/assets/img/qrcode.png', '', '', 'android', '1495262317', '1495262317', '4', 'normal'), ('5', '0', 'page', '软件产品', 'software', 'recommend', '/assets/img/qrcode.png', '', '', 'software', '1495262336', '1499681850', '5', 'normal'), ('6', '5', 'page', '网站建站', 'website', 'recommend', '/assets/img/qrcode.png', '', '', 'website', '1495262357', '1495262357', '6', 'normal'), ('7', '5', 'page', '企业管理软件', 'company', 'index', '/assets/img/qrcode.png', '', '', 'company', '1495262391', '1495262391', '7', 'normal'), ('8', '6', 'page', 'PC端', 'website-pc', 'recommend', '/assets/img/qrcode.png', '', '', 'website-pc', '1495262424', '1495262424', '8', 'normal'), ('9', '6', 'page', '移动端', 'website-mobile', 'recommend', '/assets/img/qrcode.png', '', '', 'website-mobile', '1495262456', '1495262456', '9', 'normal'), ('10', '7', 'page', 'CRM系统 ', 'company-crm', 'recommend', '/assets/img/qrcode.png', '', '', 'company-crm', '1495262487', '1495262487', '10', 'normal'), ('11', '7', 'page', 'SASS平台软件', 'company-sass', 'recommend', '/assets/img/qrcode.png', '', '', 'company-sass', '1495262515', '1495262515', '11', 'normal'), ('12', '0', 'test', '测试1', 'test1', 'recommend', '/assets/img/qrcode.png', '', '', 'test1', '1497015727', '1497015727', '12', 'normal'), ('13', '0', 'test', '测试2', 'test2', 'recommend', '/assets/img/qrcode.png', '', '', 'test2', '1497015738', '1497015738', '13', 'normal'), ('14', '0', 'page', '官方新闻', 'news', 'recommend', '/assets/img/qrcode.png', '', '', 'news', '1495262190', '1495262190', '1', 'normal'), ('15', '0', 'page', '移动应用', 'mobileapp', 'hot', '/assets/img/qrcode.png', '', '', 'mobileapp', '1495262244', '1495262244', '2', 'normal'), ('16', '2', 'page', '微信公众号', 'wechatpublic', 'index', '/assets/img/qrcode.png', '', '', 'wechatpublic', '1495262288', '1495262288', '3', 'normal'), ('17', '2', 'page', 'Android开发', 'android', 'recommend', '/assets/img/qrcode.png', '', '', 'android', '1495262317', '1495262317', '4', 'normal'), ('18', '0', 'page', '软件产品', 'software', 'recommend', '/assets/img/qrcode.png', '', '', 'software', '1495262336', '1499681850', '5', 'normal'), ('19', '5', 'page', '网站建站', 'website', 'recommend', '/assets/img/qrcode.png', '', '', 'website', '1495262357', '1495262357', '6', 'normal'), ('20', '5', 'page', '企业管理软件', 'company', 'index', '/assets/img/qrcode.png', '', '', 'company', '1495262391', '1495262391', '7', 'normal'), ('21', '6', 'page', 'PC端', 'website-pc', 'recommend', '/assets/img/qrcode.png', '', '', 'website-pc', '1495262424', '1495262424', '8', 'normal'), ('22', '6', 'page', '移动端', 'website-mobile', 'recommend', '/assets/img/qrcode.png', '', '', 'website-mobile', '1495262456', '1495262456', '9', 'normal'), ('23', '7', 'page', 'CRM系统 ', 'company-crm', 'recommend', '/assets/img/qrcode.png', '', '', 'company-crm', '1495262487', '1495262487', '10', 'normal'), ('24', '7', 'page', 'SASS平台软件', 'company-sass', 'recommend', '/assets/img/qrcode.png', '', '', 'company-sass', '1495262515', '1495262515', '11', 'normal'), ('25', '0', 'test', '测试1', 'test1', 'recommend', '/assets/img/qrcode.png', '', '', 'test1', '1497015727', '1497015727', '12', 'normal'), ('26', '0', 'test', '测试2', 'test2', 'recommend', '/assets/img/qrcode.png', '', '', 'test2', '1497015738', '1497015738', '13', 'normal');
COMMIT;
-- ----------------------------
... ... @@ -245,65 +215,6 @@ INSERT INTO `fa_config` VALUES ('1', 'name', 'basic', '站点名称', '请填写
COMMIT;
-- ----------------------------
-- Table structure for `fa_crontab`
-- ----------------------------
DROP TABLE IF EXISTS `fa_crontab`;
CREATE TABLE `fa_crontab` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`type` varchar(10) NOT NULL DEFAULT '' COMMENT '事件类型',
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '事件标题',
`content` text NOT NULL COMMENT '事件内容',
`schedule` varchar(100) NOT NULL DEFAULT '' COMMENT 'Crontab格式',
`sleep` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '延迟秒数执行',
`maximums` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大执行次数 0为不限',
`executes` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '已经执行的次数',
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`begintime` int(10) NOT NULL DEFAULT '0' COMMENT '开始时间',
`endtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '结束时间',
`executetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后执行时间',
`weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
`status` enum('completed','expired','hidden','normal') NOT NULL DEFAULT 'normal' COMMENT '状态',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='定时任务表';
-- ----------------------------
-- Records of `fa_crontab`
-- ----------------------------
BEGIN;
INSERT INTO `fa_crontab` VALUES ('1', 'url', '请求FastAdmin', 'http://www.fastadmin.net', '* * * * *', '0', '0', '1063', '1497070825', '1499788320', '1483200000', '1546272000', '1499788320', '1', 'normal'), ('2', 'sql', '查询一条SQL', 'SELECT 1;', '* * * * *', '0', '0', '1063', '1497071095', '1499788320', '1483200000', '1546272000', '1499788320', '2', 'normal');
COMMIT;
-- ----------------------------
-- Table structure for `fa_page`
-- ----------------------------
DROP TABLE IF EXISTS `fa_page`;
CREATE TABLE `fa_page` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`category_id` int(10) NOT NULL DEFAULT '0' COMMENT '分类ID',
`title` varchar(50) NOT NULL DEFAULT '' COMMENT '标题',
`keywords` varchar(255) NOT NULL DEFAULT '' COMMENT '关键字',
`flag` set('hot','index','recommend') NOT NULL DEFAULT '' COMMENT '标志',
`image` varchar(255) NOT NULL DEFAULT '' COMMENT '头像',
`content` text NOT NULL COMMENT '内容',
`icon` varchar(50) NOT NULL DEFAULT '' COMMENT '图标',
`views` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '点击',
`comments` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '评论',
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
`status` varchar(30) NOT NULL DEFAULT '' COMMENT '状态',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='单页表';
-- ----------------------------
-- Records of `fa_page`
-- ----------------------------
BEGIN;
INSERT INTO `fa_page` VALUES ('1', '4', 'test', 'test', 'recommend', '/assets/img/qrcode.png', '<p>test</p>', '', '0', '0', '1499769482', '1499769482', '0', 'normal');
COMMIT;
-- ----------------------------
-- Table structure for `fa_test`
-- ----------------------------
DROP TABLE IF EXISTS `fa_test`;
... ... @@ -311,8 +222,6 @@ CREATE TABLE `fa_test` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '分类ID(单选)',
`category_ids` varchar(100) NOT NULL COMMENT '分类ID(多选)',
`user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
`user_ids` varchar(100) NOT NULL DEFAULT '' COMMENT '多会员ID',
`week` enum('monday','tuesday','wednesday') NOT NULL COMMENT '星期(单选):monday=星期一,tuesday=星期二,wednesday=星期三',
`flag` set('hot','index','recommend') NOT NULL DEFAULT '' COMMENT '标志(多选):hot=热门,index=首页,recommend=推荐',
`genderdata` enum('male','female') NOT NULL DEFAULT 'male' COMMENT '性别(单选):male=男,female=女',
... ... @@ -324,6 +233,7 @@ CREATE TABLE `fa_test` (
`attachfile` varchar(100) NOT NULL DEFAULT '' COMMENT '附件',
`keywords` varchar(100) NOT NULL DEFAULT '' COMMENT '关键字',
`description` varchar(255) NOT NULL DEFAULT '' COMMENT '描述',
`city` varchar(100) NOT NULL DEFAULT '' COMMENT '省市',
`price` float(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '价格',
`views` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '点击',
`startdate` date DEFAULT NULL COMMENT '开始日期',
... ... @@ -334,6 +244,7 @@ CREATE TABLE `fa_test` (
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
`switch` tinyint(1) NOT NULL DEFAULT '0' COMMENT '开关',
`status` enum('normal','hidden') NOT NULL DEFAULT 'normal' COMMENT '状态',
`state` enum('0','1','2') NOT NULL DEFAULT '1' COMMENT '状态值:0=禁用,1=正常,2=推荐',
PRIMARY KEY (`id`)
... ... @@ -343,193 +254,7 @@ CREATE TABLE `fa_test` (
-- Records of `fa_test`
-- ----------------------------
BEGIN;
INSERT INTO `fa_test` VALUES ('1', '12', '12,13', '3', '3', 'monday', 'hot,index', 'male', 'music,reading', '我是一篇测试文章', '<p>我是测试内容</p>', '/assets/img/avatar.png', '/assets/img/avatar.png,/assets/img/qrcode.png', '/assets/img/avatar.png', '关键字', '描述', '0.00', '0', '2017-07-10', '2017-07-10 18:24:45', '2017', '18:24:45', '1499682285', '1499682526', '1499682526', '0', 'normal', '1');
COMMIT;
-- ----------------------------
-- Table structure for `fa_user`
-- ----------------------------
DROP TABLE IF EXISTS `fa_user`;
CREATE TABLE `fa_user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`username` varchar(32) NOT NULL DEFAULT '' COMMENT '用户名',
`nickname` varchar(50) NOT NULL DEFAULT '' COMMENT '昵称',
`password` varchar(32) NOT NULL DEFAULT '' COMMENT '密码',
`salt` varchar(30) NOT NULL DEFAULT '' COMMENT '密码盐',
`email` varchar(100) NOT NULL DEFAULT '' COMMENT '电子邮箱',
`mobile` varchar(11) NOT NULL DEFAULT '' COMMENT '手机号',
`avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '头像',
`level` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '等级',
`gender` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '性别',
`birthday` date NOT NULL COMMENT '生日',
`score` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '积分',
`prevtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上次登录时间',
`loginfailure` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '失败次数',
`logintime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登录时间',
`loginip` varchar(50) NOT NULL DEFAULT '' COMMENT '登录IP',
`joinip` varchar(50) NOT NULL DEFAULT '' COMMENT '加入时间',
`jointime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '加入时间',
`status` varchar(30) NOT NULL DEFAULT '' COMMENT '状态',
PRIMARY KEY (`id`),
KEY `username` (`username`),
KEY `email` (`email`),
KEY `mobile` (`mobile`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='会员表';
-- ----------------------------
-- Records of `fa_user`
-- ----------------------------
BEGIN;
INSERT INTO `fa_user` VALUES ('3', 'admin', 'admin', 'c13f62012fd6a8fdf06b3452a94430e5', 'rpR6Bv', 'admin@163.com', '13888888888', '/assets/img/avatar.png', '0', '0', '2017-04-15', '0', '1491822015', '0', '1491822038', '127.0.0.1', '127.0.0.1', '1491461418', 'normal');
COMMIT;
-- ----------------------------
-- Table structure for `fa_user_signin`
-- ----------------------------
DROP TABLE IF EXISTS `fa_user_signin`;
CREATE TABLE `fa_user_signin` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
`successions` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '连续签到次数',
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='会员签到表';
-- ----------------------------
-- Table structure for `fa_user_third`
-- ----------------------------
DROP TABLE IF EXISTS `fa_user_third`;
CREATE TABLE `fa_user_third` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
`platform` enum('weibo','wechat','qq') NOT NULL COMMENT '第三方应用',
`openid` varchar(50) NOT NULL DEFAULT '' COMMENT '第三方唯一ID',
`openname` varchar(50) NOT NULL DEFAULT '' COMMENT '第三方会员昵称',
`access_token` varchar(100) NOT NULL DEFAULT '',
`refresh_token` varchar(100) NOT NULL DEFAULT '',
`expires_in` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '有效期',
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`logintime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登录时间',
`expiretime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '过期时间',
PRIMARY KEY (`id`),
UNIQUE KEY `platform` (`platform`,`openid`),
KEY `user_id` (`user_id`,`platform`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='会员连接表';
-- ----------------------------
-- Table structure for `fa_version`
-- ----------------------------
DROP TABLE IF EXISTS `fa_version`;
CREATE TABLE `fa_version` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`oldversion` varchar(30) NOT NULL DEFAULT '' COMMENT '旧版本号',
`newversion` varchar(30) NOT NULL DEFAULT '' COMMENT '新版本号',
`packagesize` varchar(30) NOT NULL DEFAULT '' COMMENT '包大小',
`content` varchar(500) NOT NULL DEFAULT '' COMMENT '升级内容',
`downloadurl` varchar(255) NOT NULL DEFAULT '' COMMENT '下载地址',
`enforce` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '强制更新',
`createtime` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
`status` varchar(30) NOT NULL DEFAULT '' COMMENT '状态',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='版本表';
-- ----------------------------
-- Records of `fa_version`
-- ----------------------------
BEGIN;
INSERT INTO `fa_version` VALUES ('1', '1.1.1,2', '1.2.1', '20M', '更新内容', 'http://www.downloadurl.com', '1', '1400000000', '0', '0', 'normal');
COMMIT;
-- ----------------------------
-- Table structure for `fa_wechat_autoreply`
-- ----------------------------
DROP TABLE IF EXISTS `fa_wechat_autoreply`;
CREATE TABLE `fa_wechat_autoreply` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '标题',
`text` varchar(100) NOT NULL DEFAULT '' COMMENT '触发文本',
`eventkey` varchar(50) NOT NULL DEFAULT '' COMMENT '响应事件',
`remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`status` varchar(30) NOT NULL DEFAULT '' COMMENT '状态',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='微信自动回复表';
-- ----------------------------
-- Records of `fa_wechat_autoreply`
-- ----------------------------
BEGIN;
INSERT INTO `fa_wechat_autoreply` VALUES ('1', '输入hello', 'hello', '58c7d908c4570', '123', '1493366855', '1493366855', 'normal'), ('2', '输入你好', '你好', '58fdfaa9e1965', 'sad', '1493704976', '1493704976', 'normal');
COMMIT;
-- ----------------------------
-- Table structure for `fa_wechat_config`
-- ----------------------------
DROP TABLE IF EXISTS `fa_wechat_config`;
CREATE TABLE `fa_wechat_config` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '配置名称',
`title` varchar(50) NOT NULL DEFAULT '' COMMENT '配置标题',
`value` text NOT NULL COMMENT '配置值',
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='微信配置表';
-- ----------------------------
-- Records of `fa_wechat_config`
-- ----------------------------
BEGIN;
INSERT INTO `fa_wechat_config` VALUES ('1', 'menu', '微信菜单', '[{\"name\":\"FastAdmin\",\"sub_button\":[{\"name\":\"官网\",\"type\":\"view\",\"url\":\"http:\\/\\/www.fastadmin.net\"},{\"name\":\"在线演示\",\"type\":\"view\",\"url\":\"http:\\/\\/demo.fastadmin.net\"},{\"name\":\"文档\",\"type\":\"view\",\"url\":\"http:\\/\\/doc.fastadmin.net\"}]},{\"name\":\"在线客服\",\"type\":\"click\",\"key\":\"58cb852984970\"},{\"name\":\"关于我们\",\"type\":\"click\",\"key\":\"58bf944aa0777\"}]', '1497398820', '1497422985'), ('2', 'service', '客服配置', '{\"onlinetime\":\"09:00-18:00\",\"offlinemsg\":\"请在工作时间联系客服!\",\"nosessionmsg\":\"当前没有客服在线!请稍后重试!\",\"waitformsg\":\"请问有什么可以帮到您?\"}', '1497429674', '1497429674'), ('3', 'signin', '连续登录配置', '{\"s1\":\"100\",\"s2\":\"200\",\"s3\":\"300\",\"sn\":\"500\"}', '1497429711', '1497429711');
COMMIT;
-- ----------------------------
-- Table structure for `fa_wechat_context`
-- ----------------------------
DROP TABLE IF EXISTS `fa_wechat_context`;
CREATE TABLE `fa_wechat_context` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`openid` varchar(64) NOT NULL DEFAULT '',
`type` varchar(30) NOT NULL DEFAULT '' COMMENT '类型',
`eventkey` varchar(64) NOT NULL DEFAULT '',
`command` varchar(64) NOT NULL DEFAULT '',
`message` varchar(255) NOT NULL DEFAULT '' COMMENT '内容',
`refreshtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后刷新时间',
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `openid` (`openid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='微信上下文表';
-- ----------------------------
-- Table structure for `fa_wechat_response`
-- ----------------------------
DROP TABLE IF EXISTS `fa_wechat_response`;
CREATE TABLE `fa_wechat_response` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '资源名',
`eventkey` varchar(128) NOT NULL DEFAULT '' COMMENT '事件',
`type` enum('text','image','news','voice','video','music','link','app') NOT NULL DEFAULT 'text' COMMENT '类型',
`content` text NOT NULL COMMENT '内容',
`remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
`status` varchar(30) NOT NULL DEFAULT '' COMMENT '状态',
PRIMARY KEY (`id`),
UNIQUE KEY `event` (`eventkey`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='微信资源表';
-- ----------------------------
-- Records of `fa_wechat_response`
-- ----------------------------
BEGIN;
INSERT INTO `fa_wechat_response` VALUES ('1', '签到送积分', '58adaf7876aab', 'app', '{\"app\":\"signin\"}', '', '1487777656', '1487777656', 'normal'), ('2', '关于我们', '58bf944aa0777', 'app', '{\"app\":\"page\",\"id\":\"1\"}', '', '1488950346', '1488950346', 'normal'), ('3', '自动回复1', '58c7d908c4570', 'text', '{\"content\":\"world\"}', '', '1489492232', '1489492232', 'normal'), ('4', '联系客服', '58cb852984970', 'app', '{\"app\":\"service\"}', '', '1489732905', '1489732905', 'normal'), ('5', '自动回复2', '58fdfaa9e1965', 'text', '{\"content\":\"我是FastAdmin!\"}', '', '1493039785', '1493039785', 'normal');
INSERT INTO `fa_test` VALUES ('1', '12', '12,13', 'monday', 'hot,index', 'male', 'music,reading', '我是一篇测试文章', '<p>我是测试内容</p>', '/assets/img/avatar.png', '/assets/img/avatar.png,/assets/img/qrcode.png', '/assets/img/avatar.png', '关键字', '描述', '广西壮族自治区/百色市/平果县', '0.00', '0', '2017-07-10', '2017-07-10 18:24:45', '2017', '18:24:45', '1499682285', '1499682526', '1499682526', '0', '1', 'normal', '1');
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;
SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
... ...
... ... @@ -219,13 +219,13 @@ class Menu extends Command
//先定入菜单的数据
$pid = 0;
$name = "/admin";
foreach (explode('/', $controller) as $k => $v)
foreach ($controllerArr as $k => $v)
{
$name .= '/' . strtolower($v);
$title = (!isset($controllerArr[$k + 1]) ? $controllerTitle : '');
$icon = (!isset($controllerArr[$k + 1]) ? $controllerIcon : 'fa fa-list');
$remark = (!isset($controllerArr[$k + 1]) ? $controllerRemark : '');
$key = $k + 1;
$name = strtolower(implode('/', array_slice($controllerArr, 0, $key)));
$title = (!isset($controllerArr[$key]) ? $controllerTitle : '');
$icon = (!isset($controllerArr[$key]) ? $controllerIcon : 'fa fa-list');
$remark = (!isset($controllerArr[$key]) ? $controllerRemark : '');
$title = $title ? $title : __(ucfirst($v) . ' manager');
$rulemodel = $this->model->get(['name' => $name]);
if (!$rulemodel)
... ...
... ... @@ -32,8 +32,8 @@ class Min extends Command
protected function execute(Input $input, Output $output)
{
$module = $input->getOption('module') ? : '';
$resource = $input->getOption('resource') ? : '';
$module = $input->getOption('module') ?: '';
$resource = $input->getOption('resource') ?: '';
if (!$module || !in_array($module, ['frontend', 'backend', 'all']))
{
... ... @@ -85,8 +85,8 @@ class Min extends Command
'jsBaseUrl' => $this->options['jsBaseUrl'],
'cssBaseName' => str_replace('{module}', $mod, $this->options['cssBaseName']),
'cssBaseUrl' => $this->options['cssBaseUrl'],
'jsBasePath' => ROOT_PATH . $this->options['jsBaseUrl'],
'cssBasePath' => ROOT_PATH . $this->options['cssBaseUrl'],
'jsBasePath' => str_replace('\\', '/', ROOT_PATH) . $this->options['jsBaseUrl'],
'cssBasePath' => str_replace('\\', '/', ROOT_PATH) . $this->options['cssBaseUrl'],
'ds' => DS,
];
... ...
... ... @@ -135,3 +135,87 @@ function build_heading($title = NULL, $content = NULL)
return '';
return '<div class="panel-heading"><div class="panel-lead"><em>' . $title . '</em>' . $content . '</div></div>';
}
/**
* 判断文件或文件夹是否可写
* @param string
* @return bool
*/
function is_really_writable($file)
{
if (DIRECTORY_SEPARATOR === '/')
{
return is_writable($file);
}
if (is_dir($file))
{
$file = rtrim($file, '/') . '/' . md5(mt_rand());
if (($fp = @fopen($file, 'ab')) === FALSE)
{
return FALSE;
}
fclose($fp);
@chmod($file, 0777);
@unlink($file);
return TRUE;
}
elseif (!is_file($file) OR ( $fp = @fopen($file, 'ab')) === FALSE)
{
return FALSE;
}
fclose($fp);
return TRUE;
}
/**
* 删除文件夹
* @param string $dirname
* @return boolean
*/
function rmdirs($dirname)
{
if (!is_dir($dirname))
return false;
$files = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($dirname, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST
);
foreach ($files as $fileinfo)
{
$todo = ($fileinfo->isDir() ? 'rmdir' : 'unlink');
$todo($fileinfo->getRealPath());
}
@rmdir($dirname);
return true;
}
/**
* 复制文件夹
* @param string $source 源文件夹
* @param string $dest 目标文件夹
*/
function copydirs($source, $dest)
{
if (!is_dir($dest))
{
mkdir($dest, 0755);
}
foreach (
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST) as $item
)
{
if ($item->isDir())
{
$sontDir = $dest . DS . $iterator->getSubPathName();
if (!is_dir($sontDir))
{
mkdir($sontDir);
}
}
else
{
copy($item, $dest . DS . $iterator->getSubPathName());
}
}
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
use think\addons\AddonException;
use think\addons\Service;
use think\Config;
use think\Exception;
/**
* 插件管理
*
* @icon fa fa-circle-o
*/
class Addon extends Backend
{
protected $model = null;
public function _initialize()
{
parent::_initialize();
}
/**
* 查看
*/
public function index()
{
$addons = get_addon_list();
foreach ($addons as $k => &$v)
{
$config = get_addon_config($v['name']);
$v['config'] = $config ? 1 : 0;
}
$this->assignconfig(['addons' => $addons]);
return $this->view->fetch();
}
/**
* 配置
*/
public function config($ids = NULL)
{
$name = $this->request->get("name");
if (!$name)
{
$this->error(__('Parameter %s can not be empty', $id ? 'id' : 'name'));
}
if (!is_dir(ADDON_PATH . $name))
{
$this->error(__('Directory not found'));
}
$info = get_addon_info($name);
$config = get_addon_fullconfig($name);
if (!$info)
$this->error(__('No Results were found'));
if ($this->request->isPost())
{
$params = $this->request->post("row/a");
if ($params)
{
$configList = [];
foreach ($config as $k => &$v)
{
if (isset($params[$v['name']]))
{
if ($v['type'] == 'array')
{
$fieldarr = $valuearr = [];
$field = $params[$v['name']]['field'];
$value = $params[$v['name']]['value'];
foreach ($field as $m => $n)
{
if ($n != '')
{
$fieldarr[] = $field[$m];
$valuearr[] = $value[$m];
}
}
$params[$v['name']] = array_combine($fieldarr, $valuearr);
$value = $params[$v['name']];
}
else
{
$value = is_array($params[$v['name']]) ? implode(',', $params[$v['name']]) : $params[$v['name']];
}
$v['value'] = $value;
}
}
try
{
//更新配置文件
set_addon_fullconfig($name, $config);
$this->success();
}
catch (Exception $e)
{
$this->error($e->getMessage());
}
}
$this->error(__('Parameter %s can not be empty', ''));
}
$this->view->assign("addon", ['info' => $info, 'config' => $config]);
return $this->view->fetch();
}
/**
* 安装
*/
public function install()
{
$name = $this->request->post("name");
$force = (int) $this->request->post("force");
if (!$name)
{
$this->error(__('Parameter %s can not be empty', 'name'));
}
try
{
Service::install($name, $force);
$this->success("安装成功", null, ['addon' => get_addon_info($name)]);
}
catch (AddonException $e)
{
$this->result($e->getData(), $e->getCode(), $e->getMessage());
}
catch (Exception $e)
{
$this->error($e->getMessage(), $e->getCode());
}
}
/**
* 卸载
*/
public function uninstall()
{
$name = $this->request->post("name");
$force = (int) $this->request->post("force");
if (!$name)
{
$this->error(__('Parameter %s can not be empty', 'name'));
}
try
{
Service::uninstall($name, $force);
$this->success("卸载成功");
}
catch (AddonException $e)
{
$this->result($e->getData(), $e->getCode(), $e->getMessage());
}
catch (Exception $e)
{
$this->error($e->getMessage());
}
}
/**
* 禁用启用
*/
public function state()
{
$name = $this->request->post("name");
$action = $this->request->post("action");
$force = (int) $this->request->post("force");
if (!$name)
{
$this->error(__('Parameter %s can not be empty', 'name'));
}
try
{
$action = $action == 'enable' ? $action : 'disable';
//调用启用、禁用的方法
Service::$action($name, $force);
$this->success("操作成功");
}
catch (AddonException $e)
{
$this->result($e->getData(), $e->getCode(), $e->getMessage());
}
catch (Exception $e)
{
$this->error($e->getMessage());
}
}
/**
* 本地上传
*/
public function local()
{
$file = $this->request->file('file');
$addonTmpDir = RUNTIME_PATH . 'addons' . DS;
if (!is_dir($addonTmpDir))
{
@mkdir($addonTmpDir, 0755, true);
}
$info = $file->rule('uniqid')->validate(['size' => 10240000, 'ext' => 'zip'])->move($addonTmpDir);
if ($info)
{
$tmpName = substr($info->getFilename(), 0, stripos($info->getFilename(), '.'));
$tmpAddonDir = ADDON_PATH . $tmpName . DS;
$tmpFile = $addonTmpDir . $info->getSaveName();
try
{
Service::unzip($tmpName);
@unlink($tmpFile);
$infoFile = $tmpAddonDir . 'info.ini';
if (!is_file($infoFile))
{
throw new Exception("插件配置文件未找到");
}
$config = Config::parse($infoFile, '', $tmpName);
$name = isset($config['name']) ? $config['name'] : '';
if (!$name)
{
throw new Exception("插件配置信息不正确");
}
$newAddonDir = ADDON_PATH . $name . DS;
if (is_dir($newAddonDir))
{
throw new Exception("上传的插件已经存在");
}
//重命名插件文件夹
rename($tmpAddonDir, $newAddonDir);
try
{
//默认禁用该插件
$info = get_addon_info($name);
if ($info['state'])
{
$info['state'] = 0;
set_addon_info($name, $info);
}
//执行插件的安装方法
$class = get_addon_class($name);
if (class_exists($class))
{
$addon = new $class();
$addon->install();
}
//导入SQL
Service::importsql($name);
$this->success("插件安装成功,你需要手动启用该插件,使之生效", null, ['addon' => $info]);
}
catch (Exception $e)
{
@rmdirs($newAddonDir);
throw new Exception($e->getMessage());
}
}
catch (Exception $e)
{
@unlink($tmpFile);
@rmdirs($tmpAddonDir);
$this->error($e->getMessage());
}
}
else
{
// 上传失败获取错误信息
$this->error($file->getError());
}
}
/**
* 刷新缓存
*/
public function refresh()
{
try
{
Service::refresh();
$this->success("操作成功");
}
catch (Exception $e)
{
$this->error($e->getMessage());
}
}
}
... ...
... ... @@ -4,8 +4,6 @@ namespace app\admin\controller;
use app\common\controller\Backend;
use fast\Random;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use think\Cache;
use think\Config;
use think\Db;
... ... @@ -38,6 +36,7 @@ class Ajax extends Backend
header('Content-Type: application/javascript');
$callback = $this->request->get('callback');
$controllername = input("controllername");
//默认只加载了控制器对应的语言名,你还根据控制器名来加载额外的语言包
$this->loadlang($controllername);
//强制输出JSON Object
$result = 'define(' . json_encode(Lang::get(), JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE) . ');';
... ... @@ -49,25 +48,14 @@ class Ajax extends Backend
*/
public function upload()
{
$this->code = -1;
$file = $this->request->file('file');
if (empty($file))
{
$this->msg = "未上传文件或超出服务器上传限制";
return;
$this->error("未上传文件或超出服务器上传限制");
}
//判断是否已经存在附件
$sha1 = $file->hash();
$uploaded = model("attachment")->where('sha1', $sha1)->find();
if ($uploaded)
{
$this->code = 1;
$this->data = [
'url' => $uploaded['url']
];
return;
}
$upload = Config::get('upload');
... ... @@ -120,16 +108,17 @@ class Ajax extends Backend
'storage' => 'local',
'sha1' => $sha1,
);
model("attachment")->create(array_filter($params));
$this->code = 1;
$this->data = [
$attachment = model("attachment");
$attachment->create(array_filter($params));
\think\Hook::listen("upload_after", $attachment);
$this->success('上传成功', null, [
'url' => $uploadDir . $splInfo->getSaveName()
];
]);
}
else
{
// 上传失败获取错误信息
$this->data = $file->getError();
$this->error($file->getError());
}
}
... ... @@ -177,7 +166,7 @@ class Ajax extends Backend
{
Db::name($table)->where($prikey, $v[$prikey])->update([$field => $k + 1]);
}
$this->code = 1;
$this->success();
}
else
{
... ... @@ -216,7 +205,7 @@ class Ajax extends Backend
$weighids[$n] = $weighdata[$offset];
Db::name($table)->where($prikey, $n)->update([$field => $weighdata[$offset]]);
}
$this->code = 1;
$this->success();
}
}
... ... @@ -231,20 +220,11 @@ class Ajax extends Backend
$dir = constant($item);
if (!is_dir($dir))
continue;
$files = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST
);
foreach ($files as $fileinfo)
{
$todo = ($fileinfo->isDir() ? 'rmdir' : 'unlink');
$todo($fileinfo->getRealPath());
}
//rmdir($dir);
rmdirs($dir);
}
Cache::clear();
$this->code = 1;
\think\Hook::listen("wipecache_after");
$this->success();
}
/**
... ... @@ -269,9 +249,7 @@ class Ajax extends Backend
$categorylist = Db::name('category')->where($where)->field('id as value,name')->order('weigh desc,id desc')->select();
}
$this->code = 1;
$this->data = $categorylist;
return;
$this->success('', null, $categorylist);
}
/**
... ... @@ -300,9 +278,7 @@ class Ajax extends Backend
$provincelist = Db::name('area')->where($where)->field('id as value,name')->select();
}
}
$this->code = 1;
$this->data = $provincelist;
return;
$this->success('', null, $provincelist);
}
}
... ...
... ... @@ -28,10 +28,10 @@ class Category extends Backend
$tree = Tree::instance();
$tree->init($this->model->order('weigh desc,id desc')->select(), 'pid');
$this->categorylist = $tree->getTreeList($tree->getTreeArray(0), 'name');
$categorydata = [0 => __('None')];
$categorydata = [0 => ['type'=>'all', 'name'=>__('None')]];
foreach ($this->categorylist as $k => $v)
{
$categorydata[$v['id']] = $v['name'];
$categorydata[$v['id']] = $v;
}
$this->view->assign("flagList", $this->model->getFlagList());
$this->view->assign("typeList", CategoryModel::getTypeList());
... ...
... ... @@ -29,9 +29,8 @@ class Index extends Backend
//
$menulist = $this->auth->getSidebar([
'dashboard' => 'hot',
'auth' => ['new', 'red', 'badge'],
'auth/admin' => 12,
'auth/rule' => 4,
'addon' => ['new', 'red', 'badge'],
'auth/rule' => 'side',
'general' => ['18', 'purple'],
], $this->view->site['fixedpage']);
$this->view->assign('menulist', $menulist);
... ... @@ -48,7 +47,6 @@ class Index extends Backend
if ($this->auth->isLogin())
{
$this->error(__("You've logged in, do not login again"), $url);
return;
}
if ($this->request->isPost())
{
... ... @@ -71,20 +69,17 @@ class Index extends Backend
if (!$result)
{
$this->error($validate->getError(), $url, ['token' => $this->request->token()]);
return;
}
\app\admin\model\AdminLog::setTitle(__('Login'));
$result = $this->auth->login($username, $password, $keeplogin ? 86400 : 0);
if ($result === true)
{
$this->success(__('Login successful'), $url, ['url' => $url, 'id' => $this->auth->id, 'username' => $username, 'avatar' => $this->auth->avatar]);
return;
}
else
{
$this->error(__('Username or password is incorrect'), $url, ['token' => $this->request->token()]);
}
return;
}
// 根据客户端的cookie,判断是否可以自动登录
... ... @@ -92,7 +87,9 @@ class Index extends Backend
{
$this->redirect($url);
}
$this->view->assign('title', __('Login'));
$background = cdnurl("/assets/img/loginbg.jpg");
$this->view->assign('background', $background);
\think\Hook::listen("login_init", $this->request);
return $this->view->fetch();
}
... ... @@ -103,7 +100,6 @@ class Index extends Backend
{
$this->auth->logout();
$this->success(__('Logout successful'), 'index/login');
return;
}
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 单页管理
*
* @icon fa fa-circle-o
* @remark 用于管理普通的单页面,通常用于关于我们、联系我们、商务合作等单一页面
*/
class Page extends Backend
{
protected $model = null;
protected $relationSearch = true;
public function _initialize()
{
parent::_initialize();
$this->model = model('Page');
}
/**
* 查看
*/
public function index()
{
if ($this->request->isAjax())
{
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$total = $this->model
->with("category")
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->with("category")
->where($where)
->order($sort, $order)
->limit($offset, $limit)
->select();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
}
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 会员管理
*
* @icon fa fa-circle-o
* @internal
*/
class User extends Backend
{
/**
* User模型对象
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = model('User');
}
}
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
use think\Controller;
use think\Request;
/**
* 版本管理
*
* @icon fa fa-circle-o
*/
class Version extends Backend
{
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = model('Version');
}
}
... ... @@ -101,7 +101,6 @@ class Admin extends Backend
{
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
if ($params)
{
... ... @@ -120,10 +119,9 @@ class Admin extends Backend
$dataset[] = ['uid' => $admin->id, 'group_id' => $value];
}
model('AuthGroupAccess')->saveAll($dataset);
$this->code = 1;
$this->success();
}
return;
$this->error();
}
return $this->view->fetch();
}
... ... @@ -138,7 +136,6 @@ class Admin extends Backend
$this->error(__('No Results were found'));
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
if ($params)
{
... ... @@ -167,10 +164,9 @@ class Admin extends Backend
$dataset[] = ['uid' => $row->id, 'group_id' => $value];
}
model('AuthGroupAccess')->saveAll($dataset);
$this->code = 1;
$this->success();
}
return;
$this->error();
}
$grouplist = $this->auth->getGroups($row['id']);
$groupids = [];
... ... @@ -188,7 +184,6 @@ class Admin extends Backend
*/
public function del($ids = "")
{
$this->code = -1;
if ($ids)
{
// 避免越权删除管理员
... ... @@ -208,12 +203,11 @@ class Admin extends Backend
{
$this->model->destroy($deleteIds);
model('AuthGroupAccess')->where('uid', 'in', $deleteIds)->delete();
$this->code = 1;
$this->success();
}
}
}
return;
$this->error();
}
/**
... ... @@ -223,7 +217,7 @@ class Admin extends Backend
public function multi($ids = "")
{
// 管理员禁止批量操作
$this->code = -1;
$this->error();
}
}
... ...
... ... @@ -74,7 +74,7 @@ class Adminlog extends Backend
}
return $this->view->fetch();
}
/**
* 详情
*/
... ... @@ -93,7 +93,7 @@ class Adminlog extends Backend
*/
public function add()
{
$this->code = -1;
$this->error();
}
/**
... ... @@ -102,7 +102,7 @@ class Adminlog extends Backend
*/
public function edit($ids = NULL)
{
$this->code = -1;
$this->error();
}
/**
... ... @@ -110,7 +110,6 @@ class Adminlog extends Backend
*/
public function del($ids = "")
{
$this->code = -1;
if ($ids)
{
$childrenGroupIds = $this->childrenIds;
... ... @@ -127,12 +126,11 @@ class Adminlog extends Backend
if ($deleteIds)
{
$this->model->destroy($deleteIds);
$this->code = 1;
$this->success();
}
}
}
return;
$this->error();
}
/**
... ... @@ -142,7 +140,7 @@ class Adminlog extends Backend
public function multi($ids = "")
{
// 管理员禁止批量操作
$this->code = -1;
$this->error();
}
}
... ...
... ... @@ -79,26 +79,21 @@ class Group extends Backend
{
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a", [], 'strip_tags');
$params['rules'] = explode(',', $params['rules']);
if (!in_array($params['pid'], $this->childrenIds))
{
$this->code = -1;
$this->msg = __('');
return;
$this->error(__('The parent group can not be its own child'));
}
$parentmodel = model("AuthGroup")->get($params['pid']);
if (!$parentmodel)
{
$this->msg = __('The parent group can not found');
return;
$this->error(__('The parent group can not found'));
}
// 父级别的规则节点
$parentrules = explode(',', $parentmodel->rules);
// 当前组别的规则节点
$currentrules = $this->auth->getRuleIds();
$rules = $params['rules'];
// 如果父组不是超级管理员则需要过滤规则节点,不能超过父组别的权限
$rules = in_array('*', $parentrules) ? $rules : array_intersect($parentrules, $rules);
// 如果当前组别不是超级管理员则需要过滤规则节点,不能超当前组别的权限
... ... @@ -107,10 +102,9 @@ class Group extends Backend
if ($params)
{
$this->model->create($params);
$this->code = 1;
$this->success();
}
return;
$this->error();
}
return $this->view->fetch();
}
... ... @@ -125,27 +119,25 @@ class Group extends Backend
$this->error(__('No Results were found'));
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a", [], 'strip_tags');
// 父节点不能是它自身的子节点
if (!in_array($params['pid'], $this->childrenIds))
{
$this->msg = __('The parent group can not be its own child');
return;
$this->error(__('The parent group can not be its own child'));
}
$params['rules'] = explode(',', $params['rules']);
$parentmodel = model("AuthGroup")->get($params['pid']);
if (!$parentmodel)
{
$this->msg = __('The parent group can not found');
return;
$this->error(__('The parent group can not found'));
}
// 父级别的规则节点
$parentrules = explode(',', $parentmodel->rules);
// 当前组别的规则节点
$currentrules = $this->auth->getRuleIds();
$rules = $params['rules'];
$rules = $params['rules'];
// 如果父组不是超级管理员则需要过滤规则节点,不能超过父组别的权限
$rules = in_array('*', $parentrules) ? $rules : array_intersect($parentrules, $rules);
// 如果当前组别不是超级管理员则需要过滤规则节点,不能超当前组别的权限
... ... @@ -154,9 +146,9 @@ class Group extends Backend
if ($params)
{
$row->save($params);
$this->code = 1;
$this->success();
}
$this->error();
return;
}
$this->view->assign("row", $row);
... ... @@ -168,7 +160,6 @@ class Group extends Backend
*/
public function del($ids = "")
{
$this->code = -1;
if ($ids)
{
$ids = explode(',', $ids);
... ... @@ -201,16 +192,15 @@ class Group extends Backend
}
if (!$ids)
{
$this->msg = __('You can not delete group that contain child group and administrators');
return;
$this->error(__('You can not delete group that contain child group and administrators'));
}
$count = $this->model->where('id', 'in', $ids)->delete();
if ($count)
{
$this->code = 1;
$this->success();
}
}
return;
$this->error();
}
/**
... ... @@ -220,8 +210,7 @@ class Group extends Backend
public function multi($ids = "")
{
// 组别禁止批量操作
$this->code = -1;
return;
$this->error();
}
/**
... ... @@ -291,19 +280,16 @@ class Group extends Backend
$state = array('selected' => in_array($v['id'], $current_rule_ids) && !in_array($v['id'], $hasChildrens));
$nodelist[] = array('id' => $v['id'], 'parent' => $v['pid'] ? $v['pid'] : '#', 'text' => $v['title'], 'type' => 'menu', 'state' => $state);
}
$this->code = 1;
$this->data = $nodelist;
$this->success('',null,$nodelist);
}
else
{
$this->code = -1;
$this->data = __('Can not change the parent to child');
$this->error(__('Can not change the parent to child'));
}
}
else
{
$this->code = -1;
$this->data = __('Group not found');
$this->error(__('Group not found'));
}
}
... ...
... ... @@ -60,21 +60,18 @@ class Rule extends Backend
{
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a", [], 'strip_tags');
if ($params)
{
if (!$params['ismenu'] && !$params['pid'])
{
$this->msg = __('The non-menu rule must have parent');
return;
$this->error(__('The non-menu rule must have parent'));
}
$this->model->create($params);
Cache::rm('__menu__');
$this->code = 1;
$this->success();
}
return;
$this->error();
}
return $this->view->fetch();
}
... ... @@ -89,21 +86,18 @@ class Rule extends Backend
$this->error(__('No Results were found'));
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a", [], 'strip_tags');
if ($params)
{
if (!$params['ismenu'] && !$params['pid'])
{
$this->msg = __('The non-menu rule must have parent');
return;
$this->error(__('The non-menu rule must have parent'));
}
$row->save($params);
Cache::rm('__menu__');
$this->code = 1;
$this->success();
}
return;
$this->error();
}
$this->view->assign("row", $row);
return $this->view->fetch();
... ... @@ -114,7 +108,6 @@ class Rule extends Backend
*/
public function del($ids = "")
{
$this->code = -1;
if ($ids)
{
$delIds = [];
... ... @@ -127,11 +120,10 @@ class Rule extends Backend
if ($count)
{
Cache::rm('__menu__');
$this->code = 1;
$this->success();
}
}
return;
$this->error();
}
}
... ...
<?php
namespace app\admin\controller\example;
use app\common\controller\Backend;
/**
* 表格完整示例
*
* @icon fa fa-table
* @remark 在使用Bootstrap-table中的常用方式,更多使用方式可查看:http://bootstrap-table.wenzhixin.net.cn/zh-cn/
*/
class Bootstraptable extends Backend
{
protected $model = null;
protected $noNeedRight = ['change', 'detail'];
public function _initialize()
{
parent::_initialize();
$this->model = model('AdminLog');
}
/**
* 查看
*/
public function index()
{
if ($this->request->isAjax())
{
list($where, $sort, $order, $offset, $limit) = $this->buildparams(NULL);
$total = $this->model
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->where($where)
->order($sort, $order)
->limit($offset, $limit)
->select();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
/**
* 详情
*/
public function detail($ids)
{
$row = $this->model->get(['id' => $ids]);
if (!$row)
$this->error(__('No Results were found'));
$this->view->assign("row", $row->toArray());
return $this->view->fetch();
}
/**
* 变更
* @internal
*/
public function change()
{
$this->code = 1;
}
}
<?php
namespace app\admin\controller\example;
use app\common\controller\Backend;
/**
* 彩色角标
*
* @icon fa fa-table
* @remark 在JS端控制角标的显示与隐藏,请注意左侧菜单栏角标的数值变化
*/
class Colorbadge extends Backend
{
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = model('AdminLog');
}
}
<?php
namespace app\admin\controller\example;
use app\common\controller\Backend;
/**
* 控制器间跳转
*
* @icon fa fa-table
* @remark FastAdmin支持在控制器间跳转,点击后将切换到另外一个TAB中,无需刷新当前页面
*/
class Controllerjump extends Backend
{
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = model('AdminLog');
}
}
<?php
namespace app\admin\controller\example;
use app\common\controller\Backend;
/**
* 多级联动
*
* @icon fa fa-table
* @remark FastAdmin使用了jQuery-cxselect实现多级联动,更多文档请参考https://github.com/karsonzhang/cxSelect
*/
class Cxselect extends Backend
{
protected $model = null;
public function _initialize()
{
parent::_initialize();
}
}
<?php
namespace app\admin\controller\example;
use app\common\controller\Backend;
/**
* 多表格示例
*
* @icon fa fa-table
* @remark 当一个页面上存在多个Bootstrap-table时该如何控制按钮和表格
*/
class Multitable extends Backend
{
protected $model = null;
public function _initialize()
{
parent::_initialize();
}
/**
* 查看
*/
public function index()
{
$this->loadlang('general/attachment');
$this->loadlang('general/crontab');
return $this->view->fetch();
}
}
<?php
namespace app\admin\controller\example;
use app\common\controller\Backend;
/**
* 多模型关联
*
* @icon fa fa-table
* @remark 当使用到关联模型时需要重载index方法
*/
class Relationmodel extends Backend
{
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = model('AdminLog');
}
/**
* 查看
*/
public function index()
{
$this->relationSearch = true;
$this->searchFields = "admin.username,id";
if ($this->request->isAjax())
{
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$total = $this->model
->with("admin")
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->with("admin")
->where($where)
->order($sort, $order)
->limit($offset, $limit)
->select();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
}
<?php
namespace app\admin\controller\example;
use app\common\controller\Backend;
/**
* 表格模板示例
*
* @icon fa fa-table
* @remark 可以通过使用表格模板将表格中的行渲染成一样的展现方式,基于此功能可以任意定制自己想要的展示列表
*/
class Tabletemplate extends Backend
{
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = model('AdminLog');
}
/**
* 查看
*/
public function index()
{
if ($this->request->isAjax())
{
list($where, $sort, $order, $offset, $limit) = $this->buildparams(NULL);
$total = $this->model
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->where($where)
->order($sort, $order)
->limit($offset, $limit)
->select();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
/**
* 详情
*/
public function detail($ids)
{
$row = $this->model->get(['id' => $ids]);
if (!$row)
$this->error(__('No Results were found'));
$this->view->assign("row", $row->toArray());
return $this->view->fetch();
}
}
... ... @@ -71,9 +71,23 @@ class Attachment extends Backend
{
if ($this->request->isAjax())
{
$this->code = -1;
$this->error();
}
return $this->view->fetch();
}
public function del($ids = "")
{
if ($ids)
{
$count = $this->model->destroy($ids);
if ($count)
{
\think\Hook::listen("upload_after", $this);
$this->success();
}
}
$this->error(__('Parameter %s can not be empty', 'ids'));
}
}
... ...
... ... @@ -72,7 +72,6 @@ class Config extends Backend
{
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
if ($params)
{
... ... @@ -106,36 +105,30 @@ class Config extends Backend
try
{
$this->refreshFile();
$this->code = 1;
$this->success();
}
catch (Exception $e)
{
$this->msg = $e->getMessage();
$this->error($e->getMessage());
}
}
else
{
$this->msg = $this->model->getError();
$this->error($this->model->getError());
}
}
catch (Exception $e)
{
$this->msg = $e->getMessage();
$this->error($e->getMessage());
}
}
else
{
$this->msg = __('Parameter %s can not be empty', '');
}
return;
$this->error(__('Parameter %s can not be empty', ''));
}
return $this->view->fetch();
}
public function edit($ids = NULL)
{
$this->code = -1;
if ($this->request->isPost())
{
$params = $this->request->post("row/a");
... ... @@ -175,19 +168,14 @@ class Config extends Backend
try
{
$this->refreshFile();
$this->code = 1;
$this->success();
}
catch (Exception $e)
{
$this->msg = $e->getMessage();
$this->error($e->getMessage());
}
}
else
{
$this->msg = __('Parameter %s can not be empty', '');
}
return;
$this->error(__('Parameter %s can not be empty', ''));
}
}
... ... @@ -251,12 +239,11 @@ class Config extends Backend
->send();
if ($result)
{
$this->code = 1;
$this->success();
}
else
{
$this->code = -1;
$this->msg = $email->getError();
$this->error($email->getError());
}
}
... ...
<?php
namespace app\admin\controller\general;
use app\common\controller\Backend;
use Cron\CronExpression;
/**
* 定时任务
*
* @icon fa fa-tasks
* @remark 类似于Linux的Crontab定时任务,可以按照设定的时间进行任务的执行,目前仅支持三种任务:请求URL、执行SQL、执行Shell
*/
class Crontab extends Backend
{
protected $model = null;
protected $noNeedRight = ['check_schedule', 'get_schedule_future'];
public function _initialize()
{
parent::_initialize();
$this->model = model('Crontab');
$this->view->assign('typedata', \app\common\model\Crontab::getTypeList());
}
/**
* 查看
*/
public function index()
{
if ($this->request->isAjax())
{
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$total = $this->model
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->where($where)
->order($sort, $order)
->limit($offset, $limit)
->select();
foreach ($list as $k => &$v)
{
$cron = CronExpression::factory($v['schedule']);
$v['nexttime'] = $cron->getNextRunDate()->getTimestamp();
}
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
/**
* 判断Crontab格式是否正确
* @internal
*/
public function check_schedule()
{
$row = $this->request->post("row/a");
$schedule = isset($row['schedule']) ? $row['schedule'] : '';
if (CronExpression::isValidExpression($schedule))
{
return json(['ok' => '']);
}
else
{
return json(['error' => __('Crontab format invalid')]);
}
}
/**
* 根据Crontab表达式读取未来七次的时间
* @internal
*/
public function get_schedule_future()
{
$time = [];
$schedule = $this->request->post('schedule');
$days = (int) $this->request->post('days');
try
{
$cron = CronExpression::factory($schedule);
for ($i = 0; $i < $days; $i++)
{
$time[] = $cron->getNextRunDate(null, $i)->format('Y-m-d H:i:s');
}
}
catch (\Exception $e)
{
}
return json(['futuretime' => $time]);
}
}
<?php
namespace app\admin\controller\general;
use app\common\controller\Backend;
use think\Db;
use think\Debug;
/**
* 数据库管理
*
* @icon fa fa-database
* @remark 可在线进行一些简单的数据库表优化或修复,查看表结构和数据。也可以进行SQL语句的操作
*/
class Database extends Backend
{
/**
* 查看
*/
function index()
{
$tables_data_length = $tables_index_length = $tables_free_length = $tables_data_count = 0;
$tables = $list = [];
$list = Db::query("SHOW TABLES");
foreach ($list as $key => $row)
{
$tables[] = ['name' => reset($row), 'rows' => 0];
}
$data['tables'] = $tables;
$data['saved_sql'] = [];
$this->view->assign($data);
return $this->view->fetch();
}
/**
* SQL查询
*/
public function query()
{
$do_action = $this->request->post('do_action');
echo '<style type="text/css">
xmp,body{margin:0;padding:0;line-height:18px;font-size:12px;font-family:"Helvetica Neue", Helvetica, Microsoft Yahei, Hiragino Sans GB, WenQuanYi Micro Hei, sans-serif;}
hr{height:1px;margin:5px 1px;background:#e3e3e3;border:none;}
</style>';
if ($do_action == '')
exit(__('Invalid parameters'));
$tablename = $this->request->post("tablename/a");
if (in_array($do_action, array('doquery', 'optimizeall', 'repairall')))
{
$this->$do_action();
}
else if (count($tablename) == 0)
{
exit(__('Invalid parameters'));
}
else
{
foreach ($tablename as $table)
{
$this->$do_action($table);
echo "<br />";
}
}
}
private function viewinfo($name)
{
$row = Db::query("SHOW CREATE TABLE `{$name}`");
$row = array_values($row[0]);
$info = $row[1];
echo "<xmp>{$info};</xmp>";
}
private function viewdata($name = '')
{
$sqlquery = "SELECT * FROM `{$name}`";
$this->doquery($sqlquery);
}
private function optimize($name = '')
{
if (Db::execute("OPTIMIZE TABLE `{$name}`"))
{
echo __('Optimize table %s done', $name);
}
else
{
echo __('Optimize table %s fail', $name);
}
}
private function optimizeall($name = '')
{
$list = Db::query("SHOW TABLES");
foreach ($list as $key => $row)
{
$name = reset($row);
if (Db::execute("OPTIMIZE TABLE {$name}"))
{
echo __('Optimize table %s done', $name);
}
else
{
echo __('Optimize table %s fail', $name);
}
echo "<br />";
}
}
private function repair($name = '')
{
if (Db::execute("REPAIR TABLE `{$name}`"))
{
echo __('Repair table %s done', $name);
}
else
{
echo __('Repair table %s fail', $name);
}
}
private function repairall($name = '')
{
$list = Db::query("SHOW TABLES");
foreach ($list as $key => $row)
{
$name = reset($row);
if (Db::execute("REPAIR TABLE {$name}"))
{
echo __('Repair table %s done', $name);
}
else
{
echo __('Repair table %s fail', $name);
}
echo "<br />";
}
}
private function doquery($sql = null)
{
$sqlquery = $sql ? $sql : $this->request->post('sqlquery');
if ($sqlquery == '')
exit(__('SQL can not be empty'));
$sqlquery = str_replace("\r", "", $sqlquery);
$sqls = preg_split("/;[ \t]{0,}\n/i", $sqlquery);
$maxreturn = 100;
$r = '';
foreach ($sqls as $key => $val)
{
if (trim($val) == '')
continue;
$val = rtrim($val, ';');
$r .= "SQL:<span style='color:green;'>{$val}</span> ";
if (preg_match("/^(select|explain)(.*)/i ", $val))
{
Debug::remark("begin");
$limit = stripos(strtolower($val), "limit") !== false ? true : false;
$count = Db::execute($val);
if ($count > 0)
{
$resultlist = Db::query($val . (!$limit && $count > $maxreturn ? ' LIMIT ' . $maxreturn : ''));
}
else
{
$resultlist = [];
}
Debug::remark("end");
$time = Debug::getRangeTime('begin', 'end', 4);
$usedseconds = __('Query took %s seconds', $time) . "<br />";
if ($count <= 0)
{
$r .= __('Query returned an empty result');
}
else
{
$r .= (__('Total:%s', $count) . (!$limit && $count > $maxreturn ? ',' . __('Max output:%s', $maxreturn) : ""));
}
$r = $r . ',' . $usedseconds;
$j = 0;
foreach ($resultlist as $m => $n)
{
$j++;
if (!$limit && $j > $maxreturn)
break;
$r .= "<hr/>";
$r .= "<font color='red'>" . __('Row:%s', $j) . "</font><br />";
foreach ($n as $k => $v)
{
$r .= "<font color='blue'>{$k}:</font>{$v}<br/>\r\n";
}
}
}
else
{
Debug::remark("begin");
$count = Db::execute($val);
Debug::remark("end");
$time = Debug::getRangeTime('begin', 'end', 4);
$r .= __('Query affected %s rows and took %s seconds', $count, $time) . "<br />";
}
}
echo $r;
}
}
... ... @@ -52,7 +52,6 @@ class Profile extends Backend
{
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
$params = array_filter(array_intersect_key($params, array_flip(array('email', 'nickname', 'password', 'avatar'))));
unset($v);
... ... @@ -71,8 +70,9 @@ class Profile extends Backend
$admin = model('admin')->get(['id' => $admin_id]);
Session::set("admin", $admin);
}
$this->code = 1;
$this->success();
}
$this->error();
}
return;
}
... ...
<?php
namespace app\admin\controller\wechat;
use app\common\controller\Backend;
use app\common\model\WechatResponse;
/**
* 微信自动回复管理
*
* @icon fa fa-circle-o
*/
class Autoreply extends Backend
{
protected $model = null;
protected $noNeedRight = ['check_text_unique'];
public function _initialize()
{
parent::_initialize();
$this->model = model('WechatAutoreply');
}
/**
* 编辑
*/
public function edit($ids = NULL)
{
$row = $this->model->get(['id' => $ids]);
if (!$row)
$this->error(__('No Results were found'));
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
if ($params)
{
$row->save($params);
$this->code = 1;
}
return;
}
$response = WechatResponse::get(['eventkey' => $row['eventkey']]);
$this->view->assign("response", $response);
$this->view->assign("row", $row);
return $this->view->fetch();
}
/**
* 判断文本是否唯一
* @internal
*/
public function check_text_unique()
{
$row = $this->request->post("row/a");
$except = $this->request->post("except");
$text = isset($row['text']) ? $row['text'] : '';
if ($this->model->where('text', $text)->where(function($query) use($except) {
if ($except)
{
$query->where('text', '<>', $except);
}
})->count() == 0)
{
return json(['ok' => '']);
}
else
{
return json(['error' => __('Text already exists')]);
}
}
}
<?php
namespace app\admin\controller\wechat;
use app\common\controller\Backend;
use think\Controller;
use think\Request;
/**
* 微信配置管理
*
* @icon fa fa-circle-o
*/
class Config extends Backend
{
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = model('WechatConfig');
}
/**
* 添加
*/
public function add()
{
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
if ($params)
{
foreach ($params as $k => &$v)
{
$v = is_array($v) ? implode(',', $v) : $v;
}
if ($params['mode'] == 'json')
{
//JSON字段
$fieldarr = $valuearr = [];
$field = $this->request->post('field/a');
$value = $this->request->post('value/a');
foreach ($field as $k => $v)
{
if ($v != '')
{
$fieldarr[] = $field[$k];
$valuearr[] = $value[$k];
}
}
$params['value'] = json_encode(array_combine($fieldarr, $valuearr), JSON_UNESCAPED_UNICODE);
}
unset($params['mode']);
try
{
//是否采用模型验证
if ($this->modelValidate)
{
$name = basename(str_replace('\\', '/', get_class($this->model)));
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : true) : $this->modelValidate;
$this->model->validate($validate);
}
$result = $this->model->save($params);
if ($result !== false)
{
$this->code = 1;
}
else
{
$this->msg = $this->model->getError();
}
}
catch (\think\exception\PDOException $e)
{
$this->msg = $e->getMessage();
}
}
else
{
$this->msg = __('Parameter %s can not be empty', '');
}
return;
}
return $this->view->fetch();
}
/**
* 编辑
*/
public function edit($ids = NULL)
{
$row = $this->model->get($ids);
if (!$row)
$this->error(__('No Results were found'));
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
if ($params)
{
foreach ($params as $k => &$v)
{
$v = is_array($v) ? implode(',', $v) : $v;
}
if ($params['mode'] == 'json')
{
//JSON字段
$fieldarr = $valuearr = [];
$field = $this->request->post('field/a');
$value = $this->request->post('value/a');
foreach ($field as $k => $v)
{
if ($v != '')
{
$fieldarr[] = $field[$k];
$valuearr[] = $value[$k];
}
}
$params['value'] = json_encode(array_combine($fieldarr, $valuearr), JSON_UNESCAPED_UNICODE);
}
unset($params['mode']);
try
{
//是否采用模型验证
if ($this->modelValidate)
{
$name = basename(str_replace('\\', '/', get_class($this->model)));
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : true) : $this->modelValidate;
$row->validate($validate);
}
$result = $row->save($params);
if ($result !== false)
{
$this->code = 1;
}
else
{
$this->msg = $row->getError();
}
}
catch (think\exception\PDOException $e)
{
$this->msg = $e->getMessage();
}
}
else
{
$this->msg = __('Parameter %s can not be empty', '');
}
return;
}
$this->view->assign("row", $row);
$this->view->assign("value", (array) json_decode($row->value, true));
return $this->view->fetch();
}
}
<?php
namespace app\admin\controller\wechat;
use app\common\controller\Backend;
use app\common\model\WechatResponse;
use EasyWeChat\Foundation\Application;
use think\Config;
use think\Exception;
/**
* 菜单管理
*
* @icon fa fa-list-alt
*/
class Menu extends Backend
{
protected $wechatcfg = NULL;
public function _initialize()
{
parent::_initialize();
$this->wechatcfg = \app\common\model\WechatConfig::get(['name' => 'menu']);
}
/**
* 查看
*/
public function index()
{
$responselist = array();
$all = WechatResponse::all();
foreach ($all as $k => $v)
{
$responselist[$v['eventkey']] = $v['title'];
}
$this->view->assign('responselist', $responselist);
$this->view->assign('menu', (array) json_decode($this->wechatcfg->value, TRUE));
return $this->view->fetch();
}
/**
* 修改
*/
public function edit($ids = NULL)
{
$menu = $this->request->post("menu");
$menu = (array) json_decode($menu, TRUE);
$this->wechatcfg->value = json_encode($menu, JSON_UNESCAPED_UNICODE);
$this->wechatcfg->save();
$this->code = 1;
return;
}
/**
* 同步
*/
public function sync($ids = NULL)
{
$this->code = -1;
$app = new Application(Config::get('wechat'));
try
{
$hasError = false;
$menu = json_decode($this->wechatcfg->value, TRUE);
foreach ($menu as $k => $v)
{
if (isset($v['sub_button']))
{
foreach ($v['sub_button'] as $m => $n)
{
if (isset($n['key']) && !$n['key'])
{
$hasError = true;
break 2;
}
}
}
else if (isset($v['key']) && !$v['key'])
{
$hasError = true;
break;
}
}
if (!$hasError)
{
$ret = $app->menu->add($menu);
if ($ret->errcode == 0)
{
$this->code = 1;
}
else
{
$this->msg = $ret->errmsg;
}
}
else
{
$this->msg = __('Invalid parameters');
}
}
catch (Exception $e)
{
$this->msg = $e->getMessage();
}
return;
}
}
<?php
namespace app\admin\controller\wechat;
use app\common\controller\Backend;
use fast\service\Wechat;
/**
* 资源管理
*
* @icon fa fa-list-alt
*/
class Response extends Backend
{
protected $model = null;
protected $searchFields = 'id,title';
public function _initialize()
{
parent::_initialize();
$this->model = model('WechatResponse');
}
/**
* 选择素材
*/
public function select()
{
return $this->view->fetch();
}
/**
* 添加
*/
public function add()
{
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
$params['eventkey'] = isset($params['eventkey']) && $params['eventkey'] ? $params['eventkey'] : uniqid();
$params['content'] = json_encode($params['content']);
$params['createtime'] = time();
if ($params)
{
$this->model->save($params);
$this->code = 1;
$this->content = $params;
}
return;
}
$appConfig = Wechat::appConfig();
$this->view->applist = $appConfig;
return $this->view->fetch();
}
/**
* 编辑
*/
public function edit($ids = NULL)
{
$row = $this->model->get($ids);
if (!$row)
$this->error(__('No Results were found'));
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
$params['eventkey'] = isset($params['eventkey']) && $params['eventkey'] ? $params['eventkey'] : uniqid();
$params['content'] = json_encode($params['content']);
if ($params)
{
$row->save($params);
$this->code = 1;
}
return;
}
$this->view->assign("row", $row);
$appConfig = Wechat::appConfig();
$this->view->applist = $appConfig;
return $this->view->fetch();
}
}
<?php
return [
'Id' => 'ID',
'Title' => '标题',
'Value' => '配置值',
'Array key' => '键',
'Array value' => '值',
];
... ...
<?php
return [
'Title' => '任务标题',
'Maximums' => '最多执行',
'Sleep' => '延迟秒数',
'Schedule' => '执行周期',
'Executes' => '执行次数',
'Execute time' => '最后执行时间',
'Request Url' => '请求URL',
'Execute Sql Script' => '执行SQL',
'Execute Shell' => '执行Shell',
'Crontab format invalid' => 'Crontab格式错误',
'Next execute time' => '下次预计时间',
'The next %s times the execution time' => '接下来 %s 次的执行时间',
];
<?php
return [
'SQL Result' => '查询结果',
'Basic query' => '基础查询',
'View structure' => '查看表结构',
'View data' => '查看表数据',
'Optimize' => '优化表',
'Repair' => '修复表',
'Optimize all' => '优化全部表',
'Repair all' => '修复全部表',
'Table:%s' => '总计:%s个表',
'Record:%s' => '记录:%s条',
'Data:%s' => '占用:%s',
'Index:%s' => '索引:%s',
'SQL Result:' => '查询结果:',
'SQL can not be empty' => 'SQL语句不能为空',
'Max output:%s' => '最大返回%s条',
'Total:%s' => '共有%s条记录! ',
'Row:%s' => '记录:%s',
'Executes one or multiple queries which are concatenated by a semicolon' => '请输入SQL语句,支持批量查询,多条SQL以分号(;)分格',
'Query affected %s rows and took %s seconds' => '共影响%s条记录! 耗时:%s秒!',
'Query returned an empty result' => '返回结果为空!',
'Query took %s seconds' => '耗时%s秒!',
'Optimize table %s done' => '优化表[%s]成功',
'Repair table %s done' => '修复表[%s]成功',
'Optimize table %s fail' => '优化表[%s]失败',
'Repair table %s fail' => '修复表[%s]失败'
];
... ... @@ -31,4 +31,8 @@ return [
'Verification code is incorrect' => '验证码不正确',
'Wipe cache completed' => '清除缓存成功',
'Wipe cache failed' => '清除缓存失败',
'Wipe cache' => '清空缓存',
'Check for updates' => '检测更新',
'Latest news' => '最新消息',
'View more' => '查看更多',
];
... ...
<?php
return [
'id' => 'ID',
'category_id' => '分类ID',
'category' => '分类',
'title' => '标题',
'keywords' => '关键字',
'flag' => '标志',
'image' => '头像',
'content' => '内容',
'icon' => '图标',
'views' => '点击',
'comments' => '评论',
'weigh' => '权重',
'status' => '状态'
];
<?php
return [
'id' => 'ID',
'oldversion' => '旧版本号',
'newversion' => '新版本号',
'packagesize' => '包大小',
'content' => '升级内容',
'downloadurl' => '下载地址',
'enforce' => '强制更新',
'createtime' => '创建时间',
'updatetime' => '更新时间',
'weigh' => '权重',
'status' => '状态'
];
<?php
return [
'Text' => '文本',
'Event key' => '响应标识',
'Remark' => '备注',
'Text already exists' => '文本已经存在',
];
<?php
return [
'name' => '配置名称',
'value' => '配置值',
'Json key' => '键',
'Json value' => '值',
'createtime' => '创建时间',
'updatetime' => '更新时间'
];
<?php
return [
'Resource title' => '资源标题',
'Event key' => '事件标识',
'Text' => '文本',
'App' => '应用',
];
... ... @@ -244,14 +244,8 @@ class Auth extends \fast\Auth
// 生成菜单的badge
foreach ($params as $k => $v)
{
if (stripos($k, '/') === false)
{
$url = '/' . $module . '/' . $k;
}
else
{
$url = url($k);
}
$url = $k;
if (is_array($v))
{
... ... @@ -275,7 +269,6 @@ class Auth extends \fast\Auth
// 读取管理员当前拥有的权限节点
$userRule = $this->getRuleList();
$select_id = 0;
$activeUrl = '/' . $module . '/' . $fixedPage;
// 必须将结果集转换为数组
$ruleList = collection(model('AuthRule')->where('ismenu', 1)->order('weigh', 'desc')->cache("__menu__")->select())->toArray();
foreach ($ruleList as $k => &$v)
... ... @@ -285,8 +278,8 @@ class Auth extends \fast\Auth
unset($ruleList[$k]);
continue;
}
$select_id = $v['name'] == $activeUrl ? $v['id'] : $select_id;
$v['url'] = $v['name'];
$select_id = $v['name'] == $fixedPage ? $v['id'] : $select_id;
$v['url'] = '/' . $module . '/' . $v['name'];
$v['badge'] = isset($badgeList[$v['name']]) ? $badgeList[$v['name']] : '';
$v['py'] = \fast\Pinyin::get($v['title'], true);
$v['pinyin'] = \fast\Pinyin::get($v['title']);
... ...
<?php
namespace app\admin\model;
use think\Model;
class Config extends Model
{
// 表名,不含前缀
protected $name = 'config';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
// 追加属性
protected $append = [
];
/**
* 读取配置类型
* @return array
*/
public static function getTypeList()
{
$typeList = [
'string' => __('String'),
'text' => __('Text'),
'number' => __('Number'),
'datetime' => __('Datetime'),
'select' => __('Select'),
'selects' => __('Selects'),
'image' => __('Image'),
'images' => __('Images'),
'file' => __('File'),
'files' => __('Files'),
'checkbox' => __('Checkbox'),
'radio' => __('Radio'),
'array' => __('Array'),
];
return $typeList;
}
/**
* 读取分类分组列表
* @return array
*/
public static function getGroupList()
{
$groupList = config('site.configgroup');
return $groupList;
}
}
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label for="c-category_id" class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-category_id" data-rule="required" data-source="category/selectpage" data-params='{"custom[type]":""}' class="form-control selectpage" name="row[category_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label for="c-category_ids" class="control-label col-xs-12 col-sm-2">{:__('Category_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-category_ids" data-rule="required" data-source="category/selectpage" data-params='{"custom[type]":""}' data-multiple="true" class="form-control selectpage" name="row[category_ids]" type="text" value="">
</div>
</div>
<div class="form-group">
<label for="c-user_id" class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label for="c-user_ids" class="control-label col-xs-12 col-sm-2">{:__('User_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_ids" data-rule="required" data-source="user/index" data-multiple="true" data-field="nickname" class="form-control selectpage" name="row[user_ids]" type="text" value="">
</div>
</div>
<div class="form-group">
<label for="c-week" class="control-label col-xs-12 col-sm-2">{:__('Week')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-week" data-rule="required" class="form-control selectpicker" name="row[week]">
{foreach name="weekList" item="vo"}
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label for="c-flag" class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-flag" data-rule="required" class="form-control selectpicker" multiple="" name="row[flag][]">
{foreach name="flagList" item="vo"}
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label for="c-genderdata" class="control-label col-xs-12 col-sm-2">{:__('Genderdata')}:</label>
<div class="col-xs-12 col-sm-8">
{foreach name="genderdataList" item="vo"}
<label for="row[genderdata]-{$key}"><input id="row[genderdata]-{$key}" name="row[genderdata]" type="radio" value="{$key}" {in name="key" value="male"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
<div class="form-group">
<label for="c-hobbydata" class="control-label col-xs-12 col-sm-2">{:__('Hobbydata')}:</label>
<div class="col-xs-12 col-sm-8">
{foreach name="hobbydataList" item="vo"}
<label for="row[hobbydata][]-{$key}"><input id="row[hobbydata][]-{$key}" name="row[hobbydata][]" type="checkbox" value="{$key}" {in name="key" value=""}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
<div class="form-group">
<label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="">
</div>
</div>
<div class="form-group">
<label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control summernote" rows="5" name="row[content]" cols="50"></textarea>
</div>
</div>
<div class="form-group">
<label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="form-inline">
<input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="">
<span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/*" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
<ul class="row list-inline plupload-preview" id="p-image"></ul>
</div>
</div>
</div>
<div class="form-group">
<label for="c-images" class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="form-inline">
<input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text" value="">
<span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/*" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
<ul class="row list-inline plupload-preview" id="p-images"></ul>
</div>
</div>
</div>
<div class="form-group">
<label for="c-attachfile" class="control-label col-xs-12 col-sm-2">{:__('Attachfile')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="form-inline">
<input id="c-attachfile" data-rule="required" class="form-control" size="50" name="row[attachfile]" type="text" value="">
<span><button type="button" id="plupload-attachfile" class="btn btn-danger plupload" data-input-id="c-attachfile" data-multiple="false"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-attachfile" class="btn btn-primary fachoose" data-input-id="c-attachfile" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
</div>
</div>
<div class="form-group">
<label for="c-keywords" class="control-label col-xs-12 col-sm-2">{:__('Keywords')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-keywords" data-rule="required" class="form-control" name="row[keywords]" type="text" value="">
</div>
</div>
<div class="form-group">
<label for="c-description" class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-description" data-rule="required" class="form-control" name="row[description]" type="text" value="">
</div>
</div>
<div class="form-group">
<label for="c-price" class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" class="form-control" step="0.01" name="row[price]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label for="c-views" class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-views" class="form-control" name="row[views]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label for="c-startdate" class="control-label col-xs-12 col-sm-2">{:__('Startdate')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-startdate" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[startdate]" type="text" value="{:date('Y-m-d')}">
</div>
</div>
<div class="form-group">
<label for="c-activitytime" class="control-label col-xs-12 col-sm-2">{:__('Activitytime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-activitytime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[activitytime]" type="text" value="{:date('Y-m-d H:i:s')}">
</div>
</div>
<div class="form-group">
<label for="c-year" class="control-label col-xs-12 col-sm-2">{:__('Year')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-year" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY" data-use-current="true" name="row[year]" type="text" value="{:date('Y')}">
</div>
</div>
<div class="form-group">
<label for="c-times" class="control-label col-xs-12 col-sm-2">{:__('Times')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-times" data-rule="required" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-use-current="true" name="row[times]" type="text" value="{:date('H:i:s')}">
</div>
</div>
<div class="form-group">
<label for="c-refreshtime" class="control-label col-xs-12 col-sm-2">{:__('Refreshtime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-refreshtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[refreshtime]" type="text" value="{:date('Y-m-d H:i:s')}">
</div>
</div>
<div class="form-group">
<label for="c-weigh" class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label for="c-status" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="normal"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
<div class="form-group">
<label for="c-state" class="control-label col-xs-12 col-sm-2">{:__('State')}:</label>
<div class="col-xs-12 col-sm-8">
{foreach name="stateList" item="vo"}
<label for="row[state]-{$key}"><input id="row[state]-{$key}" name="row[state]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label for="c-name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<button type="button" id="plupload-addon" class="btn btn-danger plupload" data-url="addon/local" data-mimetype="application/zip" data-multiple="false"><i class="fa fa-upload"></i> {:__('请选择一个安装包')}</button>
</div>
</div>
<div class="form-group">
<label for="c-nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-nickname" data-rule="required" class="form-control" name="row[nickname]" type="text" value="">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="config-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<table class="table table-striped">
<thead>
<tr>
<th width="15%">{:__('Title')}</th>
<th width="85%">{:__('Value')}</th>
</tr>
</thead>
<tbody>
{foreach $addon.config as $item}
<tr>
<td>{$item.title}</td>
<td>
<div class="row">
<div class="col-sm-8 col-xs-12">
{switch $item.type}
{case string}
<input type="text" name="row[{$item.name}]" value="{$item.value}" class="form-control" data-rule="{$item.rule}" data-tip="{$item.tip}" {$item.extend} />
{/case}
{case text}
<textarea name="row[{$item.name}]" class="form-control" data-rule="{$item.rule}" rows="5" data-tip="{$item.tip}" {$item.extend}>{$item.value}</textarea>
{/case}
{case array}
<dl class="fieldlist" rel="{$item.value|count}" data-name="row[{$item.name}]">
<dd>
<ins>{:__('Array key')}</ins>
<ins>{:__('Array value')}</ins>
</dd>
{foreach $item.value as $key => $vo}
<dd class="form-inline">
<input type="text" name="row[{$item.name}][field][{$key}]" class="form-control" value="{$key}" size="10" />
<input type="text" name="row[{$item.name}][value][{$key}]" class="form-control" value="{$vo}" size="30" />
<span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
</dd>
{/foreach}
<dd><a href="javascript:;" class="append btn btn-sm btn-success"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
</dl>
{/case}
{case datetime}
<input type="text" name="row[{$item.name}]" value="{$item.value}" class="form-control datetimepicker" data-tip="{$item.tip}" data-rule="{$item.rule}" {$item.extend} />
{/case}
{case number}
<input type="number" name="row[{$item.name}]" value="{$item.value}" class="form-control" data-tip="{$item.tip}" data-rule="{$item.rule}" {$item.extend} />
{/case}
{case checkbox}
{foreach name="item.content" item="vo"}
<label for="row[{$item.name}][]-{$key}"><input id="row[{$item.name}][]-{$key}" name="row[{$item.name}][]" type="checkbox" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value"}checked{/in} /> {$vo}</label>
{/foreach}
{/case}
{case radio}
{foreach name="item.content" item="vo"}
<label for="row[{$item.name}]-{$key}"><input id="row[{$item.name}]-{$key}" name="row[{$item.name}]" type="radio" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value"}checked{/in} /> {$vo}</label>
{/foreach}
{/case}
{case value="select" break="0"}{/case}
{case value="selects"}
<select name="row[{$item.name}]{$item.type=='selects'?'[]':''}" class="form-control selectpicker" data-tip="{$item.tip}" {$item.type=='selects'?'multiple':''}>
{foreach name="item.content" item="vo"}
<option value="{$key}" {in name="key" value="$item.value"}selected{/in}>{$vo}</option>
{/foreach}
</select>
{/case}
{case value="image" break="0"}{/case}
{case value="images"}
<div class="form-inline">
<input id="c-{$item.name}" class="form-control" size="37" name="row[{$item.name}]" type="text" value="{$item.value}" data-tip="{$item.tip}">
<span><button type="button" id="plupload-{$item.name}" class="btn btn-danger plupload" data-input-id="c-{$item.name}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}" data-preview-id="p-{$item.name}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-{$item.name}" class="btn btn-primary fachoose" data-input-id="c-{$item.name}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
<ul class="row list-inline plupload-preview" id="p-{$item.name}"></ul>
</div>
{/case}
{case value="file" break="0"}{/case}
{case value="files"}
<div class="form-inline">
<input id="c-{$item.name}" class="form-control" size="37" name="row[{$item.name}]" type="text" value="{$item.value}" data-tip="{$item.tip}">
<span><button type="button" id="plupload-{$item.name}" class="btn btn-danger plupload" data-input-id="c-{$item.name}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-{$item.name}" class="btn btn-primary fachoose" data-input-id="c-{$item.name}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
{/case}
{case bool}
<label for="row[{$item.name}]-yes"><input id="row[{$item.name}]-yes" name="row[{$item.name}]" type="radio" value="1" {$item.value?'checked':''} data-tip="{$item.tip}" /> {:__('Yes')}</label>
<label for="row[{$item.name}]-no"><input id="row[{$item.name}]-no" name="row[{$item.name}]" type="radio" value="0" {$item.value?'':'checked'} data-tip="{$item.tip}" /> {:__('No')}</label>
{/case}
{/switch}
</div>
<div class="col-sm-4"></div>
</div>
</td>
</tr>
{/foreach}
</tbody>
</table>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
\ No newline at end of file
... ...
<style type="text/css">
.addon {
height:100%;position: relative;
}
.addon > span {
position:absolute;left:15px;top:15px;
}
.layui-layer-pay .layui-layer-content {
padding:0;height:600px!important;
}
.layui-layer-pay {border:none;}
</style>
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
{:build_toolbar('refresh')}
<button type="button" id="plupload-addon" class="btn btn-danger plupload" data-url="addon/local" data-mimetype="application/zip" data-multiple="false"><i class="fa fa-upload"></i> {:__('本地安装')}</button>
<a class="btn btn-success btn-ajax" href="addon/refresh"><i class="fa fa-refresh"></i> {:__('刷新插件缓存')}</a>
</div>
<table id="table" class="table table-striped table-hover" width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
<script id="paytpl" type="text/html">
<div style="position:relative;width:800px;height:600px;background:url('<%=payimg%>') 0 0 no-repeat;">
<div style="position:absolute;left:265px;top:442px;">
<%=paycode%>
</div>
<div style="position:absolute;left:660px;top:442px;">
<%=paycode%>
</div>
</div>
</script>
<script id="conflicttpl" type="text/html">
<div class="alert alert-dismissable alert-danger">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>警告!</strong> 此插件中发现和现有系统中部分文件发现冲突!以下文件将会被影响,请备份好相关文件后再继续操
</div>
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>文件</th>
</tr>
</thead>
<tbody>
<%for(var i=0;i < conflictlist.length;i++){%>
<tr>
<th scope="row"><%=i+1%></th>
<td><%=conflictlist[i]%></td>
</tr>
<%}%>
</tbody>
</table>
</script>
<script id="itemtpl" type="text/html">
<div class="col-sm-4 col-md-3">
<% var labelarr = ['primary', 'success', 'info', 'danger', 'warning']; %>
<% var label = labelarr[item.id % 5]; %>
<% var addon = typeof addons[item.name]!= 'undefined' ? addons[item.name] : null; %>
<div class="thumbnail addon">
<!--<span class="btn btn-<%=label%>">ID:<%=item.id%></span>-->
<a href="<%=addon?addon.url:'javascript:;'%>" target="_blank"><img src="<%=item.image%>" class="img-responsive" alt="<%=item.title%>"></a>
<div class="caption">
<h4><%=item.title?item.title:'无'%>
<% if(item.flag.indexOf("recommend")>-1){%>
<span class="label label-success">推荐</span>
<% } %>
<% if(item.flag.indexOf("hot")>-1){%>
<span class="label label-danger">热门</span>
<% } %>
<% if(item.flag.indexOf("free")>-1){%>
<span class="label label-info">免费</span>
<% } %>
<% if(item.flag.indexOf("sale")>-1){%>
<span class="label label-warning">折扣</span>
<% } %>
</h4>
<p class="text-<%=item.price>0?'danger':'success'%>"><b><%=item.price%></b></p>
<p class="text-muted">作者: <a href="<%=item.url?item.url:'javascript:;'%>" target="_blank"><%=item.author%></a></p>
<p class="text-muted">描述: <%=item.intro%></p>
<p class="text-muted">版本: <%=# addon && item && addon.version!=item.version?'<span class="label label-danger">'+addon.version+'</span> -> <span class="label label-success">'+item.version+'</span>':item.version%></p>
<p class="text-muted">添加时间: <%=Moment(item.createtime*1000).format("YYYY-MM-DD HH:mm:ss")%></p>
<!--<p class="text-muted">最后时间: <%=Moment(item.updatetime*1000).format("YYYY-MM-DD HH:mm:ss")%></p>-->
<p class="operate" data-id="<%=item.id%>" data-name="<%=item.name%>">
<% if(!addon){ %>
<a href="javascript:;" class="btn btn-primary btn-success btn-install"><i class="fa fa-cloud-download"></i> 安装</a>
<% } %>
<% if(addon){ %>
<% if(addon.config){ %>
<a href="javascript:;" class="btn btn-primary btn-config"><i class="fa fa-pencil"></i> 配置</a>
<% } %>
<% if(addon.state == "1"){ %>
<a href="javascript:;" class="btn btn-warning btn-disable" data-action="disable"><i class="fa fa-times"></i> 点击禁用</a>
<% }else{ %>
<a href="javascript:;" class="btn btn-success btn-enable" data-action="enable"><i class="fa fa-check"></i> 点击启用</a>
<a href="javascript:;" class="btn btn-danger btn-uninstall"><i class="fa fa-times"></i> 卸载</a>
<% } %>
<% } %>
<!--
<span class="pull-right" style="margin-top:10px;">
<input name="checkbox" data-id="<%=item.id%>" type="checkbox" />
</span>
-->
</p>
</div>
</div>
</div>
</script>
\ No newline at end of file
... ...
... ... @@ -6,7 +6,7 @@
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
{:build_toolbar()}
{:build_toolbar('refresh,add,delete')}
</div>
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
... ...
<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" data-before-submit="refreshrules" action="">
<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
<input type="hidden" name="row[rules]" value="" />
<div class="form-group">
<label for="pid" class="control-label col-xs-12 col-sm-2">{:__('Parent')}:</label>
... ...
<form id="edit-form" class="form-horizontal form-ajax" role="form" method="POST" data-before-submit="refreshrules" action="">
<form id="edit-form" class="form-horizontal form-ajax" role="form" method="POST" action="">
<input type="hidden" name="row[rules]" value="" />
<div class="form-group">
<label for="pid" class="control-label col-xs-12 col-sm-2">{:__('Parent')}:</label>
... ...
... ... @@ -6,7 +6,7 @@
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
{:build_toolbar()}
{:build_toolbar('refresh,add,delete')}
</div>
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
... ...
... ... @@ -3,10 +3,10 @@
<div class="form-group">
<label for="c-type" class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
{foreach name="typeList" item="vo"}
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
{/foreach}
</select>
... ... @@ -15,10 +15,10 @@
<div class="form-group">
<label for="c-pid" class="control-label col-xs-12 col-sm-2">{:__('Pid')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-flag" data-rule="required" class="form-control selectpicker" name="row[pid]">
<select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[pid]">
{foreach name="parentList" item="vo"}
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
<option data-type="{$vo.type}" value="{$key}" {in name="key" value=""}selected{/in}>{$vo.name}</option>
{/foreach}
</select>
... ... @@ -39,10 +39,10 @@
<div class="form-group">
<label for="c-flag" class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-flag" class="form-control selectpicker" multiple="" name="row[flag][]">
{foreach name="flagList" item="vo"}
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
{/foreach}
</select>
... ...
... ... @@ -3,10 +3,10 @@
<div class="form-group">
<label for="c-type" class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
{foreach name="typeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
<option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
{/foreach}
</select>
... ... @@ -15,10 +15,10 @@
<div class="form-group">
<label for="c-pid" class="control-label col-xs-12 col-sm-2">{:__('Pid')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-flag" data-rule="required" class="form-control selectpicker" name="row[pid]">
<select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[pid]">
{foreach name="parentList" item="vo"}
<option value="{$key}" {in name="key" value="$row.pid"}selected{/in}>{$vo}</option>
<option data-type="{$vo.type}" class="{:$vo.type==$row.type||$vo.type=='all'?'':'hide'}" value="{$key}" {in name="key" value="$row.pid"}selected{/in}>{$vo.name}</option>
{/foreach}
</select>
... ... @@ -39,10 +39,10 @@
<div class="form-group">
<label for="c-flag" class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-flag" class="form-control selectpicker" multiple="" name="row[flag][]">
{foreach name="flagList" item="vo"}
<option value="{$key}" {in name="key" value="$row.flag"}selected{/in}>{$vo}</option>
<option value="{$key}" {in name="key" value="$row.flag"}selected{/in}>{$vo}</option>
{/foreach}
</select>
... ...
... ... @@ -38,28 +38,18 @@
</ul>
</li>
<li class="footer"><a href="#" target="_blank">{:__('View all')}</a></li>
<li class="footer"><a href="#" target="_blank">{:__('View more')}</a></li>
</ul>
</li>
<li class="dropdown messages-menu github-commits">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-github"></i>
<span class="label label-info"></span>
<li>
<a href="javascript:;" data-toggle="checkupdate" title="{:__('Check for updates')}">
<i class="fa fa-refresh"></i>
</a>
<ul class="dropdown-menu">
<li class="header">{:__('Recent commits')}</li>
<li>
<ul class="menu">
</ul>
</li>
<li class="footer"><a href="#" target="_blank">{:__('View all')}</a></li>
</ul>
</li>
<li>
<a href="javascript:;" data-toggle="wipecache" title="清空缓存">
<a href="javascript:;" data-toggle="wipecache" title="{:__('Wipe cache')}">
<i class="fa fa-trash"></i>
</a>
</li>
... ... @@ -113,10 +103,10 @@
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="general/profile" class="btn btn-default btn-flat addtabsit">{:__('Profile')}</a>
<a href="general/profile" class="btn btn-primary addtabsit"><i class="fa fa-user"></i> {:__('Profile')}</a>
</div>
<div class="pull-right">
<a href="{:url('index/logout')}" class="btn btn-default btn-flat">{:__('Logout')}</a>
<a href="{:url('index/logout')}" class="btn btn-danger"><i class="fa fa-sign-out"></i> {:__('Logout')}</a>
</div>
</li>
</ul>
... ...
... ... @@ -29,6 +29,10 @@
<!--如果想始终显示子菜单,则给ul加上show-submenu类即可-->
<ul class="sidebar-menu">
{$menulist}
<li class="header">相关链接</li>
<li><a href="http://doc.fastadmin.net"><i class="fa fa-list text-red"></i> <span>官方文档</span></a></li>
<li><a href="http://forum.fastadmin.net"><i class="fa fa-comment text-yellow"></i> <span>社区交流</span></a></li>
<li><a href="https://jq.qq.com/?_wv=1027&k=487PNBb"><i class="fa fa-qq text-aqua"></i> <span>QQ交流群</span></a></li>
</ul>
</section>
<!-- /.sidebar -->
\ No newline at end of file
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label for="c-category_id" class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-category_id" data-rule="required" data-source="category/selectpage" data-params='{"custom[type]":""}' class="form-control selectpage" name="row[category_id]" type="text" value="{$row.category_id}">
</div>
</div>
<div class="form-group">
<label for="c-category_ids" class="control-label col-xs-12 col-sm-2">{:__('Category_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-category_ids" data-rule="required" data-source="category/selectpage" data-params='{"custom[type]":""}' data-multiple="true" class="form-control selectpage" name="row[category_ids]" type="text" value="{$row.category_ids}">
</div>
</div>
<div class="form-group">
<label for="c-user_id" class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id}">
</div>
</div>
<div class="form-group">
<label for="c-user_ids" class="control-label col-xs-12 col-sm-2">{:__('User_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_ids" data-rule="required" data-source="user/index" data-multiple="true" data-field="nickname" class="form-control selectpage" name="row[user_ids]" type="text" value="{$row.user_ids}">
</div>
</div>
<div class="form-group">
<label for="c-week" class="control-label col-xs-12 col-sm-2">{:__('Week')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-week" data-rule="required" class="form-control selectpicker" name="row[week]">
{foreach name="weekList" item="vo"}
<option value="{$key}" {in name="key" value="$row.week"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label for="c-flag" class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-flag" data-rule="required" class="form-control selectpicker" multiple="" name="row[flag][]">
{foreach name="flagList" item="vo"}
<option value="{$key}" {in name="key" value="$row.flag"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label for="c-genderdata" class="control-label col-xs-12 col-sm-2">{:__('Genderdata')}:</label>
<div class="col-xs-12 col-sm-8">
{foreach name="genderdataList" item="vo"}
<label for="row[genderdata]-{$key}"><input id="row[genderdata]-{$key}" name="row[genderdata]" type="radio" value="{$key}" {in name="key" value="$row.genderdata"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
<div class="form-group">
<label for="c-hobbydata" class="control-label col-xs-12 col-sm-2">{:__('Hobbydata')}:</label>
<div class="col-xs-12 col-sm-8">
{foreach name="hobbydataList" item="vo"}
<label for="row[hobbydata][]-{$key}"><input id="row[hobbydata][]-{$key}" name="row[hobbydata][]" type="checkbox" value="{$key}" {in name="key" value="$row.hobbydata"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
<div class="form-group">
<label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title}">
</div>
</div>
<div class="form-group">
<label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control summernote" rows="5" name="row[content]" cols="50">{$row.content}</textarea>
</div>
</div>
<div class="form-group">
<label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="form-inline">
<input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image}">
<span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/*" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
<ul class="row list-inline plupload-preview" id="p-image"></ul>
</div>
</div>
</div>
<div class="form-group">
<label for="c-images" class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="form-inline">
<input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text" value="{$row.images}">
<span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/*" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
<ul class="row list-inline plupload-preview" id="p-images"></ul>
</div>
</div>
</div>
<div class="form-group">
<label for="c-attachfile" class="control-label col-xs-12 col-sm-2">{:__('Attachfile')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="form-inline">
<input id="c-attachfile" data-rule="required" class="form-control" size="50" name="row[attachfile]" type="text" value="{$row.attachfile}">
<span><button type="button" id="plupload-attachfile" class="btn btn-danger plupload" data-input-id="c-attachfile" data-multiple="false"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-attachfile" class="btn btn-primary fachoose" data-input-id="c-attachfile" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
</div>
</div>
<div class="form-group">
<label for="c-keywords" class="control-label col-xs-12 col-sm-2">{:__('Keywords')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-keywords" data-rule="required" class="form-control" name="row[keywords]" type="text" value="{$row.keywords}">
</div>
</div>
<div class="form-group">
<label for="c-description" class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-description" data-rule="required" class="form-control" name="row[description]" type="text" value="{$row.description}">
</div>
</div>
<div class="form-group">
<label for="c-price" class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price}">
</div>
</div>
<div class="form-group">
<label for="c-views" class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-views" class="form-control" name="row[views]" type="number" value="{$row.views}">
</div>
</div>
<div class="form-group">
<label for="c-startdate" class="control-label col-xs-12 col-sm-2">{:__('Startdate')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-startdate" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[startdate]" type="text" value="{$row.startdate}">
</div>
</div>
<div class="form-group">
<label for="c-activitytime" class="control-label col-xs-12 col-sm-2">{:__('Activitytime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-activitytime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[activitytime]" type="text" value="{$row.activitytime}">
</div>
</div>
<div class="form-group">
<label for="c-year" class="control-label col-xs-12 col-sm-2">{:__('Year')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-year" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY" data-use-current="true" name="row[year]" type="text" value="{$row.year}">
</div>
</div>
<div class="form-group">
<label for="c-times" class="control-label col-xs-12 col-sm-2">{:__('Times')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-times" data-rule="required" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-use-current="true" name="row[times]" type="text" value="{$row.times}">
</div>
</div>
<div class="form-group">
<label for="c-refreshtime" class="control-label col-xs-12 col-sm-2">{:__('Refreshtime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-refreshtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[refreshtime]" type="text" value="{$row.refreshtime|datetime}">
</div>
</div>
<div class="form-group">
<label for="c-weigh" class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh}">
</div>
</div>
<div class="form-group">
<label for="c-status" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
<div class="form-group">
<label for="c-state" class="control-label col-xs-12 col-sm-2">{:__('State')}:</label>
<div class="col-xs-12 col-sm-8">
{foreach name="stateList" item="vo"}
<label for="row[state]-{$key}"><input id="row[state]-{$key}" name="row[state]" type="radio" value="{$key}" {in name="key" value="$row.state"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
<table class="table table-striped">
<thead>
<tr>
<th>{:__('Title')}</th>
<th>{:__('Content')}</th>
</tr>
</thead>
<tbody>
{volist name="row" id="vo" }
<tr>
<td>{$key}</td>
<td>{$vo}</td>
</tr>
{/volist}
</tbody>
</table>
<div class="hide layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">{:__('Close')}</button>
</div>
</div>
\ No newline at end of file
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
{:build_toolbar('refresh,delete')}
<a class="btn btn-info btn-disabled disabled btn-selected" href="javascript:;"><i class="fa fa-leaf"></i> 获取选中项</a>
<div class="dropdown btn-group">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> <?= __('More') ?></a>
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
</ul>
</div>
<a class="btn btn-success btn-singlesearch" href="javascript:;"><i class="fa fa-user"></i> 自定义搜索</a>
<a class="btn btn-success btn-change btn-start" data-params="action=start" data-url="example/bootstraptable/change" href="javascript:;"><i class="fa fa-play"></i> 启动</a>
<a class="btn btn-danger btn-change btn-pause" data-params="action=pause" data-url="example/bootstraptable/change" href="javascript:;"><i class="fa fa-pause"></i> 暂停</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
{:build_toolbar('refresh,delete')}
</div>
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
{:build_toolbar('refresh,delete')}
</div>
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<style>#cxselect-example textarea{margin:10px 0;}</style>
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding" id="cxselect-example">
<form id="cxselectform" action="">
<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading"><b>省市区联动</b>(通过AJAX读取数据)</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-9">
<div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
<select class="province form-control" name="province" data-url="ajax/area"></select>
<select class="city form-control" name="city" data-url="ajax/area"></select>
<select class="area form-control" name="area" data-url="ajax/area"></select>
</div>
</div>
<div class="col-xs-3 text-right">
<h6><label class="label label-primary"><i class="fa fa-pencil"></i> 增加</label></h6>
</div>
<div class="col-xs-12">
<textarea class="form-control" rows="8">
</textarea>
</div>
</div>
<div class="row">
<div class="col-xs-9">
<div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
<select class="province form-control" name="province" data-url="ajax/area">
<option value="1964" selected>广东省</option>
</select>
<select class="city form-control" name="city" data-url="ajax/area">
<option value="1988" selected>深圳市</option>
</select>
<select class="area form-control" name="area" data-url="ajax/area">
<option value="1991" selected>南山区</option>
</select>
</div>
</div>
<div class="col-xs-3 text-right">
<h6><label class="label label-success"><i class="fa fa-edit"></i> 修改</label></h6>
</div>
<div class="col-xs-12">
<textarea class="form-control" rows="8">
</textarea>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading"><b>类别联动</b>(Ajax读取数据)</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-9">
<div class="form-inline" data-toggle="cxselect" data-selects="first,second">
<select class="first form-control" name="first" data-url="ajax/category?type=page&pid=5"></select>
<select class="second form-control" name="second" data-url="ajax/category" data-query-name="pid"></select>
</div>
</div>
<div class="col-xs-3 text-right">
<h6><label class="label label-primary"><i class="fa fa-pencil"></i> 增加</label></h6>
</div>
<div class="col-xs-12">
<textarea class="form-control" rows="8">
</textarea>
</div>
</div>
<div class="row">
<div class="col-xs-9">
<div class="form-inline" data-toggle="cxselect" data-selects="first,second">
<select class="first form-control" name="first" data-url="ajax/category?type=page&pid=5">
<option value="6" selected>网站建站</option>
</select>
<select class="second form-control" name="second" data-url="ajax/category" data-query-name="pid">
<option value="9" selected>移动端</option>
</select>
</div>
</div>
<div class="col-xs-3 text-right">
<h6><label class="label label-success"><i class="fa fa-edit"></i> 修改</label></h6>
</div>
<div class="col-xs-12">
<textarea class="form-control" rows="8">
</textarea>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading"><b>省市区联动</b>(通过JSON渲染数据)</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-9">
<!--由于在初始化中修改了默认值,所以这里需要修改-jsonSpace/jsonValue/jsonName的值-->
<div class="form-inline" data-toggle="cxselect" data-url="__CDN__/assets/libs/jquery-cxselect/js/cityData.min.json"
data-selects="province,city,area" data-json-space="" data-json-name="n" data-json-value="">
<select class="province form-control" name="province"></select>
<select class="city form-control" name="city"></select>
<select class="area form-control" name="area"></select>
</div>
</div>
<div class="col-xs-3 text-right">
<h6><label class="label label-primary"><i class="fa fa-pencil"></i> 增加</label></h6>
</div>
<div class="col-xs-12">
<textarea class="form-control" rows="8">
</textarea>
</div>
</div>
<div class="row">
<div class="col-xs-9">
<!--由于在初始化中修改了默认值,所以这里需要修改-jsonSpace/jsonValue/jsonName的值-->
<div class="form-inline" data-toggle="cxselect" data-url="__CDN__/assets/libs/jquery-cxselect/js/cityData.min.json"
data-selects="province,city,area" data-json-space="" data-json-name="n" data-json-value="">
<select class="province form-control" data-first-title="选择省">
<option value="">请选择</option>
<option value="浙江省" selected>浙江省</option>
</select>
<select class="city form-control" data-first-title="选择市">
<option value="">请选择</option>
<option value="杭州市" selected>杭州市</option>
</select>
<select class="area form-control" data-first-title="选择地区">
<option value="">请选择</option>
<option value="西湖区" selected>西湖区</option>
</select>
</div>
</div>
<div class="col-xs-3 text-right">
<h6><label class="label label-success"><i class="fa fa-edit"></i> 修改</label></h6>
</div>
<div class="col-xs-12">
<textarea class="form-control" rows="8">
</textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div class="row">
<div class="col-md-6">
<div id="toolbar1" class="toolbar">
{:build_toolbar()}
<div class="dropdown btn-group">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
</ul>
</div>
</div>
<table id="table1" class="table table-striped table-bordered table-hover" width="100%">
</table>
</div>
<div class="col-md-6">
<div id="toolbar2" class="toolbar">
{:build_toolbar()}
<div class="dropdown btn-group">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
</ul>
</div>
</div>
<table id="table2" class="table table-striped table-bordered table-hover" width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
{:build_toolbar('delete')}
</div>
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
{:build_toolbar('refresh,delete')}
<a class="btn btn-info btn-disabled disabled btn-selected" href="javascript:;"><i class="fa fa-leaf"></i> 获取选中项</a>
<a class="btn btn-success btn-toggle-view" href="javascript:;"><i class="fa fa-leaf"></i> 切换视图</a>
</div>
<table id="table" class="table table-striped table-hover" width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
<style type="text/css">
.example {
height:100%;position: relative;
}
.example > span {
position:absolute;left:15px;top:15px;
}
</style>
<script id="itemtpl" type="text/html">
<!--
如果启用了templateView,默认调用的是itemtpl这个模板,可以通过设置templateFormatter来修改
在当前模板中可以使用三个变量(item:行数据,i:当前第几行,data:所有的行数据)
此模板引擎使用的是art-templatenative,可参考官方文档
-->
<div class="col-sm-4 col-md-3">
<!--下面四行是为了展示随机图片和标签,可移除-->
<% var imagearr = ['https://ws2.sinaimg.cn/large/006tNc79gy1fgphwokqt9j30dw0990tb.jpg', 'https://ws2.sinaimg.cn/large/006tNc79gy1fgphwt8nq8j30e609f3z4.jpg', 'https://ws1.sinaimg.cn/large/006tNc79gy1fgphwn44hvj30go0b5myb.jpg', 'https://ws1.sinaimg.cn/large/006tNc79gy1fgphwnl37mj30dw09agmg.jpg', 'https://ws3.sinaimg.cn/large/006tNc79gy1fgphwqsvh6j30go0b576c.jpg']; %>
<% var image = imagearr[item.id % 5]; %>
<% var labelarr = ['primary', 'success', 'info', 'danger', 'warning']; %>
<% var label = labelarr[item.id % 5]; %>
<div class="thumbnail example">
<span class="btn btn-<%=label%>">ID:<%=item.id%></span>
<img src="<%=image%>" class="img-responsive" alt="<%=item.title%>">
<div class="caption">
<h4><%=item.title?item.title:'无'%></h4>
<p class="text-muted">操作者IP:<%=item.ip%></p>
<p class="text-muted">操作时间:<%=Moment(item.createtime*1000).format("YYYY-MM-DD HH:mm:ss")%></p>
<p>
<!--详情的事件需要在JS中手动绑定-->
<a href="#" class="btn btn-primary btn-success btn-detail" data-id="<%=item.id%>"><i class="fa fa-camera"></i> 详情</a>
<!--如果需要响应编辑或删除事件,可以给元素添加 btn-editbtn-del的类和data-id这个属性值-->
<a href="#" class="btn btn-primary btn-edit" data-id="<%=item.id%>"><i class="fa fa-pencil"></i> 编辑</a>
<a href="#" class="btn btn-danger btn-del" data-id="<%=item.id%>"><i class="fa fa-times"></i> 删除</a>
<span class="pull-right" style="margin-top:10px;">
<!--如果需要多选操作,请确保有下面的checkbox元素存在,可移除-->
<input name="checkbox" data-id="<%=item.id%>" type="checkbox" />
</span>
</p>
</div>
</div>
</div>
</script>
\ No newline at end of file
<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label for="name" class="control-label col-xs-12 col-sm-2">ID:</label>
<div class="col-xs-12 col-sm-8">
<input type="text" class="form-control" id="id" name="row[id]" value="" data-rule="required" />
</div>
</div>
<div class="form-group">
<label for="name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="text" class="form-control" id="name" name="row[name]" value="" data-rule="required" />
</div>
</div>
<div class="form-group">
<label for="content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<dl class="fieldlist" rel="1">
<dd>
<ins>{:__('Key')}</ins>
<ins>{:__('Value')}</ins>
</dd>
<dd>
<input type="text" name="field[0]" class="form-control" id="field-0" value="" size="10" required />
<input type="text" name="value[0]" class="form-control" id="value-0" value="" size="40" required />
<span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
</dd>
<dd><a href="javascript:;" class="append btn btn-sm btn-success"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
</dl>
</div>
</div>
<div class="form-group">
<label for="weigh" class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="text" class="form-control" id="weigh" name="row[weigh]" value="0" data-rule="required" size="6" />
</div>
</div>
<div class="form-group">
<label for="content" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
</div>
</div>
<div class="form-group hidden layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label for="name" class="control-label col-xs-12 col-sm-2">ID:</label>
<div class="col-xs-12 col-sm-8">
<input type="text" class="form-control" id="id" name="row[id]" value="{$row.id}" data-rule="required" />
</div>
</div>
<div class="form-group">
<label for="name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="text" class="form-control" id="name" name="row[name]" value="{$row.name}" data-rule="required" />
</div>
</div>
<div class="form-group">
<label for="content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<dl class="fieldlist" rel="{$row.content|count}">
<dd>
<ins>{:__('Key')}</ins>
<ins>{:__('Value')}</ins>
</dd>
{foreach $row.content as $key => $vo}
<dd class="form-inline">
<input type="text" name="field[{$key}]" class="form-control" id="field-{$key}" value="{$key}" size="10" />
<input type="text" name="value[{$key}]" class="form-control" id="value-{$key}" value="{$vo}" size="40" />
<span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
</dd>
{/foreach}
<dd><a href="javascript:;" class="append btn btn-sm btn-success"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
</dl>
</div>
</div>
<div class="form-group">
<label for="weigh" class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-2">
<input type="text" class="form-control" id="weigh" name="row[weigh]" value="{$row.weigh}" data-rule="required" size="6" />
</div>
</div>
<div class="form-group">
<label for="content" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
</div>
</div>
<div class="form-group hidden layer-footer">
<div class="col-xs-2"></div>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
{:build_toolbar()}
<div class="dropdown btn-group">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
</ul>
</div>
</div>
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
<style type="text/css">
#schedulepicker {
padding-top:7px;
}
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label for="name" class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="text" class="form-control" id="title" name="row[title]" value="" data-rule="required" />
</div>
</div>
<div class="form-group">
<label for="name" class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_select('row[type]', $typedata, null, ['class'=>'form-control', 'data-rule'=>'required'])}
</div>
</div>
<div class="form-group">
<label for="content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea name="row[content]" id="conent" cols="30" rows="5" class="form-control" data-rule="required"></textarea>
</div>
</div>
<div class="form-group">
<label for="schedule" class="control-label col-xs-12 col-sm-2">{:__('Schedule')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="text" class="form-control" id="schedule" style="font-size:12px;font-family: Verdana;word-spacing:23px;" name="row[schedule]" value="* * * * *" data-rule="required; remote(general/crontab/check_schedule)" />
<div id="schedulepicker">
<pre><code>* * * * *
- - - - -
| | | | +--- day of week (0 - 7) (Sunday=0 or 7)
| | | +-------- month (1 - 12)
| | +------------- day of month (1 - 31)
| +------------------ hour (0 - 23)
+----------------------- min (0 - 59)</code></pre>
<h5>{:__('The next %s times the execution time', '<input type="number" id="pickdays" class="form-control text-center" value="7" style="display: inline-block;width:80px;">')}</h5>
<ol id="scheduleresult" class="list-group">
</ol>
</div>
</div>
</div>
<div class="form-group">
<label for="maximums" class="control-label col-xs-12 col-sm-2">{:__('Maximums')}:</label>
<div class="col-xs-12 col-sm-4">
<input type="number" class="form-control" id="maximums" name="row[maximums]" value="0" data-rule="required" size="6" />
</div>
</div>
<div class="form-group">
<label for="begintime" class="control-label col-xs-12 col-sm-2">{:__('Begin time')}:</label>
<div class="col-xs-12 col-sm-4">
<input type="text" class="form-control datetimepicker" id="begintime" name="row[begintime]" value="" data-rule="{:__('Begin time')}:required" size="6" />
</div>
</div>
<div class="form-group">
<label for="endtime" class="control-label col-xs-12 col-sm-2">{:__('End time')}:</label>
<div class="col-xs-12 col-sm-4">
<input type="text" class="form-control datetimepicker" id="endtime" name="row[endtime]" value="" data-rule="{:__('End time')}:required;match(gte, row[begintime], datetime)" size="6" />
</div>
</div>
<div class="form-group">
<label for="weigh" class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-4">
<input type="text" class="form-control" id="weigh" name="row[weigh]" value="0" data-rule="required" size="6" />
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
</div>
</div>
<div class="form-group hide layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>