diff --git a/bin/v_list_user_packages b/bin/v_list_user_packages index 203700688..1cf32535c 100755 --- a/bin/v_list_user_packages +++ b/bin/v_list_user_packages @@ -71,9 +71,9 @@ shell_list_pkgs() { #----------------------------------------------------------# # Defining fields -fields='$PACKAGE $TEMPLATE $WEB_DOMAINS $WEB_SSL $WEB_ALIASES $DATABASES - $MAIL_DOMAINS $MAIL_BOXES $MAIL_FORWARDERS $DNS_DOMAINS $DISK_QUOTA - $BANDWIDTH $NS $SHELL $BACKUPS' +fields='$PACKAGE $TEMPLATE $WEB_DOMAINS $WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS + $MAIL_DOMAINS $MAIL_ACCOUNTS $DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH + $NS $SHELL $BACKUPS $TIME $DATE' # Listing domains case $format in diff --git a/data/packages/default.pkg b/data/packages/default.pkg index 0399cabe3..815371c16 100644 --- a/data/packages/default.pkg +++ b/data/packages/default.pkg @@ -12,3 +12,5 @@ BANDWIDTH='100000' NS='ns1.localhost,ns2.localhost' SHELL='nologin' BACKUPS='3' +TIME='11:31:29' +DATE='2012-07-26' diff --git a/data/packages/gainsboro.pkg b/data/packages/gainsboro.pkg index 4529b9cc5..e7d4402ed 100644 --- a/data/packages/gainsboro.pkg +++ b/data/packages/gainsboro.pkg @@ -12,3 +12,5 @@ BANDWIDTH='10000' NS='ns1.localhost,ns2.localhost' SHELL='nologin' BACKUPS='1' +TIME='11:31:30' +DATE='2012-07-26' diff --git a/data/packages/palegreen.pkg b/data/packages/palegreen.pkg index 7c3200cac..8e71593a8 100644 --- a/data/packages/palegreen.pkg +++ b/data/packages/palegreen.pkg @@ -12,3 +12,5 @@ BANDWIDTH='50000' NS='ns1.localhost,ns2.localhost' SHELL='nologin' BACKUPS='5' +TIME='11:31:31' +DATE='2012-07-26' diff --git a/data/packages/slategrey.pkg b/data/packages/slategrey.pkg index 0399cabe3..e2f2664d1 100644 --- a/data/packages/slategrey.pkg +++ b/data/packages/slategrey.pkg @@ -12,3 +12,5 @@ BANDWIDTH='100000' NS='ns1.localhost,ns2.localhost' SHELL='nologin' BACKUPS='3' +TIME='11:31:32' +DATE='2012-07-26' diff --git a/func/main.sh b/func/main.sh index 5f691303f..1553af706 100755 --- a/func/main.sh +++ b/func/main.sh @@ -122,7 +122,7 @@ gen_password() { # Package existance check is_package_valid() { if [ ! -e "$VESTA/data/packages/$package.pkg" ]; then - echo "Error: $package is not exist" + echo "Error: package $package not exist" log_event "$E_NOTEXIST $EVENT" exit $E_NOTEXIST fi diff --git a/web/images/reload.png b/web/images/reload.png new file mode 100644 index 000000000..44cdc0ccd Binary files /dev/null and b/web/images/reload.png differ diff --git a/web/images/update.png b/web/images/update.png new file mode 100644 index 000000000..9cf6bfa61 Binary files /dev/null and b/web/images/update.png differ diff --git a/web/list/packages/index.php b/web/list/packages/index.php index 32c28a1fe..c4264303b 100644 --- a/web/list/packages/index.php +++ b/web/list/packages/index.php @@ -1,34 +1,28 @@ 0 ) { - header("Location: /error/"); -} -$panel = json_decode(implode('', $output), true); -if ( $_SESSION['user'] == 'admin' ) { - require_once '../../templates/admin/panel.html'; -} else { - require_once '../../templates/header.html'; +// Panel +top_panel($user,$TAB); + +// Data +if ($_SESSION['user'] == 'admin') { + + exec (VESTA_CMD."v_list_user_packages json", $output, $return_var); + check_error($return_var); + $data = json_decode(implode('', $output), true); + $data = array_reverse($data); + unset($output); + + include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_packages.html'); + include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_packages.html'); } -require_once '../../templates/footer.html'; +// Footer +include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); diff --git a/web/templates/admin/list_packages.html b/web/templates/admin/list_packages.html new file mode 100644 index 000000000..ef67c90ed --- /dev/null +++ b/web/templates/admin/list_packages.html @@ -0,0 +1,118 @@ + + + $value) { + ++$i; +?> + + + + + + + + +
+ + + + +
">
active
+
+ + + + + +
propagate edit + + delete +
+

Are you sure you want to delete package?

+
+
+ + + + + + + +
+ + + + + + + + +
Defaul Template:
System Shell:
Bandwidth: +
Disk: +
+
+ + + + + + + + + + + +
Web Domains:
Web Aliases: per domain
Dns Domains:
Dns Records: per domain
Name Servers:
+ + + + + + + + + + + +
Mail Domains:
Mail Accounts: per domain
Databases:
Cron Jobs:
Backups:
+
+
+"; ?> + + + + + +
→ + + listed
+"; ?> +"; ?> diff --git a/web/templates/admin/menu_packages.html b/web/templates/admin/menu_packages.html new file mode 100644 index 000000000..7689b385a --- /dev/null +++ b/web/templates/admin/menu_packages.html @@ -0,0 +1,16 @@ + + + + + + + + +
diff --git a/web/templates/admin/panel.html b/web/templates/admin/panel.html index d682338ee..91f4b7517 100644 --- a/web/templates/admin/panel.html +++ b/web/templates/admin/panel.html @@ -2,9 +2,10 @@ + - +

Packages IP Adresses RRD GraphicsStatisticsStatistics History Log Log out