Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b8b973926 | ||
|
|
f77ddac4ed | ||
|
|
932e1f95c5 | ||
|
|
a8b52d50af | ||
|
|
f10f63b6be | ||
|
|
c5cdd9f567 | ||
|
|
e5b2fd90c0 | ||
|
|
f7b43f470f | ||
|
|
515e542179 | ||
|
|
cc4637095d | ||
|
|
bffa8817d9 | ||
|
|
98b82ed0c6 | ||
|
|
4f52982a7e | ||
|
|
1edba0c368 | ||
|
|
06983ca382 | ||
|
|
c53ef5b96e | ||
|
|
a2b7f98332 | ||
|
|
c25ad76200 | ||
|
|
7057984534 | ||
|
|
02a4fd4e1d |
@@ -64,7 +64,7 @@ return array(
|
|||||||
'type' => 'option',
|
'type' => 'option',
|
||||||
'default' => 'Manual',
|
'default' => 'Manual',
|
||||||
'option_mode' => 'one',
|
'option_mode' => 'one',
|
||||||
'option_options' => array('Manual' => 'Manual', 'Dropdown' => 'Dropdown'),
|
'option_options' => array('Manual' => $lng['serversettings']['manual'], 'Dropdown' => $lng['serversettings']['dropdown']),
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'panel_adminmail' => array(
|
'panel_adminmail' => array(
|
||||||
|
|||||||
@@ -113,6 +113,35 @@ return array(
|
|||||||
'type' => 'hidden',
|
'type' => 'hidden',
|
||||||
'default' => 'www-data',
|
'default' => 'www-data',
|
||||||
),
|
),
|
||||||
|
'system_report_enable' => array(
|
||||||
|
'label' => $lng['serversettings']['report']['report'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'report_enable',
|
||||||
|
'type' => 'bool',
|
||||||
|
'default' => true,
|
||||||
|
'cronmodule' => 'froxlor/reports',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_report_webmax' => array(
|
||||||
|
'label' => $lng['serversettings']['report']['webmax'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'report_webmax',
|
||||||
|
'type' => 'int',
|
||||||
|
'int_min' => 1,
|
||||||
|
'int_max' => 99,
|
||||||
|
'default' => 90,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'system_report_trafficmax' => array(
|
||||||
|
'label' => $lng['serversettings']['report']['trafficmax'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'report_trafficmax',
|
||||||
|
'type' => 'int',
|
||||||
|
'int_min' => 1,
|
||||||
|
'int_max' => 99,
|
||||||
|
'default' => 90,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
'system_debug_cron' => array(
|
'system_debug_cron' => array(
|
||||||
'label' => $lng['serversettings']['cron']['debug'],
|
'label' => $lng['serversettings']['cron']['debug'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
|
|||||||
@@ -75,6 +75,10 @@ if(($page == 'settings' || $page == 'overview')
|
|||||||
$only_enabledisable
|
$only_enabledisable
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
|
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
|
||||||
|
inserttask('1');
|
||||||
|
inserttask('4');
|
||||||
|
inserttask('5');
|
||||||
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
|
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ elseif(isset($_GET['id']))
|
|||||||
$available_templates = array(
|
$available_templates = array(
|
||||||
'createcustomer',
|
'createcustomer',
|
||||||
'pop_success',
|
'pop_success',
|
||||||
'trafficninetypercent',
|
'trafficmaxpercent',
|
||||||
|
'diskmaxpercent',
|
||||||
'new_ticket_by_customer',
|
'new_ticket_by_customer',
|
||||||
'new_ticket_for_customer',
|
'new_ticket_for_customer',
|
||||||
'new_ticket_by_staff',
|
'new_ticket_by_staff',
|
||||||
|
|||||||
@@ -250,13 +250,24 @@ elseif($page == 'accounts')
|
|||||||
|
|
||||||
if($settings['customer']['ftpatdomain'] == '1')
|
if($settings['customer']['ftpatdomain'] == '1')
|
||||||
{
|
{
|
||||||
|
$domainlist = array();
|
||||||
$domains = '';
|
$domains = '';
|
||||||
|
|
||||||
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
|
|
||||||
while($row_domain = $db->fetch_array($result_domains))
|
while($row_domain = $db->fetch_array($result_domains))
|
||||||
{
|
{
|
||||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
|
$domainlist[] = $row_domain['domain'];
|
||||||
|
}
|
||||||
|
|
||||||
|
sort($domainlist);
|
||||||
|
|
||||||
|
if(isset($domainlist[0]) && $domainlist[0] != '')
|
||||||
|
{
|
||||||
|
foreach($domainlist as $dom)
|
||||||
|
{
|
||||||
|
$domains .= makeoption($idna_convert->decode($dom), $dom);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ elseif($page == 'mysqls')
|
|||||||
elseif($action == 'delete'
|
elseif($action == 'delete'
|
||||||
&& $id != 0)
|
&& $id != 0)
|
||||||
{
|
{
|
||||||
$result = $db->query_first('SELECT `id`, `databasename`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
|
$result = $db->query_first('SELECT `id`, `databasename`, `description`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
|
||||||
|
|
||||||
if(isset($result['databasename'])
|
if(isset($result['databasename'])
|
||||||
&& $result['databasename'] != '')
|
&& $result['databasename'] != '')
|
||||||
@@ -127,7 +127,7 @@ elseif($page == 'mysqls')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$dbnamedesc = $result['databasename'];
|
$dbnamedesc = $result['databasename'];
|
||||||
if($result['description'] != '') {
|
if(isset($result['description']) && $result['description'] != '') {
|
||||||
$dbnamedesc.= ' ('.$result['description'].')';
|
$dbnamedesc.= ' ('.$result['description'].')';
|
||||||
}
|
}
|
||||||
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $dbnamedesc);
|
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $dbnamedesc);
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.16');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.17');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
||||||
@@ -611,6 +611,9 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (170, 'phpfpm', 'enabled_ownvhost', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (170, 'phpfpm', 'enabled_ownvhost', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (171, 'phpfpm', 'vhost_httpuser', 'froxlorlocal');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (171, 'phpfpm', 'vhost_httpuser', 'froxlorlocal');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (172, 'phpfpm', 'vhost_httpgroup', 'froxlorlocal');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (172, 'phpfpm', 'vhost_httpgroup', 'froxlorlocal');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (173, 'system', 'report_enable', '1');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (174, 'system', 'report_webmax', '90');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (175, 'system', 'report_trafficmax', '90');
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
@@ -1019,6 +1022,7 @@ INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`,
|
|||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (5, 'froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (5, 'froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (6, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 DAY', '1', 'cron_ticketsreset');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (6, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 DAY', '1', 'cron_ticketsreset');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (7, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '1', 'cron_ticketarchive');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (7, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '1', 'cron_ticketarchive');
|
||||||
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (8, 'froxlor/reports', 'cron_usage_report.php', '1 DAY', '1', 'cron_usage_report');
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
@@ -1101,3 +1105,30 @@ CREATE TABLE IF NOT EXISTS `domain_redirect_codes` (
|
|||||||
`did` int(11) unsigned NOT NULL,
|
`did` int(11) unsigned NOT NULL,
|
||||||
UNIQUE KEY `rc` (`rid`, `did`)
|
UNIQUE KEY `rc` (`rid`, `did`)
|
||||||
) ENGINE=MyISAM;
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Tabellenstruktur fuer Tabelle `ipsandports_docrootsettings`
|
||||||
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `ipsandports_docrootsettings`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `ipsandports_docrootsettings` (
|
||||||
|
`id` int(5) NOT NULL auto_increment,
|
||||||
|
`fid` int(11) NOT NULL,
|
||||||
|
`docrootsettings` text NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Tabellenstruktur fuer Tabelle `domain_docrootsettings`
|
||||||
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `domain_docrootsettings`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `domain_docrootsettings` (
|
||||||
|
`id` int(5) NOT NULL auto_increment,
|
||||||
|
`fid` int(11) NOT NULL,
|
||||||
|
`docrootsettings` text NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ if(isFroxlorVersion('0.9-r1'))
|
|||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('spf', 'spf_entry', '@ IN TXT \"v=spf1 a mx -all\"');");
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('spf', 'spf_entry', '@ IN TXT \"v=spf1 a mx -all\"');");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'froxlor_graphic' WHERE `varname` = 'syscp_graphic'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'froxlor_graphic' WHERE `varname` = 'syscp_graphic'");
|
||||||
if(isset($settings['admin']['syscp_graphic'])
|
if(isset($settings['admin']['syscp_graphic'])
|
||||||
&& $settings['admin']['syscp_graphic'] != ''
|
&& $settings['admin']['syscp_graphic'] != ''
|
||||||
){
|
){
|
||||||
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
|
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
|
||||||
}
|
}
|
||||||
@@ -305,8 +305,8 @@ if(isFroxlorVersion('0.9.1'))
|
|||||||
$result = $db->query_first("SELECT MAX(`guid`) as `latestguid` FROM `".TABLE_PANEL_CUSTOMERS."`");
|
$result = $db->query_first("SELECT MAX(`guid`) as `latestguid` FROM `".TABLE_PANEL_CUSTOMERS."`");
|
||||||
|
|
||||||
if (isset($result['latestguid'])
|
if (isset($result['latestguid'])
|
||||||
&& (int)$result['latestguid'] > 0
|
&& (int)$result['latestguid'] > 0
|
||||||
&& $result['latestguid'] != $settings['system']['lastguid']
|
&& $result['latestguid'] != $settings['system']['lastguid']
|
||||||
) {
|
) {
|
||||||
checkLastGuid();
|
checkLastGuid();
|
||||||
lastStepStatus(1, 'fixed');
|
lastStepStatus(1, 'fixed');
|
||||||
@@ -411,7 +411,7 @@ if(isFroxlorVersion('0.9.4'))
|
|||||||
* To not confuse Froxlor, we just update old settings.
|
* To not confuse Froxlor, we just update old settings.
|
||||||
*/
|
*/
|
||||||
if(isset($settings['system']['awstats_path'])
|
if(isset($settings['system']['awstats_path'])
|
||||||
&& $settings['system']['awstats_path'] != ''
|
&& $settings['system']['awstats_path'] != ''
|
||||||
) {
|
) {
|
||||||
showUpdateStep("Updating awstats path setting");
|
showUpdateStep("Updating awstats path setting");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/usr/bin/' WHERE `settinggroup` = 'system' AND `varname` = 'awstats_path';");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/usr/bin/' WHERE `settinggroup` = 'system' AND `varname` = 'awstats_path';");
|
||||||
@@ -425,7 +425,7 @@ if(isFroxlorVersion('0.9.4'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(isset($settings['system']['awstats_domain_file'])
|
if(isset($settings['system']['awstats_domain_file'])
|
||||||
&& $settings['system']['awstats_domain_file'] != ''
|
&& $settings['system']['awstats_domain_file'] != ''
|
||||||
) {
|
) {
|
||||||
showUpdateStep("Updating awstats configuration path setting");
|
showUpdateStep("Updating awstats configuration path setting");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'awstats_conf' WHERE `varname` = 'awstats_domain_file';");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'awstats_conf' WHERE `varname` = 'awstats_domain_file';");
|
||||||
@@ -543,28 +543,28 @@ if(isFroxlorVersion('0.9.6-svn2'))
|
|||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'enabled', '1');");
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'enabled', '1');");
|
||||||
|
|
||||||
if(isset($_POST['update_deferr_500'])
|
if(isset($_POST['update_deferr_500'])
|
||||||
&& trim($_POST['update_deferr_500']) != ''
|
&& trim($_POST['update_deferr_500']) != ''
|
||||||
) {
|
) {
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_500'])."');");
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_500'])."');");
|
||||||
$err500 = true;
|
$err500 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['update_deferr_401'])
|
if(isset($_POST['update_deferr_401'])
|
||||||
&& trim($_POST['update_deferr_401']) != ''
|
&& trim($_POST['update_deferr_401']) != ''
|
||||||
) {
|
) {
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err401', '".$db->escape($_POST['update_deferr_401'])."');");
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err401', '".$db->escape($_POST['update_deferr_401'])."');");
|
||||||
$err401 = true;
|
$err401 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['update_deferr_403'])
|
if(isset($_POST['update_deferr_403'])
|
||||||
&& trim($_POST['update_deferr_403']) != ''
|
&& trim($_POST['update_deferr_403']) != ''
|
||||||
) {
|
) {
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err403', '".$db->escape($_POST['update_deferr_403'])."');");
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err403', '".$db->escape($_POST['update_deferr_403'])."');");
|
||||||
$err403 = true;
|
$err403 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['update_deferr_404'])
|
if(isset($_POST['update_deferr_404'])
|
||||||
&& trim($_POST['update_deferr_404']) != ''
|
&& trim($_POST['update_deferr_404']) != ''
|
||||||
) {
|
) {
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '".$db->escape($_POST['update_deferr_404'])."');");
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '".$db->escape($_POST['update_deferr_404'])."');");
|
||||||
$err404 = true;
|
$err404 = true;
|
||||||
@@ -1348,8 +1348,74 @@ if(isFroxlorVersion('0.9.16-svn1'))
|
|||||||
|
|
||||||
if(isFroxlorVersion('0.9.16-svn2'))
|
if(isFroxlorVersion('0.9.16-svn2'))
|
||||||
{
|
{
|
||||||
showUpdateStep("Updating from 0.9.16-svn2 to 0.9.16 final");
|
showUpdateStep("Updating from 0.9.16-svn2 to 0.9.16 final");
|
||||||
lastStepStatus(0);
|
lastStepStatus(0);
|
||||||
|
|
||||||
updateToVersion('0.9.16');
|
updateToVersion('0.9.16');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.16'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.16 to 0.9.17-svn1", false);
|
||||||
|
|
||||||
|
$update_system_report_enable = isset($_POST['update_system_report_enable']) ? (int)$_POST['update_system_report_enable'] : '1';
|
||||||
|
$update_system_report_webmax = isset($_POST['update_system_report_webmax']) ? (int)$_POST['update_system_report_webmax'] : '90';
|
||||||
|
$update_system_report_trafficmax = isset($_POST['update_system_report_trafficmax']) ? (int)$_POST['update_system_report_trafficmax'] : '90';
|
||||||
|
|
||||||
|
showUpdateStep("Adding new settings for web- and traffic-reporting");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'report_enable', '".(int)$update_system_report_enable."');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'report_webmax', '".(int)$update_system_report_webmax."');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'report_trafficmax', '".(int)$update_system_report_trafficmax."');");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
showUpdateStep("Adding new cron-module for web- and traffic-reporting");
|
||||||
|
$clastrun = mktime(6, 0, 0, date('m'), date('d') - 1, date('Y'));
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_CRONRUNS . "` SET `module`='froxlor/reports', `cronfile`='cron_usage_report.php', `lastrun`='".(int)$clastrun."', `interval`='1 DAY', `isactive`='".(int)$update_system_report_enable."', `desc_lng_key`='cron_usage_report';");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
showUpdateStep("Updating various database-fields");
|
||||||
|
$db->query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup`='system' AND `varname`='last_traffic_report_run';");
|
||||||
|
$check = $db->query_first("SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `varname`='trafficninetypercent_subject';");
|
||||||
|
if(isset($check['varname']) && $check['varname'] == 'trafficninetypercent_subject')
|
||||||
|
{
|
||||||
|
$db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `varname` = 'trafficmaxpercent_subject' WHERE `varname`='trafficninetypercent_subject';");
|
||||||
|
}
|
||||||
|
$check = $db->query_first("SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `varname`='trafficninetypercent_mailbody';");
|
||||||
|
if(isset($check['varname']) && $check['varname'] == 'trafficninetypercent_mailbody')
|
||||||
|
{
|
||||||
|
$db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `varname` = 'trafficmaxpercent_mailbody' WHERE `varname`='trafficninetypercent_mailbody';");
|
||||||
|
}
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.17-svn1');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.17-svn1'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.17-svn1 to 0.9.17-svn2", false);
|
||||||
|
|
||||||
|
showUpdateStep("Adding new tables to database");
|
||||||
|
$db->query("CREATE TABLE IF NOT EXISTS `ipsandports_docrootsettings` (
|
||||||
|
`id` int(5) NOT NULL auto_increment,
|
||||||
|
`fid` int(11) NOT NULL,
|
||||||
|
`docrootsettings` text NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;");
|
||||||
|
$db->query("CREATE TABLE IF NOT EXISTS `domain_docrootsettings` (
|
||||||
|
`id` int(5) NOT NULL auto_increment,
|
||||||
|
`fid` int(11) NOT NULL,
|
||||||
|
`docrootsettings` text NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.17-svn2');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.17-svn2'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.17-svn2 to 0.9.17 final");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.17');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -401,4 +401,18 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
|||||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(versionInUpdate($current_version, '0.9.17-svn1'))
|
||||||
|
{
|
||||||
|
$has_preconfig = true;
|
||||||
|
$description = 'Select if you want to enable the web- and traffic-reports';
|
||||||
|
$question = '<strong>Enable?:</strong> ';
|
||||||
|
$question.= makeyesno('update_system_report_enable', '1', '0', '1').'<br /><br />';
|
||||||
|
$question.= '<strong>If \'yes\', please specify a percentage value for web- and traffic when reports are to be sent:</strong><br /><br />';
|
||||||
|
$question.= 'Webusage warning level: ';
|
||||||
|
$question.= '<input type="text" class="text" name="update_system_report_webmax" value="90" /><br /><br />';
|
||||||
|
$question.= 'Traffic warning level: ';
|
||||||
|
$question.= '<input type="text" class="text" name="update_system_report_trafficmax" value="90" /><br />';
|
||||||
|
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
198
lib/classes/domains/class.docrootsettings.php
Normal file
198
lib/classes/domains/class.docrootsettings.php
Normal file
@@ -0,0 +1,198 @@
|
|||||||
|
<?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 Michael Kaufmann <mkaufmann@nutime.de>
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Classes
|
||||||
|
* @version $Id$
|
||||||
|
* @link http://www.nutime.de/
|
||||||
|
* @since 0.9.17-svn2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
class docrootsettings
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Database handler
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
|
private $_db = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings array
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
private $_settings = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* main constructor
|
||||||
|
*/
|
||||||
|
public function __construct($db, $settings)
|
||||||
|
{
|
||||||
|
$this->_db = $db;
|
||||||
|
$this->_settings = $settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this function lets you add docroot-settings for a given domain (by ID)
|
||||||
|
*
|
||||||
|
* @param int $domainid id of the domain to add the settings for
|
||||||
|
* @param string $ssettings docrootsettings to add for the domain
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function addDomainDocrootsettings($domainid = 0, $ssettings = '')
|
||||||
|
{
|
||||||
|
return $this->_addDocrootSetting(TABLE_PANEL_DOMDOCROOTSETTINGS, $domainid, $ssettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this function lets you update docroot-settings for a given domain (by ID)
|
||||||
|
*
|
||||||
|
* @param int $domainid id of the domain to update the settings from
|
||||||
|
* @param string $ssettings docrootsettings to update for the domain
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function updateDomainDocrootsettings($domainid = 0, $ssettings = '')
|
||||||
|
{
|
||||||
|
return $this->_updateDocrootSetting(TABLE_PANEL_DOMDOCROOTSETTINGS, $domainid, $ssettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this function lets you add docroot-settings for a given ip/port combo (by ID)
|
||||||
|
*
|
||||||
|
* @param int $ipandportid id of the domain to add the settings for
|
||||||
|
* @param string $ssettings docrootsettings to add for the domain
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function addIpsAndPortsDocrootsettings($ipandportid = 0, $ssettings = '')
|
||||||
|
{
|
||||||
|
return $this->_addDocrootSetting(TABLE_PANEL_IPDOCROOTSETTINGS, $ipandportid, $ssettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this function lets you update docroot-settings for a given ip/port combo (by ID)
|
||||||
|
*
|
||||||
|
* @param int $ipandportid id of the domain to update the settings from
|
||||||
|
* @param string $ssettings docrootsettings to update for the domain
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function updateIpsAndPortsDocrootsettings($ipandportid = 0, $ssettings = '')
|
||||||
|
{
|
||||||
|
return $this->_updateDocrootSetting(TABLE_PANEL_IPDOCROOTSETTINGS, $ipandportid, $ssettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the docroot-setting
|
||||||
|
* for a given domain (by ID)
|
||||||
|
*
|
||||||
|
* @param int $domainid the id of the domain
|
||||||
|
*
|
||||||
|
* @return string the settings or empty if not set
|
||||||
|
*/
|
||||||
|
public function getDomainDocrootsettings($domainid = 0)
|
||||||
|
{
|
||||||
|
return $this->_getDocrootSettingById(TABLE_PANEL_DOMDOCROOTSETTINGS, $domainid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the docroot-setting
|
||||||
|
* for a given ip/port combination (by ID)
|
||||||
|
*
|
||||||
|
* @param int $ipandportid the id of the ip/port combo
|
||||||
|
*
|
||||||
|
* @return string the settings or empty if not set
|
||||||
|
*/
|
||||||
|
public function getIpsAndPortsDocrootsettings($ipandportid = 0)
|
||||||
|
{
|
||||||
|
return $this->_getDocrootSettingById(TABLE_PANEL_IPDOCROOTSETTINGS, $ipandportid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this function is called by addDomainDocrootsettings() and
|
||||||
|
* addIpsAndPortsDocrootsettings() to add docroot settings for an object
|
||||||
|
*
|
||||||
|
* @param string $table table to add the settings to
|
||||||
|
* @param int $fid foreign id / object id
|
||||||
|
* @param string $ssettings docroot-settings
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
private function _addDocrootSetting($table, $fid, $ssettings)
|
||||||
|
{
|
||||||
|
$query = "INSERT INTO `".$table."` SET
|
||||||
|
`fid` = '".(int)$fid."',
|
||||||
|
`docrootsettings` = '".$db->escape($ssettings)."';";
|
||||||
|
$this->_db->query($query);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this function is called by updateDomainDocrootsettings() and
|
||||||
|
* updateIpsAndPortsDocrootsettings() to update docroot settings for an object
|
||||||
|
*
|
||||||
|
* if new value is an empty string, entry is being removed
|
||||||
|
*
|
||||||
|
* @param string $table table to update the settings from
|
||||||
|
* @param int $fid foreign id / object id
|
||||||
|
* @param string $ssettings docroot-settings
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
private function _updateDocrootSetting($table, $fid, $ssettings)
|
||||||
|
{
|
||||||
|
// check if this object has an entry for docrootsettings
|
||||||
|
if($this->_getDocrootSettingById($table, $fid) != '')
|
||||||
|
{
|
||||||
|
if($ssettings != '')
|
||||||
|
{
|
||||||
|
// update if new value has been set
|
||||||
|
$query = "UPDATE `".$table."` SET
|
||||||
|
`docrootsettings` = '".$db->escape($ssettings)."'
|
||||||
|
WHERE `fid` = '".(int)$fid."';";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// remove if new value is empty
|
||||||
|
$query = "DELETE FROM `".$table."` WHERE `fid` = '".(int)$fid."';";
|
||||||
|
}
|
||||||
|
// run query
|
||||||
|
$this->_db->query($query);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// this object has no entry for docrootsettings yet
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* read the docrootsetting field of given table
|
||||||
|
* for given id
|
||||||
|
*
|
||||||
|
* @param string $table table where to read from
|
||||||
|
* @param int $id id of the object
|
||||||
|
*
|
||||||
|
* @return string string the settings or empty if not set
|
||||||
|
*/
|
||||||
|
private function _getDocrootSettingById($table = null, $id = 0)
|
||||||
|
{
|
||||||
|
$query = "SELECT `docrootsettings` FROM `".$table."` WHERE `fid`='".(int)$id."';";
|
||||||
|
$result = $this->_db->query_first($query);
|
||||||
|
if($result !== false && isset($result['docrootsettings']))
|
||||||
|
{
|
||||||
|
return $result['docrootsettings'];
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -70,7 +70,7 @@ class phpinterface_fcgid
|
|||||||
// set number of processes for one domain
|
// set number of processes for one domain
|
||||||
if((int)$this->_domain['mod_fcgid_starter'] != - 1)
|
if((int)$this->_domain['mod_fcgid_starter'] != - 1)
|
||||||
{
|
{
|
||||||
$starter_file.= "PHP_FCGI_CHILDREN=" . (int)$$this->_domain['mod_fcgid_starter'] . "\n";
|
$starter_file.= "PHP_FCGI_CHILDREN=" . (int)$this->_domain['mod_fcgid_starter'] . "\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ return Array(
|
|||||||
'cd /usr/ports/www/apache22',
|
'cd /usr/ports/www/apache22',
|
||||||
'make config',
|
'make config',
|
||||||
'make install',
|
'make install',
|
||||||
'touch ' . $settings['system']['apacheconf_vhost'],
|
$configcommand['vhost'],
|
||||||
'chown root:0 ' . $settings['system']['apacheconf_vhost'],
|
'chown root:0 ' . $settings['system']['apacheconf_vhost'],
|
||||||
'chmod 0600 ' . $settings['system']['apacheconf_vhost'],
|
'chmod 0600 ' . $settings['system']['apacheconf_vhost'],
|
||||||
'touch ' . $settings['system']['apacheconf_diroptions'],
|
$configcommand['diroptions'],
|
||||||
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
|
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
|
||||||
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
|
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
|
||||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||||
@@ -57,6 +57,7 @@ return Array(
|
|||||||
'commands_1' => Array(
|
'commands_1' => Array(
|
||||||
'cd /usr/ports/dns/powerdns',
|
'cd /usr/ports/dns/powerdns',
|
||||||
'make config',
|
'make config',
|
||||||
|
'set MySQL backend',
|
||||||
'make install',
|
'make install',
|
||||||
'echo "pdns_enable=\"YES\"" >> /etc/rc.conf',
|
'echo "pdns_enable=\"YES\"" >> /etc/rc.conf',
|
||||||
),
|
),
|
||||||
@@ -113,6 +114,21 @@ return Array(
|
|||||||
'sh /usr/local/etc/rc.d/postfix restart'
|
'sh /usr/local/etc/rc.d/postfix restart'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
'postgrey' => Array(
|
||||||
|
'label' => 'Postgrey',
|
||||||
|
'commands_1' => Array(
|
||||||
|
'cd /usr/ports/mail/postgrey',
|
||||||
|
'make install clean'
|
||||||
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'sed -i.bak \'s/# *check_policy_service *inet:127\.0\.0\.1:10023/ check_policy_service inet:127\.0\.0\.1:10023/\' /usr/local/etc/postfix/main.cf',
|
||||||
|
'echo "postgrey_enable=\"YES\"" >> /etc/rc.conf'
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'/usr/local/etc/rc.d/postgrey restart',
|
||||||
|
'/usr/local/etc/rc.d/postfix restart'
|
||||||
|
)
|
||||||
|
),
|
||||||
'postfix_mxaccess' => Array(
|
'postfix_mxaccess' => Array(
|
||||||
'label' => 'Postfix MX-Access (anti spam)',
|
'label' => 'Postfix MX-Access (anti spam)',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
@@ -178,14 +194,22 @@ return Array(
|
|||||||
'daemons' => Array(
|
'daemons' => Array(
|
||||||
'proftpd' => Array(
|
'proftpd' => Array(
|
||||||
'label' => 'ProFTPd',
|
'label' => 'ProFTPd',
|
||||||
|
'commands_1' => Array(
|
||||||
|
'cd /usr/ports/ftp/proftpd',
|
||||||
|
'make config',
|
||||||
|
'set MySQL auth',
|
||||||
|
'set Include mod_quota',
|
||||||
|
'make install clean'
|
||||||
|
),
|
||||||
|
'commands_2' => Array(
|
||||||
|
'touch /usr/local/etc/proftpd.conf',
|
||||||
|
'chown root:0 /usr/local/etc/proftpd.conf',
|
||||||
|
'chmod 0600 /usr/local/etc/proftpd.conf',
|
||||||
|
'echo "proftpd_enable=\"YES\"" >> /etc/rc.conf'
|
||||||
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_proftpd_proftpd.conf' => '/usr/local/etc/proftpd.conf'
|
'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(
|
'restart' => Array(
|
||||||
'/usr/local/etc/rc.d/proftpd restart'
|
'/usr/local/etc/rc.d/proftpd restart'
|
||||||
)
|
)
|
||||||
@@ -195,18 +219,28 @@ return Array(
|
|||||||
'etc' => Array(
|
'etc' => Array(
|
||||||
'label' => $lng['admin']['configfiles']['etc'],
|
'label' => $lng['admin']['configfiles']['etc'],
|
||||||
'daemons' => Array(
|
'daemons' => Array(
|
||||||
|
'cron' => Array(
|
||||||
|
'label' => 'Crond (cronscript)',
|
||||||
|
'commands' => Array(
|
||||||
|
'echo "*/1 * * * * root /usr/local/bin/php -q /var/customers/froxlor/scripts/froxlor_master_cronjob.php" >> /etc/crontab'
|
||||||
|
),
|
||||||
|
'restart' => Array(
|
||||||
|
'/etc/rc.d/cron restart'
|
||||||
|
)
|
||||||
|
),
|
||||||
'awstats' => Array(
|
'awstats' => Array(
|
||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'cd /usr/ports/www/awstats/',
|
'cd /usr/ports/www/awstats/',
|
||||||
'make install clean',
|
'make install clean',
|
||||||
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir($settings['system']['awstats_conf']),
|
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir($settings['system']['awstats_conf']),
|
||||||
'sed -i.bak \'s/^LogFile/# LogFile/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
'sed -i.bak \'s/^LogFile/# LogFile/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||||
'sed -i.bak \'s/^LogType/# LogType/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
'sed -i.bak \'s/^LogType/# LogType/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||||
'sed -i.bak \'s/^LogFormat/# LogFormat/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
'sed -i.bak \'s/^LogFormat/# LogFormat/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||||
'sed -i.bak \'s/^LogSeparator/# LogSeparator/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
'sed -i.bak \'s/^LogSeparator/# LogSeparator/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||||
'sed -i.bak \'s/^SiteDomain/# SiteDomain/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
'sed -i.bak \'s/^SiteDomain/# SiteDomain/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||||
|
'sed -i.bak \'s/^DirIcons=\"\/awstatsicons\"/DirIcons=\"\/awstats-icon\"/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
|
|||||||
@@ -37,8 +37,6 @@ function storeSettingDefaultIp($fieldname, $fielddata, $newfieldvalue)
|
|||||||
{
|
{
|
||||||
$db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `ipandport`=\'' . (int)$newfieldvalue . '\' WHERE `id` IN (\'' . implode('\',\'', $ids) . '\') AND `ipandport` = \'' . $db->escape(getSetting('system', 'defaultip')) . '\'');
|
$db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `ipandport`=\'' . (int)$newfieldvalue . '\' WHERE `id` IN (\'' . implode('\',\'', $ids) . '\') AND `ipandport` = \'' . $db->escape(getSetting('system', 'defaultip')) . '\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
inserttask('1');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $returnvalue;
|
return $returnvalue;
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ function storeSettingFieldInsertBindTask($fieldname, $fielddata, $newfieldvalue)
|
|||||||
{
|
{
|
||||||
if(saveSetting($fielddata['settinggroup'], $fielddata['varname'], $newfieldvalue) != false)
|
if(saveSetting($fielddata['settinggroup'], $fielddata['varname'], $newfieldvalue) != false)
|
||||||
{
|
{
|
||||||
inserttask('4');
|
|
||||||
return array($fielddata['settinggroup'] . '.' . $fielddata['varname'] => $newfieldvalue);
|
return array($fielddata['settinggroup'] . '.' . $fielddata['varname'] => $newfieldvalue);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ function storeSettingHostname($fieldname, $fielddata, $newfieldvalue)
|
|||||||
if(count($ids) > 0)
|
if(count($ids) > 0)
|
||||||
{
|
{
|
||||||
$db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `domain` = REPLACE(`domain`, \'' . $db->escape(getSetting('system', 'hostname')) . '\', \'' . $db->escape($newfieldvalue) . '\') WHERE `id` IN (\'' . implode('\',\'', $ids) . '\')');
|
$db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `domain` = REPLACE(`domain`, \'' . $db->escape(getSetting('system', 'hostname')) . '\', \'' . $db->escape($newfieldvalue) . '\') WHERE `id` IN (\'' . implode('\',\'', $ids) . '\')');
|
||||||
inserttask('1');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -408,6 +408,8 @@ if(AREA == 'admin' || AREA == 'customer')
|
|||||||
}
|
}
|
||||||
|
|
||||||
eval("\$header = \"" . getTemplate('header', '1') . "\";");
|
eval("\$header = \"" . getTemplate('header', '1') . "\";");
|
||||||
|
|
||||||
|
$current_year = date('Y', time());
|
||||||
eval("\$footer = \"" . getTemplate('footer', '1') . "\";");
|
eval("\$footer = \"" . getTemplate('footer', '1') . "\";");
|
||||||
|
|
||||||
if(isset($_POST['action']))
|
if(isset($_POST['action']))
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ define('TABLE_APS_TEMP_SETTINGS', 'aps_temp_settings');
|
|||||||
define('TABLE_PANEL_CRONRUNS', 'cronjobs_run');
|
define('TABLE_PANEL_CRONRUNS', 'cronjobs_run');
|
||||||
define('TABLE_PANEL_REDIRECTCODES', 'redirect_codes');
|
define('TABLE_PANEL_REDIRECTCODES', 'redirect_codes');
|
||||||
define('TABLE_PANEL_DOMAINREDIRECTS', 'domain_redirect_codes');
|
define('TABLE_PANEL_DOMAINREDIRECTS', 'domain_redirect_codes');
|
||||||
|
define('TABLE_PANEL_IPDOCROOTSETTINGS', 'ipsandports_docrootsettings');
|
||||||
|
define('TABLE_PANEL_DOMDOCROOTSETTINGS', 'domain_docrootsettings');
|
||||||
|
|
||||||
// APS constants
|
// APS constants
|
||||||
|
|
||||||
@@ -71,7 +73,7 @@ define('PACKAGE_ENABLED', 2);
|
|||||||
|
|
||||||
// VERSION INFO
|
// VERSION INFO
|
||||||
|
|
||||||
$version = '0.9.16';
|
$version = '0.9.17';
|
||||||
$dbversion = '2';
|
$dbversion = '2';
|
||||||
$branding = '';
|
$branding = '';
|
||||||
|
|
||||||
|
|||||||
@@ -502,11 +502,8 @@ $lng['panel']['pathDescriptionEx'] = '<br /><br />If you want a redirect to anot
|
|||||||
|
|
||||||
// ADDED IN 1.2.16-svn6
|
// ADDED IN 1.2.16-svn6
|
||||||
|
|
||||||
$lng['mails']['trafficninetypercent']['mailbody'] = 'Dear {NAME},\n\nyou used {TRAFFICUSED} MB of your available {TRAFFIC} MB of traffic.\nThis is more than 90%.\n\nYours sincerely, the Froxlor-Team';
|
$lng['admin']['templates']['TRAFFIC'] = 'Replaced with the traffic in mB, which was assigned to the customer.';
|
||||||
$lng['mails']['trafficninetypercent']['subject'] = 'Reaching your traffic limit';
|
$lng['admin']['templates']['TRAFFICUSED'] = 'Replaced with the traffic in MB, which was exhausted by the customer.';
|
||||||
$lng['admin']['templates']['trafficninetypercent'] = 'Notification mail for customers when ninety percent of traffic is exhausted';
|
|
||||||
$lng['admin']['templates']['TRAFFIC'] = 'Replaced with the traffic, which was assigned to the customer.';
|
|
||||||
$lng['admin']['templates']['TRAFFICUSED'] = 'Replaced with the traffic, which was exhausted by the customer.';
|
|
||||||
|
|
||||||
// ADDED IN 1.2.16-svn7
|
// ADDED IN 1.2.16-svn7
|
||||||
|
|
||||||
@@ -1547,3 +1544,23 @@ $lng['phpfpm']['vhost_httpuser'] = 'Local user to use for PHP-FPM (Froxlor vHost
|
|||||||
$lng['phpfpm']['vhost_httpgroup'] = 'Local group to use for PHP-FPM (Froxlor vHost)';
|
$lng['phpfpm']['vhost_httpgroup'] = 'Local group to use for PHP-FPM (Froxlor vHost)';
|
||||||
$lng['phpfpm']['ownvhost']['title'] = 'Enable PHP-FPM for the Froxlor vHost';
|
$lng['phpfpm']['ownvhost']['title'] = 'Enable PHP-FPM for the Froxlor vHost';
|
||||||
$lng['phpfpm']['ownvhost']['description'] = 'If enabled, Froxlor will also be running under a local user';
|
$lng['phpfpm']['ownvhost']['description'] = 'If enabled, Froxlor will also be running under a local user';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.17
|
||||||
|
$lng['crondesc']['cron_usage_report'] = 'sends reports about web- and traffic-usage';
|
||||||
|
$lng['serversettings']['report']['report'] = 'Enable sending of reports about web- and traffic-usage';
|
||||||
|
$lng['serversettings']['report']['webmax'] = 'Warning-level in percent for webspace';
|
||||||
|
$lng['serversettings']['report']['trafficmax'] = 'Warning-level in percent for traffic';
|
||||||
|
$lng['mails']['trafficmaxpercent']['mailbody'] = 'Dear {NAME},\n\nyou used {TRAFFICUSED} MB of your available {TRAFFIC} MB of traffic.\nThis is more than {MAX_PERCENT}%.\n\nYours sincerely, the Froxlor-Team';
|
||||||
|
$lng['mails']['trafficmaxpercent']['subject'] = 'Reaching your traffic limit';
|
||||||
|
$lng['admin']['templates']['trafficmaxpercent'] = 'Notification mail for customers when given maximum of percent of traffic is exhausted';
|
||||||
|
$lng['admin']['templates']['MAX_PERCENT'] = 'Replaced with the diskusage/traffic limit for sending reports in percent.';
|
||||||
|
$lng['admin']['templates']['USAGE_PERCENT'] = 'Replaced with the diskusage/traffic, which was exhausted by the customer in percent.';
|
||||||
|
$lng['admin']['templates']['diskmaxpercent'] = 'Notification mail for customers when given maximum of percent of diskspace is exhausted';
|
||||||
|
$lng['admin']['templates']['DISKAVAILABLE'] = 'Replaced with the diskusage in MB, which was assigned to the customer.';
|
||||||
|
$lng['admin']['templates']['DISKUSED'] = 'Replaced with the diskusage in MB, which was exhausted by the customer.';
|
||||||
|
$lng['serversettings']['dropdown'] = 'Dropdown';
|
||||||
|
$lng['serversettings']['manual'] = 'Manual';
|
||||||
|
$lng['mails']['webmaxpercent']['mailbody'] = 'Dear {NAME},\n\nyou used {DISKUSED} MB of your available {DISKAVAILABLE} MB of diskspace.\nThis is more than {MAX_PERCENT}%.\n\nYours sincerely, the Froxlor-Team';
|
||||||
|
$lng['mails']['webmaxpercent']['subject'] = 'Reaching your diskspace limit';
|
||||||
|
$lng['mysql']['database_edit'] = 'Edit database';
|
||||||
|
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ $lng['serversettings']['maxloginattempts']['description'] = 'Maximale Anzahl an
|
|||||||
$lng['serversettings']['deactivatetime']['title'] = 'Länge der Deaktivierung';
|
$lng['serversettings']['deactivatetime']['title'] = 'Länge der Deaktivierung';
|
||||||
$lng['serversettings']['deactivatetime']['description'] = 'Zeitraum (in sek.) für den der Account deaktiviert ist.';
|
$lng['serversettings']['deactivatetime']['description'] = 'Zeitraum (in sek.) für den der Account deaktiviert ist.';
|
||||||
$lng['serversettings']['pathedit']['title'] = 'Pfad-Eingabemethode';
|
$lng['serversettings']['pathedit']['title'] = 'Pfad-Eingabemethode';
|
||||||
$lng['serversettings']['pathedit']['description'] = 'Soll ein Pfad via Dropdown-Menü ausgewählt oder manuell eingegeben werden können.';
|
$lng['serversettings']['pathedit']['description'] = 'Soll ein Pfad via Auswahlliste ausgewählt oder manuell eingegeben werden können.';
|
||||||
$lng['serversettings']['nameservers']['title'] = 'Nameserver';
|
$lng['serversettings']['nameservers']['title'] = 'Nameserver';
|
||||||
$lng['serversettings']['nameservers']['description'] = 'Eine durch Komma getrennte Liste mit den Hostnamen aller Nameserver. Der erste ist der primäre.';
|
$lng['serversettings']['nameservers']['description'] = 'Eine durch Komma getrennte Liste mit den Hostnamen aller Nameserver. Der erste ist der primäre.';
|
||||||
$lng['serversettings']['mxservers']['title'] = 'MX Server';
|
$lng['serversettings']['mxservers']['title'] = 'MX Server';
|
||||||
@@ -501,11 +501,8 @@ $lng['panel']['pathDescriptionEx'] = '<br /><br />Sollte eine Weiterleitung auf
|
|||||||
|
|
||||||
// ADDED IN 1.2.16-svn6
|
// ADDED IN 1.2.16-svn6
|
||||||
|
|
||||||
$lng['mails']['trafficninetypercent']['mailbody'] = 'Sehr geehrte(r) {NAME},\n\nSie haben bereits {TRAFFICUSED} MB von Ihren insgesamt {TRAFFIC} MB Traffic verbraucht.\nDies sind mehr als 90%.\n\nVielen Dank,\ndas Froxlor-Team';
|
$lng['admin']['templates']['TRAFFIC'] = 'Wird mit Traffic, der dem Kunden zugewiesen wurde, ersetzt (in MB).';
|
||||||
$lng['mails']['trafficninetypercent']['subject'] = 'Sie erreichen bald Ihr Traffic-Limit';
|
$lng['admin']['templates']['TRAFFICUSED'] = 'Wird mit Traffic, der vom Kunden bereits verbraucht wurde, ersetzt (in MB).';
|
||||||
$lng['admin']['templates']['trafficninetypercent'] = 'Hinweismail für Kunden, wenn sie 90% des Traffics verbraucht haben';
|
|
||||||
$lng['admin']['templates']['TRAFFIC'] = 'Wird mit Traffic, der dem Kunden zugewiesen wurde, ersetzt.';
|
|
||||||
$lng['admin']['templates']['TRAFFICUSED'] = 'Wird mit Traffic, der vom Kunden bereits verbraucht wurde, ersetzt.';
|
|
||||||
|
|
||||||
// ADDED IN 1.2.16-svn7
|
// ADDED IN 1.2.16-svn7
|
||||||
|
|
||||||
@@ -1529,3 +1526,20 @@ $lng['phpfpm']['vhost_httpuser'] = 'Lokaler Benutzer für PHP-FPM (Froxlor V
|
|||||||
$lng['phpfpm']['vhost_httpgroup'] = 'Lokale Gruppe für PHP-FPM (Froxlor Vhost)';
|
$lng['phpfpm']['vhost_httpgroup'] = 'Lokale Gruppe für PHP-FPM (Froxlor Vhost)';
|
||||||
$lng['phpfpm']['ownvhost']['title'] = 'Verwende PHP-FPM im Froxlor Vhost';
|
$lng['phpfpm']['ownvhost']['title'] = 'Verwende PHP-FPM im Froxlor Vhost';
|
||||||
$lng['phpfpm']['ownvhost']['description'] = 'Wenn verwendet, wird Froxlor selbst unter einem lokalem Benutzer ausgeführt';
|
$lng['phpfpm']['ownvhost']['description'] = 'Wenn verwendet, wird Froxlor selbst unter einem lokalem Benutzer ausgeführt';
|
||||||
|
|
||||||
|
// ADDED IN FROXLOR 0.9.17
|
||||||
|
$lng['crondesc']['cron_usage_report'] = 'Sende Reports über Webspace- und Trafficverbrauch';
|
||||||
|
$lng['serversettings']['report']['report'] = 'Aktiviere das Senden von Reports über Webspace- und Trafficverbrauch';
|
||||||
|
$lng['serversettings']['report']['webmax'] = 'Warn-Level in Prozent für Webspace';
|
||||||
|
$lng['serversettings']['report']['trafficmax'] = 'Warn-Level in Prozent für Traffic';
|
||||||
|
$lng['mails']['trafficmaxpercent']['mailbody'] = 'Sehr geehrte(r) {NAME},\n\nSie haben bereits {TRAFFICUSED} MB von Ihren insgesamt {TRAFFIC} MB Traffic verbraucht.\nDies sind mehr als {MAX_PERCENT}%.\n\nVielen Dank,\ndas Froxlor-Team';
|
||||||
|
$lng['mails']['trafficmaxpercent']['subject'] = 'Sie erreichen bald Ihr Traffic-Limit';
|
||||||
|
$lng['admin']['templates']['trafficmaxpercent'] = 'Hinweismail für Kunden, wenn sie die angegebenen Prozent des Traffics verbraucht haben';
|
||||||
|
$lng['admin']['templates']['MAX_PERCENT'] = 'Wird mit dem Webspace/Traffic-Limit, welches dem Kunden zugewiesen wurde, ersetzt.';
|
||||||
|
$lng['admin']['templates']['USAGE_PERCENT'] = 'Wird mit dem Webspace/Traffic, welcher vom Kunden bereits verbraucht wurde, ersetzt.';
|
||||||
|
$lng['admin']['templates']['diskmaxpercent'] = 'Hinweismail für Kunden, wenn sie die angegebenen Prozent des Webspaces verbraucht haben';
|
||||||
|
$lng['admin']['templates']['DISKAVAILABLE'] = 'Wird mit dem Webspace, der dem Kunden zugewiesen wurde, ersetzt (in MB).';
|
||||||
|
$lng['admin']['templates']['DISKUSED'] = 'Wird mit dem Webspace, welcher vom Kunden bereits verbraucht wurde, ersetzt (in MB).';
|
||||||
|
$lng['serversettings']['dropdown'] = 'Auswahlliste';
|
||||||
|
$lng['serversettings']['manual'] = 'Manuelle Eingabe';
|
||||||
|
$lng['mysql']['database_edit'] = 'Datenbank bearbeiten';
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ if($db->num_rows($result) > 0)
|
|||||||
//error while parsing mail
|
//error while parsing mail
|
||||||
if($to == '' || $from == '')
|
if($to == '' || $from == '')
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "No valid headers found in mail to parse: " . $entry);
|
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "No valid headers found in mail to parse");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -757,6 +757,14 @@ class apache
|
|||||||
|
|
||||||
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
||||||
{
|
{
|
||||||
|
// redirect everything, not only root-directory, #541
|
||||||
|
|
||||||
|
$vhost_content.= ' <IfModule mod_rewrite.c>'."\n";
|
||||||
|
$vhost_content.= ' RewriteEngine On' . "\n";
|
||||||
|
$vhost_content.= ' RewriteCond %{HTTPS} off' . "\n";
|
||||||
|
$vhost_content.= ' RewriteRule (.*) '. $this->idnaConvert->encode($domain['documentroot']).'%{REQUEST_URI}'. "\n";
|
||||||
|
$vhost_content.= ' </IfModule>' . "\n";
|
||||||
|
|
||||||
$code = getDomainRedirectCode($domain['id']);
|
$code = getDomainRedirectCode($domain['id']);
|
||||||
$vhost_content.= ' Redirect '.$code.' / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n";
|
$vhost_content.= ' Redirect '.$code.' / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -442,6 +442,14 @@ class lighttpd
|
|||||||
$vhost_content = '';
|
$vhost_content = '';
|
||||||
$vhost_content.= $this->getServerNames($domain) . " {\n";
|
$vhost_content.= $this->getServerNames($domain) . " {\n";
|
||||||
|
|
||||||
|
// respect ssl_redirect settings, #542
|
||||||
|
if($ssl_vhost == false
|
||||||
|
&& $domain['ssl'] == '1'
|
||||||
|
&& $domain['ssl_redirect'] == '1'
|
||||||
|
) {
|
||||||
|
$domain['documentroot'] = 'https://' . $domain['domain'] . '/';
|
||||||
|
}
|
||||||
|
|
||||||
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
||||||
{
|
{
|
||||||
$vhost_content.= ' url.redirect = (' . "\n";
|
$vhost_content.= ' url.redirect = (' . "\n";
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
* @copyright (c) the authors
|
* @copyright (c) the authors
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
* @package Configfiles
|
* @package Cron
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -391,6 +391,14 @@ class nginx
|
|||||||
|
|
||||||
$vhost_content.= $this->getServerNames($domain);
|
$vhost_content.= $this->getServerNames($domain);
|
||||||
|
|
||||||
|
// respect ssl_redirect settings, #542
|
||||||
|
if($ssl_vhost == false
|
||||||
|
&& $domain['ssl'] == '1'
|
||||||
|
&& $domain['ssl_redirect'] == '1'
|
||||||
|
) {
|
||||||
|
$domain['documentroot'] = 'https://' . $domain['domain'] . '/';
|
||||||
|
}
|
||||||
|
|
||||||
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
||||||
{
|
{
|
||||||
$vhost_content.= "\t".'rewrite ^(.*) '.$this->idnaConvert->encode($domain['documentroot']).'$1 permanent;'."\n";
|
$vhost_content.= "\t".'rewrite ^(.*) '.$this->idnaConvert->encode($domain['documentroot']).'$1 permanent;'."\n";
|
||||||
|
|||||||
@@ -78,8 +78,9 @@ while($row = $db->fetch_array($result_tasks))
|
|||||||
$awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1);
|
$awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1);
|
||||||
fclose($awstatsclean['fh']);
|
fclose($awstatsclean['fh']);
|
||||||
if($awstatsclean['headerRead'] == $awstatsclean['header'] || $awstatsclean['headerRead'] == $awstatsclean['headerold']) {
|
if($awstatsclean['headerRead'] == $awstatsclean['header'] || $awstatsclean['headerRead'] == $awstatsclean['headerold']) {
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Removing awstats configuration ".$awstatsclean['fullentry']." for re-creation");
|
$awstats_conf_file = makeCorrectFile($awstatsclean['fullentry']);
|
||||||
@unlink($awstatsclean['fullentry']);
|
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Removing awstats configuration ".$awstats_conf_file." for re-creation");
|
||||||
|
@unlink($awstats_conf_file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
181
scripts/jobs/cron_usage.inc.diskspace.php
Normal file
181
scripts/jobs/cron_usage.inc.diskspace.php
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
<?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 Cron
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* report about diskusage for customers
|
||||||
|
*/
|
||||||
|
$result = $db->query("SELECT
|
||||||
|
`c`.`customerid`, `c`.`adminid`, `c`.`name`, `c`.`firstname`, `c`.`diskspace`,
|
||||||
|
`c`.`diskspace_used`, `c`.`email`, `c`.`def_language`,
|
||||||
|
`a`.`name` AS `adminname`, `a`.`email` AS `adminmail`
|
||||||
|
FROM `" . TABLE_PANEL_CUSTOMERS . "` AS `c`
|
||||||
|
LEFT JOIN `" . TABLE_PANEL_ADMINS . "` AS `a`
|
||||||
|
ON `a`.`adminid` = `c`.`adminid`
|
||||||
|
WHERE `c`.`diskspace` > '0' AND `c`.`reportsent` <> '2'");
|
||||||
|
|
||||||
|
while($row = $db->fetch_array($result))
|
||||||
|
{
|
||||||
|
if(isset($row['diskspace'])
|
||||||
|
&& $row['diskspace_used'] != NULL
|
||||||
|
&& $row['diskspace_used'] > 0
|
||||||
|
&& (($row['diskspace_used'] * 100) / $row['diskspace']) >= (int)$settings['system']['report_webmax']
|
||||||
|
) {
|
||||||
|
|
||||||
|
$replace_arr = array(
|
||||||
|
'NAME' => $row['name'],
|
||||||
|
'DISKAVAILABLE' => ($row['diskspace'] / 1024), /* traffic is stored in KB, template uses MB */
|
||||||
|
'DISKUSED' => round($row['diskspace_used'] / 1024, 2), /* traffic is stored in KB, template uses MB */
|
||||||
|
'USAGE_PERCENT' => ($row['diskspace_used'] * 100) / $row['diskspace'],
|
||||||
|
'MAX_PERCENT' => $settings['system']['report_webmax']
|
||||||
|
);
|
||||||
|
|
||||||
|
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
||||||
|
WHERE `language` ='" . $row['def_language'] . "'");
|
||||||
|
|
||||||
|
if($lngfile !== NULL)
|
||||||
|
{
|
||||||
|
$langfile = $lngfile['file'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
||||||
|
WHERE `language` ='" . $settings['panel']['standardlanguage'] . "'");
|
||||||
|
$langfile = $lngfile['file'];
|
||||||
|
}
|
||||||
|
|
||||||
|
include_once makeCorrectFile($pathtophpfiles . '/' . $langfile);
|
||||||
|
|
||||||
|
// Get mail templates from database; the ones from 'admin' are fetched for fallback
|
||||||
|
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
||||||
|
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||||
|
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||||
|
AND `templategroup`='mails'
|
||||||
|
AND `varname`='webmaxpercent_subject'");
|
||||||
|
$mail_subject = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['webmaxpercent']['subject']), $replace_arr));
|
||||||
|
|
||||||
|
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
||||||
|
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||||
|
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||||
|
AND `templategroup`='mails'
|
||||||
|
AND `varname`='webmaxpercent_mailbody'");
|
||||||
|
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['webmaxpercent']['mailbody']), $replace_arr));
|
||||||
|
|
||||||
|
$_mailerror = false;
|
||||||
|
try {
|
||||||
|
$mail->SetFrom($row['email'], $row['firstname'] . " " . $row['name']);
|
||||||
|
$mail->Subject = $mail_subject;
|
||||||
|
$mail->AltBody = $mail_body;
|
||||||
|
$mail->MsgHTML(nl2br($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"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$mail->ClearAddresses();
|
||||||
|
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `reportsent`='2'
|
||||||
|
WHERE `customerid`='" . (int)$row['customerid'] . "'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* report about diskusage for admins/reseller
|
||||||
|
*/
|
||||||
|
$result = $db->query("SELECT `a`.* FROM `" . TABLE_PANEL_ADMINS . "` `a` WHERE `a`.`reportsent` <> '2'");
|
||||||
|
|
||||||
|
while($row = $db->fetch_array($result))
|
||||||
|
{
|
||||||
|
if(isset($row['diskspace'])
|
||||||
|
&& $row['diskspace_used'] != NULL
|
||||||
|
&& $row['diskspace_used'] > 0
|
||||||
|
&& (($row['diskspace_used'] * 100) / $row['diskspace']) >= (int)$settings['system']['report_webmax']
|
||||||
|
) {
|
||||||
|
|
||||||
|
$replace_arr = array(
|
||||||
|
'NAME' => $row['name'],
|
||||||
|
'DISKAVAILABLE' => ($row['diskspace'] / 1024), /* traffic is stored in KB, template uses MB */
|
||||||
|
'DISKUSED' => round($row['diskspace_used'] / 1024, 2), /* traffic is stored in KB, template uses MB */
|
||||||
|
'USAGE_PERCENT' => ($row['diskspace_used'] * 100) / $row['diskspace'],
|
||||||
|
'MAX_PERCENT' => $settings['system']['report_webmax']
|
||||||
|
);
|
||||||
|
|
||||||
|
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
||||||
|
WHERE `language` ='" . $row['def_language'] . "'");
|
||||||
|
|
||||||
|
if($lngfile !== NULL)
|
||||||
|
{
|
||||||
|
$langfile = $lngfile['file'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
||||||
|
WHERE `language` ='" . $settings['panel']['standardlanguage'] . "'");
|
||||||
|
$langfile = $lngfile['file'];
|
||||||
|
}
|
||||||
|
|
||||||
|
include_once makeCorrectFile($pathtophpfiles . '/' . $langfile);
|
||||||
|
|
||||||
|
// Get mail templates from database; the ones from 'admin' are fetched for fallback
|
||||||
|
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
||||||
|
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||||
|
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||||
|
AND `templategroup`='mails'
|
||||||
|
AND `varname`='webmaxpercent_subject'");
|
||||||
|
$mail_subject = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['webmaxpercent']['subject']), $replace_arr));
|
||||||
|
|
||||||
|
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
||||||
|
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||||
|
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||||
|
AND `templategroup`='mails'
|
||||||
|
AND `varname`='webmaxpercent_mailbody'");
|
||||||
|
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['webmaxpercent']['mailbody']), $replace_arr));
|
||||||
|
|
||||||
|
$_mailerror = false;
|
||||||
|
try {
|
||||||
|
$mail->SetFrom($row['email'], $row['name']);
|
||||||
|
$mail->Subject = $mail_subject;
|
||||||
|
$mail->AltBody = $mail_body;
|
||||||
|
$mail->MsgHTML(nl2br($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"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$mail->ClearAddresses();
|
||||||
|
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `reportsent`='2'
|
||||||
|
WHERE `adminid`='" . (int)$row['adminid'] . "'");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,18 +17,16 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
fwrite($debugHandler, 'Trafficreport run started...' . "\n");
|
fwrite($debugHandler, 'Web- and Traffic-usage reporting started...' . "\n");
|
||||||
$yesterday = time() - (60 * 60 * 24);
|
$yesterday = time() - (60 * 60 * 24);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the mailingsystem
|
* Initialize the mailingsystem
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require (dirname(__FILE__) . '/../lib/class.phpmailer.php');
|
|
||||||
$mail = new PHPMailer(true);
|
$mail = new PHPMailer(true);
|
||||||
$mail->SetFrom($settings['panel']['adminmail'], 'Froxlor Administrator');
|
$mail->SetFrom($settings['panel']['adminmail'], 'Froxlor Administrator');
|
||||||
|
|
||||||
// Warn the customers at 90% traffic-usage
|
// Warn the customers at xx% traffic-usage
|
||||||
|
|
||||||
$result = $db->query("SELECT `c`.`customerid`, `c`.`adminid`, `c`.`name`, `c`.`firstname`, `c`.`traffic`,
|
$result = $db->query("SELECT `c`.`customerid`, `c`.`adminid`, `c`.`name`, `c`.`firstname`, `c`.`traffic`,
|
||||||
`c`.`email`, `c`.`def_language`, `a`.`name` AS `adminname`, `a`.`email` AS `adminmail`,
|
`c`.`email`, `c`.`def_language`, `a`.`name` AS `adminname`, `a`.`email` AS `adminmail`,
|
||||||
@@ -38,19 +36,21 @@ $result = $db->query("SELECT `c`.`customerid`, `c`.`adminid`, `c`.`name`, `c`.`f
|
|||||||
AND `t`.`month` = '" . date("m", $yesterday) . "') as `traffic_used`
|
AND `t`.`month` = '" . date("m", $yesterday) . "') as `traffic_used`
|
||||||
FROM `" . TABLE_PANEL_CUSTOMERS . "` AS `c`
|
FROM `" . TABLE_PANEL_CUSTOMERS . "` AS `c`
|
||||||
LEFT JOIN `" . TABLE_PANEL_ADMINS . "` AS `a` ON `a`.`adminid` = `c`.`adminid`
|
LEFT JOIN `" . TABLE_PANEL_ADMINS . "` AS `a` ON `a`.`adminid` = `c`.`adminid`
|
||||||
WHERE `c`.`reportsent` = '0'");
|
WHERE `c`.`reportsent` <> '1'");
|
||||||
|
|
||||||
while($row = $db->fetch_array($result))
|
while($row = $db->fetch_array($result))
|
||||||
{
|
{
|
||||||
if(isset($row['traffic'])
|
if(isset($row['traffic'])
|
||||||
&& $row['traffic'] > 0
|
&& $row['traffic'] > 0
|
||||||
&& $row['traffic_used'] != NULL
|
&& $row['traffic_used'] != NULL
|
||||||
&& (($row['traffic_used'] * 100) / $row['traffic']) >= 90)
|
&& (($row['traffic_used'] * 100) / $row['traffic']) >= (int)$settings['system']['report_trafficmax'])
|
||||||
{
|
{
|
||||||
$replace_arr = array(
|
$replace_arr = array(
|
||||||
'NAME' => $row['name'],
|
'NAME' => $row['name'],
|
||||||
'TRAFFIC' => $row['traffic'],
|
'TRAFFIC' => ($row['traffic'] / 1024), /* traffic is stored in KB, template uses MB */
|
||||||
'TRAFFICUSED' => $row['traffic_used']
|
'TRAFFICUSED' => ($row['traffic_used'] / 1024), /* traffic is stored in KB, template uses MB */
|
||||||
|
'USAGE_PERCENT' => ($row['traffic_used'] * 100) / $row['traffic'],
|
||||||
|
'MAX_PERCENT' => $settings['system']['report_trafficmax']
|
||||||
);
|
);
|
||||||
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
||||||
WHERE `language` ='" . $row['def_language'] . "'");
|
WHERE `language` ='" . $row['def_language'] . "'");
|
||||||
@@ -74,21 +74,21 @@ while($row = $db->fetch_array($result))
|
|||||||
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||||
AND `language`='" . $db->escape($row['def_language']) . "'
|
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||||
AND `templategroup`='mails'
|
AND `templategroup`='mails'
|
||||||
AND `varname`='trafficninetypercent_subject'");
|
AND `varname`='trafficmaxpercent_subject'");
|
||||||
$mail_subject = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['subject']), $replace_arr));
|
$mail_subject = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['subject']), $replace_arr));
|
||||||
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
||||||
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||||
AND `language`='" . $db->escape($row['def_language']) . "'
|
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||||
AND `templategroup`='mails'
|
AND `templategroup`='mails'
|
||||||
AND `varname`='trafficninetypercent_mailbody'");
|
AND `varname`='trafficmaxpercent_mailbody'");
|
||||||
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
|
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['mailbody']), $replace_arr));
|
||||||
|
|
||||||
$_mailerror = false;
|
$_mailerror = false;
|
||||||
try {
|
try {
|
||||||
$mail->SetFrom($row['adminmail'], $row['adminname']);
|
$mail->SetFrom($row['adminmail'], $row['adminname']);
|
||||||
$mail->Subject = $mail_subject;
|
$mail->Subject = $mail_subject;
|
||||||
$mail->AltBody = $mail_body;
|
$mail->AltBody = $mail_body;
|
||||||
$mail->MsgHTML($mail_body);
|
$mail->MsgHTML(nl2br($mail_body));
|
||||||
$mail->AddAddress($row['email'], $row['firstname'] . ' ' . $row['name']);
|
$mail->AddAddress($row['email'], $row['firstname'] . ' ' . $row['name']);
|
||||||
$mail->Send();
|
$mail->Send();
|
||||||
} catch(phpmailerException $e) {
|
} catch(phpmailerException $e) {
|
||||||
@@ -101,8 +101,8 @@ while($row = $db->fetch_array($result))
|
|||||||
|
|
||||||
if($_mailerror)
|
if($_mailerror)
|
||||||
{
|
{
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $_mailerror);
|
$cronlog->logAction(CRON_ACTION, LOG_ERR, 'Error sending mail: ' . $_mailerror);
|
||||||
standard_error('errorsendingmail', $row["email"]);
|
standard_error('errorsendingmail', $row['email']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$mail->ClearAddresses();
|
$mail->ClearAddresses();
|
||||||
@@ -111,7 +111,7 @@ while($row = $db->fetch_array($result))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Warn the admins at 90% traffic-usage
|
// Warn the admins at xx% traffic-usage
|
||||||
|
|
||||||
$result = $db->query("SELECT `a`.*,
|
$result = $db->query("SELECT `a`.*,
|
||||||
(SELECT SUM(`t`.`http` + `t`.`ftp_up` + `t`.`ftp_down` + `t`.`mail`)
|
(SELECT SUM(`t`.`http` + `t`.`ftp_up` + `t`.`ftp_down` + `t`.`mail`)
|
||||||
@@ -124,12 +124,14 @@ while($row = $db->fetch_array($result))
|
|||||||
{
|
{
|
||||||
if(isset($row['traffic'])
|
if(isset($row['traffic'])
|
||||||
&& $row['traffic'] > 0
|
&& $row['traffic'] > 0
|
||||||
&& (($row['traffic_used_total'] * 100) / $row['traffic']) >= 90)
|
&& (($row['traffic_used_total'] * 100) / $row['traffic']) >= (int)$settings['system']['report_trafficmax'])
|
||||||
{
|
{
|
||||||
$replace_arr = array(
|
$replace_arr = array(
|
||||||
'NAME' => $row['name'],
|
'NAME' => $row['name'],
|
||||||
'TRAFFIC' => $row['traffic'],
|
'TRAFFIC' => ($row['traffic'] / 1024), /* traffic is stored in KB, template uses MB */
|
||||||
'TRAFFICUSED' => $row['traffic_used_total']
|
'TRAFFICUSED' => ($row['traffic_used_total'] / 1024), /* traffic is stored in KB, template uses MB */
|
||||||
|
'USAGE_PERCENT' => ($row['traffic_used_total'] * 100) / $row['traffic'],
|
||||||
|
'MAX_PERCENT' => $settings['system']['report_trafficmax']
|
||||||
);
|
);
|
||||||
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
$lngfile = $db->query_first("SELECT `file` FROM `" . TABLE_PANEL_LANGUAGE . "`
|
||||||
WHERE `language` ='" . $row['def_language'] . "'");
|
WHERE `language` ='" . $row['def_language'] . "'");
|
||||||
@@ -153,21 +155,21 @@ while($row = $db->fetch_array($result))
|
|||||||
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||||
AND `language`='" . $db->escape($row['def_language']) . "'
|
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||||
AND `templategroup`='mails'
|
AND `templategroup`='mails'
|
||||||
AND `varname`='trafficninetypercent_subject'");
|
AND `varname`='trafficmaxpercent_subject'");
|
||||||
$mail_subject = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['subject']), $replace_arr));
|
$mail_subject = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['subject']), $replace_arr));
|
||||||
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
$result2 = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
|
||||||
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
WHERE `adminid`='" . (int)$row['adminid'] . "'
|
||||||
AND `language`='" . $db->escape($row['def_language']) . "'
|
AND `language`='" . $db->escape($row['def_language']) . "'
|
||||||
AND `templategroup`='mails'
|
AND `templategroup`='mails'
|
||||||
AND `varname`='trafficninetypercent_mailbody'");
|
AND `varname`='trafficmaxpercent_mailbody'");
|
||||||
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
|
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['mailbody']), $replace_arr));
|
||||||
|
|
||||||
$_mailerror = false;
|
$_mailerror = false;
|
||||||
try {
|
try {
|
||||||
$mail->SetFrom($row['email'], $row['firstname'] . " " . $row['name']);
|
$mail->SetFrom($row['email'], $row['name']);
|
||||||
$mail->Subject = $mail_subject;
|
$mail->Subject = $mail_subject;
|
||||||
$mail->AltBody = $mail_body;
|
$mail->AltBody = $mail_body;
|
||||||
$mail->MsgHTML($mail_body);
|
$mail->MsgHTML(nl2br($mail_body));
|
||||||
$mail->AddAddress($row['email'], $row['name']);
|
$mail->AddAddress($row['email'], $row['name']);
|
||||||
$mail->Send();
|
$mail->Send();
|
||||||
} catch(phpmailerException $e) {
|
} catch(phpmailerException $e) {
|
||||||
@@ -185,7 +187,7 @@ while($row = $db->fetch_array($result))
|
|||||||
|
|
||||||
$mail->ClearAddresses();
|
$mail->ClearAddresses();
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `reportsent`='1'
|
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `reportsent`='1'
|
||||||
WHERE `customerid`='" . (int)$row['adminid'] . "'");
|
WHERE `adminid`='" . (int)$row['adminid'] . "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Another month, let's build our report
|
// Another month, let's build our report
|
||||||
@@ -228,14 +230,17 @@ while($row = $db->fetch_array($result))
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($_mailerror) {
|
if ($_mailerror) {
|
||||||
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
$cronlog->logAction(CRON_ACTION, LOG_ERR, 'Error sending mail: ' . $mailerr_msg);
|
||||||
standard_error('errorsendingmail', $row["email"]);
|
standard_error('errorsendingmail', $row['email']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$mail->ClearAddresses();
|
$mail->ClearAddresses();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// include diskspace-usage report, #466
|
||||||
|
include dirname(__FILE__).'/cron_usage.inc.diskspace.php';
|
||||||
|
|
||||||
// Another month, reset the reportstatus
|
// Another month, reset the reportstatus
|
||||||
|
|
||||||
if(date('d') == '01')
|
if(date('d') == '01')
|
||||||
@@ -243,9 +248,3 @@ if(date('d') == '01')
|
|||||||
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `reportsent` = \'0\';');
|
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `reportsent` = \'0\';');
|
||||||
$db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `reportsent` = \'0\';');
|
$db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `reportsent` = \'0\';');
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = UNIX_TIMESTAMP()
|
|
||||||
WHERE `settinggroup` = \'system\' AND `varname` = \'last_traffic_report_run\' ');
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -124,7 +124,7 @@ $header
|
|||||||
<if $settings['system']['mail_quota_enabled'] == 1>
|
<if $settings['system']['mail_quota_enabled'] == 1>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['customer']['email_quota']}: *</td>
|
<td class="main_field_name">{$lng['customer']['email_quota']}: *</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_quota" value="{$result['email_quota']}" maxlength="3" /> {$email_quota_ul}</td>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_quota" value="{$result['email_quota']}" maxlength="9" /> {$email_quota_ul}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</if>
|
</if>
|
||||||
<if $settings['autoresponder']['autoresponder_active'] == 1>
|
<if $settings['autoresponder']['autoresponder_active'] == 1>
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ $header
|
|||||||
<td class="field_name">{$lng['admin']['templates']['PASSWORD']}</td>
|
<td class="field_name">{$lng['admin']['templates']['PASSWORD']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['trafficninetypercent']}</b></td>
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['trafficmaxpercent']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_name_border_left"><i>{TRAFFIC}</i>:</td>
|
<td class="field_name_border_left"><i>{TRAFFIC}</i>:</td>
|
||||||
@@ -106,6 +106,33 @@ $header
|
|||||||
<td class="field_name_border_left"><i>{TRAFFICUSED}</i>:</td>
|
<td class="field_name_border_left"><i>{TRAFFICUSED}</i>:</td>
|
||||||
<td class="field_name">{$lng['admin']['templates']['TRAFFICUSED']}</td>
|
<td class="field_name">{$lng['admin']['templates']['TRAFFICUSED']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{MAX_PERCENT}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['MAX_PERCENT']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{USAGE_PERCENT}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['USAGE_PERCENT']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['diskmaxpercent']}</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{DISKAVAILABLE}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['DISKAVAILABLE']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{DISKUSED}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['DISKUSED']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{MAX_PERCENT}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['MAX_PERCENT']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="field_name_border_left"><i>{USAGE_PERCENT}</i>:</td>
|
||||||
|
<td class="field_name">{$lng['admin']['templates']['USAGE_PERCENT']}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['ticket']}</b></td>
|
<td class="field_display_border_left" colspan="2"><b>{$lng['admin']['templates']['ticket']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -12,16 +12,6 @@ $header
|
|||||||
<td class="main_field_name">{$lng['login']['username']}:</td>
|
<td class="main_field_name">{$lng['login']['username']}:</td>
|
||||||
<td class="main_field_display" nowrap="nowrap">{$result['username']}</td>
|
<td class="main_field_display" nowrap="nowrap">{$result['username']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<if $settings['customer']['ftpatdomain'] == '1'>
|
|
||||||
<tr>
|
|
||||||
<td class="main_field_name">{$lng['login']['username']}:</td>
|
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="ftp_username" size="30" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="main_field_name">{$lng['domains']['domainname']}:</td>
|
|
||||||
<td class="main_field_display" nowrap="nowrap"><select class="dropdown_noborder" name="ftp_domain">$domains</select></td>
|
|
||||||
</tr>
|
|
||||||
</if>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['panel']['path']}:<if $settings['panel']['pathedit'] != 'Dropdown'><br /><font size="1">{$lng['panel']['pathDescription']}</font></if></td>
|
<td class="main_field_name">{$lng['panel']['path']}:<if $settings['panel']['pathedit'] != 'Dropdown'><br /><font size="1">{$lng['panel']['pathDescription']}</font></if></td>
|
||||||
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<if ($settings['admin']['show_version_login'] == '1' && $filename == 'index.php') || ($filename != 'index.php' && $settings['admin']['show_version_footer'] == '1')>
|
<if ($settings['admin']['show_version_login'] == '1' && $filename == 'index.php') || ($filename != 'index.php' && $settings['admin']['show_version_footer'] == '1')>
|
||||||
{$version}{$branding}
|
{$version}{$branding}
|
||||||
</if>
|
</if>
|
||||||
© 2009-2010 by <a href="http://www.froxlor.org/" target="_blank">the Froxlor Team</a>
|
© 2009-{$current_year} by <a href="http://www.froxlor.org/" target="_blank">the Froxlor Team</a>
|
||||||
<br />Theme based on work by: Luca Piona and Luca Longinotti
|
<br />Theme based on work by: Luca Piona and Luca Longinotti
|
||||||
<if $lng['translator'] != ''>
|
<if $lng['translator'] != ''>
|
||||||
<br />{$lng['panel']['translator']}: {$lng['translator']}
|
<br />{$lng['panel']['translator']}: {$lng['translator']}
|
||||||
|
|||||||
@@ -1,20 +1,15 @@
|
|||||||
# Make sure that `passwd`, `group` and `shadow` have mysql in their lines
|
# Make sure that `passwd` and `group` have mysql in their lines
|
||||||
# You should place mysql at the end, so that it is queried after the other mechanisams
|
# You should place mysql at the end, so that it is queried after the other mechanisams
|
||||||
#
|
#
|
||||||
passwd: compat mysql
|
group: files mysql
|
||||||
group: compat mysql
|
group_compat: nis
|
||||||
shadow: compat mysql
|
hosts: files dns
|
||||||
|
networks: files
|
||||||
|
passwd: files mysql
|
||||||
|
passwd_compat: nis
|
||||||
|
shells: files
|
||||||
|
services: compat
|
||||||
|
services_compat: nis
|
||||||
|
protocols: files
|
||||||
|
rpc: files
|
||||||
|
|
||||||
hosts: files dns
|
|
||||||
networks: files dns
|
|
||||||
|
|
||||||
services: db files
|
|
||||||
protocols: db files
|
|
||||||
rpc: db files
|
|
||||||
ethers: db files
|
|
||||||
netmasks: files
|
|
||||||
netgroup: files
|
|
||||||
bootparams: files
|
|
||||||
|
|
||||||
automount: files
|
|
||||||
aliases: files
|
|
||||||
|
|||||||
@@ -17,8 +17,11 @@ smtpd_recipient_restrictions =
|
|||||||
reject_unauth_pipelining,
|
reject_unauth_pipelining,
|
||||||
reject_invalid_hostname,
|
reject_invalid_hostname,
|
||||||
reject_rbl_client sbl-xbl.spamhaus.org,
|
reject_rbl_client sbl-xbl.spamhaus.org,
|
||||||
|
reject_rbl_client ix.dnsbl.manitu.net,
|
||||||
# sqlgrey enable
|
# sqlgrey enable
|
||||||
# check_policy_service inet:127.0.0.1:2501,
|
# check_policy_service inet:127.0.0.1:2501,
|
||||||
|
# postgrey enable
|
||||||
|
# check_policy_service inet:127.0.0.1:10023,
|
||||||
|
|
||||||
smtpd_client_restrictions =
|
smtpd_client_restrictions =
|
||||||
permit_mynetworks,
|
permit_mynetworks,
|
||||||
@@ -35,17 +38,18 @@ smtpd_sasl_path = private/auth
|
|||||||
|
|
||||||
soft_bounce = yes
|
soft_bounce = yes
|
||||||
|
|
||||||
# Maximum size of Message in bytes (50MB)
|
# Maximum size of Message in bytes (0 = unlimited)
|
||||||
message_size_limit = 52428800
|
message_size_limit = 0
|
||||||
|
mailbox_size_limit = 0
|
||||||
|
|
||||||
smtp_use_tls = yes
|
smtp_tls_security_level = may
|
||||||
smtpd_use_tls = yes
|
|
||||||
smtpd_tls_security_level = may
|
smtpd_tls_security_level = may
|
||||||
smtpd_tls_auth_only = no
|
smtpd_tls_auth_only = no
|
||||||
smtp_tls_note_starttls_offer = yes
|
smtp_tls_note_starttls_offer = yes
|
||||||
smtpd_tls_key_file = /etc/ssl/<SERVERNAME>.key.unencrypted
|
smtpd_tls_key_file = /etc/ssl/<SERVERNAME>.key.unencrypted
|
||||||
smtpd_tls_cert_file = /etc/ssl/<SERVERNAME>.crt
|
smtpd_tls_cert_file = /etc/ssl/<SERVERNAME>.crt
|
||||||
smtpd_tls_CAfile = /etc/ssl/cacert.class3.crt # Just an example for CACert.org
|
# Just an example for CACert.org
|
||||||
|
smtpd_tls_CAfile = /etc/ssl/cacert.class3.crt
|
||||||
smtpd_tls_loglevel = 0
|
smtpd_tls_loglevel = 0
|
||||||
smtpd_tls_received_header = yes
|
smtpd_tls_received_header = yes
|
||||||
smtpd_tls_session_cache_timeout = 3600s
|
smtpd_tls_session_cache_timeout = 3600s
|
||||||
|
|||||||
Reference in New Issue
Block a user