mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
This commit is contained in:
@@ -53,16 +53,19 @@ class WebsiteManager:
|
|||||||
self.childDomain = childDomain
|
self.childDomain = childDomain
|
||||||
|
|
||||||
def createWebsite(self, request=None, userID=None, data=None):
|
def createWebsite(self, request=None, userID=None, data=None):
|
||||||
url = "https://platform.cyberpersons.com/CyberpanelAdOns/Adonpermission"
|
|
||||||
|
|
||||||
test_domain_data = {
|
url = "https://platform.cyberpersons.com/CyberpanelAdOns/Adonpermission"
|
||||||
"name": "test-domain",
|
data = {
|
||||||
"IP": ACLManager.GetServerIP(),
|
"name": "all",
|
||||||
|
"IP": ACLManager.GetServerIP()
|
||||||
}
|
}
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
response = requests.post(url, data=json.dumps(test_domain_data))
|
response = requests.post(url, data=json.dumps(data))
|
||||||
test_domain_status = response.json()['status']
|
Status = response.json()['status']
|
||||||
|
|
||||||
|
if (Status == 1) or ProcessUtilities.decideServer() == ProcessUtilities.ent:
|
||||||
|
test_domain_status = 1
|
||||||
|
|
||||||
currentACL = ACLManager.loadedACL(userID)
|
currentACL = ACLManager.loadedACL(userID)
|
||||||
adminNames = ACLManager.loadAllUsers(userID)
|
adminNames = ACLManager.loadAllUsers(userID)
|
||||||
@@ -114,14 +117,7 @@ class WebsiteManager:
|
|||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
test_domain_data = {
|
test_domain_status = 1
|
||||||
"name": "test-domain",
|
|
||||||
"IP": ACLManager.GetServerIP(),
|
|
||||||
}
|
|
||||||
|
|
||||||
import requests
|
|
||||||
response = requests.post(url, data=json.dumps(test_domain_data))
|
|
||||||
test_domain_status = response.json()['status']
|
|
||||||
|
|
||||||
Data = {'packageList': packagesName, "owernList": adminNames, 'WPVersions': FinalVersions,
|
Data = {'packageList': packagesName, "owernList": adminNames, 'WPVersions': FinalVersions,
|
||||||
'Plugins': Plugins, 'Randam_String': rnpss.lower(), 'test_domain_data': test_domain_status}
|
'Plugins': Plugins, 'Randam_String': rnpss.lower(), 'test_domain_data': test_domain_status}
|
||||||
@@ -184,17 +180,6 @@ class WebsiteManager:
|
|||||||
response = requests.post(url, data=json.dumps(data))
|
response = requests.post(url, data=json.dumps(data))
|
||||||
Status = response.json()['status']
|
Status = response.json()['status']
|
||||||
|
|
||||||
test_domain_url = "https://platform.cyberpersons.com/CyberpanelAdOns/Adonpermission"
|
|
||||||
|
|
||||||
test_domain_data = {
|
|
||||||
"name": "test-domain",
|
|
||||||
"IP": ACLManager.GetServerIP(),
|
|
||||||
}
|
|
||||||
|
|
||||||
import requests
|
|
||||||
response = requests.post(test_domain_url, data=json.dumps(test_domain_data))
|
|
||||||
test_domain_status = response.json()['status']
|
|
||||||
Data['test_domain_data'] = test_domain_status
|
|
||||||
|
|
||||||
rnpss = randomPassword.generate_pass(10)
|
rnpss = randomPassword.generate_pass(10)
|
||||||
|
|
||||||
@@ -202,6 +187,7 @@ class WebsiteManager:
|
|||||||
|
|
||||||
if (Status == 1) or ProcessUtilities.decideServer() == ProcessUtilities.ent:
|
if (Status == 1) or ProcessUtilities.decideServer() == ProcessUtilities.ent:
|
||||||
Data['wpsite'] = WPobj
|
Data['wpsite'] = WPobj
|
||||||
|
Data['test_domain_data'] = 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
DeleteID = request.GET.get('DeleteID', None)
|
DeleteID = request.GET.get('DeleteID', None)
|
||||||
@@ -706,16 +692,18 @@ class WebsiteManager:
|
|||||||
currentACL = ACLManager.loadedACL(userID)
|
currentACL = ACLManager.loadedACL(userID)
|
||||||
websitesName = ACLManager.findAllSites(currentACL, userID)
|
websitesName = ACLManager.findAllSites(currentACL, userID)
|
||||||
|
|
||||||
test_domain_url = "https://platform.cyberpersons.com/CyberpanelAdOns/Adonpermission"
|
url = "https://platform.cyberpersons.com/CyberpanelAdOns/Adonpermission"
|
||||||
|
data = {
|
||||||
test_domain_data = {
|
"name": "all",
|
||||||
"name": "test-domain",
|
"IP": ACLManager.GetServerIP()
|
||||||
"IP": ACLManager.GetServerIP(),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
response = requests.post(test_domain_url, data=json.dumps(test_domain_data))
|
response = requests.post(url, data=json.dumps(data))
|
||||||
test_domain_status = response.json()['status']
|
Status = response.json()['status']
|
||||||
|
|
||||||
|
if (Status == 1) or ProcessUtilities.decideServer() == ProcessUtilities.ent:
|
||||||
|
test_domain_status = 1
|
||||||
|
|
||||||
rnpss = randomPassword.generate_pass(10)
|
rnpss = randomPassword.generate_pass(10)
|
||||||
proc = httpProc(request, 'websiteFunctions/createDomain.html',
|
proc = httpProc(request, 'websiteFunctions/createDomain.html',
|
||||||
|
|||||||
Reference in New Issue
Block a user