Compare commits
101 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4597da4207 | ||
|
|
43595df977 | ||
|
|
8d652183a0 | ||
|
|
6af37fb40e | ||
|
|
d3ceeb3f14 | ||
|
|
7182b245b3 | ||
|
|
a48d6ae174 | ||
|
|
521d6bbd4d | ||
|
|
e4f0144bbc | ||
|
|
2c50107bea | ||
|
|
043ca2ff5a | ||
|
|
ab1e3c3fc8 | ||
|
|
230c2a1cf3 | ||
|
|
7bea15a7a9 | ||
|
|
2b2d44166d | ||
|
|
70dc03098c | ||
|
|
16b7d7f029 | ||
|
|
81dad796ee | ||
|
|
8a28c6e0ef | ||
|
|
fc5d14d223 | ||
|
|
0ec2238e4b | ||
|
|
8077a2e3b1 | ||
|
|
677cd54e1c | ||
|
|
a3a3dec68c | ||
|
|
bb6860532c | ||
|
|
68b4edd1e1 | ||
|
|
9dff94f1c8 | ||
|
|
f5e2d13c53 | ||
|
|
15e7441ab9 | ||
|
|
12e63a3eea | ||
|
|
4e1405ca39 | ||
|
|
0e1d82db8b | ||
|
|
952edd380f | ||
|
|
9b843a8ad5 | ||
|
|
d4e310d150 | ||
|
|
e0e57da5b8 | ||
|
|
00b881f49b | ||
|
|
080eeb29ec | ||
|
|
db74c99098 | ||
|
|
d3599dc8c0 | ||
|
|
6eba5f5318 | ||
|
|
16bca3c665 | ||
|
|
dcb32c1bb5 | ||
|
|
f76df2252d | ||
|
|
402e8620a9 | ||
|
|
ccf40fc89b | ||
|
|
660bede9c5 | ||
|
|
1db572e010 | ||
|
|
d4c4a0c05f | ||
|
|
6b7a3e73f1 | ||
|
|
55aab4004c | ||
|
|
c1de55f3d5 | ||
|
|
f9d84a09f1 | ||
|
|
e79fe3e510 | ||
|
|
eddb2a2623 | ||
|
|
ae595b0f2f | ||
|
|
423fd7b7df | ||
|
|
7f6a21ceec | ||
|
|
f11c180ea8 | ||
|
|
a7f22a3426 | ||
|
|
2c12c51977 | ||
|
|
ee7f83aede | ||
|
|
6f37aa2209 | ||
|
|
1d03f04e1e | ||
|
|
8ec1b723a2 | ||
|
|
fb75e43511 | ||
|
|
3e4dc2f1d8 | ||
|
|
6c233818f2 | ||
|
|
9a18dbcc36 | ||
|
|
cbfb89f86a | ||
|
|
491e5363a7 | ||
|
|
b5465f602f | ||
|
|
49ff638e20 | ||
|
|
cb2ad2261b | ||
|
|
a6909a8cec | ||
|
|
a0c557c405 | ||
|
|
0cd452de28 | ||
|
|
91d461b122 | ||
|
|
098afe7cf8 | ||
|
|
25b1478261 | ||
|
|
adf79b3b1d | ||
|
|
0461e4cbd9 | ||
|
|
b289a6746a | ||
|
|
1d2193d0e2 | ||
|
|
8fb23fcf62 | ||
|
|
525499b987 | ||
|
|
f8b3da48fc | ||
|
|
dd0aa8e10c | ||
|
|
fea80269ed | ||
|
|
dd9b72e45e | ||
|
|
7aba67af11 | ||
|
|
a1561618e9 | ||
|
|
c549e17795 | ||
|
|
3c59d37dd2 | ||
|
|
d236a5ceda | ||
|
|
66d5ea8f9e | ||
|
|
e8de3d45e5 | ||
|
|
c192d19d7e | ||
|
|
ada8ecf04a | ||
|
|
2d3701c5a3 | ||
|
|
0488a3c2a4 |
@@ -77,6 +77,24 @@ return array(
|
|||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
|
'panel_adminmail_defname' => array(
|
||||||
|
'label' => $lng['serversettings']['adminmail_defname'],
|
||||||
|
'settinggroup' => 'panel',
|
||||||
|
'varname' => 'adminmail_defname',
|
||||||
|
'type' => 'string',
|
||||||
|
'default' => 'Froxlor Administrator',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'panel_adminmail_return' => array(
|
||||||
|
'label' => $lng['serversettings']['adminmail_return'],
|
||||||
|
'settinggroup' => 'panel',
|
||||||
|
'varname' => 'adminmail_return',
|
||||||
|
'type' => 'string',
|
||||||
|
'string_type' => 'mail',
|
||||||
|
'string_emptyallowed' => true,
|
||||||
|
'default' => '',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
'panel_decimal_places' => array(
|
'panel_decimal_places' => array(
|
||||||
'label' => $lng['serversettings']['decimal_places'],
|
'label' => $lng['serversettings']['decimal_places'],
|
||||||
'settinggroup' => 'panel',
|
'settinggroup' => 'panel',
|
||||||
|
|||||||
@@ -54,6 +54,14 @@ return array(
|
|||||||
'default' => 900,
|
'default' => 900,
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
|
'panel_password_min_length' => array(
|
||||||
|
'label' => $lng['serversettings']['panel_password_min_length'],
|
||||||
|
'settinggroup' => 'panel',
|
||||||
|
'varname' => 'password_min_length',
|
||||||
|
'type' => 'int',
|
||||||
|
'default' => 0,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
'customer_accountprefix' => array(
|
'customer_accountprefix' => array(
|
||||||
'label' => $lng['serversettings']['accountprefix'],
|
'label' => $lng['serversettings']['accountprefix'],
|
||||||
'settinggroup' => 'customer',
|
'settinggroup' => 'customer',
|
||||||
@@ -95,6 +103,14 @@ return array(
|
|||||||
'type' => 'bool',
|
'type' => 'bool',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
|
'dependency' => array(
|
||||||
|
'fieldname' => 'panel_allow_preset_admin',
|
||||||
|
'fielddata' => array(
|
||||||
|
'settinggroup' => 'panel',
|
||||||
|
'varname' => 'allow_preset_admin',
|
||||||
|
),
|
||||||
|
'onlyif' => 0
|
||||||
|
)
|
||||||
),
|
),
|
||||||
'panel_allow_preset_admin' => array(
|
'panel_allow_preset_admin' => array(
|
||||||
'label' => $lng['serversettings']['allow_password_reset_admin'],
|
'label' => $lng['serversettings']['allow_password_reset_admin'],
|
||||||
@@ -103,6 +119,14 @@ return array(
|
|||||||
'type' => 'bool',
|
'type' => 'bool',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
|
'dependency' => array(
|
||||||
|
'fieldname' => 'panel_allow_preset',
|
||||||
|
'fielddata' => array(
|
||||||
|
'settinggroup' => 'panel',
|
||||||
|
'varname' => 'allow_preset',
|
||||||
|
),
|
||||||
|
'onlyif' => 1
|
||||||
|
)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -58,6 +58,14 @@ return array(
|
|||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingHostname',
|
'save_method' => 'storeSettingHostname',
|
||||||
),
|
),
|
||||||
|
'system_stdsubdomain' => array(
|
||||||
|
'label' => $lng['serversettings']['stdsubdomainhost'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'stdsubdomain',
|
||||||
|
'type' => 'string',
|
||||||
|
'default' => '',
|
||||||
|
'save_method' => 'storeSettingHostname',
|
||||||
|
),
|
||||||
'system_mysql_access_host' => array(
|
'system_mysql_access_host' => array(
|
||||||
'label' => $lng['serversettings']['mysql_access_host'],
|
'label' => $lng['serversettings']['mysql_access_host'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
@@ -71,7 +79,7 @@ return array(
|
|||||||
'label' => $lng['serversettings']['system_realtime_port'],
|
'label' => $lng['serversettings']['system_realtime_port'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
'varname' => 'realtime_port',
|
'varname' => 'realtime_port',
|
||||||
'type' => 'int',
|
'type' => (function_exists('socket_create') ? 'int' : 'hidden'),
|
||||||
'int_max' => 65535,
|
'int_max' => 65535,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
@@ -85,6 +93,14 @@ return array(
|
|||||||
'default' => 'html',
|
'default' => 'html',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
|
'system_store_index_file_subs' => array(
|
||||||
|
'label' => $lng['serversettings']['system_store_index_file_subs'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'store_index_file_subs',
|
||||||
|
'type' => 'bool',
|
||||||
|
'default' => true,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
'system_httpuser' => array(
|
'system_httpuser' => array(
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
'varname' => 'httpuser',
|
'varname' => 'httpuser',
|
||||||
|
|||||||
@@ -40,42 +40,6 @@ return array(
|
|||||||
'default' => false,
|
'default' => false,
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'system_awstats_domain_file' => array(
|
|
||||||
'label' => $lng['serversettings']['awstats_domain_file'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'awstats_domain_file',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'dir',
|
|
||||||
'default' => '/etc/awstats/',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_awstats_model_file' => array(
|
|
||||||
'label' => $lng['serversettings']['awstats_model_file'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'awstats_model_file',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'file',
|
|
||||||
'default' => '/etc/awstats/awstats.model.conf.syscp',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_awstats_path' => array(
|
|
||||||
'label' => $lng['serversettings']['awstats_path'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'awstats_path',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'dir',
|
|
||||||
'default' => '/usr/share/awstats/VERSION/webroot/cgi-bin/',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'system_awstats_updateall_command' => array(
|
|
||||||
'label' => $lng['serversettings']['awstats_updateall_command'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'awstats_updateall_command',
|
|
||||||
'type' => 'string',
|
|
||||||
'string_type' => 'file',
|
|
||||||
'default' => '/usr/bin/awstats_updateall.pl',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ return array(
|
|||||||
'varname' => 'use_dkim',
|
'varname' => 'use_dkim',
|
||||||
'type' => 'bool',
|
'type' => 'bool',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||||
),
|
),
|
||||||
'dkim_prefix' => array(
|
'dkim_prefix' => array(
|
||||||
'label' => $lng['dkim']['dkim_prefix'],
|
'label' => $lng['dkim']['dkim_prefix'],
|
||||||
@@ -56,6 +56,63 @@ return array(
|
|||||||
'default' => 'dkim-keys.conf',
|
'default' => 'dkim-keys.conf',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
|
'dkim_algorithm' => array(
|
||||||
|
'label' => $lng['dkim']['dkim_algorithm'],
|
||||||
|
'settinggroup' => 'dkim',
|
||||||
|
'varname' => 'dkim_algorithm',
|
||||||
|
'type' => 'option',
|
||||||
|
'default' => 'all',
|
||||||
|
'option_mode' => 'multiple',
|
||||||
|
'option_options' => array('all' => 'All', 'sha1' => 'SHA1', 'sha256' => 'SHA256'),
|
||||||
|
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||||
|
),
|
||||||
|
'dkim_servicetype' => array(
|
||||||
|
'label' => $lng['dkim']['dkim_servicetype'],
|
||||||
|
'settinggroup' => 'dkim',
|
||||||
|
'varname' => 'dkim_servicetype',
|
||||||
|
'type' => 'option',
|
||||||
|
'default' => '0',
|
||||||
|
'option_mode' => 'one',
|
||||||
|
'option_options' => array('0' => 'All', '1' => 'E-Mail'),
|
||||||
|
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||||
|
),
|
||||||
|
'dkim_keylength' => array(
|
||||||
|
'label' => $lng['dkim']['dkim_keylength'],
|
||||||
|
'settinggroup' => 'dkim',
|
||||||
|
'varname' => 'dkim_keylength',
|
||||||
|
'type' => 'option',
|
||||||
|
'default' => '1024',
|
||||||
|
'option_mode' => 'one',
|
||||||
|
'option_options' => array('1024' => '1024 Bit', '2048' => '2048 Bit'),
|
||||||
|
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||||
|
),
|
||||||
|
'dkim_notes' => array(
|
||||||
|
'label' => $lng['dkim']['dkim_notes'],
|
||||||
|
'settinggroup' => 'dkim',
|
||||||
|
'varname' => 'dkim_notes',
|
||||||
|
'type' => 'string',
|
||||||
|
'string_regexp' => '/^[a-z0-9\._]+$/i',
|
||||||
|
'default' => '',
|
||||||
|
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||||
|
),
|
||||||
|
'dkim_add_adsp' => array(
|
||||||
|
'label' => $lng['dkim']['dkim_add_adsp'],
|
||||||
|
'settinggroup' => 'dkim',
|
||||||
|
'varname' => 'dkim_add_adsp',
|
||||||
|
'type' => 'bool',
|
||||||
|
'default' => true,
|
||||||
|
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||||
|
),
|
||||||
|
'dkim_add_adsppolicy' => array(
|
||||||
|
'label' => $lng['dkim']['dkim_add_adsppolicy'],
|
||||||
|
'settinggroup' => 'dkim',
|
||||||
|
'varname' => 'dkim_add_adsppolicy',
|
||||||
|
'type' => 'option',
|
||||||
|
'default' => '1',
|
||||||
|
'option_mode' => 'one',
|
||||||
|
'option_options' => array('0' => 'Unknown', '1' => 'All', '2' => 'Discardable'),
|
||||||
|
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||||
|
),
|
||||||
'dkimrestart_command' => array(
|
'dkimrestart_command' => array(
|
||||||
'label' => $lng['dkim']['dkimrestart_command'],
|
'label' => $lng['dkim']['dkimrestart_command'],
|
||||||
'settinggroup' => 'dkim',
|
'settinggroup' => 'dkim',
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ if($page == 'admins'
|
|||||||
|
|
||||||
$loginname = validate($_POST['loginname'], 'loginname');
|
$loginname = validate($_POST['loginname'], 'loginname');
|
||||||
$password = validate($_POST['admin_password'], 'password');
|
$password = validate($_POST['admin_password'], 'password');
|
||||||
|
$password = validatePassword($password);
|
||||||
$def_language = validate($_POST['def_language'], 'default language');
|
$def_language = validate($_POST['def_language'], 'default language');
|
||||||
$customers = intval_ressource($_POST['customers']);
|
$customers = intval_ressource($_POST['customers']);
|
||||||
|
|
||||||
@@ -560,6 +561,7 @@ if($page == 'admins'
|
|||||||
{
|
{
|
||||||
if($password != '')
|
if($password != '')
|
||||||
{
|
{
|
||||||
|
$password = validatePassword($password);
|
||||||
$password = md5($password);
|
$password = md5($password);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -95,9 +95,9 @@ if($userinfo['change_serversettings'] == '1')
|
|||||||
'<VIRTUAL_MAILBOX_BASE>' => $settings['system']['vmail_homedir'],
|
'<VIRTUAL_MAILBOX_BASE>' => $settings['system']['vmail_homedir'],
|
||||||
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
|
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
|
||||||
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
|
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
|
||||||
'<AWSTATS_PATH>' => $settings['system']['awstats_path'],
|
|
||||||
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
|
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
|
||||||
'<REALTIME_PORT>' => $settings['system']['realtime_port']
|
'<REALTIME_PORT>' => $settings['system']['realtime_port'],
|
||||||
|
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? makeCorrectDir($settings['system']['mod_fcgid_tmpdir']) : '/tmp/'
|
||||||
);
|
);
|
||||||
$files = '';
|
$files = '';
|
||||||
$configpage = '';
|
$configpage = '';
|
||||||
@@ -110,6 +110,7 @@ if($userinfo['change_serversettings'] == '1')
|
|||||||
if(is_array($value))
|
if(is_array($value))
|
||||||
{
|
{
|
||||||
$commands = implode("\n", $value);
|
$commands = implode("\n", $value);
|
||||||
|
$commands = str_replace("\n\n", "\n", $commands);
|
||||||
|
|
||||||
if($commands != '')
|
if($commands != '')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -75,12 +75,6 @@ if($page == 'cronjobs'
|
|||||||
|
|
||||||
$description = $lng['crondesc'][$row['desc_lng_key']];
|
$description = $lng['crondesc'][$row['desc_lng_key']];
|
||||||
|
|
||||||
/*
|
|
||||||
* don't allow deletion of 'froxlor' cronjobs
|
|
||||||
*/
|
|
||||||
$vendor_a = explode('/', $row['module']);
|
|
||||||
$vendor = $vendor_a[0];
|
|
||||||
|
|
||||||
eval("\$crons.=\"" . getTemplate("cronjobs/cronjobs_cronjob") . "\";");
|
eval("\$crons.=\"" . getTemplate("cronjobs/cronjobs_cronjob") . "\";");
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
@@ -94,21 +88,68 @@ if($page == 'cronjobs'
|
|||||||
elseif($action == 'new')
|
elseif($action == 'new')
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* @TODO Finish me
|
* @TODO later
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
elseif($action == 'edit'
|
elseif($action == 'edit'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
/*
|
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CRONRUNS . "` WHERE `id`='" . (int)$id . "'");
|
||||||
* @TODO Finish me
|
|
||||||
*/
|
if ($result['cronfile'] != '')
|
||||||
|
{
|
||||||
|
if(isset($_POST['send'])
|
||||||
|
&& $_POST['send'] == 'send')
|
||||||
|
{
|
||||||
|
$isactive = intval($_POST['isactive']);
|
||||||
|
$interval_value = validate($_POST['interval_value'], 'interval_value', '/^([0-9]+)$/Di', 'stringisempty');
|
||||||
|
$interval_interval = validate($_POST['interval_interval'], 'interval_interval');
|
||||||
|
|
||||||
|
if($isactive != 1)
|
||||||
|
{
|
||||||
|
$isactive = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$interval = $interval_value.' '.strtoupper($interval_interval);
|
||||||
|
|
||||||
|
$db->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "`
|
||||||
|
SET `isactive` = '".(int)$isactive."',
|
||||||
|
`interval` = '".$interval."'
|
||||||
|
WHERE `id` = '" . (int)$id . "'");
|
||||||
|
|
||||||
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$isactive = makeyesno('isactive', '1', '0', $result['isactive']);
|
||||||
|
// interval
|
||||||
|
$interval_nfo = explode(' ', $result['interval']);
|
||||||
|
$interval_value = $interval_nfo[0];
|
||||||
|
|
||||||
|
$interval_interval = '';
|
||||||
|
$interval_interval.= makeoption($lng['cronmgmt']['seconds'], 'SECOND', $interval_nfo[1]);
|
||||||
|
$interval_interval.= makeoption($lng['cronmgmt']['minutes'], 'MINUTE', $interval_nfo[1]);
|
||||||
|
$interval_interval.= makeoption($lng['cronmgmt']['hours'], 'HOUR', $interval_nfo[1]);
|
||||||
|
$interval_interval.= makeoption($lng['cronmgmt']['days'], 'DAY', $interval_nfo[1]);
|
||||||
|
$interval_interval.= makeoption($lng['cronmgmt']['weeks'], 'WEEK', $interval_nfo[1]);
|
||||||
|
$interval_interval.= makeoption($lng['cronmgmt']['months'], 'MONTH', $interval_nfo[1]);
|
||||||
|
// end of interval
|
||||||
|
|
||||||
|
$change_cronfile = false;
|
||||||
|
if (substr($result['module'], 0, strpos($result['module'], '/')) != 'froxlor')
|
||||||
|
{
|
||||||
|
$change_cronfile = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
eval("echo \"" . getTemplate("cronjobs/cronjob_edit") . "\";");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif($action == 'delete'
|
elseif($action == 'delete'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* @TODO Finish me
|
* @TODO later
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -379,6 +379,7 @@ if($page == 'customers'
|
|||||||
|
|
||||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||||
$password = validate($_POST['customer_password'], 'password');
|
$password = validate($_POST['customer_password'], 'password');
|
||||||
|
$password = validatePassword($password);
|
||||||
$sendpassword = intval($_POST['sendpassword']);
|
$sendpassword = intval($_POST['sendpassword']);
|
||||||
$phpenabled = intval($_POST['phpenabled']);
|
$phpenabled = intval($_POST['phpenabled']);
|
||||||
$diskspace = $diskspace * 1024;
|
$diskspace = $diskspace * 1024;
|
||||||
@@ -567,14 +568,16 @@ if($page == 'customers'
|
|||||||
$htpasswdPassword = crypt($password);
|
$htpasswdPassword = crypt($password);
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/webalizer/')) . "')");
|
|
||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added webalizer htpasswd for user '" . $loginname . "'");
|
|
||||||
|
|
||||||
if($settings['system']['awstats_enabled'] == '1')
|
if($settings['system']['awstats_enabled'] == '1')
|
||||||
{
|
{
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/awstats/')) . "')");
|
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/awstats/')) . "')");
|
||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added awstats htpasswd for user '" . $loginname . "'");
|
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added awstats htpasswd for user '" . $loginname . "'");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/webalizer/')) . "')");
|
||||||
|
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added webalizer htpasswd for user '" . $loginname . "'");
|
||||||
|
}
|
||||||
|
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
|
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
|
||||||
@@ -583,8 +586,18 @@ if($page == 'customers'
|
|||||||
|
|
||||||
if($createstdsubdomain == '1')
|
if($createstdsubdomain == '1')
|
||||||
{
|
{
|
||||||
|
if (isset($settings['system']['stdsubdomain'])
|
||||||
|
&& $settings['system']['stdsubdomain'] != ''
|
||||||
|
) {
|
||||||
|
$_stdsubdomain = $loginname . '.' . $settings['system']['stdsubdomain'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$_stdsubdomain = $loginname . '.' . $settings['system']['hostname'];
|
||||||
|
}
|
||||||
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET " .
|
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET " .
|
||||||
"`domain` = '". $db->escape($loginname . '.' . $settings['system']['hostname']) . "', " .
|
"`domain` = '". $db->escape($_stdsubdomain) . "', " .
|
||||||
"`customerid` = '" . (int)$customerid . "', " .
|
"`customerid` = '" . (int)$customerid . "', " .
|
||||||
"`adminid` = '" . (int)$userinfo['adminid'] . "', " .
|
"`adminid` = '" . (int)$userinfo['adminid'] . "', " .
|
||||||
"`parentdomainid` = '-1', " .
|
"`parentdomainid` = '-1', " .
|
||||||
@@ -622,23 +635,22 @@ if($page == 'customers'
|
|||||||
$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`=\'createcustomer_mailbody\'');
|
$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`=\'createcustomer_mailbody\'');
|
||||||
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['createcustomer']['mailbody']), $replace_arr));
|
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['createcustomer']['mailbody']), $replace_arr));
|
||||||
|
|
||||||
$mail->From = $userinfo['email'];
|
$_mailerror = false;
|
||||||
$mail->FromName = $userinfo['name'];
|
try {
|
||||||
$mail->Subject = $mail_subject;
|
$mail->Subject = $mail_subject;
|
||||||
$mail->Body = $mail_body;
|
$mail->AltBody = $mail_body;
|
||||||
$mail->AddAddress($email, getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)));
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
|
$mail->AddAddress($email, getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)));
|
||||||
if(!$mail->Send())
|
$mail->Send();
|
||||||
{
|
} catch(phpmailerException $e) {
|
||||||
if($mail->ErrorInfo != '')
|
$mailerr_msg = $e->errorMessage();
|
||||||
{
|
$_mailerror = true;
|
||||||
$mailerr_msg = $mail->ErrorInfo;
|
} catch (Exception $e) {
|
||||||
}
|
$mailerr_msg = $e->getMessage();
|
||||||
else
|
$_mailerror = true;
|
||||||
{
|
}
|
||||||
$mailerr_msg = $email;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
$log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
$log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
standard_error('errorsendingmail', $email);
|
standard_error('errorsendingmail', $email);
|
||||||
}
|
}
|
||||||
@@ -781,11 +793,18 @@ if($page == 'customers'
|
|||||||
$mysqls = - 1;
|
$mysqls = - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']);
|
if($settings['aps']['aps_active'] == '1')
|
||||||
|
|
||||||
if(isset($_POST['number_of_aps_packages_ul']))
|
|
||||||
{
|
{
|
||||||
$number_of_aps_packages = - 1;
|
$number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']);
|
||||||
|
|
||||||
|
if(isset($_POST['number_of_aps_packages_ul']))
|
||||||
|
{
|
||||||
|
$number_of_aps_packages = - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$number_of_aps_packages = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||||
@@ -843,6 +862,7 @@ if($page == 'customers'
|
|||||||
{
|
{
|
||||||
if($password != '')
|
if($password != '')
|
||||||
{
|
{
|
||||||
|
$password = validatePassword($password);
|
||||||
$password = md5($password);
|
$password = md5($password);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -858,7 +878,17 @@ if($page == 'customers'
|
|||||||
if($createstdsubdomain == '1'
|
if($createstdsubdomain == '1'
|
||||||
&& $result['standardsubdomain'] == '0')
|
&& $result['standardsubdomain'] == '0')
|
||||||
{
|
{
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`) " . "VALUES ('" . $db->escape($result['loginname'] . '.' . $settings['system']['hostname']) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '')");
|
if (isset($settings['system']['stdsubdomain'])
|
||||||
|
&& $settings['system']['stdsubdomain'] != ''
|
||||||
|
) {
|
||||||
|
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['stdsubdomain'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$_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', '')");
|
||||||
$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'] . "'");
|
||||||
|
|||||||
@@ -624,7 +624,11 @@ if($page == 'domains'
|
|||||||
elseif($action == 'edit'
|
elseif($action == 'edit'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
$result = $db->query_first("SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`adminid`, `d`.`email_only`, `d`.`documentroot`, `d`.`ssl`, `d`.`ssl_redirect`, `d`.`ssl_ipandport`,`d`.`ipandport`, `d`.`aliasdomain`, `d`.`isbinddomain`, `d`.`isemaildomain`, `d`.`subcanemaildomain`, `d`.`dkim`, `d`.`caneditdomain`, `d`.`zonefile`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `d`.`add_date`, `d`.`registration_date`, `c`.`loginname`, `c`.`name`, `c`.`firstname`, `c`.`company`, `d`.`phpsettingid`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` " . "LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "WHERE `d`.`parentdomainid`='0' AND `d`.`id`='" . (int)$id . "'" . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' "));
|
$result = $db->query_first("SELECT `d`.*, `c`.`customerid` FROM `" . TABLE_PANEL_DOMAINS . "` `d`
|
||||||
|
LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`)
|
||||||
|
WHERE `d`.`parentdomainid`='0'
|
||||||
|
AND `d`.`id`='" . (int)$id . "'"
|
||||||
|
. ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' "));
|
||||||
|
|
||||||
if($result['domain'] != '')
|
if($result['domain'] != '')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -84,26 +84,38 @@ if($page == 'overview')
|
|||||||
$webserverinterface = strtoupper(@php_sapi_name());
|
$webserverinterface = strtoupper(@php_sapi_name());
|
||||||
|
|
||||||
if((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes')
|
if((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes')
|
||||||
|| (isset($lookfornewversion) && $lookfornewversion == 'yes'))
|
|| (isset($lookfornewversion) && $lookfornewversion == 'yes'))
|
||||||
{
|
{
|
||||||
$update_check_uri = 'http://version.froxlor.org/Froxlor/legacy/' . $version;
|
$update_check_uri = 'http://version.froxlor.org/Froxlor/legacy/' . $version;
|
||||||
|
|
||||||
if(strtolower(ini_get('allow_url_fopen')) == 'on')
|
if(ini_get('allow_url_fopen'))
|
||||||
{
|
{
|
||||||
$latestversion = @file($update_check_uri);
|
$latestversion = @file($update_check_uri);
|
||||||
|
|
||||||
$latestversion = explode(':', $latestversion);
|
if (isset($latestversion[0]))
|
||||||
|
|
||||||
if(is_array($latestversion)
|
|
||||||
&& count($latestversion) >= 2)
|
|
||||||
{
|
{
|
||||||
$lookfornewversion_lable = $latestversion[0];
|
$latestversion = explode('|', $latestversion[0]);
|
||||||
$lookfornewversion_link = $latestversion[1];
|
|
||||||
$lookfornewversion_addinfo = '';
|
|
||||||
|
|
||||||
if(count($latestversion) >= 3)
|
if(is_array($latestversion)
|
||||||
|
&& count($latestversion) >= 1)
|
||||||
{
|
{
|
||||||
$lookfornewversion_addinfo = $latestversion[2];
|
$_version = $latestversion[0];
|
||||||
|
$_message = $latestversion[1];
|
||||||
|
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
|
||||||
|
|
||||||
|
$lookfornewversion_lable = $_version;
|
||||||
|
$lookfornewversion_link = $_link;
|
||||||
|
$lookfornewversion_addinfo = $_message;
|
||||||
|
|
||||||
|
if (version_compare($version, $_version) == -1) {
|
||||||
|
$isnewerversion = 1;
|
||||||
|
} else {
|
||||||
|
$isnewerversion = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
redirectTo($update_check_uri.'/pretty', NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -121,6 +133,7 @@ if($page == 'overview')
|
|||||||
$lookfornewversion_lable = $lng['admin']['lookfornewversion']['clickhere'];
|
$lookfornewversion_lable = $lng['admin']['lookfornewversion']['clickhere'];
|
||||||
$lookfornewversion_link = htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
|
$lookfornewversion_link = htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
|
||||||
$lookfornewversion_addinfo = '';
|
$lookfornewversion_addinfo = '';
|
||||||
|
$isnewerversion = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, $settings['panel']['decimal_places']);
|
$userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, $settings['panel']['decimal_places']);
|
||||||
@@ -177,8 +190,8 @@ if($page == 'overview')
|
|||||||
$uptime_array = explode(" ", @file_get_contents("/proc/uptime"));
|
$uptime_array = explode(" ", @file_get_contents("/proc/uptime"));
|
||||||
|
|
||||||
if(is_array($uptime_array)
|
if(is_array($uptime_array)
|
||||||
&& isset($uptime_array[0])
|
&& isset($uptime_array[0])
|
||||||
&& is_numeric($uptime_array[0]))
|
&& is_numeric($uptime_array[0]))
|
||||||
{
|
{
|
||||||
// Some calculatioon to get a nicly formatted display
|
// Some calculatioon to get a nicly formatted display
|
||||||
|
|
||||||
@@ -207,7 +220,7 @@ if($page == 'overview')
|
|||||||
elseif($page == 'change_password')
|
elseif($page == 'change_password')
|
||||||
{
|
{
|
||||||
if(isset($_POST['send'])
|
if(isset($_POST['send'])
|
||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
$old_password = validate($_POST['old_password'], 'old password');
|
$old_password = validate($_POST['old_password'], 'old password');
|
||||||
|
|
||||||
@@ -251,7 +264,7 @@ elseif($page == 'change_password')
|
|||||||
elseif($page == 'change_language')
|
elseif($page == 'change_language')
|
||||||
{
|
{
|
||||||
if(isset($_POST['send'])
|
if(isset($_POST['send'])
|
||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
$def_language = validate($_POST['def_language'], 'default language');
|
$def_language = validate($_POST['def_language'], 'default language');
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,39 @@ if($page == 'overview')
|
|||||||
{
|
{
|
||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_updates");
|
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_updates");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this is a dirty hack but syscp 1.4.2.1 does not
|
||||||
|
* has any version/dbversion in the database (don't know why)
|
||||||
|
* so we have to set them both to run a correct upgrade
|
||||||
|
*/
|
||||||
|
if (!isFroxlor()) {
|
||||||
|
if (!isset($settings['panel']['version'])
|
||||||
|
|| $settings['panel']['version'] == ''
|
||||||
|
) {
|
||||||
|
$settings['panel']['version'] = '1.4.2.1';
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel','version','".$settings['panel']['version']."')");
|
||||||
|
}
|
||||||
|
if (!isset($settings['system']['dbversion'])
|
||||||
|
|| $settings['system']['dbversion'] == ''
|
||||||
|
) {
|
||||||
|
/**
|
||||||
|
* for syscp-stable (1.4.2.1) this value has to be 0
|
||||||
|
* so the required table-fields are added correctly
|
||||||
|
* and the svn-version has its value in the database
|
||||||
|
* -> bug #54
|
||||||
|
*/
|
||||||
|
|
||||||
|
$result = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `varname` = 'dbversion'");
|
||||||
|
|
||||||
|
if(isset($result['value']))
|
||||||
|
{
|
||||||
|
$settings['system']['dbversion'] = (int)$result['value'];
|
||||||
|
} else {
|
||||||
|
$settings['system']['dbversion'] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(hasUpdates($version))
|
if(hasUpdates($version))
|
||||||
{
|
{
|
||||||
if(isset($_POST['send'])
|
if(isset($_POST['send'])
|
||||||
|
|||||||
@@ -125,6 +125,11 @@ elseif($page == 'domains')
|
|||||||
if($paging->checkDisplay($i))
|
if($paging->checkDisplay($i))
|
||||||
{
|
{
|
||||||
$row = htmlentities_array($domain_array[$sortkey]);
|
$row = htmlentities_array($domain_array[$sortkey]);
|
||||||
|
if($settings['system']['awstats_enabled'] == '1') {
|
||||||
|
$statsapp = 'awstats/'.$row['domain'].'/';
|
||||||
|
} else {
|
||||||
|
$statsapp = 'webalizer';
|
||||||
|
}
|
||||||
eval("\$domains.=\"" . getTemplate("domains/domains_delimiter") . "\";");
|
eval("\$domains.=\"" . getTemplate("domains/domains_delimiter") . "\";");
|
||||||
|
|
||||||
if($paging->sortfield == 'd.domain'
|
if($paging->sortfield == 'd.domain'
|
||||||
@@ -286,7 +291,31 @@ elseif($page == 'domains')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result = $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`customerid`, `domain`, `documentroot`, `ipandport`, `aliasdomain`, `parentdomainid`, `isemaildomain`, `openbasedir`, `openbasedir_path`, `safemode`, `speciallogfile`, `specialsettings`, `ssl_redirect`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($completedomain) . "', '" . $db->escape($path) . "', '" . $db->escape($domain_check['ipandport']) . "', " . (($aliasdomain != 0) ? "'" . $db->escape($aliasdomain) . "'" : "NULL") . ", '" . (int)$domain_check['id'] . "', '" . ($domain_check['subcanemaildomain'] == '3' ? '1' : '0') . "', '" . $db->escape($domain_check['openbasedir']) . "', '" . $db->escape($openbasedir_path) . "', '" . $db->escape($domain_check['safemode']) . "', '" . $db->escape($domain_check['speciallogfile']) . "', '" . $db->escape($domain_check['specialsettings']) . "', '" . $ssl_redirect . "')");
|
// get the phpsettingid from parentdomain, #107
|
||||||
|
$phpsid_result = $db->query_first("SELECT `phpsettingid` FROM `".TABLE_PANEL_DOMAINS."` WHERE `id` = '".(int)$domain_check['id']."'");
|
||||||
|
if(!isset($phpsid_result['phpsettingid'])
|
||||||
|
|| (int)$phpsid_result['phpsettingid'] <= 0
|
||||||
|
) {
|
||||||
|
// assign default config
|
||||||
|
$phpsid_result['phpsettingid'] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET
|
||||||
|
`customerid` = '" . (int)$userinfo['customerid'] . "',
|
||||||
|
`domain` = '" . $db->escape($completedomain) . "',
|
||||||
|
`documentroot` = '" . $db->escape($path) . "',
|
||||||
|
`ipandport` = '" . $db->escape($domain_check['ipandport']) . "',
|
||||||
|
`aliasdomain` = ".(($aliasdomain != 0) ? "'" . $db->escape($aliasdomain) . "'" : "NULL") .",
|
||||||
|
`parentdomainid` = '" . (int)$domain_check['id'] . "',
|
||||||
|
`isemaildomain` = '" . ($domain_check['subcanemaildomain'] == '3' ? '1' : '0') . "',
|
||||||
|
`openbasedir` = '" . $db->escape($domain_check['openbasedir']) . "',
|
||||||
|
`openbasedir_path` = '" . $db->escape($openbasedir_path) . "',
|
||||||
|
`safemode` = '" . $db->escape($domain_check['safemode']) . "',
|
||||||
|
`speciallogfile` = '" . $db->escape($domain_check['speciallogfile']) . "',
|
||||||
|
`specialsettings` = '" . $db->escape($domain_check['specialsettings']) . "',
|
||||||
|
`ssl_redirect` = '" . $ssl_redirect . "',
|
||||||
|
`phpsettingid` = '" . $phpsid_result['phpsettingid'] . "'");
|
||||||
|
|
||||||
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
|
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
@@ -439,9 +468,9 @@ elseif($page == 'domains')
|
|||||||
|| $ssl_redirect != $result['ssl_redirect'])
|
|| $ssl_redirect != $result['ssl_redirect'])
|
||||||
{
|
{
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "edited domain '" . $idna_convert->decode($result['domain']) . "'");
|
$log->logAction(USR_ACTION, LOG_INFO, "edited domain '" . $idna_convert->decode($result['domain']) . "'");
|
||||||
|
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `documentroot`='" . $db->escape($path) . "', `isemaildomain`='" . (int)$isemaildomain . "', `iswildcarddomain`='" . (int)$iswildcarddomain . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ",`openbasedir_path`='" . $db->escape($openbasedir_path) . "', `ssl_redirect`='" . $ssl_redirect . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
inserttask('4');
|
inserttask('4');
|
||||||
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `documentroot`='" . $db->escape($path) . "', `isemaildomain`='" . (int)$isemaildomain . "', `iswildcarddomain`='" . (int)$iswildcarddomain . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ",`openbasedir_path`='" . $db->escape($openbasedir_path) . "', `ssl_redirect`='" . $ssl_redirect . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
|
|||||||
@@ -372,6 +372,7 @@ elseif($page == 'accounts')
|
|||||||
$email_full = $result['email_full'];
|
$email_full = $result['email_full'];
|
||||||
$username = $idna_convert->decode($email_full);
|
$username = $idna_convert->decode($email_full);
|
||||||
$password = validate($_POST['email_password'], 'password');
|
$password = validate($_POST['email_password'], 'password');
|
||||||
|
$password = validatePassword($password);
|
||||||
|
|
||||||
if($settings['panel']['sendalternativemail'] == 1)
|
if($settings['panel']['sendalternativemail'] == 1)
|
||||||
{
|
{
|
||||||
@@ -427,23 +428,24 @@ elseif($page == 'accounts')
|
|||||||
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['subject']), $replace_arr));
|
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['subject']), $replace_arr));
|
||||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_mailbody\'');
|
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_mailbody\'');
|
||||||
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['mailbody']), $replace_arr));
|
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['mailbody']), $replace_arr));
|
||||||
$mail->From = $admin['email'];
|
|
||||||
$mail->FromName = getCorrectUserSalutation($admin);
|
|
||||||
$mail->Subject = $mail_subject;
|
|
||||||
$mail->Body = $mail_body;
|
|
||||||
$mail->AddAddress($email_full, getCorrectUserSalutation($userinfo));
|
|
||||||
|
|
||||||
if(!$mail->Send())
|
$_mailerror = false;
|
||||||
{
|
try {
|
||||||
if($mail->ErrorInfo != '')
|
$mail->SetFrom($admin['email'], getCorrectUserSalutation($admin));
|
||||||
{
|
$mail->Subject = $mail_subject;
|
||||||
$mailerr_msg = $mail->ErrorInfo;
|
$mail->AltBody = $mail_body;
|
||||||
}
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
else
|
$mail->AddAddress($email_full, getCorrectUserSalutation($userinfo));
|
||||||
{
|
$mail->Send();
|
||||||
$mailerr_msg = $email;
|
} catch(phpmailerException $e) {
|
||||||
}
|
$mailerr_msg = $e->errorMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$mailerr_msg = $e->getMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
standard_error('errorsendingmail', $email);
|
standard_error('errorsendingmail', $email);
|
||||||
}
|
}
|
||||||
@@ -457,23 +459,24 @@ elseif($page == 'accounts')
|
|||||||
$mail_subject = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['subject']), $replace_arr);
|
$mail_subject = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['subject']), $replace_arr);
|
||||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_alternative_mailbody\'');
|
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_alternative_mailbody\'');
|
||||||
$mail_body = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['mailbody']), $replace_arr);
|
$mail_body = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['mailbody']), $replace_arr);
|
||||||
$mail->From = $admin['email'];
|
|
||||||
$mail->FromName = getCorrectUserSalutation($admin);
|
|
||||||
$mail->Subject = $mail_subject;
|
|
||||||
$mail->Body = $mail_body;
|
|
||||||
$mail->AddAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($userinfo));
|
|
||||||
|
|
||||||
if(!$mail->Send())
|
$_mailerror = false;
|
||||||
{
|
try {
|
||||||
if($mail->ErrorInfo != '')
|
$mail->SetFrom($admin['email'], getCorrectUserSalutation($admin));
|
||||||
{
|
$mail->Subject = $mail_subject;
|
||||||
$mailerr_msg = $mail->ErrorInfo;
|
$mail->AltBody = $mail_body;
|
||||||
}
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
else
|
$mail->AddAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($userinfo));
|
||||||
{
|
$mail->Send();
|
||||||
$mailerr_msg = $alternative_email;
|
} catch(phpmailerException $e) {
|
||||||
}
|
$mailerr_msg = $e->errorMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$mailerr_msg = $e->getMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
standard_error(array('errorsendingmail', $alternative_email));
|
standard_error(array('errorsendingmail', $alternative_email));
|
||||||
}
|
}
|
||||||
@@ -516,12 +519,12 @@ elseif($page == 'accounts')
|
|||||||
standard_error(array('stringisempty', 'mypassword'));
|
standard_error(array('stringisempty', 'mypassword'));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
$password = validatePassword($password);
|
||||||
$log->logAction(USR_ACTION, LOG_NOTICE, "changed email password for '" . $result['email_full'] . "'");
|
|
||||||
$result = $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET " . ($settings['system']['mailpwcleartext'] == '1' ? "`password` = '" . $db->escape($password) . "', " : '') . " `password_enc`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['popaccountid'] . "'");
|
$log->logAction(USR_ACTION, LOG_NOTICE, "changed email password for '" . $result['email_full'] . "'");
|
||||||
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
|
$result = $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET " . ($settings['system']['mailpwcleartext'] == '1' ? "`password` = '" . $db->escape($password) . "', " : '') . " `password_enc`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['popaccountid'] . "'");
|
||||||
}
|
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ elseif($page == 'accounts')
|
|||||||
{
|
{
|
||||||
$path = validate($_POST['path'], 'path');
|
$path = validate($_POST['path'], 'path');
|
||||||
$password = validate($_POST['ftp_password'], 'password');
|
$password = validate($_POST['ftp_password'], 'password');
|
||||||
|
$password = validatePassword($password);
|
||||||
|
|
||||||
if($settings['customer']['ftpatdomain'] == '1')
|
if($settings['customer']['ftpatdomain'] == '1')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ elseif($page == 'mysqls')
|
|||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
$password = validate($_POST['mysql_password'], 'password');
|
$password = validate($_POST['mysql_password'], 'password');
|
||||||
|
$password = validatePassword($password);
|
||||||
|
|
||||||
if($password == '')
|
if($password == '')
|
||||||
{
|
{
|
||||||
@@ -219,6 +220,7 @@ elseif($page == 'mysqls')
|
|||||||
// 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 != '')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -174,17 +174,13 @@ if(!is_null($month)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result = $db->query("(SELECT SUM(`http`) as sum FROM `" . TABLE_PANEL_TRAFFIC . "`
|
$result = $db->query("SELECT MAX(`http`), MAX(`ftp_up`+`ftp_down`), MAX(`mail`)
|
||||||
WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
FROM `" . TABLE_PANEL_TRAFFIC . "`
|
||||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) UNION
|
WHERE `customerid`='" . $userinfo['customerid'] . "'
|
||||||
(SELECT SUM(`ftp_up`+`ftp_down`) FROM `" . TABLE_PANEL_TRAFFIC . "`
|
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
||||||
WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
$row = mysql_fetch_row($result);
|
||||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) UNION
|
rsort($row);
|
||||||
(SELECT SUM(`mail`) FROM `" . TABLE_PANEL_TRAFFIC . "`
|
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));
|
||||||
WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
|
||||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) ORDER BY sum DESC LIMIT 1");
|
|
||||||
$row = $db->fetch_array($result);
|
|
||||||
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));;
|
|
||||||
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
||||||
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
||||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
||||||
|
|||||||
62
index.php
62
index.php
@@ -226,7 +226,7 @@ if($action == 'forgotpwd')
|
|||||||
|
|
||||||
if($db->num_rows() == 0)
|
if($db->num_rows() == 0)
|
||||||
{
|
{
|
||||||
$sql = "SELECT `adminid`, `firstname`, `name`, `email`, `loginname` FROM `" . TABLE_PANEL_ADMINS . "`
|
$sql = "SELECT `adminid`, `name`, `email`, `loginname` 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);
|
||||||
@@ -240,7 +240,18 @@ if($action == 'forgotpwd')
|
|||||||
{
|
{
|
||||||
if($user !== false)
|
if($user !== false)
|
||||||
{
|
{
|
||||||
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
|
if ($settings['panel']['password_min_length'] <= 6) {
|
||||||
|
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
|
||||||
|
} else {
|
||||||
|
// make it two times larger than password_min_length
|
||||||
|
$rnd = '';
|
||||||
|
$minlength = $settings['panel']['password_min_length'];
|
||||||
|
while (strlen($rnd) < ($minlength * 2))
|
||||||
|
{
|
||||||
|
$rnd .= md5(uniqid(microtime(), 1));
|
||||||
|
}
|
||||||
|
$password = substr($rnd, (int)($minlength / 2), $minlength);
|
||||||
|
}
|
||||||
|
|
||||||
if($adminchecked)
|
if($adminchecked)
|
||||||
{
|
{
|
||||||
@@ -258,23 +269,23 @@ 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!");
|
||||||
$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));
|
||||||
$mail->From = $settings['panel']['adminmail'];
|
|
||||||
$mail->FromName = 'Froxlor';
|
|
||||||
$mail->Subject = $lng['pwdreminder']['subject'];
|
|
||||||
$mail->Body = $body;
|
|
||||||
$mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']);
|
|
||||||
|
|
||||||
if(!$mail->Send())
|
$_mailerror = false;
|
||||||
{
|
try {
|
||||||
if($mail->ErrorInfo != '')
|
$mail->Subject = $lng['pwdreminder']['subject'];
|
||||||
{
|
$mail->AltBody = $body;
|
||||||
$mailerr_msg = $mail->ErrorInfo;
|
$mail->MsgHTML(str_replace("\\n", "<br />", $body));
|
||||||
}
|
$mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']);
|
||||||
else
|
$mail->Send();
|
||||||
{
|
} catch(phpmailerException $e) {
|
||||||
$mailerr_msg = $email;
|
$mailerr_msg = $e->errorMessage();
|
||||||
}
|
$_mailerror = true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$mailerr_msg = $e->getMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
||||||
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
redirectTo('index.php', Array('showmessage' => '4'), true);
|
redirectTo('index.php', Array('showmessage' => '4'), true);
|
||||||
@@ -292,7 +303,7 @@ if($action == 'forgotpwd')
|
|||||||
$message = $lng['login']['usernotfound'];
|
$message = $lng['login']['usernotfound'];
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($user, $adminchecked);
|
unset($user);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -304,9 +315,20 @@ if($action == 'forgotpwd')
|
|||||||
$message = '';
|
$message = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($settings['panel']['allow_preset'] != '1')
|
if($adminchecked)
|
||||||
{
|
{
|
||||||
$message = $lng['pwdreminder']['notallowed'];
|
if($settings['panel']['allow_preset_admin'] != '1')
|
||||||
|
{
|
||||||
|
$message = $lng['pwdreminder']['notallowed'];
|
||||||
|
unset ($adminchecked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($settings['panel']['allow_preset'] != '1')
|
||||||
|
{
|
||||||
|
$message = $lng['pwdreminder']['notallowed'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("fpwd") . "\";");
|
eval("echo \"" . getTemplate("fpwd") . "\";");
|
||||||
|
|||||||
@@ -451,7 +451,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.1');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.4');
|
||||||
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');
|
||||||
@@ -508,48 +508,55 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (77, 'dkim', 'use_dkim', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (77, 'dkim', 'use_dkim', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (78, 'system', 'webalizer_enabled', '1');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (78, 'system', 'webalizer_enabled', '1');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (79, 'system', 'awstats_enabled', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (79, 'system', 'awstats_enabled', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (80, 'system', 'awstats_domain_file', '/etc/awstats/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (80, 'dkim', 'dkim_prefix', '/etc/postfix/dkim/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (81, 'system', 'awstats_model_file', '/etc/awstats/awstats.model.conf.froxlor');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (81, 'dkim', 'dkim_domains', 'domains');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (82, 'dkim', 'dkim_prefix', '/etc/postfix/dkim/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (82, 'dkim', 'dkim_dkimkeys', 'dkim-keys.conf');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (83, 'dkim', 'dkim_domains', 'domains');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (83, 'dkim', 'dkimrestart_command', '/etc/init.d/dkim-filter restart');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (84, 'dkim', 'dkim_dkimkeys', 'dkim-keys.conf');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (84, 'panel', 'unix_names', '1');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (85, 'dkim', 'dkimrestart_command', '/etc/init.d/dkim-filter restart');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (85, 'panel', 'allow_preset', '1');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (86, 'panel', 'unix_names', '1');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (86, 'panel', 'allow_preset_admin', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (87, 'panel', 'allow_preset', '1');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (87, 'system', 'httpuser', 'www-data');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (88, 'system', 'awstats_path', '/usr/share/awstats/VERSION/webroot/cgi-bin/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (88, 'system', 'httpgroup', 'www-data');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (89, 'system', 'awstats_updateall_command', '/usr/bin/awstats_updateall.pl');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (89, 'system', 'webserver', 'apache2');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (90, 'panel', 'allow_preset_admin', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (90, 'autoresponder', 'autoresponder_active', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (91, 'system', 'httpuser', 'www-data');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (91, 'autoresponder', 'last_autoresponder_run', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (92, 'system', 'httpgroup', 'www-data');
|
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, 'system', 'webserver', 'apache2');
|
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, 'autoresponder', 'autoresponder_active', '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 (95, 'autoresponder', 'last_autoresponder_run', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (95, 'system', 'mod_fcgid_wrapper', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (96, 'admin', 'show_version_login', '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, 'admin', 'show_version_footer', '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 (98, 'admin', 'froxlor_graphic', 'images/header.gif');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (98, 'system', 'index_file_extension', 'html');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (99, 'system', 'mod_fcgid_wrapper', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (99, 'aps', 'items_per_page', '20');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (100, 'system', 'mod_fcgid_starter', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (100, 'aps', 'upload_fields', '5');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (101, 'system', 'mod_fcgid_peardir', '/usr/share/php/:/usr/share/php5/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (101, 'aps', 'aps_active', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (102, 'system', 'index_file_extension', 'html');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (102, 'aps', 'php-extension', '');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (103, 'aps', 'items_per_page', '20');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (103, 'aps', 'php-configuration', '');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (104, 'aps', 'upload_fields', '5');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (104, 'aps', 'webserver-htaccess', '');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (105, 'aps', 'aps_active', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (105, 'aps', 'php-function', '');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (1069, 'aps', 'php-extension', '');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (106, 'aps', 'webserver-module', '');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (107, 'aps', 'php-configuration', '');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (107, 'system', 'realtime_port', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (108, 'aps', 'webserver-htaccess', '');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (108, 'session', 'allow_multiple_login', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (109, 'aps', 'php-function', '');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (109, 'panel', 'allow_domain_change_admin', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (110, 'aps', 'webserver-module', '');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (110, 'panel', 'allow_domain_change_customer', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (111, 'system', 'realtime_port', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (111, 'system', 'mod_fcgid_maxrequests', '250');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (112, 'session', 'allow_multiple_login', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (112, 'system','ssl_key_file','/etc/apache2/apache2.key');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (113, 'panel', 'allow_domain_change_admin', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (113, 'system','ssl_ca_file','');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (114, 'panel', 'allow_domain_change_customer', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (114, 'panel', 'frontend', 'froxlor');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (115, 'system', 'mod_fcgid_maxrequests', '250');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (115, 'spf', 'use_spf', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (116, 'system','ssl_key_file','/etc/apache2/apache2.key');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (116, 'spf', 'spf_entry', '@ IN TXT "v=spf1 a mx -all"');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (117, 'system','ssl_ca_file','');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (117, 'system', 'debug_cron', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (118, 'panel', 'frontend', 'froxlor');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (118, 'panel', 'password_min_length', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (119, 'spf', 'use_spf', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (119, 'system', 'store_index_file_subs', '1');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (120, 'spf', 'spf_entry', '@ IN TXT "v=spf1 a mx -all"');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (120, 'panel', 'adminmail_defname', 'Froxlor Administrator');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (121, 'system', 'debug_cron', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (121, 'panel', 'adminmail_return', '');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (122, 'dkim', 'dkim_algorithm', 'all');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (123, 'dkim', 'dkim_add_adsp', '1');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (124, 'dkim', 'dkim_keylength', '1024');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (125, 'dkim', 'dkim_servicetype', '0');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (126, 'dkim', 'dkim_add_adsppolicy', '1');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (127, 'dkim', 'dkim_notes', '');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (128, 'system', 'stdsubdomain', '');
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
@@ -731,6 +738,7 @@ INSERT INTO `panel_languages` VALUES (13, 'Dutch', 'lng/dutch.lng.php');
|
|||||||
INSERT INTO `panel_languages` VALUES (14, 'Hungarian', 'lng/hungarian.lng.php');
|
INSERT INTO `panel_languages` VALUES (14, 'Hungarian', 'lng/hungarian.lng.php');
|
||||||
INSERT INTO `panel_languages` VALUES (15, 'Swedish', 'lng/swedish.lng.php');
|
INSERT INTO `panel_languages` VALUES (15, 'Swedish', 'lng/swedish.lng.php');
|
||||||
INSERT INTO `panel_languages` VALUES (16, 'Czech', 'lng/czech.lng.php');
|
INSERT INTO `panel_languages` VALUES (16, 'Czech', 'lng/czech.lng.php');
|
||||||
|
INSERT INTO `panel_languages` VALUES (17, 'Polski', 'lng/polish.lng.php');
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -156,6 +156,121 @@ function status_message($case, $text)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function requirement_checks()
|
||||||
|
{
|
||||||
|
global $lng;
|
||||||
|
page_header();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable">
|
||||||
|
<tr>
|
||||||
|
<td class="maintitle"><b><img src="../images/title.gif" alt="" /> Froxlor Installation</b></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$_die = false;
|
||||||
|
|
||||||
|
// check for correct php version
|
||||||
|
status_message('begin', $lng['install']['phpversion']);
|
||||||
|
|
||||||
|
if(version_compare("5.2.0", PHP_VERSION, ">="))
|
||||||
|
{
|
||||||
|
status_message('red', $lng['install']['notinstalled']);
|
||||||
|
$_die = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
status_message('green', 'OK');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_message('begin', $lng['install']['phpmysql']);
|
||||||
|
|
||||||
|
if(!extension_loaded('mysql'))
|
||||||
|
{
|
||||||
|
status_message('red', $lng['install']['notinstalled']);
|
||||||
|
$_die = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
status_message('green', 'OK');
|
||||||
|
}
|
||||||
|
|
||||||
|
status_message('begin', $lng['install']['phpfilter']);
|
||||||
|
|
||||||
|
if(!extension_loaded('filter'))
|
||||||
|
{
|
||||||
|
status_message('red', $lng['install']['notinstalled']);
|
||||||
|
$_die = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
status_message('green', 'OK');
|
||||||
|
}
|
||||||
|
|
||||||
|
status_message('begin', $lng['install']['phpposix']);
|
||||||
|
|
||||||
|
if(!extension_loaded('posix'))
|
||||||
|
{
|
||||||
|
status_message('red', $lng['install']['notinstalled']);
|
||||||
|
$_die = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
status_message('green', 'OK');
|
||||||
|
}
|
||||||
|
|
||||||
|
status_message('begin', $lng['install']['phpbcmath']);
|
||||||
|
|
||||||
|
if(!extension_loaded('bcmath'))
|
||||||
|
{
|
||||||
|
status_message('orange', $lng['install']['notinstalled'] . '<br />' . $lng['install']['bcmathdescription']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
status_message('green', 'OK');
|
||||||
|
}
|
||||||
|
|
||||||
|
status_message('begin', $lng['install']['openbasedir']);
|
||||||
|
$php_ob = @ini_get("open_basedir");
|
||||||
|
|
||||||
|
if(!empty($php_ob)
|
||||||
|
&& $php_ob != '')
|
||||||
|
{
|
||||||
|
status_message('orange', $lng['install']['openbasedirenabled']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
status_message('green', 'OK');
|
||||||
|
}
|
||||||
|
|
||||||
|
if($_die)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_display" align="center">
|
||||||
|
<?php echo $lng['install']['diedbecauseofrequirements']; ?><br />
|
||||||
|
<a href="install.php"><?php echo $lng['install']['click_here_to_refresh']; ?></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_display" align="center">
|
||||||
|
<?php echo $lng['install']['froxlor_succ_checks']; ?><br />
|
||||||
|
<a href="install.php?check=1"><?php echo $lng['install']['click_here_to_continue']; ?></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<?php
|
||||||
|
page_footer();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* END FUNCTIONS ---------------------------------------------------
|
* END FUNCTIONS ---------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@@ -174,7 +289,7 @@ else
|
|||||||
{
|
{
|
||||||
if(!empty($_SERVER['SERVER_NAME']))
|
if(!empty($_SERVER['SERVER_NAME']))
|
||||||
{
|
{
|
||||||
if(validate_ip($_SERVER['SERVER_NAME'], true) == false)
|
if(preg_match('/^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$/', $_SERVER['SERVER_NAME']) === false)
|
||||||
{
|
{
|
||||||
$servername = $_SERVER['SERVER_NAME'];
|
$servername = $_SERVER['SERVER_NAME'];
|
||||||
}
|
}
|
||||||
@@ -371,89 +486,6 @@ if(isset($_POST['installstep'])
|
|||||||
<td class="maintitle"><b><img src="../images/title.gif" alt="" /> Froxlor Installation</b></td>
|
<td class="maintitle"><b><img src="../images/title.gif" alt="" /> Froxlor Installation</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$_die = false;
|
|
||||||
|
|
||||||
// check for correct php version
|
|
||||||
status_message('begin', $lng['install']['phpversion']);
|
|
||||||
|
|
||||||
if(version_compare("5.2.0", PHP_VERSION, ">="))
|
|
||||||
{
|
|
||||||
status_message('red', $lng['install']['notinstalled']);
|
|
||||||
$_die = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
status_message('green', 'OK');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
status_message('begin', $lng['install']['phpmysql']);
|
|
||||||
|
|
||||||
if(!extension_loaded('mysql'))
|
|
||||||
{
|
|
||||||
status_message('red', $lng['install']['notinstalled']);
|
|
||||||
$_die = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
status_message('green', 'OK');
|
|
||||||
}
|
|
||||||
|
|
||||||
status_message('begin', $lng['install']['phpfilter']);
|
|
||||||
|
|
||||||
if(!extension_loaded('filter'))
|
|
||||||
{
|
|
||||||
status_message('red', $lng['install']['notinstalled']);
|
|
||||||
$_die = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
status_message('green', 'OK');
|
|
||||||
}
|
|
||||||
|
|
||||||
status_message('begin', $lng['install']['phpposix']);
|
|
||||||
|
|
||||||
if(!extension_loaded('posix'))
|
|
||||||
{
|
|
||||||
status_message('red', $lng['install']['notinstalled']);
|
|
||||||
$_die = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
status_message('green', 'OK');
|
|
||||||
}
|
|
||||||
|
|
||||||
status_message('begin', $lng['install']['phpbcmath']);
|
|
||||||
|
|
||||||
if(!extension_loaded('bcmath'))
|
|
||||||
{
|
|
||||||
status_message('orange', $lng['install']['notinstalled'] . '<br />' . $lng['install']['bcmathdescription']);
|
|
||||||
$_die = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
status_message('green', 'OK');
|
|
||||||
}
|
|
||||||
|
|
||||||
status_message('begin', $lng['install']['openbasedir']);
|
|
||||||
$php_ob = @ini_get("open_basedir");
|
|
||||||
|
|
||||||
if(!empty($php_ob)
|
|
||||||
&& $php_ob != '')
|
|
||||||
{
|
|
||||||
status_message('orange', $lng['install']['openbasedirenabled']);
|
|
||||||
$_die = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
status_message('green', 'OK');
|
|
||||||
}
|
|
||||||
|
|
||||||
if($_die)
|
|
||||||
{
|
|
||||||
status_message('begin', $lng['install']['diedbecauseofrequirements']);
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
|
|
||||||
//first test if we can access the database server with the given root user and password
|
//first test if we can access the database server with the given root user and password
|
||||||
|
|
||||||
@@ -475,7 +507,23 @@ if(isset($_POST['installstep'])
|
|||||||
|
|
||||||
if(is_file("/usr/bin/mysqldump"))
|
if(is_file("/usr/bin/mysqldump"))
|
||||||
{
|
{
|
||||||
$command = "/usr/bin/mysqldump " . $mysql_database . " -u " . $mysql_root_user . " --password='" . $mysql_root_pass . "' --result-file=" . $filename;
|
$do_backup = true;
|
||||||
|
$mysql_dump = '/usr/bin/mysqldump';
|
||||||
|
}
|
||||||
|
elseif(is_file("/usr/local/bin/mysqldump"))
|
||||||
|
{
|
||||||
|
$do_backup = true;
|
||||||
|
$mysql_dump = '/usr/local/bin/mysqldump';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$do_backup = false;
|
||||||
|
status_message('red', $lng['install']['backing_up_binary_missing']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($do_backup) {
|
||||||
|
|
||||||
|
$command = $mysql_dump . " " . $mysql_database . " -u " . $mysql_root_user . " --password='" . $mysql_root_pass . "' --result-file=" . $filename;
|
||||||
$output = exec($command);
|
$output = exec($command);
|
||||||
|
|
||||||
if(stristr($output, "error"))
|
if(stristr($output, "error"))
|
||||||
@@ -486,10 +534,7 @@ if(isset($_POST['installstep'])
|
|||||||
{
|
{
|
||||||
status_message('green', 'OK');
|
status_message('green', 'OK');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
status_message('red', $lng['install']['backing_up_binary_missing']);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -575,8 +620,6 @@ if(isset($_POST['installstep'])
|
|||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
|
||||||
|
|
||||||
//FIXME
|
|
||||||
|
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpuser) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpuser) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpgroup) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpgroup) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'");
|
||||||
|
|
||||||
@@ -602,10 +645,20 @@ if(isset($_POST['installstep'])
|
|||||||
$query = sprintf($query, TABLE_PANEL_SETTINGS);
|
$query = sprintf($query, TABLE_PANEL_SETTINGS);
|
||||||
$db->query($query);
|
$db->query($query);
|
||||||
|
|
||||||
|
// set specific times for some crons (traffic only at night, etc.)
|
||||||
|
$ts = mktime(0, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
|
||||||
|
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_traffic.php';");
|
||||||
|
$ts = mktime(1, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
|
||||||
|
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_used_tickets_reset.php';");
|
||||||
|
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_ticketarchive.php';");
|
||||||
|
|
||||||
// and lets insert the default ip and port
|
// and lets insert the default ip and port
|
||||||
|
|
||||||
$query = 'INSERT INTO `%s` SET `ip` = \'%s\', `port` = \'80\' ';
|
$query = "INSERT INTO `".TABLE_PANEL_IPSANDPORTS."`
|
||||||
$query = sprintf($query, TABLE_PANEL_IPSANDPORTS, $db->escape($serverip));
|
SET `ip`= '".$db->escape($serverip)."',
|
||||||
|
`port` = '80',
|
||||||
|
`vhostcontainer` = '1',
|
||||||
|
`vhostcontainer_servername_statement` = '1'";
|
||||||
$db->query($query);
|
$db->query($query);
|
||||||
$defaultip = $db->insert_id();
|
$defaultip = $db->insert_id();
|
||||||
|
|
||||||
@@ -708,10 +761,15 @@ if(isset($_POST['installstep'])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(isset($_GET['check'])
|
||||||
|
&& $_GET['check'] == '1')
|
||||||
|
{
|
||||||
page_header();
|
page_header();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="get">
|
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="get">
|
||||||
|
<input type="hidden" name="check" value="1" />
|
||||||
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40">
|
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" /> <?php echo $lng['install']['welcome']; ?></b></td>
|
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" /> <?php echo $lng['install']['welcome']; ?></b></td>
|
||||||
@@ -746,6 +804,7 @@ else
|
|||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="post">
|
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="post">
|
||||||
|
<input type="hidden" name="check" value="1" />
|
||||||
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40">
|
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" /> <?php echo $lng['install']['database']; ?></b></td>
|
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" /> <?php echo $lng['install']['database']; ?></b></td>
|
||||||
@@ -821,6 +880,11 @@ else
|
|||||||
<br />
|
<br />
|
||||||
<?php
|
<?php
|
||||||
page_footer();
|
page_footer();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
requirement_checks();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -84,4 +84,11 @@ $lng['install']['webserver'] = 'Webserver';
|
|||||||
$lng['install']['phpversion'] = 'Checking for PHP version >= 5.2';
|
$lng['install']['phpversion'] = 'Checking for PHP version >= 5.2';
|
||||||
$lng['install']['phpposix'] = 'Testing if PHP posix-extension is installed...';
|
$lng['install']['phpposix'] = 'Testing if PHP posix-extension is installed...';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Added in Froxlor 0.9.4
|
||||||
|
*/
|
||||||
|
$lng['install']['click_here_to_refresh'] = 'Re-check';
|
||||||
|
$lng['install']['click_here_to_continue'] = 'Continue installation';
|
||||||
|
$lng['install']['froxlor_succ_checks'] = 'All requirements are satisfied';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -84,4 +84,11 @@ $lng['install']['webserver'] = 'Webserver';
|
|||||||
$lng['install']['phpversion'] = 'Prüfe PHP Version >= 5.2';
|
$lng['install']['phpversion'] = 'Prüfe PHP Version >= 5.2';
|
||||||
$lng['install']['phpposix'] = 'Teste, ob die PHP Posix-Erweiterung installiert ist...';
|
$lng['install']['phpposix'] = 'Teste, ob die PHP Posix-Erweiterung installiert ist...';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Added in Froxlor 0.9.4
|
||||||
|
*/
|
||||||
|
$lng['install']['click_here_to_refresh'] = 'Erneut prüfen';
|
||||||
|
$lng['install']['click_here_to_continue'] = 'Installation fortführen';
|
||||||
|
$lng['install']['froxlor_succ_checks'] = 'Alle Vorraussetzungen sind erfüllt';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -20,13 +20,13 @@ if(isFroxlorVersion('0.9-r0'))
|
|||||||
showUpdateStep("Updating from 0.9-r0 to 0.9-r1", false);
|
showUpdateStep("Updating from 0.9-r0 to 0.9-r1", false);
|
||||||
showUpdateStep("Performing database updates");
|
showUpdateStep("Performing database updates");
|
||||||
/*
|
/*
|
||||||
* add missing database-updates if necessary (old: update/update_database.php
|
* add missing database-updates if necessary (old: update/update_database.php)
|
||||||
*/
|
*/
|
||||||
if(!isset($settings['system']['dbversion']) || $settings['system']['dbversion'] < '1')
|
if(isset($settings['system']['dbversion']) && (int)$settings['system']['dbversion'] < 1)
|
||||||
{
|
{
|
||||||
$db->query("ALTER TABLE `panel_databases` ADD `dbserver` INT( 11 ) UNSIGNED NOT NULL default '0';");
|
$db->query("ALTER TABLE `panel_databases` ADD `dbserver` INT( 11 ) UNSIGNED NOT NULL default '0';");
|
||||||
}
|
}
|
||||||
if(!isset($settings['system']['dbversion']) || $settings['system']['dbversion'] < '2')
|
if(isset($settings['system']['dbversion']) && (int)$settings['system']['dbversion'] < 2)
|
||||||
{
|
{
|
||||||
$db->query("ALTER TABLE `panel_ipsandports` CHANGE `ssl_cert` `ssl_cert_file` VARCHAR( 255 ) NOT NULL,
|
$db->query("ALTER TABLE `panel_ipsandports` CHANGE `ssl_cert` `ssl_cert_file` VARCHAR( 255 ) NOT NULL,
|
||||||
ADD `ssl_key_file` VARCHAR( 255 ) NOT NULL,
|
ADD `ssl_key_file` VARCHAR( 255 ) NOT NULL,
|
||||||
@@ -287,4 +287,109 @@ if(isFroxlorVersion('0.9'))
|
|||||||
updateToVersion('0.9.1');
|
updateToVersion('0.9.1');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.1'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.1 to 0.9.2", false);
|
||||||
|
|
||||||
|
showUpdateStep("Checking whether last-system-guid is sane");
|
||||||
|
|
||||||
|
$result = $db->query_first("SELECT MAX(`guid`) as `latestguid` FROM `".TABLE_PANEL_CUSTOMERS."`");
|
||||||
|
|
||||||
|
if (isset($result['latestguid'])
|
||||||
|
&& (int)$result['latestguid'] > 0
|
||||||
|
&& $result['latestguid'] != $settings['system']['lastguid']
|
||||||
|
) {
|
||||||
|
checkLastGuid();
|
||||||
|
lastStepStatus(1, 'fixed');
|
||||||
|
} else {
|
||||||
|
lastStepStatus(0);
|
||||||
|
}
|
||||||
|
updateToVersion('0.9.2');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.2'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.2 to 0.9.3");
|
||||||
|
lastStepStatus(0);
|
||||||
|
updateToVersion('0.9.3');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.3'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.3 to 0.9.3-svn1", false);
|
||||||
|
|
||||||
|
showUpdateStep("Updating tables");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'password_min_length', '0');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'store_index_file_subs', '1');");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.3-svn1');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.3-svn1'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.3-svn1 to 0.9.3-svn2", false);
|
||||||
|
|
||||||
|
showUpdateStep("Updating tables");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'adminmail_defname', 'Froxlor Administrator');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'adminmail_return', '');");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.3-svn2');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.3-svn2'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.3-svn2 to 0.9.3-svn3", false);
|
||||||
|
|
||||||
|
showUpdateStep("Correcting cron start-times");
|
||||||
|
// set specific times for some crons (traffic only at night, etc.)
|
||||||
|
$ts = mktime(0, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
|
||||||
|
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_traffic.php';");
|
||||||
|
$ts = mktime(1, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
|
||||||
|
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_used_tickets_reset.php';");
|
||||||
|
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_ticketarchive.php';");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
showUpdateStep("Adding new language: Polish");
|
||||||
|
$db->query("INSERT INTO `".TABLE_PANEL_LANGUAGE."` SET `language` = 'Polski', `file` = 'lng/polish.lng.php'");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.3-svn3');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.3-svn3'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.3-svn3 to 0.9.3-svn4", false);
|
||||||
|
|
||||||
|
showUpdateStep("Adding new DKIM settings");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_algorithm', 'all');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_add_adsp', '1');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_keylength', '1024');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_servicetype', '0');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_add_adsppolicy', '1');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_notes', '');");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.3-svn4');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.3-svn4'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.3-svn4 to 0.9.3-svn5", false);
|
||||||
|
|
||||||
|
showUpdateStep("Adding new settings");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'stdsubdomain', '');");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.3-svn5');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.3-svn5'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.3-svn5 to 0.9.4 final");
|
||||||
|
lastStepStatus(0);
|
||||||
|
updateToVersion('0.9.4');
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class ApsInstaller extends ApsParser
|
|||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->db_root = $db_root;
|
$this->db_root = $db_root;
|
||||||
$this->RootDir = dirname(dirname(__FILE__)) . '/';
|
$this->RootDir = dirname(dirname(dirname(dirname(__FILE__)))) . '/';
|
||||||
$this->Hosts = $settings['system']['mysql_access_host'];
|
$this->Hosts = $settings['system']['mysql_access_host'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,10 +135,20 @@ class ApsInstaller extends ApsParser
|
|||||||
{
|
{
|
||||||
//setup right path and run installation script
|
//setup right path and run installation script
|
||||||
|
|
||||||
|
if(!is_dir($this->RealPath . $this->DomainPath . '/install_scripts/'))
|
||||||
|
{
|
||||||
|
echo 'Directory: '. $this->RealPath . $this->DomainPath . '/install_scripts/ does not exist';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
chdir($this->RealPath . $this->DomainPath . '/install_scripts/');
|
chdir($this->RealPath . $this->DomainPath . '/install_scripts/');
|
||||||
$Return = array();
|
$Return = array();
|
||||||
$ReturnStatus = 0;
|
$ReturnStatus = 0;
|
||||||
$Return = safe_exec('php ' . escapeshellarg($this->RealPath . $this->DomainPath . '/install_scripts/configure install'), $ReturnStatus);
|
|
||||||
|
// make configure-script executable
|
||||||
|
chmod($this->RealPath . $this->DomainPath . '/install_scripts/configure', 0755);
|
||||||
|
|
||||||
|
$Return = safe_exec('php ' . escapeshellarg($this->RealPath . $this->DomainPath . '/install_scripts/configure') . ' install', $ReturnStatus);
|
||||||
|
|
||||||
if($ReturnStatus != 0)
|
if($ReturnStatus != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class ApsParser
|
|||||||
private $userinfo = array();
|
private $userinfo = array();
|
||||||
private $settings = array();
|
private $settings = array();
|
||||||
private $db = false;
|
private $db = false;
|
||||||
|
private $RootDir = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor of class, setup basic variables needed by the class
|
* Constructor of class, setup basic variables needed by the class
|
||||||
@@ -51,6 +52,7 @@ class ApsParser
|
|||||||
$this->settings = $settings;
|
$this->settings = $settings;
|
||||||
$this->userinfo = $userinfo;
|
$this->userinfo = $userinfo;
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
$this->RootDir = dirname(dirname(dirname(dirname(__FILE__)))) . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -793,7 +795,8 @@ class ApsParser
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$Errors[] = $lng['aps']['moveproblem'];
|
$moveproblem = str_replace('{$path}', $this->RootDir, $lng['aps']['moveproblem']);
|
||||||
|
$Errors[] = $moveproblem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -840,7 +843,7 @@ class ApsParser
|
|||||||
{
|
{
|
||||||
//split all keywords
|
//split all keywords
|
||||||
|
|
||||||
$Elements = split('[ ,;]', trim($_GET['keyword']));
|
$Elements = preg_split('/[ ,;]/', trim($_GET['keyword']));
|
||||||
|
|
||||||
if(count($Elements) == 1
|
if(count($Elements) == 1
|
||||||
&& strlen($Elements[0]) == 0)
|
&& strlen($Elements[0]) == 0)
|
||||||
@@ -1688,10 +1691,11 @@ class ApsParser
|
|||||||
$Error.= '<li>' . $lng['aps']['class_zip_missing'] . '</li>';
|
$Error.= '<li>' . $lng['aps']['class_zip_missing'] . '</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!is_writable('./temp/')
|
if(!is_writable($this->RootDir.'temp/')
|
||||||
|| !is_writable('./packages/'))
|
|| !is_writable($this->RootDir.'packages/'))
|
||||||
{
|
{
|
||||||
$Error.= '<li>' . $lng['aps']['dir_permissions'] . '</li>';
|
$dirpermission = str_replace('{$path}', $this->RootDir, $lng['aps']['dir_permissions']);
|
||||||
|
$Error.= '<li>' . $dirpermission . '</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($Error != '')
|
if($Error != '')
|
||||||
@@ -2411,7 +2415,8 @@ class ApsParser
|
|||||||
{
|
{
|
||||||
if(isset($_POST[$FieldId]))
|
if(isset($_POST[$FieldId]))
|
||||||
{
|
{
|
||||||
if(!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/", $_POST[$FieldId]))
|
$email = strtolower($_POST[$FieldId]);
|
||||||
|
if(filter_var($email, FILTER_VALIDATE_EMAIL) === false)
|
||||||
{
|
{
|
||||||
if(!in_array($FieldId, $Error))$Error[] = $FieldId;
|
if(!in_array($FieldId, $Error))$Error[] = $FieldId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,18 +32,26 @@ class ApsUpdater extends ApsParser
|
|||||||
private $RootUrl = '';
|
private $RootUrl = '';
|
||||||
private $RootDir = '';
|
private $RootDir = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FroxlorLogger
|
||||||
|
* @var FroxlorLogger
|
||||||
|
*/
|
||||||
|
private $_cronlog = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* constructor of class. setup some basic variables needed by class
|
* constructor of class. setup some basic variables needed by class
|
||||||
*
|
*
|
||||||
* @param db instance of the database class from syscp
|
* @param db instance of the database class
|
||||||
|
* @param cronlog instance of the froxlor logger
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function __construct($db)
|
public function __construct($db, $cronlog)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->RequestDomain = 'apscatalog.com';
|
$this->RequestDomain = 'apscatalog.com';
|
||||||
$this->RootUrl = '/1/';
|
$this->RootUrl = '/1/';
|
||||||
$this->RootDir = dirname(dirname(__FILE__)) . '/';
|
$this->RootDir = dirname(dirname(dirname(dirname(__FILE__)))) . '/';
|
||||||
|
$this->_cronlog = $cronlog;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -52,13 +60,15 @@ class ApsUpdater extends ApsParser
|
|||||||
|
|
||||||
public function UpdateHandler()
|
public function UpdateHandler()
|
||||||
{
|
{
|
||||||
|
$this->_cronlog->logAction(CRON_ACTION, LOG_NOTICE, "Changing directory to '" . $this->RootDir . "'");
|
||||||
chdir($this->RootDir);
|
chdir($this->RootDir);
|
||||||
|
|
||||||
//return if allow_url_fopen is disabled
|
//return if allow_url_fopen is disabled
|
||||||
|
|
||||||
if(ini_get('allow_url_fopen') == '0')
|
if(!ini_get('allow_url_fopen'))
|
||||||
{
|
{
|
||||||
echo ("The APS updater cronjob requires that allow_url_fopen is enabled for the PHP CLI binary!\n");
|
$this->_cronlog->logAction(CRON_ACTION, LOG_ERROR, "The APS updater cronjob requires that allow_url_fopen is enabled for the PHP CLI binary!");
|
||||||
|
echo "The APS updater cronjob requires that allow_url_fopen is enabled for the PHP CLI binary!\n";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,6 +78,7 @@ class ApsUpdater extends ApsParser
|
|||||||
|
|
||||||
if($this->db->num_rows($Result) == 0)
|
if($this->db->num_rows($Result) == 0)
|
||||||
{
|
{
|
||||||
|
$this->_cronlog->logAction(CRON_ACTION, LOG_NOTICE, "No tasks for ApsUpdater");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,89 +88,99 @@ class ApsUpdater extends ApsParser
|
|||||||
$this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . $Task['Task']);
|
$this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . $Task['Task']);
|
||||||
|
|
||||||
//fetch all vendors
|
//fetch all vendors
|
||||||
|
$this->_cronlog->logAction(CRON_ACTION, LOG_NOTICE, "Fetching all Vendors from '" . $this->RootUrl . "'");
|
||||||
$Vendors = self::FetchSubUrls($this->RootUrl);
|
$Vendors = self::FetchSubUrls($this->RootUrl);
|
||||||
foreach($Vendors as $Vendor)
|
if($Vendors !== false)
|
||||||
{
|
{
|
||||||
//fetch all applications from vendors
|
foreach($Vendors as $Vendor)
|
||||||
|
|
||||||
$Applications = self::FetchSubUrls($this->RootUrl . $Vendor);
|
|
||||||
foreach($Applications as $Application)
|
|
||||||
{
|
{
|
||||||
//get newest version of package which is already installed
|
//fetch all applications from vendors
|
||||||
|
$this->_cronlog->logAction(CRON_ACTION, LOG_NOTICE, "Fetching all from Vendor '" . $Vendor. "'");
|
||||||
$CurrentVersion = '';
|
$Applications = self::FetchSubUrls($this->RootUrl . $Vendor);
|
||||||
$Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Name` = "' . $this->db->escape(substr($Application, 0, -1)) . '"');
|
if($Applications !== false)
|
||||||
|
|
||||||
while($Row = $this->db->fetch_array($Result))
|
|
||||||
{
|
{
|
||||||
if(version_compare($Row['Version'] . '-' . $Row['Release'], $CurrentVersion) == 1)
|
foreach($Applications as $Application)
|
||||||
{
|
{
|
||||||
$CurrentVersion = $Row['Version'] . '-' . $Row['Release'];
|
//get newest version of package which is already installed
|
||||||
}
|
$this->_cronlog->logAction(CRON_ACTION, LOG_NOTICE, "Checking application '" . substr($Application, 0, -1) . "'");
|
||||||
}
|
|
||||||
|
|
||||||
if($this->db->num_rows($Result) != 0)
|
$CurrentVersion = '';
|
||||||
{
|
$Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Name` = "' . $this->db->escape(substr($Application, 0, -1)) . '"');
|
||||||
//package already installed in system, search for newer version
|
|
||||||
|
|
||||||
if($Task['Task'] != TASK_SYSTEM_UPDATE)continue;
|
while($Row = $this->db->fetch_array($Result))
|
||||||
|
|
||||||
//fetch different versions of application from distribution server
|
|
||||||
|
|
||||||
$NewerVersion = '';
|
|
||||||
$Versions = self::FetchSubUrls($this->RootUrl . $Vendor . $Application);
|
|
||||||
foreach($Versions as $Version)
|
|
||||||
{
|
|
||||||
$OnlineVersion = substr($Version, 0, -1);
|
|
||||||
|
|
||||||
//is package newer than current version?
|
|
||||||
|
|
||||||
if(version_compare($OnlineVersion, $CurrentVersion) == 1)
|
|
||||||
{
|
{
|
||||||
//is new package newer than another one found before?
|
if(version_compare($Row['Version'] . '-' . $Row['Release'], $CurrentVersion) == 1)
|
||||||
|
|
||||||
if(version_compare($OnlineVersion, $NewerVersion) == 1)
|
|
||||||
{
|
{
|
||||||
$NewerVersion = $OnlineVersion;
|
$CurrentVersion = $Row['Version'] . '-' . $Row['Release'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if($NewerVersion != '')
|
if($this->db->num_rows($Result) != 0)
|
||||||
{
|
|
||||||
//download package as an update
|
|
||||||
|
|
||||||
self::DownloadPackage($this->RootUrl . $Vendor . $Application . $NewerVersion, substr($Application, 0, -1), $NewerVersion);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if($Task['Task'] != TASK_SYSTEM_DOWNLOAD)continue;
|
|
||||||
|
|
||||||
//new packages
|
|
||||||
|
|
||||||
$NewVersion = '';
|
|
||||||
$Versions = self::FetchSubUrls($this->RootUrl . $Vendor . $Application);
|
|
||||||
foreach($Versions as $Version)
|
|
||||||
{
|
|
||||||
$OnlineVersion = substr($Version, 0, -1);
|
|
||||||
|
|
||||||
//is package newer than another one found before?
|
|
||||||
|
|
||||||
if(version_compare($OnlineVersion, $NewVersion) == 1)
|
|
||||||
{
|
{
|
||||||
$NewVersion = $OnlineVersion;
|
//package already installed in system, search for newer version
|
||||||
|
|
||||||
|
if($Task['Task'] != TASK_SYSTEM_UPDATE)continue;
|
||||||
|
|
||||||
|
//fetch different versions of application from distribution server
|
||||||
|
|
||||||
|
$NewerVersion = '';
|
||||||
|
$Versions = self::FetchSubUrls($this->RootUrl . $Vendor . $Application);
|
||||||
|
if($Versions !== false)
|
||||||
|
{
|
||||||
|
foreach($Versions as $Version)
|
||||||
|
{
|
||||||
|
$OnlineVersion = substr($Version, 0, -1);
|
||||||
|
|
||||||
|
//is package newer than current version?
|
||||||
|
|
||||||
|
if(version_compare($OnlineVersion, $CurrentVersion) == 1)
|
||||||
|
{
|
||||||
|
//is new package newer than another one found before?
|
||||||
|
|
||||||
|
if(version_compare($OnlineVersion, $NewerVersion) == 1)
|
||||||
|
{
|
||||||
|
$NewerVersion = $OnlineVersion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($NewerVersion != '')
|
||||||
|
{
|
||||||
|
//download package as an update
|
||||||
|
|
||||||
|
self::DownloadPackage($this->RootUrl . $Vendor . $Application . $NewerVersion, substr($Application, 0, -1), $NewerVersion);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
|
if($Task['Task'] != TASK_SYSTEM_DOWNLOAD)continue;
|
||||||
|
|
||||||
if($NewVersion != '')
|
//new packages
|
||||||
{
|
|
||||||
//download package as a new one
|
|
||||||
|
|
||||||
self::DownloadPackage($this->RootUrl . $Vendor . $Application . $NewVersion, substr($Application, 0, -1), $NewVersion);
|
$NewVersion = '';
|
||||||
continue;
|
$Versions = self::FetchSubUrls($this->RootUrl . $Vendor . $Application);
|
||||||
|
foreach($Versions as $Version)
|
||||||
|
{
|
||||||
|
$OnlineVersion = substr($Version, 0, -1);
|
||||||
|
|
||||||
|
//is package newer than another one found before?
|
||||||
|
|
||||||
|
if(version_compare($OnlineVersion, $NewVersion) == 1)
|
||||||
|
{
|
||||||
|
$NewVersion = $OnlineVersion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($NewVersion != '')
|
||||||
|
{
|
||||||
|
//download package as a new one
|
||||||
|
|
||||||
|
self::DownloadPackage($this->RootUrl . $Vendor . $Application . $NewVersion, substr($Application, 0, -1), $NewVersion);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -181,11 +202,13 @@ class ApsUpdater extends ApsParser
|
|||||||
|
|
||||||
//make url valid
|
//make url valid
|
||||||
|
|
||||||
$Url = str_replace(' ', '%20', $Url);
|
$path = dirname($Url);
|
||||||
|
$file = urlencode(basename($Url));
|
||||||
|
$file_url = 'http://' . $this->RequestDomain . $path . '/' . $file . '.aps' . $Downloads[0];
|
||||||
|
|
||||||
//get content from website url
|
//get content from website url
|
||||||
|
$this->_cronlog->logAction(CRON_ACTION, LOG_NOTICE, "Downloading '" . $file_url . "'");
|
||||||
$Content = @file_get_contents('http://' . $this->RequestDomain . $Url . '.aps' . $Downloads[0]);
|
$Content = @file_get_contents($file_url);
|
||||||
|
|
||||||
if($Content != false)
|
if($Content != false)
|
||||||
{
|
{
|
||||||
@@ -231,21 +254,22 @@ class ApsUpdater extends ApsParser
|
|||||||
//make url valid
|
//make url valid
|
||||||
|
|
||||||
$Url = str_replace(' ', '%20', $Url);
|
$Url = str_replace(' ', '%20', $Url);
|
||||||
|
$file_url = 'http://' . $this->RequestDomain . $Url;
|
||||||
|
|
||||||
//get content from website url
|
//get content from website url
|
||||||
|
|
||||||
$Content = @file('http://' . $this->RequestDomain . $Url);
|
$Content = @file($file_url);
|
||||||
|
|
||||||
if($Content != false)
|
if($Content !== false)
|
||||||
{
|
{
|
||||||
foreach($Content as $Temp)
|
foreach($Content as $Temp)
|
||||||
{
|
{
|
||||||
//skip empty lines
|
//skip empty lines
|
||||||
|
|
||||||
if($Temp != "\r\n"
|
if($Temp != "\r\n"
|
||||||
&& $Temp != "\r"
|
&& $Temp != "\r"
|
||||||
&& $Temp != "\n"
|
&& $Temp != "\n"
|
||||||
&& $Temp != "")
|
&& $Temp != "")
|
||||||
{
|
{
|
||||||
//remove unwanted characters
|
//remove unwanted characters
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -286,14 +286,25 @@ class ticket
|
|||||||
|
|
||||||
if($customerid != - 1)
|
if($customerid != - 1)
|
||||||
{
|
{
|
||||||
$mail->From = $this->settings['ticket']['noreply_email'];
|
$_mailerror = false;
|
||||||
$mail->FromName = $this->settings['ticket']['noreply_name'];
|
try {
|
||||||
$mail->Subject = $mail_subject;
|
$mail->SetFrom($this->settings['ticket']['noreply_email'], $this->settings['ticket']['noreply_name']);
|
||||||
$mail->Body = $mail_body;
|
$mail->Subject = $mail_subject;
|
||||||
$mail->AddAddress($usr['email'], $usr['firstname'] . ' ' . $usr['name']);
|
$mail->AltBody = $mail_body;
|
||||||
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
|
$mail->AddAddress($usr['email'], $usr['firstname'] . ' ' . $usr['name']);
|
||||||
|
$mail->Send();
|
||||||
|
} catch(phpmailerException $e) {
|
||||||
|
$mailerr_msg = $e->errorMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$mailerr_msg = $e->getMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!$mail->Send())
|
if ($_mailerror) {
|
||||||
{
|
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'ticket_class'), $this->db, $this->settings);
|
||||||
|
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
standard_error(array('errorsendingmail', $usr['email']));
|
standard_error(array('errorsendingmail', $usr['email']));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,15 +312,27 @@ class ticket
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$admin = $this->db->query_first("SELECT `name`, email` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$this->userinfo['adminid'] . "'");
|
$admin = $this->db->query_first("SELECT `name`, `email` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$this->userinfo['adminid'] . "'");
|
||||||
$mail->From = $this->settings['ticket']['noreply_email'];
|
|
||||||
$mail->FromName = $this->settings['ticket']['noreply_name'];
|
|
||||||
$mail->Subject = $mail_subject;
|
|
||||||
$mail->Body = $mail_body;
|
|
||||||
$mail->AddAddress($admin['email'], $admin['name']);
|
|
||||||
|
|
||||||
if(!$mail->Send())
|
$_mailerror = false;
|
||||||
{
|
try {
|
||||||
|
$mail->SetFrom($this->settings['ticket']['noreply_email'], $this->settings['ticket']['noreply_name']);
|
||||||
|
$mail->Subject = $mail_subject;
|
||||||
|
$mail->AltBody = $mail_body;
|
||||||
|
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
|
$mail->AddAddress($admin['email'], $admin['name']);
|
||||||
|
$mail->Send();
|
||||||
|
} catch(phpmailerException $e) {
|
||||||
|
$mailerr_msg = $e->errorMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$mailerr_msg = $e->getMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
|
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'ticket_class'), $this->db, $this->settings);
|
||||||
|
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
standard_error(array('errorsendingmail', $admin['email']));
|
standard_error(array('errorsendingmail', $admin['email']));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -637,7 +660,7 @@ class ticket
|
|||||||
{
|
{
|
||||||
if($_cid != 0)
|
if($_cid != 0)
|
||||||
{
|
{
|
||||||
$result = $_db->query('SELECT `id` FROM `' . TABLE_PANEL_TICKETS . '` WHERE `customer` ="'.(int)$_cid.'"');
|
$result = $_db->query('SELECT `id` FROM `' . TABLE_PANEL_TICKETS . '` WHERE `customerid` ="'.(int)$_cid.'"');
|
||||||
|
|
||||||
$tickets = array();
|
$tickets = array();
|
||||||
while($row = $_db->fetch_array($result))
|
while($row = $_db->fetch_array($result))
|
||||||
@@ -668,7 +691,11 @@ class ticket
|
|||||||
{
|
{
|
||||||
if(strtolower($_var) == 'message')
|
if(strtolower($_var) == 'message')
|
||||||
{
|
{
|
||||||
return htmlspecialchars_decode(nl2br($this->t_data[$_var]));
|
return str_replace('script>', 'pre>', htmlspecialchars_decode(nl2br($this->t_data[$_var])));
|
||||||
|
}
|
||||||
|
elseif(strtolower($_var) == 'subject')
|
||||||
|
{
|
||||||
|
return str_replace('script>', 'pre>', htmlspecialchars_decode(nl2br($this->t_data[$_var])));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ return Array(
|
|||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
'mkdir -p ' . $settings['system']['deactivateddocroot'],
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'a2dismod userdir',
|
'a2dismod userdir',
|
||||||
@@ -50,8 +51,11 @@ return Array(
|
|||||||
$configcommand['diroptions'],
|
$configcommand['diroptions'],
|
||||||
$configcommand['v_inclighty'],
|
$configcommand['v_inclighty'],
|
||||||
$configcommand['d_inclighty'],
|
$configcommand['d_inclighty'],
|
||||||
|
'lighty-disable-mod cgi',
|
||||||
|
'lighty-disable-mod fastcgi',
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
'mkdir -p ' . $settings['system']['deactivateddocroot'],
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
),
|
),
|
||||||
@@ -68,8 +72,8 @@ return Array(
|
|||||||
'label' => 'Bind9',
|
'label' => 'Bind9',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'apt-get install bind9',
|
'apt-get install bind9',
|
||||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/bind/named.conf',
|
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||||
'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf'
|
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/bind9 restart'
|
'/etc/init.d/bind9 restart'
|
||||||
@@ -191,6 +195,9 @@ return Array(
|
|||||||
'daemons' => Array(
|
'daemons' => Array(
|
||||||
'proftpd' => Array(
|
'proftpd' => Array(
|
||||||
'label' => 'ProFTPd',
|
'label' => 'ProFTPd',
|
||||||
|
'commands' => Array(
|
||||||
|
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||||
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||||
@@ -248,17 +255,13 @@ return Array(
|
|||||||
),
|
),
|
||||||
'awstats' => Array(
|
'awstats' => Array(
|
||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'files' => Array(
|
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
|
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
|
||||||
),
|
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
'apt-get install awstats',
|
||||||
|
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
|
||||||
|
),
|
||||||
|
'files' => Array(
|
||||||
|
'etc_awstats.model.conf' => '/etc/awstats/awstats.conf'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
'label' => 'libnss (system login with mysql)',
|
'label' => 'libnss (system login with mysql)',
|
||||||
|
|||||||
184
lib/configfiles/freebsd.inc.php
Normal file
184
lib/configfiles/freebsd.inc.php
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Configfiles
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
return Array(
|
||||||
|
'freebsd' => Array(
|
||||||
|
'label' => 'FreeBSD',
|
||||||
|
'services' => Array(
|
||||||
|
'http' => Array(
|
||||||
|
'label' => $lng['admin']['configfiles']['http'],
|
||||||
|
'daemons' => Array(
|
||||||
|
'apache2' => Array(
|
||||||
|
'label' => 'Apache2 Webserver',
|
||||||
|
'commands' => Array(
|
||||||
|
'cd /usr/ports/www/apache22',
|
||||||
|
'make config',
|
||||||
|
'make install',
|
||||||
|
'touch ' . $settings['system']['apacheconf_vhost'],
|
||||||
|
'chown root:0 ' . $settings['system']['apacheconf_vhost'],
|
||||||
|
'chmod 0600 ' . $settings['system']['apacheconf_vhost'],
|
||||||
|
'touch ' . $settings['system']['apacheconf_diroptions'],
|
||||||
|
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
|
||||||
|
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
|
||||||
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||||
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
|
'echo "accf_http_load=\"YES\"" >> /boot/loader.conf',
|
||||||
|
'echo "accf_data_load=\"YES\"" >> /boot/loader.conf',
|
||||||
|
'echo "apache22_enable=\"YES\"" >> /etc/rc.conf',
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'sh /usr/local/etc/rc.d/apache22 restart'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'dns' => Array(
|
||||||
|
'label' => $lng['admin']['configfiles']['dns'],
|
||||||
|
'daemons' => Array(
|
||||||
|
'powerdns' => Array(
|
||||||
|
'label' => 'PowerDNS',
|
||||||
|
'commands_1' => Array(
|
||||||
|
'cd /usr/ports/dns/powerdns',
|
||||||
|
'make config',
|
||||||
|
'make install',
|
||||||
|
'echo "add pdns_enable=\"YES\"" >> /etc/rc.conf',
|
||||||
|
),
|
||||||
|
'files' => Array(
|
||||||
|
'usr_local_etc_pdns_pdns.conf' => '/usr/local/etc/pdns/pdns.conf'
|
||||||
|
),
|
||||||
|
'commands' => Array(
|
||||||
|
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||||
|
'chown root:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||||
|
'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'sh /usr/local/etc/rc.d/pdns restart'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'smtp' => Array(
|
||||||
|
'label' => $lng['admin']['configfiles']['smtp'],
|
||||||
|
'daemons' => Array(
|
||||||
|
'postfix' => Array(
|
||||||
|
'label' => 'Postfix',
|
||||||
|
'commands_1' => Array(
|
||||||
|
'cd /usr/ports/mail/postfix',
|
||||||
|
'make config',
|
||||||
|
'set Dovecot SASL authentication method',
|
||||||
|
'set Enable SSL and TLS support',
|
||||||
|
'set MySQL maps (choose version with WITH_MYSQL_VER)',
|
||||||
|
'make install'
|
||||||
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'pw groupadd vmail -g 5001 ',
|
||||||
|
'pw useradd vmail -u 5001 -g 5001 -s/sbin/nologin -d/dev/null',
|
||||||
|
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||||
|
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||||
|
'chmod 0750 ' . $settings['system']['vmail_homedir']
|
||||||
|
),
|
||||||
|
'commands_3' => Array(
|
||||||
|
'echo "sendmail_enable=\"NO\"" >> /etc/rc.conf',
|
||||||
|
'echo "sendmail_submit_enable=\"NO\"" >> /etc/rc.conf',
|
||||||
|
'echo "sendmail_outbound_enable=\"NO\"" >> /etc/rc.conf',
|
||||||
|
'echo "sendmail_msp_queue_enable=\"NO\"" >> /etc/rc.conf',
|
||||||
|
'echo "postfix_enable=\"YES\"" >> /etc/rc.conf'
|
||||||
|
),
|
||||||
|
'files' => Array(
|
||||||
|
'etc_periodic.conf' => '/etc/periodic.conf',
|
||||||
|
'usr_local_etc_postfix_main.cf' => '/usr/local/etc/postfix/main.cf',
|
||||||
|
'usr_local_etc_postfix_mysql-virtual_alias_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
|
'usr_local_etc_postfix_mysql-virtual_mailbox_domains.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
|
'usr_local_etc_postfix_mysql-virtual_mailbox_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf'
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'sh /usr/local/etc/rc.d/postfix restart'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'dkim' => Array(
|
||||||
|
'label' => 'DomainKey filter',
|
||||||
|
'commands' => Array(
|
||||||
|
'cd /usr/ports/mail/dkim-milter/',
|
||||||
|
'make install clean',
|
||||||
|
'touch /usr/local/etc/mail/dkim-filter.conf'
|
||||||
|
),
|
||||||
|
'files' => Array(
|
||||||
|
'dkim-filter.conf' => '/usr/local/etc/mail/dkim-filter.conf',
|
||||||
|
'postfix_dkim_addition.cf' => '/usr/local/etc/postfix/main.cf'
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'/usr/local/etc/rc.d/milter-dkim restart '
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'mail' => Array(
|
||||||
|
'label' => $lng['admin']['configfiles']['mail'],
|
||||||
|
'daemons' => Array(
|
||||||
|
'dovecot' => Array(
|
||||||
|
'label' => 'Dovecot',
|
||||||
|
'commands_1' => Array(
|
||||||
|
'cd /usr/ports/mail/dovecot',
|
||||||
|
'make config',
|
||||||
|
'set kqueue(2) support ',
|
||||||
|
'set SSL support ',
|
||||||
|
'set ManageSieve support (optional)',
|
||||||
|
'set MySQL support ',
|
||||||
|
'make install',
|
||||||
|
'echo "add dovecot_enable=\"YES\"" >> /etc/rc.conf'
|
||||||
|
),
|
||||||
|
'files' => Array(
|
||||||
|
'usr_local_etc_dovecot.conf' => '/usr/local/etc/dovecot.conf',
|
||||||
|
'usr_local_etc_dovecot-sql.conf' => '/usr/local/etc/dovecot-sql.conf'
|
||||||
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'echo "dovecot unix - n n - - pipe
|
||||||
|
flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}" >> /usr/local/etc/postfix/master.cf'
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'sh /usr/local/etc/rc.d/dovecot restart'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'ftp' => Array(
|
||||||
|
'label' => $lng['admin']['configfiles']['ftp'],
|
||||||
|
'daemons' => Array(
|
||||||
|
'proftpd' => Array(
|
||||||
|
'label' => 'ProFTPd',
|
||||||
|
'files' => Array(
|
||||||
|
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||||
|
),
|
||||||
|
'commands' => Array(
|
||||||
|
'touch /etc/proftpd/proftpd.conf',
|
||||||
|
'chown root:0 /etc/proftpd/proftpd.conf',
|
||||||
|
'chmod 0600 /etc/proftpd/proftpd.conf'
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'/etc/init.d/proftpd restart'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -34,9 +34,10 @@ return Array(
|
|||||||
'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'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'rc-update add apache2 default',
|
'rc-update add apache2 default',
|
||||||
@@ -54,7 +55,8 @@ return Array(
|
|||||||
$configcommand['v_inclighty'],
|
$configcommand['v_inclighty'],
|
||||||
$configcommand['d_inclighty'],
|
$configcommand['d_inclighty'],
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory']
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : ''
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'rc-update add lighttpd default',
|
'rc-update add lighttpd default',
|
||||||
@@ -72,10 +74,10 @@ return Array(
|
|||||||
'etc_bind_default.zone' => '/etc/bind/default.zone'
|
'etc_bind_default.zone' => '/etc/bind/default.zone'
|
||||||
),
|
),
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/bind/named.conf',
|
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||||
'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf',
|
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||||
'chown root:0 ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf',
|
'chown root:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||||
'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf'
|
'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'rc-update add named default',
|
'rc-update add named default',
|
||||||
@@ -129,19 +131,21 @@ return Array(
|
|||||||
'dkim' => Array(
|
'dkim' => Array(
|
||||||
'label' => 'DomainKey filter',
|
'label' => 'DomainKey filter',
|
||||||
'commands_1' => Array(
|
'commands_1' => Array(
|
||||||
|
'emerge dkim-milter',
|
||||||
|
'emerge --config mail-filter/dkim-milter',
|
||||||
'mkdir -p /etc/postfix/dkim'
|
'mkdir -p /etc/postfix/dkim'
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'dkim-filter.conf' => '/etc/postfix/dkim/dkim-filter.conf'
|
'dkim-filter.conf' => '/etc/mail/dkim-filter/dkim-filter.conf'
|
||||||
),
|
),
|
||||||
'commands_2' => Array(
|
'commands_2' => Array(
|
||||||
'chgrp postfix /etc/postfix/dkim/dkim-filter.conf',
|
'echo "smtpd_milters = inet:localhost:8891
|
||||||
'echo "smtpd_milters = inet:localhost:8891\n
|
milter_macro_daemon_name = SIGNING
|
||||||
milter_macro_daemon_name = SIGNING\n
|
milter_default_action = accept" >> /etc/postfix/main.cf'
|
||||||
milter_default_action = accept\n" >> /etc/postfix/main.cf'
|
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/dkim-filter restart'
|
'rc-update add dkim-filter default',
|
||||||
|
'/etc/init.d/postfix restart'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -266,17 +270,13 @@ milter_default_action = accept\n" >> /etc/postfix/main.cf'
|
|||||||
),
|
),
|
||||||
'awstats' => Array(
|
'awstats' => Array(
|
||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'files' => Array(
|
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
|
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
|
||||||
),
|
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
'emerge awstats',
|
||||||
|
'awstats_configure.pl'
|
||||||
|
),
|
||||||
|
'files' => Array(
|
||||||
|
'etc_awstats.model.conf' => '/etc/awstats/awstats.model.conf'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
'label' => 'libnss (system login with mysql)',
|
'label' => 'libnss (system login with mysql)',
|
||||||
|
|||||||
@@ -29,9 +29,10 @@ return Array(
|
|||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'a2dismod userdir',
|
'a2dismod userdir'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/apache2 restart'
|
'/etc/init.d/apache2 restart'
|
||||||
@@ -50,10 +51,13 @@ return Array(
|
|||||||
$configcommand['diroptions'],
|
$configcommand['diroptions'],
|
||||||
$configcommand['v_inclighty'],
|
$configcommand['v_inclighty'],
|
||||||
$configcommand['d_inclighty'],
|
$configcommand['d_inclighty'],
|
||||||
|
'lighty-disable-mod cgi',
|
||||||
|
'lighty-disable-mod fastcgi',
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/lighttpd restart'
|
'/etc/init.d/lighttpd restart'
|
||||||
@@ -67,8 +71,8 @@ return Array(
|
|||||||
'bind' => Array(
|
'bind' => Array(
|
||||||
'label' => 'Bind9',
|
'label' => 'Bind9',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/bind/named.conf',
|
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||||
'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf'
|
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/bind9 restart'
|
'/etc/init.d/bind9 restart'
|
||||||
@@ -188,6 +192,9 @@ return Array(
|
|||||||
'daemons' => Array(
|
'daemons' => Array(
|
||||||
'proftpd' => Array(
|
'proftpd' => Array(
|
||||||
'label' => 'ProFTPd',
|
'label' => 'ProFTPd',
|
||||||
|
'commands' => Array(
|
||||||
|
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||||
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||||
@@ -242,17 +249,13 @@ return Array(
|
|||||||
),
|
),
|
||||||
'awstats' => Array(
|
'awstats' => Array(
|
||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'files' => Array(
|
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
|
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
|
||||||
),
|
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
'apt-get install awstats',
|
||||||
|
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
|
||||||
|
),
|
||||||
|
'files' => Array(
|
||||||
|
'etc_awstats.model.conf' => '/etc/awstats/awstats.model.conf'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
'label' => 'libnss (system login with mysql)',
|
'label' => 'libnss (system login with mysql)',
|
||||||
|
|||||||
@@ -29,9 +29,10 @@ return Array(
|
|||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'a2dismod userdir',
|
'a2dismod userdir'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/apache2 restart'
|
'/etc/init.d/apache2 restart'
|
||||||
@@ -50,10 +51,13 @@ return Array(
|
|||||||
$configcommand['diroptions'],
|
$configcommand['diroptions'],
|
||||||
$configcommand['v_inclighty'],
|
$configcommand['v_inclighty'],
|
||||||
$configcommand['d_inclighty'],
|
$configcommand['d_inclighty'],
|
||||||
|
'lighty-disable-mod cgi',
|
||||||
|
'lighty-disable-mod fastcgi',
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/lighttpd restart'
|
'/etc/init.d/lighttpd restart'
|
||||||
@@ -68,8 +72,8 @@ return Array(
|
|||||||
'label' => 'Bind9',
|
'label' => 'Bind9',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'apt-get install bind9',
|
'apt-get install bind9',
|
||||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/bind/named.conf',
|
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||||
'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf'
|
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/bind9 restart'
|
'/etc/init.d/bind9 restart'
|
||||||
@@ -191,6 +195,9 @@ return Array(
|
|||||||
'daemons' => Array(
|
'daemons' => Array(
|
||||||
'proftpd' => Array(
|
'proftpd' => Array(
|
||||||
'label' => 'ProFTPd',
|
'label' => 'ProFTPd',
|
||||||
|
'commands' => Array(
|
||||||
|
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||||
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
||||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||||
@@ -249,17 +256,13 @@ return Array(
|
|||||||
),
|
),
|
||||||
'awstats' => Array(
|
'awstats' => Array(
|
||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'files' => Array(
|
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
|
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
|
||||||
),
|
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
'apt-get install awstats',
|
||||||
|
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
|
||||||
|
),
|
||||||
|
'files' => Array(
|
||||||
|
'etc_awstats.model.conf' => '/etc/awstats/awstats.conf'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
'label' => 'libnss (system login with mysql)',
|
'label' => 'libnss (system login with mysql)',
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ return Array(
|
|||||||
$configcommand['diroptions'],
|
$configcommand['diroptions'],
|
||||||
$configcommand['include'],
|
$configcommand['include'],
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
'mkdir -p ' . $settings['system']['logfiles_directory']
|
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||||
|
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : ''
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/apache2 restart'
|
'/etc/init.d/apache2 restart'
|
||||||
@@ -45,8 +46,8 @@ return Array(
|
|||||||
'bind' => Array(
|
'bind' => Array(
|
||||||
'label' => 'Bind9',
|
'label' => 'Bind9',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/named.conf',
|
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/named.conf',
|
||||||
'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf'
|
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/named restart'
|
'/etc/init.d/named restart'
|
||||||
@@ -136,16 +137,11 @@ return Array(
|
|||||||
),
|
),
|
||||||
'awstats' => Array(
|
'awstats' => Array(
|
||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'files' => Array(
|
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
|
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
|
||||||
),
|
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
'awstats_configure.pl'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'files' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
'etc_awstats.model.conf' => '/etc/awstats/awstats.conf'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -45,6 +45,6 @@ else
|
|||||||
|
|
||||||
$cfgPath = 'lib/configfiles/';
|
$cfgPath = 'lib/configfiles/';
|
||||||
$configfiles = Array();
|
$configfiles = Array();
|
||||||
$configfiles = array_merge(include $cfgPath . 'lenny.inc.php', include $cfgPath . 'etch.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse10.inc.php');
|
$configfiles = array_merge(include $cfgPath . 'lenny.inc.php', include $cfgPath . 'etch.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse10.inc.php', include $cfgPath . 'freebsd.inc.php');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -24,6 +24,12 @@ if(@php_sapi_name() != 'cli'
|
|||||||
die('This script will only work in the shell.');
|
die('This script will only work in the shell.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ensure that default timezone is set
|
||||||
|
if(function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get"))
|
||||||
|
{
|
||||||
|
@date_default_timezone_set(@date_default_timezone_get());
|
||||||
|
}
|
||||||
|
|
||||||
$lockdir = '/var/run/';
|
$lockdir = '/var/run/';
|
||||||
$lockFilename = 'froxlor_' . basename($_SERVER['PHP_SELF'], '.php') . '.lock-';
|
$lockFilename = 'froxlor_' . basename($_SERVER['PHP_SELF'], '.php') . '.lock-';
|
||||||
$lockfName = $lockFilename . getmypid();
|
$lockfName = $lockFilename . getmypid();
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
|
|||||||
|
|
||||||
if(sizeof($dirList) > 0)
|
if(sizeof($dirList) > 0)
|
||||||
{
|
{
|
||||||
if(sizeof(dirList) <= 100)
|
if(sizeof($dirList) <= 100)
|
||||||
{
|
{
|
||||||
$field = '<select name="path">';
|
$field = '<select name="path">';
|
||||||
foreach($dirList as $key => $dir)
|
foreach($dirList as $key => $dir)
|
||||||
|
|||||||
@@ -26,13 +26,15 @@
|
|||||||
* @param string The dir which should be created
|
* @param string The dir which should be created
|
||||||
* @param int The uid of the user
|
* @param int The uid of the user
|
||||||
* @param int The gid of the user
|
* @param int The gid of the user
|
||||||
|
* @param bool Place standard-index.html into the new folder
|
||||||
|
*
|
||||||
* @return bool true if everything went okay, false if something went wrong
|
* @return bool true if everything went okay, false if something went wrong
|
||||||
*
|
*
|
||||||
* @author Florian Lippert <flo@syscp.org>
|
* @author Florian Lippert <flo@syscp.org>
|
||||||
* @author Martin Burchert <martin.burchert@syscp.org>
|
* @author Martin Burchert <martin.burchert@syscp.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid)
|
function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid, $placeindex = false)
|
||||||
{
|
{
|
||||||
$returncode = true;
|
$returncode = true;
|
||||||
|
|
||||||
@@ -73,6 +75,17 @@ function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid)
|
|||||||
{
|
{
|
||||||
$sdir = makeCorrectDir($sdir);
|
$sdir = makeCorrectDir($sdir);
|
||||||
safe_exec('mkdir -p ' . escapeshellarg($sdir));
|
safe_exec('mkdir -p ' . escapeshellarg($sdir));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* #68
|
||||||
|
*/
|
||||||
|
if ($placeindex) {
|
||||||
|
$loginname = getLoginNameByUid($uid);
|
||||||
|
if ($loginname !== false) {
|
||||||
|
storeDefaultIndex($loginname, $sdir, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
safe_exec('chown -R ' . (int)$uid . ':' . (int)$gid . ' ' . escapeshellarg($sdir));
|
safe_exec('chown -R ' . (int)$uid . ':' . (int)$gid . ' ' . escapeshellarg($sdir));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,11 +51,12 @@ function safe_exec($exec_string, &$return_value = false)
|
|||||||
$settings['system']['apachereload_command'],
|
$settings['system']['apachereload_command'],
|
||||||
$settings['system']['bindreload_command'],
|
$settings['system']['bindreload_command'],
|
||||||
$settings['dkim']['dkimrestart_command'],
|
$settings['dkim']['dkimrestart_command'],
|
||||||
$settings['system']['awstats_updateall_command'],
|
|
||||||
'openssl',
|
'openssl',
|
||||||
'unzip',
|
'unzip',
|
||||||
'php',
|
'php',
|
||||||
'rm'
|
'rm',
|
||||||
|
'awstats_buildstaticpages.pl',
|
||||||
|
'ln'
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -75,6 +76,8 @@ function safe_exec($exec_string, &$return_value = false)
|
|||||||
die('SECURITY CHECK FAILED!' . "\n" . 'The execute string "' . htmlspecialchars($exec_string) . '" is a possible security risk!' . "\n" . 'Please check your whole server for security problems by hand!' . "\n");
|
die('SECURITY CHECK FAILED!' . "\n" . 'The execute string "' . htmlspecialchars($exec_string) . '" is a possible security risk!' . "\n" . 'Please check your whole server for security problems by hand!' . "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is not needed anymore, we allow all commands and just check for pipes and stuff
|
||||||
//
|
//
|
||||||
// check if command is allowed here
|
// check if command is allowed here
|
||||||
//
|
//
|
||||||
@@ -82,7 +85,7 @@ function safe_exec($exec_string, &$return_value = false)
|
|||||||
$ok = false;
|
$ok = false;
|
||||||
foreach($allowed_commands as $allowed_command)
|
foreach($allowed_commands as $allowed_command)
|
||||||
{
|
{
|
||||||
if(strpos($exec_string, $allowed_command) == 0
|
if(strpos($exec_string, $allowed_command) === 0
|
||||||
&& (strlen($exec_string) === ($allowed_command_pos = strlen($allowed_command)) || substr($exec_string, $allowed_command_pos, 1) === ' '))
|
&& (strlen($exec_string) === ($allowed_command_pos = strlen($allowed_command)) || substr($exec_string, $allowed_command_pos, 1) === ' '))
|
||||||
{
|
{
|
||||||
$ok = true;
|
$ok = true;
|
||||||
@@ -93,6 +96,7 @@ function safe_exec($exec_string, &$return_value = false)
|
|||||||
{
|
{
|
||||||
die('SECURITY CHECK FAILED!' . "\n" . 'Your command "' . htmlspecialchars($exec_string) . '" is not allowed!' . "\n" . 'Please check your whole server for security problems by hand!' . "\n");
|
die('SECURITY CHECK FAILED!' . "\n" . 'Your command "' . htmlspecialchars($exec_string) . '" is not allowed!' . "\n" . 'Please check your whole server for security problems by hand!' . "\n");
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
//
|
//
|
||||||
// execute the command and return output
|
// execute the command and return output
|
||||||
|
|||||||
50
lib/functions/filedir/function.storeDefaultIndex.php
Normal file
50
lib/functions/filedir/function.storeDefaultIndex.php
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* store the default index-file in a given destination folder
|
||||||
|
*
|
||||||
|
* @param string $loginname customers loginname
|
||||||
|
* @param string $destination path where to create the file
|
||||||
|
* @param object $logger FroxlorLogger object
|
||||||
|
* @param boolean $force force creation whatever the settings say (needed for task #2, create new user)
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
function storeDefaultIndex($loginname = null, $destination = null, $logger = null, $force = false)
|
||||||
|
{
|
||||||
|
global $db, $settings, $pathtophpfiles;
|
||||||
|
|
||||||
|
if ($force
|
||||||
|
|| (int)$settings['system']['store_index_file_subs'] == 1
|
||||||
|
) {
|
||||||
|
$result = $db->query("SELECT `t`.`value`, `c`.`email` AS `customer_email`, `a`.`email` AS `admin_email`, `c`.`loginname` AS `customer_login`, `a`.`loginname` AS `admin_login` FROM `" . TABLE_PANEL_CUSTOMERS . "` AS `c` INNER JOIN `" . TABLE_PANEL_ADMINS . "` AS `a` ON `c`.`adminid` = `a`.`adminid` INNER JOIN `" . TABLE_PANEL_TEMPLATES . "` AS `t` ON `a`.`adminid` = `t`.`adminid` WHERE `varname` = 'index_html' AND `c`.`loginname` = '" . $db->escape($loginname) . "'");
|
||||||
|
|
||||||
|
if($db->num_rows($result) > 0)
|
||||||
|
{
|
||||||
|
$template = $db->fetch_array($result);
|
||||||
|
$replace_arr = array(
|
||||||
|
'SERVERNAME' => $settings['system']['hostname'],
|
||||||
|
'CUSTOMER' => $template['customer_login'],
|
||||||
|
'ADMIN' => $template['admin_login'],
|
||||||
|
'CUSTOMER_EMAIL' => $template['customer_email'],
|
||||||
|
'ADMIN_EMAIL' => $template['admin_email']
|
||||||
|
);
|
||||||
|
$htmlcontent = replace_variables($template['value'], $replace_arr);
|
||||||
|
$indexhtmlpath = makeCorrectFile($destination . '/index.' . $settings['system']['index_file_extension']);
|
||||||
|
$index_html_handler = fopen($indexhtmlpath, 'w');
|
||||||
|
fwrite($index_html_handler, $htmlcontent);
|
||||||
|
fclose($index_html_handler);
|
||||||
|
if ($logger !== null) {
|
||||||
|
$logger->logAction(CRON_ACTION, LOG_NOTICE, 'Creating \'index.' . $settings['system']['index_file_extension'] . '\' for Customer \'' . $template['customer_login'] . '\' based on template in directory ' . escapeshellarg($indexhtmlpath));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($logger !== null) {
|
||||||
|
$logger->logAction(CRON_ACTION, LOG_NOTICE, 'Running: cp -a ' . $pathtophpfiles . '/templates/misc/standardcustomer/* ' . escapeshellarg($destination));
|
||||||
|
}
|
||||||
|
safe_exec('cp -a ' . $pathtophpfiles . '/templates/misc/standardcustomer/* ' . escapeshellarg($destination));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
@@ -19,13 +19,20 @@
|
|||||||
|
|
||||||
function validateFormFieldHidden($fieldname, $fielddata, $newfieldvalue)
|
function validateFormFieldHidden($fieldname, $fielddata, $newfieldvalue)
|
||||||
{
|
{
|
||||||
if($newfieldvalue === $fielddata['value'])
|
/**
|
||||||
{
|
* don't show error on cronjob-timestamps changing
|
||||||
|
* because it might be possible that the cronjob ran
|
||||||
|
* while settings have been edited (bug #52)
|
||||||
|
*/
|
||||||
|
if($newfieldvalue === $fielddata['value']
|
||||||
|
|| $fieldname == 'system_last_tasks_run'
|
||||||
|
|| $fieldname == 'system_last_traffic_run'
|
||||||
|
|| $fieldname == 'system_lastcronrun'
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// TODO: Throw some error that actually makes sense - false would just throw unknown error
|
return 'hiddenfieldvaluechanged';
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ function validateFormFieldString($fieldname, $fielddata, $newfieldvalue)
|
|||||||
$returnvalue = true;
|
$returnvalue = true;
|
||||||
foreach($newfieldvalues as $single_newfieldvalue)
|
foreach($newfieldvalues as $single_newfieldvalue)
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* don't use tabs in value-fields, #81
|
||||||
|
*/
|
||||||
|
$single_newfieldvalue = str_replace("\t", " ", $single_newfieldvalue);
|
||||||
$single_returnvalue = validateFormFieldString($fieldname, $fielddata, $single_newfieldvalue);
|
$single_returnvalue = validateFormFieldString($fieldname, $fielddata, $single_newfieldvalue);
|
||||||
if($single_returnvalue !== true)
|
if($single_returnvalue !== true)
|
||||||
{
|
{
|
||||||
@@ -39,6 +43,11 @@ function validateFormFieldString($fieldname, $fielddata, $newfieldvalue)
|
|||||||
{
|
{
|
||||||
$returnvalue = false;
|
$returnvalue = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* don't use tabs in value-fields, #81
|
||||||
|
*/
|
||||||
|
$newfieldvalue = str_replace("\t", " ", $newfieldvalue);
|
||||||
|
|
||||||
if(isset($fielddata['string_type']) && $fielddata['string_type'] == 'mail')
|
if(isset($fielddata['string_type']) && $fielddata['string_type'] == 'mail')
|
||||||
{
|
{
|
||||||
$returnvalue = (filter_var($newfieldvalue, FILTER_VALIDATE_EMAIL) == $newfieldvalue);
|
$returnvalue = (filter_var($newfieldvalue, FILTER_VALIDATE_EMAIL) == $newfieldvalue);
|
||||||
|
|||||||
@@ -60,16 +60,17 @@ function getNextCronjobs()
|
|||||||
|
|
||||||
function includeCronjobs($debugHandler, $pathtophpfiles)
|
function includeCronjobs($debugHandler, $pathtophpfiles)
|
||||||
{
|
{
|
||||||
|
global $settings;
|
||||||
|
|
||||||
$cronjobs = getNextCronjobs();
|
$cronjobs = getNextCronjobs();
|
||||||
|
|
||||||
$jobs_to_run = array();
|
$jobs_to_run = array();
|
||||||
|
$cron_path = makeCorrectDir($pathtophpfiles.'/scripts/jobs/');
|
||||||
|
|
||||||
if($cronjobs !== false
|
if($cronjobs !== false
|
||||||
&& is_array($cronjobs)
|
&& is_array($cronjobs)
|
||||||
&& isset($cronjobs[0]))
|
&& isset($cronjobs[0]))
|
||||||
{
|
{
|
||||||
$cron_path = makeCorrectDir($pathtophpfiles.'/scripts/jobs/');
|
|
||||||
|
|
||||||
foreach($cronjobs as $cronjob)
|
foreach($cronjobs as $cronjob)
|
||||||
{
|
{
|
||||||
$cron_file = makeCorrectFile($cron_path.$cronjob);
|
$cron_file = makeCorrectFile($cron_path.$cronjob);
|
||||||
@@ -77,6 +78,17 @@ function includeCronjobs($debugHandler, $pathtophpfiles)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* if we're on realtime and cron_tasks is not one
|
||||||
|
* of the jobs to run, we add it so the changes are being applied
|
||||||
|
*/
|
||||||
|
if ($settings['system']['realtime_port'] !== 0) {
|
||||||
|
$cron_file = makeCorrectFile($cron_path.'/cron_tasks.php');
|
||||||
|
if (!in_array($cron_file, $jobs_to_run)) {
|
||||||
|
$jobs_to_run[] = $cron_file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $jobs_to_run;
|
return $jobs_to_run;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,37 +24,53 @@
|
|||||||
* @param logFile
|
* @param logFile
|
||||||
* @param siteDomain
|
* @param siteDomain
|
||||||
* @param hostAliases
|
* @param hostAliases
|
||||||
* @return
|
* @return null
|
||||||
* @author Michael Duergner
|
|
||||||
* @author Berend Dekens
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function createAWStatsConf($logFile, $siteDomain, $hostAliases)
|
function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot)
|
||||||
{
|
{
|
||||||
global $pathtophpfiles;
|
global $pathtophpfiles, $settings;
|
||||||
|
|
||||||
// Generation header
|
// Generation header
|
||||||
|
|
||||||
$header = "## GENERATED BY SYSCP\n";
|
$header = "## GENERATED BY FROXLOR\n";
|
||||||
$header2 = "## Do not remove the line above! This tells Froxlor to update this configuration\n## If you wish to manually change this configuration file, remove the first line to make sure Froxlor won't rebuild this file\n## Generated for domain {SITE_DOMAIN} on " . date('l dS \of F Y h:i:s A') . "\n";
|
$header2 = "## Do not remove the line above! This tells Froxlor to update this configuration\n## If you wish to manually change this configuration file, remove the first line to make sure Froxlor won't rebuild this file\n## Generated for domain {SITE_DOMAIN} on " . date('l dS \of F Y h:i:s A') . "\n";
|
||||||
|
|
||||||
|
$awstats_dir = makeCorrectDir($customerDocroot.'/awstats/'.$siteDomain.'/');
|
||||||
|
if(!is_dir($awstats_dir))
|
||||||
|
{
|
||||||
|
safe_exec('mkdir -p '.escapeshellarg($awstats_dir));
|
||||||
|
}
|
||||||
|
|
||||||
// These are the variables we will replace
|
// These are the variables we will replace
|
||||||
|
|
||||||
$regex = array(
|
$regex = array(
|
||||||
'/\{LOG_FILE\}/',
|
'/\{LOG_FILE\}/',
|
||||||
'/\{SITE_DOMAIN\}/',
|
'/\{SITE_DOMAIN\}/',
|
||||||
'/\{HOST_ALIASES\}/'
|
'/\{HOST_ALIASES\}/',
|
||||||
|
'/\{CUSTOMER_DOCROOT\}/'
|
||||||
);
|
);
|
||||||
$replace = array(
|
$replace = array(
|
||||||
$logFile,
|
makeCorrectFile($logFile),
|
||||||
$siteDomain,
|
$siteDomain,
|
||||||
$hostAliases
|
$hostAliases,
|
||||||
|
$awstats_dir
|
||||||
);
|
);
|
||||||
|
|
||||||
// File names
|
// File names
|
||||||
|
|
||||||
$domain_file = '/etc/awstats/awstats.' . $siteDomain . '.conf';
|
$domain_file = '/etc/awstats/awstats.' . $siteDomain . '.conf';
|
||||||
$model_file = '/etc/awstats/awstats.model.conf.froxlor';
|
$model_file = dirname(dirname(dirname(dirname(__FILE__))));
|
||||||
|
$model_file.= '/templates/misc/awstatsmodel/';
|
||||||
|
|
||||||
|
if($settings['system']['mod_log_sql'] == '1')
|
||||||
|
{
|
||||||
|
$model_file.= 'awstats.froxlor.model_log_sql.conf';
|
||||||
|
} else {
|
||||||
|
$model_file.= 'awstats.froxlor.model.conf';
|
||||||
|
}
|
||||||
|
|
||||||
|
$model_file = makeCorrectFile($model_file);
|
||||||
|
|
||||||
// Test if the file exists
|
// Test if the file exists
|
||||||
|
|
||||||
|
|||||||
21
lib/functions/froxlor/function.getCustomerIdByDomain.php
Normal file
21
lib/functions/froxlor/function.getCustomerIdByDomain.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the customer-id of a customer by given domain
|
||||||
|
*
|
||||||
|
* @param string $domain users domain
|
||||||
|
*
|
||||||
|
* @return int customers id
|
||||||
|
*/
|
||||||
|
function getCustomerIdByDomain($domain = null)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
$result = $db->query_first("SELECT `customerid` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '".$domain."'");
|
||||||
|
if(is_array($result)
|
||||||
|
&& isset($result['customerid'])
|
||||||
|
) {
|
||||||
|
return $result['customerid'];
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
21
lib/functions/froxlor/function.getLoginNameByUid.php
Normal file
21
lib/functions/froxlor/function.getLoginNameByUid.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the loginname of a customer by given uid
|
||||||
|
*
|
||||||
|
* @param int $uid uid of customer
|
||||||
|
*
|
||||||
|
* @return string customers loginname
|
||||||
|
*/
|
||||||
|
function getLoginNameByUid($uid = null)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
$result = $db->query_first("SELECT `loginname` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `guid` = '".(int)$uid."'");
|
||||||
|
if(is_array($result)
|
||||||
|
&& isset($result['loginname'])
|
||||||
|
) {
|
||||||
|
return $result['loginname'];
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@@ -64,21 +64,23 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '')
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($doupdate === true
|
if($doupdate === true
|
||||||
&& (int)$settings['system']['realtime_port'] !== 0)
|
&& (int)$settings['system']['realtime_port'] !== 0
|
||||||
|
&& function_exists('socket_create'))
|
||||||
{
|
{
|
||||||
$timeout = 15;
|
$timeout = 15;
|
||||||
$socket = @socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
//$socket = @socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
||||||
|
$socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
||||||
|
|
||||||
if($socket !== false)
|
if($socket !== false)
|
||||||
{
|
{
|
||||||
// create the request packet
|
// create the request packet
|
||||||
$packet = chr(0) . chr(1) . 'RUN' . chr(0);
|
$packet = chr(0) . chr(1) . 'RUN' . chr(0);
|
||||||
// UDP is connectionless, so we just send on it.
|
// UDP is connectionless, so we just send on it.
|
||||||
@socket_sendto($socket, $packet, strlen($packet), 0x100, '127.0.0.1', (int)$settings['system']['realtime_port']);
|
//@socket_sendto($socket, $packet, strlen($packet), 0x100, '127.0.0.1', (int)$settings['system']['realtime_port']);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this is for TCP-Connections
|
* this is for TCP-Connections
|
||||||
*
|
*/
|
||||||
$time = time();
|
$time = time();
|
||||||
|
|
||||||
while(!@socket_connect($socket, '127.0.0.1', (int)$settings['system']['realtime_port']))
|
while(!@socket_connect($socket, '127.0.0.1', (int)$settings['system']['realtime_port']))
|
||||||
@@ -97,7 +99,9 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '')
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
/**
|
||||||
|
* close socket
|
||||||
|
*/
|
||||||
@socket_close($socket);
|
@socket_close($socket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,26 +30,33 @@ function openRootDB($debugHandler, $lockfile)
|
|||||||
{
|
{
|
||||||
global $db_root;
|
global $db_root;
|
||||||
|
|
||||||
// If one cronscript needs root, it should say $needrootdb = true before the include
|
require dirname(dirname(dirname(__FILE__))).'/userdata.inc.php';
|
||||||
if(isset($needrootdb)
|
|
||||||
&& $needrootdb === true)
|
// Legacy sql-root-information
|
||||||
|
if(isset($sql['root_user']) && isset($sql['root_password']) && (!isset($sql_root) || !is_array($sql_root)))
|
||||||
{
|
{
|
||||||
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
|
$sql_root = array(0 => array('caption' => 'Default', 'host' => $sql['host'], 'user' => $sql['root_user'], 'password' => $sql['root_password']));
|
||||||
|
unset($sql['root_user']);
|
||||||
if($db_root->link_id == 0)
|
unset($sql['root_password']);
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Do not proceed further if no database connection could be established
|
|
||||||
*/
|
|
||||||
|
|
||||||
fclose($debugHandler);
|
|
||||||
unlink($lockfile);
|
|
||||||
die('root can\'t connect to mysqlserver. Please check userdata.inc.php! Exiting...');
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($db_root->password);
|
|
||||||
fwrite($debugHandler, 'Database-rootconnection established' . "\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
|
||||||
|
|
||||||
|
if($db_root->link_id == 0)
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Do not proceed further if no database connection could be established
|
||||||
|
*/
|
||||||
|
|
||||||
|
fclose($debugHandler);
|
||||||
|
unlink($lockfile);
|
||||||
|
die('root can\'t connect to mysqlserver. Please check userdata.inc.php! Exiting...');
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($db_root->password);
|
||||||
|
fwrite($debugHandler, 'Database-rootconnection established' . "\n");
|
||||||
|
|
||||||
|
unset($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeRootDB()
|
function closeRootDB()
|
||||||
|
|||||||
@@ -134,26 +134,26 @@ function showUpdateStep($task = null, $needs_status = true)
|
|||||||
* outputs [OK] (success), [??] (warning) or [!!] (failure)
|
* outputs [OK] (success), [??] (warning) or [!!] (failure)
|
||||||
* of the last update-step
|
* of the last update-step
|
||||||
*
|
*
|
||||||
* @param int status (0 = success, 1 = warning, -1 = failure)
|
* @param int status (0 = success, 1 = warning, 2 = failure)
|
||||||
*
|
*
|
||||||
* @return string formatted output and log-entry
|
* @return string formatted output and log-entry
|
||||||
*/
|
*/
|
||||||
function lastStepStatus($status = -1)
|
function lastStepStatus($status = -1, $message = '')
|
||||||
{
|
{
|
||||||
global $updatelog;
|
global $updatelog;
|
||||||
|
|
||||||
switch($status)
|
switch($status)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
$status_sign = '[OK]';
|
$status_sign = ($message != '') ? '['.$message.']' : '[OK]';
|
||||||
$status_color = '1dcd00';
|
$status_color = '1dcd00';
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
$status_sign = '[??]';
|
$status_sign = ($message != '') ? '['.$message.']' : '[??]';
|
||||||
$status_color = 'db7100';
|
$status_color = 'db7100';
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
$status_sign = '[!!]';
|
$status_sign = ($message != '') ? '['.$message.']' : '[!!]';
|
||||||
$status_color = 'ff0000';
|
$status_color = 'ff0000';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -31,6 +31,17 @@ function storeSettingField($fieldname, $fielddata, $newfieldvalue)
|
|||||||
toggleCronStatus($fielddata['cronmodule'], $newfieldvalue);
|
toggleCronStatus($fielddata['cronmodule'], $newfieldvalue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* satisfy dependencies
|
||||||
|
*/
|
||||||
|
if(isset($fielddata['dependency']) && is_array($fielddata['dependency']))
|
||||||
|
{
|
||||||
|
if((int)$fielddata['dependency']['onlyif'] == (int)$newfieldvalue)
|
||||||
|
{
|
||||||
|
storeSettingField($fielddata['dependency']['fieldname'], $fielddata['dependency']['fielddata'], $newfieldvalue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return array($fielddata['settinggroup'] . '.' . $fielddata['varname'] => $newfieldvalue);
|
return array($fielddata['settinggroup'] . '.' . $fielddata['varname'] => $newfieldvalue);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -29,14 +29,25 @@
|
|||||||
*
|
*
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function checkLastGuid($froxlor_guid = 0)
|
function checkLastGuid()
|
||||||
{
|
{
|
||||||
global $cronlog;
|
global $log, $cronlog, $db, $settings;
|
||||||
|
|
||||||
|
$mylog = null;
|
||||||
|
if (isset($cronlog) && $cronlog instanceof FroxlorLogger) {
|
||||||
|
$mylog = $cronlog;
|
||||||
|
} else {
|
||||||
|
$mylog = $log;
|
||||||
|
}
|
||||||
|
|
||||||
$group_lines = array();
|
$group_lines = array();
|
||||||
$group_guids = array();
|
$group_guids = array();
|
||||||
$update_to_guid = 0;
|
$update_to_guid = 0;
|
||||||
|
|
||||||
|
$froxlor_guid = 0;
|
||||||
|
$result = $db->query_first("SELECT MAX(`guid`) as `fguid` FROM `".TABLE_PANEL_CUSTOMERS."`");
|
||||||
|
$froxlor_guid = $result['fguid'];
|
||||||
|
|
||||||
$g_file = '/etc/group';
|
$g_file = '/etc/group';
|
||||||
|
|
||||||
if(file_exists($g_file))
|
if(file_exists($g_file))
|
||||||
@@ -54,28 +65,44 @@ function checkLastGuid($froxlor_guid = 0)
|
|||||||
|
|
||||||
foreach($group_guids as $idx => $group)
|
foreach($group_guids as $idx => $group)
|
||||||
{
|
{
|
||||||
$guid = $group[2];
|
/**
|
||||||
|
* nogroup | nobody have very high guids
|
||||||
|
* ignore them
|
||||||
|
*/
|
||||||
|
if($group[0] == 'nogroup'
|
||||||
|
|| $group[0] == 'nobody'
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if($guid > $froxlor_guid)
|
$guid = isset($group[2]) ? (int)$group[2] : 0;
|
||||||
|
|
||||||
|
if($guid > $update_to_guid)
|
||||||
{
|
{
|
||||||
$update_to_guid = $guid;
|
$update_to_guid = $guid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($update_to_guid > $froxlor_guid)
|
if($update_to_guid < $froxlor_guid)
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Updating froxlor last guid to '.$update_to_guid);
|
$update_to_guid = $froxlor_guid;
|
||||||
saveSetting('system', 'lastguid', $update_to_guid);
|
|
||||||
|
if ($update_to_guid != $settings['system']['lastguid'])
|
||||||
|
{
|
||||||
|
$mylog->logAction(CRON_ACTION, LOG_NOTICE, 'Updating froxlor last guid to '.$update_to_guid);
|
||||||
|
saveSetting('system', 'lastguid', $update_to_guid);
|
||||||
|
$settings['system']['lastguid'] = $update_to_guid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
|
$mylog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
|
$mylog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
43
lib/functions/validate/function.validatePassword.php
Normal file
43
lib/functions/validate/function.validatePassword.php
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<?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$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function validatePassword
|
||||||
|
*
|
||||||
|
* if password-min-length is set in settings
|
||||||
|
* we check against the length, if not matched
|
||||||
|
* an error message will be output and 'exit' is called
|
||||||
|
*
|
||||||
|
* @param string $password the password to validate
|
||||||
|
*
|
||||||
|
* @return string either the password or an errormessage+exit
|
||||||
|
*/
|
||||||
|
function validatePassword($password = null)
|
||||||
|
{
|
||||||
|
global $settings;
|
||||||
|
|
||||||
|
if ($settings['panel']['password_min_length'] > 0) {
|
||||||
|
$password = validate(
|
||||||
|
$password,
|
||||||
|
$settings['panel']['password_min_length'], /* replacer needs to be password length, not the fieldname */
|
||||||
|
'/^.{'.(int)$settings['panel']['password_min_length'].',}$/D',
|
||||||
|
'notrequiredpasswordlength'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $password;
|
||||||
|
}
|
||||||
12
lib/init.php
12
lib/init.php
@@ -155,8 +155,10 @@ $settings = loadSettings(&$settings_data, &$db);
|
|||||||
/*
|
/*
|
||||||
* when upgrading from syscp, the header-graphic gets lost
|
* when upgrading from syscp, the header-graphic gets lost
|
||||||
*/
|
*/
|
||||||
if(!isset($settings['admin']['froxlor_graphic'])) {
|
if(!isset($settings['admin']['froxlor_graphic'])
|
||||||
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
|
|| $settings['admin']['froxlor_graphic'] == ''
|
||||||
|
) {
|
||||||
|
$settings['admin']['froxlor_graphic'] = ($settings['admin']['syscp_graphic'] != '') ? $settings['admin']['syscp_graphic'] : 'images/header.gif';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -414,6 +416,10 @@ if($page == '')
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$mail = new PHPMailer();
|
$mail = new PHPMailer();
|
||||||
$mail->From = $settings['panel']['adminmail'];
|
// set return-to address and custom sender-name, see #76
|
||||||
|
$mail->SetFrom($settings['panel']['adminmail'], $settings['panel']['adminmail_defname']);
|
||||||
|
if ($settings['panel']['adminmail_return'] != '') {
|
||||||
|
$mail->AddReplyTo($settings['panel']['adminmail_return'], $settings['panel']['adminmail_defname']);
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -200,15 +200,11 @@ return array (
|
|||||||
'label' => $lng['admin']['ipsandports']['ipsandports'],
|
'label' => $lng['admin']['ipsandports']['ipsandports'],
|
||||||
'required_resources' => 'change_serversettings',
|
'required_resources' => 'change_serversettings',
|
||||||
),
|
),
|
||||||
/*
|
|
||||||
* @TODO this is for Froxlor-1.0
|
|
||||||
*
|
|
||||||
array (
|
array (
|
||||||
'url' => 'admin_cronjobs.php?page=overview',
|
'url' => 'admin_cronjobs.php?page=overview',
|
||||||
'label' => $lng['admin']['cron']['cronsettings'],
|
'label' => $lng['admin']['cron']['cronsettings'],
|
||||||
'required_resources' => 'change_serversettings',
|
'required_resources' => 'change_serversettings',
|
||||||
),
|
),
|
||||||
*/
|
|
||||||
array (
|
array (
|
||||||
'url' => 'admin_settings.php?page=rebuildconfigs',
|
'url' => 'admin_settings.php?page=rebuildconfigs',
|
||||||
'label' => $lng['admin']['rebuildconf'],
|
'label' => $lng['admin']['rebuildconf'],
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ define('PACKAGE_ENABLED', 2);
|
|||||||
|
|
||||||
// VERSION INFO
|
// VERSION INFO
|
||||||
|
|
||||||
$version = '0.9.1';
|
$version = '0.9.4';
|
||||||
$dbversion = '2';
|
$dbversion = '2';
|
||||||
|
$branding = '';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -243,7 +243,7 @@ $lng['error']['domainname'] = $lng['domains']['domainname'];
|
|||||||
$lng['question']['question'] = 'Security question';
|
$lng['question']['question'] = 'Security question';
|
||||||
$lng['question']['admin_customer_reallydelete'] = 'Do you really want to delete the customer %s? This cannot be undone!';
|
$lng['question']['admin_customer_reallydelete'] = 'Do you really want to delete the customer %s? This cannot be undone!';
|
||||||
$lng['question']['admin_domain_reallydelete'] = 'Do you really want to delete the domain %s?';
|
$lng['question']['admin_domain_reallydelete'] = 'Do you really want to delete the domain %s?';
|
||||||
$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Do you really want to deactivate these Security settings (OpenBasedir and/or SafeMode)?';
|
$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Do you really want to disable these Security settings (OpenBasedir and/or SafeMode)?';
|
||||||
$lng['question']['admin_admin_reallydelete'] = 'Do you really want to delete the admin %s? Every customer and domain will be reassigned to your account.';
|
$lng['question']['admin_admin_reallydelete'] = 'Do you really want to delete the admin %s? Every customer and domain will be reassigned to your account.';
|
||||||
$lng['question']['admin_template_reallydelete'] = 'Do you really want to delete the template \'%s\'?';
|
$lng['question']['admin_template_reallydelete'] = 'Do you really want to delete the template \'%s\'?';
|
||||||
$lng['question']['domains_reallydelete'] = 'Do you really want to delete the domain %s?';
|
$lng['question']['domains_reallydelete'] = 'Do you really want to delete the domain %s?';
|
||||||
@@ -369,9 +369,9 @@ $lng['serversettings']['webftp_url']['title'] = 'WebFTP URL';
|
|||||||
$lng['serversettings']['webftp_url']['description'] = 'What\'s the URL to WebFTP? (has to start with http(s)://)';
|
$lng['serversettings']['webftp_url']['description'] = 'What\'s the URL to WebFTP? (has to start with http(s)://)';
|
||||||
$lng['serversettings']['language']['description'] = 'What\'s your standard server language?';
|
$lng['serversettings']['language']['description'] = 'What\'s your standard server language?';
|
||||||
$lng['serversettings']['maxloginattempts']['title'] = 'Max Login Attempts';
|
$lng['serversettings']['maxloginattempts']['title'] = 'Max Login Attempts';
|
||||||
$lng['serversettings']['maxloginattempts']['description'] = 'Maximum login attempts after which the account gets deactivated.';
|
$lng['serversettings']['maxloginattempts']['description'] = 'Maximum login attempts after which the account gets disabled.';
|
||||||
$lng['serversettings']['deactivatetime']['title'] = 'Deactivate Time';
|
$lng['serversettings']['deactivatetime']['title'] = 'Deactivation Time';
|
||||||
$lng['serversettings']['deactivatetime']['description'] = 'Time (sec.) an account gets deactivated after too many login tries.';
|
$lng['serversettings']['deactivatetime']['description'] = 'Time (sec.) an account gets disabled after too many login tries.';
|
||||||
$lng['serversettings']['pathedit']['title'] = 'Type of path input';
|
$lng['serversettings']['pathedit']['title'] = 'Type of path input';
|
||||||
$lng['serversettings']['pathedit']['description'] = 'Should a path be selected by a dropdown menu or by an input field?';
|
$lng['serversettings']['pathedit']['description'] = 'Should a path be selected by a dropdown menu or by an input field?';
|
||||||
$lng['serversettings']['nameservers']['title'] = 'Nameservers';
|
$lng['serversettings']['nameservers']['title'] = 'Nameservers';
|
||||||
@@ -425,7 +425,7 @@ $lng['panel']['urloverridespath'] = 'URL (overrides path)';
|
|||||||
$lng['panel']['pathorurl'] = 'Path or URL';
|
$lng['panel']['pathorurl'] = 'Path or URL';
|
||||||
$lng['error']['sessiontimeoutiswrong'] = 'Only numerical "Session Timeout" is allowed.';
|
$lng['error']['sessiontimeoutiswrong'] = 'Only numerical "Session Timeout" is allowed.';
|
||||||
$lng['error']['maxloginattemptsiswrong'] = 'Only numerical "Max Login Attempts" are allowed.';
|
$lng['error']['maxloginattemptsiswrong'] = 'Only numerical "Max Login Attempts" are allowed.';
|
||||||
$lng['error']['deactivatetimiswrong'] = 'Only numerical "Deactivate Time" is allowed.';
|
$lng['error']['deactivatetimiswrong'] = 'Only numerical "Deactivation Time" is allowed.';
|
||||||
$lng['error']['accountprefixiswrong'] = 'The "Customerprefix" is wrong.';
|
$lng['error']['accountprefixiswrong'] = 'The "Customerprefix" is wrong.';
|
||||||
$lng['error']['mysqlprefixiswrong'] = 'The "SQL Prefix" is wrong.';
|
$lng['error']['mysqlprefixiswrong'] = 'The "SQL Prefix" is wrong.';
|
||||||
$lng['error']['ftpprefixiswrong'] = 'The "FTP Prefix" is wrong.';
|
$lng['error']['ftpprefixiswrong'] = 'The "FTP Prefix" is wrong.';
|
||||||
@@ -872,7 +872,7 @@ $lng['pwdreminder']['success'] = 'Password reset successfully.<br />You now shou
|
|||||||
// ADDED IN 1.2.19-svn18
|
// ADDED IN 1.2.19-svn18
|
||||||
|
|
||||||
$lng['serversettings']['allow_password_reset']['title'] = 'Allow password reset by customers';
|
$lng['serversettings']['allow_password_reset']['title'] = 'Allow password reset by customers';
|
||||||
$lng['pwdreminder']['notallowed'] = 'Password reset is deactivated';
|
$lng['pwdreminder']['notallowed'] = 'Password reset is disabled';
|
||||||
|
|
||||||
// ADDED IN 1.2.19-svn20
|
// ADDED IN 1.2.19-svn20
|
||||||
|
|
||||||
@@ -950,7 +950,7 @@ $lng['error']['accountnotexisting'] = 'The given email account doesn\'t exist.';
|
|||||||
$lng['error']['autoresponderalreadyexists'] = 'There is already an autoresponder configured for this account.';
|
$lng['error']['autoresponderalreadyexists'] = 'There is already an autoresponder configured for this account.';
|
||||||
$lng['error']['invalidautoresponder'] = 'The given account is invalid.';
|
$lng['error']['invalidautoresponder'] = 'The given account is invalid.';
|
||||||
$lng['serversettings']['autoresponder_active']['title'] = 'Use autoresponder module';
|
$lng['serversettings']['autoresponder_active']['title'] = 'Use autoresponder module';
|
||||||
$lng['serversettings']['autoresponder_active']['description'] = 'Do you want to use the autoresponder module? Therefore an extra cronjob must be set up.';
|
$lng['serversettings']['autoresponder_active']['description'] = 'Do you want to use the autoresponder module?';
|
||||||
$lng['admin']['security_settings'] = 'Security Options';
|
$lng['admin']['security_settings'] = 'Security Options';
|
||||||
$lng['admin']['know_what_youre_doing'] = 'Change only, if you know what you\'re doing!';
|
$lng['admin']['know_what_youre_doing'] = 'Change only, if you know what you\'re doing!';
|
||||||
$lng['admin']['show_version_login']['title'] = 'Show Froxlor version on login';
|
$lng['admin']['show_version_login']['title'] = 'Show Froxlor version on login';
|
||||||
@@ -983,7 +983,7 @@ $lng['error']['info'] = 'Info';
|
|||||||
$lng['admin']['phpconfig']['template_replace_vars'] = 'Variables that will be replaced in the configs';
|
$lng['admin']['phpconfig']['template_replace_vars'] = 'Variables that will be replaced in the configs';
|
||||||
$lng['admin']['phpconfig']['safe_mode'] = 'Will be replaced with the safe_mode setting of the domain.';
|
$lng['admin']['phpconfig']['safe_mode'] = 'Will be replaced with the safe_mode setting of the domain.';
|
||||||
$lng['admin']['phpconfig']['pear_dir'] = 'Will be replaced with the global setting for the pear directory.';
|
$lng['admin']['phpconfig']['pear_dir'] = 'Will be replaced with the global setting for the pear directory.';
|
||||||
$lng['admin']['phpconfig']['open_basedir_c'] = 'Will insert a ; (semicolon) to comment-out/deactivate open_basedir when set';
|
$lng['admin']['phpconfig']['open_basedir_c'] = 'Will insert a ; (semicolon) to comment-out/disable open_basedir when set';
|
||||||
$lng['admin']['phpconfig']['open_basedir'] = 'Will be replaced with the open_basedir setting of the domain.';
|
$lng['admin']['phpconfig']['open_basedir'] = 'Will be replaced with the open_basedir setting of the domain.';
|
||||||
$lng['admin']['phpconfig']['tmp_dir'] = 'Will be replaced with the temporary directory of the domain.';
|
$lng['admin']['phpconfig']['tmp_dir'] = 'Will be replaced with the temporary directory of the domain.';
|
||||||
$lng['admin']['phpconfig']['open_basedir_global'] = 'Will be replaced with the global value of the path which will be attached to the open_basedir.';
|
$lng['admin']['phpconfig']['open_basedir_global'] = 'Will be replaced with the global value of the path which will be attached to the open_basedir.';
|
||||||
@@ -1110,7 +1110,7 @@ $lng['aps']['invalidzipfile'] = '<strong>Errors for <em>%s</em></strong><br/><ul
|
|||||||
$lng['aps']['successpackageupdate'] = '<strong><em>%s</em> successfully installed as a Package update</strong>';
|
$lng['aps']['successpackageupdate'] = '<strong><em>%s</em> successfully installed as a Package update</strong>';
|
||||||
$lng['aps']['successpackageinstall'] = '<strong><em>%s</em> successfully installed as a new Package</strong>';
|
$lng['aps']['successpackageinstall'] = '<strong><em>%s</em> successfully installed as a new Package</strong>';
|
||||||
$lng['aps']['class_zip_missing'] = 'SimpleXML Class, exec function or ZIP Functions missing or not enabled! For further information about this problem look into the handbook for this module.';
|
$lng['aps']['class_zip_missing'] = 'SimpleXML Class, exec function or ZIP Functions missing or not enabled! For further information about this problem look into the handbook for this module.';
|
||||||
$lng['aps']['dir_permissions'] = 'The PHP/Webserver process must be able to write in the directory /var/www/froxlor/temp/ and /var/www/froxlor/packages/';
|
$lng['aps']['dir_permissions'] = 'The PHP/Webserver process must be able to write in the directory {$path}temp/ and {$path}packages/';
|
||||||
$lng['aps']['initerror'] = '<strong>There are some problems with this module:</strong><ul>%s</ul>Fix these problems, otherwise the module cannot be used!';
|
$lng['aps']['initerror'] = '<strong>There are some problems with this module:</strong><ul>%s</ul>Fix these problems, otherwise the module cannot be used!';
|
||||||
$lng['aps']['iderror'] = 'Wrong id specified!';
|
$lng['aps']['iderror'] = 'Wrong id specified!';
|
||||||
$lng['aps']['nopacketsforinstallation'] = 'There are no packages to install.';
|
$lng['aps']['nopacketsforinstallation'] = 'There are no packages to install.';
|
||||||
@@ -1192,7 +1192,7 @@ $lng['error']['admindoesntexist'] = 'The admin you have chosen doesn\'t exist.';
|
|||||||
// ADDED IN 1.2.19-svn37
|
// ADDED IN 1.2.19-svn37
|
||||||
|
|
||||||
$lng['serversettings']['system_realtime_port']['title'] = 'Port for realtime Froxlor';
|
$lng['serversettings']['system_realtime_port']['title'] = 'Port for realtime Froxlor';
|
||||||
$lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature ist deactivated.<br />See also: <a href="https://wiki.froxlor.org/contrib/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
|
$lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature is disabled.<br />See also: <a href="http://wiki.froxlor.org/doc/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
|
||||||
$lng['serversettings']['session_allow_multiple_login']['title'] = 'Allow multiple login';
|
$lng['serversettings']['session_allow_multiple_login']['title'] = 'Allow multiple login';
|
||||||
$lng['serversettings']['session_allow_multiple_login']['description'] = 'If activated a user could login multiple times.';
|
$lng['serversettings']['session_allow_multiple_login']['description'] = 'If activated a user could login multiple times.';
|
||||||
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Allow moving domains between admins';
|
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Allow moving domains between admins';
|
||||||
@@ -1262,22 +1262,6 @@ $lng['update']['update'] = 'Froxlor Update';
|
|||||||
$lng['update']['proceed'] = 'Proceed';
|
$lng['update']['proceed'] = 'Proceed';
|
||||||
$lng['update']['update_information'] = 'The Froxlor files have been updated to version <strong>%newversion</strong>. The installed version is <strong>%curversion</strong>.<br /><br />Customers will not be able to log in until the update has been finished.<br /><strong>Proceed?</strong>';
|
$lng['update']['update_information'] = 'The Froxlor files have been updated to version <strong>%newversion</strong>. The installed version is <strong>%curversion</strong>.<br /><br />Customers will not be able to log in until the update has been finished.<br /><strong>Proceed?</strong>';
|
||||||
$lng['update']['noupdatesavail'] = '<strong>You already have the latest Froxlor version.</strong>';
|
$lng['update']['noupdatesavail'] = '<strong>You already have the latest Froxlor version.</strong>';
|
||||||
$lng['admin']['cron']['cronsettings'] = 'Cronjob settings';
|
|
||||||
$lng['cron']['cronname'] = 'cronjob-name';
|
|
||||||
$lng['cron']['lastrun'] = 'last run';
|
|
||||||
$lng['cron']['interval'] = 'interval';
|
|
||||||
$lng['cron']['isactive'] = 'enabled';
|
|
||||||
$lng['admin']['cron']['add'] = 'Add a new cronjob';
|
|
||||||
$lng['cron']['description'] = 'description';
|
|
||||||
$lng['crondesc']['cron_unknown_desc'] = 'no description given';
|
|
||||||
$lng['crondesc']['cron_tasks'] = 'generating of configfiles';
|
|
||||||
$lng['crondesc']['cron_legacy'] = 'legacy (old) cronjob';
|
|
||||||
$lng['crondesc']['cron_apsinstaller'] = 'APS-installer';
|
|
||||||
$lng['crondesc']['cron_autoresponder'] = 'e-mail autoresponder';
|
|
||||||
$lng['crondesc']['cron_apsupdater'] = 'updating APS packages';
|
|
||||||
$lng['crondesc']['cron_traffic'] = 'traffic calculation';
|
|
||||||
$lng['crondesc']['cron_ticketsreset'] = 'resetting ticket-counters';
|
|
||||||
$lng['crondesc']['cron_ticketarchive'] = 'archiving old tickets';
|
|
||||||
$lng['admin']['specialsettingsforsubdomains'] = 'Apply specialsettings to all subdomains (*.example.com)';
|
$lng['admin']['specialsettingsforsubdomains'] = 'Apply specialsettings to all subdomains (*.example.com)';
|
||||||
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'If yes these custom vhost-settings will be added to all subdomains; if no subdomain-specialsettings are being removed.';
|
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'If yes these custom vhost-settings will be added to all subdomains; if no subdomain-specialsettings are being removed.';
|
||||||
$lng['tasks']['outstanding_tasks'] = 'Outstanding cron-tasks';
|
$lng['tasks']['outstanding_tasks'] = 'Outstanding cron-tasks';
|
||||||
@@ -1296,4 +1280,71 @@ $lng['admin']['accountdata'] = 'Account Data';
|
|||||||
$lng['admin']['contactdata'] = 'Contact Data';
|
$lng['admin']['contactdata'] = 'Contact Data';
|
||||||
$lng['admin']['servicedata'] = 'Service Data';
|
$lng['admin']['servicedata'] = 'Service Data';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.2
|
||||||
|
|
||||||
|
$lng['admin']['newerversionavailable'] = 'There is a newer version of Froxlor available';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.3
|
||||||
|
|
||||||
|
$lng['emails']['noemaildomainaddedyet'] = 'You do not have a (email-)domain in your account yet.';
|
||||||
|
$lng['error']['hiddenfieldvaluechanged'] = 'The value for the hidden field "%s" changed while editing the settings.<br /><br />This is usually not a big problem but the settings could not be saved because of this.';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.3-svn1
|
||||||
|
|
||||||
|
$lng['serversettings']['panel_password_min_length']['title'] = 'Minimum password length';
|
||||||
|
$lng['serversettings']['panel_password_min_length']['description'] = 'Here you can set a minimum length for passwords. \'0\' means: no minimum length required.';
|
||||||
|
$lng['error']['notrequiredpasswordlength'] = 'The given password is too short. Please enter at least %s characters.';
|
||||||
|
$lng['serversettings']['system_store_index_file_subs']['title'] = 'Store default index file also to new subfolders';
|
||||||
|
$lng['serversettings']['system_store_index_file_subs']['description'] = 'If enabled, the default index-file is being stored to every subdomain-path newly created (not if the folder already exists!)';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.3-svn2
|
||||||
|
|
||||||
|
$lng['serversettings']['adminmail_return']['title'] = 'Reply-To address';
|
||||||
|
$lng['serversettings']['adminmail_return']['description'] = 'Define an e-mail address as reply-to-address for mails sent by the panel.';
|
||||||
|
$lng['serversettings']['adminmail_defname'] = 'Panel e-mail sender name';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.3-svn3
|
||||||
|
$lng['dkim']['dkim_algorithm']['title'] = 'Allowed Hash Algorithms';
|
||||||
|
$lng['dkim']['dkim_algorithm']['description'] = 'Define allowed hash algorithms, chose "All" for all algorithms or one or more from the other available algorithms';
|
||||||
|
$lng['dkim']['dkim_servicetype'] = 'Service Types';
|
||||||
|
$lng['dkim']['dkim_keylength']['title'] = 'Key-length';
|
||||||
|
$lng['dkim']['dkim_keylength']['description'] = 'Attention: If you change this values, you need to delete all the private/public keys in "'.$settings['dkim']['dkim_prefix'].'"';
|
||||||
|
$lng['dkim']['dkim_notes']['title'] = 'DKIM Notes';
|
||||||
|
$lng['dkim']['dkim_notes']['description'] = 'Notes that might be of interest to a human, e.g. a URL like http://www.dnswatch.info. No interpretation is made by any program. This tag should be used sparingly due to space limitations in DNS. This is intended for use by administrators, not end users.';
|
||||||
|
$lng['dkim']['dkim_add_adsp']['title'] = 'Add DKIM ADSP entry';
|
||||||
|
$lng['dkim']['dkim_add_adsp']['description'] = 'If you don\'t know what this is, leave it "enabled"';
|
||||||
|
$lng['dkim']['dkim_add_adsppolicy']['title'] = 'ADSP policy';
|
||||||
|
$lng['dkim']['dkim_add_adsppolicy']['description'] = 'For more information about this setting see <a href="http://wiki.froxlor.org/contrib/dkim-adsp-policies">http://wiki.froxlor.org/contrib/dkim-adsp-policies</a>';
|
||||||
|
|
||||||
|
$lng['admin']['cron']['cronsettings'] = 'Cronjob settings';
|
||||||
|
$lng['cron']['cronname'] = 'cronjob-name';
|
||||||
|
$lng['cron']['lastrun'] = 'last run';
|
||||||
|
$lng['cron']['interval'] = 'interval';
|
||||||
|
$lng['cron']['isactive'] = 'enabled';
|
||||||
|
$lng['cron']['description'] = 'description';
|
||||||
|
$lng['crondesc']['cron_unknown_desc'] = 'no description given';
|
||||||
|
$lng['crondesc']['cron_tasks'] = 'generating of configfiles';
|
||||||
|
$lng['crondesc']['cron_legacy'] = 'legacy (old) cronjob';
|
||||||
|
$lng['crondesc']['cron_apsinstaller'] = 'APS-installer';
|
||||||
|
$lng['crondesc']['cron_autoresponder'] = 'e-mail autoresponder';
|
||||||
|
$lng['crondesc']['cron_apsupdater'] = 'updating APS packages';
|
||||||
|
$lng['crondesc']['cron_traffic'] = 'traffic calculation';
|
||||||
|
$lng['crondesc']['cron_ticketsreset'] = 'resetting ticket-counters';
|
||||||
|
$lng['crondesc']['cron_ticketarchive'] = 'archiving old tickets';
|
||||||
|
$lng['cronmgmt']['seconds'] = 'seconds';
|
||||||
|
$lng['cronmgmt']['minutes'] = 'minutes';
|
||||||
|
$lng['cronmgmt']['hours'] = 'hours';
|
||||||
|
$lng['cronmgmt']['days'] = 'days';
|
||||||
|
$lng['cronmgmt']['weeks'] = 'weeks';
|
||||||
|
$lng['cronmgmt']['months'] = 'months';
|
||||||
|
$lng['admin']['cronjob_edit'] = 'Edit cronjob';
|
||||||
|
$lng['cronjob']['cronjobsettings'] = 'Cronjob settings';
|
||||||
|
$lng['cronjob']['cronjobinterval'] = 'Runtime interval';
|
||||||
|
$lng['panel']['options'] = 'options';
|
||||||
|
$lng['admin']['warning'] = 'WARNING - Please note!';
|
||||||
|
$lng['cron']['changewarning'] = 'Changing these values can have a negative cause to the behavior of Froxlor and its automated tasks.<br /><br />Please, only change values here if you are *damn sure* you know what you are doing.';
|
||||||
|
|
||||||
|
$lng['serversettings']['stdsubdomainhost']['title'] = 'Customer standard subdomain';
|
||||||
|
$lng['serversettings']['stdsubdomainhost']['description'] = 'What hostname should be used to create standard subdomains for customer. If empty, the system-hostname is used.';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -955,7 +955,7 @@ $lng['error']['accountnotexisting'] = 'Der angegebene E-Mail-Account existiert n
|
|||||||
$lng['error']['autoresponderalreadyexists'] = 'Für dieses Konto existiert bereits eine Abwesenheitsnachricht.';
|
$lng['error']['autoresponderalreadyexists'] = 'Für dieses Konto existiert bereits eine Abwesenheitsnachricht.';
|
||||||
$lng['error']['invalidautoresponder'] = 'Das angegebene Konto ist ungültig.';
|
$lng['error']['invalidautoresponder'] = 'Das angegebene Konto ist ungültig.';
|
||||||
$lng['serversettings']['autoresponder_active']['title'] = 'Abwesenheitsnachrichten-Modul verwenden';
|
$lng['serversettings']['autoresponder_active']['title'] = 'Abwesenheitsnachrichten-Modul verwenden';
|
||||||
$lng['serversettings']['autoresponder_active']['description'] = 'Möchten Sie das Abwesenheitsnachrichten-Modul verwenden? Dazu muss ein separater Cronjob eingerichtet sein.';
|
$lng['serversettings']['autoresponder_active']['description'] = 'Möchten Sie das Abwesenheitsnachrichten-Modul verwenden?';
|
||||||
$lng['admin']['show_version_login']['title'] = 'Zeige Froxlor Version beim Login';
|
$lng['admin']['show_version_login']['title'] = 'Zeige Froxlor Version beim Login';
|
||||||
$lng['admin']['show_version_login']['description'] = 'Zeige Froxlor Version in der Fußzeile der Loginseite';
|
$lng['admin']['show_version_login']['description'] = 'Zeige Froxlor Version in der Fußzeile der Loginseite';
|
||||||
$lng['admin']['show_version_footer']['title'] = 'Zeige Froxlor Version in Fußzeile';
|
$lng['admin']['show_version_footer']['title'] = 'Zeige Froxlor Version in Fußzeile';
|
||||||
@@ -1065,7 +1065,7 @@ $lng['aps']['notazipfile'] = 'Die hochgeladene Datei ist keine gültige ZIP-
|
|||||||
$lng['aps']['filetoobig'] = 'Die Datei ist zu groß.';
|
$lng['aps']['filetoobig'] = 'Die Datei ist zu groß.';
|
||||||
$lng['aps']['filenotcomplete'] = 'Die Datei wurde nicht vollständig hochgeladen.';
|
$lng['aps']['filenotcomplete'] = 'Die Datei wurde nicht vollständig hochgeladen.';
|
||||||
$lng['aps']['phperror'] = 'Es trat ein PHP interner Fehler auf. Der Upload Fehlercode lautet #';
|
$lng['aps']['phperror'] = 'Es trat ein PHP interner Fehler auf. Der Upload Fehlercode lautet #';
|
||||||
$lng['aps']['moveproblem'] = 'Die hochgeladene Datei konnte nicht aus dem temporären Ordner verschoben werden. Prüfen Sie ob alle Rechte korrekt gesetzt sind. Dies gilt insbesondere fü die Ordner /var/www/froxlor/temp/ und /var/www/froxlor/packages/.';
|
$lng['aps']['moveproblem'] = 'Die hochgeladene Datei konnte nicht aus dem temporären Ordner verschoben werden. Prüfen Sie ob alle Rechte korrekt gesetzt sind. Dies gilt insbesondere fü die Ordner {$path}temp/ und {$path}packages/.';
|
||||||
$lng['aps']['uploaderrors'] = '<strong>Fehler für die Datei <em>%s</em></strong><br/><ul>%s</ul>';
|
$lng['aps']['uploaderrors'] = '<strong>Fehler für die Datei <em>%s</em></strong><br/><ul>%s</ul>';
|
||||||
$lng['aps']['nospecialchars'] = 'Sonderzeichen sind im Suchausdruck nicht erlaubt!';
|
$lng['aps']['nospecialchars'] = 'Sonderzeichen sind im Suchausdruck nicht erlaubt!';
|
||||||
$lng['aps']['noitemsfound'] = 'Es wurden keine Pakete gefunden!';
|
$lng['aps']['noitemsfound'] = 'Es wurden keine Pakete gefunden!';
|
||||||
@@ -1115,7 +1115,7 @@ $lng['aps']['invalidzipfile'] = '<strong>Fehler für <em>%s</em></strong><br
|
|||||||
$lng['aps']['successpackageupdate'] = '<strong><em>%s</em> erfolgreich als Paketupdate installiert</strong>';
|
$lng['aps']['successpackageupdate'] = '<strong><em>%s</em> erfolgreich als Paketupdate installiert</strong>';
|
||||||
$lng['aps']['successpackageinstall'] = '<strong><em>%s</em> erfolgreich als neues Paket installiert</strong>';
|
$lng['aps']['successpackageinstall'] = '<strong><em>%s</em> erfolgreich als neues Paket installiert</strong>';
|
||||||
$lng['aps']['class_zip_missing'] = 'SimpleXML Klasse, exec Funktion oder ZIP Funktionen nicht vorhanden bzw. aktiviert! Für genauere Informationen zu diesem Problem schauen Sie bitte in das Handbuch zu diesem Modul.';
|
$lng['aps']['class_zip_missing'] = 'SimpleXML Klasse, exec Funktion oder ZIP Funktionen nicht vorhanden bzw. aktiviert! Für genauere Informationen zu diesem Problem schauen Sie bitte in das Handbuch zu diesem Modul.';
|
||||||
$lng['aps']['dir_permissions'] = 'Der PHP bzw. Webserver Prozess muss Schreibrechte für /var/www/froxlor/temp/ und /var/www/froxlor/packages/ haben.';
|
$lng['aps']['dir_permissions'] = 'Der PHP bzw. Webserver Prozess muss Schreibrechte für {$path}temp/ und {$path}packages/ haben.';
|
||||||
$lng['aps']['initerror'] = '<strong>Es gibt ein paar Probleme mit diesem Modul:</strong><ul>%s</ul>Beheben Sie diese Probleme oder das Modul kann nicht genutzt werden!';
|
$lng['aps']['initerror'] = '<strong>Es gibt ein paar Probleme mit diesem Modul:</strong><ul>%s</ul>Beheben Sie diese Probleme oder das Modul kann nicht genutzt werden!';
|
||||||
$lng['aps']['iderror'] = 'Es wurde eine falsche Id übergeben!';
|
$lng['aps']['iderror'] = 'Es wurde eine falsche Id übergeben!';
|
||||||
$lng['aps']['nopacketsforinstallation'] = 'Es wurden keine Pakete zur Installation gefunden.';
|
$lng['aps']['nopacketsforinstallation'] = 'Es wurden keine Pakete zur Installation gefunden.';
|
||||||
@@ -1196,7 +1196,7 @@ $lng['error']['admindoesntexist'] = 'Der ausgewählte Admin existiert nicht.
|
|||||||
// ADDED IN 1.2.19-svn37
|
// ADDED IN 1.2.19-svn37
|
||||||
|
|
||||||
$lng['serversettings']['system_realtime_port']['title'] = 'Port für Realtime Froxlor';
|
$lng['serversettings']['system_realtime_port']['title'] = 'Port für Realtime Froxlor';
|
||||||
$lng['serversettings']['system_realtime_port']['description'] = 'Dieser Port auf localhost wird bei jedem neuen Cron-Task kontaktiert. Wenn der Wert 0 (Null) ist, dann ist dieses Feature deaktiviert.<br />Siehe dazu auch: <a href="https://wiki.froxlor.org/contrib/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
|
$lng['serversettings']['system_realtime_port']['description'] = 'Dieser Port auf localhost wird bei jedem neuen Cron-Task kontaktiert. Wenn der Wert 0 (Null) ist, dann ist dieses Feature deaktiviert.<br />Siehe dazu auch: <a href="http://wiki.froxlor.org/doc/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
|
||||||
$lng['serversettings']['session_allow_multiple_login']['title'] = 'Erlaube gleichzeitigen Login';
|
$lng['serversettings']['session_allow_multiple_login']['title'] = 'Erlaube gleichzeitigen Login';
|
||||||
$lng['serversettings']['session_allow_multiple_login']['description'] = 'Wenn diese Option aktiviert ist, können sich Nutzer mehrmals gleichzeitig anmelden.';
|
$lng['serversettings']['session_allow_multiple_login']['description'] = 'Wenn diese Option aktiviert ist, können sich Nutzer mehrmals gleichzeitig anmelden.';
|
||||||
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Erlaube Verschieben von Domains unter Admins';
|
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Erlaube Verschieben von Domains unter Admins';
|
||||||
@@ -1242,22 +1242,6 @@ $lng['update']['update'] = 'Froxlor Aktualisierung';
|
|||||||
$lng['update']['proceed'] = 'Ausführen';
|
$lng['update']['proceed'] = 'Ausführen';
|
||||||
$lng['update']['update_information'] = 'Die Froxlor Dateien wurden aktualisiert. Neue Version ist <strong>%newversion</strong>. Die bisher installierte Version ist <strong>%curversion</strong><br /><br />Ein Kunden-Login ist vor Abschluss des Aktualisierungsvorganges nicht m&oouml;glich.<br /><strong>Aktualisierung ausführen?</strong>';
|
$lng['update']['update_information'] = 'Die Froxlor Dateien wurden aktualisiert. Neue Version ist <strong>%newversion</strong>. Die bisher installierte Version ist <strong>%curversion</strong><br /><br />Ein Kunden-Login ist vor Abschluss des Aktualisierungsvorganges nicht m&oouml;glich.<br /><strong>Aktualisierung ausführen?</strong>';
|
||||||
$lng['update']['noupdatesavail'] = '<strong>Ihre Froxlor-Version ist aktuell.</strong>';
|
$lng['update']['noupdatesavail'] = '<strong>Ihre Froxlor-Version ist aktuell.</strong>';
|
||||||
$lng['admin']['cron']['cronsettings'] = 'Cronjob Einstellungen';
|
|
||||||
$lng['cron']['cronname'] = 'Cronjob-Name';
|
|
||||||
$lng['cron']['lastrun'] = 'zuletzt gestartet';
|
|
||||||
$lng['cron']['interval'] = 'Interval';
|
|
||||||
$lng['cron']['isactive'] = 'Aktiv';
|
|
||||||
$lng['admin']['cron']['add'] = 'Cronjob hinzufügen';
|
|
||||||
$lng['cron']['description'] = 'Beschreibung';
|
|
||||||
$lng['crondesc']['cron_unknown_desc'] = 'Keine Beschreibung angegeben';
|
|
||||||
$lng['crondesc']['cron_tasks'] = 'Erstellen von Konfigurationsdateien';
|
|
||||||
$lng['crondesc']['cron_legacy'] = 'Legacy (alter) Cronjob';
|
|
||||||
$lng['crondesc']['cron_apsinstaller'] = 'APS-Installer';
|
|
||||||
$lng['crondesc']['cron_autoresponder'] = 'E-Mail Autoresponder';
|
|
||||||
$lng['crondesc']['cron_apsupdater'] = 'Aktualisieren der APS Pakete';
|
|
||||||
$lng['crondesc']['cron_traffic'] = 'Traffic-Berechnung';
|
|
||||||
$lng['crondesc']['cron_ticketsreset'] = 'Zurücksetzen der Ticket-Zähler';
|
|
||||||
$lng['crondesc']['cron_ticketarchive'] = 'Archivieren alter Tickets';
|
|
||||||
$lng['admin']['specialsettingsforsubdomains'] = 'Übernehme Einstellungen für alle Subdomains (*.beispiel.de)';
|
$lng['admin']['specialsettingsforsubdomains'] = 'Übernehme Einstellungen für alle Subdomains (*.beispiel.de)';
|
||||||
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'Wenn ja, werden die individuellen Einstellungen für alle Subdomains übernommen; wenn nein, werden Subdomain-Specialsettings entfernt.';
|
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'Wenn ja, werden die individuellen Einstellungen für alle Subdomains übernommen; wenn nein, werden Subdomain-Specialsettings entfernt.';
|
||||||
$lng['tasks']['outstanding_tasks'] = 'Ausstehende Cron-Aufgaben';
|
$lng['tasks']['outstanding_tasks'] = 'Ausstehende Cron-Aufgaben';
|
||||||
@@ -1276,4 +1260,72 @@ $lng['admin']['accountdata'] = 'Benutzerdaten';
|
|||||||
$lng['admin']['contactdata'] = 'Kontaktdaten';
|
$lng['admin']['contactdata'] = 'Kontaktdaten';
|
||||||
$lng['admin']['servicedata'] = 'Dienstleistungsdaten';
|
$lng['admin']['servicedata'] = 'Dienstleistungsdaten';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.2
|
||||||
|
|
||||||
|
$lng['admin']['newerversionavailable'] = 'Eine neuere Version von Froxlor wurde veröffentlicht';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.3
|
||||||
|
|
||||||
|
$lng['emails']['noemaildomainaddedyet'] = 'Sie haben bisher noch keine (E-Mail-)Domain in Ihrem Konto.';
|
||||||
|
$lng['error']['hiddenfieldvaluechanged'] = 'Der Wert des verborgenen Feldes "%s" hat sich während dem Ändern der Einstellungen geändert.<br /><br />Dies ist im Grunde kein schwerwiegendes Problem, allerdings konnten so die Einstellungen nicht gespeichert werden.';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.3-svn1
|
||||||
|
|
||||||
|
$lng['serversettings']['panel_password_min_length']['title'] = 'Mindestlänge von Passwörtern';
|
||||||
|
$lng['serversettings']['panel_password_min_length']['description'] = 'Hier können Sie die Mindestlänge für Passwörter festlegen. \'0\' bedeutet: Keine Mindestlänge';
|
||||||
|
$lng['error']['notrequiredpasswordlength'] = 'Das Passwort ist zu kurz. Bitte geben Sie mindestens %s Zeichen an.';
|
||||||
|
$lng['serversettings']['system_store_index_file_subs']['title'] = 'Erstelle Index-Datei auch in neuen Unterordnern';
|
||||||
|
$lng['serversettings']['system_store_index_file_subs']['description'] = 'Wenn aktiviert, wird für jede Subdomain mit neuem Unterordner die Standard-Index Datei angelegt.';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.3-svn2
|
||||||
|
|
||||||
|
$lng['serversettings']['adminmail_return']['title'] = 'Antwort-Adresse';
|
||||||
|
$lng['serversettings']['adminmail_return']['description'] = 'Standard-Antwort-Adresse für E-Mails aus dem Panel.';
|
||||||
|
$lng['serversettings']['adminmail_defname'] = 'Panel Absender Name';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.3-svn3
|
||||||
|
$lng['dkim']['dkim_algorithm']['title'] = 'Gültige Hash Algorithmen';
|
||||||
|
$lng['dkim']['dkim_algorithm']['description'] = 'Wählen sie einen Algorithmus, "All" für alle Algorithmen oder Einen oder Mehrere von den verfügbaren Algorithmen';
|
||||||
|
$lng['dkim']['dkim_servicetype'] = 'Service Typen';
|
||||||
|
$lng['dkim']['dkim_keylength']['title'] = 'Schlüssel-Länge';
|
||||||
|
$lng['dkim']['dkim_keylength']['description'] = 'Achtung: Bei Änderung dieser Einstellung müssen alle private/public Schlüssel in "'.$settings['dkim']['dkim_prefix'].'" gelöscht werden.';
|
||||||
|
$lng['dkim']['dkim_notes']['title'] = 'DKIM Notiz';
|
||||||
|
$lng['dkim']['dkim_notes']['description'] = 'Eine Notiz, welche für Menschen interessant sein könnte, Z.B. eine URL wie http://www.dnswatch.info. Es gibt keine programmgesteuerte Interpretation für dieses Feld. Gehen sie sparsam mit der Anzahl der Zeichen um, da es Einschränkungen seitens des DNS Dienstes gibt. Dieses Feld ist für Administratoren gedacht, nicht für Benutzer.';
|
||||||
|
$lng['dkim']['dkim_add_adsp']['title'] = 'DKIM ADSP Eintrag hinzufügen';
|
||||||
|
$lng['dkim']['dkim_add_adsp']['description'] = 'Wenn unsicher oder unbekannt, belassen sie es auf "aktiviert"';
|
||||||
|
$lng['dkim']['dkim_add_adsppolicy']['title'] = 'ADSP Richtlinie';
|
||||||
|
$lng['dkim']['dkim_add_adsppolicy']['description'] = 'Mehr Informationen zu dieser Einstellung (englisch) <a href="http://wiki.froxlor.org/contrib/dkim-adsp-policies">http://wiki.froxlor.org/contrib/dkim-adsp-policies</a>';
|
||||||
|
|
||||||
|
$lng['admin']['cron']['cronsettings'] = 'Cronjob Einstellungen';
|
||||||
|
$lng['cron']['cronname'] = 'Cronjob-Name';
|
||||||
|
$lng['cron']['lastrun'] = 'zuletzt gestartet';
|
||||||
|
$lng['cron']['interval'] = 'Intervall';
|
||||||
|
$lng['cron']['isactive'] = 'Aktiv';
|
||||||
|
$lng['admin']['cron']['add'] = 'Cronjob hinzufügen';
|
||||||
|
$lng['cron']['description'] = 'Beschreibung';
|
||||||
|
$lng['crondesc']['cron_unknown_desc'] = 'Keine Beschreibung angegeben';
|
||||||
|
$lng['crondesc']['cron_tasks'] = 'Erstellen von Konfigurationsdateien';
|
||||||
|
$lng['crondesc']['cron_legacy'] = 'Legacy (alter) Cronjob';
|
||||||
|
$lng['crondesc']['cron_apsinstaller'] = 'APS-Installer';
|
||||||
|
$lng['crondesc']['cron_autoresponder'] = 'E-Mail Autoresponder';
|
||||||
|
$lng['crondesc']['cron_apsupdater'] = 'Aktualisieren der APS Pakete';
|
||||||
|
$lng['crondesc']['cron_traffic'] = 'Traffic-Berechnung';
|
||||||
|
$lng['crondesc']['cron_ticketsreset'] = 'Zurücksetzen der Ticket-Zähler';
|
||||||
|
$lng['crondesc']['cron_ticketarchive'] = 'Archivieren alter Tickets';
|
||||||
|
$lng['cronmgmt']['seconds'] = 'Sekunden';
|
||||||
|
$lng['cronmgmt']['minutes'] = 'Minuten';
|
||||||
|
$lng['cronmgmt']['hours'] = 'Stunden';
|
||||||
|
$lng['cronmgmt']['days'] = 'Tage';
|
||||||
|
$lng['cronmgmt']['weeks'] = 'Wochen';
|
||||||
|
$lng['cronmgmt']['months'] = 'Monate';
|
||||||
|
$lng['admin']['cronjob_edit'] = 'Cronjob bearbeiten';
|
||||||
|
$lng['cronjob']['cronjobsettings'] = 'Cronjob Einstellungen';
|
||||||
|
$lng['cronjob']['cronjobinterval'] = 'Laufzeit-Intervall';
|
||||||
|
$lng['panel']['options'] = 'Optionen';
|
||||||
|
$lng['admin']['warning'] = 'ACHTUNG - Wichtiger Hinweis!';
|
||||||
|
$lng['cron']['changewarning'] = 'Änderungen an diesen Werten kann einen negativen Effekt auf das Verhalten von Froxlor und seinen automatisierten Aufgaben haben.<br /><br />Also bitte nur etwas ändern, wenn du dir *verdammt sicher* bist das du weisst was du tust.';
|
||||||
|
|
||||||
|
$lng['serversettings']['stdsubdomainhost']['title'] = 'Kunden Standard-Subdomain';
|
||||||
|
$lng['serversettings']['stdsubdomainhost']['description'] = 'Welcher Hostname soll für das Erstellen der Kunden-Standard-Subdomain verwendet werden? Falls leer wird der System-Hostname verwendet.';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPMailer language file.
|
|
||||||
* English Version
|
|
||||||
*/
|
|
||||||
|
|
||||||
$PHPMAILER_LANG = array();
|
|
||||||
$PHPMAILER_LANG["provide_address"] = 'You must provide at least one ' . 'recipient email address.';
|
|
||||||
$PHPMAILER_LANG["mailer_not_supported"] = ' mailer is not supported.';
|
|
||||||
$PHPMAILER_LANG["execute"] = 'Could not execute: ';
|
|
||||||
$PHPMAILER_LANG["instantiate"] = 'Could not instantiate mail function.';
|
|
||||||
$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Could not authenticate.';
|
|
||||||
$PHPMAILER_LANG["from_failed"] = 'The following From address failed: ';
|
|
||||||
$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: The following ' . 'recipients failed: ';
|
|
||||||
$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data not accepted.';
|
|
||||||
$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Could not connect to SMTP host.';
|
|
||||||
$PHPMAILER_LANG["file_access"] = 'Could not access file: ';
|
|
||||||
$PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: ';
|
|
||||||
$PHPMAILER_LANG["encoding"] = 'Unknown encoding: ';
|
|
||||||
|
|
||||||
?>
|
|
||||||
1306
lng/polish.lng.php
Normal file
1306
lng/polish.lng.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -860,7 +860,7 @@ $lng['error']['accountnotexisting'] = 'Esta conta não existe.';
|
|||||||
$lng['error']['autoresponderalreadyexists'] = 'Já existe um auto-responder configurado para esta conta.';
|
$lng['error']['autoresponderalreadyexists'] = 'Já existe um auto-responder configurado para esta conta.';
|
||||||
$lng['error']['invalidautoresponder'] = 'Esta determinada está inválida.';
|
$lng['error']['invalidautoresponder'] = 'Esta determinada está inválida.';
|
||||||
$lng['serversettings']['autoresponder_active']['title'] = 'Usar módulo de auto-responder';
|
$lng['serversettings']['autoresponder_active']['title'] = 'Usar módulo de auto-responder';
|
||||||
$lng['serversettings']['autoresponder_active']['description'] = 'Você deseja utilizar o módulo do auto-responder? Uma tarefa extra no cron deve ser configurada.';
|
$lng['serversettings']['autoresponder_active']['description'] = 'Você deseja utilizar o módulo do auto-responder?';
|
||||||
$lng['admin']['security_settings'] = 'Opções de Segurança';
|
$lng['admin']['security_settings'] = 'Opções de Segurança';
|
||||||
$lng['admin']['know_what_youre_doing'] = 'Somente altere, se você sabe o que está fazendo';
|
$lng['admin']['know_what_youre_doing'] = 'Somente altere, se você sabe o que está fazendo';
|
||||||
$lng['admin']['show_version_login']['title'] = 'Mostrar versão do Froxlor no login';
|
$lng['admin']['show_version_login']['title'] = 'Mostrar versão do Froxlor no login';
|
||||||
@@ -1084,7 +1084,7 @@ $lng['aps']['noinstancesexisting'] = 'Não existem estâncias para ad
|
|||||||
$lng['error']['customerdoesntexist'] = 'O cliente que você escolheu não existe';
|
$lng['error']['customerdoesntexist'] = 'O cliente que você escolheu não existe';
|
||||||
$lng['error']['admindoesntexist'] = 'O administrador que você escolheu não existe';
|
$lng['error']['admindoesntexist'] = 'O administrador que você escolheu não existe';
|
||||||
$lng['serversettings']['system_realtime_port']['title'] = 'Porta para Froxlor em tempo real';
|
$lng['serversettings']['system_realtime_port']['title'] = 'Porta para Froxlor em tempo real';
|
||||||
$lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature ist deactivated.<br />See also: <a href="https://wiki.froxlor.org/contrib/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
|
$lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature is disabled.<br />See also: <a href="http://wiki.froxlor.org/contrib/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
|
||||||
$lng['serversettings']['session_allow_multiple_login']['title'] = 'AAtiva login múltiplo';
|
$lng['serversettings']['session_allow_multiple_login']['title'] = 'AAtiva login múltiplo';
|
||||||
$lng['serversettings']['session_allow_multiple_login']['description'] = 'Se ativado um usuário pode ter múltiplos logins';
|
$lng['serversettings']['session_allow_multiple_login']['description'] = 'Se ativado um usuário pode ter múltiplos logins';
|
||||||
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Ativa mover domínios entre admins';
|
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Ativa mover domínios entre admins';
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ fwrite($debugHandler, 'Cronfiles have been included' . "\n");
|
|||||||
* so users in the database don't conflict with system users
|
* so users in the database don't conflict with system users
|
||||||
*/
|
*/
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Checking system\'s last guid');
|
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Checking system\'s last guid');
|
||||||
checkLastGuid($settings['system']['lastguid']);
|
checkLastGuid();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* shutdown cron
|
* shutdown cron
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$Aps = new ApsUpdater($db);
|
$Aps = new ApsUpdater($db, $cronlog);
|
||||||
$Aps->UpdateHandler();
|
$Aps->UpdateHandler();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -209,28 +209,25 @@ if($db->num_rows($result) > 0)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//send mail with mailer class
|
$_mailerror = false;
|
||||||
$mail->From = $to;
|
try {
|
||||||
$mail->FromName = $to;
|
$mail->SetFrom($to, $to);
|
||||||
$mail->Subject = $row['subject'];
|
$mail->AddReplyTo($to, $to);
|
||||||
$mail->Body = html_entity_decode($message);
|
$mail->Subject = $row['subject'];
|
||||||
$mail->AddAddress($from, $from);
|
$mail->AltBody = $message;
|
||||||
$mail->AddCustomHeader('Precedence: bulk');
|
$mail->MsgHTML(html_entity_decode($message));
|
||||||
|
$mail->AddAddress($from, $from);
|
||||||
// set correct return path
|
$mail->AddCustomHeader('Precedence: bulk');
|
||||||
$mail->Sender = $to;
|
$mail->Send();
|
||||||
|
} catch(phpmailerException $e) {
|
||||||
if(!$mail->Send())
|
$mailerr_msg = $e->errorMessage();
|
||||||
{
|
$_mailerror = true;
|
||||||
if($mail->ErrorInfo != '')
|
} catch (Exception $e) {
|
||||||
{
|
$mailerr_msg = $e->getMessage();
|
||||||
$mailerr_msg = $mail->ErrorInfo;
|
$_mailerror = true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
$mailerr_msg = $from;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error sending autoresponder mail: " . $mailerr_msg);
|
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error sending autoresponder mail: " . $mailerr_msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -226,12 +226,10 @@ class bind
|
|||||||
$zonefile.= $this->settings['spf']['spf_entry'] . "\n";
|
$zonefile.= $this->settings['spf']['spf_entry'] . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->settings['dkim']['use_dkim'] == '1'
|
/**
|
||||||
&& $domain['dkim'] == '1'
|
* generate dkim-zone-entries
|
||||||
&& $domain['dkim_pubkey'] != '')
|
*/
|
||||||
{
|
$zonefile.= $this->generateDkim($domain);
|
||||||
$zonefile.= 'dkim_' . $domain['dkim_id'] . '._domainkey IN TXT "v=DKIM1; k=rsa; p=' . trim(preg_replace('/-----BEGIN PUBLIC KEY-----(.+)-----END PUBLIC KEY-----/s', '$1', str_replace("\n", '', $domain['dkim_pubkey']))) . '"' . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$nssubdomains = $this->db->query('SELECT `domain` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `isbinddomain`=\'1\' AND `domain` LIKE \'%.' . $domain['domain'] . '\'');
|
$nssubdomains = $this->db->query('SELECT `domain` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `isbinddomain`=\'1\' AND `domain` LIKE \'%.' . $domain['domain'] . '\'');
|
||||||
|
|
||||||
@@ -273,6 +271,88 @@ class bind
|
|||||||
return $zonefile;
|
return $zonefile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function generateDkim($domain)
|
||||||
|
{
|
||||||
|
$zone_dkim = '';
|
||||||
|
|
||||||
|
if($this->settings['dkim']['use_dkim'] == '1'
|
||||||
|
&& $domain['dkim'] == '1'
|
||||||
|
&& $domain['dkim_pubkey'] != '')
|
||||||
|
{
|
||||||
|
// start
|
||||||
|
$dkim_txt = 'v=DKIM1;';
|
||||||
|
|
||||||
|
// algorithm
|
||||||
|
$algorithm = explode(',', $this->settings['dkim']['dkim_algorithm']);
|
||||||
|
$alg = '';
|
||||||
|
foreach($algorithm as $a)
|
||||||
|
{
|
||||||
|
if($a == 'all')
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$alg.=$a.':';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($alg != '')
|
||||||
|
{
|
||||||
|
$alg = substr($alg, 0, -1);
|
||||||
|
$dkim_txt.= 'h='.$alg.';';
|
||||||
|
}
|
||||||
|
|
||||||
|
// notes
|
||||||
|
if(trim($this->settings['dkim']['dkim_notes'] != ''))
|
||||||
|
{
|
||||||
|
$dkim_txt.= 'n='.trim($this->settings['dkim']['dkim_notes']).';';
|
||||||
|
}
|
||||||
|
|
||||||
|
// key
|
||||||
|
$dkim_txt.= 'k=rsa;p='.trim(preg_replace('/-----BEGIN PUBLIC KEY-----(.+)-----END PUBLIC KEY-----/s', '$1', str_replace("\n", '', $domain['dkim_pubkey']))).';';
|
||||||
|
|
||||||
|
// service-type
|
||||||
|
if($this->settings['dkim']['dkim_servicetype'] == '1')
|
||||||
|
{
|
||||||
|
$dkim_txt.= 's=email;';
|
||||||
|
}
|
||||||
|
|
||||||
|
// end-part
|
||||||
|
$dkim_txt.='t=s';
|
||||||
|
|
||||||
|
// split if necessary
|
||||||
|
$txt_record_split='';
|
||||||
|
$lbr=50;
|
||||||
|
for($pos=0; $pos<=strlen($dkim_txt)-1; $pos+=$lbr)
|
||||||
|
{
|
||||||
|
$txt_record_split.= (($pos==0) ? '("' : "\t\t\t\t\t \"") . substr($dkim_txt, $pos, $lbr) . (($pos>=strlen($dkim_txt)-$lbr) ? '")' : '"' ) ."\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// dkim-entry
|
||||||
|
$zone_dkim .= 'dkim_' . $domain['dkim_id'] . '._domainkey IN TXT ' . $txt_record_split;
|
||||||
|
|
||||||
|
// adsp-entry
|
||||||
|
if($this->settings['dkim']['dkim_add_adsp'] == "1")
|
||||||
|
{
|
||||||
|
$zone_dkim .= '_adsp._domainkey IN TXT "dkim=';
|
||||||
|
switch((int)$this->settings['dkim']['dkim_add_adsppolicy'])
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
$zone_dkim .= 'unknown"'. "\n";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$zone_dkim .= 'all"'. "\n";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$zone_dkim .= 'discardable"'. "\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $zone_dkim;
|
||||||
|
}
|
||||||
|
|
||||||
public function writeDKIMconfigs()
|
public function writeDKIMconfigs()
|
||||||
{
|
{
|
||||||
if($this->settings['dkim']['use_dkim'] == '1')
|
if($this->settings['dkim']['use_dkim'] == '1')
|
||||||
@@ -289,7 +369,7 @@ class bind
|
|||||||
|
|
||||||
while($domain = $this->db->fetch_array($result_domains))
|
while($domain = $this->db->fetch_array($result_domains))
|
||||||
{
|
{
|
||||||
$privkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.private');
|
$privkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id']);
|
||||||
$pubkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.public');
|
$pubkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.public');
|
||||||
|
|
||||||
if($domain['dkim_privkey'] == ''
|
if($domain['dkim_privkey'] == ''
|
||||||
@@ -297,8 +377,8 @@ class bind
|
|||||||
{
|
{
|
||||||
$max_dkim_id = $this->db->query_first("SELECT MAX(`dkim_id`) as `max_dkim_id` FROM `" . TABLE_PANEL_DOMAINS . "`");
|
$max_dkim_id = $this->db->query_first("SELECT MAX(`dkim_id`) as `max_dkim_id` FROM `" . TABLE_PANEL_DOMAINS . "`");
|
||||||
$domain['dkim_id'] = (int)$max_dkim_id['max_dkim_id'] + 1;
|
$domain['dkim_id'] = (int)$max_dkim_id['max_dkim_id'] + 1;
|
||||||
$privkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.private');
|
$privkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id']);
|
||||||
safe_exec('openssl genrsa -out ' . escapeshellarg($privkey_filename) . ' 1024');
|
safe_exec('openssl genrsa -out ' . escapeshellarg($privkey_filename) . ' ' . $this->settings['dkim']['dkim_keylength']);
|
||||||
$domain['dkim_privkey'] = file_get_contents($privkey_filename);
|
$domain['dkim_privkey'] = file_get_contents($privkey_filename);
|
||||||
safe_exec("chmod 0640 " . escapeshellarg($privkey_filename));
|
safe_exec("chmod 0640 " . escapeshellarg($privkey_filename));
|
||||||
$pubkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.public');
|
$pubkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.public');
|
||||||
|
|||||||
@@ -62,6 +62,25 @@ class apache
|
|||||||
safe_exec($this->settings['system']['apachereload_command']);
|
safe_exec($this->settings['system']['apachereload_command']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* define a standard <Directory>-statement, bug #32
|
||||||
|
*/
|
||||||
|
private function _createStandardDirectoryEntry()
|
||||||
|
{
|
||||||
|
$vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/05_froxlor_dirfix_nofcgid.conf');
|
||||||
|
|
||||||
|
if(!isset($this->virtualhosts_data[$vhosts_filename]))
|
||||||
|
{
|
||||||
|
$this->virtualhosts_data[$vhosts_filename] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= '# ' . basename($vhosts_filename) . "\n" . '# Created ' . date('d.m.Y H:i') . "\n" . '# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.' . "\n" . "\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= ' <Directory "' . $this->settings['system']['documentroot_prefix'] . '">' . "\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";
|
||||||
|
}
|
||||||
|
|
||||||
public function createIpPort()
|
public function createIpPort()
|
||||||
{
|
{
|
||||||
$result_ipsandports = $this->db->query("SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip` ASC, `port` ASC");
|
$result_ipsandports = $this->db->query("SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip` ASC, `port` ASC");
|
||||||
@@ -79,7 +98,7 @@ class apache
|
|||||||
|
|
||||||
fwrite($this->debugHandler, ' apache::createIpPort: creating ip/port settings for ' . $ipport . "\n");
|
fwrite($this->debugHandler, ' apache::createIpPort: creating ip/port settings for ' . $ipport . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'creating ip/port settings for ' . $ipport);
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'creating ip/port settings for ' . $ipport);
|
||||||
$vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/10_syscp_ipandport_' . trim(str_replace(':', '.', $row_ipsandports['ip']), '.') . '.' . $row_ipsandports['port'] . '.conf');
|
$vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/10_froxlor_ipandport_' . trim(str_replace(':', '.', $row_ipsandports['ip']), '.') . '.' . $row_ipsandports['port'] . '.conf');
|
||||||
|
|
||||||
if(!isset($this->virtualhosts_data[$vhosts_filename]))
|
if(!isset($this->virtualhosts_data[$vhosts_filename]))
|
||||||
{
|
{
|
||||||
@@ -102,11 +121,32 @@ class apache
|
|||||||
{
|
{
|
||||||
$this->virtualhosts_data[$vhosts_filename].= '<VirtualHost ' . $ipport . '>' . "\n";
|
$this->virtualhosts_data[$vhosts_filename].= '<VirtualHost ' . $ipport . '>' . "\n";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add 'real'-vhost content here, like doc-root :)
|
||||||
|
*/
|
||||||
|
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__))));
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= 'DocumentRoot "'.$mypath.'"'."\n";
|
||||||
|
|
||||||
if($row_ipsandports['vhostcontainer_servername_statement'] == '1')
|
if($row_ipsandports['vhostcontainer_servername_statement'] == '1')
|
||||||
{
|
{
|
||||||
$this->virtualhosts_data[$vhosts_filename].= ' ServerName ' . $this->settings['system']['hostname'] . "\n";
|
$this->virtualhosts_data[$vhosts_filename].= ' ServerName ' . $this->settings['system']['hostname'] . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dirprotection, see #72
|
||||||
|
* @TODO deferred until 0.9.5, needs more testing
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= "\t<Directory \"'.$mypath.'(images|packages|templates)\">\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= "\t\tAllow from all\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= "\t\tOptions -Indexes\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= "\t</Directory>\n";
|
||||||
|
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= "\t<Directory \"'.$mypath.'*\">\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= "\t\tOrder Deny,Allow\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= "\t\tDeny from All\n";
|
||||||
|
$this->virtualhosts_data[$vhosts_filename].= "\t</Directory>\n";
|
||||||
|
* end of dirprotection
|
||||||
|
*/
|
||||||
|
|
||||||
if($row_ipsandports['specialsettings'] != '')
|
if($row_ipsandports['specialsettings'] != '')
|
||||||
{
|
{
|
||||||
$this->virtualhosts_data[$vhosts_filename].= $row_ipsandports['specialsettings'] . "\n";
|
$this->virtualhosts_data[$vhosts_filename].= $row_ipsandports['specialsettings'] . "\n";
|
||||||
@@ -149,9 +189,13 @@ class apache
|
|||||||
$this->virtualhosts_data[$vhosts_filename].= '</VirtualHost>' . "\n";
|
$this->virtualhosts_data[$vhosts_filename].= '</VirtualHost>' . "\n";
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_DEBUG, $ipport . ' :: inserted vhostcontainer');
|
$this->logger->logAction(CRON_ACTION, LOG_DEBUG, $ipport . ' :: inserted vhostcontainer');
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($vhosts_filename);
|
unset($vhosts_filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bug #32
|
||||||
|
*/
|
||||||
|
$this->_createStandardDirectoryEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -295,20 +339,26 @@ class apache
|
|||||||
{
|
{
|
||||||
if($domain['parentdomainid'] == '0')
|
if($domain['parentdomainid'] == '0')
|
||||||
{
|
{
|
||||||
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['domain']) . '"' . "\n";
|
|
||||||
|
|
||||||
if($this->settings['system']['awstats_enabled'] == '1')
|
if($this->settings['system']['awstats_enabled'] == '1')
|
||||||
{
|
{
|
||||||
$stats_text.= createAWStatsVhost($domain['domain'], $this->settings);
|
// @TODO see if this is correct for awstats
|
||||||
|
$stats_text.= ' Alias /awstats "' . makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']) . '"' . "\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['domain']) . '"' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['parentdomain']) . '"' . "\n";
|
|
||||||
|
|
||||||
if($this->settings['system']['awstats_enabled'] == '1')
|
if($this->settings['system']['awstats_enabled'] == '1')
|
||||||
{
|
{
|
||||||
$stats_text.= createAWStatsVhost($domain['parentdomain'], $this->settings);
|
// @TODO see if this is correct for awstats
|
||||||
|
$stats_text.= ' Alias /awstats "' . makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['parentdomain']) . '"' . "\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['parentdomain']) . '"' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -316,12 +366,14 @@ class apache
|
|||||||
{
|
{
|
||||||
if($domain['customerroot'] != $domain['documentroot'])
|
if($domain['customerroot'] != $domain['documentroot'])
|
||||||
{
|
{
|
||||||
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer') . '"' . "\n";
|
if($this->settings['system']['awstats_enabled'] == '1')
|
||||||
}
|
{
|
||||||
|
$stats_text.= ' Alias /awstats "' . makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']) . '"' . "\n";
|
||||||
if($this->settings['system']['awstats_enabled'] == '1')
|
}
|
||||||
{
|
else
|
||||||
$stats_text.= createAWStatsVhost($domain['domain'], $this->settings);
|
{
|
||||||
|
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer') . '"' . "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,10 +416,14 @@ class apache
|
|||||||
{
|
{
|
||||||
// The normal access/error - logging is enabled
|
// The normal access/error - logging is enabled
|
||||||
$error_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-error.log');
|
$error_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-error.log');
|
||||||
|
// Create the logfile if it does not exist (fixes #46)
|
||||||
|
touch($error_log);
|
||||||
chown($error_log, $this->settings['system']['httpuser']);
|
chown($error_log, $this->settings['system']['httpuser']);
|
||||||
chgrp($error_log, $this->settings['system']['httpgroup']);
|
chgrp($error_log, $this->settings['system']['httpgroup']);
|
||||||
|
|
||||||
$access_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log');
|
$access_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log');
|
||||||
|
// Create the logfile if it does not exist (fixes #46)
|
||||||
|
touch($access_log);
|
||||||
chown($access_log, $this->settings['system']['httpuser']);
|
chown($access_log, $this->settings['system']['httpuser']);
|
||||||
chgrp($access_log, $this->settings['system']['httpgroup']);
|
chgrp($access_log, $this->settings['system']['httpgroup']);
|
||||||
|
|
||||||
@@ -378,51 +434,56 @@ class apache
|
|||||||
|
|
||||||
if($this->settings['system']['awstats_enabled'] == '1')
|
if($this->settings['system']['awstats_enabled'] == '1')
|
||||||
{
|
{
|
||||||
// prepare the aliases for stats config files
|
if((int)$domain['parentdomainid'] == 0)
|
||||||
|
|
||||||
$server_alias = '';
|
|
||||||
$alias_domains = $this->db->query('SELECT `domain`, `iswildcarddomain`, `wwwserveralias` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . $domain['id'] . '\'');
|
|
||||||
|
|
||||||
while(($alias_domain = $this->db->fetch_array($alias_domains)) !== false)
|
|
||||||
{
|
{
|
||||||
$server_alias.= ' ' . $alias_domain['domain'] . ' ';
|
// prepare the aliases and subdomains for stats config files
|
||||||
|
|
||||||
if($alias_domain['iswildcarddomain'] == '1')
|
$server_alias = '';
|
||||||
|
$alias_domains = $this->db->query('SELECT `domain`, `iswildcarddomain`, `wwwserveralias` FROM `' . TABLE_PANEL_DOMAINS . '`
|
||||||
|
WHERE `aliasdomain`=\'' . $domain['id'] . '\'
|
||||||
|
OR `parentdomainid` =\''. $domain['id']. '\'');
|
||||||
|
|
||||||
|
while(($alias_domain = $this->db->fetch_array($alias_domains)) !== false)
|
||||||
{
|
{
|
||||||
$server_alias.= '*.' . $domain['domain'];
|
$server_alias.= ' ' . $alias_domain['domain'] . ' ';
|
||||||
}
|
|
||||||
else
|
if($alias_domain['iswildcarddomain'] == '1')
|
||||||
{
|
|
||||||
if($alias_domain['wwwserveralias'] == '1')
|
|
||||||
{
|
{
|
||||||
$server_alias.= 'www.' . $alias_domain['domain'];
|
$server_alias.= '*.' . $domain['domain'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$server_alias.= '';
|
if($alias_domain['wwwserveralias'] == '1')
|
||||||
|
{
|
||||||
|
$server_alias.= 'www.' . $alias_domain['domain'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$server_alias.= '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if($domain['iswildcarddomain'] == '1')
|
if($domain['iswildcarddomain'] == '1')
|
||||||
{
|
|
||||||
$alias = '*.' . $domain['domain'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if($domain['wwwserveralias'] == '1')
|
|
||||||
{
|
{
|
||||||
$alias = 'www.' . $domain['domain'];
|
$alias = '*.' . $domain['domain'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$alias = '';
|
if($domain['wwwserveralias'] == '1')
|
||||||
|
{
|
||||||
|
$alias = 'www.' . $domain['domain'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$alias = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// After inserting the AWStats information,
|
||||||
|
// be sure to build the awstats conf file as well
|
||||||
|
createAWStatsConf($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias, $domain['customerroot']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// After inserting the AWStats information, be sure to build the awstats conf file as well
|
|
||||||
|
|
||||||
createAWStatsConf($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $logfiles_text;
|
return $logfiles_text;
|
||||||
@@ -436,11 +497,11 @@ class apache
|
|||||||
{
|
{
|
||||||
if($ssl_vhost === true)
|
if($ssl_vhost === true)
|
||||||
{
|
{
|
||||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/20_syscp_ssl_vhost_' . $domain['domain'] . '.conf');
|
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/20_froxlor_ssl_vhost_' . $domain['domain'] . '.conf');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/20_syscp_normal_vhost_' . $domain['domain'] . '.conf');
|
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/20_froxlor_normal_vhost_' . $domain['domain'] . '.conf');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $vhost_filename;
|
return $vhost_filename;
|
||||||
@@ -536,7 +597,7 @@ class apache
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid']);
|
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true);
|
||||||
$vhost_content.= $this->getWebroot($domain);
|
$vhost_content.= $this->getWebroot($domain);
|
||||||
$vhost_content.= $this->composePhpOptions($domain);
|
$vhost_content.= $this->composePhpOptions($domain);
|
||||||
$vhost_content.= $this->getStats($domain);
|
$vhost_content.= $this->getStats($domain);
|
||||||
@@ -568,7 +629,7 @@ class apache
|
|||||||
|
|
||||||
public function createVirtualHosts()
|
public function createVirtualHosts()
|
||||||
{
|
{
|
||||||
$result_domains = $this->db->query("SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`documentroot`, `d`.`ssl`, `d`.`parentdomainid`, `d`.`ipandport`, `d`.`ssl_ipandport`, `d`.`ssl_redirect`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`openbasedir_path`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `d`.`phpsettingid`, `c`.`adminid`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) " . "WHERE `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC");
|
$result_domains = $this->db->query("SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `d`.`phpsettingid`, `c`.`adminid`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) " . "WHERE `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC");
|
||||||
|
|
||||||
while($domain = $this->db->fetch_array($result_domains))
|
while($domain = $this->db->fetch_array($result_domains))
|
||||||
{
|
{
|
||||||
@@ -646,7 +707,7 @@ class apache
|
|||||||
{
|
{
|
||||||
$row_diroptions['path'] = makeCorrectDir($row_diroptions['path']);
|
$row_diroptions['path'] = makeCorrectDir($row_diroptions['path']);
|
||||||
mkDirWithCorrectOwnership($row_diroptions['customerroot'], $row_diroptions['path'], $row_diroptions['guid'], $row_diroptions['guid']);
|
mkDirWithCorrectOwnership($row_diroptions['customerroot'], $row_diroptions['path'], $row_diroptions['guid'], $row_diroptions['guid']);
|
||||||
$diroptions_filename = makeCorrectFile($this->settings['system']['apacheconf_diroptions'] . '/40_syscp_diroption_' . md5($row_diroptions['path']) . '.conf');
|
$diroptions_filename = makeCorrectFile($this->settings['system']['apacheconf_diroptions'] . '/40_froxlor_diroption_' . md5($row_diroptions['path']) . '.conf');
|
||||||
|
|
||||||
if(!isset($this->diroptions_data[$diroptions_filename]))
|
if(!isset($this->diroptions_data[$diroptions_filename]))
|
||||||
{
|
{
|
||||||
@@ -891,7 +952,7 @@ class apache
|
|||||||
if($vhost_filename != '.'
|
if($vhost_filename != '.'
|
||||||
&& $vhost_filename != '..'
|
&& $vhost_filename != '..'
|
||||||
&& !in_array($vhost_filename, $this->known_vhostfilenames)
|
&& !in_array($vhost_filename, $this->known_vhostfilenames)
|
||||||
&& preg_match('/^(10|20|30)_syscp_(ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
|
&& preg_match('/^(05|10|20|30)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
|
||||||
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
|
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
|
||||||
{
|
{
|
||||||
fwrite($this->debugHandler, ' apache::wipeOutOldVhostConfigs: unlinking ' . $vhost_filename . "\n");
|
fwrite($this->debugHandler, ' apache::wipeOutOldVhostConfigs: unlinking ' . $vhost_filename . "\n");
|
||||||
@@ -922,7 +983,7 @@ class apache
|
|||||||
if($diroptions_filename != '.'
|
if($diroptions_filename != '.'
|
||||||
&& $diroptions_filename != '..'
|
&& $diroptions_filename != '..'
|
||||||
&& !in_array($diroptions_filename, $this->known_diroptionsfilenames)
|
&& !in_array($diroptions_filename, $this->known_diroptionsfilenames)
|
||||||
&& preg_match('/^40_syscp_diroption_(.+)\.conf$/', $diroptions_filename)
|
&& preg_match('/^40_(froxlor|syscp)_diroption_(.+)\.conf$/', $diroptions_filename)
|
||||||
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_diroptions'] . '/' . $diroptions_filename)))
|
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_diroptions'] . '/' . $diroptions_filename)))
|
||||||
{
|
{
|
||||||
fwrite($this->debugHandler, ' apache::wipeOutOldDiroptionConfigs: unlinking ' . $diroptions_filename . "\n");
|
fwrite($this->debugHandler, ' apache::wipeOutOldDiroptionConfigs: unlinking ' . $diroptions_filename . "\n");
|
||||||
|
|||||||
@@ -62,13 +62,13 @@ class lighttpd
|
|||||||
public function reload()
|
public function reload()
|
||||||
{
|
{
|
||||||
fwrite($this->debugHandler, ' lighttpd::reload: reloading lighttpd' . "\n");
|
fwrite($this->debugHandler, ' lighttpd::reload: reloading lighttpd' . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'reloading apache');
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'reloading lighttpd');
|
||||||
safe_exec($this->settings['system']['apachereload_command']);
|
safe_exec($this->settings['system']['apachereload_command']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createIpPort()
|
public function createIpPort()
|
||||||
{
|
{
|
||||||
$query = "SELECT `id`, `ip`, `port`, `listen_statement`, `namevirtualhost_statement`, `vhostcontainer`, " . " `vhostcontainer_servername_statement`, `specialsettings`, `ssl`, `ssl_cert_file` " . " FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip` ASC, `port` ASC";
|
$query = "SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip` ASC, `port` ASC";
|
||||||
$result_ipsandports = $this->db->query($query);
|
$result_ipsandports = $this->db->query($query);
|
||||||
|
|
||||||
while($row_ipsandports = $this->db->fetch_array($result_ipsandports))
|
while($row_ipsandports = $this->db->fetch_array($result_ipsandports))
|
||||||
@@ -88,9 +88,9 @@ class lighttpd
|
|||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'creating ip/port settings for ' . $ip . ":" . $port);
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'creating ip/port settings for ' . $ip . ":" . $port);
|
||||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/10_froxlor_ipandport_' . trim(str_replace(':', '.', $row_ipsandports['ip']), '.') . '.' . $row_ipsandports['port'] . '.conf');
|
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/10_froxlor_ipandport_' . trim(str_replace(':', '.', $row_ipsandports['ip']), '.') . '.' . $row_ipsandports['port'] . '.conf');
|
||||||
|
|
||||||
if(!isset($this->lighttpd_data[$vhosts_filename]))
|
if(!isset($this->lighttpd_data[$vhost_filename]))
|
||||||
{
|
{
|
||||||
$this->lighttpd_data[$vhosts_filename] = '';
|
$this->lighttpd_data[$vhost_filename] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->lighttpd_data[$vhost_filename].= '$SERVER["socket"] == "' . $ip . ':' . $port . '" {' . "\n";
|
$this->lighttpd_data[$vhost_filename].= '$SERVER["socket"] == "' . $ip . ':' . $port . '" {' . "\n";
|
||||||
@@ -101,14 +101,51 @@ class lighttpd
|
|||||||
$this->lighttpd_data[$vhost_filename].= 'server.bind = "' . $ip . '"' . "\n";
|
$this->lighttpd_data[$vhost_filename].= 'server.bind = "' . $ip . '"' . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($row_ipsandports['vhostcontainer'] == '1')
|
||||||
|
{
|
||||||
|
$myhost = str_replace('.', '\.', $this->settings['system']['hostname']);
|
||||||
|
$this->lighttpd_data[$vhost_filename].= '# Froxlor default vhost' . "\n";
|
||||||
|
$this->lighttpd_data[$vhost_filename].= '$HTTP["host"] =~ "^(?:www\.|)' . $myhost . '$" {' . "\n";
|
||||||
|
|
||||||
|
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__))));
|
||||||
|
$this->lighttpd_data[$vhost_filename].= ' server.document-root = "'.$mypath.'"'."\n";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dirprotection, see #72
|
||||||
|
* @TODO use better regex for this, deferred until 0.9.5
|
||||||
|
*
|
||||||
|
$this->lighttpd_data[$vhost_filename].= ' $HTTP["url"] =~ "^/(.+)\/(.+)\.php" {' . "\n";
|
||||||
|
$this->lighttpd_data[$vhost_filename].= ' url.access-deny = ("")' . "\n";
|
||||||
|
$this->lighttpd_data[$vhost_filename].= ' }' . "\n";
|
||||||
|
*/
|
||||||
|
|
||||||
|
if($row_ipsandports['specialsettings'] != '')
|
||||||
|
{
|
||||||
|
$this->lighttpd_data[$vhost_filename].= $row_ipsandports['specialsettings'] . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->lighttpd_data[$vhost_filename].= '}' . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
if($row_ipsandports['ssl'] == '1')
|
if($row_ipsandports['ssl'] == '1')
|
||||||
{
|
{
|
||||||
$this->lighttpd_data[$vhost_filename].= 'ssl.engine = "enable"' . "\n";
|
$this->lighttpd_data[$vhost_filename].= 'ssl.engine = "enable"' . "\n";
|
||||||
$this->lighttpd_data[$vhost_filename].= 'ssl.pemfile = "' . $row_ipsandports['ssl_cert_file'] . '"' . "\n";
|
$this->lighttpd_data[$vhost_filename].= 'ssl.pemfile = "' . $row_ipsandports['ssl_cert_file'] . '"' . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->createLighttpdHosts($row_ipsandports['ip'], $row_ipsandports['port'], $row_ipsandports['ssl'], $vhost_filename);
|
/**
|
||||||
$this->lighttpd_data[$vhost_filename].= $this->needed_htpasswds[$row_ipsandports['id']] . "\n";
|
* this function will create a new file which will be included
|
||||||
|
* if $this->settings['system']['apacheconf_vhost'] is a folder
|
||||||
|
* refs #70
|
||||||
|
*/
|
||||||
|
$vhosts = $this->createLighttpdHosts($row_ipsandports['ip'], $row_ipsandports['port'], $row_ipsandports['ssl'], $vhost_filename);
|
||||||
|
if($vhosts !== null && is_array($vhosts) && isset($vhosts[0]))
|
||||||
|
{
|
||||||
|
foreach($vhosts as $vhost) {
|
||||||
|
$this->lighttpd_data[$vhost_filename].= ' include "'.$vhost.'"'."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->lighttpd_data[$vhost_filename].= '}' . "\n";
|
$this->lighttpd_data[$vhost_filename].= '}' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,6 +156,7 @@ class lighttpd
|
|||||||
$htpasswd_query = "SELECT * FROM " . TABLE_PANEL_HTPASSWDS . " WHERE `path` LIKE '" . $domain['documentroot'] . "%'";
|
$htpasswd_query = "SELECT * FROM " . TABLE_PANEL_HTPASSWDS . " WHERE `path` LIKE '" . $domain['documentroot'] . "%'";
|
||||||
$result_htpasswds = $this->db->query($htpasswd_query);
|
$result_htpasswds = $this->db->query($htpasswd_query);
|
||||||
|
|
||||||
|
$htaccess_text = '';
|
||||||
while($row_htpasswds = $this->db->fetch_array($result_htpasswds))
|
while($row_htpasswds = $this->db->fetch_array($result_htpasswds))
|
||||||
{
|
{
|
||||||
$row_htpasswds['path'] = makeCorrectDir($row_htpasswds['path']);
|
$row_htpasswds['path'] = makeCorrectDir($row_htpasswds['path']);
|
||||||
@@ -145,6 +183,10 @@ class lighttpd
|
|||||||
$htaccess_text.= ' ,' . "\n";
|
$htaccess_text.= ' ,' . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!isset($this->needed_htpasswds[$filename])) {
|
||||||
|
$this->needed_htpasswds[$filename] = '';
|
||||||
|
}
|
||||||
|
|
||||||
if(!strstr($this->needed_htpasswds[$filename], $row_htpasswds['username'] . ':' . $row_htpasswds['password']))
|
if(!strstr($this->needed_htpasswds[$filename], $row_htpasswds['username'] . ':' . $row_htpasswds['password']))
|
||||||
{
|
{
|
||||||
$this->needed_htpasswds[$filename].= $row_htpasswds['username'] . ':' . $row_htpasswds['password'] . "\n";
|
$this->needed_htpasswds[$filename].= $row_htpasswds['username'] . ':' . $row_htpasswds['password'] . "\n";
|
||||||
@@ -156,7 +198,7 @@ class lighttpd
|
|||||||
$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" => "Restricted Area",' . "\n";
|
||||||
$htaccess_text.= ' "require" => "user=' . $row_htpasswds[username] . '"' . "\n";
|
$htaccess_text.= ' "require" => "user=' . $row_htpasswds['username'] . '"' . "\n";
|
||||||
$htaccess_text.= ' )' . "\n";
|
$htaccess_text.= ' )' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -188,37 +230,62 @@ class lighttpd
|
|||||||
|
|
||||||
if($ssl == '0')
|
if($ssl == '0')
|
||||||
{
|
{
|
||||||
$query2 = "SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`documentroot`, `d`.`ssl`, `d`.`parentdomainid`, `d`.`ipandport`, `d`.`ssl_ipandport`, `d`.`ssl_redirect`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`openbasedir_path`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
$query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$query2 = "SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`documentroot`, `d`.`ssl`, `d`.`parentdomainid`, `d`.`ipandport`, `d`.`ssl_ipandport`, `d`.`ssl_redirect`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`openbasedir_path`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ssl_ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
$query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ssl_ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$included_vhosts = array();
|
||||||
$result_domains = $this->db->query($query2);
|
$result_domains = $this->db->query($query2);
|
||||||
|
|
||||||
while($domain = $this->db->fetch_array($result_domains))
|
while($domain = $this->db->fetch_array($result_domains))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (is_dir($this->settings['system']['apacheconf_vhost']))
|
||||||
|
{
|
||||||
|
safe_exec('mkdir -p '.escapeshellarg(makeCorrectDir($this->settings['system']['apacheconf_vhost'].'/vhosts/')));
|
||||||
|
|
||||||
|
// determine correct include-path:
|
||||||
|
// e.g. '/etc/lighttpd/conf-enabled/vhosts/ has to become'
|
||||||
|
// 'conf-enabled/vhosts/' (damn debian, but luckily works too on other distros)
|
||||||
|
$_tmp_path = substr(makeCorrectDir($this->settings['system']['apacheconf_vhost']), 0, -1);
|
||||||
|
$_pos = strrpos($_tmp_path, '/');
|
||||||
|
$_inc_path = substr($_tmp_path, $_pos+1);
|
||||||
|
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'].'/vhosts/50_'.$domain['domain'].'.conf');
|
||||||
|
$included_vhosts[] = $_inc_path.'/vhosts/50_'.$domain['domain'].'.conf';
|
||||||
|
}
|
||||||
|
if(!isset($this->lighttpd_data[$vhost_filename]))
|
||||||
|
{
|
||||||
|
$this->lighttpd_data[$vhost_filename] = '';
|
||||||
|
}
|
||||||
|
|
||||||
$query = "SELECT * FROM " . TABLE_PANEL_IPSANDPORTS . " WHERE `id`='" . $domain['ipandport'] . "'";
|
$query = "SELECT * FROM " . TABLE_PANEL_IPSANDPORTS . " WHERE `id`='" . $domain['ipandport'] . "'";
|
||||||
$ipandport = $this->db->query_first($query);
|
$ipandport = $this->db->query_first($query);
|
||||||
$domain['ip'] = $ipandport['ip'];
|
$domain['ip'] = $ipandport['ip'];
|
||||||
$domain['port'] = $ipandport['port'];
|
$domain['port'] = $ipandport['port'];
|
||||||
$domain['ssl_cert_file'] = $ipandport['ssl_cert_file'];
|
$domain['ssl_cert_file'] = $ipandport['ssl_cert_file'];
|
||||||
|
|
||||||
if(!empty($this->lighttpd_data[$vhost_filename]))
|
if((!empty($this->lighttpd_data[$vhost_filename])
|
||||||
{
|
&& !is_dir($this->settings['system']['apacheconf_vhost']))
|
||||||
|
|| is_dir($this->settings['system']['apacheconf_vhost'])
|
||||||
|
) {
|
||||||
if($ssl == '1')
|
if($ssl == '1')
|
||||||
{
|
{
|
||||||
$ssl_vhost = true;
|
$ssl_vhost = true;
|
||||||
|
$ips_and_ports_index = 'ssl_ipandport';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ssl_vhost = false;
|
$ssl_vhost = false;
|
||||||
|
$ips_and_ports_index = 'ipandport';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->lighttpd_data[$vhost_filename].= $this->getVhostContent($domain, $ssl_vhost);
|
$this->lighttpd_data[$vhost_filename].= $this->getVhostContent($domain, $ssl_vhost);
|
||||||
|
$this->lighttpd_data[$vhost_filename].= isset($this->needed_htpasswds[$domain[$ips_and_ports_index]]) ? $this->needed_htpasswds[$domain[$ips_and_ports_index]] . "\n" : '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $included_vhosts;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getVhostContent($domain, $ssl_vhost = false)
|
protected function getVhostContent($domain, $ssl_vhost = false)
|
||||||
@@ -253,18 +320,32 @@ class lighttpd
|
|||||||
$ipport = $domain['ip'] . ':' . $domain['port'];
|
$ipport = $domain['ip'] . ':' . $domain['port'];
|
||||||
}
|
}
|
||||||
|
|
||||||
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid']);
|
$vhost_content = '';
|
||||||
|
|
||||||
$vhost_content.= $this->getServerNames($domain) . " {\n";
|
$vhost_content.= $this->getServerNames($domain) . " {\n";
|
||||||
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
|
|
||||||
|
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
||||||
|
{
|
||||||
|
$vhost_content.= ' url.redirect = (' . "\n";
|
||||||
|
$vhost_content.= ' "^/(.*)$" => "'. $this->idnaConvert->encode($domain['documentroot']) . '$1"'. "\n";
|
||||||
|
$vhost_content.= ' )' . "\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true);
|
||||||
|
|
||||||
|
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
|
||||||
|
$vhost_content.= $this->create_htaccess($domain);
|
||||||
|
$vhost_content.= $this->create_pathOptions($domain);
|
||||||
|
$vhost_content.= $this->composePhpOptions($domain);
|
||||||
|
$vhost_content.= $this->getStats($domain);
|
||||||
|
$vhost_content.= $this->getLogFiles($domain);
|
||||||
|
}
|
||||||
|
|
||||||
if ($domain['specialsettings'] != "") {
|
if ($domain['specialsettings'] != "") {
|
||||||
$vhost_content.= $domain['specialsettings'] . "\n";
|
$vhost_content.= $domain['specialsettings'] . "\n";
|
||||||
}
|
}
|
||||||
$vhost_content.= $this->create_htaccess($domain);
|
|
||||||
$vhost_content.= $this->create_pathOptions($domain);
|
|
||||||
$vhost_content.= $this->composePhpOptions($domain);
|
|
||||||
$vhost_content.= $this->getLogFiles($domain);
|
|
||||||
$vhost_content.= '}' . "\n";
|
$vhost_content.= '}' . "\n";
|
||||||
|
|
||||||
return $vhost_content;
|
return $vhost_content;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,6 +353,23 @@ class lighttpd
|
|||||||
{
|
{
|
||||||
$logfiles_text = '';
|
$logfiles_text = '';
|
||||||
|
|
||||||
|
if($domain['speciallogfile'] == '1'
|
||||||
|
&& $this->settings['system']['mod_log_sql'] != '1')
|
||||||
|
{
|
||||||
|
if($domain['parentdomainid'] == '0')
|
||||||
|
{
|
||||||
|
$speciallogfile = '-' . $domain['domain'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$speciallogfile = '-' . $domain['parentdomain'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$speciallogfile = '';
|
||||||
|
}
|
||||||
|
|
||||||
if($this->settings['system']['mod_log_sql'] == 1)
|
if($this->settings['system']['mod_log_sql'] == 1)
|
||||||
{
|
{
|
||||||
// We are using mod_log_sql (http://www.outoforder.cc/projects/apache/mod_log_sql/)
|
// We are using mod_log_sql (http://www.outoforder.cc/projects/apache/mod_log_sql/)
|
||||||
@@ -280,32 +378,70 @@ class lighttpd
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// The normal access/error - logging is enabled
|
// The normal access/error - logging is enabled
|
||||||
|
// error log cannot be set conditionally see
|
||||||
|
// https://redmine.lighttpd.net/issues/665
|
||||||
|
|
||||||
$filename = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-error.log');
|
$access_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log');
|
||||||
|
// Create the logfile if it does not exist (fixes #46)
|
||||||
|
touch($access_log);
|
||||||
|
chown($access_log, $this->settings['system']['httpuser']);
|
||||||
|
chgrp($access_log, $this->settings['system']['httpgroup']);
|
||||||
|
|
||||||
if(!is_file($filename))
|
$logfiles_text.= ' accesslog.filename = "' . $access_log . '"' . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->settings['system']['awstats_enabled'] == '1')
|
||||||
|
{
|
||||||
|
if((int)$domain['parentdomainid'] == 0)
|
||||||
{
|
{
|
||||||
$ourFileHandle = fopen($filename, 'w') or die("can't open file");
|
// prepare the aliases and subdomains for stats config files
|
||||||
fclose($ourFileHandle);
|
|
||||||
|
$server_alias = '';
|
||||||
|
$alias_domains = $this->db->query('SELECT `domain`, `iswildcarddomain`, `wwwserveralias` FROM `' . TABLE_PANEL_DOMAINS . '`
|
||||||
|
WHERE `aliasdomain`=\'' . $domain['id'] . '\'
|
||||||
|
OR `parentdomainid` =\''. $domain['id']. '\'');
|
||||||
|
|
||||||
|
while(($alias_domain = $this->db->fetch_array($alias_domains)) !== false)
|
||||||
|
{
|
||||||
|
$server_alias.= ' ' . $alias_domain['domain'] . ' ';
|
||||||
|
|
||||||
|
if($alias_domain['iswildcarddomain'] == '1')
|
||||||
|
{
|
||||||
|
$server_alias.= '*.' . $domain['domain'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($alias_domain['wwwserveralias'] == '1')
|
||||||
|
{
|
||||||
|
$server_alias.= 'www.' . $alias_domain['domain'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$server_alias.= '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($domain['iswildcarddomain'] == '1')
|
||||||
|
{
|
||||||
|
$alias = '*.' . $domain['domain'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($domain['wwwserveralias'] == '1')
|
||||||
|
{
|
||||||
|
$alias = 'www.' . $domain['domain'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$alias = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// After inserting the AWStats information,
|
||||||
|
// be sure to build the awstats conf file as well
|
||||||
|
createAWStatsConf($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias, $domain['customerroot']);
|
||||||
}
|
}
|
||||||
|
|
||||||
chown($filename, $this->settings['system']['httpuser']);
|
|
||||||
chgrp($filename, $this->settings['system']['httpgroup']);
|
|
||||||
|
|
||||||
//access log
|
|
||||||
|
|
||||||
$filename = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log');
|
|
||||||
|
|
||||||
if(!is_file($filename))
|
|
||||||
{
|
|
||||||
$ourFileHandle = fopen($filename, 'w') or die("can't open file");
|
|
||||||
fclose($ourFileHandle);
|
|
||||||
}
|
|
||||||
|
|
||||||
$logfiles_text.= ' accesslog.filename = "' . $filename . '"' . "\n";
|
|
||||||
|
|
||||||
chown($filename, $this->settings['system']['httpuser']);
|
|
||||||
chgrp($filename, $this->settings['system']['httpgroup']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $logfiles_text;
|
return $logfiles_text;
|
||||||
@@ -527,6 +663,60 @@ class lighttpd
|
|||||||
return $webroot_text;
|
return $webroot_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Lets set the text part for the stats software
|
||||||
|
*/
|
||||||
|
|
||||||
|
protected function getStats($domain)
|
||||||
|
{
|
||||||
|
$stats_text = '';
|
||||||
|
|
||||||
|
if($domain['speciallogfile'] == '1'
|
||||||
|
&& $this->settings['system']['mod_log_sql'] != '1')
|
||||||
|
{
|
||||||
|
if($domain['parentdomainid'] == '0')
|
||||||
|
{
|
||||||
|
if($this->settings['system']['awstats_enabled'] == '1')
|
||||||
|
{
|
||||||
|
// @TODO see if this is correct for awstats
|
||||||
|
$stats_text.= ' alias.url = ( "/awstats/" => "'.makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']).'" )' . "\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stats_text.= ' alias.url = ( "/webalizer/" => "'.makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['domain']).'" )' . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($this->settings['system']['awstats_enabled'] == '1')
|
||||||
|
{
|
||||||
|
// @TODO see if this is correct for awstats
|
||||||
|
$stats_text.= ' alias.url = ( "/awstats/" => "'.makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['parentdomain']).'" )' . "\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stats_text.= ' alias.url = ( "/webalizer/" => "'.makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['parentdomain']).'" )' . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($domain['customerroot'] != $domain['documentroot'])
|
||||||
|
{
|
||||||
|
if($this->settings['system']['awstats_enabled'] == '1')
|
||||||
|
{
|
||||||
|
$stats_text.= ' alias.url = ( "/awstats/" => "'.makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']).'" )' . "\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stats_text.= ' alias.url = ( "/webalizer/" => "'.makeCorrectFile($domain['customerroot'] . '/webalizer').'" )' . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $stats_text;
|
||||||
|
}
|
||||||
|
|
||||||
public function writeConfigs()
|
public function writeConfigs()
|
||||||
{
|
{
|
||||||
fwrite($this->debugHandler, ' lighttpd::writeConfigs: rebuilding ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
fwrite($this->debugHandler, ' lighttpd::writeConfigs: rebuilding ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
||||||
@@ -615,7 +805,7 @@ class lighttpd
|
|||||||
if($vhost_filename != '.'
|
if($vhost_filename != '.'
|
||||||
&& $vhost_filename != '..'
|
&& $vhost_filename != '..'
|
||||||
&& !in_array($vhost_filename, $this->known_filenames)
|
&& !in_array($vhost_filename, $this->known_filenames)
|
||||||
&& preg_match('/^(10|20|30)_froxlor_ipandport_(.+)\.conf$/', $vhost_filename)
|
&& preg_match('/^(05|10|20|30)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
|
||||||
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
|
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
|
||||||
{
|
{
|
||||||
fwrite($this->debugHandler, ' lighttpd::wipeOutOldConfigs: unlinking ' . $vhost_filename . "\n");
|
fwrite($this->debugHandler, ' lighttpd::wipeOutOldConfigs: unlinking ' . $vhost_filename . "\n");
|
||||||
|
|||||||
@@ -55,14 +55,34 @@ while($row = $db->fetch_array($result_tasks))
|
|||||||
{
|
{
|
||||||
$awstatsclean['header'] = "## GENERATED BY FROXLOR\n";
|
$awstatsclean['header'] = "## GENERATED BY FROXLOR\n";
|
||||||
$awstatsclean['path'] = '/etc/awstats';
|
$awstatsclean['path'] = '/etc/awstats';
|
||||||
$awstatsclean['dir'] = dir($awstatsclean['path']);
|
|
||||||
while($awstatsclean['entry'] = $awstatsclean['dir']->read()) {
|
/**
|
||||||
$awstatsclean['fullentry'] = $awstatsclean['path'].'/'.$awstatsclean['entry'];
|
* dont do anyting if the directory not exists
|
||||||
$awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r');
|
* (e.g. awstats not installed yet or whatever)
|
||||||
$awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1);
|
* fixes #45
|
||||||
fclose($awstatsclean['fh']);
|
*/
|
||||||
if($awstatsclean['headerRead'] == $awstatsclean['header']) {
|
if (is_dir($awstatsclean['path']))
|
||||||
@unlink($awstatsclean['fullentry']);
|
{
|
||||||
|
$awstatsclean['dir'] = dir($awstatsclean['path']);
|
||||||
|
while($awstatsclean['entry'] = $awstatsclean['dir']->read()) {
|
||||||
|
$awstatsclean['fullentry'] = $awstatsclean['path'].'/'.$awstatsclean['entry'];
|
||||||
|
/**
|
||||||
|
* dont do anything if the file does not exist
|
||||||
|
*/
|
||||||
|
if (file_exists($awstatsclean['fullentry']))
|
||||||
|
{
|
||||||
|
$awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r');
|
||||||
|
$awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1);
|
||||||
|
fclose($awstatsclean['fh']);
|
||||||
|
if($awstatsclean['headerRead'] == $awstatsclean['header']) {
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Removing awstats configuration ".$awstatsclean['fullentry']." for re-creation");
|
||||||
|
@unlink($awstatsclean['fullentry']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "File '".$awstatsclean['fullentry']."' could not be found, please check if you followed all the instructions on the configuration page");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($awstatsclean);
|
unset($awstatsclean);
|
||||||
@@ -121,35 +141,14 @@ while($row = $db->fetch_array($result_tasks))
|
|||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/webalizer'));
|
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/webalizer'));
|
||||||
safe_exec('mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/webalizer'));
|
safe_exec('mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/webalizer'));
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/awstats'));
|
||||||
|
safe_exec('mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/awstats'));
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($settings['system']['vmail_homedir'] . $row['data']['loginname']));
|
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($settings['system']['vmail_homedir'] . $row['data']['loginname']));
|
||||||
safe_exec('mkdir -p ' . escapeshellarg($settings['system']['vmail_homedir'] . $row['data']['loginname']));
|
safe_exec('mkdir -p ' . escapeshellarg($settings['system']['vmail_homedir'] . $row['data']['loginname']));
|
||||||
|
|
||||||
//check if admin of customer has added template for new customer directories
|
//check if admin of customer has added template for new customer directories
|
||||||
|
$destdir = makeCorrectDir($settings['system']['documentroot_prefix'] . '/' . $row['data']['loginname']);
|
||||||
$result = $db->query("SELECT `t`.`value`, `c`.`email` AS `customer_email`, `a`.`email` AS `admin_email`, `c`.`loginname` AS `customer_login`, `a`.`loginname` AS `admin_login` FROM `" . TABLE_PANEL_CUSTOMERS . "` AS `c` INNER JOIN `" . TABLE_PANEL_ADMINS . "` AS `a` ON `c`.`adminid` = `a`.`adminid` INNER JOIN `" . TABLE_PANEL_TEMPLATES . "` AS `t` ON `a`.`adminid` = `t`.`adminid` WHERE `varname` = 'index_html' AND `c`.`loginname` = '" . $db->escape($row['data']['loginname']) . "'");
|
storeDefaultIndex($row['data']['loginname'], $destdir, $cronlog, true);
|
||||||
|
|
||||||
if($db->num_rows($result) > 0)
|
|
||||||
{
|
|
||||||
$template = $db->fetch_array($result);
|
|
||||||
$replace_arr = array(
|
|
||||||
'SERVERNAME' => $settings['system']['hostname'],
|
|
||||||
'CUSTOMER' => $template['customer_login'],
|
|
||||||
'ADMIN' => $template['admin_login'],
|
|
||||||
'CUSTOMER_EMAIL' => $template['customer_email'],
|
|
||||||
'ADMIN_EMAIL' => $template['admin_email']
|
|
||||||
);
|
|
||||||
$htmlcontent = replace_variables($template['value'], $replace_arr);
|
|
||||||
$indexhtmlpath = $settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/index.' . $settings['system']['index_file_extension'];
|
|
||||||
$index_html_handler = fopen($indexhtmlpath, 'w');
|
|
||||||
fwrite($index_html_handler, $htmlcontent);
|
|
||||||
fclose($index_html_handler);
|
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Creating \'index.' . $settings['system']['index_file_extension'] . '\' for Customer \'' . $template['customer_login'] . '\' based on template in directory ' . escapeshellarg($indexhtmlpath));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: cp -a ' . $pathtophpfiles . '/templates/misc/standardcustomer/* ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/'));
|
|
||||||
safe_exec('cp -a ' . $pathtophpfiles . '/templates/misc/standardcustomer/* ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: chown -R ' . (int)$row['data']['uid'] . ':' . (int)$row['data']['gid'] . ' ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname']));
|
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: chown -R ' . (int)$row['data']['uid'] . ':' . (int)$row['data']['gid'] . ' ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname']));
|
||||||
safe_exec('chown -R ' . (int)$row['data']['uid'] . ':' . (int)$row['data']['gid'] . ' ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname']));
|
safe_exec('chown -R ' . (int)$row['data']['uid'] . ':' . (int)$row['data']['gid'] . ' ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname']));
|
||||||
@@ -166,7 +165,7 @@ while($row = $db->fetch_array($result_tasks))
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TYPE=4 MEANS THAT SOMETHING IN THE BIND CONFIG HAS CHANGED. REBUILD syscp_bind.conf
|
* TYPE=4 MEANS THAT SOMETHING IN THE BIND CONFIG HAS CHANGED. REBUILD froxlor_bind.conf
|
||||||
*/
|
*/
|
||||||
elseif ($row['type'] == '4')
|
elseif ($row['type'] == '4')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,6 +17,134 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
function awstatsDoSingleDomain($domain, $outputdir)
|
||||||
|
{
|
||||||
|
global $cronlog;
|
||||||
|
$returnval = 0;
|
||||||
|
|
||||||
|
$domainconfig = '/etc/awstats/awstats.' . $domain . '.conf';
|
||||||
|
if(file_exists($domainconfig))
|
||||||
|
{
|
||||||
|
$outputdir = makeCorrectDir($outputdir . '/' . $domain);
|
||||||
|
|
||||||
|
if(!is_dir($outputdir))
|
||||||
|
{
|
||||||
|
safe_exec('mkdir -p ' . escapeshellarg($outputdir));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check for correct paths of awstats_buildstaticpages.pl
|
||||||
|
*/
|
||||||
|
$awbsp = '/usr/bin/awstats_buildstaticpages.pl';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* debian...pffff, #87
|
||||||
|
*/
|
||||||
|
if (!file_exists($awbsp)) {
|
||||||
|
$awbsp = '/usr/lib/cgi-bin/awstats_buildstaticpages.pl';
|
||||||
|
}
|
||||||
|
|
||||||
|
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";
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Necessary awstats_buildstaticpages.pl script could not be found, no traffic is being calculated and no stats are generated");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Running awstats_buildstaticpages.pl for domain '".$domain."' (Output: '".$outputdir."')");
|
||||||
|
safe_exec($awbsp.' -update -config=' . $domain . ' -dir='.escapeshellarg($outputdir));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* index file is saved like 'awstats.[domain].html',
|
||||||
|
* so link a index.html to it
|
||||||
|
*/
|
||||||
|
$original_index = makeCorrectFile($outputdir.'/awstats.'.$domain.'.html');
|
||||||
|
$new_index = makeCorrectFile($outputdir.'/index.html');
|
||||||
|
if(!file_exists($new_index)) {
|
||||||
|
safe_exec('ln -s '.escapeshellarg($original_index).' '.escapeshellarg($new_index));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* statistics file looks like: 'awstats[month][year].[domain].txt'
|
||||||
|
*/
|
||||||
|
$file = makeCorrectFile($outputdir.'/awstats'.date('mY', time()).'.'.$domain.'.txt');
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Gathering traffic information from '".$file."'");
|
||||||
|
|
||||||
|
if (file_exists($file)) {
|
||||||
|
$content = @file_get_contents($file);
|
||||||
|
if ($content !== false) {
|
||||||
|
$content_array = explode("\n", $content);
|
||||||
|
|
||||||
|
$count_bdw = false;
|
||||||
|
foreach($content_array as $line)
|
||||||
|
{
|
||||||
|
if(trim($line) == '' // skip empty lines
|
||||||
|
|| substr(trim($line), 0, 1) == '#' // skip comments
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$parts = explode(' ', $line);
|
||||||
|
|
||||||
|
if(isset($parts[0])
|
||||||
|
&& strtoupper($parts[0]) == 'BEGIN_DOMAIN'
|
||||||
|
) {
|
||||||
|
$count_bdw = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($count_bdw) {
|
||||||
|
if(isset($parts[0])
|
||||||
|
&& strtoupper($parts[0]) == 'END_DOMAIN'
|
||||||
|
) {
|
||||||
|
$count_bdw = false;
|
||||||
|
break;
|
||||||
|
} elseif (isset($parts[3])) {
|
||||||
|
$returnval += floatval($parts[3]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $returnval;
|
||||||
|
}
|
||||||
|
|
||||||
|
function callAwstatsGetTraffic($domain, $outputdir, $caption, $usersdomainlist)
|
||||||
|
{
|
||||||
|
global $settings, $db, $cronlog;
|
||||||
|
$returnval = 0;
|
||||||
|
|
||||||
|
foreach($usersdomainlist as $domainid => $singledomain)
|
||||||
|
{
|
||||||
|
// as we check for the config-model awstats will only parse
|
||||||
|
// 'real' domains and no subdomains which are aliases in the
|
||||||
|
// model-config-file.
|
||||||
|
$returnval += awstatsDoSingleDomain($singledomain, $outputdir);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* now, because this traffic is being saved daily, we have to
|
||||||
|
* subtract the values from all the month's values to return
|
||||||
|
* a sane value for our panel_traffic and to remain the whole stats
|
||||||
|
* (awstats overwrites the customers .html stats-files)
|
||||||
|
*/
|
||||||
|
$customerid = getCustomerIdByDomain($domain);
|
||||||
|
|
||||||
|
if($customerid !== false)
|
||||||
|
{
|
||||||
|
$result = $db->query_first("SELECT SUM(`http`) as `trafficmonth` FROM `" . TABLE_PANEL_TRAFFIC . "`
|
||||||
|
WHERE `customerid` = '".(int)$customerid."'
|
||||||
|
AND `year`='".date('Y', time())."'
|
||||||
|
AND `month`='".date('m', time())."'");
|
||||||
|
if(is_array($result)
|
||||||
|
&& isset($result['trafficmonth'])
|
||||||
|
) {
|
||||||
|
$returnval = ($returnval - floatval($result['trafficmonth']));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return floatval($returnval);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function which make webalizer statistics and returns used traffic since last run
|
* Function which make webalizer statistics and returns used traffic since last run
|
||||||
*
|
*
|
||||||
@@ -29,7 +157,7 @@
|
|||||||
|
|
||||||
function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlist)
|
function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlist)
|
||||||
{
|
{
|
||||||
global $settings;
|
global $settings, $cronlog;
|
||||||
$returnval = 0;
|
$returnval = 0;
|
||||||
|
|
||||||
if(file_exists($settings['system']['logfiles_directory'] . $logfile . '-access.log'))
|
if(file_exists($settings['system']['logfiles_directory'] . $logfile . '-access.log'))
|
||||||
@@ -37,6 +165,7 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
|
|||||||
$domainargs = '';
|
$domainargs = '';
|
||||||
foreach($usersdomainlist as $domainid => $domain)
|
foreach($usersdomainlist as $domainid => $domain)
|
||||||
{
|
{
|
||||||
|
// hide referer
|
||||||
$domainargs.= ' -r ' . escapeshellarg($domain);
|
$domainargs.= ' -r ' . escapeshellarg($domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,6 +198,7 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
|
|||||||
$verbosity = '-Q';
|
$verbosity = '-Q';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Running webalizer for domain '".$caption."'");
|
||||||
safe_exec('webalizer ' . $verbosity . ' -p -o ' . escapeshellarg($outputdir) . ' -n ' . escapeshellarg($caption) . $domainargs . ' ' . escapeshellarg($settings['system']['logfiles_directory'] . $logfile . '-access.log'));
|
safe_exec('webalizer ' . $verbosity . ' -p -o ' . escapeshellarg($outputdir) . ' -n ' . escapeshellarg($caption) . $domainargs . ' ' . escapeshellarg($settings['system']['logfiles_directory'] . $logfile . '-access.log'));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -80,6 +210,7 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
|
|||||||
|
|
||||||
$httptraffic = array();
|
$httptraffic = array();
|
||||||
$webalizer_hist = @file_get_contents($outputdir . 'webalizer.hist');
|
$webalizer_hist = @file_get_contents($outputdir . 'webalizer.hist');
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Gathering traffic information from '".$webalizer_hist."'");
|
||||||
$webalizer_hist_rows = explode("\n", $webalizer_hist);
|
$webalizer_hist_rows = explode("\n", $webalizer_hist);
|
||||||
foreach($webalizer_hist_rows as $webalizer_hist_row)
|
foreach($webalizer_hist_rows as $webalizer_hist_row)
|
||||||
{
|
{
|
||||||
@@ -108,6 +239,7 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
|
|||||||
reset($httptraffic);
|
reset($httptraffic);
|
||||||
$httptrafficlast = array();
|
$httptrafficlast = array();
|
||||||
$webalizer_lasthist = @file_get_contents($outputdir . 'webalizer.hist.1');
|
$webalizer_lasthist = @file_get_contents($outputdir . 'webalizer.hist.1');
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Gathering traffic information from '".$webalizer_lasthist."'");
|
||||||
$webalizer_lasthist_rows = explode("\n", $webalizer_lasthist);
|
$webalizer_lasthist_rows = explode("\n", $webalizer_lasthist);
|
||||||
foreach($webalizer_lasthist_rows as $webalizer_lasthist_row)
|
foreach($webalizer_lasthist_rows as $webalizer_lasthist_row)
|
||||||
{
|
{
|
||||||
@@ -229,4 +361,3 @@ function safeSQLLogfile($domains, $loginname)
|
|||||||
$db->query("DELETE FROM access_log " . $where);
|
$db->query("DELETE FROM access_log " . $where);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,14 @@ while($row = $db->fetch_array($result))
|
|||||||
unset($domainlist[$row['customerid']][$domainid]);
|
unset($domainlist[$row['customerid']][$domainid]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'] . '-' . $domain, $row['documentroot'] . '/webalizer/' . $domain . '/', $domain, $domainlist[$row['customerid']]));
|
if($settings['system']['awstats_enabled'] == '1')
|
||||||
|
{
|
||||||
|
$httptraffic+= floatval(callAwstatsGetTraffic($domain, $row['documentroot'] . '/webalizer/' . $domain . '/', $domain, $domainlist[$row['customerid']]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'] . '-' . $domain, $row['documentroot'] . '/webalizer/' . $domain . '/', $domain, $domainlist[$row['customerid']]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,7 +183,14 @@ while($row = $db->fetch_array($result))
|
|||||||
safeSQLLogfile($domainlist[$row['customerid']], $row['loginname']);
|
safeSQLLogfile($domainlist[$row['customerid']], $row['loginname']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'], $row['documentroot'] . '/webalizer/', $caption, $domainlist[$row['customerid']]));
|
if($settings['system']['awstats_enabled'] == '1')
|
||||||
|
{
|
||||||
|
$httptraffic+= floatval(callAwstatsGetTraffic($caption, $row['documentroot'] . '/awstats/', $caption, $domainlist[$row['customerid']]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'], $row['documentroot'] . '/webalizer/', $caption, $domainlist[$row['customerid']]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -26,7 +26,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();
|
||||||
$mail->From = $settings['panel']['adminmail'];
|
$mail->SetFrom($settings['panel']['adminmail'], 'Froxlor Administrator');
|
||||||
|
|
||||||
// Warn the customers at 90% traffic-usage
|
// Warn the customers at 90% traffic-usage
|
||||||
|
|
||||||
@@ -82,15 +82,26 @@ while($row = $db->fetch_array($result))
|
|||||||
AND `templategroup`='mails'
|
AND `templategroup`='mails'
|
||||||
AND `varname`='trafficninetypercent_mailbody'");
|
AND `varname`='trafficninetypercent_mailbody'");
|
||||||
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
|
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
|
||||||
$mail->From = $row['adminmail'];
|
|
||||||
$mail->FromName = $row['adminname'];
|
|
||||||
$mail->Subject = $mail_subject;
|
|
||||||
$mail->Body = $mail_body;
|
|
||||||
$mail->AddAddress($row['email'], $row['firstname'] . ' ' . $row['name']);
|
|
||||||
|
|
||||||
if(!$mail->Send())
|
$_mailerror = false;
|
||||||
|
try {
|
||||||
|
$mail->SetFrom($row['adminmail'], $row['adminname']);
|
||||||
|
$mail->Subject = $mail_subject;
|
||||||
|
$mail->AltBody = $mail_body;
|
||||||
|
$mail->MsgHTML($mail_body);
|
||||||
|
$mail->AddAddress($row['email'], $row['firstname'] . ' ' . $row['name']);
|
||||||
|
$mail->Send();
|
||||||
|
} catch(phpmailerException $e) {
|
||||||
|
$mailerr_msg = $e->errorMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$mailerr_msg = $e->getMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($_mailerror)
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mail->ErrorInfo);
|
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $_mailerror);
|
||||||
standard_error('errorsendingmail', $row["email"]);
|
standard_error('errorsendingmail', $row["email"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,15 +161,25 @@ while($row = $db->fetch_array($result))
|
|||||||
AND `templategroup`='mails'
|
AND `templategroup`='mails'
|
||||||
AND `varname`='trafficninetypercent_mailbody'");
|
AND `varname`='trafficninetypercent_mailbody'");
|
||||||
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
|
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
|
||||||
$mail->From = $row['email'];
|
|
||||||
$mail->FromName = $row['firstname'] . " " . $row['name'];
|
|
||||||
$mail->Subject = $mail_subject;
|
|
||||||
$mail->Body = $mail_body;
|
|
||||||
$mail->AddAddress($row['email'], $row['name']);
|
|
||||||
|
|
||||||
if(!$mail->Send())
|
$_mailerror = false;
|
||||||
{
|
try {
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mail->ErrorInfo);
|
$mail->SetFrom($row['email'], $row['firstname'] . " " . $row['name']);
|
||||||
|
$mail->Subject = $mail_subject;
|
||||||
|
$mail->AltBody = $mail_body;
|
||||||
|
$mail->MsgHTML($mail_body);
|
||||||
|
$mail->AddAddress($row['email'], $row['name']);
|
||||||
|
$mail->Send();
|
||||||
|
} catch(phpmailerException $e) {
|
||||||
|
$mailerr_msg = $e->errorMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$mailerr_msg = $e->getMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
standard_error('errorsendingmail', $row["email"]);
|
standard_error('errorsendingmail', $row["email"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,15 +210,25 @@ while($row = $db->fetch_array($result))
|
|||||||
|
|
||||||
$mail_body.= '---------------------------------------------' . "\n";
|
$mail_body.= '---------------------------------------------' . "\n";
|
||||||
$mail_body.= sprintf('%-15s', $row['loginname']) . ' ' . sprintf('%-12d', $row['traffic_used_total']) . ' (' . sprintf('%00.3f%%', (($row['traffic_used_total'] * 100) / $row['traffic'])) . ') ' . $row['traffic'] . "\n";
|
$mail_body.= sprintf('%-15s', $row['loginname']) . ' ' . sprintf('%-12d', $row['traffic_used_total']) . ' (' . sprintf('%00.3f%%', (($row['traffic_used_total'] * 100) / $row['traffic'])) . ') ' . $row['traffic'] . "\n";
|
||||||
$mail->From = $row['email'];
|
|
||||||
$mail->FromName = $row['name'];
|
|
||||||
$mail->Subject = $mail_subject;
|
|
||||||
$mail->Body = $mail_body;
|
|
||||||
$mail->AddAddress($row['email'], $row['name']);
|
|
||||||
|
|
||||||
if(!$mail->Send())
|
$_mailerror = false;
|
||||||
{
|
try {
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mail->ErrorInfo);
|
$mail->SetFrom($row['email'], $row['name']);
|
||||||
|
$mail->Subject = $mail_subject;
|
||||||
|
$mail->AltBody = $mail_body;
|
||||||
|
$mail->MsgHTML($mail_body);
|
||||||
|
$mail->AddAddress($row['email'], $row['name']);
|
||||||
|
$mail->Send();
|
||||||
|
} catch(phpmailerException $e) {
|
||||||
|
$mailerr_msg = $e->errorMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$mailerr_msg = $e->getMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||||
standard_error('errorsendingmail', $row["email"]);
|
standard_error('errorsendingmail', $row["email"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
48
templates/admin/cronjobs/cronjob_edit.tpl
Normal file
48
templates/admin/cronjobs/cronjob_edit.tpl
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
$header
|
||||||
|
<form method="post" action="$filename">
|
||||||
|
<input type="hidden" name="s" value="$s" />
|
||||||
|
<input type="hidden" name="page" value="$page" />
|
||||||
|
<input type="hidden" name="action" value="$action" />
|
||||||
|
<input type="hidden" name="id" value="$id" />
|
||||||
|
<input type="hidden" name="send" value="send" />
|
||||||
|
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable">
|
||||||
|
<tr>
|
||||||
|
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['admin']['cronjob_edit']}</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="maintitle_apply_left">
|
||||||
|
<b><img src="images/title.gif" alt="" /> {$lng['cronjob']['cronjobsettings']}</b>
|
||||||
|
</td>
|
||||||
|
<td class="maintitle_apply_right" nowrap="nowrap">
|
||||||
|
<input class="bottom" type="reset" value="{$lng['panel']['reset']}" /><input class="bottom" type="submit" value="{$lng['panel']['save']}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_name">Cronjob:</td>
|
||||||
|
<if $change_cronfile == 1 >
|
||||||
|
<td class="main_field_display" nowrap="nowrap"><input type="text" name="cronfile" value="{$result['cronfile']}" /></td>
|
||||||
|
<else>
|
||||||
|
<td class="main_field_display" nowrap="nowrap">{$result['cronfile']}</td>
|
||||||
|
</if>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_name">{$lng['admin']['activated']}:</td>
|
||||||
|
<td class="main_field_display" nowrap="nowrap">{$isactive}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_name">{$lng['cronjob']['cronjobinterval']}:</td>
|
||||||
|
<td class="main_field_display" nowrap="nowrap">
|
||||||
|
<input type="text" name="interval_value" value="{$interval_value}" />
|
||||||
|
<select class="dropdown_noborder" name="interval_interval">$interval_interval</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="maintitle_apply_right" nowrap="nowrap" colspan="2">
|
||||||
|
<input class="bottom" type="reset" value="{$lng['panel']['reset']}" /><input class="bottom" type="submit" value="{$lng['panel']['save']}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
$footer
|
||||||
@@ -4,25 +4,30 @@ $header
|
|||||||
<input type="hidden" name="page" value="$page"/>
|
<input type="hidden" name="page" value="$page"/>
|
||||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="maintitle_search_left" colspan="4"><b><img src="images/title.gif" alt="" /> {$lng['admin']['cron']['cronsettings']}</b></td>
|
<td class="maintitle"><b><img src="images/title.gif" alt="" /> {$lng['admin']['warning']}</b></td>
|
||||||
<td class="maintitle_search_right" colspan="2">{$searchcode}</td>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left">
|
||||||
|
<span style="font-weight: bold; color: #ff0000;">
|
||||||
|
{$lng['cron']['changewarning']}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||||
|
<tr>
|
||||||
|
<td class="maintitle" colspan="5"><b><img src="images/title.gif" alt="" /> {$lng['admin']['cron']['cronsettings']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_display_border_left">{$lng['cron']['description']}</td>
|
<td class="field_display_border_left">{$lng['cron']['description']}</td>
|
||||||
<td class="field_display">{$lng['cron']['lastrun']} {$arrowcode['c.lastrun']}</td>
|
<td class="field_display">{$lng['cron']['lastrun']}</td>
|
||||||
<td class="field_display">{$lng['cron']['interval']} {$arrowcode['c.interval']}</td>
|
<td class="field_display">{$lng['cron']['interval']}</td>
|
||||||
<td class="field_display">{$lng['cron']['isactive']} {$arrowcode['c.isactive']}</td>
|
<td class="field_display">{$lng['cron']['isactive']}</td>
|
||||||
<td class="field_display_search" colspan="2">{$sortcode}</td>
|
<td class="field_display">{$lng['panel']['options']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
$crons
|
$crons
|
||||||
<if $pagingcode != ''>
|
|
||||||
<tr>
|
|
||||||
<td class="field_display_border_left" colspan="6" style=" text-align: center; ">{$pagingcode}</td>
|
|
||||||
</tr>
|
|
||||||
</if>
|
|
||||||
<tr>
|
|
||||||
<td class="field_display_border_left" colspan="6"><a href="$filename?page=$page&action=add&s=$s">{$lng['admin']['cron']['add']}</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -4,5 +4,4 @@
|
|||||||
<td class="field_name">{$row['interval']}</td>
|
<td class="field_name">{$row['interval']}</td>
|
||||||
<td class="field_name">{$row['isactive']}</td>
|
<td class="field_name">{$row['isactive']}</td>
|
||||||
<td class="field_name"><a href="$filename?s=$s&page=$page&action=edit&id={$row['id']}">{$lng['panel']['edit']}</a></td>
|
<td class="field_name"><a href="$filename?s=$s&page=$page&action=edit&id={$row['id']}">{$lng['panel']['edit']}</a></td>
|
||||||
<td class="field_name"><if $vendor != 'froxlor'><a href="$filename?s=$s&page=$page&action=delete&id={$row['id']}">{$lng['panel']['delete']}</a></if></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -119,16 +119,25 @@ $header
|
|||||||
{$cron_last_runs}
|
{$cron_last_runs}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_name_border_left">{$lng['admin']['installedversion']}:</td>
|
<td class="field_name_border_left">{$lng['admin']['installedversion']}:</td>
|
||||||
<td class="field_display">{$version}</td>
|
<td class="field_display">{$version}{$branding}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_name_border_left">{$lng['admin']['latestversion']}:</td>
|
<td class="field_name_border_left">{$lng['admin']['latestversion']}:</td>
|
||||||
<td class="field_display"><a href="$lookfornewversion_link">$lookfornewversion_lable</a></td>
|
<if $isnewerversion != 0 >
|
||||||
|
<td class="field_display"><a href="$lookfornewversion_link"><strong>$lookfornewversion_lable</strong></a></td>
|
||||||
|
<else>
|
||||||
|
<td class="field_display"><a href="$lookfornewversion_link">$lookfornewversion_lable</a></td>
|
||||||
|
</if>
|
||||||
</tr>
|
</tr>
|
||||||
<if $lookfornewversion_addinfo != ''>
|
<if $isnewerversion != 0 >
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_name_border_left" colspan="2">$lookfornewversion_addinfo</td>
|
<td class="field_name_border_left" colspan="2"><strong>{$lng['admin']['newerversionavailable']}</strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<if $lookfornewversion_addinfo != ''>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left" colspan="2">$lookfornewversion_addinfo</td>
|
||||||
|
</tr>
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -43,15 +43,11 @@ $header
|
|||||||
<td class="main_field_display" nowrap="nowrap">$namevirtualhost_statement</td>
|
<td class="main_field_display" nowrap="nowrap">$namevirtualhost_statement</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['admin']['ipsandports']['create_vhostcontainer']}:
|
<td class="main_field_name">{$lng['admin']['ipsandports']['create_vhostcontainer']}:</td>
|
||||||
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
|
|
||||||
</td>
|
|
||||||
<td class="main_field_display" nowrap="nowrap">$vhostcontainer</td>
|
<td class="main_field_display" nowrap="nowrap">$vhostcontainer</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name" valign="top">{$lng['admin']['ownvhostsettings']}:<br /><font size="1">{$lng['serversettings']['default_vhostconf']['description']}</font>
|
<td class="main_field_name" valign="top">{$lng['admin']['ownvhostsettings']}:<br /><font size="1">{$lng['serversettings']['default_vhostconf']['description']}</font></td>
|
||||||
<if $settings['system']['webserver'] == 'lighttpd'><div style="color:red">{$lng['panel']['not_supported']}lighttpd</div></if>
|
|
||||||
</td>
|
|
||||||
<td class="main_field_display" nowrap="nowrap"><textarea class="textarea_border" rows="12" cols="60" name="specialsettings">{$result['specialsettings']}</textarea></td>
|
<td class="main_field_display" nowrap="nowrap"><textarea class="textarea_border" rows="12" cols="60" name="specialsettings">{$result['specialsettings']}</textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ $header
|
|||||||
<td class="field_display">{$lng['ticket']['subject']}</td>
|
<td class="field_display">{$lng['ticket']['subject']}</td>
|
||||||
<td class="field_display">{$lng['ticket']['lastreplier']}</td>
|
<td class="field_display">{$lng['ticket']['lastreplier']}</td>
|
||||||
<td class="field_display">{$lng['ticket']['priority']}</td>
|
<td class="field_display">{$lng['ticket']['priority']}</td>
|
||||||
<td class="field_display_search"> </td>
|
<td class="field_display_search"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
$tickets
|
$tickets
|
||||||
</if>
|
</if>
|
||||||
<if $tickets_count < 1 >
|
<if $tickets_count < 1 >
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_display_border_left" colspan="5">{$lng['ticket']['noresults']}</td>
|
<td class="field_display_border_left" colspan="6">{$lng['ticket']['noresults']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</if>
|
</if>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="title" colspan="4"> <b>{$row['domain']}</b> [<a href="http://{$row['domain']}/webalizer" target="_blank">{$lng['domains']['statstics']}</a>]</td>
|
<td class="title" colspan="4"> <b>{$row['domain']}</b> [<a href="http://{$row['domain']}/{$statsapp}" target="_blank">{$lng['domains']['statstics']}</a>]</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -7,17 +7,23 @@ $header
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['emails']['emails_add']}</b></td>
|
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['emails']['emails_add']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<if $domains != '' >
|
||||||
<td class="main_field_name">{$lng['emails']['emailaddress']}:</td>
|
<tr>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" name="email_part" value="" size="15" /> @ <select class="dropdown_noborder" name="domain">$domains</select></td>
|
<td class="main_field_name">{$lng['emails']['emailaddress']}:</td>
|
||||||
</tr>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" name="email_part" value="" size="15" /> @ <select class="dropdown_noborder" name="domain">$domains</select></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td class="main_field_name">{$lng['emails']['iscatchall']}</td>
|
<tr>
|
||||||
<td class="main_field_display" nowrap="nowrap">$iscatchall</td>
|
<td class="main_field_name">{$lng['emails']['iscatchall']}</td>
|
||||||
</tr>
|
<td class="main_field_display" nowrap="nowrap">$iscatchall</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['emails']['emails_add']}" /></td>
|
<tr>
|
||||||
</tr>
|
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['emails']['emails_add']}" /></td>
|
||||||
|
</tr>
|
||||||
|
<else
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_name" colspan="2">{$lng['emails']['noemaildomainaddedyet']}</td>
|
||||||
|
</tr>
|
||||||
|
</if>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<td width="100%" class="footer">
|
<td width="100%" class="footer">
|
||||||
<br />Froxlor
|
<br />Froxlor
|
||||||
<if ($settings['admin']['show_version_login'] == '1' && $filename == 'index.php') || ($filename != 'index.php' && $settings['admin']['show_version_footer'] == '1')>
|
<if ($settings['admin']['show_version_login'] == '1' && $filename == 'index.php') || ($filename != 'index.php' && $settings['admin']['show_version_footer'] == '1')>
|
||||||
{$version}
|
{$version}{$branding}
|
||||||
</if>
|
</if>
|
||||||
© 2009-2010 by <a href="http://www.froxlor.org/" target="_blank">the Froxlor Team</a>
|
© 2009-2010 by <a href="http://www.froxlor.org/" target="_blank">the Froxlor Team</a>
|
||||||
<br />Theme based on work by: Luca Piona and Luca Longinotti
|
<br />Theme based on work by: Luca Piona and Luca Longinotti
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ LogFormat = 1
|
|||||||
LogSeparator=" "
|
LogSeparator=" "
|
||||||
SiteDomain="{SITE_DOMAIN}"
|
SiteDomain="{SITE_DOMAIN}"
|
||||||
HostAliases="{HOST_ALIASES}"
|
HostAliases="{HOST_ALIASES}"
|
||||||
|
DirData="{CUSTOMER_DOCROOT}"
|
||||||
|
|
||||||
# Include local configuration options identical for all virtual hosts
|
# Include local configuration options identical for all virtual hosts
|
||||||
Include "/etc/awstats/awstats.conf.local"
|
Include "/etc/awstats/awstats.model.conf"
|
||||||
@@ -4,6 +4,7 @@ LogFormat = "%host %virtualname %logname %time1 %methodurl %code %bytesd %refere
|
|||||||
LogSeparator=" "
|
LogSeparator=" "
|
||||||
SiteDomain="{SITE_DOMAIN}"
|
SiteDomain="{SITE_DOMAIN}"
|
||||||
HostAliases="{HOST_ALIASES}"
|
HostAliases="{HOST_ALIASES}"
|
||||||
|
DirData="{CUSTOMER_DOCROOT}"
|
||||||
|
|
||||||
# Include local configuration options identical for all virtual hosts
|
# Include local configuration options identical for all virtual hosts
|
||||||
Include "/etc/awstats/awstats.conf.local"
|
Include "/etc/awstats/awstats.model.conf"
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
ScriptAlias /awstats/ "/usr/lib/cgi-bin/"
|
|
||||||
ScriptAlias /awstats "/usr/lib/cgi-bin/awstats.pl"
|
|
||||||
ScriptAlias /awstats.pl "/usr/lib/cgi-bin/awstats.pl"
|
|
||||||
Alias /awstats-icon/ "/usr/share/awstats/icon/"
|
|
||||||
|
|
||||||
<Directory "/usr/lib/cgi-bin">
|
|
||||||
Options ExecCGI
|
|
||||||
AllowOverride None
|
|
||||||
<IfModule mod_access.c>
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
</IfModule>
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# for Froxlor and AWStats to work together
|
||||||
|
# you have to change the following line
|
||||||
|
|
||||||
|
# look for
|
||||||
|
DirData="/some/folder/"
|
||||||
|
|
||||||
|
# and comment this out with a hash (#)
|
||||||
|
#DirData="/some/folder/"
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
LogFile="{LOG_FILE}"
|
|
||||||
LogType=W
|
|
||||||
LogFormat = 1
|
|
||||||
LogSeparator=" "
|
|
||||||
SiteDomain="{SITE_DOMAIN}"
|
|
||||||
HostAliases="{HOST_ALIASES}"
|
|
||||||
|
|
||||||
# Include local configuration options identical for all virtual hosts
|
|
||||||
Include "/etc/awstats/awstats.conf.local"
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
LogFile="{LOG_FILE}"
|
|
||||||
LogType=W
|
|
||||||
LogFormat = "%host %virtualname %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"
|
|
||||||
LogSeparator=" "
|
|
||||||
SiteDomain="{SITE_DOMAIN}"
|
|
||||||
HostAliases="{HOST_ALIASES}"
|
|
||||||
|
|
||||||
# Include local configuration options identical for all virtual hosts
|
|
||||||
Include "/etc/awstats/awstats.conf.local"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#
|
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
|
||||||
#
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
|
|
||||||
*/10 * * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.froxlor,awstats.conf
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#
|
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
|
||||||
#
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
|
|
||||||
45 0 * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.froxlor,awstats.conf
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
#alias.url += (
|
|
||||||
# "/js/awstats_misc_tracker.js" => "/usr/share/awstats/wwwroot/js/awstats_misc_tracker.js"
|
|
||||||
#)
|
|
||||||
|
|
||||||
$HTTP["url"] =~ "^/awstats" {
|
|
||||||
alias.url += (
|
|
||||||
"/awstats/" => "<AWSTATS_PATH>",
|
|
||||||
"/awstats" => "<AWSTATS_PATH>awstats.pl",
|
|
||||||
"/awstats.pl" => "<AWSTATS_PATH>awstats.pl"
|
|
||||||
# "/awstatsicons/" => "/usr/share/awstats/wwwroot/icon/"
|
|
||||||
)
|
|
||||||
|
|
||||||
index-file.names = ( "awstatstotals.php" )
|
|
||||||
|
|
||||||
cgi.assign = (
|
|
||||||
".pl" => "/usr/bin/perl",
|
|
||||||
".cgi" => "/usr/bin/perl"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -33,7 +33,7 @@ url.access-deny = ("~", ".inc")
|
|||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "/var/kunden/tmp/lighttpd-fcgi-sock-lighttpd",
|
"socket" => "<CUSTOMER_TMP>lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php5-cgi",
|
"bin-path" => "/usr/bin/php5-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
@@ -54,7 +54,3 @@ fastcgi.server = (
|
|||||||
#### external configuration files
|
#### external configuration files
|
||||||
## mimetype mapping
|
## mimetype mapping
|
||||||
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
||||||
|
|
||||||
## load enabled configuration files,
|
|
||||||
## read /etc/lighttpd/conf-available/README first
|
|
||||||
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
|
|
||||||
@@ -70,6 +70,7 @@ alias_maps = $alias_database
|
|||||||
|
|
||||||
# Default Mailbox size, is set to 0 which means unlimited!
|
# Default Mailbox size, is set to 0 which means unlimited!
|
||||||
mailbox_size_limit = 0
|
mailbox_size_limit = 0
|
||||||
|
virtual_mailbox_limit = 0
|
||||||
|
|
||||||
### TLS settings
|
### TLS settings
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
service froxlor
|
service froxlor
|
||||||
{
|
{
|
||||||
id = froxlor
|
id = froxlor
|
||||||
socket_type = dgram
|
socket_type = stream
|
||||||
protocol = udp
|
protocol = tcp
|
||||||
wait = no
|
wait = no
|
||||||
|
|
||||||
user = root
|
user = root
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
ScriptAlias /awstats/ "/usr/lib/cgi-bin/"
|
|
||||||
ScriptAlias /awstats "/usr/lib/cgi-bin/awstats.pl"
|
|
||||||
ScriptAlias /awstats.pl "/usr/lib/cgi-bin/awstats.pl"
|
|
||||||
Alias /awstats-icon/ "/usr/share/awstats/icon/"
|
|
||||||
|
|
||||||
<Directory "/usr/lib/cgi-bin">
|
|
||||||
Options ExecCGI
|
|
||||||
AllowOverride None
|
|
||||||
<IfModule mod_access.c>
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
</IfModule>
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# for Froxlor and AWStats to work together
|
||||||
|
# you have to change the following line
|
||||||
|
|
||||||
|
# look for
|
||||||
|
DirData="/some/folder/"
|
||||||
|
|
||||||
|
# and comment this out with a hash (#)
|
||||||
|
#DirData="/some/folder/"
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
LogFile="{LOG_FILE}"
|
|
||||||
LogType=W
|
|
||||||
LogFormat = "%host %virtualname %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"
|
|
||||||
LogSeparator=" "
|
|
||||||
SiteDomain="{SITE_DOMAIN}"
|
|
||||||
HostAliases="{HOST_ALIASES}"
|
|
||||||
|
|
||||||
# Include local configuration options identical for all virtual hosts
|
|
||||||
Include "/etc/awstats/awstats.conf.local"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#
|
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
|
||||||
#
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
|
|
||||||
*/10 * * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.froxlor,awstats.conf
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#
|
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
|
||||||
#
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
|
|
||||||
45 0 * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.froxlor,awstats.conf
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
#alias.url += (
|
|
||||||
# "/js/awstats_misc_tracker.js" => "/usr/share/awstats/wwwroot/js/awstats_misc_tracker.js"
|
|
||||||
#)
|
|
||||||
|
|
||||||
$HTTP["url"] =~ "^/awstats" {
|
|
||||||
alias.url += (
|
|
||||||
"/awstats/" => "<AWSTATS_PATH>",
|
|
||||||
"/awstats" => "<AWSTATS_PATH>awstats.pl",
|
|
||||||
"/awstats.pl" => "<AWSTATS_PATH>awstats.pl"
|
|
||||||
# "/awstatsicons/" => "/usr/share/awstats/wwwroot/icon/"
|
|
||||||
)
|
|
||||||
|
|
||||||
index-file.names = ( "awstatstotals.php" )
|
|
||||||
|
|
||||||
cgi.assign = (
|
|
||||||
".pl" => "/usr/bin/perl",
|
|
||||||
".cgi" => "/usr/bin/perl"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -33,7 +33,7 @@ url.access-deny = ("~", ".inc")
|
|||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "/var/kunden/tmp/lighttpd-fcgi-sock-lighttpd",
|
"socket" => "<CUSTOMER_TMP>lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php5-cgi",
|
"bin-path" => "/usr/bin/php5-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
@@ -54,7 +54,3 @@ fastcgi.server = (
|
|||||||
#### external configuration files
|
#### external configuration files
|
||||||
## mimetype mapping
|
## mimetype mapping
|
||||||
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
||||||
|
|
||||||
## load enabled configuration files,
|
|
||||||
## read /etc/lighttpd/conf-available/README first
|
|
||||||
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user