diff --git a/bin/v_list_sys_users b/bin/v_list_sys_users
deleted file mode 100755
index a5f523c9a..000000000
--- a/bin/v_list_sys_users
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/bash
-# info: list system users
-# options: [format]
-#
-# The function for obtaining the list of system users.
-
-
-#----------------------------------------------------------#
-# Variable&Function #
-#----------------------------------------------------------#
-
-# Argument defenition
-format=${1-shell}
-
-# Includes
-source $VESTA/func/main.sh
-
-# Json function
-json_list_users() {
- users=$(grep @ /etc/passwd|cut -f 1 -d :)
- int_counter=$(echo "$users" | wc -l)
- i=1
- echo '['
- for user in $users; do
- if [ "$i" -lt "$int_counter" ]; then
- echo -e "\t\"$user\","
- else
- echo -e "\t\"$user\""
- fi
- (( ++i))
- done
- echo "]"
-}
-
-# Shell function
-shell_list_users() {
- if [ -z "$nohead" ]; then
- echo "USERS"
- echo "----------"
- fi
- for user in $(grep @ /etc/passwd|cut -f 1 -d :); do
- echo "$user"
- done
-}
-
-
-#----------------------------------------------------------#
-# Action #
-#----------------------------------------------------------#
-
-# Listing domains
-case $format in
- json) json_list_users ;;
- plain) nohead=1; shell_list_users ;;
- shell) shell_list_users ;;
- *) check_args '1' '0' '[format]' ;;
-esac
-
-
-#----------------------------------------------------------#
-# Vesta #
-#----------------------------------------------------------#
-
-exit
diff --git a/web/add/ip/index.php b/web/add/ip/index.php
index a4659ed88..0f4207a2a 100644
--- a/web/add/ip/index.php
+++ b/web/add/ip/index.php
@@ -74,7 +74,7 @@ if ($_SESSION['user'] == 'admin') {
$interfaces = json_decode(implode('', $output), true);
unset($output);
- exec (VESTA_CMD."v_list_sys_users 'json'", $output, $return_var);
+ exec (VESTA_CMD."v_list_users 'json'", $output, $return_var);
$users = json_decode(implode('', $output), true);
unset($output);
diff --git a/web/add/user/index.php b/web/add/user/index.php
index b4d0f44e5..7fee600e6 100644
--- a/web/add/user/index.php
+++ b/web/add/user/index.php
@@ -87,7 +87,6 @@ if ($_SESSION['user'] == 'admin') {
$data = json_decode(implode('', $output), true);
unset($output);
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_add_user.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_user.html');
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);
diff --git a/web/css/csshover3.htc b/web/css/csshover3.htc
index 7e5c57b33..1c368895f 100644
--- a/web/css/csshover3.htc
+++ b/web/css/csshover3.htc
@@ -1,12 +1,14 @@
diff --git a/web/edit/ip/index.php b/web/edit/ip/index.php
index b780e470a..0f2e52fb1 100644
--- a/web/edit/ip/index.php
+++ b/web/edit/ip/index.php
@@ -48,7 +48,7 @@ if ($_SESSION['user'] == 'admin') {
$v_status = 'active';
}
- exec (VESTA_CMD."v_list_sys_users 'json'", $output, $return_var);
+ exec (VESTA_CMD."v_list_users 'json'", $output, $return_var);
$users = json_decode(implode('', $output), true);
unset($output);
diff --git a/web/edit/user/index.php b/web/edit/user/index.php
index 3468fce86..5c457d412 100644
--- a/web/edit/user/index.php
+++ b/web/edit/user/index.php
@@ -168,7 +168,6 @@ if ($_SESSION['user'] == 'admin') {
$_SESSION['ok_msg'] = "OK: changes has been saved.";
}
}
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_edit_user.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_user.html');
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);
@@ -240,19 +239,6 @@ if ($_SESSION['user'] == 'admin') {
unset($output);
}
- // Change Name
- if (($v_fname != $_POST['v_fname']) || ($v_lname != $_POST['v_lname']) && (empty($_SESSION['error_msg']))) {
- $v_fname = escapeshellarg($_POST['v_fname']);
- $v_lname = escapeshellarg($_POST['v_lname']);
- exec (VESTA_CMD."v_change_user_name ".$v_username." ".$v_fname." ".$v_lname, $output, $return_var);
- if ($return_var != 0) {
- $error = implode('
', $output);
- if (empty($error)) $error = 'Error: vesta did not return any output.';
- $_SESSION['error_msg'] = $error;
- }
- unset($output);
- }
-
// Change NameServers
if (($v_ns1 != $_POST['v_ns1']) || ($v_ns2 != $_POST['v_ns2']) || ($v_ns3 != $_POST['v_ns3']) || ($v_ns4 != $_POST['v_ns4']) && (empty($_SESSION['error_msg']))) {
$v_ns1 = escapeshellarg($_POST['v_ns1']);
@@ -275,7 +261,6 @@ if ($_SESSION['user'] == 'admin') {
$_SESSION['ok_msg'] = "OK: changes has been saved.";
}
}
- include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_edit_user.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/edit_user.html');
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);
diff --git a/web/inc/main.php b/web/inc/main.php
index ae9538ac1..677a88f9d 100644
--- a/web/inc/main.php
+++ b/web/inc/main.php
@@ -62,17 +62,17 @@ function humanize_usage($usage) {
if ( $usage > 1000 ) {
$usage = $usage / 1000 ;
$usage = number_format($usage, 2);
- $usage = $usage." Pb";
+ $usage = $usage." pb";
} else {
$usage = number_format($usage, 2);
- $usage = $usage." Tb";
+ $usage = $usage." tb";
}
} else {
$usage = number_format($usage, 2);
- $usage = $usage." Gb";
+ $usage = $usage." gb";
}
} else {
- $usage = $usage." Mb";
+ $usage = $usage." mb";
}
return $usage;
}
@@ -114,4 +114,27 @@ function send_email($to,$subject,$mailtext,$from) {
mail($to, $subject, $message, $header);
}
+function display_error_block() {
+ if (!empty($_SESSION['error_msg'])) {
+ echo '
+
+
+
';
+ echo $_SESSION['error_msg'];
+ echo "
\n
\n";
+ unset($_SESSION['error_msg']);
+ }
+}
?>
diff --git a/web/list/user/index.php b/web/list/user/index.php
index 79dcf385f..9e532d762 100644
--- a/web/list/user/index.php
+++ b/web/list/user/index.php
@@ -1,8 +1,11 @@
-function randomString() {
-var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
-var string_length = 10;
-var randomstring = '';
-for (var i=0; i
-
+
+
+
+
+
+
diff --git a/web/templates/admin/edit_user.html b/web/templates/admin/edit_user.html
index d3c64c274..4f8ea0a02 100644
--- a/web/templates/admin/edit_user.html
+++ b/web/templates/admin/edit_user.html
@@ -1,94 +1,199 @@
-
-
+
+
+
+
+
diff --git a/web/templates/admin/list_user.html b/web/templates/admin/list_user.html
index eb28bdaa3..ea1b7a241 100644
--- a/web/templates/admin/list_user.html
+++ b/web/templates/admin/list_user.html
@@ -1,194 +1,282 @@
-
- $value) {
- ++$i;
- if ($data[$key]['SUSPENDED'] == 'yes') {
- $status = 'suspended';
- $spnd_action = 'unsuspend' ;
- } else {
- $status = 'active';
- $spnd_action = 'suspend' ;
- }
- ?>
-
-
-
-
- |
-
-
- |
-
- logout";
- if (!empty($_SESSION['look_alert'])) {
- ?>
-
- You have logged in as user .
-
+
+ |
+
+
+ |
+
+
+
+ |
+
+ logout";
+ if (!empty($_SESSION['look_alert'])) {
+ ?>
+
+
+ You have logged in as user .
+
+ login as";
+ }
+ ?>
+ |
+ "> edit |
+
+
+
+
+ Are you sure you want to user account?
+
+ |
+
+
+ delete
+
+ Are you sure you want to delete user account?
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+ |
+ [] package |
+
+ Bandwidth: % ()
+
+ |
+
+
+ Disk: % ()
+
+ |
+
+
+
+
+
+
+ Web:
+ Mail:
+ |
+
+ Databases:
+ User Dirs:
+ |
+
+
+ |
+
+
+ |
+
+
+
+ Template: |
+ |
+
+
+ Web Domains: |
+ / |
+
+
+ Web SSL: |
+ |
+
+
+ Web Aliases: |
+ per domain |
+
+
+ Dns Domains: |
+ / |
+
+
+ Dns Records: |
+ per domain |
+
+
+ Name Servers:
|
+ |
+
+
+ |
+
+
+
+ Mail Domains: |
+ / |
+
+
+ Mail Accounts: |
+ per domain |
+
+
+ Databases: |
+ / |
+
+
+ Cron Jobs: |
+ / |
+
+
+ Shell: |
+ |
+
+
+ Dedicated IP: |
+ |
+
+
+ Backups: |
+ / |
+
+
+ |
+
+
+ |
+
login as";
- }
- ?>
-
- "> edit |
-
-
-
-
- Are you sure you want to user account?
-
- |
-
-
- delete
-
- Are you sure you want to delete user account?
-
- |
-
+ }
+ ?>
+ |
-
- |
-
-
- |
- [] package |
- Bandwidth: % ()
- |
- Disk: % ()
- |
-
-
-
- Web:
- Mail:
- |
- Databases:
- User Dirs:
- |
-
|
-
-
- |
-
-
- Template: |
- |
- Web Domains: |
- / |
- Web SSL: |
- |
- Web Aliases: |
- per domain |
- Dns Domains: |
- / |
- Dns Records: |
- per domain |
- Name Servers:
|
- |
- |
-
-
- Mail Domains: |
- / |
- Mail Accounts: |
- per domain |
- Databases: |
- / |
- Cron Jobs: |
- / |
- Shell: |
- |
- Dedicated IP: |
- |
- Backups: |
- / |
-
- |
-
-
-
-
+ |
"; ?>
-
+
+
-
- |
"; ?>
-
-
- |
"; ?>
+ |
"; ?>
diff --git a/web/templates/admin/menu_add_user.html b/web/templates/admin/menu_add_user.html
deleted file mode 100644
index 69d23bbe1..000000000
--- a/web/templates/admin/menu_add_user.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_edit_user.html b/web/templates/admin/menu_edit_user.html
deleted file mode 100644
index dd5c9b462..000000000
--- a/web/templates/admin/menu_edit_user.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/web/templates/admin/menu_user.html b/web/templates/admin/menu_user.html
deleted file mode 100644
index 3e25540b3..000000000
--- a/web/templates/admin/menu_user.html
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-