merged current stable 0.9.34 release as master
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -1,461 +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 Roman Schmerold <team@froxlor.org> (2015-)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Classes
|
||||
*
|
||||
*/
|
||||
|
||||
class HTMLform2 {
|
||||
// Internal var to store form
|
||||
private static $_form = '';
|
||||
|
||||
/**
|
||||
* genHTMLform function.
|
||||
*
|
||||
* @access public
|
||||
* @static
|
||||
* @param array $formdata (default: array())
|
||||
* @param array $data (default: array())
|
||||
* @return void
|
||||
*/
|
||||
public static function genHTMLform($formdata = array(), $data = false) {
|
||||
global $lng, $theme;
|
||||
self::$_form = '';
|
||||
|
||||
// Parse each group
|
||||
foreach ($formdata as $groupdata) {
|
||||
if (!isset($groupdata['visible']) || $groupdata['visible'] !== false) {
|
||||
// Output Section Heading
|
||||
if (isset($groupdata['title'])) {
|
||||
$grouptitle = $groupdata['title'];
|
||||
eval("self::\$_form .= \"" . getTemplate("htmlform/group_heading", "1") . "\";");
|
||||
}
|
||||
|
||||
// Generate Group Fields
|
||||
foreach($groupdata['fields'] as $fieldname => $fielddata) {
|
||||
if (isset($fielddata['visible'])) {
|
||||
if ($fielddata['visible'] == false) {
|
||||
continue;
|
||||
} elseif ($fielddata['visible'] === 'new' && is_array($data)) {
|
||||
continue;
|
||||
} elseif ($fielddata['visible'] === 'edit' && !is_array($data)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Set value if given
|
||||
if (!empty($data)) {
|
||||
$fielddata = self::_setValue($fieldname, $fielddata, $data);
|
||||
}
|
||||
|
||||
$field = self::_parseDataField($fieldname, $fielddata);
|
||||
|
||||
$label = $fielddata['label'] . self::_getMandatoryFlag($fielddata);
|
||||
if (isset($fielddata['desc']) && $fielddata['desc'] != "") {
|
||||
$desc = $fielddata['desc'];
|
||||
} else {
|
||||
$desc = '';
|
||||
}
|
||||
|
||||
switch($fielddata['type']) {
|
||||
case 'checkbox':
|
||||
eval("self::\$_form .= \"" . getTemplate("htmlform/skeleton_checkbox", "1") . "\";");
|
||||
break;
|
||||
default:
|
||||
eval("self::\$_form .= \"" . getTemplate("htmlform/skeleton", "1") . "\";");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eval("self::\$_form .= \"" . getTemplate("htmlform/form_end", "1") . "\";");
|
||||
|
||||
return self::$_form;
|
||||
}
|
||||
|
||||
private static function _setValue($fieldname, $fielddata, $data) {
|
||||
if (isset($data[$fieldname])) {
|
||||
switch($fielddata['type']) {
|
||||
case 'checkbox':
|
||||
$fielddata['attributes']['checked'] = ($data[$fieldname] == 1) ? true : false;
|
||||
break;
|
||||
case 'select':
|
||||
$fielddata['selected'] = $data[$fieldname];
|
||||
break;
|
||||
default:
|
||||
$fielddata['value'] = $data[$fieldname];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $fielddata;
|
||||
}
|
||||
|
||||
private static function _parseDataField($fieldname, $fielddata) {
|
||||
switch($fielddata['type']) {
|
||||
case 'button':
|
||||
case 'submit':
|
||||
case 'reset':
|
||||
return self::_button($fieldname, $fielddata);
|
||||
break;
|
||||
case 'text':
|
||||
case 'password':
|
||||
case 'hidden':
|
||||
case 'file':
|
||||
case 'email':
|
||||
return self::_input($fieldname, $fielddata);
|
||||
break;
|
||||
case 'textul':
|
||||
return self::_inputUl($fieldname, $fielddata);
|
||||
break;
|
||||
case 'radio':
|
||||
return self::_inputRadio($fieldname, $fielddata);
|
||||
break;
|
||||
case 'checkbox':
|
||||
return self::_inputCheckbox($fieldname, $fielddata);
|
||||
break;
|
||||
case 'static':
|
||||
return self::_static($fieldname, $fielddata);
|
||||
break;
|
||||
case 'select':
|
||||
return self::_select($fieldname, $fielddata);
|
||||
break;
|
||||
case 'textarea':
|
||||
return self::_textarea($fieldname, $fielddata);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* _parseAttributes function.
|
||||
*
|
||||
* @access private
|
||||
* @static
|
||||
* @param string $fieldname
|
||||
* @param array $fielddata
|
||||
* @return void
|
||||
*/
|
||||
private static function _parseAttributes($fieldname, $fielddata) {
|
||||
$attributes = array();
|
||||
|
||||
// name
|
||||
$attributes['name'] = $fieldname;
|
||||
$attributes['id'] = $fieldname;
|
||||
|
||||
// value
|
||||
if ($fielddata['type'] != 'select') {
|
||||
if (isset($_SESSION['requestData'][$fieldname])) {
|
||||
$attributes['value'] = $_SESSION['requestData'][$fieldname];
|
||||
} elseif (isset($fielddata['value'])) {
|
||||
$attributes['value'] = $fielddata['value'];
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($fielddata['attributes'])) {
|
||||
if (isset($fielddata['attributes']['checked']) && $fielddata['attributes']['checked'] !== true) {
|
||||
unset($fielddata['attributes']['checked']);
|
||||
}
|
||||
if (isset($fielddata['attributes']['selected']) && $fielddata['attributes']['selected'] !== true) {
|
||||
unset($fielddata['attributes']['selected']);
|
||||
}
|
||||
if (isset($fielddata['attributes']['readonly']) && $fielddata['attributes']['readonly'] !== true) {
|
||||
unset($fielddata['attributes']['readonly']);
|
||||
}
|
||||
return array_merge($attributes, $fielddata['attributes']);
|
||||
} else {
|
||||
return $attributes;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* _glueAttributes function.
|
||||
*
|
||||
* @access private
|
||||
* @static
|
||||
* @param array $attributes
|
||||
* @return void
|
||||
*/
|
||||
private static function _glueAttributes($attributes) {
|
||||
$glued = array();
|
||||
foreach($attributes as $name => $value) {
|
||||
$glued[] = $name . "=\"" . $value . "\"";
|
||||
}
|
||||
return implode(" ", $glued);
|
||||
}
|
||||
|
||||
/**
|
||||
* _getMandatoryFlag function.
|
||||
*
|
||||
* @access private
|
||||
* @static
|
||||
* @param array $fielddata
|
||||
* @return void
|
||||
*/
|
||||
private static function _getMandatoryFlag($fielddata) {
|
||||
if (isset($fielddata['mandatory'])) {
|
||||
return ' <span class="red">*</span>';
|
||||
} elseif (isset($fielddata['mandatory_ex'])) {
|
||||
return ' <span class="red">**</span>';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* _button function.
|
||||
*
|
||||
* @access private
|
||||
* @static
|
||||
* @param string $fieldname
|
||||
* @param array $fielddata (default: array())
|
||||
* @param string $type (default: 'button')
|
||||
* @return void
|
||||
*/
|
||||
private static function _button($fieldname, $fielddata = array()) {
|
||||
$attributes = self::_parseAttributes($fieldname, $fielddata);
|
||||
$attributes['type'] = $fielddata['type'];
|
||||
$attributes = self::_glueAttributes($attributes);
|
||||
|
||||
eval("\$return = \"" . getTemplate("htmlform/button", "1") . "\";");
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* _input function.
|
||||
*
|
||||
* @access private
|
||||
* @static
|
||||
* @param string $fieldname
|
||||
* @param array $fielddata (default: array())
|
||||
* @param string $type (default: "text")
|
||||
* @return void
|
||||
*/
|
||||
private static function _input($fieldname, $fielddata = array()) {
|
||||
$attributes = self::_parseAttributes($fieldname, $fielddata);
|
||||
$attributes['type'] = $fielddata['type'];
|
||||
$attributes = self::_glueAttributes($attributes);
|
||||
|
||||
eval("\$return = \"" . getTemplate("htmlform/input", "1") . "\";");
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* _inputUl function.
|
||||
*
|
||||
* @access private
|
||||
* @static
|
||||
* @param string $fieldname
|
||||
* @param array $fielddata (default: array())
|
||||
* @return void
|
||||
*/
|
||||
private static function _inputUl($fieldname, $fielddata = array()) {
|
||||
global $lng;
|
||||
|
||||
// Input
|
||||
$attributes_input = self::_parseAttributes($fieldname, $fielddata);
|
||||
$attributes_input['type'] = "text";
|
||||
$attributes_input['value'] = ($fielddata['value'] == '-1') ? '' : $fielddata['value'];
|
||||
$attributes_input = self::_glueAttributes($attributes_input);
|
||||
|
||||
// Checkbox
|
||||
$checkboxdata = array(
|
||||
'label' => $lng['customer']['unlimited'],
|
||||
'type' => 'checkbox',
|
||||
'value' => '-1',
|
||||
'attributes' => array(
|
||||
'checked' => ($fielddata['value'] == '-1') ? true : false
|
||||
)
|
||||
);
|
||||
$attributes_checkbox = self::_parseAttributes($fieldname . "_ul", $checkboxdata);
|
||||
$attributes_checkbox['type'] = $checkboxdata['type'];
|
||||
$attributes_checkbox = self::_glueAttributes($attributes_checkbox);
|
||||
$label_checkbox = $checkboxdata['label'];
|
||||
|
||||
eval("\$return = \"" . getTemplate("htmlform/inputul", "1") . "\";");
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* _inputRadio function.
|
||||
*
|
||||
* @access private
|
||||
* @static
|
||||
* @param string $fieldname
|
||||
* @param array $fielddata (default: array())
|
||||
* @return void
|
||||
*/
|
||||
private static function _inputRadio($fieldname, $fielddata = array()) {
|
||||
$attributes = self::_parseAttributes($fieldname, $fielddata);
|
||||
$attributes['type'] = $fielddata['type'];
|
||||
$attributes = self::_glueAttributes($attributes);
|
||||
|
||||
// ToDo
|
||||
|
||||
eval("\$return = \"" . getTemplate("htmlform/radio", "1") . "\";");
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* _inputCheckbox function.
|
||||
*
|
||||
* @access private
|
||||
* @static
|
||||
* @param string $fieldname
|
||||
* @param array $fielddata (default: array())
|
||||
* @return void
|
||||
*/
|
||||
private static function _inputCheckbox($fieldname, $fielddata = array(), $labelHidden = true) {
|
||||
$attributes = self::_parseAttributes($fieldname, $fielddata);
|
||||
$attributes['type'] = $fielddata['type'];
|
||||
$attributes = self::_glueAttributes($attributes);
|
||||
|
||||
$label = $fielddata['label'];
|
||||
eval("\$return = \"" . getTemplate("htmlform/checkbox", "1") . "\";");
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* _static function.
|
||||
*
|
||||
* @access private
|
||||
* @static
|
||||
* @param string $fieldname
|
||||
* @param array $fielddata (default: array())
|
||||
* @return void
|
||||
*/
|
||||
private static function _static($fieldname, $fielddata = array()) {
|
||||
$value = $fielddata['value'];
|
||||
eval("\$return = \"" . getTemplate("htmlform/static", "1") . "\";");
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* _select function.
|
||||
*
|
||||
* @access private
|
||||
* @static
|
||||
* @param string $fieldname
|
||||
* @param array $fielddata (default: array())
|
||||
* @return void
|
||||
*/
|
||||
private static function _select($fieldname, $fielddata = array()) {
|
||||
$attributes = self::_parseAttributes($fieldname, $fielddata);
|
||||
$attributes = self::_glueAttributes($attributes);
|
||||
|
||||
if (isset($fielddata['generate'])) {
|
||||
switch($fielddata['generate']) {
|
||||
case 'genders':
|
||||
$fielddata['values'] = self::_generateGenders($fielddata['selected']);
|
||||
break;
|
||||
case 'languages':
|
||||
$fielddata['values'] = self::_generateLanguages($fielddata['selected']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$values = "";
|
||||
if (is_array($fielddata['values'])) {
|
||||
foreach($fielddata['values'] as $value) {
|
||||
$selected = "";
|
||||
if ((isset($value['selected']) && $value['selected'] == true) || (isset($fielddata['value']) && $value['value'] == $fielddata['value'])) {
|
||||
$selected = " selected";
|
||||
}
|
||||
$values .= "<option value=\"{$value['value']}\"$selected>{$value['label']}</option>";
|
||||
}
|
||||
} else {
|
||||
$values = $fielddata['values'];
|
||||
}
|
||||
eval("\$return = \"" . getTemplate("htmlform/select", "1") . "\";");
|
||||
|
||||
if (isset($fielddata['attributes']['multiple']) && $fielddata['attributes']['multiple'] == true) {
|
||||
$return = str_replace("name=\"$fieldname\"", "name=\"{$fieldname}[]\"", $return);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* _textarea function.
|
||||
*
|
||||
* @access private
|
||||
* @static
|
||||
* @param string $fieldname
|
||||
* @param array $fielddata (default: array())
|
||||
* @return void
|
||||
*/
|
||||
private static function _textarea($fieldname, $fielddata = array()) {
|
||||
$attributes = self::_parseAttributes($fieldname, $fielddata);
|
||||
unset($attributes['value']);
|
||||
$attributes = self::_glueAttributes($attributes);
|
||||
|
||||
$value = isset($fielddata['value']) ? $fielddata['value'] : "";
|
||||
eval("\$return = \"" . getTemplate("htmlform/textarea", "1") . "\";");
|
||||
return $return;
|
||||
}
|
||||
|
||||
private static function _generateGenders($selected = "") {
|
||||
global $lng;
|
||||
|
||||
$genders = array(
|
||||
array(
|
||||
"value" => 0,
|
||||
"label" => $lng['gender']['undef'],
|
||||
),
|
||||
array(
|
||||
"value" => 1,
|
||||
"label" => $lng['gender']['male']
|
||||
),
|
||||
array(
|
||||
"value" => 2,
|
||||
"label" => $lng['gender']['female']
|
||||
)
|
||||
);
|
||||
|
||||
// Check if something is selected
|
||||
if ($selected != "") {
|
||||
foreach ($genders as $key => $value) {
|
||||
if ($value['value'] == $selected) {
|
||||
$genders[$key]['selected'] = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $genders;
|
||||
}
|
||||
|
||||
private static function _generateLanguages($selected = "") {
|
||||
global $languages;
|
||||
$retlanguages = array();
|
||||
while (list($language_file, $language_name) = each($languages)) {
|
||||
$newlng = array(
|
||||
"value" => $language_file,
|
||||
"label" => $language_name
|
||||
);
|
||||
|
||||
if ($language_file == $selected) {
|
||||
$newlng['selected'] = true;
|
||||
}
|
||||
|
||||
$retlanguages[] = $newlng;
|
||||
|
||||
//$language_options.= makeoption($language_name, $language_file, Settings::Get('panel.standardlanguage'), true);
|
||||
}
|
||||
|
||||
return $retlanguages;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,429 +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 Configfiles
|
||||
*
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
||||
$vmail_group=posix_getgrgid(Settings::Get('system.vmail_gid'));
|
||||
|
||||
/* If one of them are not set, call it 'vmail' and suggest creating user/group
|
||||
* in scripts. */
|
||||
if ($vmail_user === false) {
|
||||
$vmail_username="vmail";
|
||||
} else {
|
||||
$vmail_username=$vmail_user['name'];
|
||||
}
|
||||
if ($vmail_group === false) {
|
||||
$vmail_groupname="vmail";
|
||||
} else {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return array(
|
||||
'freebsd' => array(
|
||||
'label' => 'FreeBSD',
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => array(
|
||||
'nginx' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/www/nginx',
|
||||
'make config',
|
||||
'set [x] IPv6 protocol (default)',
|
||||
'set [x] Enable HTTP module (default)',
|
||||
'set [x] Enable http_cache module (default)',
|
||||
'set [x] Enable http_gzip_static module',
|
||||
'set [x] Enable http_rewrite module (default)',
|
||||
'set [x] Enable http_ssl module (default)',
|
||||
'set [x] Enable http_stub_status module (default)',
|
||||
'make install clean; rehash',
|
||||
),
|
||||
'commands_2' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p '. Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p '. Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'mkdir -p '. Settings::Get('system.logfiles_directory'),
|
||||
'echo "nginx_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'usr_local_etc_nginx_nginx.conf' => '/usr/local/etc/nginx/nginx.conf',
|
||||
),
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/nginx restart'
|
||||
)
|
||||
),
|
||||
'apache2' => array(
|
||||
'label' => 'Apache2 Webserver',
|
||||
'commands' => array(
|
||||
'cd /usr/ports/www/apache22',
|
||||
'make config',
|
||||
'make install',
|
||||
$configcommand['vhost'],
|
||||
'chown root:0 ' . Settings::Get('system.apacheconf_vhost'),
|
||||
'chmod 0600 ' . Settings::Get('system.apacheconf_vhost'),
|
||||
$configcommand['diroptions'],
|
||||
'chown root:0 ' . Settings::Get('system.apacheconf_diroptions'),
|
||||
'chmod 0600 ' . Settings::Get('system.apacheconf_diroptions'),
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'echo "accf_http_load=\"YES\"" >> /boot/loader.conf',
|
||||
'echo "accf_data_load=\"YES\"" >> /boot/loader.conf',
|
||||
'echo "apache22_enable=\"YES\"" >> /etc/rc.conf',
|
||||
),
|
||||
'restart' => array(
|
||||
'sh /usr/local/etc/rc.d/apache22 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => array(
|
||||
|
||||
// Begin: Bind 9.x Config
|
||||
'bind9' => array(
|
||||
'label' => 'Bind9 Nameserver',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/dns/bind99',
|
||||
'make config',
|
||||
'set [x] International Domain Names',
|
||||
'set [x] IPv6 protocol (default)',
|
||||
'set [x] 64-bit file support',
|
||||
'set [x] Replace base BIND with this version',
|
||||
'set [x] Enable RPZ NSDNAME policy records',
|
||||
'set [x] Enable RPZ NSIP trigger rules',
|
||||
'set [x] dig/host/nslookup will do DNSSEC validation',
|
||||
'set [x] Build with OpenSSL (Required for DNSSEC) (default)',
|
||||
'set [x] Threading support (default)',
|
||||
'make install clean; rehash',
|
||||
),
|
||||
'commands_2' => array(
|
||||
'echo "named_enable=\"YES\"" >> /etc/rc.conf',
|
||||
PHP_EOL,
|
||||
(strpos(Settings::Get('system.bindconf_directory'), '/etc/namedb') === false) ? '(TIP: Be sure the path below is "/etc/namedb", if not you have configured the bind-directory in a false way in PANEL->SETTINGS->NAMESERVER SETTINGS!)' : null,
|
||||
'echo "include \"'. Settings::Get('system.bindconf_directory') .'froxlor_bind.conf\";" >> '. Settings::Get('system.bindconf_directory') .'named.conf',
|
||||
'echo "include \"'. Settings::Get('system.bindconf_directory') .'default-zone\";" >> '. Settings::Get('system.bindconf_directory') .'named.conf',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_namedb_named.conf' => Settings::Get('system.bindconf_directory') .'named.conf',
|
||||
'etc_namedb_master_default.zone' => Settings::Get('system.bindconf_directory') .'master/default.zone',
|
||||
'etc_namedb_default-zone' => Settings::Get('system.bindconf_directory') .'default-zone',
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/rc.d/named restart'
|
||||
)
|
||||
),
|
||||
// End: Bind 9.x Config
|
||||
|
||||
'powerdns' => array(
|
||||
'label' => 'PowerDNS',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/dns/powerdns',
|
||||
'make config',
|
||||
'set MySQL backend',
|
||||
'make install',
|
||||
'echo "pdns_enable=\"YES\"" >> /etc/rc.conf',
|
||||
),
|
||||
'files' => array(
|
||||
'usr_local_etc_pdns_pdns.conf' => '/usr/local/etc/pdns/pdns.conf'
|
||||
),
|
||||
'commands' => array(
|
||||
'touch ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chown root:0 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chmod 0600 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'sh /usr/local/etc/rc.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => array(
|
||||
'postfix' => array(
|
||||
'label' => 'Postfix',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/mail/postfix',
|
||||
'make config',
|
||||
'set Dovecot SASL authentication method',
|
||||
'set Enable SSL and TLS support',
|
||||
'set MySQL maps (choose version with WITH_MYSQL_VER)',
|
||||
'make install'
|
||||
),
|
||||
'commands_2' => array(
|
||||
($vmail_group === false) ? 'pw groupadd ' . $vmail_groupname . ' -g '.Settings::Get('system.vmail_gid') : '',
|
||||
($vmail_user === false) ? 'pw useradd ' . $vmail_username . ' -u '.Settings::Get('system.vmail_uid').' -g '.Settings::Get('system.vmail_gid').' -s/sbin/nologin -d/dev/null' : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
||||
'chmod 0750 ' . Settings::Get('system.vmail_homedir')
|
||||
),
|
||||
'commands_3' => array(
|
||||
'echo "sendmail_enable=\"NO\"" >> /etc/rc.conf',
|
||||
'echo "sendmail_submit_enable=\"NO\"" >> /etc/rc.conf',
|
||||
'echo "sendmail_outbound_enable=\"NO\"" >> /etc/rc.conf',
|
||||
'echo "sendmail_msp_queue_enable=\"NO\"" >> /etc/rc.conf',
|
||||
'echo "postfix_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_periodic.conf' => '/etc/periodic.conf',
|
||||
'usr_local_etc_postfix_main.cf' => '/usr/local/etc/postfix/main.cf',
|
||||
'usr_local_etc_postfix_mysql-virtual_alias_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'usr_local_etc_postfix_mysql-virtual_mailbox_domains.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'usr_local_etc_postfix_mysql-virtual_mailbox_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'usr_local_etc_postfix_mysql-virtual_sender_permissions.cf' => '/usr/local/etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'mkdir /var/spool/postfix/etc',
|
||||
'cp /etc/resolv.conf /var/spool/postfix/etc',
|
||||
'sh /usr/local/etc/rc.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postgrey' => array(
|
||||
'label' => 'Postgrey',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/mail/postgrey',
|
||||
'make install clean'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'sed -i.bak \'s/# *check_policy_service *inet:127\.0\.0\.1:10023/ check_policy_service inet:127\.0\.0\.1:10023/\' /usr/local/etc/postfix/main.cf',
|
||||
'echo "postgrey_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/postgrey restart',
|
||||
'/usr/local/etc/rc.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/usr/local/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/usr/local/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => array(
|
||||
'postmap /usr/local/etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands' => array(
|
||||
'cd /usr/ports/mail/dkim-milter/',
|
||||
'make install clean',
|
||||
'touch /usr/local/etc/mail/dkim-filter.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'dkim-filter.conf' => '/usr/local/etc/mail/dkim-filter.conf',
|
||||
'postfix_dkim_addition.cf' => '/usr/local/etc/postfix/main.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/milter-dkim restart '
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => array(
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/mail/dovecot',
|
||||
'make config',
|
||||
'set kqueue(2) support ',
|
||||
'set SSL support ',
|
||||
'set ManageSieve support (optional)',
|
||||
'set MySQL support ',
|
||||
'make install',
|
||||
'echo "dovecot_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'usr_local_etc_dovecot.conf' => '/usr/local/etc/dovecot.conf',
|
||||
'usr_local_etc_dovecot-sql.conf' => '/usr/local/etc/dovecot-sql.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'echo "dovecot unix - n n - - pipe
|
||||
flags=DRhu user='.$vmail_username.':'.$vmail_groupname.' argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}" >> /usr/local/etc/postfix/master.cf',
|
||||
'chmod 0640 /usr/local/etc/dovecot-sql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'sh /usr/local/etc/rc.d/dovecot restart'
|
||||
)
|
||||
),
|
||||
|
||||
// Begin: Dovecot 2.x Config
|
||||
'dovecot2' => array(
|
||||
'label' => 'Dovecot 2.x',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/mail/dovecot2',
|
||||
'make config',
|
||||
'set [x] kqueue(2) support (default)',
|
||||
'set [x] MySQL database',
|
||||
'set [x] SSL protocol (default)',
|
||||
'make install clean; rehash',
|
||||
),
|
||||
'commands_2' => array(
|
||||
'echo "dovecot_enable=\"YES\"" >> /etc/rc.conf',
|
||||
PHP_EOL,
|
||||
'pw adduser '. $vmail_username .' -g '. $vmail_groupname .' -u '. Settings::Get('system.vmail_gid') .' -d /nonexistent -s /usr/sbin/nologin -c "User for virtual mailtransport used by Postfix and Dovecot"',
|
||||
PHP_EOL,
|
||||
'chmod 0640 /usr/local/etc/dovecot-sql.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'usr_local_etc_dovecot_dovecot.conf' => '/usr/local/etc/dovecot/dovecot.conf',
|
||||
'usr_local_etc_dovecot_dovecot-sql.conf' => '/usr/local/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'commands_3' => array(
|
||||
'echo "dovecot unix - n n - - pipe'. PHP_EOL .'flags=DRhu user='. $vmail_username .':'. $vmail_groupname .' argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient} -a ${recipient}" >> /usr/local/etc/postfix/master.cf',
|
||||
),
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
// End: Dovecot 2.x Config
|
||||
|
||||
)
|
||||
),
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/ftp/proftpd',
|
||||
'make config',
|
||||
'set MySQL auth',
|
||||
'set Include mod_quota',
|
||||
'make install clean'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'touch /usr/local/etc/proftpd.conf',
|
||||
'chown root:0 /usr/local/etc/proftpd.conf',
|
||||
'chmod 0600 /usr/local/etc/proftpd.conf',
|
||||
'echo "proftpd_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_proftpd_proftpd.conf' => '/usr/local/etc/proftpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => array (
|
||||
'label' => 'Pure-FTPd',
|
||||
'commands_1' => array (
|
||||
'cd /usr/ports/ftp/pure-ftpd',
|
||||
'make config',
|
||||
'# select LARGEFILE,MYSQL,PAM,PRIVSEP,SENDFILE,THROTTLING,TLS,UTF8,VIRTUALCHROOT',
|
||||
'make install clean'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'touch /usr/local/etc/pure-ftpd.conf',
|
||||
'touch /usr/local/etc/pureftpd-mysql.conf',
|
||||
'chown root:0 /usr/local/etc/pure-ftpd.conf',
|
||||
'chown root:0 /usr/local/etc/pureftpd-mysql.conf',
|
||||
'chmod 0600 /usr/local/etc/pure-ftpd.conf',
|
||||
'chmod 0600 /usr/local/etc/pureftpd-mysql.conf',
|
||||
'echo "pure-ftpd_enable="YES" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'usr_local_etc_pure-ftpd.conf' => '/usr/local/etc/pure-ftpd.conf',
|
||||
'usr_local_etc_pureftpd-mysql.conf' => '/usr/local/etc/pureftpd-mysql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'service pure-ftpd restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'commands' => array(
|
||||
'echo "*/5 * * * * root nice -n 5 /usr/local/bin/php -q '.makeCorrectDir(dirname(dirname(dirname(__FILE__)))).'scripts/froxlor_master_cronjob.php" >> /etc/crontab'
|
||||
),
|
||||
'restart' => array(
|
||||
Settings::Get('system.crondreload')
|
||||
)
|
||||
),
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => array(
|
||||
'cd /usr/ports/www/awstats/',
|
||||
'make install clean',
|
||||
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir(Settings::Get('system.awstats_conf')),
|
||||
'sed -i.bak \'s/^LogFile/# LogFile/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^LogType/# LogType/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^LogFormat/# LogFormat/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^LogSeparator/# LogSeparator/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^SiteDomain/# SiteDomain/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
|
||||
)
|
||||
),
|
||||
'libnss' => array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/net/libnss-mysql',
|
||||
'make install clean',
|
||||
'echo "nscd_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'usr_local_etc_libnss-mysql.cfg' => '/usr/local/etc/libnss-mysql.cfg',
|
||||
'usr_local_etc_libnss-mysql-root.cfg' => '/usr/local/etc/libnss-mysql-root.cfg',
|
||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod 600 /usr/local/etc/libnss-mysql.cfg /usr/local/etc/libnss-mysql-root.cfg'
|
||||
),
|
||||
'restart' => array(
|
||||
'sh /etc/rc.d/nscd restart'
|
||||
)
|
||||
),
|
||||
'logrotate' => array(
|
||||
'label' => 'Logrotate',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/sysutils/logrotate/',
|
||||
'make install clean clean-depends',
|
||||
'touch /etc/logrotate.d/froxlor',
|
||||
'chmod 644 /etc/logrotate.d/froxlor'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_logrotated_froxlor' => '/etc/logrotate.d/froxlor'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'# create cronjob-entry (daily-recommended)',
|
||||
'0 2 * * * /usr/local/sbin/logrotate -f /etc/logrotate.d/froxlor'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1441,7 +1441,7 @@ sql_select: SELECT password_enc FROM mail_users WHERE username='%u@%r' OR email=
|
||||
<service type="mail" title="{{lng.admin.configfiles.mail}}">
|
||||
<!-- Dovecot -->
|
||||
<daemon name="dovecot" version="2" title="Dovecot" default="true">
|
||||
<command><![CDATA[echo "net-mail/dovecot mysql" >> /etc/portage/package.use]]></command>
|
||||
<command><![CDATA[echo "net-mail/dovecot mysql managesieve sieve" >> /etc/portage/package.use]]></command>
|
||||
<install><![CDATA[emerge net-mail/dovecot]]></install>
|
||||
<file name="/etc/dovecot/dovecot.conf" chown="root:root"
|
||||
chmod="0640" backup="true">
|
||||
@@ -1557,6 +1557,233 @@ default_pass_scheme = CRYPT
|
||||
password_query = "SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota,'M') AS userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')"
|
||||
user_query = "SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', quota,'M') AS quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')"
|
||||
iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)"
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:root"
|
||||
chmod="0600" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## ManageSieve specific settings
|
||||
##
|
||||
|
||||
# Uncomment to enable managesieve protocol:
|
||||
protocols = $protocols sieve
|
||||
|
||||
# Service definitions
|
||||
|
||||
service managesieve-login {
|
||||
inet_listener sieve {
|
||||
port = 4190
|
||||
}
|
||||
|
||||
#inet_listener sieve_deprecated {
|
||||
# port = 2000
|
||||
#}
|
||||
|
||||
# Number of connections to handle before starting a new process. Typically
|
||||
# the only useful values are 0 (unlimited) or 1. 1 is more secure, but 0
|
||||
# is faster. <doc/wiki/LoginProcess.txt>
|
||||
#service_count = 1
|
||||
|
||||
# Number of processes to always keep waiting for more connections.
|
||||
#process_min_avail = 0
|
||||
|
||||
# If you set service_count=0, you probably need to grow this.
|
||||
#vsz_limit = 64M
|
||||
}
|
||||
|
||||
#service managesieve {
|
||||
# Max. number of ManageSieve processes (connections)
|
||||
#process_limit = 1024
|
||||
#}
|
||||
|
||||
# Service configuration
|
||||
|
||||
protocol sieve {
|
||||
# Maximum ManageSieve command line length in bytes. ManageSieve usually does
|
||||
# not involve overly long command lines, so this setting will not normally
|
||||
# need adjustment
|
||||
#managesieve_max_line_length = 65536
|
||||
|
||||
# Maximum number of ManageSieve connections allowed for a user from each IP
|
||||
# address.
|
||||
# NOTE: The username is compared case-sensitively.
|
||||
#mail_max_userip_connections = 10
|
||||
|
||||
# Space separated list of plugins to load (none known to be useful so far).
|
||||
# Do NOT try to load IMAP plugins here.
|
||||
#mail_plugins =
|
||||
|
||||
# MANAGESIEVE logout format string:
|
||||
# %i - total number of bytes read from client
|
||||
# %o - total number of bytes sent to client
|
||||
#managesieve_logout_format = bytes=%i/%o
|
||||
|
||||
# To fool ManageSieve clients that are focused on CMU's timesieved you can
|
||||
# specify the IMPLEMENTATION capability that Dovecot reports to clients.
|
||||
# For example: 'Cyrus timsieved v2.2.13'
|
||||
#managesieve_implementation_string = Dovecot Pigeonhole
|
||||
|
||||
# Explicitly specify the SIEVE and NOTIFY capability reported by the server
|
||||
# before login. If left unassigned these will be reported dynamically
|
||||
# according to what the Sieve interpreter supports by default (after login
|
||||
# this may differ depending on the user).
|
||||
#managesieve_sieve_capability =
|
||||
#managesieve_notify_capability =
|
||||
|
||||
# The maximum number of compile errors that are returned to the client upon
|
||||
# script upload or script verification.
|
||||
#managesieve_max_compile_errors = 5
|
||||
|
||||
# Refer to 90-sieve.conf for script quota configuration and configuration of
|
||||
# Sieve execution limits.
|
||||
}
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
<file name="/etc/dovecot/conf.d/90-sieve.conf" chown="root:root"
|
||||
chmod="0600" backup="true">
|
||||
<content><![CDATA[
|
||||
##
|
||||
## Settings for the Sieve interpreter
|
||||
##
|
||||
|
||||
# Do not forget to enable the Sieve plugin in 15-lda.conf and 20-lmtp.conf
|
||||
# by adding it to the respective mail_plugins= settings.
|
||||
|
||||
# The Sieve interpreter can retrieve Sieve scripts from several types of
|
||||
# locations. The default `file' location type is a local filesystem path
|
||||
# pointing to a Sieve script file or a directory containing multiple Sieve
|
||||
# script files. More complex setups can use other location types such as
|
||||
# `ldap' or `dict' to fetch Sieve scripts from remote databases.
|
||||
#
|
||||
# All settings that specify the location of one ore more Sieve scripts accept
|
||||
# the following syntax:
|
||||
#
|
||||
# location = [<type>:]path[;<option>[=<value>][;...]]
|
||||
#
|
||||
# If the type prefix is omitted, the script location type is 'file' and the
|
||||
# location is interpreted as a local filesystem path pointing to a Sieve script
|
||||
# file or directory. Refer to Pigeonhole wiki or INSTALL file for more
|
||||
# information.
|
||||
|
||||
plugin {
|
||||
# The location of the user's main Sieve script or script storage. The LDA
|
||||
# Sieve plugin uses this to find the active script for Sieve filtering at
|
||||
# delivery. The "include" extension uses this location for retrieving
|
||||
# :personal" scripts. This is also where the ManageSieve service will store
|
||||
# the user's scripts, if supported.
|
||||
#
|
||||
# Currently only the 'file:' location type supports ManageSieve operation.
|
||||
# Other location types like 'dict:' and 'ldap:' can currently only
|
||||
# be used as a read-only script source ().
|
||||
#
|
||||
# For the 'file:' type: use the ';active=' parameter to specify where the
|
||||
# active script symlink is located.
|
||||
# For other types: use the ';name=' parameter to specify the name of the
|
||||
# default/active script.
|
||||
|
||||
sieve = file:~/sieve;active=~/sieve/.dovecot.sieve
|
||||
|
||||
# The default Sieve script when the user has none. This is the location of a
|
||||
# global sieve script file, which gets executed ONLY if user's personal Sieve
|
||||
# script doesn't exist. Be sure to pre-compile this script manually using the
|
||||
# sievec command line tool if the binary is not stored in a global location.
|
||||
# --> See sieve_before for executing scripts before the user's personal
|
||||
# script.
|
||||
#sieve_default = /var/lib/dovecot/sieve/default.sieve
|
||||
|
||||
# The name by which the default Sieve script (as configured by the
|
||||
# sieve_default setting) is visible to the user through ManageSieve.
|
||||
#sieve_default_name =
|
||||
|
||||
# Location for ":global" include scripts as used by the "include" extension.
|
||||
#sieve_global =
|
||||
|
||||
# Location Sieve of scripts that need to be executed before the user's
|
||||
# personal script. If a 'file' location path points to a directory, all the
|
||||
# Sieve scripts contained therein (with the proper `.sieve' extension) are
|
||||
# executed. The order of execution within that directory is determined by the
|
||||
# file names, using a normal 8bit per-character comparison.
|
||||
#
|
||||
# Multiple script locations can be specified by appending an increasing number
|
||||
# to the setting name. The Sieve scripts found from these locations are added
|
||||
# to the script execution sequence in the specified order. Reading the
|
||||
# numbered sieve_before settings stops at the first missing setting, so no
|
||||
# numbers may be skipped.
|
||||
#sieve_before = /var/lib/dovecot/sieve.d/
|
||||
#sieve_before2 = ldap:/etc/sieve-ldap.conf;name=ldap-domain
|
||||
#sieve_before3 = (etc...)
|
||||
|
||||
# Identical to sieve_before, only the specified scripts are executed after the
|
||||
# user's script (only when keep is still in effect!). Multiple script
|
||||
# locations can be specified by appending an increasing number.
|
||||
#sieve_after =
|
||||
#sieve_after2 =
|
||||
#sieve_after2 = (etc...)
|
||||
|
||||
# Which Sieve language extensions are available to users. By default, all
|
||||
# supported extensions are available, except for deprecated extensions or
|
||||
# those that are still under development. Some system administrators may want
|
||||
# to disable certain Sieve extensions or enable those that are not available
|
||||
# by default. This setting can use '+' and '-' to specify differences relative
|
||||
# to the default. For example `sieve_extensions = +imapflags' will enable the
|
||||
# deprecated imapflags extension in addition to all extensions were already
|
||||
# enabled by default.
|
||||
#sieve_extensions = +notify +imapflags
|
||||
|
||||
# Which Sieve language extensions are ONLY available in global scripts. This
|
||||
# can be used to restrict the use of certain Sieve extensions to administrator
|
||||
# control, for instance when these extensions can cause security concerns.
|
||||
# This setting has higher precedence than the `sieve_extensions' setting
|
||||
# (above), meaning that the extensions enabled with this setting are never
|
||||
# available to the user's personal script no matter what is specified for the
|
||||
# `sieve_extensions' setting. The syntax of this setting is similar to the
|
||||
# `sieve_extensions' setting, with the difference that extensions are
|
||||
# enabled or disabled for exclusive use in global scripts. Currently, no
|
||||
# extensions are marked as such by default.
|
||||
#sieve_global_extensions =
|
||||
|
||||
# The Pigeonhole Sieve interpreter can have plugins of its own. Using this
|
||||
# setting, the used plugins can be specified. Check the Dovecot wiki
|
||||
# (wiki2.dovecot.org) or the pigeonhole website
|
||||
# (http://pigeonhole.dovecot.org) for available plugins.
|
||||
# The sieve_extprograms plugin is included in this release.
|
||||
#sieve_plugins =
|
||||
|
||||
# The separator that is expected between the :user and :detail
|
||||
# address parts introduced by the subaddress extension. This may
|
||||
# also be a sequence of characters (e.g. '--'). The current
|
||||
# implementation looks for the separator from the left of the
|
||||
# localpart and uses the first one encountered. The :user part is
|
||||
# left of the separator and the :detail part is right. This setting
|
||||
# is also used by Dovecot's LMTP service.
|
||||
#recipient_delimiter = +
|
||||
|
||||
# The maximum size of a Sieve script. The compiler will refuse to compile any
|
||||
# script larger than this limit. If set to 0, no limit on the script size is
|
||||
# enforced.
|
||||
#sieve_max_script_size = 1M
|
||||
|
||||
# The maximum number of actions that can be performed during a single script
|
||||
# execution. If set to 0, no limit on the total number of actions is enforced.
|
||||
#sieve_max_actions = 32
|
||||
|
||||
# The maximum number of redirect actions that can be performed during a single
|
||||
# script execution. If set to 0, no redirect actions are allowed.
|
||||
#sieve_max_redirects = 4
|
||||
|
||||
# The maximum number of personal Sieve scripts a single user can have. If set
|
||||
# to 0, no limit on the number of scripts is enforced.
|
||||
# (Currently only relevant for ManageSieve)
|
||||
#sieve_quota_max_scripts = 0
|
||||
|
||||
# The maximum amount of disk storage a single user's scripts may occupy. If
|
||||
# set to 0, no limit on the used amount of disk storage is enforced.
|
||||
# (Currently only relevant for ManageSieve)
|
||||
#sieve_quota_max_storage = 0
|
||||
}
|
||||
]]>
|
||||
</content>
|
||||
</file>
|
||||
|
||||
@@ -1,419 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Configfiles
|
||||
*
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
||||
$vmail_group=posix_getgrgid(Settings::Get('system.vmail_gid'));
|
||||
|
||||
/* If one of them are not set, call it 'vmail' and suggest creating user/group
|
||||
* in scripts. */
|
||||
if ($vmail_user === false) {
|
||||
$vmail_username="vmail";
|
||||
} else {
|
||||
$vmail_username=$vmail_user['name'];
|
||||
}
|
||||
if ($vmail_group === false) {
|
||||
$vmail_groupname="vmail";
|
||||
} else {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return array(
|
||||
'ubuntu_lucid' => array(
|
||||
'label' => 'Ubuntu 10.04 (Lucid) [deprecated]',
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => array(
|
||||
'apache2' => array(
|
||||
'label' => 'Apache 2',
|
||||
'commands' => array(
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'a2dismod userdir'
|
||||
),
|
||||
'files' => ((int)Settings::Get('phpfpm.enabled') == 1) ?
|
||||
array(
|
||||
'etc_apache2_mods-enabled_fastcgi.conf' => '/etc/apache2/mods-enabled/fastcgi.conf'
|
||||
)
|
||||
:
|
||||
null,
|
||||
'restart' => array(
|
||||
'/etc/init.d/apache2 restart'
|
||||
),
|
||||
),
|
||||
'lighttpd' => array(
|
||||
'label' => 'Lighttpd Webserver',
|
||||
'commands_1' => array(
|
||||
'apt-get install lighttpd',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf',
|
||||
),
|
||||
'commands_2' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir')
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
),
|
||||
),
|
||||
'nginx' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => array(
|
||||
'apt-get install nginx php5-cgi',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_nginx_nginx.conf' => '/etc/nginx/nginx.conf',
|
||||
'etc_init.d_php-fcgi' => '/etc/init.d/php-fcgi'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'rm /etc/nginx/sites-enabled/default',
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod u+x /etc/init.d/php-fcgi'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/php-fcgi start',
|
||||
'/etc/init.d/nginx restart'
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
)
|
||||
),
|
||||
'powerdns' => array(
|
||||
'label' => 'PowerDNS',
|
||||
'files' => array(
|
||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => array(
|
||||
'postfix_courier' => array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
||||
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'touch /etc/postfix/sasl/smtpd.conf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0600 /etc/postfix/sasl/smtpd.conf',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands_1' => array(
|
||||
'apt-get install dkim-filter',
|
||||
'mkdir -p /etc/postfix/dkim'
|
||||
),
|
||||
'files' => array(
|
||||
'dkim-filter.conf' => '/etc/dkim-filter.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'echo "milter_default_action = accept" >> /etc/postfix/main.cf',
|
||||
'echo "milter_protocol = 2" >> /etc/postfix/main.cf',
|
||||
'echo "smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf',
|
||||
'echo "non_smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/dkim-filter restart',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
||||
'apt-get install postfix postfix-mysql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:root /etc/postfix/master.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0644 /etc/postfix/master.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => array(
|
||||
'dpkg-reconfigure exim4-config',
|
||||
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
||||
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
||||
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
||||
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
||||
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod o-rx /var/lib/exim4',
|
||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/exim4 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'commands' => array(
|
||||
'apt-get install courier-pop courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
|
||||
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => array(
|
||||
'apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_dovecot_auth.d_01-dovecot-postfix.auth' => '/etc/dovecot/auth.d/01-dovecot-postfix.auth',
|
||||
'etc_dovecot_conf.d_01-dovecot-postfix.conf' => '/etc/dovecot/conf.d/01-dovecot-postfix.conf',
|
||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => array(
|
||||
'label' => 'Pure FTPd',
|
||||
'commands_1' => array(
|
||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID',
|
||||
'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile',
|
||||
'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous',
|
||||
'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime',
|
||||
'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone',
|
||||
'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication',
|
||||
'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf',
|
||||
'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof',
|
||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/pure-ftpd-mysql restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => array(
|
||||
Settings::Get('system.crondreload')
|
||||
)
|
||||
),
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')),
|
||||
'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
|
||||
'rm /etc/cron.d/awstats'
|
||||
),
|
||||
),
|
||||
'libnss' => array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands' => array(
|
||||
'apt-get install libnss-mysql nscd',
|
||||
'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_nss-mysql.conf' => '/etc/nss-mysql.conf',
|
||||
'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf',
|
||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/nscd restart'
|
||||
)
|
||||
),
|
||||
'logrotate' => array(
|
||||
'label' => 'Logrotate',
|
||||
'commands_1' => array(
|
||||
'apt-get install logrotate',
|
||||
'touch /etc/logrotate.d/froxlor',
|
||||
'chmod 644 /etc/logrotate.d/froxlor'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_logrotated_froxlor' => '/etc/logrotate.d/froxlor'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'# apt automatically adds a daily cronjob for logrotate',
|
||||
'# you do not have to do anything else :)'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -239,6 +239,16 @@ fastcgi_param REDIRECT_STATUS 200;
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
#!/bin/bash
|
||||
### BEGIN INIT INFO
|
||||
# Provides: php-fcgi
|
||||
# Required-Start: $remote_fs $syslog
|
||||
# Required-Stop: $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: php-fcgi initscript
|
||||
# Description: Custom php-fcgi initscript for Froxlor
|
||||
### END INIT INFO
|
||||
|
||||
BIND="127.0.0.1:8888"
|
||||
USER="www-data"
|
||||
PHP_FCGI_CHILDREN="15"
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Configfiles
|
||||
*
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
||||
$vmail_group=posix_getgrgid(Settings::Get('system.vmail_gid'));
|
||||
|
||||
/* If one of them are not set, call it 'vmail' and suggest creating user/group
|
||||
* in scripts. */
|
||||
if ($vmail_user === false) {
|
||||
$vmail_username="vmail";
|
||||
} else {
|
||||
$vmail_username=$vmail_user['name'];
|
||||
}
|
||||
if ($vmail_group === false) {
|
||||
$vmail_groupname="vmail";
|
||||
} else {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return array(
|
||||
'sle_10' => array(
|
||||
'label' => 'SUSE Linux Enterprise 10 (deprecated)',
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => array(
|
||||
'apache' => array(
|
||||
'label' => 'Apache',
|
||||
'commands' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['include'],
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : ''
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/apache2 restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => array(
|
||||
'echo "include \"' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf\";" >> /etc/named.conf',
|
||||
'touch ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chown named:0 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chmod 0600 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/named restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => array(
|
||||
'postfix' => array(
|
||||
'label' => 'Postfix',
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'usr_lib_sasl2_smtpd.conf' => '/usr/lib/sasl2/smtpd.conf'
|
||||
),
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'touch /usr/lib/sasl2/smtpd.conf',
|
||||
'chmod 660 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 660 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 660 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 660 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 660 /usr/lib/sasl2/smtpd.conf',
|
||||
'chgrp postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chgrp postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chgrp postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chgrp postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chgrp postfix /usr/lib/sasl2/smtpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'files' => array(
|
||||
'etc_authlib_authdaemonrc' => '/etc/authlib/authdaemonrc',
|
||||
'etc_authlib_authmysqlrc' => '/etc/authlib/authmysqlrc'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'files' => array(
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => array(
|
||||
Settings::Get('system.crondreload')
|
||||
)
|
||||
),
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => array(
|
||||
'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,267 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2011- 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 Andrej Semen <asemen@suse.de> (2010-2011)
|
||||
* @author Wolfgang Rosenauer <wr@rosenauer.org> (2011)
|
||||
* @author Froxlor team <team@froxlor.org> (2011-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Configfiles
|
||||
*
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
||||
$vmail_group=posix_getgrgid(Settings::Get('system.vmail_gid'));
|
||||
|
||||
/* If one of them are not set, call it 'vmail' and suggest creating user/group
|
||||
* in scripts. */
|
||||
if ($vmail_user === false) {
|
||||
$vmail_username="vmail";
|
||||
} else {
|
||||
$vmail_username=$vmail_user['name'];
|
||||
}
|
||||
if ($vmail_group === false) {
|
||||
$vmail_groupname="vmail";
|
||||
} else {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return array(
|
||||
'sle_11' => array(
|
||||
'label' => 'SUSE Linux Enterprise 11',
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => array(
|
||||
'apache' => array(
|
||||
'label' => 'Apache',
|
||||
'commands' => array(
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
'Maybe add to /etc/apache2/httpd.conf',
|
||||
'Alias /mail /srv/www/htdocs/roundcubemail',
|
||||
'Alias /webmail /srv/www/htdocs/squirrelmail',
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : ''
|
||||
),
|
||||
'restart' => array(
|
||||
' '.
|
||||
'/etc/init.d/apache2 restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => array(
|
||||
'Add froxlor_bind.conf to the NAMED_CONF_INCLUDE_FILES in /etc/sysconfig/named'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/named restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => array(
|
||||
'postfix' => array(
|
||||
'label' => 'Postfix',
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql_virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql_virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql_virtual_mailbox_maps.cf',
|
||||
'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf'
|
||||
),
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . Settings::Get('system.vmail_homedir'),
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/sasl2/smtpd.conf',
|
||||
'chmod 660 /etc/postfix/mysql_virtual_alias_maps.cf',
|
||||
'chmod 660 /etc/postfix/mysql_virtual_mailbox_domains.cf',
|
||||
'chmod 660 /etc/postfix/mysql_virtual_mailbox_maps.cf',
|
||||
'chmod 660 /etc/sasl2/smtpd.conf',
|
||||
'chgrp postfix /etc/postfix/mysql_virtual_alias_maps.cf',
|
||||
'chgrp postfix /etc/postfix/mysql_virtual_mailbox_domains.cf',
|
||||
'chgrp postfix /etc/postfix/mysql_virtual_mailbox_maps.cf',
|
||||
'chgrp postfix /etc/sasl2/smtpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'zypper install postfix postfix-mysql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'exim4' => array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => array(
|
||||
'zypper install exim'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
||||
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
||||
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
||||
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
||||
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod o-rx /var/lib/exim4',
|
||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/exim4 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'commands' => array(
|
||||
'zypper install courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_authlib_authdaemonrc' => '/etc/authlib/authdaemonrc',
|
||||
'etc_authlib_authmysqlrc' => '/etc/authlib/authmysqlrc'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot 1.1',
|
||||
'commands_1' => array(
|
||||
'zypper install dovecot11'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'files' => array(
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => array(
|
||||
'label' => 'Pure-FTPd',
|
||||
'files' => array(
|
||||
'etc_pure-ftpd.conf' => '/etc/pure-ftpd/pure-ftpd.conf',
|
||||
'etc_pure-ftpd_mysql.conf' => '/etc/pure-ftpd/pure-ftpd-mysql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/pure-ftpd restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => array(
|
||||
Settings::Get('system.crondreload')
|
||||
)
|
||||
),
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => array(
|
||||
'cp /usr/share/doc/packages/awstats/awstats.model.conf /etc/awstats/',
|
||||
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,418 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Configfiles
|
||||
*
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
||||
$vmail_group=posix_getgrgid(Settings::Get('system.vmail_gid'));
|
||||
|
||||
/* If one of them are not set, call it 'vmail' and suggest creating user/group
|
||||
* in scripts. */
|
||||
if ($vmail_user === false) {
|
||||
$vmail_username="vmail";
|
||||
} else {
|
||||
$vmail_username=$vmail_user['name'];
|
||||
}
|
||||
if ($vmail_group === false) {
|
||||
$vmail_groupname="vmail";
|
||||
} else {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return array(
|
||||
'debian_squeeze' => array(
|
||||
'label' => 'Debian 6.0 (Squeeze) [deprecated]',
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => array(
|
||||
'apache2' => array(
|
||||
'label' => 'Apache 2',
|
||||
'commands' => array(
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'a2dismod userdir'
|
||||
),
|
||||
'files' => ((int)Settings::Get('phpfpm.enabled') == 1) ?
|
||||
array(
|
||||
'etc_apache2_mods-enabled_fastcgi.conf' => '/etc/apache2/mods-enabled/fastcgi.conf'
|
||||
)
|
||||
:
|
||||
null,
|
||||
'restart' => array(
|
||||
'/etc/init.d/apache2 restart'
|
||||
),
|
||||
),
|
||||
'lighttpd' => array(
|
||||
'label' => 'Lighttpd Webserver',
|
||||
'commands_1' => array(
|
||||
'apt-get install lighttpd',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf',
|
||||
),
|
||||
'commands_2' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir')
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
)
|
||||
),
|
||||
'nginx' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => array(
|
||||
'apt-get install nginx php5-cgi',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_nginx_nginx.conf' => '/etc/nginx/nginx.conf',
|
||||
'etc_init.d_php-fcgi' => '/etc/init.d/php-fcgi'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'rm /etc/nginx/sites-enabled/default',
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod u+x /etc/init.d/php-fcgi'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/php-fcgi start',
|
||||
'/etc/init.d/nginx restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
)
|
||||
),
|
||||
'powerdns' => array(
|
||||
'label' => 'PowerDNS',
|
||||
'files' => array(
|
||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => array(
|
||||
'postfix_courier' => array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' '.$vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
||||
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'touch /etc/postfix/sasl/smtpd.conf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0600 /etc/postfix/sasl/smtpd.conf',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands_1' => array(
|
||||
'apt-get install dkim-filter',
|
||||
'mkdir -p /etc/postfix/dkim'
|
||||
),
|
||||
'files' => array(
|
||||
'dkim-filter.conf' => '/etc/dkim-filter.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'echo "milter_default_action = accept" >> /etc/postfix/main.cf',
|
||||
'echo "milter_protocol = 2" >> /etc/postfix/main.cf',
|
||||
'echo "smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf',
|
||||
'echo "non_smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/dkim-filter restart',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . Settings::Get('system.vmail_homedir'),
|
||||
'apt-get install postfix postfix-mysql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:root /etc/postfix/master.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0644 /etc/postfix/master.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => array(
|
||||
'dpkg-reconfigure exim4-config',
|
||||
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
||||
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
||||
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
||||
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
||||
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod o-rx /var/lib/exim4',
|
||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/exim4 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'commands' => array(
|
||||
'apt-get install courier-pop courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
|
||||
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => array(
|
||||
'apt-get install dovecot-imapd dovecot-pop3d'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => array(
|
||||
'label' => 'Pure FTPd',
|
||||
'commands_1' => array(
|
||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID',
|
||||
'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile',
|
||||
'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous',
|
||||
'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime',
|
||||
'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone',
|
||||
'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication',
|
||||
'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf',
|
||||
'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof',
|
||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/pure-ftpd-mysql restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => array(
|
||||
Settings::Get('system.crondreload')
|
||||
)
|
||||
),
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')),
|
||||
'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
|
||||
'rm /etc/cron.d/awstats'
|
||||
),
|
||||
),
|
||||
'libnss' => array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands' => array(
|
||||
'apt-get install libnss-mysql nscd',
|
||||
'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_nss-mysql.conf' => '/etc/nss-mysql.conf',
|
||||
'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf',
|
||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/nscd restart'
|
||||
)
|
||||
),
|
||||
'logrotate' => array(
|
||||
'label' => 'Logrotate',
|
||||
'commands_1' => array(
|
||||
'apt-get install logrotate',
|
||||
'touch /etc/logrotate.d/froxlor',
|
||||
'chmod 644 /etc/logrotate.d/froxlor'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_logrotated_froxlor' => '/etc/logrotate.d/froxlor'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'# apt automatically adds a daily cronjob for logrotate',
|
||||
'# you do not have to do anything else :)'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -259,6 +259,16 @@ fastcgi_param REDIRECT_STATUS 200;
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
#!/bin/bash
|
||||
### BEGIN INIT INFO
|
||||
# Provides: php-fcgi
|
||||
# Required-Start: $remote_fs $syslog
|
||||
# Required-Stop: $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: php-fcgi initscript
|
||||
# Description: Custom php-fcgi initscript for Froxlor
|
||||
### END INIT INFO
|
||||
|
||||
BIND="127.0.0.1:8888"
|
||||
USER="www-data"
|
||||
PHP_FCGI_CHILDREN="15"
|
||||
|
||||
@@ -299,6 +299,16 @@ fastcgi_param REDIRECT_STATUS 200;
|
||||
</visibility>
|
||||
<content><![CDATA[
|
||||
#!/bin/bash
|
||||
### BEGIN INIT INFO
|
||||
# Provides: php-fcgi
|
||||
# Required-Start: $remote_fs $syslog
|
||||
# Required-Stop: $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: php-fcgi initscript
|
||||
# Description: Custom php-fcgi initscript for Froxlor
|
||||
### END INIT INFO
|
||||
|
||||
BIND="127.0.0.1:8888"
|
||||
USER="www-data"
|
||||
PHP_FCGI_CHILDREN="15"
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Lib
|
||||
*
|
||||
*/
|
||||
|
||||
$configcommand = array();
|
||||
|
||||
$vhostDir = new frxDirectory(Settings::Get('system.apacheconf_vhost'));
|
||||
$optsDir = new frxDirectory(Settings::Get('system.apacheconf_diroptions'));
|
||||
|
||||
if ($vhostDir->isConfigDir()) {
|
||||
$configcommand['vhost'] = 'mkdir -p ' . Settings::Get('system.apacheconf_vhost');
|
||||
$configcommand['v_inclighty'] = 'echo -e \'\\ninclude_shell "cat ' . makeCorrectDir(Settings::Get('system.apacheconf_vhost')) . '*.conf"\' >> /etc/lighttpd/lighttpd.conf';
|
||||
// this is only used for SUSE - can we check whether this is still needed?
|
||||
$configcommand['include'] = 'echo -e "\\nInclude ' . makeCorrectDir(Settings::Get('system.apacheconf_vhost')) . '*.conf" >> ' . makeCorrectFile(makeCorrectDir('/etc/apache2/httpd.conf'));
|
||||
} else {
|
||||
$configcommand['vhost'] = 'touch ' . Settings::Get('system.apacheconf_vhost');
|
||||
$configcommand['v_inclighty'] = 'echo -e \'\\ninclude "' . Settings::Get('system.apacheconf_vhost') . '"\' >> /etc/lighttpd/lighttpd.conf';
|
||||
// this is only used for SUSE - can we check whether this is still needed?
|
||||
$configcommand['include'] = 'echo -e "\\nInclude ' . Settings::Get('system.apacheconf_vhost') . '" >> ' . makeCorrectFile('/etc/apache2/httpd.conf');
|
||||
}
|
||||
|
||||
if ($optsDir->isConfigDir()) {
|
||||
$configcommand['diroptions'] = 'mkdir -p ' . Settings::Get('system.apacheconf_diroptions');
|
||||
$configcommand['d_inclighty'] = 'echo -e \'\\ninclude_shell "cat ' . makeCorrectDir(Settings::Get('system.apacheconf_diroptions')) . '*.conf"\' >> /etc/lighttpd/lighttpd.conf';
|
||||
} else {
|
||||
$configcommand['diroptions'] = 'touch ' . Settings::Get('system.apacheconf_diroptions');
|
||||
$configcommand['d_inclighty'] = 'echo -e \'\\ninclude "' . Settings::Get('system.apacheconf_diroptions') . '"\' >> /etc/lighttpd/lighttpd.conf';
|
||||
}
|
||||
|
||||
$cfgPath = 'lib/configfiles/';
|
||||
$configfiles = array();
|
||||
$configfiles = array_merge(
|
||||
include $cfgPath . 'rhel7.inc.php',
|
||||
include $cfgPath . 'wheezy.inc.php',
|
||||
include $cfgPath . 'squeeze.inc.php',
|
||||
include $cfgPath . 'trusty.inc.php',
|
||||
include $cfgPath . 'precise.inc.php',
|
||||
include $cfgPath . 'lucid.inc.php',
|
||||
include $cfgPath . 'gentoo.inc.php',
|
||||
include $cfgPath . 'sle11.inc.php',
|
||||
include $cfgPath . 'sle10.inc.php',
|
||||
include $cfgPath . 'freebsd.inc.php'
|
||||
);
|
||||
232
lib/formfields/admin/admin/formfield.admin_add.php
Normal file
232
lib/formfields/admin/admin/formfield.admin_add.php
Normal file
@@ -0,0 +1,232 @@
|
||||
<?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
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
247
lib/formfields/admin/admin/formfield.admin_edit.php
Normal file
247
lib/formfields/admin/admin/formfield.admin_edit.php
Normal file
@@ -0,0 +1,247 @@
|
||||
<?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'].' ('.$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
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
54
lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php
Normal file
54
lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?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
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
265
lib/formfields/admin/customer/formfield.customer_add.php
Normal file
265
lib/formfields/admin/customer/formfield.customer_add.php
Normal file
@@ -0,0 +1,265 @@
|
||||
<?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')
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
287
lib/formfields/admin/customer/formfield.customer_edit.php
Normal file
287
lib/formfields/admin/customer/formfield.customer_edit.php
Normal file
@@ -0,0 +1,287 @@
|
||||
<?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'].' ('.$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
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,236 +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(
|
||||
'accountdata' => array(
|
||||
'title' => $lng['admin']['accountdata'],
|
||||
'fields' => array(
|
||||
'loginname' => array(
|
||||
'label' => $lng['login']['username'],
|
||||
'type' => (isset($result['loginname'])) ? 'static' : 'text',
|
||||
'mandatory' => true,
|
||||
),
|
||||
'deactivated' => array(
|
||||
'label' => $lng['admin']['deactivated_user'],
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'visible' => (!isset($result['adminid']) || (isset($result['adminid']) && $result['adminid'] != $userinfo['userid'])),
|
||||
),
|
||||
'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(),
|
||||
'attributes' => array(
|
||||
'readonly' => true
|
||||
)
|
||||
),
|
||||
'def_language' => array(
|
||||
'label' => $lng['login']['language'],
|
||||
'type' => 'select',
|
||||
'generate' => 'languages',
|
||||
'selected' => Settings::Get('panel.standardlanguage')
|
||||
)
|
||||
)
|
||||
),
|
||||
'contactdata' => array(
|
||||
'title' => $lng['admin']['contactdata'],
|
||||
'fields' => array(
|
||||
'name' => array(
|
||||
'label' => $lng['customer']['name'],
|
||||
'type' => 'text',
|
||||
'mandatory' => true
|
||||
),
|
||||
'email' => array(
|
||||
'label' => $lng['customer']['email'],
|
||||
'type' => 'email',
|
||||
'mandatory' => true
|
||||
),
|
||||
'custom_notes' => array(
|
||||
'label' => $lng['usersettings']['custom_notes']['title'],
|
||||
'desc' => $lng['usersettings']['custom_notes']['description'],
|
||||
'type' => 'textarea',
|
||||
'attributes' => array(
|
||||
'cols' => 60,
|
||||
'rows' => 12
|
||||
)
|
||||
),
|
||||
'custom_notes_show' => array(
|
||||
'label' => $lng['usersettings']['custom_notes']['show'],
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
)
|
||||
),
|
||||
'servicedata' => array(
|
||||
'title' => $lng['admin']['servicedata'],
|
||||
'visible' => (!isset($result['adminid']) || (isset($result['adminid']) && $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
|
||||
),
|
||||
'customers' => array(
|
||||
'label' => $lng['admin']['customers'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9
|
||||
)
|
||||
),
|
||||
'customers_see_all' => array(
|
||||
'label' => $lng['admin']['customers_see_all'],
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
),
|
||||
'domains' => array(
|
||||
'label' => $lng['admin']['domains'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9
|
||||
)
|
||||
),
|
||||
'domains_see_all' => array(
|
||||
'label' => $lng['admin']['domains_see_all'],
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
),
|
||||
'caneditphpsettings' => array(
|
||||
'label' => $lng['admin']['caneditphpsettings'],
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
),
|
||||
'diskspace' => array(
|
||||
'label' => $lng['customer']['diskspace'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 6
|
||||
)
|
||||
),
|
||||
'traffic' => array(
|
||||
'label' => $lng['customer']['traffic'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 4
|
||||
)
|
||||
),
|
||||
'subdomains' => array(
|
||||
'label' => $lng['customer']['subdomains'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9
|
||||
)
|
||||
),
|
||||
'emails' => array(
|
||||
'label' => $lng['customer']['emails'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9
|
||||
)
|
||||
),
|
||||
'email_accounts' => array(
|
||||
'label' => $lng['customer']['accounts'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9
|
||||
)
|
||||
),
|
||||
'email_forwarders' => array(
|
||||
'label' => $lng['customer']['forwarders'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9
|
||||
)
|
||||
),
|
||||
'email_quota' => array(
|
||||
'label' => $lng['customer']['email_quota'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9
|
||||
)
|
||||
),
|
||||
'ftps' => array(
|
||||
'label' => $lng['customer']['ftps'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9
|
||||
)
|
||||
),
|
||||
'tickets' => array(
|
||||
'label' => $lng['customer']['tickets'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'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'
|
||||
),
|
||||
'mysqls' => array(
|
||||
'label' => $lng['customer']['mysqls'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,42 +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(
|
||||
'section_a' => array(
|
||||
'fields' => array(
|
||||
'cronfile' => array(
|
||||
'label' => 'Cronjob',
|
||||
'type' => ($change_cronfile == 1 ? 'text' : 'static'),
|
||||
),
|
||||
'isactive' => array(
|
||||
'label' => $lng['admin']['activated'],
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'value' => 1,
|
||||
),
|
||||
'interval_value' => array(
|
||||
'label' => $lng['cronjob']['cronjobintervalv'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'interval_interval' => array(
|
||||
'label' => $lng['cronjob']['cronjobinterval'],
|
||||
'type' => 'select',
|
||||
'values' => $interval_interval
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,305 +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(
|
||||
'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',
|
||||
'visible' => 'edit'
|
||||
),
|
||||
'documentroot' => array(
|
||||
'label' => $lng['customer']['documentroot'],
|
||||
'type' => 'static',
|
||||
'visible' => 'edit'
|
||||
),
|
||||
'createstdsubdomain' => array(
|
||||
'label' => $lng['admin']['stdsubdomain_add'].'?',
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'value' => '1',
|
||||
'attributes' => array(
|
||||
'checked' => true
|
||||
)
|
||||
),
|
||||
'store_defaultindex' => array(
|
||||
'label' => $lng['admin']['store_defaultindex'].'?',
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'value' => '1',
|
||||
'visible' => 'new',
|
||||
'attributes' => array(
|
||||
'checked' => true
|
||||
)
|
||||
),
|
||||
'deactivated' => array(
|
||||
'label' => $lng['admin']['deactivated_user'],
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'value' => '1',
|
||||
'visible' => 'edit'
|
||||
),
|
||||
'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(),
|
||||
'attributes' => array(
|
||||
'readonly' => true
|
||||
)
|
||||
),
|
||||
'sendpassword' => array(
|
||||
'label' => $lng['admin']['sendpassword'],
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'visible' => 'new',
|
||||
'attributes' => array(
|
||||
'checked' => true
|
||||
)
|
||||
),
|
||||
'def_language' => array(
|
||||
'label' => $lng['login']['language'],
|
||||
'type' => 'select',
|
||||
'generate' => 'languages',
|
||||
'selected' => Settings::Get('panel.standardlanguage'),
|
||||
)
|
||||
)
|
||||
),
|
||||
'contactdata' => array(
|
||||
'title' => $lng['admin']['contactdata'],
|
||||
'fields' => array(
|
||||
'gender' => array(
|
||||
'label' => $lng['gender']['title'],
|
||||
'type' => 'select',
|
||||
'generate' => 'genders',
|
||||
'selected' => '0'
|
||||
),
|
||||
'name' => array(
|
||||
'label' => $lng['customer']['name'],
|
||||
'type' => 'text',
|
||||
'mandatory_ex' => true
|
||||
),
|
||||
'firstname' => array(
|
||||
'label' => $lng['customer']['firstname'],
|
||||
'type' => 'text',
|
||||
'mandatory_ex' => true
|
||||
),
|
||||
'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' => 'email',
|
||||
'mandatory' => true
|
||||
),
|
||||
'customernumber' => array(
|
||||
'label' => $lng['customer']['customernumber'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'custom_notes' => array(
|
||||
'label' => $lng['usersettings']['custom_notes']['title'],
|
||||
'desc' => $lng['usersettings']['custom_notes']['description'],
|
||||
'type' => 'textarea',
|
||||
'attributes' => array(
|
||||
'cols' => 60,
|
||||
'rows' => 12
|
||||
)
|
||||
),
|
||||
'custom_notes_show' => array(
|
||||
'label' => $lng['usersettings']['custom_notes']['show'],
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
)
|
||||
),
|
||||
'servicedata' => array(
|
||||
'title' => $lng['admin']['servicedata'],
|
||||
'fields' => array(
|
||||
'diskspace' => array(
|
||||
'label' => $lng['customer']['diskspace'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 6,
|
||||
)
|
||||
),
|
||||
'traffic' => array(
|
||||
'label' => $lng['customer']['traffic'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 4,
|
||||
)
|
||||
),
|
||||
'subdomains' => array(
|
||||
'label' => $lng['customer']['subdomains'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9,
|
||||
)
|
||||
),
|
||||
'emails' => array(
|
||||
'label' => $lng['customer']['emails'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9,
|
||||
)
|
||||
),
|
||||
'email_accounts' => array(
|
||||
'label' => $lng['customer']['accounts'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9,
|
||||
)
|
||||
),
|
||||
'email_forwarders' => array(
|
||||
'label' => $lng['customer']['forwarders'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9,
|
||||
)
|
||||
),
|
||||
'email_quota' => array(
|
||||
'label' => $lng['customer']['email_quota'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'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',
|
||||
'attributes' => array(
|
||||
'checked' => true
|
||||
)
|
||||
),
|
||||
'email_pop3' => array(
|
||||
'label' => $lng['customer']['email_pop3'],
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'value' => '1',
|
||||
'attributes' => array(
|
||||
'checked' => true
|
||||
)
|
||||
),
|
||||
'ftps' => array(
|
||||
'label' => $lng['customer']['ftps'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9,
|
||||
)
|
||||
),
|
||||
'tickets' => array(
|
||||
'label' => $lng['customer']['tickets'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
|
||||
'attributes' => array(
|
||||
'maxlength' => 9,
|
||||
)
|
||||
),
|
||||
'mysqls' => array(
|
||||
'label' => $lng['customer']['mysqls'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'mandatory' => true,
|
||||
'attributes' => array(
|
||||
'maxlength' => 9,
|
||||
)
|
||||
),
|
||||
'phpenabled' => array(
|
||||
'label' => $lng['admin']['phpenabled'].'?',
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'value' => '1',
|
||||
'attributes' => array(
|
||||
'checked' => true
|
||||
)
|
||||
),
|
||||
'perlenabled' => array(
|
||||
'label' => $lng['admin']['perlenabled'].'?',
|
||||
'type' => 'checkbox',
|
||||
'sublabel' => $lng['panel']['yes'],
|
||||
'value' => '1',
|
||||
)
|
||||
)
|
||||
),
|
||||
'movetoadmin' => array(
|
||||
'title' => $lng['admin']['movetoadmin'],
|
||||
'visible' => (isset($admin_select_cnt) && $admin_select_cnt > 1 && isset($result['loginname'])),
|
||||
'fields' => array(
|
||||
'move_to_admin' => array(
|
||||
'label' => $lng['admin']['movecustomertoadmin'],
|
||||
'type' => 'select',
|
||||
'values' => (isset($admin_select)) ? $admin_select : null
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,126 +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(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['ipsandports']['ipandport'],
|
||||
'fields' => array(
|
||||
'ip' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ip'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'port' => array(
|
||||
'label' => $lng['admin']['ipsandports']['port'],
|
||||
'type' => 'text',
|
||||
'size' => 5
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_b' => array(
|
||||
'title' => $lng['admin']['ipsandports']['webserverdefaultconfig'],
|
||||
'fields' => array(
|
||||
'listen_statement' => array(
|
||||
'label' => $lng['admin']['ipsandports']['create_listen_statement'],
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'attributes' => array(
|
||||
'checked' => true
|
||||
)
|
||||
),
|
||||
'namevirtualhost_statement' => array(
|
||||
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'attributes' => array(
|
||||
'checked' => true
|
||||
)
|
||||
),
|
||||
'vhostcontainer' => array(
|
||||
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'attributes' => array(
|
||||
'checked' => true
|
||||
)
|
||||
),
|
||||
'docroot' => array(
|
||||
'label' => $lng['admin']['ipsandports']['docroot']['title'],
|
||||
'desc' => $lng['admin']['ipsandports']['docroot']['description'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'specialsettings' => array(
|
||||
'label' => $lng['admin']['ownvhostsettings'],
|
||||
'desc' => $lng['serversettings']['default_vhostconf']['description'],
|
||||
'type' => 'textarea',
|
||||
'attributes' => array(
|
||||
'cols' => 60,
|
||||
'rows' => 12
|
||||
)
|
||||
),
|
||||
'vhostcontainer_servername_statement' => array(
|
||||
'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'],
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'attributes' => array(
|
||||
'checked' => true
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_c' => array(
|
||||
'title' => $lng['admin']['ipsandports']['webserverdomainconfig'],
|
||||
'fields' => array(
|
||||
'default_vhostconf_domain' => array(
|
||||
'label' => $lng['admin']['ipsandports']['default_vhostconf_domain'],
|
||||
'desc' => $lng['serversettings']['default_vhostconf_domain']['description'],
|
||||
'type' => 'textarea',
|
||||
'attributes' => array(
|
||||
'cols' => 60,
|
||||
'rows' => 12
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_d' => array(
|
||||
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
|
||||
'visible' => (Settings::Get('system.use_ssl') == 1 ? true : false),
|
||||
'fields' => array(
|
||||
'ssl' => array(
|
||||
'label' => $lng['admin']['ipsandports']['enable_ssl'],
|
||||
'type' => 'checkbox',
|
||||
'value' => '1'
|
||||
),
|
||||
'ssl_cert_file' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_cert_file'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'ssl_key_file' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_key_file'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'ssl_ca_file' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_ca_file'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'ssl_cert_chainfile' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['title'],
|
||||
'desc' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['description'],
|
||||
'type' => 'text'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,101 +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(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['phpsettings']['addsettings'],
|
||||
'fields' => array(
|
||||
'description' => array(
|
||||
'label' => $lng['admin']['phpsettings']['description'],
|
||||
'type' => 'text',
|
||||
'attributes' => array(
|
||||
'maxlength' => 50
|
||||
)
|
||||
),
|
||||
'binary' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['binary'],
|
||||
'type' => 'text',
|
||||
'value' => '/usr/bin/php-cgi',
|
||||
'attributes' => array(
|
||||
'maxlength' => 255
|
||||
)
|
||||
),
|
||||
'file_extensions' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['file_extensions'],
|
||||
'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
|
||||
'type' => 'text',
|
||||
'value' => 'php',
|
||||
'attributes' => array(
|
||||
'maxlength' => 255
|
||||
)
|
||||
),
|
||||
'mod_fcgid_starter' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_starter']['title'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'mod_fcgid_maxrequests' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'mod_fcgid_umask' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_umask']['title'],
|
||||
'type' => 'text',
|
||||
'value' => '022',
|
||||
'attributes' => array(
|
||||
'maxlength' => 3
|
||||
)
|
||||
),
|
||||
'fpm_slowlog' => array(
|
||||
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['enable_slowlog'],
|
||||
'type' => 'checkbox',
|
||||
'value' => '1'
|
||||
),
|
||||
'fpm_reqterm' => array(
|
||||
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['request_terminate_timeout'],
|
||||
'type' => 'text',
|
||||
'value' => '60s',
|
||||
'attributes' => array(
|
||||
'maxlength' => 10
|
||||
)
|
||||
),
|
||||
'fpm_reqslow' => array(
|
||||
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 10,
|
||||
'value' => '5s'
|
||||
),
|
||||
'phpsettings' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['phpsettings']['phpinisettings'],
|
||||
'type' => 'textarea',
|
||||
'value' => $result['phpsettings'],
|
||||
'attributes' => array(
|
||||
'cols' => 80,
|
||||
'rows' => 20
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
137
lib/formfields/admin/ipsandports/formfield.ipsandports_add.php
Normal file
137
lib/formfields/admin/ipsandports/formfield.ipsandports_add.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<?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(
|
||||
'ipsandports_add' => array(
|
||||
'title' => $lng['admin']['ipsandports']['add'],
|
||||
'image' => 'icons/ipsports_add.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['ipsandports']['ipandport'],
|
||||
'image' => 'icons/ipsports_add.png',
|
||||
'fields' => array(
|
||||
'ip' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ip'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'port' => array(
|
||||
'label' => $lng['admin']['ipsandports']['port'],
|
||||
'type' => 'text',
|
||||
'size' => 5
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_b' => array(
|
||||
'title' => $lng['admin']['ipsandports']['webserverdefaultconfig'],
|
||||
'image' => 'icons/ipsports_add.png',
|
||||
'fields' => array(
|
||||
'listen_statement' => array(
|
||||
'label' => $lng['admin']['ipsandports']['create_listen_statement'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array('1')
|
||||
),
|
||||
'namevirtualhost_statement' => array(
|
||||
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array('1')
|
||||
),
|
||||
'vhostcontainer' => array(
|
||||
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array('1')
|
||||
),
|
||||
'docroot' => array(
|
||||
'label' => $lng['admin']['ipsandports']['docroot']['title'],
|
||||
'desc' => $lng['admin']['ipsandports']['docroot']['description'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'specialsettings' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ownvhostsettings'],
|
||||
'desc' => $lng['serversettings']['default_vhostconf']['description'],
|
||||
'type' => 'textarea',
|
||||
'cols' => 60,
|
||||
'rows' => 12
|
||||
),
|
||||
'vhostcontainer_servername_statement' => array(
|
||||
'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array('1')
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_c' => array(
|
||||
'title' => $lng['admin']['ipsandports']['webserverdomainconfig'],
|
||||
'image' => 'icons/ipsports_add.png',
|
||||
'fields' => array(
|
||||
'default_vhostconf_domain' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ipsandports']['default_vhostconf_domain'],
|
||||
'desc' => $lng['serversettings']['default_vhostconf_domain']['description'],
|
||||
'type' => 'textarea',
|
||||
'cols' => 60,
|
||||
'rows' => 12
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_d' => array(
|
||||
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
|
||||
'image' => 'icons/ipsports_add.png',
|
||||
'visible' => (Settings::Get('system.use_ssl') == 1 ? true : false),
|
||||
'fields' => array(
|
||||
'ssl' => array(
|
||||
'label' => $lng['admin']['ipsandports']['enable_ssl'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array()
|
||||
),
|
||||
'ssl_cert_file' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_cert_file'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'ssl_key_file' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_key_file'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'ssl_ca_file' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_ca_file'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'ssl_cert_chainfile' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['title'],
|
||||
'desc' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['description'],
|
||||
'type' => 'text'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
146
lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php
Normal file
146
lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php
Normal file
@@ -0,0 +1,146 @@
|
||||
<?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(
|
||||
'ipsandports_edit' => array(
|
||||
'title' => $lng['admin']['ipsandports']['edit'],
|
||||
'image' => 'icons/ipsports_edit.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['ipsandports']['ipandport'],
|
||||
'image' => 'icons/ipsports_add.png',
|
||||
'fields' => array(
|
||||
'ip' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ip'],
|
||||
'type' => 'text',
|
||||
'value' => $result['ip']
|
||||
),
|
||||
'port' => array(
|
||||
'label' => $lng['admin']['ipsandports']['port'],
|
||||
'type' => 'text',
|
||||
'value' => $result['port'],
|
||||
'size' => 5
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_b' => array(
|
||||
'title' => $lng['admin']['ipsandports']['webserverdefaultconfig'],
|
||||
'image' => 'icons/ipsports_edit.png',
|
||||
'fields' => array(
|
||||
'listen_statement' => array(
|
||||
'label' => $lng['admin']['ipsandports']['create_listen_statement'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array($result['listen_statement'])
|
||||
),
|
||||
'namevirtualhost_statement' => array(
|
||||
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array($result['namevirtualhost_statement'])
|
||||
),
|
||||
'vhostcontainer' => array(
|
||||
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array($result['vhostcontainer'])
|
||||
),
|
||||
'docroot' => array(
|
||||
'label' => $lng['admin']['ipsandports']['docroot']['title'],
|
||||
'desc' => $lng['admin']['ipsandports']['docroot']['description'],
|
||||
'type' => 'text',
|
||||
'value' => $result['docroot']
|
||||
),
|
||||
'specialsettings' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ownvhostsettings'],
|
||||
'desc' => $lng['serversettings']['default_vhostconf']['description'],
|
||||
'type' => 'textarea',
|
||||
'cols' => 60,
|
||||
'rows' => 12,
|
||||
'value' => $result['specialsettings']
|
||||
),
|
||||
'vhostcontainer_servername_statement' => array(
|
||||
'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array($result['vhostcontainer_servername_statement'])
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_c' => array(
|
||||
'title' => $lng['admin']['ipsandports']['webserverdomainconfig'],
|
||||
'image' => 'icons/ipsports_edit.png',
|
||||
'fields' => array(
|
||||
'default_vhostconf_domain' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['ipsandports']['default_vhostconf_domain'],
|
||||
'desc' => $lng['serversettings']['default_vhostconf_domain']['description'],
|
||||
'type' => 'textarea',
|
||||
'cols' => 60,
|
||||
'rows' => 12,
|
||||
'value' => $result['default_vhostconf_domain']
|
||||
)
|
||||
)
|
||||
),
|
||||
'section_d' => array(
|
||||
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
|
||||
'image' => 'icons/ipsports_edit.png',
|
||||
'visible' => (Settings::Get('system.use_ssl') == 1 ? true : false),
|
||||
'fields' => array(
|
||||
'ssl' => array(
|
||||
'label' => $lng['admin']['ipsandports']['enable_ssl'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array($result['ssl'])
|
||||
),
|
||||
'ssl_cert_file' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_cert_file'],
|
||||
'type' => 'text',
|
||||
'value' => $result['ssl_cert_file']
|
||||
),
|
||||
'ssl_key_file' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_key_file'],
|
||||
'type' => 'text',
|
||||
'value' => $result['ssl_key_file']
|
||||
),
|
||||
'ssl_ca_file' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_ca_file'],
|
||||
'type' => 'text',
|
||||
'value' => $result['ssl_ca_file']
|
||||
),
|
||||
'ssl_cert_chainfile' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['title'],
|
||||
'desc' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['description'],
|
||||
'type' => 'text',
|
||||
'value' => $result['ssl_cert_chainfile']
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
99
lib/formfields/admin/phpconfig/formfield.phpconfig_add.php
Normal file
99
lib/formfields/admin/phpconfig/formfield.phpconfig_add.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?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(
|
||||
'phpconfig_add' => array(
|
||||
'title' => $lng['admin']['phpsettings']['addsettings'],
|
||||
'image' => 'icons/phpsettings_add.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['phpsettings']['addsettings'],
|
||||
'image' => 'icons/phpsettings_add.png',
|
||||
'fields' => array(
|
||||
'description' => array(
|
||||
'label' => $lng['admin']['phpsettings']['description'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 50
|
||||
),
|
||||
'binary' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['binary'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'value' => '/usr/bin/php-cgi'
|
||||
),
|
||||
'file_extensions' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['file_extensions'],
|
||||
'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'value' => 'php'
|
||||
),
|
||||
'mod_fcgid_starter' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_starter']['title'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'mod_fcgid_maxrequests' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'mod_fcgid_umask' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_umask']['title'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 3,
|
||||
'value' => '022'
|
||||
),
|
||||
'phpfpm_enable_slowlog' => array(
|
||||
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['enable_slowlog'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array()
|
||||
),
|
||||
'phpfpm_reqtermtimeout' => array(
|
||||
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['request_terminate_timeout'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 10,
|
||||
'value' => '60s'
|
||||
),
|
||||
'phpfpm_reqslowtimeout' => array(
|
||||
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 10,
|
||||
'value' => '5s'
|
||||
),
|
||||
'phpsettings' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['phpsettings']['phpinisettings'],
|
||||
'type' => 'textarea',
|
||||
'cols' => 80,
|
||||
'rows' => 20,
|
||||
'value' => $result['phpsettings']
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
102
lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php
Normal file
102
lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?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(
|
||||
'phpconfig_edit' => array(
|
||||
'title' => $lng['admin']['phpsettings']['editsettings'],
|
||||
'image' => 'icons/phpsettings_edit.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['admin']['phpsettings']['editsettings'],
|
||||
'image' => 'icons/phpsettings_edit.png',
|
||||
'fields' => array(
|
||||
'description' => array(
|
||||
'label' => $lng['admin']['phpsettings']['description'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 50,
|
||||
'value' => $result['description']
|
||||
),
|
||||
'binary' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['binary'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'value' => $result['binary']
|
||||
),
|
||||
'file_extensions' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['file_extensions'],
|
||||
'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'value' => $result['file_extensions']
|
||||
),
|
||||
'mod_fcgid_starter' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_starter']['title'],
|
||||
'type' => 'text',
|
||||
'value' => ((int)$result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '')
|
||||
),
|
||||
'mod_fcgid_maxrequests' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
|
||||
'type' => 'text',
|
||||
'value' => ((int)$result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '')
|
||||
),
|
||||
'mod_fcgid_umask' => array(
|
||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||
'label' => $lng['admin']['mod_fcgid_umask']['title'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 3,
|
||||
'value' => $result['mod_fcgid_umask']
|
||||
),
|
||||
'phpfpm_enable_slowlog' => array(
|
||||
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['enable_slowlog'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array($result['fpm_slowlog'])
|
||||
),
|
||||
'phpfpm_reqtermtimeout' => array(
|
||||
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['request_terminate_timeout'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 10,
|
||||
'value' => $result['fpm_reqterm']
|
||||
),
|
||||
'phpfpm_reqslowtimeout' => array(
|
||||
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 10,
|
||||
'value' => $result['fpm_reqslow']
|
||||
),
|
||||
'phpsettings' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['admin']['phpsettings']['phpinisettings'],
|
||||
'type' => 'textarea',
|
||||
'cols' => 80,
|
||||
'rows' => 20,
|
||||
'value' => $result['phpsettings']
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,57 +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(
|
||||
'section_a' => array(
|
||||
'fields' => array(
|
||||
'description' => array(
|
||||
'label' => $lng['mysql']['databasedescription'],
|
||||
'type' => 'text',
|
||||
),
|
||||
'mysql_server' => array(
|
||||
'label' => $lng['mysql']['mysql_server'],
|
||||
'type' => (isset($result)) ? 'select' : 'text',
|
||||
'visible' => (1 < $count_mysqlservers ? true : false),
|
||||
'values' => (isset($mysql_servers)) ? $mysql_servers : ""
|
||||
),
|
||||
'mysql_password' => array(
|
||||
'label' => $lng['login']['password'],
|
||||
'type' => 'password',
|
||||
'attributes' => array(
|
||||
'autocomplete' => 'off'
|
||||
)
|
||||
),
|
||||
'mysql_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||
'value' => generatePassword(),
|
||||
'attributes' => array(
|
||||
'readonly' => true
|
||||
)
|
||||
),
|
||||
'sendinfomail' => array(
|
||||
'label' => $lng['customer']['sendinfomail'],
|
||||
'type' => 'checkbox',
|
||||
'visible' => 'new',
|
||||
'attributes' => array(
|
||||
'checked' => true
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
61
lib/formfields/customer/mysql/formfield.mysql_add.php
Normal file
61
lib/formfields/customer/mysql/formfield.mysql_add.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?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(
|
||||
'mysql_add' => array(
|
||||
'title' => $lng['mysql']['database_create'],
|
||||
'image' => 'icons/mysql_add.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['mysql']['database_create'],
|
||||
'image' => 'icons/mysql_add.png',
|
||||
'fields' => array(
|
||||
'description' => array(
|
||||
'label' => $lng['mysql']['databasedescription'],
|
||||
'type' => 'text'
|
||||
),
|
||||
'mysql_server' => array(
|
||||
'visible' => (1 < $count_mysqlservers ? true : false),
|
||||
'label' => $lng['mysql']['mysql_server'],
|
||||
'type' => 'select',
|
||||
'select_var' => $mysql_servers
|
||||
),
|
||||
'mysql_password' => array(
|
||||
'label' => $lng['login']['password'],
|
||||
'type' => 'password',
|
||||
'autocomplete' => 'off'
|
||||
),
|
||||
'mysql_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||
'value' => generatePassword()
|
||||
),
|
||||
'sendinfomail' => array(
|
||||
'label' => $lng['customer']['sendinfomail'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array(
|
||||
'label' => $lng['panel']['yes'],
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'value' => array()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
56
lib/formfields/customer/mysql/formfield.mysql_edit.php
Normal file
56
lib/formfields/customer/mysql/formfield.mysql_edit.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?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(
|
||||
'mysql_edit' => array(
|
||||
'title' => $lng['mysql']['database_edit'],
|
||||
'image' => 'icons/mysql_edit.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['mysql']['database_edit'],
|
||||
'image' => 'icons/mysql_edit.png',
|
||||
'fields' => array(
|
||||
'databasename' => array(
|
||||
'label' => $lng['mysql']['databasename'],
|
||||
'type' => 'label',
|
||||
'value' => $result['databasename']
|
||||
),
|
||||
'description' => array(
|
||||
'label' => $lng['mysql']['databasedescription'],
|
||||
'type' => 'text',
|
||||
'value' => $result['description']
|
||||
),
|
||||
'mysql_server' => array(
|
||||
'visible' => (1 < $count_mysqlservers ? true : false),
|
||||
'label' => $lng['mysql']['mysql_server'],
|
||||
'type' => 'label',
|
||||
'value' => $sql_root['caption']
|
||||
),
|
||||
'mysql_password' => array(
|
||||
'label' => $lng['changepassword']['new_password_ifnotempty'],
|
||||
'type' => 'password',
|
||||
'autocomplete' => 'off'
|
||||
),
|
||||
'mysql_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||
'value' => generatePassword()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
// Main version variable
|
||||
$version = '0.9.34-dev4';
|
||||
$version = '0.9.34';
|
||||
|
||||
// Database version (unused, old stuff from SysCP)
|
||||
$dbversion = '2';
|
||||
|
||||
Reference in New Issue
Block a user