Service config feature

This commit is contained in:
Serghey Rodin 2016-08-25 19:29:36 +03:00
parent 9873dfacd0
commit b89f602f7b
47 changed files with 3499 additions and 2 deletions

View file

@ -18,6 +18,8 @@ value=$2
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin"
#----------------------------------------------------------#
# Verifications #

119
bin/v-change-sys-service-config Executable file
View file

@ -0,0 +1,119 @@
#!/bin/bash
# info: change service config
# options: CONFIG SERVICE [RESTART]
#
# The function for changing service confguration.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument definition
src=$1
service=$2
restart=$3
echo "$0 $*" >/tmp/t.log
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
check_args '2' "$#" 'CONFIG SERVICE [RESTART]'
if [ ! -e "$src" ]; then
check_result "$E_NOTEXIST" "$src config doesn't exist"
fi
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Defining dst config path
case $service in
nginx) dst='/etc/nginx/nginx.conf';;
httpd) dst='/etc/httpd/conf/httpd.conf';;
apache2) dst='/etc/apache2/apache2.conf';;
exim) dst='/etc/exim/exim.conf';;
exim4) dst='/etc/exim4/exim4.conf.template';;
vsftpd) dst=$(find /etc/vsftpd* -name 'vsftpd.conf');;
proftpd) dst=$(find /etc/proftpd* -name 'proftpd.conf');;
php) dst=$(find /etc/php* -name php.ini);;
mysql) dst=$(find /etc/my* -name my.cnf);;
mariadb) dst=$(find /etc/my* -name my.cnf);;
postgresql) dst=$($BIN/v-list-sys-pgsql-config plain |cut -f 1);;
postgresql-hba) dst=$($BIN/v-list-sys-pgsql-config plain |cut -f 2);;
dovecot) dst=$(find /etc/dovecot* -name dovecot.conf);;
dovecot-1) dst='/etc/dovecot/conf.d/10-auth.conf';;
dovecot-2) dst='/etc/dovecot/conf.d/10-logging.conf';;
dovecot-3) dst='/etc/dovecot/conf.d/10-mail.conf';;
dovecot-4) dst='/etc/dovecot/conf.d/10-master.conf';;
dovecot-5) dst='/etc/dovecot/conf.d/10-ssl.conf';;
dovecot-6) dst='/etc/dovecot/conf.d/20-imap.conf';;
dovecot-7) dst='/etc/dovecot/conf.d/20-pop3.conf';;
dovecot-8) dst='/etc/dovecot/conf.d/auth-passwdfile.conf.ext';;
named) dst='/etc/named.conf';;
bind9) dst='/etc/bind/named.conf';;
bind9-opt) dst='/etc/bind/named.conf.options';;
spamd) dst=$($BIN/v-list-sys-spamd-config plain);;
spamassassin) dst=$($BIN/v-list-sys-spamd-config plain);;
clamd) dst=$($BIN/v-list-sys-clamd-config plain);;
cron) dst='/etc/crontab';;
crond) dst='/etc/crontab';;
fail2ban) dst='/etc/fail2ban/jail.local';;
*) check_result $E_NOTEXIST "service $service doesn't exist"
esac
# Checking config path
for config in $dst; do
if [ ! -e "$config" ]; then
check_result $E_NOTEXIST "$service config doesn't exist"
fi
done
# Checking diff between src and dst configs
for config in $dst; do
diff -q $src $config >/dev/null
if [ $? -ne 0 ]; then
cp $config $config.vst.back
cp $src $config
update="yes"
fi
done
# Restarting service
if [ "$update" = 'yes' ] && [ "$restart" != 'no' ]; then
if [ "$service" = 'php' ]; then
if [ "$WEB_SYSTEM" = "nginx" ]; then
service=$WEB_BACKEND
else
service=$WEB_SYSTEM
fi
fi
if [[ "$service" =~ - ]]; then
service=$(echo ${service%-*})
fi
service $service restart >/dev/null 2>&1
if [ $? -ne 0 ]; then
for config in $dst; do
mv -f $config.vst.back $config
done
check_result $E_RESTART "$service failed to start with new config"
fi
fi
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
# Logging
log_event "$OK" "$ARGUMENTS"
exit

73
bin/v-list-sys-clamd-config Executable file
View file

@ -0,0 +1,73 @@
#!/bin/bash
# info: list clamd config parameters
# options: [FORMAT]
#
# The function for obtaining the list of clamd config parameters.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument definition
format=${1-shell}
# Includes
source $VESTA/func/main.sh
# JSON list function
json_list() {
echo '{
"CONFIG": {
"config_path": "'$config_path'"
}
}'
}
# SHELL list function
shell_list() {
echo "config_path: $config_path"
}
# PLAIN list function
plain_list() {
echo "$config_path"
}
# CSV list function
csv_list() {
echo "config_path"
echo "$config_path"
}
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Defining config path
if [ -e '/etc/clamav/clamd.conf' ]; then
config_path='/etc/clamav/clamd.conf'
else
if [ -e '/etc/clamd.conf' ]; then
config_path='/etc/clamd.conf'
fi
if [ -e '/etc/clamd.d/clamd.conf' ]; then
config_path='/etc/clamav/clamd.conf'
fi
fi
# Listing data
case $format in
json) json_list ;;
plain) plain_list ;;
csv) csv_list ;;
shell) shell_list;;
esac
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit

103
bin/v-list-sys-dovecot-config Executable file
View file

