diff --git a/CyberCP/__init__.pyc b/CyberCP/__init__.pyc index 55097d04c..b4c1a3d74 100644 Binary files a/CyberCP/__init__.pyc and b/CyberCP/__init__.pyc differ diff --git a/CyberCP/settings.py b/CyberCP/settings.py index a729f925d..4348eed51 100644 --- a/CyberCP/settings.py +++ b/CyberCP/settings.py @@ -102,7 +102,7 @@ DATABASES = { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'cyberpanel', 'USER': 'cyberpanel', - 'PASSWORD': 'YhGk1hGnOcWwJl', + 'PASSWORD': 'jFzZwX3fFyYrCo', 'HOST': '127.0.0.1', 'PORT':'3307' }, @@ -110,7 +110,7 @@ DATABASES = { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mysql', 'USER': 'root', - 'PASSWORD': '8oUlBn5AmS8RuY', + 'PASSWORD': 'b1w3wHi5x0o8t9', 'HOST': 'localhost', 'PORT': '', } diff --git a/CyberCP/settings.pyc b/CyberCP/settings.pyc index 1984388f5..25b0de830 100644 Binary files a/CyberCP/settings.pyc and b/CyberCP/settings.pyc differ diff --git a/CyberCP/urls.pyc b/CyberCP/urls.pyc index aa9a4531f..c0222a041 100644 Binary files a/CyberCP/urls.pyc and b/CyberCP/urls.pyc differ diff --git a/CyberCP/wsgi.pyc b/CyberCP/wsgi.pyc index 059d36bb8..cdb9773d1 100644 Binary files a/CyberCP/wsgi.pyc and b/CyberCP/wsgi.pyc differ diff --git a/api/__init__.pyc b/api/__init__.pyc index 88a1202ee..b65fd3706 100644 Binary files a/api/__init__.pyc and b/api/__init__.pyc differ diff --git a/api/admin.pyc b/api/admin.pyc index f67fa07b6..82f1d16fa 100644 Binary files a/api/admin.pyc and b/api/admin.pyc differ diff --git a/api/migrations/__init__.pyc b/api/migrations/__init__.pyc index 06a302d9e..4c9e20302 100644 Binary files a/api/migrations/__init__.pyc and b/api/migrations/__init__.pyc differ diff --git a/api/models.pyc b/api/models.pyc index 88786fc50..3561deb50 100644 Binary files a/api/models.pyc and b/api/models.pyc differ diff --git a/api/urls.pyc b/api/urls.pyc index 4e75d414e..99cb5e138 100644 Binary files a/api/urls.pyc and b/api/urls.pyc differ diff --git a/api/views.pyc b/api/views.pyc index 9682dc7ab..bc318f6d6 100644 Binary files a/api/views.pyc and b/api/views.pyc differ diff --git a/backup/__init__.pyc b/backup/__init__.pyc index 5e1729ecf..a070efdd6 100644 Binary files a/backup/__init__.pyc and b/backup/__init__.pyc differ diff --git a/backup/admin.pyc b/backup/admin.pyc index 03ca0bb13..18caa545d 100644 Binary files a/backup/admin.pyc and b/backup/admin.pyc differ diff --git a/backup/backupRouter.pyc b/backup/backupRouter.pyc index a1c0d6bfd..9e4391e2a 100644 Binary files a/backup/backupRouter.pyc and b/backup/backupRouter.pyc differ diff --git a/backup/migrations/__init__.pyc b/backup/migrations/__init__.pyc index b28194502..668f9ed67 100644 Binary files a/backup/migrations/__init__.pyc and b/backup/migrations/__init__.pyc differ diff --git a/backup/models.pyc b/backup/models.pyc index 98d1903fd..4b928877f 100644 Binary files a/backup/models.pyc and b/backup/models.pyc differ diff --git a/backup/urls.pyc b/backup/urls.pyc index 5dfaf0046..fb687ad92 100644 Binary files a/backup/urls.pyc and b/backup/urls.pyc differ diff --git a/backup/views.pyc b/backup/views.pyc index 8d6a38078..22a7a9aeb 100644 Binary files a/backup/views.pyc and b/backup/views.pyc differ diff --git a/baseTemplate/__init__.pyc b/baseTemplate/__init__.pyc index 41fb6a23f..25e5b7d66 100644 Binary files a/baseTemplate/__init__.pyc and b/baseTemplate/__init__.pyc differ diff --git a/baseTemplate/admin.pyc b/baseTemplate/admin.pyc index 3588ec17f..cb9c918b2 100644 Binary files a/baseTemplate/admin.pyc and b/baseTemplate/admin.pyc differ diff --git a/baseTemplate/migrations/__init__.pyc b/baseTemplate/migrations/__init__.pyc index 8cb677806..1812d5b2c 100644 Binary files a/baseTemplate/migrations/__init__.pyc and b/baseTemplate/migrations/__init__.pyc differ diff --git a/baseTemplate/models.pyc b/baseTemplate/models.pyc index c0c962bcf..0b1265b82 100644 Binary files a/baseTemplate/models.pyc and b/baseTemplate/models.pyc differ diff --git a/baseTemplate/urls.pyc b/baseTemplate/urls.pyc index aa574818c..bab1aefcd 100644 Binary files a/baseTemplate/urls.pyc and b/baseTemplate/urls.pyc differ diff --git a/baseTemplate/views.pyc b/baseTemplate/views.pyc index 44ea4d657..6ec3ff923 100644 Binary files a/baseTemplate/views.pyc and b/baseTemplate/views.pyc differ diff --git a/databases/__init__.pyc b/databases/__init__.pyc index 5f3a4aa57..f8e7593fc 100644 Binary files a/databases/__init__.pyc and b/databases/__init__.pyc differ diff --git a/databases/admin.pyc b/databases/admin.pyc index 97e2bf662..b3edea730 100644 Binary files a/databases/admin.pyc and b/databases/admin.pyc differ diff --git a/databases/migrations/__init__.pyc b/databases/migrations/__init__.pyc index 6a7414d36..5e851d72e 100644 Binary files a/databases/migrations/__init__.pyc and b/databases/migrations/__init__.pyc differ diff --git a/databases/models.pyc b/databases/models.pyc index 9651c0b3e..479ad2eee 100644 Binary files a/databases/models.pyc and b/databases/models.pyc differ diff --git a/databases/urls.pyc b/databases/urls.pyc index fca876485..93d4c022d 100644 Binary files a/databases/urls.pyc and b/databases/urls.pyc differ diff --git a/databases/views.pyc b/databases/views.pyc index 88dc557e9..bd00aef06 100644 Binary files a/databases/views.pyc and b/databases/views.pyc differ diff --git a/dns/__init__.pyc b/dns/__init__.pyc index 70a8aa17d..e13d9790c 100644 Binary files a/dns/__init__.pyc and b/dns/__init__.pyc differ diff --git a/dns/admin.pyc b/dns/admin.pyc index 94712e1a7..590876449 100644 Binary files a/dns/admin.pyc and b/dns/admin.pyc differ diff --git a/dns/migrations/__init__.pyc b/dns/migrations/__init__.pyc index ef5b5b6b8..698fa1f2c 100644 Binary files a/dns/migrations/__init__.pyc and b/dns/migrations/__init__.pyc differ diff --git a/dns/models.pyc b/dns/models.pyc index d1c087e67..0c689a527 100644 Binary files a/dns/models.pyc and b/dns/models.pyc differ diff --git a/dns/urls.pyc b/dns/urls.pyc index 690341110..e8b2717ab 100644 Binary files a/dns/urls.pyc and b/dns/urls.pyc differ diff --git a/dns/views.pyc b/dns/views.pyc index 9293ad8ed..6f54b4c40 100644 Binary files a/dns/views.pyc and b/dns/views.pyc differ diff --git a/filemanager/__init__.pyc b/filemanager/__init__.pyc index ad89af2ad..6951e53e3 100644 Binary files a/filemanager/__init__.pyc and b/filemanager/__init__.pyc differ diff --git a/filemanager/admin.pyc b/filemanager/admin.pyc index cb014e28a..df5374762 100644 Binary files a/filemanager/admin.pyc and b/filemanager/admin.pyc differ diff --git a/filemanager/migrations/__init__.pyc b/filemanager/migrations/__init__.pyc index 1af004c20..f891df3cf 100644 Binary files a/filemanager/migrations/__init__.pyc and b/filemanager/migrations/__init__.pyc differ diff --git a/filemanager/models.pyc b/filemanager/models.pyc index 20f021a5e..2f5b0f198 100644 Binary files a/filemanager/models.pyc and b/filemanager/models.pyc differ diff --git a/filemanager/urls.pyc b/filemanager/urls.pyc index 14c72a0a7..f7fd1bd0f 100644 Binary files a/filemanager/urls.pyc and b/filemanager/urls.pyc differ diff --git a/filemanager/views.pyc b/filemanager/views.pyc index f09143d97..1656dddbc 100644 Binary files a/filemanager/views.pyc and b/filemanager/views.pyc differ diff --git a/firewall/__init__.pyc b/firewall/__init__.pyc index 4ce1bde85..b3cebf703 100644 Binary files a/firewall/__init__.pyc and b/firewall/__init__.pyc differ diff --git a/firewall/admin.pyc b/firewall/admin.pyc index 606c929e7..4a7e86e1f 100644 Binary files a/firewall/admin.pyc and b/firewall/admin.pyc differ diff --git a/firewall/migrations/__init__.pyc b/firewall/migrations/__init__.pyc index 0400aa78a..02e76ca38 100644 Binary files a/firewall/migrations/__init__.pyc and b/firewall/migrations/__init__.pyc differ diff --git a/firewall/models.pyc b/firewall/models.pyc index fb89dba22..31f9975ea 100644 Binary files a/firewall/models.pyc and b/firewall/models.pyc differ diff --git a/firewall/urls.pyc b/firewall/urls.pyc index 5f83296e8..4af092017 100644 Binary files a/firewall/urls.pyc and b/firewall/urls.pyc differ diff --git a/firewall/views.pyc b/firewall/views.pyc index e1d1c9a8d..427e075fb 100644 Binary files a/firewall/views.pyc and b/firewall/views.pyc differ diff --git a/ftp/__init__.pyc b/ftp/__init__.pyc index 3b0307776..d4609ae24 100644 Binary files a/ftp/__init__.pyc and b/ftp/__init__.pyc differ diff --git a/ftp/admin.pyc b/ftp/admin.pyc index 2c41f8807..c33a0295d 100644 Binary files a/ftp/admin.pyc and b/ftp/admin.pyc differ diff --git a/ftp/migrations/__init__.pyc b/ftp/migrations/__init__.pyc index 40ddc74bb..482016b39 100644 Binary files a/ftp/migrations/__init__.pyc and b/ftp/migrations/__init__.pyc differ diff --git a/ftp/models.pyc b/ftp/models.pyc index 82197fbb3..64b88c626 100644 Binary files a/ftp/models.pyc and b/ftp/models.pyc differ diff --git a/ftp/urls.pyc b/ftp/urls.pyc index e1ca8ae83..f0d1d1a4b 100644 Binary files a/ftp/urls.pyc and b/ftp/urls.pyc differ diff --git a/ftp/views.pyc b/ftp/views.pyc index 5c64aff9c..017b2b09c 100644 Binary files a/ftp/views.pyc and b/ftp/views.pyc differ diff --git a/loginSystem/__init__.pyc b/loginSystem/__init__.pyc index f34fbcc9a..f65734b59 100644 Binary files a/loginSystem/__init__.pyc and b/loginSystem/__init__.pyc differ diff --git a/loginSystem/admin.pyc b/loginSystem/admin.pyc index 2fcb94505..f852b0ed2 100644 Binary files a/loginSystem/admin.pyc and b/loginSystem/admin.pyc differ diff --git a/loginSystem/migrations/0001_initial.pyc b/loginSystem/migrations/0001_initial.pyc index bcfa14df2..c67ea2944 100644 Binary files a/loginSystem/migrations/0001_initial.pyc and b/loginSystem/migrations/0001_initial.pyc differ diff --git a/loginSystem/migrations/__init__.pyc b/loginSystem/migrations/__init__.pyc index 965fa4ff1..b5a1ee709 100644 Binary files a/loginSystem/migrations/__init__.pyc and b/loginSystem/migrations/__init__.pyc differ diff --git a/loginSystem/models.pyc b/loginSystem/models.pyc index f993c82fc..a0669655b 100644 Binary files a/loginSystem/models.pyc and b/loginSystem/models.pyc differ diff --git a/loginSystem/urls.pyc b/loginSystem/urls.pyc index a5ea8b29b..8056e138d 100644 Binary files a/loginSystem/urls.pyc and b/loginSystem/urls.pyc differ diff --git a/loginSystem/views.pyc b/loginSystem/views.pyc index 5ec9c7194..af9461c6d 100644 Binary files a/loginSystem/views.pyc and b/loginSystem/views.pyc differ diff --git a/mailServer/__init__.pyc b/mailServer/__init__.pyc index 3ce350372..49c4c226a 100644 Binary files a/mailServer/__init__.pyc and b/mailServer/__init__.pyc differ diff --git a/mailServer/admin.pyc b/mailServer/admin.pyc index e2e03cd12..467828123 100644 Binary files a/mailServer/admin.pyc and b/mailServer/admin.pyc differ diff --git a/mailServer/migrations/__init__.pyc b/mailServer/migrations/__init__.pyc index 31aac23e9..f3eb34c36 100644 Binary files a/mailServer/migrations/__init__.pyc and b/mailServer/migrations/__init__.pyc differ diff --git a/mailServer/models.pyc b/mailServer/models.pyc index 7b775aee1..3d8d40b5d 100644 Binary files a/mailServer/models.pyc and b/mailServer/models.pyc differ diff --git a/mailServer/urls.pyc b/mailServer/urls.pyc index f1d7ad666..899cf1cf5 100644 Binary files a/mailServer/urls.pyc and b/mailServer/urls.pyc differ diff --git a/mailServer/views.pyc b/mailServer/views.pyc index fc8fe48b0..6a2bda211 100644 Binary files a/mailServer/views.pyc and b/mailServer/views.pyc differ diff --git a/managePHP/__init__.pyc b/managePHP/__init__.pyc index 25fdf43a5..6142ce7e2 100644 Binary files a/managePHP/__init__.pyc and b/managePHP/__init__.pyc differ diff --git a/managePHP/admin.pyc b/managePHP/admin.pyc index 530c4b36c..272a18a6d 100644 Binary files a/managePHP/admin.pyc and b/managePHP/admin.pyc differ diff --git a/managePHP/migrations/__init__.pyc b/managePHP/migrations/__init__.pyc index 323713ea4..4bf69cd59 100644 Binary files a/managePHP/migrations/__init__.pyc and b/managePHP/migrations/__init__.pyc differ diff --git a/managePHP/models.pyc b/managePHP/models.pyc index 0ce1c74df..ea173e711 100644 Binary files a/managePHP/models.pyc and b/managePHP/models.pyc differ diff --git a/managePHP/urls.pyc b/managePHP/urls.pyc index 317b1c113..f35ed5a1b 100644 Binary files a/managePHP/urls.pyc and b/managePHP/urls.pyc differ diff --git a/managePHP/views.pyc b/managePHP/views.pyc index 08efeb6ba..a569628d7 100644 Binary files a/managePHP/views.pyc and b/managePHP/views.pyc differ diff --git a/manageSSL/__init__.pyc b/manageSSL/__init__.pyc index 51d57608d..9919c9f70 100644 Binary files a/manageSSL/__init__.pyc and b/manageSSL/__init__.pyc differ diff --git a/manageSSL/admin.pyc b/manageSSL/admin.pyc index ae48dd7c0..3fe69d414 100644 Binary files a/manageSSL/admin.pyc and b/manageSSL/admin.pyc differ diff --git a/manageSSL/migrations/__init__.pyc b/manageSSL/migrations/__init__.pyc index f6a4b5090..12eee2e88 100644 Binary files a/manageSSL/migrations/__init__.pyc and b/manageSSL/migrations/__init__.pyc differ diff --git a/manageSSL/models.pyc b/manageSSL/models.pyc index 8e96a7b21..771436811 100644 Binary files a/manageSSL/models.pyc and b/manageSSL/models.pyc differ diff --git a/manageSSL/urls.pyc b/manageSSL/urls.pyc index b92b185a8..32a689055 100644 Binary files a/manageSSL/urls.pyc and b/manageSSL/urls.pyc differ diff --git a/manageSSL/views.pyc b/manageSSL/views.pyc index b38686a93..727631353 100644 Binary files a/manageSSL/views.pyc and b/manageSSL/views.pyc differ diff --git a/packages/__init__.pyc b/packages/__init__.pyc index 46becf9f3..608d3b0df 100644 Binary files a/packages/__init__.pyc and b/packages/__init__.pyc differ diff --git a/packages/admin.pyc b/packages/admin.pyc index 8de82412a..5cc47c1e5 100644 Binary files a/packages/admin.pyc and b/packages/admin.pyc differ diff --git a/packages/migrations/0001_initial.pyc b/packages/migrations/0001_initial.pyc index ebd459357..4f7fbca7c 100644 Binary files a/packages/migrations/0001_initial.pyc and b/packages/migrations/0001_initial.pyc differ diff --git a/packages/migrations/__init__.pyc b/packages/migrations/__init__.pyc index a6f84aa66..c369aa4bf 100644 Binary files a/packages/migrations/__init__.pyc and b/packages/migrations/__init__.pyc differ diff --git a/packages/models.pyc b/packages/models.pyc index f18474426..1bf311c4e 100644 Binary files a/packages/models.pyc and b/packages/models.pyc differ diff --git a/packages/urls.pyc b/packages/urls.pyc index 5cca1dbae..1384b0489 100644 Binary files a/packages/urls.pyc and b/packages/urls.pyc differ diff --git a/packages/views.pyc b/packages/views.pyc index 9bdf17e00..2d2208a87 100644 Binary files a/packages/views.pyc and b/packages/views.pyc differ diff --git a/plogical/CyberCPLogFileWriter.pyc b/plogical/CyberCPLogFileWriter.pyc index 31c31319a..c5984f202 100644 Binary files a/plogical/CyberCPLogFileWriter.pyc and b/plogical/CyberCPLogFileWriter.pyc differ diff --git a/plogical/__init__.pyc b/plogical/__init__.pyc index 8c64080f5..dec0bc6d2 100644 Binary files a/plogical/__init__.pyc and b/plogical/__init__.pyc differ diff --git a/plogical/backupUtilities.pyc b/plogical/backupUtilities.pyc index a13bb82ed..dbe57d8bd 100644 Binary files a/plogical/backupUtilities.pyc and b/plogical/backupUtilities.pyc differ diff --git a/plogical/dnsUtilities.pyc b/plogical/dnsUtilities.pyc index 0b8460b06..e23d8ac48 100644 Binary files a/plogical/dnsUtilities.pyc and b/plogical/dnsUtilities.pyc differ diff --git a/plogical/firewallUtilities.pyc b/plogical/firewallUtilities.pyc index 955deca7c..49e8fc4eb 100644 Binary files a/plogical/firewallUtilities.pyc and b/plogical/firewallUtilities.pyc differ diff --git a/plogical/getSystemInformation.pyc b/plogical/getSystemInformation.pyc index 5bd140cb1..68e556a41 100644 Binary files a/plogical/getSystemInformation.pyc and b/plogical/getSystemInformation.pyc differ diff --git a/plogical/hashPassword.pyc b/plogical/hashPassword.pyc index 9829f4f2c..d4bdf751d 100644 Binary files a/plogical/hashPassword.pyc and b/plogical/hashPassword.pyc differ diff --git a/plogical/installUtilities.pyc b/plogical/installUtilities.pyc index 4e80c0ee3..af8e3b5aa 100644 Binary files a/plogical/installUtilities.pyc and b/plogical/installUtilities.pyc differ diff --git a/plogical/mysqlUtilities.pyc b/plogical/mysqlUtilities.pyc index 2c5808d0e..42df0f4ae 100644 Binary files a/plogical/mysqlUtilities.pyc and b/plogical/mysqlUtilities.pyc differ diff --git a/plogical/phpUtilities.pyc b/plogical/phpUtilities.pyc index 76ec6a5b3..0aaa4ef33 100644 Binary files a/plogical/phpUtilities.pyc and b/plogical/phpUtilities.pyc differ diff --git a/plogical/processUtilities.pyc b/plogical/processUtilities.pyc index 5b7271d5b..e2ae36465 100644 Binary files a/plogical/processUtilities.pyc and b/plogical/processUtilities.pyc differ diff --git a/plogical/randomPassword.pyc b/plogical/randomPassword.pyc index c6a6e9698..d889e0881 100644 Binary files a/plogical/randomPassword.pyc and b/plogical/randomPassword.pyc differ diff --git a/plogical/sslUtilities.pyc b/plogical/sslUtilities.pyc index 4bc9958ee..1c0c28c56 100644 Binary files a/plogical/sslUtilities.pyc and b/plogical/sslUtilities.pyc differ diff --git a/plogical/test.py b/plogical/test.py index e69de29bb..3cd95373f 100644 --- a/plogical/test.py +++ b/plogical/test.py @@ -0,0 +1,29 @@ +import subprocess +import time + +class CyberCPLogFileWriter: + fileName = "/home/cyberpanel.net/public_html/hello.txt" + + @staticmethod + def writeToFile(message): + try: + file = open(CyberCPLogFileWriter.fileName,'a') + file.writelines("[" + time.strftime( + "%I-%M-%S-%a-%b-%Y") + "] "+ message + "\n") + file.close() + except IOError,msg: + return "Can not write to error file." + + @staticmethod + def readLastNFiles(numberOfLines,fileName): + try: + + lastFewLines = subprocess.check_output(["tail", "-n",str(numberOfLines),fileName]) + + return lastFewLines + + except subprocess.CalledProcessError,msg: + return "File was empty" + + +CyberCPLogFileWriter.writeToFile("Hello") \ No newline at end of file diff --git a/plogical/tuning.pyc b/plogical/tuning.pyc index 51f7d544a..f95a6bd3a 100644 Binary files a/plogical/tuning.pyc and b/plogical/tuning.pyc differ diff --git a/plogical/virtualHostUtilities.pyc b/plogical/virtualHostUtilities.pyc index d8228a086..8c7559fdc 100644 Binary files a/plogical/virtualHostUtilities.pyc and b/plogical/virtualHostUtilities.pyc differ diff --git a/serverLogs/__init__.pyc b/serverLogs/__init__.pyc index 21bea6a61..7010da2d8 100644 Binary files a/serverLogs/__init__.pyc and b/serverLogs/__init__.pyc differ diff --git a/serverLogs/admin.pyc b/serverLogs/admin.pyc index e05cc0449..fb494858d 100644 Binary files a/serverLogs/admin.pyc and b/serverLogs/admin.pyc differ diff --git a/serverLogs/migrations/__init__.pyc b/serverLogs/migrations/__init__.pyc index 42443eead..8721b43c2 100644 Binary files a/serverLogs/migrations/__init__.pyc and b/serverLogs/migrations/__init__.pyc differ diff --git a/serverLogs/models.pyc b/serverLogs/models.pyc index 3bbd57612..8905b554e 100644 Binary files a/serverLogs/models.pyc and b/serverLogs/models.pyc differ diff --git a/serverLogs/urls.pyc b/serverLogs/urls.pyc index 964bbf448..7167ff0c8 100644 Binary files a/serverLogs/urls.pyc and b/serverLogs/urls.pyc differ diff --git a/serverLogs/views.pyc b/serverLogs/views.pyc index 5ca840732..943c0fd5a 100644 Binary files a/serverLogs/views.pyc and b/serverLogs/views.pyc differ diff --git a/serverStatus/__init__.pyc b/serverStatus/__init__.pyc index 51f6321c3..ab306a8b6 100644 Binary files a/serverStatus/__init__.pyc and b/serverStatus/__init__.pyc differ diff --git a/serverStatus/admin.pyc b/serverStatus/admin.pyc index 0bc398510..d3b09cb22 100644 Binary files a/serverStatus/admin.pyc and b/serverStatus/admin.pyc differ diff --git a/serverStatus/migrations/__init__.pyc b/serverStatus/migrations/__init__.pyc index d34242a28..dc2fe1626 100644 Binary files a/serverStatus/migrations/__init__.pyc and b/serverStatus/migrations/__init__.pyc differ diff --git a/serverStatus/models.pyc b/serverStatus/models.pyc index ec166d1f8..3e99fa5f0 100644 Binary files a/serverStatus/models.pyc and b/serverStatus/models.pyc differ diff --git a/serverStatus/urls.pyc b/serverStatus/urls.pyc index 9430f68f7..17fd13b11 100644 Binary files a/serverStatus/urls.pyc and b/serverStatus/urls.pyc differ diff --git a/serverStatus/views.pyc b/serverStatus/views.pyc index 25a53e317..2e55a2511 100644 Binary files a/serverStatus/views.pyc and b/serverStatus/views.pyc differ diff --git a/static/images/icons/repeat.png b/static/images/icons/repeat.png new file mode 100644 index 000000000..a5b7bcfdb Binary files /dev/null and b/static/images/icons/repeat.png differ diff --git a/static/websiteFunctions/websiteFunctions.js b/static/websiteFunctions/websiteFunctions.js index fd76ef0fb..159e19277 100644 --- a/static/websiteFunctions/websiteFunctions.js +++ b/static/websiteFunctions/websiteFunctions.js @@ -2074,7 +2074,8 @@ app.controller('suspendWebsiteControl', function($scope,$http) { /* Java script code to suspend/un-suspend ends here */ -/* Java script code to manage cron ends here */ + +/* Java script code to manage cron */ app.controller('manageCronController', function($scope,$http) { $("#manageCronLoading").hide(); @@ -2082,11 +2083,11 @@ app.controller('manageCronController', function($scope,$http) { $("#cronTable").hide(); $("#saveCronButton").hide(); $("#addCronButton").hide(); - + $("#addCronFailure").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); - + $scope.fetchWebsites = function(){ $("#manageCronLoading").show(); @@ -2109,7 +2110,7 @@ app.controller('manageCronController', function($scope,$http) { $http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas); function ListInitialDatas(response) { - if (response.data.getWebsiteCron == 0) + if (response.data.getWebsiteCron === 0) { console.log(response.data); $scope.errorMessage = response.data.error_message; @@ -2138,7 +2139,7 @@ app.controller('manageCronController', function($scope,$http) { $("#cronEditSuccess").hide(); } }; - + $scope.fetchCron = function(cronLine){ $("#cronTable").show(); @@ -2146,14 +2147,14 @@ app.controller('manageCronController', function($scope,$http) { $("#modifyCronForm").show(); $("#saveCronButton").show(); $("#addCronButton").hide(); - + $("#addCronFailure").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); - + $scope.line = cronLine; console.log($scope.line); - + var websiteToBeModified = $scope.websiteToBeModified; url = "/websites/getCronbyLine"; var data = { @@ -2171,7 +2172,7 @@ app.controller('manageCronController', function($scope,$http) { function ListInitialDatas(response) { console.log(response); - if (response.data.getWebsiteCron == 0) + if (response.data.getWebsiteCron === 0) { console.log(response.data); $scope.errorMessage = response.data.error_message; @@ -2207,7 +2208,7 @@ app.controller('manageCronController', function($scope,$http) { $("#cronEditSuccess").hide(); } }; - + $scope.populate = function(){ splitTime = $scope.defined.split(" "); $scope.minute = splitTime[0]; @@ -2216,9 +2217,9 @@ app.controller('manageCronController', function($scope,$http) { $scope.month = splitTime[3]; $scope.weekday = splitTime[4]; } - + $scope.addCronForm = function(){ - + $("#addCronFailure").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); @@ -2226,10 +2227,10 @@ app.controller('manageCronController', function($scope,$http) { if (!$scope.websiteToBeModified) { alert("Please select a domain first"); } - else + else { $scope.minute = $scope.hour = $scope.monthday = $scope.month = $scope.weekday = $scope.command = $scope.line = ""; - + $("#cronTable").hide(); $("#manageCronLoading").hide(); $("#modifyCronForm").show(); @@ -2237,17 +2238,16 @@ app.controller('manageCronController', function($scope,$http) { $("#addCronButton").show(); } }; - + $scope.addCronFunc = function(){ $("#manageCronLoading").show(); - $scope.errorMessage = "test1"; $("#addCronFailure").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); - + var websiteToBeModified = $scope.websiteToBeModified; - + url = "/websites/addNewCron"; var data = { domain : websiteToBeModified, @@ -2269,20 +2269,15 @@ app.controller('manageCronController', function($scope,$http) { function ListInitialDatas(response) { console.log(response); - if (response.data.addNewCron == 0) + if (response.data.addNewCron === 0) { - console.log(response.data) - $scope.errorMessage = response.data.error_message; - console.log($scope.errorMessage) - $scope.errorMessage = "test2"; - console.log(response.data.error_message) + $scope.errorMessage = response.data.error_message $("#manageCronLoading").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); $("#addCronFailure").show(); } else{ - console.log(response.data); $("#cronTable").hide(); $("#manageCronLoading").hide(); $("#cronEditSuccess").show(); @@ -2298,16 +2293,16 @@ app.controller('manageCronController', function($scope,$http) { $("#fetchCronFailure").hide(); } }; - - + + $scope.removeCron = function(line){ $("#manageCronLoading").show(); - + $("#addCronFailure").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); - + url = "/websites/remCronbyLine"; var data = { domain : $scope.websiteToBeModified, @@ -2324,9 +2319,8 @@ app.controller('manageCronController', function($scope,$http) { function ListInitialDatas(response) { console.log(response); - if (response.data.remCronbyLine == 0) + if (response.data.remCronbyLine === 0) { - console.log(response.data) $scope.errorMessage = response.data.error_message; $("#manageCronLoading").hide(); $("#cronEditSuccess").hide(); @@ -2334,7 +2328,6 @@ app.controller('manageCronController', function($scope,$http) { $("#addCronFailure").show(); } else{ - console.log(response.data); $("#cronTable").hide(); $("#manageCronLoading").hide(); $("#cronEditSuccess").show(); @@ -2350,16 +2343,16 @@ app.controller('manageCronController', function($scope,$http) { $("#fetchCronFailure").hide(); } }; - + $scope.modifyCronFunc = function(){ $("#manageCronLoading").show(); $("#addCronFailure").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); - + var websiteToBeModified = $scope.websiteToBeModified; - + url = "/websites/saveCronChanges"; var data = { domain : websiteToBeModified, @@ -2380,11 +2373,10 @@ app.controller('manageCronController', function($scope,$http) { $http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas); function ListInitialDatas(response) { - console.log(response); - if (response.data.addNewCron == 0) + if (response.data.addNewCron === 0) { - console.log(response.data) + $scope.errorMessage = response.data.error_message; $("#manageCronLoading").hide(); $("#cronEditSuccess").hide(); @@ -2408,7 +2400,7 @@ app.controller('manageCronController', function($scope,$http) { $("#fetchCronFailure").hide(); } }; - + }); diff --git a/tuning/__init__.pyc b/tuning/__init__.pyc index 512819b1a..4d8b43840 100644 Binary files a/tuning/__init__.pyc and b/tuning/__init__.pyc differ diff --git a/tuning/admin.pyc b/tuning/admin.pyc index f83c4fc59..6f8b7d940 100644 Binary files a/tuning/admin.pyc and b/tuning/admin.pyc differ diff --git a/tuning/migrations/__init__.pyc b/tuning/migrations/__init__.pyc index 882d51aa3..34fcfc8dd 100644 Binary files a/tuning/migrations/__init__.pyc and b/tuning/migrations/__init__.pyc differ diff --git a/tuning/models.pyc b/tuning/models.pyc index e178de1f2..ac6770294 100644 Binary files a/tuning/models.pyc and b/tuning/models.pyc differ diff --git a/tuning/urls.pyc b/tuning/urls.pyc index f9f7f02c6..32ec086e9 100644 Binary files a/tuning/urls.pyc and b/tuning/urls.pyc differ diff --git a/tuning/views.pyc b/tuning/views.pyc index 9e838bee4..ea2d82dcf 100644 Binary files a/tuning/views.pyc and b/tuning/views.pyc differ diff --git a/userManagment/__init__.pyc b/userManagment/__init__.pyc index 79303648b..932555a1f 100644 Binary files a/userManagment/__init__.pyc and b/userManagment/__init__.pyc differ diff --git a/userManagment/admin.pyc b/userManagment/admin.pyc index 0c98d7f1c..0f08cf20c 100644 Binary files a/userManagment/admin.pyc and b/userManagment/admin.pyc differ diff --git a/userManagment/migrations/__init__.pyc b/userManagment/migrations/__init__.pyc index c509d5be8..1dcc82500 100644 Binary files a/userManagment/migrations/__init__.pyc and b/userManagment/migrations/__init__.pyc differ diff --git a/userManagment/models.pyc b/userManagment/models.pyc index b8a242748..b8e025709 100644 Binary files a/userManagment/models.pyc and b/userManagment/models.pyc differ diff --git a/userManagment/urls.pyc b/userManagment/urls.pyc index cda7a23e3..ec2495aaf 100644 Binary files a/userManagment/urls.pyc and b/userManagment/urls.pyc differ diff --git a/userManagment/views.pyc b/userManagment/views.pyc index f8db01028..0d8fbf126 100644 Binary files a/userManagment/views.pyc and b/userManagment/views.pyc differ diff --git a/websiteFunctions/__init__.pyc b/websiteFunctions/__init__.pyc index cdaa8605d..6cdcdddf3 100644 Binary files a/websiteFunctions/__init__.pyc and b/websiteFunctions/__init__.pyc differ diff --git a/websiteFunctions/admin.pyc b/websiteFunctions/admin.pyc index bdf7c76e4..a7f1d7fa0 100644 Binary files a/websiteFunctions/admin.pyc and b/websiteFunctions/admin.pyc differ diff --git a/websiteFunctions/migrations/0001_initial.pyc b/websiteFunctions/migrations/0001_initial.pyc index 624f6b7c2..c286cf43f 100644 Binary files a/websiteFunctions/migrations/0001_initial.pyc and b/websiteFunctions/migrations/0001_initial.pyc differ diff --git a/websiteFunctions/migrations/__init__.pyc b/websiteFunctions/migrations/__init__.pyc index d15d5fa75..2b56a4eb8 100644 Binary files a/websiteFunctions/migrations/__init__.pyc and b/websiteFunctions/migrations/__init__.pyc differ diff --git a/websiteFunctions/models.pyc b/websiteFunctions/models.pyc index acb607e7b..adb24a2bb 100644 Binary files a/websiteFunctions/models.pyc and b/websiteFunctions/models.pyc differ diff --git a/websiteFunctions/static/images/icons/repeat.png b/websiteFunctions/static/images/icons/repeat.png new file mode 100644 index 000000000..a5b7bcfdb Binary files /dev/null and b/websiteFunctions/static/images/icons/repeat.png differ diff --git a/websiteFunctions/static/websiteFunctions/websiteFunctions.js b/websiteFunctions/static/websiteFunctions/websiteFunctions.js index fd76ef0fb..159e19277 100644 --- a/websiteFunctions/static/websiteFunctions/websiteFunctions.js +++ b/websiteFunctions/static/websiteFunctions/websiteFunctions.js @@ -2074,7 +2074,8 @@ app.controller('suspendWebsiteControl', function($scope,$http) { /* Java script code to suspend/un-suspend ends here */ -/* Java script code to manage cron ends here */ + +/* Java script code to manage cron */ app.controller('manageCronController', function($scope,$http) { $("#manageCronLoading").hide(); @@ -2082,11 +2083,11 @@ app.controller('manageCronController', function($scope,$http) { $("#cronTable").hide(); $("#saveCronButton").hide(); $("#addCronButton").hide(); - + $("#addCronFailure").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); - + $scope.fetchWebsites = function(){ $("#manageCronLoading").show(); @@ -2109,7 +2110,7 @@ app.controller('manageCronController', function($scope,$http) { $http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas); function ListInitialDatas(response) { - if (response.data.getWebsiteCron == 0) + if (response.data.getWebsiteCron === 0) { console.log(response.data); $scope.errorMessage = response.data.error_message; @@ -2138,7 +2139,7 @@ app.controller('manageCronController', function($scope,$http) { $("#cronEditSuccess").hide(); } }; - + $scope.fetchCron = function(cronLine){ $("#cronTable").show(); @@ -2146,14 +2147,14 @@ app.controller('manageCronController', function($scope,$http) { $("#modifyCronForm").show(); $("#saveCronButton").show(); $("#addCronButton").hide(); - + $("#addCronFailure").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); - + $scope.line = cronLine; console.log($scope.line); - + var websiteToBeModified = $scope.websiteToBeModified; url = "/websites/getCronbyLine"; var data = { @@ -2171,7 +2172,7 @@ app.controller('manageCronController', function($scope,$http) { function ListInitialDatas(response) { console.log(response); - if (response.data.getWebsiteCron == 0) + if (response.data.getWebsiteCron === 0) { console.log(response.data); $scope.errorMessage = response.data.error_message; @@ -2207,7 +2208,7 @@ app.controller('manageCronController', function($scope,$http) { $("#cronEditSuccess").hide(); } }; - + $scope.populate = function(){ splitTime = $scope.defined.split(" "); $scope.minute = splitTime[0]; @@ -2216,9 +2217,9 @@ app.controller('manageCronController', function($scope,$http) { $scope.month = splitTime[3]; $scope.weekday = splitTime[4]; } - + $scope.addCronForm = function(){ - + $("#addCronFailure").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); @@ -2226,10 +2227,10 @@ app.controller('manageCronController', function($scope,$http) { if (!$scope.websiteToBeModified) { alert("Please select a domain first"); } - else + else { $scope.minute = $scope.hour = $scope.monthday = $scope.month = $scope.weekday = $scope.command = $scope.line = ""; - + $("#cronTable").hide(); $("#manageCronLoading").hide(); $("#modifyCronForm").show(); @@ -2237,17 +2238,16 @@ app.controller('manageCronController', function($scope,$http) { $("#addCronButton").show(); } }; - + $scope.addCronFunc = function(){ $("#manageCronLoading").show(); - $scope.errorMessage = "test1"; $("#addCronFailure").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); - + var websiteToBeModified = $scope.websiteToBeModified; - + url = "/websites/addNewCron"; var data = { domain : websiteToBeModified, @@ -2269,20 +2269,15 @@ app.controller('manageCronController', function($scope,$http) { function ListInitialDatas(response) { console.log(response); - if (response.data.addNewCron == 0) + if (response.data.addNewCron === 0) { - console.log(response.data) - $scope.errorMessage = response.data.error_message; - console.log($scope.errorMessage) - $scope.errorMessage = "test2"; - console.log(response.data.error_message) + $scope.errorMessage = response.data.error_message $("#manageCronLoading").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); $("#addCronFailure").show(); } else{ - console.log(response.data); $("#cronTable").hide(); $("#manageCronLoading").hide(); $("#cronEditSuccess").show(); @@ -2298,16 +2293,16 @@ app.controller('manageCronController', function($scope,$http) { $("#fetchCronFailure").hide(); } }; - - + + $scope.removeCron = function(line){ $("#manageCronLoading").show(); - + $("#addCronFailure").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); - + url = "/websites/remCronbyLine"; var data = { domain : $scope.websiteToBeModified, @@ -2324,9 +2319,8 @@ app.controller('manageCronController', function($scope,$http) { function ListInitialDatas(response) { console.log(response); - if (response.data.remCronbyLine == 0) + if (response.data.remCronbyLine === 0) { - console.log(response.data) $scope.errorMessage = response.data.error_message; $("#manageCronLoading").hide(); $("#cronEditSuccess").hide(); @@ -2334,7 +2328,6 @@ app.controller('manageCronController', function($scope,$http) { $("#addCronFailure").show(); } else{ - console.log(response.data); $("#cronTable").hide(); $("#manageCronLoading").hide(); $("#cronEditSuccess").show(); @@ -2350,16 +2343,16 @@ app.controller('manageCronController', function($scope,$http) { $("#fetchCronFailure").hide(); } }; - + $scope.modifyCronFunc = function(){ $("#manageCronLoading").show(); $("#addCronFailure").hide(); $("#cronEditSuccess").hide(); $("#fetchCronFailure").hide(); - + var websiteToBeModified = $scope.websiteToBeModified; - + url = "/websites/saveCronChanges"; var data = { domain : websiteToBeModified, @@ -2380,11 +2373,10 @@ app.controller('manageCronController', function($scope,$http) { $http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas); function ListInitialDatas(response) { - console.log(response); - if (response.data.addNewCron == 0) + if (response.data.addNewCron === 0) { - console.log(response.data) + $scope.errorMessage = response.data.error_message; $("#manageCronLoading").hide(); $("#cronEditSuccess").hide(); @@ -2408,7 +2400,7 @@ app.controller('manageCronController', function($scope,$http) { $("#fetchCronFailure").hide(); } }; - + }); diff --git a/websiteFunctions/templates/websiteFunctions/listCron.html b/websiteFunctions/templates/websiteFunctions/listCron.html index 9908f6e8b..452926467 100644 --- a/websiteFunctions/templates/websiteFunctions/listCron.html +++ b/websiteFunctions/templates/websiteFunctions/listCron.html @@ -7,10 +7,10 @@ {% get_current_language as LANGUAGE_CODE %} -
+

{% trans "Cron Management" %}

-

{% trans "Create, edit or delete your cron from this page." %}

+

{% trans "Create, edit or delete your cron jobs from this page." %}

@@ -21,7 +21,7 @@
-
+
@@ -149,20 +149,18 @@ {{ messger }}
-

{% trans "Cannot fetch website details. Error message:" %} {{ errorMessage }}

+

{% trans "Cannot fetch website details. Error message:" %} {$ errorMessage $}

-

{% trans "Unable to add/save Cron. Error message:" %} {{ errorMessage }}

+

{% trans "Unable to add/save Cron. Error message:" %} {$ errorMessage $}

{% trans "Cron job saved" %}

- - -
+
diff --git a/websiteFunctions/templates/websiteFunctions/website.html b/websiteFunctions/templates/websiteFunctions/website.html index c844d82c6..01f59b4a8 100644 --- a/websiteFunctions/templates/websiteFunctions/website.html +++ b/websiteFunctions/templates/websiteFunctions/website.html @@ -16,13 +16,18 @@ {% if not error %} -
-
-

- {% trans "Resource Usage" %} -

-
-
+ +
+ +
+ +

+ {% trans "Resource Usage" %} +

+ + +
+
@@ -97,9 +102,11 @@ - - - + + + + + @@ -250,7 +257,7 @@
-
+
@@ -261,7 +268,7 @@
-
+
@@ -272,6 +279,17 @@
+ + + diff --git a/websiteFunctions/urls.py b/websiteFunctions/urls.py index ab908357a..bb792c247 100644 --- a/websiteFunctions/urls.py +++ b/websiteFunctions/urls.py @@ -56,8 +56,9 @@ urlpatterns = [ url(r'^fetchDomains', views.fetchDomains, name='submitDomainCreation'), url(r'^changePHP', views.changePHP, name='changePHP'), url(r'^submitDomainDeletion', views.submitDomainDeletion, name='submitDomainDeletion'), - + # crons + url(r'^listCron',views.listCron,name="listCron"), url(r'^getWebsiteCron',views.getWebsiteCron,name="getWebsiteCron"), url(r'^getCronbyLine',views.getCronbyLine,name="getCronbyLine"), diff --git a/websiteFunctions/urls.pyc b/websiteFunctions/urls.pyc index 144606375..3f3ffd8a3 100644 Binary files a/websiteFunctions/urls.pyc and b/websiteFunctions/urls.pyc differ diff --git a/websiteFunctions/views.py b/websiteFunctions/views.py index 132e496d3..126fc335b 100644 --- a/websiteFunctions/views.py +++ b/websiteFunctions/views.py @@ -37,480 +37,7 @@ def loadWebsitesHome(request): except KeyError: return redirect(loadLoginPage) -def listCron(request): - try: - val = request.session['userID'] - try: - admin = Administrator.objects.get(pk=request.session['userID']) - if admin.type == 1: - websites = Websites.objects.all() - websitesName = [] - - for items in websites: - websitesName.append(items.domain) - else: - if admin.type == 2: - websites = admin.websites_set.all() - admins = Administrator.objects.filter(owner=admin.pk) - websitesName = [] - - for items in websites: - websitesName.append(items.domain) - - for items in admins: - webs = items.websites_set.all() - - for web in webs: - websitesName.append(web.domain) - else: - websitesName = [] - websites = Websites.objects.filter(admin=admin) - for items in websites: - websitesName.append(items.domain) - - return render(request, 'websiteFunctions/listCron.html', {'websiteList':websitesName}) - except BaseException, msg: - logging.CyberCPLogFileWriter.writeToFile(str(msg)) - return HttpResponse(str(msg)) - except KeyError: - return redirect(loadLoginPage) - - - -def getWebsiteCron(request): - try: - val = request.session['userID'] - if request.method == 'POST': - try: - - data = json.loads(request.body) - domain = data['domain'] - - admin = Administrator.objects.get(pk=request.session['userID']) - website = Websites.objects.get(domain=domain) - - if Websites.objects.filter(domain=domain).exists(): - pass - else: - dic = {'getWebsiteCron': 0, 'error_message': 'You do not own this domain'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - if admin.type != 1: - website = Websites.objects.get(domain=domain) - if website.admin != admin: - dic = {'getWebsiteCron': 0, 'error_message': 'You do not own this domain'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - cronPath = "/var/spool/cron/" + website.externalApp - cmd = 'sudo test -e '+cronPath+' && echo Exists' - output = os.popen(cmd).read() - - if "Exists" not in output: - data_ret = {'getWebsiteCron': 1, "user": website.externalApp, "crons":{}} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - - cronPath = "/var/spool/cron/" + website.externalApp - crons = [] - - try: - f = subprocess.check_output(["sudo","cat",cronPath]) - print f - except subprocess.CalledProcessError as error: - dic = {'getWebsiteCron': 0, 'error_message': 'Unable to access Cron file'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - counter = 0 - for line in f.split("\n"): - if line: - split = line.split(" ", 5) - print line - print split - if len(split) == 6: - counter += 1 - crons.append({"line" : counter, - "minute" : split[0], - "hour" : split[1], - "monthday": split[2], - "month" : split[3], - "weekday" : split[4], - "command" : split[5]}) - - print json.dumps(crons) - - data_ret = {'getWebsiteCron': 1, "user": website.externalApp, "crons":crons} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - except BaseException,msg: - print msg - dic = {'getWebsiteCron': 0, 'error_message': str(msg)} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - except KeyError, msg: - status = {"getWebsiteCron":0,"error":"Not Logged in as admin"} - final_json = json.dumps(status) - return HttpResponse(final_json) - -def getCronbyLine(request): - try: - val = request.session['userID'] - if request.method == 'POST': - try: - - data = json.loads(request.body) - domain = data['domain'] - line = data['line'] - - line -= 1 - admin = Administrator.objects.get(pk=request.session['userID']) - website = Websites.objects.get(domain=domain) - - if Websites.objects.filter(domain=domain).exists(): - pass - else: - dic = {'getWebsiteCron': 0, 'error_message': 'You do not own this domain'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - if admin.type == 1: - pass - else: - website = Websites.objects.get(domain=domain) - if website.admin == admin: - pass - else: - dic = {'getWebsiteCron': 0, 'error_message': 'You do not own this domain'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - cronPath = "/var/spool/cron/" + website.externalApp - crons = [] - - try: - f = subprocess.check_output(["sudo","cat",cronPath]) - print f - except subprocess.CalledProcessError as error: - dic = {'getWebsiteCron': 0, 'error_message': 'Unable to access Cron file'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - f = f.split("\n") - cron = f[line] - - if not cron: - dic = {'getWebsiteCron': 0, 'error_message':'Cron line empty'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - cron = cron.split(" ", 5) - if len(cron) != 6: - dic = {'getWebsiteCron': 0, 'error_message':'Cron line incorrect'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - - data_ret = {"getWebsiteCron": 1, - "user": website.externalApp, - "cron":{ - "minute":cron[0], - "hour":cron[1], - "monthday":cron[2], - "month":cron[3], - "weekday":cron[4], - "command":cron[5], - }, - "line":line} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - except BaseException,msg: - print msg - dic = {'getWebsiteCron': 0, 'error_message': str(msg)} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - except KeyError, msg: - status = {"getWebsiteCron":0,"error":"Not Logged in"} - final_json = json.dumps(status) - return HttpResponse(final_json) - -def saveCronChanges(request): - try: - val = request.session['userID'] - if request.method == 'POST': - try: - - data = json.loads(request.body) - domain = data['domain'] - line = data['line'] - - minute = data['minute'] - hour = data['hour'] - monthday = data['monthday'] - month = data['month'] - weekday = data['weekday'] - command = data['command'] - - admin = Administrator.objects.get(pk=request.session['userID']) - website = Websites.objects.get(domain=domain) - - if Websites.objects.filter(domain=domain).exists(): - pass - else: - dic = {'getWebsiteCron': 0, 'error_message': 'You do not own this domain'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - if admin.type == 1: - pass - else: - website = Websites.objects.get(domain=domain) - if website.admin == admin: - pass - else: - dic = {'getWebsiteCron': 0, 'error_message': 'You do not own this domain'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - cronPath = "/var/spool/cron/" + website.externalApp - tempPath = "/home/cyberpanel/" + website.externalApp + str(randint(10000,99999)) + ".cron.tmp" - - finalCron = "%s %s %s %s %s %s" % (minute, hour, monthday, month, weekday, command) - - o = subprocess.call(['sudo','cp',cronPath,tempPath]) - if o is not 0: - data_ret = {'addNewCron': 0, 'error_message': 'Unable to copy to temporary files'} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - - # Confirming that directory is read/writable - o = subprocess.call(['sudo','chown','cyberpanel:cyberpanel',tempPath]) - if o is not 0: - data_ret = {'addNewCron': 0, 'error_message': 'Error Changing Permissions'} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - - with open(tempPath, 'r') as file: - data = file.readlines() - - data[line] = finalCron+'\n' - - with open(tempPath, 'w') as file: - file.writelines( data ) - print 'test' - - output = subprocess.call(["sudo","/usr/bin/crontab", "-u", website.externalApp, tempPath]) - - os.remove(tempPath) - if output != 0: - data_ret = {'addNewCron': 0, 'error_message': 'Incorrect Syntax cannot be accepted'} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - - data_ret = {"getWebsiteCron": 1, - "user": website.externalApp, - "cron": finalCron, - "line":line} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - except BaseException,msg: - print msg - dic = {'getWebsiteCron': 0, 'error_message': str(msg)} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - except KeyError, msg: - status = {"getWebsiteCron":0,"error":"Not Logged in"} - final_json = json.dumps(status) - return HttpResponse(final_json) - -def remCronbyLine(request): - try: - val = request.session['userID'] - if request.method == 'POST': - try: - - data = json.loads(request.body) - domain = data['domain'] - line = data['line'] - - line -= 1 - - admin = Administrator.objects.get(pk=request.session['userID']) - website = Websites.objects.get(domain=domain) - - if Websites.objects.filter(domain=domain).exists(): - pass - else: - dic = {'remCronbyLine': 0, 'error_message': 'You do not own this domain'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - if admin.type == 1: - pass - else: - website = Websites.objects.get(domain=domain) - if website.admin == admin: - pass - else: - dic = {'remCronbyLine': 0, 'error_message': 'You do not own this domain'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - cronPath = "/var/spool/cron/" + website.externalApp - cmd = 'sudo test -e '+cronPath+' && echo Exists' - output = os.popen(cmd).read() - - if "Exists" not in output: - data_ret = {'remCronbyLine': 0, 'error_message': 'No Cron exists for this user'} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - - cronPath = "/var/spool/cron/" + website.externalApp - tempPath = "/home/cyberpanel/" + website.externalApp + str(randint(10000,99999)) + ".cron.tmp" - - o = subprocess.call(['sudo','cp',cronPath,tempPath]) - if o is not 0: - data_ret = {'addNewCron': 0, 'error_message': 'Unable to copy to temporary files'} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - - # Confirming that directory is read/writable - o = subprocess.call(['sudo','chown','cyberpanel:cyberpanel',tempPath]) - if o is not 0: - data_ret = {'addNewCron': 0, 'error_message': 'Error Changing Permissions'} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - - with open(tempPath, 'r') as file: - data = file.readlines() - - removedLine = data.pop(line) - - with open(tempPath, 'w') as file: - file.writelines( data ) - - output = subprocess.call(["sudo","/usr/bin/crontab", "-u", website.externalApp, tempPath]) - - os.remove(tempPath) - if output != 0: - data_ret = {'addNewCron': 0, 'error_message': 'Incorrect Syntax cannot be accepted'} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - - data_ret = {"remCronbyLine": 1, - "user": website.externalApp, - "removeLine": removedLine, - "line":line} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - except BaseException,msg: - print msg - dic = {'remCronbyLine': 0, 'error_message': str(msg)} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - except KeyError, msg: - status = {"remCronbyLine":0,"error":"Not Logged in"} - final_json = json.dumps(status) - return HttpResponse(final_json) - -def addNewCron(request): - try: - val = request.session['userID'] - if request.method == 'POST': - try: - - data = json.loads(request.body) - domain = data['domain'] - - minute = data['minute'] - hour = data['hour'] - monthday = data['monthday'] - month = data['month'] - weekday = data['weekday'] - command = data['command'] - - admin = Administrator.objects.get(pk=request.session['userID']) - website = Websites.objects.get(domain=domain) - - if Websites.objects.filter(domain=domain).exists(): - pass - else: - dic = {'addNewCron': 0, 'error_message': 'You do not own this domain'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - if admin.type != 1: - website = Websites.objects.get(domain=domain) - if website.admin == admin: - pass - else: - dic = {'addNewCron': 0, 'error_message': 'You do not own this domain'} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - cronPath = "/var/spool/cron/" + website.externalApp - cmd = 'sudo test -e '+cronPath+' && echo Exists' - output = os.popen(cmd).read() - - if "Exists" not in output: - echo = subprocess.Popen(('echo'), stdout=subprocess.PIPE) - output = subprocess.call(('sudo', 'crontab', '-u', website.externalApp, '-'), stdin=echo.stdout) - echo.wait() - echo.stdout.close() - # Confirmation - o = subprocess.call(["sudo","cp","/dev/null",cronPath]) - - cronPath = "/var/spool/cron/" + website.externalApp - tempPath = "/home/cyberpanel/" + website.externalApp + str(randint(10000,99999)) + ".cron.tmp" - - finalCron = "%s %s %s %s %s %s" % (minute, hour, monthday, month, weekday, command) - - o = subprocess.call(['sudo','cp',cronPath,tempPath]) - if o is not 0: - data_ret = {'addNewCron': 0, 'error_message': 'Unable to copy to temporary files'} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - - # Confirming that directory is read/writable - o = subprocess.call(['sudo','chown','cyberpanel:cyberpanel',tempPath]) - if o is not 0: - data_ret = {'addNewCron': 0, 'error_message': 'Error Changing Permissions'} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - - with open(tempPath, "a") as file: - file.write(finalCron+"\n") - - output = subprocess.call(["sudo","/usr/bin/crontab", "-u", website.externalApp, tempPath]) - - os.remove(tempPath) - if output != 0: - data_ret = {'addNewCron': 0, 'error_message': 'Incorrect Syntax cannot be accepted'} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - - data_ret = {"addNewCron": 1, - "user": website.externalApp, - "cron": finalCron} - final_json = json.dumps(data_ret) - return HttpResponse(final_json) - except BaseException,msg: - print msg - dic = {'addNewCron': 0, 'error_message': str(msg)} - json_data = json.dumps(dic) - return HttpResponse(json_data) - - except KeyError, msg: - status = {"addNewCron":0,"error":"Not Logged in"} - final_json = json.dumps(status) - return HttpResponse(final_json) - - def createWebsite(request): try: val = request.session['userID'] @@ -2356,4 +1883,480 @@ def CreateWebsiteFromBackup(request): except BaseException, msg: data_ret = {'createWebSiteStatus': 0, 'error_message': str(msg), "existsStatus": 0} json_data = json.dumps(data_ret) - return HttpResponse(json_data) \ No newline at end of file + return HttpResponse(json_data) + + +def listCron(request): + try: + val = request.session['userID'] + try: + admin = Administrator.objects.get(pk=request.session['userID']) + + if admin.type == 1: + websites = Websites.objects.all() + websitesName = [] + + for items in websites: + websitesName.append(items.domain) + else: + if admin.type == 2: + websites = admin.websites_set.all() + admins = Administrator.objects.filter(owner=admin.pk) + websitesName = [] + + for items in websites: + websitesName.append(items.domain) + + for items in admins: + webs = items.websites_set.all() + + for web in webs: + websitesName.append(web.domain) + else: + websitesName = [] + websites = Websites.objects.filter(admin=admin) + for items in websites: + websitesName.append(items.domain) + + return render(request, 'websiteFunctions/listCron.html', {'websiteList': websitesName}) + except BaseException, msg: + logging.CyberCPLogFileWriter.writeToFile(str(msg)) + return HttpResponse(str(msg)) + except KeyError: + return redirect(loadLoginPage) + + +def getWebsiteCron(request): + try: + val = request.session['userID'] + if request.method == 'POST': + try: + + data = json.loads(request.body) + domain = data['domain'] + + admin = Administrator.objects.get(pk=request.session['userID']) + website = Websites.objects.get(domain=domain) + + if Websites.objects.filter(domain=domain).exists(): + pass + else: + dic = {'getWebsiteCron': 0, 'error_message': 'You do not own this domain'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + if admin.type != 1: + website = Websites.objects.get(domain=domain) + if website.admin != admin: + dic = {'getWebsiteCron': 0, 'error_message': 'You do not own this domain'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + cronPath = "/var/spool/cron/" + website.externalApp + cmd = 'sudo test -e ' + cronPath + ' && echo Exists' + output = os.popen(cmd).read() + + if "Exists" not in output: + data_ret = {'getWebsiteCron': 1, "user": website.externalApp, "crons": {}} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + + cronPath = "/var/spool/cron/" + website.externalApp + crons = [] + + try: + f = subprocess.check_output(["sudo", "cat", cronPath]) + print f + except subprocess.CalledProcessError as error: + dic = {'getWebsiteCron': 0, 'error_message': 'Unable to access Cron file'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + counter = 0 + for line in f.split("\n"): + if line: + split = line.split(" ", 5) + print line + print split + if len(split) == 6: + counter += 1 + crons.append({"line": counter, + "minute": split[0], + "hour": split[1], + "monthday": split[2], + "month": split[3], + "weekday": split[4], + "command": split[5]}) + + print json.dumps(crons) + + data_ret = {'getWebsiteCron': 1, "user": website.externalApp, "crons": crons} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + except BaseException, msg: + print msg + dic = {'getWebsiteCron': 0, 'error_message': str(msg)} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + except KeyError, msg: + status = {"getWebsiteCron": 0, "error": "Not Logged in as admin"} + final_json = json.dumps(status) + return HttpResponse(final_json) + + +def getCronbyLine(request): + try: + val = request.session['userID'] + if request.method == 'POST': + try: + + data = json.loads(request.body) + domain = data['domain'] + line = data['line'] + + line -= 1 + admin = Administrator.objects.get(pk=request.session['userID']) + website = Websites.objects.get(domain=domain) + + if Websites.objects.filter(domain=domain).exists(): + pass + else: + dic = {'getWebsiteCron': 0, 'error_message': 'You do not own this domain'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + if admin.type == 1: + pass + else: + website = Websites.objects.get(domain=domain) + if website.admin == admin: + pass + else: + dic = {'getWebsiteCron': 0, 'error_message': 'You do not own this domain'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + cronPath = "/var/spool/cron/" + website.externalApp + crons = [] + + try: + f = subprocess.check_output(["sudo", "cat", cronPath]) + print f + except subprocess.CalledProcessError as error: + dic = {'getWebsiteCron': 0, 'error_message': 'Unable to access Cron file'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + f = f.split("\n") + cron = f[line] + + if not cron: + dic = {'getWebsiteCron': 0, 'error_message': 'Cron line empty'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + cron = cron.split(" ", 5) + if len(cron) != 6: + dic = {'getWebsiteCron': 0, 'error_message': 'Cron line incorrect'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + data_ret = {"getWebsiteCron": 1, + "user": website.externalApp, + "cron": { + "minute": cron[0], + "hour": cron[1], + "monthday": cron[2], + "month": cron[3], + "weekday": cron[4], + "command": cron[5], + }, + "line": line} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + except BaseException, msg: + print msg + dic = {'getWebsiteCron': 0, 'error_message': str(msg)} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + except KeyError, msg: + status = {"getWebsiteCron": 0, "error": "Not Logged in"} + final_json = json.dumps(status) + return HttpResponse(final_json) + + +def saveCronChanges(request): + try: + val = request.session['userID'] + if request.method == 'POST': + try: + + data = json.loads(request.body) + domain = data['domain'] + line = data['line'] + + minute = data['minute'] + hour = data['hour'] + monthday = data['monthday'] + month = data['month'] + weekday = data['weekday'] + command = data['command'] + + admin = Administrator.objects.get(pk=request.session['userID']) + website = Websites.objects.get(domain=domain) + + if Websites.objects.filter(domain=domain).exists(): + pass + else: + dic = {'getWebsiteCron': 0, 'error_message': 'You do not own this domain'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + if admin.type == 1: + pass + else: + website = Websites.objects.get(domain=domain) + if website.admin == admin: + pass + else: + dic = {'getWebsiteCron': 0, 'error_message': 'You do not own this domain'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + cronPath = "/var/spool/cron/" + website.externalApp + tempPath = "/home/cyberpanel/" + website.externalApp + str(randint(10000, 99999)) + ".cron.tmp" + + finalCron = "%s %s %s %s %s %s" % (minute, hour, monthday, month, weekday, command) + + o = subprocess.call(['sudo', 'cp', cronPath, tempPath]) + if o is not 0: + data_ret = {'addNewCron': 0, 'error_message': 'Unable to copy to temporary files'} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + + # Confirming that directory is read/writable + o = subprocess.call(['sudo', 'chown', 'cyberpanel:cyberpanel', tempPath]) + if o is not 0: + data_ret = {'addNewCron': 0, 'error_message': 'Error Changing Permissions'} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + + with open(tempPath, 'r') as file: + data = file.readlines() + + data[line] = finalCron + '\n' + + with open(tempPath, 'w') as file: + file.writelines(data) + print 'test' + + output = subprocess.call(["sudo", "/usr/bin/crontab", "-u", website.externalApp, tempPath]) + + os.remove(tempPath) + if output != 0: + data_ret = {'addNewCron': 0, 'error_message': 'Incorrect Syntax cannot be accepted.'} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + + data_ret = {"getWebsiteCron": 1, + "user": website.externalApp, + "cron": finalCron, + "line": line} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + except BaseException, msg: + print msg + dic = {'getWebsiteCron': 0, 'error_message': str(msg)} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + except KeyError, msg: + status = {"getWebsiteCron": 0, "error": "Not Logged in"} + final_json = json.dumps(status) + return HttpResponse(final_json) + + +def remCronbyLine(request): + try: + val = request.session['userID'] + if request.method == 'POST': + try: + + data = json.loads(request.body) + domain = data['domain'] + line = data['line'] + + line -= 1 + + admin = Administrator.objects.get(pk=request.session['userID']) + website = Websites.objects.get(domain=domain) + + if Websites.objects.filter(domain=domain).exists(): + pass + else: + dic = {'remCronbyLine': 0, 'error_message': 'You do not own this domain'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + if admin.type == 1: + pass + else: + website = Websites.objects.get(domain=domain) + if website.admin == admin: + pass + else: + dic = {'remCronbyLine': 0, 'error_message': 'You do not own this domain'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + cronPath = "/var/spool/cron/" + website.externalApp + cmd = 'sudo test -e ' + cronPath + ' && echo Exists' + output = os.popen(cmd).read() + + if "Exists" not in output: + data_ret = {'remCronbyLine': 0, 'error_message': 'No Cron exists for this user'} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + + cronPath = "/var/spool/cron/" + website.externalApp + tempPath = "/home/cyberpanel/" + website.externalApp + str(randint(10000, 99999)) + ".cron.tmp" + + o = subprocess.call(['sudo', 'cp', cronPath, tempPath]) + if o is not 0: + data_ret = {'addNewCron': 0, 'error_message': 'Unable to copy to temporary files'} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + + # Confirming that directory is read/writable + o = subprocess.call(['sudo', 'chown', 'cyberpanel:cyberpanel', tempPath]) + if o is not 0: + data_ret = {'addNewCron': 0, 'error_message': 'Error Changing Permissions'} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + + with open(tempPath, 'r') as file: + data = file.readlines() + + removedLine = data.pop(line) + + with open(tempPath, 'w') as file: + file.writelines(data) + + output = subprocess.call(["sudo", "/usr/bin/crontab", "-u", website.externalApp, tempPath]) + + os.remove(tempPath) + if output != 0: + data_ret = {'addNewCron': 0, 'error_message': 'Incorrect Syntax cannot be accepted'} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + + data_ret = {"remCronbyLine": 1, + "user": website.externalApp, + "removeLine": removedLine, + "line": line} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + except BaseException, msg: + print msg + dic = {'remCronbyLine': 0, 'error_message': str(msg)} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + except KeyError, msg: + status = {"remCronbyLine": 0, "error": "Not Logged in"} + final_json = json.dumps(status) + return HttpResponse(final_json) + + +def addNewCron(request): + try: + val = request.session['userID'] + if request.method == 'POST': + try: + + data = json.loads(request.body) + domain = data['domain'] + + minute = data['minute'] + hour = data['hour'] + monthday = data['monthday'] + month = data['month'] + weekday = data['weekday'] + command = data['command'] + + admin = Administrator.objects.get(pk=request.session['userID']) + website = Websites.objects.get(domain=domain) + + if Websites.objects.filter(domain=domain).exists(): + pass + else: + dic = {'addNewCron': 0, 'error_message': 'You do not own this domain'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + if admin.type != 1: + website = Websites.objects.get(domain=domain) + if website.admin == admin: + pass + else: + dic = {'addNewCron': 0, 'error_message': 'You do not own this domain'} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + cronPath = "/var/spool/cron/" + website.externalApp + cmd = 'sudo test -e ' + cronPath + ' && echo Exists' + output = os.popen(cmd).read() + + if "Exists" not in output: + echo = subprocess.Popen(('echo'), stdout=subprocess.PIPE) + output = subprocess.call(('sudo', 'crontab', '-u', website.externalApp, '-'), stdin=echo.stdout) + echo.wait() + echo.stdout.close() + # Confirmation + o = subprocess.call(["sudo", "cp", "/dev/null", cronPath]) + + cronPath = "/var/spool/cron/" + website.externalApp + tempPath = "/home/cyberpanel/" + website.externalApp + str(randint(10000, 99999)) + ".cron.tmp" + + finalCron = "%s %s %s %s %s %s" % (minute, hour, monthday, month, weekday, command) + + o = subprocess.call(['sudo', 'cp', cronPath, tempPath]) + if o is not 0: + data_ret = {'addNewCron': 0, 'error_message': 'Unable to copy to temporary files'} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + + # Confirming that directory is read/writable + o = subprocess.call(['sudo', 'chown', 'cyberpanel:cyberpanel', tempPath]) + if o is not 0: + data_ret = {'addNewCron': 0, 'error_message': 'Error Changing Permissions'} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + + with open(tempPath, "a") as file: + file.write(finalCron + "\n") + + output = subprocess.call(["sudo", "/usr/bin/crontab", "-u", website.externalApp, tempPath]) + + os.remove(tempPath) + if output != 0: + data_ret = {'addNewCron': 0, 'error_message': 'Incorrect Syntax cannot be accepted'} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + + data_ret = {"addNewCron": 1, + "user": website.externalApp, + "cron": finalCron} + final_json = json.dumps(data_ret) + return HttpResponse(final_json) + except BaseException, msg: + print msg + dic = {'addNewCron': 0, 'error_message': str(msg)} + json_data = json.dumps(dic) + return HttpResponse(json_data) + + except KeyError, msg: + status = {"addNewCron": 0, "error": "Not Logged in"} + final_json = json.dumps(status) + return HttpResponse(final_json) \ No newline at end of file diff --git a/websiteFunctions/views.pyc b/websiteFunctions/views.pyc index ca6383500..5f033005f 100644 Binary files a/websiteFunctions/views.pyc and b/websiteFunctions/views.pyc differ