Migrate to new HTMLform2-class

Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
Roman Schmerold (BNoiZe)
2015-02-02 17:43:53 +01:00
parent 48eaab89ba
commit 87fe3669a1
27 changed files with 1174 additions and 1283 deletions

View File

@@ -1,232 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'admin_add' => array(
'title' => $lng['admin']['admin_add'],
'image' => 'icons/user_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['accountdata'],
'image' => 'icons/user_add.png',
'fields' => array(
'loginname' => array(
'label' => $lng['login']['username'],
'type' => 'text',
'mandatory' => true
),
'admin_password' => array(
'label' => $lng['login']['password'],
'type' => 'password',
'mandatory' => true,
'autocomplete' => 'off'
),
'admin_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => generatePassword(),
),
'def_language' => array(
'label' => $lng['login']['language'],
'type' => 'select',
'select_var' => $language_options
)
)
),
'section_b' => array(
'title' => $lng['admin']['contactdata'],
'image' => 'icons/user_add.png',
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'type' => 'text',
'mandatory' => true
),
'email' => array(
'label' => $lng['customer']['email'],
'type' => 'text',
'mandatory' => true
),
'custom_notes' => array(
'style' => 'align-top',
'label' => $lng['usersettings']['custom_notes']['title'],
'desc' => $lng['usersettings']['custom_notes']['description'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'custom_notes_show' => array(
'label' => $lng['usersettings']['custom_notes']['show'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array()
)
)
),
'section_c' => array(
'title' => $lng['admin']['servicedata'],
'image' => 'icons/user_add.png',
'fields' => array(
'ipaddress' => array(
'label' => $lng['serversettings']['ipaddress']['title'],
'type' => 'select',
'select_var' => $ipaddress
),
'change_serversettings' => array(
'label' => $lng['admin']['change_serversettings'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array()
),
'customers' => array(
'label' => $lng['admin']['customers'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $customers_ul
),
'customers_see_all' => array(
'label' => $lng['admin']['customers_see_all'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array()
),
'domains' => array(
'label' => $lng['admin']['domains'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $domains_ul
),
'domains_see_all' => array(
'label' => $lng['admin']['domains_see_all'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array()
),
'caneditphpsettings' => array(
'label' => $lng['admin']['caneditphpsettings'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array()
),
'diskspace' => array(
'label' => $lng['customer']['diskspace'],
'type' => 'textul',
'value' => 0,
'maxlength' => 6,
'mandatory' => true,
'ul_field' => $diskspace_ul
),
'traffic' => array(
'label' => $lng['customer']['traffic'],
'type' => 'textul',
'value' => 0,
'maxlength' => 4,
'mandatory' => true,
'ul_field' => $traffic_ul
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $subdomains_ul
),
'emails' => array(
'label' => $lng['customer']['emails'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $emails_ul
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_accounts_ul
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_forwarders_ul
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'mandatory' => true,
'ul_field' => $email_quota_ul
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'ul_field' => $ftps_ul
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
'ul_field' => $tickets_ul
),
'tickets_see_all' => array(
'label' => $lng['admin']['tickets_see_all'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array()
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $mysqls_ul
)
)
)
)
)
);

View File

@@ -1,247 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'admin_edit' => array(
'title' => $lng['admin']['admin_edit'],
'image' => 'icons/user_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['accountdata'],
'image' => 'icons/user_edit.png',
'fields' => array(
'loginname' => array(
'label' => $lng['login']['username'],
'type' => 'label',
'value' => $result['loginname']
),
'deactivated' => array(
'label' => $lng['admin']['deactivated_user'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['deactivated']),
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
),
'admin_password' => array(
'label' => $lng['login']['password'].'&nbsp;('.$lng['panel']['emptyfornochanges'].')',
'type' => 'password',
'autocomplete' => 'off',
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
),
'admin_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => generatePassword(),
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
),
'def_language' => array(
'label' => $lng['login']['language'],
'type' => 'select',
'select_var' => $language_options,
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
)
)
),
'section_b' => array(
'title' => $lng['admin']['contactdata'],
'image' => 'icons/user_edit.png',
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'type' => 'text',
'mandatory' => true,
'value' => $result['name']
),
'email' => array(
'label' => $lng['customer']['email'],
'type' => 'text',
'mandatory' => true,
'value' => $result['email']
),
'custom_notes' => array(
'style' => 'align-top',
'label' => $lng['usersettings']['custom_notes']['title'],
'desc' => $lng['usersettings']['custom_notes']['description'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $result['custom_notes']
),
'custom_notes_show' => array(
'label' => $lng['usersettings']['custom_notes']['show'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['custom_notes_show'])
)
)
),
'section_c' => array(
'title' => $lng['admin']['servicedata'],
'image' => 'icons/user_add.png',
'visible' => ($result['adminid'] != $userinfo['userid'] ? true : false),
'fields' => array(
'ipaddress' => array(
'label' => $lng['serversettings']['ipaddress']['title'],
'type' => 'select',
'select_var' => $ipaddress
),
'change_serversettings' => array(
'label' => $lng['admin']['change_serversettings'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['change_serversettings'])
),
'customers' => array(
'label' => $lng['admin']['customers'],
'type' => 'textul',
'value' => $result['customers'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $customers_ul
),
'customers_see_all' => array(
'label' => $lng['admin']['customers_see_all'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['customers_see_all'])
),
'domains' => array(
'label' => $lng['admin']['domains'],
'type' => 'textul',
'value' => $result['domains'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $domains_ul
),
'domains_see_all' => array(
'label' => $lng['admin']['domains_see_all'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['domains_see_all'])
),
'caneditphpsettings' => array(
'label' => $lng['admin']['caneditphpsettings'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['caneditphpsettings'])
),
'diskspace' => array(
'label' => $lng['customer']['diskspace'],
'type' => 'textul',
'value' => $result['diskspace'],
'maxlength' => 6,
'mandatory' => true,
'ul_field' => $diskspace_ul
),
'traffic' => array(
'label' => $lng['customer']['traffic'],
'type' => 'textul',
'value' => $result['traffic'],
'maxlength' => 4,
'mandatory' => true,
'ul_field' => $traffic_ul
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
'type' => 'textul',
'value' => $result['subdomains'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $subdomains_ul
),
'emails' => array(
'label' => $lng['customer']['emails'],
'type' => 'textul',
'value' => $result['emails'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $emails_ul
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
'type' => 'textul',
'value' => $result['email_accounts'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_accounts_ul
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
'type' => 'textul',
'value' => $result['email_forwarders'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_forwarders_ul
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'],
'type' => 'textul',
'value' => $result['email_quota'],
'maxlength' => 9,
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'mandatory' => true,
'ul_field' => $email_quota_ul
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
'type' => 'textul',
'value' => $result['ftps'],
'maxlength' => 9,
'ul_field' => $ftps_ul
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'value' => $result['tickets'],
'maxlength' => 9,
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
'ul_field' => $tickets_ul
),
'tickets_see_all' => array(
'label' => $lng['admin']['tickets_see_all'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['tickets_see_all'])
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',
'value' => $result['mysqls'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $mysqls_ul
)
)
)
)
)
);

View File

@@ -1,54 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'cronjobs_edit' => array(
'title' => $lng['admin']['cronjob_edit'],
'image' => 'icons/clock_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['cronjob']['cronjobsettings'],
'image' => 'icons/clock_edit.png',
'fields' => array(
'cronfile' => array(
'label' => 'Cronjob',
'type' => ($change_cronfile == 1 ? 'text' : 'label'),
'value' => $result['cronfile']
),
'isactive' => array(
'label' => $lng['admin']['activated'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['isactive'])
),
'interval_value' => array(
'label' => $lng['cronjob']['cronjobintervalv'],
'type' => 'text',
'value' => $interval_value
),
'interval_interval' => array(
'label' => $lng['cronjob']['cronjobinterval'],
'type' => 'select',
'select_var' => $interval_interval
)
)
)
)
)
);

View File

@@ -1,265 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'customer_add' => array(
'title' => $lng['admin']['customer_add'],
'image' => 'icons/user_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['accountdata'],
'image' => 'icons/user_add.png',
'fields' => array(
'new_loginname' => array(
'label' => $lng['login']['username'],
'type' => 'text'
),
'createstdsubdomain' => array(
'label' => $lng['admin']['stdsubdomain_add'].'?',
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array('1')
),
'store_defaultindex' => array(
'label' => $lng['admin']['store_defaultindex'].'?',
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array('1')
),
'new_customer_password' => array(
'label' => $lng['login']['password'],
'type' => 'password',
'autocomplete' => 'off'
),
'new_customer_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => generatePassword(),
),
'sendpassword' => array(
'label' => $lng['admin']['sendpassword'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array('1')
),
'def_language' => array(
'label' => $lng['login']['language'],
'type' => 'select',
'select_var' => $language_options
)
)
),
'section_b' => array(
'title' => $lng['admin']['contactdata'],
'image' => 'icons/user_add.png',
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'type' => 'text',
'mandatory_ex' => true
),
'firstname' => array(
'label' => $lng['customer']['firstname'],
'type' => 'text',
'mandatory_ex' => true
),
'gender' => array(
'label' => $lng['gender']['title'],
'type' => 'select',
'select_var' => $gender_options
),
'company' => array(
'label' => $lng['customer']['company'],
'type' => 'text',
'mandatory_ex' => true
),
'street' => array(
'label' => $lng['customer']['street'],
'type' => 'text'
),
'zipcode' => array(
'label' => $lng['customer']['zipcode'],
'type' => 'text'
),
'city' => array(
'label' => $lng['customer']['city'],
'type' => 'text'
),
'phone' => array(
'label' => $lng['customer']['phone'],
'type' => 'text'
),
'fax' => array(
'label' => $lng['customer']['fax'],
'type' => 'text'
),
'email' => array(
'label' => $lng['customer']['email'],
'type' => 'text',
'mandatory' => true
),
'customernumber' => array(
'label' => $lng['customer']['customernumber'],
'type' => 'text'
),
'custom_notes' => array(
'style' => 'align-top',
'label' => $lng['usersettings']['custom_notes']['title'],
'desc' => $lng['usersettings']['custom_notes']['description'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'custom_notes_show' => array(
'label' => $lng['usersettings']['custom_notes']['show'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array()
)
)
),
'section_c' => array(
'title' => $lng['admin']['servicedata'],
'image' => 'icons/user_add.png',
'fields' => array(
'diskspace' => array(
'label' => $lng['customer']['diskspace'],
'type' => 'textul',
'value' => 0,
'maxlength' => 6,
'mandatory' => true,
'ul_field' => $diskspace_ul
),
'traffic' => array(
'label' => $lng['customer']['traffic'],
'type' => 'textul',
'value' => 0,
'maxlength' => 4,
'mandatory' => true,
'ul_field' => $traffic_ul
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $subdomains_ul
),
'emails' => array(
'label' => $lng['customer']['emails'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $emails_ul
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_accounts_ul
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_forwarders_ul
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'mandatory' => true,
'ul_field' => $email_quota_ul
),
'email_imap' => array(
'label' => $lng['customer']['email_imap'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array('1'),
'mandatory' => true
),
'email_pop3' => array(
'label' => $lng['customer']['email_pop3'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array('1'),
'mandatory' => true
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'ul_field' => $ftps_ul
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
'ul_field' => $tickets_ul
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $mysqls_ul
),
'phpenabled' => array(
'label' => $lng['admin']['phpenabled'].'?',
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array('1')
),
'perlenabled' => array(
'label' => $lng['admin']['perlenabled'].'?',
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
)
)
)
)
)
)
);

View File

@@ -1,287 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'customer_edit' => array(
'title' => $lng['admin']['customer_edit'],
'image' => 'icons/user_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['accountdata'],
'image' => 'icons/user_edit.png',
'fields' => array(
'loginname' => array(
'label' => $lng['login']['username'],
'type' => 'label',
'value' => $result['loginname']
),
'documentroot' => array(
'label' => $lng['customer']['documentroot'],
'type' => 'label',
'value' => $result['documentroot']
),
'createstdsubdomain' => array(
'label' => $lng['admin']['stdsubdomain_add'].'?',
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array(($result['standardsubdomain'] != '0') ? '1' : '0')
),
'deactivated' => array(
'label' => $lng['admin']['deactivated_user'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['deactivated'])
),
'new_customer_password' => array(
'label' => $lng['login']['password'].'&nbsp;('.$lng['panel']['emptyfornochanges'].')',
'type' => 'password',
'autocomplete' => 'off'
),
'new_customer_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => generatePassword(),
),
'def_language' => array(
'label' => $lng['login']['language'],
'type' => 'select',
'select_var' => $language_options
)
)
),
'section_b' => array(
'title' => $lng['admin']['contactdata'],
'image' => 'icons/user_edit.png',
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['name']
),
'firstname' => array(
'label' => $lng['customer']['firstname'],
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['firstname']
),
'gender' => array(
'label' => $lng['gender']['title'],
'type' => 'select',
'select_var' => $gender_options
),
'company' => array(
'label' => $lng['customer']['company'],
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['company']
),
'street' => array(
'label' => $lng['customer']['street'],
'type' => 'text',
'value' => $result['street']
),
'zipcode' => array(
'label' => $lng['customer']['zipcode'],
'type' => 'text',
'value' => $result['zipcode']
),
'city' => array(
'label' => $lng['customer']['city'],
'type' => 'text',
'value' => $result['city']
),
'phone' => array(
'label' => $lng['customer']['phone'],
'type' => 'text',
'value' => $result['phone']
),
'fax' => array(
'label' => $lng['customer']['fax'],
'type' => 'text',
'value' => $result['fax']
),
'email' => array(
'label' => $lng['customer']['email'],
'type' => 'text',
'mandatory' => true,
'value' => $result['email']
),
'customernumber' => array(
'label' => $lng['customer']['customernumber'],
'type' => 'text',
'value' => $result['customernumber']
),
'custom_notes' => array(
'style' => 'align-top',
'label' => $lng['usersettings']['custom_notes']['title'],
'desc' => $lng['usersettings']['custom_notes']['description'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $result['custom_notes']
),
'custom_notes_show' => array(
'label' => $lng['usersettings']['custom_notes']['show'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['custom_notes_show'])
)
)
),
'section_c' => array(
'title' => $lng['admin']['servicedata'],
'image' => 'icons/user_edit.png',
'fields' => array(
'diskspace' => array(
'label' => $lng['customer']['diskspace'],
'type' => 'textul',
'value' => $result['diskspace'],
'maxlength' => 6,
'mandatory' => true,
'ul_field' => $diskspace_ul
),
'traffic' => array(
'label' => $lng['customer']['traffic'],
'type' => 'textul',
'value' => $result['traffic'],
'maxlength' => 4,
'mandatory' => true,
'ul_field' => $traffic_ul
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
'type' => 'textul',
'value' => $result['subdomains'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $subdomains_ul
),
'emails' => array(
'label' => $lng['customer']['emails'],
'type' => 'textul',
'value' => $result['emails'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $emails_ul
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
'type' => 'textul',
'value' => $result['email_accounts'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_accounts_ul
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
'type' => 'textul',
'value' => $result['email_forwarders'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_forwarders_ul
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'],
'type' => 'textul',
'value' => $result['email_quota'],
'maxlength' => 9,
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'mandatory' => true,
'ul_field' => $email_quota_ul
),
'email_imap' => array(
'label' => $lng['customer']['email_imap'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['imap']),
'mandatory' => true
),
'email_pop3' => array(
'label' => $lng['customer']['email_pop3'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['pop3']),
'mandatory' => true
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
'type' => 'textul',
'value' => $result['ftps'],
'maxlength' => 9,
'ul_field' => $ftps_ul
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'value' => $result['tickets'],
'maxlength' => 9,
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
'ul_field' => $tickets_ul
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',
'value' => $result['mysqls'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $mysqls_ul
),
'phpenabled' => array(
'label' => $lng['admin']['phpenabled'].'?',
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['phpenabled'])
),
'perlenabled' => array(
'label' => $lng['admin']['perlenabled'].'?',
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['perlenabled'])
)
)
),
'section_d' => array(
'title' => $lng['admin']['movetoadmin'],
'image' => 'icons/user_edit.png',
'visible' => ($admin_select_cnt > 1),
'fields' => array(
'move_to_admin' => array(
'label' => $lng['admin']['movecustomertoadmin'],
'type' => 'select',
'select_var' => $admin_select
)
)
)
)
)
);

View File

@@ -0,0 +1,276 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'accountdata' => array(
'title' => $lng['admin']['accountdata'],
'fields' => array(
'loginname' => array(
'label' => $lng['login']['username'],
'type' => (isset($result['loginname'])) ? 'static' : 'text',
'mandatory' => true,
'value' => $result['loginname'],
),
'deactivated' => array(
'label' => $lng['admin']['deactivated_user'],
'type' => 'checkbox',
'value' => '1',
'sublabel' => $lng['panel']['yes'],
'visible' => (isset($result['loginname']) && $result['adminid'] != $userinfo['userid']) ? true : false,
'attributes' => array(
'checked' => ($result['deactivated'] != 0)
)
),
'admin_password' => array(
'label' => $lng['login']['password'],
'type' => 'password',
'mandatory' => true,
'autocomplete' => 'off'
),
'admin_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => generatePassword(),
'default' => generatePassword(),
'attributes' => array(
'readonly' => true
)
),
'def_language' => array(
'label' => $lng['login']['language'],
'type' => 'select',
'generate' => 'languages',
'default' => Settings::Get('panel.standardlanguage'),
'selected' => $result['def_language']
)
)
),
'contactdata' => array(
'title' => $lng['admin']['contactdata'],
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'type' => 'text',
'mandatory' => true,
'value' => $result['name']
),
'email' => array(
'label' => $lng['customer']['email'],
'type' => 'email',
'mandatory' => true,
'value' => $result['email']
),
'custom_notes' => array(
'label' => $lng['usersettings']['custom_notes']['title'],
'desc' => $lng['usersettings']['custom_notes']['description'],
'type' => 'textarea',
'value' => $result['custom_notes'],
'attributes' => array(
'cols' => 60,
'rows' => 12
)
),
'custom_notes_show' => array(
'label' => $lng['usersettings']['custom_notes']['show'],
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'default' => false,
'attributes' => array(
'checked' => ($result['custom_notes_show'] != '0')
)
)
)
),
'servicedata' => array(
'title' => $lng['admin']['servicedata'],
'visible' => ($result['adminid'] != $userinfo['userid']),
'fields' => array(
'ipaddress' => array(
'label' => $lng['serversettings']['ipaddress']['title'],
'type' => 'select',
'values' => $ipaddress
),
'change_serversettings' => array(
'label' => $lng['admin']['change_serversettings'],
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => 1,
'attributes' => array(
'checked' => ($result['change_serversettings'] != '0')
)
),
'customers' => array(
'label' => $lng['admin']['customers'],
'type' => 'textul',
'default' => 0,
'value' => $result['customers'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 9
)
),
'customers_see_all' => array(
'label' => $lng['admin']['customers_see_all'],
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'attributes' => array(
'checked' => ($result['customers_see_all'] != 0)
)
),
'domains' => array(
'label' => $lng['admin']['domains'],
'type' => 'textul',
'default' => 0,
'value' => $result['domains'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 9
)
),
'domains_see_all' => array(
'label' => $lng['admin']['domains_see_all'],
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'attributes' => array(
'checked' => ($result['domains_see_all'] != 0)
)
),
'caneditphpsettings' => array(
'label' => $lng['admin']['caneditphpsettings'],
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'attributes' => array(
'checked' => ($result['caneditphpsettings'] != 0)
)
),
'diskspace' => array(
'label' => $lng['customer']['diskspace'],
'type' => 'textul',
'value' => $result['diskspace'],
'default' => 0,
'mandatory' => true,
'attributes' => array(
'maxlength' => 6
)
),
'traffic' => array(
'label' => $lng['customer']['traffic'],
'type' => 'textul',
'value' => $result['traffic'],
'default' => 0,
'mandatory' => true,
'attributes' => array(
'maxlength' => 4
)
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
'type' => 'textul',
'default' => 0,
'value' => $result['subdomains'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 9
)
),
'emails' => array(
'label' => $lng['customer']['emails'],
'type' => 'textul',
'default' => 0,
'value' => $result['emails'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 9
)
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
'type' => 'textul',
'default' => 0,
'value' => $result['email_accounts'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 9
)
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
'type' => 'textul',
'default' => 0,
'value' => $result['email_forwarders'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 9
)
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'],
'type' => 'textul',
'default' => 0,
'value' => $result['email_quota'],
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'mandatory' => true,
'attributes' => array(
'maxlength' => 9
)
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
'type' => 'textul',
'default' => 0,
'value' => $result['ftps'],
'attributes' => array(
'maxlength' => 9
)
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'default' => 0,
'value' => $result['tickets'],
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
'attributes' => array(
'maxlength' => 9
)
),
'tickets_see_all' => array(
'label' => $lng['admin']['tickets_see_all'],
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'attributes' => array(
'checked' => ($result['tickets_see_all'] != '0')
)
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',
'default' => 0,
'value' => $result['mysqls'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 9
)
)
)
)
);