@ -0,0 +1,103 @@
#!/bin/bash
# info: list dovecot config parameters
# options: [FORMAT]
#
# The function for obtaining the list of dovecot config parameters.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument definition
format=${1-shell}
# Includes
source $VESTA/func/main.sh
# JSON list function
json_list() {
echo '{
"CONFIG": {
"config_path": "'$config_path'",
"config_path1": "'$config_path1'",
"config_path2": "'$config_path2'",
"config_path3": "'$config_path3'",
"config_path4": "'$config_path4'",
"config_path5": "'$config_path5'",
"config_path6": "'$config_path6'",
"config_path7": "'$config_path7'",
"config_path8": "'$config_path8'"
}
}'
}
# SHELL list function
shell_list() {
echo "config_path: $config_path"
echo "config_path1: $config_path1"
echo "config_path2: $config_path2"
echo "config_path3: $config_path3"
echo "config_path4: $config_path4"
echo "config_path5: $config_path5"
echo "config_path6: $config_path6"
echo "config_path7: $config_path7"
echo "config_path8: $config_path8"
}
# PLAIN list function
plain_list() {
echo -en "$config_path\t"
echo -en "$config_path1\t"
echo -en "$config_path2\t"
echo -en "$config_path3\t"
echo -en "$config_path4\t"
echo -en "$config_path5\t"
echo -en "$config_path6\t"
echo -en "$config_path7\t"
echo -e "$config_path8\t"
}
# CSV list function
csv_list() {
echo -n "config_path,config_path1,config_path2,config_path3,"
echo "config_path4,config_path5,config_path6,config_path7,config_path8"
echo -n "$config_path,$config_path1,$config_path2,$config_path3,"
echo -n "$config_path4,$config_path5,$config_path6,$config_path7,"
echo "$config_path8"
}
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Defining config path
if [ -e '/etc/dovecot.conf' ]; then
config_path='/etc/dovecot.conf'
else
config_path='/etc/dovecot/dovecot.conf'
config_path1='/etc/dovecot/conf.d/10-auth.conf'
config_path2='/etc/dovecot/conf.d/10-logging.conf'
config_path3='/etc/dovecot/conf.d/10-mail.conf'
config_path4='/etc/dovecot/conf.d/10-master.conf'
config_path5='/etc/dovecot/conf.d/10-ssl.conf'
config_path6='/etc/dovecot/conf.d/20-imap.conf'
config_path7='/etc/dovecot/conf.d/20-pop3.conf'
config_path8='/etc/dovecot/conf.d/auth-passwdfile.conf.ext'
fi
# Listing data
case $format in
json) json_list ;;
plain) plain_list ;;
csv) csv_list ;;
shell) shell_list;;
esac
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit

82
bin/v-list-sys-mysql-config Executable file
View file

@ -0,0 +1,82 @@
#!/bin/bash
# info: list mysql config parameters
# options: [FORMAT]
#
# The function for obtaining the list of mysql config parameters.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument definition
format=${1-shell}
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
# JSON list function
json_list() {
eval $(echo "$config"|egrep "$keys"|\
sed -e "s/[ ]*=/=/" -e "s/=[ ]*/=\'/" -e "s/$/'/")
echo '{
"CONFIG": {
"max_user_connections": "'$max_user_connections'",
"max_connections": "'$max_connections'",
"wait_timeout": "'$wait_timeout'",
"interactive_timeout": "'$interactive_timeout'",
"max_allowed_packet": "'$max_allowed_packet'",
"config_path": "'$config_path'"
}
}'
}
# SHELL list function
shell_list() {
echo "$config" |egrep "$keys" |tr '=' ' '
echo "config_path $config_path"
}
# PLAIN list function
plain_list() {
echo "$config" |egrep "$keys" |tr '=' ' '
echo "config_path $config_path"
}
# CSV list function
csv_list() {
echo "$keys" |sed "s/|/,/g"
echo "$config" |egrep "$keys" |tr '=' ' ' |awk '{print $2}' |tr '\n' ','
echo
}
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Defining config path
config_path=$(find /etc/my* -name my.cnf)
# Defining keys
keys="max_user_connections|max_connections|wait_timeout|interactive_timeout"
keys="${keys}|max_allowed_packet"
# Reading config
config=$(cat $config_path|grep -v "^;")
# Listing data
case $format in
json) json_list ;;
plain) plain_list ;;
csv) csv_list ;;
shell) shell_list |column -t;;
esac
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit

88
bin/v-list-sys-nginx-config Executable file
View file

@ -0,0 +1,88 @@
#!/bin/bash
# info: list nginx config parameters
# options: [FORMAT]
#
# The function for obtaining the list of nginx config parameters.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument definition
format=${1-shell}
# Includes
source $VESTA/func/main.sh
# JSON list function
json_list() {
eval $(echo "$config" |egrep "$keys" |tr -d ';'| awk '{print $1"="$2}')
echo '{
"CONFIG": {
"worker_processes": "'$worker_processes'",
"worker_connections": "'$worker_connections'",
"send_timeout": "'$send_timeout'",
"proxy_connect_timeout": "'$proxy_connect_timeout'",
"proxy_send_timeout": "'$proxy_send_timeout'",
"proxy_read_timeout": "'$proxy_read_timeout'",
"client_max_body_size": "'$client_max_body_size'",
"gzip": "'$gzip'",
"gzip_comp_level": "'$gzip_comp_level'",
"charset": "'$charset'",
"config_path": "'$config_path'"
}
}'
}
# SHELL list function
shell_list() {
echo "$config" |egrep "$keys" |tr -d ';'
echo "config_path $config_path"
}
# PLAIN list function
plain_list() {
echo "$config" |egrep "$keys" |tr -d ';'
echo "config_path $config_path"
}
# CSV list function
csv_list() {
echo "$keys" |sed "s/ |/,/g"
echo "$config" |egrep "$keys" |awk '{print $2}' |tr -d ';' |tr '\n' ','
echo
}
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Defining config path
config_path='/etc/nginx/nginx.conf'
# Defining keys
keys="worker_processes |worker_connections |send_timeout"
keys="$keys |proxy_connect_timeout |proxy_send_timeout"
keys="$keys |proxy_read_timeout |client_max_body_size"
keys="$keys |gzip |gzip_comp_level |charset "
# Reading nginx config
config=$(cat $config_path)
# Listing data
case $format in
json) json_list ;;
plain) plain_list ;;
csv) csv_list ;;
shell) shell_list |column -t;;
esac
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit

70
bin/v-list-sys-pgsql-config Executable file
View file

@ -0,0 +1,70 @@
#!/bin/bash
# info: list postgresql config parameters
# options: [FORMAT]
#
# The function for obtaining the list of postgresql config parameters.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument definition
format=${1-shell}
# Includes
source $VESTA/func/main.sh
# JSON list function
json_list() {
echo '{
"CONFIG": {
"pg_hba_path": "'$pg_hba_path'",
"config_path": "'$config_path'"
}
}'
}
# SHELL list function
shell_list() {
echo "config_path: $config_path"
echo "pg_hba_path: $pg_hba_path"
}
# PLAIN list function
plain_list() {
echo -e "$config_path\t$pg_hba_path"
}
# CSV list function
csv_list() {
echo "config_path,pg_hba_path"
echo "$config_path,$pg_hba_path"
}
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Defining config path
config_path=$(find /etc/postgresql /var/lib/pgsql/data -name \
postgresql.conf 2>/dev/null)
pg_hba_path=$(find /etc/postgresql /var/lib/pgsql/data -name \
pg_hba.conf 2>/dev/null)
# Listing data
case $format in
json) json_list ;;
plain) plain_list ;;
csv) csv_list ;;
shell) shell_list;;
esac
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit

94
bin/v-list-sys-php-config Executable file
View file

