Compare commits
129 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e50d0b0440 | ||
|
|
cc89f26982 | ||
|
|
8155484ee9 | ||
|
|
97e3b30415 | ||
|
|
07b2c26bec | ||
|
|
afe431b72f | ||
|
|
f5f796344c | ||
|
|
8ee56d23ba | ||
|
|
f62dba4e1b | ||
|
|
87f84c694a | ||
|
|
f5a0727b8e | ||
|
|
4d5dcb82d6 | ||
|
|
7fa901bebb | ||
|
|
1159bde3eb | ||
|
|
9013062ae9 | ||
|
|
47b2fe7c7c | ||
|
|
cfaae63657 | ||
|
|
98e79d933c | ||
|
|
ae27e06675 | ||
|
|
209ab4dff9 | ||
|
|
cf18590b84 | ||
|
|
6c25cd1c85 | ||
|
|
0d3df6e1fe | ||
|
|
b11d0c5cd9 | ||
|
|
afc3ab8a8b | ||
|
|
1903f34dea | ||
|
|
ee7e50004a | ||
|
|
96d26d0d94 | ||
|
|
7c12ab82c5 | ||
|
|
5c152a9754 | ||
|
|
5a4fffbce6 | ||
|
|
220118f4bc | ||
|
|
5d214e5bd7 | ||
|
|
43fe968ad0 | ||
|
|
7daa7eb0bc | ||
|
|
a0274b083b | ||
|
|
04c7aae433 | ||
|
|
5a99950a8f | ||
|
|
4659d8e24a | ||
|
|
5e3a4fb1ab | ||
|
|
1839264f7a | ||
|
|
5f9d90a293 | ||
|
|
5c825e3206 | ||
|
|
a54a27d6ba | ||
|
|
16135fb92b | ||
|
|
f8d0472274 | ||
|
|
368e6a5c50 | ||
|
|
fb4ade70d2 | ||
|
|
6a0fcc1fd9 | ||
|
|
0eec533647 | ||
|
|
941b887b75 | ||
|
|
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 |
@@ -77,6 +77,24 @@ return array(
|
||||
'default' => '',
|
||||
'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(
|
||||
'label' => $lng['serversettings']['decimal_places'],
|
||||
'settinggroup' => 'panel',
|
||||
|
||||
@@ -54,6 +54,14 @@ return array(
|
||||
'default' => 900,
|
||||
'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(
|
||||
'label' => $lng['serversettings']['accountprefix'],
|
||||
'settinggroup' => 'customer',
|
||||
|
||||
@@ -58,6 +58,14 @@ return array(
|
||||
'default' => '',
|
||||
'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(
|
||||
'label' => $lng['serversettings']['mysql_access_host'],
|
||||
'settinggroup' => 'system',
|
||||
@@ -85,6 +93,14 @@ return array(
|
||||
'default' => 'html',
|
||||
'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(
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'httpuser',
|
||||
|
||||
@@ -31,6 +31,7 @@ return array(
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd'),
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'system_apacheconf_vhost' => array(
|
||||
'label' => $lng['serversettings']['apacheconf_vhost'],
|
||||
|
||||
@@ -40,45 +40,27 @@ return array(
|
||||
'default' => false,
|
||||
'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/',
|
||||
'default' => '/usr/bin/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_updateall_command' => array(
|
||||
'label' => $lng['serversettings']['awstats_updateall_command'],
|
||||
'system_awstats_conf' => array(
|
||||
'label' => $lng['serversettings']['awstats_conf'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_updateall_command',
|
||||
'varname' => 'awstats_conf',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'default' => '/usr/bin/awstats_updateall.pl',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/etc/awstats/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -75,7 +75,7 @@ return array(
|
||||
'default' => 100,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'systen_autoresponder_enabled' => array(
|
||||
'system_autoresponder_enabled' => array(
|
||||
'label' => $lng['serversettings']['autoresponder_active'],
|
||||
'settinggroup' => 'autoresponder',
|
||||
'varname' => 'autoresponder_active',
|
||||
@@ -84,7 +84,7 @@ return array(
|
||||
'cronmodule' => 'froxlor/autoresponder',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'systen_last_autoresponder_run' => array(
|
||||
'system_last_autoresponder_run' => array(
|
||||
'settinggroup' => 'autoresponder',
|
||||
'varname' => 'last_autoresponder_run',
|
||||
'type' => 'hidden',
|
||||
|
||||
@@ -29,6 +29,7 @@ return array(
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'logger_severity' => array(
|
||||
'label' => $lng['serversettings']['logger']['severity'],
|
||||
|
||||
@@ -28,7 +28,8 @@ return array(
|
||||
'varname' => 'use_dkim',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
'overview_option' => true
|
||||
),
|
||||
'dkim_prefix' => array(
|
||||
'label' => $lng['dkim']['dkim_prefix'],
|
||||
@@ -56,6 +57,63 @@ return array(
|
||||
'default' => 'dkim-keys.conf',
|
||||
'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(
|
||||
'label' => $lng['dkim']['dkimrestart_command'],
|
||||
'settinggroup' => 'dkim',
|
||||
|
||||
@@ -26,7 +26,8 @@ return array(
|
||||
'varname' => 'use_spf',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'spf_entry' => array(
|
||||
'label' => $lng['spf']['spf_entry'],
|
||||
|
||||
@@ -30,6 +30,7 @@ return array(
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/ticket',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'ticket_noreply_email' => array(
|
||||
'label' => $lng['serversettings']['ticket']['noreply_email'],
|
||||
|
||||
@@ -30,6 +30,7 @@ return array(
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/aps',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'aps_items_per_page' => array(
|
||||
'label' => $lng['aps']['packages_per_page'],
|
||||
|
||||
@@ -154,6 +154,7 @@ if($page == 'admins'
|
||||
|
||||
$loginname = validate($_POST['loginname'], 'loginname');
|
||||
$password = validate($_POST['admin_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
$def_language = validate($_POST['def_language'], 'default language');
|
||||
$customers = intval_ressource($_POST['customers']);
|
||||
|
||||
@@ -560,6 +561,7 @@ if($page == 'admins'
|
||||
{
|
||||
if($password != '')
|
||||
{
|
||||
$password = validatePassword($password);
|
||||
$password = md5($password);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -95,9 +95,9 @@ if($userinfo['change_serversettings'] == '1')
|
||||
'<VIRTUAL_MAILBOX_BASE>' => $settings['system']['vmail_homedir'],
|
||||
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
|
||||
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
|
||||
'<AWSTATS_PATH>' => $settings['system']['awstats_path'],
|
||||
'<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 = '';
|
||||
$configpage = '';
|
||||
@@ -110,6 +110,7 @@ if($userinfo['change_serversettings'] == '1')
|
||||
if(is_array($value))
|
||||
{
|
||||
$commands = implode("\n", $value);
|
||||
$commands = str_replace("\n\n", "\n", $commands);
|
||||
|
||||
if($commands != '')
|
||||
{
|
||||
|
||||
@@ -75,12 +75,6 @@ if($page == 'cronjobs'
|
||||
|
||||
$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") . "\";");
|
||||
$count++;
|
||||
}
|
||||
@@ -94,21 +88,68 @@ if($page == 'cronjobs'
|
||||
elseif($action == 'new')
|
||||
{
|
||||
/*
|
||||
* @TODO Finish me
|
||||
* @TODO later
|
||||
*/
|
||||
}
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
/*
|
||||
* @TODO Finish me
|
||||
*/
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CRONRUNS . "` WHERE `id`='" . (int)$id . "'");
|
||||
|
||||
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'
|
||||
&& $id != 0)
|
||||
{
|
||||
/*
|
||||
* @TODO Finish me
|
||||
* @TODO later
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ if($page == 'customers'
|
||||
'c.email_quota' => $lng['customer']['email_quota'],
|
||||
'c.email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.deactivated' => $lng['admin']['deactivated'],
|
||||
'c.lastlogin_succ' => $lng['admin']['lastlogin_succ'],
|
||||
'c.phpenabled' => $lng['admin']['phpenabled']
|
||||
);
|
||||
|
||||
@@ -96,6 +97,15 @@ if($page == 'customers'
|
||||
$row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
$row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
|
||||
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
|
||||
$last_login = ((int)$row['lastlogin_succ'] == 0) ? $lng['panel']['neverloggedin'] : date('d.m.Y', $row['lastlogin_succ']);
|
||||
|
||||
$column_style = '';
|
||||
if($row['loginfail_count'] >= $settings['login']['maxloginattempts']
|
||||
&& $row['lastlogin_fail'] > (time() - $settings['login']['deactivatetime'])
|
||||
) {
|
||||
$column_style = ' style="background-color: #f99122;"';
|
||||
}
|
||||
|
||||
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains');
|
||||
$row = htmlentities_array($row);
|
||||
eval("\$customers.=\"" . getTemplate("customers/customers_customer") . "\";");
|
||||
@@ -379,6 +389,7 @@ if($page == 'customers'
|
||||
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
$password = validate($_POST['customer_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
$sendpassword = intval($_POST['sendpassword']);
|
||||
$phpenabled = intval($_POST['phpenabled']);
|
||||
$diskspace = $diskspace * 1024;
|
||||
@@ -567,14 +578,16 @@ if($page == 'customers'
|
||||
$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')
|
||||
{
|
||||
$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 . "'");
|
||||
}
|
||||
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');
|
||||
$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 +596,18 @@ if($page == 'customers'
|
||||
|
||||
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 " .
|
||||
"`domain` = '". $db->escape($loginname . '.' . $settings['system']['hostname']) . "', " .
|
||||
"`domain` = '". $db->escape($_stdsubdomain) . "', " .
|
||||
"`customerid` = '" . (int)$customerid . "', " .
|
||||
"`adminid` = '" . (int)$userinfo['adminid'] . "', " .
|
||||
"`parentdomainid` = '-1', " .
|
||||
@@ -622,23 +645,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\'');
|
||||
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['createcustomer']['mailbody']), $replace_arr));
|
||||
|
||||
$mail->From = $userinfo['email'];
|
||||
$mail->FromName = $userinfo['name'];
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->Body = $mail_body;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($email, getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)));
|
||||
|
||||
if(!$mail->Send())
|
||||
{
|
||||
if($mail->ErrorInfo != '')
|
||||
{
|
||||
$mailerr_msg = $mail->ErrorInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mailerr_msg = $email;
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
$_mailerror = true;
|
||||
} catch (Exception $e) {
|
||||
$mailerr_msg = $e->getMessage();
|
||||
$_mailerror = true;
|
||||
}
|
||||
|
||||
if ($_mailerror) {
|
||||
$log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $email);
|
||||
}
|
||||
@@ -850,6 +872,7 @@ if($page == 'customers'
|
||||
{
|
||||
if($password != '')
|
||||
{
|
||||
$password = validatePassword($password);
|
||||
$password = md5($password);
|
||||
}
|
||||
else
|
||||
@@ -865,7 +888,17 @@ if($page == 'customers'
|
||||
if($createstdsubdomain == '1'
|
||||
&& $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();
|
||||
$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'] . "'");
|
||||
|
||||
@@ -147,6 +147,14 @@ if($page == 'domains'
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
/*
|
||||
* check for APS packages used with this domain, #110
|
||||
*/
|
||||
if(domainHasApsInstances($id))
|
||||
{
|
||||
standard_error('domains_cantdeletedomainwithapsinstances');
|
||||
}
|
||||
|
||||
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '") AND `isemaildomain`="1"';
|
||||
$subResult = $db->query($query);
|
||||
$idString = array();
|
||||
@@ -624,8 +632,10 @@ if($page == 'domains'
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `d`.*, `c`.* FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`)
|
||||
WHERE `d`.`parentdomainid`='0' AND `d`.`id`='" . (int)$id . "'"
|
||||
$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'] != '')
|
||||
|
||||
@@ -31,20 +31,78 @@ if(($page == 'settings' || $page == 'overview')
|
||||
&& $userinfo['change_serversettings'] == '1')
|
||||
{
|
||||
$settings_data = loadConfigArrayDir('./actions/admin/settings/');
|
||||
$settings = loadSettings(&$settings_data, &$db);
|
||||
$settings = loadSettings($settings_data, $db);
|
||||
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
if(processForm(&$settings_data, &$_POST, array('filename' => $filename, 'action' => $action, 'page' => $page)))
|
||||
$_part = isset($_GET['part']) ? $_GET['part'] : '';
|
||||
|
||||
if($_part == '')
|
||||
{
|
||||
$_part = isset($_POST['part']) ? $_POST['part'] : '';
|
||||
}
|
||||
|
||||
if($_part != '')
|
||||
{
|
||||
if($_part == 'all')
|
||||
{
|
||||
$settings_all = true;
|
||||
$settings_part = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$settings_all = false;
|
||||
$settings_part = true;
|
||||
}
|
||||
|
||||
$only_enabledisable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$settings_all = false;
|
||||
$settings_part = false;
|
||||
$only_enabledisable = true;
|
||||
}
|
||||
|
||||
if(processFormEx(
|
||||
$settings_data,
|
||||
$_POST,
|
||||
array('filename' => $filename, 'action' => $action, 'page' => $page),
|
||||
$_part,
|
||||
$settings_all,
|
||||
$settings_part,
|
||||
$only_enabledisable
|
||||
)
|
||||
) {
|
||||
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$fields = buildForm(&$settings_data);
|
||||
eval("echo \"" . getTemplate("settings/settings") . "\";");
|
||||
$_part = isset($_GET['part']) ? $_GET['part'] : '';
|
||||
|
||||
if($_part == '')
|
||||
{
|
||||
$_part = isset($_POST['part']) ? $_POST['part'] : '';
|
||||
}
|
||||
|
||||
$fields = buildFormEx($settings_data, $_part);
|
||||
|
||||
$settings_page = '';
|
||||
if($_part == '')
|
||||
{
|
||||
eval("\$settings_page .= \"" . getTemplate("settings/settings_overview") . "\";");
|
||||
}
|
||||
else
|
||||
{
|
||||
eval("\$settings_page .= \"" . getTemplate("settings/settings") . "\";");
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("settings/settings_form_begin") . "\";");
|
||||
eval("echo \$settings_page;");
|
||||
eval("echo \"" . getTemplate("settings/settings_form_end") . "\";");
|
||||
|
||||
}
|
||||
}
|
||||
elseif($page == 'rebuildconfigs'
|
||||
|
||||
@@ -37,19 +37,40 @@ if($page == 'overview')
|
||||
if (!isset($settings['system']['dbversion'])
|
||||
|| $settings['system']['dbversion'] == ''
|
||||
) {
|
||||
$settings['system']['dbversion'] = 2;
|
||||
/**
|
||||
* 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))
|
||||
{
|
||||
$successful_update = false;
|
||||
$message = '';
|
||||
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
|
||||
if((isset($_POST['update_preconfig'])
|
||||
&& isset($_POST['update_changesagreed'])
|
||||
&& intval($_POST['update_changesagreed']) != 0)
|
||||
|| !isset($_POST['update_preconfig'])
|
||||
) {
|
||||
eval("echo \"" . getTemplate("update/update_start") . "\";");
|
||||
|
||||
include_once('./install/updatesql.php');
|
||||
include_once './install/updatesql.php';
|
||||
|
||||
$redirect_url = 'admin_index.php';
|
||||
eval("echo \"" . getTemplate("update/update_end") . "\";");
|
||||
@@ -57,17 +78,34 @@ if($page == 'overview')
|
||||
updateCounters();
|
||||
inserttask('1');
|
||||
@chmod('./lib/userdata.inc.php', 0440);
|
||||
|
||||
$successful_update = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = '<br /><strong style="color:#ff0000;">You have to agree that you have read the update notifications.</strong>';
|
||||
}
|
||||
}
|
||||
|
||||
if(!$successful_update)
|
||||
{
|
||||
$current_version = $settings['panel']['version'];
|
||||
$new_version = $version;
|
||||
|
||||
$ui_text = $lng['update']['update_information'];
|
||||
$ui_text = $lng['update']['update_information']['part_a'];
|
||||
$ui_text = str_replace('%curversion', $current_version, $ui_text);
|
||||
$ui_text = str_replace('%newversion', $new_version, $ui_text);
|
||||
$update_information = $ui_text;
|
||||
|
||||
include_once './install/updates/preconfig.php';
|
||||
$preconfig = getPreConfig($current_version);
|
||||
if($preconfig != '')
|
||||
{
|
||||
$update_information .= '<br />'.$preconfig.$message;
|
||||
}
|
||||
|
||||
$update_information .= $lng['update']['update_information']['part_b'];
|
||||
|
||||
eval("echo \"" . getTemplate("update/index") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ elseif($page == 'domains')
|
||||
$row['domainalias'] = $idna_convert->decode($row['domainalias']);
|
||||
|
||||
if($row['parentdomainid'] == '0'
|
||||
&& $row['iswildcarddomain'] != '1'
|
||||
&& $row['caneditdomain'] == '1')
|
||||
{
|
||||
$parentdomains_count++;
|
||||
}
|
||||
|
||||
$domains_count++;
|
||||
/*
|
||||
$domainparts = explode('.', $row['domain']);
|
||||
$domainparts = array_reverse($domainparts);
|
||||
$sortkey = '';
|
||||
@@ -82,8 +82,9 @@ elseif($page == 'domains')
|
||||
{
|
||||
$sortkey.= $part . '.';
|
||||
}
|
||||
|
||||
$domain_array[$sortkey] = $row;
|
||||
*/
|
||||
$domain_array[$row['domain']] = $row;
|
||||
}
|
||||
|
||||
ksort($domain_array);
|
||||
@@ -125,6 +126,11 @@ elseif($page == 'domains')
|
||||
if($paging->checkDisplay($i))
|
||||
{
|
||||
$row = htmlentities_array($domain_array[$sortkey]);
|
||||
if($settings['system']['awstats_enabled'] == '1') {
|
||||
$statsapp = 'awstats';
|
||||
} else {
|
||||
$statsapp = 'webalizer';
|
||||
}
|
||||
eval("\$domains.=\"" . getTemplate("domains/domains_delimiter") . "\";");
|
||||
|
||||
if($paging->sortfield == 'd.domain'
|
||||
@@ -178,6 +184,14 @@ elseif($page == 'domains')
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* check for APS packages used with this domain, #110
|
||||
*/
|
||||
if(domainHasApsInstances($id))
|
||||
{
|
||||
standard_error('domains_cantdeletedomainwithapsinstances');
|
||||
}
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted subdomain '" . $idna_convert->decode($result['domain']) . "'");
|
||||
$result = $db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`-1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
@@ -205,7 +219,7 @@ elseif($page == 'domains')
|
||||
{
|
||||
$subdomain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['subdomain'], 'subdomain', '', 'subdomainiswrong')));
|
||||
$domain = $idna_convert->encode($_POST['domain']);
|
||||
$domain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($domain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `iswildcarddomain`='0' AND `caneditdomain`='1' ");
|
||||
$domain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($domain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `caneditdomain`='1' ");
|
||||
$completedomain = $subdomain . '.' . $domain;
|
||||
$completedomain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($completedomain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `email_only`='0' AND `caneditdomain` = '1'");
|
||||
$aliasdomain = intval($_POST['alias']);
|
||||
@@ -286,7 +300,31 @@ elseif($page == 'domains')
|
||||
}
|
||||
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'] . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
|
||||
inserttask('1');
|
||||
@@ -296,7 +334,7 @@ elseif($page == 'domains')
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $db->query("SELECT `id`, `domain`, `documentroot`, `ssl_redirect`,`isemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `iswildcarddomain`='0' AND `caneditdomain`='1' ORDER BY `domain` ASC");
|
||||
$result = $db->query("SELECT `id`, `domain`, `documentroot`, `ssl_redirect`,`isemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `caneditdomain`='1' ORDER BY `domain` ASC");
|
||||
$domains = '';
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
@@ -322,7 +360,7 @@ elseif($page == 'domains')
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path` ,`pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
|
||||
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path`, `d`.`ipandport`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
|
||||
$alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\'');
|
||||
$alias_check = $alias_check['count'];
|
||||
|
||||
@@ -355,16 +393,7 @@ elseif($page == 'domains')
|
||||
if(isset($_POST['iswildcarddomain'])
|
||||
&& $_POST['iswildcarddomain'] == '1'
|
||||
&& $result['parentdomainid'] == '0'
|
||||
&& $userinfo['subdomains'] != '0')
|
||||
{
|
||||
$wildcarddomaincheck = $db->query("SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `parentdomainid` = '" . (int)$result['id'] . "'");
|
||||
|
||||
if($db->num_rows($wildcarddomaincheck) != '0')
|
||||
{
|
||||
standard_error('firstdeleteallsubdomains');
|
||||
exit;
|
||||
}
|
||||
|
||||
){
|
||||
$iswildcarddomain = '1';
|
||||
}
|
||||
else
|
||||
@@ -475,11 +504,14 @@ elseif($page == 'domains')
|
||||
$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
|
||||
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
||||
$openbasedir = makeoption($lng['domain']['docroot'], 0, $result['openbasedir_path'], true) . makeoption($lng['domain']['homedir'], 1, $result['openbasedir_path'], true);
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
if($settings['system']['use_ssl'] == "1")
|
||||
$result_ipandport = $db->query_first("SELECT `ip` FROM `".TABLE_PANEL_IPSANDPORTS."` WHERE `id`='".(int)$result['ipandport']."'");
|
||||
if(filter_var($result_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
|
||||
{
|
||||
$result_ipandport['ip'] = '[' . $result_ipandport['ip'] . ']';
|
||||
}
|
||||
$domainip = $result_ipandport['ip'];
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
|
||||
}
|
||||
|
||||
@@ -372,6 +372,7 @@ elseif($page == 'accounts')
|
||||
$email_full = $result['email_full'];
|
||||
$username = $idna_convert->decode($email_full);
|
||||
$password = validate($_POST['email_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
|
||||
if($settings['panel']['sendalternativemail'] == 1)
|
||||
{
|
||||
@@ -427,25 +428,26 @@ elseif($page == 'accounts')
|
||||
$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\'');
|
||||
$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);
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->SetFrom($admin['email'], getCorrectUserSalutation($admin));
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->Body = $mail_body;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($email_full, getCorrectUserSalutation($userinfo));
|
||||
|
||||
if(!$mail->Send())
|
||||
{
|
||||
if($mail->ErrorInfo != '')
|
||||
{
|
||||
$mailerr_msg = $mail->ErrorInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mailerr_msg = $email;
|
||||
$mail->Send();
|
||||
} 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);
|
||||
standard_error('errorsendingmail', $email);
|
||||
standard_error('errorsendingmail', $email_full);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
@@ -457,23 +459,24 @@ elseif($page == 'accounts')
|
||||
$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\'');
|
||||
$mail_body = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['mailbody']), $replace_arr);
|
||||
$mail->From = $admin['email'];
|
||||
$mail->FromName = getCorrectUserSalutation($admin);
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->SetFrom($admin['email'], getCorrectUserSalutation($admin));
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->Body = $mail_body;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($userinfo));
|
||||
|
||||
if(!$mail->Send())
|
||||
{
|
||||
if($mail->ErrorInfo != '')
|
||||
{
|
||||
$mailerr_msg = $mail->ErrorInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mailerr_msg = $alternative_email;
|
||||
$mail->Send();
|
||||
} 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);
|
||||
standard_error(array('errorsendingmail', $alternative_email));
|
||||
}
|
||||
@@ -516,13 +519,13 @@ elseif($page == 'accounts')
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
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'] . "'");
|
||||
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
||||
|
||||
@@ -135,6 +135,7 @@ elseif($page == 'accounts')
|
||||
{
|
||||
$path = validate($_POST['path'], 'path');
|
||||
$password = validate($_POST['ftp_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
|
||||
if($settings['customer']['ftpatdomain'] == '1')
|
||||
{
|
||||
@@ -172,18 +173,12 @@ elseif($page == 'accounts')
|
||||
}
|
||||
else
|
||||
{
|
||||
$userpath = makeCorrectDir($path);
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_FTP_USERS . "` (`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($path) . "', 'y', '" . (int)$userinfo['guid'] . "', '" . (int)$userinfo['guid'] . "')");
|
||||
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=CONCAT_WS(',',`members`,'" . $db->escape($username) . "') WHERE `customerid`='" . $userinfo['customerid'] . "' AND `gid`='" . (int)$userinfo['guid'] . "'");
|
||||
|
||||
// $db->query("INSERT INTO `".TABLE_FTP_GROUPS."` (`customerid`, `groupname`, `gid`, `members`) VALUES ('".$userinfo['customerid']."', '$username', '$uid', '$username')");
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
|
||||
// $db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value`='$uid' WHERE settinggroup='ftp' AND varname='lastguid'");
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'");
|
||||
inserttask(5);
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
@@ -212,7 +207,7 @@ elseif($page == 'accounts')
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$result = $db->query_first("SELECT `id`, `username`, `homedir`, `uid`, `gid` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
|
||||
if(isset($result['username'])
|
||||
&& $result['username'] != '')
|
||||
@@ -220,8 +215,18 @@ elseif($page == 'accounts')
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$password = validate($_POST['ftp_password'], 'password');
|
||||
$path = validate($_POST['path'], 'path');
|
||||
|
||||
$_setnewpass = false;
|
||||
if(isset($_POST['ftp_password']) && $_POST['ftp_password'] != '')
|
||||
{
|
||||
$password = validate($_POST['ftp_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
$_setnewpass = true;
|
||||
}
|
||||
|
||||
if($_setnewpass)
|
||||
{
|
||||
if($password == '')
|
||||
{
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
@@ -229,13 +234,55 @@ elseif($page == 'accounts')
|
||||
}
|
||||
else
|
||||
{
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account password for '" . $result['username'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "edited ftp-account '" . $result['username'] . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
|
||||
if($path != '')
|
||||
{
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||
|
||||
if($path != $result['homedir'])
|
||||
{
|
||||
if(!file_exists($path))
|
||||
{
|
||||
mkDirWithCorrectOwnership($userinfo['documentroot'], $path, $result['uid'], $result['gid']);
|
||||
}
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account homdir for '" . $result['username'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `homedir`= '" . $db->escape($path) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
}
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(strpos($result['homedir'], $userinfo['documentroot']) === 0)
|
||||
{
|
||||
$homedir = substr($result['homedir'], strlen($userinfo['documentroot']));
|
||||
}
|
||||
else
|
||||
{
|
||||
$homedir = $result['homedir'];
|
||||
}
|
||||
$homedir = makeCorrectDir($homedir);
|
||||
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $homedir);
|
||||
|
||||
if($settings['customer']['ftpatdomain'] == '1')
|
||||
{
|
||||
$domains = '';
|
||||
|
||||
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
|
||||
while($row_domain = $db->fetch_array($result_domains))
|
||||
{
|
||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
|
||||
}
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ftp/accounts_edit") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,6 +139,13 @@ elseif($page == 'mysqls')
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$password = validate($_POST['mysql_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
|
||||
$sendinfomail = intval($_POST['sendinfomail']);
|
||||
if($sendinfomail != 1)
|
||||
{
|
||||
$sendinfomail = 0;
|
||||
}
|
||||
|
||||
if($password == '')
|
||||
{
|
||||
@@ -184,6 +191,50 @@ elseif($page == 'mysqls')
|
||||
$databasedescription = validate($_POST['description'], 'description');
|
||||
$result = $db->query('INSERT INTO `' . TABLE_PANEL_DATABASES . '` (`customerid`, `databasename`, `description`, `dbserver`) VALUES ("' . (int)$userinfo['customerid'] . '", "' . $db->escape($username) . '", "' . $db->escape($databasedescription) . '", "' . $db->escape($dbserver) . '")');
|
||||
$result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1, `mysql_lastaccountnumber`=`mysql_lastaccountnumber`+1 WHERE `customerid`="' . (int)$userinfo['customerid'] . '"');
|
||||
|
||||
if($sendinfomail == 1)
|
||||
{
|
||||
$pma = '';
|
||||
if($settings['panel']['phpmyadmin_url'] != '')
|
||||
{
|
||||
$r_arr = array('URI' => $settings['panel']['phpmyadmin_url']);
|
||||
$pma = replace_variables($lng['customer']['mysql_add']['infomail_body']['pma'], $r_arr);
|
||||
}
|
||||
|
||||
$replace_arr = array(
|
||||
'CUST_NAME' => getCorrectUserSalutation($userinfo),
|
||||
'DB_NAME' => $username,
|
||||
'DB_PASS' => $password,
|
||||
'DB_DESC' => $databasedescription,
|
||||
'DB_SRV' => $sql_root[$dbserver]['host'],
|
||||
'PMA_URI' => $pma
|
||||
);
|
||||
|
||||
$mail_body = replace_variables($lng['customer']['mysql_add']['infomail_body']['main'], $replace_arr);
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->Subject = $lng['customer']['mysql_add']['infomail_subject'];
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
||||
$mail->Send();
|
||||
} 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);
|
||||
standard_error('errorsendingmail', $userinfo['email']);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
@@ -196,6 +247,8 @@ elseif($page == 'mysqls')
|
||||
$mysql_servers .= makeoption($mysql_server_details['caption'], $mysql_server);
|
||||
}
|
||||
|
||||
$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
|
||||
|
||||
eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -219,6 +272,7 @@ elseif($page == 'mysqls')
|
||||
// Only change Password if it is set, do nothing if it is empty! -- PH 2004-11-29
|
||||
|
||||
$password = validate($_POST['mysql_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
|
||||
if($password != '')
|
||||
{
|
||||
|
||||
59
index.php
59
index.php
@@ -213,10 +213,12 @@ if($action == 'login')
|
||||
|
||||
if($action == 'forgotpwd')
|
||||
{
|
||||
$adminchecked = false;
|
||||
$message = '';
|
||||
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$adminchecked = false;
|
||||
$loginname = validate($_POST['loginname'], 'loginname');
|
||||
$email = validateEmail($_POST['loginemail'], 'email');
|
||||
$sql = "SELECT `customerid`, `firstname`, `name`, `email`, `loginname` FROM `" . TABLE_PANEL_CUSTOMERS . "`
|
||||
@@ -230,9 +232,19 @@ if($action == 'forgotpwd')
|
||||
WHERE `loginname`='" . $db->escape($loginname) . "'
|
||||
AND `email`='" . $db->escape($email) . "'";
|
||||
$result = $db->query($sql);
|
||||
|
||||
if($db->num_rows() > 0)
|
||||
{
|
||||
$adminchecked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = null;
|
||||
}
|
||||
}
|
||||
|
||||
if($result !== null)
|
||||
{
|
||||
$user = $db->fetch_array($result);
|
||||
|
||||
if(($adminchecked && $settings['panel']['allow_preset_admin'] == '1')
|
||||
@@ -240,7 +252,18 @@ if($action == 'forgotpwd')
|
||||
{
|
||||
if($user !== false)
|
||||
{
|
||||
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)
|
||||
{
|
||||
@@ -258,23 +281,23 @@ if($action == 'forgotpwd')
|
||||
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
||||
$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));
|
||||
$mail->From = $settings['panel']['adminmail'];
|
||||
$mail->FromName = 'Froxlor';
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->Subject = $lng['pwdreminder']['subject'];
|
||||
$mail->Body = $body;
|
||||
$mail->AltBody = $body;
|
||||
$mail->MsgHTML(str_replace("\\n", "<br />", $body));
|
||||
$mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']);
|
||||
|
||||
if(!$mail->Send())
|
||||
{
|
||||
if($mail->ErrorInfo != '')
|
||||
{
|
||||
$mailerr_msg = $mail->ErrorInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mailerr_msg = $email;
|
||||
$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' => 'password_reset'), $db, $settings);
|
||||
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
redirectTo('index.php', Array('showmessage' => '4'), true);
|
||||
@@ -294,15 +317,9 @@ if($action == 'forgotpwd')
|
||||
|
||||
unset($user);
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = '';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = '';
|
||||
}
|
||||
|
||||
|
||||
if($adminchecked)
|
||||
{
|
||||
|
||||
@@ -274,7 +274,7 @@ CREATE TABLE `panel_domains` (
|
||||
`isbinddomain` tinyint(1) NOT NULL default '0',
|
||||
`isemaildomain` tinyint(1) NOT NULL default '0',
|
||||
`email_only` tinyint(1) NOT NULL default '0',
|
||||
`iswildcarddomain` tinyint(1) NOT NULL default '0',
|
||||
`iswildcarddomain` tinyint(1) NOT NULL default '1',
|
||||
`subcanemaildomain` tinyint(1) NOT NULL default '0',
|
||||
`caneditdomain` tinyint(1) NOT NULL default '1',
|
||||
`zonefile` varchar(255) NOT NULL default '',
|
||||
@@ -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 (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 (22, 'panel', 'version', '0.9.2');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.5');
|
||||
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 (25, 'login', 'deactivatetime', '900');
|
||||
@@ -508,48 +508,57 @@ 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 (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 (80, 'system', 'awstats_domain_file', '/etc/awstats/');
|
||||
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 (82, 'dkim', 'dkim_prefix', '/etc/postfix/dkim/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (83, 'dkim', 'dkim_domains', 'domains');
|
||||
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 (85, 'dkim', 'dkimrestart_command', '/etc/init.d/dkim-filter restart');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (86, 'panel', 'unix_names', '1');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (87, 'panel', 'allow_preset', '1');
|
||||
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 (89, 'system', 'awstats_updateall_command', '/usr/bin/awstats_updateall.pl');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (90, 'panel', 'allow_preset_admin', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (91, 'system', 'httpuser', 'www-data');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (92, 'system', 'httpgroup', 'www-data');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (93, 'system', 'webserver', 'apache2');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (94, 'autoresponder', 'autoresponder_active', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (95, 'autoresponder', 'last_autoresponder_run', '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 (97, 'admin', 'show_version_footer', '0');
|
||||
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 (99, 'system', 'mod_fcgid_wrapper', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (100, 'system', 'mod_fcgid_starter', '0');
|
||||
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 (102, 'system', 'index_file_extension', 'html');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (103, 'aps', 'items_per_page', '20');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (104, 'aps', 'upload_fields', '5');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (105, 'aps', 'aps_active', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (1069, 'aps', 'php-extension', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (107, 'aps', 'php-configuration', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (108, 'aps', 'webserver-htaccess', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (109, 'aps', 'php-function', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (110, 'aps', 'webserver-module', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (111, 'system', 'realtime_port', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (112, 'session', 'allow_multiple_login', '0');
|
||||
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 (114, 'panel', 'allow_domain_change_customer', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (115, 'system', 'mod_fcgid_maxrequests', '250');
|
||||
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 (117, 'system','ssl_ca_file','');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (118, 'panel', 'frontend', 'froxlor');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (119, 'spf', 'use_spf', '0');
|
||||
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 (121, 'system', 'debug_cron', '0');
|
||||
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, 'dkim', 'dkim_domains', 'domains');
|
||||
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', 'dkimrestart_command', '/etc/init.d/dkim-filter restart');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (84, 'panel', 'unix_names', '1');
|
||||
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', 'allow_preset_admin', '0');
|
||||
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', 'httpgroup', 'www-data');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (89, 'system', 'webserver', 'apache2');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (90, 'autoresponder', 'autoresponder_active', '0');
|
||||
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, 'admin', 'show_version_login', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (93, 'admin', 'show_version_footer', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (94, 'admin', 'froxlor_graphic', 'images/header.gif');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (95, 'system', 'mod_fcgid_wrapper', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (96, 'system', 'mod_fcgid_starter', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (97, 'system', 'mod_fcgid_peardir', '/usr/share/php/:/usr/share/php5/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (98, 'system', 'index_file_extension', 'html');
|
||||
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, 'aps', 'upload_fields', '5');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (101, 'aps', 'aps_active', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (102, 'aps', 'php-extension', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (103, 'aps', 'php-configuration', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (104, 'aps', 'webserver-htaccess', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (105, 'aps', 'php-function', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (106, 'aps', 'webserver-module', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (107, 'system', 'realtime_port', '0');
|
||||
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, 'panel', 'allow_domain_change_admin', '0');
|
||||
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', 'mod_fcgid_maxrequests', '250');
|
||||
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, 'system','ssl_ca_file','');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (114, 'panel', 'frontend', 'froxlor');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (115, 'spf', 'use_spf', '0');
|
||||
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', 'debug_cron', '0');
|
||||
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, 'system', 'store_index_file_subs', '1');
|
||||
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, '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', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (129, 'system', 'awstats_path', '/usr/bin/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (130, 'system', 'awstats_conf', '/etc/awstats/');
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
@@ -731,6 +740,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 (15, 'Swedish', 'lng/swedish.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 ---------------------------------------------------
|
||||
*/
|
||||
@@ -174,7 +289,7 @@ else
|
||||
{
|
||||
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'];
|
||||
}
|
||||
@@ -307,12 +422,12 @@ if(!empty($_POST['webserver']))
|
||||
else
|
||||
{
|
||||
if(strtoupper(@php_sapi_name()) == "APACHE2HANDLER"
|
||||
|| stristr($_SERVER[SERVER_SOFTWARE], "apache/2"))
|
||||
|| stristr($_SERVER['SERVER_SOFTWARE'], "apache/2"))
|
||||
{
|
||||
$webserver = 'apache2';
|
||||
}
|
||||
elseif(substr(strtoupper(@php_sapi_name()), 0, 8) == "LIGHTTPD"
|
||||
|| stristr($_SERVER[SERVER_SOFTWARE], "lighttpd"))
|
||||
|| stristr($_SERVER['SERVER_SOFTWARE'], "lighttpd"))
|
||||
{
|
||||
$webserver = 'lighttpd';
|
||||
}
|
||||
@@ -371,89 +486,6 @@ if(isset($_POST['installstep'])
|
||||
<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']);
|
||||
$_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
|
||||
|
||||
@@ -475,7 +507,23 @@ if(isset($_POST['installstep'])
|
||||
|
||||
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);
|
||||
|
||||
if(stristr($output, "error"))
|
||||
@@ -486,10 +534,7 @@ if(isset($_POST['installstep'])
|
||||
{
|
||||
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'");
|
||||
|
||||
//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($httpgroup) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'");
|
||||
|
||||
@@ -602,10 +645,21 @@ if(isset($_POST['installstep'])
|
||||
$query = sprintf($query, TABLE_PANEL_SETTINGS);
|
||||
$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
|
||||
|
||||
$query = 'INSERT INTO `%s` SET `ip` = \'%s\', `port` = \'80\' ';
|
||||
$query = sprintf($query, TABLE_PANEL_IPSANDPORTS, $db->escape($serverip));
|
||||
$query = "INSERT INTO `".TABLE_PANEL_IPSANDPORTS."`
|
||||
SET `ip`= '".$db->escape($serverip)."',
|
||||
`port` = '80',
|
||||
`namevirtualhost_statement` = '1',
|
||||
`vhostcontainer` = '1',
|
||||
`vhostcontainer_servername_statement` = '1'";
|
||||
$db->query($query);
|
||||
$defaultip = $db->insert_id();
|
||||
|
||||
@@ -708,10 +762,17 @@ if(isset($_POST['installstep'])
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if((isset($_GET['check'])
|
||||
&& $_GET['check'] == '1')
|
||||
|| (isset($_POST['installstep'])
|
||||
&& $_POST['installstep'] == '1')
|
||||
) {
|
||||
page_header();
|
||||
|
||||
?>
|
||||
<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">
|
||||
<tr>
|
||||
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" /> <?php echo $lng['install']['welcome']; ?></b></td>
|
||||
@@ -746,6 +807,7 @@ else
|
||||
</form>
|
||||
<br />
|
||||
<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">
|
||||
<tr>
|
||||
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" /> <?php echo $lng['install']['database']; ?></b></td>
|
||||
@@ -822,6 +884,11 @@ else
|
||||
<?php
|
||||
page_footer();
|
||||
}
|
||||
else
|
||||
{
|
||||
requirement_checks();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* END INSTALL ---------------------------------------------------
|
||||
|
||||
@@ -84,4 +84,11 @@ $lng['install']['webserver'] = 'Webserver';
|
||||
$lng['install']['phpversion'] = 'Checking for PHP version >= 5.2';
|
||||
$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']['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';
|
||||
|
||||
?>
|
||||
|
||||
@@ -21,9 +21,7 @@ $baseLanguage = 'english.lng.php';
|
||||
|
||||
// Check if we're in the CLI
|
||||
|
||||
if(@php_sapi_name() != 'cli'
|
||||
&& @php_sapi_name() != 'cgi'
|
||||
&& @php_sapi_name() != 'cgi-fcgi')
|
||||
if(@php_sapi_name() != 'cli')
|
||||
{
|
||||
die('This script will only work in the shell.');
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ if(isFroxlorVersion('0.9.1'))
|
||||
&& (int)$result['latestguid'] > 0
|
||||
&& $result['latestguid'] != $settings['system']['lastguid']
|
||||
) {
|
||||
checkLastGuid($result['latestguid']);
|
||||
checkLastGuid();
|
||||
lastStepStatus(1, 'fixed');
|
||||
} else {
|
||||
lastStepStatus(0);
|
||||
@@ -307,4 +307,169 @@ if(isFroxlorVersion('0.9.1'))
|
||||
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');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.4'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.4 to 0.9.4-svn1", false);
|
||||
|
||||
/**
|
||||
* some users might still have the setting in their database
|
||||
* because we already had this back in older versions.
|
||||
* To not confuse Froxlor, we just update old settings.
|
||||
*/
|
||||
if(isset($settings['system']['awstats_path'])
|
||||
&& $settings['system']['awstats_path'] != ''
|
||||
) {
|
||||
showUpdateStep("Updating awstats path setting");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/usr/bin/' WHERE `settinggroup` = 'system' AND `varname` = 'awstats_path';");
|
||||
}
|
||||
else
|
||||
{
|
||||
showUpdateStep("Adding new awstats path setting");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_path', '/usr/bin/');");
|
||||
}
|
||||
lastStepStatus(0);
|
||||
|
||||
if(isset($settings['system']['awstats_domain_file'])
|
||||
&& $settings['system']['awstats_domain_file'] != ''
|
||||
) {
|
||||
showUpdateStep("Updating awstats configuration path setting");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'awstats_conf' WHERE `varname` = 'awstats_domain_file';");
|
||||
}
|
||||
else
|
||||
{
|
||||
showUpdateStep("Adding awstats configuration path settings");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_conf', '/etc/awstats/');");
|
||||
}
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.4-svn1');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.4-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.4-svn1 to 0.9.4-svn2", false);
|
||||
|
||||
$update_domains = isset($_POST['update_domainwildcardentry']) ? intval($_POST['update_domainwildcardentry']) : 0;
|
||||
|
||||
if($update_domains != 1)
|
||||
{
|
||||
$update_domains = 0;
|
||||
}
|
||||
|
||||
if($update_domains == 1)
|
||||
{
|
||||
showUpdateStep("Updating domains with iswildcarddomain=yes");
|
||||
$query = "SELECT `d`.`id` FROM `".TABLE_PANEL_DOMAINS."` `d`, `".TABLE_PANEL_CUSTOMERS."` `c` ";
|
||||
$query.= "WHERE `parentdomainid`='0' AND `email_only` = '0' AND `d`.`customerid` = `c`.`customerid` AND `d`.`id` <> `c`.`standardsubdomain`";
|
||||
$result = $db->query($query);
|
||||
$updated_domains = 0;
|
||||
while($domain = $db->fetch_array($result))
|
||||
{
|
||||
$db->query("UPDATE `".TABLE_PANEL_DOMAINS."` SET `iswildcarddomain` = '1' WHERE `id` ='".(int)$domain['id']."'");
|
||||
$updated_domains++;
|
||||
}
|
||||
lastStepStatus(0, 'Updated '.$updated_domains.' domain(s)');
|
||||
} else {
|
||||
showUpdateStep("Won't update domains with iswildcarddomain=yes as requested");
|
||||
lastStepStatus(1);
|
||||
}
|
||||
|
||||
showUpdateStep("Updating database table definition for panel_domains");
|
||||
$db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` MODIFY `iswildcarddomain` tinyint(1) NOT NULL default '1';");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.4-svn2');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.4-svn2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.4-svn2 to 0.9.5 final");
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9.5');
|
||||
}
|
||||
?>
|
||||
|
||||
59
install/updates/preconfig.php
Normal file
59
install/updates/preconfig.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?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 Language
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Function getPreConfig
|
||||
*
|
||||
* outputs various content before the update process
|
||||
* can be continued (askes for agreement whatever is being asked)
|
||||
*
|
||||
* @param string version
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getPreConfig($current_version)
|
||||
{
|
||||
$has_preconfig = false;
|
||||
$return = '<div class="preconfig"><h3 style="color:#ff0000;">PLEASE NOTE - Important update notifications</h3>';
|
||||
|
||||
include_once makeCorrectFile(dirname(__FILE__).'/preconfig/0.9/preconfig_0.9.inc.php');
|
||||
parseAndOutputPreconfig($has_preconfig, $return, $current_version);
|
||||
|
||||
$return .= '<br /><br />'.makecheckbox('update_changesagreed', '<strong>I have read the update notifications and I am aware of the changes made to my system.</strong>', '1', true, '0', true);
|
||||
$return .= '</div>';
|
||||
$return .= '<input type="hidden" name="update_preconfig" value="1" />';
|
||||
|
||||
if($has_preconfig) {
|
||||
return $return;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function versionInUpdate($current_version, $version_to_check)
|
||||
{
|
||||
$pos_a = strpos($current_version, '-svn');
|
||||
$pos_b = strpos($current_version, '-svn');
|
||||
// if we compare svn-versions, we have to add -svn0 to the version
|
||||
// to compare it correctly
|
||||
if($pos_a === false && $pos_b !== false)
|
||||
{
|
||||
$current_version.= '-svn0';
|
||||
}
|
||||
|
||||
return version_compare($current_version, $version_to_check, '<');
|
||||
}
|
||||
38
install/updates/preconfig/0.9/preconfig_0.9.inc.php
Normal file
38
install/updates/preconfig/0.9/preconfig_0.9.inc.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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 Language
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* checks if the new-version has some updating to do
|
||||
*
|
||||
* @param boolean $has_preconfig pointer to check if any preconfig has to be output
|
||||
* @param string $return pointer to output string
|
||||
* @param string $current_version current froxlor version
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
{
|
||||
if(versionInUpdate($current_version, '0.9.4-svn2'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$return .= 'Froxlor now enables the usage of a domain-wildcard entry and subdomains for this domain at the same time (subdomains are parsed before the main-domain vhost container). ';
|
||||
$return .= 'This makes it possible to catch all non-existing subdomains with the main vhost but also have the ability to use subdomains for that domain.<br />';
|
||||
$return .= 'If you would like Froxlor to do so with your domains, the update script can set the correct values for existing domains for you. Note: future domains will have wildcard-entries enabled by default no matter how you decide here.<br /><br />';
|
||||
$return .= '<strong>Do you want to use wildcard-entries for existing domains?:</strong> ';
|
||||
$return .= makeyesno('update_domainwildcardentry', '1', '0', '1').'<br /><br />';
|
||||
}
|
||||
}
|
||||
@@ -2415,7 +2415,8 @@ class ApsParser
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
$mail->From = $this->settings['ticket']['noreply_email'];
|
||||
$mail->FromName = $this->settings['ticket']['noreply_name'];
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->SetFrom($this->settings['ticket']['noreply_email'], $this->settings['ticket']['noreply_name']);
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->Body = $mail_body;
|
||||
$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']));
|
||||
}
|
||||
|
||||
@@ -301,15 +312,27 @@ class ticket
|
||||
}
|
||||
else
|
||||
{
|
||||
$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']);
|
||||
$admin = $this->db->query_first("SELECT `name`, `email` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$this->userinfo['adminid'] . "'");
|
||||
|
||||
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']));
|
||||
}
|
||||
|
||||
@@ -668,7 +691,11 @@ class ticket
|
||||
{
|
||||
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
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@ return Array(
|
||||
'commands' => Array(
|
||||
'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'],
|
||||
'a2dismod userdir',
|
||||
@@ -50,8 +51,11 @@ return Array(
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
'mkdir -p ' . $settings['system']['deactivateddocroot'],
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
),
|
||||
@@ -69,7 +73,9 @@ return Array(
|
||||
'commands' => Array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
@@ -131,6 +137,19 @@ return Array(
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => Array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => Array(
|
||||
@@ -191,6 +210,9 @@ return Array(
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => Array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
@@ -248,18 +270,13 @@ return Array(
|
||||
),
|
||||
'awstats' => Array(
|
||||
'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(
|
||||
'apt-get install awstats',
|
||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||
),
|
||||
'restart' => Array(
|
||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
||||
)
|
||||
),
|
||||
'libnss' => Array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
|
||||
213
lib/configfiles/freebsd.inc.php
Normal file
213
lib/configfiles/freebsd.inc.php
Normal file
@@ -0,0 +1,213 @@
|
||||
<?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'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'etc_postfix_mx_access' => '/usr/local/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/usr/local/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.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' => '/usr/local/etc/proftpd.conf'
|
||||
),
|
||||
'commands' => Array(
|
||||
'touch /usr/local/etc/proftpd.conf',
|
||||
'chown root:0 /usr/local/etc/proftpd.conf',
|
||||
'chmod 0600 /usr/local/etc/proftpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/usr/local/etc/rc.d/proftpd restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'etc' => Array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => Array(
|
||||
'awstats' => Array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'cd /usr/ports/www/awstats/',
|
||||
'make install clean',
|
||||
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir($settings['system']['awstats_conf'])
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -34,9 +34,10 @@ return Array(
|
||||
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
|
||||
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||
),
|
||||
'restart' => Array(
|
||||
'rc-update add apache2 default',
|
||||
@@ -54,7 +55,8 @@ return Array(
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'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(
|
||||
'rc-update add lighttpd default',
|
||||
@@ -74,7 +76,7 @@ return Array(
|
||||
'commands' => Array(
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown root:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown named:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
@@ -126,22 +128,37 @@ return Array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => Array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands_1' => Array(
|
||||
'emerge dkim-milter',
|
||||
'emerge --config mail-filter/dkim-milter',
|
||||
'mkdir -p /etc/postfix/dkim'
|
||||
),
|
||||
'files' => Array(
|
||||
'dkim-filter.conf' => '/etc/postfix/dkim/dkim-filter.conf'
|
||||
'dkim-filter.conf' => '/etc/mail/dkim-filter/dkim-filter.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'chgrp postfix /etc/postfix/dkim/dkim-filter.conf',
|
||||
'echo "smtpd_milters = inet:localhost:8891\n
|
||||
milter_macro_daemon_name = SIGNING\n
|
||||
milter_default_action = accept\n" >> /etc/postfix/main.cf'
|
||||
'echo "smtpd_milters = inet:localhost:8891
|
||||
milter_macro_daemon_name = SIGNING
|
||||
milter_default_action = accept" >> /etc/postfix/main.cf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/dkim-filter restart'
|
||||
'rc-update add dkim-filter default',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -266,17 +283,13 @@ milter_default_action = accept\n" >> /etc/postfix/main.cf'
|
||||
),
|
||||
'awstats' => Array(
|
||||
'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(
|
||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
||||
'emerge awstats',
|
||||
'awstats_configure.pl'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
'restart' => Array(
|
||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
||||
)
|
||||
),
|
||||
'libnss' => Array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
|
||||
@@ -29,9 +29,10 @@ return Array(
|
||||
'commands' => Array(
|
||||
'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'],
|
||||
'a2dismod userdir',
|
||||
'a2dismod userdir'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/apache2 restart'
|
||||
@@ -50,10 +51,13 @@ return Array(
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'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'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
@@ -68,7 +72,9 @@ return Array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => Array(
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
@@ -131,6 +137,19 @@ return Array(
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => Array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => Array(
|
||||
@@ -188,6 +207,9 @@ return Array(
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => Array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
@@ -242,18 +264,13 @@ return Array(
|
||||
),
|
||||
'awstats' => Array(
|
||||
'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(
|
||||
'apt-get install awstats',
|
||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||
),
|
||||
'restart' => Array(
|
||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
||||
)
|
||||
),
|
||||
'libnss' => Array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
|
||||
@@ -29,9 +29,10 @@ return Array(
|
||||
'commands' => Array(
|
||||
'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'],
|
||||
'a2dismod userdir',
|
||||
'a2dismod userdir'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/apache2 restart'
|
||||
@@ -50,10 +51,13 @@ return Array(
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'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'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
@@ -69,7 +73,9 @@ return Array(
|
||||
'commands' => Array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
@@ -131,6 +137,19 @@ return Array(
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => Array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => Array(
|
||||
@@ -191,6 +210,9 @@ return Array(
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => Array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
@@ -249,18 +271,13 @@ return Array(
|
||||
),
|
||||
'awstats' => Array(
|
||||
'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(
|
||||
'apt-get install awstats',
|
||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||
),
|
||||
'restart' => Array(
|
||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
||||
)
|
||||
),
|
||||
'libnss' => Array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
|
||||
@@ -31,7 +31,8 @@ return Array(
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['include'],
|
||||
'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(
|
||||
'/etc/init.d/apache2 restart'
|
||||
@@ -46,7 +47,9 @@ return Array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => Array(
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown named:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/named restart'
|
||||
@@ -88,6 +91,19 @@ return Array(
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -136,16 +152,11 @@ return Array(
|
||||
),
|
||||
'awstats' => Array(
|
||||
'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(
|
||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
||||
'awstats_configure.pl'
|
||||
),
|
||||
'restart' => Array(
|
||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -45,6 +45,6 @@ else
|
||||
|
||||
$cfgPath = 'lib/configfiles/';
|
||||
$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.');
|
||||
}
|
||||
|
||||
// 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/';
|
||||
$lockFilename = 'froxlor_' . basename($_SERVER['PHP_SELF'], '.php') . '.lock-';
|
||||
$lockfName = $lockFilename . getmypid();
|
||||
@@ -69,7 +75,7 @@ while($fName = readdir($lockDirHandle))
|
||||
// Check if cron is running or has died.
|
||||
|
||||
$check_pid = substr(strstr($fName, "-"), 1);
|
||||
system("kill -CHLD " . $check_pid . " 1> /dev/null 2> /dev/null", $check_pid_return);
|
||||
system("kill -CHLD " . (int)$check_pid . " 1> /dev/null 2> /dev/null", $check_pid_return);
|
||||
|
||||
if($check_pid_return == 1)
|
||||
{
|
||||
|
||||
45
lib/functions/aps/function.domainHasApsInstances.php
Normal file
45
lib/functions/aps/function.domainHasApsInstances.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?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 Language
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Function domainHasApsInstances
|
||||
*
|
||||
* Checks if a given domain id
|
||||
* is used for APS instances
|
||||
* (if APS enabled, else always false)
|
||||
*
|
||||
* @param int domain-id
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function domainHasApsInstances($domainid = 0)
|
||||
{
|
||||
global $db, $settings;
|
||||
|
||||
if($settings['aps']['aps_active'] == '1')
|
||||
{
|
||||
if($domainid > 0)
|
||||
{
|
||||
$instances = $db->query_first("SELECT COUNT(`ID`) AS `count` FROM `" . TABLE_APS_SETTINGS . "` WHERE `Name`='main_domain' AND `Value`='" . (int)$domainid . "'");
|
||||
if((int)$instances['count'] != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
|
||||
|
||||
if($fieldType == 'Manual')
|
||||
{
|
||||
$field = '<input type="text" name="path" value="' . htmlspecialchars($value) . '" size="30" />';
|
||||
$field = '<input type="text" name="path" value="' . htmlspecialchars($value) . '" />';
|
||||
}
|
||||
elseif($fieldType == 'Dropdown')
|
||||
{
|
||||
@@ -65,7 +65,7 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
|
||||
else
|
||||
{
|
||||
$field = $lng['panel']['toomanydirs'];
|
||||
$field.= '<input type="text" name="path" value="' . htmlspecialchars($value) . '" size="30" />';
|
||||
$field.= '<input type="text" name="path" value="' . htmlspecialchars($value) . '" />';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -26,13 +26,15 @@
|
||||
* @param string The dir which should be created
|
||||
* @param int The uid 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
|
||||
*
|
||||
* @author Florian Lippert <flo@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;
|
||||
|
||||
@@ -73,6 +75,17 @@ function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid)
|
||||
{
|
||||
$sdir = makeCorrectDir($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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,11 +51,12 @@ function safe_exec($exec_string, &$return_value = false)
|
||||
$settings['system']['apachereload_command'],
|
||||
$settings['system']['bindreload_command'],
|
||||
$settings['dkim']['dkimrestart_command'],
|
||||
$settings['system']['awstats_updateall_command'],
|
||||
'openssl',
|
||||
'unzip',
|
||||
'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");
|
||||
}
|
||||
|
||||
/*
|
||||
* This is not needed anymore, we allow all commands and just check for pipes and stuff
|
||||
//
|
||||
// check if command is allowed here
|
||||
//
|
||||
@@ -82,7 +85,7 @@ function safe_exec($exec_string, &$return_value = false)
|
||||
$ok = false;
|
||||
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) === ' '))
|
||||
{
|
||||
$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");
|
||||
}
|
||||
*/
|
||||
|
||||
//
|
||||
// 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;
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
function getFormFieldDataBool($fieldname, $fielddata, $input)
|
||||
function getFormFieldDataBool($fieldname, $fielddata, &$input)
|
||||
{
|
||||
if(isset($input[$fieldname]) && ($input[$fieldname] === '1' || $input[$fieldname] === 1 || $input[$fieldname] === true || strtolower($input[$fieldname]) === 'yes' || strtolower($input[$fieldname]) === 'ja'))
|
||||
{
|
||||
|
||||
62
lib/functions/formfields/function.buildFormEx.php
Normal file
62
lib/functions/formfields/function.buildFormEx.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id $
|
||||
*/
|
||||
|
||||
function buildFormEx($form, $part = '')
|
||||
{
|
||||
$fields = '';
|
||||
|
||||
if(validateFormDefinition($form))
|
||||
{
|
||||
foreach($form['groups'] as $groupname => $groupdetails)
|
||||
{
|
||||
// show overview
|
||||
if($part == '')
|
||||
{
|
||||
if(isset($groupdetails['title']) && $groupdetails['title'] != '')
|
||||
{
|
||||
$fields .= getFormOverviewGroupOutput($groupname, $groupdetails);
|
||||
}
|
||||
}
|
||||
// only show one section
|
||||
elseif($part != '' && ($groupname == $part || $part == 'all'))
|
||||
{
|
||||
if(isset($groupdetails['title']) && $groupdetails['title'] != '')
|
||||
{
|
||||
$fields .= getFormGroupOutput($groupname, $groupdetails);
|
||||
}
|
||||
|
||||
if(validateFieldDefinition($groupdetails))
|
||||
{
|
||||
// Prefetch form fields
|
||||
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
|
||||
{
|
||||
$groupdetails['fields'][$fieldname] = array_merge_prefix($fielddetails, $fielddetails['type'], prefetchFormFieldData($fieldname, $fielddetails));
|
||||
$form['groups'][$groupname]['fields'][$fieldname] = $groupdetails['fields'][$fieldname];
|
||||
}
|
||||
|
||||
// Collect form field output
|
||||
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
|
||||
{
|
||||
$fields .= getFormFieldOutput($fieldname, $fielddetails);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $fields;
|
||||
}
|
||||
@@ -17,11 +17,11 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
function getFormFieldData($fieldname, $fielddata, $input)
|
||||
function getFormFieldData($fieldname, $fielddata, &$input)
|
||||
{
|
||||
if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('getFormFieldData' . ucfirst($fielddata['type'])))
|
||||
{
|
||||
$newfieldvalue = call_user_func('getFormFieldData' . ucfirst($fielddata['type']), $fieldname, $fielddata, &$input);
|
||||
$newfieldvalue = call_user_func('getFormFieldData' . ucfirst($fielddata['type']), $fieldname, $fielddata, $input);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -23,3 +23,54 @@ function getFormGroupOutput($groupname, $groupdetails)
|
||||
eval("\$group = \"" . getTemplate("settings/settings_group") . "\";");
|
||||
return $group;
|
||||
}
|
||||
|
||||
function getFormOverviewGroupOutput($groupname, $groupdetails)
|
||||
{
|
||||
global $lng, $settings, $filename, $s;
|
||||
|
||||
$group = '';
|
||||
$title = $groupdetails['title'];
|
||||
$part = $groupname;
|
||||
|
||||
$activated = true;
|
||||
$option = '';
|
||||
if(isset($groupdetails['fields']))
|
||||
{
|
||||
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
|
||||
{
|
||||
if(isset($fielddetails['overview_option'])
|
||||
&& $fielddetails['overview_option'] == true
|
||||
) {
|
||||
if($fielddetails['type'] != 'option'
|
||||
&& $fielddetails['type'] != 'bool')
|
||||
{
|
||||
standard_error('overviewsettingoptionisnotavalidfield');
|
||||
}
|
||||
|
||||
if($fielddetails['type'] == 'option')
|
||||
{
|
||||
$options_array = $fielddetails['option_options'];
|
||||
$options = '';
|
||||
foreach($options_array as $value => $vtitle)
|
||||
{
|
||||
$options .= makeoption($vtitle, $value, $settings[$fielddetails['settinggroup']][$fielddetails['varname']]);
|
||||
}
|
||||
$option.= $fielddetails['label'].': ';
|
||||
$option.= '<select class="dropdown_noborder" name="'.$fieldname.'">';
|
||||
$option.= $options;
|
||||
$option.= '</select>';
|
||||
$activated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$option.= $lng['admin']['activated'].': ';
|
||||
$option.= makeyesno($fieldname, '1', '0', $settings[$fielddetails['settinggroup']][$fielddetails['varname']]);
|
||||
$activated = (int)$settings[$fielddetails['settinggroup']][$fielddetails['varname']];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eval("\$group = \"" . getTemplate("settings/settings_overviewgroup") . "\";");
|
||||
return $group;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
function processForm($form, $input, $url_params = array())
|
||||
function processForm(&$form, &$input, $url_params = array())
|
||||
{
|
||||
if(validateFormDefinition($form))
|
||||
{
|
||||
@@ -45,7 +45,7 @@ function processForm($form, $input, $url_params = array())
|
||||
// Validate fields
|
||||
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
|
||||
{
|
||||
$newfieldvalue = getFormFieldData($fieldname, $fielddetails, &$input);
|
||||
$newfieldvalue = getFormFieldData($fieldname, $fielddetails, $input);
|
||||
|
||||
if($newfieldvalue != $fielddetails['value'])
|
||||
{
|
||||
@@ -143,3 +143,166 @@ function processForm($form, $input, $url_params = array())
|
||||
return saveForm($form, $saved_fields);
|
||||
}
|
||||
}
|
||||
|
||||
function processFormEx(&$form, &$input, $url_params = array(), $part, $settings_all, $settings_part, $only_enabledisable)
|
||||
{
|
||||
if(validateFormDefinition($form))
|
||||
{
|
||||
$submitted_fields = array();
|
||||
$changed_fields = array();
|
||||
$saved_fields = array();
|
||||
|
||||
foreach($form['groups'] as $groupname => $groupdetails)
|
||||
{
|
||||
if(($settings_part && $part == $groupname)
|
||||
|| $settings_all
|
||||
|| $only_enabledisable
|
||||
){
|
||||
if(validateFieldDefinition($groupdetails))
|
||||
{
|
||||
// Prefetch form fields
|
||||
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
|
||||
{
|
||||
if(!$only_enabledisable
|
||||
|| ($only_enabledisable && isset($fielddetails['overview_option']))
|
||||
) {
|
||||
$groupdetails['fields'][$fieldname] = array_merge_prefix($fielddetails, $fielddetails['type'], prefetchFormFieldData($fieldname, $fielddetails));
|
||||
$form['groups'][$groupname]['fields'][$fieldname] = $groupdetails['fields'][$fieldname];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach($form['groups'] as $groupname => $groupdetails)
|
||||
{
|
||||
if(($settings_part && $part == $groupname)
|
||||
|| $settings_all
|
||||
|| $only_enabledisable
|
||||
){
|
||||
if(validateFieldDefinition($groupdetails))
|
||||
{
|
||||
// Validate fields
|
||||
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
|
||||
{
|
||||
if(!$only_enabledisable
|
||||
|| ($only_enabledisable && isset($fielddetails['overview_option']))
|
||||
) {
|
||||
$newfieldvalue = getFormFieldData($fieldname, $fielddetails, $input);
|
||||
|
||||
if($newfieldvalue != $fielddetails['value'])
|
||||
{
|
||||
if(($error = validateFormField($fieldname, $fielddetails, $newfieldvalue)) !== true)
|
||||
{
|
||||
standard_error($error, $fieldname);
|
||||
}
|
||||
else
|
||||
{
|
||||
$changed_fields[$fieldname] = $newfieldvalue;
|
||||
}
|
||||
}
|
||||
|
||||
$submitted_fields[$fieldname] = $newfieldvalue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach($form['groups'] as $groupname => $groupdetails)
|
||||
{
|
||||
if(($settings_part && $part == $groupname)
|
||||
|| $settings_all
|
||||
|| $only_enabledisable
|
||||
){
|
||||
if(validateFieldDefinition($groupdetails))
|
||||
{
|
||||
// Check fields for plausibility
|
||||
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
|
||||
{
|
||||
if(!$only_enabledisable
|
||||
|| ($only_enabledisable && isset($fielddetails['overview_option']))
|
||||
) {
|
||||
if(($plausibility_check = checkPlausibilityFormField($fieldname, $fielddetails, $submitted_fields[$fieldname], $submitted_fields)) !== false)
|
||||
{
|
||||
if(is_array($plausibility_check) && isset($plausibility_check[0]))
|
||||
{
|
||||
if($plausibility_check[0] == FORMFIELDS_PLAUSIBILITY_CHECK_OK)
|
||||
{
|
||||
// Nothing to do here, everything's okay
|
||||
}
|
||||
elseif($plausibility_check[0] == FORMFIELDS_PLAUSIBILITY_CHECK_ERROR)
|
||||
{
|
||||
unset($plausibility_check[0]);
|
||||
$error = $plausibility_check[1];
|
||||
unset($plausibility_check[1]);
|
||||
$targetname = implode(' ', $plausibility_check);
|
||||
standard_error($error, $targetname);
|
||||
}
|
||||
elseif($plausibility_check[0] == FORMFIELDS_PLAUSIBILITY_CHECK_QUESTION)
|
||||
{
|
||||
unset($plausibility_check[0]);
|
||||
$question = $plausibility_check[1];
|
||||
unset($plausibility_check[1]);
|
||||
$targetname = implode(' ', $plausibility_check);
|
||||
if(!isset($input[$question]))
|
||||
{
|
||||
if(is_array($url_params) && isset($url_params['filename']))
|
||||
{
|
||||
$filename = $url_params['filename'];
|
||||
unset($url_params['filename']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$filename = '';
|
||||
}
|
||||
ask_yesno($question, $filename, array_merge($url_params, $submitted_fields, array($question => $question)), $targetname);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
standard_error('plausibilitychecknotunderstood');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach($form['groups'] as $groupname => $groupdetails)
|
||||
{
|
||||
if(($settings_part && $part == $groupname)
|
||||
|| $settings_all
|
||||
|| $only_enabledisable
|
||||
){
|
||||
if(validateFieldDefinition($groupdetails))
|
||||
{
|
||||
// Save fields
|
||||
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
|
||||
{
|
||||
if(!$only_enabledisable
|
||||
|| ($only_enabledisable && isset($fielddetails['overview_option']))
|
||||
) {
|
||||
if(isset($changed_fields[$fieldname]))
|
||||
{
|
||||
if(($saved_field = saveFormField($fieldname, $fielddetails, manipulateFormFieldData($fieldname, $fielddetails, $changed_fields[$fieldname]))) !== false)
|
||||
{
|
||||
$saved_fields = array_merge($saved_fields, $saved_field);
|
||||
}
|
||||
else
|
||||
{
|
||||
standard_error('errorwhensaving', $fieldname);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Save form
|
||||
return saveForm($form, $saved_fields);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,13 +19,20 @@
|
||||
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Throw some error that actually makes sense - false would just throw unknown error
|
||||
return false;
|
||||
return 'hiddenfieldvaluechanged';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
function getFormFieldDataInt($fieldname, $fielddata, $input)
|
||||
function getFormFieldDataInt($fieldname, $fielddata, &$input)
|
||||
{
|
||||
if(isset($input[$fieldname]))
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
function getFormFieldDataOption($fieldname, $fielddata, $input)
|
||||
function getFormFieldDataOption($fieldname, $fielddata, &$input)
|
||||
{
|
||||
if(isset($input[$fieldname]))
|
||||
{
|
||||
|
||||
@@ -27,6 +27,10 @@ function validateFormFieldString($fieldname, $fielddata, $newfieldvalue)
|
||||
$returnvalue = true;
|
||||
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);
|
||||
if($single_returnvalue !== true)
|
||||
{
|
||||
@@ -39,6 +43,11 @@ function validateFormFieldString($fieldname, $fielddata, $newfieldvalue)
|
||||
{
|
||||
$returnvalue = false;
|
||||
|
||||
/**
|
||||
* don't use tabs in value-fields, #81
|
||||
*/
|
||||
$newfieldvalue = str_replace("\t", " ", $newfieldvalue);
|
||||
|
||||
if(isset($fielddata['string_type']) && $fielddata['string_type'] == 'mail')
|
||||
{
|
||||
$returnvalue = (filter_var($newfieldvalue, FILTER_VALIDATE_EMAIL) == $newfieldvalue);
|
||||
|
||||
@@ -24,37 +24,61 @@
|
||||
* @param logFile
|
||||
* @param siteDomain
|
||||
* @param hostAliases
|
||||
* @return
|
||||
* @author Michael Duergner
|
||||
* @author Berend Dekens
|
||||
* @return null
|
||||
*/
|
||||
|
||||
function createAWStatsConf($logFile, $siteDomain, $hostAliases)
|
||||
function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot)
|
||||
{
|
||||
global $pathtophpfiles;
|
||||
global $pathtophpfiles, $settings;
|
||||
|
||||
// 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";
|
||||
|
||||
$awstats_dir = makeCorrectDir($customerDocroot.'/awstats/'.$siteDomain.'/');
|
||||
if(!is_dir($awstats_dir))
|
||||
{
|
||||
safe_exec('mkdir -p '.escapeshellarg($awstats_dir));
|
||||
}
|
||||
|
||||
// weird but could happen...
|
||||
if(!is_dir($settings['system']['awstats_conf']))
|
||||
{
|
||||
safe_exec('mkdir -p '.escapeshellarg($settings['system']['awstats_conf']));
|
||||
}
|
||||
|
||||
// These are the variables we will replace
|
||||
|
||||
$regex = array(
|
||||
'/\{LOG_FILE\}/',
|
||||
'/\{SITE_DOMAIN\}/',
|
||||
'/\{HOST_ALIASES\}/'
|
||||
'/\{HOST_ALIASES\}/',
|
||||
'/\{CUSTOMER_DOCROOT\}/',
|
||||
'/\{AWSTATS_CONF\}/'
|
||||
);
|
||||
$replace = array(
|
||||
$logFile,
|
||||
makeCorrectFile($logFile),
|
||||
$siteDomain,
|
||||
$hostAliases
|
||||
$hostAliases,
|
||||
$awstats_dir,
|
||||
makeCorrectDir($settings['system']['awstats_conf'])
|
||||
);
|
||||
|
||||
// File names
|
||||
|
||||
$domain_file = '/etc/awstats/awstats.' . $siteDomain . '.conf';
|
||||
$model_file = '/etc/awstats/awstats.model.conf.froxlor';
|
||||
$domain_file = makeCorrectFile($settings['system']['awstats_conf'].'/awstats.' . $siteDomain . '.conf');
|
||||
$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
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
function loadSettings($settings_data, $db)
|
||||
function loadSettings(&$settings_data, $db)
|
||||
{
|
||||
$settings = array();
|
||||
|
||||
|
||||
@@ -29,14 +29,25 @@
|
||||
*
|
||||
* @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_guids = array();
|
||||
$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';
|
||||
|
||||
if(file_exists($g_file))
|
||||
@@ -66,27 +77,32 @@ function checkLastGuid($froxlor_guid = 0)
|
||||
|
||||
$guid = isset($group[2]) ? (int)$group[2] : 0;
|
||||
|
||||
if($guid > $froxlor_guid)
|
||||
if($guid > $update_to_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;
|
||||
|
||||
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
|
||||
{
|
||||
$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
|
||||
{
|
||||
$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
|
||||
|
||||
@@ -25,6 +25,7 @@ function checkMysqlAccessHost($fieldname, $fielddata, $newfieldvalue, $allnewfie
|
||||
{
|
||||
if(validate_ip($host_entry, true) == false
|
||||
&& validateDomain($host_entry) == false
|
||||
&& validateLocalHostname($host_entry) == false
|
||||
&& $host_entry != '%')
|
||||
{
|
||||
return array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'invalidmysqlhost', $host_entry);
|
||||
|
||||
@@ -37,12 +37,34 @@ function validateDomain($domainname)
|
||||
// If FILTER_VALIDATE_URL is good, but FILTER_VALIDATE_URL with FILTER_FLAG_PATH_REQUIRED or FILTER_FLAG_QUERY_REQUIRED is also good, it isn't just a domain.
|
||||
// This is a ugly hack, maybe a good regex would be better?
|
||||
|
||||
// there is a bug in php 5.2.13 - 5.3.2 which
|
||||
// lets filter_var fail if the domain has
|
||||
// a dash (-) in it. #
|
||||
if(version_compare("5.2.13", PHP_VERSION, "=")
|
||||
|| version_compare("5.3.2", PHP_VERSION, "="))
|
||||
{
|
||||
$pattern = '/^([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6}$/i';
|
||||
if(preg_match($pattern, $domainname_tmp))
|
||||
{
|
||||
return $domainname;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(filter_var($domainname_tmp, FILTER_VALIDATE_URL) !== false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED) === false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_QUERY_REQUIRED) === false)
|
||||
{
|
||||
return $domainname;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function validateLocalHostname($hostname)
|
||||
{
|
||||
$pattern = '/^([a-zA-Z0-9\-])+$/i';
|
||||
if(preg_match($pattern, $hostname))
|
||||
{
|
||||
return $hostname;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ if(get_magic_quotes_gpc())
|
||||
*/
|
||||
|
||||
$settings_data = loadConfigArrayDir('./actions/admin/settings/');
|
||||
$settings = loadSettings(&$settings_data, &$db);
|
||||
$settings = loadSettings($settings_data, $db);
|
||||
|
||||
/*
|
||||
* when upgrading from syscp, the header-graphic gets lost
|
||||
@@ -416,6 +416,10 @@ if($page == '')
|
||||
*/
|
||||
|
||||
$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'],
|
||||
'required_resources' => 'change_serversettings',
|
||||
),
|
||||
/*
|
||||
* @TODO this is for Froxlor-1.0
|
||||
*
|
||||
array (
|
||||
'url' => 'admin_cronjobs.php?page=overview',
|
||||
'label' => $lng['admin']['cron']['cronsettings'],
|
||||
'required_resources' => 'change_serversettings',
|
||||
),
|
||||
*/
|
||||
array (
|
||||
'url' => 'admin_settings.php?page=rebuildconfigs',
|
||||
'label' => $lng['admin']['rebuildconf'],
|
||||
|
||||
@@ -68,7 +68,8 @@ define('PACKAGE_ENABLED', 2);
|
||||
|
||||
// VERSION INFO
|
||||
|
||||
$version = '0.9.2';
|
||||
$version = '0.9.5';
|
||||
$dbversion = '2';
|
||||
$branding = '';
|
||||
|
||||
?>
|
||||
|
||||
@@ -369,7 +369,6 @@ $lng['admin']['templates']['USERNAME'] = 'Ще бъде заменено с по
|
||||
$lng['admin']['templates']['PASSWORD'] = 'Ще бъде заменено с паролата за сметката на клиента.';
|
||||
$lng['admin']['templates']['EMAIL'] = 'Ще бъде заменено със сметка за POP3/IMAP.';
|
||||
$lng['admin']['rebuildconf'] = 'Възстановяване на конфигурационни файлове';
|
||||
$lng['admin']['cronlastrun'] = 'Последен cron';
|
||||
$lng['admin']['ipsandports']['ipsandports'] = 'IP адреси и портове';
|
||||
$lng['admin']['ipsandports']['add'] = 'Добавяне на IP/порт';
|
||||
$lng['admin']['ipsandports']['edit'] = 'Редакция на на IP/порт';
|
||||
|
||||
@@ -375,7 +375,6 @@ $lng['serversettings']['pathedit']['description'] = 'Vols que la ruta sigui escr
|
||||
* ADDED BETWEEN 1.2.12 and 1.2.13
|
||||
*/
|
||||
|
||||
$lng['admin']['cronlastrun'] = 'Última volta';
|
||||
$lng['serversettings']['paging']['title'] = 'Entrades per pàgina';
|
||||
$lng['serversettings']['paging']['description'] = 'Entrades per pàgina? (0 = sense paginar)';
|
||||
$lng['error']['ipstillhasdomains'] = 'La combinació IP/Port que vols esborrar té dominis assignats. Si us plau, reassigna els dominis a una altra IP/Port abans d\'esborrar.';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -382,7 +382,6 @@ $lng['mysql']['description'] = 'Her kan du oprette og editere dine MySQL-Databas
|
||||
* ADDED BETWEEN 1.2.12 and 1.2.13
|
||||
*/
|
||||
|
||||
$lng['admin']['cronlastrun'] = 'Sidste Cron';
|
||||
$lng['serversettings']['paging']['title'] = 'Genstande per side';
|
||||
$lng['serversettings']['paging']['description'] = 'Hvor mange genstande skal vises per side? (0 = brug ikke side inddeling)';
|
||||
$lng['error']['ipstillhasdomains'] = 'IP/Port kombinationen du vil slette har stadig domæner tilknyttet. Overfør disse domæner til en anden IP/Port kombination for at slette denne.';
|
||||
|
||||
@@ -381,7 +381,6 @@ $lng['mysql']['description'] = 'Hier kunt u MySQL-Databases maken en wijzigen.<b
|
||||
* ADDED BETWEEN 1.2.12 and 1.2.13
|
||||
*/
|
||||
|
||||
$lng['admin']['cronlastrun'] = 'Laatste Cron-run';
|
||||
$lng['serversettings']['paging']['title'] = 'Vermeldingen per pagina';
|
||||
$lng['serversettings']['paging']['description'] = 'Hoeveel vermeldingen er getoond moeten worden per pagina? (0 = alles laten zien)';
|
||||
$lng['error']['ipstillhasdomains'] = 'De IP/Port combinatie die u verwijderen wilt heeft nog domeinen toegewezen, wijs deze opnieuw to aan andere IP/Poort combinaties voordat u deze IP/Poort combinatie verwijderd.';
|
||||
|
||||
@@ -752,7 +752,7 @@ $lng['serversettings']['logger']['severity'] = 'Logging level';
|
||||
$lng['admin']['logger']['normal'] = 'normal';
|
||||
$lng['admin']['logger']['paranoid'] = 'paranoid';
|
||||
$lng['serversettings']['logger']['types']['title'] = 'Log-type(s)';
|
||||
$lng['serversettings']['logger']['types']['description'] = 'Specify logtypes seperated by comma.<br />Available logtypes are: syslog, file, mysql';
|
||||
$lng['serversettings']['logger']['types']['description'] = 'Specify logtypes. To select multiple types, hold down CTRL while selecting.<br />Available logtypes are: syslog, file, mysql';
|
||||
$lng['serversettings']['logger']['logfile'] = 'Logfile path including filename';
|
||||
$lng['error']['logerror'] = 'Log-Error: %s';
|
||||
$lng['serversettings']['logger']['logcron'] = 'Log cronjobs (one run)';
|
||||
@@ -826,8 +826,6 @@ $lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'You cannot enable Weba
|
||||
$lng['serversettings']['webalizer_enabled'] = 'Enable webalizer statistics';
|
||||
$lng['serversettings']['awstats_enabled'] = 'Enable awstats statistics';
|
||||
$lng['admin']['awstatssettings'] = 'Awstats settings';
|
||||
$lng['serversettings']['awstats_domain_file']['title'] = 'Awstats domainfiles directory';
|
||||
$lng['serversettings']['awstats_model_file']['title'] = 'Awstats model file';
|
||||
|
||||
// ADDED IN 1.2.19-svn16
|
||||
|
||||
@@ -950,7 +948,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']['invalidautoresponder'] = 'The given account is invalid.';
|
||||
$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']['know_what_youre_doing'] = 'Change only, if you know what you\'re doing!';
|
||||
$lng['admin']['show_version_login']['title'] = 'Show Froxlor version on login';
|
||||
@@ -1192,7 +1190,7 @@ $lng['error']['admindoesntexist'] = 'The admin you have chosen doesn\'t exist.';
|
||||
// ADDED IN 1.2.19-svn37
|
||||
|
||||
$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 is disabled.<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']['description'] = 'If activated a user could login multiple times.';
|
||||
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Allow moving domains between admins';
|
||||
@@ -1260,24 +1258,9 @@ $lng['panel']['off'] = 'off';
|
||||
$lng['update']['updateinprogress_onlyadmincanlogin'] = 'A newer version of Froxlor has been installed but not yet set up.<br />Only the administrator can log in and finish the update.';
|
||||
$lng['update']['update'] = 'Froxlor Update';
|
||||
$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']['part_a'] = 'The Froxlor files have been updated to version <strong>%newversion</strong>. The installed version is <strong>%curversion</strong>.';
|
||||
$lng['update']['update_information']['part_b'] = '<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['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['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';
|
||||
@@ -1300,4 +1283,83 @@ $lng['admin']['servicedata'] = 'Service Data';
|
||||
|
||||
$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['admin']['cron']['add'] = 'Add cronjob';
|
||||
$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.';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.4-svn1
|
||||
$lng['ftp']['account_edit'] = 'Edit ftp account';
|
||||
$lng['ftp']['editpassdescription'] = 'Set new password or leave blank for no change.';
|
||||
$lng['mysql']['sendinfomail'] = 'Send data via email to me';
|
||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] New database created';
|
||||
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nYou can access your databases using phpMyAdmin via {URI}\n";
|
||||
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hello {CUST_NAME},\n\nyou have just added a new database. Here is the entered information:\n\nDatabasename: {DB_NAME}\nPassword: {DB_PASS}\nDescription: {DB_DESC}\nDB-Hostname: {DB_SRV}\n{PMA_URI}\nYours sincerely, the Froxlor-Team";
|
||||
$lng['error']['domains_cantdeletedomainwithapsinstances'] = 'You cannot delete a domain which is used by an installed APS package. You have to uninstall it first.';
|
||||
$lng['serversettings']['awstats_path'] = 'Path to AWStats \'awstats_buildstaticpages.pl\'';
|
||||
$lng['serversettings']['awstats_conf'] = 'AWStats configuration path';
|
||||
$lng['error']['overviewsettingoptionisnotavalidfield'] = 'Woops, a field that should be displayed as an option in the settings-overview is not an excepted type. You can blame the developers for this. This should not happen!';
|
||||
$lng['admin']['configfiles']['compactoverview'] = 'Compact-overview';
|
||||
$lng['admin']['lastlogin_succ'] = 'Last login';
|
||||
$lng['panel']['neverloggedin'] = 'No login yet';
|
||||
|
||||
?>
|
||||
|
||||
@@ -246,7 +246,6 @@ $lng['error']['destinationalreadyexistasmail'] = 'Le renvoi vers l\'adresse "%s"
|
||||
$lng['error']['destinationalreadyexist'] = 'Il existe d<>j<EFBFBD> une r<>exp<78>dition vers l\'adresse "%s".';
|
||||
$lng['error']['destinationiswrong'] = 'L\'adresse "%s" contient des signes invalides ou est incompl<70>te.';
|
||||
$lng['error']['domainname'] = $lng['domains']['domainname'];
|
||||
$lng['error']['youcantdeletechangemainadmin'] = 'Pour des raisons de s<>curit<69>, il n\'est pas possible de supprimer ou modifier l\'administrateur principal.';
|
||||
$lng['error']['loginnameissystemaccount'] = 'Vous ne pouvez pas cr<63>er un compte identique au compte syst<73>me, veuillez r<>essayer avec un autre nom.';
|
||||
|
||||
/**
|
||||
@@ -255,7 +254,6 @@ $lng['error']['loginnameissystemaccount'] = 'Vous ne pouvez pas cr
|
||||
|
||||
$lng['question']['question'] = 'Question de s<>curit<69>';
|
||||
$lng['question']['admin_customer_reallydelete'] = 'Etes-vous s<>r de vouloir supprimer le compte "%s" ?<br />ATTENTION ! Toutes ses informations seront supprim<69>es ! Une fois fait, il vous appartiendra de supprimer manuellement tous les dossiers du compte sur le syst<73>me de fichiers.';
|
||||
$lng['question']['admin_domain_reallyenablemailsystemhostname'] = 'Etes-vous s<>r de vouloir activ<69> le serveur de nom en tant que serveur de mails ?';
|
||||
$lng['question']['admin_domain_reallydelete'] = 'Etes-vous s<>r de vouloir supprimer le domaine "%s" ?';
|
||||
$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Etes-vous s<>r de vouloir d<>sactiver les modes de s<>curit<69> suivants : OpenBasedir et / o<> SafeMode ?';
|
||||
$lng['question']['admin_admin_reallydelete'] = 'Etes-vous s<>r de vouloir supprimer l\'administrateur "%s" ?<br />Tous ses comptes seront affect<63>s <20> l\'administrateur principal.';
|
||||
@@ -359,8 +357,6 @@ $lng['serversettings']['hostname']['title'] = 'Nom d\'h
|
||||
$lng['serversettings']['hostname']['description'] = 'Quel est le nom d\'h<>te (hostname) du serveur ?';
|
||||
$lng['serversettings']['apachereload_command']['title'] = 'Commande de rechargement d\'Apache';
|
||||
$lng['serversettings']['apachereload_command']['description'] = 'Quelle est la commande pour recharger / red<65>marrer Apache ?';
|
||||
$lng['serversettings']['apacheconf_filename']['title'] = 'Nom du fichier de configuration Apache';
|
||||
$lng['serversettings']['apacheconf_filename']['description'] = 'Dans quel fichier souhaitez-vous enregistrer la configuration Apache ?';
|
||||
$lng['serversettings']['bindconf_directory']['title'] = 'Emplacement du dossier de configuration de Bind / Named';
|
||||
$lng['serversettings']['bindconf_directory']['description'] = 'O<> doit <20>tre stock<63> la configuration de Bind / Named ?';
|
||||
$lng['serversettings']['bindreload_command']['title'] = 'Commande de rechargement de Bind / Named';
|
||||
@@ -403,7 +399,6 @@ $lng['mysql']['description'] = 'Ici, vous pouvez ajouter et effacer des bases de
|
||||
* ADDED BETWEEN 1.2.12 and 1.2.13
|
||||
*/
|
||||
|
||||
$lng['admin']['cronlastrun'] = 'Derni<6E>re t<>che "cron"';
|
||||
$lng['serversettings']['paging']['title'] = 'Nombre de r<>sultats par page';
|
||||
$lng['serversettings']['paging']['description'] = 'Nombre de r<>sultats par page ? (0 = D<>sactive la pagination)';
|
||||
$lng['error']['ipstillhasdomains'] = 'La combinaison IP / port est encore utilis<69>e, veuillez r<>assigner le ou les domaines existant(s) avec cette adresse IP / port concern<72>(s) <20> une autre combinaison IP / port avant de supprimer celle-ci.';
|
||||
@@ -452,7 +447,6 @@ $lng['error']['phpmyadminiswrong'] = 'Le lien pour phpMyAdmin n\'est pas valide.
|
||||
$lng['error']['webmailiswrong'] = 'Le lien pour le WebMail n\'est pas valide.';
|
||||
$lng['error']['webftpiswrong'] = 'Le lien pour le WebFTP n\'est pas valide.';
|
||||
$lng['domains']['hasaliasdomains'] = 'Le domaine poss<73>de un ou des alias.';
|
||||
$lng['domains']['istopleveldomain'] = 'Est le nom de domaine principal';
|
||||
$lng['serversettings']['defaultip']['title'] = 'IP / Port par d<>faut';
|
||||
$lng['serversettings']['defaultip']['description'] = 'Quel est l\'IP / Port par d<>faut ?';
|
||||
$lng['domains']['statstics'] = 'Fr<46>quentation';
|
||||
@@ -546,7 +540,6 @@ $lng['admin']['configfiles']['etc'] = 'Autres (Syst
|
||||
$lng['admin']['configfiles']['choosedistribution'] = '-- Choisissez une distribution --';
|
||||
$lng['admin']['configfiles']['chooseservice'] = '-- Choisissez un service --';
|
||||
$lng['admin']['configfiles']['choosedaemon'] = '-- Choisissez un d<>mon --';
|
||||
$lng['admin']['trafficlastrun'] = 'Dernier calcul du trafic';
|
||||
|
||||
// ADDED IN 1.2.16-svn10
|
||||
|
||||
@@ -811,10 +804,6 @@ $lng['cronjobs']['notyetrun'] = 'Pas encore lanc
|
||||
$lng['install']['servername_should_be_fqdn'] = 'Le nom du serveur doit <20>tre un nom FQDN, pas une adresse IP';
|
||||
$lng['serversettings']['default_vhostconf']['title'] = 'Param<61>tres par d<>faut pour les vHosts';
|
||||
$lng['emails']['quota'] = 'Quota';
|
||||
$lng['emails']['quota_type']['byte'] = 'octet(s)';
|
||||
$lng['emails']['quota_type']['kilobyte'] = 'Ko';
|
||||
$lng['emails']['quota_type']['megabyte'] = 'Mo';
|
||||
$lng['emails']['quota_type']['gigabyte'] = 'Go';
|
||||
$lng['emails']['noquota'] = 'Pas de quota';
|
||||
$lng['emails']['updatequota'] = 'Mise <20> jour';
|
||||
$lng['serversettings']['mail_quota']['title'] = 'Quota de la bo<62>te aux lettres';
|
||||
@@ -859,8 +848,6 @@ $lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'Vous ne pouvez pas act
|
||||
$lng['serversettings']['webalizer_enabled'] = 'Activer les statistiques Webalizer';
|
||||
$lng['serversettings']['awstats_enabled'] = 'Activer les statistiques AWStats';
|
||||
$lng['admin']['awstatssettings'] = 'Param<61>tres Awstats';
|
||||
$lng['serversettings']['awstats_domain_file']['title'] = 'Dossier domaines pour AWStats';
|
||||
$lng['serversettings']['awstats_model_file']['title'] = 'Fichier mod<6F>le pour AWStats';
|
||||
|
||||
// ADDED IN 1.2.19-svn16
|
||||
|
||||
|
||||
@@ -756,7 +756,7 @@ $lng['serversettings']['logger']['severity'] = 'Logging Level';
|
||||
$lng['admin']['logger']['normal'] = 'Normal';
|
||||
$lng['admin']['logger']['paranoid'] = 'Paranoid';
|
||||
$lng['serversettings']['logger']['types']['title'] = 'Log-Art(en)';
|
||||
$lng['serversettings']['logger']['types']['description'] = 'Tragen Sie hier die gewünschten Logtypen kommagetrennt ein.<br />Mögliche Logtypen sind: syslog, file, mysql';
|
||||
$lng['serversettings']['logger']['types']['description'] = 'Wählen Sie hier die gewünschten Logtypen. Für Mehrfachauswahl, halten Sie wäghrend der Auswahl STRG gedrückt<br />Mögliche Logtypen sind: syslog, file, mysql';
|
||||
$lng['serversettings']['logger']['logfile'] = 'Log-Datei Pfad inklusive Dateinamen';
|
||||
$lng['error']['logerror'] = 'Log-Fehler: %s';
|
||||
$lng['serversettings']['logger']['logcron'] = 'Log Cronjobs (einen Durchgang)';
|
||||
@@ -830,8 +830,6 @@ $lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'Webalizer und Awstats
|
||||
$lng['serversettings']['webalizer_enabled'] = 'Nutze Webalizer Statistiken';
|
||||
$lng['serversettings']['awstats_enabled'] = 'Nutze AWStats Statistiken';
|
||||
$lng['admin']['awstatssettings'] = 'Awstats Einstellungen';
|
||||
$lng['serversettings']['awstats_domain_file']['title'] = 'Awstats Domain-Dateien Ordner';
|
||||
$lng['serversettings']['awstats_model_file']['title'] = 'Awstats Model Datei';
|
||||
|
||||
// ADDED IN 1.2.19-svn16
|
||||
|
||||
@@ -955,7 +953,7 @@ $lng['error']['accountnotexisting'] = 'Der angegebene E-Mail-Account existiert n
|
||||
$lng['error']['autoresponderalreadyexists'] = 'Für dieses Konto existiert bereits eine Abwesenheitsnachricht.';
|
||||
$lng['error']['invalidautoresponder'] = 'Das angegebene Konto ist ungültig.';
|
||||
$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']['description'] = 'Zeige Froxlor Version in der Fußzeile der Loginseite';
|
||||
$lng['admin']['show_version_footer']['title'] = 'Zeige Froxlor Version in Fußzeile';
|
||||
@@ -1196,7 +1194,7 @@ $lng['error']['admindoesntexist'] = 'Der ausgewählte Admin existiert nicht.
|
||||
// ADDED IN 1.2.19-svn37
|
||||
|
||||
$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']['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';
|
||||
@@ -1240,24 +1238,9 @@ $lng['panel']['off'] = 'aus';
|
||||
$lng['update']['updateinprogress_onlyadmincanlogin'] = 'Eine neuere Version von Froxlor wurde installiert, aber noch nicht eingerichtet.<br />Nur der Administrator kann sich anmelden und die Aktualisierung abschließen.';
|
||||
$lng['update']['update'] = 'Froxlor Aktualisierung';
|
||||
$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']['part_a'] = 'Die Froxlor Dateien wurden aktualisiert. Neue Version ist <strong>%newversion</strong>. Die bisher installierte Version ist <strong>%curversion</strong>';
|
||||
$lng['update']['update_information']['part_b'] = '<br /><br />Ein Kunden-Login ist vor Abschluss des Aktualisierungsvorganges nicht möglich.<br /><strong>Aktualisierung ausführen?</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['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';
|
||||
@@ -1280,4 +1263,99 @@ $lng['admin']['servicedata'] = 'Dienstleistungsdaten';
|
||||
|
||||
$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['cron']['description'] = 'Beschreibung';
|
||||
$lng['crondesc']['cron_unknown_desc'] = 'Keine Beschreibung angegeben';
|
||||
$lng['admin']['cron']['add'] = 'Cronjob hinzufügen';
|
||||
$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.';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.4-svn1
|
||||
$lng['ftp']['account_edit'] = 'FTP Konto bearbeiten';
|
||||
$lng['ftp']['editpassdescription'] = 'Neues Passwort setzen oder leer für keine Änderung.';
|
||||
$lng['mysql']['sendinfomail'] = 'Daten per E-Mail an mich senden';
|
||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] Neue Datenbank erstellt';
|
||||
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nDie Datenbank kann mit phpMyAdmin via {URI} verwaltet werden.\n";
|
||||
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hallo {CUST_NAME},\n\ndu hast gerade eine neue Datenbank angelegt. Hier die angegebenen Informationen:\n\nDatenbankname: {DB_NAME}\nPasswort: {DB_PASS}\nBeschreibung: {DB_DESC}\nDatenbank-Server: {DB_SRV}\n{PMA_URI}\nVielen Dank, das Froxlor-Team";
|
||||
$lng['error']['domains_cantdeletedomainwithapsinstances'] = 'Sie können keine Domain löschen, die noch von APS Paketen verwendet wird. Löschen Sie zuerst alle installierten APS Pakete dieser Domain.';
|
||||
$lng['serversettings']['awstats_path'] = 'Pfad zu AWStats \'awstats_buildstaticpages.pl\'';
|
||||
$lng['serversettings']['awstats_conf'] = 'AWStats Konfigurations-Pfad';
|
||||
$lng['error']['overviewsettingoptionisnotavalidfield'] = 'Hoppla, ein Feld, dass als Option in der Konfigurationsübersicht angezeigt werden soll, hat nicht den erwarteten Wert. Sie können den Entwicklern die Schuld geben. Dies sollte nicht passieren!';
|
||||
$lng['admin']['configfiles']['compactoverview'] = 'Kompakt-Übersicht';
|
||||
|
||||
$lng['mysql']['mysql_server'] = 'MySQL-Server';
|
||||
$lng['admin']['ipsandports']['webserverdefaultconfig'] = 'Webserver Standard Konfiguration';
|
||||
$lng['admin']['ipsandports']['webserverdomainconfig'] = 'Webserver Domain Konfiguration';
|
||||
$lng['admin']['ipsandports']['webserverssldomainconfig'] = 'Webserver SSL Konfiguration';
|
||||
$lng['admin']['ipsandports']['ssl_key_file'] = 'Pfad zu der SSL Schlüsseldatei';
|
||||
$lng['admin']['ipsandports']['ssl_ca_file'] = 'Pfad zu dem SSL CA Zertifikat';
|
||||
$lng['admin']['ipsandports']['default_vhostconf_domain'] = 'Standard vHost - Einstellungen für jeden Domain - Kontainer';
|
||||
$lng['serversettings']['ssl']['ssl_key_file'] = 'Pfad zu der SSL Schlüsseldatei';
|
||||
$lng['serversettings']['ssl']['ssl_ca_file'] = 'Pfad zu dem SSL CA Zertifikat';
|
||||
$lng['error']['usernamealreadyexists'] = 'Der Benutzername %s existiert bereits.';
|
||||
$lng['error']['plausibilitychecknotunderstood'] = 'Die Antwort des Plausibilitätschecks wurde nicht verstanden';
|
||||
$lng['error']['errorwhensaving'] = 'Bei dem Speichern des Feldes %s trat ein Fehler auf';
|
||||
$lng['success']['success'] = 'Information';
|
||||
$lng['success']['clickheretocontinue'] = 'Hier klicken um fortzufahren';
|
||||
$lng['success']['settingssaved'] = 'Die Einstellungen wurden erfolgreich gespeichert.';
|
||||
$lng['admin']['lastlogin_succ'] = 'Letzte Anmeldung';
|
||||
$lng['panel']['neverloggedin'] = 'Keine Anmeldung bisher';
|
||||
|
||||
?>
|
||||
|
||||
@@ -191,7 +191,6 @@ $lng['error']['youhavealreadyacatchallforthisdomain'] = 'Ön már megh
|
||||
$lng['error']['ftp_cantdeletemainaccount'] = 'Nem törölheti fő FTP hozzáférését.';
|
||||
$lng['error']['login'] = 'Helytelen a felhasználónév vagy a jelszó, amelyet begépelt. Kérem, próbálja újra!';
|
||||
$lng['error']['login_blocked'] = 'Ezt a hozzáférés fel lett függesztve a túl sok bejelentkezési hiba miatt. Kérem, próbálja újra!';
|
||||
$settings['login']['deactivatetime'] . ' seconds.';
|
||||
$lng['error']['notallreqfieldsorerrors'] = 'Nem teljesen vagy helytelenül töltötte ki a mezőket.';
|
||||
$lng['error']['oldpasswordnotcorrect'] = 'A régi jelszó helytelen.';
|
||||
$lng['error']['youcantallocatemorethanyouhave'] = 'Nem oszthat ki több erőforrást, mint amennyit birtokol.';
|
||||
@@ -386,7 +385,6 @@ $lng['mysql']['description'] = 'Itt hozhatja létre és válto
|
||||
* ADDED BETWEEN 1.2.12 and 1.2.13
|
||||
*/
|
||||
|
||||
$lng['admin']['cronlastrun'] = 'Utolsó Cron futás';
|
||||
$lng['serversettings']['paging']['title'] = 'Bejegyzések száma egy lapon';
|
||||
$lng['serversettings']['paging']['description'] = 'Hány bejegyzés jelenjen meg egy lapon? (0 = lapozás kikapcsolása)';
|
||||
$lng['error']['ipstillhasdomains'] = 'A törölni kívánt IP/Port kombinációhoz domainek vannak rendelve. Rendelje hozzá ezeket egy másik IP/Port kombinációhoz, mielőtt a jelenlegi IP/Port kombinációt törli.';
|
||||
|
||||
@@ -378,7 +378,6 @@ $lng['serversettings']['pathedit']['description'] = 'Un percorso/cartella andr
|
||||
* New strings
|
||||
*/
|
||||
|
||||
$lng['admin']['cronlastrun'] = 'Ultimo Cronjob';
|
||||
$lng['serversettings']['paging']['title'] = 'Elementi da visualizzare per pagina';
|
||||
$lng['serversettings']['paging']['description'] = 'Quanti elementi dovrebbero essere visualizzati su una pagina? (0 = disattiva impaginazione)';
|
||||
$lng['error']['ipstillhasdomains'] = 'La combinazione IP/Porta che vuoi eliminare ha ancora dei domini assegnati, per favore riassegna questi domini ad altre combinazioni IP/Porta prima di eliminare questa.';
|
||||
|
||||
@@ -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: ';
|
||||
|
||||
?>
|
||||
1379
lng/polish.lng.php
Normal file
1379
lng/polish.lng.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -379,7 +379,6 @@ $lng['serversettings']['pathedit']['description'] = 'A escolha do file tem que s
|
||||
* ADDED BETWEEN 1.2.12 and 1.2.13
|
||||
*/
|
||||
|
||||
$lng['admin']['cronlastrun'] = 'Ultimo Agendamento';
|
||||
$lng['serversettings']['paging']['title'] = 'Entradas por pagina';
|
||||
$lng['serversettings']['paging']['description'] = 'Quantas entradas devem ser mostradas por pagina? (0 = desabilitar paginas)';
|
||||
$lng['error']['ipstillhasdomains'] = 'O IP/Porta que voce quer deletar ainda possui dominios associados e eles, por favor altere o IP/Porta destes dominios antes de deletá-los.';
|
||||
@@ -490,7 +489,6 @@ $lng['admin']['configfiles']['etc'] = 'Outros (Sistema)';
|
||||
$lng['admin']['configfiles']['choosedistribution'] = 'Escolha uma distribuição';
|
||||
$lng['admin']['configfiles']['chooseservice'] = 'Escolha um serviço';
|
||||
$lng['admin']['configfiles']['choosedaemon'] = 'Escolha um daemon';
|
||||
$lng['admin']['trafficlastrun'] = 'Cálculo do Último Tráfego';
|
||||
$lng['serversettings']['ftpdomain']['title'] = 'Contas FTP @domínio';
|
||||
$lng['serversettings']['ftpdomain']['description'] = 'Clientes podem criar contas de FTP user@domíniodocliente?';
|
||||
$lng['panel']['back'] = 'Volta';
|
||||
@@ -738,8 +736,6 @@ $lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'Você não
|
||||
$lng['serversettings']['webalizer_enabled'] = 'Ativar estatísticas webalizer';
|
||||
$lng['serversettings']['awstats_enabled'] = 'Ativar estatísticas awstats';
|
||||
$lng['admin']['awstatssettings'] = 'Configurações Awtats';
|
||||
$lng['serversettings']['awstats_domain_file']['title'] = 'Awstats diretório de arquivos do dominio';
|
||||
$lng['serversettings']['awstats_model_file']['title'] = 'Modelo de arquivo Awstats';
|
||||
$lng['admin']['domain_dns_settings'] = 'Configurações de DNS';
|
||||
$lng['dns']['destinationip'] = 'Domínio IP';
|
||||
$lng['dns']['standardip'] = 'IP padrão do servidor';
|
||||
@@ -789,13 +785,6 @@ $lng['panel']['default'] = 'Padrão';
|
||||
$lng['panel']['never'] = 'Nunca';
|
||||
$lng['panel']['active'] = 'Ativo';
|
||||
$lng['panel']['please_choose'] = 'Por favor escolha';
|
||||
$lng['panel']['intervalfee_type']['y'] = 'Anos';
|
||||
$lng['panel']['intervalfee_type']['m'] = 'Meses';
|
||||
$lng['panel']['intervalfee_type']['d'] = 'Dias';
|
||||
$lng['panel']['intervalfee_type_one']['y'] = 'Ano';
|
||||
$lng['panel']['intervalfee_type_one']['m'] = 'Mes';
|
||||
$lng['panel']['intervalfee_type_one']['d'] = 'Dia';
|
||||
$lng['panel']['service_still_active'] = 'Serviço ainda ativo';
|
||||
$lng['panel']['allow_modifications'] = 'Aceita alteraçoes';
|
||||
$lng['domains']['add_date'] = 'Adicionado no Froxlor';
|
||||
$lng['domains']['registration_date'] = 'Adicionado no Registro';
|
||||
@@ -803,46 +792,9 @@ $lng['domains']['topleveldomain'] = 'Top-Level-Domain';
|
||||
$lng['admin']['accountdata'] = 'Data da Conta';
|
||||
$lng['admin']['contactdata'] = 'Data de Contato';
|
||||
$lng['admin']['servicedata'] = 'Data de Serviço';
|
||||
$lng['customer']['taxid'] = 'ID de Taxa';
|
||||
$lng['customer']['calc_tax'] = 'Calcular Taxa';
|
||||
$lng['customer']['create_contract'] = 'Criar contrato';
|
||||
$lng['customer']['contract_date'] = 'Data de contrato';
|
||||
$lng['customer']['contract_number'] = 'Descrição/Número de contrato';
|
||||
$lng['customer']['additional_service_description'] = 'Descrição adicional de serviço';
|
||||
$lng['customer']['contract_details'] = 'Detalhes do contrato';
|
||||
$lng['customer']['included_domains'] = 'Domínios Incluídos';
|
||||
$lng['customer']['additional_traffic'] = 'Tráfego Adicional';
|
||||
$lng['customer']['additional_diskspace'] = 'Espaco Web Adicional';
|
||||
$lng['customer']['term_of_payment'] = 'Termo de Pagamento (dias)';
|
||||
$lng['customer']['payment_every'] = 'Pagamento todo';
|
||||
$lng['customer']['payment_method'] = 'Método de Pagamento';
|
||||
$lng['admin']['customer_categories_once'] = 'Incluir configurações de taxas de clientes';
|
||||
$lng['admin']['customer_categories_period'] = 'Incluir intervalo de tavas de clientes';
|
||||
$lng['customer']['bankaccount_holder'] = 'Proprietário da conta';
|
||||
$lng['customer']['bankaccount_number'] = 'Número da conta';
|
||||
$lng['customer']['bankaccount_blz'] = 'Número da agência';
|
||||
$lng['customer']['bankaccount_bank'] = 'Nome do banco';
|
||||
$lng['service']['quantity'] = 'Quantidade';
|
||||
$lng['service']['interval_fee'] = 'Pausa de TAXA';
|
||||
$lng['service']['interval_length'] = 'Pausa de Tempo';
|
||||
$lng['service']['interval_payment'] = 'Pausa de Pagamento';
|
||||
$lng['service']['interval_payment_prepaid'] = 'Pré Pago';
|
||||
$lng['service']['interval_payment_postpaid'] = 'Pós Pago';
|
||||
$lng['service']['setup_fee'] = 'Configurar Taxa';
|
||||
$lng['service']['active'] = 'Ativa Serviço';
|
||||
$lng['service']['start_date'] = 'Activado desde';
|
||||
$lng['service']['end_date'] = 'Inativo desde';
|
||||
$lng['service']['valid_from'] = 'Válido de';
|
||||
$lng['service']['valid_to'] = 'Válido para';
|
||||
$lng['serversettings']['allow_password_reset']['description'] = 'Os clientes podem redefinir sua senha e serão enviadas para seu endereço de e-mail';
|
||||
$lng['serversettings']['allow_password_reset_admin']['title'] = 'Ativa reset de senhas pelos administradores';
|
||||
$lng['serversettings']['allow_password_reset_admin']['description'] = 'Admins / Revendedor pode redefinir sua senha e a nova senha será enviada para seu endereço de e-mail';
|
||||
$lng['emails']['quota_type']['byte'] = 'B';
|
||||
$lng['emails']['quota_type']['kilobyte'] = 'KB';
|
||||
$lng['emails']['quota_type']['megabyte'] = 'MB';
|
||||
$lng['emails']['quota_type']['gigabyte'] = 'GB';
|
||||
$lng['emails']['quota_type']['terabyte'] = 'TB';
|
||||
$lng['emails']['quota_type']['petabyte'] = 'PB';
|
||||
$lng['panel']['not_supported'] = 'Não suportado em:';
|
||||
$lng['menue']['email']['autoresponder'] = 'Auto-Responder';
|
||||
$lng['autoresponder']['active'] = 'Ativar';
|
||||
@@ -860,7 +812,7 @@ $lng['error']['accountnotexisting'] = 'Esta conta não existe.';
|
||||
$lng['error']['autoresponderalreadyexists'] = 'Já existe um auto-responder configurado para esta conta.';
|
||||
$lng['error']['invalidautoresponder'] = 'Esta determinada está inválida.';
|
||||
$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']['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';
|
||||
@@ -1084,7 +1036,7 @@ $lng['aps']['noinstancesexisting'] = 'Não existem estâncias para ad
|
||||
$lng['error']['customerdoesntexist'] = 'O cliente 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']['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']['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';
|
||||
|
||||
@@ -1160,8 +1160,6 @@ $lng['mysql']['description'] = 'Здесь вm
|
||||
* ADDED BETWEEN 1.2.12 and 1.2.13
|
||||
*/
|
||||
|
||||
$lng['admin']['cronlastrun'] = 'Последний крон (cron)';
|
||||
|
||||
// Last Cron
|
||||
|
||||
$lng['serversettings']['paging']['title'] = 'Кол-во записей на страницу';
|
||||
|
||||
@@ -381,7 +381,6 @@ $lng['mysql']['description'] = 'Tu m
|
||||
* ADDED BETWEEN 1.2.12 and 1.2.13
|
||||
*/
|
||||
|
||||
$lng['admin']['cronlastrun'] = 'Posledn<64> Cron';
|
||||
$lng['serversettings']['paging']['title'] = 'Z<>znamov na str<74>nku';
|
||||
$lng['serversettings']['paging']['description'] = 'Ko<4B>ko z<>znamov bude zobrazen<65>ch na jednej str<74>nke? (0 = zak<61>zan<61> str<74>nkovanie)';
|
||||
$lng['error']['ipstillhasdomains'] = 'IP/Port kombin<69>cia ktor<6F> chcete zmaza<7A> m<> st<73>le priraden<65> domen<65>ny. Pred zmazan<61>m tejto IP/Port kombin<69>cie pros<6F>m znovu prira<72>te tieto k ostatn<74>m IP/Port kombin<69>ciam.';
|
||||
|
||||
@@ -376,7 +376,6 @@ $lng['serversettings']['pathedit']['description'] = 'Prefiere seleccionar un tra
|
||||
* ADDED BETWEEN 1.2.12 and 1.2.13
|
||||
*/
|
||||
|
||||
$lng['admin']['cronlastrun'] = 'Último Cron';
|
||||
$lng['serversettings']['paging']['title'] = 'Entradas por página';
|
||||
$lng['serversettings']['paging']['description'] = '¿Cuantas entradas deben ser mostradas en una página? (0=desactivar paginación)';
|
||||
$lng['error']['ipstillhasdomains'] = 'La combinación IP/Puerto que Usted quiere eliminar todavía tiene dominios asignados, por favor vuelva a reasignar estas combinaciones IP/Puerto antes de eliminar esta combinación IP/Puerto.';
|
||||
|
||||
@@ -387,7 +387,6 @@ $lng['mysql']['description'] = 'H
|
||||
* ADDED BETWEEN 1.2.12 and 1.2.13
|
||||
*/
|
||||
|
||||
$lng['admin']['cronlastrun'] = 'Konfigurerinsfilerna skapades sist';
|
||||
$lng['serversettings']['paging']['title'] = 'Antal rader per sida';
|
||||
$lng['serversettings']['paging']['description'] = 'Hur m<>nga rader skall det vara p<> en sida? (0 = St<53>ng av sidbrytning)';
|
||||
$lng['error']['ipstillhasdomains'] = 'IP/Port kombinationen som du vill radera har fortfarande dom<6F>ner anslutna till sig, Flytta dessa till n<>gon annan IP/Port kombination innan du raderar denna IP/Port kombination.';
|
||||
@@ -529,7 +528,6 @@ $lng['admin']['configfiles']['etc'] = 'Others (System)';
|
||||
$lng['admin']['configfiles']['choosedistribution'] = '-- Choose a distribution --';
|
||||
$lng['admin']['configfiles']['chooseservice'] = '-- Choose a service --';
|
||||
$lng['admin']['configfiles']['choosedaemon'] = '-- Choose a daemon --';
|
||||
$lng['admin']['trafficlastrun'] = 'Senaste trafikber<65>kningen gjordes';
|
||||
|
||||
// ADDED IN 1.2.16-svn10
|
||||
|
||||
|
||||
@@ -379,7 +379,6 @@ $lng['serversettings']['pathedit']['description'] = '路径是
|
||||
* ADDED BETWEEN 1.2.12 and 1.2.13
|
||||
*/
|
||||
|
||||
$lng['admin']['cronlastrun'] = '定时执行程序的最后一次执行';
|
||||
$lng['serversettings']['paging']['title'] = '每页进入次数';
|
||||
$lng['serversettings']['paging']['description'] = '一页上应该显示多少次 进入?(0 =无效分页)';
|
||||
$lng['error']['ipstillhasdomains'] = '你想要删除的IP/ 端口连接仍然占有分 配给他的域,在删除此IP/端口连接之前,请把这些域分配给其他IP/端口连接.';
|
||||
|
||||
@@ -32,7 +32,7 @@ fwrite($debugHandler, 'Cronfiles have been included' . "\n");
|
||||
* so users in the database don't conflict with system users
|
||||
*/
|
||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Checking system\'s last guid');
|
||||
checkLastGuid($settings['system']['lastguid']);
|
||||
checkLastGuid();
|
||||
|
||||
/*
|
||||
* shutdown cron
|
||||
|
||||
@@ -80,7 +80,7 @@ if($db->num_rows($result) > 0)
|
||||
|
||||
$path = $row['homedir'] . $row['maildir'] . "new/";
|
||||
|
||||
if(!is_dir($paht) || !is_readable($path))
|
||||
if(!is_dir($path) || !is_readable($path))
|
||||
{
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error accessing maildir: " . $path);
|
||||
continue;
|
||||
@@ -209,28 +209,25 @@ if($db->num_rows($result) > 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
//send mail with mailer class
|
||||
$mail->From = $to;
|
||||
$mail->FromName = $to;
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->SetFrom($to, $to);
|
||||
$mail->AddReplyTo($to, $to);
|
||||
$mail->Subject = $row['subject'];
|
||||
$mail->Body = html_entity_decode($message);
|
||||
$mail->AltBody = $message;
|
||||
$mail->MsgHTML(html_entity_decode($message));
|
||||
$mail->AddAddress($from, $from);
|
||||
$mail->AddCustomHeader('Precedence: bulk');
|
||||
|
||||
// set correct return path
|
||||
$mail->Sender = $to;
|
||||
|
||||
if(!$mail->Send())
|
||||
{
|
||||
if($mail->ErrorInfo != '')
|
||||
{
|
||||
$mailerr_msg = $mail->ErrorInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mailerr_msg = $from;
|
||||
$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_WARNING, "Error sending autoresponder mail: " . $mailerr_msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ class bind
|
||||
fclose($bindconf_file_handler);
|
||||
fwrite($this->debugHandler, ' cron_tasks: Task4 - froxlor_bind.conf written' . "\n");
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'froxlor_bind.conf written');
|
||||
safe_exec($this->settings['system']['bindreload_command']);
|
||||
safe_exec(escapeshellcmd($this->settings['system']['bindreload_command']));
|
||||
fwrite($this->debugHandler, ' cron_tasks: Task4 - Bind9 reloaded' . "\n");
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'Bind9 reloaded');
|
||||
$domains_dir = makeCorrectDir($this->settings['system']['bindconf_directory'] . '/domains/');
|
||||
@@ -149,10 +149,13 @@ class bind
|
||||
|
||||
while(false !== ($domain_filename = readdir($domain_file_dirhandle)))
|
||||
{
|
||||
$full_filename = makeCorrectFile($domains_dir . '/' . $domain_filename);
|
||||
|
||||
if($domain_filename != '.'
|
||||
&& $domain_filename != '..'
|
||||
&& !in_array($domain_filename, $known_filenames)
|
||||
&& file_exists(makeCorrectFile($domains_dir . '/' . $domain_filename)))
|
||||
&& is_file($full_filename)
|
||||
&& file_exists($full_filename))
|
||||
{
|
||||
fwrite($this->debugHandler, ' cron_tasks: Task4 - unlinking ' . $domain_filename . "\n");
|
||||
$this->logger->logAction(CRON_ACTION, LOG_WARNING, 'Deleting ' . $domain_filename);
|
||||
@@ -207,7 +210,14 @@ class bind
|
||||
|
||||
if(count($this->mxservers) == 0)
|
||||
{
|
||||
$zonefile.= '@ IN MX 10 mail' . "\n" . 'mail IN ' . $ip_a_record . "\n";
|
||||
$zonefile.= '@ IN MX 10 mail' . "\n";
|
||||
$zonefile.= 'mail IN ' . $ip_a_record . "\n";
|
||||
if($domain['iswildcarddomain'] != '1')
|
||||
{
|
||||
$zonefile.= 'imap IN ' . $ip_a_record . "\n";
|
||||
$zonefile.= 'smtp IN ' . $ip_a_record . "\n";
|
||||
$zonefile.= 'pop3 IN ' . $ip_a_record . "\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -226,12 +236,10 @@ class bind
|
||||
$zonefile.= $this->settings['spf']['spf_entry'] . "\n";
|
||||
}
|
||||
|
||||
if($this->settings['dkim']['use_dkim'] == '1'
|
||||
&& $domain['dkim'] == '1'
|
||||
&& $domain['dkim_pubkey'] != '')
|
||||
{
|
||||
$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";
|
||||
}
|
||||
/**
|
||||
* generate dkim-zone-entries
|
||||
*/
|
||||
$zonefile.= $this->generateDkim($domain);
|
||||
|
||||
$nssubdomains = $this->db->query('SELECT `domain` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `isbinddomain`=\'1\' AND `domain` LIKE \'%.' . $domain['domain'] . '\'');
|
||||
|
||||
@@ -273,6 +281,88 @@ class bind
|
||||
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()
|
||||
{
|
||||
if($this->settings['dkim']['use_dkim'] == '1')
|
||||
@@ -289,7 +379,7 @@ class bind
|
||||
|
||||
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');
|
||||
|
||||
if($domain['dkim_privkey'] == ''
|
||||
@@ -297,8 +387,8 @@ class bind
|
||||
{
|
||||
$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;
|
||||
$privkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.private');
|
||||
safe_exec('openssl genrsa -out ' . escapeshellarg($privkey_filename) . ' 1024');
|
||||
$privkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id']);
|
||||
safe_exec('openssl genrsa -out ' . escapeshellarg($privkey_filename) . ' ' . $this->settings['dkim']['dkim_keylength']);
|
||||
$domain['dkim_privkey'] = file_get_contents($privkey_filename);
|
||||
safe_exec("chmod 0640 " . escapeshellarg($privkey_filename));
|
||||
$pubkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.public');
|
||||
@@ -338,6 +428,10 @@ class bind
|
||||
$dkimkeys_file_handler = fopen($dkimkeys_filename, "w");
|
||||
fwrite($dkimkeys_file_handler, $dkimkeys);
|
||||
fclose($dkimkeys_file_handler);
|
||||
|
||||
safe_exec(escapeshellcmd($this->settings['dkim']['dkimrestart_command']));
|
||||
fwrite($this->debugHandler, ' cron_tasks: Task4 - Dkim-milter reloaded' . "\n");
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'Dkim-milter reloaded');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class apache
|
||||
{
|
||||
fwrite($this->debugHandler, ' apache::reload: reloading apache' . "\n");
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'reloading apache');
|
||||
safe_exec($this->settings['system']['apachereload_command']);
|
||||
safe_exec(escapeshellcmd($this->settings['system']['apachereload_command']));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -121,11 +121,32 @@ class apache
|
||||
{
|
||||
$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')
|
||||
{
|
||||
$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'] != '')
|
||||
{
|
||||
$this->virtualhosts_data[$vhosts_filename].= $row_ipsandports['specialsettings'] . "\n";
|
||||
@@ -318,20 +339,24 @@ class apache
|
||||
{
|
||||
if($domain['parentdomainid'] == '0')
|
||||
{
|
||||
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['domain']) . '"' . "\n";
|
||||
|
||||
if($this->settings['system']['awstats_enabled'] == '1')
|
||||
{
|
||||
$stats_text.= createAWStatsVhost($domain['domain'], $this->settings);
|
||||
$stats_text.= ' Alias /awstats "' . makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']) . '"' . "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['domain']) . '"' . "\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['parentdomain']) . '"' . "\n";
|
||||
|
||||
if($this->settings['system']['awstats_enabled'] == '1')
|
||||
{
|
||||
$stats_text.= createAWStatsVhost($domain['parentdomain'], $this->settings);
|
||||
$stats_text.= ' Alias /awstats "' . makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['parentdomain']) . '"' . "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['parentdomain']) . '"' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -339,12 +364,14 @@ class apache
|
||||
{
|
||||
if($domain['customerroot'] != $domain['documentroot'])
|
||||
{
|
||||
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer') . '"' . "\n";
|
||||
}
|
||||
|
||||
if($this->settings['system']['awstats_enabled'] == '1')
|
||||
{
|
||||
$stats_text.= createAWStatsVhost($domain['domain'], $this->settings);
|
||||
$stats_text.= ' Alias /awstats "' . makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']) . '"' . "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer') . '"' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,10 +414,14 @@ class apache
|
||||
{
|
||||
// The normal access/error - logging is enabled
|
||||
$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']);
|
||||
chgrp($error_log, $this->settings['system']['httpgroup']);
|
||||
|
||||
$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']);
|
||||
|
||||
@@ -401,10 +432,14 @@ class apache
|
||||
|
||||
if($this->settings['system']['awstats_enabled'] == '1')
|
||||
{
|
||||
// prepare the aliases for stats config files
|
||||
if((int)$domain['parentdomainid'] == 0)
|
||||
{
|
||||
// prepare the aliases and subdomains for stats config files
|
||||
|
||||
$server_alias = '';
|
||||
$alias_domains = $this->db->query('SELECT `domain`, `iswildcarddomain`, `wwwserveralias` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . $domain['id'] . '\'');
|
||||
$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)
|
||||
{
|
||||
@@ -443,9 +478,10 @@ class apache
|
||||
}
|
||||
}
|
||||
|
||||
// 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);
|
||||
// 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']);
|
||||
}
|
||||
}
|
||||
|
||||
return $logfiles_text;
|
||||
@@ -457,13 +493,22 @@ class apache
|
||||
|
||||
protected function getVhostFilename($domain, $ssl_vhost = false)
|
||||
{
|
||||
if($ssl_vhost === true)
|
||||
if((int)$domain['parentdomainid'] == 0)
|
||||
{
|
||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/20_froxlor_ssl_vhost_' . $domain['domain'] . '.conf');
|
||||
$vhost_no = '21';
|
||||
}
|
||||
else
|
||||
{
|
||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/20_froxlor_normal_vhost_' . $domain['domain'] . '.conf');
|
||||
$vhost_no = '20';
|
||||
}
|
||||
|
||||
if($ssl_vhost === true)
|
||||
{
|
||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/'.$vhost_no.'_froxlor_ssl_vhost_' . $domain['domain'] . '.conf');
|
||||
}
|
||||
else
|
||||
{
|
||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/'.$vhost_no.'_froxlor_normal_vhost_' . $domain['domain'] . '.conf');
|
||||
}
|
||||
|
||||
return $vhost_filename;
|
||||
@@ -559,7 +604,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->composePhpOptions($domain);
|
||||
$vhost_content.= $this->getStats($domain);
|
||||
@@ -591,7 +636,7 @@ class apache
|
||||
|
||||
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`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC");
|
||||
|
||||
while($domain = $this->db->fetch_array($result_domains))
|
||||
{
|
||||
@@ -914,7 +959,7 @@ class apache
|
||||
if($vhost_filename != '.'
|
||||
&& $vhost_filename != '..'
|
||||
&& !in_array($vhost_filename, $this->known_vhostfilenames)
|
||||
&& preg_match('/^(05|10|20|30)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
|
||||
&& preg_match('/^(05|10|20|21|30|50|51)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
|
||||
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
|
||||
{
|
||||
fwrite($this->debugHandler, ' apache::wipeOutOldVhostConfigs: unlinking ' . $vhost_filename . "\n");
|
||||
|
||||
@@ -62,13 +62,13 @@ class lighttpd
|
||||
public function reload()
|
||||
{
|
||||
fwrite($this->debugHandler, ' lighttpd::reload: reloading lighttpd' . "\n");
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'reloading apache');
|
||||
safe_exec($this->settings['system']['apachereload_command']);
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'reloading lighttpd');
|
||||
safe_exec(escapeshellcmd($this->settings['system']['apachereload_command']));
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
$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";
|
||||
@@ -101,14 +101,54 @@ class lighttpd
|
||||
$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')
|
||||
{
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.engine = "enable"' . "\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]))
|
||||
{
|
||||
// sort vhosts by number (subdomains first!)
|
||||
sort($vhosts);
|
||||
|
||||
foreach($vhosts as $vhost) {
|
||||
$this->lighttpd_data[$vhost_filename].= ' include "'.$vhost.'"'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
$this->lighttpd_data[$vhost_filename].= '}' . "\n";
|
||||
}
|
||||
}
|
||||
@@ -119,6 +159,7 @@ class lighttpd
|
||||
$htpasswd_query = "SELECT * FROM " . TABLE_PANEL_HTPASSWDS . " WHERE `path` LIKE '" . $domain['documentroot'] . "%'";
|
||||
$result_htpasswds = $this->db->query($htpasswd_query);
|
||||
|
||||
$htaccess_text = '';
|
||||
while($row_htpasswds = $this->db->fetch_array($result_htpasswds))
|
||||
{
|
||||
$row_htpasswds['path'] = makeCorrectDir($row_htpasswds['path']);
|
||||
@@ -145,6 +186,10 @@ class lighttpd
|
||||
$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']))
|
||||
{
|
||||
$this->needed_htpasswds[$filename].= $row_htpasswds['username'] . ':' . $row_htpasswds['password'] . "\n";
|
||||
@@ -156,7 +201,7 @@ class lighttpd
|
||||
$htaccess_text.= ' (' . "\n";
|
||||
$htaccess_text.= ' "method" => "basic",' . "\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";
|
||||
}
|
||||
}
|
||||
@@ -188,37 +233,72 @@ class lighttpd
|
||||
|
||||
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`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
||||
}
|
||||
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`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
||||
}
|
||||
|
||||
$included_vhosts = array();
|
||||
$result_domains = $this->db->query($query2);
|
||||
|
||||
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);
|
||||
|
||||
if((int)$domain['parentdomainid'] == 0)
|
||||
{
|
||||
$vhost_no = '51';
|
||||
}
|
||||
else
|
||||
{
|
||||
$vhost_no = '50';
|
||||
}
|
||||
|
||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'].'/vhosts/'.$vhost_no.'_'.$domain['domain'].'.conf');
|
||||
$included_vhosts[] = $_inc_path.'/vhosts/'.$vhost_no.'_'.$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'] . "'";
|
||||
$ipandport = $this->db->query_first($query);
|
||||
$domain['ip'] = $ipandport['ip'];
|
||||
$domain['port'] = $ipandport['port'];
|
||||
$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')
|
||||
{
|
||||
$ssl_vhost = true;
|
||||
$ips_and_ports_index = 'ssl_ipandport';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ssl_vhost = false;
|
||||
$ips_and_ports_index = 'ipandport';
|
||||
}
|
||||
|
||||
$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)
|
||||
@@ -253,18 +333,32 @@ class lighttpd
|
||||
$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->getWebroot($domain, $ssl_vhost);
|
||||
if ($domain['specialsettings'] != "") {
|
||||
$vhost_content.= $domain['specialsettings'] . "\n";
|
||||
|
||||
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'] != "") {
|
||||
$vhost_content.= $domain['specialsettings'] . "\n";
|
||||
}
|
||||
$vhost_content.= '}' . "\n";
|
||||
|
||||
return $vhost_content;
|
||||
}
|
||||
|
||||
@@ -272,6 +366,23 @@ class lighttpd
|
||||
{
|
||||
$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)
|
||||
{
|
||||
// We are using mod_log_sql (http://www.outoforder.cc/projects/apache/mod_log_sql/)
|
||||
@@ -280,32 +391,70 @@ class lighttpd
|
||||
else
|
||||
{
|
||||
// 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))
|
||||
{
|
||||
$ourFileHandle = fopen($filename, 'w') or die("can't open file");
|
||||
fclose($ourFileHandle);
|
||||
$logfiles_text.= ' accesslog.filename = "' . $access_log . '"' . "\n";
|
||||
}
|
||||
|
||||
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))
|
||||
if($this->settings['system']['awstats_enabled'] == '1')
|
||||
{
|
||||
$ourFileHandle = fopen($filename, 'w') or die("can't open file");
|
||||
fclose($ourFileHandle);
|
||||
if((int)$domain['parentdomainid'] == 0)
|
||||
{
|
||||
// prepare the aliases and subdomains for stats config files
|
||||
|
||||
$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.= '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$logfiles_text.= ' accesslog.filename = "' . $filename . '"' . "\n";
|
||||
if($domain['iswildcarddomain'] == '1')
|
||||
{
|
||||
$alias = '*.' . $domain['domain'];
|
||||
}
|
||||
else
|
||||
{
|
||||
if($domain['wwwserveralias'] == '1')
|
||||
{
|
||||
$alias = 'www.' . $domain['domain'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$alias = '';
|
||||
}
|
||||
}
|
||||
|
||||
chown($filename, $this->settings['system']['httpuser']);
|
||||
chgrp($filename, $this->settings['system']['httpgroup']);
|
||||
// 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']);
|
||||
}
|
||||
}
|
||||
|
||||
return $logfiles_text;
|
||||
@@ -323,27 +472,26 @@ class lighttpd
|
||||
{
|
||||
if(!empty($row['error404path']))
|
||||
{
|
||||
$error_string.= ' server.error-handler-404 = "' . makeCorrectFile($row['documentroot'] . '/' . $row['error404path']) . '"' . "\n";
|
||||
$error_string.= ' server.error-handler-404 = "' . makeCorrectFile($domain['documentroot'] . '/' . $row['error404path']) . '"' . "\n\n";
|
||||
}
|
||||
|
||||
if($row['options_indexes'] != '0')
|
||||
{
|
||||
$path = makeCorrectDir(substr($row['path'], strlen($domain['documentroot']) - 1));
|
||||
|
||||
mkDirWithCorrectOwnership($domain['documentroot'], $row['path'], $domain['guid'], $domain['guid']);
|
||||
|
||||
// We need to remove the last slash, otherwise the regex wouldn't work
|
||||
|
||||
$path = substr($path, 0, -1);
|
||||
$path_options.= '$HTTP["url"] =~ "^' . $path . '($|/)" {' . "\n";
|
||||
$path_options.= "\t" . 'dir-listing.activate = "enable"' . "\n";
|
||||
if(!empty($error_string))
|
||||
{
|
||||
$path_options.= $error_string;
|
||||
// reset $error_string here to prevent duplicate entries
|
||||
$error_string = '';
|
||||
}
|
||||
$path_options.= '}' . "\n";
|
||||
|
||||
$path = makeCorrectDir(substr($row['path'], strlen($domain['documentroot']) - 1));
|
||||
mkDirWithCorrectOwnership($domain['documentroot'], $row['path'], $domain['guid'], $domain['guid']);
|
||||
|
||||
// We need to remove the last slash, otherwise the regex wouldn't work
|
||||
$path = substr($path, 0, -1);
|
||||
$path_options.= ' $HTTP["url"] =~ "^' . $path . '($|/)" {' . "\n";
|
||||
$path_options.= "\t" . 'dir-listing.activate = "enable"' . "\n";
|
||||
$path_options.= ' }' . "\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -356,7 +504,7 @@ class lighttpd
|
||||
|
||||
protected function getDirOptions($domain)
|
||||
{
|
||||
$query = "SELECT * FROM " . TABLE_PANEL_HTPASSWDS . " WHERE `customerid`='" . $domain[customerid] . "'";
|
||||
$query = "SELECT * FROM " . TABLE_PANEL_HTPASSWDS . " WHERE `customerid`='" . $domain['customerid'] . "'";
|
||||
$result = $this->db->query($query);
|
||||
|
||||
while($row_htpasswds = $this->db->fetch_array($result))
|
||||
@@ -527,6 +675,60 @@ class lighttpd
|
||||
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()
|
||||
{
|
||||
fwrite($this->debugHandler, ' lighttpd::writeConfigs: rebuilding ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
||||
@@ -535,6 +737,7 @@ class lighttpd
|
||||
if(!isConfigDir($this->settings['system']['apacheconf_vhost']))
|
||||
{
|
||||
// Save one big file
|
||||
$vhosts_file = '';
|
||||
|
||||
foreach($this->lighttpd_data as $vhosts_filename => $vhost_content)
|
||||
{
|
||||
@@ -615,7 +818,7 @@ class lighttpd
|
||||
if($vhost_filename != '.'
|
||||
&& $vhost_filename != '..'
|
||||
&& !in_array($vhost_filename, $this->known_filenames)
|
||||
&& preg_match('/^(05|10|20|30)_(froxlor|syscp)_ipandport_(.+)\.conf$/', $vhost_filename)
|
||||
&& preg_match('/^(05|10|20|21|30|50|51)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
|
||||
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
|
||||
{
|
||||
fwrite($this->debugHandler, ' lighttpd::wipeOutOldConfigs: unlinking ' . $vhost_filename . "\n");
|
||||
|
||||
@@ -109,10 +109,10 @@ class lighttpd_fcgid extends lighttpd
|
||||
|
||||
$php_options_text.= "\t\t".')'."\n";
|
||||
$php_options_text.= "\t".')'."\n";
|
||||
$php_options_text.= "".')'."\n";
|
||||
$php_options_text.= "\t".')'."\n";
|
||||
|
||||
} // foreach extension
|
||||
$php_options_text.= "".')'."\n";
|
||||
$php_options_text.= ' )'."\n";
|
||||
|
||||
// create starter
|
||||
|
||||
|
||||
@@ -54,17 +54,39 @@ while($row = $db->fetch_array($result_tasks))
|
||||
if ($settings['system']['awstats_enabled'] == '1')
|
||||
{
|
||||
$awstatsclean['header'] = "## GENERATED BY FROXLOR\n";
|
||||
$awstatsclean['headerold'] = "## GENERATED BY SYSCP\n";
|
||||
$awstatsclean['path'] = '/etc/awstats';
|
||||
|
||||
/**
|
||||
* dont do anyting if the directory not exists
|
||||
* (e.g. awstats not installed yet or whatever)
|
||||
* fixes #45
|
||||
*/
|
||||
if (is_dir($awstatsclean['path']))
|
||||
{
|
||||
$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']) {
|
||||
if($awstatsclean['headerRead'] == $awstatsclean['header'] || $awstatsclean['headerRead'] ==
|
||||
$awstatsclean['headerold']) {
|
||||
$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);
|
||||
}
|
||||
//end dhr
|
||||
@@ -121,35 +143,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'));
|
||||
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']));
|
||||
safe_exec('mkdir -p ' . escapeshellarg($settings['system']['vmail_homedir'] . $row['data']['loginname']));
|
||||
|
||||
//check if admin of customer has added template for new customer directories
|
||||
|
||||
$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']) . "'");
|
||||
|
||||
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'] . '/'));
|
||||
}
|
||||
$destdir = makeCorrectDir($settings['system']['documentroot_prefix'] . '/' . $row['data']['loginname']);
|
||||
storeDefaultIndex($row['data']['loginname'], $destdir, $cronlog, true);
|
||||
|
||||
$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']));
|
||||
@@ -166,7 +167,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')
|
||||
{
|
||||
|
||||
@@ -17,6 +17,133 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
function awstatsDoSingleDomain($domain, $outputdir)
|
||||
{
|
||||
global $cronlog, $settings;
|
||||
$returnval = 0;
|
||||
|
||||
$domainconfig = makeCorrectFile($settings['system']['awstats_conf'].'/awstats.' . $domain . '.conf');
|
||||
if(file_exists($domainconfig))
|
||||
{
|
||||
$outputdir = makeCorrectDir($outputdir . '/' . $domain);
|
||||
|
||||
if(!is_dir($outputdir))
|
||||
{
|
||||
safe_exec('mkdir -p ' . escapeshellarg($outputdir));
|
||||
}
|
||||
|
||||
/**
|
||||
* check for correct path of awstats_buildstaticpages.pl
|
||||
*/
|
||||
$awbsp = makeCorrectFile($settings['system']['awstats_path'].'/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. Please check your AWStats-Path setting";
|
||||
$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. Please check your AWStats-Path setting");
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* as of #124, awstats traffic is saved in bytes instead
|
||||
* of kilobytes (like webalizer does)
|
||||
*/
|
||||
$returnval = floatval($returnval / 1024);
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
@@ -29,7 +156,7 @@
|
||||
|
||||
function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlist)
|
||||
{
|
||||
global $settings;
|
||||
global $settings, $cronlog;
|
||||
$returnval = 0;
|
||||
|
||||
if(file_exists($settings['system']['logfiles_directory'] . $logfile . '-access.log'))
|
||||
@@ -37,6 +164,7 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
|
||||
$domainargs = '';
|
||||
foreach($usersdomainlist as $domainid => $domain)
|
||||
{
|
||||
// hide referer
|
||||
$domainargs.= ' -r ' . escapeshellarg($domain);
|
||||
}
|
||||
|
||||
@@ -69,7 +197,16 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
|
||||
$verbosity = '-Q';
|
||||
}
|
||||
|
||||
safe_exec('webalizer ' . $verbosity . ' -p -o ' . escapeshellarg($outputdir) . ' -n ' . escapeshellarg($caption) . $domainargs . ' ' . escapeshellarg($settings['system']['logfiles_directory'] . $logfile . '-access.log'));
|
||||
$we = '/usr/bin/webalizer';
|
||||
|
||||
// FreeBSD uses other paths, #140
|
||||
if(!file_exists($we))
|
||||
{
|
||||
$we = '/usr/local/bin/webalizer';
|
||||
}
|
||||
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Running webalizer for domain '".$caption."'");
|
||||
safe_exec($we . ' ' . $verbosity . ' -p -o ' . escapeshellarg($outputdir) . ' -n ' . escapeshellarg($caption) . $domainargs . ' ' . escapeshellarg($settings['system']['logfiles_directory'] . $logfile . '-access.log'));
|
||||
|
||||
/**
|
||||
* Format of webalizer.hist-files:
|
||||
@@ -80,6 +217,7 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
|
||||
|
||||
$httptraffic = array();
|
||||
$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);
|
||||
foreach($webalizer_hist_rows as $webalizer_hist_row)
|
||||
{
|
||||
@@ -108,6 +246,7 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
|
||||
reset($httptraffic);
|
||||
$httptrafficlast = array();
|
||||
$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);
|
||||
foreach($webalizer_lasthist_rows as $webalizer_lasthist_row)
|
||||
{
|
||||
@@ -229,4 +368,3 @@ function safeSQLLogfile($domains, $loginname)
|
||||
$db->query("DELETE FROM access_log " . $where);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -165,9 +165,16 @@ while($row = $db->fetch_array($result))
|
||||
unset($domainlist[$row['customerid']][$domainid]);
|
||||
}
|
||||
|
||||
if($settings['system']['awstats_enabled'] == '1')
|
||||
{
|
||||
$httptraffic+= floatval(callAwstatsGetTraffic($domain, $row['documentroot'] . '/awstats/', $domain, $domainlist[$row['customerid']]));
|
||||
}
|
||||
else
|
||||
{
|
||||
$httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'] . '-' . $domain, $row['documentroot'] . '/webalizer/' . $domain . '/', $domain, $domainlist[$row['customerid']]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
reset($domainlist[$row['customerid']]);
|
||||
|
||||
@@ -176,8 +183,15 @@ while($row = $db->fetch_array($result))
|
||||
safeSQLLogfile($domainlist[$row['customerid']], $row['loginname']);
|
||||
}
|
||||
|
||||
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']]));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Webalizer might run for some time, so we'd better check if our database is still present
|
||||
|
||||
@@ -26,7 +26,7 @@ $yesterday = time() - (60 * 60 * 24);
|
||||
|
||||
require (dirname(__FILE__) . '/../lib/class.phpmailer.php');
|
||||
$mail = new PHPMailer();
|
||||
$mail->From = $settings['panel']['adminmail'];
|
||||
$mail->SetFrom($settings['panel']['adminmail'], 'Froxlor Administrator');
|
||||
|
||||
// Warn the customers at 90% traffic-usage
|
||||
|
||||
@@ -82,15 +82,26 @@ while($row = $db->fetch_array($result))
|
||||
AND `templategroup`='mails'
|
||||
AND `varname`='trafficninetypercent_mailbody'");
|
||||
$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"]);
|
||||
}
|
||||
|
||||
@@ -150,15 +161,25 @@ while($row = $db->fetch_array($result))
|
||||
AND `templategroup`='mails'
|
||||
AND `varname`='trafficninetypercent_mailbody'");
|
||||
$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())
|
||||
{
|
||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mail->ErrorInfo);
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$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"]);
|
||||
}
|
||||
|
||||
@@ -189,15 +210,25 @@ while($row = $db->fetch_array($result))
|
||||
|
||||
$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->From = $row['email'];
|
||||
$mail->FromName = $row['name'];
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->Body = $mail_body;
|
||||
$mail->AddAddress($row['email'], $row['name']);
|
||||
|
||||
if(!$mail->Send())
|
||||
{
|
||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mail->ErrorInfo);
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$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"]);
|
||||
}
|
||||
|
||||
|
||||
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"/>
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left" colspan="4"><b><img src="images/title.gif" alt="" /> {$lng['admin']['cron']['cronsettings']}</b></td>
|
||||
<td class="maintitle_search_right" colspan="2">{$searchcode}</td>
|
||||
<td class="maintitle"><b><img src="images/title.gif" alt="" /> {$lng['admin']['warning']}</b></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>
|
||||
<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']['interval']} {$arrowcode['c.interval']}</td>
|
||||
<td class="field_display">{$lng['cron']['isactive']} {$arrowcode['c.isactive']}</td>
|
||||
<td class="field_display_search" colspan="2">{$sortcode}</td>
|
||||
<td class="field_display">{$lng['cron']['lastrun']}</td>
|
||||
<td class="field_display">{$lng['cron']['interval']}</td>
|
||||
<td class="field_display">{$lng['cron']['isactive']}</td>
|
||||
<td class="field_display">{$lng['panel']['options']}</td>
|
||||
</tr>
|
||||
$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>
|
||||
</form>
|
||||
<br />
|
||||
|
||||
@@ -4,5 +4,4 @@
|
||||
<td class="field_name">{$row['interval']}</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"><if $vendor != 'froxlor'><a href="$filename?s=$s&page=$page&action=delete&id={$row['id']}">{$lng['panel']['delete']}</a></if></td>
|
||||
</tr>
|
||||
|
||||
@@ -22,7 +22,7 @@ $header
|
||||
<td class="field_display">{$lng['customer']['mysqls']}<br />{$lng['customer']['ftps']}</td>
|
||||
<td class="field_display">{$lng['customer']['emails']}<br />{$lng['customer']['subdomains']}</td>
|
||||
<td class="field_display">{$lng['customer']['accounts']}<br />{$lng['customer']['forwarders']}</td>
|
||||
<td class="field_display">{$lng['admin']['deactivated']}</td>
|
||||
<td class="field_display">{$lng['admin']['deactivated']}<br />{$lng['admin']['lastlogin_succ']}</td>
|
||||
<td class="field_display_search">{$sortcode}</td>
|
||||
</tr>
|
||||
$customers
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user