View File

@@ -0,0 +1,47 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'section_a' => array(
'fields' => array(
'cronfile' => array(
'label' => 'Cronjob',
'type' => ($change_cronfile == 1 ? 'text' : 'static'),
'value' => $result['cronfile']
),
'isactive' => array(
'label' => $lng['admin']['activated'],
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => 1,
'attributes' => array(
'checked' => ($result['isactive'] != 0) ? true : false
)
),
'interval_value' => array(
'label' => $lng['cronjob']['cronjobintervalv'],
'type' => 'text',
'value' => $interval_value
),
'interval_interval' => array(
'label' => $lng['cronjob']['cronjobinterval'],
'type' => 'select',
'values' => $interval_interval
)
)
)
);

View File

@@ -0,0 +1,343 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'accountdata' => array(
'title' => $lng['admin']['accountdata'],
'fields' => array(
'new_loginname' => array(
'label' => $lng['login']['username'],
'type' => 'text',
'visible' => 'new'
),
'loginname' => array(
'label' => $lng['login']['username'],
'type' => 'static',
'value' => $result['loginname'],
'visible' => 'edit'
),
'documentroot' => array(
'label' => $lng['customer']['documentroot'],
'type' => 'static',
'value' => $result['documentroot'],
'visible' => 'edit'
),
'createstdsubdomain' => array(
'label' => $lng['admin']['stdsubdomain_add'].'?',
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'default' => true,
'attributes' => array(
'checked' => ($result['standardsubdomain'] != '0') ? true : false
)
),
'store_defaultindex' => array(
'label' => $lng['admin']['store_defaultindex'].'?',
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'default' => true,
'visible' => 'new'
),
'deactivated' => array(
'label' => $lng['admin']['deactivated_user'],
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'visible' => 'edit',
'attributes' => array(
'checked' => $result['deactivated']
)
),
'new_customer_password' => array(
'label' => $lng['login']['password'],
'type' => 'password',
'attributes' => array(
'autocomplete' => 'off'
)
),
'new_customer_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => generatePassword(),
'default' => generatePassword(),
'attributes' => array(
'readonly' => true
)
),
'sendpassword' => array(
'label' => $lng['admin']['sendpassword'],
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'default' => true,
'visible' => 'new',
'attributes' => array(
'checked' => true
)
),
'def_language' => array(
'label' => $lng['login']['language'],
'type' => 'select',
'generate' => 'languages',
'default' => Settings::Get('panel.standardlanguage'),
'selected' => $result['def_language']
)
)
),
'contactdata' => array(
'title' => $lng['admin']['contactdata'],
'fields' => array(
'gender' => array(
'label' => $lng['gender']['title'],
'type' => 'select',
'generate' => 'genders',
'default' => '0',
'selected' => $result['gender']
),
'name' => array(
'label' => $lng['customer']['name'],
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['name']
),
'firstname' => array(
'label' => $lng['customer']['firstname'],
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['firstname']
),
'company' => array(
'label' => $lng['customer']['company'],
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['company']
),
'street' => array(
'label' => $lng['customer']['street'],
'type' => 'text',
'value' => $result['street']
),
'zipcode' => array(
'label' => $lng['customer']['zipcode'],
'type' => 'text',
'value' => $result['zipcode']
),
'city' => array(
'label' => $lng['customer']['city'],
'type' => 'text',
'value' => $result['city']
),
'phone' => array(
'label' => $lng['customer']['phone'],
'type' => 'text',
'value' => $result['phone']
),
'fax' => array(
'label' => $lng['customer']['fax'],
'type' => 'text',
'value' => $result['fax']
),
'email' => array(
'label' => $lng['customer']['email'],
'type' => 'email',
'mandatory' => true,
'value' => $result['email']
),
'customernumber' => array(
'label' => $lng['customer']['customernumber'],
'type' => 'text',
'value' => $result['customernumber']
),
'custom_notes' => array(
'label' => $lng['usersettings']['custom_notes']['title'],
'desc' => $lng['usersettings']['custom_notes']['description'],
'type' => 'textarea',
'value' => $result['custom_notes'],
'attributes' => array(
'cols' => 60,
'rows' => 12
)
),
'custom_notes_show' => array(
'label' => $lng['usersettings']['custom_notes']['show'],
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'attributes' => array(
'checked' => ($result['custom_notes_show'] != '0') ? true : false
)
)
)
),
'servicedata' => array(
'title' => $lng['admin']['servicedata'],
'fields' => array(
'diskspace' => array(
'label' => $lng['customer']['diskspace'],
'type' => 'textul',
'default' => 0,
'value' => $result['diskspace'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 6,
)
),
'traffic' => array(
'label' => $lng['customer']['traffic'],
'type' => 'textul',
'default' => 0,
'value' => $result['traffic'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 4,
)
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
'type' => 'textul',
'default' => 0,
'value' => $result['subdomains'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 9,
)
),
'emails' => array(
'label' => $lng['customer']['emails'],
'type' => 'textul',
'default' => 0,
'value' => $result['emails'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 9,
)
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
'type' => 'textul',
'default' => 0,
'value' => $result['email_accounts'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 9,
)
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
'type' => 'textul',
'default' => 0,
'value' => $result['email_forwarders'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 9,
)
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'],
'type' => 'textul',
'default' => 0,
'value' => $result['email_quota'],
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'mandatory' => true,
'attributes' => array(
'maxlength' => 9,
)
),
'email_imap' => array(
'label' => $lng['customer']['email_imap'],
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'default' => true,
'attributes' => array(
'checked' => ($result['imap'] != '0') ? true : false
)
),
'email_pop3' => array(
'label' => $lng['customer']['email_pop3'],
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'default' => true,
'attributes' => array(
'checked' => ($result['pop3'] != '0') ? true : false
)
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
'type' => 'textul',
'default' => 0,
'value' => $result['ftps'],
'attributes' => array(
'maxlength' => 9,
)
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'default' => 0,
'value' => $result['tickets'],
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
'attributes' => array(
'maxlength' => 9,
)
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',
'default' => 0,
'value' => $result['mysqls'],
'mandatory' => true,
'attributes' => array(
'maxlength' => 9,
)
),
'phpenabled' => array(
'label' => $lng['admin']['phpenabled'].'?',
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'default' => true,
'attributes' => array(
'checked' => ($result['phpenabled'] != '0') ? true : false
)
),
'perlenabled' => array(
'label' => $lng['admin']['perlenabled'].'?',
'type' => 'checkbox',
'sublabel' => $lng['panel']['yes'],
'value' => '1',
'attributes' => array(
'checked' => ($result['perlenabled'] != '0') ? true : false
)
)
)
),
'movetoadmin' => array(
'title' => $lng['admin']['movetoadmin'],
'visible' => ($admin_select_cnt > 1 && isset($result['loginname'])),
'fields' => array(
'move_to_admin' => array(
'label' => $lng['admin']['movecustomertoadmin'],
'type' => 'select',
'values' => $admin_select
)
)
)
);