@ -0,0 +1,94 @@
#!/bin/bash
# info: list php config parameters
# options: [FORMAT]
#
# The function for obtaining the list of php config parameters.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument definition
format=${1-shell}
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
# JSON list function
json_list() {
eval $(echo "$config"|egrep "$keys"|\
sed -e "s/[ ]*=/=/" -e "s/=[ ]*/=\'/" -e "s/$/'/")
echo '{
"CONFIG": {
"memory_limit": "'$memory_limit'",
"max_execution_time": "'$max_execution_time'",
"max_input_time": "'$max_input_time'",
"upload_max_filesize": "'$upload_max_filesize'",
"post_max_size": "'$post_max_size'",
"display_errors": "'$display_errors'",
"error_reporting": "'$error_reporting'",
"config_path": "'$config_path'"
}
}'
}
# SHELL list function
shell_list() {
echo "$config" |egrep "$keys" |tr -d '='
echo "config_path $config_path"
}
# PLAIN list function
plain_list() {
echo "$config" |egrep "$keys" |tr -d '='
echo "config_path $config_path"
}
# CSV list function
csv_list() {
echo "$keys" |sed "s/ |/,/g"
echo "$config" |egrep "$keys" |tr -d '=' |awk '{print $2}' |tr '\n' ','
echo
}
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Defining config path
config_path=$(find /etc/php* -name php.ini)
config_count=$(echo "$config_path" |wc -l)
if [ "$config_count" -gt 1 ]; then
if [ "$WEB_SYSTEM" = "nginx" ]; then
config_path=$(echo "$config_path"| grep fpm)
else
config_path=$(echo "$config_path"| grep apache)
fi
fi
# Defining keys
keys="memory_limit |max_execution_time |max_input_time"
keys="$keys |upload_max_filesize |post_max_size"
keys="$keys |display_errors |error_reporting "
# Reading config
config=$(cat $config_path|grep -v "^;")
# Listing data
case $format in
json) json_list ;;
plain) plain_list ;;
csv) csv_list ;;
shell) shell_list |column -t;;
esac
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit

64
bin/v-list-sys-proftpd-config Executable file
View file

@ -0,0 +1,64 @@
#!/bin/bash
# info: list proftpd config parameters
# options: [FORMAT]
#
# The function for obtaining the list of proftpd config parameters.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument definition
format=${1-shell}
# Includes
source $VESTA/func/main.sh
# JSON list function
json_list() {
echo '{
"CONFIG": {
"config_path": "'$config_path'"
}
}'
}
# SHELL list function
shell_list() {
echo "config_path: $config_path"
}
# PLAIN list function
plain_list() {
echo "$config_path"
}
# CSV list function
csv_list() {
echo "config_path"
echo "$config_path"
}
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Defining config path
config_path=$(find /etc/proftpd* -name proftpd.conf 2>/dev/null)
# Listing data
case $format in
json) json_list ;;
plain) plain_list ;;
csv) csv_list ;;
shell) shell_list;;
esac
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit

64
bin/v-list-sys-spamd-config Executable file
View file

@ -0,0 +1,64 @@
#!/bin/bash
# info: list spamassassin config parameters
# options: [FORMAT]
#
# The function for obtaining the list of spamassassin config parameters.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument definition
format=${1-shell}
# Includes
source $VESTA/func/main.sh
# JSON list function
json_list() {
echo '{
"CONFIG": {
"config_path": "'$config_path'"
}
}'
}
# SHELL list function
shell_list() {
echo "config_path: $config_path"
}
# PLAIN list function
plain_list() {
echo "$config_path"
}
# CSV list function
csv_list() {
echo "config_path"
echo "$config_path"
}
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Defining config path
config_path=$(find /etc/spamassassin /etc/mail -name local.cf 2>/dev/null)
# Listing data
case $format in
json) json_list ;;
plain) plain_list ;;
csv) csv_list ;;
shell) shell_list;;
esac
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit

64
bin/v-list-sys-vsftpd-config Executable file
View file

@ -0,0 +1,64 @@
#!/bin/bash
# info: list vsftpd config parameters
# options: [FORMAT]
#
# The function for obtaining the list of vsftpd config parameters.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument definition
format=${1-shell}
# Includes
source $VESTA/func/main.sh
# JSON list function
json_list() {
echo '{
"CONFIG": {
"config_path": "'$config_path'"
}
}'
}
# SHELL list function
shell_list() {
echo "config_path: $config_path"
}
# PLAIN list function
plain_list() {
echo "$config_path"
}
# CSV list function
csv_list() {
echo "config_path"
echo "$config_path"
}
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Defining config path
config_path=$(find /etc/vsftpd* -name vsftpd.conf 2>/dev/null)
# Listing data
case $format in
json) json_list ;;
plain) plain_list ;;
csv) csv_list ;;
shell) shell_list;;
esac
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit

47
bin/v-open-fs-config Executable file
View file

@ -0,0 +1,47 @@
#!/bin/bash
# info: open config
# options: CONFIG
#
# The function opens/reads config files on the file system
src_file=$1
# Checking arguments
if [ -z "$src_file" ]; then
echo "Usage: CONFIG"
exit 1
fi
# Checking vesta user
if [ ! -e "$VESTA/data/users/$user" ]; then
echo "Error: vesta user $user doesn't exist"
exit 3
fi
# Checking file on fs
if [ ! -e "$src_file" ]; then
echo "Error: $src_file file doesn't exist"
exit 3
fi
# Checking path
if [ ! -z "$src_file" ]; then
rpath=$(readlink -f "$src_file")
services="nginx|apache|httpd|php|ftp|bind|named|exim|dovecot|spamassassin"
services="$services|clam|mysql|postgresql|pgsql|cron|fail2ban|iptables"
spath=$(echo "$rpath" |egrep "$services")
if [ -z "$spath" ]; then
echo "Error: invalid source path $src_file"
exit 2
fi
fi
# Reading conf
cat "$src_file" 2>/dev/null
if [ $? -ne 0 ]; then
echo "Error: file $src_file was not opened"
exit 3
fi
# Exiting
exit

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." apache2 ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = '/etc/apache2/apache2.conf';
$v_service_name = strtoupper('apache2');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_httpd');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,73 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update options
if (!empty($_POST['v_options'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_options']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." bind9-opt ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Update config
if ((empty($_SESSION['error_msg'])) && (!empty($_POST['v_config']))) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." bind9 ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_options_path = '/etc/bind/named.conf.options';
$v_config_path = '/etc/bind/named.conf';
$v_service_name = strtoupper('bind9');
// Read config
$v_options = shell_exec(VESTA_CMD."v-open-fs-config ".$v_options_path);
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_bind9');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." clamd ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = shell_exec(VESTA_CMD.'v-list-sys-clamd-config plain');
$v_service_name = strtoupper('clamav');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_service');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." cron ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = '/etc/crontab';
$v_service_name = strtoupper('cron');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_service');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." crond ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = '/etc/crontab';
$v_service_name = strtoupper('cron');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_service');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,183 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Update config1
if ((empty($_SESSION['error_msg'])) && (!empty($_POST['v_config1']))) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config1']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-1 " .$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Update config2
if ((empty($_SESSION['error_msg'])) && (!empty($_POST['v_config2']))) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config2']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-2 " .$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Update config3
if ((empty($_SESSION['error_msg'])) && (!empty($_POST['v_config3']))) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config3']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-3 " .$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Update config4
if ((empty($_SESSION['error_msg'])) && (!empty($_POST['v_config4']))) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config4']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-4 " .$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Update config5
if ((empty($_SESSION['error_msg'])) && (!empty($_POST['v_config5']))) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config5']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-5 " .$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Update config6
if ((empty($_SESSION['error_msg'])) && (!empty($_POST['v_config6']))) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config6']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-6 " .$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Update config7
if ((empty($_SESSION['error_msg'])) && (!empty($_POST['v_config7']))) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config7']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-7 " .$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Update config8
if ((empty($_SESSION['error_msg'])) && (!empty($_POST['v_config8']))) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config8']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-8 " .$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
// List config
exec (VESTA_CMD."v-list-sys-dovecot-config json", $output, $return_var);
$data = json_decode(implode('', $output), true);
unset($output);
$v_config_path = $data['CONFIG']['config_path'];
$v_config_path1 = $data['CONFIG']['config_path1'];
$v_config_path2 = $data['CONFIG']['config_path2'];
$v_config_path3 = $data['CONFIG']['config_path3'];
$v_config_path4 = $data['CONFIG']['config_path4'];
$v_config_path5 = $data['CONFIG']['config_path5'];
$v_config_path6 = $data['CONFIG']['config_path6'];
$v_config_path7 = $data['CONFIG']['config_path7'];
$v_config_path8 = $data['CONFIG']['config_path8'];
$v_service_name = strtoupper('dovecot');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
if (!empty($v_config_path1)) $v_config1 = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path1);
if (!empty($v_config_path2)) $v_config2 = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path2);
if (!empty($v_config_path3)) $v_config3 = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path3);
if (!empty($v_config_path4)) $v_config4 = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path4);
if (!empty($v_config_path5)) $v_config5 = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path5);
if (!empty($v_config_path6)) $v_config6 = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path6);
if (!empty($v_config_path7)) $v_config7 = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path7);
if (!empty($v_config_path8)) $v_config8 = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path8);
// Render page
render_page($user, $TAB, 'edit_server_dovecot');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." exim ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = '/etc/exim/exim.conf';
$v_service_name = strtoupper('exim');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_service');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." exim4 ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = '/etc/exim4/exim4.conf.template';
$v_service_name = strtoupper('exim');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_service');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." fail2ban ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = '/etc/fail2ban/jail.local';
$v_service_name = strtoupper('fail2ban');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_service');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." httpd ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = '/etc/httpd/conf/httpd.conf';
$v_service_name = strtoupper('httpd');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_httpd');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,10 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
header("Location: /list/firewall");
exit;

View file

