mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
Updated and improved API respones.
This commit is contained in:
parent
387e6c8e0a
commit
859e65647f
33 changed files with 254 additions and 18 deletions
|
@ -122,6 +122,10 @@ if (!empty($_POST['save'])) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Render page
|
||||
// render_page($user, $TAB, 'edit_backup_exclusions');
|
||||
|
||||
$result = array(
|
||||
'web' => $v_web,
|
||||
'dns' => $v_dns,
|
||||
|
|
|
@ -75,6 +75,9 @@ if (!empty($_POST['save'])) {
|
|||
}
|
||||
}
|
||||
|
||||
// Render page
|
||||
// render_page($user, $TAB, 'edit_cron');
|
||||
|
||||
$result = array(
|
||||
'username' => $user,
|
||||
'job' => $_GET['job'],
|
||||
|
|
|
@ -83,6 +83,9 @@ if (!empty($_POST['save'])) {
|
|||
}
|
||||
}
|
||||
|
||||
// Render page
|
||||
// render_page($user, $TAB, 'edit_db');
|
||||
|
||||
$result = array(
|
||||
'username' => $user,
|
||||
'database' => $_GET['database'],
|
||||
|
|
|
@ -90,8 +90,6 @@ $result = array(
|
|||
'time' => $data[$v_rule]['TIME'],
|
||||
'suspended' => $data[$v_rule]['SUSPENDED'],
|
||||
'status' => $v_status,
|
||||
'actions' => [ __('DROP'), __('ACCEPT') ],
|
||||
'protocols' => [ __('TCP'), __('UDP'), __('ICMP') ],
|
||||
'error_msg' => $_SESSION['error_msg'],
|
||||
'ok_msg' => $_SESSION['ok_msg']
|
||||
);
|
||||
|
|
|
@ -327,7 +327,7 @@ if ((!empty($_POST['save'])) && (!empty($_GET['domain'])) && (!empty($_GET['acco
|
|||
}
|
||||
|
||||
list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
|
||||
$webmail = "http://".$http_host."/webmail/";
|
||||
$webmail = "/webmail/";
|
||||
if (!empty($_SESSION['MAIL_URL'])) $webmail = $_SESSION['MAIL_URL'];
|
||||
|
||||
if (empty($hostname)) {
|
||||
|
|
|
@ -607,6 +607,10 @@ foreach ($sys_arr as $key => $value) {
|
|||
$_SESSION[$key] = $value;
|
||||
}
|
||||
|
||||
|
||||
// Render page
|
||||
// render_page($user, $TAB, 'edit_server');
|
||||
|
||||
$result = array(
|
||||
'hostname' => $v_hostname,
|
||||
'timezones' => $v_timezones,
|
||||
|
@ -636,6 +640,9 @@ $result = array(
|
|||
'web_backend_pool' => $_SESSION['WEB_BACKEND_POOL'],
|
||||
'sftpjail_key' => $_SESSION['SFTPJAIL_KEY'],
|
||||
'lead' => $_GET['lead'] == 'sftp',
|
||||
'softaculous_lead' => $_GET['lead'] == 'softaculous',
|
||||
'fm_lead' => $_GET['lead'] == 'filemanager',
|
||||
'sftp_licence_key' => $_GET['sftp_licence_key'],
|
||||
'licence_key' => $_GET['sftp_licence_key'] != '' ? $_GET['sftp_licence_key'] : $_SESSION['SFTPJAIL_KEY'],
|
||||
'fm_licence_key_option' => $_GET['filemanager_licence_key'] != '' ? $_GET['filemanager_licence_key'] : $_SESSION['FILEMANAGER_KEY'],
|
||||
'vesta_certificate' => $_SESSION['VESTA_CERTIFICATE'],
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
<?php
|
||||
|
||||
header('Access-Control-Allow-Origin : http://localhost:3000');
|
||||
header('Access-Control-Allow-Credentials : true');
|
||||
header('Access-Control-Allow-Methods : GET, POST, OPTIONS');
|
||||
header("Access-Control-Allow-Headers : Origin, Content-Type, Accept");
|
||||
|
||||
error_reporting(NULL);
|
||||
ob_start();
|
||||
unset($_SESSION['error_msg']);
|
||||
|
@ -260,7 +254,7 @@ if (!empty($_POST['save'])) {
|
|||
}
|
||||
|
||||
// Add proxy support
|
||||
if ((!empty($_SESSION['PROXY_SYSTEM'])) && (empty($v_proxy)) && (!empty($_POST['v_proxy_template'])) && (empty($_SESSION['error_msg']))) {
|
||||
if ((!empty($_SESSION['PROXY_SYSTEM'])) && (empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
|
||||
$v_proxy_template = $_POST['v_proxy_template'];
|
||||
if (!empty($_POST['v_proxy_ext'])) {
|
||||
$ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']);
|
||||
|
@ -777,7 +771,7 @@ $result = array(
|
|||
'backend_template' => $v_backend_template,
|
||||
'proxy' => $v_proxy,
|
||||
'proxy_template' => $v_proxy_template,
|
||||
'proxy_ext' => $v_proxy_ext,
|
||||
'proxy_ext' => !empty($v_proxy_ext) ? $v_proxy_ext : 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm',
|
||||
'v_stats' => $v_stats,
|
||||
'stats_user' => $v_stats_user,
|
||||
'ftp_user' => $v_ftp_user,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue