upgrade sql, notify, addon status
This commit is contained in:
parent
4ae7a3ea51
commit
8ddee45e5f
@ -3,6 +3,7 @@ namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\AdminController;
|
||||
use app\common\lib\SqlFile;
|
||||
use think\Exception;
|
||||
use think\facade\View;
|
||||
use think\facade\Request;
|
||||
use think\facade\Config;
|
||||
@ -302,28 +303,25 @@ class Addons extends AdminController
|
||||
|
||||
return json(['code' => 0, 'msg' => '插件卸载成功']);
|
||||
}
|
||||
|
||||
//启用插件
|
||||
public function start()
|
||||
{
|
||||
$name = input('name');
|
||||
$arr = ['status' => 1];
|
||||
//$res = get_addons_info($name);
|
||||
//$res = get_addons_instance($name);
|
||||
$res = set_addons_info($name,$arr);
|
||||
return json(['code'=>0,'msg'=>$name.'插件已启用']);
|
||||
|
||||
}
|
||||
|
||||
//暂停插件
|
||||
public function shutDown()
|
||||
{
|
||||
$name = input('name');
|
||||
$arr = ['status' => 0];
|
||||
$res = set_addons_info($name,$arr);
|
||||
return json(['code'=>-1,'msg'=>$name.'插件已禁用']);
|
||||
|
||||
}
|
||||
|
||||
// 启用禁用插件
|
||||
public function status(){
|
||||
$name = input('name');
|
||||
$info = get_addons_info($name);
|
||||
try{
|
||||
$arr = ['status' => $info['status'] ? 0 :1];
|
||||
set_addons_info($name,$arr);
|
||||
if($arr['status']) {
|
||||
$res = ['code'=>0,'msg'=>'启用成功'];
|
||||
} else {
|
||||
$res = ['code'=>0,'msg'=>'已被禁用'];
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw new Exception($e->getMessage());
|
||||
}
|
||||
|
||||
return json($res);
|
||||
}
|
||||
|
||||
//配置插件
|
||||
public function config($name)
|
||||
|
@ -2,10 +2,59 @@
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\AdminController;
|
||||
use think\facade\Db;
|
||||
|
||||
class Menu extends AdminController
|
||||
{
|
||||
public function index(){
|
||||
return view();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 动态菜单并排序
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function getMenuNavbar()
|
||||
{
|
||||
$pid = empty(input('id')) ? 0 : input('id');
|
||||
$data = Db::name('auth_rule')->field('id,title,icon,name,sort')->where(['delete_time'=> 0,'status'=> 1,'ismenu'=>1,'pid'=>$pid])->select();
|
||||
$tree = [];
|
||||
foreach ($data as $k => $v) {
|
||||
$hasChild = $this->hasChildren($v['id']);
|
||||
if($hasChild) {
|
||||
$v['hasChildren'] = 1;
|
||||
} else {
|
||||
$v['hasChildren'] = 0;
|
||||
}
|
||||
$tree[] = ['id'=>$v['id'],'text'=>$v['title'],'icon'=>$v['icon'],'hasChildren'=>$v['hasChildren'],'href'=>(string) url($v['name']),'sort'=>$v['sort']];
|
||||
}
|
||||
// 排序
|
||||
$cmf_arr = array_column($tree, 'sort');
|
||||
array_multisort($cmf_arr, SORT_ASC, $tree);
|
||||
|
||||
return json($tree);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有子菜单
|
||||
* @param $pid
|
||||
* @return bool
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function hasChildren($pid)
|
||||
{
|
||||
$data = Db::name('auth_rule')->field('pid')->where(['delete_time'=> 0,'status'=> 1,'ismenu'=>1,'pid'=>$pid])->select()->toArray();
|
||||
if(count($data)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -160,10 +160,7 @@ class Upgrade extends AdminController
|
||||
}
|
||||
|
||||
//把远程文件放入本地
|
||||
|
||||
//拼接路径
|
||||
//$upload_dir = substr($this->upload_dir,-1) == '/' ? $this->upload_dir : $this->upload_dir.'/';
|
||||
$upload_dir = Files::getDirPath($this->upload_dir);
|
||||
$upload_dir = Files::getDirPath($this->upload_dir); //拼接路径
|
||||
Files::mkdirs($upload_dir);
|
||||
|
||||
$package_file = $upload_dir.'taoler_'.$version_num.'.zip'; //升级的压缩包文件
|
||||
@ -211,15 +208,12 @@ class Upgrade extends AdminController
|
||||
|
||||
//清理缓存
|
||||
$this->clearSysCache();
|
||||
|
||||
//更新版本
|
||||
//Db::name('system')->update(['sys_version_num'=>$version_num,'id'=>1]);
|
||||
|
||||
$value = [
|
||||
'version' => $version_num
|
||||
];
|
||||
$res = SetArr::name('taoler')->edit($value);
|
||||
if($res == false){
|
||||
if(!$res){
|
||||
return json(['code'=>-1,'msg'=>'代码更新成功,但版本写入失败']);
|
||||
}
|
||||
|
||||
@ -227,9 +221,11 @@ class Upgrade extends AdminController
|
||||
|
||||
}
|
||||
|
||||
/**升级执行
|
||||
/**
|
||||
* 升级执行
|
||||
* @param string $package_file
|
||||
* @return \think\response\Json
|
||||
* @throws \Exception
|
||||
*/
|
||||
private function execute_update(string $package_file)
|
||||
{
|
||||
@ -246,7 +242,16 @@ class Upgrade extends AdminController
|
||||
//$package_name = str_replace('.zip','',$package_file);
|
||||
|
||||
Log::channel('update')->info('update:{type} {progress} {msg}',['type'=>'success','progress'=>'50%','msg'=>'升级文件解压成功!']);
|
||||
|
||||
|
||||
//升级sql操作
|
||||
$upSql = $zipPath.'runtime/update.sql';
|
||||
if(file_exists($upSql)) {
|
||||
SqlFile::dbExecute($upSql);
|
||||
//删除sql语句
|
||||
unlink($upSql);
|
||||
}
|
||||
|
||||
|
||||
//升级PHP
|
||||
if(is_dir($zipPath)) {
|
||||
//升级前的写入文件权限检查
|
||||
@ -288,13 +293,7 @@ class Upgrade extends AdminController
|
||||
|
||||
}
|
||||
|
||||
//升级sql操作
|
||||
$upSql = $zipPath.'runtime/update.sql';
|
||||
if(file_exists($upSql)) {
|
||||
SqlFile::dbExecute($upSql);
|
||||
//删除sql语句
|
||||
unlink($upSql);
|
||||
}
|
||||
|
||||
|
||||
Log::channel('update')->info('update:{type} {progress} {msg}',['type'=>'success','progress'=>'100%','msg'=>'升级成功!']);
|
||||
//更新系统的版本号了
|
||||
|
@ -15,12 +15,13 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="addons-list" lay-filter="addons-list"></table>
|
||||
|
||||
<script type="text/html" id="toolbar">
|
||||
<div class="layui-btn-group" style="padding-bottom: 10px;">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="onlineAddons">在线</button>
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="installed">已安装</button>
|
||||
<a href="#denable" type="button" class="layui-btn layui-btn-sm" lay-event="onlineAddons">在线</a>
|
||||
<a href="#enable" type="button" class="layui-btn layui-btn-sm" lay-event="installed">已安装</a>
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="freeAddons">免费</button>
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="payAddons">付费</button>
|
||||
</div>
|
||||
@ -29,24 +30,22 @@
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-admin" data-type="user-info">用户信息</button>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="addons-installed-tool">
|
||||
{{# if(d.status == 1){ }}
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="shutdown"><i class="layui-icon layui-icon-pause"></i>禁用</a>
|
||||
{{# } else { }}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="start"><i class="layui-icon layui-icon-play"></i>启动</a>
|
||||
{{# } }}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="config"><i class="layui-icon layui-icon-set"></i>设置</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>卸载</a>
|
||||
</script>
|
||||
<script type="text/html" id="addons-tool">
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="install"><i class="layui-icon layui-icon-edit"></i>安装</a>
|
||||
<select id="vers{{d.name}}" name="sss" class="layui-border" lay-ignore lay-filter="versSelect">
|
||||
{{# d.vers.forEach(function(item, index){ }}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="install" data-url="{:url('Addons/install')}"><i class="layui-icon layui-icon-edit"></i>安装</a>
|
||||
<select id="vers{{d.name}}" name="sss" class="layui-border" lay-ignore lay-filter="versSelect">
|
||||
{{# d.vers.forEach(function(item, index){ }}
|
||||
<option value="{{ item }}">{{ item }}</option>
|
||||
{{# }); }}
|
||||
</select>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="config"><i class="layui-icon layui-icon-set"></i>设置</a>
|
||||
{{# }); }}
|
||||
</select>
|
||||
</script>
|
||||
<script type="text/html" id="addons-installed-tool">
|
||||
{{# if(d.status == 1){ }}
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="status" data-url="{:url('Addons/status')}"><i class="layui-icon layui-icon-pause"></i>禁用</a>
|
||||
{{# } else { }}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="status" data-url="{:url('Addons/status')}"><i class="layui-icon layui-icon-play"></i>启动</a>
|
||||
{{# } }}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="config" data-url="{:url('Addons/config')}"><i class="layui-icon layui-icon-set"></i>设置</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="uninstall" data-url="{:url('Addons/uninstall')}"><i class="layui-icon layui-icon-delete"></i>卸载</a>
|
||||
</script>
|
||||
</form>
|
||||
|
||||
@ -56,25 +55,21 @@
|
||||
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script src="/static/notify.js"></script>
|
||||
<script>
|
||||
var addonsIndex = "{:url('Addons/index')}",
|
||||
addonsList = "{:url('Addons/addonsList')}",
|
||||
addonsDelete = "{:url('Addons/uninstall')}",
|
||||
var addonsList = "{:url('Addons/addonsList')}",
|
||||
addonsEdit = "{:url('Addons/edit')}";
|
||||
var addonsStart = "{:url('Addons/start')}";
|
||||
var addonsShut = "{:url('Addons/shutDown')}";
|
||||
var addonsInstall = "{:url('Addons/install')}";
|
||||
var addonsConfig = "{:url('Addons/config')}";
|
||||
|
||||
|
||||
layui.config({
|
||||
base: '/static/admin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'addons','table','form','upload'], function(){
|
||||
}).use(['index', 'addons','table','form','upload',"notify"], function(){
|
||||
var $ = layui.jquery
|
||||
,table = layui.table
|
||||
,form = layui.form
|
||||
,upload = layui.upload;
|
||||
var notify = layui.notify;
|
||||
|
||||
form.render('select'); // 渲染所在容器内的 select 元素
|
||||
//监听版本选择
|
||||
@ -107,15 +102,10 @@
|
||||
data:field,
|
||||
daType:"json",
|
||||
success:function (data){
|
||||
if (data.code == 0) {
|
||||
layer.msg(data.msg,{icon:6,time:2000});
|
||||
if (res.code == 0) {
|
||||
notify.success(res.msg, "topRight");
|
||||
} else {
|
||||
layer.open({
|
||||
title:'添加失败',
|
||||
content:data.msg,
|
||||
icon:5,
|
||||
anim:6
|
||||
});
|
||||
notify.error(res.msg, "topRight");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -3,7 +3,10 @@
|
||||
{block name="body"}
|
||||
<div id="LAY_app">
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
{include file="public/header,public/side_menu,public/page_tabs" /}
|
||||
{include file="public/header" /}
|
||||
<!-- 侧边菜单 -->
|
||||
<div id="hxNavbar" data-url="{:url('menu/getMenuNavbar')}"></div>
|
||||
{include file="public/page_tabs" /}
|
||||
|
||||
<!-- 主体内容 -->
|
||||
<div class="layui-body" id="LAY_app_body">
|
||||
@ -25,7 +28,21 @@
|
||||
base: '/static/admin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use('index');
|
||||
}).use(['index','hxNav'],function (){
|
||||
|
||||
// 动态菜单
|
||||
layui.hxNav({
|
||||
element: '#hxNavbar', // 必须,指定ID
|
||||
url: "{:url('menu/getMenuNavbar')}", // 请求后台数据的接口
|
||||
type: 'post',
|
||||
shrink: false,
|
||||
onSelect: function(v) {
|
||||
//console.log(v);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
|
@ -25,8 +25,8 @@
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var AdminLogin = "{:url('Login/index')}",
|
||||
AdminLogout = "{:url('Admin/logout')}",
|
||||
adminClearCache = "{:url('Admin/clearCache')}",
|
||||
sysCy = "{$clevel}";
|
||||
adminClearCache = "{:url('Admin/clearCache')}", sysCy = "{$clevel}";
|
||||
var menuNav = "{:url('menu/getMenuNavbar')}";
|
||||
</script>
|
||||
{block name="js"}js文件{/block}
|
||||
</body>
|
||||
|
@ -1,92 +1,83 @@
|
||||
<!--
|
||||
* @Author: TaoLer <alipay_tao@qq.com>
|
||||
* @Date: 2021-12-06 16:04:50
|
||||
* @LastEditTime: 2022-06-28 10:01:33
|
||||
* @LastEditors: TaoLer
|
||||
* @Description: 后台菜单结构
|
||||
* @FilePath: \TaoLer\app\admin\view\public\side_menu.html
|
||||
* Copyright (c) 2020~2022 https://www.aieok.com All rights reserved.
|
||||
-->
|
||||
|
||||
<!-- 侧边菜单 -->
|
||||
<div class="layui-side layui-side-menu">
|
||||
<div class="layui-side-scroll">
|
||||
<div class="layui-logo" lay-href="home/console.html">
|
||||
<span>TaoLerAdmin</span>
|
||||
</div>
|
||||
|
||||
<ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
|
||||
<li data-name="home" class="layui-nav-item layui-nav-itemed">
|
||||
<a href="javascript:;" lay-tips="主页" lay-direction="2">
|
||||
<i class="layui-icon layui-icon-home"></i>
|
||||
<cite>主页</cite>
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd data-name="console" class="layui-this">
|
||||
<a lay-href="{:url('index/home')}">控制台</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
|
||||
<!--li data-name="user" class="layui-nav-item">
|
||||
<a href="javascript:;" lay-tips="用户" lay-direction="2">
|
||||
<i class="layui-icon layui-icon-user"></i>
|
||||
<cite>管理</cite>
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd>
|
||||
<a lay-href="{:url('User/list')}">网站用户1</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a lay-href="{:url('adminList')}">后台管理员</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a lay-href="{:url('authgroup/role')}">角色管理</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a lay-href="{:url('authrule/index')}">权限管理</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</li-->
|
||||
<div class="layui-side-scroll">
|
||||
<div class="layui-logo" lay-href="home/console.html">
|
||||
<span>TaoLerAdmin</span>
|
||||
</div>
|
||||
|
||||
{volist name="menu" id="vo1"}
|
||||
{if condition="isset($vo1['children'])"}
|
||||
<li data-name="set" class="layui-nav-item">
|
||||
<a href="javascript:;" lay-tips="{$vo1.title}" lay-direction="2">
|
||||
<i class="layui-icon {$vo1.icon}"></i>
|
||||
<cite>{$vo1.title}</cite>
|
||||
</a>
|
||||
|
||||
<dl class="layui-nav-child">
|
||||
{volist name="vo1['children']" id="vo2"}
|
||||
{if condition="isset($vo2['children'])"}
|
||||
<dd class="layui-nav-itemed">
|
||||
<a href="javascript:;">{$vo2.title}</a>
|
||||
<dl class="layui-nav-child">
|
||||
{volist name="vo2['children']" id="vo3"}
|
||||
<dd><a lay-href="{:url($vo3.name)}">{$vo3.title}</a></dd>
|
||||
<ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
|
||||
<li data-name="home" class="layui-nav-item layui-nav-itemed">
|
||||
<a href="javascript:;" lay-tips="主页" lay-direction="2">
|
||||
<i class="layui-icon layui-icon-home"></i>
|
||||
<cite>主页</cite>
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd data-name="console" class="layui-this">
|
||||
<a lay-href="{:url('index/home')}">控制台</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
|
||||
<li data-name="user" class="layui-nav-item">
|
||||
<a href="javascript:;" lay-tips="用户" lay-direction="2">
|
||||
<i class="layui-icon layui-icon-user"></i>
|
||||
<cite>管理</cite>
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd>
|
||||
<a lay-href="{:url('User/list')}">网站用户1</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a lay-href="{:url('adminList')}">后台管理员</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a lay-href="{:url('authgroup/role')}">角色管理</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a lay-href="{:url('authrule/index')}">权限管理</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>;
|
||||
|
||||
{volist name="menu" id="vo1"}
|
||||
{if condition="isset($vo1['children'])"}
|
||||
<li data-name="set" class="layui-nav-item">
|
||||
<a href="javascript:;" lay-tips="{$vo1.title}" lay-direction="2">
|
||||
<i class="layui-icon {$vo1.icon}"></i>
|
||||
<cite>{$vo1.title}</cite>
|
||||
</a>
|
||||
|
||||
<dl class="layui-nav-child">
|
||||
{volist name="vo1['children']" id="vo2"}
|
||||
{if condition="isset($vo2['children'])"}
|
||||
<dd class="layui-nav-itemed">
|
||||
<a href="javascript:;">{$vo2.title}</a>
|
||||
<dl class="layui-nav-child">
|
||||
{volist name="vo2['children']" id="vo3"}
|
||||
<dd><a lay-href="{:url($vo3.name)}">{$vo3.title}</a></dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
</dd>
|
||||
{else /}
|
||||
<dd><a lay-href="{:url($vo2.name)}">
|
||||
<i class="layui-icon {$vo2.icon}"></i>
|
||||
<cite>{$vo2.title}</cite>
|
||||
</a></dd>
|
||||
{/if}
|
||||
{/volist}
|
||||
</dl>
|
||||
</li>
|
||||
{else /}
|
||||
<li data-name="get" class="layui-nav-item">
|
||||
<a href="javascript:;" lay-href="{:url($vo1.name)}" lay-tips="{$vo1.title}" lay-direction="2">
|
||||
<i class="layui-icon {$vo1.icon}"></i>
|
||||
<cite>{$vo1.title}</cite>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/volist}
|
||||
</dl>
|
||||
</dd>
|
||||
{else /}
|
||||
<dd><a lay-href="{:url($vo2.name)}">
|
||||
<i class="layui-icon {$vo2.icon}"></i>
|
||||
<cite>{$vo2.title}</cite>
|
||||
</a></dd>
|
||||
{/if}
|
||||
{/volist}
|
||||
</dl>
|
||||
</li>
|
||||
{else /}
|
||||
<li data-name="get" class="layui-nav-item">
|
||||
<a href="javascript:;" lay-href="{:url($vo1.name)}" lay-tips="{$vo1.title}" lay-direction="2">
|
||||
<i class="layui-icon {$vo1.icon}"></i>
|
||||
<cite>{$vo1.title}</cite>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/volist}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
@ -308,7 +308,6 @@ function find_spider(){
|
||||
}
|
||||
|
||||
if (!function_exists('__')) {
|
||||
|
||||
/**
|
||||
* 获取语言变量值
|
||||
* @param string $name 语言变量名
|
||||
|
@ -30,8 +30,6 @@ class AdminController extends \app\BaseController
|
||||
{
|
||||
//权限auth检查
|
||||
$this->aid = Session::get('admin_id');
|
||||
//$this->checkAuth();
|
||||
$this->getMenu();
|
||||
//系统配置
|
||||
$this->getIndexUrl();
|
||||
}
|
||||
@ -63,8 +61,7 @@ class AdminController extends \app\BaseController
|
||||
}
|
||||
}
|
||||
|
||||
$menu = !empty($menu) ? getTree($menu) : [];
|
||||
View::assign('menu', $menu);
|
||||
return !empty($menu) ? getTree($menu) : [];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -80,10 +77,7 @@ class AdminController extends \app\BaseController
|
||||
foreach ($auth_rule_list as $value) {
|
||||
$menu[] = $value;
|
||||
}
|
||||
$menus = !empty($menu) ? getTree($menu) : [];
|
||||
//$menu2 = getTree($menu);
|
||||
return $menus;
|
||||
//return View::assign('menus', $menus);
|
||||
return !empty($menu) ? getTree($menu) : [];
|
||||
}
|
||||
|
||||
//清除缓存Cache
|
||||
|
26
composer.lock
generated
26
composer.lock
generated
@ -1413,16 +1413,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.6.4",
|
||||
"version": "v6.6.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "a94fdebaea6bd17f51be0c2373ab80d3d681269b"
|
||||
"reference": "8b6386d7417526d1ea4da9edb70b8352f7543627"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a94fdebaea6bd17f51be0c2373ab80d3d681269b",
|
||||
"reference": "a94fdebaea6bd17f51be0c2373ab80d3d681269b",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/8b6386d7417526d1ea4da9edb70b8352f7543627",
|
||||
"reference": "8b6386d7417526d1ea4da9edb70b8352f7543627",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1446,8 +1446,8 @@
|
||||
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
|
||||
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
|
||||
"psr/log": "For optional PSR-3 debug logging",
|
||||
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
|
||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)",
|
||||
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@ -1479,7 +1479,7 @@
|
||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.4"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1487,7 +1487,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-08-22T09:22:00+00:00"
|
||||
"time": "2022-10-07T12:23:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/cache",
|
||||
@ -3073,16 +3073,16 @@
|
||||
},
|
||||
{
|
||||
"name": "workerman/workerman",
|
||||
"version": "v4.1.3",
|
||||
"version": "v4.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/walkor/workerman.git",
|
||||
"reference": "01028d8008c5691ec38c5f675fc13d76496a6db9"
|
||||
"reference": "83e007acf936e2233ac92d7368b87716f2bae338"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/walkor/workerman/zipball/01028d8008c5691ec38c5f675fc13d76496a6db9",
|
||||
"reference": "01028d8008c5691ec38c5f675fc13d76496a6db9",
|
||||
"url": "https://api.github.com/repos/walkor/workerman/zipball/83e007acf936e2233ac92d7368b87716f2bae338",
|
||||
"reference": "83e007acf936e2233ac92d7368b87716f2bae338",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3132,7 +3132,7 @@
|
||||
"type": "patreon"
|
||||
}
|
||||
],
|
||||
"time": "2022-09-23T14:05:12+00:00"
|
||||
"time": "2022-10-09T11:33:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "yansongda/pay",
|
||||
|
@ -16,7 +16,7 @@ return [
|
||||
// 应用名,此项不可更改
|
||||
'appname' => 'TaoLer',
|
||||
// 版本配置
|
||||
'version' => '2.0.0',
|
||||
'version' => '2.0.2',
|
||||
// 加盐
|
||||
'salt' => 'taoler',
|
||||
// 数据库备份目录
|
||||
|
@ -1,10 +1,11 @@
|
||||
//网站app版本发布
|
||||
|
||||
layui.define(["table", "form", "upload"], function (exports) {
|
||||
layui.define(["table", "form", "upload","notify","hxNav"], function (exports) {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
upload = layui.upload;
|
||||
var notify = layui.notify;
|
||||
|
||||
function addList(type) {
|
||||
$.ajax({
|
||||
@ -44,58 +45,143 @@ layui.define(["table", "form", "upload"], function (exports) {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
//监听工具条
|
||||
table.on("tool(addons-list)", function (obj) {
|
||||
var data = obj.data;
|
||||
var event = obj.event;
|
||||
var url = $(this).data('url')
|
||||
|
||||
if (obj.event === "del") {
|
||||
layer.prompt(
|
||||
{
|
||||
formType: 1,
|
||||
title: "敏感操作,请验证口令",
|
||||
},
|
||||
function (value, index) {
|
||||
layer.close(index);
|
||||
layer.confirm("真的删除行么", function (index) {
|
||||
$.post(addonsDelete, { name: data.name }, function (res) {
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 6, time: 2000 });
|
||||
} else {
|
||||
layer.open({
|
||||
tiele: "修改失败",
|
||||
content: res.msg,
|
||||
icon: 5,
|
||||
anim: 6,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
table.reload("addons-list");
|
||||
layer.close(index);
|
||||
});
|
||||
//安装插件
|
||||
if (event === "install") {
|
||||
var index = layer.load(1);
|
||||
$.post(url, { name: data.name, version: data.version }, function (res) {
|
||||
if (res.code == 0) {
|
||||
notify.success(res.msg, "topRight");
|
||||
} else {
|
||||
notify.error(res.msg, "topRight");
|
||||
}
|
||||
);
|
||||
} else if (obj.event === "edit") {
|
||||
var tr = $(obj.tr);
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
|
||||
// 启用禁用
|
||||
if(event == 'status') {
|
||||
notify.confirm("确认框", "vcenter", function(){
|
||||
$.post(url,{ name: data.name },function(res){
|
||||
if (res.code == 0) {
|
||||
notify.success(res.msg, "topRight");
|
||||
} else {
|
||||
notify.error(res.msg, "topRight");
|
||||
}
|
||||
table.reloadData("addons-list",{},'deep');
|
||||
// addList("installed");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 卸载插件
|
||||
if (event === "uninstall") {
|
||||
notify.confirm("确认框", "vcenter",function() {
|
||||
var index = layer.load(1);
|
||||
$.post(url, { name: data.name }, function (res) {
|
||||
if (res.code == 0) {
|
||||
notify.success(res.msg, "topRight");
|
||||
} else {
|
||||
notify.error(res.msg, "topRight");
|
||||
}
|
||||
});
|
||||
table.reload("addons-list");
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
|
||||
// 配置插件
|
||||
if (event === "config") {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "编辑插件",
|
||||
content: addonsEdit + "?id=" + data.id,
|
||||
title: '配置插件',
|
||||
content: url + "?name=" + data.name,
|
||||
maxmin: true,
|
||||
area: ["400px", "620px"],
|
||||
area: ["780px", "90%"],
|
||||
btn: ["确定", "取消"],
|
||||
yes: function (index, layero) {
|
||||
var iframeWindow = window["layui-layer-iframe" + index],
|
||||
submitID = "LAY-addons-submit",
|
||||
submit = layero
|
||||
.find("iframe")
|
||||
.contents()
|
||||
.find("#" + submitID);
|
||||
|
||||
submitID = "LAY-addons-config-submit",
|
||||
submit = layero.find("iframe").contents().find("#" + submitID);
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on(
|
||||
"submit(" + submitID + ")",
|
||||
function (data) {
|
||||
var field = data.field; //获取提交的字段
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: addonsConfig,
|
||||
data: field,
|
||||
daType: "json",
|
||||
success: function (res) {
|
||||
if (res.code == 0) {
|
||||
notify.success(res.msg, "topRight");
|
||||
} else {
|
||||
notify.error(res.msg, "topRight");
|
||||
}
|
||||
},
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
}
|
||||
);
|
||||
submit.trigger("click");
|
||||
},
|
||||
success: function (layero, index) {
|
||||
var forms = layero.find("iframe").contents().find(".layui-form");
|
||||
var button = forms.find("button");
|
||||
//事件委托
|
||||
forms.on("click", "button", function (data) {
|
||||
var even = this.getAttribute("lay-event");
|
||||
var names = this.dataset.name;
|
||||
if (even == "addInput") {
|
||||
var html = '<div class="layui-form-item">\n' +
|
||||
'<label class="layui-form-label"></label>\n' +
|
||||
'<div class="layui-input-inline">\n' +
|
||||
' <input type="text" name="'+ names +'[key][]" value="" placeholder="key" autocomplete="off" class="layui-input input-double-width">\n' +
|
||||
'</div>\n' +
|
||||
'<div class="layui-input-inline">\n' +
|
||||
' <input type="text" name="'+ names +'[value][]" value="" placeholder="value" autocomplete="off" class="layui-input input-double-width">\n' +
|
||||
'</div>\n' +
|
||||
'<button data-name="'+ names +'" type="button" class="layui-btn layui-btn-danger layui-btn-sm removeInupt" lay-event="removeInupt">\n' +
|
||||
' <i class="layui-icon"></i>\n' +
|
||||
'</button>\n' +
|
||||
'</div>';
|
||||
$(this).parent().parent().append(html);
|
||||
} else {
|
||||
$(this).parent().remove();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (event === "edit") {
|
||||
var tr = $(obj.tr);
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "编辑插件",
|
||||
content: addonsEdit + "?id=" + data.id,
|
||||
maxmin: true,
|
||||
area: ["400px", "620px"],
|
||||
btn: ["确定", "取消"],
|
||||
yes: function (index, layero) {
|
||||
var iframeWindow = window["layui-layer-iframe" + index],
|
||||
submitID = "LAY-addons-submit",
|
||||
submit = layero
|
||||
.find("iframe")
|
||||
.contents()
|
||||
.find("#" + submitID);
|
||||
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on(
|
||||
"submit(" + submitID + ")",
|
||||
function (data) {
|
||||
var field = data.field; //获取提交的字段
|
||||
@ -123,146 +209,14 @@ layui.define(["table", "form", "upload"], function (exports) {
|
||||
table.reload("addons-list"); //数据刷新
|
||||
layer.close(index); //关闭弹层
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
submit.trigger("click");
|
||||
},
|
||||
success: function (layero, index) {},
|
||||
});
|
||||
} else if (obj.event === "start") {
|
||||
//提交 Ajax 成功后,静态更新表格中的数据
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: addonsStart,
|
||||
data: { name: data.name },
|
||||
daType: "json",
|
||||
success: function (res) {
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 6, time: 2000 });
|
||||
} else {
|
||||
layer.open({
|
||||
tiele: "修改失败",
|
||||
content: res.msg,
|
||||
icon: 5,
|
||||
anim: 6,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
} else if (obj.event === "shutdown") {
|
||||
//提交 Ajax 成功后,静态更新表格中的数据
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: addonsShut,
|
||||
data: { name: data.name },
|
||||
daType: "json",
|
||||
success: function (res) {
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 6, time: 2000 });
|
||||
} else {
|
||||
layer.open({
|
||||
tiele: "修改失败",
|
||||
content: res.msg,
|
||||
icon: 5,
|
||||
anim: 6,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
} else if (obj.event === "install") {
|
||||
submit.trigger("click");
|
||||
},
|
||||
success: function (layero, index) {},
|
||||
});
|
||||
}
|
||||
|
||||
var index = layer.load(1);
|
||||
//安装插件
|
||||
$.post(
|
||||
addonsInstall,
|
||||
{ name: data.name, version: data.version },
|
||||
function (res) {
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 6, time: 2000 });
|
||||
} else {
|
||||
layer.open({
|
||||
tiele: "修改失败",
|
||||
content: res.msg,
|
||||
icon: 5,
|
||||
anim: 6,
|
||||
});
|
||||
}
|
||||
layer.close(index);
|
||||
}
|
||||
);
|
||||
} else if (obj.event === "config") {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "配置插件",
|
||||
content: addonsConfig + "?name=" + data.name,
|
||||
maxmin: true,
|
||||
area: ["780px", "90%"],
|
||||
btn: ["确定", "取消"],
|
||||
yes: function (index, layero) {
|
||||
var iframeWindow = window["layui-layer-iframe" + index],
|
||||
submitID = "LAY-addons-config-submit",
|
||||
submit = layero
|
||||
.find("iframe")
|
||||
.contents()
|
||||
.find("#" + submitID);
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on(
|
||||
"submit(" + submitID + ")",
|
||||
function (data) {
|
||||
var field = data.field; //获取提交的字段
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: addonsConfig,
|
||||
data: field,
|
||||
daType: "json",
|
||||
success: function (res) {
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.msg, { icon: 6, time: 2000 });
|
||||
} else {
|
||||
layer.open({
|
||||
tiele: "修改失败",
|
||||
content: res.msg,
|
||||
icon: 5,
|
||||
anim: 6,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
}
|
||||
);
|
||||
submit.trigger("click");
|
||||
},
|
||||
success: function (layero, index) {
|
||||
var forms = layero.find("iframe").contents().find(".layui-form");
|
||||
var button = forms.find("button");
|
||||
//事件委托
|
||||
forms.on("click", "button", function (data) {
|
||||
var even = this.getAttribute("lay-event");
|
||||
var names = this.dataset.name;
|
||||
if (even == "addInput") {
|
||||
var html = '<div class="layui-form-item">\n' +
|
||||
'<label class="layui-form-label"></label>\n' +
|
||||
'<div class="layui-input-inline">\n' +
|
||||
' <input type="text" name="'+ names +'[key][]" value="" placeholder="key" autocomplete="off" class="layui-input input-double-width">\n' +
|
||||
'</div>\n' +
|
||||
'<div class="layui-input-inline">\n' +
|
||||
' <input type="text" name="'+ names +'[value][]" value="" placeholder="value" autocomplete="off" class="layui-input input-double-width">\n' +
|
||||
'</div>\n' +
|
||||
'<button data-name="'+ names +'" type="button" class="layui-btn layui-btn-danger layui-btn-sm removeInupt" lay-event="removeInupt">\n' +
|
||||
' <i class="layui-icon"></i>\n' +
|
||||
'</button>\n' +
|
||||
'</div>';
|
||||
|
||||
$(this).parent().parent().append(html);
|
||||
} else {
|
||||
$(this).parent().remove();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
table.reload("addons-list"); //数据刷新
|
||||
});
|
||||
|
||||
exports("addons", {});
|
||||
|
117
public/static/admin/modules/hxNav.js
Normal file
117
public/static/admin/modules/hxNav.js
Normal file
@ -0,0 +1,117 @@
|
||||
/**
|
||||
* Async Navbar With Ajax
|
||||
* CopyRight 2020.1 by Hexu
|
||||
* Interface Like: [{ "id": "ident", "text": "title text", "icon": "icon", "href": "targetUrl.php", "hasChildren": 0 }]
|
||||
*/
|
||||
;layui.define(['element','jquery'],function(exports){
|
||||
'use strict';
|
||||
var $ = layui.jquery, element = layui.element, navroot = null, nodes=[], methods = {
|
||||
select: function(id) {
|
||||
if( nodes[id] ) {
|
||||
navroot.find('li,dd').removeClass('layui-this');
|
||||
nodes[id].addClass('layui-this').parents('li,dd').addClass('layui-nav-itemed');
|
||||
opts.onSelect(nodes[id].data('nodeItem'));
|
||||
}
|
||||
}
|
||||
}, internal = {
|
||||
init: function() {
|
||||
navroot = $(opts.element).addClass('layui-side layui-side-menu').append('<div class="layui-side-scroll"><div class="layui-logo" lay-href="home/console.html"><span>TaoLerAdmin</span></div></div>');
|
||||
//.css({'background-color':opts.background, width: opts.width });
|
||||
scroll = $(".layui-side-scroll");
|
||||
// 默认主页li
|
||||
var indexLi = '<li data-name="home" class="layui-nav-item layui-nav-itemed">'+
|
||||
'<a href="javascript:;" lay-tips="主页" lay-direction="2">'+
|
||||
'<i class="layui-icon layui-icon-home"></i>'+
|
||||
'<cite>主页</cite>'+
|
||||
'<i class="layui-icon layui-icon-down layui-nav-more"></i></a>'+
|
||||
'<dl class="layui-nav-child">'+
|
||||
'<dd data-name="console" class="layui-this">'+
|
||||
'<a lay-href="/admin/index/home.html">控制台</a>'+
|
||||
'</dd>'+
|
||||
'</dl>'+
|
||||
'</li>';
|
||||
var node = $('<ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">'+ indexLi +'</ul>').attr('lay-shrink', opts.shrink?'all':'').appendTo( scroll );
|
||||
//node.css('width','100%');
|
||||
internal.getData(null,node,0);
|
||||
},
|
||||
getData: function(id,node,level){
|
||||
id = id || null;
|
||||
$.ajax({
|
||||
url: opts.url,
|
||||
type: opts.type,
|
||||
cache: false,
|
||||
data: { id: id },
|
||||
dataType: 'json',
|
||||
success: function(res) {
|
||||
$.each(res, function (index, val) {
|
||||
/**
|
||||
* @var val.hasChildren
|
||||
*/
|
||||
val.hasChildren = ( val.hasChildren && val.hasChildren > 0 );
|
||||
var sub = (id === null) ? $('<li class="layui-nav-item"></li>').appendTo(node) : $('<dd></dd>').appendTo(node);
|
||||
sub.data('nodeItem', val);
|
||||
nodes[val.id] = sub;
|
||||
if (val.hasChildren ) {
|
||||
var aHtml = '<a href="javascript:void(0)"></a>';
|
||||
} else {
|
||||
var aHtml = '<a lay-href="'+ val.href+'"></a>';
|
||||
}
|
||||
var a = $(aHtml).appendTo(sub);
|
||||
//a.css('margin-left', level * 12 );
|
||||
if (val.icon) {
|
||||
$('<i class="layui-icon"></i>').addClass(val.icon).appendTo(a);
|
||||
}
|
||||
$('<cite></cite>').text(val.text).appendTo(a);
|
||||
if (val.hasChildren ) {
|
||||
$('<i class="layui-icon layui-icon-down layui-nav-more"></i>').appendTo(a);
|
||||
var dl = $('<dl class="layui-nav-child"></dl>').appendTo(sub);
|
||||
if( opts.autoExpand ) {
|
||||
internal.getData(val.id, dl, level + 1);
|
||||
val.isExpended = true;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @var val.isExpended
|
||||
*/
|
||||
a.on('click',function() {
|
||||
if( val.hasChildren && ( ! val.isExpended )){
|
||||
internal.getData(val.id, dl, level + 1 );
|
||||
val.isExpended = true;
|
||||
}
|
||||
//点击折叠事件
|
||||
// methods.select(val.id);
|
||||
if(val.hasChildren) {
|
||||
$('.layui-nav-tree').children('li').siblings().removeClass('layui-nav-itemed');
|
||||
} else {
|
||||
$(this).parents('li').siblings().removeClass('layui-nav-itemed');
|
||||
}
|
||||
//console.log(val);
|
||||
opts.onSelect(val);
|
||||
});
|
||||
});
|
||||
element.render('nav','layadmin-system-side-menu');
|
||||
}
|
||||
});
|
||||
}
|
||||
}, opts = {};
|
||||
|
||||
exports('hxNav',function(opt, params ) {
|
||||
if( typeof opt === 'string' ) {
|
||||
if( methods[ opt ] )
|
||||
methods[ opt ].call( this, params );
|
||||
}
|
||||
else {
|
||||
opts = $.extend({
|
||||
element: '',
|
||||
width: 220,
|
||||
url: '',
|
||||
type: 'post',
|
||||
shrink: false,
|
||||
autoExpand: false,
|
||||
background: '#393D49',
|
||||
onSelect: function(node){}
|
||||
}, opt || {});
|
||||
internal.init.call( this );
|
||||
}
|
||||
});
|
||||
});
|
461
public/static/admin/modules/notify.js
Normal file
461
public/static/admin/modules/notify.js
Normal file
File diff suppressed because one or more lines are too long
461
public/static/notify.js
Normal file
461
public/static/notify.js
Normal file
File diff suppressed because one or more lines are too long
30
vendor/composer/installed.json
vendored
30
vendor/composer/installed.json
vendored
@ -1487,17 +1487,17 @@
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.6.4",
|
||||
"version_normalized": "6.6.4.0",
|
||||
"version": "v6.6.5",
|
||||
"version_normalized": "6.6.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "a94fdebaea6bd17f51be0c2373ab80d3d681269b"
|
||||
"reference": "8b6386d7417526d1ea4da9edb70b8352f7543627"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a94fdebaea6bd17f51be0c2373ab80d3d681269b",
|
||||
"reference": "a94fdebaea6bd17f51be0c2373ab80d3d681269b",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/8b6386d7417526d1ea4da9edb70b8352f7543627",
|
||||
"reference": "8b6386d7417526d1ea4da9edb70b8352f7543627",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1521,10 +1521,10 @@
|
||||
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
|
||||
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
|
||||
"psr/log": "For optional PSR-3 debug logging",
|
||||
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
|
||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)",
|
||||
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication"
|
||||
},
|
||||
"time": "2022-08-22T09:22:00+00:00",
|
||||
"time": "2022-10-07T12:23:10+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -1556,7 +1556,7 @@
|
||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.4"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -3353,17 +3353,17 @@
|
||||
},
|
||||
{
|
||||
"name": "workerman/workerman",
|
||||
"version": "v4.1.3",
|
||||
"version_normalized": "4.1.3.0",
|
||||
"version": "v4.1.4",
|
||||
"version_normalized": "4.1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/walkor/workerman.git",
|
||||
"reference": "01028d8008c5691ec38c5f675fc13d76496a6db9"
|
||||
"reference": "83e007acf936e2233ac92d7368b87716f2bae338"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/walkor/workerman/zipball/01028d8008c5691ec38c5f675fc13d76496a6db9",
|
||||
"reference": "01028d8008c5691ec38c5f675fc13d76496a6db9",
|
||||
"url": "https://api.github.com/repos/walkor/workerman/zipball/83e007acf936e2233ac92d7368b87716f2bae338",
|
||||
"reference": "83e007acf936e2233ac92d7368b87716f2bae338",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3372,7 +3372,7 @@
|
||||
"suggest": {
|
||||
"ext-event": "For better performance. "
|
||||
},
|
||||
"time": "2022-09-23T14:05:12+00:00",
|
||||
"time": "2022-10-09T11:33:14+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
16
vendor/composer/installed.php
vendored
16
vendor/composer/installed.php
vendored
@ -3,7 +3,7 @@
|
||||
'name' => 'taoser/taoler',
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => '9f89482c951e9a44bf0e2e4bf91c7e7ccb0fc8dd',
|
||||
'reference' => 'ceb164391c3d212f1460cfbcbb7f4d7ad66f8ce9',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@ -209,9 +209,9 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'phpmailer/phpmailer' => array(
|
||||
'pretty_version' => 'v6.6.4',
|
||||
'version' => '6.6.4.0',
|
||||
'reference' => 'a94fdebaea6bd17f51be0c2373ab80d3d681269b',
|
||||
'pretty_version' => 'v6.6.5',
|
||||
'version' => '6.6.5.0',
|
||||
'reference' => '8b6386d7417526d1ea4da9edb70b8352f7543627',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
|
||||
'aliases' => array(),
|
||||
@ -367,7 +367,7 @@
|
||||
'taoser/taoler' => array(
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => '9f89482c951e9a44bf0e2e4bf91c7e7ccb0fc8dd',
|
||||
'reference' => 'ceb164391c3d212f1460cfbcbb7f4d7ad66f8ce9',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@ -527,9 +527,9 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'workerman/workerman' => array(
|
||||
'pretty_version' => 'v4.1.3',
|
||||
'version' => '4.1.3.0',
|
||||
'reference' => '01028d8008c5691ec38c5f675fc13d76496a6db9',
|
||||
'pretty_version' => 'v4.1.4',
|
||||
'version' => '4.1.4.0',
|
||||
'reference' => '83e007acf936e2233ac92d7368b87716f2bae338',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../workerman/workerman',
|
||||
'aliases' => array(),
|
||||
|
2
vendor/phpmailer/phpmailer/VERSION
vendored
2
vendor/phpmailer/phpmailer/VERSION
vendored
@ -1 +1 @@
|
||||
6.6.4
|
||||
6.6.5
|
2
vendor/phpmailer/phpmailer/composer.json
vendored
2
vendor/phpmailer/phpmailer/composer.json
vendored
@ -51,7 +51,7 @@
|
||||
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
|
||||
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
|
||||
"psr/log": "For optional PSR-3 debug logging",
|
||||
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
|
||||
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication",
|
||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -14,16 +14,22 @@ $PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data blev ikke accepteret.
|
||||
$PHPMAILER_LANG['empty_message'] = 'Meddelelsen er uden indhold';
|
||||
$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kunne ikke afvikle: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Udvidelse mangler: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Kunne ikke tilgå filen: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Email funktionen kunne ikke initialiseres.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Udgyldig adresse: ';
|
||||
$PHPMAILER_LANG['invalid_header'] = 'Ugyldig header navn eller værdi';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'Ugyldig hostentry: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'Ugyldig vært: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Indtast mindst en modtagers email adresse.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: ';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere fejlede: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Signeringsfejl: ';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'SMTP kode: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'Yderligere SMTP info: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fejlede.';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'Detalje: ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP server fejl: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Kunne ikke definere eller nulstille variablen: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Udvidelse mangler: ';
|
||||
|
@ -9,19 +9,18 @@ $PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: Nie można przeprowadzi
|
||||
$PHPMAILER_LANG['connect_host'] = 'Błąd SMTP: Nie można połączyć się z wybranym hostem.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Błąd SMTP: Dane nie zostały przyjęte.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Wiadomość jest pusta.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Nieznany sposób kodowania znaków: ';
|
||||
$PHPMAILER_LANG['encoding'] = 'Błędny sposób kodowania znaków: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nie można uruchomić: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Brak dostępu do pliku: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Następujący adres Nadawcy jest nieprawidłowy: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Następujący adres nadawcy jest nieprawidłowy lub nie istnieje: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, ' .
|
||||
'następujący adres Odbiorcy jest nieprawidłowy: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email Odbiorcy.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, ' . 'następujący adres odbiorcy jest nieprawidłowy lub nie istnieje: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email odbiorcy.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi: ';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi lub nie istnieją: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Błąd podpisywania wiadomości: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zakończone niepowodzeniem.';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Wywołanie funkcji SMTP Connect() zostało zakończone niepowodzeniem.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Brakujące rozszerzenie: ';
|
||||
|
9
vendor/phpmailer/phpmailer/src/PHPMailer.php
vendored
9
vendor/phpmailer/phpmailer/src/PHPMailer.php
vendored
@ -750,7 +750,7 @@ class PHPMailer
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.6.4';
|
||||
const VERSION = '6.6.5';
|
||||
|
||||
/**
|
||||
* Error severity: message only, continue processing.
|
||||
@ -1671,7 +1671,7 @@ class PHPMailer
|
||||
return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
|
||||
}
|
||||
} catch (Exception $exc) {
|
||||
if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true) {
|
||||
if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true && $this->smtp->connected()) {
|
||||
$this->smtp->reset();
|
||||
}
|
||||
$this->setError($exc->getMessage());
|
||||
@ -1863,7 +1863,7 @@ class PHPMailer
|
||||
if (!static::isPermittedPath($path)) {
|
||||
return false;
|
||||
}
|
||||
$readable = file_exists($path);
|
||||
$readable = is_file($path);
|
||||
//If not a UNC path (expected to start with \\), check read permission, see #2069
|
||||
if (strpos($path, '\\\\') !== 0) {
|
||||
$readable = $readable && is_readable($path);
|
||||
@ -2101,6 +2101,9 @@ class PHPMailer
|
||||
$this->smtp->setDebugLevel($this->SMTPDebug);
|
||||
$this->smtp->setDebugOutput($this->Debugoutput);
|
||||
$this->smtp->setVerp($this->do_verp);
|
||||
if ($this->Host === null) {
|
||||
$this->Host = 'localhost';
|
||||
}
|
||||
$hosts = explode(';', $this->Host);
|
||||
$lastexception = null;
|
||||
|
||||
|
2
vendor/phpmailer/phpmailer/src/POP3.php
vendored
2
vendor/phpmailer/phpmailer/src/POP3.php
vendored
@ -46,7 +46,7 @@ class POP3
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.6.4';
|
||||
const VERSION = '6.6.5';
|
||||
|
||||
/**
|
||||
* Default POP3 port number.
|
||||
|
3
vendor/phpmailer/phpmailer/src/SMTP.php
vendored
3
vendor/phpmailer/phpmailer/src/SMTP.php
vendored
@ -35,7 +35,7 @@ class SMTP
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.6.4';
|
||||
const VERSION = '6.6.5';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
@ -682,7 +682,6 @@ class SMTP
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
$this->setError('');
|
||||
$this->server_caps = null;
|
||||
$this->helo_rply = null;
|
||||
if (is_resource($this->smtp_conn)) {
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2022-10-07 16:19:38
|
||||
// This file is automatically generated at:2022-10-09 21:18:22
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'taoser\\addons\\Service',
|
||||
|
@ -16,6 +16,7 @@ namespace Workerman\Connection;
|
||||
/**
|
||||
* ConnectionInterface.
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
abstract class ConnectionInterface
|
||||
{
|
||||
/**
|
||||
|
14
vendor/workerman/workerman/Worker.php
vendored
14
vendor/workerman/workerman/Worker.php
vendored
@ -26,6 +26,7 @@ use \Exception;
|
||||
* Worker class
|
||||
* A container for listening ports
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Worker
|
||||
{
|
||||
/**
|
||||
@ -33,7 +34,7 @@ class Worker
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '4.1.3';
|
||||
const VERSION = '4.1.4';
|
||||
|
||||
/**
|
||||
* Status starting.
|
||||
@ -637,9 +638,18 @@ class Worker
|
||||
if (\DIRECTORY_SEPARATOR !== '/') {
|
||||
return;
|
||||
}
|
||||
$fd = $fd ?: \fopen(static::$pidFile . '.lock', 'a+');
|
||||
$lock_file = static::$pidFile . '.lock';
|
||||
$fd = $fd ?: \fopen($lock_file, 'a+');
|
||||
if ($fd) {
|
||||
flock($fd, $flag);
|
||||
if ($flag === \LOCK_UN) {
|
||||
fclose($fd);
|
||||
$fd = null;
|
||||
clearstatcache();
|
||||
if (\is_file($lock_file)) {
|
||||
unlink($lock_file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
<p class="fly-home-info">
|
||||
<i class="iconfont icon-kiss" title="飞吻"></i><span style="color: #FF7200;">{$u.point} {:lang('accumulate points')}</span>
|
||||
<i class="iconfont icon-shijian"></i><span>{$u.create_time|date='Y-m-d'} {:lang('join')}</span>
|
||||
<i class="iconfont icon-chengshi"></i>{if session('user_id')}<span>来自</span>{:hook('ipShow',$u.city)} {else /} lang('log in to view') {/if}
|
||||
<i class="iconfont icon-chengshi"></i>{if session('user_id')}<span>来自</span>{:hook('ipShow',$u.city)} {else /} {:lang('log in to view')} {/if}
|
||||
</p>
|
||||
<p class="fly-home-sign">({$u.sign ? $u.sign|raw : lang('it is not signed yet')})</p>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user