@ -0,0 +1,67 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." mariadb ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
// List config
exec (VESTA_CMD."v-list-sys-mysql-config json", $output, $return_var);
$data = json_decode(implode('', $output), true);
unset($output);
$v_max_user_connections = $data['CONFIG']['max_user_connections'];
$v_max_connections = $data['CONFIG']['max_connections'];
$v_wait_timeout = $data['CONFIG']['wait_timeout'];
$v_interactive_timeout = $data['CONFIG']['interactive_timeout'];
$v_max_allowed_packet = $data['CONFIG']['max_allowed_packet'];
$v_config_path = $data['CONFIG']['config_path'];
$v_service_name = strtoupper('mariadb');
# Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_mysql');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,67 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." mysql ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
// List config
exec (VESTA_CMD."v-list-sys-mysql-config json", $output, $return_var);
$data = json_decode(implode('', $output), true);
unset($output);
$v_max_user_connections = $data['CONFIG']['max_user_connections'];
$v_max_connections = $data['CONFIG']['max_connections'];
$v_wait_timeout = $data['CONFIG']['wait_timeout'];
$v_interactive_timeout = $data['CONFIG']['interactive_timeout'];
$v_max_allowed_packet = $data['CONFIG']['max_allowed_packet'];
$v_config_path = $data['CONFIG']['config_path'];
$v_service_name = strtoupper('mysql');
# Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_mysql');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,67 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." mysqld ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
// List config
exec (VESTA_CMD."v-list-sys-mysql-config json", $output, $return_var);
$data = json_decode(implode('', $output), true);
unset($output);
$v_max_user_connections = $data['CONFIG']['max_user_connections'];
$v_max_connections = $data['CONFIG']['max_connections'];
$v_wait_timeout = $data['CONFIG']['wait_timeout'];
$v_interactive_timeout = $data['CONFIG']['interactive_timeout'];
$v_max_allowed_packet = $data['CONFIG']['max_allowed_packet'];
$v_config_path = $data['CONFIG']['config_path'];
$v_service_name = strtoupper('mysql');
# Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_mysql');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." named ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = '/etc/named.conf';
$v_service_name = strtoupper('named');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_service');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,68 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." php ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
// List config
exec (VESTA_CMD."v-list-sys-php-config json", $output, $return_var);
$data = json_decode(implode('', $output), true);
unset($output);
$v_memory_limit = $data['CONFIG']['memory_limit'];
$v_max_execution_time = $data['CONFIG']['max_execution_time'];
$v_max_input_time = $data['CONFIG']['max_input_time'];
$v_upload_max_filesize = $data['CONFIG']['upload_max_filesize'];
$v_post_max_size = $data['CONFIG']['post_max_size'];
$v_display_errors = $data['CONFIG']['display_errors'];
$v_error_reporting = $data['CONFIG']['error_reporting'];
$v_config_path = $data['CONFIG']['config_path'];
# Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_php');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,68 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." php ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
// List config
exec (VESTA_CMD."v-list-sys-php-config json", $output, $return_var);
$data = json_decode(implode('', $output), true);
unset($output);
$v_memory_limit = $data['CONFIG']['memory_limit'];
$v_max_execution_time = $data['CONFIG']['max_execution_time'];
$v_max_input_time = $data['CONFIG']['max_input_time'];
$v_upload_max_filesize = $data['CONFIG']['upload_max_filesize'];
$v_post_max_size = $data['CONFIG']['post_max_size'];
$v_display_errors = $data['CONFIG']['display_errors'];
$v_error_reporting = $data['CONFIG']['error_reporting'];
$v_config_path = $data['CONFIG']['config_path'];
# Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_php');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,78 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update option
if (!empty($_POST['v_options'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_options']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." postgresql-hba ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Update config
if ((empty($_SESSION['error_msg'])) && (!empty($_POST['v_config']))) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." postgresql " .$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
// List config
exec (VESTA_CMD."v-list-sys-pgsql-config json", $output, $return_var);
$data = json_decode(implode('', $output), true);
unset($output);
$v_options_path = $data['CONFIG']['pg_hba_path'];
$v_config_path = $data['CONFIG']['config_path'];
$v_service_name = strtoupper('postgresql');
// Read config
$v_options = shell_exec(VESTA_CMD."v-open-fs-config ".$v_options_path);
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_pgsql');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." proftpd ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = shell_exec(VESTA_CMD.'v-list-sys-proftpd-config plain');
$v_service_name = strtoupper('proftpd');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_service');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." spamassassin ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = shell_exec(VESTA_CMD.'v-list-sys-spamd-config plain');
$v_service_name = strtoupper('spamassassin');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_service');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." spamd ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = shell_exec(VESTA_CMD.'v-list-sys-spamd-config plain');
$v_service_name = strtoupper('spamassassin');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_service');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

View file

@ -0,0 +1,58 @@
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
}
// Set restart flag
$v_restart = 'yes';
if (empty($_POST['v_restart'])) $v_restart = 'no';
// Update config
if (!empty($_POST['v_config'])) {
exec ('mktemp', $mktemp_output, $return_var);
$new_conf = $mktemp_output[0];
$fp = fopen($new_conf, 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config']));
fclose($new_conf);
exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." vsftpd ".$v_restart, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
unlink($new_conf);
}
// Set success message
if (empty($_SESSION['error_msg'])) {
$_SESSION['ok_msg'] = __('Changes has been saved.');
}
}
$v_config_path = shell_exec(VESTA_CMD.'v-list-sys-vsftpd-config plain');
$v_service_name = strtoupper('vsftpd');
// Read config
$v_config = shell_exec(VESTA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_service');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);

BIN
web/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -0,0 +1,41 @@
function toggleOptions(){
if($('#advanced-options').is(':visible')){
$.removeCookie('advanced');
$('#advanced-options').hide();
$('#basic-options').show();
} else {
$.cookie('advanced', 1);
$('#advanced-options').show();
$('#basic-options').hide();
var advance_options = $('#advanced-options textarea');
$('#vstobjects input[type=text]').each(function(i, elm){
var search = $(elm).attr('regexp');
var prev_value = $(elm).attr('prev_value');
$(elm).attr('prev_value', $(elm).val());
var regexp = new RegExp('^('+search+')(.+)('+prev_value+')', 'm');
advance_options.val(advance_options.val().replace(regexp, '$1$2' + $(elm).val()));
})
}
}
$('#vstobjects').submit(function(){
if($('#basic-options').is(':visible')){
var advance_options = $('#advanced-options textarea');
$('#vstobjects input[type=text]').each(function(i, elm){
var search = $(elm).attr('regexp');
var prev_value = $(elm).attr('prev_value');
$(elm).attr('prev_value', $(elm).val());
var regexp = new RegExp('^('+search+')(.+)('+prev_value+')', 'm');
advance_options.val(advance_options.val().replace(regexp, '$1$2' + $(elm).val()));
})
}
});
$(document).ready(function() {
if($.cookie('advanced')){
toggleOptions();
}
});

View file

@ -0,0 +1,41 @@
function toggleOptions(){
if($('#advanced-options').is(':visible')){
$.removeCookie('advanced');
$('#advanced-options').hide();
$('#basic-options').show();
} else {
$.cookie('advanced', 1);
$('#advanced-options').show();
$('#basic-options').hide();
var advance_options = $('#advanced-options textarea');
$('#vstobjects input[type=text]').each(function(i, elm){
var search = $(elm).attr('regexp');
var prev_value = $(elm).attr('prev_value');
$(elm).attr('prev_value', $(elm).val());
var regexp = new RegExp('('+search+')(.+)('+prev_value+')');
advance_options.val(advance_options.val().replace(regexp, '$1$2' + $(elm).val()));
})
}
}
$('#vstobjects').submit(function(){
if($('#basic-options').is(':visible')){
var advance_options = $('#advanced-options textarea');
$('#vstobjects input[type=text]').each(function(i, elm){
var search = $(elm).attr('regexp');
var prev_value = $(elm).attr('prev_value');
$(elm).attr('prev_value', $(elm).val());
var regexp = new RegExp('('+search+')(.+)('+prev_value+')');
advance_options.val(advance_options.val().replace(regexp, '$1$2' + $(elm).val()));
})
}
});
$(document).ready(function() {
if($.cookie('advanced')){
toggleOptions();
}
});

View file

@ -0,0 +1,41 @@
function toggleOptions(){
if($('#advanced-options').is(':visible')){
$.removeCookie('advanced');
$('#advanced-options').hide();
$('#basic-options').show();
} else {
$.cookie('advanced', 1);
$('#advanced-options').show();
$('#basic-options').hide();
var advance_options = $('#advanced-options textarea');
$('#vstobjects input[type=text]').each(function(i, elm){
var search = $(elm).attr('regexp');
var prev_value = $(elm).attr('prev_value');
$(elm).attr('prev_value', $(elm).val());
var regexp = new RegExp('^('+search+')(.+)('+prev_value+')', 'm');
advance_options.val(advance_options.val().replace(regexp, '$1$2' + $(elm).val()));
})
}
}
$('#vstobjects').submit(function(){
if($('#basic-options').is(':visible')){
var advance_options = $('#advanced-options textarea');
$('#vstobjects input[type=text]').each(function(i, elm){
var search = $(elm).attr('regexp');
var prev_value = $(elm).attr('prev_value');
$(elm).attr('prev_value', $(elm).val());
var regexp = new RegExp('^('+search+')(.+)('+prev_value+')', 'm');
advance_options.val(advance_options.val().replace(regexp, '$1$2' + $(elm).val()));
})
}
});
$(document).ready(function() {
if($.cookie('advanced')){
toggleOptions();
}
});

View file

@ -0,0 +1,92 @@
<div class="l-center edit">
<div class="l-sort clearfix">
<div class="l-sort-toolbar clearfix float-left subtitle">
<table class="width-100p">
<tbody><tr>
<td>
<span class="vst selected"><?=__('Configuring Server')?> / <?php print $v_service_name ?></span>
</td>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<td><span class=\"vst-error\"> → ".htmlentities($_SESSION['error_msg'])."</span></td>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<td><span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span></td>";
}
}
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="l-separator"></div>
<!-- /.l-separator -->
<div class="l-center">
<?php
$back = $_SESSION['back'];
if (empty($back)) {
$back = "location.href='/list/server/'";
} else {
$back = "location.href='".$back."'";
}
?>
<form id="vstobjects" name="v_configure_server" method="post">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<input type="hidden" name="save" value="save" />
<table class="data mode-add">
<tr class="data-add">
<td class="data-dotted">
<table class="data-col1">
<tr><td></td></tr>
</table>
</td>
<td>
<table class="data-col2" width="600px">
<tr>
<td class="vst-text step-top">
<?php print $v_options_path ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_options"><?php echo $v_options;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config"><?php echo $v_config;?></textarea>
</td>
</tr>
<td class="vst-text input-label" style="text-transform: capitalize;">
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_restart" checked="yes"> <?php print __('restart');?></label>
</td>
</table>
<table class="data-col2">
<tr>
<td class="step-top" width="116px">
<input type="submit" class="button" name="save" value="<?php print __('Save');?>">
</td>
<td class="step-top">
<input type="button" class="button cancel" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>

View file

@ -0,0 +1,171 @@
<div class="l-center edit">
<div class="l-sort clearfix">
<div class="l-sort-toolbar clearfix float-left subtitle">
<table class="width-100p">
<tbody><tr>
<td>
<span class="vst selected"><?=__('Configuring Server')?> / <?php print $v_service_name ?></span>
</td>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<td><span class=\"vst-error\"> → ".htmlentities($_SESSION['error_msg'])."</span></td>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<td><span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span></td>";
}
}
?>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="l-separator"></div>
<!-- /.l-separator -->
<div class="l-center">
<?php
$back = $_SESSION['back'];
if (empty($back)) {
$back = "location.href='/list/server/'";
} else {
$back = "location.href='".$back."'";
}
?>
<form id="vstobjects" name="v_configure_server" method="post">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<input type="hidden" name="save" value="save" />
<table class="data mode-add">
<tr class="data-add">
<td class="data-dotted">
<table class="data-col1">
<tr><td></td></tr>
</table>
</td>
<td>
<table class="data-col2" width="600px">
<tr>
<td class="vst-text step-top">
<?php print $v_config_path ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config"><?php echo $v_config;?></textarea>
</td>
</tr>
<?php if (!empty($v_config_path1)) {
?>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path1 ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config1"><?php echo $v_config1;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path2 ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config2"><?php echo $v_config2;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path3 ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config3"><?php echo $v_config3;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path4 ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config4"><?php echo $v_config4;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path5 ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config5"><?php echo $v_config5;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path6 ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config6"><?php echo $v_config6;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path7 ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config7"><?php echo $v_config7;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path8 ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config8"><?php echo $v_config8;?></textarea>
</td>
</tr>
<?php } ?>
<td class="vst-text input-label" style="text-transform: capitalize;">
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_restart" checked="yes"> <?php print __('restart');?></label>
</td>
</table>
<table class="data-col2">
<tr>
<td class="step-top" width="116px">
<input type="submit" class="button" name="save" value="<?php print __('Save');?>">
</td>
<td class="step-top">
<input type="button" class="button cancel" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>

