|
|
@@ -400,94 +400,6 @@ if (!empty($_POST['save'])) {
|
|
|
$_SESSION['ok_msg'] = __('Changes has been saved.');
|
|
|
}
|
|
|
|
|
|
- // activating sftp licence
|
|
|
- if (empty($_SESSION['error_msg'])) {
|
|
|
- if($_SESSION['SFTPJAIL_KEY'] != $_POST['v_sftp_licence'] && $_POST['v_sftp'] == 'yes'){
|
|
|
- $module = 'sftpjail';
|
|
|
- $licence_key = escapeshellarg($_POST['v_sftp_licence']);
|
|
|
- exec (HESTIA_CMD."v-activate-vesta-license ".$module." ".$licence_key, $output, $return_var);
|
|
|
- check_return_code($return_var,$output);
|
|
|
- unset($output);
|
|
|
- if (empty($_SESSION['error_msg'])) {
|
|
|
- $_SESSION['ok_msg'] = __('Licence Activated');
|
|
|
- $_SESSION['SFTPJAIL_KEY'] = $_POST['v_sftp_licence'];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // cancel sftp licence
|
|
|
- if (empty($_SESSION['error_msg'])) {
|
|
|
- if($_POST['v_sftp'] == 'cancel' && $_SESSION['SFTPJAIL_KEY']){
|
|
|
- $module = 'sftpjail';
|
|
|
- $licence_key = escapeshellarg($_SESSION['SFTPJAIL_KEY']);
|
|
|
- exec (HESTIA_CMD."v-deactivate-vesta-license ".$module." ".$licence_key, $output, $return_var);
|
|
|
- check_return_code($return_var,$output);
|
|
|
- unset($output);
|
|
|
- if (empty($_SESSION['error_msg'])) {
|
|
|
- $_SESSION['ok_msg'] = __('Licence Deactivated');
|
|
|
- unset($_SESSION['SFTPJAIL_KEY']);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // activating filemanager licence
|
|
|
- if (empty($_SESSION['error_msg'])) {
|
|
|
- if($_SESSION['FILEMANAGER_KEY'] != $_POST['v_filemanager_licence'] && $_POST['v_filemanager'] == 'yes'){
|
|
|
- $module = 'filemanager';
|
|
|
- $licence_key = escapeshellarg($_POST['v_filemanager_licence']);
|
|
|
- exec (HESTIA_CMD."v-activate-vesta-license ".$module." ".$licence_key, $output, $return_var);
|
|
|
- check_return_code($return_var,$output);
|
|
|
- unset($output);
|
|
|
- if (empty($_SESSION['error_msg'])) {
|
|
|
- $_SESSION['ok_msg'] = __('Licence Activated');
|
|
|
- $_SESSION['FILEMANAGER_KEY'] = $_POST['v_filemanager_licence'];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // cancel filemanager licence
|
|
|
- if (empty($_SESSION['error_msg'])) {
|
|
|
- if($_POST['v_filemanager'] == 'cancel' && $_SESSION['FILEMANAGER_KEY']){
|
|
|
- $module = 'filemanager';
|
|
|
- $licence_key = escapeshellarg($_SESSION['FILEMANAGER_KEY']);
|
|
|
- exec (HESTIA_CMD."v-deactivate-vesta-license ".$module." ".$licence_key, $output, $return_var);
|
|
|
- check_return_code($return_var,$output);
|
|
|
- unset($output);
|
|
|
- if (empty($_SESSION['error_msg'])) {
|
|
|
- $_SESSION['ok_msg'] = __('Licence Deactivated');
|
|
|
- unset($_SESSION['FILEMANAGER_KEY']);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // activating softaculous
|
|
|
- if (empty($_SESSION['error_msg'])) {
|
|
|
- if($_SESSION['SOFTACULOUS'] != $_POST['v_softaculous'] && $_POST['v_softaculous'] == 'yes'){
|
|
|
- exec (HESTIA_CMD."v-add-vesta-softaculous WEB", $output, $return_var);
|
|
|
- check_return_code($return_var,$output);
|
|
|
- unset($output);
|
|
|
- if (empty($_SESSION['error_msg'])) {
|
|
|
- $_SESSION['ok_msg'] = __('Softaculous Activated');
|
|
|
- $_SESSION['SOFTACULOUS'] = 'yes';
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // disable softaculous
|
|
|
- if (empty($_SESSION['error_msg'])) {
|
|
|
- if($_SESSION['SOFTACULOUS'] != $_POST['v_softaculous'] && $_POST['v_softaculous'] == 'no'){
|
|
|
- exec (HESTIA_CMD."v-delete-vesta-softaculous", $output, $return_var);
|
|
|
- check_return_code($return_var,$output);
|
|
|
- unset($output);
|
|
|
- if (empty($_SESSION['error_msg'])) {
|
|
|
- $_SESSION['ok_msg'] = __('Softaculous Disabled');
|
|
|
- $_SESSION['SOFTACULOUS'] = '';
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-}
|
|
|
-
|
|
|
// Check system configuration
|
|
|
exec (HESTIA_CMD . "v-list-sys-config json", $output, $return_var);
|
|
|
$data = json_decode(implode('', $output), true);
|