Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
8d625ad0
ShopXO
项目概览
jamesyang1999
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8d625ad0
编写于
11月 28, 2018
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化安装包
上级
52ee0a39
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
19 addition
and
58 deletion
+19
-58
AppMini/New/index.html
AppMini/New/index.html
+0
-1
Application/Admin/Controller/AppMiniAlipayListController.class.php
...on/Admin/Controller/AppMiniAlipayListController.class.php
+9
-2
Application/Admin/Controller/CacheController.class.php
Application/Admin/Controller/CacheController.class.php
+4
-8
Application/Admin/Controller/ThemeController.class.php
Application/Admin/Controller/ThemeController.class.php
+1
-1
Application/Admin/View/Default/AppMiniAlipayList/Index.html
Application/Admin/View/Default/AppMiniAlipayList/Index.html
+5
-3
Application/Common/Common/function.php
Application/Common/Common/function.php
+0
-43
未找到文件。
AppMini/New/index.html
已删除
100755 → 0
浏览文件 @
52ee0a39
\ No newline at end of file
Application/Admin/Controller/AppMiniAlipayListController.class.php
浏览文件 @
8d625ad0
...
...
@@ -76,7 +76,7 @@ class AppMiniAlipayListController extends CommonController
$url
=
__MY_URL__
.
'AppMini'
.
DS
.
'New'
.
DS
.
$this
->
application_name
.
DS
.
$temp_file
;
$result
[]
=
[
'name'
=>
$temp_file
,
'url'
=>
$url
,
'url'
=>
substr
(
$url
,
-
4
)
==
'.zip'
?
$url
:
''
,
'size'
=>
FileSizeByteToUnit
(
filesize
(
$file_path
)),
'time'
=>
date
(
'Y-m-d H:i:s'
,
filectime
(
$file_path
)),
];
...
...
@@ -165,7 +165,14 @@ class AppMiniAlipayListController extends CommonController
}
// 删除压缩包
if
(
\
Library\FileUtil
::
UnlinkFile
(
$this
->
new_path
.
DS
.
I
(
'id'
)))
$path
=
$this
->
new_path
.
DS
.
I
(
'id'
);
if
(
substr
(
$path
,
-
4
)
==
'.zip'
)
{
$status
=
\
Library\FileUtil
::
UnlinkFile
(
$this
->
new_path
.
DS
.
I
(
'id'
));
}
else
{
$status
=
\
Library\FileUtil
::
UnlinkDir
(
$this
->
new_path
.
DS
.
I
(
'id'
));
}
if
(
$status
)
{
$this
->
ajaxReturn
(
L
(
'common_operation_delete_success'
));
}
else
{
...
...
Application/Admin/Controller/CacheController.class.php
浏览文件 @
8d625ad0
...
...
@@ -52,13 +52,9 @@ class CacheController extends CommonController
*/
public
function
SiteUpdate
()
{
DelDirFile
(
TEMP_PATH
);
DelDirFile
(
DATA_PATH
);
if
(
file_exists
(
RUNTIME_PATH
.
'common~runtime.php'
))
{
unlink
(
RUNTIME_PATH
.
'common~runtime.php'
);
}
\
Library\FileUtil
::
UnlinkDir
(
TEMP_PATH
);
\
Library\FileUtil
::
UnlinkDir
(
DATA_PATH
);
\
Library\FileUtil
::
UnlinkFile
(
RUNTIME_PATH
.
'common~runtime.php'
);
$this
->
success
(
L
(
'common_operation_update_success'
));
}
...
...
@@ -72,7 +68,7 @@ class CacheController extends CommonController
public
function
TemplateUpdate
()
{
// 模板 Cache
DelDirFile
(
CACHE_PATH
);
\
Library\FileUtil
::
UnlinkDir
(
CACHE_PATH
);
$this
->
success
(
L
(
'common_operation_update_success'
));
}
...
...
Application/Admin/Controller/ThemeController.class.php
浏览文件 @
8d625ad0
...
...
@@ -168,7 +168,7 @@ class ThemeController extends CommonController
}
// 开始删除主题
if
(
DelDirFile
(
$this
->
html_path
.
$id
,
true
)
&&
DelDirFile
(
$this
->
static_path
.
$id
,
true
))
if
(
\
Library\FileUtil
::
UnlinkDir
(
$this
->
html_path
.
$id
)
&&
\
Library\FileUtil
::
UnlinkDir
(
$this
->
static_path
.
$id
))
{
$this
->
ajaxReturn
(
L
(
'common_operation_delete_success'
));
}
else
{
...
...
Application/Admin/View/Default/AppMiniAlipayList/Index.html
浏览文件 @
8d625ad0
...
...
@@ -27,9 +27,11 @@
<td>
{{$v.size}}
</td>
<td>
{{$v.time}}
</td>
<td
class=
"view-operation"
>
<a
href=
"{{$v.url}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-download"
>
{{:L('common_operation_download')}}
</button>
</a>
<notempty
name=
"v.url"
>
<a
href=
"{{$v.url}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-download"
>
{{:L('common_operation_download')}}
</button>
</a>
</notempty>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:U('Admin/AppMiniAlipayList/Delete')}}"
data-id=
"{{$v.name}}"
data-view=
"reload"
>
{{:L('common_operation_delete')}}
</button>
</td>
</tr>
...
...
Application/Common/Common/function.php
浏览文件 @
8d625ad0
...
...
@@ -356,49 +356,6 @@ function GetClientIP($long = false)
return
$onlineip
;
}
/**
* [DelDirFile 删除指定目录下的所有文件]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-11T18:30:37+0800
* @param [string] $dir_name [目录地址]
* @param [boolean] $is_del_dir [是否删除目录(默认false)]
* @return [boolean] [成功true, 失败false]
*/
function
DelDirFile
(
$dir_name
,
$is_del_dir
=
false
)
{
$error
=
0
;
if
(
$handle
=
opendir
(
$dir_name
))
{
while
(
false
!==
(
$item
=
readdir
(
$handle
)))
{
if
(
$item
!=
'.'
&&
$item
!=
'..'
)
{
if
(
is_dir
(
"
{
$dir_name
}
/
{
$item
}
"
))
{
DelDirFile
(
"
$dir_name
/
$item
"
,
$is_del_dir
);
}
else
{
if
(
!
is_writable
(
"
$dir_name
/
$item
"
)
||
!
unlink
(
"
$dir_name
/
$item
"
))
{
$error
++
;
}
}
}
}
// 关闭目录句柄
closedir
(
$handle
);
// 是否删除目录
if
(
$is_del_dir
==
true
&&
!
rmdir
(
$dir_name
))
{
$error
++
;
}
}
return
(
$error
==
0
);
}
/**
* [UrlParamJoin url参数拼接]
* @author Devil
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录