View file

@ -0,0 +1,86 @@
<div class="l-center edit">
<div class="l-sort clearfix">
<div class="l-sort-toolbar clearfix float-left subtitle">
<table class="width-100p">
<tbody><tr>
<td>
<span class="vst selected"><?=__('Configuring Server')?> / <?php print $v_service_name ?></span>
<a href="/edit/server/php/" class="vst"><?= __('Configure')." php.ini"?></a>
</td>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<td><span class=\"vst-error\"> → ".htmlentities($_SESSION['error_msg'])."</span></td>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<td><span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span></td>";
}
}
?>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="l-separator"></div>
<!-- /.l-separator -->
<div class="l-center">
<?php
$back = $_SESSION['back'];
if (empty($back)) {
$back = "location.href='/list/server/'";
} else {
$back = "location.href='".$back."'";
}
?>
<form id="vstobjects" name="v_configure_server" method="post">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<input type="hidden" name="save" value="save" />
<table class="data mode-add">
<tr class="data-add">
<td class="data-dotted">
<table class="data-col1">
<tr><td></td></tr>
</table>
</td>
<td class="data-dotted">
<table class="data-col2" width="600px">
<tr>
<td class="vst-text step-top">
<?php print $v_config_path ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config"><?php echo $v_config;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text input-label" style="text-transform: capitalize;">
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_restart" checked="yes"> <?php print __('restart');?></label>
</td>
</tr>
</table>
<table class="data-col2">
<tr>
<td class="step-top" width="116px">
<input type="submit" class="button" name="save" value="<?php print __('Save');?>">
</td>
<td class="step-top">
<input type="button" class="button cancel" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>

View file

@ -0,0 +1,155 @@
<div class="l-center edit">
<div class="l-sort clearfix">
<div class="l-sort-toolbar clearfix float-left subtitle">
<table class="width-100p">
<tbody><tr>
<td>
<span class="vst selected"><?=__('Configuring Server')?> / <?php print $v_service_name ?></span>
</td>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<td><span class=\"vst-error\"> → ".htmlentities($_SESSION['error_msg'])."</span></td>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<td><span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span></td>";
}
}
?>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="l-separator"></div>
<!-- /.l-separator -->
<div class="l-center">
<?php
$back = $_SESSION['back'];
if (empty($back)) {
$back = "location.href='/list/server/'";
} else {
$back = "location.href='".$back."'";
}
?>
<form id="vstobjects" name="v_configure_server" method="post">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<input type="hidden" name="save" value="save" />
<table class="data mode-add">
<tr class="data-add">
<td class="data-dotted">
<table class="data-col1">
<tr><td></td></tr>
</table>
</td>
<td class="data-dotted">
<table class="data-col2" width="600px" id="basic-options">
<tr>
<td class="vst-text step-top">
max_connections
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="max_connections" prev_value="<?=htmlentities($v_max_connections)?>" name="v_max_connections" value="<?=htmlentities($v_max_connections)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
max_user_connections
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="max_user_connections" prev_value="<?=htmlentities($v_max_user_connections)?>" name="v_max_user_connections" value="<?=htmlentities($v_max_user_connections)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
wait_timeout
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="memory_limit" prev_value="<?=htmlentities($v_wait_timeout)?>" name="v_wait_timeout" value="<?=htmlentities($v_wait_timeout)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
interactive_timeout
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="interactive_timeout" prev_value="<?=htmlentities($v_interactive_timeout)?>" name="v_interactive_timeout" value="<?=htmlentities($v_interactive_timeout)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
max_allowed_packet
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="max_allowed_packet" prev_value="<?=htmlentities($v_max_allowed_packet)?>" name="v_display_errors" value="<?=htmlentities($v_max_allowed_packet)?>">
<br><br>
</td>
</tr>
<tr>
<tr>
<td class="vst-text input-label">
<a href="javascript:toggleOptions();" class="vst-advanced"><?=__('Advanced options')?></a>
</td>
</tr>
</table>
<table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advanced-options">
<tr>
<td class="vst-text input-label">
<a href="javascript:toggleOptions();" class="vst-advanced"><?=__('Basic options')?></a>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config"><?php echo $v_config;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text input-label" style="text-transform: capitalize;">
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_restart" checked="yes"> <?php print __('restart');?></label>
</td>
</tr>
</table>
<table class="data-col2">
<tr>
<td class="step-top" width="116px">
<input type="submit" class="button" name="save" value="<?php print __('Save');?>">
</td>
<td class="step-top">
<input type="button" class="button cancel" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>

