模板文件目录更改
This commit is contained in:
87
view/admin/database/import.html
Normal file
87
view/admin/database/import.html
Normal file
@@ -0,0 +1,87 @@
|
||||
{extend name="admin/base"/}
|
||||
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<!-- 标题栏 -->
|
||||
<div class="pull-left">
|
||||
<h2>数据恢复</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
|
||||
<div class="table-responsive clearfix">
|
||||
<!-- 应用列表 -->
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="200">备份名称</th>
|
||||
<th width="80">卷数</th>
|
||||
<th width="80">压缩</th>
|
||||
<th width="80">数据大小</th>
|
||||
<th width="200">备份时间</th>
|
||||
<th>状态</th>
|
||||
<th width="120">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<td>{$item['time']|date='Ymd-His',###}</td>
|
||||
<td>{$item['part']}</td>
|
||||
<td>{$item['compress']}</td>
|
||||
<td>{$item['size']|format_bytes}</td>
|
||||
<td>{$key}</td>
|
||||
<td>-</td>
|
||||
<td class="action">
|
||||
<a class="db-import" href="{:url('import?time='.$item['time'])}">还原</a>
|
||||
|
||||
<a class="ajax-get confirm" href="{:url('del?time='.$item['time'])}">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /应用列表 -->
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
$(".db-import").click(function(){
|
||||
var self = this, status = ".";
|
||||
$.get(self.href, success, "json");
|
||||
window.onbeforeunload = function(){ return "正在还原数据库,请不要关闭!" }
|
||||
return false;
|
||||
|
||||
function success(data){
|
||||
if(data.code){
|
||||
if(data.data.gz){
|
||||
data.msg += status;
|
||||
if(status.length === 5){
|
||||
status = ".";
|
||||
} else {
|
||||
status += ".";
|
||||
}
|
||||
}
|
||||
$(self).parent().prev().text(data.msg);
|
||||
if(data.data.part){
|
||||
$.get(self.href,
|
||||
{"part" : data.data.part, "start" : data.data.start},
|
||||
success,
|
||||
"json"
|
||||
);
|
||||
} else {
|
||||
window.onbeforeunload = function(){ return null; }
|
||||
}
|
||||
} else {
|
||||
updateAlert(data.msg,'alert-error');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user