diff --git a/customer_ftp.php b/customer_ftp.php index bc591acf..207fb60d 100644 --- a/customer_ftp.php +++ b/customer_ftp.php @@ -270,6 +270,12 @@ elseif($page == 'accounts') $sendinfomail = makeyesno('sendinfomail', '1', '0', '0'); + $ftp_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_add.php'; + $ftp_add_form = htmlform::genHTMLForm($ftp_add_data); + + $title = $ftp_add_data['ftp_add']['title']; + $image = $ftp_add_data['ftp_add']['image']; + eval("echo \"" . getTemplate("ftp/accounts_add") . "\";"); } } @@ -352,7 +358,13 @@ elseif($page == 'accounts') $domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']); } } - + + $ftp_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_edit.php'; + $ftp_edit_form = htmlform::genHTMLForm($ftp_edit_data); + + $title = $ftp_edit_data['ftp_edit']['title']; + $image = $ftp_edit_data['ftp_edit']['image']; + eval("echo \"" . getTemplate("ftp/accounts_edit") . "\";"); } } diff --git a/lib/formfields/customer/ftp/formfield.ftp_add.php b/lib/formfields/customer/ftp/formfield.ftp_add.php new file mode 100644 index 00000000..a020cef3 --- /dev/null +++ b/lib/formfields/customer/ftp/formfield.ftp_add.php @@ -0,0 +1,56 @@ + (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Formfields + */ + +return array( + 'ftp_add' => array( + 'title' => $lng['ftp']['account_add'], + 'image' => 'icons/add_user.png', + 'sections' => array( + 'section_a' => array( + 'title' => $lng['ftp']['account_add'], + 'image' => 'icons/add_user.png', + 'fields' => array( + 'ftp_username' => array( + 'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false), + 'label' => $lng['login']['username'], + 'type' => 'text' + ), + 'ftp_domain' => array( + 'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false), + 'label' => $lng['domains']['domainname'], + 'type' => 'select', + 'select_var' => (isset($domains) ? $domains : ""), + ), + 'path' => array( + 'label' => $lng['panel']['path'], + 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null), + 'type' => ($settings['panel']['pathedit'] != 'Dropdown' ? 'text' : 'select'), + 'select_var' => $pathSelect, + ), + 'ftp_password' => array( + 'label' => $lng['login']['password'], + 'type' => 'password', + ), + 'sendinfomail' => array( + 'label' => $lng['customer']['sendinfomail'], + 'type' => 'yesno', + 'yesno_var' => $sendinfomail, + ), + ) + ) + ) + ) +); diff --git a/lib/formfields/customer/ftp/formfield.ftp_edit.php b/lib/formfields/customer/ftp/formfield.ftp_edit.php new file mode 100644 index 00000000..c7054516 --- /dev/null +++ b/lib/formfields/customer/ftp/formfield.ftp_edit.php @@ -0,0 +1,57 @@ + (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Formfields + */ + +return array( + 'ftp_edit' => array( + 'title' => $lng['ftp']['account_edit'], + 'image' => 'icons/edit_user.png', + 'sections' => array( + 'section_a' => array( + 'title' => $lng['ftp']['account_edit'], + 'image' => 'icons/edit_user.png', + 'fields' => array( + 'username' => array( + 'label' => $lng['login']['username'], + 'type' => 'label', + 'value' => $result['username'], + ), + 'ftp_username' => array( + 'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false), + 'label' => $lng['login']['username'], + 'type' => 'text' + ), + 'ftp_domain' => array( + 'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false), + 'label' => $lng['domains']['domainname'], + 'type' => 'select', + 'select_var' => (isset($domains) ? $domains : ""), + ), + 'path' => array( + 'label' => $lng['panel']['path'], + 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : NULL), + 'type' => ($settings['panel']['pathedit'] != 'Dropdown' ? 'text' : 'select'), + 'select_var' => $pathSelect + ), + 'ftp_password' => array( + 'label' => $lng['login']['password'], + 'desc' => $lng['ftp']['editpassdescription'], + 'type' => 'password', + ), + ) + ) + ) + ) +); diff --git a/lib/formfields/customer/mysql/formfield.mysql_add.php b/lib/formfields/customer/mysql/formfield.mysql_add.php index adb166fb..efa46b91 100644 --- a/lib/formfields/customer/mysql/formfield.mysql_add.php +++ b/lib/formfields/customer/mysql/formfield.mysql_add.php @@ -17,11 +17,11 @@ return array( 'mysql_add' => array( 'title' => $lng['mysql']['database_create'], - 'image' => 'icons/mysql_add.png', + 'image' => 'icons/add_mysql.png', 'sections' => array( 'section_a' => array( 'title' => $lng['mysql']['database_create'], - 'image' => 'icons/mysql_add.png', + 'image' => 'icons/add_mysql.png', 'fields' => array( 'description' => array( 'label' => $lng['mysql']['databasedescription'], diff --git a/lib/formfields/customer/mysql/formfield.mysql_edit.php b/lib/formfields/customer/mysql/formfield.mysql_edit.php index bd812fae..617a1c03 100644 --- a/lib/formfields/customer/mysql/formfield.mysql_edit.php +++ b/lib/formfields/customer/mysql/formfield.mysql_edit.php @@ -17,11 +17,11 @@ return array( 'mysql_edit' => array( 'title' => $lng['mysql']['database_edit'], - 'image' => 'icons/mysql_edit.png', + 'image' => 'icons/edit_mysql.png', 'sections' => array( 'section_a' => array( 'title' => $lng['mysql']['database_edit'], - 'image' => 'icons/mysql_edit.png', + 'image' => 'icons/edit_mysql.png', 'fields' => array( 'databasename' => array( 'label' => $lng['mysql']['databasename'], diff --git a/templates/Froxlor/customer/ftp/accounts_add.tpl b/templates/Froxlor/customer/ftp/accounts_add.tpl index 3b16c280..92444d4c 100644 --- a/templates/Froxlor/customer/ftp/accounts_add.tpl +++ b/templates/Froxlor/customer/ftp/accounts_add.tpl @@ -1,44 +1,20 @@ $header -
-
-

- {$lng['ftp']['account_add']}  - {$lng['ftp']['account_add']} -

-
- -
+
+
+

+ {$title}  + {$title} +

+
+ +
- Froxlor - {$lng['ftp']['account_add']} + Froxlor - {$title} - - - - - - - - - - - - - - - - - - - - - - - - - + {$ftp_add_form}
{$lng['login']['username']}:
{$lng['domains']['domainname']}:
{$lng['panel']['path']}:
{$lng['panel']['pathDescription']}
{$pathSelect}
{$lng['login']['password']}:
{$lng['customer']['sendinfomail']}:{$sendinfomail}

@@ -49,6 +25,7 @@ $header

-
-
+ +
+
$footer diff --git a/templates/Froxlor/customer/ftp/accounts_edit.tpl b/templates/Froxlor/customer/ftp/accounts_edit.tpl index 336f3956..9b21bc48 100644 --- a/templates/Froxlor/customer/ftp/accounts_edit.tpl +++ b/templates/Froxlor/customer/ftp/accounts_edit.tpl @@ -1,44 +1,20 @@ $header -
-
-

- {$lng['ftp']['account_edit']}  - {$lng['ftp']['account_edit']} -

-
- -
+
+
+

+ {$title}  + {$title} +

+
+ +
- Froxlor - {$lng['ftp']['account_edit']} + Froxlor - {$title} - - - - - - - - - - - - - - - - - - - - - - - - - + {$ftp_edit_form}
{$lng['login']['username']}:{$result['username']}
{$lng['login']['username']}:
{$lng['domains']['domainname']}:
{$lng['panel']['path']}:
{$lng['panel']['pathDescription']}
{$pathSelect}
{$lng['login']['password']}:
{$lng['ftp']['editpassdescription']}

@@ -49,6 +25,7 @@ $header

-
-
+ +
+
$footer