View file

@ -0,0 +1,213 @@
<div class="l-center edit">
<div class="l-sort clearfix">
<div class="l-sort-toolbar clearfix float-left subtitle">
<table class="width-100p">
<tbody><tr>
<td>
<span class="vst selected"><?=__('Configuring Server')?> / <?php print $v_service_name ?></span>
<a href="/edit/server/php/" class="vst"><?= __('Configure')." php.ini"?></a>
</td>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<td><span class=\"vst-error\"> → ".htmlentities($_SESSION['error_msg'])."</span></td>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<td><span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span></td>";
}
}
?>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="l-separator"></div>
<!-- /.l-separator -->
<div class="l-center">
<?php
$back = $_SESSION['back'];
if (empty($back)) {
$back = "location.href='/list/server/'";
} else {
$back = "location.href='".$back."'";
}
?>
<form id="vstobjects" name="v_configure_server" method="post">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<input type="hidden" name="save" value="save" />
<table class="data mode-add">
<tr class="data-add">
<td class="data-dotted">
<table class="data-col1">
<tr><td></td></tr>
</table>
</td>
<td class="data-dotted">
<table class="data-col2" width="600px" id="basic-options">
<tr>
<td class="vst-text step-top">
worker_processes
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="worker_processes" prev_value="<?=htmlentities($v_worker_processes)?>" name="v_worker_processes" value="<?=htmlentities($v_worker_processes)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
worker_connections
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="worker_connections" prev_value="<?=htmlentities($v_worker_connections)?>" name="v_worker_connections" value="<?=htmlentities($v_worker_connections)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
client_max_body_size
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="client_max_body_size" prev_value="<?=htmlentities($v_client_max_body_size)?>" name="v_client_max_body_size" value="<?=htmlentities($v_client_max_body_size)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
send_timeout
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="send_timeout" prev_value="<?=htmlentities($v_send_timeout)?>" name="v_send_timeout" value="<?=htmlentities($v_send_timeout)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
proxy_connect_timeout
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="proxy_connect_timeout" prev_value="<?=htmlentities($v_proxy_connect_timeout)?>" name="v_proxy_connect_timeout" value="<?=htmlentities($v_proxy_connect_timeout)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
proxy_send_timeout
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="proxy_send_timeout" prev_value="<?=htmlentities($v_proxy_send_timeout)?>" name="v_proxy_send_timeout" value="<?=htmlentities($v_proxy_send_timeout)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
proxy_read_timeout
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="proxy_read_timeout" prev_value="<?=htmlentities($v_proxy_read_timeout)?>" name="v_proxy_read_timeout" value="<?=htmlentities($v_proxy_read_timeout)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
gzip
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="gzip" prev_value="<?=htmlentities($v_gzip)?>" name="v_gzip" value="<?=htmlentities($v_gzip)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
gzip_comp_level
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="gzip_comp_level" prev_value="<?=htmlentities($v_gzip_comp_level)?>" name="v_gzip_comp_level" value="<?=htmlentities($v_gzip_comp_level)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
charset
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="charset" prev_value="<?=htmlentities($v_charset)?>" name="v_charset" value="<?=htmlentities($v_charset)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text input-label">
<a href="javascript:toggleOptions();" class="vst-advanced"><?php print __('Advanced options');?></a>
</td>
</tr>
</table>
<table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advanced-options">
<tr>
<td class="vst-text input-label">
<a href="javascript:toggleOptions();" class="vst-advanced"><?php print __('Basic options');?></a>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config"><?php echo $v_config;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text input-label" style="text-transform: capitalize;">
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_restart" checked="yes"> <?php print __('restart');?></label>
</td>
</tr>
</table>
<table class="data-col2">
<tr>
<td class="step-top" width="116px">
<input type="submit" class="button" name="save" value="<?php print __('Save');?>">
</td>
<td class="step-top">
<input type="button" class="button cancel" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>

View file

@ -0,0 +1,92 @@
<div class="l-center edit">
<div class="l-sort clearfix">
<div class="l-sort-toolbar clearfix float-left subtitle">
<table class="width-100p">
<tbody><tr>
<td>
<span class="vst selected"><?=__('Configuring Server')?> / <?php print $v_service_name ?></span>
</td>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<td><span class=\"vst-error\"> → ".htmlentities($_SESSION['error_msg'])."</span></td>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<td><span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span></td>";
}
}
?>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="l-separator"></div>
<!-- /.l-separator -->
<div class="l-center">
<?php
$back = $_SESSION['back'];
if (empty($back)) {
$back = "location.href='/list/server/'";
} else {
$back = "location.href='".$back."'";
}
?>
<form id="vstobjects" name="v_configure_server" method="post">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<input type="hidden" name="save" value="save" />
<table class="data mode-add">
<tr class="data-add">
<td class="data-dotted">
<table class="data-col1">
<tr><td></td></tr>
</table>
</td>
<td>
<table class="data-col2" width="600px">
<tr>
<td class="vst-text step-top">
<?php print $v_options_path ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_options"><?php echo $v_options;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config"><?php echo $v_config;?></textarea>
</td>
</tr>
<td class="vst-text input-label" style="text-transform: capitalize;">
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_restart" checked="yes"> <?php print __('restart');?></label>
</td>
</table>
<table class="data-col2">
<tr>
<td class="step-top" width="116px">
<input type="submit" class="button" name="save" value="<?php print __('Save');?>">
</td>
<td class="step-top">
<input type="button" class="button cancel" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>

View file

