|
400 | 400 | $_SESSION['ok_msg'] = __('Changes has been saved.'); |
401 | 401 | } |
402 | 402 |
|
403 | | - // activating sftp licence |
404 | | - if (empty($_SESSION['error_msg'])) { |
405 | | - if($_SESSION['SFTPJAIL_KEY'] != $_POST['v_sftp_licence'] && $_POST['v_sftp'] == 'yes'){ |
406 | | - $module = 'sftpjail'; |
407 | | - $licence_key = escapeshellarg($_POST['v_sftp_licence']); |
408 | | - exec (HESTIA_CMD."v-activate-vesta-license ".$module." ".$licence_key, $output, $return_var); |
409 | | - check_return_code($return_var,$output); |
410 | | - unset($output); |
411 | | - if (empty($_SESSION['error_msg'])) { |
412 | | - $_SESSION['ok_msg'] = __('Licence Activated'); |
413 | | - $_SESSION['SFTPJAIL_KEY'] = $_POST['v_sftp_licence']; |
414 | | - } |
415 | | - } |
416 | | - } |
417 | | - |
418 | | - // cancel sftp licence |
419 | | - if (empty($_SESSION['error_msg'])) { |
420 | | - if($_POST['v_sftp'] == 'cancel' && $_SESSION['SFTPJAIL_KEY']){ |
421 | | - $module = 'sftpjail'; |
422 | | - $licence_key = escapeshellarg($_SESSION['SFTPJAIL_KEY']); |
423 | | - exec (HESTIA_CMD."v-deactivate-vesta-license ".$module." ".$licence_key, $output, $return_var); |
424 | | - check_return_code($return_var,$output); |
425 | | - unset($output); |
426 | | - if (empty($_SESSION['error_msg'])) { |
427 | | - $_SESSION['ok_msg'] = __('Licence Deactivated'); |
428 | | - unset($_SESSION['SFTPJAIL_KEY']); |
429 | | - } |
430 | | - } |
431 | | - } |
432 | | - |
433 | | - // activating filemanager licence |
434 | | - if (empty($_SESSION['error_msg'])) { |
435 | | - if($_SESSION['FILEMANAGER_KEY'] != $_POST['v_filemanager_licence'] && $_POST['v_filemanager'] == 'yes'){ |
436 | | - $module = 'filemanager'; |
437 | | - $licence_key = escapeshellarg($_POST['v_filemanager_licence']); |
438 | | - exec (HESTIA_CMD."v-activate-vesta-license ".$module." ".$licence_key, $output, $return_var); |
439 | | - check_return_code($return_var,$output); |
440 | | - unset($output); |
441 | | - if (empty($_SESSION['error_msg'])) { |
442 | | - $_SESSION['ok_msg'] = __('Licence Activated'); |
443 | | - $_SESSION['FILEMANAGER_KEY'] = $_POST['v_filemanager_licence']; |
444 | | - } |
445 | | - } |
446 | | - } |
447 | | - |
448 | | - // cancel filemanager licence |
449 | | - if (empty($_SESSION['error_msg'])) { |
450 | | - if($_POST['v_filemanager'] == 'cancel' && $_SESSION['FILEMANAGER_KEY']){ |
451 | | - $module = 'filemanager'; |
452 | | - $licence_key = escapeshellarg($_SESSION['FILEMANAGER_KEY']); |
453 | | - exec (HESTIA_CMD."v-deactivate-vesta-license ".$module." ".$licence_key, $output, $return_var); |
454 | | - check_return_code($return_var,$output); |
455 | | - unset($output); |
456 | | - if (empty($_SESSION['error_msg'])) { |
457 | | - $_SESSION['ok_msg'] = __('Licence Deactivated'); |
458 | | - unset($_SESSION['FILEMANAGER_KEY']); |
459 | | - } |
460 | | - } |
461 | | - } |
462 | | - |
463 | | - // activating softaculous |
464 | | - if (empty($_SESSION['error_msg'])) { |
465 | | - if($_SESSION['SOFTACULOUS'] != $_POST['v_softaculous'] && $_POST['v_softaculous'] == 'yes'){ |
466 | | - exec (HESTIA_CMD."v-add-vesta-softaculous WEB", $output, $return_var); |
467 | | - check_return_code($return_var,$output); |
468 | | - unset($output); |
469 | | - if (empty($_SESSION['error_msg'])) { |
470 | | - $_SESSION['ok_msg'] = __('Softaculous Activated'); |
471 | | - $_SESSION['SOFTACULOUS'] = 'yes'; |
472 | | - } |
473 | | - } |
474 | | - } |
475 | | - |
476 | | - // disable softaculous |
477 | | - if (empty($_SESSION['error_msg'])) { |
478 | | - if($_SESSION['SOFTACULOUS'] != $_POST['v_softaculous'] && $_POST['v_softaculous'] == 'no'){ |
479 | | - exec (HESTIA_CMD."v-delete-vesta-softaculous", $output, $return_var); |
480 | | - check_return_code($return_var,$output); |
481 | | - unset($output); |
482 | | - if (empty($_SESSION['error_msg'])) { |
483 | | - $_SESSION['ok_msg'] = __('Softaculous Disabled'); |
484 | | - $_SESSION['SOFTACULOUS'] = ''; |
485 | | - } |
486 | | - } |
487 | | - } |
488 | | - |
489 | | -} |
490 | | - |
491 | 403 | // Check system configuration |
492 | 404 | exec (HESTIA_CMD . "v-list-sys-config json", $output, $return_var); |
493 | 405 | $data = json_decode(implode('', $output), true); |
|
0 commit comments