pengchanglu 3 anni fa
parent
commit
0d07b90982
31 ha cambiato i file con 0 aggiunte e 4904 eliminazioni
  1. 0 44
      application/application/admin/command/Addon/stubs/config.stub
  2. 0 604
      application/application/admin/command/Install/fastadmin.sql
  3. 0 453
      application/application/admin/controller/Addon.php
  4. 0 84
      application/application/admin/controller/Dashboard.php
  5. 0 138
      application/application/admin/controller/Index.php
  6. 0 296
      application/application/admin/controller/auth/Admin.php
  7. 0 12
      application/application/admin/lang/zh-cn/auth/admin.php
  8. 0 50
      application/application/admin/lang/zh-cn/dashboard.php
  9. 0 83
      application/application/admin/lang/zh-cn/general/config.php
  10. 0 14
      application/application/admin/lang/zh-cn/general/profile.php
  11. 0 530
      application/application/admin/library/Auth.php
  12. 0 55
      application/application/admin/validate/Admin.php
  13. 0 134
      application/application/admin/view/addon/config.html
  14. 0 21
      application/application/admin/view/auth/admin/index.html
  15. 0 21
      application/application/admin/view/auth/adminlog/index.html
  16. 0 21
      application/application/admin/view/auth/group/index.html
  17. 0 36
      application/application/admin/view/category/index.html
  18. 0 39
      application/application/admin/view/common/menu.html
  19. 0 403
      application/application/admin/view/dashboard/index.html
  20. 0 47
      application/application/admin/view/general/attachment/select.html
  21. 0 356
      application/application/admin/view/general/config/index.html
  22. 0 115
      application/application/admin/view/general/profile/index.html
  23. 0 143
      application/application/admin/view/index/login.html
  24. 0 28
      application/application/admin/view/user/group/index.html
  25. 0 28
      application/application/admin/view/user/rule/index.html
  26. 0 96
      application/application/api/controller/Ems.php
  27. 0 159
      application/application/common/library/Ems.php
  28. 0 437
      application/application/common/library/Upload.php
  29. 0 301
      application/application/config.php
  30. 0 95
      application/application/index/view/user/login.html
  31. 0 61
      application/application/index/view/user/register.html

+ 0 - 44
application/application/admin/command/Addon/stubs/config.stub

@@ -1,44 +0,0 @@
-<?php
-
-return [
-    [
-        //配置唯一标识
-        'name'    => 'usernmae',
-        //显示的标题
-        'title'   => '用户名',
-        //类型
-        'type'    => 'string',
-        //分组
-        'group'    => '',
-        //动态显示
-        'visible'    => '',
-        //数据字典
-        'content' => [
-        ],
-        //值
-        'value'   => '',
-        //验证规则
-        'rule'    => 'required',
-        //错误消息
-        'msg'     => '',
-        //提示消息
-        'tip'     => '',
-        //成功消息
-        'ok'      => '',
-        //扩展信息
-        'extend'  => ''
-    ],
-    [
-        'name'    => 'password',
-        'title'   => '密码',
-        'type'    => 'string',
-        'content' => [
-        ],
-        'value'   => '',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => ''
-    ],
-];

+ 0 - 604
application/application/admin/command/Install/fastadmin.sql

@@ -1,604 +0,0 @@
-/*
- FastAdmin Install SQL
- Date: 2020-06-11 22:11:09
-*/
-
-SET FOREIGN_KEY_CHECKS = 0;
-
--- ----------------------------
--- Table structure for fa_admin
--- ----------------------------
-DROP TABLE IF EXISTS `fa_admin`;
-CREATE TABLE `fa_admin` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
-  `username` varchar(20) DEFAULT '' COMMENT '用户名',
-  `nickname` varchar(50) DEFAULT '' COMMENT '昵称',
-  `password` varchar(32) DEFAULT '' COMMENT '密码',
-  `salt` varchar(30) DEFAULT '' COMMENT '密码盐',
-  `avatar` varchar(255) DEFAULT '' COMMENT '头像',
-  `email` varchar(100) DEFAULT '' COMMENT '电子邮箱',
-  `loginfailure` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '失败次数',
-  `logintime` int(10) DEFAULT NULL COMMENT '登录时间',
-  `loginip` varchar(50) DEFAULT NULL COMMENT '登录IP',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
-  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
-  `token` varchar(59) DEFAULT '' COMMENT 'Session标识',
-  `status` varchar(30) NOT NULL DEFAULT 'normal' COMMENT '状态',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `username` (`username`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='管理员表';
-
--- ----------------------------
--- Records of fa_admin
--- ----------------------------
-BEGIN;
-INSERT INTO `fa_admin` VALUES (1, 'admin', 'Admin', '', '', '/assets/img/avatar.png', 'admin@admin.com', 0, 1491635035, '127.0.0.1',1491635035, 1491635035, '', 'normal');
-COMMIT;
-
--- ----------------------------
--- Table structure for fa_admin_log
--- ----------------------------
-DROP TABLE IF EXISTS `fa_admin_log`;
-CREATE TABLE `fa_admin_log` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
-  `admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员ID',
-  `username` varchar(30) DEFAULT '' COMMENT '管理员名字',
-  `url` varchar(1500) DEFAULT '' COMMENT '操作页面',
-  `title` varchar(100) DEFAULT '' COMMENT '日志标题',
-  `content` longtext NOT NULL COMMENT '内容',
-  `ip` varchar(50) DEFAULT '' COMMENT 'IP',
-  `useragent` varchar(255) DEFAULT '' COMMENT 'User-Agent',
-  `createtime` int(10) DEFAULT NULL COMMENT '操作时间',
-  PRIMARY KEY (`id`),
-  KEY `name` (`username`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='管理员日志表';
-
--- ----------------------------
--- Table structure for fa_area
--- ----------------------------
-DROP TABLE IF EXISTS `fa_area`;
-CREATE TABLE `fa_area` (
-  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
-  `pid` int(10) DEFAULT NULL COMMENT '父id',
-  `shortname` varchar(100) DEFAULT NULL COMMENT '简称',
-  `name` varchar(100) DEFAULT NULL COMMENT '名称',
-  `mergename` varchar(255) DEFAULT NULL COMMENT '全称',
-  `level` tinyint(4) DEFAULT NULL COMMENT '层级:1=省,2=市,3=区/县',
-  `pinyin` varchar(100) DEFAULT NULL COMMENT '拼音',
-  `code` varchar(100) DEFAULT NULL COMMENT '长途区号',
-  `zip` varchar(100) DEFAULT NULL COMMENT '邮编',
-  `first` varchar(50) DEFAULT NULL COMMENT '首字母',
-  `lng` varchar(100) DEFAULT NULL COMMENT '经度',
-  `lat` varchar(100) DEFAULT NULL COMMENT '纬度',
-  PRIMARY KEY (`id`),
-  KEY `pid` (`pid`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='地区表';
-
--- ----------------------------
--- Table structure for fa_attachment
--- ----------------------------
-DROP TABLE IF EXISTS `fa_attachment`;
-CREATE TABLE `fa_attachment` (
-  `id` int(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
-  `category` varchar(50) DEFAULT '' COMMENT '类别',
-  `admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员ID',
-  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
-  `url` varchar(255) DEFAULT '' COMMENT '物理路径',
-  `imagewidth` varchar(30) DEFAULT '' COMMENT '宽度',
-  `imageheight` varchar(30) DEFAULT '' COMMENT '高度',
-  `imagetype` varchar(30) DEFAULT '' COMMENT '图片类型',
-  `imageframes` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '图片帧数',
-  `filename` varchar(100) DEFAULT '' COMMENT '文件名称',
-  `filesize` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '文件大小',
-  `mimetype` varchar(100) DEFAULT '' COMMENT 'mime类型',
-  `extparam` varchar(255) DEFAULT '' COMMENT '透传数据',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建日期',
-  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
-  `uploadtime` int(10) DEFAULT NULL COMMENT '上传时间',
-  `storage` varchar(100) NOT NULL DEFAULT 'local' COMMENT '存储位置',
-  `sha1` varchar(40) DEFAULT '' COMMENT '文件 sha1编码',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='附件表';
-
--- ----------------------------
--- Records of fa_attachment
--- ----------------------------
-BEGIN;
-INSERT INTO `fa_attachment` VALUES (1, '', 1, 0, '/assets/img/qrcode.png', '150', '150', 'png', 0, 'qrcode.png', 21859, 'image/png', '', 1491635035, 1491635035, 1491635035, 'local', '17163603d0263e4838b9387ff2cd4877e8b018f6');
-COMMIT;
-
--- ----------------------------
--- Table structure for fa_auth_group
--- ----------------------------
-DROP TABLE IF EXISTS `fa_auth_group`;
-CREATE TABLE `fa_auth_group` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父组别',
-  `name` varchar(100) DEFAULT '' COMMENT '组名',
-  `rules` text NOT NULL COMMENT '规则ID',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
-  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
-  `status` varchar(30) DEFAULT '' COMMENT '状态',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='分组表';
-
--- ----------------------------
--- Records of fa_auth_group
--- ----------------------------
-BEGIN;
-INSERT INTO `fa_auth_group` VALUES (1, 0, 'Admin group', '*', 1491635035, 1491635035, 'normal');
-INSERT INTO `fa_auth_group` VALUES (2, 1, 'Second group', '13,14,16,15,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,40,41,42,43,44,45,46,47,48,49,50,55,56,57,58,59,60,61,62,63,64,65,1,9,10,11,7,6,8,2,4,5', 1491635035, 1491635035, 'normal');
-INSERT INTO `fa_auth_group` VALUES (3, 2, 'Third group', '1,4,9,10,11,13,14,15,16,17,40,41,42,43,44,45,46,47,48,49,50,55,56,57,58,59,60,61,62,63,64,65,5', 1491635035, 1491635035, 'normal');
-INSERT INTO `fa_auth_group` VALUES (4, 1, 'Second group 2', '1,4,13,14,15,16,17,55,56,57,58,59,60,61,62,63,64,65', 1491635035, 1491635035, 'normal');
-INSERT INTO `fa_auth_group` VALUES (5, 2, 'Third group 2', '1,2,6,7,8,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34', 1491635035, 1491635035, 'normal');
-COMMIT;
-
--- ----------------------------
--- Table structure for fa_auth_group_access
--- ----------------------------
-DROP TABLE IF EXISTS `fa_auth_group_access`;
-CREATE TABLE `fa_auth_group_access` (
-  `uid` int(10) unsigned NOT NULL COMMENT '会员ID',
-  `group_id` int(10) unsigned NOT NULL COMMENT '级别ID',
-  UNIQUE KEY `uid_group_id` (`uid`,`group_id`),
-  KEY `uid` (`uid`),
-  KEY `group_id` (`group_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='权限分组表';
-
--- ----------------------------
--- Records of fa_auth_group_access
--- ----------------------------
-BEGIN;
-INSERT INTO `fa_auth_group_access` VALUES (1, 1);
-COMMIT;
-
--- ----------------------------
--- Table structure for fa_auth_rule
--- ----------------------------
-DROP TABLE IF EXISTS `fa_auth_rule`;
-CREATE TABLE `fa_auth_rule` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `type` enum('menu','file') NOT NULL DEFAULT 'file' COMMENT 'menu为菜单,file为权限节点',
-  `pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父ID',
-  `name` varchar(100) DEFAULT '' COMMENT '规则名称',
-  `title` varchar(50) DEFAULT '' COMMENT '规则名称',
-  `icon` varchar(50) DEFAULT '' COMMENT '图标',
-  `url` varchar(255) DEFAULT '' COMMENT '规则URL',
-  `condition` varchar(255) DEFAULT '' COMMENT '条件',
-  `remark` varchar(255) DEFAULT '' COMMENT '备注',
-  `ismenu` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否为菜单',
-  `menutype` enum('addtabs','blank','dialog','ajax') DEFAULT NULL COMMENT '菜单类型',
-  `extend` varchar(255) DEFAULT '' COMMENT '扩展属性',
-  `py` varchar(30) DEFAULT '' COMMENT '拼音首字母',
-  `pinyin` varchar(100) DEFAULT '' COMMENT '拼音',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
-  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
-  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
-  `status` varchar(30) DEFAULT '' COMMENT '状态',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `name` (`name`) USING BTREE,
-  KEY `pid` (`pid`),
-  KEY `weigh` (`weigh`)
-) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='节点表';
-
--- ----------------------------
--- Records of fa_auth_rule
--- ----------------------------
-BEGIN;
-INSERT INTO `fa_auth_rule` VALUES (1, 'file', 0, 'dashboard', 'Dashboard', 'fa fa-dashboard', '', '', 'Dashboard tips', 1, NULL, '', 'kzt', 'kongzhitai', 1491635035, 1491635035, 143, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (2, 'file', 0, 'general', 'General', 'fa fa-cogs', '', '', '', 1, NULL, '', 'cggl', 'changguiguanli', 1491635035, 1491635035, 137, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (3, 'file', 0, 'category', 'Category', 'fa fa-leaf', '', '', 'Category tips', 0, NULL, '', 'flgl', 'fenleiguanli', 1491635035, 1491635035, 119, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (4, 'file', 0, 'addon', 'Addon', 'fa fa-rocket', '', '', 'Addon tips', 1, NULL, '', 'cjgl', 'chajianguanli', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (5, 'file', 0, 'auth', 'Auth', 'fa fa-group', '', '', '', 1, NULL, '', 'qxgl', 'quanxianguanli', 1491635035, 1491635035, 99, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (6, 'file', 2, 'general/config', 'Config', 'fa fa-cog', '', '', 'Config tips', 1, NULL, '', 'xtpz', 'xitongpeizhi', 1491635035, 1491635035, 60, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (7, 'file', 2, 'general/attachment', 'Attachment', 'fa fa-file-image-o', '', '', 'Attachment tips', 1, NULL, '', 'fjgl', 'fujianguanli', 1491635035, 1491635035, 53, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (8, 'file', 2, 'general/profile', 'Profile', 'fa fa-user', '', '', '', 1, NULL, '', 'grzl', 'gerenziliao', 1491635035, 1491635035, 34, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (9, 'file', 5, 'auth/admin', 'Admin', 'fa fa-user', '', '', 'Admin tips', 1, NULL, '', 'glygl', 'guanliyuanguanli', 1491635035, 1491635035, 118, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (10, 'file', 5, 'auth/adminlog', 'Admin log', 'fa fa-list-alt', '', '', 'Admin log tips', 1, NULL, '', 'glyrz', 'guanliyuanrizhi', 1491635035, 1491635035, 113, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (11, 'file', 5, 'auth/group', 'Group', 'fa fa-group', '', '', 'Group tips', 1, NULL, '', 'jsz', 'juesezu', 1491635035, 1491635035, 109, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (12, 'file', 5, 'auth/rule', 'Rule', 'fa fa-bars', '', '', 'Rule tips', 1, NULL, '', 'cdgz', 'caidanguize', 1491635035, 1491635035, 104, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (13, 'file', 1, 'dashboard/index', 'View', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 136, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (14, 'file', 1, 'dashboard/add', 'Add', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 135, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (15, 'file', 1, 'dashboard/del', 'Delete', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 133, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (16, 'file', 1, 'dashboard/edit', 'Edit', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 134, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (17, 'file', 1, 'dashboard/multi', 'Multi', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 132, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (18, 'file', 6, 'general/config/index', 'View', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 52, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (19, 'file', 6, 'general/config/add', 'Add', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 51, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (20, 'file', 6, 'general/config/edit', 'Edit', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 50, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (21, 'file', 6, 'general/config/del', 'Delete', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 49, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (22, 'file', 6, 'general/config/multi', 'Multi', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 48, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (23, 'file', 7, 'general/attachment/index', 'View', 'fa fa-circle-o', '', '', 'Attachment tips', 0, NULL, '', '', '', 1491635035, 1491635035, 59, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (24, 'file', 7, 'general/attachment/select', 'Select attachment', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 58, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (25, 'file', 7, 'general/attachment/add', 'Add', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 57, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (26, 'file', 7, 'general/attachment/edit', 'Edit', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 56, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (27, 'file', 7, 'general/attachment/del', 'Delete', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 55, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (28, 'file', 7, 'general/attachment/multi', 'Multi', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 54, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (29, 'file', 8, 'general/profile/index', 'View', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 33, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (30, 'file', 8, 'general/profile/update', 'Update profile', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 32, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (31, 'file', 8, 'general/profile/add', 'Add', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 31, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (32, 'file', 8, 'general/profile/edit', 'Edit', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 30, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (33, 'file', 8, 'general/profile/del', 'Delete', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 29, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (34, 'file', 8, 'general/profile/multi', 'Multi', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 28, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (35, 'file', 3, 'category/index', 'View', 'fa fa-circle-o', '', '', 'Category tips', 0, NULL, '', '', '', 1491635035, 1491635035, 142, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (36, 'file', 3, 'category/add', 'Add', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 141, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (37, 'file', 3, 'category/edit', 'Edit', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 140, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (38, 'file', 3, 'category/del', 'Delete', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 139, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (39, 'file', 3, 'category/multi', 'Multi', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 138, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (40, 'file', 9, 'auth/admin/index', 'View', 'fa fa-circle-o', '', '', 'Admin tips', 0, NULL, '', '', '', 1491635035, 1491635035, 117, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (41, 'file', 9, 'auth/admin/add', 'Add', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 116, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (42, 'file', 9, 'auth/admin/edit', 'Edit', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 115, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (43, 'file', 9, 'auth/admin/del', 'Delete', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 114, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (44, 'file', 10, 'auth/adminlog/index', 'View', 'fa fa-circle-o', '', '', 'Admin log tips', 0, NULL, '', '', '', 1491635035, 1491635035, 112, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (45, 'file', 10, 'auth/adminlog/detail', 'Detail', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 111, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (46, 'file', 10, 'auth/adminlog/del', 'Delete', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 110, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (47, 'file', 11, 'auth/group/index', 'View', 'fa fa-circle-o', '', '', 'Group tips', 0, NULL, '', '', '', 1491635035, 1491635035, 108, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (48, 'file', 11, 'auth/group/add', 'Add', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 107, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (49, 'file', 11, 'auth/group/edit', 'Edit', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 106, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (50, 'file', 11, 'auth/group/del', 'Delete', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 105, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (51, 'file', 12, 'auth/rule/index', 'View', 'fa fa-circle-o', '', '', 'Rule tips', 0, NULL, '', '', '', 1491635035, 1491635035, 103, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (52, 'file', 12, 'auth/rule/add', 'Add', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 102, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (53, 'file', 12, 'auth/rule/edit', 'Edit', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 101, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (54, 'file', 12, 'auth/rule/del', 'Delete', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 100, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (55, 'file', 4, 'addon/index', 'View', 'fa fa-circle-o', '', '', 'Addon tips', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (56, 'file', 4, 'addon/add', 'Add', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (57, 'file', 4, 'addon/edit', 'Edit', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (58, 'file', 4, 'addon/del', 'Delete', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (59, 'file', 4, 'addon/downloaded', 'Local addon', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (60, 'file', 4, 'addon/state', 'Update state', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (63, 'file', 4, 'addon/config', 'Setting', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (64, 'file', 4, 'addon/refresh', 'Refresh', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (65, 'file', 4, 'addon/multi', 'Multi', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (66, 'file', 0, 'user', 'User', 'fa fa-user-circle', '', '', '', 1, NULL, '', 'hygl', 'huiyuanguanli', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (67, 'file', 66, 'user/user', 'User', 'fa fa-user', '', '', '', 1, NULL, '', 'hygl', 'huiyuanguanli', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (68, 'file', 67, 'user/user/index', 'View', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (69, 'file', 67, 'user/user/edit', 'Edit', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (70, 'file', 67, 'user/user/add', 'Add', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (71, 'file', 67, 'user/user/del', 'Del', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (72, 'file', 67, 'user/user/multi', 'Multi', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (73, 'file', 66, 'user/group', 'User group', 'fa fa-users', '', '', '', 1, NULL, '', 'hyfz', 'huiyuanfenzu', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (74, 'file', 73, 'user/group/add', 'Add', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (75, 'file', 73, 'user/group/edit', 'Edit', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (76, 'file', 73, 'user/group/index', 'View', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (77, 'file', 73, 'user/group/del', 'Del', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (78, 'file', 73, 'user/group/multi', 'Multi', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (79, 'file', 66, 'user/rule', 'User rule', 'fa fa-circle-o', '', '', '', 1, NULL, '', 'hygz', 'huiyuanguize', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (80, 'file', 79, 'user/rule/index', 'View', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (81, 'file', 79, 'user/rule/del', 'Del', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (82, 'file', 79, 'user/rule/add', 'Add', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (83, 'file', 79, 'user/rule/edit', 'Edit', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-INSERT INTO `fa_auth_rule` VALUES (84, 'file', 79, 'user/rule/multi', 'Multi', 'fa fa-circle-o', '', '', '', 0, NULL, '', '', '', 1491635035, 1491635035, 0, 'normal');
-COMMIT;
-
--- ----------------------------
--- Table structure for fa_category
--- ----------------------------
-DROP TABLE IF EXISTS `fa_category`;
-CREATE TABLE `fa_category` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父ID',
-  `type` varchar(30) DEFAULT '' COMMENT '栏目类型',
-  `name` varchar(30) DEFAULT '',
-  `nickname` varchar(50) DEFAULT '',
-  `flag` set('hot','index','recommend') DEFAULT '',
-  `image` varchar(100) DEFAULT '' COMMENT '图片',
-  `keywords` varchar(255) DEFAULT '' COMMENT '关键字',
-  `description` varchar(255) DEFAULT '' COMMENT '描述',
-  `diyname` varchar(30) DEFAULT '' COMMENT '自定义名称',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
-  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
-  `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
-  `status` varchar(30) DEFAULT '' COMMENT '状态',
-  PRIMARY KEY (`id`),
-  KEY `weigh` (`weigh`,`id`),
-  KEY `pid` (`pid`)
-) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='分类表';
-
--- ----------------------------
--- Records of fa_category
--- ----------------------------
-BEGIN;
-INSERT INTO `fa_category` VALUES (1, 0, 'page', '官方新闻', 'news', 'recommend', '/assets/img/qrcode.png', '', '', 'news', 1491635035, 1491635035, 1, 'normal');
-INSERT INTO `fa_category` VALUES (2, 0, 'page', '移动应用', 'mobileapp', 'hot', '/assets/img/qrcode.png', '', '', 'mobileapp', 1491635035, 1491635035, 2, 'normal');
-INSERT INTO `fa_category` VALUES (3, 2, 'page', '微信公众号', 'wechatpublic', 'index', '/assets/img/qrcode.png', '', '', 'wechatpublic', 1491635035, 1491635035, 3, 'normal');
-INSERT INTO `fa_category` VALUES (4, 2, 'page', 'Android开发', 'android', 'recommend', '/assets/img/qrcode.png', '', '', 'android', 1491635035, 1491635035, 4, 'normal');
-INSERT INTO `fa_category` VALUES (5, 0, 'page', '软件产品', 'software', 'recommend', '/assets/img/qrcode.png', '', '', 'software', 1491635035, 1491635035, 5, 'normal');
-INSERT INTO `fa_category` VALUES (6, 5, 'page', '网站建站', 'website', 'recommend', '/assets/img/qrcode.png', '', '', 'website', 1491635035, 1491635035, 6, 'normal');
-INSERT INTO `fa_category` VALUES (7, 5, 'page', '企业管理软件', 'company', 'index', '/assets/img/qrcode.png', '', '', 'company', 1491635035, 1491635035, 7, 'normal');
-INSERT INTO `fa_category` VALUES (8, 6, 'page', 'PC端', 'website-pc', 'recommend', '/assets/img/qrcode.png', '', '', 'website-pc', 1491635035, 1491635035, 8, 'normal');
-INSERT INTO `fa_category` VALUES (9, 6, 'page', '移动端', 'website-mobile', 'recommend', '/assets/img/qrcode.png', '', '', 'website-mobile', 1491635035, 1491635035, 9, 'normal');
-INSERT INTO `fa_category` VALUES (10, 7, 'page', 'CRM系统 ', 'company-crm', 'recommend', '/assets/img/qrcode.png', '', '', 'company-crm', 1491635035, 1491635035, 10, 'normal');
-INSERT INTO `fa_category` VALUES (11, 7, 'page', 'SASS平台软件', 'company-sass', 'recommend', '/assets/img/qrcode.png', '', '', 'company-sass', 1491635035, 1491635035, 11, 'normal');
-INSERT INTO `fa_category` VALUES (12, 0, 'test', '测试1', 'test1', 'recommend', '/assets/img/qrcode.png', '', '', 'test1', 1491635035, 1491635035, 12, 'normal');
-INSERT INTO `fa_category` VALUES (13, 0, 'test', '测试2', 'test2', 'recommend', '/assets/img/qrcode.png', '', '', 'test2', 1491635035, 1491635035, 13, 'normal');
-COMMIT;
-
--- ----------------------------
--- Table structure for fa_config
--- ----------------------------
-DROP TABLE IF EXISTS `fa_config`;
-CREATE TABLE `fa_config` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `name` varchar(30) DEFAULT '' COMMENT '变量名',
-  `group` varchar(30) DEFAULT '' COMMENT '分组',
-  `title` varchar(100) DEFAULT '' COMMENT '变量标题',
-  `tip` varchar(100) DEFAULT '' COMMENT '变量描述',
-  `type` varchar(30) DEFAULT '' COMMENT '类型:string,text,int,bool,array,datetime,date,file',
-  `visible` varchar(255) DEFAULT '' COMMENT '可见条件',
-  `value` text COMMENT '变量值',
-  `content` text COMMENT '变量字典数据',
-  `rule` varchar(100) DEFAULT '' COMMENT '验证规则',
-  `extend` varchar(255) DEFAULT '' COMMENT '扩展属性',
-  `setting` varchar(255) DEFAULT '' COMMENT '配置',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `name` (`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='系统配置';
-
--- ----------------------------
--- Records of fa_config
--- ----------------------------
-BEGIN;
-INSERT INTO `fa_config` VALUES (1, 'name', 'basic', 'Site name', '请填写站点名称', 'string', '', '我的网站', '', 'required', '', '');
-INSERT INTO `fa_config` VALUES (2, 'beian', 'basic', 'Beian', '粤ICP备15000000号-1', 'string', '', '', '', '', '', '');
-INSERT INTO `fa_config` VALUES (3, 'cdnurl', 'basic', 'Cdn url', '如果全站静态资源使用第三方云储存请配置该值', 'string', '', '', '', '', '', '');
-INSERT INTO `fa_config` VALUES (4, 'version', 'basic', 'Version', '如果静态资源有变动请重新配置该值', 'string', '', '1.0.1', '', 'required', '', '');
-INSERT INTO `fa_config` VALUES (5, 'timezone', 'basic', 'Timezone', '', 'string', '', 'Asia/Shanghai', '', 'required', '', '');
-INSERT INTO `fa_config` VALUES (6, 'forbiddenip', 'basic', 'Forbidden ip', '一行一条记录', 'text', '', '', '', '', '', '');
-INSERT INTO `fa_config` VALUES (7, 'languages', 'basic', 'Languages', '', 'array', '', '{\"backend\":\"zh-cn\",\"frontend\":\"zh-cn\"}', '', 'required', '', '');
-INSERT INTO `fa_config` VALUES (8, 'fixedpage', 'basic', 'Fixed page', '请尽量输入左侧菜单栏存在的链接', 'string', '', 'dashboard', '', 'required', '', '');
-INSERT INTO `fa_config` VALUES (9, 'categorytype', 'dictionary', 'Category type', '', 'array', '', '{\"default\":\"Default\",\"page\":\"Page\",\"article\":\"Article\",\"test\":\"Test\"}', '', '', '', '');
-INSERT INTO `fa_config` VALUES (10, 'configgroup', 'dictionary', 'Config group', '', 'array', '', '{\"basic\":\"Basic\",\"email\":\"Email\",\"dictionary\":\"Dictionary\",\"user\":\"User\",\"example\":\"Example\"}', '', '', '', '');
-INSERT INTO `fa_config` VALUES (11, 'mail_type', 'email', 'Mail type', '选择邮件发送方式', 'select', '', '1', '[\"请选择\",\"SMTP\"]', '', '', '');
-INSERT INTO `fa_config` VALUES (12, 'mail_smtp_host', 'email', 'Mail smtp host', '错误的配置发送邮件会导致服务器超时', 'string', '', 'smtp.qq.com', '', '', '', '');
-INSERT INTO `fa_config` VALUES (13, 'mail_smtp_port', 'email', 'Mail smtp port', '(不加密默认25,SSL默认465,TLS默认587)', 'string', '', '465', '', '', '', '');
-INSERT INTO `fa_config` VALUES (14, 'mail_smtp_user', 'email', 'Mail smtp user', '(填写完整用户名)', 'string', '', '10000', '', '', '', '');
-INSERT INTO `fa_config` VALUES (15, 'mail_smtp_pass', 'email', 'Mail smtp password', '(填写您的密码或授权码)', 'string', '', 'password', '', '', '', '');
-INSERT INTO `fa_config` VALUES (16, 'mail_verify_type', 'email', 'Mail vertify type', '(SMTP验证方式[推荐SSL])', 'select', '', '2', '[\"无\",\"TLS\",\"SSL\"]', '', '', '');
-INSERT INTO `fa_config` VALUES (17, 'mail_from', 'email', 'Mail from', '', 'string', '', '10000@qq.com', '', '', '', '');
-INSERT INTO `fa_config` VALUES (18, 'attachmentcategory', 'dictionary', 'Attachment category', '', 'array', '', '{\"category1\":\"Category1\",\"category2\":\"Category2\",\"custom\":\"Custom\"}', '', '', '', '');
-COMMIT;
-
--- ----------------------------
--- Table structure for fa_ems
--- ----------------------------
-DROP TABLE IF EXISTS `fa_ems`;
-CREATE TABLE `fa_ems`  (
-  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
-  `event` varchar(30) DEFAULT '' COMMENT '事件',
-  `email` varchar(100) DEFAULT '' COMMENT '邮箱',
-  `code` varchar(10) DEFAULT '' COMMENT '验证码',
-  `times` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '验证次数',
-  `ip` varchar(30) DEFAULT '' COMMENT 'IP',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='邮箱验证码表';
-
--- ----------------------------
--- Table structure for fa_sms
--- ----------------------------
-DROP TABLE IF EXISTS `fa_sms`;
-CREATE TABLE `fa_sms` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
-  `event` varchar(30) DEFAULT '' COMMENT '事件',
-  `mobile` varchar(20) DEFAULT '' COMMENT '手机号',
-  `code` varchar(10) DEFAULT '' COMMENT '验证码',
-  `times` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '验证次数',
-  `ip` varchar(30) DEFAULT '' COMMENT 'IP',
-  `createtime` int(10) unsigned DEFAULT '0' COMMENT '创建时间',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='短信验证码表';
-
--- ----------------------------
--- Table structure for fa_test
--- ----------------------------
-DROP TABLE IF EXISTS `fa_test`;
-CREATE TABLE `fa_test` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
-  `user_id` int(10) DEFAULT '0' COMMENT '会员ID',
-  `admin_id` int(10) DEFAULT '0' COMMENT '管理员ID',
-  `category_id` int(10) unsigned DEFAULT '0' COMMENT '分类ID(单选)',
-  `category_ids` varchar(100) COMMENT '分类ID(多选)',
-  `tags` varchar(255) DEFAULT '' COMMENT '标签',
-  `week` enum('monday','tuesday','wednesday') COMMENT '星期(单选):monday=星期一,tuesday=星期二,wednesday=星期三',
-  `flag` set('hot','index','recommend') DEFAULT '' COMMENT '标志(多选):hot=热门,index=首页,recommend=推荐',
-  `genderdata` enum('male','female') DEFAULT 'male' COMMENT '性别(单选):male=男,female=女',
-  `hobbydata` set('music','reading','swimming') COMMENT '爱好(多选):music=音乐,reading=读书,swimming=游泳',
-  `title` varchar(100) DEFAULT '' COMMENT '标题',
-  `content` text COMMENT '内容',
-  `image` varchar(100) DEFAULT '' COMMENT '图片',
-  `images` varchar(1500) DEFAULT '' COMMENT '图片组',
-  `attachfile` varchar(100) DEFAULT '' COMMENT '附件',
-  `keywords` varchar(255) DEFAULT '' COMMENT '关键字',
-  `description` varchar(255) DEFAULT '' COMMENT '描述',
-  `city` varchar(100) DEFAULT '' COMMENT '省市',
-  `json` varchar(255) DEFAULT NULL COMMENT '配置:key=名称,value=值',
-  `multiplejson` varchar(1500) DEFAULT '' COMMENT '二维数组:title=标题,intro=介绍,author=作者,age=年龄',
-  `price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '价格',
-  `views` int(10) unsigned DEFAULT '0' COMMENT '点击',
-  `workrange` varchar(100) DEFAULT '' COMMENT '时间区间',
-  `startdate` date DEFAULT NULL COMMENT '开始日期',
-  `activitytime` datetime DEFAULT NULL COMMENT '活动时间(datetime)',
-  `year` year(4) DEFAULT NULL COMMENT '年',
-  `times` time DEFAULT NULL COMMENT '时间',
-  `refreshtime` int(10) DEFAULT NULL COMMENT '刷新时间(int)',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
-  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
-  `deletetime` int(10) DEFAULT NULL COMMENT '删除时间',
-  `weigh` int(10) DEFAULT '0' COMMENT '权重',
-  `switch` tinyint(1) DEFAULT '0' COMMENT '开关',
-  `status` enum('normal','hidden') DEFAULT 'normal' COMMENT '状态',
-  `state` enum('0','1','2') DEFAULT '1' COMMENT '状态值:0=禁用,1=正常,2=推荐',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='测试表';
-
--- ----------------------------
--- Records of fa_test
--- ----------------------------
-BEGIN;
-INSERT INTO `fa_test` VALUES (1, 1, 1, 12, '12,13', '互联网,计算机', 'monday', 'hot,index', 'male', 'music,reading', '我是一篇测试文章', '<p>我是测试内容</p>', '/assets/img/avatar.png', '/assets/img/avatar.png,/assets/img/qrcode.png', '/assets/img/avatar.png', '关键字', '描述', '广西壮族自治区/百色市/平果县', '{\"a\":\"1\",\"b\":\"2\"}', '[{\"title\":\"标题一\",\"intro\":\"介绍一\",\"author\":\"小明\",\"age\":\"21\"}]', 0.00, 0, '2020-10-01 00:00:00 - 2021-10-31 23:59:59', '2017-07-10', '2017-07-10 18:24:45', 2017, '18:24:45', 1491635035, 1491635035, 1491635035, NULL, 0, 1, 'normal', '1');
-COMMIT;
-
--- ----------------------------
--- Table structure for fa_user
--- ----------------------------
-DROP TABLE IF EXISTS `fa_user`;
-CREATE TABLE `fa_user` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
-  `group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '组别ID',
-  `username` varchar(32) DEFAULT '' COMMENT '用户名',
-  `nickname` varchar(50) DEFAULT '' COMMENT '昵称',
-  `password` varchar(32) DEFAULT '' COMMENT '密码',
-  `salt` varchar(30) DEFAULT '' COMMENT '密码盐',
-  `email` varchar(100) DEFAULT '' COMMENT '电子邮箱',
-  `mobile` varchar(11) DEFAULT '' COMMENT '手机号',
-  `avatar` varchar(255) DEFAULT '' COMMENT '头像',
-  `level` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '等级',
-  `gender` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '性别',
-  `birthday` date DEFAULT NULL COMMENT '生日',
-  `bio` varchar(100) DEFAULT '' COMMENT '格言',
-  `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '余额',
-  `score` int(10) NOT NULL DEFAULT '0' COMMENT '积分',
-  `successions` int(10) unsigned NOT NULL DEFAULT '1' COMMENT '连续登录天数',
-  `maxsuccessions` int(10) unsigned NOT NULL DEFAULT '1' COMMENT '最大连续登录天数',
-  `prevtime` int(10) DEFAULT NULL COMMENT '上次登录时间',
-  `logintime` int(10) DEFAULT NULL COMMENT '登录时间',
-  `loginip` varchar(50) DEFAULT '' COMMENT '登录IP',
-  `loginfailure` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '失败次数',
-  `joinip` varchar(50) DEFAULT '' COMMENT '加入IP',
-  `jointime` int(10) DEFAULT NULL COMMENT '加入时间',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
-  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
-  `token` varchar(50) DEFAULT '' COMMENT 'Token',
-  `status` varchar(30) DEFAULT '' COMMENT '状态',
-  `verification` varchar(255) DEFAULT '' COMMENT '验证',
-  PRIMARY KEY (`id`),
-  KEY `username` (`username`),
-  KEY `email` (`email`),
-  KEY `mobile` (`mobile`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='会员表';
-
--- ----------------------------
--- Records of fa_user
--- ----------------------------
-BEGIN;
-INSERT INTO `fa_user` VALUES (1, 1, 'admin', 'admin', '', '', 'admin@163.com', '13888888888', '', 0, 0, '2017-04-08', '', 0, 0, 1, 1, 1491635035, 1491635035, '127.0.0.1', 0, '127.0.0.1', 1491635035, 0, 1491635035, '', 'normal','');
-COMMIT;
-
--- ----------------------------
--- Table structure for fa_user_group
--- ----------------------------
-DROP TABLE IF EXISTS `fa_user_group`;
-CREATE TABLE `fa_user_group` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `name` varchar(50) DEFAULT '' COMMENT '组名',
-  `rules` text COMMENT '权限节点',
-  `createtime` int(10) DEFAULT NULL COMMENT '添加时间',
-  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
-  `status` enum('normal','hidden') DEFAULT NULL COMMENT '状态',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='会员组表';
-
--- ----------------------------
--- Records of fa_user_group
--- ----------------------------
-BEGIN;
-INSERT INTO `fa_user_group` VALUES (1, '默认组', '1,2,3,4,5,6,7,8,9,10,11,12', 1491635035, 1491635035, 'normal');
-COMMIT;
-
--- ----------------------------
--- Table structure for fa_user_money_log
--- ----------------------------
-DROP TABLE IF EXISTS `fa_user_money_log`;
-CREATE TABLE `fa_user_money_log` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
-  `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变更余额',
-  `before` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变更前余额',
-  `after` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变更后余额',
-  `memo` varchar(255) DEFAULT '' COMMENT '备注',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='会员余额变动表';
-
--- ----------------------------
--- Table structure for fa_user_rule
--- ----------------------------
-DROP TABLE IF EXISTS `fa_user_rule`;
-CREATE TABLE `fa_user_rule` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `pid` int(10) DEFAULT NULL COMMENT '父ID',
-  `name` varchar(50) DEFAULT NULL COMMENT '名称',
-  `title` varchar(50) DEFAULT '' COMMENT '标题',
-  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
-  `ismenu` tinyint(1) DEFAULT NULL COMMENT '是否菜单',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
-  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
-  `weigh` int(10) DEFAULT '0' COMMENT '权重',
-  `status` enum('normal','hidden') DEFAULT NULL COMMENT '状态',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='会员规则表';
-
--- ----------------------------
--- Records of fa_user_rule
--- ----------------------------
-BEGIN;
-INSERT INTO `fa_user_rule` VALUES (1, 0, 'index', 'Frontend', '', 1, 1491635035, 1491635035, 1, 'normal');
-INSERT INTO `fa_user_rule` VALUES (2, 0, 'api', 'API Interface', '', 1, 1491635035, 1491635035, 2, 'normal');
-INSERT INTO `fa_user_rule` VALUES (3, 1, 'user', 'User Module', '', 1, 1491635035, 1491635035, 12, 'normal');
-INSERT INTO `fa_user_rule` VALUES (4, 2, 'user', 'User Module', '', 1, 1491635035, 1491635035, 11, 'normal');
-INSERT INTO `fa_user_rule` VALUES (5, 3, 'index/user/login', 'Login', '', 0, 1491635035, 1491635035, 5, 'normal');
-INSERT INTO `fa_user_rule` VALUES (6, 3, 'index/user/register', 'Register', '', 0, 1491635035, 1491635035, 7, 'normal');
-INSERT INTO `fa_user_rule` VALUES (7, 3, 'index/user/index', 'User Center', '', 0, 1491635035, 1491635035, 9, 'normal');
-INSERT INTO `fa_user_rule` VALUES (8, 3, 'index/user/profile', 'Profile', '', 0, 1491635035, 1491635035, 4, 'normal');
-INSERT INTO `fa_user_rule` VALUES (9, 4, 'api/user/login', 'Login', '', 0, 1491635035, 1491635035, 6, 'normal');
-INSERT INTO `fa_user_rule` VALUES (10, 4, 'api/user/register', 'Register', '', 0, 1491635035, 1491635035, 8, 'normal');
-INSERT INTO `fa_user_rule` VALUES (11, 4, 'api/user/index', 'User Center', '', 0, 1491635035, 1491635035, 10, 'normal');
-INSERT INTO `fa_user_rule` VALUES (12, 4, 'api/user/profile', 'Profile', '', 0, 1491635035, 1491635035, 3, 'normal');
-COMMIT;
-
--- ----------------------------
--- Table structure for fa_user_score_log
--- ----------------------------
-DROP TABLE IF EXISTS `fa_user_score_log`;
-CREATE TABLE `fa_user_score_log` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
-  `score` int(10) NOT NULL DEFAULT '0' COMMENT '变更积分',
-  `before` int(10) NOT NULL DEFAULT '0' COMMENT '变更前积分',
-  `after` int(10) NOT NULL DEFAULT '0' COMMENT '变更后积分',
-  `memo` varchar(255) DEFAULT '' COMMENT '备注',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='会员积分变动表';
-
--- ----------------------------
--- Table structure for fa_user_token
--- ----------------------------
-DROP TABLE IF EXISTS `fa_user_token`;
-CREATE TABLE `fa_user_token` (
-  `token` varchar(50) NOT NULL COMMENT 'Token',
-  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
-  `expiretime` int(10) DEFAULT NULL COMMENT '过期时间',
-  PRIMARY KEY (`token`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='会员Token表';
-
--- ----------------------------
--- Table structure for fa_version
--- ----------------------------
-DROP TABLE IF EXISTS `fa_version`;
-CREATE TABLE `fa_version`  (
-  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
-  `oldversion` varchar(30) DEFAULT '' COMMENT '旧版本号',
-  `newversion` varchar(30) DEFAULT '' COMMENT '新版本号',
-  `packagesize` varchar(30) DEFAULT '' COMMENT '包大小',
-  `content` varchar(500) DEFAULT '' COMMENT '升级内容',
-  `downloadurl` varchar(255) DEFAULT '' COMMENT '下载地址',
-  `enforce` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '强制更新',
-  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
-  `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
-  `weigh` int(10) NOT NULL DEFAULT 0 COMMENT '权重',
-  `status` varchar(30) DEFAULT '' COMMENT '状态',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='版本表';
-
-SET FOREIGN_KEY_CHECKS = 1;

+ 0 - 453
application/application/admin/controller/Addon.php

@@ -1,453 +0,0 @@
-<?php
-
-namespace app\admin\controller;
-
-use app\common\controller\Backend;
-use fast\Http;
-use think\addons\AddonException;
-use think\addons\Service;
-use think\Cache;
-use think\Config;
-use think\Db;
-use think\Exception;
-
-/**
- * 插件管理
- *
- * @icon   fa fa-cube
- * @remark 可在线安装、卸载、禁用、启用、配置、升级插件,插件升级前请做好备份。
- */
-class Addon extends Backend
-{
-    protected $model = null;
-    protected $noNeedRight = ['get_table_list'];
-
-    public function _initialize()
-    {
-        parent::_initialize();
-        if (!$this->auth->isSuperAdmin() && in_array($this->request->action(), ['install', 'uninstall', 'local', 'upgrade', 'authorization', 'testdata'])) {
-            $this->error(__('Access is allowed only to the super management group'));
-        }
-    }
-
-    /**
-     * 插件列表
-     */
-    public function index()
-    {
-        $addons = get_addon_list();
-        foreach ($addons as $k => &$v) {
-            $config = get_addon_config($v['name']);
-            $v['config'] = $config ? 1 : 0;
-            $v['url'] = str_replace($this->request->server('SCRIPT_NAME'), '', $v['url']);
-        }
-        $this->assignconfig(['addons' => $addons, 'api_url' => config('fastadmin.api_url'), 'faversion' => config('fastadmin.version'), 'domain' => request()->host(true)]);
-        return $this->view->fetch();
-    }
-
-    /**
-     * 配置
-     */
-    public function config($name = null)
-    {
-        $name = $name ? $name : $this->request->get("name");
-        if (!$name) {
-            $this->error(__('Parameter %s can not be empty', 'name'));
-        }
-        if (!preg_match("/^[a-zA-Z0-9]+$/", $name)) {
-            $this->error(__('Addon name incorrect'));
-        }
-        $info = get_addon_info($name);
-        $config = get_addon_fullconfig($name);
-        if (!$info) {
-            $this->error(__('Addon not exists'));
-        }
-        if ($this->request->isPost()) {
-            $params = $this->request->post("row/a", [], 'trim');
-            if ($params) {
-                foreach ($config as $k => &$v) {
-                    if (isset($params[$v['name']])) {
-                        if ($v['type'] == 'array') {
-                            $params[$v['name']] = is_array($params[$v['name']]) ? $params[$v['name']] : (array)json_decode($params[$v['name']], true);
-                            $value = $params[$v['name']];
-                        } else {
-                            $value = is_array($params[$v['name']]) ? implode(',', $params[$v['name']]) : $params[$v['name']];
-                        }
-                        $v['value'] = $value;
-                    }
-                }
-                try {
-                    $addon = get_addon_instance($name);
-                    //插件自定义配置实现逻辑
-                    if (method_exists($addon, 'config')) {
-                        $addon->config($name, $config);
-                    } else {
-                        //更新配置文件
-                        set_addon_fullconfig($name, $config);
-                        Service::refresh();
-                    }
-                } catch (Exception $e) {
-                    $this->error(__($e->getMessage()));
-                }
-                $this->success();
-            }
-            $this->error(__('Parameter %s can not be empty', ''));
-        }
-        $tips = [];
-        $groupList = [];
-        foreach ($config as $index => &$item) {
-            //如果有设置分组
-            if (isset($item['group']) && $item['group']) {
-                if (!in_array($item['group'], $groupList)) {
-                    $groupList["custom" . (count($groupList) + 1)] = $item['group'];
-                }
-            }
-            if ($item['name'] == '__tips__') {
-                $tips = $item;
-                unset($config[$index]);
-            }
-        }
-        $groupList['other'] = '其它';
-        $this->view->assign("groupList", $groupList);
-        $this->view->assign("addon", ['info' => $info, 'config' => $config, 'tips' => $tips]);
-        $configFile = ADDON_PATH . $name . DS . 'config.html';
-        $viewFile = is_file($configFile) ? $configFile : '';
-        return $this->view->fetch($viewFile);
-    }
-
-    /**
-     * 安装
-     */
-    public function install()
-    {
-        $name = $this->request->post("name");
-        $force = (int)$this->request->post("force");
-        if (!$name) {
-            $this->error(__('Parameter %s can not be empty', 'name'));
-        }
-        if (!preg_match("/^[a-zA-Z0-9]+$/", $name)) {
-            $this->error(__('Addon name incorrect'));
-        }
-
-        $info = [];
-        try {
-            $uid = $this->request->post("uid");
-            $token = $this->request->post("token");
-            $version = $this->request->post("version");
-            $faversion = $this->request->post("faversion");
-            $extend = [
-                'uid'       => $uid,
-                'token'     => $token,
-                'version'   => $version,
-                'faversion' => $faversion
-            ];
-            $info = Service::install($name, $force, $extend);
-        } catch (AddonException $e) {
-            $this->result($e->getData(), $e->getCode(), __($e->getMessage()));
-        } catch (Exception $e) {
-            $this->error(__($e->getMessage()), $e->getCode());
-        }
-        $this->success(__('Install successful'), '', ['addon' => $info]);
-    }
-
-    /**
-     * 卸载
-     */
-    public function uninstall()
-    {
-        $name = $this->request->post("name");
-        $force = (int)$this->request->post("force");
-        $droptables = (int)$this->request->post("droptables");
-        if (!$name) {
-            $this->error(__('Parameter %s can not be empty', 'name'));
-        }
-        if (!preg_match("/^[a-zA-Z0-9]+$/", $name)) {
-            $this->error(__('Addon name incorrect'));
-        }
-        //只有开启调试且为超级管理员才允许删除相关数据库
-        $tables = [];
-        if ($droptables && Config::get("app_debug") && $this->auth->isSuperAdmin()) {
-            $tables = get_addon_tables($name);
-        }
-        try {
-            Service::uninstall($name, $force);
-            if ($tables) {
-                $prefix = Config::get('database.prefix');
-                //删除插件关联表
-                foreach ($tables as $index => $table) {
-                    //忽略非插件标识的表名
-                    if (!preg_match("/^{$prefix}{$name}/", $table)) {
-                        continue;
-                    }
-                    Db::execute("DROP TABLE IF EXISTS `{$table}`");
-                }
-            }
-        } catch (AddonException $e) {
-            $this->result($e->getData(), $e->getCode(), __($e->getMessage()));
-        } catch (Exception $e) {
-            $this->error(__($e->getMessage()));
-        }
-        $this->success(__('Uninstall successful'));
-    }
-
-    /**
-     * 禁用启用
-     */
-    public function state()
-    {
-        $name = $this->request->post("name");
-        $action = $this->request->post("action");
-        $force = (int)$this->request->post("force");
-        if (!$name) {
-            $this->error(__('Parameter %s can not be empty', 'name'));
-        }
-        if (!preg_match("/^[a-zA-Z0-9]+$/", $name)) {
-            $this->error(__('Addon name incorrect'));
-        }
-        try {
-            $action = $action == 'enable' ? $action : 'disable';
-            //调用启用、禁用的方法
-            Service::$action($name, $force);
-            Cache::rm('__menu__');
-        } catch (AddonException $e) {
-            $this->result($e->getData(), $e->getCode(), __($e->getMessage()));
-        } catch (Exception $e) {
-            $this->error(__($e->getMessage()));
-        }
-        $this->success(__('Operate successful'));
-    }
-
-    /**
-     * 本地上传
-     */
-    public function local()
-    {
-        Config::set('default_return_type', 'json');
-
-        $info = [];
-        $file = $this->request->file('file');
-        try {
-            $uid = $this->request->post("uid");
-            $token = $this->request->post("token");
-            $faversion = $this->request->post("faversion");
-            if (!$uid || !$token) {
-                throw new Exception(__('Please login and try to install'));
-            }
-            $extend = [
-                'uid'       => $uid,
-                'token'     => $token,
-                'faversion' => $faversion
-            ];
-            $info = Service::local($file, $extend);
-        } catch (AddonException $e) {
-            $this->result($e->getData(), $e->getCode(), __($e->getMessage()));
-        } catch (Exception $e) {
-            $this->error(__($e->getMessage()));
-        }
-        $this->success(__('Offline installed tips'), '', ['addon' => $info]);
-    }
-
-    /**
-     * 更新插件
-     */
-    public function upgrade()
-    {
-        $name = $this->request->post("name");
-        $addonTmpDir = RUNTIME_PATH . 'addons' . DS;
-        if (!$name) {
-            $this->error(__('Parameter %s can not be empty', 'name'));
-        }
-        if (!preg_match("/^[a-zA-Z0-9]+$/", $name)) {
-            $this->error(__('Addon name incorrect'));
-        }
-        if (!is_dir($addonTmpDir)) {
-            @mkdir($addonTmpDir, 0755, true);
-        }
-
-        $info = [];
-        try {
-            $uid = $this->request->post("uid");
-            $token = $this->request->post("token");
-            $version = $this->request->post("version");
-            $faversion = $this->request->post("faversion");
-            $extend = [
-                'uid'       => $uid,
-                'token'     => $token,
-                'version'   => $version,
-                'faversion' => $faversion
-            ];
-            //调用更新的方法
-            $info = Service::upgrade($name, $extend);
-            Cache::rm('__menu__');
-        } catch (AddonException $e) {
-            $this->result($e->getData(), $e->getCode(), __($e->getMessage()));
-        } catch (Exception $e) {
-            $this->error(__($e->getMessage()));
-        }
-        $this->success(__('Operate successful'), '', ['addon' => $info]);
-    }
-
-    /**
-     * 测试数据
-     */
-    public function testdata()
-    {
-        $name = $this->request->post("name");
-        if (!$name) {
-            $this->error(__('Parameter %s can not be empty', 'name'));
-        }
-        if (!preg_match("/^[a-zA-Z0-9]+$/", $name)) {
-            $this->error(__('Addon name incorrect'));
-        }
-
-        try {
-            Service::importsql($name, 'testdata.sql');
-        } catch (AddonException $e) {
-            $this->result($e->getData(), $e->getCode(), __($e->getMessage()));
-        } catch (Exception $e) {
-            $this->error(__($e->getMessage()), $e->getCode());
-        }
-        $this->success(__('Import successful'), '');
-    }
-
-    /**
-     * 已装插件
-     */
-    public function downloaded()
-    {
-        $offset = (int)$this->request->get("offset");
-        $limit = (int)$this->request->get("limit");
-        $filter = $this->request->get("filter");
-        $search = $this->request->get("search");
-        $search = htmlspecialchars(strip_tags($search));
-        $onlineaddons = $this->getAddonList();
-        $filter = (array)json_decode($filter, true);
-        $addons = get_addon_list();
-        $list = [];
-        foreach ($addons as $k => $v) {
-            if ($search && stripos($v['name'], $search) === false && stripos($v['title'], $search) === false && stripos($v['intro'], $search) === false) {
-                continue;
-            }
-
-            if (isset($onlineaddons[$v['name']])) {
-                $v = array_merge($v, $onlineaddons[$v['name']]);
-                $v['price'] = '-';
-            } else {
-                $v['category_id'] = 0;
-                $v['flag'] = '';
-                $v['banner'] = '';
-                $v['image'] = '';
-                $v['donateimage'] = '';
-                $v['demourl'] = '';
-                $v['price'] = __('None');
-                $v['screenshots'] = [];
-                $v['releaselist'] = [];
-                $v['url'] = addon_url($v['name']);
-                $v['url'] = str_replace($this->request->server('SCRIPT_NAME'), '', $v['url']);
-            }
-            $v['createtime'] = filemtime(ADDON_PATH . $v['name']);
-            if ($filter && isset($filter['category_id']) && is_numeric($filter['category_id']) && $filter['category_id'] != $v['category_id']) {
-                continue;
-            }
-            $list[] = $v;
-        }
-        $total = count($list);
-        if ($limit) {
-            $list = array_slice($list, $offset, $limit);
-        }
-        $result = array("total" => $total, "rows" => $list);
-
-        $callback = $this->request->get('callback') ? "jsonp" : "json";
-        return $callback($result);
-    }
-
-    /**
-     * 检测
-     */
-    public function isbuy()
-    {
-        $name = $this->request->post("name");
-        $uid = $this->request->post("uid");
-        $token = $this->request->post("token");
-        $version = $this->request->post("version");
-        $faversion = $this->request->post("faversion");
-        $extend = [
-            'uid'       => $uid,
-            'token'     => $token,
-            'version'   => $version,
-            'faversion' => $faversion
-        ];
-        try {
-            $result = Service::isBuy($name, $extend);
-        } catch (Exception $e) {
-            $this->error(__($e->getMessage()));
-        }
-        return json($result);
-    }
-
-    /**
-     * 刷新授权
-     */
-    public function authorization()
-    {
-        $params = [
-            'uid'       => $this->request->post('uid'),
-            'token'     => $this->request->post('token'),
-            'faversion' => $this->request->post('faversion'),
-        ];
-        try {
-            Service::authorization($params);
-        } catch (Exception $e) {
-            $this->error(__($e->getMessage()));
-        }
-        $this->success(__('Operate successful'));
-    }
-
-    /**
-     * 获取插件相关表
-     */
-    public function get_table_list()
-    {
-        $name = $this->request->post("name");
-        if (!preg_match("/^[a-zA-Z0-9]+$/", $name)) {
-            $this->error(__('Addon name incorrect'));
-        }
-        $tables = get_addon_tables($name);
-        $prefix = Config::get('database.prefix');
-        foreach ($tables as $index => $table) {
-            //忽略非插件标识的表名
-            if (!preg_match("/^{$prefix}{$name}/", $table)) {
-                unset($tables[$index]);
-            }
-        }
-        $tables = array_values($tables);
-        $this->success('', null, ['tables' => $tables]);
-    }
-
-    protected function getAddonList()
-    {
-        $onlineaddons = Cache::get("onlineaddons");
-        if (!is_array($onlineaddons) && config('fastadmin.api_url')) {
-            $onlineaddons = [];
-            $params = [
-                'uid'       => $this->request->post('uid'),
-                'token'     => $this->request->post('token'),
-                'version'   => config('fastadmin.version'),
-                'faversion' => config('fastadmin.version'),
-            ];
-            $json = [];
-            try {
-                $json = Service::addons($params);
-            } catch (\Exception $e) {
-
-            }
-            $rows = isset($json['rows']) ? $json['rows'] : [];
-            foreach ($rows as $index => $row) {
-                $onlineaddons[$row['name']] = $row;
-            }
-            Cache::set("onlineaddons", $onlineaddons, 600);
-        }
-        return $onlineaddons;
-    }
-
-}

+ 0 - 84
application/application/admin/controller/Dashboard.php

@@ -1,84 +0,0 @@
-<?php
-
-namespace app\admin\controller;
-
-use app\admin\model\Admin;
-use app\admin\model\User;
-use app\common\controller\Backend;
-use app\common\model\Attachment;
-use fast\Date;
-use think\Db;
-
-/**
- * 控制台
- *
- * @icon   fa fa-dashboard
- * @remark 用于展示当前系统中的统计数据、统计报表及重要实时数据
- */
-class Dashboard extends Backend
-{
-
-    /**
-     * 查看
-     */
-    public function index()
-    {
-        try {
-            \think\Db::execute("SET @@sql_mode='';");
-        } catch (\Exception $e) {
-
-        }
-        $column = [];
-        $starttime = Date::unixtime('day', -6);
-        $endtime = Date::unixtime('day', 0, 'end');
-        $joinlist = Db("user")->where('jointime', 'between time', [$starttime, $endtime])
-            ->field('jointime, status, COUNT(*) AS nums, DATE_FORMAT(FROM_UNIXTIME(jointime), "%Y-%m-%d") AS join_date')
-            ->group('join_date')
-            ->select();
-        for ($time = $starttime; $time <= $endtime;) {
-            $column[] = date("Y-m-d", $time);
-            $time += 86400;
-        }
-        $userlist = array_fill_keys($column, 0);
-        foreach ($joinlist as $k => $v) {
-            $userlist[$v['join_date']] = $v['nums'];
-        }
-
-        $dbTableList = Db::query("SHOW TABLE STATUS");
-        $addonList = get_addon_list();
-        $totalworkingaddon = 0;
-        $totaladdon = count($addonList);
-        foreach ($addonList as $index => $item) {
-            if ($item['state']) {
-                $totalworkingaddon += 1;
-            }
-        }
-        $this->view->assign([
-            'totaluser'         => User::count(),
-            'totaladdon'        => $totaladdon,
-            'totaladmin'        => Admin::count(),
-            'totalcategory'     => \app\common\model\Category::count(),
-            'todayusersignup'   => User::whereTime('jointime', 'today')->count(),
-            'todayuserlogin'    => User::whereTime('logintime', 'today')->count(),
-            'sevendau'          => User::whereTime('jointime|logintime|prevtime', '-7 days')->count(),
-            'thirtydau'         => User::whereTime('jointime|logintime|prevtime', '-30 days')->count(),
-            'threednu'          => User::whereTime('jointime', '-3 days')->count(),
-            'sevendnu'          => User::whereTime('jointime', '-7 days')->count(),
-            'dbtablenums'       => count($dbTableList),
-            'dbsize'            => array_sum(array_map(function ($item) {
-                return $item['Data_length'] + $item['Index_length'];
-            }, $dbTableList)),
-            'totalworkingaddon' => $totalworkingaddon,
-            'attachmentnums'    => Attachment::count(),
-            'attachmentsize'    => Attachment::sum('filesize'),
-            'picturenums'       => Attachment::where('mimetype', 'like', 'image/%')->count(),
-            'picturesize'       => Attachment::where('mimetype', 'like', 'image/%')->sum('filesize'),
-        ]);
-
-        $this->assignconfig('column', array_keys($userlist));
-        $this->assignconfig('userdata', array_values($userlist));
-
-        return $this->view->fetch();
-    }
-
-}

+ 0 - 138
application/application/admin/controller/Index.php

@@ -1,138 +0,0 @@
-<?php
-
-namespace app\admin\controller;
-
-use app\admin\model\AdminLog;
-use app\common\controller\Backend;
-use think\Config;
-use think\Hook;
-use think\Session;
-use think\Validate;
-
-/**
- * 后台首页
- * @internal
- */
-class Index extends Backend
-{
-
-    protected $noNeedLogin = ['login'];
-    protected $noNeedRight = ['index', 'logout'];
-    protected $layout = '';
-
-    public function _initialize()
-    {
-        parent::_initialize();
-        //移除HTML标签
-        $this->request->filter('trim,strip_tags,htmlspecialchars');
-    }
-
-    /**
-     * 后台首页
-     */
-    public function index()
-    {
-        $cookieArr = ['adminskin' => "/^skin\-([a-z\-]+)\$/i", 'multiplenav' => "/^(0|1)\$/", 'multipletab' => "/^(0|1)\$/", 'show_submenu' => "/^(0|1)\$/"];
-        foreach ($cookieArr as $key => $regex) {
-            $cookieValue = $this->request->cookie($key);
-            if (!is_null($cookieValue) && preg_match($regex, $cookieValue)) {
-                config('fastadmin.' . $key, $cookieValue);
-            }
-        }
-        //左侧菜单
-        list($menulist, $navlist, $fixedmenu, $referermenu) = $this->auth->getSidebar([
-            'dashboard' => 'hot',
-            'addon'     => ['new', 'red', 'badge'],
-            'auth/rule' => __('Menu'),
-            'general'   => ['new', 'purple'],
-        ], $this->view->site['fixedpage']);
-        $action = $this->request->request('action');
-        if ($this->request->isPost()) {
-            if ($action == 'refreshmenu') {
-                $this->success('', null, ['menulist' => $menulist, 'navlist' => $navlist]);
-            }
-        }
-        $this->assignconfig('cookie', ['prefix' => config('cookie.prefix')]);
-        $this->view->assign('menulist', $menulist);
-        $this->view->assign('navlist', $navlist);
-        $this->view->assign('fixedmenu', $fixedmenu);
-        $this->view->assign('referermenu', $referermenu);
-        $this->view->assign('title', __('Home'));
-        return $this->view->fetch();
-    }
-
-    /**
-     * 管理员登录
-     */
-    public function login()
-    {
-        $url = $this->request->get('url', 'index/index');
-        if ($this->auth->isLogin()) {
-            $this->success(__("You've logged in, do not login again"), $url);
-        }
-        if ($this->request->isPost()) {
-            $username = $this->request->post('username');
-            $password = $this->request->post('password');
-            $keeplogin = $this->request->post('keeplogin');
-            $token = $this->request->post('__token__');
-            $rule = [
-                'username'  => 'require|length:3,30',
-                'password'  => 'require|length:3,30',
-                '__token__' => 'require|token',
-            ];
-            $data = [
-                'username'  => $username,
-                'password'  => $password,
-                '__token__' => $token,
-            ];
-            if (Config::get('fastadmin.login_captcha')) {
-                $rule['captcha'] = 'require|captcha';
-                $data['captcha'] = $this->request->post('captcha');
-            }
-            $validate = new Validate($rule, [], ['username' => __('Username'), 'password' => __('Password'), 'captcha' => __('Captcha')]);
-            $result = $validate->check($data);
-            if (!$result) {
-                $this->error($validate->getError(), $url, ['token' => $this->request->token()]);
-            }
-            AdminLog::setTitle(__('Login'));
-            $result = $this->auth->login($username, $password, $keeplogin ? 86400 : 0);
-            if ($result === true) {
-                Hook::listen("admin_login_after", $this->request);
-                $this->success(__('Login successful'), $url, ['url' => $url, 'id' => $this->auth->id, 'username' => $username, 'avatar' => $this->auth->avatar]);
-            } else {
-                $msg = $this->auth->getError();
-                $msg = $msg ? $msg : __('Username or password is incorrect');
-                $this->error($msg, $url, ['token' => $this->request->token()]);
-            }
-        }
-
-        // 根据客户端的cookie,判断是否可以自动登录
-        if ($this->auth->autologin()) {
-            Session::delete("referer");
-            $this->redirect($url);
-        }
-        $background = Config::get('fastadmin.login_background');
-        $background = $background ? (stripos($background, 'http') === 0 ? $background : config('site.cdnurl') . $background) : '';
-        $this->view->assign('background', $background);
-        $this->view->assign('title', __('Login'));
-        Hook::listen("admin_login_init", $this->request);
-        return $this->view->fetch();
-    }
-
-    /**
-     * 退出登录
-     */
-    public function logout()
-    {
-        if ($this->request->isPost()) {
-            $this->auth->logout();
-            Hook::listen("admin_logout_after", $this->request);
-            $this->success(__('Logout successful'), 'index/login');
-        }
-        $html = "<form id='logout_submit' name='logout_submit' action='' method='post'>" . token() . "<input type='submit' value='ok' style='display:none;'></form>";
-        $html .= "<script>document.forms['logout_submit'].submit();</script>";
-
-        return $html;
-    }
-
-}

+ 0 - 296
application/application/admin/controller/auth/Admin.php

@@ -1,296 +0,0 @@
-<?php
-
-namespace app\admin\controller\auth;
-
-use app\admin\model\AuthGroup;
-use app\admin\model\AuthGroupAccess;
-use app\common\controller\Backend;
-use fast\Random;
-use fast\Tree;
-use think\Db;
-use think\Validate;
-
-/**
- * 管理员管理
- *
- * @icon   fa fa-users
- * @remark 一个管理员可以有多个角色组,左侧的菜单根据管理员所拥有的权限进行生成
- */
-class Admin extends Backend
-{
-
-    /**
-     * @var \app\admin\model\Admin
-     */
-    protected $model = null;
-    protected $selectpageFields = 'id,username,nickname,avatar';
-    protected $searchFields = 'id,username,nickname';
-    protected $childrenGroupIds = [];
-    protected $childrenAdminIds = [];
-
-    public function _initialize()
-    {
-        parent::_initialize();
-        $this->model = model('Admin');
-
-        $this->childrenAdminIds = $this->auth->getChildrenAdminIds($this->auth->isSuperAdmin());
-        $this->childrenGroupIds = $this->auth->getChildrenGroupIds($this->auth->isSuperAdmin());
-
-        $groupList = collection(AuthGroup::where('id', 'in', $this->childrenGroupIds)->select())->toArray();
-
-        Tree::instance()->init($groupList);
-        $groupdata = [];
-        if ($this->auth->isSuperAdmin()) {
-            $result = Tree::instance()->getTreeList(Tree::instance()->getTreeArray(0));
-            foreach ($result as $k => $v) {
-                $groupdata[$v['id']] = $v['name'];
-            }
-        } else {
-            $result = [];
-            $groups = $this->auth->getGroups();
-            foreach ($groups as $m => $n) {
-                $childlist = Tree::instance()->getTreeList(Tree::instance()->getTreeArray($n['id']));
-                $temp = [];
-                foreach ($childlist as $k => $v) {
-                    $temp[$v['id']] = $v['name'];
-                }
-                $result[__($n['name'])] = $temp;
-            }
-            $groupdata = $result;
-        }
-
-        $this->view->assign('groupdata', $groupdata);
-        $this->assignconfig("admin", ['id' => $this->auth->id]);
-    }
-
-    /**
-     * 查看
-     */
-    public function index()
-    {
-        //设置过滤方法
-        $this->request->filter(['strip_tags', 'trim']);
-        if ($this->request->isAjax()) {
-            //如果发送的来源是Selectpage,则转发到Selectpage
-            if ($this->request->request('keyField')) {
-                return $this->selectpage();
-            }
-            $childrenGroupIds = $this->childrenGroupIds;
-            $groupName = AuthGroup::where('id', 'in', $childrenGroupIds)
-                ->column('id,name');
-            $authGroupList = AuthGroupAccess::where('group_id', 'in', $childrenGroupIds)
-                ->field('uid,group_id')
-                ->select();
-
-            $adminGroupName = [];
-            foreach ($authGroupList as $k => $v) {
-                if (isset($groupName[$v['group_id']])) {
-                    $adminGroupName[$v['uid']][$v['group_id']] = $groupName[$v['group_id']];
-                }
-            }
-            $groups = $this->auth->getGroups();
-            foreach ($groups as $m => $n) {
-                $adminGroupName[$this->auth->id][$n['id']] = $n['name'];
-            }
-            list($where, $sort, $order, $offset, $limit) = $this->buildparams();
-
-            $list = $this->model
-                ->where($where)
-                ->where('id', 'in', $this->childrenAdminIds)
-                ->field(['password', 'salt', 'token'], true)
-                ->order($sort, $order)
-                ->paginate($limit);
-
-            foreach ($list as $k => &$v) {
-                $groups = isset($adminGroupName[$v['id']]) ? $adminGroupName[$v['id']] : [];
-                $v['groups'] = implode(',', array_keys($groups));
-                $v['groups_text'] = implode(',', array_values($groups));
-            }
-            unset($v);
-            $result = array("total" => $list->total(), "rows" => $list->items());
-
-            return json($result);
-        }
-        return $this->view->fetch();
-    }
-
-    /**
-     * 添加
-     */
-    public function add()
-    {
-        if ($this->request->isPost()) {
-            $this->token();
-            $params = $this->request->post("row/a");
-            if ($params) {
-                Db::startTrans();
-                try {
-                    if (!Validate::is($params['password'], '\S{6,30}')) {
-                        exception(__("Please input correct password"));
-                    }
-                    $params['salt'] = Random::alnum();
-                    $params['password'] = md5(md5($params['password']) . $params['salt']);
-                    $params['avatar'] = '/assets/img/avatar.png'; //设置新管理员默认头像。
-                    $result = $this->model->validate('Admin.add')->save($params);
-                    if ($result === false) {
-                        exception($this->model->getError());
-                    }
-                    $group = $this->request->post("group/a");
-
-                    //过滤不允许的组别,避免越权
-                    $group = array_intersect($this->childrenGroupIds, $group);
-                    if (!$group) {
-                        exception(__('The parent group exceeds permission limit'));
-                    }
-
-                    $dataset = [];
-                    foreach ($group as $value) {
-                        $dataset[] = ['uid' => $this->model->id, 'group_id' => $value];
-                    }
-                    model('AuthGroupAccess')->saveAll($dataset);
-                    Db::commit();
-                } catch (\Exception $e) {
-                    Db::rollback();
-                    $this->error($e->getMessage());
-                }
-                $this->success();
-            }
-            $this->error(__('Parameter %s can not be empty', ''));
-        }
-        return $this->view->fetch();
-    }
-
-    /**
-     * 编辑
-     */
-    public function edit($ids = null)
-    {
-        $row = $this->model->get(['id' => $ids]);
-        if (!$row) {
-            $this->error(__('No Results were found'));
-        }
-        if (!in_array($row->id, $this->childrenAdminIds)) {
-            $this->error(__('You have no permission'));
-        }
-        if ($this->request->isPost()) {
-            $this->token();
-            $params = $this->request->post("row/a");
-            if ($params) {
-                Db::startTrans();
-                try {
-                    if ($params['password']) {
-                        if (!Validate::is($params['password'], '\S{6,30}')) {
-                            exception(__("Please input correct password"));
-                        }
-                        $params['salt'] = Random::alnum();
-                        $params['password'] = md5(md5($params['password']) . $params['salt']);
-                    } else {
-                        unset($params['password'], $params['salt']);
-                    }
-                    //这里需要针对username和email做唯一验证
-                    $adminValidate = \think\Loader::validate('Admin');
-                    $adminValidate->rule([
-                        'username' => 'require|regex:\w{3,30}|unique:admin,username,' . $row->id,
-                        'email'    => 'require|email|unique:admin,email,' . $row->id,
-                        'password' => 'regex:\S{32}',
-                    ]);
-                    $result = $row->validate('Admin.edit')->save($params);
-                    if ($result === false) {
-                        exception($row->getError());
-                    }
-
-                    // 先移除所有权限
-                    model('AuthGroupAccess')->where('uid', $row->id)->delete();
-
-                    $group = $this->request->post("group/a");
-
-                    // 过滤不允许的组别,避免越权
-                    $group = array_intersect($this->childrenGroupIds, $group);
-                    if (!$group) {
-                        exception(__('The parent group exceeds permission limit'));
-                    }
-
-                    $dataset = [];
-                    foreach ($group as $value) {
-                        $dataset[] = ['uid' => $row->id, 'group_id' => $value];
-                    }
-                    model('AuthGroupAccess')->saveAll($dataset);
-                    Db::commit();
-                } catch (\Exception $e) {
-                    Db::rollback();
-                    $this->error($e->getMessage());
-                }
-                $this->success();
-            }
-            $this->error(__('Parameter %s can not be empty', ''));
-        }
-        $grouplist = $this->auth->getGroups($row['id']);
-        $groupids = [];
-        foreach ($grouplist as $k => $v) {
-            $groupids[] = $v['id'];
-        }
-        $this->view->assign("row", $row);
-        $this->view->assign("groupids", $groupids);
-        return $this->view->fetch();
-    }
-
-    /**
-     * 删除
-     */
-    public function del($ids = "")
-    {
-        if (!$this->request->isPost()) {
-            $this->error(__("Invalid parameters"));
-        }
-        $ids = $ids ? $ids : $this->request->post("ids");
-        if ($ids) {
-            $ids = array_intersect($this->childrenAdminIds, array_filter(explode(',', $ids)));
-            // 避免越权删除管理员
-            $childrenGroupIds = $this->childrenGroupIds;
-            $adminList = $this->model->where('id', 'in', $ids)->where('id', 'in', function ($query) use ($childrenGroupIds) {
-                $query->name('auth_group_access')->where('group_id', 'in', $childrenGroupIds)->field('uid');
-            })->select();
-            if ($adminList) {
-                $deleteIds = [];
-                foreach ($adminList as $k => $v) {
-                    $deleteIds[] = $v->id;
-                }
-                $deleteIds = array_values(array_diff($deleteIds, [$this->auth->id]));
-                if ($deleteIds) {
-                    Db::startTrans();
-                    try {
-                        $this->model->destroy($deleteIds);
-                        model('AuthGroupAccess')->where('uid', 'in', $deleteIds)->delete();
-                        Db::commit();
-                    } catch (\Exception $e) {
-                        Db::rollback();
-                        $this->error($e->getMessage());
-                    }
-                    $this->success();
-                }
-                $this->error(__('No rows were deleted'));
-            }
-        }
-        $this->error(__('You have no permission'));
-    }
-
-    /**
-     * 批量更新
-     * @internal
-     */
-    public function multi($ids = "")
-    {
-        // 管理员禁止批量操作
-        $this->error();
-    }
-
-    /**
-     * 下拉搜索
-     */
-    public function selectpage()
-    {
-        $this->dataLimit = 'auth';
-        $this->dataLimitField = 'id';
-        return parent::selectpage();
-    }
-}

+ 0 - 12
application/application/admin/lang/zh-cn/auth/admin.php

@@ -1,12 +0,0 @@
-<?php
-
-return [
-    'Group'                                     => '所属组别',
-    'Loginfailure'                              => '登录失败次数',
-    'Login time'                                => '最后登录',
-    'The parent group exceeds permission limit' => '父组别超出权限范围',
-    'Please input correct username'             => '用户名只能由3-30位数字、字母、下划线组合',
-    'Username must be 3 to 30 characters'       => '用户名只能由3-30位数字、字母、下划线组合',
-    'Please input correct password'             => '密码长度必须在6-30位之间,不能包含空格',
-    'Password must be 6 to 30 characters'       => '密码长度必须在6-30位之间,不能包含空格',
-];

+ 0 - 50
application/application/admin/lang/zh-cn/dashboard.php

@@ -1,50 +0,0 @@
-<?php
-
-return [
-    'Custom'                   => '自定义',
-    'Pid'                      => '父ID',
-    'Type'                     => '栏目类型',
-    'Image'                    => '图片',
-    'Total user'               => '总会员数',
-    'Total addon'              => '总插件数',
-    'Total category'           => '总分类数',
-    'Total attachment'         => '总附件数',
-    'Total admin'              => '总管理员数',
-    'Today user signup'        => '今日注册',
-    'Today user login'         => '今日登录',
-    'Today order'              => '今日订单',
-    'Unsettle order'           => '未处理订单',
-    'Three dnu'                => '三日新增',
-    'Seven dnu'                => '七日新增',
-    'Seven dau'                => '七日活跃',
-    'Thirty dau'               => '月活跃',
-    'Custom zone'              => '这里是你的自定义数据',
-    'Register user'            => '注册用户数',
-    'Real time'                => '实时',
-    'Category count'           => '分类统计',
-    'Working addon count'      => '运行中的插件',
-    'Category count tips'      => '当前分类总记录数',
-    'Working addon count tips' => '当前运行中的插件数',
-    'Database count'           => '数据库统计',
-    'Database table nums'      => '数据表数量',
-    'Database size'            => '占用空间',
-    'Attachment count'         => '附件统计',
-    'Attachment nums'          => '附件数量',
-    'Attachment size'          => '附件大小',
-    'Attachment count tips'    => '当前上传的附件数量',
-    'Picture count'            => '图片统计',
-    'Picture nums'             => '图片数量',
-    'Picture size'             => '图片大小',
-    'Server info'              => '服务器信息',
-    'PHP version'              => 'PHP版本',
-    'Sapi name'                => '运行方式',
-    'Debug mode'               => '调试模式',
-    'Software'                 => '环境信息',
-    'Upload mode'              => '上传模式',
-    'Upload url'               => '上传URL',
-    'Upload cdn url'           => '上传CDN',
-    'Cdn url'                  => '静态资源CDN',
-    'Timezone'                 => '时区',
-    'Language'                 => '语言',
-    'View more'                => '查看更多',
-];

+ 0 - 83
application/application/admin/lang/zh-cn/general/config.php

@@ -1,83 +0,0 @@
-<?php
-
-return [
-    'Name'                                 => '变量名',
-    'Tip'                                  => '提示信息',
-    'Group'                                => '分组',
-    'Type'                                 => '类型',
-    'Title'                                => '变量标题',
-    'Value'                                => '变量值',
-    'Basic'                                => '基础配置',
-    'Email'                                => '邮件配置',
-    'Attachment'                           => '附件配置',
-    'Dictionary'                           => '字典配置',
-    'User'                                 => '会员配置',
-    'Example'                              => '示例分组',
-    'Extend'                               => '扩展属性',
-    'String'                               => '字符',
-    'Password'                             => '密码',
-    'Text'                                 => '文本',
-    'Editor'                               => '编辑器',
-    'Number'                               => '数字',
-    'Date'                                 => '日期',
-    'Time'                                 => '时间',
-    'Datetime'                             => '日期时间',
-    'Datetimerange'                        => '日期时间区间',
-    'Image'                                => '图片',
-    'Images'                               => '图片(多)',
-    'File'                                 => '文件',
-    'Files'                                => '文件(多)',
-    'Select'                               => '列表',
-    'Selects'                              => '列表(多选)',
-    'Switch'                               => '开关',
-    'Checkbox'                             => '复选',
-    'Radio'                                => '单选',
-    'Array'                                => '数组',
-    'Array key'                            => '键名',
-    'Array value'                          => '键值',
-    'City'                                 => '城市地区',
-    'Selectpage'                           => '关联表',
-    'Selectpages'                          => '关联表(多选)',
-    'Custom'                               => '自定义',
-    'Please select table'                  => '关联表',
-    'Selectpage table'                     => '关联表',
-    'Selectpage primarykey'                => '存储字段',
-    'Selectpage field'                     => '显示字段',
-    'Selectpage conditions'                => '筛选条件',
-    'Field title'                          => '字段名',
-    'Field value'                          => '字段值',
-    'Content'                              => '数据列表',
-    'Rule'                                 => '校验规则',
-    'Visible condition'                    => '可见条件',
-    'Site name'                            => '站点名称',
-    'Beian'                                => '备案号',
-    'Cdn url'                              => 'CDN地址',
-    'Version'                              => '版本号',
-    'Timezone'                             => '时区',
-    'Forbidden ip'                         => '禁止IP',
-    'Languages'                            => '语言',
-    'Fixed page'                           => '后台固定页',
-    'Category type'                        => '分类类型',
-    'Config group'                         => '配置分组',
-    'Attachment category'                  => '附件类别',
-    'Category1'                            => '分类一',
-    'Category2'                            => '分类二',
-    'Rule tips'                            => '校验规则使用请参考Nice-validator文档',
-    'Extend tips'                          => '扩展属性支持{id}、{name}、{group}、{title}、{value}、{content}、{rule}替换',
-    'Mail type'                            => '邮件发送方式',
-    'Mail smtp host'                       => 'SMTP服务器',
-    'Mail smtp port'                       => 'SMTP端口',
-    'Mail smtp user'                       => 'SMTP用户名',
-    'Mail smtp password'                   => 'SMTP密码',
-    'Mail vertify type'                    => 'SMTP验证方式',
-    'Mail from'                            => '发件人邮箱',
-    'Site name incorrect'                  => '网站名称错误',
-    'Name already exist'                   => '变量名称已经存在',
-    'Add new config'                       => '点击添加新的配置',
-    'Send a test message'                  => '发送测试邮件',
-    'Only work at development environment' => '只允许在开发环境开操作',
-    'This is a test mail content'          => '这是一封来自%s的校验邮件,用于校验邮件配置是否正常!',
-    'This is a test mail'                  => '这是一封来自%s的邮件',
-    'Please input your email'              => '请输入测试接收者邮箱',
-    'Please input correct email'           => '请输入正确的邮箱地址',
-];

+ 0 - 14
application/application/admin/lang/zh-cn/general/profile.php

@@ -1,14 +0,0 @@
-<?php
-
-return [
-    'Url'                                         => '链接',
-    'Userame'                                     => '用户名',
-    'Createtime'                                  => '操作时间',
-    'Click to edit'                               => '点击编辑',
-    'Admin log'                                   => '操作日志',
-    'Leave password blank if dont want to change' => '不修改密码请留空',
-    'Please input correct email'                  => '请输入正确的Email地址',
-    'Please input correct password'               => '密码长度必须在6-30位之间,不能包含空格',
-    'Password must be 6 to 30 characters'         => '密码长度必须在6-30位之间,不能包含空格',
-    'Email already exists'                        => '邮箱已经存在',
-];

+ 0 - 530
application/application/admin/library/Auth.php

@@ -1,530 +0,0 @@
-<?php
-
-namespace app\admin\library;
-
-use app\admin\model\Admin;
-use fast\Random;
-use fast\Tree;
-use think\Config;
-use think\Cookie;
-use think\Hook;
-use think\Request;
-use think\Session;
-
-class Auth extends \fast\Auth
-{
-    protected $_error = '';
-    protected $requestUri = '';
-    protected $breadcrumb = [];
-    protected $logined = false; //登录状态
-
-    public function __construct()
-    {
-        parent::__construct();
-    }
-
-    public function __get($name)
-    {
-        return Session::get('admin.' . $name);
-    }
-
-    /**
-     * 管理员登录
-     *
-     * @param string $username 用户名
-     * @param string $password 密码
-     * @param int    $keeptime 有效时长
-     * @return  boolean
-     */
-    public function login($username, $password, $keeptime = 0)
-    {
-        $admin = Admin::get(['username' => $username]);
-        if (!$admin) {
-            $this->setError('Username is incorrect');
-            return false;
-        }
-        if ($admin['status'] == 'hidden') {
-            $this->setError('Admin is forbidden');
-            return false;
-        }
-        if (Config::get('fastadmin.login_failure_retry') && $admin->loginfailure >= 10 && time() - $admin->updatetime < 86400) {
-            $this->setError('Please try again after 1 day');
-            return false;
-        }
-        if ($admin->password != md5(md5($password) . $admin->salt)) {
-            $admin->loginfailure++;
-            $admin->save();
-            $this->setError('Password is incorrect');
-            return false;
-        }
-        $admin->loginfailure = 0;
-        $admin->logintime = time();
-        $admin->loginip = request()->ip();
-        $admin->token = Random::uuid();
-        $admin->save();
-        Session::set("admin", $admin->toArray());
-        $this->keeplogin($keeptime);
-        return true;
-    }
-
-    /**
-     * 退出登录
-     */
-    public function logout()
-    {
-        $admin = Admin::get(intval($this->id));
-        if ($admin) {
-            $admin->token = '';
-            $admin->save();
-        }
-        $this->logined = false; //重置登录状态
-        Session::delete("admin");
-        Cookie::delete("keeplogin");
-        return true;
-    }
-
-    /**
-     * 自动登录
-     * @return boolean
-     */
-    public function autologin()
-    {
-        $keeplogin = Cookie::get('keeplogin');
-        if (!$keeplogin) {
-            return false;
-        }
-        list($id, $keeptime, $expiretime, $key) = explode('|', $keeplogin);
-        if ($id && $keeptime && $expiretime && $key && $expiretime > time()) {
-            $admin = Admin::get($id);
-            if (!$admin || !$admin->token) {
-                return false;
-            }
-            //token有变更
-            if ($key != md5(md5($id) . md5($keeptime) . md5($expiretime) . $admin->token . config('token.key'))) {
-                return false;
-            }
-            $ip = request()->ip();
-            //IP有变动
-            if ($admin->loginip != $ip) {
-                return false;
-            }
-            Session::set("admin", $admin->toArray());
-            //刷新自动登录的时效
-            $this->keeplogin($keeptime);
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * 刷新保持登录的Cookie
-     *
-     * @param int $keeptime
-     * @return  boolean
-     */
-    protected function keeplogin($keeptime = 0)
-    {
-        if ($keeptime) {
-            $expiretime = time() + $keeptime;
-            $key = md5(md5($this->id) . md5($keeptime) . md5($expiretime) . $this->token . config('token.key'));
-            $data = [$this->id, $keeptime, $expiretime, $key];
-            Cookie::set('keeplogin', implode('|', $data), 86400 * 7);
-            return true;
-        }
-        return false;
-    }
-
-    public function check($name, $uid = '', $relation = 'or', $mode = 'url')
-    {
-        $uid = $uid ? $uid : $this->id;
-        return parent::check($name, $uid, $relation, $mode);
-    }
-
-    /**
-     * 检测当前控制器和方法是否匹配传递的数组
-     *
-     * @param array $arr 需要验证权限的数组
-     * @return bool
-     */
-    public function match($arr = [])
-    {
-        $request = Request::instance();
-        $arr = is_array($arr) ? $arr : explode(',', $arr);
-        if (!$arr) {
-            return false;
-        }
-
-        $arr = array_map('strtolower', $arr);
-        // 是否存在
-        if (in_array(strtolower($request->action()), $arr) || in_array('*', $arr)) {
-            return true;
-        }
-
-        // 没找到匹配
-        return false;
-    }
-
-    /**
-     * 检测是否登录
-     *
-     * @return boolean
-     */
-    public function isLogin()
-    {
-        if ($this->logined) {
-            return true;
-        }
-        $admin = Session::get('admin');
-        if (!$admin) {
-            return false;
-        }
-        //判断是否同一时间同一账号只能在一个地方登录
-        if (Config::get('fastadmin.login_unique')) {
-            $my = Admin::get($admin['id']);
-            if (!$my || $my['token'] != $admin['token']) {
-                $this->logined = false; //重置登录状态
-                Session::delete("admin");
-                Cookie::delete("keeplogin");
-                return false;
-            }
-        }
-        //判断管理员IP是否变动
-        if (Config::get('fastadmin.loginip_check')) {
-            if (!isset($admin['loginip']) || $admin['loginip'] != request()->ip()) {
-                $this->logout();
-                return false;
-            }
-        }
-        $this->logined = true;
-        return true;
-    }
-
-    /**
-     * 获取当前请求的URI
-     * @return string
-     */
-    public function getRequestUri()
-    {
-        return $this->requestUri;
-    }
-
-    /**
-     * 设置当前请求的URI
-     * @param string $uri
-     */
-    public function setRequestUri($uri)
-    {
-        $this->requestUri = $uri;
-    }
-
-    public function getGroups($uid = null)
-    {
-        $uid = is_null($uid) ? $this->id : $uid;
-        return parent::getGroups($uid);
-    }
-
-    public function getRuleList($uid = null)
-    {
-        $uid = is_null($uid) ? $this->id : $uid;
-        return parent::getRuleList($uid);
-    }
-
-    public function getUserInfo($uid = null)
-    {
-        $uid = is_null($uid) ? $this->id : $uid;
-
-        return $uid != $this->id ? Admin::get(intval($uid)) : Session::get('admin');
-    }
-
-    public function getRuleIds($uid = null)
-    {
-        $uid = is_null($uid) ? $this->id : $uid;
-        return parent::getRuleIds($uid);
-    }
-
-    public function isSuperAdmin()
-    {
-        return in_array('*', $this->getRuleIds()) ? true : false;
-    }
-
-    /**
-     * 获取管理员所属于的分组ID
-     * @param int $uid
-     * @return array
-     */
-    public function getGroupIds($uid = null)
-    {
-        $groups = $this->getGroups($uid);
-        $groupIds = [];
-        foreach ($groups as $K => $v) {
-            $groupIds[] = (int)$v['group_id'];
-        }
-        return $groupIds;
-    }
-
-    /**
-     * 取出当前管理员所拥有权限的分组
-     * @param boolean $withself 是否包含当前所在的分组
-     * @return array
-     */
-    public function getChildrenGroupIds($withself = false)
-    {
-        //取出当前管理员所有的分组
-        $groups = $this->getGroups();
-        $groupIds = [];
-        foreach ($groups as $k => $v) {
-            $groupIds[] = $v['id'];
-        }
-        $originGroupIds = $groupIds;
-        foreach ($groups as $k => $v) {
-            if (in_array($v['pid'], $originGroupIds)) {
-                $groupIds = array_diff($groupIds, [$v['id']]);
-                unset($groups[$k]);
-            }
-        }
-        // 取出所有分组
-        $groupList = \app\admin\model\AuthGroup::where(['status' => 'normal'])->select();
-        $objList = [];
-        foreach ($groups as $k => $v) {
-            if ($v['rules'] === '*') {
-                $objList = $groupList;
-                break;
-            }
-            // 取出包含自己的所有子节点
-            $childrenList = Tree::instance()->init($groupList, 'pid')->getChildren($v['id'], true);
-            $obj = Tree::instance()->init($childrenList, 'pid')->getTreeArray($v['pid']);
-            $objList = array_merge($objList, Tree::instance()->getTreeList($obj));
-        }
-        $childrenGroupIds = [];
-        foreach ($objList as $k => $v) {
-            $childrenGroupIds[] = $v['id'];
-        }
-        if (!$withself) {
-            $childrenGroupIds = array_diff($childrenGroupIds, $groupIds);
-        }
-        return $childrenGroupIds;
-    }
-
-    /**
-     * 取出当前管理员所拥有权限的管理员
-     * @param boolean $withself 是否包含自身
-     * @return array
-     */
-    public function getChildrenAdminIds($withself = false)
-    {
-        $childrenAdminIds = [];
-        if (!$this->isSuperAdmin()) {
-            $groupIds = $this->getChildrenGroupIds(false);
-            $authGroupList = \app\admin\model\AuthGroupAccess::
-            field('uid,group_id')
-                ->where('group_id', 'in', $groupIds)
-                ->select();
-            foreach ($authGroupList as $k => $v) {
-                $childrenAdminIds[] = $v['uid'];
-            }
-        } else {
-            //超级管理员拥有所有人的权限
-            $childrenAdminIds = Admin::column('id');
-        }
-        if ($withself) {
-            if (!in_array($this->id, $childrenAdminIds)) {
-                $childrenAdminIds[] = $this->id;
-            }
-        } else {
-            $childrenAdminIds = array_diff($childrenAdminIds, [$this->id]);
-        }
-        return $childrenAdminIds;
-    }
-
-    /**
-     * 获得面包屑导航
-     * @param string $path
-     * @return array
-     */
-    public function getBreadCrumb($path = '')
-    {
-        if ($this->breadcrumb || !$path) {
-            return $this->breadcrumb;
-        }
-        $titleArr = [];
-        $menuArr = [];
-        $urlArr = explode('/', $path);
-        foreach ($urlArr as $index => $item) {
-            $pathArr[implode('/', array_slice($urlArr, 0, $index + 1))] = $index;
-        }
-        if (!$this->rules && $this->id) {
-            $this->getRuleList();
-        }
-        foreach ($this->rules as $rule) {
-            if (isset($pathArr[$rule['name']])) {
-                $rule['title'] = __($rule['title']);
-                $rule['url'] = url($rule['name']);
-                $titleArr[$pathArr[$rule['name']]] = $rule['title'];
-                $menuArr[$pathArr[$rule['name']]] = $rule;
-            }
-
-        }
-        ksort($menuArr);
-        $this->breadcrumb = $menuArr;
-        return $this->breadcrumb;
-    }
-
-    /**
-     * 获取左侧和顶部菜单栏
-     *
-     * @param array  $params    URL对应的badge数据
-     * @param string $fixedPage 默认页
-     * @return array
-     */
-    public function getSidebar($params = [], $fixedPage = 'dashboard')
-    {
-        // 边栏开始
-        Hook::listen("admin_sidebar_begin", $params);
-        $colorArr = ['red', 'green', 'yellow', 'blue', 'teal', 'orange', 'purple'];
-        $colorNums = count($colorArr);
-        $badgeList = [];
-        $module = request()->module();
-        // 生成菜单的badge
-        foreach ($params as $k => $v) {
-            $url = $k;
-            if (is_array($v)) {
-                $nums = isset($v[0]) ? $v[0] : 0;
-                $color = isset($v[1]) ? $v[1] : $colorArr[(is_numeric($nums) ? $nums : strlen($nums)) % $colorNums];
-                $class = isset($v[2]) ? $v[2] : 'label';
-            } else {
-                $nums = $v;
-                $color = $colorArr[(is_numeric($nums) ? $nums : strlen($nums)) % $colorNums];
-                $class = 'label';
-            }
-            //必须nums大于0才显示
-            if ($nums) {
-                $badgeList[$url] = '<small class="' . $class . ' pull-right bg-' . $color . '">' . $nums . '</small>';
-            }
-        }
-
-        // 读取管理员当前拥有的权限节点
-        $userRule = $this->getRuleList();
-        $selected = $referer = [];
-        $refererUrl = Session::get('referer');
-        // 必须将结果集转换为数组
-        $ruleList = collection(\app\admin\model\AuthRule::where('status', 'normal')
-            ->where('ismenu', 1)
-            ->order('weigh', 'desc')
-            ->cache("__menu__")
-            ->select())->toArray();
-        $indexRuleList = \app\admin\model\AuthRule::where('status', 'normal')
-            ->where('ismenu', 0)
-            ->where('name', 'like', '%/index')
-            ->column('name,pid');
-        $pidArr = array_unique(array_filter(array_column($ruleList, 'pid')));
-        foreach ($ruleList as $k => &$v) {
-            if (!in_array($v['name'], $userRule)) {
-                unset($ruleList[$k]);
-                continue;
-            }
-            $indexRuleName = $v['name'] . '/index';
-            if (isset($indexRuleList[$indexRuleName]) && !in_array($indexRuleName, $userRule)) {
-                unset($ruleList[$k]);
-                continue;
-            }
-            $v['icon'] = $v['icon'] . ' fa-fw';
-            $v['url'] = isset($v['url']) && $v['url'] ? $v['url'] : '/' . $module . '/' . $v['name'];
-            $v['badge'] = isset($badgeList[$v['name']]) ? $badgeList[$v['name']] : '';
-            $v['title'] = __($v['title']);
-            $v['url'] = preg_match("/^((?:[a-z]+:)?\/\/|data:image\/)(.*)/i", $v['url']) ? $v['url'] : url($v['url']);
-            $v['menuclass'] = in_array($v['menutype'], ['dialog', 'ajax']) ? 'btn-' . $v['menutype'] : '';
-            $v['menutabs'] = !$v['menutype'] || in_array($v['menutype'], ['default', 'addtabs']) ? 'addtabs="' . $v['id'] . '"' : '';
-            $selected = $v['name'] == $fixedPage ? $v : $selected;
-            $referer = $v['url'] == $refererUrl ? $v : $referer;
-        }
-        $lastArr = array_unique(array_filter(array_column($ruleList, 'pid')));
-        $pidDiffArr = array_diff($pidArr, $lastArr);
-        foreach ($ruleList as $index => $item) {
-            if (in_array($item['id'], $pidDiffArr)) {
-                unset($ruleList[$index]);
-            }
-        }
-        if ($selected == $referer) {
-            $referer = [];
-        }
-
-        $select_id = $referer ? $referer['id'] : ($selected ? $selected['id'] : 0);
-        $menu = $nav = '';
-        $showSubmenu = config('fastadmin.show_submenu');
-        if (Config::get('fastadmin.multiplenav')) {
-            $topList = [];
-            foreach ($ruleList as $index => $item) {
-                if (!$item['pid']) {
-                    $topList[] = $item;
-                }
-            }
-            $selectParentIds = [];
-            $tree = Tree::instance();
-            $tree->init($ruleList);
-            if ($select_id) {
-                $selectParentIds = $tree->getParentsIds($select_id, true);
-            }
-            foreach ($topList as $index => $item) {
-                $childList = Tree::instance()->getTreeMenu(
-                    $item['id'],
-                    '<li class="@class" pid="@pid"><a @extend href="@url@addtabs" addtabs="@id" class="@menuclass" 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' . ($showSubmenu ? ' menu-open' : '') . '"'
-                );
-                $current = in_array($item['id'], $selectParentIds);
-                $url = $childList ? 'javascript:;' : $item['url'];
-                $addtabs = $childList || !$url ? "" : (stripos($url, "?") !== false ? "&" : "?") . "ref=addtabs";
-                $childList = str_replace(
-                    '" pid="' . $item['id'] . '"',
-                    ' ' . ($current ? '' : 'hidden') . '" pid="' . $item['id'] . '"',
-                    $childList
-                );
-                $nav .= '<li class="' . ($current ? 'active' : '') . '"><a ' . $item['extend'] . ' href="' . $url . $addtabs . '" ' . $item['menutabs'] . ' class="' . $item['menuclass'] . '" url="' . $url . '" title="' . $item['title'] . '"><i class="' . $item['icon'] . '"></i> <span>' . $item['title'] . '</span> <span class="pull-right-container"> </span></a> </li>';
-                $menu .= $childList;
-            }
-        } else {
-            // 构造菜单数据
-            Tree::instance()->init($ruleList);
-            $menu = Tree::instance()->getTreeMenu(
-                0,
-                '<li class="@class"><a @extend href="@url@addtabs" @menutabs class="@menuclass" 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' . ($showSubmenu ? ' menu-open' : '') . '"'
-            );
-            if ($selected) {
-                $nav .= '<li role="presentation" id="tab_' . $selected['id'] . '" class="' . ($referer ? '' : 'active') . '"><a href="#con_' . $selected['id'] . '" node-id="' . $selected['id'] . '" aria-controls="' . $selected['id'] . '" role="tab" data-toggle="tab"><i class="' . $selected['icon'] . ' fa-fw"></i> <span>' . $selected['title'] . '</span> </a></li>';
-            }
-            if ($referer) {
-                $nav .= '<li role="presentation" id="tab_' . $referer['id'] . '" class="active"><a href="#con_' . $referer['id'] . '" node-id="' . $referer['id'] . '" aria-controls="' . $referer['id'] . '" role="tab" data-toggle="tab"><i class="' . $referer['icon'] . ' fa-fw"></i> <span>' . $referer['title'] . '</span> </a> <i class="close-tab fa fa-remove"></i></li>';
-            }
-        }
-
-        return [$menu, $nav, $selected, $referer];
-    }
-
-    /**
-     * 设置错误信息
-     *
-     * @param string $error 错误信息
-     * @return Auth
-     */
-    public function setError($error)
-    {
-        $this->_error = $error;
-        return $this;
-    }
-
-    /**
-     * 获取错误信息
-     * @return string
-     */
-    public function getError()
-    {
-        return $this->_error ? __($this->_error) : '';
-    }
-}

+ 0 - 55
application/application/admin/validate/Admin.php

@@ -1,55 +0,0 @@
-<?php
-
-namespace app\admin\validate;
-
-use think\Validate;
-
-class Admin extends Validate
-{
-
-    /**
-     * 验证规则
-     */
-    protected $rule = [
-        'username' => 'require|regex:\w{3,30}|unique:admin',
-        'nickname' => 'require',
-        'password' => 'require|regex:\S{32}',
-        'email'    => 'require|email|unique:admin,email',
-    ];
-
-    /**
-     * 提示消息
-     */
-    protected $message = [
-    ];
-
-    /**
-     * 字段描述
-     */
-    protected $field = [
-    ];
-
-    /**
-     * 验证场景
-     */
-    protected $scene = [
-        'add'  => ['username', 'email', 'nickname', 'password'],
-        'edit' => ['username', 'email', 'nickname', 'password'],
-    ];
-
-    public function __construct(array $rules = [], $message = [], $field = [])
-    {
-        $this->field = [
-            'username' => __('Username'),
-            'nickname' => __('Nickname'),
-            'password' => __('Password'),
-            'email'    => __('Email'),
-        ];
-        $this->message = array_merge($this->message, [
-            'username.regex' => __('Please input correct username'),
-            'password.regex' => __('Please input correct password')
-        ]);
-        parent::__construct($rules, $message, $field);
-    }
-
-}

+ 0 - 134
application/application/admin/view/addon/config.html

@@ -1,134 +0,0 @@
-<form id="config-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="">
-    {if $addon.tips && $addon.tips.value}
-    <div class="alert {$addon.tips.extend|default='alert-info-light'}" style="margin-bottom:10px;">
-        {if $addon.tips.title}
-        <b>{$addon.tips.title}</b><br>
-        {/if}
-        {$addon.tips.value}
-    </div>
-    {/if}
-
-    <div class="panel panel-default panel-intro">
-        {if count($groupList)>1}
-        <div class="panel-heading mb-3">
-            <ul class="nav nav-tabs nav-group">
-                <li class="active"><a href="#all" data-toggle="tab">全部</a></li>
-                {foreach name="groupList" id="tab"}
-                    <li><a href="#tab-{$key}" title="{$tab}" data-toggle="tab">{$tab}</a></li>
-                {/foreach}
-            </ul>
-        </div>
-        {/if}
-
-        <div class="panel-body no-padding">
-            <div id="myTabContent" class="tab-content">
-                {foreach name="groupList" id="group" key="groupName"}
-                <div class="tab-pane fade active in" id="tab-{$groupName}">
-
-                    <table class="table table-striped table-config mb-0">
-                        <tbody>
-                        {foreach name="$addon.config" id="item"}
-                        {if ((!isset($item['group']) || $item['group']=='') && $groupName=='other') || (isset($item['group']) && $item['group']==$group)}
-                        <tr data-favisible="{$item.visible|default=''|htmlentities}" data-name="{$item.name}" class="{if $item.visible??''}hidden{/if}">
-                            <td width="15%">{$item.title}</td>
-                            <td>
-                                <div class="row">
-                                    <div class="col-sm-8 col-xs-12">
-                                        {switch $item.type}
-                                        {case string}
-                                        <input {$item.extend} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule}" data-tip="{$item.tip}"/>
-                                        {/case}
-                                        {case password}
-                                        <input {$item.extend} type="password" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule}" data-tip="{$item.tip}"/>
-                                        {/case}
-                                        {case text}
-                                        <textarea {$item.extend} name="row[{$item.name}]" class="form-control" data-rule="{$item.rule}" rows="5" data-tip="{$item.tip}">{$item.value|htmlentities}</textarea>
-                                        {/case}
-                                        {case array}
-                                        <dl class="fieldlist" data-name="row[{$item.name}]">
-                                            <dd>
-                                                <ins>{:__('Array key')}</ins>
-                                                <ins>{:__('Array value')}</ins>
-                                            </dd>
-                                            <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
-                                            <textarea name="row[{$item.name}]" cols="30" rows="5" class="hide">{$item.value|json_encode|htmlentities}</textarea>
-                                        </dl>
-                                        {/case}
-                                        {case date}
-                                        <input {$item.extend} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
-                                        {/case}
-                                        {case time}
-                                        <input {$item.extend} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
-                                        {/case}
-                                        {case datetime}
-                                        <input {$item.extend} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
-                                        {/case}
-                                        {case number}
-                                        <input {$item.extend} type="number" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
-                                        {/case}
-                                        {case checkbox}
-                                        {foreach name="item.content" item="vo"}
-                                        <label for="row[{$item.name}][]-{$key}"><input id="row[{$item.name}][]-{$key}" name="row[{$item.name}][]" type="checkbox" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value" }checked{/in} /> {$vo}</label>
-                                        {/foreach}
-                                        <span class="msg-box n-right" for="c-{$item.name}"></span>
-                                        {/case}
-                                        {case radio}
-                                        {foreach name="item.content" item="vo"}
-                                        <label for="row[{$item.name}]-{$key}"><input id="row[{$item.name}]-{$key}" name="row[{$item.name}]" type="radio" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value" }checked{/in} /> {$vo}</label>
-                                        {/foreach}
-                                        <span class="msg-box n-right" for="c-{$item.name}"></span>
-                                        {/case}
-                                        {case value="select" break="0"}{/case}
-                                        {case value="selects"}
-                                        <select {$item.extend} name="row[{$item.name}]{$item.type=='selects'?'[]':''}" class="form-control selectpicker" data-tip="{$item.tip}" {$item.type=='selects'?'multiple':''}>
-                                            {foreach name="item.content" item="vo"}
-                                            <option value="{$key}" {in name="key" value="$item.value" }selected{/in}>{$vo}</option>
-                                            {/foreach}
-                                        </select>
-                                        {/case}
-                                        {case value="image" break="0"}{/case}
-                                        {case value="images"}
-                                        <div class="form-inline">
-                                            <input id="c-{$item.name}" class="form-control" size="35" name="row[{$item.name}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip}">
-                                            <span><button type="button" id="plupload-{$item.name}" class="btn btn-danger plupload" data-input-id="c-{$item.name}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}" data-preview-id="p-{$item.name}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
-                                            <span><button type="button" id="fachoose-{$item.name}" class="btn btn-primary fachoose" data-input-id="c-{$item.name}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
-                                            <ul class="row list-inline plupload-preview" id="p-{$item.name}"></ul>
-                                        </div>
-                                        {/case}
-                                        {case value="file" break="0"}{/case}
-                                        {case value="files"}
-                                        <div class="form-inline">
-                                            <input id="c-{$item.name}" class="form-control" size="35" name="row[{$item.name}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip}">
-                                            <span><button type="button" id="plupload-{$item.name}" class="btn btn-danger plupload" data-input-id="c-{$item.name}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
-                                            <span><button type="button" id="fachoose-{$item.name}" class="btn btn-primary fachoose" data-input-id="c-{$item.name}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
-                                        </div>
-                                        {/case}
-                                        {case bool}
-                                        <label for="row[{$item.name}]-yes"><input id="row[{$item.name}]-yes" name="row[{$item.name}]" type="radio" value="1" {$item.value?'checked':''} data-tip="{$item.tip}" /> {:__('Yes')}</label>
-                                        <label for="row[{$item.name}]-no"><input id="row[{$item.name}]-no" name="row[{$item.name}]" type="radio" value="0" {$item.value?'':'checked'} data-tip="{$item.tip}" /> {:__('No')}</label>
-                                        {/case}
-                                        {default /}{$item.value}
-                                        {/switch}
-                                    </div>
-                                    <div class="col-sm-4"></div>
-                                </div>
-
-                            </td>
-                        </tr>
-                        {/if}
-                        {/foreach}
-                        </tbody>
-                    </table>
-                </div>
-                {/foreach}
-                <div class="form-group layer-footer">
-                    <label class="control-label col-xs-12 col-sm-2" style="width:15%;"></label>
-                    <div class="col-xs-12 col-sm-8">
-                        <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
-                        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</form>

+ 0 - 21
application/application/admin/view/auth/admin/index.html

@@ -1,21 +0,0 @@
-<div class="panel panel-default panel-intro">
-    {:build_heading()}
-
-    <div class="panel-body">
-        <div id="myTabContent" class="tab-content">
-            <div class="tab-pane fade active in" id="one">
-                <div class="widget-body no-padding">
-                    <div id="toolbar" class="toolbar">
-                        {:build_toolbar('refresh,add,delete')}
-                    </div>
-                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
-                           data-operate-edit="{:$auth->check('auth/admin/edit')}"
-                           data-operate-del="{:$auth->check('auth/admin/del')}"
-                           width="100%">
-                    </table>
-                </div>
-            </div>
-
-        </div>
-    </div>
-</div>

+ 0 - 21
application/application/admin/view/auth/adminlog/index.html

@@ -1,21 +0,0 @@
-<div class="panel panel-default panel-intro">
-    {:build_heading()}
-
-    <div class="panel-body">
-        <div id="myTabContent" class="tab-content">
-            <div class="tab-pane fade active in" id="one">
-                <div class="widget-body no-padding">
-                    <div id="toolbar" class="toolbar">
-                        {:build_toolbar('refresh,delete')}
-                    </div>
-                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
-                           data-operate-detail="{:$auth->check('auth/adminlog/index')}"
-                           data-operate-del="{:$auth->check('auth/adminlog/del')}"
-                           width="100%">
-                    </table>
-                </div>
-            </div>
-
-        </div>
-    </div>
-</div>

+ 0 - 21
application/application/admin/view/auth/group/index.html

@@ -1,21 +0,0 @@
-<div class="panel panel-default panel-intro">
-    {:build_heading()}
-
-    <div class="panel-body">
-        <div id="myTabContent" class="tab-content">
-            <div class="tab-pane fade active in" id="one">
-                <div class="widget-body no-padding">
-                    <div id="toolbar" class="toolbar">
-                        {:build_toolbar('refresh,add,delete')}
-                    </div>
-                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
-                           data-operate-edit="{:$auth->check('auth/group/edit')}"
-                           data-operate-del="{:$auth->check('auth/group/del')}"
-                           width="100%">
-                    </table>
-                </div>
-            </div>
-
-        </div>
-    </div>
-</div>

+ 0 - 36
application/application/admin/view/category/index.html

@@ -1,36 +0,0 @@
-<div class="panel panel-default panel-intro">
-    <div class="panel-heading">
-        {:build_heading(null,FALSE)}
-        <ul class="nav nav-tabs">
-            <li class="active"><a href="#all" data-toggle="tab">{:__('All')}</a></li>
-            {foreach name="typeList" item="vo"}
-                <li><a href="#{$key}" data-toggle="tab">{$vo}</a></li>
-            {/foreach}
-        </ul>
-
-    </div>
-    <div class="panel-body">
-        <div id="myTabContent" class="tab-content">
-            <div class="tab-pane fade active in" id="one">
-                <div class="widget-body no-padding">
-                    <div id="toolbar" class="toolbar">
-                        {:build_toolbar('refresh,add,edit,del')}
-                        <div class="dropdown btn-group {:$auth->check('category/multi')?'':'hide'}">
-                            <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 table-nowrap"
-                           data-operate-edit="{:$auth->check('category/edit')}"
-                           data-operate-del="{:$auth->check('category/del')}"
-                           width="100%">
-                    </table>
-                </div>
-            </div>
-
-        </div>
-    </div>
-</div>

+ 0 - 39
application/application/admin/view/common/menu.html

@@ -1,39 +0,0 @@
-<!-- 左侧菜单栏 -->
-<section class="sidebar">
-    <!-- 管理员信息 -->
-    <div class="user-panel hidden-xs">
-        <div class="pull-left image">
-            <a href="general/profile" class="addtabsit"><img src="{$admin.avatar|cdnurl|htmlentities}" class="img-circle" /></a>
-        </div>
-        <div class="pull-left info">
-            <p>{$admin.nickname|htmlentities}</p>
-            <i class="fa fa-circle text-success"></i> {:__('Online')}
-        </div>
-    </div>
-
-    <!-- 菜单搜索 -->
-    <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>
-
-    <!-- 移动端一级菜单 -->
-    <div class="mobilenav visible-xs">
-
-    </div>
-
-    <!-- 左侧菜单栏 -->
-    <ul class="sidebar-menu {if $Think.config.fastadmin.show_submenu}show-submenu{/if}">
-
-        <!-- 菜单可以在 后台管理->权限管理->菜单规则 中进行增删改排序 -->
-        {$menulist}
-
-    </ul>
-</section>

+ 0 - 403
application/application/admin/view/dashboard/index.html

@@ -1,403 +0,0 @@
-<style type="text/css">
-    .sm-st {
-        background: #fff;
-        padding: 20px;
-        -webkit-border-radius: 3px;
-        -moz-border-radius: 3px;
-        border-radius: 3px;
-        margin-bottom: 20px;
-    }
-
-    .sm-st-icon {
-        width: 60px;
-        height: 60px;
-        display: inline-block;
-        line-height: 60px;
-        text-align: center;
-        font-size: 30px;
-        background: #eee;
-        -webkit-border-radius: 5px;
-        -moz-border-radius: 5px;
-        border-radius: 5px;
-        float: left;
-        margin-right: 10px;
-        color: #fff;
-    }
-
-    .sm-st-info {
-        padding-top: 2px;
-    }
-
-    .sm-st-info span {
-        display: block;
-        font-size: 24px;
-        font-weight: 600;
-    }
-
-    .orange {
-        background: #fa8564 !important;
-    }
-
-    .tar {
-        background: #45cf95 !important;
-    }
-
-    .sm-st .green {
-        background: #86ba41 !important;
-    }
-
-    .pink {
-        background: #AC75F0 !important;
-    }
-
-    .yellow-b {
-        background: #fdd752 !important;
-    }
-
-    .stat-elem {
-
-        background-color: #fff;
-        padding: 18px;
-        border-radius: 40px;
-
-    }
-
-    .stat-info {
-        text-align: center;
-        background-color: #fff;
-        border-radius: 5px;
-        margin-top: -5px;
-        padding: 8px;
-        -webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
-        box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
-        font-style: italic;
-    }
-
-    .stat-icon {
-        text-align: center;
-        margin-bottom: 5px;
-    }
-
-    .st-red {
-        background-color: #F05050;
-    }
-
-    .st-green {
-        background-color: #27C24C;
-    }
-
-    .st-violet {
-        background-color: #7266ba;
-    }
-
-    .st-blue {
-        background-color: #23b7e5;
-    }
-
-    .stats .stat-icon {
-        color: #28bb9c;
-        display: inline-block;
-        font-size: 26px;
-        text-align: center;
-        vertical-align: middle;
-        width: 50px;
-        float: left;
-    }
-
-    .stat {
-        white-space: nowrap;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        display: inline-block;
-    }
-
-    .stat .value {
-        font-size: 20px;
-        line-height: 24px;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        font-weight: 500;
-    }
-
-    .stat .name {
-        overflow: hidden;
-        text-overflow: ellipsis;
-        margin: 5px 0;
-    }
-
-    .stat.lg .value {
-        font-size: 26px;
-        line-height: 28px;
-    }
-
-    .stat-col {
-        margin:0 0 10px 0;
-    }
-    .stat.lg .name {
-        font-size: 16px;
-    }
-
-    .stat-col .progress {
-        height: 2px;
-    }
-
-    .stat-col .progress-bar {
-        line-height: 2px;
-        height: 2px;
-    }
-
-    .item {
-        padding: 30px 0;
-    }
-
-
-    #statistics .panel {
-        min-height: 150px;
-    }
-
-    #statistics .panel h5 {
-        font-size: 14px;
-    }
-</style>
-<div class="panel panel-default panel-intro">
-    <div class="panel-heading">
-        {:build_heading(null, false)}
-        <ul class="nav nav-tabs">
-            <li class="active"><a href="#one" data-toggle="tab">{:__('Dashboard')}</a></li>
-            <li><a href="#two" data-toggle="tab">{:__('Custom')}</a></li>
-        </ul>
-    </div>
-    <div class="panel-body">
-        <div id="myTabContent" class="tab-content">
-            <div class="tab-pane fade active in" id="one">
-
-                <div class="row">
-                    <div class="col-sm-3 col-xs-6">
-                        <div class="sm-st clearfix">
-                            <span class="sm-st-icon st-red"><i class="fa fa-users"></i></span>
-                            <div class="sm-st-info">
-                                <span>{$totaluser}</span>
-                                {:__('Total user')}
-                            </div>
-                        </div>
-                    </div>
-                    <div class="col-sm-3 col-xs-6">
-                        <div class="sm-st clearfix">
-                            <span class="sm-st-icon st-violet"><i class="fa fa-magic"></i></span>
-                            <div class="sm-st-info">
-                                <span>{$totaladdon}</span>
-                                {:__('Total addon')}
-                            </div>
-                        </div>
-                    </div>
-                    <div class="col-sm-3 col-xs-6">
-                        <div class="sm-st clearfix">
-                            <span class="sm-st-icon st-blue"><i class="fa fa-leaf"></i></span>
-                            <div class="sm-st-info">
-                                <span>{$attachmentnums}</span>
-                                {:__('Total attachment')}
-                            </div>
-                        </div>
-                    </div>
-                    <div class="col-sm-3 col-xs-6">
-                        <div class="sm-st clearfix">
-                            <span class="sm-st-icon st-green"><i class="fa fa-user"></i></span>
-                            <div class="sm-st-info">
-                                <span>{$totaladmin}</span>
-                                {:__('Total admin')}
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <div class="row">
-                    <div class="col-lg-8">
-                        <div id="echart" class="btn-refresh" style="height:300px;width:100%;"></div>
-                    </div>
-                    <div class="col-lg-4">
-                        <div class="card sameheight-item stats">
-                            <div class="card-block">
-                                <div class="row row-sm stats-container">
-                                    <div class="col-xs-6 stat-col">
-                                        <div class="stat-icon"><i class="fa fa-rocket"></i></div>
-                                        <div class="stat">
-                                            <div class="value"> {$todayusersignup}</div>
-                                            <div class="name"> {:__('Today user signup')}</div>
-                                        </div>
-                                        <div class="progress">
-                                            <div class="progress-bar progress-bar-success" style="width: 20%"></div>
-                                        </div>
-                                    </div>
-                                    <div class="col-xs-6 stat-col">
-                                        <div class="stat-icon"><i class="fa fa-vcard"></i></div>
-                                        <div class="stat">
-                                            <div class="value"> {$todayuserlogin}</div>
-                                            <div class="name"> {:__('Today user login')}</div>
-                                        </div>
-                                        <div class="progress">
-                                            <div class="progress-bar progress-bar-success" style="width: 20%"></div>
-                                        </div>
-                                    </div>
-                                    <div class="col-xs-6  stat-col">
-                                        <div class="stat-icon"><i class="fa fa-calendar"></i></div>
-                                        <div class="stat">
-                                            <div class="value"> {$threednu}</div>
-                                            <div class="name"> {:__('Three dnu')}</div>
-                                        </div>
-                                        <div class="progress">
-                                            <div class="progress-bar progress-bar-success" style="width: 20%"></div>
-                                        </div>
-                                    </div>
-                                    <div class="col-xs-6 stat-col">
-                                        <div class="stat-icon"><i class="fa fa-calendar-plus-o"></i></div>
-                                        <div class="stat">
-                                            <div class="value"> {$sevendnu}</div>
-                                            <div class="name"> {:__('Seven dnu')}</div>
-                                        </div>
-                                        <div class="progress">
-                                            <div class="progress-bar progress-bar-success" style="width: 20%"></div>
-                                        </div>
-                                    </div>
-                                    <div class="col-xs-6  stat-col">
-                                        <div class="stat-icon"><i class="fa fa-user-circle"></i></div>
-                                        <div class="stat">
-                                            <div class="value"> {$sevendau}</div>
-                                            <div class="name"> {:__('Seven dau')}</div>
-                                        </div>
-                                        <div class="progress">
-                                            <div class="progress-bar progress-bar-success" style="width: 20%"></div>
-                                        </div>
-                                    </div>
-                                    <div class="col-xs-6  stat-col">
-                                        <div class="stat-icon"><i class="fa fa-user-circle-o"></i></div>
-                                        <div class="stat">
-                                            <div class="value"> {$thirtydau}</div>
-                                            <div class="name"> {:__('Thirty dau')}</div>
-                                        </div>
-                                        <div class="progress">
-                                            <div class="progress-bar progress-bar-success" style="width: 20%"></div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <div class="row" style="margin-top:15px;" id="statistics">
-
-                    <div class="col-lg-12">
-                    </div>
-                    <div class="col-xs-6 col-md-3">
-                        <div class="panel bg-blue-gradient no-border">
-                            <div class="panel-body">
-                                <div class="panel-title">
-                                    <span class="label label-primary pull-right">{:__('Real time')}</span>
-                                    <h5>{:__('Working addon count')}</h5>
-                                </div>
-                                <div class="panel-content">
-                                    <div class="row">
-                                        <div class="col-md-12">
-                                            <h1 class="no-margins">{$totalworkingaddon}</h1>
-                                            <div class="font-bold"><i class="fa fa-magic"></i>
-                                                <small>{:__('Working addon count tips')}</small>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="col-xs-6 col-md-3">
-                        <div class="panel bg-teal-gradient no-border">
-                            <div class="panel-body">
-                                <div class="ibox-title">
-                                    <span class="label label-primary pull-right">{:__('Real time')}</span>
-                                    <h5>{:__('Database count')}</h5>
-                                </div>
-                                <div class="ibox-content">
-                                    <div class="row">
-                                        <div class="col-md-6">
-                                            <h1 class="no-margins">{$dbtablenums}</h1>
-                                            <div class="font-bold"><i class="fa fa-database"></i>
-                                                <small>{:__('Database table nums')}</small>
-                                            </div>
-                                        </div>
-                                        <div class="col-md-6">
-                                            <h1 class="no-margins">{$dbsize|format_bytes=###,'',0}</h1>
-                                            <div class="font-bold"><i class="fa fa-filter"></i>
-                                                <small>{:__('Database size')}</small>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-
-                    <div class="col-xs-6 col-md-3">
-                        <div class="panel bg-purple-gradient no-border">
-                            <div class="panel-body">
-                                <div class="ibox-title">
-                                    <span class="label label-primary pull-right">{:__('Real time')}</span>
-                                    <h5>{:__('Attachment count')}</h5>
-                                </div>
-                                <div class="ibox-content">
-
-                                    <div class="row">
-                                        <div class="col-md-6">
-                                            <h1 class="no-margins">{$attachmentnums}</h1>
-                                            <div class="font-bold"><i class="fa fa-files-o"></i>
-                                                <small>{:__('Attachment nums')}</small>
-                                            </div>
-                                        </div>
-                                        <div class="col-md-6">
-                                            <h1 class="no-margins">{$attachmentsize|format_bytes=###,'',0}</h1>
-                                            <div class="font-bold"><i class="fa fa-filter"></i>
-                                                <small>{:__('Attachment size')}</small>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="col-xs-6 col-md-3">
-                        <div class="panel bg-green-gradient no-border">
-                            <div class="panel-body">
-                                <div class="ibox-title">
-                                    <span class="label label-primary pull-right">{:__('Real time')}</span>
-                                    <h5>{:__('Picture count')}</h5>
-                                </div>
-                                <div class="ibox-content">
-
-                                    <div class="row">
-                                        <div class="col-md-6">
-                                            <h1 class="no-margins">{$picturenums}</h1>
-                                            <div class="font-bold"><i class="fa fa-picture-o"></i>
-                                                <small>{:__('Picture nums')}</small>
-                                            </div>
-                                        </div>
-                                        <div class="col-md-6">
-                                            <h1 class="no-margins">{$picturesize|format_bytes=###,'',0}</h1>
-                                            <div class="font-bold"><i class="fa fa-filter"></i>
-                                                <small>{:__('Picture size')}</small>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <div class="tab-pane fade" id="two">
-                <div class="row">
-                    <div class="col-xs-12">
-                        {:__('Custom zone')}
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</div>

+ 0 - 47
application/application/admin/view/general/attachment/select.html

@@ -1,47 +0,0 @@
-<style>
-    #one .commonsearch-table{
-        padding-top:15px!important;
-    }
-</style>
-<div class="panel panel-default panel-intro">
-    <div class="panel-heading">
-        {:build_heading(null,FALSE)}
-        <ul class="nav nav-tabs" data-field="category">
-            <li class="active"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
-            {foreach name="categoryList" item="vo"}
-            <li><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
-            {/foreach}
-            {if stripos(request()->get('mimetype'),'image/')===false}
-            <li class="pull-right dropdown filter-type">
-                <a href="javascript:" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-filter"></i> {:__('Filter Type')}</a>
-                <ul class="dropdown-menu text-left" role="menu">
-                    <li class="active"><a href="javascript:" data-value="">{:__('All')}</a></li>
-                    {foreach name="mimetypeList" id="item"}
-                    <li><a href="javascript:" data-value="{$key}">{$item}</a></li>
-                    {/foreach}
-                </ul>
-            </li>
-            {/if}
-        </ul>
-    </div>
-
-    <div class="panel-body no-padding">
-        <div id="myTabContent" class="tab-content">
-            <div class="tab-pane fade active in" id="one">
-                <div class="widget-body no-padding">
-                    <div id="toolbar" class="toolbar">
-                        {:build_toolbar('refresh')}
-                        <span><button type="button" id="faupload-image" class="btn btn-success faupload" data-mimetype="{$mimetype|default=''|htmlentities}" data-multiple="true"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
-                        {if request()->get('multiple') == 'true'}
-                        <a class="btn btn-danger btn-choose-multi"><i class="fa fa-check"></i> {:__('Choose')}</a>
-                        {/if}
-                    </div>
-                    <table id="table" class="table table-bordered table-hover table-nowrap" width="100%">
-
-                    </table>
-                </div>
-            </div>
-
-        </div>
-    </div>
-</div>

+ 0 - 356
application/application/admin/view/general/config/index.html

@@ -1,356 +0,0 @@
-<style type="text/css">
-    @media (max-width: 375px) {
-        .edit-form tr td input {
-            width: 100%;
-        }
-
-        .edit-form tr th:first-child, .edit-form tr td:first-child {
-            width: 20%;
-        }
-
-        .edit-form tr th:nth-last-of-type(-n+2), .edit-form tr td:nth-last-of-type(-n+2) {
-            display: none;
-        }
-    }
-
-    .edit-form table > tbody > tr td a.btn-delcfg {
-        visibility: hidden;
-    }
-
-    .edit-form table > tbody > tr:hover td a.btn-delcfg {
-        visibility: visible;
-    }
-
-    @media (max-width: 767px) {
-        .edit-form table tr th:nth-last-child(-n + 2), .edit-form table tr td:nth-last-child(-n + 2) {
-            display: none;
-        }
-
-        .edit-form table tr td .msg-box {
-            display: none;
-        }
-    }
-</style>
-<div class="panel panel-default panel-intro">
-    <div class="panel-heading">
-        {:build_heading(null, false)}
-        <ul class="nav nav-tabs">
-            {foreach $siteList as $index=>$vo}
-            <li class="{$vo.active?'active':''}"><a href="#tab-{$vo.name}" data-toggle="tab">{:__($vo.title)}</a></li>
-            {/foreach}
-            {if $Think.config.app_debug}
-            <li data-toggle="tooltip" title="{:__('Add new config')}">
-                <a href="#addcfg" data-toggle="tab"><i class="fa fa-plus"></i></a>
-            </li>
-            {/if}
-        </ul>
-    </div>
-
-    <div class="panel-body">
-        <div id="myTabContent" class="tab-content">
-            <!--@formatter:off-->
-            {foreach $siteList as $index=>$vo}
-            <div class="tab-pane fade {$vo.active ? 'active in' : ''}" id="tab-{$vo.name}">
-                <div class="widget-body no-padding">
-                    <form id="{$vo.name}-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('general.config/edit')}">
-                        {:token()}
-                        <table class="table table-striped">
-                            <thead>
-                            <tr>
-                                <th width="15%">{:__('Title')}</th>
-                                <th width="68%">{:__('Value')}</th>
-                                {if $Think.config.app_debug}
-                                <th width="15%">{:__('Name')}</th>
-                                <th width="2%"></th>
-                                {/if}
-                            </tr>
-                            </thead>
-                            <tbody>
-                            {foreach $vo.list as $item}
-                            <tr data-favisible="{$item.visible|default=''|htmlentities}" data-name="{$item.name}" class="{if $item.visible??''}hidden{/if}">
-                                <td>{$item.title}</td>
-                                <td>
-                                    <div class="row">
-                                        <div class="col-sm-8 col-xs-12">
-                                            {switch $item.type}
-                                            {case string}
-                                            <input {$item.extend_html} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule}" data-tip="{$item.tip}"/>
-                                            {/case}
-                                            {case password}
-                                            <input {$item.extend_html} type="password" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule}" data-tip="{$item.tip}"/>
-                                            {/case}
-                                            {case text}
-                                            <textarea {$item.extend_html} name="row[{$item.name}]" class="form-control" data-rule="{$item.rule}" rows="5" data-tip="{$item.tip}">{$item.value|htmlentities}</textarea>
-                                            {/case}
-                                            {case editor}
-                                            <textarea {$item.extend_html} name="row[{$item.name}]" id="editor-{$item.name}" class="form-control editor" data-rule="{$item.rule}" rows="5" data-tip="{$item.tip}">{$item.value|htmlentities}</textarea>
-                                            {/case}
-                                            {case array}
-                                            <dl {$item.extend_html} class="fieldlist" data-name="row[{$item.name}]">
-                                                <dd>
-                                                    <ins>{:isset($item["setting"]["key"])&&$item["setting"]["key"]?$item["setting"]["key"]:__('Array key')}</ins>
-                                                    <ins>{:isset($item["setting"]["value"])&&$item["setting"]["value"]?$item["setting"]["value"]:__('Array value')}</ins>
-                                                </dd>
-                                                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
-                                                <textarea name="row[{$item.name}]" class="form-control hide" cols="30" rows="5">{$item.value|htmlentities}</textarea>
-                                            </dl>
-                                            {/case}
-                                            {case date}
-                                            <input {$item.extend_html} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
-                                            {/case}
-                                            {case time}
-                                            <input {$item.extend_html} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
-                                            {/case}
-                                            {case datetime}
-                                            <input {$item.extend_html} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
-                                            {/case}
-                                            {case datetimerange}
-                                            <input {$item.extend_html} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimerange" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
-                                            {/case}
-                                            {case number}
-                                            <input {$item.extend_html} type="number" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
-                                            {/case}
-                                            {case checkbox}
-                                            <div class="checkbox">
-                                            {foreach name="item.content" item="vo"}
-                                            <label for="row[{$item.name}][]-{$key}"><input id="row[{$item.name}][]-{$key}" name="row[{$item.name}][]" type="checkbox" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value" }checked{/in} /> {$vo}</label>
-                                            {/foreach}
-                                            </div>
-                                            {/case}
-                                            {case radio}
-                                            <div class="radio">
-                                            {foreach name="item.content" item="vo"}
-                                            <label for="row[{$item.name}]-{$key}"><input id="row[{$item.name}]-{$key}" name="row[{$item.name}]" type="radio" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value" }checked{/in} /> {$vo}</label>
-                                            {/foreach}
-                                            </div>
-                                            {/case}
-                                            {case value="select" break="0"}{/case}
-                                            {case value="selects"}
-                                            <select {$item.extend_html} name="row[{$item.name}]{$item.type=='selects'?'[]':''}" class="form-control selectpicker" data-tip="{$item.tip}" {$item.type=='selects'?'multiple':''}>
-                                                {foreach name="item.content" item="vo"}
-                                                <option value="{$key}" {in name="key" value="$item.value" }selected{/in}>{$vo}</option>
-                                                {/foreach}
-                                            </select>
-                                            {/case}
-                                            {case value="image" break="0"}{/case}
-                                            {case value="images"}
-                                            <div class="form-inline">
-                                                <input id="c-{$item.name}" class="form-control" size="50" name="row[{$item.name}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip}">
-                                                <span><button type="button" id="faupload-{$item.name}" class="btn btn-danger faupload" data-input-id="c-{$item.name}" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="{$item.type=='image'?'false':'true'}" data-preview-id="p-{$item.name}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
-                                                <span><button type="button" id="fachoose-{$item.name}" class="btn btn-primary fachoose" data-input-id="c-{$item.name}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
-                                                <span class="msg-box n-right" for="c-{$item.name}"></span>
-                                                <ul class="row list-inline faupload-preview" id="p-{$item.name}"></ul>
-                                            </div>
-                                            {/case}
-                                            {case value="file" break="0"}{/case}
-                                            {case value="files"}
-                                            <div class="form-inline">
-                                                <input id="c-{$item.name}" class="form-control" size="50" name="row[{$item.name}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip}">
-                                                <span><button type="button" id="faupload-{$item.name}" class="btn btn-danger faupload" data-input-id="c-{$item.name}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
-                                                <span><button type="button" id="fachoose-{$item.name}" class="btn btn-primary fachoose" data-input-id="c-{$item.name}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
-                                                <span class="msg-box n-right" for="c-{$item.name}"></span>
-                                            </div>
-                                            {/case}
-                                            {case switch}
-                                            <input id="c-{$item.name}" name="row[{$item.name}]" type="hidden" value="{:$item.value?1:0}">
-                                            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-{$item.name}" data-yes="1" data-no="0">
-                                                <i class="fa fa-toggle-on text-success {if !$item.value}fa-flip-horizontal text-gray{/if} fa-2x"></i>
-                                            </a>
-                                            {/case}
-                                            {case bool}
-                                            <label for="row[{$item.name}]-yes"><input id="row[{$item.name}]-yes" name="row[{$item.name}]" type="radio" value="1" {$item.value?'checked':''} data-tip="{$item.tip}" /> {:__('Yes')}</label>
-                                            <label for="row[{$item.name}]-no"><input id="row[{$item.name}]-no" name="row[{$item.name}]" type="radio" value="0" {$item.value?'':'checked'} data-tip="{$item.tip}" /> {:__('No')}</label>
-                                            {/case}
-                                            {case city}
-                                            <div style="position:relative">
-                                            <input {$item.extend_html} type="text" name="row[{$item.name}]" id="c-{$item.name}" value="{$item.value|htmlentities}" class="form-control" data-toggle="city-picker" data-tip="{$item.tip}" data-rule="{$item.rule}" />
-                                            </div>
-                                            {/case}
-                                            {case value="selectpage" break="0"}{/case}
-                                            {case value="selectpages"}
-                                            <input {$item.extend_html} type="text" name="row[{$item.name}]" id="c-{$item.name}" value="{$item.value|htmlentities}" class="form-control selectpage" data-source="{:url('general.config/selectpage')}?id={$item.id}" data-primary-key="{$item.setting.primarykey}" data-field="{$item.setting.field}" data-multiple="{$item.type=='selectpage'?'false':'true'}" data-tip="{$item.tip}" data-rule="{$item.rule}" />
-                                            {/case}
-                                            {case custom}
-                                            {$item.extend_html}
-                                            {/case}
-                                            {/switch}
-                                        </div>
-                                        <div class="col-sm-4"></div>
-                                    </div>
-
-                                </td>
-                                {if $Think.config.app_debug}
-                                <td>{php}echo "{\$site.". $item['name'] . "}";{/php}</td>
-                                <td>{if $item['id']>18}<a href="javascript:;" class="btn-delcfg text-muted" data-name="{$item.name}"><i class="fa fa-times"></i></a>{/if}</td>
-                                {/if}
-                            </tr>
-                            {/foreach}
-                            </tbody>
-                            <tfoot>
-                            <tr>
-                                <td></td>
-                                <td>
-                                    <div class="layer-footer">
-                                        <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
-                                        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
-                                    </div>
-                                </td>
-                                {if $Think.config.app_debug}
-                                <td></td>
-                                <td></td>
-                                {/if}
-                            </tr>
-                            </tfoot>
-                        </table>
-                    </form>
-                </div>
-            </div>
-            {/foreach}
-            <div class="tab-pane fade" id="addcfg">
-                <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('general.config/add')}">
-                    {:token()}
-                    <div class="form-group">
-                        <label class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <select name="row[group]" class="form-control selectpicker">
-                                {foreach name="groupList" item="vo"}
-                                <option value="{$key}" {in name="key" value="basic" }selected{/in}>{$vo}</option>
-                                {/foreach}
-                            </select>
-                        </div>
-                    </div>
-                    <div class="form-group">
-                        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <select name="row[type]" id="c-type" class="form-control selectpicker">
-                                {foreach name="typeList" item="vo"}
-                                <option value="{$key}" {in name="key" value="string" }selected{/in}>{$vo}</option>
-                                {/foreach}
-                            </select>
-                        </div>
-                    </div>
-                    <div class="form-group">
-                        <label for="name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <input type="text" class="form-control" id="name" name="row[name]" value="" data-rule="required; length(3~30); remote(general/config/check)"/>
-                        </div>
-                    </div>
-                    <div class="form-group">
-                        <label for="title" class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <input type="text" class="form-control" id="title" name="row[title]" value="" data-rule="required"/>
-                        </div>
-                    </div>
-                    <div class="form-group hidden tf tf-selectpage tf-selectpages">
-                        <label for="c-selectpage-table" class="control-label col-xs-12 col-sm-2">{:__('Selectpage table')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <select id="c-selectpage-table" name="row[setting][table]" class="form-control selectpicker" data-live-search="true">
-                                <option value="">{:__('Please select table')}</option>
-                            </select>
-                        </div>
-                    </div>
-                    <div class="form-group hidden tf tf-selectpage tf-selectpages">
-                        <label for="c-selectpage-primarykey" class="control-label col-xs-12 col-sm-2">{:__('Selectpage primarykey')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <select name="row[setting][primarykey]" class="form-control selectpicker" id="c-selectpage-primarykey"></select>
-                        </div>
-                    </div>
-                    <div class="form-group hidden tf tf-selectpage tf-selectpages">
-                        <label for="c-selectpage-field" class="control-label col-xs-12 col-sm-2">{:__('Selectpage field')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <select name="row[setting][field]" class="form-control selectpicker" id="c-selectpage-field"></select>
-                        </div>
-                    </div>
-                    <div class="form-group hidden tf tf-selectpage tf-selectpages">
-                        <label class="control-label col-xs-12 col-sm-2">{:__('Selectpage conditions')}:</label>
-                        <div class="col-xs-12 col-sm-8">
-                            <dl class="fieldlist" data-name="row[setting][conditions]">
-                                <dd>
-                                    <ins>{:__('Field title')}</ins>
-                                    <ins>{:__('Field value')}</ins>
-                                </dd>
-
-                                <dd><a href="javascript:;" class="append btn btn-sm btn-success"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
-                                <textarea name="row[setting][conditions]" class="form-control hide" cols="30" rows="5"></textarea>
-                            </dl>
-                        </div>
-                    </div>
-                    <div class="form-group hidden tf tf-array">
-                        <label for="c-array-key" class="control-label col-xs-12 col-sm-2">{:__('Array key')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <input type="text" name="row[setting][key]" class="form-control" id="c-array-key">
-                        </div>
-                    </div>
-                    <div class="form-group hidden tf tf-array">
-                        <label for="c-array-value" class="control-label col-xs-12 col-sm-2">{:__('Array value')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <input type="text" name="row[setting][value]" class="form-control" id="c-array-value">
-                        </div>
-                    </div>
-                    <div class="form-group">
-                        <label for="value" class="control-label col-xs-12 col-sm-2">{:__('Value')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <input type="text" class="form-control" id="value" name="row[value]" value="" data-rule=""/>
-                        </div>
-                    </div>
-                    <div class="form-group hide" id="add-content-container">
-                        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <textarea name="row[content]" id="content" cols="30" rows="5" class="form-control" data-rule="required(content)">value1|title1
-value2|title2</textarea>
-                        </div>
-                    </div>
-                    <div class="form-group">
-                        <label for="tip" class="control-label col-xs-12 col-sm-2">{:__('Tip')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <input type="text" class="form-control" id="tip" name="row[tip]" value="" data-rule=""/>
-                        </div>
-                    </div>
-                    <div class="form-group">
-                        <label for="rule" class="control-label col-xs-12 col-sm-2">{:__('Rule')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <div class="input-group pull-left">
-                                <input type="text" class="form-control" id="rule" name="row[rule]" value="" data-tip="{:__('Rule tips')}"/>
-                                <span class="input-group-btn">
-                                    <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown" type="button">{:__('Choose')}</button>
-                                    <ul class="dropdown-menu pull-right rulelist">
-                                        {volist name="ruleList" id="item"}
-                                        <li><a href="javascript:;" data-value="{$key}">{$item}<span class="text-muted">({$key})</span></a></li>
-                                        {/volist}
-                                    </ul>
-                                </span>
-                            </div>
-                            <span class="msg-box n-right" for="rule"></span>
-                        </div>
-                    </div>
-                    <div class="form-group">
-                        <label for="visible" class="control-label col-xs-12 col-sm-2">{:__('Visible condition')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <input type="text" class="form-control" id="visible" name="row[visible]" value="" data-rule=""/>
-                        </div>
-                    </div>
-                    <div class="form-group">
-                        <label for="extend" class="control-label col-xs-12 col-sm-2">{:__('Extend')}:</label>
-                        <div class="col-xs-12 col-sm-4">
-                            <textarea name="row[extend]" id="extend" cols="30" rows="5" class="form-control" data-tip="{:__('Extend tips')}" data-rule="required(extend)" data-msg-extend="当类型为自定义时,扩展属性不能为空"></textarea>
-                        </div>
-                    </div>
-                    <div class="form-group">
-                        <label class="control-label col-xs-12 col-sm-2"></label>
-                        <div class="col-xs-12 col-sm-4">
-                            {if !$Think.config.app_debug}
-                            <button type="button" class="btn btn-primary disabled">{:__('Only work at development environment')}</button>
-                            {else/}
-                            <button type="submit" class="btn btn-primary btn-embossed">{:__('OK')}</button>
-                            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
-                            {/if}
-                        </div>
-                    </div>
-
-                </form>
-
-            </div>
-            <!--@formatter:on-->
-        </div>
-    </div>
-</div>

+ 0 - 115
application/application/admin/view/general/profile/index.html

@@ -1,115 +0,0 @@
-<style>
-    .profile-avatar-container {
-        position: relative;
-        width: 100px;
-        margin: 0 auto;
-    }
-
-    .profile-avatar-container .profile-user-img {
-        width: 100px;
-        height: 100px;
-    }
-
-    .profile-avatar-container .profile-avatar-text {
-        display: none;
-    }
-
-    .profile-avatar-container:hover .profile-avatar-text {
-        display: block;
-        position: absolute;
-        height: 100px;
-        width: 100px;
-        background: #444;
-        opacity: .6;
-        color: #fff;
-        top: 0;
-        left: 0;
-        line-height: 100px;
-        text-align: center;
-    }
-
-    .profile-avatar-container button {
-        position: absolute;
-        top: 0;
-        left: 0;
-        width: 100px;
-        height: 100px;
-        opacity: 0;
-    }
-</style>
-<div class="row animated fadeInRight">
-    <div class="col-md-4">
-        <div class="box box-primary">
-            <div class="panel-heading">
-                {:__('Profile')}
-            </div>
-            <div class="panel-body">
-
-                <form id="update-form" role="form" data-toggle="validator" method="POST" action="{:url('general.profile/update')}">
-                    {:token()}
-                    <input type="hidden" id="c-avatar" name="row[avatar]" value="{$admin.avatar|htmlentities}"/>
-                    <div class="box-body box-profile">
-
-                        <div class="profile-avatar-container">
-                            <img class="profile-user-img img-responsive img-circle" src="{$admin.avatar|cdnurl|htmlentities}" alt="">
-                            <div class="profile-avatar-text img-circle">{:__('Click to edit')}</div>
-                            <button type="button" id="faupload-avatar" class="faupload" data-input-id="c-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button>
-                        </div>
-
-                        <h3 class="profile-username text-center">{$admin.username|htmlentities}</h3>
-
-                        <p class="text-muted text-center">{$admin.email|htmlentities}</p>
-                        <div class="form-group">
-                            <label for="username" class="control-label">{:__('Username')}:</label>
-                            <input type="text" class="form-control" id="username" name="row[username]" value="{$admin.username|htmlentities}" disabled/>
-                        </div>
-                        <div class="form-group">
-                            <label for="email" class="control-label">{:__('Email')}:</label>
-                            <input type="text" class="form-control" id="email" name="row[email]" value="{$admin.email|htmlentities}" data-rule="required;email"/>
-                        </div>
-                        <div class="form-group">
-                            <label for="nickname" class="control-label">{:__('Nickname')}:</label>
-                            <input type="text" class="form-control" id="nickname" name="row[nickname]" value="{$admin.nickname|htmlentities}" data-rule="required"/>
-                        </div>
-                        <div class="form-group">
-                            <label for="password" class="control-label">{:__('Password')}:</label>
-                            <input type="password" class="form-control" id="password" placeholder="{:__('Leave password blank if dont want to change')}" autocomplete="new-password" name="row[password]" value="" data-rule="password"/>
-                        </div>
-                        <div class="form-group">
-                            <button type="submit" class="btn btn-primary">{:__('Submit')}</button>
-                            <button type="reset" class="btn btn-default">{:__('Reset')}</button>
-                        </div>
-
-                    </div>
-                </form>
-            </div>
-        </div>
-
-    </div>
-    <div class="col-md-8">
-        <div class="panel panel-default panel-intro panel-nav">
-            <div class="panel-heading">
-                <ul class="nav nav-tabs">
-                    <li class="active"><a href="#one" data-toggle="tab"><i class="fa fa-list"></i> {:__('Admin log')}</a></li>
-                </ul>
-            </div>
-            <div class="panel-body">
-                <div id="myTabContent" class="tab-content">
-                    <div class="tab-pane fade active in" id="one">
-                        <div class="widget-body no-padding">
-                            <div id="toolbar" class="toolbar">
-                                {:build_toolbar('refresh')}
-                            </div>
-                            <table id="table" class="table table-striped table-bordered table-hover table-nowrap" width="100%">
-
-                            </table>
-
-                        </div>
-                    </div>
-
-                </div>
-            </div>
-        </div>
-
-    </div>
-</div>

+ 0 - 143
application/application/admin/view/index/login.html

@@ -1,143 +0,0 @@
-<!DOCTYPE html>
-<html lang="{$config.language}">
-<head>
-    {include file="common/meta" /}
-
-    <style type="text/css">
-        body {
-            color: #999;
-            background-color: #f1f4fd;
-            background-size: cover;
-        }
-
-        a {
-            color: #444;
-        }
-
-
-        .login-screen {
-            max-width: 430px;
-            padding: 0;
-            margin: 100px auto 0 auto;
-
-        }
-
-        .login-screen .well {
-            border-radius: 3px;
-            -webkit-box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
-            box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
-            background: rgba(255, 255, 255, 1);
-            border: none;
-            overflow: hidden;
-            padding: 0;
-        }
-
-        @media (max-width: 767px) {
-            .login-screen {
-                padding: 0 20px;
-            }
-        }
-
-        .profile-img-card {
-            width: 100px;
-            height: 100px;
-            display: block;
-            -moz-border-radius: 50%;
-            -webkit-border-radius: 50%;
-            border-radius: 50%;
-            margin: -93px auto 30px;
-            border: 5px solid #fff;
-        }
-
-        .profile-name-card {
-            text-align: center;
-        }
-
-        .login-head {
-            background: #899fe1;
-        }
-
-        .login-form {
-            padding: 40px 30px;
-            position: relative;
-            z-index: 99;
-        }
-
-        #login-form {
-            margin-top: 20px;
-        }
-
-        #login-form .input-group {
-            margin-bottom: 15px;
-        }
-
-        #login-form .form-control {
-            font-size: 13px;
-        }
-
-    </style>
-    <!--@formatter:off-->
-    {if $background}
-        <style type="text/css">
-            body{
-                background-image: url('{$background}');
-            }
-        </style>
-    {/if}
-    <!--@formatter:on-->
-</head>
-<body>
-<div class="container">
-    <div class="login-wrapper">
-        <div class="login-screen">
-            <div class="well">
-                <div class="login-head">
-                    <img src="__CDN__/assets/img/login-head.png" style="width:100%;"/>
-                </div>
-                <div class="login-form">
-                    <img id="profile-img" class="profile-img-card" src="__CDN__/assets/img/avatar.png"/>
-                    <p id="profile-name" class="profile-name-card"></p>
-
-                    <form action="" method="post" id="login-form">
-                        <!--@AdminLoginFormBegin-->
-                        <div id="errtips" class="hide"></div>
-                        {:token()}
-                        <div class="input-group">
-                            <div class="input-group-addon"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></div>
-                            <input type="text" class="form-control" id="pd-form-username" placeholder="{:__('Username')}" name="username" autocomplete="off" value="" data-rule="{:__('Username')}:required;username"/>
-                        </div>
-
-                        <div class="input-group">
-                            <div class="input-group-addon"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span></div>
-                            <input type="password" class="form-control" id="pd-form-password" placeholder="{:__('Password')}" name="password" autocomplete="off" value="" data-rule="{:__('Password')}:required;password"/>
-                        </div>
-                        <!--@CaptchaBegin-->
-                        {if $Think.config.fastadmin.login_captcha}
-                        <div class="input-group">
-                            <div class="input-group-addon"><span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span></div>
-                            <input type="text" name="captcha" class="form-control" placeholder="{:__('Captcha')}" data-rule="{:__('Captcha')}:required;length({$Think.config.captcha.length})" autocomplete="off"/>
-                            <span class="input-group-addon" style="padding:0;border:none;cursor:pointer;">
-                                    <img src="{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha" width="100" height="30" onclick="this.src = '{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha&r=' + Math.random();"/>
-                            </span>
-                        </div>
-                        {/if}
-                        <!--@CaptchaEnd-->
-                        <div class="form-group checkbox">
-                            <label class="inline" for="keeplogin">
-                                <input type="checkbox" name="keeplogin" id="keeplogin" value="1"/>
-                                {:__('Keep login')}
-                            </label>
-                        </div>
-                        <div class="form-group">
-                            <button type="submit" class="btn btn-success btn-lg btn-block" style="background:#708eea;">{:__('Sign in')}</button>
-                        </div>
-                        <!--@AdminLoginFormEnd-->
-                    </form>
-                </div>
-            </div>
-        </div>
-    </div>
-</div>
-{include file="common/script" /}
-</body>
-</html>

+ 0 - 28
application/application/admin/view/user/group/index.html

@@ -1,28 +0,0 @@
-<div class="panel panel-default panel-intro">
-    {:build_heading()}
-
-    <div class="panel-body">
-        <div id="myTabContent" class="tab-content">
-            <div class="tab-pane fade active in" id="one">
-                <div class="widget-body no-padding">
-                    <div id="toolbar" class="toolbar">
-                        {:build_toolbar('refresh,add,edit,del')}
-                        <div class="dropdown btn-group {:$auth->check('user/group/multi')?'':'hide'}">
-                            <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 table-nowrap"
-                           data-operate-edit="{:$auth->check('user/group/edit')}"
-                           data-operate-del="{:$auth->check('user/group/del')}"
-                           width="100%">
-                    </table>
-                </div>
-            </div>
-
-        </div>
-    </div>
-</div>

+ 0 - 28
application/application/admin/view/user/rule/index.html

@@ -1,28 +0,0 @@
-<div class="panel panel-default panel-intro">
-    {:build_heading()}
-
-    <div class="panel-body">
-        <div id="myTabContent" class="tab-content">
-            <div class="tab-pane fade active in" id="one">
-                <div class="widget-body no-padding">
-                    <div id="toolbar" class="toolbar">
-                        {:build_toolbar('refresh,add,edit,del')}
-                        <div class="dropdown btn-group {:$auth->check('user/rule/multi')?'':'hide'}">
-                            <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 table-nowrap"
-                           data-operate-edit="{:$auth->check('user/rule/edit')}"
-                           data-operate-del="{:$auth->check('user/rule/del')}"
-                           width="100%">
-                    </table>
-                </div>
-            </div>
-
-        </div>
-    </div>
-</div>

+ 0 - 96
application/application/api/controller/Ems.php

@@ -1,96 +0,0 @@
-<?php
-
-namespace app\api\controller;
-
-use app\common\controller\Api;
-use app\common\library\Ems as Emslib;
-use app\common\model\User;
-use think\Hook;
-
-/**
- * 邮箱验证码接口
- */
-class Ems extends Api
-{
-    protected $noNeedLogin = '*';
-    protected $noNeedRight = '*';
-
-    public function _initialize()
-    {
-        parent::_initialize();
-    }
-
-    /**
-     * 发送验证码
-     *
-     * @ApiMethod (POST)
-     * @param string $email 邮箱
-     * @param string $event 事件名称
-     */
-    public function send()
-    {
-        $email = $this->request->post("email");
-        $event = $this->request->post("event");
-        $event = $event ? $event : 'register';
-
-        $last = Emslib::get($email, $event);
-        if ($last && time() - $last['createtime'] < 60) {
-            $this->error(__('发送频繁'));
-        }
-        if ($event) {
-            $userinfo = User::getByEmail($email);
-            if ($event == 'register' && $userinfo) {
-                //已被注册
-                $this->error(__('已被注册'));
-            } elseif (in_array($event, ['changeemail']) && $userinfo) {
-                //被占用
-                $this->error(__('已被占用'));
-            } elseif (in_array($event, ['changepwd', 'resetpwd']) && !$userinfo) {
-                //未注册
-                $this->error(__('未注册'));
-            }
-        }
-        $ret = Emslib::send($email, null, $event);
-        if ($ret) {
-            $this->success(__('发送成功'));
-        } else {
-            $this->error(__('发送失败'));
-        }
-    }
-
-    /**
-     * 检测验证码
-     *
-     * @ApiMethod (POST)
-     * @param string $email   邮箱
-     * @param string $event   事件名称
-     * @param string $captcha 验证码
-     */
-    public function check()
-    {
-        $email = $this->request->post("email");
-        $event = $this->request->post("event");
-        $event = $event ? $event : 'register';
-        $captcha = $this->request->post("captcha");
-
-        if ($event) {
-            $userinfo = User::getByEmail($email);
-            if ($event == 'register' && $userinfo) {
-                //已被注册
-                $this->error(__('已被注册'));
-            } elseif (in_array($event, ['changeemail']) && $userinfo) {
-                //被占用
-                $this->error(__('已被占用'));
-            } elseif (in_array($event, ['changepwd', 'resetpwd']) && !$userinfo) {
-                //未注册
-                $this->error(__('未注册'));
-            }
-        }
-        $ret = Emslib::check($email, $captcha, $event);
-        if ($ret) {
-            $this->success(__('成功'));
-        } else {
-            $this->error(__('验证码不正确'));
-        }
-    }
-}

+ 0 - 159
application/application/common/library/Ems.php

@@ -1,159 +0,0 @@
-<?php
-
-namespace app\common\library;
-
-use fast\Random;
-use think\Hook;
-
-/**
- * 邮箱验证码类
- */
-class Ems
-{
-
-    /**
-     * 验证码有效时长
-     * @var int
-     */
-    protected static $expire = 120;
-
-    /**
-     * 最大允许检测的次数
-     * @var int
-     */
-    protected static $maxCheckNums = 10;
-
-    /**
-     * 获取最后一次邮箱发送的数据
-     *
-     * @param int    $email 邮箱
-     * @param string $event 事件
-     * @return  Ems
-     */
-    public static function get($email, $event = 'default')
-    {
-        $ems = \app\common\model\Ems::
-        where(['email' => $email, 'event' => $event])
-            ->order('id', 'DESC')
-            ->find();
-        Hook::listen('ems_get', $ems, null, true);
-        return $ems ? $ems : null;
-    }
-
-    /**
-     * 发送验证码
-     *
-     * @param int    $email 邮箱
-     * @param int    $code  验证码,为空时将自动生成4位数字
-     * @param string $event 事件
-     * @return  boolean
-     */
-    public static function send($email, $code = null, $event = 'default')
-    {
-        $code = is_null($code) ? Random::numeric(config('captcha.length')) : $code;
-        $time = time();
-        $ip = request()->ip();
-        $ems = \app\common\model\Ems::create(['event' => $event, 'email' => $email, 'code' => $code, 'ip' => $ip, 'createtime' => $time]);
-        if (!Hook::get('ems_send')) {
-            //采用框架默认的邮件推送
-            Hook::add('ems_send', function ($params) {
-                $obj = new Email();
-                $result = $obj
-                    ->to($params->email)
-                    ->subject('请查收你的验证码!')
-                    ->message("你的验证码是:" . $params->code . "," . ceil(self::$expire / 60) . "分钟内有效。")
-                    ->send();
-                return $result;
-            });
-        }
-        $result = Hook::listen('ems_send', $ems, null, true);
-        if (!$result) {
-            $ems->delete();
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * 发送通知
-     *
-     * @param mixed  $email    邮箱,多个以,分隔
-     * @param string $msg      消息内容
-     * @param string $template 消息模板
-     * @return  boolean
-     */
-    public static function notice($email, $msg = '', $template = null)
-    {
-        $params = [
-            'email'    => $email,
-            'msg'      => $msg,
-            'template' => $template
-        ];
-        if (!Hook::get('ems_notice')) {
-            //采用框架默认的邮件推送
-            Hook::add('ems_notice', function ($params) {
-                $subject = '你收到一封新的邮件!';
-                $content = $params['msg'];
-                $email = new Email();
-                $result = $email->to($params['email'])
-                    ->subject($subject)
-                    ->message($content)
-                    ->send();
-                return $result;
-            });
-        }
-        $result = Hook::listen('ems_notice', $params, null, true);
-        return $result ? true : false;
-    }
-
-    /**
-     * 校验验证码
-     *
-     * @param int    $email 邮箱
-     * @param int    $code  验证码
-     * @param string $event 事件
-     * @return  boolean
-     */
-    public static function check($email, $code, $event = 'default')
-    {
-        $time = time() - self::$expire;
-        $ems = \app\common\model\Ems::where(['email' => $email, 'event' => $event])
-            ->order('id', 'DESC')
-            ->find();
-        if ($ems) {
-            if ($ems['createtime'] > $time && $ems['times'] <= self::$maxCheckNums) {
-                $correct = $code == $ems['code'];
-                if (!$correct) {
-                    $ems->times = $ems->times + 1;
-                    $ems->save();
-                    return false;
-                } else {
-                    $result = Hook::listen('ems_check', $ems, null, true);
-                    return true;
-                }
-            } else {
-                // 过期则清空该邮箱验证码
-                self::flush($email, $event);
-                return false;
-            }
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * 清空指定邮箱验证码
-     *
-     * @param int    $email 邮箱
-     * @param string $event 事件
-     * @return  boolean
-     */
-    public static function flush($email, $event = 'default')
-    {
-        \app\common\model\Ems::
-        where(['email' => $email, 'event' => $event])
-            ->delete();
-        Hook::listen('ems_flush');
-        return true;
-    }
-}

+ 0 - 437
application/application/common/library/Upload.php

@@ -1,437 +0,0 @@
-<?php
-
-namespace app\common\library;
-
-use app\common\exception\UploadException;
-use app\common\model\Attachment;
-use fast\Random;
-use FilesystemIterator;
-use think\Config;
-use think\File;
-use think\Hook;
-
-/**
- * 文件上传类
- */
-class Upload
-{
-
-    protected $merging = false;
-
-    protected $chunkDir = null;
-
-    protected $config = [];
-
-    protected $error = '';
-
-    /**
-     * @var File
-     */
-    protected $file = null;
-    protected $fileInfo = null;
-
-    public function __construct($file = null)
-    {
-        $this->config = Config::get('upload');
-        $this->chunkDir = RUNTIME_PATH . 'chunks';
-        if ($file) {
-            $this->setFile($file);
-        }
-    }
-
-    /**
-     * 设置分片目录
-     * @param $dir
-     */
-    public function setChunkDir($dir)
-    {
-        $this->chunkDir = $dir;
-    }
-
-    /**
-     * 获取文件
-     * @return File
-     */
-    public function getFile()
-    {
-        return $this->file;
-    }
-
-    /**
-     * 设置文件
-     * @param $file
-     * @throws UploadException
-     */
-    public function setFile($file)
-    {
-        if (empty($file)) {
-            throw new UploadException(__('No file upload or server upload limit exceeded'));
-        }
-
-        $fileInfo = $file->getInfo();
-        $suffix = strtolower(pathinfo($fileInfo['name'], PATHINFO_EXTENSION));
-        $suffix = $suffix && preg_match("/^[a-zA-Z0-9]+$/", $suffix) ? $suffix : 'file';
-        $fileInfo['suffix'] = $suffix;
-        $fileInfo['imagewidth'] = 0;
-        $fileInfo['imageheight'] = 0;
-
-        $this->file = $file;
-        $this->fileInfo = $fileInfo;
-        $this->checkExecutable();
-    }
-
-    /**
-     * 检测是否为可执行脚本
-     * @return bool
-     * @throws UploadException
-     */
-    protected function checkExecutable()
-    {
-        //禁止上传PHP和HTML文件
-        if (in_array($this->fileInfo['type'], ['text/x-php', 'text/html']) || in_array($this->fileInfo['suffix'], ['php', 'html', 'htm', 'phar', 'phtml']) || preg_match("/^php(.*)/i", $this->fileInfo['suffix'])) {
-            throw new UploadException(__('Uploaded file format is limited'));
-        }
-        return true;
-    }
-
-    /**
-     * 检测文件类型
-     * @return bool
-     * @throws UploadException
-     */
-    protected function checkMimetype()
-    {
-        $mimetypeArr = explode(',', strtolower($this->config['mimetype']));
-        $typeArr = explode('/', $this->fileInfo['type']);
-        //Mimetype值不正确
-        if (stripos($this->fileInfo['type'], '/') === false) {
-            throw new UploadException(__('Uploaded file format is limited'));
-        }
-        //验证文件后缀
-        if ($this->config['mimetype'] === '*'
-            || in_array($this->fileInfo['suffix'], $mimetypeArr) || in_array('.' . $this->fileInfo['suffix'], $mimetypeArr)
-            || in_array($typeArr[0] . "/*", $mimetypeArr) || (in_array($this->fileInfo['type'], $mimetypeArr) && stripos($this->fileInfo['type'], '/') !== false)) {
-            return true;
-        }
-        throw new UploadException(__('Uploaded file format is limited'));
-    }
-
-    /**
-     * 检测是否图片
-     * @param bool $force
-     * @return bool
-     * @throws UploadException
-     */
-    protected function checkImage($force = false)
-    {
-        //验证是否为图片文件
-        if (in_array($this->fileInfo['type'], ['image/gif', 'image/jpg', 'image/jpeg', 'image/bmp', 'image/png', 'image/webp']) || in_array($this->fileInfo['suffix'], ['gif', 'jpg', 'jpeg', 'bmp', 'png', 'webp'])) {
-            $imgInfo = getimagesize($this->fileInfo['tmp_name']);
-            if (!$imgInfo || !isset($imgInfo[0]) || !isset($imgInfo[1])) {
-                throw new UploadException(__('Uploaded file is not a valid image'));
-            }
-            $this->fileInfo['imagewidth'] = isset($imgInfo[0]) ? $imgInfo[0] : 0;
-            $this->fileInfo['imageheight'] = isset($imgInfo[1]) ? $imgInfo[1] : 0;
-            return true;
-        } else {
-            return !$force;
-        }
-    }
-
-    /**
-     * 检测文件大小
-     * @throws UploadException
-     */
-    protected function checkSize()
-    {
-        preg_match('/([0-9\.]+)(\w+)/', $this->config['maxsize'], $matches);
-        $size = $matches ? $matches[1] : $this->config['maxsize'];
-        $type = $matches ? strtolower($matches[2]) : 'b';
-        $typeDict = ['b' => 0, 'k' => 1, 'kb' => 1, 'm' => 2, 'mb' => 2, 'gb' => 3, 'g' => 3];
-        $size = (int)($size * pow(1024, isset($typeDict[$type]) ? $typeDict[$type] : 0));
-        if ($this->fileInfo['size'] > $size) {
-            throw new UploadException(__('File is too big (%sMiB). Max filesize: %sMiB.',
-                round($this->fileInfo['size'] / pow(1024, 2), 2),
-                round($size / pow(1024, 2), 2)));
-        }
-    }
-
-    /**
-     * 获取后缀
-     * @return string
-     */
-    public function getSuffix()
-    {
-        return $this->fileInfo['suffix'] ?: 'file';
-    }
-
-    /**
-     * 获取存储的文件名
-     * @param string $savekey
-     * @param string $filename
-     * @param string $md5
-     * @return mixed|null
-     */
-    public function getSavekey($savekey = null, $filename = null, $md5 = null)
-    {
-        if ($filename) {
-            $suffix = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
-            $suffix = $suffix && preg_match("/^[a-zA-Z0-9]+$/", $suffix) ? $suffix : 'file';
-        } else {
-            $suffix = $this->fileInfo['suffix'];
-        }
-        $filename = $filename ? $filename : ($suffix ? substr($this->fileInfo['name'], 0, strripos($this->fileInfo['name'], '.')) : $this->fileInfo['name']);
-        $filename = xss_clean(strip_tags(htmlspecialchars($filename)));
-        $md5 = $md5 ? $md5 : md5_file($this->fileInfo['tmp_name']);
-        $replaceArr = [
-            '{year}'     => date("Y"),
-            '{mon}'      => date("m"),
-            '{day}'      => date("d"),
-            '{hour}'     => date("H"),
-            '{min}'      => date("i"),
-            '{sec}'      => date("s"),
-            '{random}'   => Random::alnum(16),
-            '{random32}' => Random::alnum(32),
-            '{filename}' => substr($filename, 0, 100),
-            '{suffix}'   => $suffix,
-            '{.suffix}'  => $suffix ? '.' . $suffix : '',
-            '{filemd5}'  => $md5,
-        ];
-        $savekey = $savekey ? $savekey : $this->config['savekey'];
-        $savekey = str_replace(array_keys($replaceArr), array_values($replaceArr), $savekey);
-
-        return $savekey;
-    }
-
-    /**
-     * 清理分片文件
-     * @param $chunkid
-     */
-    public function clean($chunkid)
-    {
-        if (!preg_match('/^[a-z0-9\-]{36}$/', $chunkid)) {
-            throw new UploadException(__('Invalid parameters'));
-        }
-        $iterator = new \GlobIterator($this->chunkDir . DS . $chunkid . '-*', FilesystemIterator::KEY_AS_FILENAME);
-        $array = iterator_to_array($iterator);
-        foreach ($array as $index => &$item) {
-            $sourceFile = $item->getRealPath() ?: $item->getPathname();
-            $item = null;
-            @unlink($sourceFile);
-        }
-    }
-
-    /**
-     * 合并分片文件
-     * @param string $chunkid
-     * @param int    $chunkcount
-     * @param string $filename
-     * @return attachment|\think\Model
-     * @throws UploadException
-     */
-    public function merge($chunkid, $chunkcount, $filename)
-    {
-        if (!preg_match('/^[a-z0-9\-]{36}$/', $chunkid)) {
-            throw new UploadException(__('Invalid parameters'));
-        }
-
-        $filePath = $this->chunkDir . DS . $chunkid;
-
-        $completed = true;
-        //检查所有分片是否都存在
-        for ($i = 0; $i < $chunkcount; $i++) {
-            if (!file_exists("{$filePath}-{$i}.part")) {
-                $completed = false;
-                break;
-            }
-        }
-        if (!$completed) {
-            $this->clean($chunkid);
-            throw new UploadException(__('Chunk file info error'));
-        }
-
-        //如果所有文件分片都上传完毕,开始合并
-        $uploadPath = $filePath;
-
-        if (!$destFile = @fopen($uploadPath, "wb")) {
-            $this->clean($chunkid);
-            throw new UploadException(__('Chunk file merge error'));
-        }
-        if (flock($destFile, LOCK_EX)) { // 进行排他型锁定
-            for ($i = 0; $i < $chunkcount; $i++) {
-                $partFile = "{$filePath}-{$i}.part";
-                if (!$handle = @fopen($partFile, "rb")) {
-                    break;
-                }
-                while ($buff = fread($handle, filesize($partFile))) {
-                    fwrite($destFile, $buff);
-                }
-                @fclose($handle);
-                @unlink($partFile); //删除分片
-            }
-
-            flock($destFile, LOCK_UN);
-        }
-        @fclose($destFile);
-
-        $attachment = null;
-        try {
-            $file = new File($uploadPath);
-            $info = [
-                'name'     => $filename,
-                'type'     => $file->getMime(),
-                'tmp_name' => $uploadPath,
-                'error'    => 0,
-                'size'     => $file->getSize()
-            ];
-            $file->setSaveName($filename)->setUploadInfo($info);
-            $file->isTest(true);
-
-            //重新设置文件
-            $this->setFile($file);
-
-            unset($file);
-            $this->merging = true;
-
-            //允许大文件
-            $this->config['maxsize'] = "1024G";
-
-            $attachment = $this->upload();
-        } catch (\Exception $e) {
-            @unlink($destFile);
-            throw new UploadException($e->getMessage());
-        }
-        return $attachment;
-    }
-
-    /**
-     * 分片上传
-     * @throws UploadException
-     */
-    public function chunk($chunkid, $chunkindex, $chunkcount, $chunkfilesize = null, $chunkfilename = null, $direct = false)
-    {
-
-        if ($this->fileInfo['type'] != 'application/octet-stream') {
-            throw new UploadException(__('Uploaded file format is limited'));
-        }
-
-        if (!preg_match('/^[a-z0-9\-]{36}$/', $chunkid)) {
-            throw new UploadException(__('Invalid parameters'));
-        }
-
-        $destDir = RUNTIME_PATH . 'chunks';
-        $fileName = $chunkid . "-" . $chunkindex . '.part';
-        $destFile = $destDir . DS . $fileName;
-        if (!is_dir($destDir)) {
-            @mkdir($destDir, 0755, true);
-        }
-        if (!move_uploaded_file($this->file->getPathname(), $destFile)) {
-            throw new UploadException(__('Chunk file write error'));
-        }
-        $file = new File($destFile);
-        $info = [
-            'name'     => $fileName,
-            'type'     => $file->getMime(),
-            'tmp_name' => $destFile,
-            'error'    => 0,
-            'size'     => $file->getSize()
-        ];
-        $file->setSaveName($fileName)->setUploadInfo($info);
-        $this->setFile($file);
-        return $file;
-    }
-
-    /**
-     * 普通上传
-     * @return \app\common\model\attachment|\think\Model
-     * @throws UploadException
-     */
-    public function upload($savekey = null)
-    {
-        if (empty($this->file)) {
-            throw new UploadException(__('No file upload or server upload limit exceeded'));
-        }
-
-        $this->checkSize();
-        $this->checkExecutable();
-        $this->checkMimetype();
-        $this->checkImage();
-
-        $savekey = $savekey ? $savekey : $this->getSavekey();
-        $savekey = '/' . ltrim($savekey, '/');
-        $uploadDir = substr($savekey, 0, strripos($savekey, '/') + 1);
-        $fileName = substr($savekey, strripos($savekey, '/') + 1);
-
-        $destDir = ROOT_PATH . 'public' . str_replace('/', DS, $uploadDir);
-
-        $sha1 = $this->file->hash();
-
-        //如果是合并文件
-        if ($this->merging) {
-            if (!$this->file->check()) {
-                throw new UploadException($this->file->getError());
-            }
-            $destFile = $destDir . $fileName;
-            $sourceFile = $this->file->getRealPath() ?: $this->file->getPathname();
-            $info = $this->file->getInfo();
-            $this->file = null;
-            if (!is_dir($destDir)) {
-                @mkdir($destDir, 0755, true);
-            }
-            rename($sourceFile, $destFile);
-            $file = new File($destFile);
-            $file->setSaveName($fileName)->setUploadInfo($info);
-        } else {
-            $file = $this->file->move($destDir, $fileName);
-            if (!$file) {
-                // 上传失败获取错误信息
-                throw new UploadException($this->file->getError());
-            }
-        }
-        $this->file = $file;
-        $category = request()->post('category');
-        $category = array_key_exists($category, config('site.attachmentcategory') ?? []) ? $category : '';
-        $auth = Auth::instance();
-        $params = array(
-            'admin_id'    => (int)session('admin.id'),
-            'user_id'     => (int)$auth->id,
-            'filename'    => mb_substr(htmlspecialchars(strip_tags($this->fileInfo['name'])), 0, 100),
-            'category'    => $category,
-            'filesize'    => $this->fileInfo['size'],
-            'imagewidth'  => $this->fileInfo['imagewidth'],
-            'imageheight' => $this->fileInfo['imageheight'],
-            'imagetype'   => $this->fileInfo['suffix'],
-            'imageframes' => 0,
-            'mimetype'    => $this->fileInfo['type'],
-            'url'         => $uploadDir . $file->getSaveName(),
-            'uploadtime'  => time(),
-            'storage'     => 'local',
-            'sha1'        => $sha1,
-            'extparam'    => '',
-        );
-        $attachment = new Attachment();
-        $attachment->data(array_filter($params));
-        $attachment->save();
-
-        \think\Hook::listen("upload_after", $attachment);
-        return $attachment;
-    }
-
-    /**
-     * 设置错误信息
-     * @param $msg
-     */
-    public function setError($msg)
-    {
-        $this->error = $msg;
-    }
-
-    /**
-     * 获取错误信息
-     * @return string
-     */
-    public function getError()
-    {
-        return $this->error;
-    }
-}

+ 0 - 301
application/application/config.php

@@ -1,301 +0,0 @@
-<?php
-
-// +----------------------------------------------------------------------
-// | ThinkPHP [ WE CAN DO IT JUST THINK ]
-// +----------------------------------------------------------------------
-// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
-// +----------------------------------------------------------------------
-// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
-// +----------------------------------------------------------------------
-// | Author: liu21st <liu21st@gmail.com>
-// +----------------------------------------------------------------------
-use think\Env;
-
-return [
-    // +----------------------------------------------------------------------
-    // | 应用设置
-    // +----------------------------------------------------------------------
-    // 应用命名空间
-    'app_namespace'          => 'app',
-    // 应用调试模式
-    'app_debug'              => Env::get('app.debug', false),
-    // 应用Trace
-    'app_trace'              => Env::get('app.trace', false),
-    // 应用模式状态
-    'app_status'             => '',
-    // 是否支持多模块
-    'app_multi_module'       => true,
-    // 入口自动绑定模块
-    'auto_bind_module'       => false,
-    // 注册的根命名空间
-    'root_namespace'         => [],
-    // 扩展函数文件
-    'extra_file_list'        => [THINK_PATH . 'helper' . EXT],
-    // 默认输出类型
-    'default_return_type'    => 'html',
-    // 默认AJAX 数据返回格式,可选json xml ...
-    'default_ajax_return'    => 'json',
-    // 默认JSONP格式返回的处理方法
-    'default_jsonp_handler'  => 'jsonpReturn',
-    // 默认JSONP处理方法
-    'var_jsonp_handler'      => 'callback',
-    // 默认时区
-    'default_timezone'       => 'PRC',
-    // 是否开启多语言
-    'lang_switch_on'         => true,
-    // 默认全局过滤方法 用逗号分隔多个
-    'default_filter'         => '',
-    // 默认语言
-    'default_lang'           => 'zh-cn',
-    // 应用类库后缀
-    'class_suffix'           => false,
-    // 控制器类后缀
-    'controller_suffix'      => false,
-    // 获取IP的变量
-    'http_agent_ip'          => 'REMOTE_ADDR',
-    // +----------------------------------------------------------------------
-    // | 模块设置
-    // +----------------------------------------------------------------------
-    // 默认模块名
-    'default_module'         => 'index',
-    // 禁止访问模块
-    'deny_module_list'       => ['common', 'admin'],
-    // 默认控制器名
-    'default_controller'     => 'Index',
-    // 默认操作名
-    'default_action'         => 'index',
-    // 默认验证器
-    'default_validate'       => '',
-    // 默认的空控制器名
-    'empty_controller'       => 'Error',
-    // 操作方法后缀
-    'action_suffix'          => '',
-    // 自动搜索控制器
-    'controller_auto_search' => true,
-    // +----------------------------------------------------------------------
-    // | URL设置
-    // +----------------------------------------------------------------------
-    // PATHINFO变量名 用于兼容模式
-    'var_pathinfo'           => 's',
-    // 兼容PATH_INFO获取
-    'pathinfo_fetch'         => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
-    // pathinfo分隔符
-    'pathinfo_depr'          => '/',
-    // URL伪静态后缀
-    'url_html_suffix'        => 'html',
-    // URL普通方式参数 用于自动生成
-    'url_common_param'       => false,
-    // URL参数方式 0 按名称成对解析 1 按顺序解析
-    'url_param_type'         => 0,
-    // 是否开启路由
-    'url_route_on'           => true,
-    // 路由使用完整匹配
-    'route_complete_match'   => false,
-    // 路由配置文件(支持配置多个)
-    'route_config_file'      => ['route'],
-    // 是否强制使用路由
-    'url_route_must'         => false,
-    // 域名部署
-    'url_domain_deploy'      => false,
-    // 域名根,如thinkphp.cn
-    'url_domain_root'        => '',
-    // 是否自动转换URL中的控制器和操作名
-    'url_convert'            => true,
-    // 默认的访问控制器层
-    'url_controller_layer'   => 'controller',
-    // 表单请求类型伪装变量
-    'var_method'             => '_method',
-    // 表单ajax伪装变量
-    'var_ajax'               => '_ajax',
-    // 表单pjax伪装变量
-    'var_pjax'               => '_pjax',
-    // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
-    'request_cache'          => false,
-    // 请求缓存有效期
-    'request_cache_expire'   => null,
-    // +----------------------------------------------------------------------
-    // | 模板设置
-    // +----------------------------------------------------------------------
-    'template'               => [
-        // 模板引擎类型 支持 php think 支持扩展
-        'type'         => 'Think',
-        // 模板路径
-        'view_path'    => '',
-        // 模板后缀
-        'view_suffix'  => 'html',
-        // 模板文件名分隔符
-        'view_depr'    => DS,
-        // 模板引擎普通标签开始标记
-        'tpl_begin'    => '{',
-        // 模板引擎普通标签结束标记
-        'tpl_end'      => '}',
-        // 标签库标签开始标记
-        'taglib_begin' => '{',
-        // 标签库标签结束标记
-        'taglib_end'   => '}',
-        'tpl_cache'    => true,
-    ],
-    // 视图输出字符串内容替换,留空则会自动进行计算
-    'view_replace_str'       => [
-        '__PUBLIC__' => '',
-        '__ROOT__'   => '',
-        '__CDN__'    => '',
-    ],
-    // 默认跳转页面对应的模板文件
-    'dispatch_success_tmpl'  => APP_PATH . 'common' . DS . 'view' . DS . 'tpl' . DS . 'dispatch_jump.tpl',
-    'dispatch_error_tmpl'    => APP_PATH . 'common' . DS . 'view' . DS . 'tpl' . DS . 'dispatch_jump.tpl',
-    // +----------------------------------------------------------------------
-    // | 异常及错误设置
-    // +----------------------------------------------------------------------
-    // 异常页面的模板文件
-    'exception_tmpl'         => APP_PATH . 'common' . DS . 'view' . DS . 'tpl' . DS . 'think_exception.tpl',
-    // 错误显示信息,非调试模式有效
-    'error_message'          => '你所浏览的页面暂时无法访问',
-    // 显示错误信息
-    'show_error_msg'         => false,
-    // 异常处理handle类 留空使用 \think\exception\Handle
-    'exception_handle'       => '',
-    // +----------------------------------------------------------------------
-    // | 日志设置
-    // +----------------------------------------------------------------------
-    'log'                    => [
-        // 日志记录方式,内置 file socket 支持扩展
-        'type'  => 'File',
-        // 日志保存目录
-        'path'  => LOG_PATH,
-        // 日志记录级别
-        'level' => [],
-    ],
-    // +----------------------------------------------------------------------
-    // | Trace设置 开启 app_trace 后 有效
-    // +----------------------------------------------------------------------
-    'trace'                  => [
-        // 内置Html Console 支持扩展
-        'type' => 'Html',
-    ],
-    // +----------------------------------------------------------------------
-    // | 缓存设置
-    // +----------------------------------------------------------------------
-    'cache'                  => [
-        // 驱动方式
-        'type'   => 'File',
-        // 缓存保存目录
-        'path'   => CACHE_PATH,
-        // 缓存前缀
-        'prefix' => '',
-        // 缓存有效期 0表示永久缓存
-        'expire' => 0,
-    ],
-    // +----------------------------------------------------------------------
-    // | 会话设置
-    // +----------------------------------------------------------------------
-    'session'                => [
-        'id'             => '',
-        // SESSION_ID的提交变量,解决flash上传跨域
-        'var_session_id' => '',
-        // SESSION 前缀
-        'prefix'         => 'think',
-        // 驱动方式 支持redis memcache memcached
-        'type'           => '',
-        // 是否自动开启 SESSION
-        'auto_start'     => true,
-    ],
-    // +----------------------------------------------------------------------
-    // | Cookie设置
-    // +----------------------------------------------------------------------
-    'cookie'                 => [
-        // cookie 名称前缀
-        'prefix'    => '',
-        // cookie 保存时间
-        'expire'    => 0,
-        // cookie 保存路径
-        'path'      => '/',
-        // cookie 有效域名
-        'domain'    => '',
-        //  cookie 启用安全传输
-        'secure'    => false,
-        // httponly设置
-        'httponly'  => '',
-        // 是否使用 setcookie
-        'setcookie' => true,
-    ],
-    //分页配置
-    'paginate'               => [
-        'type'      => 'bootstrap',
-        'var_page'  => 'page',
-        'list_rows' => 15,
-    ],
-    //验证码配置
-    'captcha'                => [
-        // 验证码字符集合
-        'codeSet'  => '2345678abcdefhijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXY',
-        // 验证码字体大小(px)
-        'fontSize' => 18,
-        // 是否画混淆曲线
-        'useCurve' => false,
-        //使用中文验证码
-        'useZh'    => false,
-        // 验证码图片高度
-        'imageH'   => 40,
-        // 验证码图片宽度
-        'imageW'   => 130,
-        // 验证码位数
-        'length'   => 4,
-        // 验证成功后是否重置
-        'reset'    => true
-    ],
-    // +----------------------------------------------------------------------
-    // | Token设置
-    // +----------------------------------------------------------------------
-    'token'                  => [
-        // 驱动方式
-        'type'     => 'Mysql',
-        // 缓存前缀
-        'key'      => 'i3d6o32wo8fvs1fvdpwens',
-        // 加密方式
-        'hashalgo' => 'ripemd160',
-        // 缓存有效期 0表示永久缓存
-        'expire'   => 0,
-    ],
-    //FastAdmin配置
-    'fastadmin'              => [
-        //是否开启前台会员中心
-        'usercenter'            => true,
-        //会员注册验证码类型email/mobile/wechat/text/false
-        'user_register_captcha' => 'text',
-        //登录验证码
-        'login_captcha'         => true,
-        //登录失败超过10次则1天后重试
-        'login_failure_retry'   => true,
-        //是否同一账号同一时间只能在一个地方登录
-        'login_unique'          => false,
-        //是否开启IP变动检测
-        'loginip_check'         => true,
-        //登录页默认背景图
-        'login_background'      => "",
-        //是否启用多级菜单导航
-        'multiplenav'           => false,
-        //是否开启多选项卡(仅在开启多级菜单时起作用)
-        'multipletab'           => true,
-        //是否默认展示子菜单
-        'show_submenu'          => false,
-        //后台皮肤,为空时表示使用skin-black-blue
-        'adminskin'             => '',
-        //后台是否启用面包屑
-        'breadcrumb'            => false,
-        //是否允许未知来源的插件压缩包
-        'unknownsources'        => false,
-        //插件启用禁用时是否备份对应的全局文件
-        'backup_global_files'   => true,
-        //是否开启后台自动日志记录
-        'auto_record_log'       => true,
-        //插件纯净模式,插件启用后是否删除插件目录的application、public和assets文件夹
-        'addon_pure_mode'       => true,
-        //允许跨域的域名,多个以,分隔
-        'cors_request_domain'   => 'localhost,127.0.0.1',
-        //版本号
-        'version'               => '1.3.3.20220121',
-        //API接口地址
-        'api_url'               => 'https://api.fastadmin.net',
-    ],
-];

+ 0 - 95
application/application/index/view/user/login.html

@@ -1,95 +0,0 @@
-<div id="content-container" class="container">
-    <div class="user-section login-section">
-        <div class="logon-tab clearfix"><a class="active">{:__('Sign in')}</a> <a href="{:url('user/register')}?url={$url|urlencode|htmlentities}">{:__('Sign up')}</a></div>
-        <div class="login-main">
-            <form name="form" id="login-form" class="form-vertical" method="POST" action="">
-                <!--@IndexLoginFormBegin-->
-                <input type="hidden" name="url" value="{$url|htmlentities}"/>
-                {:token()}
-                <div class="form-group">
-                    <label class="control-label" for="account">{:__('Account')}</label>
-                    <div class="controls">
-                        <input class="form-control" id="account" type="text" name="account" value="" data-rule="required" placeholder="{:__('Email/Mobile/Username')}" autocomplete="off">
-                        <div class="help-block"></div>
-                    </div>
-                </div>
-                <div class="form-group">
-                    <label class="control-label" for="password">{:__('Password')}</label>
-                    <div class="controls">
-                        <input class="form-control" id="password" type="password" name="password" data-rule="required;password" placeholder="{:__('Password')}" autocomplete="off">
-                    </div>
-                </div>
-                <div class="form-group">
-                    <div class="controls">
-                        <div class="checkbox inline">
-                            <label>
-                                <input type="checkbox" name="keeplogin" checked="checked" value="1"> {:__('Keep login')}
-                            </label>
-                        </div>
-                        <div class="pull-right"><a href="javascript:;" class="btn-forgot">{:__('Forgot password')}</a></div>
-                    </div>
-                </div>
-                <div class="form-group">
-                    <button type="submit" class="btn btn-primary btn-lg btn-block">{:__('Sign in')}</button>
-                    <a href="{:url('user/register')}?url={$url|urlencode|htmlentities}" class="btn btn-default btn-lg btn-block mt-3 no-border">还没有账号?点击注册</a>
-                </div>
-                <!--@IndexLoginFormEnd-->
-            </form>
-        </div>
-    </div>
-</div>
-<script type="text/html" id="resetpwdtpl">
-    <form id="resetpwd-form" class="form-horizontal form-layer" method="POST" action="{:url('api/user/resetpwd')}">
-        <div class="form-body">
-            <input type="hidden" name="action" value="resetpwd"/>
-            <div class="form-group">
-                <label class="control-label col-xs-12 col-sm-3">{:__('Type')}:</label>
-                <div class="col-xs-12 col-sm-8">
-                    <div class="radio">
-                        <label for="type-email"><input id="type-email" checked="checked" name="type" data-send-url="{:url('api/ems/send')}" data-check-url="{:url('api/validate/check_ems_correct')}" type="radio" value="email"> {:__('Reset password by email')}</label>
-                        <label for="type-mobile"><input id="type-mobile" name="type" type="radio" data-send-url="{:url('api/sms/send')}" data-check-url="{:url('api/validate/check_sms_correct')}" value="mobile"> {:__('Reset password by mobile')}</label>
-                    </div>
-                </div>
-            </div>
-            <div class="form-group" data-type="email">
-                <label for="email" class="control-label col-xs-12 col-sm-3">{:__('Email')}:</label>
-                <div class="col-xs-12 col-sm-8">
-                    <input type="text" class="form-control" id="email" name="email" value="" data-rule="required(#type-email:checked);email;remote({:url('api/validate/check_email_exist')}, event=resetpwd, id=0)" placeholder="">
-                    <span class="msg-box"></span>
-                </div>
-            </div>
-            <div class="form-group hide" data-type="mobile">
-                <label for="mobile" class="control-label col-xs-12 col-sm-3">{:__('Mobile')}:</label>
-                <div class="col-xs-12 col-sm-8">
-                    <input type="text" class="form-control" id="mobile" name="mobile" value="" data-rule="required(#type-mobile:checked);mobile;remote({:url('api/validate/check_mobile_exist')}, event=resetpwd, id=0)" placeholder="">
-                    <span class="msg-box"></span>
-                </div>
-            </div>
-            <div class="form-group">
-                <label for="captcha" class="control-label col-xs-12 col-sm-3">{:__('Captcha')}:</label>
-                <div class="col-xs-12 col-sm-8">
-                    <div class="input-group">
-                        <input type="text" name="captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length});integer[+];remote({:url('api/validate/check_ems_correct')}, event=resetpwd, email:#email)"/>
-                        <span class="input-group-btn" style="padding:0;border:none;">
-                            <a href="javascript:;" class="btn btn-primary btn-captcha" data-url="{:url('api/ems/send')}" data-type="email" data-event="resetpwd">{:__('Send verification code')}</a>
-                        </span>
-                    </div>
-                    <span class="msg-box"></span>
-                </div>
-            </div>
-            <div class="form-group">
-                <label for="newpassword" class="control-label col-xs-12 col-sm-3">{:__('New password')}:</label>
-                <div class="col-xs-12 col-sm-8">
-                    <input type="password" class="form-control" id="newpassword" name="newpassword" value="" data-rule="required;password" placeholder="">
-                    <span class="msg-box"></span>
-                </div>
-            </div>
-        </div>
-        <div class="form-group form-footer">
-            <label class="control-label col-xs-12 col-sm-3"></label>
-            <div class="col-xs-12 col-sm-8">
-                <button type="submit" class="btn btn-md btn-primary">{:__('Ok')}</button>
-            </div>
-        </div>
-    </form>
-</script>

+ 0 - 61
application/application/index/view/user/register.html

@@ -1,61 +0,0 @@
-<div id="content-container" class="container">
-    <div class="user-section login-section">
-        <div class="logon-tab clearfix"><a href="{:url('user/login')}?url={$url|urlencode|htmlentities}">{:__('Sign in')}</a> <a class="active">{:__('Sign up')}</a></div>
-        <div class="login-main">
-            <form name="form1" id="register-form" class="form-vertical" method="POST" action="">
-                <!--@IndexRegisterFormBegin-->
-                <input type="hidden" name="invite_user_id" value="0"/>
-                <input type="hidden" name="url" value="{$url|htmlentities}"/>
-                {:token()}
-                <div class="form-group">
-                    <label class="control-label required">{:__('Email')}<span class="text-success"></span></label>
-                    <div class="controls">
-                        <input type="text" name="email" id="email" data-rule="required;email" class="form-control" placeholder="{:__('Email')}">
-                        <p class="help-block"></p>
-                    </div>
-                </div>
-                <div class="form-group">
-                    <label class="control-label">{:__('Username')}</label>
-                    <div class="controls">
-                        <input type="text" id="username" name="username" data-rule="required;username" class="form-control" placeholder="{:__('Username must be 3 to 30 characters')}">
-                        <p class="help-block"></p>
-                    </div>
-                </div>
-                <div class="form-group">
-                    <label class="control-label">{:__('Password')}</label>
-                    <div class="controls">
-                        <input type="password" id="password" name="password" data-rule="required;password" class="form-control" placeholder="{:__('Password must be 6 to 30 characters')}">
-                        <p class="help-block"></p>
-                    </div>
-                </div>
-                <div class="form-group">
-                    <label class="control-label">{:__('Mobile')}</label>
-                    <div class="controls">
-                        <input type="text" id="mobile" name="mobile" data-rule="required;mobile" class="form-control" placeholder="{:__('Mobile')}">
-                        <p class="help-block"></p>
-                    </div>
-                </div>
-
-                <!--@CaptchaBegin-->
-                {if $captchaType}
-                <div class="form-group">
-                    <label class="control-label">{:__('Captcha')}</label>
-                    <div class="controls">
-                        <div class="input-group">
-                            {include file="common/captcha" event="register" type="$captchaType" /}
-                        </div>
-                        <p class="help-block"></p>
-                    </div>
-                </div>
-                {/if}
-                <!--@CaptchaEnd-->
-
-                <div class="form-group">
-                    <button type="submit" class="btn btn-primary btn-lg btn-block">{:__('Sign up')}</button>
-                    <a href="{:url('user/login')}?url={$url|urlencode|htmlentities}" class="btn btn-default btn-lg btn-block mt-3 no-border">已经有账号?点击登录</a>
-                </div>
-                <!--@IndexRegisterFormEnd-->
-            </form>
-        </div>
-    </div>
-</div>