diff --git a/class/core/site_api.py b/class/core/site_api.py index 9dd714241..e374757ce 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -151,6 +151,7 @@ class site_api: data['userini'] = True data['runPath'] = self.getSiteRunPath(mid) data['pass'] = self.getHasPwd(name) + data['path'] = path return public.returnJson(True, 'OK', data) def getCertListApi(self): @@ -409,8 +410,7 @@ class site_api: home_cert = home_path + '/fullchain.cer' home_key = home_path + '/' + domains[0] + '.key' - print home_cert - + # print home_cert cmd = 'export ACCOUNT_EMAIL=' + email + ' && ' + execStr result = public.execShell(cmd) @@ -585,12 +585,6 @@ class site_api: self.nginxAddDomain(webname, domain_name, domain_port) - # 添加放行端口 - # if port != '80': - # import firewalls - # get.ps = get.domain - # firewalls.firewalls().AddAcceptPort(get) - public.restartWeb() msg = public.getInfo('网站[{1}]添加域名[{2}]成功!', (webname, domain_name)) public.writeLog('TYPE_SITE', msg) diff --git a/route/static/app/site.js b/route/static/app/site.js index 55d5f02de..a7f60782f 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -285,46 +285,49 @@ function webAdd(type) { function webPathEdit(id){ $.post('/site/get_dir_user_ini','&id='+id, function(data){ var userini = data['data']; + var webpath = userini['path']; var userinicheckeds = userini.userini?'checked':''; var logscheckeds = userini.logs?'checked':''; var opt = '' var selected = ''; for(var i=0;i'+ userini.runPath.dirs[i] +'' } var webPathHtml = "
\
\ - \ - \ + \ + \
\
\ - "+lan.site.web_dir+"\ - \ + 网站目录\ + \ \ - \ + \
\
\ - "+lan.site.run_dir+"\ + 运行目录\ \ - \ + \
\ " +'
' - +''+lan.soft.pma_pass+'' + +'密码访问' +'' +'' +'' +'
' +'
' - +'

'+lan.soft.pma_user+'

' - +'

'+lan.soft.pma_pass1+'

' - +'

'+lan.soft.pma_pass2+'

' - +'

' + +'

授权账号

' + +'

访问密码

' + +'

重复密码

' + +'

' +'
' +'
'; $("#webedit-con").html(webPathHtml); @@ -333,12 +336,12 @@ function webPathEdit(id){ $.post('/site?action=SetDirUserINI','path='+rdata,function(userini){ layer.msg(userini.msg+'

注意:设置防跨站需要重启PHP才能生效!

',{icon:userini.status?1:2}); }); - }); + },'json'); $("#logs").change(function(){ $.post('/site?action=logsOpen','id='+id,function(userini){ layer.msg(userini.msg,{icon:userini.status?1:2}); - }); + },'josn'); }); },'json');