192 lines
7.9 KiB
HTML
192 lines
7.9 KiB
HTML
{template "header.html"}
|
|
|
|
<div class="note note-danger">
|
|
<p>{dr_lang('更改系统配置之后需要重新生成一次缓存文件')}</p>
|
|
</div>
|
|
|
|
<div class="right-card-box">
|
|
<div class="table-scrollable">
|
|
|
|
<table class="table table-fc-upload table-striped table-bordered table-hover table-checkable dataTable">
|
|
<thead>
|
|
<tr class="heading">
|
|
<th width="55"> </th>
|
|
<th width="500"> {dr_lang('执行项目')} </th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{php $key=0;}
|
|
{loop $list $id $t}
|
|
{php $key=$key+1;}
|
|
<tr>
|
|
<td>
|
|
<span class="badge badge-success"> {$key} </span>
|
|
</td>
|
|
<td>
|
|
{dr_lang($t[0])}
|
|
</td>
|
|
<td style="overflow:auto">
|
|
<label>
|
|
<a href="javascript:my_update_cache('{$id}', '{$t[1]}');" class="btn red btn-xs"><i class="fa fa-refresh"></i> {dr_lang('立即执行')} </a>
|
|
</label>
|
|
<label id="dr_{$id}_result" >
|
|
|
|
</label>
|
|
</td>
|
|
</tr>
|
|
{/loop}
|
|
{php $key=$key+1;}
|
|
{loop $sync $s}
|
|
{load $s}
|
|
{/loop}
|
|
|
|
{table table=linkage return=c}
|
|
{/table}
|
|
{if $return_c}
|
|
<tr>
|
|
<td>
|
|
<span class="badge badge-success">{$key++}</span>
|
|
</td>
|
|
<td>
|
|
{dr_lang('变更联动菜单数据后,更新缓存数据')}
|
|
</td>
|
|
<td style="overflow:auto">
|
|
{loop $return_c $c}
|
|
<label>
|
|
<a href="javascript:dr_iframe_show('{dr_lang($c.name)}', '{dr_url('linkage/cache_index')}&key={$c.id}', '500px', '300px');" class="btn blue btn-xs"> {dr_lang($c.name)} </a>
|
|
</label>
|
|
{/loop}
|
|
</td>
|
|
</tr>
|
|
{/if}
|
|
<tr>
|
|
<td>
|
|
<span class="badge badge-success"> {$key++} </span>
|
|
</td>
|
|
<td style="color:blue">
|
|
{dr_lang('在升级框架版本或插件版本后,需要更新本脚本')}
|
|
</td>
|
|
<td style="overflow:auto">
|
|
<label>
|
|
<a href="javascript:dr_iframe_show('{dr_lang('升级程序脚本')}', '{dr_url('cache/update_index')}', '500px', '300px');" class="btn red btn-xs"><i class="fa fa-refresh"></i> {dr_lang('立即执行')} </a>
|
|
</label>
|
|
{if $ci->_is_admin_auth('menu/init')}
|
|
<label>
|
|
<a href="javascript:dr_load_ajax('{dr_lang('确定初始化后台菜单吗?')}', '{dr_url('menu/init')}', 0);" class="btn blue btn-xs"><i class="fa fa-list"></i> {dr_lang('初始化后台菜单')} </a>
|
|
</label>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function my_update_cache(id, m) {
|
|
var obj = $('#dr_'+id+'_result');
|
|
obj.html("<img style='height:17px' src='{THEME_PATH}assets/images/loading-0.gif' />");
|
|
|
|
if (m == 'update_attachment') {
|
|
my_update_attachment(id, 0);
|
|
{if IS_SITES}
|
|
} else if (m == 'update_cache') {
|
|
my_update_site_cache(id, 0);
|
|
{/if}
|
|
} else if (m == 'update_site_config') {
|
|
my_update_site_config(id, 0);
|
|
} else {
|
|
$.ajax({
|
|
type: "GET",
|
|
dataType: "json",
|
|
url: "{SELF}?c=api&m=cache&id="+m,
|
|
success: function (json) {
|
|
if (json.code == 0) {
|
|
obj.html('<font color="red">'+json.msg+'</font>');
|
|
} else {
|
|
obj.html('<font color="green">'+json.msg+'</font>');
|
|
}
|
|
},
|
|
error: function(HttpRequest, ajax, thrownError) {
|
|
dr_ajax_alert_error(HttpRequest, ajax, thrownError);
|
|
obj.html('<a href="javascript:dr_show_file_code(\'{dr_lang('查看日志')}\', \'{dr_url('error/log_show')}\');" style="color:red">{dr_lang("系统崩溃,请将错误日志发送给官方处理")}</a>');
|
|
}
|
|
});
|
|
}
|
|
}
|
|
function my_update_attachment(id, page) {
|
|
var obj = $('#dr_'+id+'_result');
|
|
$.ajax({
|
|
type: "GET",
|
|
dataType: "json",
|
|
url: "{SELF}?c=api&m=cache&id=update_attachment&page="+page,
|
|
success: function (json) {
|
|
if (json.code == 0) {
|
|
obj.html('<font color="red">'+json.msg+'</font>');
|
|
|
|
} else {
|
|
if (json.data == 0) {
|
|
obj.html('<font color="green">'+json.msg+'</font>');
|
|
} else {
|
|
my_update_attachment(id, json.data);
|
|
obj.html('<font color="blue">'+json.msg+'</font>');
|
|
}
|
|
}
|
|
},
|
|
error: function(HttpRequest, ajax, thrownError) {
|
|
dr_ajax_alert_error(HttpRequest, ajax, thrownError);
|
|
obj.html('<a href="javascript:dr_show_file_code(\'{dr_lang('查看日志')}\', \'{dr_url('error/log_show')}\');" style="color:red">{dr_lang("系统崩溃,请将错误日志发送给官方处理")}</a>');
|
|
}
|
|
});
|
|
}
|
|
function my_update_site_cache(id, page) {
|
|
var obj = $('#dr_'+id+'_result');
|
|
$.ajax({
|
|
type: "GET",
|
|
dataType: "json",
|
|
url: "{SELF}?c=api&m=cache&id=update_site_cache&page="+page,
|
|
success: function (json) {
|
|
if (json.code == 0) {
|
|
obj.html('<font color="red">'+json.msg+'</font>');
|
|
} else {
|
|
if (json.data == 0) {
|
|
obj.html('<font color="green">'+json.msg+'</font>');
|
|
} else {
|
|
my_update_site_cache(id, json.data);
|
|
obj.html('<font color="blue">'+json.msg+'</font>');
|
|
}
|
|
}
|
|
},
|
|
error: function(HttpRequest, ajax, thrownError) {
|
|
dr_ajax_alert_error(HttpRequest, ajax, thrownError);
|
|
obj.html('<a href="javascript:dr_show_file_code(\'{dr_lang('查看日志')}\', \'{dr_url('error/log_show')}\');" style="color:red">{dr_lang("系统崩溃,请将错误日志发送给官方处理")}</a>');
|
|
}
|
|
});
|
|
}
|
|
function my_update_site_config(id, page) {
|
|
var obj = $('#dr_'+id+'_result');
|
|
$.ajax({
|
|
type: "GET",
|
|
dataType: "json",
|
|
url: "{SELF}?c=api&m=cache&id=update_site_config&page="+page,
|
|
success: function (json) {
|
|
if (json.code == 0) {
|
|
obj.html('<font color="red">'+json.msg+'</font>');
|
|
} else {
|
|
if (json.data == 0) {
|
|
obj.html('<font color="green">'+json.msg+'</font>');
|
|
} else {
|
|
my_update_site_config(id, json.data);
|
|
obj.html('<font color="blue">'+json.msg+'</font>');
|
|
}
|
|
}
|
|
},
|
|
error: function(HttpRequest, ajax, thrownError) {
|
|
dr_ajax_alert_error(HttpRequest, ajax, thrownError);
|
|
obj.html('<a href="javascript:dr_show_file_code(\'{dr_lang('查看日志')}\', \'{dr_url('error/log_show')}\');" style="color:red">{dr_lang("系统崩溃,请将错误日志发送给官方处理")}</a>');
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
{template "footer.html"} |