diff --git a/web/api/v1/add/favorite/index.php b/web/api/v1/add/favorite/index.php
index 4388847bd..94d48dadd 100644
--- a/web/api/v1/add/favorite/index.php
+++ b/web/api/v1/add/favorite/index.php
@@ -7,9 +7,9 @@ session_start();
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check token
- if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
- exit();
- }
+ // if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
+ // exit();
+ // }
// Protect input
$v_section = escapeshellarg($_REQUEST['v_section']);
diff --git a/web/api/v1/bulk/backup/exclusions/index.php b/web/api/v1/bulk/backup/exclusions/index.php
new file mode 100644
index 000000000..ccef8de5f
--- /dev/null
+++ b/web/api/v1/bulk/backup/exclusions/index.php
@@ -0,0 +1,31 @@
+ $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+ );
+
+echo json_encode($result);
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
diff --git a/web/api/v1/bulk/firewall/banlist/index.php b/web/api/v1/bulk/firewall/banlist/index.php
new file mode 100644
index 000000000..51e2f1ad5
--- /dev/null
+++ b/web/api/v1/bulk/firewall/banlist/index.php
@@ -0,0 +1,44 @@
+ $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+ );
+
+echo json_encode($result);
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
diff --git a/web/api/v1/delete/backup/exclusion/index.php b/web/api/v1/delete/backup/exclusion/index.php
new file mode 100644
index 000000000..dd2c3e879
--- /dev/null
+++ b/web/api/v1/delete/backup/exclusion/index.php
@@ -0,0 +1,28 @@
+ $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+ );
+
+echo json_encode($result);
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
diff --git a/web/api/v1/delete/cron/autoupdate/index.php b/web/api/v1/delete/cron/autoupdate/index.php
new file mode 100644
index 000000000..33fe87b52
--- /dev/null
+++ b/web/api/v1/delete/cron/autoupdate/index.php
@@ -0,0 +1,28 @@
+ $message,
+ 'error' => $error
+);
+
+print json_encode($result);
diff --git a/web/api/v1/delete/cron/reports/index.php b/web/api/v1/delete/cron/reports/index.php
new file mode 100644
index 000000000..ef664240f
--- /dev/null
+++ b/web/api/v1/delete/cron/reports/index.php
@@ -0,0 +1,26 @@
+ $message,
+ 'error' => $error,
+);
+
+print json_encode($result);
diff --git a/web/api/v1/delete/firewall/banlist/index.php b/web/api/v1/delete/firewall/banlist/index.php
new file mode 100644
index 000000000..e58cea61a
--- /dev/null
+++ b/web/api/v1/delete/firewall/banlist/index.php
@@ -0,0 +1,36 @@
+ $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+ );
+
+echo json_encode($result);
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
diff --git a/web/api/v1/edit/backup/exclusions/index.php b/web/api/v1/edit/backup/exclusions/index.php
new file mode 100644
index 000000000..13bd32c97
--- /dev/null
+++ b/web/api/v1/edit/backup/exclusions/index.php
@@ -0,0 +1,143 @@
+ $value) {
+ if (!empty($value)){
+ $v_web .= $key . ":" . $value. "\n";
+ } else {
+ $v_web .= $key . "\n";
+ }
+}
+
+// Parse dns
+foreach ($data['DNS'] as $key => $value) {
+ if (!empty($value)){
+ $v_dns .= $key . ":" . $value. "\n";
+ } else {
+ $v_dns .= $key . "\n";
+ }
+}
+
+// Parse mail
+foreach ($data['MAIL'] as $key => $value) {
+ if (!empty($value)){
+ $v_mail .= $key . ":" . $value. "\n";
+ } else {
+ $v_mail .= $key . "\n";
+ }
+}
+
+// Parse databases
+foreach ($data['DB'] as $key => $value) {
+ if (!empty($value)){
+ $v_db .= $key . ":" . $value. "\n";
+ } else {
+ $v_db .= $key . "\n";
+ }
+}
+
+// Parse user directories
+foreach ($data['USER'] as $key => $value) {
+ if (!empty($value)){
+ $v_userdir .= $key . ":" . $value. "\n";
+ } else {
+ $v_userdir .= $key . "\n";
+ }
+}
+
+// Check POST request
+if (!empty($_POST['save'])) {
+
+ // Check token
+ if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
+ exit();
+ }
+
+ $v_web = $_POST['v_web'];
+ $v_web_tmp = str_replace("\r\n", ",", $_POST['v_web']);
+ $v_web_tmp = rtrim($v_web_tmp, ",");
+ $v_web_tmp = "WEB=" . escapeshellarg($v_web_tmp);
+
+ $v_dns = $_POST['v_dns'];
+ $v_dns_tmp = str_replace("\r\n", ",", $_POST['v_dns']);
+ $v_dns_tmp = rtrim($v_dns_tmp, ",");
+ $v_dns_tmp = "DNS=" . escapeshellarg($v_dns_tmp);
+
+ $v_mail = $_POST['v_mail'];
+ $v_mail_tmp = str_replace("\r\n", ",", $_POST['v_mail']);
+ $v_mail_tmp = rtrim($v_mail_tmp, ",");
+ $v_mail_tmp = "MAIL=" . escapeshellarg($v_mail_tmp);
+
+ $v_db = $_POST['v_db'];
+ $v_db_tmp = str_replace("\r\n", ",", $_POST['v_db']);
+ $v_db_tmp = rtrim($v_db_tmp, ",");
+ $v_db_tmp = "DB=" . escapeshellarg($v_db_tmp);
+
+ $v_cron = $_POST['v_cron'];
+ $v_cron_tmp = str_replace("\r\n", ",", $_POST['v_cron']);
+ $v_cron_tmp = rtrim($v_cron_tmp, ",");
+ $v_cron_tmp = "CRON=" . escapeshellarg($v_cron_tmp);
+
+ $v_userdir = $_POST['v_userdir'];
+ $v_userdir_tmp = str_replace("\r\n", ",", $_POST['v_userdir']);
+ $v_userdir_tmp = rtrim($v_userdir_tmp, ",");
+ $v_userdir_tmp = "USER=" . escapeshellarg($v_userdir_tmp);
+
+ // Create temporary exeption list on a filesystem
+ exec ('mktemp', $mktemp_output, $return_var);
+ $tmp = $mktemp_output[0];
+ $fp = fopen($tmp, 'w');
+ fwrite($fp, $v_web_tmp . "\n" . $v_dns_tmp . "\n" . $v_mail_tmp . "\n" . $v_db_tmp . "\n" . $v_userdir_tmp . "\n");
+ fclose($fp);
+ unset($mktemp_output);
+
+ // Save changes
+ exec (VESTA_CMD."v-update-user-backup-exclusions ".$user." ".$tmp, $output, $return_var);
+ check_return_code($return_var,$output);
+ unset($output);
+
+ // Set success message
+ if (empty($_SESSION['error_msg'])) {
+ $_SESSION['ok_msg'] = __("Changes has been saved.");
+ }
+}
+
+
+// Render page
+// render_page($user, $TAB, 'edit_backup_exclusions');
+
+$result = array(
+ 'web' => $v_web,
+ 'dns' => $v_dns,
+ 'mail' => $v_mail,
+ 'db' => $v_db,
+ 'userdir' => $v_userdir,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
diff --git a/web/api/v1/edit/server/bind9/index.php b/web/api/v1/edit/server/bind9/index.php
new file mode 100644
index 000000000..4fff011db
--- /dev/null
+++ b/web/api/v1/edit/server/bind9/index.php
@@ -0,0 +1,82 @@
+ $v_options_path,
+ 'config_path' => $v_config_path,
+ 'service_name' => $v_service_name,
+ 'options' => $v_options,
+ 'config' => $v_config,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
diff --git a/web/api/v1/edit/server/clamd/index.php b/web/api/v1/edit/server/clamd/index.php
new file mode 100644
index 000000000..fef8c95b3
--- /dev/null
+++ b/web/api/v1/edit/server/clamd/index.php
@@ -0,0 +1,65 @@
+ $v_config_path,
+ 'service_name' => $v_service_name,
+ 'config' => $v_config,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
\ No newline at end of file
diff --git a/web/api/v1/edit/server/dovecot/index.php b/web/api/v1/edit/server/dovecot/index.php
new file mode 100644
index 000000000..198bd28a2
--- /dev/null
+++ b/web/api/v1/edit/server/dovecot/index.php
@@ -0,0 +1,206 @@
+ $v_config_path,
+ 'config_path1' => $v_config_path1,
+ 'config_path2' => $v_config_path2,
+ 'config_path3' => $v_config_path3,
+ 'config_path4' => $v_config_path4,
+ 'config_path5' => $v_config_path5,
+ 'config_path6' => $v_config_path6,
+ 'config_path7' => $v_config_path7,
+ 'config_path8' => $v_config_path8,
+ 'service_name' => $v_service_name,
+ 'config' => $config,
+ 'config1' => $config1,
+ 'config2' => $config2,
+ 'config3' => $config3,
+ 'config4' => $config4,
+ 'config5' => $config5,
+ 'config6' => $config6,
+ 'config7' => $config7,
+ 'config8' => $config8,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
diff --git a/web/api/v1/edit/server/exim4/index.php b/web/api/v1/edit/server/exim4/index.php
new file mode 100644
index 000000000..84b2bd50e
--- /dev/null
+++ b/web/api/v1/edit/server/exim4/index.php
@@ -0,0 +1,65 @@
+ $v_config_path,
+ 'service_name' => $v_service_name,
+ 'config' => $v_config,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
\ No newline at end of file
diff --git a/web/api/v1/edit/server/httpd/index.php b/web/api/v1/edit/server/httpd/index.php
new file mode 100644
index 000000000..8af419d2d
--- /dev/null
+++ b/web/api/v1/edit/server/httpd/index.php
@@ -0,0 +1,64 @@
+ '/etc/httpd/conf/httpd.conf',
+ 'service_name' => $v_service_name,
+ 'config' => $v_config,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
\ No newline at end of file
diff --git a/web/api/v1/edit/server/mysqld/index.php b/web/api/v1/edit/server/mysqld/index.php
new file mode 100644
index 000000000..c63cb81ac
--- /dev/null
+++ b/web/api/v1/edit/server/mysqld/index.php
@@ -0,0 +1,79 @@
+ $v_max_user_connections,
+ 'max_connections' => $v_max_connections,
+ 'wait_timeout' => $v_wait_timeout,
+ 'interactive_timeout' => $v_interactive_timeout,
+ 'max_allowed_packet' => $v_max_allowed_packet,
+ 'config_path' => $v_config_path,
+ 'service_name' => $v_service_name,
+ 'config' => $v_config,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
\ No newline at end of file
diff --git a/web/api/v1/edit/server/named/index.php b/web/api/v1/edit/server/named/index.php
new file mode 100644
index 000000000..aa7d2ed88
--- /dev/null
+++ b/web/api/v1/edit/server/named/index.php
@@ -0,0 +1,65 @@
+ $v_service_name,
+ 'config_path' => $v_config_path,
+ 'config' => $v_config,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
\ No newline at end of file
diff --git a/web/api/v1/edit/server/nginx/index.php b/web/api/v1/edit/server/nginx/index.php
new file mode 100644
index 000000000..2989975e9
--- /dev/null
+++ b/web/api/v1/edit/server/nginx/index.php
@@ -0,0 +1,89 @@
+ $data['CONFIG']['worker_processes'],
+ 'worker_connections' => $data['CONFIG']['worker_connections'],
+ 'send_timeout' => $data['CONFIG']['send_timeout'],
+ 'proxy_connect_timeout' => $data['CONFIG']['proxy_connect_timeout'],
+ 'proxy_send_timeout' => $data['CONFIG']['proxy_send_timeout'],
+ 'proxy_read_timeout' => $data['CONFIG']['proxy_read_timeout'],
+ 'client_max_body_size' => $data['CONFIG']['client_max_body_size'],
+ 'gzip' => $data['CONFIG']['gzip'],
+ 'gzip_comp_level' => $data['CONFIG']['gzip_comp_level'],
+ 'charset' => $data['CONFIG']['charset'],
+ 'config_path' => $data['CONFIG']['config_path'],
+ 'service_name' => strtoupper('nginx'),
+ 'config' => $v_config,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
diff --git a/web/api/v1/edit/server/php-fpm/index.php b/web/api/v1/edit/server/php-fpm/index.php
new file mode 100644
index 000000000..066c13bfe
--- /dev/null
+++ b/web/api/v1/edit/server/php-fpm/index.php
@@ -0,0 +1,82 @@
+ $data['CONFIG']['memory_limit'],
+ 'max_execution_time' => $data['CONFIG']['max_execution_time'],
+ 'max_input_time' => $data['CONFIG']['max_input_time'],
+ 'upload_max_filesize' => $data['CONFIG']['upload_max_filesize'],
+ 'post_max_size' => $data['CONFIG']['post_max_size'],
+ 'display_errors' => $data['CONFIG']['display_errors'],
+ 'error_reporting' => $data['CONFIG']['error_reporting'],
+ 'config_path' => $data['CONFIG']['config_path'],
+ 'web_system' => $_SESSION['WEB_SYSTEM'],
+ 'config' => $v_config,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
\ No newline at end of file
diff --git a/web/api/v1/edit/server/php5-fpm/index.php b/web/api/v1/edit/server/php5-fpm/index.php
new file mode 100644
index 000000000..066c13bfe
--- /dev/null
+++ b/web/api/v1/edit/server/php5-fpm/index.php
@@ -0,0 +1,82 @@
+ $data['CONFIG']['memory_limit'],
+ 'max_execution_time' => $data['CONFIG']['max_execution_time'],
+ 'max_input_time' => $data['CONFIG']['max_input_time'],
+ 'upload_max_filesize' => $data['CONFIG']['upload_max_filesize'],
+ 'post_max_size' => $data['CONFIG']['post_max_size'],
+ 'display_errors' => $data['CONFIG']['display_errors'],
+ 'error_reporting' => $data['CONFIG']['error_reporting'],
+ 'config_path' => $data['CONFIG']['config_path'],
+ 'web_system' => $_SESSION['WEB_SYSTEM'],
+ 'config' => $v_config,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
\ No newline at end of file
diff --git a/web/api/v1/edit/server/postgresql/index.php b/web/api/v1/edit/server/postgresql/index.php
new file mode 100644
index 000000000..c030cfb66
--- /dev/null
+++ b/web/api/v1/edit/server/postgresql/index.php
@@ -0,0 +1,87 @@
+ $v_options_path,
+ 'config_path' => $v_config_path,
+ 'service_name' => $v_service_name,
+ 'options' => $v_options,
+ 'config' => $v_config,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
diff --git a/web/api/v1/edit/server/spamassassin/index.php b/web/api/v1/edit/server/spamassassin/index.php
new file mode 100644
index 000000000..ef12e5a73
--- /dev/null
+++ b/web/api/v1/edit/server/spamassassin/index.php
@@ -0,0 +1,65 @@
+ $v_config_path,
+ 'service_name' => $v_service_name,
+ 'config' => $v_config,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
\ No newline at end of file
diff --git a/web/api/v1/edit/server/spamd/index.php b/web/api/v1/edit/server/spamd/index.php
new file mode 100644
index 000000000..accfd9a6f
--- /dev/null
+++ b/web/api/v1/edit/server/spamd/index.php
@@ -0,0 +1,65 @@
+ $v_config_path,
+ 'service_name' => $v_service_name,
+ 'config' => $v_config,
+ 'error_msg' => $_SESSION['error_msg'],
+ 'ok_msg' => $_SESSION['ok_msg']
+);
+
+echo json_encode($result);
+
+// Flush session messages
+unset($_SESSION['error_msg']);
+unset($_SESSION['ok_msg']);
\ No newline at end of file
diff --git a/web/api/v1/list/backup/exclusions/index.php b/web/api/v1/list/backup/exclusions/index.php
new file mode 100644
index 000000000..f1f350f01
--- /dev/null
+++ b/web/api/v1/list/backup/exclusions/index.php
@@ -0,0 +1,23 @@
+ $data);
+
+echo json_encode($result);
diff --git a/web/api/v1/list/db/index.php b/web/api/v1/list/db/index.php
new file mode 100644
index 000000000..f9e327a2c
--- /dev/null
+++ b/web/api/v1/list/db/index.php
@@ -0,0 +1,79 @@
+ $value) {
+ ++$i;
+
+ if ( $i == 1) {
+ $total_amount = __('1 database');
+ } else {
+ $total_amount = __('%s databases',$i);
+ }
+
+ if ($data[$key]['SUSPENDED'] == 'yes') {
+ $data[$key]['status'] = 'suspended';
+ $data[$key]['suspend_action'] = 'unsuspend' ;
+ $data[$key]['suspend_conf'] = __('UNSUSPEND_DATABASE_CONFIRMATION', $key);
+ } else {
+ $data[$key]['status'] = 'active';
+ $data[$key]['suspend_action'] = 'suspend';
+ $data[$key]['suspend_conf'] = __('SUSPEND_DATABASE_CONFIRMATION', $key);
+ }
+
+ if ($data[$key]['TYPE'] == 'mysql'){
+ $mysql = 1;
+
+ $db_myadmin_link = "http://".$http_host."/phpmyadmin/";
+ if (!empty($_SESSION['DB_PMA_URL']))
+ $db_myadmin_link = $_SESSION['DB_PMA_URL'];
+ }
+ if ($data[$key]['TYPE'] == 'pgsql'){
+ $pgsql = 1;
+ $db_pgadmin_link = "http://".$http_host."/phppgadmin/";
+ if (!empty($_SESSION['DB_PGA_URL']))
+ $db_pgadmin_link = $_SESSION['DB_PGA_URL'];
+ }
+
+ if ($data[$key]['HOST'] != 'localhost' ) $http_host = $data[$key]['HOST'];
+ if ($data[$key]['TYPE'] == 'mysql') $db_admin = "phpMyAdmin";
+ if ($data[$key]['TYPE'] == 'mysql') $db_admin_link = "http://".$http_host."/phpmyadmin/";
+ if (($data[$key]['TYPE'] == 'mysql') && (!empty($_SESSION['DB_PMA_URL']))) $db_admin_link = $_SESSION['DB_PMA_URL'];
+ if ($data[$key]['TYPE'] == 'pgsql') $db_admin = "phpPgAdmin";
+ if ($data[$key]['TYPE'] == 'pgsql') $db_admin_link = "http://".$http_host."/phppgadmin/";
+ if (($data[$key]['TYPE'] == 'pgsql') && (!empty($_SESSION['DB_PGA_URL']))) $db_admin_link = $_SESSION['DB_PGA_URL'];
+
+ $data[$key]['delete_conf'] = __('DELETE_DATABASE_CONFIRMATION', $key);
+}
+
+$object = (object)[];
+$object->data = $data;
+$object->user = $user;
+$object->panel = $panel;
+$object->db_admin = $db_admin;
+$object->db_admin_link = $db_admin_link;
+$object->totalAmount = $total_amount;
+$object->databases = $databases;
+$object->dbFav = $_SESSION['favourites']['DB'];
+
+print json_encode($object);
\ No newline at end of file
diff --git a/web/api/v1/list/directory/preview/index.php b/web/api/v1/list/directory/preview/index.php
new file mode 100644
index 000000000..737e19db3
--- /dev/null
+++ b/web/api/v1/list/directory/preview/index.php
@@ -0,0 +1,35 @@
+ 0 ) {
+ header("Location: /error/");
+ exit;
+ }
+ $panel = json_decode(implode('', $output), true);
+}
+
+$path_a = !empty($_REQUEST['dir_a']) ? $_REQUEST['dir_a'] : '';
+$path_b = !empty($_REQUEST['dir_b']) ? $_REQUEST['dir_b'] : '';
+$GLOBAL_JS = '';
+$GLOBAL_JS .= '';
+$GLOBAL_JS .= '';
+
+
+// Footer
+include($_SERVER['DOCUMENT_ROOT'].'/templates/file_manager/main.php');
\ No newline at end of file
diff --git a/web/api/v1/list/firewall/banlist/index.php b/web/api/v1/list/firewall/banlist/index.php
new file mode 100644
index 000000000..5b92826c4
--- /dev/null
+++ b/web/api/v1/list/firewall/banlist/index.php
@@ -0,0 +1,59 @@
+ $value) {
+ if ($data[$key]['SUSPENDED'] == 'yes') {
+ $data[$key]['status'] = 'suspended';
+ $data[$key]['suspend_action'] = 'unsuspend' ;
+ $data[$key]['suspend_conf'] = 'UNSUSPEND_RULE_CONFIRMATION' ;
+ } else {
+ $data[$key]['status'] = 'active';
+ $data[$key]['suspend_action'] = 'suspend' ;
+ $data[$key]['suspend_conf'] = 'SUSPEND_RULE_CONFIRMATION' ;
+ }
+
+ $data[$key]['delete_url'] = '/delete/firewall/banlist/?ip='.$data[$key]['ip'].'&chain='.$data[$key]['CHAIN'].'&token='.$_SESSION['token'];
+
+ if ( $i == 1) {
+ $total_amount = __('1 rule');
+ } else {
+ $total_amount = __('%s rules',$i);
+ }
+ ++$i;
+}
+
+if ($i == 0) {
+ $total_amount = __('There are no currently banned IP');
+}
+
+// Render page
+// render_page($user, $TAB, 'list_firewall_banlist');
+
+// Back uri
+$_SESSION['back'] = $_SERVER['REQUEST_URI'];
+
+$result = array(
+ 'data' => $data,
+ 'total_amount' => $total_amount
+);
+
+echo json_encode($result);
diff --git a/web/api/v1/list/rrd/image.php b/web/api/v1/list/rrd/image.php
new file mode 100644
index 000000000..600b11134
--- /dev/null
+++ b/web/api/v1/list/rrd/image.php
@@ -0,0 +1,13 @@
+
diff --git a/web/api/v1/list/rrd/index.php b/web/api/v1/list/rrd/index.php
new file mode 100644
index 000000000..2ba6b4dc5
--- /dev/null
+++ b/web/api/v1/list/rrd/index.php
@@ -0,0 +1,32 @@
+data = $data;
+$object->user = $user;
+$object->panel = $panel;
+
+print json_encode($object);
\ No newline at end of file
diff --git a/web/api/v1/list/server/index.php b/web/api/v1/list/server/index.php
index ee7b2b70e..47363fcae 100644
--- a/web/api/v1/list/server/index.php
+++ b/web/api/v1/list/server/index.php
@@ -84,6 +84,17 @@ foreach ($data as $key => $value) {
} else {
$data[$key]['action_url'] = '/start/service/?srv='.$key;
}
+
+ $data[$key]['SYSTEM'] = __($data[$key]['SYSTEM']);
+ $data[$key]['RTIME'] = humanize_time($data[$key]['RTIME']);
+
+ $cpu = $data[$key]['CPU'] / 10;
+ $data[$key]['CPU'] = number_format($cpu, 1);
+ if ($cpu == '0.0') $data[$key]['CPU'] = 0;
+}
+
+foreach ($sys as $key => $value) {
+ $sys[$key]['UPTIME'] = humanize_time($sys[$key]['UPTIME']);
}
// Render page
diff --git a/web/api/v1/rrd/db/daily-mysql_localhost.png b/web/api/v1/rrd/db/daily-mysql_localhost.png
new file mode 100644
index 000000000..8d9f94024
Binary files /dev/null and b/web/api/v1/rrd/db/daily-mysql_localhost.png differ
diff --git a/web/api/v1/rrd/db/daily-pgsql_localhost.png b/web/api/v1/rrd/db/daily-pgsql_localhost.png
new file mode 100644
index 000000000..3668da7c9
Binary files /dev/null and b/web/api/v1/rrd/db/daily-pgsql_localhost.png differ
diff --git a/web/api/v1/rrd/db/monthly-mysql_localhost.png b/web/api/v1/rrd/db/monthly-mysql_localhost.png
new file mode 100644
index 000000000..7fbe8e94d
Binary files /dev/null and b/web/api/v1/rrd/db/monthly-mysql_localhost.png differ
diff --git a/web/api/v1/rrd/db/monthly-pgsql_localhost.png b/web/api/v1/rrd/db/monthly-pgsql_localhost.png
new file mode 100644
index 000000000..6af332884
Binary files /dev/null and b/web/api/v1/rrd/db/monthly-pgsql_localhost.png differ
diff --git a/web/api/v1/rrd/db/mysql_localhost.rrd b/web/api/v1/rrd/db/mysql_localhost.rrd
new file mode 100644
index 000000000..ec7554896
Binary files /dev/null and b/web/api/v1/rrd/db/mysql_localhost.rrd differ
diff --git a/web/api/v1/rrd/db/pgsql_localhost.rrd b/web/api/v1/rrd/db/pgsql_localhost.rrd
new file mode 100644
index 000000000..7aae6ef04
Binary files /dev/null and b/web/api/v1/rrd/db/pgsql_localhost.rrd differ
diff --git a/web/api/v1/rrd/db/weekly-mysql_localhost.png b/web/api/v1/rrd/db/weekly-mysql_localhost.png
new file mode 100644
index 000000000..706b5704c
Binary files /dev/null and b/web/api/v1/rrd/db/weekly-mysql_localhost.png differ
diff --git a/web/api/v1/rrd/db/weekly-pgsql_localhost.png b/web/api/v1/rrd/db/weekly-pgsql_localhost.png
new file mode 100644
index 000000000..c976bd346
Binary files /dev/null and b/web/api/v1/rrd/db/weekly-pgsql_localhost.png differ
diff --git a/web/api/v1/rrd/db/yearly-mysql_localhost.png b/web/api/v1/rrd/db/yearly-mysql_localhost.png
new file mode 100644
index 000000000..7ce0c75a9
Binary files /dev/null and b/web/api/v1/rrd/db/yearly-mysql_localhost.png differ
diff --git a/web/api/v1/rrd/db/yearly-pgsql_localhost.png b/web/api/v1/rrd/db/yearly-pgsql_localhost.png
new file mode 100644
index 000000000..b9e64ed31
Binary files /dev/null and b/web/api/v1/rrd/db/yearly-pgsql_localhost.png differ
diff --git a/web/api/v1/rrd/ftp/daily-ftp.png b/web/api/v1/rrd/ftp/daily-ftp.png
new file mode 100644
index 000000000..a6fc1f2c9
Binary files /dev/null and b/web/api/v1/rrd/ftp/daily-ftp.png differ
diff --git a/web/api/v1/rrd/ftp/ftp.rrd b/web/api/v1/rrd/ftp/ftp.rrd
new file mode 100644
index 000000000..14f93fa29
Binary files /dev/null and b/web/api/v1/rrd/ftp/ftp.rrd differ
diff --git a/web/api/v1/rrd/ftp/monthly-ftp.png b/web/api/v1/rrd/ftp/monthly-ftp.png
new file mode 100644
index 000000000..1aa5595dc
Binary files /dev/null and b/web/api/v1/rrd/ftp/monthly-ftp.png differ
diff --git a/web/api/v1/rrd/ftp/weekly-ftp.png b/web/api/v1/rrd/ftp/weekly-ftp.png
new file mode 100644
index 000000000..7c416aaaf
Binary files /dev/null and b/web/api/v1/rrd/ftp/weekly-ftp.png differ
diff --git a/web/api/v1/rrd/ftp/yearly-ftp.png b/web/api/v1/rrd/ftp/yearly-ftp.png
new file mode 100644
index 000000000..d2f69ef49
Binary files /dev/null and b/web/api/v1/rrd/ftp/yearly-ftp.png differ
diff --git a/web/api/v1/rrd/la/daily-la.png b/web/api/v1/rrd/la/daily-la.png
new file mode 100644
index 000000000..5f2334acc
Binary files /dev/null and b/web/api/v1/rrd/la/daily-la.png differ
diff --git a/web/api/v1/rrd/la/la.rrd b/web/api/v1/rrd/la/la.rrd
new file mode 100644
index 000000000..1d55ed675
Binary files /dev/null and b/web/api/v1/rrd/la/la.rrd differ
diff --git a/web/api/v1/rrd/la/monthly-la.png b/web/api/v1/rrd/la/monthly-la.png
new file mode 100644
index 000000000..359cb88ac
Binary files /dev/null and b/web/api/v1/rrd/la/monthly-la.png differ
diff --git a/web/api/v1/rrd/la/weekly-la.png b/web/api/v1/rrd/la/weekly-la.png
new file mode 100644
index 000000000..be0037c47
Binary files /dev/null and b/web/api/v1/rrd/la/weekly-la.png differ
diff --git a/web/api/v1/rrd/la/yearly-la.png b/web/api/v1/rrd/la/yearly-la.png
new file mode 100644
index 000000000..abbf1fe85
Binary files /dev/null and b/web/api/v1/rrd/la/yearly-la.png differ
diff --git a/web/api/v1/rrd/mail/daily-mail.png b/web/api/v1/rrd/mail/daily-mail.png
new file mode 100644
index 000000000..8af2f3d5c
Binary files /dev/null and b/web/api/v1/rrd/mail/daily-mail.png differ
diff --git a/web/api/v1/rrd/mail/mail.rrd b/web/api/v1/rrd/mail/mail.rrd
new file mode 100644
index 000000000..756ebc657
Binary files /dev/null and b/web/api/v1/rrd/mail/mail.rrd differ
diff --git a/web/api/v1/rrd/mail/monthly-mail.png b/web/api/v1/rrd/mail/monthly-mail.png
new file mode 100644
index 000000000..ba6ec35c8
Binary files /dev/null and b/web/api/v1/rrd/mail/monthly-mail.png differ
diff --git a/web/api/v1/rrd/mail/weekly-mail.png b/web/api/v1/rrd/mail/weekly-mail.png
new file mode 100644
index 000000000..4d295ffd1
Binary files /dev/null and b/web/api/v1/rrd/mail/weekly-mail.png differ
diff --git a/web/api/v1/rrd/mail/yearly-mail.png b/web/api/v1/rrd/mail/yearly-mail.png
new file mode 100644
index 000000000..538c2afc4
Binary files /dev/null and b/web/api/v1/rrd/mail/yearly-mail.png differ
diff --git a/web/api/v1/rrd/mem/daily-mem.png b/web/api/v1/rrd/mem/daily-mem.png
new file mode 100644
index 000000000..0a20253c3
Binary files /dev/null and b/web/api/v1/rrd/mem/daily-mem.png differ
diff --git a/web/api/v1/rrd/mem/mem.rrd b/web/api/v1/rrd/mem/mem.rrd
new file mode 100644
index 000000000..49f339c60
Binary files /dev/null and b/web/api/v1/rrd/mem/mem.rrd differ
diff --git a/web/api/v1/rrd/mem/monthly-mem.png b/web/api/v1/rrd/mem/monthly-mem.png
new file mode 100644
index 000000000..15a41e11e
Binary files /dev/null and b/web/api/v1/rrd/mem/monthly-mem.png differ
diff --git a/web/api/v1/rrd/mem/weekly-mem.png b/web/api/v1/rrd/mem/weekly-mem.png
new file mode 100644
index 000000000..38e4d1158
Binary files /dev/null and b/web/api/v1/rrd/mem/weekly-mem.png differ
diff --git a/web/api/v1/rrd/mem/yearly-mem.png b/web/api/v1/rrd/mem/yearly-mem.png
new file mode 100644
index 000000000..67010a9a4
Binary files /dev/null and b/web/api/v1/rrd/mem/yearly-mem.png differ
diff --git a/web/api/v1/rrd/net/daily-eth0.png b/web/api/v1/rrd/net/daily-eth0.png
new file mode 100644
index 000000000..073ecdf9c
Binary files /dev/null and b/web/api/v1/rrd/net/daily-eth0.png differ
diff --git a/web/api/v1/rrd/net/daily-eth1.png b/web/api/v1/rrd/net/daily-eth1.png
new file mode 100644
index 000000000..2dcfde654
Binary files /dev/null and b/web/api/v1/rrd/net/daily-eth1.png differ
diff --git a/web/api/v1/rrd/net/daily-sit0.png b/web/api/v1/rrd/net/daily-sit0.png
new file mode 100644
index 000000000..f7e7558ec
Binary files /dev/null and b/web/api/v1/rrd/net/daily-sit0.png differ
diff --git a/web/api/v1/rrd/net/eth0.rrd b/web/api/v1/rrd/net/eth0.rrd
new file mode 100644
index 000000000..a448ca924
Binary files /dev/null and b/web/api/v1/rrd/net/eth0.rrd differ
diff --git a/web/api/v1/rrd/net/eth1.rrd b/web/api/v1/rrd/net/eth1.rrd
new file mode 100644
index 000000000..722a7b2f3
Binary files /dev/null and b/web/api/v1/rrd/net/eth1.rrd differ
diff --git a/web/api/v1/rrd/net/monthly-eth0.png b/web/api/v1/rrd/net/monthly-eth0.png
new file mode 100644
index 000000000..1d2bdedc8
Binary files /dev/null and b/web/api/v1/rrd/net/monthly-eth0.png differ
diff --git a/web/api/v1/rrd/net/monthly-eth1.png b/web/api/v1/rrd/net/monthly-eth1.png
new file mode 100644
index 000000000..be4be7dd6
Binary files /dev/null and b/web/api/v1/rrd/net/monthly-eth1.png differ
diff --git a/web/api/v1/rrd/net/monthly-sit0.png b/web/api/v1/rrd/net/monthly-sit0.png
new file mode 100644
index 000000000..dc0b9b691
Binary files /dev/null and b/web/api/v1/rrd/net/monthly-sit0.png differ
diff --git a/web/api/v1/rrd/net/sit0.rrd b/web/api/v1/rrd/net/sit0.rrd
new file mode 100644
index 000000000..48abe1339
Binary files /dev/null and b/web/api/v1/rrd/net/sit0.rrd differ
diff --git a/web/api/v1/rrd/net/weekly-eth0.png b/web/api/v1/rrd/net/weekly-eth0.png
new file mode 100644
index 000000000..9b37693c1
Binary files /dev/null and b/web/api/v1/rrd/net/weekly-eth0.png differ
diff --git a/web/api/v1/rrd/net/weekly-eth1.png b/web/api/v1/rrd/net/weekly-eth1.png
new file mode 100644
index 000000000..a73f2ddfd
Binary files /dev/null and b/web/api/v1/rrd/net/weekly-eth1.png differ
diff --git a/web/api/v1/rrd/net/weekly-sit0.png b/web/api/v1/rrd/net/weekly-sit0.png
new file mode 100644
index 000000000..40c938f6a
Binary files /dev/null and b/web/api/v1/rrd/net/weekly-sit0.png differ
diff --git a/web/api/v1/rrd/net/yearly-eth0.png b/web/api/v1/rrd/net/yearly-eth0.png
new file mode 100644
index 000000000..2818a48e6
Binary files /dev/null and b/web/api/v1/rrd/net/yearly-eth0.png differ
diff --git a/web/api/v1/rrd/net/yearly-eth1.png b/web/api/v1/rrd/net/yearly-eth1.png
new file mode 100644
index 000000000..57ae32deb
Binary files /dev/null and b/web/api/v1/rrd/net/yearly-eth1.png differ
diff --git a/web/api/v1/rrd/net/yearly-sit0.png b/web/api/v1/rrd/net/yearly-sit0.png
new file mode 100644
index 000000000..00789cbb8
Binary files /dev/null and b/web/api/v1/rrd/net/yearly-sit0.png differ
diff --git a/web/api/v1/rrd/ssh/daily-ssh.png b/web/api/v1/rrd/ssh/daily-ssh.png
new file mode 100644
index 000000000..22e912090
Binary files /dev/null and b/web/api/v1/rrd/ssh/daily-ssh.png differ
diff --git a/web/api/v1/rrd/ssh/monthly-ssh.png b/web/api/v1/rrd/ssh/monthly-ssh.png
new file mode 100644
index 000000000..5fe439d90
Binary files /dev/null and b/web/api/v1/rrd/ssh/monthly-ssh.png differ
diff --git a/web/api/v1/rrd/ssh/ssh.rrd b/web/api/v1/rrd/ssh/ssh.rrd
new file mode 100644
index 000000000..93666c785
Binary files /dev/null and b/web/api/v1/rrd/ssh/ssh.rrd differ
diff --git a/web/api/v1/rrd/ssh/weekly-ssh.png b/web/api/v1/rrd/ssh/weekly-ssh.png
new file mode 100644
index 000000000..3f2c28662
Binary files /dev/null and b/web/api/v1/rrd/ssh/weekly-ssh.png differ
diff --git a/web/api/v1/rrd/ssh/yearly-ssh.png b/web/api/v1/rrd/ssh/yearly-ssh.png
new file mode 100644
index 000000000..8cbabc57d
Binary files /dev/null and b/web/api/v1/rrd/ssh/yearly-ssh.png differ
diff --git a/web/api/v1/rrd/web/daily-httpd.png b/web/api/v1/rrd/web/daily-httpd.png
new file mode 100644
index 000000000..0b3a802e7
Binary files /dev/null and b/web/api/v1/rrd/web/daily-httpd.png differ
diff --git a/web/api/v1/rrd/web/daily-nginx.png b/web/api/v1/rrd/web/daily-nginx.png
new file mode 100644
index 000000000..b1eb9af79
Binary files /dev/null and b/web/api/v1/rrd/web/daily-nginx.png differ
diff --git a/web/api/v1/rrd/web/httpd.rrd b/web/api/v1/rrd/web/httpd.rrd
new file mode 100644
index 000000000..870317a58
Binary files /dev/null and b/web/api/v1/rrd/web/httpd.rrd differ
diff --git a/web/api/v1/rrd/web/monthly-httpd.png b/web/api/v1/rrd/web/monthly-httpd.png
new file mode 100644
index 000000000..5fa080677
Binary files /dev/null and b/web/api/v1/rrd/web/monthly-httpd.png differ
diff --git a/web/api/v1/rrd/web/monthly-nginx.png b/web/api/v1/rrd/web/monthly-nginx.png
new file mode 100644
index 000000000..bee3a7517
Binary files /dev/null and b/web/api/v1/rrd/web/monthly-nginx.png differ
diff --git a/web/api/v1/rrd/web/nginx.rrd b/web/api/v1/rrd/web/nginx.rrd
new file mode 100644
index 000000000..03f655c0e
Binary files /dev/null and b/web/api/v1/rrd/web/nginx.rrd differ
diff --git a/web/api/v1/rrd/web/weekly-httpd.png b/web/api/v1/rrd/web/weekly-httpd.png
new file mode 100644
index 000000000..5f9c1ce58
Binary files /dev/null and b/web/api/v1/rrd/web/weekly-httpd.png differ
diff --git a/web/api/v1/rrd/web/weekly-nginx.png b/web/api/v1/rrd/web/weekly-nginx.png
new file mode 100644
index 000000000..34cb37cbb
Binary files /dev/null and b/web/api/v1/rrd/web/weekly-nginx.png differ
diff --git a/web/api/v1/rrd/web/yearly-httpd.png b/web/api/v1/rrd/web/yearly-httpd.png
new file mode 100644
index 000000000..867c9db03
Binary files /dev/null and b/web/api/v1/rrd/web/yearly-httpd.png differ
diff --git a/web/api/v1/rrd/web/yearly-nginx.png b/web/api/v1/rrd/web/yearly-nginx.png
new file mode 100644
index 000000000..bef0d74a4
Binary files /dev/null and b/web/api/v1/rrd/web/yearly-nginx.png differ
diff --git a/web/api/v1/upload/UploadHandler.php b/web/api/v1/upload/UploadHandler.php
old mode 100644
new mode 100755
diff --git a/web/api/v1/view/file/index.php b/web/api/v1/view/file/index.php
new file mode 100644
index 000000000..6298ac09b
--- /dev/null
+++ b/web/api/v1/view/file/index.php
@@ -0,0 +1,19 @@
+