Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e50d0b0440 |
@@ -112,46 +112,6 @@ return array(
|
|||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'defaultwebsrverrhandler_enabled' => array(
|
|
||||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_enabled'],
|
|
||||||
'settinggroup' => 'defaultwebsrverrhandler',
|
|
||||||
'varname' => 'enabled',
|
|
||||||
'type' => 'bool',
|
|
||||||
'default' => false,
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'defaultwebsrverrhandler_err401' => array(
|
|
||||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err401'],
|
|
||||||
'settinggroup' => 'defaultwebsrverrhandler',
|
|
||||||
'varname' => 'err401',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'defaultwebsrverrhandler_err403' => array(
|
|
||||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err403'],
|
|
||||||
'settinggroup' => 'defaultwebsrverrhandler',
|
|
||||||
'varname' => 'err403',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'defaultwebsrverrhandler_err404' => array(
|
|
||||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err404'],
|
|
||||||
'settinggroup' => 'defaultwebsrverrhandler',
|
|
||||||
'varname' => 'err404',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
'defaultwebsrverrhandler_err500' => array(
|
|
||||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err500'],
|
|
||||||
'settinggroup' => 'defaultwebsrverrhandler',
|
|
||||||
'varname' => 'err500',
|
|
||||||
'type' => 'string',
|
|
||||||
'default' => '',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'ssl' => array(
|
'ssl' => array(
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Settings
|
|
||||||
* @version $Id: 220.ftpserver.php 1 2010-04-07 10:00:00Z monotek $
|
|
||||||
*/
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'groups' => array(
|
|
||||||
'ftpserver' => array(
|
|
||||||
'title' => $lng['admin']['ftpserversettings'],
|
|
||||||
'fields' => array(
|
|
||||||
'ftpserver' => array(
|
|
||||||
'label' => $lng['admin']['ftpserver'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'ftpserver',
|
|
||||||
'type' => 'option',
|
|
||||||
'default' => 'proftpd',
|
|
||||||
'option_mode' => 'one',
|
|
||||||
'option_options' => array('proftpd' => 'Proftpd', 'pureftpd' => 'Pureftpd'),
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -59,16 +59,6 @@ return array(
|
|||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'system_defaultttl' => array(
|
|
||||||
'label' => $lng['serversettings']['defaultttl'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'defaultttl',
|
|
||||||
'type' => 'int',
|
|
||||||
'default' => 604800, /* 1 week */
|
|
||||||
'int_min' => 86400, /* 1 day */
|
|
||||||
'int_max' => 2147483647, /* integer max */
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -125,16 +125,6 @@ return array(
|
|||||||
'type' => 'hidden',
|
'type' => 'hidden',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
),
|
),
|
||||||
'ticket_default_priority' => array(
|
|
||||||
'label' => $lng['serversettings']['ticket']['default_priority'],
|
|
||||||
'settinggroup' => 'ticket',
|
|
||||||
'varname' => 'default_priority',
|
|
||||||
'type' => 'option',
|
|
||||||
'default' => 2,
|
|
||||||
'option_mode' => 'one',
|
|
||||||
'option_options' => array(1 => $lng['ticket']['unf_high'], 2 => $lng['ticket']['unf_normal'], 3 => $lng['ticket']['unf_low']),
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -100,16 +100,6 @@ return array(
|
|||||||
'default' => 250,
|
'default' => 250,
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
'system_mod_fcgid_defaultini' => array(
|
|
||||||
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
|
|
||||||
'settinggroup' => 'system',
|
|
||||||
'varname' => 'mod_fcgid_defaultini',
|
|
||||||
'type' => 'option',
|
|
||||||
'default' => '1',
|
|
||||||
'option_mode' => 'one',
|
|
||||||
'option_options_method' => 'getPhpConfigs',
|
|
||||||
'save_method' => 'storeSettingField',
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -184,11 +184,6 @@ if($page == 'customers'
|
|||||||
$db->query("DELETE FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
$db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
$result = $db->query("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
|
||||||
while($row = $db->fetch_array($result))
|
|
||||||
{
|
|
||||||
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name`='" . $row['username'] . "'");
|
|
||||||
}
|
|
||||||
$db->query("DELETE FROM `" . TABLE_FTP_GROUPS . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_FTP_GROUPS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
$db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid`='" . (int)$id . "'");
|
||||||
@@ -597,7 +592,6 @@ if($page == 'customers'
|
|||||||
inserttask('1');
|
inserttask('1');
|
||||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
|
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
|
||||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_GROUPS . "` " . "(`customerid`, `groupname`, `gid`, `members`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($guid) . "', '" . $db->escape($loginname) . "')");
|
$result = $db->query("INSERT INTO `" . TABLE_FTP_GROUPS . "` " . "(`customerid`, `groupname`, `gid`, `members`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($guid) . "', '" . $db->escape($loginname) . "')");
|
||||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($loginname) . "', 'user', '0', '0', '0', '0', '0', '0')");
|
|
||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added ftp-account for user '" . $loginname . "'");
|
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added ftp-account for user '" . $loginname . "'");
|
||||||
|
|
||||||
if($createstdsubdomain == '1')
|
if($createstdsubdomain == '1')
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ if($page == 'domains'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
|
$phpsettingid = '1';
|
||||||
$mod_fcgid_starter = '-1';
|
$mod_fcgid_starter = '-1';
|
||||||
$mod_fcgid_maxrequests = '-1';
|
$mod_fcgid_maxrequests = '-1';
|
||||||
}
|
}
|
||||||
@@ -315,7 +315,7 @@ if($page == 'domains'
|
|||||||
{
|
{
|
||||||
$openbasedir = '1';
|
$openbasedir = '1';
|
||||||
$safemode = '1';
|
$safemode = '1';
|
||||||
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
|
$phpsettingid = '1';
|
||||||
$mod_fcgid_starter = '-1';
|
$mod_fcgid_starter = '-1';
|
||||||
$mod_fcgid_maxrequests = '-1';
|
$mod_fcgid_maxrequests = '-1';
|
||||||
}
|
}
|
||||||
@@ -377,8 +377,7 @@ if($page == 'domains'
|
|||||||
|
|
||||||
if($aliasdomain != 0)
|
if($aliasdomain != 0)
|
||||||
{
|
{
|
||||||
// also check ip/port combination to be the same, #176
|
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
|
||||||
$aliasdomain_check = $db->query_first('SELECT `d`.id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($openbasedir != '1')
|
if($openbasedir != '1')
|
||||||
@@ -564,7 +563,7 @@ if($page == 'domains'
|
|||||||
$row_ipandport['ip'] = '[' . $row_ipandport['ip'] . ']';
|
$row_ipandport['ip'] = '[' . $row_ipandport['ip'] . ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
$ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id'], $settings['system']['defaultip']);
|
$ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ssl_ipsandports = '';
|
$ssl_ipsandports = '';
|
||||||
@@ -609,7 +608,7 @@ if($page == 'domains'
|
|||||||
|
|
||||||
while($row = $db->fetch_array($configs))
|
while($row = $db->fetch_array($configs))
|
||||||
{
|
{
|
||||||
$phpconfigs.= makeoption($row['description'], $row['id'], $settings['system']['mod_fcgid_defaultini'], true, true);
|
$phpconfigs.= makeoption($row['description'], $row['id'], '1', true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$isbinddomain = makeyesno('isbinddomain', '1', '0', '1');
|
$isbinddomain = makeyesno('isbinddomain', '1', '0', '1');
|
||||||
@@ -891,8 +890,7 @@ if($page == 'domains'
|
|||||||
|
|
||||||
if($aliasdomain != 0)
|
if($aliasdomain != 0)
|
||||||
{
|
{
|
||||||
// also check ip/port combination to be the same, #176
|
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
|
||||||
$aliasdomain_check = $db->query_first('SELECT `d`.`id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($aliasdomain_check['id'] != $aliasdomain)
|
if($aliasdomain_check['id'] != $aliasdomain)
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ if($page == 'overview')
|
|||||||
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` SET `description` = '" . $db->escape($description) . "', `binary` = '" . $db->escape($binary) . "', `file_extensions` = '" . $db->escape($file_extensions) . "', `mod_fcgid_starter` = '" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests` = '" . $db->escape($mod_fcgid_maxrequests) . "', `phpsettings` = '" . $db->escape($phpsettings) . "'");
|
$db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` SET `description` = '" . $db->escape($description) . "', `binary` = '" . $db->escape($binary) . "', `file_extensions` = '" . $db->escape($file_extensions) . "', `mod_fcgid_starter` = '" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests` = '" . $db->escape($mod_fcgid_maxrequests) . "', `phpsettings` = '" . $db->escape($phpsettings) . "'");
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $description . "' has been created by '" . $userinfo['loginname'] . "'");
|
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $value . "' has been created by '" . $userinfo['loginname'] . "'");
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -102,12 +102,11 @@ if($page == 'tickets'
|
|||||||
if($_cid != $row['customerid'])
|
if($_cid != $row['customerid'])
|
||||||
{
|
{
|
||||||
$cid = $row['customerid'];
|
$cid = $row['customerid'];
|
||||||
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
$usr = $db->query_first('SELECT `firstname`, `name`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||||
WHERE `customerid` = "' . (int)$cid . '"');
|
WHERE `customerid` = "' . (int)$cid . '"');
|
||||||
|
|
||||||
if(isset($usr['loginname'])) {
|
if(isset($usr['loginname'])) {
|
||||||
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
|
$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
|
||||||
//$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
|
|
||||||
} else {
|
} else {
|
||||||
$customer = $lng['ticket']['nonexistingcustomer'];
|
$customer = $lng['ticket']['nonexistingcustomer'];
|
||||||
}
|
}
|
||||||
@@ -198,12 +197,12 @@ if($page == 'tickets'
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$categories = '';
|
$categories = '';
|
||||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
|
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `name` ASC');
|
||||||
|
|
||||||
if(isset($result['name'])
|
if(isset($result['name'])
|
||||||
&& $result['name'] != '')
|
&& $result['name'] != '')
|
||||||
{
|
{
|
||||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
|
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `name` ASC');
|
||||||
|
|
||||||
while($row = $db->fetch_array($result2))
|
while($row = $db->fetch_array($result2))
|
||||||
{
|
{
|
||||||
@@ -220,12 +219,27 @@ if($page == 'tickets'
|
|||||||
|
|
||||||
while($row_customer = $db->fetch_array($result_customers))
|
while($row_customer = $db->fetch_array($result_customers))
|
||||||
{
|
{
|
||||||
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
if($row_customer['company'] == '')
|
||||||
|
{
|
||||||
|
$customers.= makeoption($row_customer['name'] . ', ' . $row_customer['firstname'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($row_customer['name'] != ''
|
||||||
|
&& $row_customer['firstname'] != '')
|
||||||
|
{
|
||||||
|
$customers.= makeoption($row_customer['name'] . ', ' . $row_customer['firstname'] . ' | ' . $row_customer['company'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$customers.= makeoption($row_customer['company'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
|
$priorities = makeoption($lng['ticket']['unf_high'], '1');
|
||||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
|
$priorities.= makeoption($lng['ticket']['unf_normal'], '2');
|
||||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
|
$priorities.= makeoption($lng['ticket']['unf_low'], '3');
|
||||||
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
|
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -421,11 +435,10 @@ elseif($page == 'categories'
|
|||||||
{
|
{
|
||||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets::categories");
|
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets::categories");
|
||||||
$fields = array(
|
$fields = array(
|
||||||
'name' => $lng['ticket']['category'],
|
'name' => $lng['ticket']['category']
|
||||||
'logicalorder' => $lng['ticket']['logicalorder']
|
|
||||||
);
|
);
|
||||||
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKET_CATS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKET_CATS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||||
$result = $db->query("SELECT `main`.`id`, `main`.`name`, `main`.`logicalorder`, (
|
$result = $db->query("SELECT `main`.`id`, `main`.`name`, (
|
||||||
SELECT COUNT(`sub`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub`
|
SELECT COUNT(`sub`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub`
|
||||||
WHERE `sub`.`category` = `main`.`id`
|
WHERE `sub`.`category` = `main`.`id`
|
||||||
AND `sub`.`answerto` = '0' AND `sub`.`adminid` = '" . $userinfo['adminid'] . "')
|
AND `sub`.`answerto` = '0' AND `sub`.`adminid` = '" . $userinfo['adminid'] . "')
|
||||||
@@ -468,12 +481,6 @@ elseif($page == 'categories'
|
|||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
$category = validate($_POST['category'], 'category');
|
$category = validate($_POST['category'], 'category');
|
||||||
$order = validate($_POST['logicalorder'], 'logicalorder');
|
|
||||||
|
|
||||||
if($order < 1 || $order >= 1000)
|
|
||||||
{
|
|
||||||
$order = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($category == '')
|
if($category == '')
|
||||||
{
|
{
|
||||||
@@ -481,7 +488,7 @@ elseif($page == 'categories'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ticket::addCategory($db, $category, $userinfo['adminid'], $order);
|
ticket::addCategory($db, $category, $userinfo['adminid']);
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "added ticket-category '" . $category . "'");
|
$log->logAction(ADM_ACTION, LOG_INFO, "added ticket-category '" . $category . "'");
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
}
|
}
|
||||||
@@ -498,12 +505,6 @@ elseif($page == 'categories'
|
|||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
$category = validate($_POST['category'], 'category');
|
$category = validate($_POST['category'], 'category');
|
||||||
$order = validate($_POST['logicalorder'], 'logicalorder');
|
|
||||||
|
|
||||||
if($order < 1 || $order >= 1000)
|
|
||||||
{
|
|
||||||
$order = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($category == '')
|
if($category == '')
|
||||||
{
|
{
|
||||||
@@ -511,7 +512,7 @@ elseif($page == 'categories'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ticket::editCategory($db, $category, $id, $order);
|
ticket::editCategory($db, $category, $id);
|
||||||
$log->logAction(ADM_ACTION, LOG_INFO, "edited ticket-category '" . $category . "'");
|
$log->logAction(ADM_ACTION, LOG_INFO, "edited ticket-category '" . $category . "'");
|
||||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||||
}
|
}
|
||||||
@@ -633,15 +634,14 @@ elseif($page == 'archive'
|
|||||||
if($_cid != $ticket['customerid'])
|
if($_cid != $ticket['customerid'])
|
||||||
{
|
{
|
||||||
$cid = $ticket['customerid'];
|
$cid = $ticket['customerid'];
|
||||||
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
$usr = $db->query_first('SELECT `firstname`, `name`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||||
WHERE `customerid` = "' . (int)$cid . '"');
|
WHERE `customerid` = "' . (int)$cid . '"');
|
||||||
|
|
||||||
if(isset($usr['loginname'])) {
|
if(isset($usr['loginname'])) {
|
||||||
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
|
$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
|
||||||
} else {
|
} else {
|
||||||
$customer = $lng['ticket']['nonexistingcustomer'];
|
$customer = $lng['ticket']['nonexistingcustomer'];
|
||||||
}
|
}
|
||||||
|
|
||||||
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
|
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -718,11 +718,18 @@ elseif($page == 'archive'
|
|||||||
}
|
}
|
||||||
|
|
||||||
$customers = makeoption($lng['ticket']['nocustomer'], '-1', '-1');
|
$customers = makeoption($lng['ticket']['nocustomer'], '-1', '-1');
|
||||||
$result_customers = $db->query("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY `name` ASC");
|
$result = $db->query_first('SELECT `customerid` FROM `' . TABLE_PANEL_CUSTOMERS . '` ' . ($userinfo['customers_see_all'] ? '' : ' WHERE `adminid` = "' . (int)$userinfo['adminid'] . '" ') . 'ORDER BY `name` ASC');
|
||||||
|
|
||||||
while($row_customer = $db->fetch_array($result_customers))
|
if(isset($result['customerid'])
|
||||||
|
&& $result['customerid'] != '')
|
||||||
{
|
{
|
||||||
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
$result2 = $db->query('SELECT `customerid`, `loginname`, `firstname`, `name`
|
||||||
|
FROM `' . TABLE_PANEL_CUSTOMERS . '` ' . ($userinfo['customers_see_all'] ? '' : ' WHERE `adminid` = "' . (int)$userinfo['adminid'] . '" ') . ' ORDER BY `name` ASC');
|
||||||
|
|
||||||
|
while($row = $db->fetch_array($result2))
|
||||||
|
{
|
||||||
|
$customers.= makeoption($row['name'] . ', ' . $row['firstname'] . ' (' . $row['loginname'] . ')', $row['customerid']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ticket/archive") . "\";");
|
eval("echo \"" . getTemplate("ticket/archive") . "\";");
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ if($page == 'overview')
|
|||||||
|
|
||||||
include_once './install/updatesql.php';
|
include_once './install/updatesql.php';
|
||||||
|
|
||||||
$redirect_url = 'admin_index.php?s=' . $s;
|
$redirect_url = 'admin_index.php';
|
||||||
eval("echo \"" . getTemplate("update/update_end") . "\";");
|
eval("echo \"" . getTemplate("update/update_end") . "\";");
|
||||||
|
|
||||||
updateCounters();
|
updateCounters();
|
||||||
@@ -116,7 +116,7 @@ if($page == 'overview')
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$success_message = $lng['update']['noupdatesavail'];
|
$success_message = $lng['update']['noupdatesavail'];
|
||||||
$redirect_url = 'admin_index.php?s=' . $s;
|
$redirect_url = 'admin_index.php';
|
||||||
eval("echo \"" . getTemplate("update/noupdatesavail") . "\";");
|
eval("echo \"" . getTemplate("update/noupdatesavail") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -229,8 +229,7 @@ elseif($page == 'domains')
|
|||||||
|
|
||||||
if($aliasdomain != 0)
|
if($aliasdomain != 0)
|
||||||
{
|
{
|
||||||
// also check ip/port combination to be the same, #176
|
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
|
||||||
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$domain_check['ipandport'].'\'');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['url'])
|
if(isset($_POST['url'])
|
||||||
@@ -481,8 +480,7 @@ elseif($page == 'domains')
|
|||||||
{
|
{
|
||||||
$result['domain'] = $idna_convert->decode($result['domain']);
|
$result['domain'] = $idna_convert->decode($result['domain']);
|
||||||
$domains = makeoption($lng['domains']['noaliasdomain'], 0, $result['aliasdomain'], true);
|
$domains = makeoption($lng['domains']['noaliasdomain'], 0, $result['aliasdomain'], true);
|
||||||
// also check ip/port combination to be the same, #176
|
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC");
|
||||||
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` AND `d`.`ipandport` = '".(int)$result['ipandport']."' ORDER BY `d`.`domain` ASC");
|
|
||||||
|
|
||||||
while($row_domain = $db->fetch_array($result_domains))
|
while($row_domain = $db->fetch_array($result_domains))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -97,11 +97,6 @@ elseif($page == 'accounts')
|
|||||||
&& $_POST['send'] == 'send')
|
&& $_POST['send'] == 'send')
|
||||||
{
|
{
|
||||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `up_count`=`up_count`+'" . (int)$result['up_count'] . "', `up_bytes`=`up_bytes`+'" . (int)$result['up_bytes'] . "', `down_count`=`down_count`+'" . (int)$result['down_count'] . "', `down_bytes`=`down_bytes`+'" . (int)$result['down_bytes'] . "' WHERE `username`='" . $db->escape($userinfo['loginname']) . "'");
|
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `up_count`=`up_count`+'" . (int)$result['up_count'] . "', `up_bytes`=`up_bytes`+'" . (int)$result['up_bytes'] . "', `down_count`=`down_count`+'" . (int)$result['down_count'] . "', `down_bytes`=`down_bytes`+'" . (int)$result['down_bytes'] . "' WHERE `username`='" . $db->escape($userinfo['loginname']) . "'");
|
||||||
$result = $db->query("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
|
||||||
while($row = $db->fetch_array($result))
|
|
||||||
{
|
|
||||||
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $db->escape($row['username']) . "'");
|
|
||||||
}
|
|
||||||
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted ftp-account '" . $result['username'] . "'");
|
$log->logAction(USR_ACTION, LOG_INFO, "deleted ftp-account '" . $result['username'] . "'");
|
||||||
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=REPLACE(`members`,'," . $db->escape($result['username']) . "','') WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=REPLACE(`members`,'," . $db->escape($result['username']) . "','') WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
@@ -181,11 +176,6 @@ elseif($page == 'accounts')
|
|||||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $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("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'] . "')");
|
||||||
$result = $db->query("SELECT `bytes_in_used` FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $userinfo['loginname'] . "'");
|
|
||||||
while($row = $db->fetch_array($result))
|
|
||||||
{
|
|
||||||
$db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($username) . "', 'user', '" . $db->escape($row[bytes_in_used]) . "', '0', '0', '0', '0', '0')");
|
|
||||||
}
|
|
||||||
$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("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=CONCAT_WS(',',`members`,'" . $db->escape($username) . "') WHERE `customerid`='" . $userinfo['customerid'] . "' AND `gid`='" . (int)$userinfo['guid'] . "'");
|
||||||
$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_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
|
|
||||||
|
|||||||
@@ -209,12 +209,12 @@ elseif($page == 'tickets')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$categories = '';
|
$categories = '';
|
||||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
|
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
|
||||||
|
|
||||||
if(isset($result['name'])
|
if(isset($result['name'])
|
||||||
&& $result['name'] != '')
|
&& $result['name'] != '')
|
||||||
{
|
{
|
||||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
|
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
|
||||||
|
|
||||||
while($row = $db->fetch_array($result2))
|
while($row = $db->fetch_array($result2))
|
||||||
{
|
{
|
||||||
@@ -226,9 +226,9 @@ elseif($page == 'tickets')
|
|||||||
$categories = makeoption($lng['ticket']['no_cat'], '0');
|
$categories = makeoption($lng['ticket']['no_cat'], '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
|
$priorities = makeoption($lng['ticket']['unf_high'], '1');
|
||||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
|
$priorities.= makeoption($lng['ticket']['unf_normal'], '2');
|
||||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
|
$priorities.= makeoption($lng['ticket']['unf_low'], '3');
|
||||||
$ticketsopen = 0;
|
$ticketsopen = 0;
|
||||||
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
|
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
|
||||||
WHERE `customerid` = "' . $userinfo['customerid'] . '"
|
WHERE `customerid` = "' . $userinfo['customerid'] . '"
|
||||||
|
|||||||
@@ -178,18 +178,9 @@ else
|
|||||||
FROM `" . TABLE_PANEL_TRAFFIC . "`
|
FROM `" . TABLE_PANEL_TRAFFIC . "`
|
||||||
WHERE `customerid`='" . $userinfo['customerid'] . "'
|
WHERE `customerid`='" . $userinfo['customerid'] . "'
|
||||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
||||||
|
$row = mysql_fetch_row($result);
|
||||||
$nums = mysql_num_rows($result);
|
rsort($row);
|
||||||
if($nums > 0)
|
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));
|
||||||
{
|
|
||||||
$row = mysql_fetch_row($result);
|
|
||||||
rsort($row);
|
|
||||||
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));
|
|
||||||
} else {
|
|
||||||
// no records yet
|
|
||||||
$traf['max'] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
||||||
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
||||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
||||||
|
|||||||
@@ -451,7 +451,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.6');
|
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 (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');
|
||||||
@@ -559,16 +559,6 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (128, 'system', 'stdsubdomain', '');
|
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 (129, 'system', 'awstats_path', '/usr/bin/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (130, 'system', 'awstats_conf', '/etc/awstats/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (130, 'system', 'awstats_conf', '/etc/awstats/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (131, 'system', 'defaultttl', '604800');
|
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (132, 'defaultwebsrverrhandler', 'enabled', '0');
|
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (133, 'defaultwebsrverrhandler', 'err401', '');
|
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (134, 'defaultwebsrverrhandler', 'err403', '');
|
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (135, 'defaultwebsrverrhandler', 'err404', '');
|
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (136, 'defaultwebsrverrhandler', 'err500', '');
|
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (137, 'ticket', 'default_priority', '2');
|
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (138, 'system', 'mod_fcgid_defaultini', '1');
|
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (139, 'system', 'ftpserver', 'proftpd');
|
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
@@ -791,7 +781,6 @@ CREATE TABLE `panel_ticket_categories` (
|
|||||||
`id` smallint(5) unsigned NOT NULL auto_increment,
|
`id` smallint(5) unsigned NOT NULL auto_increment,
|
||||||
`name` varchar(60) NOT NULL,
|
`name` varchar(60) NOT NULL,
|
||||||
`adminid` int(11) NOT NULL,
|
`adminid` int(11) NOT NULL,
|
||||||
`logicalorder` int(3) NOT NULL default '1',
|
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=MyISAM;
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
@@ -970,45 +959,3 @@ INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`,
|
|||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (6, 'froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (6, 'froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (7, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 MONTH', '1', 'cron_ticketsreset');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (7, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 MONTH', '1', 'cron_ticketsreset');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (8, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '1', 'cron_ticketarchive');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (8, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '1', 'cron_ticketarchive');
|
||||||
|
|
||||||
# --------------------------------------------------------
|
|
||||||
|
|
||||||
#
|
|
||||||
# Tabellenstruktur fuer Tabelle `ftp_quotalimits`
|
|
||||||
#
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `ftp_quotalimits` (
|
|
||||||
`name` varchar(30) default NULL,
|
|
||||||
`quota_type` enum('user','group','class','all') NOT NULL default 'user',
|
|
||||||
`per_session` enum('false','true') NOT NULL default 'false',
|
|
||||||
`limit_type` enum('soft','hard') NOT NULL default 'hard',
|
|
||||||
`bytes_in_avail` float NOT NULL,
|
|
||||||
`bytes_out_avail` float NOT NULL,
|
|
||||||
`bytes_xfer_avail` float NOT NULL,
|
|
||||||
`files_in_avail` int(10) unsigned NOT NULL,
|
|
||||||
`files_out_avail` int(10) unsigned NOT NULL,
|
|
||||||
`files_xfer_avail` int(10) unsigned NOT NULL
|
|
||||||
) ENGINE=MyISAM;
|
|
||||||
|
|
||||||
#
|
|
||||||
# Dumping data for table `ftp_quotalimits`
|
|
||||||
#
|
|
||||||
|
|
||||||
INSERT INTO `ftp_quotalimits` (`name`, `quota_type`, `per_session`, `limit_type`, `bytes_in_avail`, `bytes_out_avail`, `bytes_xfer_avail`, `files_in_avail`, `files_out_avail`, `files_xfer_avail`) VALUES ('froxlor', 'user', 'false', 'hard', 0, 0, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
# --------------------------------------------------------
|
|
||||||
|
|
||||||
#
|
|
||||||
# Tabellenstruktur fuer Tabelle `ftp_quotatallies`
|
|
||||||
#
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `ftp_quotatallies` (
|
|
||||||
`name` varchar(30) NOT NULL,
|
|
||||||
`quota_type` enum('user','group','class','all') NOT NULL,
|
|
||||||
`bytes_in_used` float NOT NULL,
|
|
||||||
`bytes_out_used` float NOT NULL,
|
|
||||||
`bytes_xfer_used` float NOT NULL,
|
|
||||||
`files_in_used` int(10) unsigned NOT NULL,
|
|
||||||
`files_out_used` int(10) unsigned NOT NULL,
|
|
||||||
`files_xfer_used` int(10) unsigned NOT NULL
|
|
||||||
) ENGINE=MyISAM;
|
|
||||||
|
|||||||
@@ -503,7 +503,7 @@ if(isset($_POST['installstep'])
|
|||||||
|
|
||||||
if($result)
|
if($result)
|
||||||
{
|
{
|
||||||
$filename = "/tmp/froxlor_backup_" . date('YmdHi') . ".sql";
|
$filename = "/tmp/froxlor_backup_" . date(YmdHi) . ".sql";
|
||||||
|
|
||||||
if(is_file("/usr/bin/mysqldump"))
|
if(is_file("/usr/bin/mysqldump"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -191,15 +191,7 @@ if(isFroxlorVersion('0.9-r1'))
|
|||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('spf', 'use_spf', '0');");
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('spf', 'use_spf', '0');");
|
||||||
$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'])
|
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
|
||||||
&& $settings['admin']['syscp_graphic'] != ''
|
|
||||||
){
|
|
||||||
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$settings['admin']['froxlor_graphic'] = 'images/header.gif';
|
|
||||||
}
|
|
||||||
|
|
||||||
lastStepStatus(0);
|
lastStepStatus(0);
|
||||||
|
|
||||||
@@ -480,185 +472,4 @@ if(isFroxlorVersion('0.9.4-svn2'))
|
|||||||
lastStepStatus(0);
|
lastStepStatus(0);
|
||||||
updateToVersion('0.9.5');
|
updateToVersion('0.9.5');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isFroxlorVersion('0.9.5'))
|
|
||||||
{
|
|
||||||
showUpdateStep("Updating from 0.9.5 to 0.9.6-svn1", false);
|
|
||||||
|
|
||||||
showUpdateStep("Adding time-to-live configuration setting");
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'defaultttl', '604800');");
|
|
||||||
lastStepStatus(0);
|
|
||||||
|
|
||||||
showUpdateStep("Updating database table structure for panel_ticket_categories");
|
|
||||||
$db->query("ALTER TABLE `" . TABLE_PANEL_TICKET_CATS . "` ADD `logicalorder` int(3) NOT NULL default '1' AFTER `adminid`;");
|
|
||||||
lastStepStatus(0);
|
|
||||||
|
|
||||||
updateToVersion('0.9.6-svn1');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isFroxlorVersion('0.9.6-svn1'))
|
|
||||||
{
|
|
||||||
showUpdateStep("Updating from 0.9.6-svn1 to 0.9.6-svn2", false);
|
|
||||||
|
|
||||||
$update_adminmail = isset($_POST['update_adminmail']) ? validate($_POST['update_adminmail'], 'update_adminmail') : false;
|
|
||||||
$do_update = true;
|
|
||||||
|
|
||||||
if($update_adminmail !== false)
|
|
||||||
{
|
|
||||||
showUpdateStep("Checking newly entered admin-mail");
|
|
||||||
if(!PHPMailer::ValidateAddress($update_adminmail))
|
|
||||||
{
|
|
||||||
$do_update = false;
|
|
||||||
lastStepStatus(2, 'E-Mail still not valid, go back and try again');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '".$db->escape($update_adminmail)."' WHERE `settinggroup` = 'panel' AND `varname` = 'adminmail';");
|
|
||||||
lastStepStatus(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if($do_update)
|
|
||||||
{
|
|
||||||
updateToVersion('0.9.6-svn2');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isFroxlorVersion('0.9.6-svn2'))
|
|
||||||
{
|
|
||||||
showUpdateStep("Updating from 0.9.6-svn2 to 0.9.6-svn3", false);
|
|
||||||
|
|
||||||
$update_deferr_enable = isset($_POST['update_deferr_enable']) ? true : false;
|
|
||||||
|
|
||||||
$err500 = false;
|
|
||||||
$err401 = false;
|
|
||||||
$err403 = false;
|
|
||||||
$err404 = false;
|
|
||||||
|
|
||||||
showUpdateStep("Adding new webserver configurations to database");
|
|
||||||
if($update_deferr_enable == true)
|
|
||||||
{
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'enabled', '1');");
|
|
||||||
|
|
||||||
if(isset($_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'])."');");
|
|
||||||
$err500 = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($_POST['update_deferr_401'])
|
|
||||||
&& trim($_POST['update_deferr_401']) != ''
|
|
||||||
) {
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_401'])."');");
|
|
||||||
$err401 = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($_POST['update_deferr_403'])
|
|
||||||
&& trim($_POST['update_deferr_403']) != ''
|
|
||||||
) {
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_403'])."');");
|
|
||||||
$err403 = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($_POST['update_deferr_404'])
|
|
||||||
&& trim($_POST['update_deferr_404']) != ''
|
|
||||||
) {
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_404'])."');");
|
|
||||||
$err404 = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$update_deferr_enable) {
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'enabled', '0');");
|
|
||||||
}
|
|
||||||
if(!$err401) {
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err401', '');");
|
|
||||||
}
|
|
||||||
if(!$err403) {
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err403', '');");
|
|
||||||
}
|
|
||||||
if(!$err404) {
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '');");
|
|
||||||
}
|
|
||||||
if(!$err500) {
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '');");
|
|
||||||
}
|
|
||||||
|
|
||||||
lastStepStatus(0);
|
|
||||||
|
|
||||||
updateToVersion('0.9.6-svn3');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isFroxlorVersion('0.9.6-svn3'))
|
|
||||||
{
|
|
||||||
showUpdateStep("Updating from 0.9.6-svn3 to 0.9.6-svn4", false);
|
|
||||||
|
|
||||||
$update_deftic_priority = isset($_POST['update_deftic_priority']) ? intval($_POST['update_deftic_priority']) : 2;
|
|
||||||
|
|
||||||
showUpdateStep("Setting default support-ticket priority");
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('ticket', 'default_priority', '".(int)$update_deftic_priority."');");
|
|
||||||
lastStepStatus(0);
|
|
||||||
|
|
||||||
updateToVersion('0.9.6-svn4');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isFroxlorVersion('0.9.6-svn4'))
|
|
||||||
{
|
|
||||||
showUpdateStep("Updating from 0.9.6-svn4 to 0.9.6-svn5", false);
|
|
||||||
|
|
||||||
$update_defsys_phpconfig = isset($_POST['update_defsys_phpconfig']) ? intval($_POST['update_defsys_phpconfig']) : 1;
|
|
||||||
|
|
||||||
if($update_defsys_phpconfig != 1) {
|
|
||||||
showUpdateStep("Setting default php-configuration to user defined config #".$update_defsys_phpconfig);
|
|
||||||
} else {
|
|
||||||
showUpdateStep("Adding default php-configuration setting to the database");
|
|
||||||
}
|
|
||||||
|
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_defaultini', '".(int)$update_defsys_phpconfig."');");
|
|
||||||
lastStepStatus(0);
|
|
||||||
|
|
||||||
updateToVersion('0.9.6-svn5');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isFroxlorVersion('0.9.6-svn5'))
|
|
||||||
{
|
|
||||||
showUpdateStep("Updating from 0.9.6-svn5 to 0.9.6-svn6", false);
|
|
||||||
|
|
||||||
showUpdateStep("Adding new FTP-quota settings");
|
|
||||||
|
|
||||||
$update_defsys_ftpserver = isset($_POST['update_defsys_ftpserver']) ? intval($_POST['update_defsys_ftpserver']) : 'proftpd';
|
|
||||||
|
|
||||||
// add ftp server setting
|
|
||||||
$db->query("INSERT INTO `panel_settings` SET `settinggroup` = 'system', `varname` = 'ftpserver', `value` = '".$db->escape($update_defsys_ftpserver)."';");
|
|
||||||
|
|
||||||
// add proftpd quota
|
|
||||||
$db->query("CREATE TABLE`ftp_quotalimits` (`name` varchar(30) default NULL, `quota_type` enum('user','group','class','all') NOT NULL default 'user', `per_session` enum('false','true') NOT NULL default 'false', `limit_type` enum('soft','hard') NOT NULL default 'hard', `bytes_in_avail` float NOT NULL, `bytes_out_avail` float NOT NULL, `bytes_xfer_avail` float NOT NULL, `files_in_avail` int(10) unsigned NOT NULL, `files_out_avail` int(10) unsigned NOT NULL, `files_xfer_avail` int(10) unsigned NOT NULL) ENGINE=MyISAM;");
|
|
||||||
|
|
||||||
$db->query("INSERT INTO `ftp_quotalimits` (`name`, `quota_type`, `per_session`, `limit_type`, `bytes_in_avail`, `bytes_out_avail`, `bytes_xfer_avail`, `files_in_avail`, `files_out_avail`, `files_xfer_avail`) VALUES ('froxlor', 'user', 'false', 'hard', 0, 0, 0, 0, 0, 0);");
|
|
||||||
|
|
||||||
$db->query("CREATE TABLE `ftp_quotatallies` (`name` varchar(30) NOT NULL, `quota_type` enum('user','group','class','all') NOT NULL, `bytes_in_used` float NOT NULL, `bytes_out_used` float NOT NULL, `bytes_xfer_used` float NOT NULL, `files_in_used` int(10) unsigned NOT NULL, `files_out_used` int(10) unsigned NOT NULL, `files_xfer_used` int(10) unsigned NOT NULL ) ENGINE=MyISAM;");
|
|
||||||
|
|
||||||
// fill quota tallies
|
|
||||||
$result_ftp_users = $db->query("SELECT username FROM `" . TABLE_FTP_USERS . "` WHERE 1;");
|
|
||||||
|
|
||||||
while($row_ftp_users = $db->fetch_array($result_ftp_users))
|
|
||||||
{
|
|
||||||
$result_ftp_quota = $db->query("SELECT diskspace_used FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE loginname = SUBSTRING_INDEX('" . $row_ftp_users['username'] . "', '" . $settings['customer']['ftpprefix'] . "', 1);");
|
|
||||||
$row_ftp_quota = mysql_fetch_row($result_ftp_quota);
|
|
||||||
$db->query("INSERT INTO `ftp_quotatallies` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $row_ftp_users['username'] . "', 'user', '" . $row_ftp_quota[0] . "'*1024, '0', '0', '0', '0', '0');");
|
|
||||||
}
|
|
||||||
|
|
||||||
lastStepStatus(0);
|
|
||||||
|
|
||||||
updateToVersion('0.9.6-svn6');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isFroxlorVersion('0.9.6-svn6'))
|
|
||||||
{
|
|
||||||
showUpdateStep("Updating from 0.9.6-svn6 to 0.9.6 final");
|
|
||||||
lastStepStatus(0);
|
|
||||||
updateToVersion('0.9.6');
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -46,11 +46,8 @@ function getPreConfig($current_version)
|
|||||||
|
|
||||||
function versionInUpdate($current_version, $version_to_check)
|
function versionInUpdate($current_version, $version_to_check)
|
||||||
{
|
{
|
||||||
if (!isFroxlor()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
$pos_a = strpos($current_version, '-svn');
|
$pos_a = strpos($current_version, '-svn');
|
||||||
$pos_b = strpos($version_to_check, '-svn');
|
$pos_b = strpos($current_version, '-svn');
|
||||||
// if we compare svn-versions, we have to add -svn0 to the version
|
// if we compare svn-versions, we have to add -svn0 to the version
|
||||||
// to compare it correctly
|
// to compare it correctly
|
||||||
if($pos_a === false && $pos_b !== false)
|
if($pos_a === false && $pos_b !== false)
|
||||||
|
|||||||
@@ -26,85 +26,13 @@
|
|||||||
*/
|
*/
|
||||||
function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||||
{
|
{
|
||||||
global $settings, $lng;
|
|
||||||
|
|
||||||
if(versionInUpdate($current_version, '0.9.4-svn2'))
|
if(versionInUpdate($current_version, '0.9.4-svn2'))
|
||||||
{
|
{
|
||||||
$has_preconfig = true;
|
$has_preconfig = true;
|
||||||
$description = '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 .= '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). ';
|
||||||
$description.= '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 .= '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 />';
|
||||||
$description.= '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.';
|
$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 />';
|
||||||
$question = '<strong>Do you want to use wildcard-entries for existing domains?:</strong> ';
|
$return .= '<strong>Do you want to use wildcard-entries for existing domains?:</strong> ';
|
||||||
$question.= makeyesno('update_domainwildcardentry', '1', '0', '1');
|
$return .= makeyesno('update_domainwildcardentry', '1', '0', '1').'<br /><br />';
|
||||||
|
|
||||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(versionInUpdate($current_version, '0.9.6-svn2'))
|
|
||||||
{
|
|
||||||
if(!PHPMailer::ValidateAddress($settings['panel']['adminmail']))
|
|
||||||
{
|
|
||||||
$has_preconfig = true;
|
|
||||||
$description = 'Froxlor uses a newer version of the phpMailerClass and determined that your current admin-mail address is invalid.';
|
|
||||||
$question = '<strong>Please specify a new admin-email address:</strong> <input type="text" class="text" name="update_adminmail" value="'.$settings['panel']['adminmail'].'" />';
|
|
||||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(versionInUpdate($current_version, '0.9.6-svn3'))
|
|
||||||
{
|
|
||||||
$has_preconfig = true;
|
|
||||||
$description = 'You now have the possibility to define default error-documents for your webserver which replace the default webserver error-messages.';
|
|
||||||
$question = '<strong>Do you want to enable default error-documents?:</strong> ';
|
|
||||||
$question .= makeyesno('update_deferr_enable', '1', '0', '0').'<br /><br />';
|
|
||||||
if($settings['system']['webserver'] == 'apache2')
|
|
||||||
{
|
|
||||||
$question .= 'Path/URL for error 500: <input type="text" class="text" name="update_deferr_500" /><br /><br />';
|
|
||||||
$question .= 'Path/URL for error 401: <input type="text" class="text" name="update_deferr_401" /><br /><br />';
|
|
||||||
$question .= 'Path/URL for error 403: <input type="text" class="text" name="update_deferr_403" /><br /><br />';
|
|
||||||
}
|
|
||||||
$question .= 'Path/URL for error 404: <input type="text" class="text" name="update_deferr_404" />';
|
|
||||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(versionInUpdate($current_version, '0.9.6-svn4'))
|
|
||||||
{
|
|
||||||
$has_preconfig = true;
|
|
||||||
$description = 'You can define a default support-ticket priority level which is pre-selected for new support-tickets.';
|
|
||||||
$question = '<strong>Which should be the default ticket-priority?:</strong> ';
|
|
||||||
$question .= '<select name="update_deftic_priority">';
|
|
||||||
$priorities = makeoption($lng['ticket']['unf_high'], '1', '2');
|
|
||||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', '2');
|
|
||||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3', '2');
|
|
||||||
$question .= $priorities.'</select>';
|
|
||||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(versionInUpdate($current_version, '0.9.6-svn5'))
|
|
||||||
{
|
|
||||||
$has_preconfig = true;
|
|
||||||
$description = 'If you have more than one PHP-configurations defined in Froxlor you can know set a default one which will be used for every domain.';
|
|
||||||
$question = '<strong>Select default PHP-configuration:</strong> ';
|
|
||||||
$question .= '<select name="update_defsys_phpconfig">';
|
|
||||||
$configs_array = getPhpConfigs();
|
|
||||||
$configs = '';
|
|
||||||
foreach($configs_array as $idx => $desc)
|
|
||||||
{
|
|
||||||
$configs .= makeoption($desc, $idx, '1');
|
|
||||||
}
|
|
||||||
$question .= $configs.'</select>';
|
|
||||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(versionInUpdate($current_version, '0.9.6-svn6'))
|
|
||||||
{
|
|
||||||
$has_preconfig = true;
|
|
||||||
$description = 'For the new FTP-quota feature, you can now chose the currently used ftpd-software.';
|
|
||||||
$question = '<strong>Used FTPd-software:</strong> ';
|
|
||||||
$question .= '<select name="update_defsys_ftpserver">';
|
|
||||||
$question .= makeoption('ProFTPd', 'proftpd', 'proftpd');
|
|
||||||
$question .= makeoption('PureFTPd', 'pureftpd', 'proftpd');
|
|
||||||
$question .= '</select>';
|
|
||||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -344,19 +344,12 @@ class ticket
|
|||||||
* Add a support-categories
|
* Add a support-categories
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static public function addCategory($_db, $_category = null, $_admin = 1, $_order = 1)
|
static public function addCategory($_db, $_category = null, $_admin = 1)
|
||||||
{
|
{
|
||||||
if($_category != null
|
if($_category != null
|
||||||
&& $_category != '')
|
&& $_category != '')
|
||||||
{
|
{
|
||||||
if($_order < 1) {
|
$_db->query('INSERT INTO `' . TABLE_PANEL_TICKET_CATS . '` (`name`, `adminid`) VALUES ("' . $_db->escape($_category) . '", "' . (int)$_admin . '")');
|
||||||
$_order = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$_db->query('INSERT INTO `' . TABLE_PANEL_TICKET_CATS . '` SET
|
|
||||||
`name` = "' . $_db->escape($_category) . '",
|
|
||||||
`adminid` = "' . (int)$_admin . '",
|
|
||||||
`logicalorder` = "' . (int)$_order . '"');
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -367,19 +360,13 @@ class ticket
|
|||||||
* Edit a support-categories
|
* Edit a support-categories
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static public function editCategory($_db, $_category = null, $_id = 0, $_order = 1)
|
static public function editCategory($_db, $_category = null, $_id = 0)
|
||||||
{
|
{
|
||||||
if($_category != null
|
if($_category != null
|
||||||
&& $_category != ''
|
&& $_category != ''
|
||||||
&& $_id != 0)
|
&& $_id != 0)
|
||||||
{
|
{
|
||||||
if($_order < 1) {
|
$_db->query('UPDATE `' . TABLE_PANEL_TICKET_CATS . '` SET `name` = "' . $_db->escape($_category) . '"
|
||||||
$_order = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$_db->query('UPDATE `' . TABLE_PANEL_TICKET_CATS . '` SET
|
|
||||||
`name` = "' . $_db->escape($_category) . '",
|
|
||||||
`logicalorder` = "' . (int)$_order . '"
|
|
||||||
WHERE `id` = "' . (int)$_id . '"');
|
WHERE `id` = "' . (int)$_id . '"');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,11 +272,10 @@ return Array(
|
|||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'apt-get install awstats',
|
'apt-get install awstats',
|
||||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/',
|
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
|
||||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
|
|||||||
@@ -89,48 +89,9 @@ return Array(
|
|||||||
'smtp' => Array(
|
'smtp' => Array(
|
||||||
'label' => $lng['admin']['configfiles']['smtp'],
|
'label' => $lng['admin']['configfiles']['smtp'],
|
||||||
'daemons' => Array(
|
'daemons' => Array(
|
||||||
'postfix_courier' => Array(
|
'postfix' => Array(
|
||||||
'label' => 'Postfix/Courier',
|
'label' => 'Postfix',
|
||||||
'commands_1' => Array(
|
'commands_1' => Array(
|
||||||
'echo "mail-mta/postfix -dovecot-sasl sasl" >> /etc/portage/package.use',
|
|
||||||
'emerge -av postfix',
|
|
||||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
|
||||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
|
||||||
'chmod 0750 ' . $settings['system']['vmail_homedir'],
|
|
||||||
'mv /etc/postfix/main.cf /etc/postfix/main.cf.gentoo',
|
|
||||||
'touch /etc/postfix/main.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'touch /etc/sasl2/smtpd.conf',
|
|
||||||
'chown root:root /etc/postfix/main.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chown root:root /etc/sasl2/smtpd.conf',
|
|
||||||
'chmod 0644 /etc/postfix/main.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chmod 0600 /etc/sasl2/smtpd.conf',
|
|
||||||
),
|
|
||||||
'files' => Array(
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf'
|
|
||||||
),
|
|
||||||
'restart' => Array(
|
|
||||||
'rc-update add postfix default',
|
|
||||||
'/etc/init.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'postfix_dovecot' => Array(
|
|
||||||
'label' => 'Postfix/Dovecot',
|
|
||||||
'commands_1' => Array(
|
|
||||||
'echo "mail-mta/postfix dovecot-sasl -sasl" >> /etc/portage/package.use',
|
|
||||||
'emerge -av postfix',
|
|
||||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||||
'chmod 0750 ' . $settings['system']['vmail_homedir'],
|
'chmod 0750 ' . $settings['system']['vmail_homedir'],
|
||||||
@@ -140,23 +101,27 @@ return Array(
|
|||||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||||
|
'touch /etc/sasl2/smtpd.conf',
|
||||||
'chown root:root /etc/postfix/main.cf',
|
'chown root:root /etc/postfix/main.cf',
|
||||||
'chown root:root /etc/postfix/master.cf',
|
'chown root:root /etc/postfix/master.cf',
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||||
|
'chown root:root /etc/sasl2/smtpd.conf',
|
||||||
'chmod 0644 /etc/postfix/main.cf',
|
'chmod 0644 /etc/postfix/main.cf',
|
||||||
'chmod 0644 /etc/postfix/master.cf',
|
'chmod 0644 /etc/postfix/master.cf',
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||||
|
'chmod 0600 /etc/sasl2/smtpd.conf',
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf'
|
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||||
|
'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'rc-update add postfix default',
|
'rc-update add postfix default',
|
||||||
|
|||||||
@@ -95,26 +95,30 @@ return Array(
|
|||||||
'smtp' => Array(
|
'smtp' => Array(
|
||||||
'label' => $lng['admin']['configfiles']['smtp'],
|
'label' => $lng['admin']['configfiles']['smtp'],
|
||||||
'daemons' => Array(
|
'daemons' => Array(
|
||||||
'postfix_courier' => Array(
|
'postfix' => Array(
|
||||||
'label' => 'Postfix/Courier',
|
'label' => 'Postfix',
|
||||||
'commands' => Array(
|
'commands_1' => Array(
|
||||||
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
'mkdir -p /etc/postfix/sasl',
|
||||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
||||||
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
||||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||||
|
'mv /etc/postfix/main.cf /etc/postfix/main.cf.ubuntu',
|
||||||
|
'touch /etc/postfix/main.cf',
|
||||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||||
'touch /etc/postfix/sasl/smtpd.conf',
|
'touch /etc/postfix/sasl/smtpd.conf',
|
||||||
'chown root:root /etc/postfix/main.cf',
|
'chown root:root /etc/postfix/main.cf',
|
||||||
|
'chown root:root /etc/postfix/master.cf',
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||||
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
||||||
'chmod 0644 /etc/postfix/main.cf',
|
'chmod 0644 /etc/postfix/main.cf',
|
||||||
|
'chmod 0644 /etc/postfix/master.cf',
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||||
@@ -122,6 +126,7 @@ return Array(
|
|||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||||
|
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||||
@@ -132,42 +137,6 @@ return Array(
|
|||||||
'newaliases'
|
'newaliases'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'postfix_dovecot' => Array(
|
|
||||||
'label' => 'Postfix/Dovecot',
|
|
||||||
'commands' => Array(
|
|
||||||
'apt-get install postfix postfix-mysql',
|
|
||||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
|
||||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
|
||||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
|
||||||
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
|
||||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
|
||||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
|
||||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chown root:root /etc/postfix/main.cf',
|
|
||||||
'chown root:root /etc/postfix/master.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chmod 0644 /etc/postfix/main.cf',
|
|
||||||
'chmod 0644 /etc/postfix/master.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
),
|
|
||||||
'files' => Array(
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
|
||||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf'
|
|
||||||
),
|
|
||||||
'restart' => Array(
|
|
||||||
'/etc/init.d/postfix restart',
|
|
||||||
'newaliases'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'postfix_mxaccess' => Array(
|
'postfix_mxaccess' => Array(
|
||||||
'label' => 'Postfix MX-Access (anti spam)',
|
'label' => 'Postfix MX-Access (anti spam)',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
@@ -297,11 +266,10 @@ return Array(
|
|||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'apt-get install awstats',
|
'apt-get install awstats',
|
||||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/',
|
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
|
||||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
|
|||||||
@@ -96,10 +96,11 @@ return Array(
|
|||||||
'smtp' => Array(
|
'smtp' => Array(
|
||||||
'label' => $lng['admin']['configfiles']['smtp'],
|
'label' => $lng['admin']['configfiles']['smtp'],
|
||||||
'daemons' => Array(
|
'daemons' => Array(
|
||||||
'postfix_courier' => Array(
|
'postfix' => Array(
|
||||||
'label' => 'Postfix/Courier',
|
'label' => 'Postfix',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
||||||
|
'mkdir -p /etc/postfix/sasl',
|
||||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
||||||
@@ -111,11 +112,13 @@ return Array(
|
|||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||||
'touch /etc/postfix/sasl/smtpd.conf',
|
'touch /etc/postfix/sasl/smtpd.conf',
|
||||||
'chown root:root /etc/postfix/main.cf',
|
'chown root:root /etc/postfix/main.cf',
|
||||||
|
'chown root:root /etc/postfix/master.cf',
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||||
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
||||||
'chmod 0644 /etc/postfix/main.cf',
|
'chmod 0644 /etc/postfix/main.cf',
|
||||||
|
'chmod 0644 /etc/postfix/master.cf',
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||||
@@ -123,6 +126,7 @@ return Array(
|
|||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||||
|
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||||
@@ -133,42 +137,6 @@ return Array(
|
|||||||
'newaliases'
|
'newaliases'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'postfix_dovecot' => Array(
|
|
||||||
'label' => 'Postfix/Dovecot',
|
|
||||||
'commands' => Array(
|
|
||||||
'apt-get install postfix postfix-mysql',
|
|
||||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
|
||||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
|
||||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
|
||||||
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
|
||||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
|
||||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
|
||||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chown root:root /etc/postfix/main.cf',
|
|
||||||
'chown root:root /etc/postfix/master.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chmod 0644 /etc/postfix/main.cf',
|
|
||||||
'chmod 0644 /etc/postfix/master.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
),
|
|
||||||
'files' => Array(
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
|
||||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf'
|
|
||||||
),
|
|
||||||
'restart' => Array(
|
|
||||||
'/etc/init.d/postfix restart',
|
|
||||||
'newaliases'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'postfix_mxaccess' => Array(
|
'postfix_mxaccess' => Array(
|
||||||
'label' => 'Postfix MX-Access (anti spam)',
|
'label' => 'Postfix MX-Access (anti spam)',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
@@ -305,11 +273,10 @@ return Array(
|
|||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'apt-get install awstats',
|
'apt-get install awstats',
|
||||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/',
|
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
|
||||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
|
|||||||
@@ -153,11 +153,10 @@ return Array(
|
|||||||
'awstats' => Array(
|
'awstats' => Array(
|
||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'awstats_configure.pl',
|
'awstats_configure.pl'
|
||||||
makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
* @author Florian Lippert <flo@syscp.org>
|
* @author Florian Lippert <flo@syscp.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function isConfigDir($dir, $ifexists = false)
|
function isConfigDir($dir)
|
||||||
{
|
{
|
||||||
if(file_exists($dir))
|
if(file_exists($dir))
|
||||||
{
|
{
|
||||||
@@ -42,16 +42,9 @@ function isConfigDir($dir, $ifexists = false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!$ifexists)
|
if(substr($dir, -1) == '/')
|
||||||
{
|
{
|
||||||
if(substr($dir, -1) == '/')
|
$returnval = true;
|
||||||
{
|
|
||||||
$returnval = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$returnval = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Functions
|
|
||||||
* @version $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* returns an array for the settings-array
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
function getPhpConfigs()
|
|
||||||
{
|
|
||||||
global $db;
|
|
||||||
|
|
||||||
$query = 'SELECT * FROM `' . TABLE_PANEL_PHPCONFIGS . '` ';
|
|
||||||
$result = $db->query($query);
|
|
||||||
$configs_array = array();
|
|
||||||
|
|
||||||
while($row = $db->fetch_array($result))
|
|
||||||
{
|
|
||||||
if(!isset($configs_array[$row['id']])
|
|
||||||
&& !in_array($row['id'], $configs_array))
|
|
||||||
{
|
|
||||||
$configs_array[$row['id']] = html_entity_decode($row['description']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $configs_array;
|
|
||||||
}
|
|
||||||
@@ -43,7 +43,7 @@ function validateDomain($domainname)
|
|||||||
if(version_compare("5.2.13", PHP_VERSION, "=")
|
if(version_compare("5.2.13", PHP_VERSION, "=")
|
||||||
|| version_compare("5.3.2", PHP_VERSION, "="))
|
|| version_compare("5.3.2", PHP_VERSION, "="))
|
||||||
{
|
{
|
||||||
$pattern = '/^http:\/\/([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6}$/i';
|
$pattern = '/^([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6}$/i';
|
||||||
if(preg_match($pattern, $domainname_tmp))
|
if(preg_match($pattern, $domainname_tmp))
|
||||||
{
|
{
|
||||||
return $domainname;
|
return $domainname;
|
||||||
|
|||||||
@@ -29,56 +29,44 @@
|
|||||||
function validateUrl($url)
|
function validateUrl($url)
|
||||||
{
|
{
|
||||||
if(strtolower(substr($url, 0, 7)) != "http://"
|
if(strtolower(substr($url, 0, 7)) != "http://"
|
||||||
&& strtolower(substr($url, 0, 8)) != "https://")
|
&& strtolower(substr($url, 0, 8)) != "https://")
|
||||||
{
|
{
|
||||||
$url = 'http://' . $url;
|
$url = 'http://' . $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(version_compare("5.2.13", PHP_VERSION, "=")
|
if(filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) !== false)
|
||||||
|| version_compare("5.3.2", PHP_VERSION, "="))
|
|
||||||
{
|
{
|
||||||
$pattern = '/^https?:\/\/([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6}$/i';
|
return true;
|
||||||
if(preg_match($pattern, $url))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) !== false)
|
if(strtolower(substr($url, 0, 7)) == "http://"
|
||||||
|
|| strtolower(substr($url, 0, 8)) == "https://")
|
||||||
{
|
{
|
||||||
return true;
|
if(strtolower(substr($url, 0, 7)) == "http://")
|
||||||
}
|
{
|
||||||
}
|
$ip = strtolower(substr($url, 7));
|
||||||
|
}
|
||||||
|
|
||||||
// not an fqdn
|
if(strtolower(substr($url, 0, 8)) == "https://")
|
||||||
if(strtolower(substr($url, 0, 7)) == "http://"
|
{
|
||||||
|| strtolower(substr($url, 0, 8)) == "https://")
|
$ip = strtolower(substr($url, 8));
|
||||||
{
|
}
|
||||||
if(strtolower(substr($url, 0, 7)) == "http://")
|
|
||||||
{
|
|
||||||
$ip = strtolower(substr($url, 7));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(strtolower(substr($url, 0, 8)) == "https://")
|
$ip = substr($ip, 0, strpos($ip, '/'));
|
||||||
{
|
|
||||||
$ip = strtolower(substr($url, 8));
|
|
||||||
}
|
|
||||||
|
|
||||||
$ip = substr($ip, 0, strpos($ip, '/'));
|
if(validate_ip($ip, true) !== false)
|
||||||
|
{
|
||||||
if(validate_ip($ip, true) !== false)
|
return true;
|
||||||
{
|
}
|
||||||
return true;
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
22
lib/init.php
22
lib/init.php
@@ -158,15 +158,7 @@ $settings = loadSettings($settings_data, $db);
|
|||||||
if(!isset($settings['admin']['froxlor_graphic'])
|
if(!isset($settings['admin']['froxlor_graphic'])
|
||||||
|| $settings['admin']['froxlor_graphic'] == ''
|
|| $settings['admin']['froxlor_graphic'] == ''
|
||||||
) {
|
) {
|
||||||
if(isset($settings['admin']['syscp_graphic'])
|
$settings['admin']['froxlor_graphic'] = ($settings['admin']['syscp_graphic'] != '') ? $settings['admin']['syscp_graphic'] : 'images/header.gif';
|
||||||
&& $settings['admin']['syscp_graphic'] != ''
|
|
||||||
){
|
|
||||||
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$settings['admin']['froxlor_graphic'] = 'images/header.gif';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -422,14 +414,12 @@ if($page == '')
|
|||||||
/**
|
/**
|
||||||
* Initialize the mailingsystem
|
* Initialize the mailingsystem
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$mail = new PHPMailer();
|
$mail = new PHPMailer();
|
||||||
if(PHPMailer::ValidateAddress($settings['panel']['adminmail']) !== false)
|
// set return-to address and custom sender-name, see #76
|
||||||
{
|
$mail->SetFrom($settings['panel']['adminmail'], $settings['panel']['adminmail_defname']);
|
||||||
// set return-to address and custom sender-name, see #76
|
if ($settings['panel']['adminmail_return'] != '') {
|
||||||
$mail->SetFrom($settings['panel']['adminmail'], $settings['panel']['adminmail_defname']);
|
$mail->AddReplyTo($settings['panel']['adminmail_return'], $settings['panel']['adminmail_defname']);
|
||||||
if ($settings['panel']['adminmail_return'] != '') {
|
|
||||||
$mail->AddReplyTo($settings['panel']['adminmail_return'], $settings['panel']['adminmail_defname']);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
|
|
||||||
define('TABLE_FTP_GROUPS', 'ftp_groups');
|
define('TABLE_FTP_GROUPS', 'ftp_groups');
|
||||||
define('TABLE_FTP_USERS', 'ftp_users');
|
define('TABLE_FTP_USERS', 'ftp_users');
|
||||||
define('TABLE_FTP_QUOTALIMITS', 'ftp_quotalimits');
|
|
||||||
define('TABLE_FTP_QUOTATALLIES', 'ftp_quotatallies');
|
|
||||||
define('TABLE_MAIL_USERS', 'mail_users');
|
define('TABLE_MAIL_USERS', 'mail_users');
|
||||||
define('TABLE_MAIL_VIRTUAL', 'mail_virtual');
|
define('TABLE_MAIL_VIRTUAL', 'mail_virtual');
|
||||||
define('TABLE_PANEL_ADMINS', 'panel_admins');
|
define('TABLE_PANEL_ADMINS', 'panel_admins');
|
||||||
@@ -70,7 +68,7 @@ define('PACKAGE_ENABLED', 2);
|
|||||||
|
|
||||||
// VERSION INFO
|
// VERSION INFO
|
||||||
|
|
||||||
$version = '0.9.6';
|
$version = '0.9.5';
|
||||||
$dbversion = '2';
|
$dbversion = '2';
|
||||||
$branding = '';
|
$branding = '';
|
||||||
|
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ $lng['error']['wwwnotallowed'] = 'www is not allowed for subdomains.';
|
|||||||
$lng['error']['subdomainiswrong'] = 'The subdomain %s contains invalid characters.';
|
$lng['error']['subdomainiswrong'] = 'The subdomain %s contains invalid characters.';
|
||||||
$lng['error']['domaincantbeempty'] = 'The domain-name can not be empty.';
|
$lng['error']['domaincantbeempty'] = 'The domain-name can not be empty.';
|
||||||
$lng['error']['domainexistalready'] = 'The domain %s already exists.';
|
$lng['error']['domainexistalready'] = 'The domain %s already exists.';
|
||||||
$lng['error']['domainisaliasorothercustomer'] = 'The selected alias domain is either itself an alias domain, has a different ip/port combination or belongs to another customer.';
|
$lng['error']['domainisaliasorothercustomer'] = 'The selected alias domain is either itself an alias domain or belongs to another customer.';
|
||||||
$lng['error']['emailexistalready'] = 'The e-mail-Address %s already exists.';
|
$lng['error']['emailexistalready'] = 'The e-mail-Address %s already exists.';
|
||||||
$lng['error']['maindomainnonexist'] = 'The main-domain %s does not exist.';
|
$lng['error']['maindomainnonexist'] = 'The main-domain %s does not exist.';
|
||||||
$lng['error']['destinationnonexist'] = 'Please create your forwarder in the field \'Destination\'.';
|
$lng['error']['destinationnonexist'] = 'Please create your forwarder in the field \'Destination\'.';
|
||||||
@@ -1362,33 +1362,4 @@ $lng['admin']['configfiles']['compactoverview'] = 'Compact-overview';
|
|||||||
$lng['admin']['lastlogin_succ'] = 'Last login';
|
$lng['admin']['lastlogin_succ'] = 'Last login';
|
||||||
$lng['panel']['neverloggedin'] = 'No login yet';
|
$lng['panel']['neverloggedin'] = 'No login yet';
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.6-svn1
|
|
||||||
$lng['serversettings']['defaultttl'] = 'Domain TTL for bind in seconds (default \'604800\' = 1 week)';
|
|
||||||
$lng['ticket']['logicalorder'] = 'Logical order';
|
|
||||||
$lng['ticket']['orderdesc'] = 'Here you can define your own logical order for the ticket-category. Use 1 - 999, lower numbers are displayed first.';
|
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.6-svn3
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_enabled'] = 'Enable default errordocuments for all customers';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err401']['title'] = 'File/URL for error 401';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err401']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err403']['title'] = 'File/URL for error 403';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err403']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err404'] = 'File/URL for error 404';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['title'] = 'File/URL for error 500';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.6-svn4
|
|
||||||
$lng['serversettings']['ticket']['default_priority'] = 'Default support-ticket priority';
|
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.6-svn5
|
|
||||||
$lng['serversettings']['mod_fcgid']['defaultini'] = 'Default PHP configuration for new domains';
|
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.6-svn6
|
|
||||||
$lng['admin']['ftpserver'] = 'FTP Server';
|
|
||||||
$lng['admin']['ftpserversettings'] = 'FTP Server settings';
|
|
||||||
$lng['serversettings']['ftpserver']['desc'] = 'If pureftpd is selected the .ftpquota files for user quotas are created and updated daily';
|
|
||||||
|
|
||||||
// CHANGED IN FROXLOR 0.9.6-svn6
|
|
||||||
$lng['serversettings']['ftpprefix']['description'] = 'Which prefix should ftp accounts have?<br/><b>If you change this you also have to change the Quota SQL Query in your FTP Server config file in case you use it!</b> ';
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ $lng['error']['wwwnotallowed'] = 'Ihre Subdomain darf nicht www heissen.';
|
|||||||
$lng['error']['subdomainiswrong'] = 'Die Subdomain %s enthält ungültige Zeichen.';
|
$lng['error']['subdomainiswrong'] = 'Die Subdomain %s enthält ungültige Zeichen.';
|
||||||
$lng['error']['domaincantbeempty'] = 'Der Domain-Name darf nicht leer sein.';
|
$lng['error']['domaincantbeempty'] = 'Der Domain-Name darf nicht leer sein.';
|
||||||
$lng['error']['domainexistalready'] = 'Die Domain %s existiert bereits.';
|
$lng['error']['domainexistalready'] = 'Die Domain %s existiert bereits.';
|
||||||
$lng['error']['domainisaliasorothercustomer'] = 'Die ausgewählte Aliasdomain ist entweder selber eine Aliasdomain, hat nicht die gleiche IP/Port Kombination oder gehört zu einem anderen Kunden.';
|
$lng['error']['domainisaliasorothercustomer'] = 'Die ausgewählte Aliasdomain ist entweder selber eine Aliasdomain oder gehört zu einem anderen Kunden.';
|
||||||
$lng['error']['emailexistalready'] = 'Die E-Mail-Adresse %s existiert bereits.';
|
$lng['error']['emailexistalready'] = 'Die E-Mail-Adresse %s existiert bereits.';
|
||||||
$lng['error']['maindomainnonexist'] = 'Die Haupt-Domain %s existiert nicht.';
|
$lng['error']['maindomainnonexist'] = 'Die Haupt-Domain %s existiert nicht.';
|
||||||
$lng['error']['destinationnonexist'] = 'Bitte geben Sie Ihre Weiterleitungsadresse im Feld \'Nach\' ein.';
|
$lng['error']['destinationnonexist'] = 'Bitte geben Sie Ihre Weiterleitungsadresse im Feld \'Nach\' ein.';
|
||||||
@@ -1358,33 +1358,4 @@ $lng['success']['settingssaved'] = 'Die Einstellungen wurden erfolgreich gespeic
|
|||||||
$lng['admin']['lastlogin_succ'] = 'Letzte Anmeldung';
|
$lng['admin']['lastlogin_succ'] = 'Letzte Anmeldung';
|
||||||
$lng['panel']['neverloggedin'] = 'Keine Anmeldung bisher';
|
$lng['panel']['neverloggedin'] = 'Keine Anmeldung bisher';
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.6-svn1
|
|
||||||
$lng['serversettings']['defaultttl'] = 'Domain TTL für Bind in Sekunden (default \'604800\' = 1 Woche)';
|
|
||||||
$lng['ticket']['logicalorder'] = 'Logische Sortierung';
|
|
||||||
$lng['ticket']['orderdesc'] = 'Hier kann eine logische Sortierung für die Ticket-Kategorien angegeben werden. Benutze 1 - 999, niedrigere Zahlen werden zuerst angezeigt.';
|
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.6-svn3
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_enabled'] = 'Verwende Standard-Fehlerdokumente für alle Kunden';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err401']['title'] = 'Datei/URL für Fehler 401';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err401']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err403']['title'] = 'Datei/URL für Fehler 403';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err403']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err404'] = 'Datei/URL für Fehler 404';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['title'] = 'Datei/URL für Fehler 500';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.6-svn4
|
|
||||||
$lng['serversettings']['ticket']['default_priority'] = 'Voreingestellte Support-Ticket Priorität';
|
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.6-svn5
|
|
||||||
$lng['serversettings']['mod_fcgid']['defaultini'] = 'Voreingestellte PHP Konfiguration für neue Domains';
|
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.6-svn5
|
|
||||||
$lng['admin']['ftpserver'] = 'FTP Server';
|
|
||||||
$lng['admin']['ftpserversettings'] = 'FTP Server Einstellungen';
|
|
||||||
$lng['serversettings']['ftpserver']['desc'] = 'Wenn pureftpd ausgewählt ist, werden die .ftpquota Dateien für das Quota erstellt und täglich aktualisiert.';
|
|
||||||
|
|
||||||
// CHANGED IN FROXLOR 0.9.6-svn5
|
|
||||||
$lng['serversettings']['ftpprefix']['description'] = 'Welchen Prefix sollen die FTP-Benutzerkonten haben?<br/><b>Wenn du das änderst, musst du auch das Quota SQL Query in der FTP Server Config ändern, solltest du FTP-Quotas benutzen!</b>';
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -254,7 +254,6 @@ $lng['question']['extras_reallydelete_pathoptions'] = 'Do you really want to del
|
|||||||
$lng['question']['ftp_reallydelete'] = 'Czy na pewno chcesz skasować konto FTP %s?';
|
$lng['question']['ftp_reallydelete'] = 'Czy na pewno chcesz skasować konto FTP %s?';
|
||||||
$lng['question']['mysql_reallydelete'] = 'Czy na pewno chcesz skasować bazę danych %s? Ta czynność jest niedwracalna!';
|
$lng['question']['mysql_reallydelete'] = 'Czy na pewno chcesz skasować bazę danych %s? Ta czynność jest niedwracalna!';
|
||||||
$lng['question']['admin_configs_reallyrebuild'] = 'Czy napewno chcesz przebudować pliki konfiguracyjne Apacha i Binda?';
|
$lng['question']['admin_configs_reallyrebuild'] = 'Czy napewno chcesz przebudować pliki konfiguracyjne Apacha i Binda?';
|
||||||
$lng['question']['admin_customer_alsoremovefiles'] = 'Remove user files too?';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mails
|
* Mails
|
||||||
@@ -825,6 +824,8 @@ $lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'You cannot enable Weba
|
|||||||
$lng['serversettings']['webalizer_enabled'] = 'Enable webalizer statistics';
|
$lng['serversettings']['webalizer_enabled'] = 'Enable webalizer statistics';
|
||||||
$lng['serversettings']['awstats_enabled'] = 'Enable awstats statistics';
|
$lng['serversettings']['awstats_enabled'] = 'Enable awstats statistics';
|
||||||
$lng['admin']['awstatssettings'] = 'Ustawienia Awstats';
|
$lng['admin']['awstatssettings'] = 'Ustawienia Awstats';
|
||||||
|
$lng['serversettings']['awstats_domain_file']['title'] = 'Awstats domainfiles directory';
|
||||||
|
$lng['serversettings']['awstats_model_file']['title'] = 'Awstats model file';
|
||||||
|
|
||||||
// ADDED IN 1.2.19-svn16
|
// ADDED IN 1.2.19-svn16
|
||||||
|
|
||||||
@@ -1260,6 +1261,22 @@ $lng['update']['proceed'] = 'Proceed';
|
|||||||
$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_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']['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['update']['noupdatesavail'] = '<strong>You already have the latest Froxlor version.</strong>';
|
||||||
|
$lng['admin']['cron']['cronsettings'] = 'ustawienia Cronjob';
|
||||||
|
$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'] = 'przebudowanie plik<69>w konfiguracyjnych';
|
||||||
|
$lng['crondesc']['cron_legacy'] = 'legacy (old) cronjob';
|
||||||
|
$lng['crondesc']['cron_apsinstaller'] = 'Instalator aplikacji';
|
||||||
|
$lng['crondesc']['cron_autoresponder'] = 'e-mail autoresponder';
|
||||||
|
$lng['crondesc']['cron_apsupdater'] = 'Aktualizacja pakiet<65>w instalatora aplikacji';
|
||||||
|
$lng['crondesc']['cron_traffic'] = 'obliczanie ruchu';
|
||||||
|
$lng['crondesc']['cron_ticketsreset'] = 'resetowanie licznika zgłoszeń';
|
||||||
|
$lng['crondesc']['cron_ticketarchive'] = 'archiwizowanie starych zgłoszeń';
|
||||||
$lng['admin']['specialsettingsforsubdomains'] = 'Apply specialsettings to all subdomains (*.example.com)';
|
$lng['admin']['specialsettingsforsubdomains'] = 'Apply specialsettings to all subdomains (*.example.com)';
|
||||||
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'If yes these custom vhost-settings will be added to all subdomains; if no subdomain-specialsettings are being removed.';
|
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'If yes these custom vhost-settings will be added to all subdomains; if no subdomain-specialsettings are being removed.';
|
||||||
$lng['tasks']['outstanding_tasks'] = 'Outstanding cron-tasks';
|
$lng['tasks']['outstanding_tasks'] = 'Outstanding cron-tasks';
|
||||||
@@ -1274,13 +1291,13 @@ $lng['admin']['ticket_nocustomeraddingavailable'] = 'It\'s not possible to open
|
|||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.1
|
// ADDED IN FROXLOR 0.9.1
|
||||||
|
|
||||||
$lng['admin']['accountdata'] = 'Dane konta';
|
$lng['admin']['accountdata'] = 'Account Data';
|
||||||
$lng['admin']['contactdata'] = 'Dane kontaktowe';
|
$lng['admin']['contactdata'] = 'Contact Data';
|
||||||
$lng['admin']['servicedata'] = 'Dane usługi';
|
$lng['admin']['servicedata'] = 'Service Data';
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.2
|
// ADDED IN FROXLOR 0.9.2
|
||||||
|
|
||||||
$lng['admin']['newerversionavailable'] = 'Jest dostępna nowa wersja Froxlora';
|
$lng['admin']['newerversionavailable'] = 'Jest dost<EFBFBD>pna nowa wersja Froxlora';
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.3
|
// ADDED IN FROXLOR 0.9.3
|
||||||
|
|
||||||
@@ -1289,7 +1306,7 @@ $lng['error']['hiddenfieldvaluechanged'] = 'The value for the hidden field "
|
|||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.3-svn1
|
// ADDED IN FROXLOR 0.9.3-svn1
|
||||||
|
|
||||||
$lng['serversettings']['panel_password_min_length']['title'] = 'Minimalna długość hasła';
|
$lng['serversettings']['panel_password_min_length']['title'] = 'Minimalna d<EFBFBD>ugo<EFBFBD><EFBFBD> has<61>a';
|
||||||
$lng['serversettings']['panel_password_min_length']['description'] = 'Here you can set a minimum length for passwords. \'0\' means: no minimum length required.';
|
$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['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']['title'] = 'Store default index file also to new subfolders';
|
||||||
@@ -1314,12 +1331,12 @@ $lng['dkim']['dkim_add_adsp']['description'] = 'If you don\'t know what this is,
|
|||||||
$lng['dkim']['dkim_add_adsppolicy']['title'] = 'ADSP policy';
|
$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['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'] = 'ustawienia zadań cyklicznych';
|
$lng['admin']['cron']['cronsettings'] = 'ustawienia zada<EFBFBD> cyklicznych';
|
||||||
$lng['cron']['cronname'] = 'cronjob-name';
|
$lng['cron']['cronname'] = 'cronjob-name';
|
||||||
$lng['cron']['lastrun'] = 'ostatnio uruchomiony';
|
$lng['cron']['lastrun'] = 'last run';
|
||||||
$lng['cron']['interval'] = 'interwał';
|
$lng['cron']['interval'] = 'interval';
|
||||||
$lng['cron']['isactive'] = 'włączony';
|
$lng['cron']['isactive'] = 'enabled';
|
||||||
$lng['cron']['description'] = 'opis';
|
$lng['cron']['description'] = 'description';
|
||||||
$lng['crondesc']['cron_unknown_desc'] = 'no description given';
|
$lng['crondesc']['cron_unknown_desc'] = 'no description given';
|
||||||
$lng['admin']['cron']['add'] = 'Add cronjob';
|
$lng['admin']['cron']['add'] = 'Add cronjob';
|
||||||
$lng['crondesc']['cron_tasks'] = 'przebudowanie plik<69>w konfiguracyjnych';
|
$lng['crondesc']['cron_tasks'] = 'przebudowanie plik<69>w konfiguracyjnych';
|
||||||
@@ -1330,50 +1347,33 @@ $lng['crondesc']['cron_apsupdater'] = 'Aktualizacja pakiet
|
|||||||
$lng['crondesc']['cron_traffic'] = 'obliczanie ruchu';
|
$lng['crondesc']['cron_traffic'] = 'obliczanie ruchu';
|
||||||
$lng['crondesc']['cron_ticketsreset'] = 'resetowanie licznik<69>w zgłoszeń';
|
$lng['crondesc']['cron_ticketsreset'] = 'resetowanie licznik<69>w zgłoszeń';
|
||||||
$lng['crondesc']['cron_ticketarchive'] = 'archiwizowanie starych zgłoszeń';
|
$lng['crondesc']['cron_ticketarchive'] = 'archiwizowanie starych zgłoszeń';
|
||||||
$lng['cronmgmt']['seconds'] = 'sekund';
|
$lng['cronmgmt']['seconds'] = 'seconds';
|
||||||
$lng['cronmgmt']['minutes'] = 'minut';
|
$lng['cronmgmt']['minutes'] = 'minutes';
|
||||||
$lng['cronmgmt']['hours'] = 'godzin';
|
$lng['cronmgmt']['hours'] = 'hours';
|
||||||
$lng['cronmgmt']['days'] = 'dni';
|
$lng['cronmgmt']['days'] = 'days';
|
||||||
$lng['cronmgmt']['weeks'] = 'tygodni';
|
$lng['cronmgmt']['weeks'] = 'weeks';
|
||||||
$lng['cronmgmt']['months'] = 'miesięcy';
|
$lng['cronmgmt']['months'] = 'months';
|
||||||
$lng['admin']['cronjob_edit'] = 'Edytuj zadania cykliczne';
|
$lng['admin']['cronjob_edit'] = 'Edytuj zadania cykliczne';
|
||||||
$lng['cronjob']['cronjobsettings'] = 'Ustawienia zadania cykliczne';
|
$lng['cronjob']['cronjobsettings'] = 'Cronjob settings';
|
||||||
$lng['cronjob']['cronjobinterval'] = 'Interwał uruchomienia';
|
$lng['cronjob']['cronjobinterval'] = 'Runtime interval';
|
||||||
$lng['panel']['options'] = 'opcje';
|
$lng['panel']['options'] = 'options';
|
||||||
$lng['admin']['warning'] = 'WAŻNE - Przeczytaj to!';
|
$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['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']['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.';
|
$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
|
// ADDED IN FROXLOR 0.9.4-svn1
|
||||||
$lng['ftp']['account_edit'] = 'Edytuj konto ftp';
|
$lng['ftp']['account_edit'] = 'Edit ftp account';
|
||||||
$lng['ftp']['editpassdescription'] = 'Ustal nowe hasło lub zostaw puste by nie zmieniać.';
|
$lng['ftp']['editpassdescription'] = 'Set new password or leave blank for no change.';
|
||||||
$lng['mysql']['sendinfomail'] = 'Send data via email to me';
|
$lng['mysql']['sendinfomail'] = 'Send data via email to me';
|
||||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] Nowa baza danych utworzona';
|
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] New database created';
|
||||||
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nMasz dostęp do Twojej bazy danych uzywając phpMyAdmina pod adresem {URI}\n";
|
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nYou can access your databases using phpMyAdmin via {URI}\n";
|
||||||
$lng['customer']['mysql_add']['infomail_body']['main'] = "Witaj {CUST_NAME},\n\nwłaśnie dodałeś nową bazę danych. Przesyłamy dane uruchomieniowe:\n\nBaza danych: {DB_NAME}\nHasło: {DB_PASS}\nOpis: {DB_DESC}\n{PMA_URI}\nZ poważaniem, Froxlor";
|
$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'] = 'Nie możesz usunąć domeny, ponieważ jest na niej zainstalowana aplikacja z instalatora aplikacji. W pierwszej kolejności odinstaluj tą aplikację.';
|
$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'] = '<27>cieżka do AWStats \'awstats_buildstaticpages.pl\'';
|
$lng['serversettings']['awstats_path'] = '<27>cie<EFBFBD>ka do AWStats \'awstats_buildstaticpages.pl\'';
|
||||||
$lng['serversettings']['awstats_conf'] = 'AWStats configuration path';
|
$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['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']['configfiles']['compactoverview'] = 'Compact-overview';
|
||||||
$lng['admin']['lastlogin_succ'] = 'Ostatnie logowanie';
|
|
||||||
$lng['panel']['neverloggedin'] = 'Brak logowania do tej pory';
|
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.6-svn1
|
|
||||||
$lng['serversettings']['defaultttl'] = 'TTL domeny dla binda w sekundach (domyślnie \'604800\' = 1 tydzień)';
|
|
||||||
$lng['ticket']['logicalorder'] = 'Logical order';
|
|
||||||
$lng['ticket']['orderdesc'] = 'Here you can define your own logical order for the ticket-category. Use 1 - 999, lower numbers are displayed first.';
|
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.6-svn3
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_enabled'] = 'Włączone standardowe strony błęd<31>w dla wszystkich klient<6E>w';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err401']['title'] = 'Plik/URL dla błędu 401';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err401']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err403']['title'] = 'Plik/URL dla błędu 403';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err403']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err404'] = 'Plik/URL dla błędu 404';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['title'] = 'Plik/URL dla błędu 500';
|
|
||||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -183,7 +183,7 @@ class bind
|
|||||||
$date = date('Ymd');
|
$date = date('Ymd');
|
||||||
$bindserial = (preg_match('/^' . $date . '/', $domain['bindserial']) ? $domain['bindserial'] + 1 : $date . '00');
|
$bindserial = (preg_match('/^' . $date . '/', $domain['bindserial']) ? $domain['bindserial'] + 1 : $date . '00');
|
||||||
$this->db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `bindserial`=\'' . $bindserial . '\' WHERE `id`=\'' . $domain['id'] . '\'');
|
$this->db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `bindserial`=\'' . $bindserial . '\' WHERE `id`=\'' . $domain['id'] . '\'');
|
||||||
$zonefile = '$TTL ' . (int)$this->settings['system']['defaultttl'] . "\n";
|
$zonefile = '$TTL 1W' . "\n";
|
||||||
|
|
||||||
if(count($this->nameservers) == 0)
|
if(count($this->nameservers) == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,69 +69,16 @@ class apache
|
|||||||
{
|
{
|
||||||
$vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/05_froxlor_dirfix_nofcgid.conf');
|
$vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/05_froxlor_dirfix_nofcgid.conf');
|
||||||
|
|
||||||
if($this->settings['system']['mod_fcgid'] == '1')
|
if(!isset($this->virtualhosts_data[$vhosts_filename]))
|
||||||
{
|
{
|
||||||
// if we use fcgid we don't need this file
|
$this->virtualhosts_data[$vhosts_filename] = '';
|
||||||
if(file_exists($vhosts_filename))
|
|
||||||
{
|
|
||||||
fwrite($this->debugHandler, ' apache::_createStandardDirectoryEntry: unlinking ' . basename($vhost_filename) . "\n");
|
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_NOTICE, 'unlinking ' . basename($vhost_filename));
|
|
||||||
unlink(makeCorrectFile($vhost_filename));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if(!isset($this->virtualhosts_data[$vhosts_filename]))
|
|
||||||
{
|
|
||||||
$this->virtualhosts_data[$vhosts_filename] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->virtualhosts_data[$vhosts_filename].= ' <Directory "' . $this->settings['system']['documentroot_prefix'] . '">' . "\n";
|
$this->virtualhosts_data[$vhosts_filename].= '# ' . basename($vhosts_filename) . "\n" . '# Created ' . date('d.m.Y H:i') . "\n" . '# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.' . "\n" . "\n";
|
||||||
$this->virtualhosts_data[$vhosts_filename].= ' Order allow,deny' . "\n";
|
$this->virtualhosts_data[$vhosts_filename].= ' <Directory "' . $this->settings['system']['documentroot_prefix'] . '">' . "\n";
|
||||||
$this->virtualhosts_data[$vhosts_filename].= ' allow from all' . "\n";
|
$this->virtualhosts_data[$vhosts_filename].= ' Order allow,deny' . "\n";
|
||||||
$this->virtualhosts_data[$vhosts_filename].= ' </Directory>' . "\n";
|
$this->virtualhosts_data[$vhosts_filename].= ' allow from all' . "\n";
|
||||||
}
|
$this->virtualhosts_data[$vhosts_filename].= ' </Directory>' . "\n";
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* define a default ErrorDocument-statement, bug #unknown-yet
|
|
||||||
*/
|
|
||||||
private function _createStandardErrorHandler()
|
|
||||||
{
|
|
||||||
if($this->settings['defaultwebsrverrhandler']['enabled'] == '1'
|
|
||||||
&& ($this->settings['defaultwebsrverrhandler']['err401'] != ''
|
|
||||||
|| $this->settings['defaultwebsrverrhandler']['err403'] != ''
|
|
||||||
|| $this->settings['defaultwebsrverrhandler']['err404'] != ''
|
|
||||||
|| $this->settings['defaultwebsrverrhandler']['err500'] != '')
|
|
||||||
) {
|
|
||||||
$vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/05_froxlor_default_errorhandler.conf');
|
|
||||||
|
|
||||||
if(!isset($this->virtualhosts_data[$vhosts_filename]))
|
|
||||||
{
|
|
||||||
$this->virtualhosts_data[$vhosts_filename] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($this->settings['defaultwebsrverrhandler']['err401'] != '')
|
|
||||||
{
|
|
||||||
$this->virtualhosts_data[$vhosts_filename].= 'ErrorDocument 401 ' . $this->settings['defaultwebsrverrhandler']['err401'] . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if($this->settings['defaultwebsrverrhandler']['err403'] != '')
|
|
||||||
{
|
|
||||||
$this->virtualhosts_data[$vhosts_filename].= 'ErrorDocument 403 ' . $this->settings['defaultwebsrverrhandler']['err403'] . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if($this->settings['defaultwebsrverrhandler']['err404'] != '')
|
|
||||||
{
|
|
||||||
$this->virtualhosts_data[$vhosts_filename].= 'ErrorDocument 404 ' . $this->settings['defaultwebsrverrhandler']['err404'] . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if($this->settings['defaultwebsrverrhandler']['err500'] != '')
|
|
||||||
{
|
|
||||||
$this->virtualhosts_data[$vhosts_filename].= 'ErrorDocument 500 ' . $this->settings['defaultwebsrverrhandler']['err500'] . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createIpPort()
|
public function createIpPort()
|
||||||
@@ -249,11 +196,6 @@ class apache
|
|||||||
* bug #32
|
* bug #32
|
||||||
*/
|
*/
|
||||||
$this->_createStandardDirectoryEntry();
|
$this->_createStandardDirectoryEntry();
|
||||||
|
|
||||||
/**
|
|
||||||
* bug #unknown-yet
|
|
||||||
*/
|
|
||||||
$this->_createStandardErrorHandler();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -914,8 +856,14 @@ class apache
|
|||||||
mkdir($this->settings['system']['apacheconf_htpasswddir'], 0751);
|
mkdir($this->settings['system']['apacheconf_htpasswddir'], 0751);
|
||||||
umask($umask);
|
umask($umask);
|
||||||
}
|
}
|
||||||
|
elseif(!is_dir($this->settings['system']['apacheconf_htpasswddir']))
|
||||||
|
{
|
||||||
|
fwrite($this->debugHandler, ' cron_tasks: WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!' . "\n");
|
||||||
|
echo 'WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!';
|
||||||
|
$this->logger->logAction(CRON_ACTION, LOG_WARNING, 'WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!');
|
||||||
|
}
|
||||||
|
|
||||||
if(isConfigDir($this->settings['system']['apacheconf_htpasswddir'], true))
|
if(is_dir($this->settings['system']['apacheconf_htpasswddir']))
|
||||||
{
|
{
|
||||||
foreach($this->htpasswds_data as $htpasswd_filename => $htpasswd_file)
|
foreach($this->htpasswds_data as $htpasswd_filename => $htpasswd_file)
|
||||||
{
|
{
|
||||||
@@ -927,12 +875,6 @@ class apache
|
|||||||
|
|
||||||
$this->wipeOutOldHtpasswdConfigs();
|
$this->wipeOutOldHtpasswdConfigs();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
fwrite($this->debugHandler, ' cron_tasks: WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!' . "\n");
|
|
||||||
echo 'WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!';
|
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_WARNING, 'WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write virtualhosts
|
// Write virtualhosts
|
||||||
@@ -1006,7 +948,9 @@ class apache
|
|||||||
fwrite($this->debugHandler, ' apache::wipeOutOldVhostConfigs: cleaning ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
fwrite($this->debugHandler, ' apache::wipeOutOldVhostConfigs: cleaning ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_vhost']);
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_vhost']);
|
||||||
|
|
||||||
if(isConfigDir($this->settings['system']['apacheconf_vhost'], true))
|
if(isConfigDir($this->settings['system']['apacheconf_vhost'])
|
||||||
|
&& file_exists($this->settings['system']['apacheconf_vhost'])
|
||||||
|
&& is_dir($this->settings['system']['apacheconf_vhost']))
|
||||||
{
|
{
|
||||||
$vhost_file_dirhandle = opendir($this->settings['system']['apacheconf_vhost']);
|
$vhost_file_dirhandle = opendir($this->settings['system']['apacheconf_vhost']);
|
||||||
|
|
||||||
@@ -1035,7 +979,9 @@ class apache
|
|||||||
fwrite($this->debugHandler, ' apache::wipeOutOldDiroptionConfigs: cleaning ' . $this->settings['system']['apacheconf_diroptions'] . "\n");
|
fwrite($this->debugHandler, ' apache::wipeOutOldDiroptionConfigs: cleaning ' . $this->settings['system']['apacheconf_diroptions'] . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_diroptions']);
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_diroptions']);
|
||||||
|
|
||||||
if(isConfigDir($this->settings['system']['apacheconf_diroptions'], true))
|
if(isConfigDir($this->settings['system']['apacheconf_diroptions'])
|
||||||
|
&& file_exists($this->settings['system']['apacheconf_diroptions'])
|
||||||
|
&& is_dir($this->settings['system']['apacheconf_diroptions']))
|
||||||
{
|
{
|
||||||
$diroptions_file_dirhandle = opendir($this->settings['system']['apacheconf_diroptions']);
|
$diroptions_file_dirhandle = opendir($this->settings['system']['apacheconf_diroptions']);
|
||||||
|
|
||||||
@@ -1064,7 +1010,9 @@ class apache
|
|||||||
fwrite($this->debugHandler, ' apache::wipeOutOldHtpasswdConfigs: cleaning ' . $this->settings['system']['apacheconf_htpasswddir'] . "\n");
|
fwrite($this->debugHandler, ' apache::wipeOutOldHtpasswdConfigs: cleaning ' . $this->settings['system']['apacheconf_htpasswddir'] . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_htpasswddir']);
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_htpasswddir']);
|
||||||
|
|
||||||
if(isConfigDir($this->settings['system']['apacheconf_htpasswddir'], true))
|
if(isConfigDir($this->settings['system']['apacheconf_htpasswddir'])
|
||||||
|
&& file_exists($this->settings['system']['apacheconf_htpasswddir'])
|
||||||
|
&& is_dir($this->settings['system']['apacheconf_htpasswddir']))
|
||||||
{
|
{
|
||||||
$htpasswds_file_dirhandle = opendir($this->settings['system']['apacheconf_htpasswddir']);
|
$htpasswds_file_dirhandle = opendir($this->settings['system']['apacheconf_htpasswddir']);
|
||||||
|
|
||||||
|
|||||||
@@ -151,30 +151,6 @@ class lighttpd
|
|||||||
|
|
||||||
$this->lighttpd_data[$vhost_filename].= '}' . "\n";
|
$this->lighttpd_data[$vhost_filename].= '}' . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* bug #unknown-yet
|
|
||||||
*/
|
|
||||||
$this->_createStandardErrorHandler();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* define a default server.error-handler-404-statement, bug #unknown-yet
|
|
||||||
*/
|
|
||||||
private function _createStandardErrorHandler()
|
|
||||||
{
|
|
||||||
if($this->settings['defaultwebsrverrhandler']['enabled'] == '1'
|
|
||||||
&& $this->settings['defaultwebsrverrhandler']['err404'] != ''
|
|
||||||
) {
|
|
||||||
$vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/05_froxlor_default_errorhandler.conf');
|
|
||||||
|
|
||||||
if(!isset($this->lighttpd_data[$vhost_filename]))
|
|
||||||
{
|
|
||||||
$this->lighttpd_data[$vhost_filename] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->lighttpd_data[$vhost_filename] = 'server.error-handler-404 = "'.$this->settings['defaultwebsrverrhandler']['err404'].'"';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function create_htaccess($domain)
|
protected function create_htaccess($domain)
|
||||||
@@ -831,7 +807,9 @@ class lighttpd
|
|||||||
fwrite($this->debugHandler, ' lighttpd::wipeOutOldConfigs: cleaning ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
fwrite($this->debugHandler, ' lighttpd::wipeOutOldConfigs: cleaning ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_vhost']);
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_vhost']);
|
||||||
|
|
||||||
if(isConfigDir($this->settings['system']['apacheconf_vhost'], true))
|
if(isConfigDir($this->settings['system']['apacheconf_vhost'])
|
||||||
|
&& file_exists($this->settings['system']['apacheconf_vhost'])
|
||||||
|
&& is_dir($this->settings['system']['apacheconf_vhost']))
|
||||||
{
|
{
|
||||||
$vhost_file_dirhandle = opendir($this->settings['system']['apacheconf_vhost']);
|
$vhost_file_dirhandle = opendir($this->settings['system']['apacheconf_vhost']);
|
||||||
|
|
||||||
|
|||||||
@@ -365,31 +365,6 @@ while($row = $db->fetch_array($result))
|
|||||||
|
|
||||||
$diskusage = floatval($webspaceusage + $emailusage + $mysqlusage);
|
$diskusage = floatval($webspaceusage + $emailusage + $mysqlusage);
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `diskspace_used`='" . (float)$current_diskspace['all'] . "', `traffic_used`='" . (float)$sum_month_traffic['all'] . "' WHERE `customerid`='" . (int)$row['customerid'] . "'");
|
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `diskspace_used`='" . (float)$current_diskspace['all'] . "', `traffic_used`='" . (float)$sum_month_traffic['all'] . "' WHERE `customerid`='" . (int)$row['customerid'] . "'");
|
||||||
|
|
||||||
/**
|
|
||||||
* Proftpd Quota
|
|
||||||
*/
|
|
||||||
|
|
||||||
$db->query("UPDATE `" . TABLE_FTP_QUOTATALLIES . "` SET `bytes_in_used`='" . (float)$current_diskspace['all'] . "'*1024 WHERE `name` = '" . $row['loginname'] . "' OR `name` LIKE '" . $row['loginname'] . $settings['customer']['ftpprefix'] . "%'");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pureftpd Quota
|
|
||||||
*/
|
|
||||||
|
|
||||||
if($settings['system']['ftpserver'] == "pureftpd")
|
|
||||||
{
|
|
||||||
$result_quota = $db->query("SELECT homedir FROM `" . TABLE_FTP_USERS . "` WHERE customerid = '" . $row['customerid'] . "'");
|
|
||||||
|
|
||||||
while($row_quota = $db->fetch_array($result_quota))
|
|
||||||
{
|
|
||||||
$quotafile = "" . $row_quota['homedir'] . ".ftpquota";
|
|
||||||
$fh = fopen($quotafile, 'w');
|
|
||||||
$stringdata = "0 " . $current_diskspace['all']*1024 . "";
|
|
||||||
fwrite($fh, $stringdata);
|
|
||||||
fclose($fh);
|
|
||||||
safe_exec('chown ' . $row['loginname'] . ':' . $row['loginname'] . ' ' . escapeshellarg($quotafile) . '');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ $header
|
|||||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['menue']['ticket']['categories']}</b></td>
|
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['menue']['ticket']['categories']}</b></td>
|
||||||
<td class="maintitle_search_right" colspan="4">{$searchcode}</td>
|
<td class="maintitle_search_right" colspan="3">{$searchcode}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<if 15 < $categories_count >
|
<if 15 < $categories_count >
|
||||||
<tr>
|
<tr>
|
||||||
@@ -15,18 +15,17 @@ $header
|
|||||||
</if>
|
</if>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_display_border_left">{$lng['ticket']['category']} {$arrowcode['name']}</td>
|
<td class="field_display_border_left">{$lng['ticket']['category']} {$arrowcode['name']}</td>
|
||||||
<td class="field_display">{$lng['ticket']['logicalorder']} {$arrowcode['logicalorder']}</td>
|
|
||||||
<td class="field_display">{$lng['ticket']['ticketcount']} <if $categories_count < 0 >{$arrowcode['ticketcount']}</if></td>
|
<td class="field_display">{$lng['ticket']['ticketcount']} <if $categories_count < 0 >{$arrowcode['ticketcount']}</if></td>
|
||||||
<td class="field_display_search" colspan="2">{$sortcode}</td>
|
<td class="field_display_search" colspan="2">{$sortcode}</td>
|
||||||
</tr>
|
</tr>
|
||||||
$ticketcategories
|
$ticketcategories
|
||||||
<if $pagingcode != ''>
|
<if $pagingcode != ''>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_display_border_left" colspan="5" style=" text-align: center; ">{$pagingcode}</td>
|
<td class="field_display_border_left" colspan="43" style=" text-align: center; ">{$pagingcode}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</if>
|
</if>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="field_display_border_left" colspan="5"><a href="$filename?page=categories&action=addcategory&s=$s">{$lng['ticket']['ticket_newcateory']}</a></td>
|
<td class="field_display_border_left" colspan="4"><a href="$filename?page=categories&action=addcategory&s=$s">{$lng['ticket']['ticket_newcateory']}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<tr class="" onmouseover="this.className='RowOverSelected';" onmouseout="this.className='';">
|
<tr class="" onmouseover="this.className='RowOverSelected';" onmouseout="this.className='';">
|
||||||
<td class="field_name_border_left">{$row['name']}</td>
|
<td class="field_name_border_left">{$row['name']}</td>
|
||||||
<td class="field_name">{$row['logicalorder']}</td>
|
<td class="field_name">{$row['ticketcount']} ({$row['ticketcountnotclosed']} {$lng['ticket']['open']} | {$closedtickets_count} {$lng['ticket']['closed']})</td>
|
||||||
<td class="field_name">{$row['ticketcount']} ({$row['ticketcountnotclosed']} {$lng['ticket']['open']} | {$closedtickets_count} {$lng['ticket']['closed']})</td>
|
|
||||||
<td class="field_name">
|
<td class="field_name">
|
||||||
<a href="$filename?page=categories&action=editcategory&id={$row['id']}&s=$s">{$lng['panel']['edit']}</a>
|
<a href="$filename?page=categories&action=editcategory&id={$row['id']}&s=$s">{$lng['panel']['edit']}</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="field_name">
|
<td class="field_name">
|
||||||
<a href="$filename?page=categories&action=deletecategory&id={$row['id']}&s=$s">{$lng['panel']['delete']}</a>
|
<a href="$filename?page=categories&action=deletecategory&id={$row['id']}&s=$s">{$lng['panel']['delete']}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -9,13 +9,9 @@ $header
|
|||||||
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['ticket']['ticket_editcateory']}</b></td>
|
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['ticket']['ticket_editcateory']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name"><b>{$lng['ticket']['category']}:</b></td>
|
<td class="main_field_name">{$lng['ticket']['category']}:</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="category" maxlength="50" value="{$row['name']}" /></td>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="category" maxlength="50" value="{$row['name']}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="main_field_name"><b>{$lng['ticket']['logicalorder']}:</b><br />{$lng['ticket']['orderdesc']}</td>
|
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="logicalorder" maxlength="3" value="{$row['logicalorder']}" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['ticket']['ticket_editcateory']}" /></td>
|
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['ticket']['ticket_editcateory']}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -8,13 +8,9 @@ $header
|
|||||||
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['ticket']['ticket_newcateory']}</b></td>
|
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['ticket']['ticket_newcateory']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name"><b>{$lng['ticket']['category']}:</b></td>
|
<td class="main_field_name">{$lng['ticket']['category']}:</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="category" maxlength="50" /></td>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="category" maxlength="50" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="main_field_name"><b>{$lng['ticket']['logicalorder']}:</b><br />{$lng['ticket']['orderdesc']}</td>
|
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="logicalorder" maxlength="3" value="1" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['ticket']['ticket_newcateory']}" /></td>
|
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['ticket']['ticket_newcateory']}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
<div class="preconfigitem">
|
|
||||||
<p>
|
|
||||||
<span class="preconfdesc">{$description}</span>
|
|
||||||
{$question}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
@@ -458,14 +458,3 @@ TR.RowOverSelected {
|
|||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.preconfigitem
|
|
||||||
{
|
|
||||||
padding: 0.15em;
|
|
||||||
border-bottom: 1px solid #cccccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preconfdesc
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 0.5em;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
# Include local configuration options identical for all virtual hosts
|
|
||||||
Include "{AWSTATS_CONF}awstats.model.conf"
|
|
||||||
|
|
||||||
LogFile="{LOG_FILE}"
|
LogFile="{LOG_FILE}"
|
||||||
LogType=W
|
LogType=W
|
||||||
LogFormat = 1
|
LogFormat = 1
|
||||||
@@ -8,3 +5,6 @@ LogSeparator=" "
|
|||||||
SiteDomain="{SITE_DOMAIN}"
|
SiteDomain="{SITE_DOMAIN}"
|
||||||
HostAliases="{HOST_ALIASES}"
|
HostAliases="{HOST_ALIASES}"
|
||||||
DirData="{CUSTOMER_DOCROOT}"
|
DirData="{CUSTOMER_DOCROOT}"
|
||||||
|
|
||||||
|
# Include local configuration options identical for all virtual hosts
|
||||||
|
Include "{AWSTATS_CONF}awstats.model.conf"
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
# Include local configuration options identical for all virtual hosts
|
|
||||||
Include "{AWSTATS_CONF}awstats.model.conf"
|
|
||||||
|
|
||||||
LogFile="{LOG_FILE}"
|
LogFile="{LOG_FILE}"
|
||||||
LogType=W
|
LogType=W
|
||||||
LogFormat = "%host %virtualname %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"
|
LogFormat = "%host %virtualname %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"
|
||||||
@@ -9,3 +6,5 @@ SiteDomain="{SITE_DOMAIN}"
|
|||||||
HostAliases="{HOST_ALIASES}"
|
HostAliases="{HOST_ALIASES}"
|
||||||
DirData="{CUSTOMER_DOCROOT}"
|
DirData="{CUSTOMER_DOCROOT}"
|
||||||
|
|
||||||
|
# Include local configuration options identical for all virtual hosts
|
||||||
|
Include "{AWSTATS_CONF}awstats.model.conf"
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ LoadModule mod_sql.c
|
|||||||
#LoadModule mod_ldap.c
|
#LoadModule mod_ldap.c
|
||||||
LoadModule mod_sql_mysql.c
|
LoadModule mod_sql_mysql.c
|
||||||
#LoadModule mod_sql_postgres.c
|
#LoadModule mod_sql_postgres.c
|
||||||
LoadModule mod_quotatab.c
|
#LoadModule mod_quotatab.c
|
||||||
#LoadModule mod_quotatab_file.c
|
#LoadModule mod_quotatab_file.c
|
||||||
#LoadModule mod_quotatab_ldap.c
|
#LoadModule mod_quotatab_ldap.c
|
||||||
LoadModule mod_quotatab_sql.c
|
#LoadModule mod_quotatab_sql.c
|
||||||
#LoadModule mod_radius.c
|
#LoadModule mod_radius.c
|
||||||
LoadModule mod_wrap.c
|
LoadModule mod_wrap.c
|
||||||
LoadModule mod_rewrite.c
|
LoadModule mod_rewrite.c
|
||||||
|
|||||||
@@ -61,15 +61,3 @@ SQLNamedQuery download UPDATE "down_count=down_count+1, down_bytes=down_bytes+%b
|
|||||||
|
|
||||||
SQLLog STOR upload
|
SQLLog STOR upload
|
||||||
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
||||||
|
|
||||||
|
|
||||||
QuotaEngine on
|
|
||||||
QuotaShowQuotas on
|
|
||||||
QuotaDisplayUnits Mb
|
|
||||||
QuotaLock /var/lock/ftpd.quotatab.lock
|
|
||||||
QuotaLimitTable sql:/get-quota-limit
|
|
||||||
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
|
|
||||||
SQLNamedQuery get-quota-limit SELECT "ftp_users.username AS name, ftp_quotalimits.quota_type, ftp_quotalimits.per_session, ftp_quotalimits.limit_type, panel_customers.diskspace*1024 AS bytes_in_avail, ftp_quotalimits.bytes_out_avail, ftp_quotalimits.bytes_xfer_avail, ftp_quotalimits.files_in_avail, ftp_quotalimits.files_out_avail, ftp_quotalimits.files_xfer_avail FROM ftp_users, ftp_quotalimits, panel_customers WHERE ftp_users.username = '%{0}' AND panel_customers.loginname = SUBSTRING_INDEX('%{0}', 'ftp', 1) AND quota_type ='%{1}'"
|
|
||||||
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used,bytes_out_used, bytes_xfer_used, files_in_used, files_out_used,files_xfer_used FROM ftp_quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
|
|
||||||
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used= files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name= '%{6}' AND quota_type = '%{7}'" ftp_quotatallies
|
|
||||||
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}, %{7}" ftp_quotatallies
|
|
||||||
|
|||||||
@@ -8,4 +8,3 @@ MYSQLGetPW SELECT password FROM ftp_users WHERE username="\L" AND login_ena
|
|||||||
MYSQLGetUID SELECT uid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
MYSQLGetUID SELECT uid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
MYSQLGetGID SELECT gid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
MYSQLGetGID SELECT gid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
MYSQLGetDir SELECT homedir FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
MYSQLGetDir SELECT homedir FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_customers, ftp_users WHERE username = "\L" AND panel_customers.loginname = SUBSTRING_INDEX('\L', 'ftp', 1)
|
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
# Postfix programs paths settings
|
||||||
|
command_directory = /usr/sbin
|
||||||
|
daemon_directory = /usr/lib/postfix
|
||||||
|
program_directory = /usr/lib/postfix
|
||||||
|
sendmail_path = /usr/sbin/sendmail
|
||||||
|
|
||||||
## General Postfix configuration
|
## General Postfix configuration
|
||||||
# should be the default domain from your provider eg. "server100.provider.tld"
|
# should be the default domain from your provider eg. "server100.provider.tld"
|
||||||
mydomain = <SERVERNAME>
|
mydomain = <SERVERNAME>
|
||||||
@@ -29,24 +35,25 @@ smtpd_recipient_restrictions = permit_mynetworks,
|
|||||||
reject_non_fqdn_recipient
|
reject_non_fqdn_recipient
|
||||||
smtpd_sender_restrictions = permit_mynetworks,
|
smtpd_sender_restrictions = permit_mynetworks,
|
||||||
permit_sasl_authenticated,
|
permit_sasl_authenticated,
|
||||||
reject_unknown_helo_hostname,
|
reject_unknown_hostname,
|
||||||
reject_unknown_recipient_domain,
|
reject_unknown_recipient_domain,
|
||||||
reject_unknown_sender_domain
|
reject_unknown_sender_domain
|
||||||
smtpd_client_restrictions = permit_mynetworks,
|
smtpd_client_restrictions = permit_mynetworks,
|
||||||
permit_sasl_authenticated,
|
permit_sasl_authenticated,
|
||||||
reject_unknown_client_hostname
|
reject_unknown_client
|
||||||
# Maximum size of Message in bytes (50MB)
|
# Maximum size of Message in bytes (50MB)
|
||||||
message_size_limit = 52428800
|
message_size_limit = 52428800
|
||||||
|
|
||||||
## SASL Auth Settings
|
## SASL Auth Settings
|
||||||
smtpd_sasl_auth_enable = yes
|
smtpd_sasl_auth_enable = yes
|
||||||
smtpd_sasl_local_domain = $myhostname
|
smtpd_sasl_local_domain = $myhostname
|
||||||
|
smtpd_sasl_security_options = noanonymous
|
||||||
broken_sasl_auth_clients = yes
|
broken_sasl_auth_clients = yes
|
||||||
## Dovecot Settings for deliver, SASL Auth and virtual transport
|
## Dovecot Settings for deliver, SASL Auth and virtual transport
|
||||||
smtpd_sasl_type = dovecot
|
## uncomment those line to use Dovecot
|
||||||
mailbox_command = /usr/lib/dovecot/deliver
|
#mailbox_command = /usr/lib/dovecot/deliver
|
||||||
virtual_transport = dovecot
|
#virtual_transport = dovecot
|
||||||
dovecot_destination_recipient_limit = 1
|
#dovecot_destination_recipient_limit = 1
|
||||||
|
|
||||||
# Virtual delivery settings
|
# Virtual delivery settings
|
||||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
||||||
@@ -58,6 +65,7 @@ virtual_gid_maps = static:<VIRTUAL_GID_MAPS>
|
|||||||
|
|
||||||
# Local delivery settings
|
# Local delivery settings
|
||||||
local_transport = local
|
local_transport = local
|
||||||
|
alias_database = hash:/etc/aliases
|
||||||
alias_maps = $alias_database
|
alias_maps = $alias_database
|
||||||
|
|
||||||
# Default Mailbox size, is set to 0 which means unlimited!
|
# Default Mailbox size, is set to 0 which means unlimited!
|
||||||
@@ -67,14 +75,17 @@ virtual_mailbox_limit = 0
|
|||||||
### TLS settings
|
### TLS settings
|
||||||
###
|
###
|
||||||
## TLS for outgoing mails from the server to another server
|
## TLS for outgoing mails from the server to another server
|
||||||
#smtp_tls_security_level = may
|
#smtp_use_tls = yes
|
||||||
#smtp_tls_note_starttls_offer = yes
|
#smtp_tls_note_starttls_offer = yes
|
||||||
## TLS for email client
|
## TLS for email client
|
||||||
#smtpd_tls_security_level = may
|
|
||||||
#smtpd_tls_cert_file = /etc/ssl/server/<SERVERNAME>.pem
|
#smtpd_tls_cert_file = /etc/ssl/server/<SERVERNAME>.pem
|
||||||
#smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
|
#smtpd_tls_key_file = /etc/ssl/server/<SERVERNAME>.pem
|
||||||
|
#smtpd_tls_CAfile = /etc/ssl/cacert.class3.crt # Just an example for CACert.org
|
||||||
|
#smtpd_tls_auth_only = no
|
||||||
#smtpd_tls_loglevel = 1
|
#smtpd_tls_loglevel = 1
|
||||||
#smtpd_tls_received_header = yes
|
#smtpd_tls_received_header = yes
|
||||||
|
#smtpd_tls_session_cache_timeout = 3600s
|
||||||
|
#tls_random_source = dev:/dev/urandom
|
||||||
|
|
||||||
debugger_command =
|
debugger_command =
|
||||||
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
## General Postfix configuration
|
|
||||||
# should be the default domain from your provider eg. "server100.provider.tld"
|
|
||||||
mydomain = <SERVERNAME>
|
|
||||||
|
|
||||||
# should be different from $mydomain eg. "mail.$mydomain"
|
|
||||||
myhostname = <SERVERNAME>
|
|
||||||
|
|
||||||
mydestination = $myhostname,
|
|
||||||
$mydomain,
|
|
||||||
localhost.$myhostname,
|
|
||||||
localhost.$mydomain,
|
|
||||||
localhost
|
|
||||||
mynetworks = 127.0.0.0/8
|
|
||||||
inet_interfaces = all
|
|
||||||
append_dot_mydomain = no
|
|
||||||
biff = no
|
|
||||||
|
|
||||||
# Postfix performance settings
|
|
||||||
default_destination_concurrency_limit = 20
|
|
||||||
local_destination_concurrency_limit = 2
|
|
||||||
|
|
||||||
# SMTPD Settings
|
|
||||||
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
|
|
||||||
smtpd_helo_required = yes
|
|
||||||
smtpd_recipient_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unauth_destination,
|
|
||||||
reject_unauth_pipelining,
|
|
||||||
reject_non_fqdn_recipient
|
|
||||||
smtpd_sender_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unknown_helo_hostname,
|
|
||||||
reject_unknown_recipient_domain,
|
|
||||||
reject_unknown_sender_domain
|
|
||||||
smtpd_client_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unknown_client_hostname
|
|
||||||
# Maximum size of Message in bytes (50MB)
|
|
||||||
message_size_limit = 52428800
|
|
||||||
|
|
||||||
## SASL Auth Settings
|
|
||||||
smtpd_sasl_auth_enable = yes
|
|
||||||
smtpd_sasl_local_domain = $myhostname
|
|
||||||
broken_sasl_auth_clients = yes
|
|
||||||
|
|
||||||
# Virtual delivery settings
|
|
||||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
|
||||||
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
|
|
||||||
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
|
|
||||||
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
|
|
||||||
virtual_uid_maps = static:<VIRTUAL_UID_MAPS>
|
|
||||||
virtual_gid_maps = static:<VIRTUAL_GID_MAPS>
|
|
||||||
|
|
||||||
# Local delivery settings
|
|
||||||
local_transport = local
|
|
||||||
alias_maps = $alias_database
|
|
||||||
|
|
||||||
# Default Mailbox size, is set to 0 which means unlimited!
|
|
||||||
mailbox_size_limit = 0
|
|
||||||
virtual_mailbox_limit = 0
|
|
||||||
|
|
||||||
### TLS settings
|
|
||||||
###
|
|
||||||
## TLS for outgoing mails from the server to another server
|
|
||||||
#smtp_tls_security_level = may
|
|
||||||
#smtp_tls_note_starttls_offer = yes
|
|
||||||
## TLS for email client
|
|
||||||
#smtpd_tls_security_level = may
|
|
||||||
#smtpd_tls_cert_file = /etc/ssl/server/<SERVERNAME>.pem
|
|
||||||
#smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
|
|
||||||
#smtpd_tls_loglevel = 1
|
|
||||||
#smtpd_tls_received_header = yes
|
|
||||||
|
|
||||||
debugger_command =
|
|
||||||
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
|
||||||
ddd $daemon_directory/$process_name $process_id & sleep 5
|
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ LoadModule mod_quotatab_file.c
|
|||||||
#LoadModule mod_quotatab_ldap.c
|
#LoadModule mod_quotatab_ldap.c
|
||||||
|
|
||||||
# Install proftpd-mod-pgsql or proftpd-mod-mysql to use this
|
# Install proftpd-mod-pgsql or proftpd-mod-mysql to use this
|
||||||
LoadModule mod_quotatab_sql.c
|
#LoadModule mod_quotatab_sql.c
|
||||||
LoadModule mod_quotatab_radius.c
|
LoadModule mod_quotatab_radius.c
|
||||||
LoadModule mod_wrap.c
|
LoadModule mod_wrap.c
|
||||||
LoadModule mod_rewrite.c
|
LoadModule mod_rewrite.c
|
||||||
|
|||||||
@@ -22,16 +22,4 @@ SQLNamedQuery download UPDATE "down_count=down_count+1, down_bytes=down_bytes+%b
|
|||||||
|
|
||||||
SQLLog STOR upload
|
SQLLog STOR upload
|
||||||
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
||||||
|
|
||||||
QuotaEngine on
|
|
||||||
QuotaShowQuotas on
|
|
||||||
QuotaDisplayUnits Mb
|
|
||||||
QuotaLock /var/lock/ftpd.quotatab.lock
|
|
||||||
QuotaLimitTable sql:/get-quota-limit
|
|
||||||
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
|
|
||||||
SQLNamedQuery get-quota-limit SELECT "ftp_users.username AS name, ftp_quotalimits.quota_type, ftp_quotalimits.per_session, ftp_quotalimits.limit_type, panel_customers.diskspace*1024 AS bytes_in_avail, ftp_quotalimits.bytes_out_avail, ftp_quotalimits.bytes_xfer_avail, ftp_quotalimits.files_in_avail, ftp_quotalimits.files_out_avail, ftp_quotalimits.files_xfer_avail FROM ftp_users, ftp_quotalimits, panel_customers WHERE ftp_users.username = '%{0}' AND panel_customers.loginname = SUBSTRING_INDEX('%{0}', 'ftp', 1) AND quota_type ='%{1}'"
|
|
||||||
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used,bytes_out_used, bytes_xfer_used, files_in_used, files_out_used,files_xfer_used FROM ftp_quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
|
|
||||||
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used= files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name= '%{6}' AND quota_type = '%{7}'" ftp_quotatallies
|
|
||||||
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}, %{7}" ftp_quotatallies
|
|
||||||
|
|
||||||
</IfModule>
|
</IfModule>
|
||||||
@@ -8,4 +8,3 @@ MYSQLGetPW SELECT password FROM ftp_users WHERE username="\L" AND login_ena
|
|||||||
MYSQLGetUID SELECT uid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
MYSQLGetUID SELECT uid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
MYSQLGetGID SELECT gid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
MYSQLGetGID SELECT gid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
MYSQLGetDir SELECT homedir FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
MYSQLGetDir SELECT homedir FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_customers, ftp_users WHERE username = "\L" AND panel_customers.loginname = SUBSTRING_INDEX('\L', 'ftp', 1)
|
|
||||||
|
|||||||
@@ -28,10 +28,7 @@ Group nogroup
|
|||||||
AllowOverwrite on
|
AllowOverwrite on
|
||||||
|
|
||||||
<IfModule mod_quotatab.c>
|
<IfModule mod_quotatab.c>
|
||||||
QuotaEngine on
|
QuotaEngine off
|
||||||
QuotaShowQuotas on
|
|
||||||
QuotaDisplayUnits Mb
|
|
||||||
QuotaLock /var/lock/ftpd.quotatab.lock
|
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
<IfModule mod_ratio.c>
|
<IfModule mod_ratio.c>
|
||||||
@@ -64,13 +61,6 @@ AllowOverwrite on
|
|||||||
|
|
||||||
SQLLog STOR upload
|
SQLLog STOR upload
|
||||||
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
||||||
|
|
||||||
QuotaLimitTable sql:/get-quota-limit
|
|
||||||
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
|
|
||||||
SQLNamedQuery get-quota-limit SELECT "ftp_users.username AS name, ftp_quotalimits.quota_type, ftp_quotalimits.per_session, ftp_quotalimits.limit_type, panel_customers.diskspace*1024 AS bytes_in_avail, ftp_quotalimits.bytes_out_avail, ftp_quotalimits.bytes_xfer_avail, ftp_quotalimits.files_in_avail, ftp_quotalimits.files_out_avail, ftp_quotalimits.files_xfer_avail FROM ftp_users, ftp_quotalimits, panel_customers WHERE ftp_users.username = '%{0}' AND panel_customers.loginname = SUBSTRING_INDEX('%{0}', 'ftp', 1) AND quota_type ='%{1}'"
|
|
||||||
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used,bytes_out_used, bytes_xfer_used, files_in_used, files_out_used,files_xfer_used FROM ftp_quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
|
|
||||||
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used= files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name= '%{6}' AND quota_type = '%{7}'" ftp_quotatallies
|
|
||||||
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}, %{7}" ftp_quotatallies
|
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -50,10 +50,12 @@ smtpd_sasl_local_domain = $myhostname
|
|||||||
smtpd_sasl_security_options = noanonymous
|
smtpd_sasl_security_options = noanonymous
|
||||||
broken_sasl_auth_clients = yes
|
broken_sasl_auth_clients = yes
|
||||||
## Dovecot Settings for deliver, SASL Auth and virtual transport
|
## Dovecot Settings for deliver, SASL Auth and virtual transport
|
||||||
mailbox_command = /usr/libexec/dovecot/deliver
|
## uncomment those line to use Dovecot
|
||||||
smtpd_sasl_path = private/auth
|
#mailbox_command = /usr/libexec/dovecot/deliver
|
||||||
virtual_transport = dovecot
|
#smtpd_sasl_type = dovecot
|
||||||
dovecot_destination_recipient_limit = 1
|
#smtpd_sasl_path = private/auth
|
||||||
|
#virtual_transport = dovecot
|
||||||
|
#dovecot_destination_recipient_limit = 1
|
||||||
|
|
||||||
# Virtual delivery settings
|
# Virtual delivery settings
|
||||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
||||||
@@ -88,14 +90,14 @@ virtual_mailbox_limit = 0
|
|||||||
#tls_random_source = dev:/dev/urandom
|
#tls_random_source = dev:/dev/urandom
|
||||||
|
|
||||||
### Quota Settings with vda useflag
|
### Quota Settings with vda useflag
|
||||||
## I use only virtual as localdelivery... This permits me to have full
|
## I use only virtual as localdelivery... This permit me to have full
|
||||||
## virtual domain hosting without using a lot of maps
|
## virtual domain hosting without using a lots of maps
|
||||||
#virtual_transport = virtual
|
#virtual_transport = virtual
|
||||||
## Generate maildirsize files or not
|
## Generate maildirsize files or not
|
||||||
#virtual_create_maildirsize = yes
|
#virtual_create_maildirsize = yes
|
||||||
## I use Courier IMAP compatibles files.
|
## I use Courier IMAP compatibles files.
|
||||||
#virtual_mailbox_extended = yes
|
#virtual_mailbox_extended = yes
|
||||||
## Limits only INBOX part (useful when
|
## Limits only INBOX part (usefull when
|
||||||
## using when you have IMAP users)
|
## using when you have IMAP users)
|
||||||
#virtual_mailbox_limit_inbox = yes
|
#virtual_mailbox_limit_inbox = yes
|
||||||
## maps of soft disk quotas
|
## maps of soft disk quotas
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
## General Postfix configuration
|
|
||||||
# should be the default domain from your provider eg. "server100.provider.tld"
|
|
||||||
mydomain = <SERVERNAME>
|
|
||||||
|
|
||||||
# should be different from $mydomain eg. "mail.$mydomain"
|
|
||||||
myhostname = <SERVERNAME>
|
|
||||||
|
|
||||||
mydestination = $myhostname,
|
|
||||||
$mydomain,
|
|
||||||
localhost.$myhostname,
|
|
||||||
localhost.$mydomain,
|
|
||||||
localhost
|
|
||||||
mynetworks = 127.0.0.0/8
|
|
||||||
inet_interfaces = all
|
|
||||||
append_dot_mydomain = no
|
|
||||||
biff = no
|
|
||||||
|
|
||||||
# Postfix performance settings
|
|
||||||
default_destination_concurrency_limit = 20
|
|
||||||
local_destination_concurrency_limit = 2
|
|
||||||
|
|
||||||
# SMTPD Settings
|
|
||||||
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
|
|
||||||
smtpd_helo_required = yes
|
|
||||||
smtpd_recipient_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unauth_destination,
|
|
||||||
reject_unauth_pipelining,
|
|
||||||
reject_non_fqdn_recipient
|
|
||||||
smtpd_sender_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unknown_helo_hostname,
|
|
||||||
reject_unknown_recipient_domain,
|
|
||||||
reject_unknown_sender_domain
|
|
||||||
smtpd_client_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unknown_client_hostname
|
|
||||||
# Maximum size of Message in bytes (50MB)
|
|
||||||
message_size_limit = 52428800
|
|
||||||
|
|
||||||
## SASL Auth Settings
|
|
||||||
smtpd_sasl_auth_enable = yes
|
|
||||||
smtpd_sasl_local_domain = $myhostname
|
|
||||||
broken_sasl_auth_clients = yes
|
|
||||||
|
|
||||||
# Virtual delivery settings
|
|
||||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
|
||||||
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
|
|
||||||
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
|
|
||||||
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
|
|
||||||
virtual_uid_maps = static:<VIRTUAL_UID_MAPS>
|
|
||||||
virtual_gid_maps = static:<VIRTUAL_GID_MAPS>
|
|
||||||
|
|
||||||
# Local delivery settings
|
|
||||||
local_transport = local
|
|
||||||
alias_maps = $alias_database
|
|
||||||
|
|
||||||
# Default Mailbox size, is set to 0 which means unlimited!
|
|
||||||
mailbox_size_limit = 0
|
|
||||||
virtual_mailbox_limit = 0
|
|
||||||
|
|
||||||
### TLS settings
|
|
||||||
###
|
|
||||||
## TLS for outgoing mails from the server to another server
|
|
||||||
#smtp_tls_security_level = may
|
|
||||||
#smtp_tls_note_starttls_offer = yes
|
|
||||||
## TLS for email client
|
|
||||||
#smtpd_tls_security_level = may
|
|
||||||
#smtpd_tls_cert_file = /etc/ssl/server/<SERVERNAME>.pem
|
|
||||||
#smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
|
|
||||||
#smtpd_tls_loglevel = 1
|
|
||||||
#smtpd_tls_received_header = yes
|
|
||||||
|
|
||||||
debugger_command =
|
|
||||||
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
|
||||||
ddd $daemon_directory/$process_name $process_id & sleep 5
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
table = mail_virtual
|
|
||||||
select_field = destination
|
|
||||||
where_field = email
|
|
||||||
additional_conditions = and TRIM(destination) <> ''
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
table = panel_domains
|
|
||||||
select_field = domain
|
|
||||||
where_field = domain
|
|
||||||
additional_conditions = and isemaildomain = '1'
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
table = mail_users
|
|
||||||
select_field = (quota*1024*1024)
|
|
||||||
where_field = email
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
table = mail_users
|
|
||||||
select_field = maildir
|
|
||||||
where_field = email
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
@@ -59,18 +59,6 @@ SQLNamedQuery download UPDATE "down_count=down_count+1, down_bytes=down_bytes+%b
|
|||||||
SQLLog STOR upload
|
SQLLog STOR upload
|
||||||
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
||||||
|
|
||||||
# Quota settings
|
|
||||||
QuotaEngine on
|
|
||||||
QuotaShowQuotas on
|
|
||||||
QuotaDisplayUnits Mb
|
|
||||||
QuotaLock /var/lock/ftpd.quotatab.lock
|
|
||||||
QuotaLimitTable sql:/get-quota-limit
|
|
||||||
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
|
|
||||||
SQLNamedQuery get-quota-limit SELECT "ftp_users.username AS name, ftp_quotalimits.quota_type, ftp_quotalimits.per_session, ftp_quotalimits.limit_type, panel_customers.diskspace*1024 AS bytes_in_avail, ftp_quotalimits.bytes_out_avail, ftp_quotalimits.bytes_xfer_avail, ftp_quotalimits.files_in_avail, ftp_quotalimits.files_out_avail, ftp_quotalimits.files_xfer_avail FROM ftp_users, ftp_quotalimits, panel_customers WHERE ftp_users.username = '%{0}' AND panel_customers.loginname = SUBSTRING_INDEX('%{0}', 'ftp', 1) AND quota_type ='%{1}'"
|
|
||||||
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used,bytes_out_used, bytes_xfer_used, files_in_used, files_out_used,files_xfer_used FROM ftp_quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
|
|
||||||
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used= files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name= '%{6}' AND quota_type = '%{7}'" ftp_quotatallies
|
|
||||||
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}, %{7}" ftp_quotatallies
|
|
||||||
|
|
||||||
# TLS settings
|
# TLS settings
|
||||||
#<IfModule mod_tls.c>
|
#<IfModule mod_tls.c>
|
||||||
#TLSEngine on
|
#TLSEngine on
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ LoadModule mod_sql.c
|
|||||||
#LoadModule mod_ldap.c
|
#LoadModule mod_ldap.c
|
||||||
LoadModule mod_sql_mysql.c
|
LoadModule mod_sql_mysql.c
|
||||||
#LoadModule mod_sql_postgres.c
|
#LoadModule mod_sql_postgres.c
|
||||||
LoadModule mod_quotatab.c
|
#LoadModule mod_quotatab.c
|
||||||
#LoadModule mod_quotatab_file.c
|
#LoadModule mod_quotatab_file.c
|
||||||
#LoadModule mod_quotatab_ldap.c
|
#LoadModule mod_quotatab_ldap.c
|
||||||
LoadModule mod_quotatab_sql.c
|
#LoadModule mod_quotatab_sql.c
|
||||||
#LoadModule mod_radius.c
|
#LoadModule mod_radius.c
|
||||||
LoadModule mod_wrap.c
|
LoadModule mod_wrap.c
|
||||||
LoadModule mod_rewrite.c
|
LoadModule mod_rewrite.c
|
||||||
|
|||||||
@@ -67,14 +67,3 @@ SQLNamedQuery download UPDATE "down_count=down_count+1, down_bytes=down_bytes+%b
|
|||||||
|
|
||||||
SQLLog STOR upload
|
SQLLog STOR upload
|
||||||
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
||||||
|
|
||||||
QuotaEngine on
|
|
||||||
QuotaShowQuotas on
|
|
||||||
QuotaDisplayUnits Mb
|
|
||||||
QuotaLock /var/lock/ftpd.quotatab.lock
|
|
||||||
QuotaLimitTable sql:/get-quota-limit
|
|
||||||
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
|
|
||||||
SQLNamedQuery get-quota-limit SELECT "ftp_users.username AS name, ftp_quotalimits.quota_type, ftp_quotalimits.per_session, ftp_quotalimits.limit_type, panel_customers.diskspace*1024 AS bytes_in_avail, ftp_quotalimits.bytes_out_avail, ftp_quotalimits.bytes_xfer_avail, ftp_quotalimits.files_in_avail, ftp_quotalimits.files_out_avail, ftp_quotalimits.files_xfer_avail FROM ftp_users, ftp_quotalimits, panel_customers WHERE ftp_users.username = '%{0}' AND panel_customers.loginname = SUBSTRING_INDEX('%{0}', 'ftp', 1) AND quota_type ='%{1}'"
|
|
||||||
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used,bytes_out_used, bytes_xfer_used, files_in_used, files_out_used,files_xfer_used FROM ftp_quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
|
|
||||||
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used= files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name= '%{6}' AND quota_type = '%{7}'" ftp_quotatallies
|
|
||||||
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}, %{7}" ftp_quotatallies
|
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
|
# Postfix programs paths settings
|
||||||
|
command_directory = /usr/sbin
|
||||||
|
daemon_directory = /usr/lib/postfix
|
||||||
|
program_directory = /usr/lib/postfix
|
||||||
|
sendmail_path = /usr/sbin/sendmail
|
||||||
|
|
||||||
## General Postfix configuration
|
## General Postfix configuration
|
||||||
# should be the default domain from your provider eg. "server100.provider.tld"
|
# should be the default domain from your provider eg. "server100.provider.tld"
|
||||||
mydomain = <SERVERNAME>
|
mydomain = <SERVERNAME>
|
||||||
|
|
||||||
# should be different from $mydomain eg. "mail.$mydomain"
|
# should be different from $mydomain eg. "mail.$mydomain"
|
||||||
myhostname = <SERVERNAME>
|
myhostname = mail.<SERVERNAME>
|
||||||
|
|
||||||
mydestination = $myhostname,
|
mydestination = $myhostname,
|
||||||
$mydomain,
|
$mydomain,
|
||||||
@@ -20,7 +26,7 @@ default_destination_concurrency_limit = 20
|
|||||||
local_destination_concurrency_limit = 2
|
local_destination_concurrency_limit = 2
|
||||||
|
|
||||||
# SMTPD Settings
|
# SMTPD Settings
|
||||||
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
|
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu/GNU)
|
||||||
smtpd_helo_required = yes
|
smtpd_helo_required = yes
|
||||||
smtpd_recipient_restrictions = permit_mynetworks,
|
smtpd_recipient_restrictions = permit_mynetworks,
|
||||||
permit_sasl_authenticated,
|
permit_sasl_authenticated,
|
||||||
@@ -29,24 +35,25 @@ smtpd_recipient_restrictions = permit_mynetworks,
|
|||||||
reject_non_fqdn_recipient
|
reject_non_fqdn_recipient
|
||||||
smtpd_sender_restrictions = permit_mynetworks,
|
smtpd_sender_restrictions = permit_mynetworks,
|
||||||
permit_sasl_authenticated,
|
permit_sasl_authenticated,
|
||||||
reject_unknown_helo_hostname,
|
reject_unknown_hostname,
|
||||||
reject_unknown_recipient_domain,
|
reject_unknown_recipient_domain,
|
||||||
reject_unknown_sender_domain
|
reject_unknown_sender_domain
|
||||||
smtpd_client_restrictions = permit_mynetworks,
|
smtpd_client_restrictions = permit_mynetworks,
|
||||||
permit_sasl_authenticated,
|
permit_sasl_authenticated,
|
||||||
reject_unknown_client_hostname
|
reject_unknown_client
|
||||||
# Maximum size of Message in bytes (50MB)
|
# Maximum size of Message in bytes (50MB)
|
||||||
message_size_limit = 52428800
|
message_size_limit = 52428800
|
||||||
|
|
||||||
## SASL Auth Settings
|
## SASL Auth Settings
|
||||||
smtpd_sasl_auth_enable = yes
|
smtpd_sasl_auth_enable = yes
|
||||||
smtpd_sasl_local_domain = $myhostname
|
smtpd_sasl_local_domain = $myhostname
|
||||||
|
smtpd_sasl_security_options = noanonymous
|
||||||
broken_sasl_auth_clients = yes
|
broken_sasl_auth_clients = yes
|
||||||
## Dovecot Settings for deliver, SASL Auth and virtual transport
|
## Dovecot Settings for deliver, SASL Auth and virtual transport
|
||||||
smtpd_sasl_type = dovecot
|
## uncomment those line to use Dovecot
|
||||||
mailbox_command = /usr/lib/dovecot/deliver
|
#mailbox_command = /usr/lib/dovecot/deliver
|
||||||
virtual_transport = dovecot
|
#virtual_transport = dovecot
|
||||||
dovecot_destination_recipient_limit = 1
|
#dovecot_destination_recipient_limit = 1
|
||||||
|
|
||||||
# Virtual delivery settings
|
# Virtual delivery settings
|
||||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
||||||
@@ -58,6 +65,7 @@ virtual_gid_maps = static:<VIRTUAL_GID_MAPS>
|
|||||||
|
|
||||||
# Local delivery settings
|
# Local delivery settings
|
||||||
local_transport = local
|
local_transport = local
|
||||||
|
alias_database = hash:/etc/aliases
|
||||||
alias_maps = $alias_database
|
alias_maps = $alias_database
|
||||||
|
|
||||||
# Default Mailbox size, is set to 0 which means unlimited!
|
# Default Mailbox size, is set to 0 which means unlimited!
|
||||||
@@ -67,14 +75,17 @@ virtual_mailbox_limit = 0
|
|||||||
### TLS settings
|
### TLS settings
|
||||||
###
|
###
|
||||||
## TLS for outgoing mails from the server to another server
|
## TLS for outgoing mails from the server to another server
|
||||||
#smtp_tls_security_level = may
|
#smtp_use_tls = yes
|
||||||
#smtp_tls_note_starttls_offer = yes
|
#smtp_tls_note_starttls_offer = yes
|
||||||
## TLS for email client
|
## TLS for email client
|
||||||
#smtpd_tls_security_level = may
|
#smtpd_tls_cert_file = /etc/ssl/server/<SERVERNAME>.crt
|
||||||
#smtpd_tls_cert_file = /etc/ssl/server/<SERVERNAME>.pem
|
#smtpd_tls_key_file = /etc/ssl/server/<SERVERNAME>.key
|
||||||
#smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
|
#smtpd_tls_CAfile = /etc/ssl/cacert.class3.crt # Just an example for CACert.org
|
||||||
|
#smtpd_tls_auth_only = no
|
||||||
#smtpd_tls_loglevel = 1
|
#smtpd_tls_loglevel = 1
|
||||||
#smtpd_tls_received_header = yes
|
#smtpd_tls_received_header = yes
|
||||||
|
#smtpd_tls_session_cache_timeout = 3600s
|
||||||
|
#tls_random_source = dev:/dev/urandom
|
||||||
|
|
||||||
debugger_command =
|
debugger_command =
|
||||||
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
## General Postfix configuration
|
|
||||||
# should be the default domain from your provider eg. "server100.provider.tld"
|
|
||||||
mydomain = <SERVERNAME>
|
|
||||||
|
|
||||||
# should be different from $mydomain eg. "mail.$mydomain"
|
|
||||||
myhostname = <SERVERNAME>
|
|
||||||
|
|
||||||
mydestination = $myhostname,
|
|
||||||
$mydomain,
|
|
||||||
localhost.$myhostname,
|
|
||||||
localhost.$mydomain,
|
|
||||||
localhost
|
|
||||||
mynetworks = 127.0.0.0/8
|
|
||||||
inet_interfaces = all
|
|
||||||
append_dot_mydomain = no
|
|
||||||
biff = no
|
|
||||||
|
|
||||||
# Postfix performance settings
|
|
||||||
default_destination_concurrency_limit = 20
|
|
||||||
local_destination_concurrency_limit = 2
|
|
||||||
|
|
||||||
# SMTPD Settings
|
|
||||||
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
|
|
||||||
smtpd_helo_required = yes
|
|
||||||
smtpd_recipient_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unauth_destination,
|
|
||||||
reject_unauth_pipelining,
|
|
||||||
reject_non_fqdn_recipient
|
|
||||||
smtpd_sender_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unknown_helo_hostname,
|
|
||||||
reject_unknown_recipient_domain,
|
|
||||||
reject_unknown_sender_domain
|
|
||||||
smtpd_client_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unknown_client_hostname
|
|
||||||
# Maximum size of Message in bytes (50MB)
|
|
||||||
message_size_limit = 52428800
|
|
||||||
|
|
||||||
## SASL Auth Settings
|
|
||||||
smtpd_sasl_auth_enable = yes
|
|
||||||
smtpd_sasl_local_domain = $myhostname
|
|
||||||
broken_sasl_auth_clients = yes
|
|
||||||
|
|
||||||
# Virtual delivery settings
|
|
||||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
|
||||||
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
|
|
||||||
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
|
|
||||||
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
|
|
||||||
virtual_uid_maps = static:<VIRTUAL_UID_MAPS>
|
|
||||||
virtual_gid_maps = static:<VIRTUAL_GID_MAPS>
|
|
||||||
|
|
||||||
# Local delivery settings
|
|
||||||
local_transport = local
|
|
||||||
alias_maps = $alias_database
|
|
||||||
|
|
||||||
# Default Mailbox size, is set to 0 which means unlimited!
|
|
||||||
mailbox_size_limit = 0
|
|
||||||
virtual_mailbox_limit = 0
|
|
||||||
|
|
||||||
### TLS settings
|
|
||||||
###
|
|
||||||
## TLS for outgoing mails from the server to another server
|
|
||||||
#smtp_tls_security_level = may
|
|
||||||
#smtp_tls_note_starttls_offer = yes
|
|
||||||
## TLS for email client
|
|
||||||
#smtpd_tls_security_level = may
|
|
||||||
#smtpd_tls_cert_file = /etc/ssl/server/<SERVERNAME>.pem
|
|
||||||
#smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
|
|
||||||
#smtpd_tls_loglevel = 1
|
|
||||||
#smtpd_tls_received_header = yes
|
|
||||||
|
|
||||||
debugger_command =
|
|
||||||
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
|
||||||
ddd $daemon_directory/$process_name $process_id & sleep 5
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
table = mail_virtual
|
|
||||||
select_field = destination
|
|
||||||
where_field = email
|
|
||||||
additional_conditions = and TRIM(destination) <> ''
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
table = panel_domains
|
|
||||||
select_field = domain
|
|
||||||
where_field = domain
|
|
||||||
additional_conditions = and isemaildomain = '1'
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
table = mail_users
|
|
||||||
select_field = maildir
|
|
||||||
where_field = email
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
table = mail_virtual
|
|
||||||
select_field = destination
|
|
||||||
where_field = email
|
|
||||||
additional_conditions = and TRIM(destination) <> ''
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
table = panel_domains
|
|
||||||
select_field = domain
|
|
||||||
where_field = domain
|
|
||||||
additional_conditions = and isemaildomain = '1'
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
table = mail_users
|
|
||||||
select_field = maildir
|
|
||||||
where_field = email
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
@@ -18,10 +18,10 @@ LoadModule mod_sql.c
|
|||||||
#LoadModule mod_ldap.c
|
#LoadModule mod_ldap.c
|
||||||
LoadModule mod_sql_mysql.c
|
LoadModule mod_sql_mysql.c
|
||||||
#LoadModule mod_sql_postgres.c
|
#LoadModule mod_sql_postgres.c
|
||||||
LoadModule mod_quotatab.c
|
#LoadModule mod_quotatab.c
|
||||||
#LoadModule mod_quotatab_file.c
|
#LoadModule mod_quotatab_file.c
|
||||||
#LoadModule mod_quotatab_ldap.c
|
#LoadModule mod_quotatab_ldap.c
|
||||||
LoadModule mod_quotatab_sql.c
|
#LoadModule mod_quotatab_sql.c
|
||||||
#LoadModule mod_radius.c
|
#LoadModule mod_radius.c
|
||||||
LoadModule mod_wrap.c
|
LoadModule mod_wrap.c
|
||||||
LoadModule mod_rewrite.c
|
LoadModule mod_rewrite.c
|
||||||
|
|||||||
@@ -62,14 +62,3 @@ SQLNamedQuery download UPDATE "down_count=down_count+1, down_bytes=down_bytes+%b
|
|||||||
|
|
||||||
SQLLog STOR upload
|
SQLLog STOR upload
|
||||||
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
||||||
|
|
||||||
QuotaEngine on
|
|
||||||
QuotaShowQuotas on
|
|
||||||
QuotaDisplayUnits Mb
|
|
||||||
QuotaLock /var/lock/ftpd.quotatab.lock
|
|
||||||
QuotaLimitTable sql:/get-quota-limit
|
|
||||||
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
|
|
||||||
SQLNamedQuery get-quota-limit SELECT "ftp_users.username AS name, ftp_quotalimits.quota_type, ftp_quotalimits.per_session, ftp_quotalimits.limit_type, panel_customers.diskspace*1024 AS bytes_in_avail, ftp_quotalimits.bytes_out_avail, ftp_quotalimits.bytes_xfer_avail, ftp_quotalimits.files_in_avail, ftp_quotalimits.files_out_avail, ftp_quotalimits.files_xfer_avail FROM ftp_users, ftp_quotalimits, panel_customers WHERE ftp_users.username = '%{0}' AND panel_customers.loginname = SUBSTRING_INDEX('%{0}', 'ftp', 1) AND quota_type ='%{1}'"
|
|
||||||
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used,bytes_out_used, bytes_xfer_used, files_in_used, files_out_used,files_xfer_used FROM ftp_quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
|
|
||||||
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used= files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name= '%{6}' AND quota_type = '%{7}'" ftp_quotatallies
|
|
||||||
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}, %{7}" ftp_quotatallies
|
|
||||||
|
|||||||
@@ -8,4 +8,3 @@ MYSQLGetPW SELECT password FROM ftp_users WHERE username="\L" AND login_ena
|
|||||||
MYSQLGetUID SELECT uid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
MYSQLGetUID SELECT uid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
MYSQLGetGID SELECT gid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
MYSQLGetGID SELECT gid FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
MYSQLGetDir SELECT homedir FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
MYSQLGetDir SELECT homedir FROM ftp_users WHERE username="\L" AND login_enabled="y"
|
||||||
MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_customers, ftp_users WHERE username = "\L" AND panel_customers.loginname = SUBSTRING_INDEX('\L', 'ftp', 1)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user