diff --git a/class/core/site_api.py b/class/core/site_api.py
index b22838a08..64888f11f 100755
--- a/class/core/site_api.py
+++ b/class/core/site_api.py
@@ -55,6 +55,11 @@ class site_api:
start = (int(p) - 1) * (int(limit))
_list = public.M('sites').where('', ()).field('id,name,path,status,ps,addtime,edate').limit(
(str(start)) + ',' + limit).order('id desc').select()
+
+ for i in range(len(_list)):
+ _list[i]['backup_count'] = public.M('backup').where(
+ "pid=? AND type=?", (_list[i]['id'], 0)).count()
+
_ret = {}
_ret['data'] = _list
@@ -84,7 +89,7 @@ class site_api:
"id,name,path,status,ps,addtime,edate").find()
start = (int(p) - 1) * (int(limit))
- _list = public.M('backup').where('type=?', (mid,)).field('id,type,name,pid,filename,size,addtime').limit(
+ _list = public.M('backup').where('pid=?', (mid,)).field('id,type,name,pid,filename,size,addtime').limit(
(str(start)) + ',' + limit).order('id desc').select()
_ret = {}
_ret['data'] = _list
@@ -113,14 +118,14 @@ class site_api:
execStr = "cd '" + find['path'] + "' && zip '" + \
zipName + "' -r ./* > " + tmps + " 2>&1"
# print execStr
- # print public.execShell(execStr)
+ public.execShell(execStr)
if os.path.exists(zipName):
fsize = os.path.getsize(zipName)
else:
fsize = 0
sql = public.M('backup').add('type,name,pid,filename,size,addtime',
- (mid, fileName, find['id'], zipName, fsize, public.getDate()))
+ (0, fileName, find['id'], zipName, fsize, public.getDate()))
msg = public.getInfo('备份网站[{1}]成功!', (find['name'],))
public.writeLog('网站管理', msg)
diff --git a/route/static/app/site.js b/route/static/app/site.js
index 568932fe8..0bb5044a6 100755
--- a/route/static/app/site.js
+++ b/route/static/app/site.js
@@ -597,14 +597,18 @@ function domainEdit(id, name, msg, status) {
var echoHtml = "";
for (var i = 0; i < domain.length; i++) {
- echoHtml += "
" + domain[i].name + " | " + domain[i].port + " | |
";
+ echoHtml += "\
+ " + domain[i].name + " | \
+ " + domain[i].port + " | \
+ | \
+
";
}
var bodyHtml = "\
\
- \
+ \
\
\
- "+lan.site.domain+" | "+lan.site.port+" | "+lan.site.operate+" |
\
+ "+lan.site.domain+" | 端口 | 操作 |
\
" + echoHtml + "\
\
";
@@ -612,7 +616,7 @@ function domainEdit(id, name, msg, status) {
if(msg != undefined){
layer.msg(msg,{icon:status?1:5});
}
- var placeholder = ""+lan.site.domain_help+"
";
+ var placeholder = "每行填写一个域名,默认为80端口
泛解析添加方法 *.domain.com
如另加端口格式为 www.domain.com:88
";
$('#newdomain').after(placeholder);
$(".placeholder").click(function(){
$(this).hide();
@@ -699,33 +703,7 @@ function checkDomain() {
var $this = $(this);
var domain = $(this).find("td:first-child").text();
$(this).find("td:first-child").append("");
- checkDomainWebsize($this,domain);
- })
-}
-//检查域名是否解析备案
-function checkDomainWebsize(obj,domain){
- var gurl = "http://api.bt.cn/ipaddess";
- var ip = getCookie('iplist');
- var data = "domain=" + domain+"&ip="+ip;
- $.ajax({ url: gurl,data:data,type:"get",dataType:"jsonp",async:true ,success: function(rdata){
- obj.find("td:first-child").find(".lading").remove();
- if (rdata.code == -1) {
- obj.find("td:first-child").append(""+lan.site.unresolved+"");
- } else {
- obj.find("td:first-child").append(""+lan.site.parsed+"");
- }
-
- obj.find("i").mouseover(function() {
- var tipsTitle = $(this).attr("data-title");
- layer.tips(tipsTitle, this, {
- tips: [1, '#3c8dbc'],
- time: 0
- })
- })
- obj.find("i").mouseout(function() {
- $(".layui-layer-tips").remove();
- })
- }})
+ });
}
/**
@@ -1486,8 +1464,14 @@ function to301(siteName,type){
//文件验证
function file_check(){
- $(".check_message").html('');
- $("#lets_help").html(''+lan.site.bt_ssl_help_5+''+lan.site.bt_ssl_help_8+''+lan.site.bt_ssl_help_9+'在未指定SSL默认站点时,未开启SSL的站点使用HTTPS会直接访问到已开启SSL的站点');
+ $(".check_message").html('\
+ \
+ \
+
');
+ $("#lets_help").html('申请之前,请确保域名已解析,如未解析会导致审核失败\
+ Let\'s Encrypt免费证书,有效期3个月,支持多域名。默认会自动续签\
+ 若您的站点使用了CDN或301重定向会导致续签失败\
+ 在未指定SSL默认站点时,未开启SSL的站点使用HTTPS会直接访问到已开启SSL的站点');
}
dnsapis = {};