diff --git a/customer_domains.php b/customer_domains.php index 8b6cbce7..6028311c 100644 --- a/customer_domains.php +++ b/customer_domains.php @@ -381,6 +381,13 @@ elseif($page == 'domains') $ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']); $openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true); $pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']); + + $subdomain_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_add.php'; + $subdomain_add_form = htmlform::genHTMLForm($subdomain_add_data); + + $title = $subdomain_add_data['domain_add']['title']; + $image = $subdomain_add_data['domain_add']['image']; + eval("echo \"" . getTemplate("domains/domains_add") . "\";"); } } @@ -569,6 +576,12 @@ elseif($page == 'domains') $domainip = $result_ipandport['ip']; $result = htmlentities_array($result); + $subdomain_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_edit.php'; + $subdomain_edit_form = htmlform::genHTMLForm($subdomain_edit_data); + + $title = $subdomain_edit_data['domain_edit']['title']; + $image = $subdomain_edit_data['domain_edit']['image']; + eval("echo \"" . getTemplate("domains/domains_edit") . "\";"); } } diff --git a/customer_email.php b/customer_email.php index 3099d1fd..a7255f90 100644 --- a/customer_email.php +++ b/customer_email.php @@ -282,13 +282,13 @@ elseif($page == 'emails') } $iscatchall = makeyesno('iscatchall', '1', '0', '0'); - - $email_add_form = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_edit.php'; - $email_add_form = htmlform::genHTMLForm($email_add_form); - $title = $email_add_form['emails_edit']['title']; - $image = $email_add_form['emails_edit']['image']; - + $email_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_add.php'; + $email_add_form = htmlform::genHTMLForm($email_add_data); + + $title = $email_add_data['emails_add']['title']; + $image = $email_add_data['emails_add']['image']; + eval("echo \"" . getTemplate("email/emails_add") . "\";"); } } @@ -328,12 +328,12 @@ elseif($page == 'emails') $destinations_count = count($result['destination']); $result = htmlentities_array($result); - - $email_edit_form = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_edit.php'; - $email_edit_form = htmlform::genHTMLForm($email_edit_form); - $title = $email_edit_form['emails_edit']['title']; - $image = $email_edit_form['emails_edit']['image']; + $email_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_edit.php'; + $email_edit_form = htmlform::genHTMLForm($email_edit_data); + + $title = $email_edit_data['emails_edit']['title']; + $image = $email_edit_data['emails_edit']['image']; eval("echo \"" . getTemplate("email/emails_edit") . "\";"); } @@ -519,13 +519,13 @@ elseif($page == 'accounts') $result['email_full'] = $idna_convert->decode($result['email_full']); $result = htmlentities_array($result); $quota = $settings['system']['mail_quota']; - - $account_add_form = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addaccount.php'; - $account_add_form = htmlform::genHTMLForm($account_add_form); - $title = $account_add_form['emails_addaccount']['title']; - $image = $account_add_form['emails_addaccount']['image']; - + $account_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addaccount.php'; + $account_add_form = htmlform::genHTMLForm($account_add_data); + + $title = $account_add_data['emails_addaccount']['title']; + $image = $account_add_data['emails_addaccount']['image']; + eval("echo \"" . getTemplate("email/account_add") . "\";"); } } @@ -564,13 +564,13 @@ elseif($page == 'accounts') { $result['email_full'] = $idna_convert->decode($result['email_full']); $result = htmlentities_array($result); - - $account_changepw = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangepasswd.php'; - $account_changepw = htmlform::genHTMLForm($account_changepw); - $title = $account_changepw['emails_accountchangepasswd']['title']; - $image = $account_changepw['emails_accountchangepasswd']['image']; - + $account_changepw_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangepasswd.php'; + $account_changepw_form = htmlform::genHTMLForm($account_changepw_data); + + $title = $account_changepw_data['emails_accountchangepasswd']['title']; + $image = $account_changepw_data['emails_accountchangepasswd']['image']; + eval("echo \"" . getTemplate("email/account_changepw") . "\";"); } } @@ -612,12 +612,12 @@ elseif($page == 'accounts') { $result['email_full'] = $idna_convert->decode($result['email_full']); $result = htmlentities_array($result); - - $quota_edit = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangequota.php'; - $quota_edit = htmlform::genHTMLForm($quota_edit); - $title = $quota_edit['emails_accountchangequota']['title']; - $image = $quota_edit['emails_accountchangequota']['image']; + $quota_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangequota.php'; + $quota_edit_form = htmlform::genHTMLForm($quota_edit_data); + + $title = $quota_edit_data['emails_accountchangequota']['title']; + $image = $quota_edit_data['emails_accountchangequota']['image']; eval("echo \"" . getTemplate("email/account_changequota") . "\";"); } @@ -713,13 +713,13 @@ elseif($page == 'forwarders') { $result['email_full'] = $idna_convert->decode($result['email_full']); $result = htmlentities_array($result); - - $forwarder_add_form = include_once dirname(__FILE__).'/lib/formfields/customer/emails/formfield.emails_addforwarder.php'; - $forwarder_add_form = htmlform::genHTMLForm($forwarder_add_form); - $title = $forwarder_add_form['emails_addforwarder']['title']; - $image = $forwarder_add_form['emails_addforwarder']['image']; - + $forwarder_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addforwarder.php'; + $forwarder_add_form = htmlform::genHTMLForm($forwarder_add_data); + + $title = $forwarder_add_data['emails_addforwarder']['title']; + $image = $forwarder_add_data['emails_addforwarder']['image']; + eval("echo \"" . getTemplate("email/forwarder_add") . "\";"); } } diff --git a/lib/formfields/customer/domains/formfield.domains_add.php b/lib/formfields/customer/domains/formfield.domains_add.php index 45a9b92b..e1bda09b 100644 --- a/lib/formfields/customer/domains/formfield.domains_add.php +++ b/lib/formfields/customer/domains/formfield.domains_add.php @@ -12,61 +12,53 @@ * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Formfields - * @version $Id: formfield.domains_add.php 112 2010-12-14 12:11:20Z d00p $ + * @version $Id: formfield.domains_edit.php 130 2010-12-22 00:54:11Z d00p $ */ return array( 'domain_add' => array( 'title' => $lng['domains']['subdomain_add'], - 'image' => 'icons/add_domain.png', + 'image' => 'icons/domain_add.png', 'sections' => array( 'section_a' => array( 'title' => $lng['domains']['subdomain_add'], - 'image' => 'icons/add_domain.png', + 'image' => 'icons/domain_add.png', 'fields' => array( 'domain' => array( 'label' => $lng['domains']['domainname'], 'type' => 'text' ), - 'aliasdomain' => array( + 'alias' => array( 'label' => $lng['domains']['aliasdomain'], 'type' => 'select', 'select_var' => $aliasdomains ), - 'pathedit' => array( - 'visible' => ($settings['panel']['pathedit'] != 'Dropdown' ? true : false), - 'label' => $lng['panel']['pathorurl'], - 'desc' => $lng['panel']['pathDescription'], // TODO was ist mit: $lng['panel']['pathDescriptionEx'] ? - 'type' => 'text', - 'value' => $pathSelect - ), - 'pathedit_dropdown' => array( - 'visible' => ($settings['panel']['pathedit'] == 'Dropdown' ? true : false), + 'path' => array( 'label' => $lng['panel']['path'], - 'type' => 'text', - 'value' => $pathSelect + 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null), + 'type' => ($settings['panel']['pathedit'] != 'Dropdown' ? 'text' : 'select'), + 'select_var' => $pathSelect ), - 'pathedit_dropdown2' => array( + 'url' => array( 'visible' => ($settings['panel']['pathedit'] == 'Dropdown' ? true : false), 'label' => $lng['panel']['urloverridespath'], 'type' => 'text', - 'value' => $urlvalue, - 'size' => 30 + 'value' => $urlvalue ), - 'apache2_customerRedirect' => array( + 'redirectcode' => array( 'visible' => (($settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1') ? true : false), 'label' => $lng['domains']['redirectifpathisurl'], 'desc' => $lng['domains']['redirectifpathisurlinfo'], 'type' => 'select', 'select_var' => $redirectcode ), - 'ssl' => array( + 'ssl_redirect' => array( 'visible' => ($settings['system']['use_ssl'] == '1' ? true : false), 'label' => 'SSL Redirect', 'type' => 'yesno', 'yesno_var' => $ssl_redirect ), - 'openbasedir' => array( + 'openbasedir_path' => array( 'label' => $lng['domain']['openbasedirpath'], 'type' => 'select', 'select_var' => $openbasedir diff --git a/lib/formfields/customer/domains/formfield.domains_edit.php b/lib/formfields/customer/domains/formfield.domains_edit.php index e81eb8e8..1abb0f8f 100644 --- a/lib/formfields/customer/domains/formfield.domains_edit.php +++ b/lib/formfields/customer/domains/formfield.domains_edit.php @@ -34,58 +34,50 @@ return array( 'type' => 'label', 'value' => $domainip ), - 'alias_check' => array( + 'alias' => array( 'visible' => ($alias_check == '0' ? true : false), 'label' => $lng['domains']['aliasdomain'], 'type' => 'select', 'select_var' => $domains ), - 'pathedit' => array( - 'visible' => ($settings['panel']['pathedit'] != 'Dropdown' ? true : false), - 'label' => $lng['panel']['pathorurl'], - 'desc' => $lng['panel']['pathDescription'], // TODO was ist mit: $lng['panel']['pathDescriptionEx'] ? - 'type' => 'text', - 'value' => $pathSelect - ), - 'pathedit_dropdown' => array( - 'visible' => ($settings['panel']['pathedit'] == 'Dropdown' ? true : false), + 'path' => array( 'label' => $lng['panel']['path'], - 'type' => 'text', - 'value' => $pathSelect + 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null), + 'type' => ($settings['panel']['pathedit'] != 'Dropdown' ? 'text' : 'select'), + 'select_var' => $pathSelect ), - 'pathedit_dropdown2' => array( + 'url' => array( 'visible' => ($settings['panel']['pathedit'] == 'Dropdown' ? true : false), 'label' => $lng['panel']['urloverridespath'], 'type' => 'text', - 'value' => $urlvalue, - 'size' => 30 + 'value' => $urlvalue ), - 'apache2_customerRedirect' => array( + 'redirectcode' => array( 'visible' => (($settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1') ? true : false), 'label' => $lng['domains']['redirectifpathisurl'], 'desc' => $lng['domains']['redirectifpathisurlinfo'], 'type' => 'select', 'select_var' => $redirectcode ), - 'parentdomain' => array( + 'iswildcarddomain' => array( 'visible' => (($result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0') ? true : false), 'label' => $lng['domains']['wildcarddomain'], - 'type' => 'label', - 'value' => $iswildcarddomain + 'type' => 'yesno', + 'yesno_var' => $iswildcarddomain ), - 'emaildomain' => array( + 'isemaildomain' => array( 'visible' => ((( $result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2' ) && $result['parentdomainid'] != '0') ? true : false), 'label' => 'Emaildomain', - 'type' => 'label', - 'value' => $isemaildomain + 'type' => 'yesno', + 'yesno_var' => $isemaildomain ), - 'ssl' => array( + 'ssl_redirect' => array( 'visible' => ($settings['system']['use_ssl'] == '1' ? true : false), 'label' => 'SSL Redirect', - 'type' => 'label', - 'value' => $ssl_redirect + 'type' => 'yesno', + 'yesno_var' => $ssl_redirect ), - 'openbasedir' => array( + 'openbasedir_path' => array( 'label' => $lng['domain']['openbasedirpath'], 'type' => 'select', 'select_var' => $openbasedir diff --git a/lib/navigation/00.froxlor.main.php b/lib/navigation/00.froxlor.main.php index 3531e7e2..931d8252 100644 --- a/lib/navigation/00.froxlor.main.php +++ b/lib/navigation/00.froxlor.main.php @@ -56,7 +56,7 @@ return array ( array ( 'url' => 'customer_email.php?page=emails&action=add', 'label' => $lng['emails']['emails_add'], - 'required_resources' => 'emails', + 'required_resources' => 'emails' ), array ( 'url' => 'customer_autoresponder.php', diff --git a/templates/Froxlor/customer/domains/domains_add.tpl b/templates/Froxlor/customer/domains/domains_add.tpl index 419a1ec6..6107bcd1 100644 --- a/templates/Froxlor/customer/domains/domains_add.tpl +++ b/templates/Froxlor/customer/domains/domains_add.tpl @@ -1,57 +1,30 @@ $header -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 {$lng['domains']['subdomain_add']}
{$lng['domains']['domainname']}: .
{$lng['domains']['aliasdomain']}:
{$lng['panel']['pathorurl']}:
{$lng['panel']['pathDescription']}{$lng['panel']['pathDescriptionEx']}
{$pathSelect}
{$lng['panel']['path']}:{$pathSelect}
{$lng['panel']['urloverridespath']}:
{$lng['domains']['redirectifpathisurl']}:
{$lng['domains']['redirectifpathisurlinfo']}
SSL Redirect:$ssl_redirect
{$lng['domain']['openbasedirpath']}:
-
-
-
-$footer \ No newline at end of file +
+
+

+ {$title}  + {$title} +

+
+ +
+ +
+
+ Froxlor - {$title} + + + {$subdomain_add_form} +
+ +

+ + + + +

+
+
+
+
+$footer diff --git a/templates/Froxlor/customer/domains/domains_edit.tpl b/templates/Froxlor/customer/domains/domains_edit.tpl index e253c72a..9959d727 100644 --- a/templates/Froxlor/customer/domains/domains_edit.tpl +++ b/templates/Froxlor/customer/domains/domains_edit.tpl @@ -1,76 +1,31 @@ $header -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 {$lng['domains']['subdomain_edit']}
{$lng['domains']['domainname']}:{$result['domain']}
{$lng['dns']['destinationip']}:{$domainip}
{$lng['domains']['aliasdomain']}:
{$lng['panel']['pathorurl']}:
{$lng['panel']['pathDescription']}{$lng['panel']['pathDescriptionEx']}
{$pathSelect}
{$lng['panel']['path']}:{$pathSelect}
{$lng['panel']['urloverridespath']}:
{$lng['domains']['redirectifpathisurl']}:
{$lng['domains']['redirectifpathisurlinfo']}
{$lng['domains']['wildcarddomain']}$iswildcarddomain
Emaildomain:$isemaildomain
SSL Redirect:$ssl_redirect
{$lng['domain']['openbasedirpath']}:
-
-
-
+
+
+

+ {$title}  + {$title} +

+
+ +
+ +
+
+ Froxlor - {$title} + + + {$subdomain_edit_form} +
+ +

+ + + + + +

+
+
+
+
$footer diff --git a/templates/Froxlor/customer/email/account_add.tpl b/templates/Froxlor/customer/email/account_add.tpl index 87e1a1e7..35c9f233 100644 --- a/templates/Froxlor/customer/email/account_add.tpl +++ b/templates/Froxlor/customer/email/account_add.tpl @@ -1,30 +1,33 @@ $header -
-
-

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

-
- -
+
+
+

+ {$title}  + {$title} +

+
+ +
- Froxlor - {$lng['emails']['emails_add']} + Froxlor - {$title} - {$account_add_form} + {$account_add_form}

+

-
-
+ +
+ +
$footer diff --git a/templates/Froxlor/customer/email/account_changepw.tpl b/templates/Froxlor/customer/email/account_changepw.tpl index 9a211a30..3a5a7ea7 100644 --- a/templates/Froxlor/customer/email/account_changepw.tpl +++ b/templates/Froxlor/customer/email/account_changepw.tpl @@ -1,30 +1,33 @@ $header -
-
-

- {$lng['menue']['main']['changepassword']}  - {$lng['menue']['main']['changepassword']} -

-
- -
+
+
+

+ {$title}  + {$title} +

+
-
-
- Froxlor - {$lng['menue']['main']['changepassword']} +
- - {$account_changepw} -
+ +
+ Froxlor - {$title} -

- - - - -

-
- -
-
-$footer \ No newline at end of file + + {$account_changepw_form} +
+ +

+ + + + + +

+ + + +
+ +
+$footer diff --git a/templates/Froxlor/customer/email/account_changequota.tpl b/templates/Froxlor/customer/email/account_changequota.tpl index 8f96bddd..5550e05b 100644 --- a/templates/Froxlor/customer/email/account_changequota.tpl +++ b/templates/Froxlor/customer/email/account_changequota.tpl @@ -1,30 +1,33 @@ $header -
-
-

- {$lng['emails']['quota_edit']}  - {$lng['emails']['quota_edit']} -

-
- -
+
+
+

+ {$title}  + {$title} +

+
-
-
- Froxlor - {$lng['emails']['quota_edit']} +
- - {$quota_edit} -
+ +
+ Froxlor - {$title} -

- - - - -

-
- -
-
-$footer \ No newline at end of file + + {$quota_edit_form} +
+ +

+ + + + + +

+ + + +
+ +
+$footer diff --git a/templates/Froxlor/customer/email/emails_add.tpl b/templates/Froxlor/customer/email/emails_add.tpl deleted file mode 100644 index 15764fc8..00000000 --- a/templates/Froxlor/customer/email/emails_add.tpl +++ /dev/null @@ -1,39 +0,0 @@ -$header -
- -
-
-
{$lng['admin']['warning']}
-

{$lng['emails']['noemaildomainaddedyet']}
-
-
-
- -
-

-   - {$title} -

-
- -
- -
-
- Froxlor - {$title} - - - {$email_add_form} -
- -

- - - - -

-
-
-
-
-$footer diff --git a/templates/Froxlor/customer/email/emails_edit.tpl b/templates/Froxlor/customer/email/emails_edit.tpl deleted file mode 100644 index f55604fe..00000000 --- a/templates/Froxlor/customer/email/emails_edit.tpl +++ /dev/null @@ -1,30 +0,0 @@ -$header -
-
-

- {$title}  - {$title} -

-
- -
- -
-
- Froxlor - {$title} - - - {$email_edit_form} -
- -

- - - - -

-
-
-
-
-$footer diff --git a/templates/Froxlor/customer/email/forwarder_add.tpl b/templates/Froxlor/customer/email/forwarder_add.tpl deleted file mode 100644 index e075bdbc..00000000 --- a/templates/Froxlor/customer/email/forwarder_add.tpl +++ /dev/null @@ -1,30 +0,0 @@ -$header -
-
-

- {$title}  - {$title} -

-
- -
- -
-
- Froxlor - {$title} - - - {$forwarder_add_form} -
- -

- - - - -

-
-
-
-
-$footer