@ -0,0 +1,175 @@
<div class="l-center edit">
<div class="l-sort clearfix">
<div class="l-sort-toolbar clearfix float-left subtitle">
<table class="width-100p">
<tbody><tr>
<td>
<a href="/edit/server/<? print $_SESSION['WEB_SYSTEM']?>/" class="vst"><?=__('Configuring Server')?> / <? print strtoupper($_SESSION['WEB_SYSTEM']) ?></a>
<a href="/edit/server/php/" class="vst selected"><?= __('Configure')." php.ini"?></a>
</td>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<td><span class=\"vst-error\"> → ".htmlentities($_SESSION['error_msg'])."</span></td>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<td><span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span></td>";
}
}
?>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="l-separator"></div>
<!-- /.l-separator -->
<div class="l-center">
<?php
$back = $_SESSION['back'];
if (empty($back)) {
$back = "location.href='/list/server/'";
} else {
$back = "location.href='".$back."'";
}
?>
<form id="vstobjects" name="v_configure_server" method="post">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<input type="hidden" name="save" value="save" />
<table class="data mode-add">
<tr class="data-add">
<td class="data-dotted">
<table class="data-col1">
<tr><td></td></tr>
</table>
</td>
<td class="data-dotted">
<table class="data-col2" width="600px" id="basic-options">
<tr>
<td class="vst-text step-top">
max_execution_time
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="max_execution_time" prev_value="<?=htmlentities($v_max_execution_time)?>" name="v_max_execution_time" value="<?=htmlentities($v_max_execution_time)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
max_input_time
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="max_input_time" prev_value="<?=htmlentities($v_max_input_time)?>" name="v_worker_connections" value="<?=htmlentities($v_max_input_time)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
memory_limit
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="memory_limit" prev_value="<?=htmlentities($v_memory_limit)?>" name="v_memory_limit" value="<?=htmlentities($v_memory_limit)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
error_reporting
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="error_reporting" prev_value="<?=htmlentities($v_error_reporting)?>" name="v_error_reporting" value="<?=htmlentities($v_error_reporting)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
display_errors
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="display_errors" prev_value="<?=htmlentities($v_display_errors)?>" name="v_display_errors" value="<?=htmlentities($v_display_errors)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
post_max_size
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="post_max_size" prev_value="<?=htmlentities($v_post_max_size)?>" name="v_post_max_size" value="<?=htmlentities($v_post_max_size)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text">
upload_max_filesize
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" regexp="upload_max_filesize" prev_value="<?=htmlentities($v_upload_max_filesize)?>" name="v_upload_max_filesize" value="<?=htmlentities($v_upload_max_filesize)?>">
<br><br>
</td>
</tr>
<tr>
<td class="vst-text input-label">
<a href="javascript:toggleOptions();" class="vst-advanced"><?=__('Advanced options')?></a>
</td>
</tr>
</table>
<table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advanced-options">
<tr>
<td class="vst-text input-label">
<a href="javascript:toggleOptions();" class="vst-advanced"><?=__('Basic options')?></a>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print $v_config_path ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config"><?php echo $v_config;?></textarea>
</td>
</tr>
<td class="vst-text input-label" style="text-transform: capitalize;">
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_restart" checked="yes"> <?php print __('restart');?></label>
</td>
</table>
<table class="data-col2">
<tr>
<td class="step-top" width="116px">
<input type="submit" class="button" name="save" value="<?php print __('Save');?>">
</td>
<td class="step-top">
<input type="button" class="button cancel" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>

View file

@ -0,0 +1,84 @@
<div class="l-center edit">
<div class="l-sort clearfix">
<div class="l-sort-toolbar clearfix float-left subtitle">
<table class="width-100p">
<tbody><tr>
<td>
<span class="vst selected"><?=__('Configuring Server')?> / <?php print $v_service_name ?></span>
</td>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<td><span class=\"vst-error\"> → ".htmlentities($_SESSION['error_msg'])."</span></td>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<td><span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span></td>";
}
}
?>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="l-separator"></div>
<!-- /.l-separator -->
<div class="l-center">
<?php
$back = $_SESSION['back'];
if (empty($back)) {
$back = "location.href='/list/server/'";
} else {
$back = "location.href='".$back."'";
}
?>
<form id="vstobjects" name="v_configure_server" method="post">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<input type="hidden" name="save" value="save" />
<table class="data mode-add">
<tr class="data-add">
<td class="data-dotted">
<table class="data-col1">
<tr><td></td></tr>
</table>
</td>
<td>
<table class="data-col2" width="600px">
<tr>
<td class="vst-text step-top">
<?php print $v_config_path ?>
</td>
</tr>
<tr>
<td>
<textarea class="vst-textinput console" name="v_config"><?php echo $v_config;?></textarea>
</td>
</tr>
<tr>
<td class="vst-text input-label" style="text-transform: capitalize;">
<label><input type="checkbox" size="20" class="vst-checkbox" name="v_restart" checked="yes"> <?php print __('restart');?></label>
</td>
</tr>
</table>
<table class="data-col2">
<tr>
<td class="step-top" width="116px">
<input type="submit" class="button" name="save" value="<?php print __('Save');?>">
</td>
<td class="step-top">
<input type="button" class="button cancel" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>

View file

@ -53,6 +53,7 @@
<!-- l-unit-toolbar__col -->
<div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
<div class="actions-panel clearfix">
<div class="actions-panel__col actions-panel__configure shortcut-enter" key-action="href"><a href="/edit/server/"><?=__('configure')?> <i></i></a><span class="shortcut enter">&nbsp;&#8629;</span></div>
<div class="actions-panel__col actions-panel__restart shortcut-r" key-action="href"><a href="/restart/system/?hostname=<?php echo $sys['sysinfo']['HOSTNAME'] ?>"><?=__('restart')?> <i></i></a><span class="shortcut">&nbsp;R</span></div>
</div>
<!-- /.actions-panel -->
@ -136,6 +137,7 @@
<!-- l-unit-toolbar__col -->
<div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
<div class="actions-panel clearfix">
<div class="actions-panel__col actions-panel__configure shortcut-enter" key-action="href"><a href="/edit/server/<? echo $key ?>/"><?=__('configure')?> <i></i></a><span class="shortcut enter">&nbsp;&#8629;</span></div>
<div class="actions-panel__col actions-panel__<?=$action?> shortcut-s" key-action="href"><a href="/<?php echo $action ?>/service/?srv=<?=$key?>&token=<?=$_SESSION['token']?>"><?=__($action)?> <i></i></a><span class="shortcut">&nbsp;S</span></div>
<div class="actions-panel__col actions-panel__restart shortcut-r" key-action="href"><a href="/restart/service/?srv=<?=$key?>&token=<?=$_SESSION['token']?>"><?=__('restart')?> <i></i></a><span class="shortcut">&nbsp;R</span></div>
</div>
@ -169,8 +171,7 @@
<td>
<div class="l-unit__stat-cols clearfix">
<div class="l-unit__stat-col l-unit__stat-col--left"><?=__('CPU')?>: <b><?=$cpu?></b></div>
<div class="l-unit__stat-col l-unit__stat-col--right"><?=__('Memory')?>: <b><?=$data[$key]['MEM']?> <?=__('mb')?></b>
</div>
<div class="l-unit__stat-col l-unit__stat-col--right"><?=__('Memory')?>: <b><?=$data[$key]['MEM']?> <?=__('mb')?></b></div>
</div>
</td>
<td>