diff --git a/README.md b/README.md
index 9ba3967a..86f4b6f8 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
FastAdmin是一款基于ThinkPHP5+Bootstrap的极速后台开发框架。
-## **主要特性**
+## 主要特性
* 基于`Auth`验证的权限管理系统
* 支持无限级父子级权限继承,父级的管理员可任意增删改子级管理员及权限设置
@@ -24,6 +24,8 @@ FastAdmin是一款基于ThinkPHP5+Bootstrap的极速后台开发框架。
* 二级域名部署支持,同时域名支持绑定到插件
* 多语言支持,服务端及客户端支持
* 强大的第三方模块支持([CMS](https://www.fastadmin.net/store/cms.html)、[博客](https://www.fastadmin.net/store/blog.html)、[知识付费问答](https://www.fastadmin.net/store/ask.html)、[在线投票系统](https://www.fastadmin.net/store/vote.html))
+* 支持CMS、博客、知识付费问答无缝整合[Xunsearch全文搜索](https://www.fastadmin.net/store/xunsearch.html)
+* 第三方小程序支持([预订小程序](https://www.fastadmin.net/store/ball.html)、[问答小程序](https://www.fastadmin.net/store/questions.html)、[活动报名小程序](https://www.fastadmin.net/store/huodong.html)、[商城小程序](https://www.fastadmin.net/store/xshop.html)、[博客小程序](https://www.fastadmin.net/store/blog.html))
* 整合第三方短信接口(阿里云、腾讯云短信)
* 无缝整合第三方云存储(七牛、阿里云OSS、又拍云)功能
* 第三方富文本编辑器支持(Summernote、Kindeditor、百度编辑器)
@@ -31,11 +33,11 @@ FastAdmin是一款基于ThinkPHP5+Bootstrap的极速后台开发框架。
* 第三方支付(微信、支付宝)无缝整合,微信支持PC端扫码支付
* 丰富的插件应用市场
-## **安装使用**
+## 安装使用
https://doc.fastadmin.net
-## **在线演示**
+## 在线演示
https://demo.fastadmin.net
@@ -45,24 +47,22 @@ https://demo.fastadmin.net
提 示:演示站数据无法进行修改,请下载源码安装体验全部功能
-## **界面截图**
+## 界面截图

-## **问题反馈**
+## 问题反馈
在使用中有任何问题,请使用以下联系方式联系我们
交流社区: https://ask.fastadmin.net
-QQ群: [636393962](https://jq.qq.com/?_wv=1027&k=487PNBb)(满) [708784003](https://jq.qq.com/?_wv=1027&k=5ObjtwM)(满) [964776039](https://jq.qq.com/?_wv=1027&k=59qjU2P)(3群) [749803490](https://jq.qq.com/?_wv=1027&k=5tczi88)(满) [767103006](https://jq.qq.com/?_wv=1027&k=5Z1U751)(5群)
-
-Email: (karson#fastadmin.net, 把#换成@)
+QQ群: [636393962](https://jq.qq.com/?_wv=1027&k=487PNBb)(满) [708784003](https://jq.qq.com/?_wv=1027&k=5ObjtwM)(满) [964776039](https://jq.qq.com/?_wv=1027&k=59qjU2P)(3群) [749803490](https://jq.qq.com/?_wv=1027&k=5tczi88)(满) [767103006](https://jq.qq.com/?_wv=1027&k=5Z1U751)(满) [675115483](https://jq.qq.com/?_wv=1027&k=54I6mts)(6群)
Github: https://github.com/karsonzhang/fastadmin
Gitee: https://gitee.com/karson/fastadmin
-## **特别鸣谢**
+## 特别鸣谢
感谢以下的项目,排名不分先后
@@ -81,7 +81,7 @@ Nice-validator: https://validator.niceue.com
SelectPage: https://github.com/TerryZ/SelectPage
-## **版权信息**
+## 版权信息
FastAdmin遵循Apache2开源协议发布,并提供免费使用。
@@ -89,4 +89,4 @@ FastAdmin遵循Apache2开源协议发布,并提供免费使用。
版权所有Copyright © 2017-2020 by FastAdmin (https://www.fastadmin.net)
-All rights reserved。
\ No newline at end of file
+All rights reserved。
diff --git a/application/admin/command/Addon.php b/application/admin/command/Addon.php
index 9baae9af..a33e1b7c 100644
--- a/application/admin/command/Addon.php
+++ b/application/admin/command/Addon.php
@@ -34,8 +34,8 @@ class Addon extends Command
{
$name = $input->getOption('name') ?: '';
$action = $input->getOption('action') ?: '';
- if (stripos($name, 'addons/') !== false) {
- $name = explode('/', $name)[1];
+ if (stripos($name, 'addons' . DS) !== false) {
+ $name = explode(DS, $name)[1];
}
//强制覆盖
$force = $input->getOption('force');
diff --git a/application/admin/command/Api.php b/application/admin/command/Api.php
index 97f1f5ec..ab449127 100644
--- a/application/admin/command/Api.php
+++ b/application/admin/command/Api.php
@@ -96,6 +96,7 @@ class Api extends Command
$classes = array_unique(array_filter($classes));
$config = [
+ 'sitename' => config('site.name'),
'title' => $title,
'author' => $author,
'description' => '',
@@ -115,8 +116,8 @@ class Api extends Command
* get full qualified class name
*
* @param string $path_to_file
- * @author JBYRNE http://jarretbyrne.com/2015/06/197/
* @return string
+ * @author JBYRNE http://jarretbyrne.com/2015/06/197/
*/
protected function get_class_from_file($path_to_file)
{
diff --git a/application/admin/command/Api/template/index.html b/application/admin/command/Api/template/index.html
index e2b0708a..a0b5424f 100755
--- a/application/admin/command/Api/template/index.html
+++ b/application/admin/command/Api/template/index.html
@@ -5,7 +5,6 @@
-
{$config.title}
@@ -109,7 +108,7 @@
- {$config.title}
+ {$config.title}
diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php
index 43210167..04d1feb9 100755
--- a/application/admin/command/Crud.php
+++ b/application/admin/command/Crud.php
@@ -440,6 +440,11 @@ class Crud extends Command
}
}
+ //继续删除菜单
+ if ($menu) {
+ exec("php think menu -c {$controllerUrl} -d 1 -f 1");
+ }
+
$output->info("Delete Successed");
return;
}
@@ -1455,6 +1460,9 @@ EOD;
if (in_array($formatter, ['image', 'images'])) {
$html .= ", events: Table.api.events.image";
}
+ if (in_array($formatter, ['toggle'])) {
+ $html .= ", table: table";
+ }
if ($itemArr && !$formatter) {
$formatter = 'normal';
}
diff --git a/application/admin/command/Install.php b/application/admin/command/Install.php
index 3be7f949..499f8c4a 100644
--- a/application/admin/command/Install.php
+++ b/application/admin/command/Install.php
@@ -2,6 +2,7 @@
namespace app\admin\command;
+use fast\Random;
use PDO;
use think\Config;
use think\console\Command;
@@ -10,10 +11,22 @@ use think\console\input\Option;
use think\console\Output;
use think\Db;
use think\Exception;
+use think\Lang;
+use think\Request;
+use think\View;
class Install extends Command
{
protected $model = null;
+ /**
+ * @var \think\View 视图类实例
+ */
+ protected $view;
+
+ /**
+ * @var \think\Request Request 实例
+ */
+ protected $request;
protected function configure()
{
@@ -30,8 +43,12 @@ class Install extends Command
->setDescription('New installation of FastAdmin');
}
+ /**
+ * 命令行安装
+ */
protected function execute(Input $input, Output $output)
{
+ define('INSTALL_PATH', APP_PATH . 'admin' . DS . 'command' . DS . 'Install' . DS);
// 覆盖安装
$force = $input->getOption('force');
$hostname = $input->getOption('hostname');
@@ -41,68 +58,236 @@ class Install extends Command
$username = $input->getOption('username');
$password = $input->getOption('password');
- $installLockFile = __DIR__ . "/Install/install.lock";
+ $installLockFile = INSTALL_PATH . "install.lock";
if (is_file($installLockFile) && !$force) {
throw new Exception("\nFastAdmin already installed!\nIf you need to reinstall again, use the parameter --force=true ");
}
- $sql = file_get_contents(__DIR__ . '/Install/fastadmin.sql');
+ $adminUsername = 'admin';
+ $adminPassword = Random::alnum(10);
+ $adminEmail = 'admin@admin.com';
+ $siteName = __('My Website');
- $sql = str_replace("`fa_", "`{$prefix}", $sql);
-
- // 先尝试能否自动创建数据库
- $config = Config::get('database');
- $pdo = new PDO("{$config['type']}:host={$hostname}" . ($hostport ? ";port={$hostport}" : ''), $username, $password);
- $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- $pdo->query("CREATE DATABASE IF NOT EXISTS `{$database}` CHARACTER SET utf8 COLLATE utf8_general_ci;");
-
- // 连接install命令中指定的数据库
- $instance = Db::connect([
- 'type' => "{$config['type']}",
- 'hostname' => "{$hostname}",
- 'hostport' => "{$hostport}",
- 'database' => "{$database}",
- 'username' => "{$username}",
- 'password' => "{$password}",
- ]);
-
- // 查询一次SQL,判断连接是否正常
- $instance->execute("SELECT 1");
-
- // 调用原生PDO对象进行批量查询
- $instance->getPdo()->exec($sql);
-
- file_put_contents($installLockFile, 1);
-
- //后台入口文件
- $adminFile = ROOT_PATH . 'public' . DS . 'admin.php';
-
- $dbConfigFile = APP_PATH . 'database.php';
- $config = @file_get_contents($dbConfigFile);
- $callback = function ($matches) use ($hostname, $hostport, $username, $password, $database, $prefix) {
- $field = $matches[1];
- $replace = $$field;
- if ($matches[1] == 'hostport' && $hostport == 3306) {
- $replace = '';
- }
- return "'{$matches[1]}'{$matches[2]}=>{$matches[3]}Env::get('database.{$matches[1]}', '{$replace}'),";
- };
- $config = preg_replace_callback("/'(hostname|database|username|password|hostport|prefix)'(\s+)=>(\s+)Env::get\((.*)\)\,/", $callback, $config);
- // 写入数据库配置
- file_put_contents($dbConfigFile, $config);
-
- // 修改后台入口
- if (is_file($adminFile)) {
- $x = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
- $adminName = substr(str_shuffle(str_repeat($x, ceil(10 / strlen($x)))), 1, 10) . '.php';
- rename($adminFile, ROOT_PATH . 'public' . DS . $adminName);
+ $adminName = $this->installation($hostname, $hostport, $database, $username, $password, $prefix, $adminUsername, $adminPassword, $adminEmail, $siteName);
+ if ($adminName) {
$output->highlight("Admin url:http://www.yoursite.com/{$adminName}");
}
- $output->highlight("Admin username:admin");
- $output->highlight("Admin password:123456");
+
+ $output->highlight("Admin username:{$adminUsername}");
+ $output->highlight("Admin password:{$adminPassword}");
\think\Cache::rm('__menu__');
$output->info("Install Successed!");
}
+
+ /**
+ * PC端安装
+ */
+ public function index()
+ {
+ $this->view = View::instance(Config::get('template'), Config::get('view_replace_str'));
+ $this->request = Request::instance();
+
+ define('INSTALL_PATH', APP_PATH . 'admin' . DS . 'command' . DS . 'Install' . DS);
+ Lang::load(INSTALL_PATH . $this->request->langset() . '.php');
+
+ $installLockFile = INSTALL_PATH . "install.lock";
+
+ if (is_file($installLockFile)) {
+ echo __('The system has been installed. If you need to reinstall, please remove %s first', 'install.lock');
+ exit;
+ }
+ $output = function ($code, $msg, $url = null, $data = null) {
+ return json(['code' => $code, 'msg' => $msg, 'url' => $url, 'data' => $data]);
+ };
+
+ if ($this->request->isPost()) {
+ $mysqlHostname = $this->request->post('mysqlHostname', '127.0.0.1');
+ $mysqlHostport = $this->request->post('mysqlHostport', '3306');
+ $hostArr = explode(':', $mysqlHostname);
+ if (count($hostArr) > 1) {
+ $mysqlHostname = $hostArr[0];
+ $mysqlHostport = $hostArr[1];
+ }
+ $mysqlUsername = $this->request->post('mysqlUsername', 'root');
+ $mysqlPassword = $this->request->post('mysqlPassword', '');
+ $mysqlDatabase = $this->request->post('mysqlDatabase', '');
+ $mysqlPrefix = $this->request->post('mysqlPrefix', 'fa_');
+ $adminUsername = $this->request->post('adminUsername', 'admin');
+ $adminPassword = $this->request->post('adminPassword', '');
+ $adminPasswordConfirmation = $this->request->post('adminPasswordConfirmation', '');
+ $adminEmail = $this->request->post('adminEmail', 'admin@admin.com');
+ $siteName = $this->request->post('siteName', __('My Website'));
+
+ if ($adminPassword !== $adminPasswordConfirmation) {
+ return $output(0, __('The two passwords you entered did not match'));
+ }
+
+ $adminName = '';
+ try {
+ $adminName = $this->installation($mysqlHostname, $mysqlHostport, $mysqlDatabase, $mysqlUsername, $mysqlPassword, $mysqlPrefix, $adminUsername, $adminPassword, $adminEmail, $siteName);
+ } catch (\PDOException $e) {
+ throw new Exception($e->getMessage());
+ } catch (\Exception $e) {
+ return $output(0, $e->getMessage());
+ }
+ return $output(1, __('Install Successed'), null, ['adminName' => $adminName]);
+ }
+ $errInfo = '';
+ try {
+ $this->checkenv();
+ } catch (\Exception $e) {
+ $errInfo = $e->getMessage();
+ }
+ return $this->view->fetch(INSTALL_PATH . "install.html", ['errInfo' => $errInfo]);
+ }
+
+ /**
+ * 执行安装
+ */
+ protected function installation($mysqlHostname, $mysqlHostport, $mysqlDatabase, $mysqlUsername, $mysqlPassword, $mysqlPrefix, $adminUsername, $adminPassword, $adminEmail = null, $siteName = null)
+ {
+ $this->checkenv();
+
+ if ($mysqlDatabase == '') {
+ throw new Exception(__('Please input correct database'));
+ }
+ if (!preg_match("/^\w{3,12}$/", $adminUsername)) {
+ throw new Exception(__('Please input correct username'));
+ }
+ if (!preg_match("/^[\S]{6,16}$/", $adminPassword)) {
+ throw new Exception(__('Please input correct password'));
+ }
+ if ($siteName == '' || preg_match("/fast" . "admin/i", $siteName)) {
+ throw new Exception(__('Please input correct website'));
+ }
+
+ $sql = file_get_contents(INSTALL_PATH . 'fastadmin.sql');
+
+ $sql = str_replace("`fa_", "`{$mysqlPrefix}", $sql);
+
+ // 先尝试能否自动创建数据库
+ $config = Config::get('database');
+ try {
+ $pdo = new PDO("{$config['type']}:host={$mysqlHostname}" . ($mysqlHostport ? ";port={$mysqlHostport}" : ''), $mysqlUsername, $mysqlPassword);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->query("CREATE DATABASE IF NOT EXISTS `{$mysqlDatabase}` CHARACTER SET utf8 COLLATE utf8_general_ci;");
+
+ // 连接install命令中指定的数据库
+ $instance = Db::connect([
+ 'type' => "{$config['type']}",
+ 'hostname' => "{$mysqlHostname}",
+ 'hostport' => "{$mysqlHostport}",
+ 'database' => "{$mysqlDatabase}",
+ 'username' => "{$mysqlUsername}",
+ 'password' => "{$mysqlPassword}",
+ 'prefix' => "{$mysqlPrefix}",
+ ]);
+
+ // 查询一次SQL,判断连接是否正常
+ $instance->execute("SELECT 1");
+
+ // 调用原生PDO对象进行批量查询
+ $instance->getPdo()->exec($sql);
+ } catch (\PDOException $e) {
+ throw new Exception($e->getMessage());
+ }
+ // 后台入口文件
+ $adminFile = ROOT_PATH . 'public' . DS . 'admin.php';
+
+ // 数据库配置文件
+ $dbConfigFile = APP_PATH . 'database.php';
+ $config = @file_get_contents($dbConfigFile);
+ $callback = function ($matches) use ($mysqlHostname, $mysqlHostport, $mysqlUsername, $mysqlPassword, $mysqlDatabase, $mysqlPrefix) {
+ $field = "mysql" . ucfirst($matches[1]);
+ $replace = $$field;
+ if ($matches[1] == 'hostport' && $mysqlHostport == 3306) {
+ $replace = '';
+ }
+ return "'{$matches[1]}'{$matches[2]}=>{$matches[3]}Env::get('database.{$matches[1]}', '{$replace}'),";
+ };
+ $config = preg_replace_callback("/'(hostname|database|username|password|hostport|prefix)'(\s+)=>(\s+)Env::get\((.*)\)\,/", $callback, $config);
+
+ // 检测能否成功写入数据库配置
+ $result = @file_put_contents($dbConfigFile, $config);
+ if (!$result) {
+ throw new Exception(__('The current permissions are insufficient to write the file %s', 'application/database.php'));
+ }
+
+ // 变更默认管理员密码
+ $adminPassword = $adminPassword ? $adminPassword : Random::alnum(8);
+ $adminEmail = $adminEmail ? $adminEmail : "admin@admin.com";
+ $newSalt = substr(md5(uniqid(true)), 0, 6);
+ $newPassword = md5(md5($adminPassword) . $newSalt);
+ $data = ['username' => $adminUsername, 'email' => $adminEmail, 'password' => $newPassword, 'salt' => $newSalt];
+ $instance->name('admin')->where('username', 'admin')->update($data);
+ // 修改后台入口
+ $adminName = '';
+ if (is_file($adminFile)) {
+ $adminName = Random::alpha(10) . '.php';
+ rename($adminFile, ROOT_PATH . 'public' . DS . $adminName);
+ }
+
+ //修改站点名称
+ if ($siteName != __('My Website')) {
+ $instance->name('config')->where('name', 'name')->update(['value' => $siteName]);
+ $configFile = APP_PATH . 'extra' . DS . 'site.php';
+ $config = include $configFile;
+ $configList = $instance->name("config")->select();
+ foreach ($configList as $k => $value) {
+ if (in_array($value['type'], ['selects', 'checkbox', 'images', 'files'])) {
+ $value['value'] = explode(',', $value['value']);
+ }
+ if ($value['type'] == 'array') {
+ $value['value'] = (array)json_decode($value['value'], true);
+ }
+ $config[$value['name']] = $value['value'];
+ }
+ $config['name'] = $siteName;
+ file_put_contents($configFile, ' $v) {
+ if (!is_dir(ROOT_PATH . $v)) {
+ throw new Exception(__('Please go to the official website to download the full package or resource package and try to install'));
+ break;
+ }
+ }
+ return true;
+ }
}
diff --git a/application/admin/command/Install/fastadmin.sql b/application/admin/command/Install/fastadmin.sql
index cf8e91e4..97b36f45 100755
--- a/application/admin/command/Install/fastadmin.sql
+++ b/application/admin/command/Install/fastadmin.sql
@@ -1,9 +1,5 @@
/*
FastAdmin Install SQL
-
- 官网: https://www.fastadmin.net
- 演示: https://demo.fastadmin.net
-
Date: 2018年05月26日
*/
@@ -30,13 +26,13 @@ CREATE TABLE `fa_admin` (
`status` varchar(30) NOT NULL DEFAULT 'normal' COMMENT '状态',
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='管理员表';
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='管理员表';
-- ----------------------------
-- Records of fa_admin
-- ----------------------------
BEGIN;
-INSERT INTO `fa_admin` VALUES (1, 'admin', 'Admin', '075eaec83636846f51c152f29b98a2fd', 's4f3', '/assets/img/avatar.png', 'admin@fastadmin.net', 0, 1502029281, '127.0.0.1',1492186163, 1502029281, 'd3992c3b-5ecc-4ecb-9dc2-8997780fcadc', 'normal');
+INSERT INTO `fa_admin` VALUES (1, 'admin', 'Admin', '075eaec83636846f51c152f29b98a2fd', 's4f3', '/assets/img/avatar.png', 'admin@admin.com', 0, 1502029281, '127.0.0.1',1492186163, 1502029281, 'd3992c3b-5ecc-4ecb-9dc2-8997780fcadc', 'normal');
COMMIT;
-- ----------------------------
@@ -55,7 +51,7 @@ CREATE TABLE `fa_admin_log` (
`createtime` int(10) DEFAULT NULL COMMENT '操作时间',
PRIMARY KEY (`id`),
KEY `name` (`username`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='管理员日志表';
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='管理员日志表';
-- ----------------------------
-- Table structure for fa_attachment
@@ -79,7 +75,7 @@ CREATE TABLE `fa_attachment` (
`storage` varchar(100) NOT NULL DEFAULT 'local' COMMENT '存储位置',
`sha1` varchar(40) NOT NULL DEFAULT '' COMMENT '文件 sha1编码',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='附件表';
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='附件表';
-- ----------------------------
-- Records of fa_attachment
@@ -101,7 +97,7 @@ CREATE TABLE `fa_auth_group` (
`updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
`status` varchar(30) NOT NULL DEFAULT '' COMMENT '状态',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='分组表';
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='分组表';
-- ----------------------------
-- Records of fa_auth_group
@@ -124,7 +120,7 @@ CREATE TABLE `fa_auth_group_access` (
UNIQUE KEY `uid_group_id` (`uid`,`group_id`),
KEY `uid` (`uid`),
KEY `group_id` (`group_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='权限分组表';
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='权限分组表';
-- ----------------------------
-- Records of fa_auth_group_access
@@ -155,7 +151,7 @@ CREATE TABLE `fa_auth_rule` (
UNIQUE KEY `name` (`name`) USING BTREE,
KEY `pid` (`pid`),
KEY `weigh` (`weigh`)
-) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='节点表';
+) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8 COMMENT='节点表';
-- ----------------------------
-- Records of fa_auth_rule
@@ -267,7 +263,7 @@ CREATE TABLE `fa_category` (
PRIMARY KEY (`id`),
KEY `weigh` (`weigh`,`id`),
KEY `pid` (`pid`)
-) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='分类表';
+) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='分类表';
-- ----------------------------
-- Records of fa_category
@@ -305,13 +301,13 @@ CREATE TABLE `fa_config` (
`extend` varchar(255) NOT NULL DEFAULT '' COMMENT '扩展属性',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统配置';
+) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='系统配置';
-- ----------------------------
-- Records of fa_config
-- ----------------------------
BEGIN;
-INSERT INTO `fa_config` VALUES (1, 'name', 'basic', 'Site name', '请填写站点名称', 'string', 'FastAdmin', '', 'required', '');
+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', '');
@@ -343,7 +339,7 @@ CREATE TABLE `fa_ems` (
`ip` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'IP',
`createtime` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='邮箱验证码表';
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='邮箱验证码表';
-- ----------------------------
-- Table structure for fa_sms
@@ -358,7 +354,7 @@ CREATE TABLE `fa_sms` (
`ip` varchar(30) NOT NULL DEFAULT '' COMMENT 'IP',
`createtime` int(10) unsigned DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='短信验证码表';
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='短信验证码表';
-- ----------------------------
-- Table structure for fa_test
@@ -397,7 +393,7 @@ CREATE TABLE `fa_test` (
`status` enum('normal','hidden') NOT NULL DEFAULT 'normal' COMMENT '状态',
`state` enum('0','1','2') NOT NULL DEFAULT '1' COMMENT '状态值:0=禁用,1=正常,2=推荐',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='测试表';
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='测试表';
-- ----------------------------
-- Records of fa_test
@@ -443,7 +439,7 @@ CREATE TABLE `fa_user` (
KEY `username` (`username`),
KEY `email` (`email`),
KEY `mobile` (`mobile`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='会员表';
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='会员表';
-- ----------------------------
-- Records of fa_user
@@ -464,7 +460,7 @@ CREATE TABLE `fa_user_group` (
`updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
`status` enum('normal','hidden') DEFAULT NULL COMMENT '状态',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='会员组表';
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='会员组表';
-- ----------------------------
-- Records of fa_user_group
@@ -486,7 +482,7 @@ CREATE TABLE `fa_user_money_log` (
`memo` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`createtime` int(10) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='会员余额变动表';
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='会员余额变动表';
-- ----------------------------
-- Table structure for fa_user_rule
@@ -504,7 +500,7 @@ CREATE TABLE `fa_user_rule` (
`weigh` int(10) DEFAULT '0' COMMENT '权重',
`status` enum('normal','hidden') DEFAULT NULL COMMENT '状态',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='会员规则表';
+) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='会员规则表';
-- ----------------------------
-- Records of fa_user_rule
@@ -537,7 +533,7 @@ CREATE TABLE `fa_user_score_log` (
`memo` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`createtime` int(10) DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='会员积分变动表';
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='会员积分变动表';
-- ----------------------------
-- Table structure for fa_user_token
@@ -549,32 +545,5 @@ CREATE TABLE `fa_user_token` (
`createtime` int(10) DEFAULT NULL COMMENT '创建时间',
`expiretime` int(10) DEFAULT NULL COMMENT '过期时间',
PRIMARY KEY (`token`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT 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) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '旧版本号',
- `newversion` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '新版本号',
- `packagesize` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '包大小',
- `content` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '升级内容',
- `downloadurl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '下载地址',
- `enforce` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '强制更新',
- `createtime` int(10) NOT NULL DEFAULT 0 COMMENT '创建时间',
- `updatetime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
- `weigh` int(10) NOT NULL DEFAULT 0 COMMENT '权重',
- `status` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '状态',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT = '版本表';
-
--- ----------------------------
--- Table structure for fa_version
--- ----------------------------
-BEGIN;
-INSERT INTO `fa_version` (`id`, `oldversion`, `newversion`, `packagesize`, `content`, `downloadurl`, `enforce`, `createtime`, `updatetime`, `weigh`, `status`) VALUES
-(1, '1.1.1,2', '1.2.1', '20M', '更新内容', 'https://www.fastadmin.net/download.html', 1, 1520425318, 0, 0, 'normal');
-COMMIT;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='会员Token表';
SET FOREIGN_KEY_CHECKS = 1;
diff --git a/application/admin/command/Install/install.html b/application/admin/command/Install/install.html
new file mode 100644
index 00000000..382d776a
--- /dev/null
+++ b/application/admin/command/Install/install.html
@@ -0,0 +1,316 @@
+
+
+
+
+
+ {:__('Installing FastAdmin')}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{:__('Installing FastAdmin')}
+
+
+
+
\ No newline at end of file
diff --git a/application/admin/command/Install/zh-cn.php b/application/admin/command/Install/zh-cn.php
new file mode 100644
index 00000000..b0ecec73
--- /dev/null
+++ b/application/admin/command/Install/zh-cn.php
@@ -0,0 +1,34 @@
+ '温馨提示',
+ 'Installing FastAdmin' => '安装FastAdmin',
+ 'Mysql Hostname' => 'MySQL 数据库地址',
+ 'Mysql Database' => 'MySQL 数据库名',
+ 'Mysql Username' => 'MySQL 用户名',
+ 'Mysql Password' => 'MySQL 密码',
+ 'Mysql Prefix' => 'MySQL 数据表前缀',
+ 'Mysql Hostport' => 'MySQL 端口号',
+ 'Admin Username' => '管理者用户名',
+ 'Admin Email' => '管理者Email',
+ 'Admin Password' => '管理者密码',
+ 'Repeat Password' => '重复密码',
+ 'Website' => '网站名称',
+ 'My Website' => '我的网站',
+ 'Install now' => '点击安装',
+ 'Installing' => '安装中...',
+ 'Home' => '访问首页',
+ 'Dashboard' => '进入后台',
+ 'Go back' => '返回上一页',
+ 'Install Successed' => '安装成功!',
+ 'Security tips' => '温馨提示:请将以下后台登录入口添加到你的收藏夹,为了你的安全,不要泄漏或发送给他人!如有泄漏请及时修改!',
+ 'Please input correct database' => '请输入正确的数据库名',
+ 'Please input correct username' => '用户名只能由3-12位数字、字母、下划线组合',
+ 'Please input correct password' => '密码长度必须在6-16位之间,不能包含空格',
+ 'The two passwords you entered did not match' => '两次输入的密码不一致',
+ 'Please input correct website' => '网站名称输入不正确',
+ 'The current version %s is too low, please use PHP 5.5 or higher' => '当前版本%s过低,请使用PHP5.5以上版本',
+ 'PDO is not currently installed and cannot be installed' => '当前未开启PDO,无法进行安装',
+ 'The current permissions are insufficient to write the file %s' => '当前权限不足,无法写入文件%s',
+ 'Please go to the official website to download the full package or resource package and try to install' => '当前代码仅包含核心代码,请前往官网下载完整包或资源包覆盖后再尝试安装',
+ 'The system has been installed. If you need to reinstall, please remove %s first' => '当前已经安装成功,如果需要重新安装,请手动移除%s文件',
+];
\ No newline at end of file
diff --git a/application/admin/command/Menu.php b/application/admin/command/Menu.php
index c81d072a..cc21f3bd 100755
--- a/application/admin/command/Menu.php
+++ b/application/admin/command/Menu.php
@@ -203,14 +203,18 @@ class Menu extends Command
$tempClassFile = __DIR__ . DS . $uniqueName . ".php";
file_put_contents($tempClassFile, $classContent);
$className = "\\app\\admin\\command\\" . $uniqueName;
+
+ //删除临时文件
+ register_shutdown_function(function () use ($tempClassFile) {
+ if ($tempClassFile) {
+ //删除临时文件
+ @unlink($tempClassFile);
+ }
+ });
+
//反射机制调用类的注释和方法名
$reflector = new ReflectionClass($className);
- if (isset($tempClassFile)) {
- //删除临时文件
- @unlink($tempClassFile);
- }
-
//只匹配公共的方法
$methods = $reflector->getMethods(ReflectionMethod::IS_PUBLIC);
$classComment = $reflector->getDocComment();
diff --git a/application/admin/common.php b/application/admin/common.php
index 9ecbf839..a6f18429 100755
--- a/application/admin/common.php
+++ b/application/admin/common.php
@@ -10,9 +10,9 @@ if (!function_exists('build_select')) {
/**
* 生成下拉列表
* @param string $name
- * @param mixed $options
- * @param mixed $selected
- * @param mixed $attr
+ * @param mixed $options
+ * @param mixed $selected
+ * @param mixed $attr
* @return string
*/
function build_select($name, $options, $selected = [], $attr = [])
@@ -28,8 +28,8 @@ if (!function_exists('build_radios')) {
/**
* 生成单选按钮组
* @param string $name
- * @param array $list
- * @param mixed $selected
+ * @param array $list
+ * @param mixed $selected
* @return string
*/
function build_radios($name, $list = [], $selected = null)
@@ -49,8 +49,8 @@ if (!function_exists('build_checkboxs')) {
/**
* 生成复选按钮组
* @param string $name
- * @param array $list
- * @param mixed $selected
+ * @param array $list
+ * @param mixed $selected
* @return string
*/
function build_checkboxs($name, $list = [], $selected = null)
@@ -72,9 +72,9 @@ if (!function_exists('build_category_select')) {
* 生成分类下拉列表框
* @param string $name
* @param string $type
- * @param mixed $selected
- * @param array $attr
- * @param array $header
+ * @param mixed $selected
+ * @param array $attr
+ * @param array $header
* @return string
*/
function build_category_select($name, $type, $selected = null, $attr = [], $header = [])
@@ -194,3 +194,33 @@ if (!function_exists('build_heading')) {
return $result;
}
}
+
+if (!function_exists('build_suffix_image')) {
+ /**
+ * 生成文件后缀图片
+ * @param string $suffix 后缀
+ * @param null $background
+ * @return string
+ */
+ function build_suffix_image($suffix, $background = null)
+ {
+ $suffix = mb_substr(strtoupper($suffix), 0, 4);
+ $total = unpack('L', hash('adler32', $suffix, true))[1];
+ $hue = $total % 360;
+ list($r, $g, $b) = hsv2rgb($hue / 360, 0.3, 0.9);
+
+ $background = $background ? $background : "rgb({$r},{$g},{$b})";
+
+ $icon = <<
+
+
+
+
+
+ {$suffix}
+
+EOT;
+ return $icon;
+ }
+}
diff --git a/application/admin/controller/Addon.php b/application/admin/controller/Addon.php
index 691fa442..c3c1939c 100644
--- a/application/admin/controller/Addon.php
+++ b/application/admin/controller/Addon.php
@@ -39,7 +39,7 @@ class Addon extends Backend
$v['config'] = $config ? 1 : 0;
$v['url'] = str_replace($this->request->server('SCRIPT_NAME'), '', $v['url']);
}
- $this->assignconfig(['addons' => $addons]);
+ $this->assignconfig(['addons' => $addons, 'api_url' => config('fastadmin.api_url'), 'faversion' => config('fastadmin.version')]);
return $this->view->fetch();
}
diff --git a/application/admin/controller/Ajax.php b/application/admin/controller/Ajax.php
index 5b9ac592..92c157a7 100644
--- a/application/admin/controller/Ajax.php
+++ b/application/admin/controller/Ajax.php
@@ -36,6 +36,12 @@ class Ajax extends Backend
public function lang()
{
header('Content-Type: application/javascript');
+ header("Cache-Control: public");
+ header("Pragma: cache");
+
+ $offset = 30 * 60 * 60 * 24; // 缓存一个月
+ header("Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT");
+
$controllername = input("controllername");
//默认只加载了控制器对应的语言名,你还根据控制器名来加载额外的语言包
$this->loadlang($controllername);
@@ -290,4 +296,16 @@ class Ajax extends Backend
$this->success('', null, $provincelist);
}
+ /**
+ * 生成后缀图标
+ */
+ public function icon()
+ {
+ $suffix = $this->request->request("suffix");
+ header('Content-type: image/svg+xml');
+ $suffix = $suffix ? $suffix : "FILE";
+ echo build_suffix_image($suffix);
+ exit;
+ }
+
}
diff --git a/application/admin/controller/auth/Rule.php b/application/admin/controller/auth/Rule.php
index ca99f83b..764e628b 100644
--- a/application/admin/controller/auth/Rule.php
+++ b/application/admin/controller/auth/Rule.php
@@ -10,7 +10,7 @@ use think\Cache;
/**
* 规则管理
*
- * @icon fa fa-list
+ * @icon fa fa-list
* @remark 规则通常对应一个控制器的方法,同时左侧的菜单栏数据也从规则中体现,通常建议通过控制台进行生成规则节点
*/
class Rule extends Backend
@@ -26,15 +26,14 @@ class Rule extends Backend
public function _initialize()
{
parent::_initialize();
- if (!$this->auth->isSuperAdmin()){
+ if (!$this->auth->isSuperAdmin()) {
$this->error(__('Access is allowed only to the super management group'));
}
$this->model = model('AuthRule');
// 必须将结果集转换为数组
- $ruleList = collection($this->model->order('weigh', 'desc')->order('id', 'asc')->select())->toArray();
+ $ruleList = collection($this->model->field('condition,remark,createtime,updatetime', true)->order('weigh DESC,id ASC')->select())->toArray();
foreach ($ruleList as $k => &$v) {
$v['title'] = __($v['title']);
- $v['remark'] = __($v['remark']);
}
unset($v);
Tree::instance()->init($ruleList);
diff --git a/application/admin/controller/general/Attachment.php b/application/admin/controller/general/Attachment.php
index 9dec72cc..b2a35d70 100644
--- a/application/admin/controller/general/Attachment.php
+++ b/application/admin/controller/general/Attachment.php
@@ -7,7 +7,7 @@ use app\common\controller\Backend;
/**
* 附件管理
*
- * @icon fa fa-circle-o
+ * @icon fa fa-circle-o
* @remark 主要用于管理上传到又拍云的数据或上传至本服务的上传数据
*/
class Attachment extends Backend
@@ -22,6 +22,7 @@ class Attachment extends Backend
{
parent::_initialize();
$this->model = model('Attachment');
+ $this->view->assign("mimetypeList", \app\common\model\Attachment::getMimetypeList());
}
/**
@@ -34,13 +35,17 @@ class Attachment extends Backend
if ($this->request->isAjax()) {
$mimetypeQuery = [];
$filter = $this->request->request('filter');
- $filterArr = (array)json_decode($filter, TRUE);
- if (isset($filterArr['mimetype']) && stripos($filterArr['mimetype'], ',') !== false) {
+ $filterArr = (array)json_decode($filter, true);
+ if (isset($filterArr['mimetype']) && preg_match("/[]\,|\*]/", $filterArr['mimetype'])) {
$this->request->get(['filter' => json_encode(array_diff_key($filterArr, ['mimetype' => '']))]);
$mimetypeQuery = function ($query) use ($filterArr) {
$mimetypeArr = explode(',', $filterArr['mimetype']);
foreach ($mimetypeArr as $index => $item) {
- $query->whereOr('mimetype', 'like', '%' . $item . '%');
+ if (stripos($item, "/*") !== false) {
+ $query->whereOr('mimetype', 'like', str_replace("/*", "/", $item) . '%');
+ } else {
+ $query->whereOr('mimetype', 'like', '%' . $item . '%');
+ }
}
};
}
diff --git a/application/admin/controller/general/Config.php b/application/admin/controller/general/Config.php
index 8c2979c8..24b405a4 100644
--- a/application/admin/controller/general/Config.php
+++ b/application/admin/controller/general/Config.php
@@ -11,7 +11,7 @@ use think\Validate;
/**
* 系统配置
*
- * @icon fa fa-cogs
+ * @icon fa fa-cogs
* @remark 可以在此增改系统的变量和分组,也可以自定义分组和变量,如果需要删除请从数据库中删除
*/
class Config extends Backend
@@ -27,6 +27,11 @@ class Config extends Backend
{
parent::_initialize();
$this->model = model('Config');
+ ConfigModel::event('before_write', function ($row) {
+ if (isset($row['name']) && $row['name'] == 'name' && preg_match("/fast" . "admin/i", $row['value'])) {
+ throw new Exception(__("Site name incorrect"));
+ }
+ });
}
/**
@@ -79,26 +84,26 @@ class Config extends Backend
foreach ($params as $k => &$v) {
$v = is_array($v) ? implode(',', $v) : $v;
}
+ if (in_array($params['type'], ['select', 'selects', 'checkbox', 'radio', 'array'])) {
+ $params['content'] = json_encode(ConfigModel::decode($params['content']), JSON_UNESCAPED_UNICODE);
+ } else {
+ $params['content'] = '';
+ }
try {
- if (in_array($params['type'], ['select', 'selects', 'checkbox', 'radio', 'array'])) {
- $params['content'] = json_encode(ConfigModel::decode($params['content']), JSON_UNESCAPED_UNICODE);
- } else {
- $params['content'] = '';
- }
$result = $this->model->create($params);
- if ($result !== false) {
- try {
- $this->refreshFile();
- } catch (Exception $e) {
- $this->error($e->getMessage());
- }
- $this->success();
- } else {
- $this->error($this->model->getError());
- }
} catch (Exception $e) {
$this->error($e->getMessage());
}
+ if ($result !== false) {
+ try {
+ $this->refreshFile();
+ } catch (Exception $e) {
+ $this->error($e->getMessage());
+ }
+ $this->success();
+ } else {
+ $this->error($this->model->getError());
+ }
}
$this->error(__('Parameter %s can not be empty', ''));
}
@@ -128,7 +133,11 @@ class Config extends Backend
$configList[] = $v->toArray();
}
}
- $this->model->allowField(true)->saveAll($configList);
+ try {
+ $this->model->allowField(true)->saveAll($configList);
+ } catch (Exception $e) {
+ $this->error($e->getMessage());
+ }
try {
$this->refreshFile();
} catch (Exception $e) {
diff --git a/application/admin/lang/zh-cn.php b/application/admin/lang/zh-cn.php
index b18b5bf6..7c28b2bf 100755
--- a/application/admin/lang/zh-cn.php
+++ b/application/admin/lang/zh-cn.php
@@ -172,10 +172,10 @@ return [
'Second group 2' => '二级管理组2',
'Third group 2' => '三级管理组2',
'Dashboard tips' => '用于展示当前系统中的统计数据、统计报表及重要实时数据',
- 'Config tips' => '可以在此增改系统的变量和分组,也可以自定义分组和变量,如果需要删除请从数据库中删除',
+ 'Config tips' => '可以在此增改系统的变量和分组,也可以自定义分组和变量',
'Category tips' => '用于统一管理网站的所有分类,分类可进行无限级分类,分类类型请在常规管理->系统配置->字典配置中添加',
'Attachment tips' => '主要用于管理上传到服务器或第三方存储的数据',
- 'Addon tips' => '可在线安装、卸载、禁用、启用插件,同时支持添加本地插件。FastAdmin已上线插件商店 ,你可以发布你的免费或付费插件:https://www.fastadmin.net/store.html ',
+ 'Addon tips' => '可在线安装、卸载、禁用、启用插件,同时支持添加本地插件。',
'Admin tips' => '一个管理员可以有多个角色组,左侧的菜单根据管理员所拥有的权限进行生成',
'Admin log tips' => '管理员可以查看自己所拥有的权限的管理员日志',
'Group tips' => '角色组可以有多个,角色有上下级层级关系,如果子角色有角色组和管理员的权限则可以派生属于自己组别的下级角色组或管理员',
diff --git a/application/admin/lang/zh-cn/addon.php b/application/admin/lang/zh-cn/addon.php
index 910e1fe6..9e40a64c 100755
--- a/application/admin/lang/zh-cn/addon.php
+++ b/application/admin/lang/zh-cn/addon.php
@@ -18,18 +18,18 @@ return [
'Conflict tips' => '此插件中发现和现有系统中部分文件发现冲突!以下文件将会被影响,请备份好相关文件后再继续操作',
'Login tips' => '此处登录账号为FastAdmin官网账号 ',
'Logined tips' => '你好!%s 当前你已经登录,将同步保存你的购买记录',
- 'Pay tips' => '扫码支付后如果仍然无法立即下载,请不要重复支付,请加QQ群:636393962 向管理员反馈',
+ 'Pay tips' => '扫码支付后如果仍然无法立即下载,请不要重复支付,请稍后再重试安装!',
'Pay click tips' => '请点击这里在新窗口中进行支付!',
'Pay new window tips' => '请在新弹出的窗口中进行支付,支付完成后再重新点击安装按钮进行安装!',
'Uninstall tips' => '确认卸载[%s] ?卸载将会删除所有插件文件且不可找回!!! 插件如果有创建数据库表请手动删除!!!
如有重要数据请备份后再操作!',
- 'Upgrade tips' => '确认升级[%s] ?如果之前购买插件时未登录,此次升级可能出现购买后才可以下载的提示!!! 升级后可能出现部分冗余数据记录,请根据需要移除即可!!!
如有重要数据请备份后再操作!',
+ 'Upgrade tips' => '确认升级[%s] ?升级后可能出现部分冗余数据记录,请根据需要移除即可!!!
如有重要数据请备份后再操作!',
'Offline installed tips' => '插件安装成功!清除浏览器缓存和框架缓存后生效!',
'Online installed tips' => '插件安装成功!清除浏览器缓存和框架缓存后生效!',
'Not login tips' => '你当前未登录FastAdmin,登录后将同步已购买的记录,下载时无需二次付费!',
'Not installed tips' => '请安装后再访问插件前台页面!',
'Not enabled tips' => '插件已经禁用,请启用后再访问插件前台页面!',
'New version tips' => '发现新版本:%s 点击查看更新日志',
- 'Store now available tips' => 'FastAdmin插件市场暂不可用,是否切换到本地插件?',
+ 'Store now available tips' => '插件市场暂不可用,是否切换到本地插件?',
'Switch to the local' => '切换到本地插件',
'try to reload' => '重新尝试加载',
'Please disable addon first' => '请先禁用插件再进行升级',
@@ -74,7 +74,7 @@ return [
'Enable' => '启用',
'Your username or email' => '你的手机号、用户名或邮箱',
'Your password' => '你的密码',
- 'Login FastAdmin' => '登录FastAdmin',
+ 'Login FastAdmin' => '登录',
'Login' => '登录',
'Logout' => '退出登录',
'Register' => '注册账号',
diff --git a/application/admin/lang/zh-cn/dashboard.php b/application/admin/lang/zh-cn/dashboard.php
index 6e01d309..0008f079 100644
--- a/application/admin/lang/zh-cn/dashboard.php
+++ b/application/admin/lang/zh-cn/dashboard.php
@@ -44,5 +44,4 @@ return [
'Timezone' => '时区',
'Language' => '语言',
'View more' => '查看更多',
- 'Security tips' => ' 安全提示:你正在使用默认的后台登录入口,为了你的网站安全,强烈建议你修改后台登录入口,点击查看修改方法 ',
];
diff --git a/application/admin/lang/zh-cn/general/config.php b/application/admin/lang/zh-cn/general/config.php
index 130c2f42..3904648e 100644
--- a/application/admin/lang/zh-cn/general/config.php
+++ b/application/admin/lang/zh-cn/general/config.php
@@ -55,6 +55,7 @@ return [
'Mail smtp password' => 'SMTP密码',
'Mail vertify type' => 'SMTP验证方式',
'Mail from' => '发件人邮箱',
+ 'Site name incorrect' => '网站名称错误',
'Name already exist' => '变量名称已经存在',
'Add new config' => '点击添加新的配置',
'Send a test message' => '发送测试邮件',
diff --git a/application/admin/view/addon/index.html b/application/admin/view/addon/index.html
index 2c974c10..26400cdf 100644
--- a/application/admin/view/addon/index.html
+++ b/application/admin/view/addon/index.html
@@ -63,11 +63,12 @@
{:build_heading(null,FALSE)}
+ {if $Think.config.fastadmin.api_url}
-
+ {/if}
@@ -76,25 +77,18 @@
@@ -135,7 +129,7 @@
{:__('Version')}
-
+
diff --git a/application/admin/view/auth/adminlog/detail.html b/application/admin/view/auth/adminlog/detail.html
index 2adb9051..a34cfcf8 100644
--- a/application/admin/view/auth/adminlog/detail.html
+++ b/application/admin/view/auth/adminlog/detail.html
@@ -9,7 +9,7 @@
{volist name="row" id="vo" }
{:__($key)}
- {$vo|htmlentities}
+ {if $key=='createtime'}{$vo|datetime}{else/}{$vo|htmlentities}{/if}
{/volist}
@@ -19,4 +19,4 @@
{:__('Close')}
-
\ No newline at end of file
+
diff --git a/application/admin/view/common/header.html b/application/admin/view/common/header.html
index 379efb12..a6cbd025 100755
--- a/application/admin/view/common/header.html
+++ b/application/admin/view/common/header.html
@@ -28,13 +28,6 @@
-
-
-
-
-
-
-
@@ -85,20 +78,6 @@
{$admin.logintime|date="Y-m-d H:i:s",###}
-
-
-
-