mirror of
https://github.com/aaPanel/aaPanel.git
synced 2026-08-17 21:25:47 +02:00
1. Added Mail Marketing Automation trigger tasks 2. Added Mail Marketing Groups Import, Export, Merge 3. Added Mail Marketing Subscribers to support paste import 4. Added Mail Marketing Template Import Export Duplicate 5. Added Mail server add timed automatic reply 6. Added HTTPS Protection function for Website (disables automatic HTTP to HTTPS redirection when enabled) 7. Optimize Website Interface Button Integration 8. Optimize the response speed of WP Toolkit interface
84 lines
2.5 KiB
Python
84 lines
2.5 KiB
Python
#coding: utf-8
|
|
#-------------------------------------------------------------------
|
|
# aaPanel
|
|
#-------------------------------------------------------------------
|
|
# Copyright (c) 2015-2099 aaPanel(www.aapanel.com) All rights reserved.
|
|
#-------------------------------------------------------------------
|
|
# Author: cjxin <cjxin@aapanel.com>
|
|
#-------------------------------------------------------------------
|
|
|
|
# 备份
|
|
#------------------------------
|
|
import os,sys,re,json,shutil,psutil,time
|
|
from panelModel.base import panelBase
|
|
import public
|
|
|
|
class main(panelBase):
|
|
|
|
|
|
def __init__(self):
|
|
pass
|
|
|
|
|
|
def get_site_backup_info(self,get):
|
|
"""
|
|
@获取网站是否开启计划任务备份
|
|
@param get['site_id'] 网站id
|
|
@return
|
|
all : 开启全部网站备份
|
|
info:计划任务详情
|
|
"""
|
|
|
|
id = get.id
|
|
find = public.M('sites').where("id=?",(id,)).find()
|
|
if not find:
|
|
return public.returnMsg(False, public.lang('The specified website could not be found.'))
|
|
|
|
result = {}
|
|
result['all'] = 0
|
|
result['info'] = False
|
|
result['status'] = True
|
|
data = public.M('crontab').where('sName=? and sType =?',(find['name'],'site')).order('id desc').select()
|
|
if len(data) > 0:
|
|
result['info'] = data[0]
|
|
|
|
data = public.M('crontab').where('sName=? and sType =?',('ALL','site')).order('id desc').select()
|
|
if len(data) > 0:
|
|
result['info'] = data[0]
|
|
result['all'] = 1
|
|
return result
|
|
|
|
|
|
def get_database_backup_info(self,get):
|
|
"""
|
|
@获取数据库是否开启计划任务备份
|
|
@param get['site_id'] 数据库id
|
|
@return
|
|
all : 开启全部数据库备份
|
|
info:计划任务详情
|
|
"""
|
|
|
|
id = get.id
|
|
find = public.M('databases').where("id=?",(id,)).find()
|
|
if not find:
|
|
return public.returnMsg(False, public.lang('The specified database could not be found.'))
|
|
|
|
result = {}
|
|
result['all'] = 0
|
|
result['info'] = False
|
|
result['status'] = True
|
|
data = public.M('crontab').where('sName=? and sType =?',(find['name'],'database')).order('id desc').select()
|
|
if len(data) > 0:
|
|
result['info'] = data[0]
|
|
|
|
data = public.M('crontab').where('sName=? and sType =?',('ALL','database')).order('id desc').select()
|
|
if len(data) > 0:
|
|
result['info'] = data[0]
|
|
result['all'] = 1
|
|
return result
|
|
|
|
|
|
|
|
|
|
|