Fix: 一些情况下离线下载失败后临时文件无法删除
This commit is contained in:
parent
ef636bc2d1
commit
b2d5547199
14 changed files with 304 additions and 322 deletions
|
@ -14,31 +14,24 @@ class Explore extends Controller{
|
|||
public $siteOptions;
|
||||
|
||||
public function _initialize(){
|
||||
$this->siteOptions = Option::getValues(["basic"]);
|
||||
}
|
||||
|
||||
public function Search(){
|
||||
$this->visitorObj = new User(cookie('user_id'),cookie('login_key'));
|
||||
return view("search",[
|
||||
"options" => $this->siteOptions,
|
||||
'loginStatus' => $this->visitorObj->loginStatus,
|
||||
'userData' => $this->visitorObj->userSQLData,
|
||||
]);
|
||||
}
|
||||
|
||||
public function S(){
|
||||
$this->visitorObj = new User(cookie('user_id'),cookie('login_key'));
|
||||
$this->siteOptions = Option::getValues(["basic"],$this->visitorObj->userSQLData);
|
||||
$keyWords=input("param.key");
|
||||
if(empty($keyWords)){
|
||||
$this->redirect('/Explore/Search',302);
|
||||
}
|
||||
$list = Db::name('shares')
|
||||
$this->error("搜索词不为空",200,$this->siteOptions);
|
||||
}else{
|
||||
$list = Db::name('shares')
|
||||
->where('type',"public")
|
||||
->where('origin_name',"like","%".$keyWords."%")
|
||||
->order('share_time DESC')
|
||||
->paginate(10);
|
||||
$listData = $list->all();
|
||||
->select();
|
||||
}
|
||||
$listData = $list;
|
||||
foreach ($listData as $key => $value) {
|
||||
unset($listData[$key]["source_name"]);
|
||||
if($value["source_type"]=="file"){
|
||||
$listData[$key]["fileData"] = $value["origin_name"];
|
||||
|
||||
|
@ -50,9 +43,8 @@ class Explore extends Controller{
|
|||
return view("result",[
|
||||
"options" => $this->siteOptions,
|
||||
'loginStatus' => $this->visitorObj->loginStatus,
|
||||
'userData' => $this->visitorObj->userSQLData,
|
||||
'list' => $listData,
|
||||
'listOrigin' => $list,
|
||||
'userData' => $this->visitorObj->getInfo(),
|
||||
'list' => json_encode($listData),
|
||||
'keyWords' => $keyWords,
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class Home extends Controller{
|
|||
$userInfo = $this->userObj->getInfo();
|
||||
$groupData = $this->userObj->getGroupData();
|
||||
return view('download', [
|
||||
'options' => Option::getValues(['basic','group_sell']),
|
||||
'options' => Option::getValues(['basic','group_sell'],$this->userObj->userSQLData),
|
||||
'userInfo' => $userInfo,
|
||||
'groupData' => $groupData,
|
||||
]);
|
||||
|
|
|
@ -341,8 +341,18 @@ class Aria2 extends Model{
|
|||
$this->removeDownloadResult($sqlData["pid"],$sqlData);
|
||||
if($delete){
|
||||
if(isset($quenInfo["files"][$sqlData["file_index"]]["path"]) && file_exists($quenInfo["files"][$sqlData["file_index"]]["path"])){
|
||||
@unlink($quenInfo["files"][$sqlData["file_index"]]["path"]);
|
||||
$deleteAction = @unlink($quenInfo["files"][$sqlData["file_index"]]["path"]);
|
||||
@self::remove_directory(dirname($quenInfo["files"][$sqlData["file_index"]]["path"]));
|
||||
if(file_exists(dirname($quenInfo["files"][$sqlData["file_index"]]["path"]))){
|
||||
$task = new Task();
|
||||
$task->taskName = "Delete remote download temp file";
|
||||
$task->taskType = "deleteFolder";
|
||||
$task->taskContent = json_encode([
|
||||
"folder" => dirname($quenInfo["files"][$sqlData["file_index"]]["path"]),
|
||||
]);
|
||||
$task->userId = $this->uid;
|
||||
$task->saveTask();
|
||||
}
|
||||
}
|
||||
}
|
||||
Db::name("download")->where("id",$sqlData["id"])->update([
|
||||
|
|
|
@ -52,6 +52,11 @@ class CronHandler extends Model{
|
|||
$this->flushOnedriveToken($value["interval_s"]);
|
||||
}
|
||||
break;
|
||||
case 'delete_remote_downloader_failed_folder':
|
||||
if($this->checkInterval($value["interval_s"],$value["last_excute"])){
|
||||
$this->deleteRemoteDownloaderFailedFolder($value["interval_s"]);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
|
@ -97,6 +102,52 @@ class CronHandler extends Model{
|
|||
$this->setComplete("flush_aria2");
|
||||
}
|
||||
|
||||
public function deleteRemoteDownloaderFailedFolder($interval){
|
||||
echo("flushOnedriveToken...");
|
||||
$toBeDeleted = Db::name("task")
|
||||
->where("type","deleteFolder")
|
||||
->where("status","todo")
|
||||
->select();
|
||||
$success=[];
|
||||
$todo = [];
|
||||
foreach ($toBeDeleted as $key => $value) {
|
||||
$attr = json_decode($value["attr"],true);
|
||||
if(file_exists($attr["folder"])){
|
||||
self::remove_directory($attr["folder"]);
|
||||
}
|
||||
if(file_exists($attr["folder"])){
|
||||
$todo[] = $value["id"];
|
||||
}else{
|
||||
$success[] = $value["id"];
|
||||
}
|
||||
}
|
||||
|
||||
Db::name("task")->where("id","in",$success)->update(["status"=>"success"]);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除整个目录
|
||||
*
|
||||
* @param string $dir
|
||||
* @return void
|
||||
*/
|
||||
static function remove_directory($dir){
|
||||
if($handle=opendir("$dir")){
|
||||
while(false!==($item=readdir($handle))){
|
||||
if($item!="."&&$item!=".."){
|
||||
if(is_dir("$dir/$item")){
|
||||
self::remove_directory("$dir/$item");
|
||||
}else{
|
||||
unlink("$dir/$item");
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
rmdir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
public function flushOnedriveToken($interval){
|
||||
echo("flushOnedriveToken...");
|
||||
$toBeFlushedPolicy = Db::name("policy")->where("policy_type","onedrive")->select();
|
||||
|
|
|
@ -1,76 +1,75 @@
|
|||
{extend name="header_public" /}
|
||||
{block name="title"}“{$keyWords}”搜索结果 - {$options.siteName}{/block}
|
||||
{block name="content"}
|
||||
<link rel="stylesheet" href="/static/css/search.css" />
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="theme-color" content="{$options.themeColor}" />
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is added to the
|
||||
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>“{$keyWords}”搜索结果 - {$options.siteName}</title>
|
||||
<script type="text/javascript">
|
||||
colorTheme = {:json_encode($options["themeConfig"])};
|
||||
isHomePage = false;
|
||||
isSharePage = false;
|
||||
pageId="shareLock";
|
||||
list = {$list};
|
||||
userInfo = {
|
||||
uid: {$userData.uid},
|
||||
nick: "{$userData.userNick}",
|
||||
email: "{$userData.userMail}",
|
||||
group: "{$userData.groupData.group_name}",
|
||||
groupId: {$userData.groupData.id},
|
||||
groupColor: "{$userData.groupData.color}",
|
||||
};
|
||||
siteInfo = {
|
||||
mainTitle: "{$options.siteName}",
|
||||
};
|
||||
uploadConfig = {
|
||||
allowSource: false,
|
||||
allowShare: false,
|
||||
allowRemoteDownload: "0",
|
||||
allowTorrentDownload: "0",
|
||||
};
|
||||
isMobile = window.innerWidth < 600;
|
||||
</script>
|
||||
</head>
|
||||
<body data-ma-header="teal">
|
||||
<nav class="navbar navbar-inverse" >
|
||||
<div class="container-fluid">
|
||||
<div class="container" >
|
||||
{include file="navbar_public" /}
|
||||
<div class="header-panel shadow-z-2">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container main-h">
|
||||
|
||||
<div class="col-md-12">
|
||||
<h1>搜索分享</h1>
|
||||
<input type="text" placeholder="请输入关键词,回车键发起搜索" value="{$keyWords}" autofocus="true"><br><br>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">文件名 </th>
|
||||
<th class="cent">分享日期</th>
|
||||
<th class="cent">下载次数</th>
|
||||
<th class="cent">浏览次数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>{volist name='list' id='shares'}
|
||||
<tr>
|
||||
<td >{switch $shares.source_type}
|
||||
{case file}<i class="fa fa-file" aria-hidden="true"></i> {/case}
|
||||
{case dir}<i class="fa fa-folder-open blue" aria-hidden="true"></i> {/case}
|
||||
|
||||
{/switch} <a href="/s/{$shares.share_key}" class="notWave" target="_blank">{$shares.fileData|htmlspecialchars=ENT_NOQUOTES}</a></td>
|
||||
<td class="cent">{$shares.share_time}</td>
|
||||
<td align="center">{$shares.download_num}</td>
|
||||
<td align="center">{$shares.view_num}</td>
|
||||
</tr>
|
||||
<body>
|
||||
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<noscript>
|
||||
You need to enable JavaScript to run this app.
|
||||
</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
</div>
|
||||
{$listOrigin->render()}
|
||||
</div>
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<script src="/static/js/material.js"></script>
|
||||
<script >
|
||||
$.material.init();
|
||||
document.onkeydown=function(){
|
||||
if (event.keyCode == 13){
|
||||
keyWords = $("input").val();
|
||||
if(keyWords ==""){
|
||||
toastr["warning"]("关键字不能为空");
|
||||
}else{
|
||||
window.location="/Explore/S/"+keyWords;
|
||||
}
|
||||
}
|
||||
else{
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
</body>
|
||||
<script src="http://192.168.123.19:3000/static/js/runtime~search.bundle.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/0.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/2.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/5.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/1.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/search.chunk.js"></script>
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{$options.js_code}
|
||||
{/block}
|
||||
</html>
|
|
@ -1,47 +0,0 @@
|
|||
{extend name="header_public" /}
|
||||
{block name="title"}用户主页 - {$options.siteName}{/block}
|
||||
{block name="content"}
|
||||
<link rel="stylesheet" href="/static/css/search.css" />
|
||||
</head>
|
||||
<body data-ma-header="teal">
|
||||
<nav class="navbar navbar-inverse" >
|
||||
<div class="container-fluid">
|
||||
<div class="container" >
|
||||
{include file="navbar_public" /}
|
||||
<div class="header-panel shadow-z-2">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container main-h">
|
||||
|
||||
<div class="col-md-12">
|
||||
<h1>搜索分享</h1>
|
||||
<input type="text" placeholder="请输入关键词,回车键发起搜索" autofocus="true">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<script src="/static/js/material.js"></script>
|
||||
<script >
|
||||
document.onkeydown=function(){
|
||||
if (event.keyCode == 13){
|
||||
keyWords = $("input").val();
|
||||
if(keyWords ==""){
|
||||
toastr["warning"]("关键字不能为空");
|
||||
}else{
|
||||
window.location="/Explore/S/"+keyWords;
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{$options.js_code}
|
||||
{/block}
|
|
@ -1,81 +1,73 @@
|
|||
{extend name="header_home" /}
|
||||
{block name="title"}离线下载管理- {$options.siteName}{/block}
|
||||
{block name="content"}
|
||||
<script src="/static/js/remoteDownload.js"></script>
|
||||
<style type="text/css">
|
||||
.col-md-3{
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
</style>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="theme-color" content="{$options.themeColor}" />
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is added to the
|
||||
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>离线下载管理- {$options.siteName}</title>
|
||||
<script type="text/javascript">
|
||||
colorTheme = {:json_encode($options["themeConfig"])};
|
||||
isHomePage = false;
|
||||
isSharePage = false;
|
||||
pageId="shareLock";
|
||||
userInfo = {
|
||||
uid: {$userInfo.uid},
|
||||
nick: "{$userInfo.userNick}",
|
||||
email: "{$userInfo.userMail}",
|
||||
group: "{$userInfo.groupData.group_name}",
|
||||
groupId: {$userInfo.groupData.id},
|
||||
groupColor: "{$userInfo.groupData.color}",
|
||||
};
|
||||
siteInfo = {
|
||||
mainTitle: "离线下载",
|
||||
};
|
||||
uploadConfig = {
|
||||
allowSource: false,
|
||||
allowShare: false,
|
||||
allowRemoteDownload: "0",
|
||||
allowTorrentDownload: "0",
|
||||
};
|
||||
isMobile = window.innerWidth < 600;
|
||||
</script>
|
||||
</head>
|
||||
<body >
|
||||
<div id="container">
|
||||
{include file="navbar_home" /}
|
||||
|
||||
<div class="col-md-10 quota_content">
|
||||
<h1>离线下载管理</h1>
|
||||
<br>
|
||||
<div class="fix_side">
|
||||
|
||||
<div class="fix">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">正在进行中 <i class="fa fa-refresh" aria-hidden="true" title="刷新数据" onclick="refresh()"></i></div>
|
||||
<div class="panel-body centerTable" id="loadStatus">
|
||||
更新状态数据中...
|
||||
</div>
|
||||
<div class="table-responsive" style="display: none">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%" class="centerTable">#</th>
|
||||
<th width="50%" >文件名</th>
|
||||
<th class="centerTable">大小</th>
|
||||
<th class="centerTable">储存位置</th>
|
||||
<th class="centerTable">下载速度</th>
|
||||
<th class="centerTable">进度</th>
|
||||
<th class="centerTable">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="itemContent">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">已完成 </i></div>
|
||||
<div class="table-responsive" >
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%" class="centerTable">#</th>
|
||||
<th width="50%" >文件名</th>
|
||||
<th class="centerTable">大小</th>
|
||||
<th class="centerTable">储存位置</th>
|
||||
<th class="centerTable">状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="completeItemContent">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-body centerTable" id="loadButton">
|
||||
<button class="btn btn-primary" id="loadFinished">点击加载已完成列表</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</body>
|
||||
<script src="/static/js/material.js"></script>
|
||||
<script type="text/javascript">
|
||||
upload_load=0;
|
||||
</script>
|
||||
{$options.js_code}
|
||||
</html>
|
||||
{/block}
|
||||
|
||||
<body>
|
||||
|
||||
<noscript>
|
||||
You need to enable JavaScript to run this app.
|
||||
</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
</body>
|
||||
<script src="http://192.168.123.19:3000/static/js/runtime~download.bundle.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/17.chunk.js"></script>
|
||||
|
||||
<script src="http://192.168.123.19:3000/static/js/18.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/download.chunk.js"></script>
|
||||
|
||||
</html>
|
81
application/index/view/home/download_old.html
Normal file
81
application/index/view/home/download_old.html
Normal file
|
@ -0,0 +1,81 @@
|
|||
{extend name="header_home" /}
|
||||
{block name="title"}离线下载管理- {$options.siteName}{/block}
|
||||
{block name="content"}
|
||||
<script src="/static/js/remoteDownload.js"></script>
|
||||
<style type="text/css">
|
||||
.col-md-3{
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body >
|
||||
<div id="container">
|
||||
{include file="navbar_home" /}
|
||||
|
||||
<div class="col-md-10 quota_content">
|
||||
<h1>离线下载管理</h1>
|
||||
<br>
|
||||
<div class="fix_side">
|
||||
|
||||
<div class="fix">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">正在进行中 <i class="fa fa-refresh" aria-hidden="true" title="刷新数据" onclick="refresh()"></i></div>
|
||||
<div class="panel-body centerTable" id="loadStatus">
|
||||
更新状态数据中...
|
||||
</div>
|
||||
<div class="table-responsive" style="display: none">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%" class="centerTable">#</th>
|
||||
<th width="50%" >文件名</th>
|
||||
<th class="centerTable">大小</th>
|
||||
<th class="centerTable">储存位置</th>
|
||||
<th class="centerTable">下载速度</th>
|
||||
<th class="centerTable">进度</th>
|
||||
<th class="centerTable">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="itemContent">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">已完成 </i></div>
|
||||
<div class="table-responsive" >
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%" class="centerTable">#</th>
|
||||
<th width="50%" >文件名</th>
|
||||
<th class="centerTable">大小</th>
|
||||
<th class="centerTable">储存位置</th>
|
||||
<th class="centerTable">状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="completeItemContent">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-body centerTable" id="loadButton">
|
||||
<button class="btn btn-primary" id="loadFinished">点击加载已完成列表</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</body>
|
||||
<script src="/static/js/material.js"></script>
|
||||
<script type="text/javascript">
|
||||
upload_load=0;
|
||||
</script>
|
||||
{$options.js_code}
|
||||
</html>
|
||||
{/block}
|
|
@ -83,9 +83,9 @@
|
|||
<script src="http://192.168.123.19:3000/static/js/2.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/3.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/4.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/5.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/6.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/10.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/7.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/9.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/1.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/8.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/12.chunk.js"></script>
|
||||
|
|
|
@ -75,9 +75,10 @@
|
|||
<script src="http://192.168.123.19:3000/static/js/2.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/3.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/4.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/9.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/5.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/7.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/10.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/12.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/13.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/1.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/setting.chunk.js"></script>
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<script src="http://192.168.123.19:3000/static/js/0.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/2.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/3.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/7.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/5.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/1.chunk.js"></script>
|
||||
<script src="http://192.168.123.19:3000/static/js/myShare.chunk.js"></script>
|
||||
|
||||
|
|
|
@ -1,98 +0,0 @@
|
|||
{extend name="header_home" /}
|
||||
{block name="title"}我的分享- {$options.siteName}{/block}
|
||||
{block name="content"}
|
||||
<script src="/static/js/share_home.js"></script>
|
||||
</head>
|
||||
<body >
|
||||
|
||||
|
||||
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" id="deleteConfirm">
|
||||
<div class="modal-dialog modal-sm" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">确认</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
您确定要取消此分享吗?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn pro-btn" data-dismiss="modal">取消</button>
|
||||
<button type="button" class="btn btn-primary pro-btn" onclick="deleteConfirm();">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" id="changeConfirm">
|
||||
<div class="modal-dialog modal-sm" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">确认</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
您确定要将此分享改为<span id="shareType"></span>?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn pro-btn" data-dismiss="modal">取消</button>
|
||||
<button type="button" class="btn btn-primary pro-btn" onclick="changeConfirm();">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="container">
|
||||
{include file="navbar_home" /}
|
||||
|
||||
|
||||
<div class="col-md-10 share-content">
|
||||
<h1>我的分享</h1>
|
||||
<br>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">文件名</th>
|
||||
<th class="table_center">分享日期</th>
|
||||
<th class="table_center">分享类型</th>
|
||||
<th class="table_center">下载次数</th>
|
||||
<th class="table_center">浏览次数</th>
|
||||
<th class="table_center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{volist name='list' id='shares'}
|
||||
<tr id="{$shares.share_key}">
|
||||
|
||||
<td >{switch $shares.source_type}
|
||||
{case file}<i class="fa fa-file" aria-hidden="true"></i> {/case}
|
||||
{case dir}<i class="fa fa-folder-open blue" aria-hidden="true"></i> {/case}
|
||||
{/switch} {$shares.fileData}</td>
|
||||
<td align="center">{$shares.share_time}</td>
|
||||
<td align="center">{switch $shares.type}
|
||||
{case private}<button class="btn btn-default small-btn" data-toggle="tooltip" data-placement="top" title="密码:{$shares.share_pwd},点击变更公开类型" onclick="changeType('{$shares.share_key}','private')"><i class="fa fa-lock" aria-hidden="true"></i></button> {/case}
|
||||
{case public}<button class="btn btn-default small-btn" data-toggle="tooltip" data-placement="top" title="变更公开类型" onclick="changeType('{$shares.share_key}','public')"><i class="fa fa-eye" aria-hidden="true"></i></button> {/case}
|
||||
{/switch} </td>
|
||||
<td align="center">{$shares.download_num}</td>
|
||||
<td align="center">{$shares.view_num}</td>
|
||||
<td align="center"><button class="btn btn-info small-btn-border" data-toggle="tooltip" data-placement="top" title="查看分享" onclick="openShare('{$shares.share_key}')"><i class="fa fa-share-square" aria-hidden="true"></i></button>
|
||||
<button class="btn btn-danger small-btn-border" data-toggle="tooltip" data-placement="top" title="删除分享" onclick="deleteShare('{$shares.share_key}')"><i class="fa fa-times" aria-hidden="true"></i></button>
|
||||
<button class="btn btn-success small-btn-border" data-toggle="tooltip" data-placement="top" title="变更公开类型" onclick="changeType('{$shares.share_key}','{$shares.type}')"><i class="fa fa-unlock-alt" aria-hidden="true"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$listOrigin->render()}
|
||||
</body>
|
||||
<script src="/static/js/material.js"></script>
|
||||
<script type="text/javascript">
|
||||
upload_load=0;
|
||||
|
||||
</script>
|
||||
{$options.js_code}
|
||||
</html>
|
||||
{/block}
|
|
@ -20,7 +20,7 @@ Route::rule([
|
|||
'Member/emailActivate/:key'=>'index/Member/emailActivate',
|
||||
'Member/resetPwd/:key'=>'index/Member/resetPwd',
|
||||
'Callback/Payment/Jinshajiang' => 'index/Callback/Jinshajiang',
|
||||
'Explore/S/:key' => 'index/Explore/S',
|
||||
'Explore/Search/:key' => 'index/Explore/Search',
|
||||
'Member/Avatar/:uid/:size' => ['Member/Avatar',[],['uid'=>'\d+']],
|
||||
'Profile/:uid' => ['Profile/index',[],['uid'=>'\d+']],
|
||||
'Callback/Payment/Jinshajiang' => 'index/Callback/Jinshajiang',
|
||||
|
|
|
@ -73,7 +73,8 @@ INSERT INTO `sd_corn` (`id`, `rank`, `name`, `des`, `last_excute`, `interval_s`,
|
|||
(1, 2, 'delete_unseful_chunks', '删除分片上传产生的失效文件块', 0, 3600, 1),
|
||||
(2, 1, 'delete_callback_data', '删除callback记录', 0, 86400, 1),
|
||||
(3, 1, 'flush_aria2', '刷新离线下载状态', 0, 30, 1),
|
||||
(4, 3, 'flush_onedrive_token', '刷新Onedrive Token', 0, 3000, 1);
|
||||
(4, 3, 'flush_onedrive_token', '刷新Onedrive Token', 0, 3000, 1),
|
||||
(5, '2', 'delete_remote_downloader_failed_folder', '删除离线下载失败后残留的临时文件', 0, 1, 1800);
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
|
|
Loading…
Add table
Reference in a new issue