Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f34fdc0b42 | ||
|
|
5d36c7228d | ||
|
|
cf2dabc714 | ||
|
|
a63e752dde | ||
|
|
ec1696ebab | ||
|
|
7730a57dbf | ||
|
|
e444ebff62 | ||
|
|
015f51f8d3 | ||
|
|
40ba41497b | ||
|
|
2a5494c85a | ||
|
|
ffe20960d5 | ||
|
|
040f151d65 | ||
|
|
db286077f8 | ||
|
|
90bd5c3512 | ||
|
|
ee29c406ab | ||
|
|
599d179c4d | ||
|
|
4b84d978d1 | ||
|
|
91c1928309 | ||
|
|
9d4d6efdb9 | ||
|
|
81cef92443 | ||
|
|
734686ff33 | ||
|
|
0d897f13e3 | ||
|
|
05436211dd | ||
|
|
ed9235d341 | ||
|
|
ee7177bdec | ||
|
|
74da53c822 | ||
|
|
0f0ae6eb6d | ||
|
|
472291e59d | ||
|
|
86c881a63c | ||
|
|
f95431c55e | ||
|
|
f2f022ba30 | ||
|
|
1a62e9413d | ||
|
|
e53e3f9843 | ||
|
|
69391309bc | ||
|
|
038e9947c1 | ||
|
|
5c4a38e4de | ||
|
|
a0d7997778 | ||
|
|
d660165470 | ||
|
|
735f890e56 | ||
|
|
a2ab73fa41 |
@@ -186,14 +186,6 @@ return array(
|
|||||||
'option_options_method' => 'getRedirectCodes',
|
'option_options_method' => 'getRedirectCodes',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'perl_path' => array(
|
|
||||||
'label' => $lng['serversettings']['perl_path'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'perl_path',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '/usr/bin/perl',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'ssl' => array(
|
'ssl' => array(
|
||||||
|
|||||||
125
actions/admin/settings/135.fcgid.php
Normal file
125
actions/admin/settings/135.fcgid.php
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
<?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 Settings
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'groups' => array(
|
||||||
|
'fcgid' => array(
|
||||||
|
'title' => $lng['admin']['fcgid_settings'],
|
||||||
|
'fields' => array(
|
||||||
|
'system_mod_fcgid_enabled' => array(
|
||||||
|
'label' => $lng['serversettings']['mod_fcgid'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'mod_fcgid',
|
||||||
|
'type' => 'bool',
|
||||||
|
'default' => false,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
'overview_option' => true
|
||||||
|
),
|
||||||
|
'system_mod_fcgid_enabled_ownvhost' => array(
|
||||||
|
'label' => $lng['serversettings']['mod_fcgid_ownvhost'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'mod_fcgid_ownvhost',
|
||||||
|
'type' => 'bool',
|
||||||
|
'default' => false,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_mod_fcgid_httpuser' => array(
|
||||||
|
'label' => $lng['admin']['mod_fcgid_user'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'mod_fcgid_httpuser',
|
||||||
|
'type' => 'string',
|
||||||
|
'default' => 'froxlorlocal',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_mod_fcgid_httpgroup' => array(
|
||||||
|
'label' => $lng['admin']['mod_fcgid_group'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'mod_fcgid_httpgroup',
|
||||||
|
'type' => 'string',
|
||||||
|
'default' => 'froxlorlocal',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_mod_fcgid_configdir' => array(
|
||||||
|
'label' => $lng['serversettings']['mod_fcgid']['configdir'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'mod_fcgid_configdir',
|
||||||
|
'type' => 'string',
|
||||||
|
'string_type' => 'dir',
|
||||||
|
'default' => '/var/www/php-fcgi-scripts/',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_mod_fcgid_tmpdir' => array(
|
||||||
|
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'mod_fcgid_tmpdir',
|
||||||
|
'type' => 'string',
|
||||||
|
'string_type' => 'dir',
|
||||||
|
'default' => '/var/customers/tmp/',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_mod_fcgid_peardir' => array(
|
||||||
|
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'mod_fcgid_peardir',
|
||||||
|
'type' => 'string',
|
||||||
|
'string_type' => 'dir',
|
||||||
|
'string_delimiter' => ':',
|
||||||
|
'string_emptyallowed' => true,
|
||||||
|
'default' => '/usr/share/php/:/usr/share/php5/',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_mod_fcgid_wrapper' => array(
|
||||||
|
'label' => $lng['serversettings']['mod_fcgid']['wrapper'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'mod_fcgid_wrapper',
|
||||||
|
'type' => 'option',
|
||||||
|
'option_options' => array(0 => 'ScriptAlias', 1=> 'FCGIWrapper'),
|
||||||
|
'default' => 1,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_mod_fcgid_starter' => array(
|
||||||
|
'label' => $lng['serversettings']['mod_fcgid']['starter'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'mod_fcgid_starter',
|
||||||
|
'type' => 'int',
|
||||||
|
'default' => 0,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_mod_fcgid_maxrequests' => array(
|
||||||
|
'label' => $lng['serversettings']['mod_fcgid']['maxrequests'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'mod_fcgid_maxrequests',
|
||||||
|
'type' => 'int',
|
||||||
|
'default' => 250,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_mod_fcgid_defaultini' => array(
|
||||||
|
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'mod_fcgid_defaultini',
|
||||||
|
'type' => 'option',
|
||||||
|
'default' => '1',
|
||||||
|
'option_mode' => 'one',
|
||||||
|
'option_options_method' => 'getPhpConfigs',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
||||||
52
actions/admin/settings/137.perl.php
Normal file
52
actions/admin/settings/137.perl.php
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?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 Settings
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'groups' => array(
|
||||||
|
'perl' => array(
|
||||||
|
'title' => $lng['admin']['perl_settings'],
|
||||||
|
'fields' => array(
|
||||||
|
'perl_path' => array(
|
||||||
|
'label' => $lng['serversettings']['perl_path'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'perl_path',
|
||||||
|
'type' => 'string',
|
||||||
|
'default' => '/usr/bin/perl',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_perl_suexecworkaround' => array(
|
||||||
|
'label' => $lng['serversettings']['perl']['suexecworkaround'],
|
||||||
|
'settinggroup' => 'perl',
|
||||||
|
'varname' => 'suexecworkaround',
|
||||||
|
'type' => 'bool',
|
||||||
|
'default' => false,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_perl_suexeccgipath' => array(
|
||||||
|
'label' => $lng['serversettings']['perl']['suexeccgipath'],
|
||||||
|
'settinggroup' => 'perl',
|
||||||
|
'varname' => 'suexecpath',
|
||||||
|
'type' => 'string',
|
||||||
|
'default' => '/var/www/cgi-bin/',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -49,6 +49,15 @@ return array(
|
|||||||
'default' => '/usr/bin/',
|
'default' => '/usr/bin/',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
|
'system_awstats_awstatspath' => array(
|
||||||
|
'label' => $lng['serversettings']['awstats_awstatspath'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'awstats_awstatspath',
|
||||||
|
'type' => 'string',
|
||||||
|
'string_type' => 'dir',
|
||||||
|
'default' => '/usr/bin/',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
'system_awstats_conf' => array(
|
'system_awstats_conf' => array(
|
||||||
'label' => $lng['serversettings']['awstats_conf'],
|
'label' => $lng['serversettings']['awstats_conf'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
|
|||||||
@@ -38,78 +38,6 @@ return array(
|
|||||||
'default' => true,
|
'default' => true,
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'system_mod_fcgid_enabled' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_mod_fcgid_configdir' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['configdir'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_configdir',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'dir',
|
|
||||||
'default' => '/var/www/php-fcgi-scripts/',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_mod_fcgid_tmpdir' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_tmpdir',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'dir',
|
|
||||||
'default' => '/var/customers/tmp/',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_mod_fcgid_peardir' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_peardir',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'dir',
|
|
||||||
'string_delimiter' => ':',
|
|
||||||
'string_emptyallowed' => true,
|
|
||||||
'default' => '/usr/share/php/:/usr/share/php5/',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_mod_fcgid_wrapper' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['wrapper'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_wrapper',
|
|
||||||
'type' => 'option',
|
|
||||||
'option_options' => array(0 => 'ScriptAlias', 1=> 'FCGIWrapper'),
|
|
||||||
'default' => 0,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_mod_fcgid_starter' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['starter'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_starter',
|
|
||||||
'type' => 'int',
|
|
||||||
'default' => 0,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_mod_fcgid_maxrequests' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['maxrequests'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_maxrequests',
|
|
||||||
'type' => 'int',
|
|
||||||
'default' => 250,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_mod_fcgid_defaultini' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_defaultini',
|
|
||||||
'type' => 'option',
|
|
||||||
'default' => '1',
|
|
||||||
'option_mode' => 'one',
|
|
||||||
'option_options_method' => 'getPhpConfigs',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -220,6 +220,8 @@ if($page == 'admins'
|
|||||||
$ftps = - 1;
|
$ftps = - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($settings['ticket']['enabled'] == 1)
|
||||||
|
{
|
||||||
$tickets = intval_ressource($_POST['tickets']);
|
$tickets = intval_ressource($_POST['tickets']);
|
||||||
|
|
||||||
if(isset($_POST['tickets_ul'])
|
if(isset($_POST['tickets_ul'])
|
||||||
@@ -227,6 +229,11 @@ if($page == 'admins'
|
|||||||
{
|
{
|
||||||
$tickets = - 1;
|
$tickets = - 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$tickets = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$mysqls = intval_ressource($_POST['mysqls']);
|
$mysqls = intval_ressource($_POST['mysqls']);
|
||||||
|
|
||||||
@@ -500,12 +507,19 @@ if($page == 'admins'
|
|||||||
$ftps = - 1;
|
$ftps = - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($settings['ticket']['enabled'] == 1)
|
||||||
|
{
|
||||||
$tickets = intval_ressource($_POST['tickets']);
|
$tickets = intval_ressource($_POST['tickets']);
|
||||||
|
|
||||||
if(isset($_POST['tickets_ul']))
|
if(isset($_POST['tickets_ul']))
|
||||||
{
|
{
|
||||||
$tickets = - 1;
|
$tickets = - 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$tickets = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$mysqls = intval_ressource($_POST['mysqls']);
|
$mysqls = intval_ressource($_POST['mysqls']);
|
||||||
|
|
||||||
|
|||||||
@@ -658,7 +658,8 @@ if($page == 'customers'
|
|||||||
"`openbasedir` = '1', " .
|
"`openbasedir` = '1', " .
|
||||||
"`safemode` = '1', " .
|
"`safemode` = '1', " .
|
||||||
"`speciallogfile` = '0', " .
|
"`speciallogfile` = '0', " .
|
||||||
"`specialsettings` = ''");
|
"`specialsettings` = '', " .
|
||||||
|
"`add_date` = '".date('Y-m-d')."'");
|
||||||
$domainid = $db->insert_id();
|
$domainid = $db->insert_id();
|
||||||
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$customerid . '\'');
|
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$customerid . '\'');
|
||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $loginname . "'");
|
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $loginname . "'");
|
||||||
@@ -670,7 +671,6 @@ if($page == 'customers'
|
|||||||
$replace_arr = array(
|
$replace_arr = array(
|
||||||
'FIRSTNAME' => $firstname,
|
'FIRSTNAME' => $firstname,
|
||||||
'NAME' => $name,
|
'NAME' => $name,
|
||||||
'TITLE' => $title,
|
|
||||||
'COMPANY' => $company,
|
'COMPANY' => $company,
|
||||||
'SALUTATION' => getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)),
|
'SALUTATION' => getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)),
|
||||||
'USERNAME' => $loginname,
|
'USERNAME' => $loginname,
|
||||||
@@ -939,7 +939,7 @@ if($page == 'customers'
|
|||||||
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['hostname'];
|
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['hostname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`) " . "VALUES ('" . $db->escape($_stdsubdomain) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '')");
|
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`, `add_date`) " . "VALUES ('" . $db->escape($_stdsubdomain) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '', '".date('Y-m-d')."'");
|
||||||
$domainid = $db->insert_id();
|
$domainid = $db->insert_id();
|
||||||
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$result['customerid'] . '\'');
|
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$result['customerid'] . '\'');
|
||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $result['loginname'] . "'");
|
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $result['loginname'] . "'");
|
||||||
|
|||||||
@@ -157,7 +157,15 @@ if($page == 'domains'
|
|||||||
standard_error('domains_cantdeletedomainwithapsinstances');
|
standard_error('domains_cantdeletedomainwithapsinstances');
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '") AND `isemaildomain`="1"';
|
// check for deletion of main-domains which are logically subdomains, #329
|
||||||
|
$rsd_sql = '';
|
||||||
|
$remove_subbutmain_domains = isset($_POST['delete_userfiles']) ? 1 : 0;
|
||||||
|
if($remove_subbutmain_domains == 1)
|
||||||
|
{
|
||||||
|
$rsd_sql .= ' OR `ismainbutsubto` = "'.(int)$id.'"';
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '"'.$rsd_sql.') AND `isemaildomain`="1"';
|
||||||
$subResult = $db->query($query);
|
$subResult = $db->query($query);
|
||||||
$idString = array();
|
$idString = array();
|
||||||
|
|
||||||
@@ -177,7 +185,7 @@ if($page == 'domains'
|
|||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "deleted domain/s from mail-tables");
|
$log->logAction(ADM_ACTION, LOG_NOTICE, "deleted domain/s from mail-tables");
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `id`='" . (int)$id . "' OR `parentdomainid`='" . (int)$result['id'] . "'");
|
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `id`='" . (int)$id . "' OR `parentdomainid`='" . (int)$result['id'] . "'".$rsd_sql);
|
||||||
$deleted_domains = (int)$db->affected_rows();
|
$deleted_domains = (int)$db->affected_rows();
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used` = `subdomains_used` - " . (int)($deleted_domains - 1) . " WHERE `customerid` = '" . (int)$result['customerid'] . "'");
|
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used` = `subdomains_used` - " . (int)($deleted_domains - 1) . " WHERE `customerid` = '" . (int)$result['customerid'] . "'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$userinfo['adminid'] . "'");
|
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$userinfo['adminid'] . "'");
|
||||||
@@ -191,7 +199,12 @@ if($page == 'domains'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ask_yesno('admin_domain_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain']));
|
$showcheck = false;
|
||||||
|
if(domainHasMainSubDomains($id))
|
||||||
|
{
|
||||||
|
$showcheck = true;
|
||||||
|
}
|
||||||
|
ask_yesno_withcheckbox('admin_domain_reallydelete', 'remove_subbutmain_domains', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain']), $showcheck);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -216,6 +229,7 @@ if($page == 'domains'
|
|||||||
$wwwserveralias = intval($_POST['wwwserveralias']);
|
$wwwserveralias = intval($_POST['wwwserveralias']);
|
||||||
$speciallogfile = intval($_POST['speciallogfile']);
|
$speciallogfile = intval($_POST['speciallogfile']);
|
||||||
$aliasdomain = intval($_POST['alias']);
|
$aliasdomain = intval($_POST['alias']);
|
||||||
|
$issubof = intval($_POST['issubof']);
|
||||||
$customerid = intval($_POST['customerid']);
|
$customerid = intval($_POST['customerid']);
|
||||||
$customer = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$customerid . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ");
|
$customer = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$customerid . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ");
|
||||||
|
|
||||||
@@ -447,6 +461,11 @@ if($page == 'domains'
|
|||||||
$caneditdomain = '0';
|
$caneditdomain = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($issubof <= '0')
|
||||||
|
{
|
||||||
|
$issubof = '0';
|
||||||
|
}
|
||||||
|
|
||||||
if($domain == '')
|
if($domain == '')
|
||||||
{
|
{
|
||||||
standard_error(array('stringisempty', 'mydomain'));
|
standard_error(array('stringisempty', 'mydomain'));
|
||||||
@@ -500,7 +519,8 @@ if($page == 'domains'
|
|||||||
'mod_fcgid_starter' => $mod_fcgid_starter,
|
'mod_fcgid_starter' => $mod_fcgid_starter,
|
||||||
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
||||||
'specialsettings' => $specialsettings,
|
'specialsettings' => $specialsettings,
|
||||||
'registration_date' => $registration_date
|
'registration_date' => $registration_date,
|
||||||
|
'issubof' => $issubof
|
||||||
);
|
);
|
||||||
|
|
||||||
$security_questions = array(
|
$security_questions = array(
|
||||||
@@ -522,7 +542,7 @@ if($page == 'domains'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "')");
|
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`, `ismainbutsubto`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "', '".(int)$issubof."')");
|
||||||
$domainid = $db->insert_id();
|
$domainid = $db->insert_id();
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` + 1 WHERE `adminid` = '" . (int)$adminid . "'");
|
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` + 1 WHERE `adminid` = '" . (int)$adminid . "'");
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "added domain '" . $domain . "'");
|
$log->logAction(ADM_ACTION, LOG_INFO, "added domain '" . $domain . "'");
|
||||||
@@ -614,6 +634,14 @@ if($page == 'domains'
|
|||||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
|
$domains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 0, NULL, true);
|
||||||
|
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain`, `c`.`loginname` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`ismainbutsubto`=0 " . $standardsubdomains . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "'") . " AND `d`.`customerid`=`c`.`customerid` ORDER BY `loginname`, `domain` ASC");
|
||||||
|
|
||||||
|
while($row_domain = $db->fetch_array($result_domains))
|
||||||
|
{
|
||||||
|
$subtodomains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
|
||||||
|
}
|
||||||
|
|
||||||
$phpconfigs = '';
|
$phpconfigs = '';
|
||||||
$configs = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
|
$configs = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
|
||||||
|
|
||||||
@@ -724,6 +752,7 @@ if($page == 'domains'
|
|||||||
}
|
}
|
||||||
|
|
||||||
$aliasdomain = intval($_POST['alias']);
|
$aliasdomain = intval($_POST['alias']);
|
||||||
|
$issubof = intval($_POST['issubof']);
|
||||||
$isemaildomain = intval($_POST['isemaildomain']);
|
$isemaildomain = intval($_POST['isemaildomain']);
|
||||||
$email_only = intval($_POST['email_only']);
|
$email_only = intval($_POST['email_only']);
|
||||||
$subcanemaildomain = intval($_POST['subcanemaildomain']);
|
$subcanemaildomain = intval($_POST['subcanemaildomain']);
|
||||||
@@ -916,6 +945,11 @@ if($page == 'domains'
|
|||||||
standard_error('domainisaliasorothercustomer');
|
standard_error('domainisaliasorothercustomer');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($issubof <= '0')
|
||||||
|
{
|
||||||
|
$issubof = '0';
|
||||||
|
}
|
||||||
|
|
||||||
$params = array(
|
$params = array(
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'page' => $page,
|
'page' => $page,
|
||||||
@@ -942,7 +976,8 @@ if($page == 'domains'
|
|||||||
'mod_fcgid_starter' => $mod_fcgid_starter,
|
'mod_fcgid_starter' => $mod_fcgid_starter,
|
||||||
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
||||||
'specialsettings' => $specialsettings,
|
'specialsettings' => $specialsettings,
|
||||||
'registration_date' => $registration_date
|
'registration_date' => $registration_date,
|
||||||
|
'issubof' => $issubof
|
||||||
);
|
);
|
||||||
|
|
||||||
$security_questions = array(
|
$security_questions = array(
|
||||||
@@ -976,7 +1011,8 @@ if($page == 'domains'
|
|||||||
|| $mod_fcgid_starter != $result['mod_fcgid_starter']
|
|| $mod_fcgid_starter != $result['mod_fcgid_starter']
|
||||||
|| $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests']
|
|| $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests']
|
||||||
|| $specialsettings != $result['specialsettings']
|
|| $specialsettings != $result['specialsettings']
|
||||||
|| $aliasdomain != $result['aliasdomain'])
|
|| $aliasdomain != $result['aliasdomain']
|
||||||
|
|| $issubof != $result['ismainbutsubto'])
|
||||||
{
|
{
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
}
|
}
|
||||||
@@ -1038,7 +1074,7 @@ if($page == 'domains'
|
|||||||
$log->logAction(ADM_ACTION, LOG_INFO, "removed specialsettings on all subdomains of domain #" . $id);
|
$log->logAction(ADM_ACTION, LOG_INFO, "removed specialsettings on all subdomains of domain #" . $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "' WHERE `id`='" . (int)$id . "'");
|
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "', `ismainbutsubto`='" . (int)$issubof . "' WHERE `id`='" . (int)$id . "'");
|
||||||
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "'" . $upd_specialsettings . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'");
|
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "'" . $upd_specialsettings . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'");
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id);
|
$log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id);
|
||||||
$redirect_props = Array(
|
$redirect_props = Array(
|
||||||
@@ -1094,6 +1130,14 @@ if($page == 'domains'
|
|||||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']);
|
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 0, NULL, true);
|
||||||
|
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$result['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC");
|
||||||
|
|
||||||
|
while($row_domain = $db->fetch_array($result_domains))
|
||||||
|
{
|
||||||
|
$subtodomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['ismainbutsubto']);
|
||||||
|
}
|
||||||
|
|
||||||
if($userinfo['ip'] == "-1")
|
if($userinfo['ip'] == "-1")
|
||||||
{
|
{
|
||||||
$result_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' ORDER BY `ip`, `port` ASC");
|
$result_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' ORDER BY `ip`, `port` ASC");
|
||||||
|
|||||||
@@ -281,9 +281,14 @@ elseif($page == 'change_language')
|
|||||||
{
|
{
|
||||||
$language_options = '';
|
$language_options = '';
|
||||||
|
|
||||||
|
$default_lang = $settings['panel']['standardlanguage'];
|
||||||
|
if($userinfo['def_language'] != '') {
|
||||||
|
$default_lang = $userinfo['def_language'];
|
||||||
|
}
|
||||||
|
|
||||||
while(list($language_file, $language_name) = each($languages))
|
while(list($language_file, $language_name) = each($languages))
|
||||||
{
|
{
|
||||||
$language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true);
|
$language_options.= makeoption($language_name, $language_file, $default_lang, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("index/change_language") . "\";");
|
eval("echo \"" . getTemplate("index/change_language") . "\";");
|
||||||
|
|||||||
@@ -215,5 +215,3 @@ elseif($page == 'enforcequotas'
|
|||||||
ask_yesno('admin_quotas_reallyenforce', $filename, array('page' => $page));
|
ask_yesno('admin_quotas_reallyenforce', $filename, array('page' => $page));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -53,7 +53,10 @@ $available_templates = array(
|
|||||||
'new_ticket_for_customer',
|
'new_ticket_for_customer',
|
||||||
'new_ticket_by_staff',
|
'new_ticket_by_staff',
|
||||||
'new_reply_ticket_by_customer',
|
'new_reply_ticket_by_customer',
|
||||||
'new_reply_ticket_by_staff'
|
'new_reply_ticket_by_staff',
|
||||||
|
'new_database_by_customer',
|
||||||
|
'new_ftpaccount_by_customer',
|
||||||
|
'password_reset'
|
||||||
);
|
);
|
||||||
$file_templates = array(
|
$file_templates = array(
|
||||||
'index_html'
|
'index_html'
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ elseif($page == 'domains')
|
|||||||
$codes = getRedirectCodesArray();
|
$codes = getRedirectCodesArray();
|
||||||
foreach($codes as $rc)
|
foreach($codes as $rc)
|
||||||
{
|
{
|
||||||
$redirectcode .= makeoption($rc['code'], $rc['id'], $settings['customredirect']['default']);
|
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $settings['customredirect']['default']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -552,7 +552,7 @@ elseif($page == 'domains')
|
|||||||
$codes = getRedirectCodesArray();
|
$codes = getRedirectCodesArray();
|
||||||
foreach($codes as $rc)
|
foreach($codes as $rc)
|
||||||
{
|
{
|
||||||
$redirectcode .= makeoption($rc['code'], $rc['id'], $def_code);
|
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $def_code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ elseif($page == 'htpasswds')
|
|||||||
'path' => $lng['panel']['path']
|
'path' => $lng['panel']['path']
|
||||||
);
|
);
|
||||||
$paging = new paging($userinfo, $db, TABLE_PANEL_HTPASSWDS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
$paging = new paging($userinfo, $db, TABLE_PANEL_HTPASSWDS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||||
$result = $db->query("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||||
$paging->setEntries($db->num_rows($result));
|
$paging->setEntries($db->num_rows($result));
|
||||||
$sortcode = $paging->getHtmlSortCode($lng);
|
$sortcode = $paging->getHtmlSortCode($lng);
|
||||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||||
@@ -81,7 +81,7 @@ elseif($page == 'htpasswds')
|
|||||||
elseif($action == 'delete'
|
elseif($action == 'delete'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
$result = $db->query_first("SELECT `id`, `customerid`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||||
|
|
||||||
if(isset($result['username'])
|
if(isset($result['username'])
|
||||||
&& $result['username'] != '')
|
&& $result['username'] != '')
|
||||||
@@ -114,6 +114,7 @@ elseif($page == 'htpasswds')
|
|||||||
$userpath = $path;
|
$userpath = $path;
|
||||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||||
$username = validate($_POST['username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
|
$username = validate($_POST['username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
|
||||||
|
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
|
||||||
validate($_POST['directory_password'], 'password');
|
validate($_POST['directory_password'], 'password');
|
||||||
$username_path_check = $db->query_first("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `username`='" . $db->escape($username) . "' AND `path`='" . $db->escape($path) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$username_path_check = $db->query_first("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `username`='" . $db->escape($username) . "' AND `path`='" . $db->escape($path) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
|
|
||||||
@@ -151,7 +152,7 @@ elseif($page == 'htpasswds')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` (`customerid`, `username`, `password`, `path`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', '" . $db->escape($password) . "', '" . $db->escape($path) . "')");
|
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` (`customerid`, `username`, `password`, `path`, `authname`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', '" . $db->escape($password) . "', '" . $db->escape($path) . "', '" . $db->escape($authname) . "')");
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "added htpasswd for '" . $username . " (" . $path . ")'");
|
$log->logAction(USR_ACTION, LOG_INFO, "added htpasswd for '" . $username . " (" . $path . ")'");
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
@@ -166,7 +167,7 @@ elseif($page == 'htpasswds')
|
|||||||
elseif($action == 'edit'
|
elseif($action == 'edit'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
$result = $db->query_first("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||||
|
|
||||||
if(isset($result['username'])
|
if(isset($result['username'])
|
||||||
&& $result['username'] != '')
|
&& $result['username'] != '')
|
||||||
@@ -175,6 +176,7 @@ elseif($page == 'htpasswds')
|
|||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
validate($_POST['directory_password'], 'password');
|
validate($_POST['directory_password'], 'password');
|
||||||
|
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
|
||||||
|
|
||||||
if(CRYPT_STD_DES == 1)
|
if(CRYPT_STD_DES == 1)
|
||||||
{
|
{
|
||||||
@@ -186,13 +188,25 @@ elseif($page == 'htpasswds')
|
|||||||
$password = crypt($_POST['directory_password']);
|
$password = crypt($_POST['directory_password']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_POST['directory_password'] == '')
|
$pwd_sql = '';
|
||||||
|
if($_POST['directory_password'] != '')
|
||||||
{
|
{
|
||||||
standard_error(array('stringisempty', 'mypassword'));
|
$pwd_sql = "`password`='" . $db->escape($password) . "' ";
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
$auth_sql = '';
|
||||||
|
if($authname != $result['authname'])
|
||||||
{
|
{
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET `password`='" . $db->escape($password) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
$auth_sql = "`authname`='" . $db->escape($authname) . "' ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if($pwd_sql != '' || $auth_sql != '')
|
||||||
|
{
|
||||||
|
if($pwd_sql !='' && $auth_sql != '') {
|
||||||
|
$pwd_sql.= ', ';
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET ".$pwd_sql.$auth_sql." WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "edited htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
|
$log->logAction(USR_ACTION, LOG_INFO, "edited htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
@@ -309,35 +323,9 @@ elseif($page == 'htaccess')
|
|||||||
$options_cgi = '0';
|
$options_cgi = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($_POST['error404path'] === '')
|
$error404path = correctErrorDocument($_POST['error404path']);
|
||||||
|| (validateUrl($idna_convert->encode($_POST['error404path']))))
|
$error403path = correctErrorDocument($_POST['error403path']);
|
||||||
{
|
$error500path = correctErrorDocument($_POST['error500path']);
|
||||||
$error404path = $_POST['error404path'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
standard_error('mustbeurl');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(($_POST['error403path'] === '')
|
|
||||||
|| (validateUrl($idna_convert->encode($_POST['error403path']))))
|
|
||||||
{
|
|
||||||
$error403path = $_POST['error403path'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
standard_error('mustbeurl');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(($_POST['error500path'] === '')
|
|
||||||
|| (validateUrl($idna_convert->encode($_POST['error500path']))))
|
|
||||||
{
|
|
||||||
$error500path = $_POST['error500path'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
standard_error('mustbeurl');
|
|
||||||
}
|
|
||||||
|
|
||||||
if($path_dupe_check['path'] == $path)
|
if($path_dupe_check['path'] == $path)
|
||||||
{
|
{
|
||||||
@@ -397,35 +385,9 @@ elseif($page == 'htaccess')
|
|||||||
$options_cgi = '0';
|
$options_cgi = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($_POST['error404path'] === '')
|
$error404path = correctErrorDocument($_POST['error404path']);
|
||||||
|| (validateUrl($idna_convert->encode($_POST['error404path']))))
|
$error403path = correctErrorDocument($_POST['error403path']);
|
||||||
{
|
$error500path = correctErrorDocument($_POST['error500path']);
|
||||||
$error404path = $_POST['error404path'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
standard_error('mustbeurl');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(($_POST['error403path'] === '')
|
|
||||||
|| (validateUrl($idna_convert->encode($_POST['error403path']))))
|
|
||||||
{
|
|
||||||
$error403path = $_POST['error403path'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
standard_error('mustbeurl');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(($_POST['error500path'] === '')
|
|
||||||
|| (validateUrl($idna_convert->encode($_POST['error500path']))))
|
|
||||||
{
|
|
||||||
$error500path = $_POST['error500path'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
standard_error('mustbeurl');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(($option_indexes != $result['options_indexes'])
|
if(($option_indexes != $result['options_indexes'])
|
||||||
|| ($error404path != $result['error404path'])
|
|| ($error404path != $result['error404path'])
|
||||||
|
|||||||
@@ -212,11 +212,15 @@ elseif($page == 'accounts')
|
|||||||
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
|
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
|
||||||
);
|
);
|
||||||
|
|
||||||
$mail_body = replace_variables($lng['customer']['ftp_add']['infomail_body']['main'], $replace_arr);
|
$def_language = $userinfo['def_language'];
|
||||||
|
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_ftpaccount_by_customer_subject\'');
|
||||||
|
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_subject']), $replace_arr));
|
||||||
|
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_ftpaccount_by_customer_mailbody\'');
|
||||||
|
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_body']['main']), $replace_arr));
|
||||||
|
|
||||||
$_mailerror = false;
|
$_mailerror = false;
|
||||||
try {
|
try {
|
||||||
$mail->Subject = $lng['customer']['ftp_add']['infomail_subject'];
|
$mail->Subject = $mail_subject;
|
||||||
$mail->AltBody = $mail_body;
|
$mail->AltBody = $mail_body;
|
||||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
||||||
@@ -242,7 +246,7 @@ elseif($page == 'accounts')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], '/');
|
||||||
|
|
||||||
if($settings['customer']['ftpatdomain'] == '1')
|
if($settings['customer']['ftpatdomain'] == '1')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -172,9 +172,14 @@ elseif($page == 'change_language')
|
|||||||
{
|
{
|
||||||
$language_options = '';
|
$language_options = '';
|
||||||
|
|
||||||
|
$default_lang = $settings['panel']['standardlanguage'];
|
||||||
|
if($userinfo['def_language'] != '') {
|
||||||
|
$default_lang = $userinfo['def_language'];
|
||||||
|
}
|
||||||
|
|
||||||
while(list($language_file, $language_name) = each($languages))
|
while(list($language_file, $language_name) = each($languages))
|
||||||
{
|
{
|
||||||
$language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true);
|
$language_options.= makeoption($language_name, $language_file, $default_lang, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("index/change_language") . "\";");
|
eval("echo \"" . getTemplate("index/change_language") . "\";");
|
||||||
|
|||||||
@@ -194,11 +194,10 @@ elseif($page == 'mysqls')
|
|||||||
|
|
||||||
if($sendinfomail == 1)
|
if($sendinfomail == 1)
|
||||||
{
|
{
|
||||||
$pma = '';
|
$pma = $lng['admin']['notgiven'];
|
||||||
if($settings['panel']['phpmyadmin_url'] != '')
|
if($settings['panel']['phpmyadmin_url'] != '')
|
||||||
{
|
{
|
||||||
$r_arr = array('URI' => $settings['panel']['phpmyadmin_url']);
|
$pma = $settings['panel']['phpmyadmin_url'];
|
||||||
$pma = replace_variables($lng['customer']['mysql_add']['infomail_body']['pma'], $r_arr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$replace_arr = array(
|
$replace_arr = array(
|
||||||
@@ -210,11 +209,15 @@ elseif($page == 'mysqls')
|
|||||||
'PMA_URI' => $pma
|
'PMA_URI' => $pma
|
||||||
);
|
);
|
||||||
|
|
||||||
$mail_body = replace_variables($lng['customer']['mysql_add']['infomail_body']['main'], $replace_arr);
|
$def_language = $userinfo['def_language'];
|
||||||
|
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_database_by_customer_subject\'');
|
||||||
|
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_subject']), $replace_arr));
|
||||||
|
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_database_by_customer_mailbody\'');
|
||||||
|
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_body']['main']), $replace_arr));
|
||||||
|
|
||||||
$_mailerror = false;
|
$_mailerror = false;
|
||||||
try {
|
try {
|
||||||
$mail->Subject = $lng['customer']['mysql_add']['infomail_subject'];
|
$mail->Subject = $mail_subject;
|
||||||
$mail->AltBody = $mail_body;
|
$mail->AltBody = $mail_body;
|
||||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
||||||
@@ -270,14 +273,14 @@ elseif($page == 'mysqls')
|
|||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
// Only change Password if it is set, do nothing if it is empty! -- PH 2004-11-29
|
// Only change Password if it is set, do nothing if it is empty! -- PH 2004-11-29
|
||||||
|
|
||||||
$password = validate($_POST['mysql_password'], 'password');
|
$password = validate($_POST['mysql_password'], 'password');
|
||||||
$password = validatePassword($password);
|
|
||||||
|
|
||||||
if($password != '')
|
if($password != '')
|
||||||
{
|
{
|
||||||
// Begin root-session
|
// validate password
|
||||||
|
$password = validatePassword($password);
|
||||||
|
|
||||||
|
// Begin root-session
|
||||||
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
|
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
|
||||||
unset($db_root->password);
|
unset($db_root->password);
|
||||||
foreach(array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
foreach(array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
||||||
|
|||||||
23
index.php
23
index.php
@@ -221,14 +221,14 @@ if($action == 'forgotpwd')
|
|||||||
{
|
{
|
||||||
$loginname = validate($_POST['loginname'], 'loginname');
|
$loginname = validate($_POST['loginname'], 'loginname');
|
||||||
$email = validateEmail($_POST['loginemail'], 'email');
|
$email = validateEmail($_POST['loginemail'], 'email');
|
||||||
$sql = "SELECT `customerid`, `firstname`, `name`, `email`, `loginname` FROM `" . TABLE_PANEL_CUSTOMERS . "`
|
$sql = "SELECT `adminid`, `customerid`, `firstname`, `name`, `company`, `email`, `loginname`, `def_language` FROM `" . TABLE_PANEL_CUSTOMERS . "`
|
||||||
WHERE `loginname`='" . $db->escape($loginname) . "'
|
WHERE `loginname`='" . $db->escape($loginname) . "'
|
||||||
AND `email`='" . $db->escape($email) . "'";
|
AND `email`='" . $db->escape($email) . "'";
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if($db->num_rows() == 0)
|
if($db->num_rows() == 0)
|
||||||
{
|
{
|
||||||
$sql = "SELECT `adminid`, `name`, `email`, `loginname` FROM `" . TABLE_PANEL_ADMINS . "`
|
$sql = "SELECT `adminid`, `name`, `email`, `loginname`, `def_language` FROM `" . TABLE_PANEL_ADMINS . "`
|
||||||
WHERE `loginname`='" . $db->escape($loginname) . "'
|
WHERE `loginname`='" . $db->escape($loginname) . "'
|
||||||
AND `email`='" . $db->escape($email) . "'";
|
AND `email`='" . $db->escape($email) . "'";
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@@ -280,13 +280,26 @@ if($action == 'forgotpwd')
|
|||||||
|
|
||||||
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
||||||
$rstlog->logAction(USR_ACTION, LOG_WARNING, "Password for user '" . $user['loginname'] . "' has been reset!");
|
$rstlog->logAction(USR_ACTION, LOG_WARNING, "Password for user '" . $user['loginname'] . "' has been reset!");
|
||||||
|
|
||||||
|
$replace_arr = array(
|
||||||
|
'SALUTATION' => getCorrectUserSalutation($user),
|
||||||
|
'USERNAME' => $user['loginname'],
|
||||||
|
'PASSWORD' => $password
|
||||||
|
);
|
||||||
|
|
||||||
$body = strtr($lng['pwdreminder']['body'], array('%s' => $user['firstname'] . ' ' . $user['name'], '%p' => $password));
|
$body = strtr($lng['pwdreminder']['body'], array('%s' => $user['firstname'] . ' ' . $user['name'], '%p' => $password));
|
||||||
|
|
||||||
|
$def_language = ($user['def_language'] != '') ? $user['def_language'] : $settings['panel']['standardlanguage'];
|
||||||
|
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$user['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'password_reset_subject\'');
|
||||||
|
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['pwdreminder']['subject']), $replace_arr));
|
||||||
|
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$user['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'password_reset_mailbody\'');
|
||||||
|
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $body), $replace_arr));
|
||||||
|
|
||||||
$_mailerror = false;
|
$_mailerror = false;
|
||||||
try {
|
try {
|
||||||
$mail->Subject = $lng['pwdreminder']['subject'];
|
$mail->Subject = $mail_subject;
|
||||||
$mail->AltBody = $body;
|
$mail->AltBody = $mail_body;
|
||||||
$mail->MsgHTML(str_replace("\\n", "<br />", $body));
|
$mail->MsgHTML(str_replace("\\n", "<br />", $mail_body));
|
||||||
$mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']);
|
$mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']);
|
||||||
$mail->Send();
|
$mail->Send();
|
||||||
} catch(phpmailerException $e) {
|
} catch(phpmailerException $e) {
|
||||||
|
|||||||
@@ -301,6 +301,7 @@ CREATE TABLE `panel_domains` (
|
|||||||
`phpsettingid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1',
|
`phpsettingid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1',
|
||||||
`mod_fcgid_starter` int(4) default '-1',
|
`mod_fcgid_starter` int(4) default '-1',
|
||||||
`mod_fcgid_maxrequests` int(4) default '-1',
|
`mod_fcgid_maxrequests` int(4) default '-1',
|
||||||
|
`ismainbutsubto` int(11) unsigned NOT NULL default '0',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `customerid` (`customerid`),
|
KEY `customerid` (`customerid`),
|
||||||
KEY `parentdomain` (`parentdomainid`),
|
KEY `parentdomain` (`parentdomainid`),
|
||||||
@@ -379,6 +380,7 @@ CREATE TABLE `panel_htpasswds` (
|
|||||||
`path` varchar(255) NOT NULL default '',
|
`path` varchar(255) NOT NULL default '',
|
||||||
`username` varchar(255) NOT NULL default '',
|
`username` varchar(255) NOT NULL default '',
|
||||||
`password` varchar(255) NOT NULL default '',
|
`password` varchar(255) NOT NULL default '',
|
||||||
|
`authname` varchar(255) NOT NULL default 'Restricted Area',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `customerid` (`customerid`)
|
KEY `customerid` (`customerid`)
|
||||||
) TYPE=MyISAM ;
|
) TYPE=MyISAM ;
|
||||||
@@ -454,7 +456,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.11');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.12');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
||||||
@@ -526,7 +528,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (92, 'admin', 'show_version_login', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (92, 'admin', 'show_version_login', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (93, 'admin', 'show_version_footer', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (93, 'admin', 'show_version_footer', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (94, 'admin', 'froxlor_graphic', 'images/header.gif');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (94, 'admin', 'froxlor_graphic', 'images/header.gif');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (95, 'system', 'mod_fcgid_wrapper', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (95, 'system', 'mod_fcgid_wrapper', '1');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (96, 'system', 'mod_fcgid_starter', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (96, 'system', 'mod_fcgid_starter', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (97, 'system', 'mod_fcgid_peardir', '/usr/share/php/:/usr/share/php5/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (97, 'system', 'mod_fcgid_peardir', '/usr/share/php/:/usr/share/php5/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (98, 'system', 'index_file_extension', 'html');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (98, 'system', 'index_file_extension', 'html');
|
||||||
@@ -577,6 +579,12 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (143, 'system', 'froxlordirectlyviahostname', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (143, 'system', 'froxlordirectlyviahostname', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (144, 'panel', 'password_regex', '');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (144, 'panel', 'password_regex', '');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (145, 'system', 'perl_path', '/usr/bin/perl');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (145, 'system', 'perl_path', '/usr/bin/perl');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (146, 'system', 'mod_fcgid_ownvhost', '0');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (147, 'system', 'mod_fcgid_httpuser', 'froxlorlocal');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (148, 'system', 'mod_fcgid_httpgroup', 'froxlorlocal');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (149, 'perl', 'suexecworkaround', '0');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (150, 'perl', 'suexecpath', '/var/www/cgi-bin/');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (151, 'system', 'awstats_awstatspath', '/usr/bin/');
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
@@ -984,7 +992,7 @@ INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`,
|
|||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (4, 'froxlor/autoresponder', 'cron_autoresponder.php', '5 MINUTE', '0', 'cron_autoresponder');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (4, 'froxlor/autoresponder', 'cron_autoresponder.php', '5 MINUTE', '0', 'cron_autoresponder');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (5, 'froxlor/aps', 'cron_apsupdater.php', '1 HOUR', '0', 'cron_apsupdater');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (5, 'froxlor/aps', 'cron_apsupdater.php', '1 HOUR', '0', 'cron_apsupdater');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (6, 'froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (6, 'froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (7, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 MONTH', '1', 'cron_ticketsreset');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (7, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 DAY', '1', 'cron_ticketsreset');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (8, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '1', 'cron_ticketarchive');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (8, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '1', 'cron_ticketarchive');
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|||||||
@@ -499,9 +499,19 @@ if(isset($_POST['installstep'])
|
|||||||
//first we make a backup of the old DB if it exists
|
//first we make a backup of the old DB if it exists
|
||||||
|
|
||||||
status_message('begin', $lng['install']['backup_old_db']);
|
status_message('begin', $lng['install']['backup_old_db']);
|
||||||
$result = mysql_list_tables($mysql_database);
|
|
||||||
|
|
||||||
if($result)
|
$sql = "SHOW TABLES FROM $mysql_database";
|
||||||
|
$result = mysql_query($sql);
|
||||||
|
// check the first row
|
||||||
|
$row = mysql_fetch_row($result);
|
||||||
|
|
||||||
|
$tables_exist = false;
|
||||||
|
if(isset($row[0]) && $row[0] != '')
|
||||||
|
{
|
||||||
|
$tables_exist = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($tables_exist)
|
||||||
{
|
{
|
||||||
$filename = "/tmp/froxlor_backup_" . date('YmdHi') . ".sql";
|
$filename = "/tmp/froxlor_backup_" . date('YmdHi') . ".sql";
|
||||||
|
|
||||||
|
|||||||
@@ -876,7 +876,7 @@ if(isFroxlorVersion('0.9.10-svn2'))
|
|||||||
{
|
{
|
||||||
showUpdateStep("Updating from 0.9.10-svn2 to 0.9.10", false);
|
showUpdateStep("Updating from 0.9.10-svn2 to 0.9.10", false);
|
||||||
|
|
||||||
$update_directlyviahostname = isset($_POST['update_directlyviahostname']) ? '1' : '0';
|
$update_directlyviahostname = isset($_POST['update_directlyviahostname']) ? (int)$_POST['update_directlyviahostname'] : '0';
|
||||||
|
|
||||||
showUpdateStep("Adding new settings");
|
showUpdateStep("Adding new settings");
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'froxlordirectlyviahostname', '".(int)$update_directlyviahostname."');");
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'froxlordirectlyviahostname', '".(int)$update_directlyviahostname."');");
|
||||||
@@ -925,8 +925,105 @@ if(isFroxlorVersion('0.9.11-svn2'))
|
|||||||
|
|
||||||
if(isFroxlorVersion('0.9.11-svn3'))
|
if(isFroxlorVersion('0.9.11-svn3'))
|
||||||
{
|
{
|
||||||
showUpdateStep("Updating from 0.9.11-svn3 to 0.9.11 final", false);
|
showUpdateStep("Updating from 0.9.11-svn3 to 0.9.11 final");
|
||||||
lastStepStatus(0);
|
lastStepStatus(0);
|
||||||
|
|
||||||
updateToVersion('0.9.11');
|
updateToVersion('0.9.11');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.11'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.11 to 0.9.12-svn1", false);
|
||||||
|
|
||||||
|
$update_fcgid_ownvhost = isset($_POST['update_fcgid_ownvhost']) ? (int)$_POST['update_fcgid_ownvhost'] : '0';
|
||||||
|
$update_fcgid_httpuser = isset($_POST['update_fcgid_httpuser']) ? $_POST['update_fcgid_httpuser'] : 'froxlorlocal';
|
||||||
|
$update_fcgid_httpgroup = isset($_POST['update_fcgid_ownvhost']) ? $_POST['update_fcgid_ownvhost'] : 'froxlorlocal';
|
||||||
|
|
||||||
|
if($update_fcgid_httpuser == '') {
|
||||||
|
$update_fcgid_httpuser = 'froxlorlocal';
|
||||||
|
}
|
||||||
|
if($update_fcgid_httpgroup == '') {
|
||||||
|
$update_fcgid_httpgroup = 'froxlorlocal';
|
||||||
|
}
|
||||||
|
|
||||||
|
showUpdateStep("Adding new settings");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_ownvhost', '".$db->escape($update_fcgid_ownvhost)."');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_httpuser', '".$db->escape($update_fcgid_httpuser)."');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_httpgroup', '".$db->escape($update_fcgid_httpgroup)."');");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.12-svn1');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.12-svn1'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.12-svn1 to 0.9.12-svn2", false);
|
||||||
|
|
||||||
|
$update_perl_suexecworkaround = isset($_POST['update_perl_suexecworkaround']) ? (int)$_POST['update_perl_suexecworkaround'] : '0';
|
||||||
|
$update_perl_suexecpath = isset($_POST['update_perl_suexecpath']) ? makeCorrectDir($_POST['update_perl_suexecpath']) : '/var/www/cgi-bin/';
|
||||||
|
|
||||||
|
if($update_perl_suexecpath == '') {
|
||||||
|
$update_perl_suexecpath = '/var/www/cgi-bin/';
|
||||||
|
}
|
||||||
|
|
||||||
|
showUpdateStep("Adding new settings for perl/CGI");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('perl', 'suexecworkaround', '".$db->escape($update_perl_suexecworkaround)."');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('perl', 'suexecpath', '".$db->escape($update_perl_suexecpath)."');");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.12-svn2');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.12-svn2'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.12-svn2 to 0.9.12-svn3", false);
|
||||||
|
|
||||||
|
showUpdateStep("Adding new field to domain table");
|
||||||
|
$db->query("ALTER TABLE `".TABLE_PANEL_DOMAINS."` ADD `ismainbutsubto` int(11) unsigned NOT NULL default '0' AFTER `mod_fcgid_maxrequests`;");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.12-svn3');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.12-svn3'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.12-svn3 to 0.9.12-svn4", false);
|
||||||
|
|
||||||
|
$update_awstats_awstatspath = isset($_POST['update_awstats_awstatspath']) ? makeCorrectDir($_POST['update_awstats_awstatspath']) : $settings['system']['awstats_path'];
|
||||||
|
|
||||||
|
showUpdateStep("Adding new settings for awstats");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_awstatspath', '".$db->escape($update_awstats_awstatspath)."');");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.12-svn4');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.12-svn4'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.12-svn4 to 0.9.12-svn5", false);
|
||||||
|
|
||||||
|
showUpdateStep("Setting ticket-usage-reset cronjob interval to 1 day");
|
||||||
|
$db->query("UPDATE `cronjobs_run` SET `interval`='1 DAY' WHERE `cronfile`='cron_used_tickets_reset.php';");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.12-svn5');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.12-svn5'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.12-svn5 to 0.9.12-svn6", false);
|
||||||
|
|
||||||
|
showUpdateStep("Adding new field to table 'panel_htpasswds'");
|
||||||
|
$db->query("ALTER TABLE `".TABLE_PANEL_HTPASSWDS."` ADD `authname` varchar(255) NOT NULL default 'Restricted Area' AFTER `password`;");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.12-svn6');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.12-svn6'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.12-svn6 to 0.9.12 final");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.12');
|
||||||
|
}
|
||||||
|
|||||||
@@ -238,4 +238,45 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
|||||||
$question.= '<input type="text" class="text" name="update_perlpath" value="/usr/bin/perl" />';
|
$question.= '<input type="text" class="text" name="update_perlpath" value="/usr/bin/perl" />';
|
||||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(versionInUpdate($current_version, '0.9.12-svn1'))
|
||||||
|
{
|
||||||
|
if($settings['system']['mod_fcgid'] == 1)
|
||||||
|
{
|
||||||
|
$has_preconfig = true;
|
||||||
|
$description = 'You can chose whether you want Froxlor to use FCGID itself too now.';
|
||||||
|
$question = '<strong>Use FCGID for the Froxlor Panel?:</strong> ';
|
||||||
|
$question.= makeyesno('update_fcgid_ownvhost', '1', '0', '0').'<br /><br />';
|
||||||
|
$question.= '<strong>If \'yes\', please specify local user/group (have to exist, Froxlor does not add them automatically):</strong><br /><br />';
|
||||||
|
$question.= 'Local user: ';
|
||||||
|
$question.= '<input type="text" class="text" name="update_fcgid_httpuser" value="froxlorlocal" /><br /><br />';
|
||||||
|
$question.= 'Local group: ';
|
||||||
|
$question.= '<input type="text" class="text" name="update_fcgid_ownvhost" value="froxlorlocal" /><br />';
|
||||||
|
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(versionInUpdate($current_version, '0.9.12-svn2'))
|
||||||
|
{
|
||||||
|
$has_preconfig = true;
|
||||||
|
$description = 'Many apache user will have problems using perl/CGI as the customer docroots are not within the suexec path. Froxlor provides a simple workaround for that.';
|
||||||
|
$question = '<strong>Enable Apache/SuExec/Perl workaround?:</strong> ';
|
||||||
|
$question.= makeyesno('update_perl_suexecworkaround', '1', '0', '0').'<br /><br />';
|
||||||
|
$question.= '<strong>If \'yes\', please specify a path within the suexec path where Froxlor will create symlinks to customer perl-enabled paths:</strong><br /><br />';
|
||||||
|
$question.= 'Path for symlinks (must be within suexec path): ';
|
||||||
|
$question.= '<input type="text" class="text" name="update_perl_suexecpath" value="/var/www/cgi-bin/" /><br />';
|
||||||
|
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(versionInUpdate($current_version, '0.9.12-svn4'))
|
||||||
|
{
|
||||||
|
if((int)$settings['system']['awstats_enabled'] == 1)
|
||||||
|
{
|
||||||
|
$has_preconfig = true;
|
||||||
|
$description = 'Due to different paths of awstats_buildstaticpages.pl and awstats.pl you can set a different path for awstats.pl now.';
|
||||||
|
$question = '<strong>Path to \'awstats.pl\'?:</strong> ';
|
||||||
|
$question.= '<input type="text" class="text" name="update_awstats_awstatspath" value="'.$settings['system']['awstats_path'].'" /><br />';
|
||||||
|
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,12 +255,14 @@ class ticket
|
|||||||
{
|
{
|
||||||
// Get e-mail message for customer
|
// Get e-mail message for customer
|
||||||
|
|
||||||
$usr = $this->db->query_first('SELECT `name`, `firstname`, `email`
|
$usr = $this->db->query_first('SELECT `name`, `firstname`, `company`, `email`
|
||||||
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||||
WHERE `customerid` = "' . (int)$customerid . '"');
|
WHERE `customerid` = "' . (int)$customerid . '"');
|
||||||
$replace_arr = array(
|
$replace_arr = array(
|
||||||
'FIRSTNAME' => $usr['firstname'],
|
'FIRSTNAME' => $usr['firstname'],
|
||||||
'NAME' => $usr['name'],
|
'NAME' => $usr['name'],
|
||||||
|
'COMPANY' => $usr['company'],
|
||||||
|
'SALUTATION' => getCorrectUserSalutation($usr),
|
||||||
'SUBJECT' => $this->Get('subject', true)
|
'SUBJECT' => $this->Get('subject', true)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,7 +163,8 @@ return Array(
|
|||||||
),
|
),
|
||||||
'commands_2' => Array(
|
'commands_2' => Array(
|
||||||
'echo "dovecot unix - n n - - pipe
|
'echo "dovecot unix - n n - - pipe
|
||||||
flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}" >> /usr/local/etc/postfix/master.cf'
|
flags=DRhu user=vmail:vmail 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(
|
'restart' => Array(
|
||||||
'sh /usr/local/etc/rc.d/dovecot restart'
|
'sh /usr/local/etc/rc.d/dovecot restart'
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ return Array(
|
|||||||
'apache2' => Array(
|
'apache2' => Array(
|
||||||
'label' => 'Apache2 Webserver',
|
'label' => 'Apache2 Webserver',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'touch ' . $settings['system']['apacheconf_vhost'],
|
$configcommand['vhost'],
|
||||||
'chown root:0 ' . $settings['system']['apacheconf_vhost'],
|
'chown root:0 ' . $settings['system']['apacheconf_vhost'],
|
||||||
'chmod 0600 ' . $settings['system']['apacheconf_vhost'],
|
'chmod 0600 ' . $settings['system']['apacheconf_vhost'],
|
||||||
'touch ' . $settings['system']['apacheconf_diroptions'],
|
$configcommand['diroptions'],
|
||||||
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
|
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
|
||||||
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
|
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
@@ -251,6 +251,7 @@ milter_default_action = accept" >> /etc/postfix/main.cf'
|
|||||||
'dovecot' => Array(
|
'dovecot' => Array(
|
||||||
'label' => 'Dovecot',
|
'label' => 'Dovecot',
|
||||||
'commands_1' => Array(
|
'commands_1' => Array(
|
||||||
|
'emerge -av dovecot',
|
||||||
'mv dovecot.conf dovecot.conf.gentoo',
|
'mv dovecot.conf dovecot.conf.gentoo',
|
||||||
'mv dovecot-sql.conf dovecot-sql.conf.gentoo',
|
'mv dovecot-sql.conf dovecot-sql.conf.gentoo',
|
||||||
'touch dovecot.conf',
|
'touch dovecot.conf',
|
||||||
@@ -260,6 +261,9 @@ milter_default_action = accept" >> /etc/postfix/main.cf'
|
|||||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
||||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||||
),
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||||
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/dovecot restart'
|
'/etc/init.d/dovecot restart'
|
||||||
)
|
)
|
||||||
@@ -284,6 +288,26 @@ milter_default_action = accept" >> /etc/postfix/main.cf'
|
|||||||
'/etc/init.d/proftpd restart'
|
'/etc/init.d/proftpd restart'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
'pureftpd' => Array(
|
||||||
|
'label' => 'PureFTPD',
|
||||||
|
'commands_1' => Array(
|
||||||
|
'emerge pure-ftpd'
|
||||||
|
),
|
||||||
|
'files' => Array(
|
||||||
|
'etc_conf.d_pure-ftpd' => '/etc/conf.d/pure-ftpd',
|
||||||
|
'etc_pureftpd-mysql.conf' => '/etc/pureftpd-mysql.conf'
|
||||||
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'chown root:0 /etc/conf.d/pure-ftpd',
|
||||||
|
'chmod 0644 /etc/conf.d/pure-ftpd',
|
||||||
|
'chown root:0 /etc/pureftpd-mysql.conf',
|
||||||
|
'chmod 0600 /etc/pureftpd-mysql.conf'
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'rc-update add pure-ftpd default',
|
||||||
|
'/etc/init.d/pure-ftpd restart'
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'etc' => Array(
|
'etc' => Array(
|
||||||
@@ -326,13 +350,15 @@ milter_default_action = accept" >> /etc/postfix/main.cf'
|
|||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
'label' => 'libnss (system login with mysql)',
|
'label' => 'libnss (system login with mysql)',
|
||||||
|
'commands_1' => Array(
|
||||||
|
'emerge -av libnss-mysql'
|
||||||
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_libnss-mysql.cfg' => '/etc/libnss-mysql.cfg',
|
'etc_libnss-mysql.cfg' => '/etc/libnss-mysql.cfg',
|
||||||
'etc_libnss-mysql-root.cfg' => '/etc/libnss-mysql-root.cfg',
|
'etc_libnss-mysql-root.cfg' => '/etc/libnss-mysql-root.cfg',
|
||||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
||||||
),
|
),
|
||||||
'commands' => Array(
|
'commands_2' => Array(
|
||||||
'emerge -av libnss-mysql',
|
|
||||||
'chmod 600 /etc/libnss-mysql.cfg /etc/libnss-mysql-root.cfg'
|
'chmod 600 /etc/libnss-mysql.cfg /etc/libnss-mysql-root.cfg'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
|
|||||||
@@ -220,13 +220,16 @@ return Array(
|
|||||||
),
|
),
|
||||||
'dovecot' => Array(
|
'dovecot' => Array(
|
||||||
'label' => 'Dovecot',
|
'label' => 'Dovecot',
|
||||||
'commands' => Array(
|
'commands_1' => Array(
|
||||||
'/etc/init.d/dovecot stop',
|
'apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix',
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
||||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||||
),
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||||
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/dovecot restart'
|
'/etc/init.d/dovecot restart'
|
||||||
)
|
)
|
||||||
@@ -251,6 +254,9 @@ return Array(
|
|||||||
),
|
),
|
||||||
'pure-ftpd' => Array(
|
'pure-ftpd' => Array(
|
||||||
'label' => 'Pure FTPd',
|
'label' => 'Pure FTPd',
|
||||||
|
'commands_1' => Array(
|
||||||
|
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||||
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID',
|
'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID',
|
||||||
'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile',
|
'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile',
|
||||||
@@ -263,6 +269,9 @@ return Array(
|
|||||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||||
),
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
||||||
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/pure-ftpd-mysql restart'
|
'/etc/init.d/pure-ftpd-mysql restart'
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -224,13 +224,16 @@ return Array(
|
|||||||
),
|
),
|
||||||
'dovecot' => Array(
|
'dovecot' => Array(
|
||||||
'label' => 'Dovecot',
|
'label' => 'Dovecot',
|
||||||
'commands' => Array(
|
'commands_1' => Array(
|
||||||
'apt-get install dovecot-imapd dovecot-pop3d'
|
'apt-get install dovecot-imapd dovecot-pop3d'
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
||||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||||
),
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||||
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/dovecot restart'
|
'/etc/init.d/dovecot restart'
|
||||||
)
|
)
|
||||||
@@ -256,7 +259,7 @@ return Array(
|
|||||||
),
|
),
|
||||||
'pure-ftpd' => Array(
|
'pure-ftpd' => Array(
|
||||||
'label' => 'Pure FTPd',
|
'label' => 'Pure FTPd',
|
||||||
'commands' => Array(
|
'commands_1' => Array(
|
||||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
@@ -271,6 +274,9 @@ return Array(
|
|||||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||||
),
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
||||||
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/pure-ftpd-mysql restart'
|
'/etc/init.d/pure-ftpd-mysql restart'
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ return Array(
|
|||||||
),
|
),
|
||||||
'dovecot' => Array(
|
'dovecot' => Array(
|
||||||
'label' => 'Dovecot',
|
'label' => 'Dovecot',
|
||||||
'commands' => Array(
|
'commands_1' => Array(
|
||||||
'apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix'
|
'apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix'
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
@@ -232,6 +232,9 @@ return Array(
|
|||||||
'etc_dovecot_conf.d_01-dovecot-postfix.conf' => '/etc/dovecot/conf.d/01-dovecot-postfix.conf',
|
'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'
|
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||||
),
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||||
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/dovecot restart'
|
'/etc/init.d/dovecot restart'
|
||||||
)
|
)
|
||||||
@@ -257,7 +260,7 @@ return Array(
|
|||||||
),
|
),
|
||||||
'pure-ftpd' => Array(
|
'pure-ftpd' => Array(
|
||||||
'label' => 'Pure FTPd',
|
'label' => 'Pure FTPd',
|
||||||
'commands' => Array(
|
'commands_1' => Array(
|
||||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
@@ -272,6 +275,9 @@ return Array(
|
|||||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||||
),
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
||||||
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/pure-ftpd-mysql restart'
|
'/etc/init.d/pure-ftpd-mysql restart'
|
||||||
)
|
)
|
||||||
|
|||||||
66
lib/functions/filedir/function.fileImmutable.php
Normal file
66
lib/functions/filedir/function.fileImmutable.php
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<?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 Functions
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set the immutable flag for a file
|
||||||
|
*
|
||||||
|
* @param string $filename the file to set the flag for
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
function setImmutable($filename = null)
|
||||||
|
{
|
||||||
|
safe_exec(_getImmutableFunction(false).escapeshellarg($filename));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* removes the immutable flag for a file
|
||||||
|
*
|
||||||
|
* @param string $filename the file to set the flag for
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
function removeImmutable($filename = null)
|
||||||
|
{
|
||||||
|
safe_exec(_getImmutableFunction(true).escapeshellarg($filename));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* internal function to check whether
|
||||||
|
* to use chattr (Linux) or chflags (FreeBSD)
|
||||||
|
*
|
||||||
|
* @param boolean $remove whether to use +i|schg (false) or -i|noschg (true)
|
||||||
|
*
|
||||||
|
* @return string functionname + parameter (not the file)
|
||||||
|
*/
|
||||||
|
function _getImmutableFunction($remove = false)
|
||||||
|
{
|
||||||
|
$output = array();
|
||||||
|
$return_var = 0;
|
||||||
|
exec('which chattr 2>&1', $output, $return_var);
|
||||||
|
|
||||||
|
if((int)$return_var != 0)
|
||||||
|
{
|
||||||
|
// FreeBSD style
|
||||||
|
return 'chflags '.(($remove === true) ? 'noschg ' : 'schg ');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Linux style
|
||||||
|
return 'chattr '.(($remove === true) ? '-i ' : '+i ');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -76,7 +76,7 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
|
|||||||
// for the Dropdown, #225
|
// for the Dropdown, #225
|
||||||
$value = substr($value, 1);
|
$value = substr($value, 1);
|
||||||
$field = $lng['panel']['toomanydirs'];
|
$field = $lng['panel']['toomanydirs'];
|
||||||
$field.= '<input type="text" name="path" value="' . htmlspecialchars($value) . '" />';
|
$field.= '<br /><input type="text" name="path" value="' . htmlspecialchars($value) . '" />';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ function safe_exec($exec_string, &$return_value = false)
|
|||||||
'du',
|
'du',
|
||||||
'chmod',
|
'chmod',
|
||||||
'chattr',
|
'chattr',
|
||||||
|
'chflags', /* freebsd equivalent to linux' chattr */
|
||||||
$settings['system']['apachereload_command'],
|
$settings['system']['apachereload_command'],
|
||||||
$settings['system']['bindreload_command'],
|
$settings['system']['bindreload_command'],
|
||||||
$settings['dkim']['dkimrestart_command'],
|
$settings['dkim']['dkimrestart_command'],
|
||||||
|
|||||||
@@ -1,5 +1,20 @@
|
|||||||
<?php
|
<?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 Functions
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* store the default index-file in a given destination folder
|
* store the default index-file in a given destination folder
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -58,6 +58,11 @@ function validateFormFieldString($fieldname, $fielddata, $newfieldvalue)
|
|||||||
}
|
}
|
||||||
elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'dir')
|
elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'dir')
|
||||||
{
|
{
|
||||||
|
// add trailing slash to validate path if needed
|
||||||
|
// refs #331
|
||||||
|
if(substr($newfieldvalue, -1) != '/') {
|
||||||
|
$newfieldvalue.= '/';
|
||||||
|
}
|
||||||
$returnvalue = ($newfieldvalue == makeCorrectDir($newfieldvalue));
|
$returnvalue = ($newfieldvalue == makeCorrectDir($newfieldvalue));
|
||||||
}
|
}
|
||||||
elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'file')
|
elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'file')
|
||||||
|
|||||||
70
lib/functions/froxlor/function.CorrectErrorDocument.php
Normal file
70
lib/functions/froxlor/function.CorrectErrorDocument.php
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
<?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 Functions
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* this functions validates a given value as ErrorDocument
|
||||||
|
* refs #267
|
||||||
|
*
|
||||||
|
* @param string error-document-string
|
||||||
|
*
|
||||||
|
* @return string error-document-string
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function correctErrorDocument($errdoc = null)
|
||||||
|
{
|
||||||
|
global $settings, $idna_convert;
|
||||||
|
|
||||||
|
if($errdoc !== null && $errdoc != '')
|
||||||
|
{
|
||||||
|
// not a URL
|
||||||
|
if((strtoupper(substr($errdoc, 0, 5)) != 'HTTP:'
|
||||||
|
&& strtoupper(substr($errdoc, 0, 6)) != 'HTTPS:')
|
||||||
|
|| !validateUrl($idna_convert->encode($errdoc)))
|
||||||
|
{
|
||||||
|
// a file
|
||||||
|
if(substr($errdoc, 0, 1) != '"')
|
||||||
|
{
|
||||||
|
$errdoc = makeCorrectFile($errdoc);
|
||||||
|
// apache needs a starting-slash (starting at the domains-docroot)
|
||||||
|
if(!substr($errdoc, 0, 1) == '/') {
|
||||||
|
$errdoc = '/'.$errdoc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// a string (check for ending ")
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// string won't work for lighty
|
||||||
|
if($settings['system']['webserver'] == 'lighttpd')
|
||||||
|
{
|
||||||
|
standard_error('stringerrordocumentnotvalidforlighty');
|
||||||
|
}
|
||||||
|
elseif(substr($errdoc, -1) != '"')
|
||||||
|
{
|
||||||
|
$errdoc .= '"';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($settings['system']['webserver'] == 'lighttpd')
|
||||||
|
{
|
||||||
|
standard_error('urlerrordocumentnotvalidforlighty');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $errdoc;
|
||||||
|
}
|
||||||
60
lib/functions/froxlor/function.domainHasMainSubDomains.php
Normal file
60
lib/functions/froxlor/function.domainHasMainSubDomains.php
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<?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 Functions
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check whether a domain has subdomains added as full-domains
|
||||||
|
* #329
|
||||||
|
*
|
||||||
|
* @param int $id domain-id
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
function domainHasMainSubDomains($id = 0)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
$sql = "SELECT COUNT(`id`) as `mainsubs` FROM `".TABLE_PANEL_DOMAINS."` WHERE `ismainbutsubto` = '".(int)$id."'";
|
||||||
|
$result = $db->query_first($sql);
|
||||||
|
if(isset($result['mainsubs'])
|
||||||
|
&& $result['mainsubs'] > 0
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check whether a subof-domain exists
|
||||||
|
* #329
|
||||||
|
*
|
||||||
|
* @param int $id subof-domain-id
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
function domainMainToSubExists($id = 0)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
$sql = "SELECT `id` FROM `".TABLE_PANEL_DOMAINS."` WHERE `id` = '".(int)$id."'";
|
||||||
|
$result = $db->query_first($sql);
|
||||||
|
if(isset($result['id'])
|
||||||
|
&& $result['id'] > 0
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@@ -72,7 +72,7 @@ define('PACKAGE_ENABLED', 2);
|
|||||||
|
|
||||||
// VERSION INFO
|
// VERSION INFO
|
||||||
|
|
||||||
$version = '0.9.11';
|
$version = '0.9.12';
|
||||||
$dbversion = '2';
|
$dbversion = '2';
|
||||||
$branding = '';
|
$branding = '';
|
||||||
|
|
||||||
|
|||||||
@@ -171,10 +171,10 @@ $lng['extras']['error404path'] = '404';
|
|||||||
$lng['extras']['error403path'] = '403';
|
$lng['extras']['error403path'] = '403';
|
||||||
$lng['extras']['error500path'] = '500';
|
$lng['extras']['error500path'] = '500';
|
||||||
$lng['extras']['error401path'] = '401';
|
$lng['extras']['error401path'] = '401';
|
||||||
$lng['extras']['errordocument404path'] = 'URL to ErrorDocument 404';
|
$lng['extras']['errordocument404path'] = 'ErrorDocument 404';
|
||||||
$lng['extras']['errordocument403path'] = 'URL to ErrorDocument 403';
|
$lng['extras']['errordocument403path'] = 'ErrorDocument 403';
|
||||||
$lng['extras']['errordocument500path'] = 'URL to ErrorDocument 500';
|
$lng['extras']['errordocument500path'] = 'ErrorDocument 500';
|
||||||
$lng['extras']['errordocument401path'] = 'URL to ErrorDocument 401';
|
$lng['extras']['errordocument401path'] = 'ErrorDocument 401';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Errors
|
* Errors
|
||||||
@@ -320,8 +320,10 @@ $lng['admin']['templates']['mailbody'] = 'Mail body';
|
|||||||
$lng['admin']['templates']['createcustomer'] = 'Welcome mail for new customers';
|
$lng['admin']['templates']['createcustomer'] = 'Welcome mail for new customers';
|
||||||
$lng['admin']['templates']['pop_success'] = 'Welcome mail for new email accounts';
|
$lng['admin']['templates']['pop_success'] = 'Welcome mail for new email accounts';
|
||||||
$lng['admin']['templates']['template_replace_vars'] = 'Variables to be replaced in the template:';
|
$lng['admin']['templates']['template_replace_vars'] = 'Variables to be replaced in the template:';
|
||||||
|
$lng['admin']['templates']['SALUTATION'] = 'Replaced with a correct salutation (name or company)';
|
||||||
$lng['admin']['templates']['FIRSTNAME'] = 'Replaced with the customers firstname.';
|
$lng['admin']['templates']['FIRSTNAME'] = 'Replaced with the customers firstname.';
|
||||||
$lng['admin']['templates']['NAME'] = 'Replaced with the customers name.';
|
$lng['admin']['templates']['NAME'] = 'Replaced with the customers name.';
|
||||||
|
$lng['admin']['templates']['COMPANY'] = 'Replaces with the customers company name';
|
||||||
$lng['admin']['templates']['USERNAME'] = 'Replaced with the customers account username.';
|
$lng['admin']['templates']['USERNAME'] = 'Replaced with the customers account username.';
|
||||||
$lng['admin']['templates']['PASSWORD'] = 'Replaced with the customers account password.';
|
$lng['admin']['templates']['PASSWORD'] = 'Replaced with the customers account password.';
|
||||||
$lng['admin']['templates']['EMAIL'] = 'Replaced with the address of the POP3/IMAP account.';
|
$lng['admin']['templates']['EMAIL'] = 'Replaced with the address of the POP3/IMAP account.';
|
||||||
@@ -495,7 +497,7 @@ $lng['admin']['mailserversettings'] = 'Mailserver settings';
|
|||||||
$lng['admin']['nameserversettings'] = 'Nameserver settings';
|
$lng['admin']['nameserversettings'] = 'Nameserver settings';
|
||||||
$lng['admin']['updatecounters'] = 'Recalculate resource usage';
|
$lng['admin']['updatecounters'] = 'Recalculate resource usage';
|
||||||
$lng['question']['admin_counters_reallyupdate'] = 'Do you really want to recalculate resource usage?';
|
$lng['question']['admin_counters_reallyupdate'] = 'Do you really want to recalculate resource usage?';
|
||||||
$lng['panel']['pathDescription'] = 'If the directory doesn\'t exist, it will be created automatically.';
|
$lng['panel']['pathDescription'] = 'If the directory doesn\'t exist, it will be created automatically.<br /><br />If you want a redirect to another domain than this entry has to start with http:// or https://';
|
||||||
|
|
||||||
// ADDED IN 1.2.16-svn6
|
// ADDED IN 1.2.16-svn6
|
||||||
|
|
||||||
@@ -516,7 +518,7 @@ $lng['changepassword']['also_change_webalizer'] = ' also change password of the
|
|||||||
// ADDED IN 1.2.16-svn8
|
// ADDED IN 1.2.16-svn8
|
||||||
|
|
||||||
$lng['serversettings']['mailpwcleartext']['title'] = 'Also save passwords of mail accounts unencrypted in database';
|
$lng['serversettings']['mailpwcleartext']['title'] = 'Also save passwords of mail accounts unencrypted in database';
|
||||||
$lng['serversettings']['mailpwcleartext']['description'] = 'If this is set to yes, all passwords will also be saved unencrypted (clear text, plain readable for everyone with database access) in the mail_users-table. Only activate this if you really need it!';
|
$lng['serversettings']['mailpwcleartext']['description'] = 'If this is set to yes, all passwords will also be saved unencrypted (clear text, plain readable for everyone with database access) in the mail_users-table. Only activate this if you intend to use SASL!';
|
||||||
$lng['serversettings']['mailpwcleartext']['removelink'] = 'Click here to wipe all unencrypted passwords from the table.';
|
$lng['serversettings']['mailpwcleartext']['removelink'] = 'Click here to wipe all unencrypted passwords from the table.';
|
||||||
$lng['question']['admin_cleartextmailpws_reallywipe'] = 'Do you really want to wipe all unencrypted mail account passwords from the table mail_users? This cannot be reverted!';
|
$lng['question']['admin_cleartextmailpws_reallywipe'] = 'Do you really want to wipe all unencrypted mail account passwords from the table mail_users? This cannot be reverted!';
|
||||||
$lng['admin']['configfiles']['overview'] = 'Overview';
|
$lng['admin']['configfiles']['overview'] = 'Overview';
|
||||||
@@ -1354,8 +1356,7 @@ $lng['ftp']['account_edit'] = 'Edit ftp account';
|
|||||||
$lng['ftp']['editpassdescription'] = 'Set new password or leave blank for no change.';
|
$lng['ftp']['editpassdescription'] = 'Set new password or leave blank for no change.';
|
||||||
$lng['customer']['sendinfomail'] = 'Send data via email to me';
|
$lng['customer']['sendinfomail'] = 'Send data via email to me';
|
||||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] New database created';
|
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] New database created';
|
||||||
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nYou can access your databases using phpMyAdmin via {URI}\n";
|
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hello {CUST_NAME},\n\nyou have just added a new database. Here is the entered information:\n\nDatabasename: {DB_NAME}\nPassword: {DB_PASS}\nDescription: {DB_DESC}\nDB-Hostname: {DB_SRV}\nphpMyAdmin: {PMA_URI}\nYours sincerely, the Froxlor-Team";
|
||||||
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hello {CUST_NAME},\n\nyou have just added a new database. Here is the entered information:\n\nDatabasename: {DB_NAME}\nPassword: {DB_PASS}\nDescription: {DB_DESC}\nDB-Hostname: {DB_SRV}\n{PMA_URI}\nYours sincerely, the Froxlor-Team";
|
|
||||||
$lng['error']['domains_cantdeletedomainwithapsinstances'] = 'You cannot delete a domain which is used by an installed APS package. You have to uninstall it first.';
|
$lng['error']['domains_cantdeletedomainwithapsinstances'] = 'You cannot delete a domain which is used by an installed APS package. You have to uninstall it first.';
|
||||||
$lng['serversettings']['awstats_path'] = 'Path to AWStats \'awstats_buildstaticpages.pl\'';
|
$lng['serversettings']['awstats_path'] = 'Path to AWStats \'awstats_buildstaticpages.pl\'';
|
||||||
$lng['serversettings']['awstats_conf'] = 'AWStats configuration path';
|
$lng['serversettings']['awstats_conf'] = 'AWStats configuration path';
|
||||||
@@ -1448,7 +1449,53 @@ $lng['extras']['execute_perl'] = 'Execute perl/CGI';
|
|||||||
$lng['admin']['perlenabled'] = 'Perl enabled';
|
$lng['admin']['perlenabled'] = 'Perl enabled';
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.11-svn3
|
// ADDED IN FROXLOR 0.9.11-svn3
|
||||||
$lng['serversettings']['perl_path']['title'] = 'Path zu perl';
|
$lng['serversettings']['perl_path']['title'] = 'Path to perl';
|
||||||
$lng['serversettings']['perl_path']['description'] = 'Only relevant if you use lighttpd. Default is /usr/bin/perl';
|
$lng['serversettings']['perl_path']['description'] = 'Only relevant if you use lighttpd. Default is /usr/bin/perl';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.12-svn1
|
||||||
|
$lng['admin']['fcgid_settings'] = 'FCGID';
|
||||||
|
$lng['serversettings']['mod_fcgid_ownvhost']['title'] = 'Enable FCGID for the Froxlor vhost';
|
||||||
|
$lng['serversettings']['mod_fcgid_ownvhost']['description'] = 'If enabled, Froxlor will also be running under a local user<br /><strong>ATTENTION:</strong>This needs manual configuration, see <a href="http://wiki.froxlor.org/contrib/fcgid-handbook">http://wiki.froxlor.org/contrib/fcgid-handbook</a>';
|
||||||
|
$lng['admin']['mod_fcgid_user'] = 'Local user to use for FCGID (Froxlor vhost)';
|
||||||
|
$lng['admin']['mod_fcgid_group'] = 'Local group to use for FCGID (Froxlor vhost)';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.12-svn2
|
||||||
|
$lng['admin']['perl_settings'] = 'Perl/CGI';
|
||||||
|
$lng['serversettings']['perl']['suexecworkaround']['title'] = 'Enable SuExec workaround (Apache only)';
|
||||||
|
$lng['serversettings']['perl']['suexecworkaround']['description'] = 'Enable only if customer docroots are not within the apache suexec path.<br />If enabled, Froxlor will generate a symlink from the customers perl-enabled directory + /cgi-bin/ to the given path.<br />Note that perl will then only work in the folders subdirectory /cgi-bin/ and not in the folder itself (as it does without this fix!)';
|
||||||
|
$lng['serversettings']['perl']['suexeccgipath']['title'] = 'Path for customer perl-enabled directory symlinks';
|
||||||
|
$lng['serversettings']['perl']['suexeccgipath']['description'] = 'You only need to set this if the SuExec-workaround is enabled.<br />ATTENTION: Be sure this path is within the suexec path or else this workaround is uselsess';
|
||||||
|
$lng['panel']['descriptionerrordocument'] = 'Can be an URL, path to a file or just a string wrapped around " "<br />Leave empty to use server default value.';
|
||||||
|
$lng['error']['stringerrordocumentnotvalidforlighty'] = 'A string as ErrorDocument does not work in lighttpd, please specify a path to a file';
|
||||||
|
$lng['error']['urlerrordocumentnotvalidforlighty'] = 'An URL as ErrorDocument does not work in lighttpd, please specify a path to a file';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.12-svn3
|
||||||
|
$lng['question']['remove_subbutmain_domains'] = 'Also remove domains which are added as full domains but which are subdomains of this domain?';
|
||||||
|
$lng['domains']['issubof'] = 'This domain is a subdomain of another domain';
|
||||||
|
$lng['domains']['issubofinfo'] = 'You have to set this to the correct domain if you want to add a subdomain as full-domain (e.g. you want to add "www.domain.tld", you have to select "domain.tld" here)';
|
||||||
|
$lng['domains']['nosubtomaindomain'] = 'No subdomain of a full domain';
|
||||||
|
$lng['admin']['templates']['new_database_by_customer'] = 'Customer-notification when a database has been created';
|
||||||
|
$lng['admin']['templates']['new_ftpaccount_by_customer'] = 'Customer-notification when a ftp-user has been created';
|
||||||
|
$lng['admin']['templates']['newdatabase'] = 'Notification-mails for new databases';
|
||||||
|
$lng['admin']['templates']['newftpuser'] = 'Notification-mails for new ftp-user';
|
||||||
|
$lng['admin']['templates']['CUST_NAME'] = 'Customer name';
|
||||||
|
$lng['admin']['templates']['DB_NAME'] = 'Database name';
|
||||||
|
$lng['admin']['templates']['DB_PASS'] = 'Database password';
|
||||||
|
$lng['admin']['templates']['DB_DESC'] = 'Database description';
|
||||||
|
$lng['admin']['templates']['DB_SRV'] = 'Database server';
|
||||||
|
$lng['admin']['templates']['PMA_URI'] = 'URL to phpMyAdmin (if given)';
|
||||||
|
$lng['admin']['notgiven'] = '[not given]';
|
||||||
|
$lng['admin']['templates']['USR_NAME'] = 'FTP username';
|
||||||
|
$lng['admin']['templates']['USR_PASS'] = 'FTP password';
|
||||||
|
$lng['admin']['templates']['USR_PATH'] = 'FTP homedir (relative to customer-docroot)';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.12-svn4
|
||||||
|
$lng['serversettings']['awstats_awstatspath'] = 'Path to AWStats \'awstats.pl\'';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.12-svn6
|
||||||
|
$lng['extras']['htpasswdauthname'] = 'Authentication reason (AuthName)';
|
||||||
|
$lng['extras']['directoryprotection_edit'] = 'edit directory protection';
|
||||||
|
$lng['admin']['templates']['forgotpwd'] = 'Notification-mails for password-reset';
|
||||||
|
$lng['admin']['templates']['password_reset'] = 'Customer-notification for passwort-reset';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -171,10 +171,10 @@ $lng['extras']['error404path'] = '404';
|
|||||||
$lng['extras']['error403path'] = '403';
|
$lng['extras']['error403path'] = '403';
|
||||||
$lng['extras']['error500path'] = '500';
|
$lng['extras']['error500path'] = '500';
|
||||||
$lng['extras']['error401path'] = '401';
|
$lng['extras']['error401path'] = '401';
|
||||||
$lng['extras']['errordocument404path'] = 'URL zum Fehlerdokument 404';
|
$lng['extras']['errordocument404path'] = 'Fehlerdokument 404';
|
||||||
$lng['extras']['errordocument403path'] = 'URL zum Fehlerdokument 403';
|
$lng['extras']['errordocument403path'] = 'Fehlerdokument 403';
|
||||||
$lng['extras']['errordocument500path'] = 'URL zum Fehlerdokument 500';
|
$lng['extras']['errordocument500path'] = 'Fehlerdokument 500';
|
||||||
$lng['extras']['errordocument401path'] = 'URL zum Fehlerdokument 401';
|
$lng['extras']['errordocument401path'] = 'Fehlerdokument 401';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Errors
|
* Errors
|
||||||
@@ -223,7 +223,7 @@ $lng['error']['nosubjectcreate'] = 'Sie müssen einen Betreff angeben.';
|
|||||||
$lng['error']['nomailbodycreate'] = 'Sie müssen einen E-Mail-Text eingeben.';
|
$lng['error']['nomailbodycreate'] = 'Sie müssen einen E-Mail-Text eingeben.';
|
||||||
$lng['error']['templatenotfound'] = 'Vorlage wurde nicht gefunden.';
|
$lng['error']['templatenotfound'] = 'Vorlage wurde nicht gefunden.';
|
||||||
$lng['error']['alltemplatesdefined'] = 'Sie können keine weiteren Vorlagen anlegen, da bereits alle Sprachen mit Vorlagen versorgt sind.';
|
$lng['error']['alltemplatesdefined'] = 'Sie können keine weiteren Vorlagen anlegen, da bereits alle Sprachen mit Vorlagen versorgt sind.';
|
||||||
$lng['error']['wwwnotallowed'] = 'Ihre Subdomain darf nicht www heissen.';
|
$lng['error']['wwwnotallowed'] = 'Ihre Subdomain darf nicht www heißen.';
|
||||||
$lng['error']['subdomainiswrong'] = 'Die Subdomain %s enthält ungültige Zeichen.';
|
$lng['error']['subdomainiswrong'] = 'Die Subdomain %s enthält ungültige Zeichen.';
|
||||||
$lng['error']['domaincantbeempty'] = 'Der Domain-Name darf nicht leer sein.';
|
$lng['error']['domaincantbeempty'] = 'Der Domain-Name darf nicht leer sein.';
|
||||||
$lng['error']['domainexistalready'] = 'Die Domain %s existiert bereits.';
|
$lng['error']['domainexistalready'] = 'Die Domain %s existiert bereits.';
|
||||||
@@ -321,8 +321,10 @@ $lng['admin']['templates']['createcustomer'] = 'Willkommensmail für neue Ku
|
|||||||
$lng['admin']['templates']['pop_success'] = 'Willkommensmail für neue E-Mail Konten';
|
$lng['admin']['templates']['pop_success'] = 'Willkommensmail für neue E-Mail Konten';
|
||||||
$lng['admin']['wwwserveralias'] = 'www. ServerAlias hinzufügen';
|
$lng['admin']['wwwserveralias'] = 'www. ServerAlias hinzufügen';
|
||||||
$lng['admin']['templates']['template_replace_vars'] = 'Variablen, die in den Vorlagen ersetzt werden:';
|
$lng['admin']['templates']['template_replace_vars'] = 'Variablen, die in den Vorlagen ersetzt werden:';
|
||||||
|
$lng['admin']['templates']['SALUTATION'] = 'Wird mit einer korrekten Anrede des Kunden ersetzt';
|
||||||
$lng['admin']['templates']['FIRSTNAME'] = 'Wird mit dem Vornamen des Kunden ersetzt.';
|
$lng['admin']['templates']['FIRSTNAME'] = 'Wird mit dem Vornamen des Kunden ersetzt.';
|
||||||
$lng['admin']['templates']['NAME'] = 'Wird mit dem Namen des Kunden ersetzt.';
|
$lng['admin']['templates']['NAME'] = 'Wird mit dem Namen des Kunden ersetzt.';
|
||||||
|
$lng['admin']['templates']['COMPANY'] = 'Wird mit dem Firmennamen des Kunden ersetzt.';
|
||||||
$lng['admin']['templates']['USERNAME'] = 'Wird mit dem Benutzernamen des neuen Kundenkontos ersetzt.';
|
$lng['admin']['templates']['USERNAME'] = 'Wird mit dem Benutzernamen des neuen Kundenkontos ersetzt.';
|
||||||
$lng['admin']['templates']['PASSWORD'] = 'Wird mit dem Passwort des neuen Kundenkontos ersetzt.';
|
$lng['admin']['templates']['PASSWORD'] = 'Wird mit dem Passwort des neuen Kundenkontos ersetzt.';
|
||||||
$lng['admin']['templates']['EMAIL'] = 'Wird mit der Adresse des neuen POP3/IMAP Kontos ersetzt.';
|
$lng['admin']['templates']['EMAIL'] = 'Wird mit der Adresse des neuen POP3/IMAP Kontos ersetzt.';
|
||||||
@@ -348,11 +350,11 @@ $lng['serversettings']['ipaddress']['description'] = 'Welche IP-Adresse hat der
|
|||||||
$lng['serversettings']['hostname']['title'] = 'Hostname';
|
$lng['serversettings']['hostname']['title'] = 'Hostname';
|
||||||
$lng['serversettings']['hostname']['description'] = 'Welchen Hostnamen hat der Server?';
|
$lng['serversettings']['hostname']['description'] = 'Welchen Hostnamen hat der Server?';
|
||||||
$lng['serversettings']['apachereload_command']['title'] = 'Webserver-Reload-Command';
|
$lng['serversettings']['apachereload_command']['title'] = 'Webserver-Reload-Command';
|
||||||
$lng['serversettings']['apachereload_command']['description'] = 'Wie heisst das Skript zum Neuladen der Webserver-Konfigurationsdateien?';
|
$lng['serversettings']['apachereload_command']['description'] = 'Wie heißt das Skript zum Neuladen der Webserver-Konfigurationsdateien?';
|
||||||
$lng['serversettings']['bindconf_directory']['title'] = 'Bind-Config-Directory';
|
$lng['serversettings']['bindconf_directory']['title'] = 'Bind-Config-Directory';
|
||||||
$lng['serversettings']['bindconf_directory']['description'] = 'Wo liegen die Bind-Konfigurationsdateien?';
|
$lng['serversettings']['bindconf_directory']['description'] = 'Wo liegen die Bind-Konfigurationsdateien?';
|
||||||
$lng['serversettings']['bindreload_command']['title'] = 'Bind-Reload-Command';
|
$lng['serversettings']['bindreload_command']['title'] = 'Bind-Reload-Command';
|
||||||
$lng['serversettings']['bindreload_command']['description'] = 'Wie heisst das Skript zum Neuladen der Bind-Konfigurationsdateien?';
|
$lng['serversettings']['bindreload_command']['description'] = 'Wie heißt das Skript zum Neuladen der Bind-Konfigurationsdateien?';
|
||||||
$lng['serversettings']['binddefaultzone']['title'] = 'Bind-Default-Zone';
|
$lng['serversettings']['binddefaultzone']['title'] = 'Bind-Default-Zone';
|
||||||
$lng['serversettings']['binddefaultzone']['description'] = 'Wie heißt die Default-Zone für alle Domains?';
|
$lng['serversettings']['binddefaultzone']['description'] = 'Wie heißt die Default-Zone für alle Domains?';
|
||||||
$lng['serversettings']['vmail_uid']['title'] = 'Mails-Uid';
|
$lng['serversettings']['vmail_uid']['title'] = 'Mails-Uid';
|
||||||
@@ -494,7 +496,7 @@ $lng['admin']['mailserversettings'] = 'Mailservereinstellungen';
|
|||||||
$lng['admin']['nameserversettings'] = 'Nameservereinstellungen';
|
$lng['admin']['nameserversettings'] = 'Nameservereinstellungen';
|
||||||
$lng['admin']['updatecounters'] = 'Ressourcenverbrauch';
|
$lng['admin']['updatecounters'] = 'Ressourcenverbrauch';
|
||||||
$lng['question']['admin_counters_reallyupdate'] = 'Wollen Sie den Ressourcenverbrauch neu berechnen?';
|
$lng['question']['admin_counters_reallyupdate'] = 'Wollen Sie den Ressourcenverbrauch neu berechnen?';
|
||||||
$lng['panel']['pathDescription'] = 'Wenn das Verzeichnis nicht existiert, wird es automatisch erstellt.';
|
$lng['panel']['pathDescription'] = 'Wenn das Verzeichnis nicht existiert, wird es automatisch erstellt.<br /><br />Sollte eine Weiterleitung auf eine andere Domain gewünscht sein, muss der Eintrag mit http:// oder https:// beginnen';
|
||||||
|
|
||||||
// ADDED IN 1.2.16-svn6
|
// ADDED IN 1.2.16-svn6
|
||||||
|
|
||||||
@@ -515,7 +517,7 @@ $lng['changepassword']['also_change_webalizer'] = ' Auch Passwort vom Webalizer
|
|||||||
// ADDED IN 1.2.16-svn8
|
// ADDED IN 1.2.16-svn8
|
||||||
|
|
||||||
$lng['serversettings']['mailpwcleartext']['title'] = 'Passwörter der Mail-Konten auch im Klartext in der Datenbank speichern';
|
$lng['serversettings']['mailpwcleartext']['title'] = 'Passwörter der Mail-Konten auch im Klartext in der Datenbank speichern';
|
||||||
$lng['serversettings']['mailpwcleartext']['description'] = 'Wenn diese Einstellung auf Ja gesetzt wird, werden alle Passwörter auch unverschlüsselt (also im Klartext, für jeden mit Zugriff auf die Froxlor-Datenbank sofort lesbar) in der mail_users-Tabelle gespeichert. Aktivieren Sie diese Option nur dann, wenn Sie sie wirklich gebrauchen!';
|
$lng['serversettings']['mailpwcleartext']['description'] = 'Wenn diese Einstellung auf Ja gesetzt wird, werden alle Passwörter auch unverschlüsselt (also im Klartext, für jeden mit Zugriff auf die Froxlor-Datenbank sofort lesbar) in der mail_users-Tabelle gespeichert. Aktivieren Sie diese Option nur dann, wenn Sie SASL nutzen!';
|
||||||
$lng['serversettings']['mailpwcleartext']['removelink'] = 'Klicken Sie hier, um alle unverschlüsselten Passwörter aus der Tabelle zu entfernen.';
|
$lng['serversettings']['mailpwcleartext']['removelink'] = 'Klicken Sie hier, um alle unverschlüsselten Passwörter aus der Tabelle zu entfernen.';
|
||||||
$lng['question']['admin_cleartextmailpws_reallywipe'] = 'Wollen Sie wirklich alle unverschlüsselten Passwörter aus der Tabelle mail_users entfernen? Dieser Schritt kann nicht rückgängig gemacht werden!';
|
$lng['question']['admin_cleartextmailpws_reallywipe'] = 'Wollen Sie wirklich alle unverschlüsselten Passwörter aus der Tabelle mail_users entfernen? Dieser Schritt kann nicht rückgängig gemacht werden!';
|
||||||
$lng['admin']['configfiles']['overview'] = 'Übersicht';
|
$lng['admin']['configfiles']['overview'] = 'Übersicht';
|
||||||
@@ -1334,8 +1336,7 @@ $lng['ftp']['account_edit'] = 'FTP Konto bearbeiten';
|
|||||||
$lng['ftp']['editpassdescription'] = 'Neues Passwort setzen oder leer für keine Änderung.';
|
$lng['ftp']['editpassdescription'] = 'Neues Passwort setzen oder leer für keine Änderung.';
|
||||||
$lng['customer']['sendinfomail'] = 'Daten per E-Mail an mich senden';
|
$lng['customer']['sendinfomail'] = 'Daten per E-Mail an mich senden';
|
||||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] Neue Datenbank erstellt';
|
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] Neue Datenbank erstellt';
|
||||||
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nDie Datenbank kann mit phpMyAdmin via {URI} verwaltet werden.\n";
|
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hallo {CUST_NAME},\n\ndu hast gerade eine neue Datenbank angelegt. Hier die angegebenen Informationen:\n\nDatenbankname: {DB_NAME}\nPasswort: {DB_PASS}\nBeschreibung: {DB_DESC}\nDatenbank-Server: {DB_SRV}\nphpMyAdmin: {PMA_URI}\nVielen Dank, das Froxlor-Team";
|
||||||
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hallo {CUST_NAME},\n\ndu hast gerade eine neue Datenbank angelegt. Hier die angegebenen Informationen:\n\nDatenbankname: {DB_NAME}\nPasswort: {DB_PASS}\nBeschreibung: {DB_DESC}\nDatenbank-Server: {DB_SRV}\n{PMA_URI}\nVielen Dank, das Froxlor-Team";
|
|
||||||
$lng['error']['domains_cantdeletedomainwithapsinstances'] = 'Sie können keine Domain löschen, die noch von APS Paketen verwendet wird. Löschen Sie zuerst alle installierten APS Pakete dieser Domain.';
|
$lng['error']['domains_cantdeletedomainwithapsinstances'] = 'Sie können keine Domain löschen, die noch von APS Paketen verwendet wird. Löschen Sie zuerst alle installierten APS Pakete dieser Domain.';
|
||||||
$lng['serversettings']['awstats_path'] = 'Pfad zu AWStats \'awstats_buildstaticpages.pl\'';
|
$lng['serversettings']['awstats_path'] = 'Pfad zu AWStats \'awstats_buildstaticpages.pl\'';
|
||||||
$lng['serversettings']['awstats_conf'] = 'AWStats Konfigurations-Pfad';
|
$lng['serversettings']['awstats_conf'] = 'AWStats Konfigurations-Pfad';
|
||||||
@@ -1434,4 +1435,50 @@ $lng['admin']['perlenabled'] = 'Perl verfügbar';
|
|||||||
$lng['serversettings']['perl_path']['title'] = 'Pfad zu Perl';
|
$lng['serversettings']['perl_path']['title'] = 'Pfad zu Perl';
|
||||||
$lng['serversettings']['perl_path']['description'] = 'Nur nötig für lighttpd-Nutzer. Standard ist /usr/bin/perl';
|
$lng['serversettings']['perl_path']['description'] = 'Nur nötig für lighttpd-Nutzer. Standard ist /usr/bin/perl';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.12-svn1
|
||||||
|
$lng['admin']['fcgid_settings'] = 'FCGID';
|
||||||
|
$lng['serversettings']['mod_fcgid_ownvhost']['title'] = 'Verwende FCGID im Froxlor Vhost';
|
||||||
|
$lng['serversettings']['mod_fcgid_ownvhost']['description'] = 'Wenn verwendet, wird Froxlor selbst unter einem lokalem Benutzer ausgeführt<br /><strong>ACHTUNG:</strong>Hierzu müssen noch zusätzliche Konfigurationen vorgenommen werden, siehe <a href="http://wiki.froxlor.org/contrib/fcgid-handbook">http://wiki.froxlor.org/contrib/fcgid-handbook</a>';
|
||||||
|
$lng['admin']['mod_fcgid_user'] = 'Lokaler Benutzer für FCGID (Froxlor Vhost)';
|
||||||
|
$lng['admin']['mod_fcgid_group'] = 'Lokale Gruppe für FCGID (Froxlor Vhost)';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.12-svn2
|
||||||
|
$lng['admin']['perl_settings'] = 'Perl/CGI';
|
||||||
|
$lng['serversettings']['perl']['suexecworkaround']['title'] = 'Aktiviere SuExec Workaround (nur für Apache)';
|
||||||
|
$lng['serversettings']['perl']['suexecworkaround']['description'] = 'Aktivieren Sie den Workaround nur, wenn die Kunden-Heimatverzeichnise sich nicht unterhalb des suexec-Pfades liegen.<br />Wenn aktiviert erstellt Froxlor eine Verknüpfung des vom Kunden für Perl aktiviertem Pfad + /cgi-bin/ im angegebenen suexec-Pfad.<br />Bitte beachten Sie, dass Perl dann nur im Unterordner /cgi-bin/ des Kunden-Ordners funktioniert und nicht direkt in diesem Ordner (wie es ohne den Workaround wäre!)';
|
||||||
|
$lng['serversettings']['perl']['suexeccgipath']['title'] = 'Pfad für Verknüpfungen zu Kunden-Perl-Verzeichnis';
|
||||||
|
$lng['serversettings']['perl']['suexeccgipath']['description'] = 'Diese Einstellung wird nur benötigt, wenn der SuExec-Workaround aktiviert ist.<br />ACHTUNG: Stellen Sie sicher, dass sich der angegebene Pfad innerhalb des Suexec-Pfades befindet ansonsten ist der Workaround nutzlos';
|
||||||
|
$lng['panel']['descriptionerrordocument'] = 'Mögliche Werte sind: URL, Pfad zu einer Datei oder ein Text umgeben von Anführungszeichen (" ")<br />Leer für Server-Standardwerd.';
|
||||||
|
$lng['error']['stringerrordocumentnotvalidforlighty'] = 'Ein Text als Fehlerdokument funktioniert leider in LigHTTPd nicht, bitte geben Sie einen Pfad zu einer Datei an';
|
||||||
|
$lng['error']['urlerrordocumentnotvalidforlighty'] = 'Eine URL als Fehlerdokument funktioniert leider in LigHTTPd nicht, bitte geben Sie einen Pfad zu einer Datei an';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.12-svn3
|
||||||
|
$lng['question']['remove_subbutmain_domains'] = 'Auch Domains entfernen, welche als volle Domains hinzugefügt wurden, aber Subdomains von dieser Domain sind?';
|
||||||
|
$lng['domains']['issubof'] = 'Diese Domain ist eine Subdomain von der Domain';
|
||||||
|
$lng['domains']['issubofinfo'] = 'Diese Einstellung muss gesetzt werden, wenn Sie eine Subdomain einer Hauptdomain als Hauptdomain anlegen (z.B. soll "www.domain.tld" hinzugefügt werden, somit muss hier "domain.tld" ausgewählt werden)';
|
||||||
|
$lng['domains']['nosubtomaindomain'] = 'Keine Subdomain einer Hauptdomain';
|
||||||
|
$lng['admin']['templates']['new_database_by_customer'] = 'Kunden-Benachrichtigungs nach Erstellung einer neuen Datenbank';
|
||||||
|
$lng['admin']['templates']['new_ftpaccount_by_customer'] = 'Kunden-Benachrichtigung nach Erstellung eines neuen FTP-Benutzers';
|
||||||
|
$lng['admin']['templates']['newdatabase'] = 'Benachrichtigungs-Mails für neue Datenbank';
|
||||||
|
$lng['admin']['templates']['newftpuser'] = 'Benachrichtigungs-Mails für neuen FTP-Benutzer';
|
||||||
|
$lng['admin']['templates']['CUST_NAME'] = 'Kundenname';
|
||||||
|
$lng['admin']['templates']['DB_NAME'] = 'Datenbankname';
|
||||||
|
$lng['admin']['templates']['DB_PASS'] = 'Datenbankpasswort';
|
||||||
|
$lng['admin']['templates']['DB_DESC'] = 'Datenbankbeschreibung';
|
||||||
|
$lng['admin']['templates']['DB_SRV'] = 'Datenbankserver';
|
||||||
|
$lng['admin']['templates']['PMA_URI'] = 'URL zu phpMyAdmin (wenn angegeben)';
|
||||||
|
$lng['admin']['notgiven'] = '[nicht angegeben]';
|
||||||
|
$lng['admin']['templates']['USR_NAME'] = 'FTP Benutzername';
|
||||||
|
$lng['admin']['templates']['USR_PASS'] = 'FTP Passwort';
|
||||||
|
$lng['admin']['templates']['USR_PATH'] = 'FTP Heimatverzeichnis (relativ zum Kunden-Heimatverzeichnis)';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.12-svn4
|
||||||
|
$lng['serversettings']['awstats_awstatspath'] = 'Pfad zu AWStats \'awstats.pl\'';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.12-svn6
|
||||||
|
$lng['extras']['htpasswdauthname'] = 'Authentifizierungs-Grund (AuthName)';
|
||||||
|
$lng['extras']['directoryprotection_edit'] = 'Verzeichnisschutz bearbeiten';
|
||||||
|
$lng['admin']['templates']['forgotpwd'] = 'Benachrichtigungs-Mails bei Zurücksetzen des Passworts';
|
||||||
|
$lng['admin']['templates']['password_reset'] = 'Kunden-Benachrichtigung nach Zurücksetzen des Passworts';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -21,45 +21,33 @@
|
|||||||
* @todo skip mail parsing after x bytes for large mails
|
* @todo skip mail parsing after x bytes for large mails
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$mail = new PHPMailer();
|
$mail = new PHPMailer(true);
|
||||||
|
|
||||||
//dont do anything when module is disabled
|
//dont do anything when module is disabled
|
||||||
|
|
||||||
if((int)$settings['autoresponder']['autoresponder_active'] == 0)
|
if((int)$settings['autoresponder']['autoresponder_active'] == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//only send autoresponder to mails which were delivered since last run
|
//only send autoresponder to mails which were delivered since last run
|
||||||
|
|
||||||
if((int)$settings['autoresponder']['last_autoresponder_run'] == 0)
|
if((int)$settings['autoresponder']['last_autoresponder_run'] == 0)
|
||||||
{
|
{
|
||||||
//mails from last 5 minutes, otherwise all mails will be parsed -> mailbomb prevention
|
//mails from last 5 minutes, otherwise all mails will be parsed -> mailbomb prevention
|
||||||
|
|
||||||
$cycle = 300;
|
$cycle = 300;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// calculate seconds since last check
|
||||||
$cycle = time() - (int)$settings['autoresponder']['last_autoresponder_run'];
|
$cycle = time() - (int)$settings['autoresponder']['last_autoresponder_run'];
|
||||||
|
|
||||||
//prevent mailbombs when cycle is bigger than two days
|
//prevent mailbombs when cycle is bigger than two days
|
||||||
|
|
||||||
if($cycle > (2 * 60 * 60 * 24))$cycle = (60 * 60 * 24);
|
if($cycle > (2 * 60 * 60 * 24))$cycle = (60 * 60 * 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set last_autoresponder_run
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . (int)time() . "' WHERE `settinggroup` = 'autoresponder' AND `varname` = 'last_autoresponder_run'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . (int)time() . "' WHERE `settinggroup` = 'autoresponder' AND `varname` = 'last_autoresponder_run'");
|
||||||
|
|
||||||
/*
|
// get all customer set ip autoresponders
|
||||||
//can be used for later usage if autoresponders should be only active in a defined period
|
|
||||||
|
|
||||||
//This query has to disable every autoresponder entry which ended in the past
|
|
||||||
$db->query("UPDATE `autoresponder` SET `enabled` = 0 WHERE `to` < CURDATE()");
|
|
||||||
|
|
||||||
//This query has to activate every autoresponder entry which starts today
|
|
||||||
$db->query("UPDATE `autoresponder` SET `enabled` = 1 WHERE `from` = CURDATE()");
|
|
||||||
*/
|
|
||||||
//getting all mailboxes where autoresponders are active and configured
|
|
||||||
|
|
||||||
$result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` INNER JOIN `" . TABLE_MAIL_USERS . "` ON `" . TABLE_MAIL_AUTORESPONDER . "`.`email` = `" . TABLE_MAIL_USERS . "`.`email` WHERE `enabled` = 1");
|
$result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` INNER JOIN `" . TABLE_MAIL_USERS . "` ON `" . TABLE_MAIL_AUTORESPONDER . "`.`email` = `" . TABLE_MAIL_USERS . "`.`email` WHERE `enabled` = 1");
|
||||||
|
|
||||||
if($db->num_rows($result) > 0)
|
if($db->num_rows($result) > 0)
|
||||||
@@ -78,31 +66,40 @@ if($db->num_rows($result) > 0)
|
|||||||
// already ended
|
// already ended
|
||||||
if($ts_end != -1 && $ts_end < $ts_now) continue;
|
if($ts_end != -1 && $ts_end < $ts_now) continue;
|
||||||
|
|
||||||
|
// setup mail-path (e.g. /var/customers/mail/[loginname]/[user@domain.tld]/new
|
||||||
$path = $row['homedir'] . $row['maildir'] . "new/";
|
$path = $row['homedir'] . $row['maildir'] . "new/";
|
||||||
|
|
||||||
|
// if the directory does not exist, inform syslog
|
||||||
if(!is_dir($path))
|
if(!is_dir($path))
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error accessing maildir: " . $path);
|
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error accessing maildir: " . $path);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$files = scandir($path);
|
// get all files
|
||||||
foreach($files as $entry)
|
$its = new RecursiveIteratorIterator(
|
||||||
|
new RecursiveDirectoryIterator($path)
|
||||||
|
);
|
||||||
|
|
||||||
|
$responded_counter = 0;
|
||||||
|
foreach ($its as $fullFilename => $it )
|
||||||
{
|
{
|
||||||
if($entry == '.'
|
if($it->getFilename() == '.' || $it->getFilename() == '..')
|
||||||
|| $entry == '..')continue;
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* is the time passed between now and
|
* is the time passed between now and
|
||||||
* the time we received the mail lower/equal
|
* the time we received the mail lower/equal
|
||||||
* than our cycle-seconds?
|
* than our cycle-seconds?
|
||||||
*/
|
*/
|
||||||
if(time() - filemtime($path . $entry) <= $cycle)
|
$filemtime = $it->getMTime();
|
||||||
|
if(time() - $filemtime <= $cycle)
|
||||||
{
|
{
|
||||||
$content = file($path . $entry);
|
$content = file($fullFilename);
|
||||||
|
|
||||||
//error reading mail contents
|
|
||||||
|
|
||||||
|
// error reading mail contents or just empty
|
||||||
if(count($content) == 0)
|
if(count($content) == 0)
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Unable to read mail from maildir: " . $entry);
|
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Unable to read mail from maildir: " . $entry);
|
||||||
@@ -117,53 +114,48 @@ if($db->num_rows($result) > 0)
|
|||||||
foreach($content as $line)
|
foreach($content as $line)
|
||||||
{
|
{
|
||||||
// header ends on first empty line, skip rest of mail
|
// header ends on first empty line, skip rest of mail
|
||||||
|
|
||||||
if(strlen(rtrim($line)) == 0)
|
if(strlen(rtrim($line)) == 0)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//fetching from field
|
//fetching from field
|
||||||
|
|
||||||
if(!strlen($from)
|
if(!strlen($from)
|
||||||
&& preg_match("/^From:(.+)<(.*)>$/", $line, $match))
|
&& preg_match("/^From:(.+)<(.*)>$/", $line, $match)
|
||||||
{
|
) {
|
||||||
$from = $match[2];
|
$from = $match[2];
|
||||||
}
|
}
|
||||||
elseif(!strlen($from)
|
elseif(!strlen($from)
|
||||||
&& preg_match("/^From:\s+(.*@.*)$/", $line, $match))
|
&& preg_match("/^From:\s+(.*@.*)$/", $line, $match)
|
||||||
{
|
) {
|
||||||
$from = $match[1];
|
$from = $match[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
//fetching to field
|
//fetching to field
|
||||||
|
|
||||||
if(!strlen($to)
|
if(!strlen($to)
|
||||||
&& preg_match("/^To:(.+)<(.*)>$/", $line, $match))
|
&& preg_match("/^To:(.+)<(.*)>$/", $line, $match)
|
||||||
{
|
) {
|
||||||
$to = $match[2];
|
$to = $match[2];
|
||||||
}
|
}
|
||||||
elseif(!strlen($to)
|
elseif(!strlen($to)
|
||||||
&& preg_match("/To:\s+(.*@.*)$/", $line, $match))
|
&& preg_match("/To:\s+(.*@.*)$/", $line, $match)
|
||||||
{
|
) {
|
||||||
$to = $match[1];
|
$to = $match[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
//fetching sender field
|
//fetching sender field
|
||||||
|
|
||||||
if(!strlen($to)
|
if(!strlen($to)
|
||||||
&& preg_match("/^Sender:(.+)<(.*)>$/", $line, $match))
|
&& preg_match("/^Sender:(.+)<(.*)>$/", $line, $match)
|
||||||
{
|
) {
|
||||||
$sender = $match[2];
|
$sender = $match[2];
|
||||||
}
|
}
|
||||||
elseif(!strlen($to)
|
elseif(!strlen($to)
|
||||||
&& preg_match("/Sender:\s+(.*@.*)$/", $line, $match))
|
&& preg_match("/Sender:\s+(.*@.*)$/", $line, $match)
|
||||||
{
|
) {
|
||||||
$sender = $match[1];
|
$sender = $match[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
//check for amavis/spamassassin spam headers
|
//check for amavis/spamassassin spam headers
|
||||||
|
|
||||||
if(preg_match("/^X-Spam-Status: (Yes|No)(.*)$/", $line, $match))
|
if(preg_match("/^X-Spam-Status: (Yes|No)(.*)$/", $line, $match))
|
||||||
{
|
{
|
||||||
if($match[1] == 'Yes')$spam = true;
|
if($match[1] == 'Yes')$spam = true;
|
||||||
@@ -178,13 +170,13 @@ if($db->num_rows($result) > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//skip mail when marked as spam
|
//skip mail when marked as spam
|
||||||
|
if($spam == true)
|
||||||
if($spam == true)continue;
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
//error while parsing mail
|
//error while parsing mail
|
||||||
|
if($to == '' || $from == '')
|
||||||
if($to == ''
|
|
||||||
|| $from == '')
|
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "No valid headers found in mail to parse: " . $entry);
|
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "No valid headers found in mail to parse: " . $entry);
|
||||||
continue;
|
continue;
|
||||||
@@ -193,15 +185,15 @@ if($db->num_rows($result) > 0)
|
|||||||
//important! prevent mailbombs when mail comes from a maildaemon/mailrobot
|
//important! prevent mailbombs when mail comes from a maildaemon/mailrobot
|
||||||
//robot/daemon mails must go to Sender: field in envelope header
|
//robot/daemon mails must go to Sender: field in envelope header
|
||||||
//refers to "Das Postfix-Buch" / RFC 2822
|
//refers to "Das Postfix-Buch" / RFC 2822
|
||||||
|
if($sender != '')
|
||||||
if($sender != '')$from = $sender;
|
{
|
||||||
|
$from = $sender;
|
||||||
|
}
|
||||||
|
|
||||||
//make message valid to email format
|
//make message valid to email format
|
||||||
|
|
||||||
$message = str_replace("\r\n", "\n", $row['message']);
|
$message = str_replace("\r\n", "\n", $row['message']);
|
||||||
|
|
||||||
//check if mail is already an answer
|
//check if mail is already an answer
|
||||||
|
|
||||||
$fullcontent = implode("", $content);
|
$fullcontent = implode("", $content);
|
||||||
|
|
||||||
if(strstr($fullcontent, $message))
|
if(strstr($fullcontent, $message))
|
||||||
@@ -232,9 +224,9 @@ if($db->num_rows($result) > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$mail->ClearAddresses();
|
$mail->ClearAddresses();
|
||||||
|
$responded_counter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Responded to '" . $responded_counter . "' mails from '".$path."'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -207,6 +207,30 @@ class apache
|
|||||||
$this->virtualhosts_data[$vhosts_filename].= ' ServerName ' . $this->settings['system']['hostname'] . "\n";
|
$this->virtualhosts_data[$vhosts_filename].= ' ServerName ' . $this->settings['system']['hostname'] . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// create fcgid <Directory>-Part (starter is created in apache_fcgid)
|
||||||
|
if($this->settings['system']['mod_fcgid_ownvhost'] == '1')
|
||||||
|
{
|
||||||
|
|
||||||
|
$configdir = makeCorrectDir($this->settings['system']['mod_fcgid_configdir'] . '/froxlor.panel/');
|
||||||
|
if((int)$this->settings['system']['mod_fcgid_wrapper'] == 0)
|
||||||
|
{
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= ' SuexecUserGroup "' . $this->settings['system']['mod_fcgid_httpuser'] . '" "' . $this->settings['system']['mod_fcgid_httpgroup'] . '"' . "\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= ' ScriptAlias /php/ ' . $configdir . "\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$starter_filename = makeCorrectFile($configdir . '/php-fcgi-starter');
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= ' SuexecUserGroup "' . $this->settings['system']['mod_fcgid_httpuser'] . '" "' . $this->settings['system']['mod_fcgid_httpgroup'] . '"' . "\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= ' <Directory "' . $mypath . '">' . "\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= ' AddHandler fcgid-script .php' . "\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= ' FCGIWrapper ' . $starter_filename . ' .php' . "\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= ' Options +ExecCGI' . "\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= ' Order allow,deny' . "\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= ' allow from all' . "\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= ' </Directory>' . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dirprotection, see #72
|
* dirprotection, see #72
|
||||||
* @TODO deferred until 0.9.5, needs more testing
|
* @TODO deferred until 0.9.5, needs more testing
|
||||||
@@ -328,6 +352,10 @@ class apache
|
|||||||
return $php_options_text;
|
return $php_options_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function createOwnVhostStarter()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We collect all servernames and Aliases
|
* We collect all servernames and Aliases
|
||||||
*/
|
*/
|
||||||
@@ -572,8 +600,15 @@ class apache
|
|||||||
|
|
||||||
protected function getVhostFilename($domain, $ssl_vhost = false)
|
protected function getVhostFilename($domain, $ssl_vhost = false)
|
||||||
{
|
{
|
||||||
if((int)$domain['parentdomainid'] == 0)
|
if((int)$domain['parentdomainid'] == 0
|
||||||
{
|
&& ((int)$domain['ismainbutsubto'] == 0
|
||||||
|
|| domainMainToSubExists($domain['ismainbutsubto']) == false)
|
||||||
|
) {
|
||||||
|
$vhost_no = '22';
|
||||||
|
}
|
||||||
|
elseif((int)$domain['parentdomainid'] == 0
|
||||||
|
&& (int)$domain['ismainbutsubto'] > 0
|
||||||
|
) {
|
||||||
$vhost_no = '21';
|
$vhost_no = '21';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -868,6 +903,51 @@ class apache
|
|||||||
$this->diroptions_data[$diroptions_filename].= ' Order allow,deny' . "\n";
|
$this->diroptions_data[$diroptions_filename].= ' Order allow,deny' . "\n";
|
||||||
$this->diroptions_data[$diroptions_filename].= ' Allow from all' . "\n";
|
$this->diroptions_data[$diroptions_filename].= ' Allow from all' . "\n";
|
||||||
fwrite($this->debugHandler, ' cron_tasks: Task3 - Enabling perl execution' . "\n");
|
fwrite($this->debugHandler, ' cron_tasks: Task3 - Enabling perl execution' . "\n");
|
||||||
|
|
||||||
|
// check for suexec-workaround, #319
|
||||||
|
if((int)$this->settings['perl']['suexecworkaround'] == 1)
|
||||||
|
{
|
||||||
|
// symlink this directory to suexec-safe-path
|
||||||
|
$loginname = getCustomerDetail($row_diroptions['customerid'], 'loginname');
|
||||||
|
$suexecpath = makeCorrectDir($this->settings['perl']['suexecpath'].'/'.$loginname.'/'.md5($row_diroptions['path']).'/');
|
||||||
|
|
||||||
|
if(!file_exists($suexecpath))
|
||||||
|
{
|
||||||
|
safe_exec('mkdir -p '.escapeshellarg($suexecpath));
|
||||||
|
safe_exec('chown -R '.escapeshellarg($row_diroptions['guid']).':'.escapeshellarg($row_diroptions['guid']).' '.escapeshellarg($suexecpath));
|
||||||
|
}
|
||||||
|
|
||||||
|
// symlink to {$givenpath}/cgi-bin
|
||||||
|
// NOTE: symlinks are FILES, so do not append a / here
|
||||||
|
$perlsymlink = makeCorrectFile($row_diroptions['path'].'/cgi-bin');
|
||||||
|
if(!file_exists($perlsymlink))
|
||||||
|
{
|
||||||
|
safe_exec('ln -s '.escapeshellarg($suexecpath).' '.escapeshellarg($perlsymlink));
|
||||||
|
}
|
||||||
|
safe_exec('chown '.escapeshellarg($row_diroptions['guid']).':'.escapeshellarg($row_diroptions['guid']).' '.escapeshellarg($perlsymlink));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if no perl-execution is enabled but the workaround is,
|
||||||
|
// we have to remove the symlink and folder in suexecpath
|
||||||
|
if((int)$this->settings['perl']['suexecworkaround'] == 1)
|
||||||
|
{
|
||||||
|
$loginname = getCustomerDetail($row_diroptions['customerid'], 'loginname');
|
||||||
|
$suexecpath = makeCorrectDir($this->settings['perl']['suexecpath'].'/'.$loginname.'/'.md5($row_diroptions['path']).'/');
|
||||||
|
$perlsymlink = makeCorrectFile($row_diroptions['path'].'/cgi-bin');
|
||||||
|
|
||||||
|
// remove symlink
|
||||||
|
if(file_exists($perlsymlink))
|
||||||
|
{
|
||||||
|
safe_exec('rm -f '.escapeshellarg($perlsymlink));
|
||||||
|
}
|
||||||
|
// remove folder in suexec-path
|
||||||
|
if(file_exists($suexecpath))
|
||||||
|
{
|
||||||
|
safe_exec('rm -rf '.escapeshellarg($suexecpath));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($row_diroptions['htpasswds']) > 0)
|
if(count($row_diroptions['htpasswds']) > 0)
|
||||||
@@ -885,7 +965,7 @@ class apache
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->diroptions_data[$diroptions_filename].= ' AuthType Basic' . "\n";
|
$this->diroptions_data[$diroptions_filename].= ' AuthType Basic' . "\n";
|
||||||
$this->diroptions_data[$diroptions_filename].= ' AuthName "Restricted Area"' . "\n";
|
$this->diroptions_data[$diroptions_filename].= ' AuthName "'.$row_htpasswd['authname'].'"' . "\n";
|
||||||
$this->diroptions_data[$diroptions_filename].= ' AuthUserFile ' . $htpasswd_filename . "\n";
|
$this->diroptions_data[$diroptions_filename].= ' AuthUserFile ' . $htpasswd_filename . "\n";
|
||||||
$this->diroptions_data[$diroptions_filename].= ' require valid-user' . "\n";
|
$this->diroptions_data[$diroptions_filename].= ' require valid-user' . "\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ class apache_fcgid extends apache
|
|||||||
|
|
||||||
if(file_exists($starter_filename))
|
if(file_exists($starter_filename))
|
||||||
{
|
{
|
||||||
safe_exec('chattr -i ' . escapeshellarg($starter_filename));
|
removeImmutable($starter_filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
$starter_file_handler = fopen($starter_filename, 'w');
|
$starter_file_handler = fopen($starter_filename, 'w');
|
||||||
@@ -157,7 +157,7 @@ class apache_fcgid extends apache
|
|||||||
fclose($starter_file_handler);
|
fclose($starter_file_handler);
|
||||||
safe_exec('chmod 750 ' . escapeshellarg($starter_filename));
|
safe_exec('chmod 750 ' . escapeshellarg($starter_filename));
|
||||||
safe_exec('chown ' . $domain['guid'] . ':' . $domain['guid'] . ' ' . escapeshellarg($starter_filename));
|
safe_exec('chown ' . $domain['guid'] . ':' . $domain['guid'] . ' ' . escapeshellarg($starter_filename));
|
||||||
safe_exec('chattr +i ' . escapeshellarg($starter_filename));
|
setImmutable($starter_filename);
|
||||||
|
|
||||||
// define the php.ini
|
// define the php.ini
|
||||||
|
|
||||||
@@ -278,6 +278,89 @@ class apache_fcgid extends apache
|
|||||||
|
|
||||||
return $this->admin_cache[$adminid];
|
return $this->admin_cache[$adminid];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function createOwnVhostStarter()
|
||||||
|
{
|
||||||
|
if ($this->settings['system']['mod_fcgid_ownvhost'] == '1')
|
||||||
|
{
|
||||||
|
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__)))); // /var/www/froxlor, needed for chown
|
||||||
|
$configdir = makeCorrectDir($this->settings['system']['mod_fcgid_configdir'] . '/froxlor.panel/');
|
||||||
|
$starter_filename = makeCorrectFile($configdir . '/php-fcgi-starter');
|
||||||
|
$tmpdir = makeCorrectDir($this->settings['system']['mod_fcgid_tmpdir'] . '/froxlor.panel/');
|
||||||
|
|
||||||
|
$user = $this->settings['system']['mod_fcgid_httpuser'];
|
||||||
|
$group = $this->settings['system']['mod_fcgid_httpgroup'];
|
||||||
|
|
||||||
|
// all the files and folders have to belong to the local user
|
||||||
|
// now because we also use fcgid for our own vhost
|
||||||
|
safe_exec('chown -R ' . $user . ':' . $group . ' ' . escapeshellarg($mypath));
|
||||||
|
|
||||||
|
// create config dir if necessary
|
||||||
|
if(!is_dir($configdir))
|
||||||
|
{
|
||||||
|
safe_exec('mkdir -p ' . escapeshellarg($configdir));
|
||||||
|
safe_exec('chown ' . $user . ':' . $group . ' ' . escapeshellarg($configdir));
|
||||||
|
}
|
||||||
|
|
||||||
|
// create tmp dir if necessary
|
||||||
|
if(!is_dir($tmpdir))
|
||||||
|
{
|
||||||
|
safe_exec('mkdir -p ' . escapeshellarg($tmpdir));
|
||||||
|
safe_exec('chown -R ' . $user . ':' . $group . ' ' . escapeshellarg($tmpdir));
|
||||||
|
safe_exec('chmod 0750 ' . escapeshellarg($tmpdir));
|
||||||
|
}
|
||||||
|
|
||||||
|
// we only need this for some basic, no special parameters that
|
||||||
|
// would require to maybe allow selecting a specific php.ini
|
||||||
|
// because we only need the binary and spawning parameters
|
||||||
|
$phpconfig = $this->getPhpConfig(0);
|
||||||
|
|
||||||
|
// create starter
|
||||||
|
$starter_file = "#!/bin/sh\n\n";
|
||||||
|
$starter_file.= "#\n";
|
||||||
|
$starter_file.= "# starter created/changed on " . date("Y.m.d H:i:s") . " for the Froxlor vhost\n";
|
||||||
|
$starter_file.= "# Do not change anything in this file, it will be overwritten by the Froxlor Cronjob!\n";
|
||||||
|
$starter_file.= "#\n\n";
|
||||||
|
$starter_file.= "umask 022\n";
|
||||||
|
$starter_file.= "PHPRC=" . escapeshellarg($configdir) . "\n";
|
||||||
|
$starter_file.= "export PHPRC\n";
|
||||||
|
if((int)$phpconfig['mod_fcgid_starter'] != - 1)
|
||||||
|
{
|
||||||
|
$starter_file.= "PHP_FCGI_CHILDREN=" . (int)$phpconfig['mod_fcgid_starter'] . "\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$starter_file.= "PHP_FCGI_CHILDREN=" . (int)$this->settings['system']['mod_fcgid_starter'] . "\n";
|
||||||
|
}
|
||||||
|
$starter_file.= "export PHP_FCGI_CHILDREN\n";
|
||||||
|
if((int)$phpconfig['mod_fcgid_maxrequests'] != - 1)
|
||||||
|
{
|
||||||
|
$starter_file.= "PHP_FCGI_MAX_REQUESTS=" . (int)$phpconfig['mod_fcgid_maxrequests'] . "\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$starter_file.= "PHP_FCGI_MAX_REQUESTS=" . (int)$this->settings['system']['mod_fcgid_maxrequests'] . "\n";
|
||||||
|
}
|
||||||
|
$starter_file.= "export PHP_FCGI_MAX_REQUESTS\n";
|
||||||
|
|
||||||
|
// Set Binary
|
||||||
|
$starter_file.= "exec " . $phpconfig['binary'] . " -c " . escapeshellarg($configdir) . "\n";
|
||||||
|
|
||||||
|
//remove +i attibute, so starter can be overwritten
|
||||||
|
if(file_exists($starter_filename))
|
||||||
|
{
|
||||||
|
removeImmutable($starter_filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
$starter_file_handler = fopen($starter_filename, 'w');
|
||||||
|
fwrite($starter_file_handler, $starter_file);
|
||||||
|
fclose($starter_file_handler);
|
||||||
|
safe_exec('chmod 750 ' . escapeshellarg($starter_filename));
|
||||||
|
safe_exec('chown ' . $user . ':' . $group . ' ' . escapeshellarg($starter_filename));
|
||||||
|
setImmutable($starter_filename);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ class lighttpd
|
|||||||
$htaccess_text.= ' "' . $htaccess_path . '" =>' . "\n";
|
$htaccess_text.= ' "' . $htaccess_path . '" =>' . "\n";
|
||||||
$htaccess_text.= ' (' . "\n";
|
$htaccess_text.= ' (' . "\n";
|
||||||
$htaccess_text.= ' "method" => "basic",' . "\n";
|
$htaccess_text.= ' "method" => "basic",' . "\n";
|
||||||
$htaccess_text.= ' "realm" => "Restricted Area",' . "\n";
|
$htaccess_text.= ' "realm" => "'.$row_htpasswds['authname'].'",' . "\n";
|
||||||
$htaccess_text.= ' "require" => "valid-user"' . "\n";
|
$htaccess_text.= ' "require" => "valid-user"' . "\n";
|
||||||
$htaccess_text.= ' )' . "\n";
|
$htaccess_text.= ' )' . "\n";
|
||||||
$htaccess_text.= ' )' . "\n";
|
$htaccess_text.= ' )' . "\n";
|
||||||
@@ -244,6 +244,10 @@ class lighttpd
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function createOwnVhostStarter()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
protected function createLighttpdHosts($ip, $port, $ssl, $vhost_filename)
|
protected function createLighttpdHosts($ip, $port, $ssl, $vhost_filename)
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM " . TABLE_PANEL_IPSANDPORTS . " WHERE `ip`='" . $ip . "' AND `port`='" . $port . "'";
|
$query = "SELECT * FROM " . TABLE_PANEL_IPSANDPORTS . " WHERE `ip`='" . $ip . "' AND `port`='" . $port . "'";
|
||||||
@@ -274,8 +278,19 @@ class lighttpd
|
|||||||
$_pos = strrpos($_tmp_path, '/');
|
$_pos = strrpos($_tmp_path, '/');
|
||||||
$_inc_path = substr($_tmp_path, $_pos+1);
|
$_inc_path = substr($_tmp_path, $_pos+1);
|
||||||
|
|
||||||
if((int)$domain['parentdomainid'] == 0)
|
if((int)$domain['parentdomainid'] == 0
|
||||||
|
&& ((int)$domain['ismainbutsubto'] == 0
|
||||||
|
|| domainMainToSubExists($domain['ismainbutsubto']) == false)
|
||||||
|
) {
|
||||||
|
$vhost_no = '52';
|
||||||
|
if($ssl == '1')
|
||||||
{
|
{
|
||||||
|
$vhost_no = '62';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif((int)$domain['parentdomainid'] == 0
|
||||||
|
&& (int)$domain['ismainbutsubto'] > 0
|
||||||
|
) {
|
||||||
$vhost_no = '51';
|
$vhost_no = '51';
|
||||||
if($ssl == '1')
|
if($ssl == '1')
|
||||||
{
|
{
|
||||||
@@ -591,7 +606,7 @@ class lighttpd
|
|||||||
$diroption_text.= '"' . $row_htpasswds['path'] . '" =>' . "\n";
|
$diroption_text.= '"' . $row_htpasswds['path'] . '" =>' . "\n";
|
||||||
$diroption_text.= '(' . "\n";
|
$diroption_text.= '(' . "\n";
|
||||||
$diroption_text.= ' "method" => "basic",' . "\n";
|
$diroption_text.= ' "method" => "basic",' . "\n";
|
||||||
$diroption_text.= ' "realm" => "Restricted Area",' . "\n";
|
$diroption_text.= ' "realm" => "'.$row_htpasswds['authname'].'",' . "\n";
|
||||||
$diroption_text.= ' "require" => "valid-user"' . "\n";
|
$diroption_text.= ' "require" => "valid-user"' . "\n";
|
||||||
$diroption_text.= ')' . "\n";
|
$diroption_text.= ')' . "\n";
|
||||||
|
|
||||||
@@ -612,7 +627,7 @@ class lighttpd
|
|||||||
protected function getServerNames($domain)
|
protected function getServerNames($domain)
|
||||||
{
|
{
|
||||||
$server_string = array();
|
$server_string = array();
|
||||||
$domain_name = ereg_replace('\.', '\.', $domain['domain']);
|
$domain_name = str_replace('.', '\.', $domain['domain']);
|
||||||
|
|
||||||
if($domain['iswildcarddomain'] == '1')
|
if($domain['iswildcarddomain'] == '1')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ class lighttpd_fcgid extends lighttpd
|
|||||||
|
|
||||||
if(file_exists($starter_filename))
|
if(file_exists($starter_filename))
|
||||||
{
|
{
|
||||||
safe_exec('chattr -i ' . escapeshellarg($starter_filename));
|
removeImmutable($starter_filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
$starter_file_handler = fopen($starter_filename, 'w');
|
$starter_file_handler = fopen($starter_filename, 'w');
|
||||||
@@ -181,7 +181,7 @@ class lighttpd_fcgid extends lighttpd
|
|||||||
fclose($starter_file_handler);
|
fclose($starter_file_handler);
|
||||||
safe_exec('chmod 750 ' . escapeshellarg($starter_filename));
|
safe_exec('chmod 750 ' . escapeshellarg($starter_filename));
|
||||||
safe_exec('chown ' . $domain['guid'] . ':' . $domain['guid'] . ' ' . escapeshellarg($starter_filename));
|
safe_exec('chown ' . $domain['guid'] . ':' . $domain['guid'] . ' ' . escapeshellarg($starter_filename));
|
||||||
safe_exec('chattr +i ' . escapeshellarg($starter_filename));
|
setImmutable($starter_filename);
|
||||||
|
|
||||||
// define the php.ini
|
// define the php.ini
|
||||||
|
|
||||||
|
|||||||
@@ -75,8 +75,7 @@ while($row = $db->fetch_array($result_tasks))
|
|||||||
$awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r');
|
$awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r');
|
||||||
$awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1);
|
$awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1);
|
||||||
fclose($awstatsclean['fh']);
|
fclose($awstatsclean['fh']);
|
||||||
if($awstatsclean['headerRead'] == $awstatsclean['header'] || $awstatsclean['headerRead'] ==
|
if($awstatsclean['headerRead'] == $awstatsclean['header'] || $awstatsclean['headerRead'] == $awstatsclean['headerold']) {
|
||||||
$awstatsclean['headerold']) {
|
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Removing awstats configuration ".$awstatsclean['fullentry']." for re-creation");
|
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Removing awstats configuration ".$awstatsclean['fullentry']." for re-creation");
|
||||||
@unlink($awstatsclean['fullentry']);
|
@unlink($awstatsclean['fullentry']);
|
||||||
}
|
}
|
||||||
@@ -91,6 +90,34 @@ $awstatsclean['headerold']) {
|
|||||||
}
|
}
|
||||||
//end dhr
|
//end dhr
|
||||||
|
|
||||||
|
// clear fcgid - starter files prior to re-creation to keep it clean, #367
|
||||||
|
if ($settings['system']['mod_fcgid'] == '1')
|
||||||
|
{
|
||||||
|
$configdir = makeCorrectDir($settings['system']['mod_fcgid_configdir']);
|
||||||
|
|
||||||
|
if (is_dir($configdir))
|
||||||
|
{
|
||||||
|
$its = new RecursiveIteratorIterator(
|
||||||
|
new RecursiveDirectoryIterator($configdir)
|
||||||
|
);
|
||||||
|
|
||||||
|
// iterate through all subdirs,
|
||||||
|
// look for php-fcgi-starter files
|
||||||
|
// and take immutable-flag away from them
|
||||||
|
// so we can delete them :)
|
||||||
|
foreach ($its as $fullFileName => $it )
|
||||||
|
{
|
||||||
|
if ($it->isFile() && $it->getFilename() == 'php-fcgi-starter')
|
||||||
|
{
|
||||||
|
removeImmutable($its->getPathname());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// now get rid of old stuff
|
||||||
|
//(but append /* so we don't delete the directory)
|
||||||
|
safe_exec('rm -rf '. escapeshellarg(makeCorrectFile($configdir.'/*')));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!isset($webserver))
|
if(!isset($webserver))
|
||||||
{
|
{
|
||||||
if($settings['system']['webserver'] == "apache2")
|
if($settings['system']['webserver'] == "apache2")
|
||||||
@@ -123,6 +150,7 @@ $awstatsclean['headerold']) {
|
|||||||
$webserver->createVirtualHosts();
|
$webserver->createVirtualHosts();
|
||||||
$webserver->createFileDirOptions();
|
$webserver->createFileDirOptions();
|
||||||
$webserver->writeConfigs();
|
$webserver->writeConfigs();
|
||||||
|
$webserver->createOwnVhostStarter();
|
||||||
$webserver->reload();
|
$webserver->reload();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -253,13 +281,13 @@ $awstatsclean['headerold']) {
|
|||||||
|
|
||||||
// iterate through all subdirs,
|
// iterate through all subdirs,
|
||||||
// look for php-fcgi-starter files
|
// look for php-fcgi-starter files
|
||||||
// and take chattr +i away from them
|
// and take immutable-flag away from them
|
||||||
// so we can delete them :)
|
// so we can delete them :)
|
||||||
foreach ($its as $fullFileName => $it )
|
foreach ($its as $fullFileName => $it )
|
||||||
{
|
{
|
||||||
if ($it->isFile() && $it->getFilename() == 'php-fcgi-starter')
|
if ($it->isFile() && $it->getFilename() == 'php-fcgi-starter')
|
||||||
{
|
{
|
||||||
safe_exec('chattr -i ' . escapeshellarg($its->getPathname()));
|
removeImmutable($its->getPathname());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// now get rid of old stuff
|
// now get rid of old stuff
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ function awstatsDoSingleDomain($domain, $outputdir)
|
|||||||
* check for correct path of awstats_buildstaticpages.pl
|
* check for correct path of awstats_buildstaticpages.pl
|
||||||
*/
|
*/
|
||||||
$awbsp = makeCorrectFile($settings['system']['awstats_path'].'/awstats_buildstaticpages.pl');
|
$awbsp = makeCorrectFile($settings['system']['awstats_path'].'/awstats_buildstaticpages.pl');
|
||||||
$awprog = makeCorrectFile($settings['system']['awstats_path'].'/awstats.pl');
|
$awprog = makeCorrectFile($settings['system']['awstats_awstatspath'].'/awstats.pl');
|
||||||
|
|
||||||
if (!file_exists($awbsp)) {
|
if (!file_exists($awbsp)) {
|
||||||
echo "WANRING: Necessary awstats_buildstaticpages.pl script could not be found, no traffic is being calculated and no stats are generated. Please check your AWStats-Path setting";
|
echo "WANRING: Necessary awstats_buildstaticpages.pl script could not be found, no traffic is being calculated and no stats are generated. Please check your AWStats-Path setting";
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ $yesterday = time() - (60 * 60 * 24);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require (dirname(__FILE__) . '/../lib/class.phpmailer.php');
|
require (dirname(__FILE__) . '/../lib/class.phpmailer.php');
|
||||||
$mail = new PHPMailer();
|
$mail = new PHPMailer(true);
|
||||||
$mail->SetFrom($settings['panel']['adminmail'], 'Froxlor Administrator');
|
$mail->SetFrom($settings['panel']['adminmail'], 'Froxlor Administrator');
|
||||||
|
|
||||||
// Warn the customers at 90% traffic-usage
|
// Warn the customers at 90% traffic-usage
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ $header
|
|||||||
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><select class="dropdown_noborder" name="alias">$domains</select></td>
|
<td class="main_field_display" nowrap="nowrap"><select class="dropdown_noborder" name="alias">$domains</select></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_name">{$lng['domains']['issubof']}:<br /><small>{$lng['domains']['issubofinfo']}</small></td>
|
||||||
|
<td class="main_field_display" nowrap="nowrap"><select class="dropdown_noborder" name="issubof">$subtodomains</select></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['admin']['domain_edit']}:</td>
|
<td class="main_field_name">{$lng['admin']['domain_edit']}:</td>
|
||||||
<td class="main_field_display" nowrap="nowrap">$caneditdomain</td>
|
<td class="main_field_display" nowrap="nowrap">$caneditdomain</td>
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ $header
|
|||||||
<td class="main_field_display" nowrap="nowrap"><select class="dropdown_noborder" name="alias">$domains</select></td>
|
<td class="main_field_display" nowrap="nowrap"><select class="dropdown_noborder" name="alias">$domains</select></td>
|
||||||
</tr>
|
</tr>
|
||||||
</if>
|
</if>
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_name">{$lng['domains']['issubof']}:<br /><small>{$lng['domains']['issubofinfo']}</small></td>
|
||||||
|
<td class="main_field_display" nowrap="nowrap"><select class="dropdown_noborder" name="issubof">$subtodomains</select></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['domains']['associated_with_domain']}:</td>
|
<td class="main_field_name">{$lng['domains']['associated_with_domain']}:</td>
|
||||||
<td class="main_field_display" nowrap="nowrap">{$subdomains} {$lng['customer']['subdomains']}, {$alias_check} {$lng['domains']['aliasdomains']}, {$emails} {$lng['customer']['emails']}, {$email_accounts} {$lng['customer']['accounts']}, {$email_forwarders} {$lng['customer']['forwarders']}</td>
|
<td class="main_field_display" nowrap="nowrap">{$subdomains} {$lng['customer']['subdomains']}, {$alias_check} {$lng['domains']['aliasdomains']}, {$emails} {$lng['customer']['emails']}, {$email_accounts} {$lng['customer']['accounts']}, {$email_forwarders} {$lng['customer']['forwarders']}</td>
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ $header
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['createcustomer']}</b></td>
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['createcustomer']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{SALUTATION}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['SALUTATION']}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_name_border_left"><i>{FIRSTNAME}</i>:</td>
|
<td class="field_name_border_left"><i>{FIRSTNAME}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['FIRSTNAME']}</td>
|
<td class="field_name">{$lng['admin']['templates']['FIRSTNAME']}</td>
|
||||||
@@ -44,6 +48,10 @@ $header
|
|||||||
<td class="field_name_border_left"><i>{NAME}</i>:</td>
|
<td class="field_name_border_left"><i>{NAME}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['NAME']}</td>
|
<td class="field_name">{$lng['admin']['templates']['NAME']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{COMPANY}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['COMPANY']}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_name_border_left"><i>{USERNAME}</i>:</td>
|
<td class="field_name_border_left"><i>{USERNAME}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['USERNAME']}</td>
|
<td class="field_name">{$lng['admin']['templates']['USERNAME']}</td>
|
||||||
@@ -72,6 +80,21 @@ $header
|
|||||||
<td class="field_name">{$lng['admin']['templates']['EMAIL_PASSWORD']}</td>
|
<td class="field_name">{$lng['admin']['templates']['EMAIL_PASSWORD']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</if>
|
</if>
|
||||||
|
<tr>
|
||||||
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['forgotpwd']}</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{SALUTATION}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['SALUTATION']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{USERNAME}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['USERNAME']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{PASSWORD}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['PASSWORD']}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['trafficninetypercent']}</b></td>
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['trafficninetypercent']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -90,6 +113,10 @@ $header
|
|||||||
<td class="field_name_border_left"><i>{SUBJECT}</i>:</td>
|
<td class="field_name_border_left"><i>{SUBJECT}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['SUBJECT']}</td>
|
<td class="field_name">{$lng['admin']['templates']['SUBJECT']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{SALUTATION}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['SALUTATION']}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_name_border_left"><i>{FIRSTNAME}</i>:</td>
|
<td class="field_name_border_left"><i>{FIRSTNAME}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['FIRSTNAME']}</td>
|
<td class="field_name">{$lng['admin']['templates']['FIRSTNAME']}</td>
|
||||||
@@ -98,6 +125,56 @@ $header
|
|||||||
<td class="field_name_border_left"><i>{NAME}</i>:</td>
|
<td class="field_name_border_left"><i>{NAME}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['NAME']}</td>
|
<td class="field_name">{$lng['admin']['templates']['NAME']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{COMPANY}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['COMPANY']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['newdatabase']}</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{CUST_NAME}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['CUST_NAME']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{DB_NAME}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['DB_NAME']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{DB_PASS}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['DB_PASS']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{DB_DESC}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['DB_DESC']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{DB_SRV}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['DB_SRV']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{PMA_URI}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['PMA_URI']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['newftpuser']}</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{CUST_NAME}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['CUST_NAME']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{USR_NAME}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['USR_NAME']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{USR_PASS}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['USR_PASS']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{USR_PATH}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['USR_PATH']}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ $header
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['createcustomer']}</b></td>
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['createcustomer']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{SALUTATION}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['SALUTATION']}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_name_border_left"><i>{FIRSTNAME}</i>:</td>
|
<td class="field_name_border_left"><i>{FIRSTNAME}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['FIRSTNAME']}</td>
|
<td class="field_name">{$lng['admin']['templates']['FIRSTNAME']}</td>
|
||||||
@@ -46,6 +50,10 @@ $header
|
|||||||
<td class="field_name_border_left"><i>{NAME}</i>:</td>
|
<td class="field_name_border_left"><i>{NAME}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['NAME']}</td>
|
<td class="field_name">{$lng['admin']['templates']['NAME']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{COMPANY}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['COMPANY']}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_name_border_left"><i>{USERNAME}</i>:</td>
|
<td class="field_name_border_left"><i>{USERNAME}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['USERNAME']}</td>
|
<td class="field_name">{$lng['admin']['templates']['USERNAME']}</td>
|
||||||
@@ -74,6 +82,21 @@ $header
|
|||||||
<td class="field_name">{$lng['admin']['templates']['EMAIL_PASSWORD']}</td>
|
<td class="field_name">{$lng['admin']['templates']['EMAIL_PASSWORD']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</if>
|
</if>
|
||||||
|
<tr>
|
||||||
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['forgotpwd']}</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{SALUTATION}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['SALUTATION']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{USERNAME}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['USERNAME']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{PASSWORD}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['PASSWORD']}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['trafficninetypercent']}</b></td>
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['trafficninetypercent']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -92,6 +115,10 @@ $header
|
|||||||
<td class="field_name_border_left"><i>{SUBJECT}</i>:</td>
|
<td class="field_name_border_left"><i>{SUBJECT}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['SUBJECT']}</td>
|
<td class="field_name">{$lng['admin']['templates']['SUBJECT']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{SALUTATION}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['SALUTATION']}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_name_border_left"><i>{FIRSTNAME}</i>:</td>
|
<td class="field_name_border_left"><i>{FIRSTNAME}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['FIRSTNAME']}</td>
|
<td class="field_name">{$lng['admin']['templates']['FIRSTNAME']}</td>
|
||||||
@@ -100,6 +127,56 @@ $header
|
|||||||
<td class="field_name_border_left"><i>{NAME}</i>:</td>
|
<td class="field_name_border_left"><i>{NAME}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['NAME']}</td>
|
<td class="field_name">{$lng['admin']['templates']['NAME']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{COMPANY}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['COMPANY']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['newdatabase']}</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{CUST_NAME}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['CUST_NAME']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{DB_NAME}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['DB_NAME']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{DB_PASS}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['DB_PASS']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{DB_DESC}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['DB_DESC']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{DB_SRV}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['DB_SRV']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{PMA_URI}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['PMA_URI']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['newftpuser']}</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{CUST_NAME}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['CUST_NAME']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{USR_NAME}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['USR_NAME']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{USR_PASS}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['USR_PASS']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{USR_PATH}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['USR_PATH']}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -19,17 +19,17 @@ $header
|
|||||||
<td class="main_field_display" nowrap="nowrap">$options_indexes</td>
|
<td class="main_field_display" nowrap="nowrap">$options_indexes</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name"><b>{$lng['extras']['errordocument404path']}:</b><br />{$lng['panel']['emptyfordefault']}</td>
|
<td class="main_field_name"><b>{$lng['extras']['errordocument404path']}:</b><br />{$lng['panel']['descriptionerrordocument']}</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="error404path" value="" size="30" maxlength="255" /></td>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="error404path" value="" size="30" maxlength="255" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name"><b>{$lng['extras']['errordocument403path']}:</b><br />{$lng['panel']['emptyfordefault']}
|
<td class="main_field_name"><b>{$lng['extras']['errordocument403path']}:</b><br />{$lng['panel']['descriptionerrordocument']}
|
||||||
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
|
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
|
||||||
</td>
|
</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="error403path" value="" size="30" maxlength="255" /></td>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="error403path" value="" size="30" maxlength="255" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name"><b>{$lng['extras']['errordocument500path']}:</b><br />{$lng['panel']['emptyfordefault']}
|
<td class="main_field_name"><b>{$lng['extras']['errordocument500path']}:</b><br />{$lng['panel']['descriptionerrordocument']}
|
||||||
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
|
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
|
||||||
</td>
|
</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="error500path" value="" size="30" maxlength="255" /></td>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="error500path" value="" size="30" maxlength="255" /></td>
|
||||||
|
|||||||
@@ -17,17 +17,17 @@ $header
|
|||||||
<td class="main_field_display" nowrap="nowrap">$options_indexes</td>
|
<td class="main_field_display" nowrap="nowrap">$options_indexes</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name"><b>{$lng['extras']['errordocument404path']}:</b><br />{$lng['panel']['emptyfordefault']}</td>
|
<td class="main_field_name"><b>{$lng['extras']['errordocument404path']}:</b><br />{$lng['panel']['descriptionerrordocument']}</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="error404path" value="{$result['error404path']}" size="30" maxlength="255" /></td>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="error404path" value="{$result['error404path']}" size="30" maxlength="255" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name"><b>{$lng['extras']['errordocument403path']}:</b><br />{$lng['panel']['emptyfordefault']}
|
<td class="main_field_name"><b>{$lng['extras']['errordocument403path']}:</b><br />{$lng['panel']['descriptionerrordocument']}
|
||||||
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
|
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
|
||||||
</td>
|
</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="error403path" value="{$result['error403path']}" size="30" maxlength="255" /></td>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="error403path" value="{$result['error403path']}" size="30" maxlength="255" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name"><b>{$lng['extras']['errordocument500path']}:</b><br />{$lng['panel']['emptyfordefault']}
|
<td class="main_field_name"><b>{$lng['extras']['errordocument500path']}:</b><br />{$lng['panel']['descriptionerrordocument']}
|
||||||
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
|
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
|
||||||
</td>
|
</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="error500path" value="{$result['error500path']}" size="30" maxlength="255" /></td>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="error500path" value="{$result['error500path']}" size="30" maxlength="255" /></td>
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ $header
|
|||||||
<td class="main_field_name">{$lng['login']['password']}:</td>
|
<td class="main_field_name">{$lng['login']['password']}:</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="directory_password" size="30" /></td>
|
<td class="main_field_display" nowrap="nowrap"><input type="password" name="directory_password" size="30" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_name">{$lng['extras']['htpasswdauthname']}:</td>
|
||||||
|
<td class="main_field_display" nowrap="nowrap"><input type="text" name="directory_authname" size="30" /></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['extras']['directoryprotection_add']}" /></td>
|
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['extras']['directoryprotection_add']}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ $header
|
|||||||
<input type="hidden" name="id" value="$id" />
|
<input type="hidden" name="id" value="$id" />
|
||||||
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
|
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['menue']['main']['changepassword']}</b></td>
|
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['extras']['directoryprotection_edit']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
||||||
@@ -21,7 +21,11 @@ $header
|
|||||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="directory_password" maxlength="50" /></td>
|
<td class="main_field_display" nowrap="nowrap"><input type="password" name="directory_password" maxlength="50" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['menue']['main']['changepassword']}" /></td>
|
<td class="main_field_name">{$lng['extras']['htpasswdauthname']}:</td>
|
||||||
|
<td class="main_field_display" nowrap="nowrap"><input type="text" name="directory_authname" value="{$result['authname']}" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['extras']['directoryprotection_edit']}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<tr class="" onmouseover="this.className='RowOverSelected';" onmouseout="this.className='';">
|
<tr class="" onmouseover="this.className='RowOverSelected';" onmouseout="this.className='';">
|
||||||
<td class="field_name_border_left">{$row['username']}</td>
|
<td class="field_name_border_left">{$row['username']}</td>
|
||||||
<td class="field_name">{$row['path']}</td>
|
<td class="field_name">{$row['path']}</td>
|
||||||
<td class="field_name"><a href="$filename?page=htpasswds&action=edit&id={$row['id']}&s=$s">{$lng['menue']['main']['changepassword']}</a></td>
|
<td class="field_name"><a href="$filename?page=htpasswds&action=edit&id={$row['id']}&s=$s">{$lng['panel']['edit']}</a></td>
|
||||||
<td class="field_name"><a href="$filename?page=htpasswds&action=delete&id={$row['id']}&s=$s">{$lng['panel']['delete']}</a></td>
|
<td class="field_name"><a href="$filename?page=htpasswds&action=delete&id={$row['id']}&s=$s">{$lng['panel']['delete']}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -468,4 +468,5 @@ TR.RowOverSelected {
|
|||||||
{
|
{
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
|
font-size: 120%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
base_dir = /var/run/dovecot
|
|
||||||
protocols = imap pop3 <SSLPROTOCOLS>
|
protocols = imap pop3 <SSLPROTOCOLS>
|
||||||
listen = *
|
listen = *
|
||||||
mail_access_groups = vmail
|
mail_access_groups = vmail
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
base_dir = /var/run/dovecot
|
|
||||||
protocols = imap pop3 <SSLPROTOCOLS>
|
protocols = imap pop3 <SSLPROTOCOLS>
|
||||||
listen = *
|
listen = *
|
||||||
mail_access_groups = vmail
|
mail_access_groups = vmail
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ protocol pop3 {
|
|||||||
}
|
}
|
||||||
protocol lda {
|
protocol lda {
|
||||||
# postmaster is the one in charge of the mail system. MUST be set to a valid address!
|
# postmaster is the one in charge of the mail system. MUST be set to a valid address!
|
||||||
postmaster_address = <postmaster-address>
|
postmaster_address = admin@<SERVERNAME>
|
||||||
auth_socket_path = /var/run/dovecot/auth-master
|
auth_socket_path = /var/run/dovecot/auth-master
|
||||||
mail_plugins = quota
|
mail_plugins = quota
|
||||||
sendmail_path = /usr/sbin/sendmail
|
sendmail_path = /usr/sbin/sendmail
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Config file for /etc/init.d/pure-ftpd
|
||||||
|
# Configuration-template by Froxlor
|
||||||
|
|
||||||
|
IS_CONFIGURED="yes"
|
||||||
|
|
||||||
|
# Server/Port
|
||||||
|
SERVER="-S 21"
|
||||||
|
|
||||||
|
## Number of simultaneous connections in total, and per IP ##
|
||||||
|
MAX_CONN="-c 30"
|
||||||
|
MAX_CONN_IP="-C 10"
|
||||||
|
|
||||||
|
## Start daemonized in background ##
|
||||||
|
DAEMON="-B"
|
||||||
|
|
||||||
|
## Don't allow uploads if the partition is more full then this var ##
|
||||||
|
DISK_FULL="-k 90%"
|
||||||
|
|
||||||
|
## Authentication mechanism
|
||||||
|
AUTH="-l mysql:/etc/pureftpd-mysql.conf"
|
||||||
|
|
||||||
|
## Misc. Others ##
|
||||||
|
MISC_OTHER="-A -x -j -Z"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
MYSQLServer <SQL_HOST>
|
||||||
|
#MYSQLPort 3306
|
||||||
|
MYSQLSocket /var/run/mysqld/mysqld.sock
|
||||||
|
MYSQLUser <SQL_UNPRIVILEGED_USER>
|
||||||
|
MYSQLPassword <SQL_UNPRIVILEGED_PASSWORD>
|
||||||
|
MYSQLDatabase <SQL_DB>
|
||||||
|
MYSQLCrypt Crypt
|
||||||
|
MYSQLGetPW SELECT password FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
|
MYSQLGetUID SELECT uid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
|
MYSQLGetGID SELECT gid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
|
MYSQLGetDir SELECT homedir FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
|
MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_customers, ftp_users WHERE username = "\L" AND panel_customers.loginname = SUBSTRING_INDEX('\L', 'ftp', 1)
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
base_dir = /var/run/dovecot
|
|
||||||
protocols = imap pop3 <SSLPROTOCOLS>
|
protocols = imap pop3 <SSLPROTOCOLS>
|
||||||
listen = *
|
listen = *
|
||||||
mail_access_groups = vmail
|
mail_access_groups = vmail
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Some general options
|
# Some general options
|
||||||
protocols = imap pop3 imaps pop3s managesieve
|
protocols = imap pop3 <SSLPROTOCOLS> managesieve
|
||||||
mail_access_groups = vmail
|
mail_access_groups = vmail
|
||||||
## allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
|
## allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
|
||||||
disable_plaintext_auth = no
|
disable_plaintext_auth = no
|
||||||
|
|||||||
Reference in New Issue
Block a user