作者 Karson

新增菜单快捷搜索,支持单拼、全拼、中文搜索

新增基类的selectpage方法,用于独立提供下拉列表搜索
新增前台SMS控制器,用于验证码的发送
新增JS的Fast的全局方法
新增CRUD生成Model中自动更新权重weigh字段的功能
修复install.php文件检测和目录检测的BUG
修复前台Ucenter方法公开访问的BUG
修复在路由中禁用Admin模块的路由
修复部分脚本显示编码的BUG
修复CRUD时自定义主键时的生成的Model关联错误的BUG
移除冗余的LESS文件和CSS文件
移除Configvalue模块功能
正在显示 100 个修改的文件 包含 1212 行增加662 行删除

要显示太多修改。

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

... ... @@ -214,8 +214,12 @@ class Crud extends Command
throw new Exception("table not found");
}
}
else
{
$table = stripos($table, $prefix) === 0 ? substr($table, strlen($prefix)) : $table;
}
$tableInfo = $tableInfo[0];
$relationModelTableType = 'table';
//检查关联表
if ($relation)
... ... @@ -232,6 +236,10 @@ class Crud extends Command
throw new Exception("relation table not found");
}
}
else
{
$relation = stripos($relation, $prefix) === 0 ? substr($relation, strlen($prefix)) : $relation;
}
}
//根据表名匹配对应的Fontawesome图标
... ... @@ -442,8 +450,8 @@ class Crud extends Command
$fieldName = "row[{$field}]";
$defaultValue = $v['COLUMN_DEFAULT'];
$editValue = "{\$row.{$field}}";
// 如果默认值为空,则是一个必选项
if ($v['COLUMN_DEFAULT'] == '')
// 如果默认值非null,则是一个必选项
if (!is_null($v['COLUMN_DEFAULT']))
{
$attrArr['data-rule'] = 'required';
}
... ... @@ -511,6 +519,7 @@ class Crud extends Command
}
else if ($inputType == 'checkbox' || $inputType == 'radio')
{
unset($attrArr['data-rule']);
$fieldName = $inputType == 'checkbox' ? $fieldName .= "[]" : $fieldName;
$attrArr['name'] = "row[{$fieldName}]";
... ... @@ -534,6 +543,7 @@ class Crud extends Command
}
else if ($inputType == 'switch')
{
unset($attrArr['data-rule']);
if ($defaultValue === '1' || $defaultValue === 'Y')
{
$yes = $defaultValue;
... ... @@ -560,10 +570,12 @@ class Crud extends Command
$defaultValue = '';
$attrArr['data-rule'] = 'required';
$cssClassArr[] = 'selectpage';
$attrArr['data-db-table'] = substr($field, 0, strripos($field, '_'));
$selectpageController = str_replace('_', '/', substr($field, 0, strripos($field, '_')));
$attrArr['data-source'] = $selectpageController . "/index";
//如果是类型表需要特殊处理下
if ($attrArr['data-db-table'] == 'category')
if ($selectpageController == 'category')
{
$attrArr['data-source'] = 'category/selectpage';
$attrArr['data-params'] = '##replacetext##';
$search = '"##replacetext##"';
$replace = '\'{"custom[type]":"' . $table . '"}\'';
... ... @@ -677,6 +689,12 @@ class Crud extends Command
$validateNamespace = "{$appNamespace}\\" . $moduleName . "\\validate";
$validateName = $modelName;
$modelInit = '';
if ($priKey != $order)
{
$modelInit = $this->getReplacedStub('mixins' . DS . 'modelinit', ['order' => $order]);
}
$data = [
'controllerNamespace' => $controllerNamespace,
'modelNamespace' => $modelNamespace,
... ... @@ -716,7 +734,8 @@ class Crud extends Command
'getEnumList' => implode("\n\n", $getEnumArr),
'getAttrList' => implode("\n\n", $getAttrArr),
'setAttrList' => implode("\n\n", $setAttrArr),
'modelMethod' => '',
'modelInit' => $modelInit,
'modelRelationMethod' => '',
];
//如果使用关联模型
... ... @@ -734,7 +753,7 @@ class Crud extends Command
$data['relationForeignKey'] = $relationForeignKey;
$data['relationPrimaryKey'] = $relationPrimaryKey ? $relationPrimaryKey : $priKey;
//构造关联模型的方法
$data['modelMethod'] = $this->getReplacedStub('modelmethod', $data);
$data['modelRelationMethod'] = $this->getReplacedStub('mixins' . DS . 'modelrelationmethod', $data);
}
// 生成控制器文件
... ... @@ -1138,7 +1157,6 @@ EOD;
protected function getJsColumn($field, $datatype = '', $extend = '')
{
$lang = ucfirst($field);
$html = str_repeat(" ", 24) . "{field: '{$field}{$extend}', title: __('{$lang}')";
$formatter = '';
foreach ($this->fieldFormatterSuffix as $k => $v)
{
... ... @@ -1159,7 +1177,12 @@ EOD;
}
}
}
$formatter = $extend ? '' : $formatter;
if ($formatter)
{
$extend = '';
}
$html = str_repeat(" ", 24) . "{field: '{$field}{$extend}', title: __('{$lang}')";
//$formatter = $extend ? '' : $formatter;
if ($extend)
{
$html .= ", operate:false";
... ...
... ... @@ -6,7 +6,8 @@
{
//当前是否为关联查询
$this->relationSearch = {%relationSearch%};
//设置过滤方法
$this->request->filter(['strip_tags', 'htmlspecialchars']);
if ($this->request->isAjax())
{
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
... ...
{foreach name="{%fieldList%}" item="vo"}
<label for="{%fieldName%}-{$key}"><input id="{%fieldName%}-{$key}" name="{%fieldName%}" type="checkbox" value="{$key}" {in name="key" value="{%selectedValue%}"}checked{/in} /> {$vo}</label>
<label for="{%fieldName%}-{$key}"><input id="{%fieldName%}-{$key}" name="{%fieldName%}" type="checkbox" value="{$key}" {in name="key" value="{%selectedValue%}"}checked{/in} /> {$vo}</label>
{/foreach}
... ...
{foreach name="{%fieldList%}" item="vo"}
<label for="{%fieldName%}-{$key}"><input id="{%fieldName%}-{$key}" name="{%fieldName%}" type="radio" value="{$key}" {in name="key" value="{%selectedValue%}"}checked{/in} /> {$vo}</label>
<label for="{%fieldName%}-{$key}"><input id="{%fieldName%}-{$key}" name="{%fieldName%}" type="radio" value="{$key}" {in name="key" value="{%selectedValue%}"}checked{/in} /> {$vo}</label>
{/foreach}
... ...
protected static function init()
{
self::afterInsert(function ($row) {
$row->save(['{%order%}' => $row['id']]);
});
}
... ...
public function {%relationMethod%}()
{
return $this->{%relationMode%}('{%relationModelName%}', '{%relationForeignKey%}', '{%pk%}')->setEagerlyType(0);
return $this->{%relationMode%}('{%relationModelName%}', '{%relationForeignKey%}', '{%relationPrimaryKey%}')->setEagerlyType(0);
}
\ No newline at end of file
... ...
... ... @@ -21,6 +21,7 @@ class {%modelName%} extends Model
{%appendAttrList%}
];
{%modelInit%}
{%getEnumList%}
... ... @@ -28,5 +29,5 @@ class {%modelName%} extends Model
{%setAttrList%}
{%modelMethod%}
{%modelRelationMethod%}
}
... ...
... ... @@ -4,7 +4,7 @@
官网: http://www.fastadmin.net
演示: http://demo.fastadmin.net
Date: 06/14/2017 17:12:25 PM
Date: 07/11/2017 23:52:44 PM
*/
SET FOREIGN_KEY_CHECKS = 0;
... ... @@ -54,7 +54,14 @@ CREATE TABLE `fa_admin_log` (
`createtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '操作时间',
PRIMARY KEY (`id`),
KEY `name` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='管理员日志表';
) 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`
... ... @@ -99,7 +106,14 @@ CREATE TABLE `fa_attachment` (
`sha1` varchar(40) NOT NULL DEFAULT '' COMMENT '文件 sha1编码',
PRIMARY KEY (`id`),
UNIQUE KEY `sha1` (`sha1`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='附件表';
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='附件表';
-- ----------------------------
-- Records of `fa_attachment`
-- ----------------------------
BEGIN;
INSERT INTO `fa_attachment` VALUES ('1', '/assets/img/qrcode.png', '150', '150', 'png', '0', '21859', 'image/png', '', '1499681848', '1499681848', '1499681848', 'local', '17163603d0263e4838b9387ff2cd4877e8b018f6');
COMMIT;
-- ----------------------------
-- Table structure for `fa_auth_group`
... ... @@ -164,13 +178,13 @@ CREATE TABLE `fa_auth_rule` (
UNIQUE KEY `name` (`name`) USING BTREE,
KEY `pid` (`pid`),
KEY `weigh` (`weigh`)
) ENGINE=InnoDB AUTO_INCREMENT=11317 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='节点表';
) ENGINE=InnoDB AUTO_INCREMENT=11324 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', '1497430619', '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 ('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');
COMMIT;
-- ----------------------------
... ... @@ -201,7 +215,7 @@ CREATE TABLE `fa_category` (
-- Records of `fa_category`
-- ----------------------------
BEGIN;
INSERT INTO `fa_category` VALUES ('1', '0', 'page', '官方新闻', 'news', 'recommend', '', '', '', 'news', '1495262190', '1495262190', '0', 'normal'), ('2', '0', 'page', '移动应用', 'mobileapp', 'hot', '', '', '', 'mobileapp', '1495262244', '1495262244', '0', 'normal'), ('3', '2', 'page', '微信公众号', 'wechatpublic', 'index', '', '', '', 'wechatpublic', '1495262288', '1495262288', '0', 'normal'), ('4', '2', 'page', 'Android开发', 'android', 'recommend', '', '', '', 'android', '1495262317', '1495262317', '0', 'normal'), ('5', '0', 'page', '软件产品', 'software', 'recommend', '', '', '', 'software', '1495262336', '1495262336', '0', 'normal'), ('6', '5', 'page', '网站建站', 'website', 'recommend', '', '', '', 'website', '1495262357', '1495262357', '0', 'normal'), ('7', '5', 'page', '企业管理软件', 'company', 'index', '', '', '', 'company', '1495262391', '1495262391', '0', 'normal'), ('8', '6', 'page', 'PC端', 'website-pc', 'recommend', '', '', '', 'website-pc', '1495262424', '1495262424', '0', 'normal'), ('9', '6', 'page', '移动端', 'website-mobile', 'recommend', '', '', '', 'website-mobile', '1495262456', '1495262456', '0', 'normal'), ('10', '7', 'page', 'CRM系统 ', 'company-crm', 'recommend', '', '', '', 'company-crm', '1495262487', '1495262487', '0', 'normal'), ('11', '7', 'page', 'SASS平台软件', 'company-sass', 'recommend', '', '', '', 'company-sass', '1495262515', '1495262515', '0', 'normal'), ('12', '0', 'test', '测试1', 'test1', 'recommend', '', '', '', '', '1497015727', '1497015727', '0', 'normal'), ('13', '0', 'test', '测试2', 'test2', 'recommend', '', '', '', '', '1497015738', '1497015738', '0', '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');
COMMIT;
-- ----------------------------
... ... @@ -221,35 +235,13 @@ CREATE TABLE `fa_config` (
`extend` varchar(255) NOT NULL DEFAULT '' COMMENT '扩展属性',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='系统配置';
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='系统配置';
-- ----------------------------
-- Records of `fa_config`
-- ----------------------------
BEGIN;
INSERT INTO `fa_config` VALUES ('1', 'name', 'basic', '站点名称', '请填写站点名称', 'string', 'FastAdmin', '', 'required', ''), ('2', 'beian', 'basic', '备案号', '粤ICP备15054802号-4', 'string', '', '', '', ''), ('3', 'cdnurl', 'basic', 'CDN地址', '如果使用CDN云储存请配置该值', 'string', '', '', '', ''), ('4', 'version', 'basic', '版本号', '如果静态资源有变动请重新配置该值', 'string', '1.0.1', '', 'required', ''), ('5', 'timezone', 'basic', '时区', '', 'string', 'Asia/Shanghai', '', 'required', ''), ('6', 'forbiddenip', 'basic', '禁止访问IP', '一行一条记录', 'text', '', '', '', ''), ('7', 'languages', 'basic', '模块语言', '', 'array', '{\"backend\":\"zh-cn\",\"frontend\":\"zh-cn\"}', '', 'required', ''), ('8', 'fixedpage', 'basic', '后台默认页', '请尽量输入左侧菜单栏存在的链接', 'string', 'dashboard', '', 'required', ''), ('9', 'categorytype', 'dictionary', '分类类型', '', 'array', '{\"default\":\"默认\",\"page\":\"单页\",\"article\":\"文章\",\"test\":\"测试\"}', '', '', ''), ('10', 'configgroup', 'dictionary', '配置分组', '', 'array', '{\"basic\":\"基础配置\",\"email\":\"邮件配置\",\"dictionary\":\"字典配置\",\"user\":\"会员配置\",\"example\":\"示例分组\"}', '', '', ''),('11','mail_type','email','邮件发送方式','选择邮件发送方式','select','1','[\"请选择\",\"SMTP\",\"mail()函数\"]','',''),('12','mail_smtp_host','email','SMTP[服务器]','错误的配置发送邮件会导致服务器超时','string','smtp.qq.com','','',''),('13','mail_smtp_port','email','SMTP[端口]','(不加密默认25,SSL默认465,TLS默认587)','string','465','','',''),('14','mail_smtp_user','email','SMTP[用户名]','(填写完整用户名)','string','10000','','',''),('15','mail_smtp_pass','email','SMTP[密码]','(填写您的密码)','string','password','','',''),('16','mail_verify_type','email','SMTP验证方式','(SMTP验证方式[推荐SSL])','select','2','[\"\",\"TLS\",\"SSL\"]','',''),('17','mail_from','email','发件人邮箱','','string','10000@qq.com','','','');
COMMIT;
-- ----------------------------
-- Table structure for `fa_configvalue`
-- ----------------------------
DROP TABLE IF EXISTS `fa_configvalue`;
CREATE TABLE `fa_configvalue` (
`id` varchar(30) NOT NULL DEFAULT '' COMMENT '配置ID',
`name` varchar(300) NOT NULL DEFAULT '' COMMENT '配置名称',
`content` varchar(1500) NOT NULL DEFAULT '' 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 'normal' COMMENT '状态',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='配置表';
-- ----------------------------
-- Records of `fa_configvalue`
-- ----------------------------
BEGIN;
INSERT INTO `fa_configvalue` VALUES ('qqun', 'QQ群: 636393962', '{\"qqun\":\"636393962\"}', '1493475993', '1493475993', '2', 'normal');
INSERT INTO `fa_config` VALUES ('1', 'name', 'basic', '站点名称', '请填写站点名称', 'string', 'FastAdmin', '', 'required', ''), ('2', 'beian', 'basic', '备案号', '粤ICP备15054802号-4', 'string', '', '', '', ''), ('3', 'cdnurl', 'basic', 'CDN地址', '如果使用CDN云储存请配置该值', 'string', '', '', '', ''), ('4', 'version', 'basic', '版本号', '如果静态资源有变动请重新配置该值', 'string', '1.0.1', '', 'required', ''), ('5', 'timezone', 'basic', '时区', '', 'string', 'Asia/Shanghai', '', 'required', ''), ('6', 'forbiddenip', 'basic', '禁止访问IP', '一行一条记录', 'text', '', '', '', ''), ('7', 'languages', 'basic', '模块语言', '', 'array', '{\"backend\":\"zh-cn\",\"frontend\":\"zh-cn\"}', '', 'required', ''), ('8', 'fixedpage', 'basic', '后台默认页', '请尽量输入左侧菜单栏存在的链接', 'string', 'dashboard', '', 'required', ''), ('9', 'categorytype', 'dictionary', '分类类型', '', 'array', '{\"default\":\"默认\",\"page\":\"单页\",\"article\":\"文章\",\"test\":\"测试\"}', '', '', ''), ('10', 'configgroup', 'dictionary', '配置分组', '', 'array', '{\"basic\":\"基础配置\",\"email\":\"邮件配置\",\"dictionary\":\"字典配置\",\"user\":\"会员配置\",\"example\":\"示例分组\"}', '', '', ''), ('11', 'mail_type', 'email', '邮件发送方式', '选择邮件发送方式', 'select', '1', '[\"请选择\",\"SMTP\",\"mail()函数\"]', '', ''), ('12', 'mail_smtp_host', 'email', 'SMTP[服务器]', '错误的配置发送邮件会导致服务器超时', 'string', 'smtp.qq.com', '', '', ''), ('13', 'mail_smtp_port', 'email', 'SMTP[端口]', '(不加密默认25,SSL默认465,TLS默认587)', 'string', '465', '', '', ''), ('14', 'mail_smtp_user', 'email', 'SMTP[用户名]', '(填写完整用户名)', 'string', '10000', '', '', ''), ('15', 'mail_smtp_pass', 'email', 'SMTP[密码]', '(填写您的密码)', 'string', 'password', '', '', ''), ('16', 'mail_verify_type', 'email', 'SMTP验证方式', '(SMTP验证方式[推荐SSL])', 'select', '2', '[\"\",\"TLS\",\"SSL\"]', '', ''), ('17', 'mail_from', 'email', '发件人邮箱', '', 'string', '10000@qq.com', '', '', '');
COMMIT;
-- ----------------------------
... ... @@ -279,74 +271,7 @@ CREATE TABLE `fa_crontab` (
-- Records of `fa_crontab`
-- ----------------------------
BEGIN;
INSERT INTO `fa_crontab` VALUES ('1', 'url', '请求FastAdmin', 'http://www.fastadmin.net', '* * * * *', '0', '0', '0', '1497070825', '1497070825', '1483200000', '1546272000', '0', '0', 'normal'), ('2', 'sql', '查询一条SQL', 'SELECT 1;', '* * * * *', '0', '0', '0', '1497071095', '1497071095', '1483200000', '1546272000', '0', '0', 'normal');
COMMIT;
-- ----------------------------
-- Table structure for `fa_main`
-- ----------------------------
DROP TABLE IF EXISTS `fa_main`;
CREATE TABLE `fa_main` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`title` varchar(100) NOT NULL,
`image` varchar(100) NOT NULL,
`content` text NOT NULL,
`createtime` int(10) NOT NULL,
`updatetime` int(10) NOT NULL,
`status` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='主表';
-- ----------------------------
-- Records of `fa_main`
-- ----------------------------
BEGIN;
INSERT INTO `fa_main` VALUES ('1', '我是第一条', '/', 'fsdfds', '0', '0', 'normal'), ('2', '我是第二条', '/', 'fdsdsfd', '0', '0', 'normal');
COMMIT;
-- ----------------------------
-- Table structure for `fa_main_multi`
-- ----------------------------
DROP TABLE IF EXISTS `fa_main_multi`;
CREATE TABLE `fa_main_multi` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`main_id` int(10) NOT NULL,
`title` varchar(100) NOT NULL,
`image` varchar(100) NOT NULL,
`content` text NOT NULL,
`createtime` int(10) NOT NULL,
`updatetime` int(10) NOT NULL,
`status` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='多子表';
-- ----------------------------
-- Records of `fa_main_multi`
-- ----------------------------
BEGIN;
INSERT INTO `fa_main_multi` VALUES ('1', '1', 't1', 'i1', '', '0', '0', 'test'), ('2', '1', 't2', 'i2', '', '0', '0', ''), ('3', '2', 'tt2', 'i3', '', '0', '0', ' sdfds');
COMMIT;
-- ----------------------------
-- Table structure for `fa_main_single`
-- ----------------------------
DROP TABLE IF EXISTS `fa_main_single`;
CREATE TABLE `fa_main_single` (
`main_id` int(10) NOT NULL,
`title` varchar(100) NOT NULL COMMENT '内容',
`image` varchar(100) NOT NULL COMMENT '图片',
`content` text NOT NULL,
`createtime` int(10) NOT NULL,
`updatetime` int(10) NOT NULL,
`status` varchar(50) NOT NULL,
PRIMARY KEY (`main_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='单子表';
-- ----------------------------
-- Records of `fa_main_single`
-- ----------------------------
BEGIN;
INSERT INTO `fa_main_single` VALUES ('1', '子表title', '//', 'aaaa', '0', '0', 'test'), ('2', '子表', 'fsdfds', 'bbb', '0', '0', 'fsdfds');
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;
-- ----------------------------
... ... @@ -369,7 +294,14 @@ CREATE TABLE `fa_page` (
`weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
`status` varchar(30) NOT NULL DEFAULT '' COMMENT '状态',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='单页表';
) 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`
... ... @@ -378,13 +310,13 @@ DROP TABLE IF EXISTS `fa_test`;
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 DEFAULT '' 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 '星期(单选)',
`flag` set('hot','index','recommend') NOT NULL DEFAULT '' COMMENT '标志(多选)',
`genderdata` enum('male','female') NOT NULL DEFAULT 'male' COMMENT '性别(单选)',
`hobbydata` set('music','reading','swimming') NOT NULL COMMENT '爱好(多选)',
`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=女',
`hobbydata` set('music','reading','swimming') NOT NULL COMMENT '爱好(多选):music=音乐,reading=读书,swimming=游泳',
`title` varchar(50) NOT NULL DEFAULT '' COMMENT '标题',
`content` text NOT NULL COMMENT '内容',
`image` varchar(100) NOT NULL DEFAULT '' COMMENT '图片',
... ... @@ -405,7 +337,14 @@ CREATE TABLE `fa_test` (
`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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='测试表';
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='测试表';
-- ----------------------------
-- 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`
... ...
... ... @@ -58,7 +58,7 @@ class Min extends Command
{
if (IS_WIN)
{
throw new Exception("node environment require nodejs!please check http://doc.fastadmin.net/322813 !");
throw new Exception("node environment not found!please check http://doc.fastadmin.net/faq.html !");
}
try
... ...
<?php
use app\common\model\Category;
use app\common\model\Configvalue;
use fast\Form;
use fast\Tree;
use think\Db;
/**
* 重新生成上传的参数配置
* @param array $params
* @return string
*/
function get_upload_multipart($params = [])
{
// 加载配置
$configvalue = new Configvalue;
// 上传参数配置配置
$uploadcfg = $configvalue->upload($params);
return json_encode(isset($uploadcfg['multipart']) ? $uploadcfg['multipart'] : []);
}
/**
* 生成下拉列表
* @param string $name
* @param mixed $options
... ...
... ... @@ -4,7 +4,6 @@ namespace app\admin\controller;
use app\common\controller\Backend;
use fast\Random;
use fast\Tree;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use think\Cache;
... ... @@ -23,114 +22,12 @@ class Ajax extends Backend
protected $noNeedRight = ['*'];
protected $layout = '';
/**
* 自动完成
*/
public function typeahead()
public function _initialize()
{
$search = $this->request->get("search");
$field = $this->request->get("field");
$field = str_replace(['row[', ']'], '', $field);
if (substr($field, -3) !== '_id' && substr($field, -4) !== '_ids')
{
$this->code = -1;
return;
}
$searchfield = 'name';
$fieldArr = explode('_', $field);
$field = $fieldArr[0];
switch ($field)
{
case 'category':
$field = 'category';
$searchfield = 'name';
break;
case 'user':
$searchfield = 'nickname';
break;
}
$searchlist = Db::name($field)
->whereOr($searchfield, 'like', "%{$search}%")
->whereOr('id', 'like', "%{$search}%")
->limit(10)
->field("id,{$searchfield} AS name")
->select();
$this->code = 1;
$this->data = ['searchlist' => $searchlist];
}
/**
* SelectPage通用下拉列表搜索
*/
public function selectpage()
{
//搜索关键词,客户端输入以空格分开,这里接收为数组
$word = $this->request->request("q_word/a");
//当前页
$page = $this->request->request("pageNumber");
//分页大小
$pagesize = $this->request->request("pageSize");
//搜索条件
$andor = $this->request->request("and_or");
//排序方式
$orderby = $this->request->request("order_by/a");
//表名
$table = $this->request->request("db_table");
//显示的字段
$field = $this->request->request("field");
//主键
$primarykey = $this->request->request("pkey_name");
//主键值
$primaryvalue = $this->request->request("pkey_value");
//搜索字段
$searchfield = $this->request->request("search_field/a");
//自定义搜索条件
$custom = $this->request->request("custom/a");
$order = [];
foreach ($orderby as $k => $v)
{
$order[$v[0]] = $v[1];
}
$field = $field ? $field : 'name';
//如果不使用ajax/selectpage这个页面提供结果,则是自己的控制器单独写搜索条件,$where按自己的需求写即可
//这里只是能用考虑,所以搜索条件写得比较复杂
//如果有primaryvalue,说明当前是初始化传值
if ($primaryvalue)
{
$where = [$primarykey => ['in', $primaryvalue]];
}
else
{
$where = function($query) use($word, $andor, $field, $searchfield, $custom) {
$where = $andor == "OR" ? "whereOr" : "where";
foreach ($word as $k => $v)
{
foreach ($searchfield as $m => $n)
{
$query->{$where}($n, "like", "%{$v}%");
}
}
if ($custom && is_array($custom))
{
foreach ($custom as $k => $v)
{
$query->where($k, '=', $v);
}
}
};
}
$list = [];
$total = Db::name($table)->where($where)->count();
if ($total > 0)
{
$list = Db::name($table)->where($where)->order($order)->page($page, $pagesize)->field("{$primarykey},{$field}")->select();
}
parent::_initialize();
//这里一定要返回有list这个字段,total是可选的,如果total<=list的数量,则会隐藏分页按钮
return json(['list' => $list, 'total' => $total]);
//设置过滤方法
$this->request->filter(['strip_tags', 'htmlspecialchars']);
}
/**
... ... @@ -148,87 +45,6 @@ class Ajax extends Backend
}
/**
* 读取角色权限树
*/
public function roletree()
{
$this->loadlang('auth/group');
$model = model('AuthGroup');
$id = $this->request->post("id");
$pid = $this->request->post("pid");
$parentgroupmodel = $model->get($pid);
$currentgroupmodel = NULL;
if ($id)
{
$currentgroupmodel = $model->get($id);
}
if (($pid || $parentgroupmodel) && (!$id || $currentgroupmodel))
{
$id = $id ? $id : NULL;
$ruleList = collection(model('AuthRule')->order('weigh', 'desc')->select())->toArray();
//读取父类角色所有节点列表
$parentRuleList = [];
if (in_array('*', explode(',', $parentgroupmodel->rules)))
{
$parentRuleList = $ruleList;
}
else
{
$parent_rule_ids = explode(',', $parentgroupmodel->rules);
foreach ($ruleList as $k => $v)
{
if (in_array($v['id'], $parent_rule_ids))
{
$parentRuleList[] = $v;
}
}
}
//当前所有正常规则列表
Tree::instance()->init($ruleList);
//读取当前角色下规则ID集合
$admin_rule_ids = $this->auth->getRuleIds();
//是否是超级管理员
$superadmin = $this->auth->isSuperAdmin();
//当前拥有的规则ID集合
$current_rule_ids = $id ? explode(',', $currentgroupmodel->rules) : [];
if (!$id || !in_array($pid, Tree::instance()->getChildrenIds($id, TRUE)))
{
$ruleList = Tree::instance()->getTreeList(Tree::instance()->getTreeArray(0), 'name');
$hasChildrens = [];
foreach ($ruleList as $k => $v)
{
if ($v['haschild'])
$hasChildrens[] = $v['id'];
}
$nodelist = [];
foreach ($parentRuleList as $k => $v)
{
if (!$superadmin && !in_array($v['id'], $admin_rule_ids))
continue;
$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;
}
else
{
$this->code = -1;
$this->data = __('Can not change the parent to child');
}
}
else
{
$this->code = -1;
$this->data = __('Group not found');
}
}
/**
* 上传文件
*/
public function upload()
... ... @@ -337,6 +153,8 @@ class Ajax extends Backend
$ids = explode(',', $ids);
$prikey = 'id';
$pid = $this->request->post("pid");
//限制更新的字段
$field = in_array($field, ['weigh']) ? $field : 'weigh';
// 如果设定了pid的值,此时只匹配满足条件的ID,其它忽略
if ($pid !== '')
... ... @@ -430,7 +248,7 @@ class Ajax extends Backend
}
/**
* 读取分类数据
* 读取分类数据,联动列表
*/
public function category()
{
... ... @@ -457,7 +275,7 @@ class Ajax extends Backend
}
/**
* 读取省市区数据
* 读取省市区数据,联动列表
*/
public function area()
{
... ...
... ... @@ -17,10 +17,12 @@ class Category extends Backend
protected $model = null;
protected $categorylist = [];
protected $noNeedRight = ['selectpage'];
public function _initialize()
{
parent::_initialize();
$this->request->filter(['strip_tags']);
$this->model = model('Category');
$tree = Tree::instance();
... ... @@ -54,4 +56,14 @@ class Category extends Backend
return $this->view->fetch();
}
/**
* Selectpage搜索
*
* @internal
*/
public function selectpage()
{
return parent::selectpage();
}
}
... ...
... ... @@ -14,6 +14,7 @@ class Page extends Backend
{
protected $model = null;
protected $relationSearch = true;
public function _initialize()
{
... ... @@ -21,4 +22,30 @@ class Page extends Backend
$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');
}
}
... ...
... ... @@ -22,4 +22,5 @@ class Version extends Backend
parent::_initialize();
$this->model = model('Version');
}
}
... ...
... ... @@ -19,6 +19,8 @@ class Group extends Backend
protected $childrenIds = [];
//当前组别列表数据
protected $groupdata = [];
//无需要权限判断的方法
protected $noNeedRight = ['roletree'];
public function _initialize()
{
... ... @@ -78,7 +80,7 @@ class Group extends Backend
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
$params = $this->request->post("row/a", [], 'strip_tags');
$params['rules'] = explode(',', $params['rules']);
if (!in_array($params['pid'], $this->childrenIds))
{
... ... @@ -124,7 +126,7 @@ class Group extends Backend
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
$params = $this->request->post("row/a", [], 'strip_tags');
// 父节点不能是它自身的子节点
if (!in_array($params['pid'], $this->childrenIds))
{
... ... @@ -171,8 +173,7 @@ class Group extends Backend
{
$ids = explode(',', $ids);
$grouplist = $this->auth->getGroups();
$group_ids = array_map(function($group)
{
$group_ids = array_map(function($group) {
return $group['id'];
}, $grouplist);
// 移除掉当前管理员所在组别
... ... @@ -223,4 +224,87 @@ class Group extends Backend
return;
}
/**
* 读取角色权限树
*
* @internal
*/
public function roletree()
{
$this->loadlang('auth/group');
$model = model('AuthGroup');
$id = $this->request->post("id");
$pid = $this->request->post("pid");
$parentgroupmodel = $model->get($pid);
$currentgroupmodel = NULL;
if ($id)
{
$currentgroupmodel = $model->get($id);
}
if (($pid || $parentgroupmodel) && (!$id || $currentgroupmodel))
{
$id = $id ? $id : NULL;
$ruleList = collection(model('AuthRule')->order('weigh', 'desc')->select())->toArray();
//读取父类角色所有节点列表
$parentRuleList = [];
if (in_array('*', explode(',', $parentgroupmodel->rules)))
{
$parentRuleList = $ruleList;
}
else
{
$parent_rule_ids = explode(',', $parentgroupmodel->rules);
foreach ($ruleList as $k => $v)
{
if (in_array($v['id'], $parent_rule_ids))
{
$parentRuleList[] = $v;
}
}
}
//当前所有正常规则列表
Tree::instance()->init($ruleList);
//读取当前角色下规则ID集合
$admin_rule_ids = $this->auth->getRuleIds();
//是否是超级管理员
$superadmin = $this->auth->isSuperAdmin();
//当前拥有的规则ID集合
$current_rule_ids = $id ? explode(',', $currentgroupmodel->rules) : [];
if (!$id || !in_array($pid, Tree::instance()->getChildrenIds($id, TRUE)))
{
$ruleList = Tree::instance()->getTreeList(Tree::instance()->getTreeArray(0), 'name');
$hasChildrens = [];
foreach ($ruleList as $k => $v)
{
if ($v['haschild'])
$hasChildrens[] = $v['id'];
}
$nodelist = [];
foreach ($parentRuleList as $k => $v)
{
if (!$superadmin && !in_array($v['id'], $admin_rule_ids))
continue;
$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;
}
else
{
$this->code = -1;
$this->data = __('Can not change the parent to child');
}
}
else
{
$this->code = -1;
$this->data = __('Group not found');
}
}
}
... ...
... ... @@ -61,7 +61,7 @@ class Rule extends Backend
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
$params = $this->request->post("row/a", [], 'strip_tags');
if ($params)
{
if (!$params['ismenu'] && !$params['pid'])
... ... @@ -90,7 +90,7 @@ class Rule extends Backend
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
$params = $this->request->post("row/a", [], 'strip_tags');
if ($params)
{
if (!$params['ismenu'] && !$params['pid'])
... ...
... ... @@ -25,6 +25,8 @@ class Multitable extends Backend
*/
public function index()
{
$this->loadlang('general/attachment');
$this->loadlang('general/crontab');
return $this->view->fetch();
}
... ...
... ... @@ -2,8 +2,10 @@
namespace app\admin\controller\general;
use app\common\library\Email;
use app\common\controller\Backend;
use app\common\library\Email;
use app\common\model\Config as ConfigModel;
use think\Exception;
/**
* 系统配置
... ... @@ -25,7 +27,7 @@ class Config extends Backend
public function index()
{
$siteList = [];
$groupList = \app\admin\model\Config::getGroupList();
$groupList = ConfigModel::getGroupList();
foreach ($groupList as $k => $v)
{
$siteList[$k]['name'] = $k;
... ... @@ -58,8 +60,8 @@ class Config extends Backend
$index++;
}
$this->view->assign('siteList', $siteList);
$this->view->assign('typeList', \app\admin\model\Config::getTypeList());
$this->view->assign('groupList', \app\admin\model\Config::getGroupList());
$this->view->assign('typeList', ConfigModel::getTypeList());
$this->view->assign('groupList', ConfigModel::getGroupList());
return $this->view->fetch();
}
... ... @@ -116,7 +118,7 @@ class Config extends Backend
$this->msg = $this->model->getError();
}
}
catch (think\Exception $e)
catch (Exception $e)
{
$this->msg = $e->getMessage();
}
... ...
<?php
namespace app\admin\controller\general;
use app\common\controller\Backend;
/**
* 基本配置
*
* @icon fa fa-cog
* @remark 用于管理一些字典数据,通常以键值格式进行录入,保存的数据格式为JSON
* @internal
*/
class Configvalue extends Backend
{
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = model('Configvalue');
}
/**
* 查看
*/
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();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
/**
* 添加
*/
public function add()
{
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
if ($params)
{
if ($this->request->has('field'))
{
//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['content'] = array_combine($fieldarr, $valuearr);
}
$this->model->save($params);
$this->code = 1;
}
return;
}
return $this->view->fetch();
}
/**
* 编辑
*/
public function edit($ids = NULL)
{
$row = $this->model->get(['id' => $ids]);
if (!$row)
$this->error(__('No Results were found'));
// 状态为locked时不允许编辑
if ($row['status'] == 'locked')
$this->error(__('The current item can not be edited'));
if ($this->request->isPost())
{
$this->code = -1;
$params = $this->request->post("row/a");
if ($params)
{
if ($this->request->has('field'))
{
//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['content'] = array_combine($fieldarr, $valuearr);
}
$row->save($params);
$this->code = 1;
}
return;
}
$this->view->assign("row", $row);
return $this->view->fetch();
}
}
... ... @@ -28,14 +28,6 @@ class Database extends Backend
$tables[] = ['name' => reset($row), 'rows' => 0];
}
$data['tables'] = $tables;
/*
$one = Db::table('configvalue')->where('name', 'sql')->find();
$saved_sql = [];
if ($one && $one['content'])
$saved_sql = explode('###', $one['content']);
$data['saved_sql'] = array_values(array_filter($saved_sql));
* */
$data['saved_sql'] = [];
$this->view->assign($data);
return $this->view->fetch();
... ...
... ... @@ -5,5 +5,6 @@ return [
'The parent group can not found' => '父组别未找到',
'Group not found' => '组别未找到',
'Can not change the parent to child' => '父组别不能是它的子组别',
'Can not change the parent to self' => '父组别不能是它的子组别',
'You can not delete group that contain child group and administrators' => '你不能删除含有子组和管理员的组',
];
... ...
<?php
return [
'Pid' => '父ID',
'Type' => '栏目类型',
'Image' => '图片',
'Keywords' => '关键字',
'Description' => '描述',
'Diyname' => '自定义名称',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
'Weigh' => '权重',
'Status' => '状态'
'Id' => 'ID',
'Pid' => '父ID',
'Type' => '栏目类型',
'Image' => '图片',
'Keywords' => '关键字',
'Description' => '描述',
'Diyname' => '自定义名称',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
'Weigh' => '权重',
'Status' => '状态'
];
... ...
<?php
return [
'name' => '变量名称',
'intro' => '描述',
'group' => '分组',
'type' => '类型',
'value' => '变量值'
'name' => '变量名称',
'intro' => '描述',
'group' => '分组',
'type' => '类型',
'value' => '变量值'
];
... ...
... ... @@ -2,6 +2,7 @@
return [
'Title' => '标题',
'Search menu' => '搜索菜单',
'Layout Options' => '布局设定',
'Fixed Layout' => '固定布局',
'You can\'t use fixed and boxed layouts together' => '盒子模型和固定布局不能同时启作用',
... ...
... ... @@ -3,6 +3,7 @@
return [
'id' => 'ID',
'category_id' => '分类ID',
'category' => '分类',
'title' => '标题',
'keywords' => '关键字',
'flag' => '标志',
... ...
... ... @@ -288,10 +288,12 @@ class Auth extends \fast\Auth
$select_id = $v['name'] == $activeUrl ? $v['id'] : $select_id;
$v['url'] = $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']);
}
// 构造菜单数据
Tree::instance()->init($ruleList);
$menu = Tree::instance()->getTreeMenu(0, '<li class="@class"><a href="@url" addtabs="@id" url="@url"><i class="@icon"></i> <span>@title</span> <span class="pull-right-container">@caret @badge</span></a> @childlist</li>', $select_id, '', 'ul', 'class="treeview-menu"');
$menu = Tree::instance()->getTreeMenu(0, '<li class="@class"><a href="@url" addtabs="@id" url="@url" py="@py" pinyin="@pinyin"><i class="@icon"></i> <span>@title</span> <span class="pull-right-container">@caret @badge</span></a> @childlist</li>', $select_id, '', 'ul', 'class="treeview-menu"');
return $menu;
}
... ...
... ... @@ -10,8 +10,15 @@ trait Backend
*/
public function index()
{
//设置过滤方法
$this->request->filter(['strip_tags', 'htmlspecialchars']);
if ($this->request->isAjax())
{
//如果发送的来源是Selectpage,则转发到Selectpage
if ($this->request->request('pkey_name'))
{
return $this->selectpage();
}
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$total = $this->model
->where($where)
... ...
<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>
... ...
<!-- Logo -->
<a href="javascript:;" class="logo">
<!-- 迷你模式下Logo的大小为50X50 -->
<span class="logo-mini">{$site.name|mb_substr=0,4|strtoupper}</span>
<span class="logo-mini">{$site.name|mb_substr=0,4,'utf-8'|strtoupper}</span>
<!-- 普通模式下Logo -->
<span class="logo-lg"><b>{$site.name|mb_substr=0,4}</b>{$site.name|mb_substr=4}</span>
<span class="logo-lg"><b>{$site.name|mb_substr=0,4,'utf-8'}</b>{$site.name|mb_substr=4,null,'utf-8'}</span>
</a>
<!-- 顶部通栏样式 -->
<nav class="navbar navbar-static-top">
... ...
... ... @@ -10,11 +10,18 @@
<i class="fa fa-circle text-success"></i> {:__('Online')}
</div>
</div>
<!-- search form -->
<form action="#" method="get" class="sidebar-form hidden-xs" style="overflow:visible;border:none;">
<select class="form-control fastmenujump btn">
<option value="">{:__('Shortcut')}</option>
</select>
<form action="" method="get" class="sidebar-form" onsubmit="return false;">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="{:__('Search menu')}">
<span class="input-group-btn">
<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
</button>
</span>
<div class="menuresult list-group sidebar-form hide">
</div>
</div>
</form>
<!-- /.search form -->
... ...
... ... @@ -295,8 +295,8 @@
<h5>文章统计</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">1234</h1>
<div class="stat-percent font-bold text-gray"><i class="fa fa-modx"></i> 1234</div>
<h1 class="no-margins">1043</h1>
<div class="stat-percent font-bold text-gray"><i class="fa fa-modx"></i> 2592</div>
<small>总文章数</small>
</div>
</div>
... ... @@ -318,8 +318,8 @@
<div class="font-bold text-navy"><i class="fa fa-commenting"></i> <small>总评论数</small></div>
</div>
<div class="col-md-6">
<h1 class="no-margins">1234</h1>
<div class="font-bold text-navy"><i class="fa fa-heart"></i> <small>总动态评论点赞数</small></div>
<h1 class="no-margins">6754</h1>
<div class="font-bold text-navy"><i class="fa fa-heart"></i> <small>总评论点赞数</small></div>
</div>
</div>
</div>
... ... @@ -337,11 +337,11 @@
<div class="row">
<div class="col-md-6">
<h1 class="no-margins">1234</h1>
<h1 class="no-margins">5302</h1>
<div class="font-bold text-navy"><i class="fa fa-commenting"></i> <small>总评论数</small></div>
</div>
<div class="col-md-6">
<h1 class="no-margins">1234</h1>
<h1 class="no-margins">8205</h1>
<div class="font-bold text-navy"><i class="fa fa-user"></i> <small>总参与人数</small></div>
</div>
</div>
... ...
<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>
... ...
... ... @@ -126,7 +126,7 @@
<tr>
<td></td>
<td>
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</td>
<td></td>
... ... @@ -205,7 +205,7 @@ key2|value2</textarea>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-4">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</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()}
<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>
... ...
<form id="add-form" class="form-horizontal form-ajax" 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>
<label for="c-category_id" class="control-label col-xs-12 col-sm-2">{:__('Category')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-category_id" class="form-control selectpage" data-db-table="category" data-params='{"custom[type]":"page"}' name="row[category_id]" type="text" value="" data-rule="required">
<input id="c-category_id" class="form-control selectpage" data-source="category/selectpage" data-params='{"custom[type]":"page"}' name="row[category_id]" type="text" value="" data-rule="required">
</div>
</div>
<div class="form-group">
... ...
<form id="edit-form" class="form-horizontal form-ajax" 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>
<label for="c-category_id" class="control-label col-xs-12 col-sm-2">{:__('Category')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-category_id" class="form-control selectpage" data-db-table="category" data-params='{"custom[type]":"page"}' name="row[category_id]" type="text" value="{$row.category_id}" data-rule="required">
<input id="c-category_id" class="form-control selectpage" data-source="category/selectpage" data-params='{"custom[type]":"page"}' name="row[category_id]" type="text" value="{$row.category_id}" data-rule="required">
</div>
</div>
<div class="form-group">
... ...
<?php
use app\common\model\Configvalue;
use think\Lang;
// 公共助手函数
... ... @@ -65,19 +64,3 @@ if (!function_exists('datetime'))
}
}
if (!function_exists('configvalue'))
{
/**
* 获取后台动态定义的配置
* @param string $id ID
* @return array
*/
function configvalue($id)
{
$data = Configvalue::get($id);
return $data ? $data->content : null;
}
}
... ...
... ... @@ -3,7 +3,6 @@
namespace app\common\controller;
use app\admin\library\Auth;
use app\common\model\Configvalue;
use think\Config;
use think\Controller;
use think\Lang;
... ... @@ -78,7 +77,7 @@ class Backend extends Controller
* 是否开启模型场景验证
*/
protected $modelSceneValidate = false;
/**
* Multi方法可批量修改的字段
*/
... ... @@ -160,7 +159,7 @@ class Backend extends Controller
// 配置信息
$config = [
'site' => array_intersect_key($site, array_flip(['name', 'cdnurl', 'version', 'timezone', 'languages'])),
'upload' => Configvalue::upload(),
'upload' => \app\common\model\Config::upload(),
'modulename' => $modulename,
'controllername' => $controllername,
'actionname' => $actionname,
... ... @@ -177,7 +176,7 @@ class Backend extends Controller
$this->assign('admin', Session::get('admin'));
}
/**
* 加载语言文件
* @param string $name
... ... @@ -291,6 +290,85 @@ class Backend extends Controller
}
/**
* Selectpage的实现方法
*
* 当前方法只是一个比较通用的搜索匹配,请按需重载此方法来编写自己的搜索逻辑,$where按自己的需求写即可
* 这里示例了所有的参数,所以比较复杂,实现上自己实现只需简单的几行即可
*
*/
protected function selectpage()
{
//设置过滤方法
$this->request->filter(['strip_tags', 'htmlspecialchars']);
//搜索关键词,客户端输入以空格分开,这里接收为数组
$word = (array) $this->request->request("q_word/a");
//当前页
$page = $this->request->request("page");
//分页大小
$pagesize = $this->request->request("page_size");
//搜索条件
$andor = $this->request->request("and_or");
//排序方式
$orderby = (array) $this->request->request("order_by/a");
//显示的字段
$field = $this->request->request("field");
//主键
$primarykey = $this->request->request("pkey_name");
//主键值
$primaryvalue = $this->request->request("pkey_value");
//搜索字段
$searchfield = (array) $this->request->request("search_field/a");
//自定义搜索条件
$custom = (array) $this->request->request("custom/a");
$order = [];
foreach ($orderby as $k => $v)
{
$order[$v[0]] = $v[1];
}
$field = $field ? $field : 'name';
//如果有primaryvalue,说明当前是初始化传值
if ($primaryvalue)
{
$where = [$primarykey => ['in', $primaryvalue]];
}
else
{
$where = function($query) use($word, $andor, $field, $searchfield, $custom) {
foreach ($word as $k => $v)
{
foreach ($searchfield as $m => $n)
{
$query->where($n, "like", "%{$v}%", $andor);
}
}
if ($custom && is_array($custom))
{
foreach ($custom as $k => $v)
{
$query->where($k, '=', $v);
}
}
};
}
$list = [];
$total = $this->model->where($where)->count();
if ($total > 0)
{
$list = $this->model->where($where)
->order($order)
->page($page, $pagesize)
->field("{$primarykey},{$field}")
->field("password,salt", true)
->select();
}
//这里一定要返回有list这个字段,total是可选的,如果total<=list的数量,则会隐藏分页按钮
return json(['list' => $list, 'total' => $total]);
}
/**
* 析构方法
*
*/
... ... @@ -299,7 +377,13 @@ class Backend extends Controller
//判断是否设置code值,如果有则变动response对象的正文
if (!is_null($this->code))
{
$this->result($this->data, $this->code, $this->msg, 'json');
$result = [
'code' => $this->code,
'msg' => $this->msg,
'time' => $_SERVER['REQUEST_TIME'],
'data' => $this->data,
];
echo json_encode($result);
}
}
... ...
... ... @@ -3,7 +3,6 @@
namespace app\common\controller;
use app\common\library\Auth;
use app\common\model\Configvalue;
use think\Config;
use think\Controller;
use think\Lang;
... ... @@ -50,6 +49,8 @@ class Frontend extends Controller
public function _initialize()
{
//移除HTML标签
$this->request->filter('strip_tags');
$modulename = $this->request->module();
$controllername = strtolower($this->request->controller());
$actionname = strtolower($this->request->action());
... ... @@ -67,13 +68,7 @@ class Frontend extends Controller
// 检测是否需要验证登录
if (!$this->user->match($this->noNeedLogin))
{
//检测是否登录
if (!$this->user->isLogin())
{
$url = Session::get('referer');
$url = $url ? $url : $this->request->url();
$this->error(__('Please login first'), url('/user/login', ['url' => $url]));
}
$this->checkLogin();
}
// 将auth对象渲染至视图
... ... @@ -92,12 +87,12 @@ class Frontend extends Controller
// 配置信息
$config = [
'site' => array_intersect_key($site, array_flip(['name', 'cdnurl', 'version', 'timezone', 'languages'])),
'upload' => Configvalue::upload(),
'upload' => \app\common\model\Config::upload(),
'modulename' => $modulename,
'controllername' => $controllername,
'actionname' => $actionname,
'jsname' => 'frontend/' . str_replace('.', '/', $controllername),
'moduleurl' => url("/{$modulename}", '', false),
'moduleurl' => rtrim(url("/{$modulename}", '', false), '/'),
'language' => $lang
];
$this->loadlang($controllername);
... ... @@ -105,6 +100,17 @@ class Frontend extends Controller
$this->assign('config', $config);
}
protected function checkLogin()
{
//检测是否登录
if (!$this->user->isLogin())
{
$url = Session::get('referer');
$url = $url ? $url : $this->request->url();
$this->error(__('Please login first'), url('/user/login', ['url' => $url]));
}
}
/**
* 加载语言文件
* @param string $name
... ...
... ... @@ -103,7 +103,7 @@ abstract class Uc extends Controller
return false;
}
$timestamp = time();
if ($timestamp - $get['time'] > 36001111)
if ($timestamp - $get['time'] > 3600)
{
$this->error = '请求有效期已过';
return false;
... ...
<?php
namespace app\common\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;
}
/**
* 加载上传配置
*
* @param array $params 扩展参数,常用字段savekey,mimetype,maxsize,ext-param,notify-url,return-url<br>
* 更多字段可参考http://docs.upyun.com/api/form_api/#_2
*
* @return array
*/
public static function upload($params = [])
{
$uploadcfg = config('upload');
$uploadcfg = $uploadcfg ? $uploadcfg : [];
$uploadcfg = array_merge($uploadcfg, $params);
$uploadcfg['bucket'] = isset($uploadcfg['bucket']) ? $uploadcfg['bucket'] : '';
$multiple = isset($uploadcfg['multiple']) ? $uploadcfg['multiple'] : false;
$savekey = isset($uploadcfg['savekey']) ? $uploadcfg['savekey'] : '';
$uploadcfg['save-key'] = isset($uploadcfg['save-key']) ? $uploadcfg['save-key'] : $savekey;
$expiration = time() + (isset($uploadcfg['expire']) ? $uploadcfg['expire'] : 600);
$uploadcfg['expiration'] = isset($uploadcfg['expiration']) ? $uploadcfg['expiration'] : $expiration;
$notifyurl = isset($uploadcfg['notifyurl']) ? $uploadcfg['notifyurl'] : '';
$returnurl = isset($uploadcfg['returnurl']) ? $uploadcfg['returnurl'] : '';
if ($notifyurl)
$uploadcfg['notify-url'] = $notifyurl;
else
unset($uploadcfg['notify-url']);
if ($returnurl)
$uploadcfg['return-url'] = $returnurl;
else
unset($uploadcfg['return-url']);
//设置允许的附加字段
$allowfields = [
'bucket', 'save-key', 'expiration', 'date', 'content-md5', 'notify-url', 'return-url', 'content-secret', 'content-type', 'allow-file-type', 'content-length-range',
'image-width-range', 'image-height-range', 'x-gmkerl-thumb', 'x-gmkerl-type', 'apps', 'b64encoded', 'ext-param'
];
$params = array_intersect_key($uploadcfg, array_flip($allowfields));
$policy = base64_encode(json_encode($params));
$signature = md5($policy . '&' . (isset($uploadcfg['formkey']) ? $uploadcfg['formkey'] : ''));
$multipart = [
'policy' => $policy,
'signature' => $signature,
];
$multipart = array_merge($multipart, $params);
return [
'cdnurl' => isset($uploadcfg['cdnurl']) ? $uploadcfg['cdnurl'] : '',
'uploadurl' => isset($uploadcfg['uploadurl']) ? $uploadcfg['uploadurl'] : url('ajax/upload'),
'bucket' => $uploadcfg['bucket'],
'maxsize' => isset($uploadcfg['maxsize']) ? $uploadcfg['maxsize'] : '',
'mimetype' => isset($uploadcfg['mimetype']) ? $uploadcfg['mimetype'] : '',
'multipart' => $multipart,
'multiple' => $multiple,
];
}
}
... ...
... ... @@ -13,4 +13,8 @@ class Page extends Model
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
public function category()
{
return $this->belongsTo('Category', 'category_id')->setEagerlyType(0);
}
}
... ...
... ... @@ -37,6 +37,7 @@ class Ajax extends Frontend
*/
public function upload()
{
$this->checkLogin();
$this->code = -1;
$file = $this->request->file('file');
... ...
<?php
namespace app\index\controller;
use app\common\controller\Frontend;
use app\common\library\Email;
use app\common\library\Sms as Smslib;
use app\common\model\User;
use think\Session;
/**
* 短信控制器
*/
class Sms extends Frontend
{
/**
* 发送验证码
*
* 必选参数:mobile,type<br>
* 可选参数:无
*/
public function send()
{
$this->code = -1;
$mobile = $this->request->post("mobile");
$type = $this->request->post("type");
$type = $type ? $type : 'register';
$last = Smslib::get($mobile, $type);
if ($last && time() - $last['createtime'] < 60)
{
//发送频繁
$this->msg = __('SMS sent frequently');
return;
}
if ($type)
{
$userinfo = User::getByMobile($mobile);
if ($type == 'register' && $userinfo)
{
//注册账号
$this->msg = __('The phone number already exists');
return;
}
else if ($type == 'changepwd' && !$userinfo)
{
//修改密码
$this->msg = __('The phone number not exists');
return;
}
else if (in_array($type, ['changemobile', 'bindmobile']) && $userinfo)
{
//修改手机号
$this->msg = __('The phone number already exists');
return;
}
}
$ret = Smslib::send($mobile, '', $type);
if ($ret)
{
$this->code = 1;
$this->msg = "发送成功";
}
else
{
$this->msg = __('Send failed, please try again later');
}
return;
}
/**
* 检测验证码
*
* 必选参数:mobile,type,captchacode<br>
* 可选参数:无
*/
public function check()
{
$this->code = -1;
$mobile = $this->request->post("mobile");
$type = $this->request->post("type");
$type = $type ? $type : 'register';
$captchacode = $this->request->post("captchacode");
if ($type)
{
$userinfo = User::getByMobile($mobile);
if ($type == 'register' && $userinfo)
{
//注册账号
$this->msg = __('The phone number already exists');
return;
}
else if ($type == 'changepwd' && !$userinfo)
{
//修改密码
$this->msg = __('The phone number note exists');
return;
}
else if (in_array($type, ['changemobile', 'bindmobile']) && $userinfo)
{
//修改手机号
$this->msg = __('The phone number already exists');
return;
}
}
$ret = Smslib::check($mobile, $captchacode, $type);
if ($ret)
{
$this->code = 1;
}
else
{
$this->msg = __('The captcha code not correct');
}
return;
}
public function sendemail()
{
$this->code = -1;
$email = $this->request->post("email");
$type = $this->request->post("type");
$type = $type ? $type : 'register';
$name = "email{$type}";
$session = session($name);
if (!$session)
{
if (time() - $session['time'] < 120)
{
$this->msg = "发送邮箱验证码过于频繁";
return;
}
}
if (Smslib::sendemail($email, '', $type))
{
$this->code = 1;
$this->msg = "发送成功";
}
else
{
$this->msg = "发送邮件失败!请稍后重试!";
}
}
public function checkemail()
{
$this->code = -1;
$email = $this->request->post("email");
$type = $this->request->post("type");
$type = $type ? $type : 'register';
$ret = Smslib::checkemail($email, $captchacode, $type);
if ($ret)
{
$this->code = 1;
}
else
{
$this->msg = __('The captcha code not correct');
}
}
}
... ...
... ... @@ -40,7 +40,7 @@ class Ucenter extends Uc
/**
* 删除用户
*/
function deleteuser()
protected function deleteuser()
{
$uids = $this->get['ids'];
$uids = is_array($uids) ? $uids : explode(',', $uids);
... ... @@ -54,7 +54,7 @@ class Ucenter extends Uc
/**
* 获取标签
*/
function gettag()
protected function gettag()
{
$name = $this->get['id'];
if (!API_GETTAG)
... ... @@ -82,7 +82,7 @@ class Ucenter extends Uc
/**
* 同步注册
*/
function synregister()
protected function synregister()
{
$uid = $this->get['uid'];
$username = $this->get['username'];
... ... @@ -102,7 +102,7 @@ class Ucenter extends Uc
/**
* 同步登录
*/
function synlogin()
protected function synlogin()
{
$uid = $this->get['uid'];
$username = $this->get['username'];
... ... @@ -119,7 +119,7 @@ class Ucenter extends Uc
/**
* 同步退出
*/
function synlogout()
protected function synlogout()
{
if (!API_SYNLOGOUT)
{
... ... @@ -135,7 +135,7 @@ class Ucenter extends Uc
/**
* 添加用户
*/
function adduser()
protected function adduser()
{
$uid = $this->get['uid'];
$username = $this->get['username'];
... ... @@ -167,7 +167,7 @@ class Ucenter extends Uc
/**
* 更新用户信息,包含用户名,密码,邮箱,手机号和其它扩展信息
*/
function updateinfo()
protected function updateinfo()
{
if (!API_UPDATEINFO)
{
... ... @@ -211,7 +211,7 @@ class Ucenter extends Uc
/**
* 更新禁言文字
*/
function updatebadwords()
protected function updatebadwords()
{
if (!API_UPDATEBADWORDS)
{
... ... @@ -238,7 +238,7 @@ class Ucenter extends Uc
/**
* 更新HOSTS
*/
function updatehosts()
protected function updatehosts()
{
if (!API_UPDATEHOSTS)
{
... ... @@ -256,7 +256,7 @@ class Ucenter extends Uc
/**
* 更新App信息
*/
function updateapps()
protected function updateapps()
{
if (!API_UPDATEAPPS)
{
... ... @@ -291,7 +291,7 @@ class Ucenter extends Uc
/**
* 更新客户端配置文件
*/
function updateclient()
protected function updateclient()
{
if (!API_UPDATECLIENT)
{
... ... @@ -309,7 +309,7 @@ class Ucenter extends Uc
/**
* 更新积分
*/
function updatecredit()
protected function updatecredit()
{
if (!API_UPDATECREDIT)
{
... ... @@ -324,7 +324,7 @@ class Ucenter extends Uc
/**
* 获取积分
*/
function getcredit()
protected function getcredit()
{
if (!API_GETCREDIT)
{
... ... @@ -335,7 +335,7 @@ class Ucenter extends Uc
/**
* 获取积分配置
*/
function getcreditsettings()
protected function getcreditsettings()
{
if (!API_GETCREDITSETTINGS)
{
... ... @@ -351,7 +351,7 @@ class Ucenter extends Uc
/**
* 更新积分配置
*/
function updatecreditsettings()
protected function updatecreditsettings()
{
if (!API_UPDATECREDITSETTINGS)
{
... ...
<?php
return [
'SMS sent frequently' => '短信发送频繁',
'The phone number already exists' => '手机号已经存在',
'The phone number note exists' => '手机号不存在',
'The captcha code not correct' => '验证码不正确',
'Send failed, please try again later' => '发送失败,请稍后重试',
];
... ...
... ... @@ -10,6 +10,10 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
//如果有定义绑定后台模块则禁用路由规则
if (defined('BIND_MODULE') && BIND_MODULE == 'admin')
return [];
return [
//别名配置,别名只能是映射到控制器且访问时必须加上请求的方法
// '__alias__' => [
... ...
... ... @@ -14,11 +14,12 @@ class Pinyin
/**
* 获取文字的拼音
* @param string $chinese 中文汉字
* @param boolean $ucfirst 是否首字母大写
* @param boolean $onlyfirst 是否只返回拼音首字母
* @param string $delimiter 分隔符
* @param string $charset 文字编码
* @return string
*/
public static function get($chinese, $ucfirst = false, $charset = 'utf-8')
public static function get($chinese, $onlyfirst = false, $delimiter = '', $ucfirst = false, $charset = 'utf-8')
{
$keys_a = explode('|', self::$keys);
$values_a = explode('|', self::$values);
... ... @@ -36,7 +37,12 @@ class Pinyin
$_Q = ord(substr($chinese, ++$i, 1));
$_P = $_P * 256 + $_Q - 65536;
}
$result .= ($ucfirst ? ucfirst(self::_pinyin($_P, $data)) : self::_pinyin($_P, $data));
$result .= ($onlyfirst ? substr(self::_pinyin($_P, $data), 0, 1) : self::_pinyin($_P, $data));
$result .= $delimiter;
}
if ($delimiter)
{
$result = rtrim($result, $delimiter);
}
return preg_replace("/[^a-z0-9_\-]*/i", '', $result);
... ...
... ... @@ -50,12 +50,6 @@ body.is-dialog {
/*width: 70%;*/
max-width: 885px;
}
.form-group .bootstrap-tagsinput {
display: inherit;
}
.form-group .bootstrap-tagsinput span.twitter-typeahead {
width: auto;
}
.content {
min-height: 500px;
}
... ... @@ -135,6 +129,11 @@ table.table-template {
margin-bottom: -5px;
padding: 10px 20px;
}
.img-center {
margin: 0 auto;
display: inline;
float: none;
}
/*
* RIBBON
*/
... ... @@ -331,6 +330,37 @@ table.table-template {
.nav-addtabs li:hover > .close-tab {
display: block;
}
.main-sidebar .sidebar-form {
overflow: visible;
}
.main-sidebar .sidebar-form .menuresult {
z-index: 999;
position: absolute;
top: 34px;
left: -1px;
width: 100%;
max-height: 250px;
overflow: auto;
margin: 0;
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.main-sidebar .sidebar-form .menuresult a {
border-top: 1px solid #eee;
background-color: #fff;
border-bottom: 1px solid #eee;
margin-bottom: -1px;
display: block;
padding: 10px 15px;
color: #222d32;
}
.main-sidebar .sidebar-form .menuresult a:hover {
background: #eee;
}
.input-group .sp_result_area {
width: 100%;
}
.sidebar-menu.show-submenu .treeview-menu {
display: block;
}
... ...
/*# sourceMappingURL=mixins.css.map */
\ No newline at end of file
/*# sourceMappingURL=alerts.css.map */
\ No newline at end of file
/*# sourceMappingURL=background-variant.css.map */
\ No newline at end of file
/*# sourceMappingURL=border-radius.css.map */
\ No newline at end of file
/*# sourceMappingURL=buttons.css.map */
\ No newline at end of file
/*# sourceMappingURL=center-block.css.map */
\ No newline at end of file
/*# sourceMappingURL=clearfix.css.map */
\ No newline at end of file
/*# sourceMappingURL=forms.css.map */
\ No newline at end of file
/*# sourceMappingURL=gradients.css.map */
\ No newline at end of file
/*# sourceMappingURL=grid-framework.css.map */
\ No newline at end of file
/*# sourceMappingURL=grid.css.map */
\ No newline at end of file
/*# sourceMappingURL=hide-text.css.map */
\ No newline at end of file
/*# sourceMappingURL=image.css.map */
\ No newline at end of file
/*# sourceMappingURL=labels.css.map */
\ No newline at end of file
/*# sourceMappingURL=list-group.css.map */
\ No newline at end of file
/*# sourceMappingURL=nav-divider.css.map */
\ No newline at end of file
/*# sourceMappingURL=nav-vertical-align.css.map */
\ No newline at end of file
/*# sourceMappingURL=opacity.css.map */
\ No newline at end of file
/*# sourceMappingURL=pagination.css.map */
\ No newline at end of file
/*# sourceMappingURL=panels.css.map */
\ No newline at end of file
/*# sourceMappingURL=progress-bar.css.map */
\ No newline at end of file
/*# sourceMappingURL=reset-filter.css.map */
\ No newline at end of file
/*# sourceMappingURL=reset-text.css.map */
\ No newline at end of file
/*# sourceMappingURL=resize.css.map */
\ No newline at end of file
/*# sourceMappingURL=responsive-visibility.css.map */
\ No newline at end of file
/*# sourceMappingURL=size.css.map */
\ No newline at end of file
/*# sourceMappingURL=tab-focus.css.map */
\ No newline at end of file
/*# sourceMappingURL=table-row.css.map */
\ No newline at end of file
/*# sourceMappingURL=text-emphasis.css.map */
\ No newline at end of file
/*# sourceMappingURL=text-overflow.css.map */
\ No newline at end of file
/*# sourceMappingURL=vendor-prefixes.css.map */
\ No newline at end of file
/*# sourceMappingURL=variables.css.map */
\ No newline at end of file
.media {
margin-top: 15px;
}
.media:first-child {
margin-top: 0;
}
.media,
.media-body {
zoom: 1;
overflow: hidden;
}
.media-body {
width: 10000px;
}
.media-object {
display: block;
}
.media-object.img-thumbnail {
max-width: none;
}
.media-right,
.media > .pull-right {
padding-left: 10px;
}
.media-left,
.media > .pull-left {
padding-right: 10px;
}
.media-left,
.media-right,
.media-body {
display: table-cell;
vertical-align: top;
}
.media-middle {
vertical-align: middle;
}
.media-bottom {
vertical-align: bottom;
}
.media-heading {
margin-top: 0;
margin-bottom: 5px;
}
.media-list {
padding-left: 0;
list-style: none;
}
/*# sourceMappingURL=media.css.map */
\ No newline at end of file
/*# sourceMappingURL=mixins.css.map */
\ No newline at end of file
/*# sourceMappingURL=alerts.css.map */
\ No newline at end of file
/*# sourceMappingURL=background-variant.css.map */
\ No newline at end of file
/*# sourceMappingURL=border-radius.css.map */
\ No newline at end of file
/*# sourceMappingURL=buttons.css.map */
\ No newline at end of file
/*# sourceMappingURL=center-block.css.map */
\ No newline at end of file
/*# sourceMappingURL=clearfix.css.map */
\ No newline at end of file
/*# sourceMappingURL=forms.css.map */
\ No newline at end of file
/*# sourceMappingURL=gradients.css.map */
\ No newline at end of file
/*# sourceMappingURL=grid-framework.css.map */
\ No newline at end of file
/*# sourceMappingURL=grid.css.map */
\ No newline at end of file
/*# sourceMappingURL=hide-text.css.map */
\ No newline at end of file
/*# sourceMappingURL=image.css.map */
\ No newline at end of file
/*# sourceMappingURL=labels.css.map */
\ No newline at end of file
/*# sourceMappingURL=list-group.css.map */
\ No newline at end of file