Compare commits
29 Commits
0.9.23-rc1
...
0.9.24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1e083c8b2 | ||
|
|
70a077da48 | ||
|
|
c5fb8bee6b | ||
|
|
418990e271 | ||
|
|
93ab8964f1 | ||
|
|
fd599da07e | ||
|
|
369df7af62 | ||
|
|
bb01dd0d93 | ||
|
|
84f00a2519 | ||
|
|
8e07768996 | ||
|
|
9b12025c9f | ||
|
|
14f9344c50 | ||
|
|
af430f9946 | ||
|
|
992702870c | ||
|
|
642cd3da9d | ||
|
|
5d2d1ffa1a | ||
|
|
19bbecb535 | ||
|
|
e636e6eb39 | ||
|
|
86ac4708f0 | ||
|
|
f49ac9e193 | ||
|
|
f0d9db420a | ||
|
|
526dbbd68e | ||
|
|
9a05a71f6b | ||
|
|
e4f3af5d4b | ||
|
|
3a7b7c1300 | ||
|
|
cdea6cecfb | ||
|
|
c36a7bf22b | ||
|
|
ca2a8c9907 | ||
|
|
4914fc640a |
@@ -59,6 +59,7 @@ return array(
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingHostname',
|
||||
'plausibility_check_method' => 'checkHostname',
|
||||
),
|
||||
'system_froxlordirectlyviahostname' => array(
|
||||
'label' => $lng['serversettings']['froxlordirectlyviahostname'],
|
||||
|
||||
@@ -133,7 +133,7 @@ return array(
|
||||
'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']),
|
||||
'option_options' => array(1 => $lng['ticket']['high'], 2 => $lng['ticket']['normal'], 3 => $lng['ticket']['low']),
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
|
||||
@@ -38,7 +38,7 @@ return array(
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/customers/backups/',
|
||||
'string_regexp' => '/^/.*/$/',
|
||||
'string_regexp' => '^/.*/$',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'backup_mysqldump_path' => array(
|
||||
@@ -96,7 +96,7 @@ return array(
|
||||
'label' => $lng['serversettings']['backup_ftp_pass'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_ftp_pass',
|
||||
'type' => 'string',
|
||||
'type' => 'hiddenstring',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
|
||||
67
actions/admin/settings/225.logrotate.php
Normal file
67
actions/admin/settings/225.logrotate.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?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
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'logrotate' => array(
|
||||
'title' => $lng['logrotate'],
|
||||
'fields' => array(
|
||||
'logrotate_enabled' => array(
|
||||
'label' => $lng['logrotate_enabled'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'logrotate_enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'logrotate_binary' => array(
|
||||
'label' => $lng['logrotate_binary'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'logrotate_binary',
|
||||
'type' => 'string',
|
||||
'default' => '/usr/sbin/logrotate',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false
|
||||
),
|
||||
'logrotate_interval' => array(
|
||||
'label' => $lng['logrotate_interval'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'logrotate_interval',
|
||||
'type' => 'option',
|
||||
'default' => 'weekly',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('daily' => 'Daily', 'weekly' => 'Weekly', 'monthly' => 'Monthly'),
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false
|
||||
),
|
||||
'logrotate_keep' => array(
|
||||
'label' => $lng['logrotate_keep'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'logrotate_keep',
|
||||
'type' => 'string',
|
||||
'default' => '4',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -117,12 +117,21 @@ if($page == 'customers'
|
||||
/**
|
||||
* percent-values for progressbar
|
||||
*/
|
||||
//For Disk usage
|
||||
if ($row['diskspace'] > 0) {
|
||||
$percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
|
||||
$doublepercent = round($percent*2, 2);
|
||||
$disk_percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
|
||||
$disk_doublepercent = round($disk_percent*2, 2);
|
||||
} else {
|
||||
$percent = 0;
|
||||
$doublepercent = 0;
|
||||
$disk_percent = 0;
|
||||
$disk_doublepercent = 0;
|
||||
}
|
||||
|
||||
if ($row['traffic'] > 0) {
|
||||
$traffic_percent = round(($row['traffic_used']*100)/$row['traffic'], 2);
|
||||
$traffic_doublepercent = round($traffic_percent*2, 2);
|
||||
} else {
|
||||
$traffic_percent = 0;
|
||||
$traffic_doublepercent = 0;
|
||||
}
|
||||
|
||||
$column_style = '';
|
||||
@@ -219,8 +228,8 @@ if($page == 'customers'
|
||||
foreach(array_unique(explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
||||
{
|
||||
$mysql_access_host = trim($mysql_access_host);
|
||||
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
||||
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
||||
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`',false,true);
|
||||
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`',false,true);
|
||||
$db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $db_root->escape($row_database['databasename']) . '" AND `Host` = "' . $db_root->escape($mysql_access_host) . '"');
|
||||
}
|
||||
|
||||
|
||||
@@ -1054,7 +1054,8 @@ if($page == 'domains'
|
||||
|| $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests']
|
||||
|| $specialsettings != $result['specialsettings']
|
||||
|| $aliasdomain != $result['aliasdomain']
|
||||
|| $issubof != $result['ismainbutsubto'])
|
||||
|| $issubof != $result['ismainbutsubto']
|
||||
|| $email_only != $result['email_only'])
|
||||
{
|
||||
inserttask('1');
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ if($page == 'tickets'
|
||||
$newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
|
||||
$newticket->Set('category', validate($_POST['category'], 'category'), true, false);
|
||||
$newticket->Set('customer', (int)$_POST['customer'], true, false);
|
||||
$newticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
|
||||
$newticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
|
||||
|
||||
if($newticket->Get('subject') == null)
|
||||
{
|
||||
@@ -224,9 +224,9 @@ if($page == 'tickets'
|
||||
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
|
||||
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
|
||||
$priorities = makeoption($lng['ticket']['high'], '1', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['normal'], '2', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['low'], '3', $settings['ticket']['default_priority']);
|
||||
|
||||
$ticket_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.ticket_new.php';
|
||||
$ticket_new_form = htmlform::genHTMLForm($ticket_new_data);
|
||||
@@ -251,7 +251,7 @@ if($page == 'tickets'
|
||||
$replyticket = ticket::getInstanceOf($userinfo, $db, $settings, -1);
|
||||
$replyticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
|
||||
$replyticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
|
||||
$replyticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
|
||||
$replyticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
|
||||
|
||||
if($replyticket->Get('message') == null)
|
||||
{
|
||||
@@ -673,6 +673,16 @@ elseif($page == 'archive'
|
||||
}
|
||||
|
||||
$tickets_count++;
|
||||
switch ($ticket['priority'])
|
||||
{
|
||||
case 1: $ticket['display'] = 'high';
|
||||
break;
|
||||
case 2: $ticket['display'] = 'normal';
|
||||
break;
|
||||
case 3: $ticket['display'] = 'low';
|
||||
break;
|
||||
default: $ticket['display'] = 'unknown';
|
||||
}
|
||||
$ticket['priority'] = ticket::getPriorityText($lng, $ticket['priority']);
|
||||
|
||||
if($ticket['lastreplier'] == '1')
|
||||
@@ -688,9 +698,7 @@ elseif($page == 'archive'
|
||||
{
|
||||
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
|
||||
}
|
||||
|
||||
$ticket = htmlentities_array($ticket);
|
||||
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/archived_tickets") . "\";");
|
||||
$count++;
|
||||
$_cid = $ticket['customerid'];
|
||||
@@ -733,9 +741,9 @@ elseif($page == 'archive'
|
||||
}
|
||||
}
|
||||
|
||||
$priorities_options = makecheckbox('priority1', $lng['ticket']['unf_high'], '1');
|
||||
$priorities_options.= makecheckbox('priority2', $lng['ticket']['unf_normal'], '2');
|
||||
$priorities_options.= makecheckbox('priority3', $lng['ticket']['unf_low'], '3');
|
||||
$priorities_options = makecheckbox('priority1', $lng['ticket']['high'], '1');
|
||||
$priorities_options.= makecheckbox('priority2', $lng['ticket']['normal'], '2');
|
||||
$priorities_options.= makecheckbox('priority3', $lng['ticket']['low'], '3');
|
||||
$category_options = '';
|
||||
$ccount = 0;
|
||||
$result = $db->query('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
|
||||
|
||||
@@ -62,17 +62,24 @@ elseif($page == 'mysqls')
|
||||
$count = 0;
|
||||
$mysqls = '';
|
||||
|
||||
// Begin root-session
|
||||
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
|
||||
unset($db_root->password);
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if($paging->checkDisplay($i))
|
||||
{
|
||||
$row = htmlentities_array($row);
|
||||
$mbdata = $db_root->query_first("SELECT SUM( data_length + index_length) / 1024 / 1024 'MB' FROM information_schema.TABLES WHERE table_schema = '" . $db_root->escape($row['databasename']) . "' GROUP BY table_schema ;");
|
||||
$row['size'] = number_format($mbdata['MB'], 3, '.', '');
|
||||
eval("\$mysqls.=\"" . getTemplate("mysql/mysqls_database") . "\";");
|
||||
$count++;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
$db_root->close();
|
||||
// End root-session
|
||||
|
||||
$mysqls_count = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("mysql/mysqls") . "\";");
|
||||
|
||||
@@ -227,9 +227,9 @@ elseif($page == 'tickets')
|
||||
$categories = makeoption($lng['ticket']['no_cat'], '0');
|
||||
}
|
||||
|
||||
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
|
||||
$priorities = makeoption($lng['ticket']['high'], '1', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['normal'], '2', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['low'], '3', $settings['ticket']['default_priority']);
|
||||
$ticketsopen = 0;
|
||||
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
|
||||
WHERE `customerid` = "' . $userinfo['customerid'] . '"
|
||||
|
||||
BIN
images/favicon.ico
Normal file
BIN
images/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -468,7 +468,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('syste
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'vmail_homedir', '/var/customers/mail/');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'bindconf_directory', '/etc/bind/');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'version', '0.9.23-rc1');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'version', '0.9.24');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'hostname', 'SERVERNAME');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('login', 'maxloginattempts', '3');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('login', 'deactivatetime', '900');
|
||||
@@ -636,6 +636,10 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('syste
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'diskquota_repquota_path', '/usr/sbin/repquota');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'diskquota_quotatool_path', '/usr/bin/quotatool');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'diskquota_customer_partition', '/dev/root');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'logrotate_enabled', '0');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'logrotate_binary', '/usr/sbin/logrotate');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'logrotate_interval', 'weekly');
|
||||
INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'logrotate_keep', '4');
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1670,3 +1670,42 @@ if(isFroxlorVersion('0.9.22'))
|
||||
updateToVersion('0.9.23-rc1');
|
||||
}
|
||||
|
||||
|
||||
if(isFroxlorVersion('0.9.23-rc1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.23-rc1 to 0.9.23");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.23');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.23'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.23 to 0.9.24-svn1");
|
||||
lastStepStatus(0);
|
||||
|
||||
/* add new settings for logrotate - support */
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'logrotate_enabled', '0');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'logrotate_binary', '/usr/sbin/logrotate');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'logrotate_interval', 'weekly');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'logrotate_keep', '4');");
|
||||
|
||||
updateToVersion('0.9.24-svn1');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.24-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.24-svn1 to 0.9.24-rc1");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.24-rc1');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.24-rc1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.24-rc1 to 0.9.24");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.24');
|
||||
}
|
||||
|
||||
|
||||
@@ -73,9 +73,9 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
$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');
|
||||
$priorities = makeoption($lng['ticket']['high'], '1', '2');
|
||||
$priorities.= makeoption($lng['ticket']['normal'], '2', '2');
|
||||
$priorities.= makeoption($lng['ticket']['low'], '3', '2');
|
||||
$question .= $priorities.'</select>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
@@ -205,8 +205,8 @@ class phpinterface_fpm
|
||||
|
||||
if(!is_dir($socketdir) && $createifnotexists)
|
||||
{
|
||||
safe_exec('mkdir -p '.$socketdir);
|
||||
safe_exec('chown -R '.$this->_settings['system']['httpuser'].':'.$this->_settings['system']['httpgroup'].' '.$socketdir);
|
||||
safe_exec('mkdir -p '.escapeshellarg($socketdir));
|
||||
safe_exec('chown -R '.$this->_settings['system']['httpuser'].':'.$this->_settings['system']['httpgroup'].' '.escapeshellarg($socketdir));
|
||||
}
|
||||
|
||||
return $socket;
|
||||
|
||||
@@ -25,7 +25,7 @@ return array(
|
||||
'fields' => array(
|
||||
'path' => array(
|
||||
'label' => $lng['extras']['backup_create'],
|
||||
'desc' => $lng['extras']['backup_info'].'<br />'.($settings['system']['backup_bigfile'] == 1 ? $lng['extras']['backup_info_big'] : $lng['extras']['backup_info_sep']).'<br />'.$lng['extras']['backup_count_info'],
|
||||
'desc' => $lng['extras']['backup_info'].'<br />'.($settings['system']['backup_bigfile'] == 1 ? $lng['extras']['backup_info_big'] : $lng['extras']['backup_info_sep']).'<br />'.($settings['system']['backup_count'] == 1 ? $lng['extras']['backup_count_info'] : ''),
|
||||
'type' => 'yesno',
|
||||
'yesno_var' => $backup_enabled
|
||||
)
|
||||
|
||||
@@ -29,7 +29,7 @@ function makeChownWithNewStats($row)
|
||||
global $settings;
|
||||
|
||||
// get correct user
|
||||
if($settings['system']['mod_fcgid'] == 1)
|
||||
if($settings['system']['mod_fcgid'] == '1' && $row['deactivated'] == '0')
|
||||
{
|
||||
$user = $row['loginname'];
|
||||
$group = $row['loginname'];
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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 Functions
|
||||
*
|
||||
*/
|
||||
|
||||
function getFormFieldOutputHiddenString($fieldname, $fielddata)
|
||||
{
|
||||
$label = $fielddata['label'];
|
||||
$value = htmlentities($fielddata['value']);
|
||||
eval("\$returnvalue = \"" . getTemplate("formfields/hiddenstring", true) . "\";");
|
||||
return $returnvalue;
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
<?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 Functions
|
||||
*
|
||||
*/
|
||||
|
||||
function validateFormFieldHiddenString($fieldname, $fielddata, $newfieldvalue)
|
||||
{
|
||||
if(isset($fielddata['string_delimiter']) && $fielddata['string_delimiter'] != '')
|
||||
{
|
||||
$newfieldvalues = explode($fielddata['string_delimiter'], $newfieldvalue);
|
||||
unset($fielddata['string_delimiter']);
|
||||
|
||||
$returnvalue = true;
|
||||
foreach($newfieldvalues as $single_newfieldvalue)
|
||||
{
|
||||
/**
|
||||
* don't use tabs in value-fields, #81
|
||||
*/
|
||||
$single_newfieldvalue = str_replace("\t", " ", $single_newfieldvalue);
|
||||
$single_returnvalue = validateFormFieldString($fieldname, $fielddata, $single_newfieldvalue);
|
||||
if($single_returnvalue !== true)
|
||||
{
|
||||
$returnvalue = $single_returnvalue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$returnvalue = false;
|
||||
|
||||
/**
|
||||
* don't use tabs in value-fields, #81
|
||||
*/
|
||||
$newfieldvalue = str_replace("\t", " ", $newfieldvalue);
|
||||
|
||||
if(isset($fielddata['string_type']) && $fielddata['string_type'] == 'mail')
|
||||
{
|
||||
$returnvalue = (filter_var($newfieldvalue, FILTER_VALIDATE_EMAIL) == $newfieldvalue);
|
||||
}
|
||||
elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'url')
|
||||
{
|
||||
$returnvalue = validateUrl($newfieldvalue);
|
||||
}
|
||||
elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'dir')
|
||||
{
|
||||
// add trailing slash to validate path if needed
|
||||
// refs #331
|
||||
if(substr($newfieldvalue, -1) != '/') {
|
||||
$newfieldvalue.= '/';
|
||||
}
|
||||
$returnvalue = ($newfieldvalue == makeCorrectDir($newfieldvalue));
|
||||
}
|
||||
elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'file')
|
||||
{
|
||||
$returnvalue = ($newfieldvalue == makeCorrectFile($newfieldvalue));
|
||||
}
|
||||
elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'filedir')
|
||||
{
|
||||
$returnvalue = (($newfieldvalue == makeCorrectDir($newfieldvalue)) || ($newfieldvalue == makeCorrectFile($newfieldvalue)));
|
||||
}
|
||||
elseif(preg_match('/^[^\r\n\t\f\0]*$/D', $newfieldvalue))
|
||||
{
|
||||
$returnvalue = true;
|
||||
}
|
||||
|
||||
if(isset($fielddata['string_regexp']) && $fielddata['string_regexp'] != '')
|
||||
{
|
||||
if(preg_match($fielddata['string_regexp'], $newfieldvalue))
|
||||
{
|
||||
$returnvalue = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$returnvalue = false;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($fielddata['string_emptyallowed']) && $fielddata['string_emptyallowed'] === true && $newfieldvalue === '')
|
||||
{
|
||||
$returnvalue = true;
|
||||
}
|
||||
elseif(isset($fielddata['string_emptyallowed']) && $fielddata['string_emptyallowed'] === false && $newfieldvalue === '')
|
||||
{
|
||||
$returnvalue = 'stringmustntbeempty';
|
||||
}
|
||||
}
|
||||
|
||||
if($returnvalue === true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
elseif($returnvalue === false)
|
||||
{
|
||||
return 'stringformaterror';
|
||||
}
|
||||
else
|
||||
{
|
||||
return $returnvalue;
|
||||
}
|
||||
}
|
||||
27
lib/functions/validate/function.checkHostname.php
Normal file
27
lib/functions/validate/function.checkHostname.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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
|
||||
*
|
||||
*/
|
||||
|
||||
function checkHostname($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues)
|
||||
{
|
||||
echo $fieldname . "--" . $fielddata . "--" . $newfieldvalue . "--". $allnewfieldvalues;
|
||||
if (0 == strlen(trim($fielddata)))
|
||||
{
|
||||
return array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'invalidhostname');
|
||||
} else {
|
||||
return array(FORMFIELDS_PLAUSIBILITY_CHECK_OK);
|
||||
}
|
||||
}
|
||||
@@ -73,6 +73,6 @@ define('PACKAGE_ENABLED', 2);
|
||||
|
||||
// VERSION INFO
|
||||
|
||||
$version = '0.9.23-rc1';
|
||||
$version = '0.9.24';
|
||||
$dbversion = '2';
|
||||
$branding = '';
|
||||
|
||||
@@ -606,12 +606,9 @@ $lng['ticket']['subject'] = 'Pøedmì t';
|
||||
$lng['ticket']['status'] = 'Status';
|
||||
$lng['ticket']['lastreplier'] = 'Poslední odpovídající';
|
||||
$lng['ticket']['priority'] = 'Priorita';
|
||||
$lng['ticket']['low'] = '<span class="ticket_low">Nízká</span>';
|
||||
$lng['ticket']['normal'] = '<span class="ticket_normal">Normální</span>';
|
||||
$lng['ticket']['high'] = '<span class="ticket_high">Vysoká</span>';
|
||||
$lng['ticket']['unf_low'] = 'Nízká';
|
||||
$lng['ticket']['unf_normal'] = 'Normální';
|
||||
$lng['ticket']['unf_high'] = 'Vysoká';
|
||||
$lng['ticket']['low'] = 'Nízká';
|
||||
$lng['ticket']['normal'] = 'Normální';
|
||||
$lng['ticket']['high'] = 'Vysoká';
|
||||
$lng['ticket']['lastchange'] = 'Poslední zmì na';
|
||||
$lng['ticket']['lastchange_from'] = 'Od data (dd.mm.yyyy)';
|
||||
$lng['ticket']['lastchange_to'] = 'Do data (dd.mm.yyyy)';
|
||||
|
||||
@@ -601,12 +601,9 @@ $lng['ticket']['subject'] = 'Onderwerp';
|
||||
$lng['ticket']['status'] = 'Status';
|
||||
$lng['ticket']['lastreplier'] = 'Laatste beantwoorder';
|
||||
$lng['ticket']['priority'] = 'Prioriteit';
|
||||
$lng['ticket']['low'] = '<span class="ticket_low">Laag</span>';
|
||||
$lng['ticket']['normal'] = '<span class="ticket_normal">Normaal</span>';
|
||||
$lng['ticket']['high'] = '<span class="ticket_high">Hoog</span>';
|
||||
$lng['ticket']['unf_low'] = 'Laag';
|
||||
$lng['ticket']['unf_normal'] = 'Normaal';
|
||||
$lng['ticket']['unf_high'] = 'Hoog';
|
||||
$lng['ticket']['low'] = 'Laag';
|
||||
$lng['ticket']['normal'] = 'Normaal';
|
||||
$lng['ticket']['high'] = 'Hoog';
|
||||
$lng['ticket']['lastchange'] = 'Laatste wijziging';
|
||||
$lng['ticket']['lastchange_from'] = 'Datum vanaf (dd.mm.yyyy)';
|
||||
$lng['ticket']['lastchange_to'] = 'Datum tot (dd.mm.yyyy)';
|
||||
|
||||
@@ -153,8 +153,8 @@ $lng['ftp']['account_add'] = 'Create Account';
|
||||
* MySQL
|
||||
*/
|
||||
|
||||
$lng['mysql']['databasename'] = 'user/database name';
|
||||
$lng['mysql']['databasedescription'] = 'database description';
|
||||
$lng['mysql']['databasename'] = 'User/Database name';
|
||||
$lng['mysql']['databasedescription'] = 'Database description';
|
||||
$lng['mysql']['database_create'] = 'Create database';
|
||||
|
||||
/**
|
||||
@@ -611,12 +611,9 @@ $lng['ticket']['subject'] = 'Subject';
|
||||
$lng['ticket']['status'] = 'Status';
|
||||
$lng['ticket']['lastreplier'] = 'Last replier';
|
||||
$lng['ticket']['priority'] = 'Priority';
|
||||
$lng['ticket']['low'] = '<span class="ticket_low">Low</span>';
|
||||
$lng['ticket']['normal'] = '<span class="ticket_normal">Normal</span>';
|
||||
$lng['ticket']['high'] = '<span class="ticket_high">High</span>';
|
||||
$lng['ticket']['unf_low'] = 'Low';
|
||||
$lng['ticket']['unf_normal'] = 'Normal';
|
||||
$lng['ticket']['unf_high'] = 'High';
|
||||
$lng['ticket']['low'] = 'Low';
|
||||
$lng['ticket']['normal'] = 'Normal';
|
||||
$lng['ticket']['high'] = 'High';
|
||||
$lng['ticket']['lastchange'] = 'Last change';
|
||||
$lng['ticket']['lastchange_from'] = 'From date (dd.mm.yyyy)';
|
||||
$lng['ticket']['lastchange_to'] = 'To date (dd.mm.yyyy)';
|
||||
@@ -1423,7 +1420,7 @@ $lng['serversettings']['mail_also_with_mxservers'] = 'Create mail-, imap-, pop3-
|
||||
$lng['aps']['nocontingent'] = 'Your APS contingent is insufficient. You cannot install any package.';
|
||||
$lng['aps']['packageneedsdb'] = 'This package needs a database but your contingent is used up';
|
||||
$lng['aps']['cannoteditordeleteapsdb'] = 'APS databases cannot be edited or removed here';
|
||||
$lng['admin']['webserver_Puser'] = 'Webserver user-name';
|
||||
$lng['admin']['webserver_user'] = 'Webserver user-name';
|
||||
$lng['admin']['webserver_group'] = 'Webserver group-name';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.10
|
||||
@@ -1887,3 +1884,16 @@ $lng['serversettings']['diskquota_customer_partition']['description'] = 'Partiti
|
||||
$lng['tasks']['diskspace_set_quota'] = 'Set quota on filesystem';
|
||||
$lng['error']['session_timeout'] = 'Value too low';
|
||||
$lng['error']['session_timeout_desc'] = 'You should not set the session timeout lower than 1 minute.';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.24-svn1
|
||||
$lng['logrotate'] = 'Logrotate';
|
||||
$lng['logrotate_enabled'] = 'Enable logrotate?';
|
||||
$lng['logrotate_binary'] = 'Path to logrotate binary:';
|
||||
$lng['logrotate_interval'] = 'Interval?';
|
||||
$lng['logrotate_keep'] = 'How many logfiles should be kept?';
|
||||
$lng['admin']['assignedmax'] = 'Assigned / Max';
|
||||
$lng['admin']['usedmax'] = 'Used / Max';
|
||||
$lng['admin']['used'] = 'Used';
|
||||
$lng['mysql']['size'] = 'Database size (MB)';
|
||||
|
||||
$lng['error']['invalidhostname'] = 'Hostname can\'t be empty nor can it consist only of whitespaces';
|
||||
@@ -618,12 +618,9 @@ $lng['ticket']['subject'] = 'Sujet';
|
||||
$lng['ticket']['status'] = 'Etat';
|
||||
$lng['ticket']['lastreplier'] = 'Dernière réponse de';
|
||||
$lng['ticket']['priority'] = 'Priorité';
|
||||
$lng['ticket']['low'] = '<span class="ticket_low">Basse</span>';
|
||||
$lng['ticket']['normal'] = '<span class="ticket_normal">Normale</span>';
|
||||
$lng['ticket']['high'] = '<span class="ticket_high">Haute</span>';
|
||||
$lng['ticket']['unf_low'] = 'Basse';
|
||||
$lng['ticket']['unf_normal'] = 'Normale';
|
||||
$lng['ticket']['unf_high'] = 'Haute';
|
||||
$lng['ticket']['low'] = 'Basse';
|
||||
$lng['ticket']['normal'] = 'Normale';
|
||||
$lng['ticket']['high'] = 'Haute';
|
||||
$lng['ticket']['lastchange'] = 'Dernier changement';
|
||||
$lng['ticket']['lastchange_from'] = 'Depuis (jj.mm.aaaa)';
|
||||
$lng['ticket']['lastchange_to'] = 'Jusqu\'au (jj.mm.aaaa)';
|
||||
|
||||
@@ -614,12 +614,9 @@ $lng['ticket']['subject'] = 'Betreff';
|
||||
$lng['ticket']['status'] = 'Status';
|
||||
$lng['ticket']['lastreplier'] = 'Letzte Antwort';
|
||||
$lng['ticket']['priority'] = 'Priorität';
|
||||
$lng['ticket']['low'] = '<span class="ticket_low">Niedrig</span>';
|
||||
$lng['ticket']['normal'] = '<span class="ticket_normal">Normal</span>';
|
||||
$lng['ticket']['high'] = '<span class="ticket_high">Hoch</span>';
|
||||
$lng['ticket']['unf_low'] = 'Niedrig';
|
||||
$lng['ticket']['unf_normal'] = 'Normal';
|
||||
$lng['ticket']['unf_high'] = 'Hoch';
|
||||
$lng['ticket']['low'] = 'Niedrig';
|
||||
$lng['ticket']['normal'] = 'Normal';
|
||||
$lng['ticket']['high'] = 'Hoch';
|
||||
$lng['ticket']['lastchange'] = 'Letzte Änderung';
|
||||
$lng['ticket']['lastchange_from'] = 'Anfangsdatum (tt.mm.jjjj)';
|
||||
$lng['ticket']['lastchange_to'] = 'Enddatum (tt.mm.jjjj)';
|
||||
@@ -1618,3 +1615,16 @@ $lng['serversettings']['diskquota_customer_partition']['description'] = 'Partiti
|
||||
$lng['tasks']['diskspace_set_quota'] = 'Quota auf dem Dateisystem setzen';
|
||||
$lng['error']['session_timeout'] = 'Wert zu niedrig';
|
||||
$lng['error']['session_timeout_desc'] = 'Der Wert der Session Timeout sollte nicht unter einer Minute liegen.';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.24-svn1
|
||||
$lng['logrotate'] = 'Logrotate';
|
||||
$lng['logrotate_enabled'] = 'Logrotate aktivieren?';
|
||||
$lng['logrotate_binary'] = 'Pfad zum logrotate binary?';
|
||||
$lng['logrotate_interval'] = 'Intervall?';
|
||||
$lng['logrotate_keep'] = 'Wie viele Logdateien sollen aufbewahrt werden?';
|
||||
$lng['admin']['assignedmax'] = 'Zugewiesen / Max.';
|
||||
$lng['admin']['usedmax'] = 'Benutzt / Max.';
|
||||
$lng['admin']['used'] = 'Benutzt';
|
||||
$lng['mysql']['size'] = 'Datenbankgröße (MB)';
|
||||
|
||||
$lng['error']['invalidhostname'] = 'Hostname darf nicht leer sein oder nur aus Leerzeichen bestehen';
|
||||
@@ -614,12 +614,9 @@ $lng['ticket']['subject'] = 'Soggetto';
|
||||
$lng['ticket']['status'] = 'Stato';
|
||||
$lng['ticket']['lastreplier'] = 'Ultimo che ha risposto';
|
||||
$lng['ticket']['priority'] = 'Priorità';
|
||||
$lng['ticket']['low'] = '<span class="ticket_low">Bassa</span>';
|
||||
$lng['ticket']['normal'] = '<span class="ticket_normal">Normale</span>';
|
||||
$lng['ticket']['high'] = '<span class="ticket_high">Alta</span>';
|
||||
$lng['ticket']['unf_low'] = 'Bassa';
|
||||
$lng['ticket']['unf_normal'] = 'Normale';
|
||||
$lng['ticket']['unf_high'] = 'Alta';
|
||||
$lng['ticket']['low'] = 'Bassa';
|
||||
$lng['ticket']['normal'] = 'Normale';
|
||||
$lng['ticket']['high'] = 'Alta';
|
||||
$lng['ticket']['lastchange'] = 'Ultima modifica';
|
||||
$lng['ticket']['lastchange_from'] = 'Dalla data (dd.mm.yyyy)';
|
||||
$lng['ticket']['lastchange_to'] = 'Alla data (dd.mm.yyyy)';
|
||||
|
||||
@@ -607,12 +607,9 @@ $lng['ticket']['subject'] = 'Temat';
|
||||
$lng['ticket']['status'] = 'Status';
|
||||
$lng['ticket']['lastreplier'] = 'Ostatnia odpowiedź';
|
||||
$lng['ticket']['priority'] = 'Priorytet';
|
||||
$lng['ticket']['low'] = '<span class="ticket_low">Niski</span>';
|
||||
$lng['ticket']['normal'] = '<span class="ticket_normal">Normalny</span>';
|
||||
$lng['ticket']['high'] = '<span class="ticket_high">Wysoki</span>';
|
||||
$lng['ticket']['unf_low'] = 'Niski';
|
||||
$lng['ticket']['unf_normal'] = 'Normalny';
|
||||
$lng['ticket']['unf_high'] = 'Wysoki';
|
||||
$lng['ticket']['low'] = 'Niski';
|
||||
$lng['ticket']['normal'] = 'Normalny';
|
||||
$lng['ticket']['high'] = 'Wysoki';
|
||||
$lng['ticket']['lastchange'] = 'Ostatnia zmiana';
|
||||
$lng['ticket']['lastchange_from'] = 'Od daty (dd.mm.yyyy)';
|
||||
$lng['ticket']['lastchange_to'] = 'Do daty (dd.mm.yyyy)';
|
||||
|
||||
@@ -542,12 +542,9 @@ $lng['ticket']['subject'] = 'Assunto';
|
||||
$lng['ticket']['status'] = 'Status';
|
||||
$lng['ticket']['lastreplier'] = 'Último que respondeu';
|
||||
$lng['ticket']['priority'] = 'Prioridade';
|
||||
$lng['ticket']['low'] = '<span class="ticket_low">Baixa</span>';
|
||||
$lng['ticket']['normal'] = '<span class="ticket_normal">Normal</span>';
|
||||
$lng['ticket']['high'] = '<span class="ticket_high">Alta</span>';
|
||||
$lng['ticket']['unf_low'] = 'Baixa';
|
||||
$lng['ticket']['unf_normal'] = 'Normal';
|
||||
$lng['ticket']['unf_high'] = 'Alta';
|
||||
$lng['ticket']['low'] = 'Baixa';
|
||||
$lng['ticket']['normal'] = 'Normal';
|
||||
$lng['ticket']['high'] = 'Alta';
|
||||
$lng['ticket']['lastchange_from'] = 'De data (dd.mm.aaaa)';
|
||||
$lng['ticket']['lastchange_to'] = 'Até data (dd.mm.aaaa)';
|
||||
$lng['ticket']['category'] = 'Categoria';
|
||||
|
||||
@@ -40,39 +40,45 @@ if($settings['system']['backup_enabled'] == '1'){
|
||||
$ftp_row = mysql_fetch_array($ftp_result);
|
||||
|
||||
// create backup dir an set rights
|
||||
if(!file_exists($row['documentroot'] . $settings['system']['backup_dir'])){
|
||||
safe_exec('install -d ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . ' -o ' . escapeshellarg($ftp_row['uid']) . ' -g ' . escapeshellarg($ftp_row['gid']) . ' -m ' . '0500');
|
||||
if(!file_exists($settings['system']['backup_dir'] . $row['loginname'])) {
|
||||
safe_exec('install -d ' . escapeshellarg($settings['system']['backup_dir']) . escapeshellarg($row['loginname']) . ' -o ' . escapeshellarg($ftp_row['uid']) . ' -g ' . escapeshellarg($ftp_row['gid']) . ' -m ' . '0500');
|
||||
}
|
||||
|
||||
// create customers html backup
|
||||
safe_exec('tar -C ' . escapeshellarg($row['documentroot']) . ' -c -z -f ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . '/' . escapeshellarg($row['loginname']) . 'html.tar.gz .');
|
||||
safe_exec('tar -C ' . escapeshellarg($row['documentroot']) . ' -c -z -f ' . escapeshellarg($settings['system']['backup_dir']) . escapeshellarg($row['loginname']) . '/' . escapeshellarg($row['loginname']) . 'html.tar.gz .');
|
||||
|
||||
// get customer dbs
|
||||
$dbs_result = $db->query("SELECT databasename FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid` = '" . $db->escape($row['customerid']) . "';");
|
||||
while($dbs_row = $db->fetch_array($dbs_result)){
|
||||
// create customers sql backup
|
||||
safe_exec(escapeshellarg($settings['system']['backup_mysqldump_path']) . ' --opt --force --allow-keywords -u ' . $sql_root[0]['user'] . ' -p' . $sql_root[0]['password'] . ' -h ' . $sql_root[0]['host'] . ' ' . escapeshellarg($dbs_row['databasename']) . ' -r ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . '/' . escapeshellarg($dbs_row['databasename']) . '.sql' );
|
||||
safe_exec(escapeshellarg($settings['system']['backup_mysqldump_path']) . ' --opt --force --allow-keywords -u ' . escapeshellarg($sql_root[0]['user']) . ' -p' . escapeshellarg($sql_root[0]['password']) . ' -h ' . $sql_root[0]['host'] . ' ' . escapeshellarg($dbs_row['databasename']) . ' -r ' . escapeshellarg($settings['system']['backup_dir']) . escapeshellarg($row['loginname']) . '/' . escapeshellarg($dbs_row['databasename']) . '.sql' );
|
||||
// compress sql backup
|
||||
safe_exec('tar -C ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . ' -c -z -f ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . '/' . escapeshellarg($dbs_row['databasename']) . '.tar.gz ' . escapeshellarg($dbs_row['databasename']) . '.sql');
|
||||
safe_exec('tar -C ' . escapeshellarg($settings['system']['backup_dir']) . escapeshellarg($row['loginname']) . ' -c -z -f ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . '/' . escapeshellarg($dbs_row['databasename']) . '.tar.gz ' . escapeshellarg($dbs_row['databasename']) . '.sql');
|
||||
// remove uncompresed sql files
|
||||
safe_exec('rm ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . '/' . escapeshellarg($dbs_row['databasename']) . '.sql');
|
||||
safe_exec('rm ' . escapeshellarg($settings['system']['backup_dir']) . escapeshellarg($row['loginname']) . '/' . escapeshellarg($dbs_row['databasename']) . '.sql');
|
||||
}
|
||||
|
||||
// create 1 big file with html & db
|
||||
if($settings['system']['backup_bigfile'] == 1){
|
||||
safe_exec('tar -C ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . '/' . ' --exclude=' . escapeshellarg($row['loginname']) . '.tar.gz -c -z -f ' . $settings['system']['backup_dir'] . $row['loginname'] . '/' . escapeshellarg($row['loginname']) . '.tar.gz .');
|
||||
safe_exec('tar -C ' . escapeshellarg($settings['system']['backup_dir']) . escapeshellarg($row['loginname']) . '/' . ' --exclude=' . escapeshellarg($row['loginname']) . '.tar.gz -c -z -f ' . escapeshellarg($settings['system']['backup_dir']) . escapeshellarg($row['loginname']) . '/' . escapeshellarg($row['loginname']) . '.tar.gz .');
|
||||
// remove separated files
|
||||
$tmp_files = scandir($settings['system']['backup_dir'] . $row['loginname']);
|
||||
foreach ($tmp_files as $tmp_file){
|
||||
if(preg_match('/.*(html|sql|aps).*\.tar\.gz$/', $tmp_file) && !preg_match('/^' . $row['loginname'] . '\.tar\.gz$/', $tmp_file)){
|
||||
safe_exec('rm ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . '/' . $tmp_file . '');
|
||||
safe_exec('rm ' . escapeshellarg($settings['system']['backup_dir']) . escapeshellarg($row['loginname']) . '/' . escapeshellarg($tmp_file) . '');
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
//remove big file if separated backups are used
|
||||
if (file_exists($settings['system']['backup_dir'] . $row['loginname'] . '/' . $row['loginname'] . '.tar.gz')) {
|
||||
safe_exec('rm ' . escapeshellarg($settings['system']['backup_dir']) . escapeshellarg($row['loginname']) . '/' . escapeshellarg($row['loginname']) . '.tar.gz');
|
||||
}
|
||||
}
|
||||
|
||||
// chown & chmod files to prevent manipulation
|
||||
safe_exec('chown ' . escapeshellarg($row['guid']) . ':' . escapeshellarg($row['guid']) . ' ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . '/*');
|
||||
safe_exec('chmod 0400 ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . '/*');
|
||||
safe_exec('chown ' . escapeshellarg($row['guid']) . ':' . escapeshellarg($row['guid']) . ' ' . escapeshellarg($settings['system']['backup_dir']) . escapeshellarg($row['loginname']) . '/*');
|
||||
safe_exec('chmod 0400 ' . escapeshellarg($settings['system']['backup_dir']) . escapeshellarg($row['loginname']) . '/*');
|
||||
|
||||
// create ftp backup user
|
||||
$user_result = $db->query("SELECT username, password FROM `" . TABLE_FTP_USERS . "` WHERE `customerid` = '" . $db->escape($row['customerid']) . "' AND `username` = '" . $db->escape($row['loginname']) . "';");
|
||||
@@ -111,7 +117,7 @@ if($settings['system']['backup_enabled'] == '1'){
|
||||
$files = scandir($settings['system']['backup_dir'] . $row['loginname'] . '/');
|
||||
foreach ($files as $file){
|
||||
if(preg_match('/.*\.tar\.gz$/', $file)){
|
||||
safe_exec('rm ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . '/' . $file . '');
|
||||
safe_exec('rm ' . escapeshellarg($settings['system']['backup_dir']) . escapeshellarg($row['loginname']) . '/' . escapeshellarg($file) . '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,9 +285,16 @@ class bind
|
||||
$subdomains = $this->db->query('SELECT `d`.`domain`, `ip`.`ip` AS `ip` FROM `' . TABLE_PANEL_DOMAINS . '` `d`, `' . TABLE_PANEL_IPSANDPORTS . '` `ip` WHERE `parentdomainid`=\'' . $domain['id'] . '\' AND `d`.`ipandport`=`ip`.`id`');
|
||||
|
||||
while($subdomain = $this->db->fetch_array($subdomains))
|
||||
{
|
||||
if(filter_var($subdomain['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4))
|
||||
{
|
||||
$zonefile.= str_replace('.' . $domain['domain'], '', $subdomain['domain']) . ' IN A ' . $subdomain['ip'] . "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$zonefile.= str_replace('.' . $domain['domain'], '', $subdomain['domain']) . ' IN AAAA ' . $subdomain['ip'] . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
return $zonefile;
|
||||
}
|
||||
|
||||
@@ -873,7 +873,7 @@ class apache
|
||||
|
||||
public function createVirtualHosts()
|
||||
{
|
||||
$result_domains = $this->db->query("SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `d`.`phpsettingid`, `c`.`adminid`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) " . "WHERE `d`.`aliasdomain` IS NULL ORDER BY `d`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC");
|
||||
$result_domains = $this->db->query("SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `d`.`phpsettingid`, `c`.`adminid`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) " . "WHERE `d`.`aliasdomain` IS NULL AND `d`.`email_only` <> 1 ORDER BY `d`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC");
|
||||
|
||||
while($domain = $this->db->fetch_array($result_domains))
|
||||
{
|
||||
|
||||
@@ -330,11 +330,11 @@ class lighttpd
|
||||
|
||||
if($ssl == '0')
|
||||
{
|
||||
$query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
||||
$query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL AND `d`.`email_only` <> 1 ORDER BY `d`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
||||
}
|
||||
else
|
||||
{
|
||||
$query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ssl_ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
||||
$query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ssl_ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL AND `d`.`email_only` <> 1 ORDER BY `d`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
||||
}
|
||||
|
||||
$included_vhosts = array();
|
||||
|
||||
@@ -286,11 +286,11 @@ class nginx
|
||||
|
||||
if($ssl == '0')
|
||||
{
|
||||
$query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
||||
$query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL AND `d`.`email_only` <> 1 ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
||||
}
|
||||
else
|
||||
{
|
||||
$query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ssl_ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
||||
$query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ssl_ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL AND `d`.`email_only` <> 1 ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
||||
}
|
||||
|
||||
$included_vhosts = array();
|
||||
@@ -422,6 +422,7 @@ class nginx
|
||||
|
||||
$vhost_content.= $this->getLogFiles($domain);
|
||||
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
|
||||
|
||||
if ($this->_deactivated == false) {
|
||||
$vhost_content.= $this->create_pathOptions($domain);
|
||||
// $vhost_content.= $this->create_htaccess($domain);
|
||||
|
||||
@@ -38,8 +38,8 @@ class nginx_phpfpm extends nginx
|
||||
$phpconfig = $php->getPhpConfig((int)$domain['phpsettingid']);
|
||||
|
||||
$php_options_text = "\t".'location ~ \.php$ {'."\n";
|
||||
$php_options_text.= "\t\t".'fastcgi_index index.php;'."\n";
|
||||
$php_options_text.= "\t\t".'include /etc/nginx/fastcgi_params;'."\n";
|
||||
// $php_options_text.= "\t\t".'fastcgi_index index.php;'."\n";
|
||||
// $php_options_text.= "\t\t".'include /etc/nginx/fastcgi_params;'."\n";
|
||||
if ($domain['ssl'] == '1' && $ssl_vhost) {
|
||||
$php_options_text.= "\t\t".'fastcgi_param HTTPS on;'."\n";
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ while($row = $db->fetch_array($result_tasks))
|
||||
// now get rid of old stuff
|
||||
//(but append /* so we don't delete the directory)
|
||||
$configdir.='/*';
|
||||
safe_exec('rm -rf '. makeCorrectFile($configdir));
|
||||
safe_exec('rm -rf '. escapeshellarg(makeCorrectFile($configdir)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ while($row = $db->fetch_array($result_tasks))
|
||||
// now get rid of old stuff
|
||||
//(but append /* so we don't delete the directory)
|
||||
$configdir.='/*';
|
||||
safe_exec('rm -rf '. makeCorrectFile($configdir));
|
||||
safe_exec('rm -rf '. escapeshellarg(makeCorrectFile($configdir)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ while($row = $db->fetch_array($result_tasks))
|
||||
elseif ($row['type'] == '5')
|
||||
{
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, 'Creating new FTP-home');
|
||||
$result_directories = $db->query('SELECT `f`.`homedir`, `f`.`uid`, `f`.`gid`, `c`.`documentroot` AS `customerroot` FROM `' . TABLE_FTP_USERS . '` `f` LEFT JOIN `' . TABLE_PANEL_CUSTOMERS . '` `c` USING (`customerid`) ');
|
||||
$result_directories = $db->query('SELECT `f`.`homedir`, `f`.`uid`, `f`.`gid`, `c`.`documentroot` AS `customerroot` FROM `' . TABLE_FTP_USERS . '` `f` LEFT JOIN `' . TABLE_PANEL_CUSTOMERS . '` `c` USING (`customerid`) WHERE `f`.`username` NOT LIKE \'%_backup\'');
|
||||
|
||||
while($directory = $db->fetch_array($result_directories))
|
||||
{
|
||||
|
||||
@@ -200,6 +200,35 @@ while($row = $db->fetch_array($result))
|
||||
// make the stuff readable for the customer, #258
|
||||
makeChownWithNewStats($row);
|
||||
|
||||
// logrotate
|
||||
if($settings['system']['logrotate_enabled'] == '1')
|
||||
{
|
||||
fwrite($debugHandler, ' logrotate customers logs' . "\n");
|
||||
|
||||
$logrotatefile = '/tmp/froxlor_logrotate_tmpfile.conf';
|
||||
$fh = fopen($logrotatefile, 'w');
|
||||
|
||||
$logconf = '# ' . basename($logrotatefile) . "\n" . '# Created ' . date('d.m.Y H:i') . "\n" .
|
||||
$settings['system']['logfiles_directory'] . $row['loginname'] . '-access.log ' .
|
||||
$settings['system']['logfiles_directory'] . $row['loginname'] . '-error.log {' . "\n" .
|
||||
$settings['system']['logrotate_interval'] . "\n" .
|
||||
'missingok' . "\n" .
|
||||
'rotate ' . $settings['system']['logrotate_keep'] . "\n" .
|
||||
'compress' . "\n" .
|
||||
'delaycompress' . "\n" .
|
||||
'notifempty' . "\n" .
|
||||
'create' . "\n" .
|
||||
'}' . "\n";
|
||||
|
||||
fwrite($fh, $logconf);
|
||||
fclose($fh);
|
||||
|
||||
safe_exec(escapeshellcmd($settings['system']['logrotate_binary']) . ' ' . $logrotatefile);
|
||||
|
||||
fwrite($debugHandler, ' apache::reload: reloading apache' . "\n");
|
||||
safe_exec(escapeshellcmd($settings['system']['apachereload_command']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Webalizer/AWStats might run for some time, so we'd better check if our database is still present
|
||||
*/
|
||||
@@ -379,7 +408,6 @@ while($row = $db->fetch_array($result))
|
||||
* Total Usage
|
||||
*/
|
||||
|
||||
$diskusage = floatval($webspaceusage + $emailusage + $mysqlusage);
|
||||
if($settings['system']['backup_count'] == 0 && file_exists($settings['system']['backup_dir'] . $row['loginname'])){
|
||||
$backupsize = exec('du -s ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . '');
|
||||
$diskusage = floatval($webspaceusage + $emailusage + $mysqlusage - $backupsize);
|
||||
@@ -405,7 +433,7 @@ while($row = $db->fetch_array($result))
|
||||
$result_quota = $db->query("SELECT homedir FROM `" . TABLE_FTP_USERS . "` WHERE customerid = '" . $row['customerid'] . "'");
|
||||
|
||||
// get correct user
|
||||
if($settings['system']['mod_fcgid'] == 1)
|
||||
if($settings['system']['mod_fcgid'] == 1 && $row['deactivated'] == '0')
|
||||
{
|
||||
$user = $row['loginname'];
|
||||
$group = $row['loginname'];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<td class="field_name">{$ticket['ticket_answers']}</td>
|
||||
<td class="field_name">{$ticket['subject']}</td>
|
||||
<td class="field_name">{$ticket['lastreplier']}</td>
|
||||
<td class="field_name">{$ticket['priority']}</td>
|
||||
<td class="field_name"><span class="ticket_{$ticket['display']}">{$ticket['priority']}</span></td>
|
||||
<td class="field_name">
|
||||
<a href="{$linker->getLink(array('section' => 'tickets', 'page' => 'archive', 'action' => 'view', 'id' => $ticket['id']))}">{$lng['ticket']['show']}</a>
|
||||
</td>
|
||||
|
||||
@@ -15,6 +15,7 @@ $header
|
||||
<tr>
|
||||
<td class="field_display_border_left">{$lng['mysql']['databasename']} {$arrowcode['databasename']}</td>
|
||||
<td class="field_display">{$lng['mysql']['databasedescription']} {$arrowcode['description']}</td>
|
||||
<td class="field_display">{$lng['mysql']['size']}</td>
|
||||
<if 1 < count($sql_root)><td class="field_display">{$lng['mysql']['mysql_server']}</td></if>
|
||||
<td class="field_display_search" colspan="2">{$sortcode}</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<tr class="" onmouseover="this.className='RowOverSelected';" onmouseout="this.className='';">
|
||||
<td class="field_name_border_left">{$row['databasename']}</td>
|
||||
<td class="field_name">{$row['description']}</td>
|
||||
<td class="field_name">{$row['size']}</td>
|
||||
<if 1 < count($sql_root)><td class="field_name">{$sql_root[$row['dbserver']]['caption']}</td></if>
|
||||
<if $row['apsdb'] != '1'>
|
||||
<td class="field_name"><a href="{$linker->getLink(array('section' => 'mysql', 'page' => 'mysqls', 'action' => 'edit', 'id' => $row['id']))}">{$lng['panel']['edit']}</a></td>
|
||||
|
||||
4
templates/Classic/formfields/hiddenstring.tpl
Normal file
4
templates/Classic/formfields/hiddenstring.tpl
Normal file
@@ -0,0 +1,4 @@
|
||||
<tr>
|
||||
<td class="main_field_name">{$label}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" class="text" name="{$fieldname}" value="{$value}" /></td>
|
||||
</tr>
|
||||
@@ -9,6 +9,7 @@
|
||||
<link rel="stylesheet" href="templates/Classic/main.css" type="text/css" />
|
||||
<script type="text/javascript" src="templates/Classic/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="templates/Classic/js/froxlor.js"></script>
|
||||
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
|
||||
<title><if isset($userinfo['loginname']) && $userinfo['loginname'] != ''>{$userinfo['loginname']} - </if>Froxlor</title>
|
||||
</head>
|
||||
<body style="margin: 0; padding: 0;">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<else>
|
||||
<span>
|
||||
</if>
|
||||
<em style="left: {$doublepercent}px;">{$percent}%</em></span>
|
||||
<em style="left: {$disk_doublepercent}px;">{$disk_percent}%</em></span>
|
||||
</span>
|
||||
<else>
|
||||
<span class="progressBar" title="{$lng['customer']['unlimited']}">
|
||||
@@ -36,7 +36,7 @@
|
||||
<else>
|
||||
<span>
|
||||
</if>
|
||||
<em style="left: {$doublepercent}px;">{$percent}%</em></span>
|
||||
<em style="left: {$traffic_doublepercent}px;">{$traffic_percent}%</em></span>
|
||||
</span>
|
||||
<else>
|
||||
<span class="progressBar" title="{$lng['customer']['unlimited']}">
|
||||
|
||||
@@ -16,66 +16,66 @@ $header
|
||||
<h2>{$lng['admin']['ressourcedetails']}</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td>{$lng['admin']['customers']}:</td>
|
||||
<td>{$lng['admin']['customers']} ({$lng['admin']['usedmax']}):</td>
|
||||
<td>{$overview['number_customers']} ({$userinfo['customers']})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['customer']['domains']}:</td>
|
||||
<td>{$lng['customer']['domains']} ({$lng['admin']['usedmax']}):</td>
|
||||
<td>{$overview['number_domains']} ({$userinfo['domains']})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['customer']['subdomains']}:</td>
|
||||
<td>{$lng['customer']['subdomains']} ({$lng['admin']['used']} ({$lng['admin']['assignedmax']})):</td>
|
||||
<td>{$overview['subdomains_used']} ({$userinfo['subdomains_used']}/{$userinfo['subdomains']})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['customer']['diskspace']}:</td>
|
||||
<td>{$lng['customer']['diskspace']} ({$lng['admin']['used']} ({$lng['admin']['assignedmax']})):</td>
|
||||
<td>{$overview['diskspace_used']} ({$userinfo['diskspace_used']}/{$userinfo['diskspace']})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['customer']['traffic']}:</td>
|
||||
<td>{$lng['customer']['traffic']} ({$lng['admin']['used']} ({$lng['admin']['assignedmax']})):</td>
|
||||
<td>{$overview['traffic_used']} ({$userinfo['traffic_used']}/{$userinfo['traffic']})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['customer']['mysqls']}:</td>
|
||||
<td>{$lng['customer']['mysqls']} ({$lng['admin']['used']} ({$lng['admin']['assignedmax']})):</td>
|
||||
<td>{$overview['mysqls_used']} ({$userinfo['mysqls_used']}/{$userinfo['mysqls']})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['customer']['emails']}:</td>
|
||||
<td>{$lng['customer']['emails']} ({$lng['admin']['used']} ({$lng['admin']['assignedmax']})):</td>
|
||||
<td>{$overview['emails_used']} ({$userinfo['emails_used']}/{$userinfo['emails']})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['customer']['accounts']}:</td>
|
||||
<td>{$lng['customer']['accounts']} ({$lng['admin']['used']} ({$lng['admin']['assignedmax']})):</td>
|
||||
<td>{$overview['email_accounts_used']} ({$userinfo['email_accounts_used']}/{$userinfo['email_accounts']})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['customer']['forwarders']}:</td>
|
||||
<td>{$lng['customer']['forwarders']} ({$lng['admin']['used']} ({$lng['admin']['assignedmax']})):</td>
|
||||
<td>{$overview['email_forwarders_used']} ({$userinfo['email_forwarders_used']}/{$userinfo['email_forwarders']})</td>
|
||||
</tr>
|
||||
<if $settings['system']['mail_quota_enabled'] == 1>
|
||||
<tr>
|
||||
<td>{$lng['customer']['email_quota']}:</td>
|
||||
<td>{$lng['customer']['email_quota']} ({$lng['admin']['used']} ({$lng['admin']['assignedmax']})):</td>
|
||||
<td>{$overview['email_quota_used']} ({$userinfo['email_quota_used']}/{$userinfo['email_quota']})</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['autoresponder']['autoresponder_active'] == 1>
|
||||
<tr>
|
||||
<td>{$lng['customer']['autoresponder']}:</td>
|
||||
<td>{$lng['customer']['autoresponder']} ({$lng['admin']['usedmax']}):</td>
|
||||
<td>{$userinfo['email_autoresponder_used']} ({$userinfo['email_autoresponder']})</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if (int)$settings['aps']['aps_active'] == 1>
|
||||
<tr>
|
||||
<td>{$lng['aps']['numberofapspackages']}:</td>
|
||||
<td>{$lng['aps']['numberofapspackages']} ({$lng['admin']['used']} ({$lng['admin']['assignedmax']})):</td>
|
||||
<td>{$overview['aps_packages_used']} ({$userinfo['aps_packages_used']}/{$userinfo['aps_packages']})</td>
|
||||
</tr>
|
||||
</if>
|
||||
<tr>
|
||||
<td>{$lng['customer']['ftps']}:</td>
|
||||
<td>{$lng['customer']['ftps']} ({$lng['admin']['used']} ({$lng['admin']['assignedmax']})):</td>
|
||||
<td>{$overview['ftps_used']} ({$userinfo['ftps_used']}/{$userinfo['ftps']})</td>
|
||||
</tr>
|
||||
<if $settings['ticket']['enabled'] == 1>
|
||||
<tr>
|
||||
<td>{$lng['customer']['tickets']}:</td>
|
||||
<td>{$lng['customer']['tickets']} ({$lng['admin']['used']} ({$lng['admin']['assignedmax']})):</td>
|
||||
<td>{$overview['tickets_used']} ({$userinfo['tickets_used']}/{$userinfo['tickets']})</td>
|
||||
</tr>
|
||||
</if>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<td>{$ticket['ticket_answers']}</td>
|
||||
<td>{$ticket['subject']}</td>
|
||||
<td>{$ticket['lastreplier']}</td>
|
||||
<td>{$ticket['priority']}</td>
|
||||
<td><span class="ticket_{$ticket['display']}">{$ticket['priority']}</span></td>
|
||||
<td>
|
||||
<a href="{$linker->getLink(array('section' => 'tickets', 'page' => 'archive', 'action' => 'view', 'id' => $ticket['id']))}" style="text-decoration:none;">
|
||||
<img src="images/Froxlor/icons/ticket_show.png" alt="{$lng['ticket']['show']}"/>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<tr>
|
||||
<th>{$lng['mysql']['databasename']} {$arrowcode['databasename']}</th>
|
||||
<th>{$lng['mysql']['databasedescription']} {$arrowcode['description']}</th>
|
||||
<th>{$lng['mysql']['size']}</th>
|
||||
<if 1 < count($sql_root)><th>{$lng['mysql']['mysql_server']}</th></if>
|
||||
<th>{$lng['panel']['options']}</th>
|
||||
</tr>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<tr>
|
||||
<td>{$row['databasename']}</td>
|
||||
<td>{$row['description']}</td>
|
||||
<td>{$row['size']}</td>
|
||||
<if 1 < count($sql_root)><td>{$sql_root[$row['dbserver']]['caption']}</td></if>
|
||||
<if $row['apsdb'] != '1'>
|
||||
<td>
|
||||
|
||||
4
templates/Froxlor/formfields/hiddenstring.tpl
Normal file
4
templates/Froxlor/formfields/hiddenstring.tpl
Normal file
@@ -0,0 +1,4 @@
|
||||
<tr>
|
||||
<td>{$label}</td>
|
||||
<td><input type="password" class="text" name="{$fieldname}" value="{$value}" /></td>
|
||||
</tr>
|
||||
@@ -12,6 +12,7 @@
|
||||
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
<script type="text/javascript" src="templates/Froxlor/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="templates/Froxlor/js/froxlor.js"></script>
|
||||
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
|
||||
<title><if isset($userinfo['loginname']) && $userinfo['loginname'] != ''>{$userinfo['loginname']} - </if>Froxlor Server Management Panel</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
#!/bin/bash
|
||||
BIND=127.0.0.1:8888
|
||||
USER=www-data
|
||||
PHP_FCGI_CHILDREN=15
|
||||
PHP_FCGI_MAX_REQUESTS=1000
|
||||
BIND="127.0.0.1:8888"
|
||||
USER="www-data"
|
||||
PHP_FCGI_CHILDREN="15"
|
||||
PHP_FCGI_MAX_REQUESTS="1000"
|
||||
|
||||
PHP_CGI=/usr/bin/php-cgi
|
||||
PHP_CGI_NAME=`basename $PHP_CGI`
|
||||
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
|
||||
RETVAL=0
|
||||
PHP_CGI="/usr/bin/php-cgi"
|
||||
PHP_CGI_NAME="$(basename ${PHP_CGI})"
|
||||
PHP_CGI_ARGS="- USER=${USER} PATH=/usr/bin PHP_FCGI_CHILDREN=${PHP_FCGI_CHILDREN} PHP_FCGI_MAX_REQUESTS=${PHP_FCGI_MAX_REQUESTS} ${PHP_CGI} -b ${BIND}"
|
||||
RETVAL="0"
|
||||
|
||||
start() {
|
||||
echo -n "Starting PHP FastCGI: "
|
||||
start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS
|
||||
RETVAL=$?
|
||||
echo "$PHP_CGI_NAME."
|
||||
start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- "$PHP_CGI_ARGS"
|
||||
RETVAL="$?"
|
||||
echo "${PHP_CGI_NAME}."
|
||||
}
|
||||
stop() {
|
||||
echo -n "Stopping PHP FastCGI: "
|
||||
killall -q -w -u $USER $PHP_CGI
|
||||
RETVAL=$?
|
||||
echo "$PHP_CGI_NAME."
|
||||
killall -q -w -u "${USER} ${PHP_CGI}"
|
||||
RETVAL="$?"
|
||||
echo "${PHP_CGI_NAME}."
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
@@ -38,4 +38,4 @@ case "$1" in
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit $RETVAL
|
||||
exit "$RETVAL"
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
additional_conditions = and TRIM(destination) <> '' and destination in (select destination from mail_users where email ='%s' and postfix = 'Y')
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
additional_conditions = and isemaildomain = '1' and deactivated = '0'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,4 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
additional_conditions = and postfix = 'Y'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
query = select distinct username from mail_users where postfix = 'Y' and email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
additional_conditions = and TRIM(destination) <> '' and destination in (select destination from mail_users where email ='%s' and postfix = 'Y')
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
additional_conditions = and isemaildomain = '1' and deactivated = '0'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,4 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
additional_conditions = and postfix = 'Y'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
query = select distinct username from mail_users where postfix = 'Y' and email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
#!/bin/bash
|
||||
BIND=127.0.0.1:8888
|
||||
USER=www-data
|
||||
PHP_FCGI_CHILDREN=15
|
||||
PHP_FCGI_MAX_REQUESTS=1000
|
||||
BIND="127.0.0.1:8888"
|
||||
USER="www-data"
|
||||
PHP_FCGI_CHILDREN="15"
|
||||
PHP_FCGI_MAX_REQUESTS="1000"
|
||||
|
||||
PHP_CGI=/usr/bin/php-cgi
|
||||
PHP_CGI_NAME=`basename $PHP_CGI`
|
||||
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
|
||||
RETVAL=0
|
||||
PHP_CGI="/usr/bin/php-cgi"
|
||||
PHP_CGI_NAME="$(basename ${PHP_CGI})"
|
||||
PHP_CGI_ARGS="- USER=${USER} PATH=/usr/bin PHP_FCGI_CHILDREN=${PHP_FCGI_CHILDREN} PHP_FCGI_MAX_REQUESTS=${PHP_FCGI_MAX_REQUESTS} ${PHP_CGI} -b ${BIND}"
|
||||
RETVAL="0"
|
||||
|
||||
start() {
|
||||
echo -n "Starting PHP FastCGI: "
|
||||
start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS
|
||||
RETVAL=$?
|
||||
echo "$PHP_CGI_NAME."
|
||||
start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- "$PHP_CGI_ARGS"
|
||||
RETVAL="$?"
|
||||
echo "${PHP_CGI_NAME}."
|
||||
}
|
||||
stop() {
|
||||
echo -n "Stopping PHP FastCGI: "
|
||||
killall -q -w -u $USER $PHP_CGI
|
||||
RETVAL=$?
|
||||
echo "$PHP_CGI_NAME."
|
||||
killall -q -w -u "${USER} ${PHP_CGI}"
|
||||
RETVAL="$?"
|
||||
echo "${PHP_CGI_NAME}."
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
@@ -38,4 +38,4 @@ case "$1" in
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit $RETVAL
|
||||
exit "$RETVAL"
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
additional_conditions = and TRIM(destination) <> '' and destination in (select destination from mail_users where email ='%s' and postfix = 'Y')
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
additional_conditions = and isemaildomain = '1' and deactivated = '0'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,4 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
additional_conditions = and postfix = 'Y'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
query = select distinct username from mail_users where postfix = 'Y' and email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
additional_conditions = and TRIM(destination) <> '' and destination in (select destination from mail_users where email ='%s' and postfix = 'Y')
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
additional_conditions = and isemaildomain = '1' and deactivated = '0'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,4 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
additional_conditions = and postfix = 'Y'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
query = select distinct username from mail_users where postfix = 'Y' and email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
additional_conditions = and TRIM(destination) <> '' and destination in (select destination from mail_users where email ='%s' and postfix = 'Y')
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
additional_conditions = and isemaildomain = '1' and deactivated = '0'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,4 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
additional_conditions = and postfix = 'Y'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
query = select distinct username from mail_users where postfix = 'Y' and email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
#!/bin/bash
|
||||
BIND=127.0.0.1:8888
|
||||
USER=nginx
|
||||
PHP_FCGI_CHILDREN=15
|
||||
PHP_FCGI_MAX_REQUESTS=1000
|
||||
BIND="127.0.0.1:8888"
|
||||
USER="nginx"
|
||||
PHP_FCGI_CHILDREN="15"
|
||||
PHP_FCGI_MAX_REQUESTS="1000"
|
||||
|
||||
PHP_CGI=/usr/bin/php-cgi
|
||||
PHP_CGI_NAME=`basename $PHP_CGI`
|
||||
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
|
||||
RETVAL=0
|
||||
PHP_CGI="/usr/bin/php-cgi"
|
||||
PHP_CGI_NAME="$(basename ${PHP_CGI})"
|
||||
PHP_CGI_ARGS="- USER=${USER} PATH=/usr/bin PHP_FCGI_CHILDREN=${PHP_FCGI_CHILDREN} PHP_FCGI_MAX_REQUESTS=${PHP_FCGI_MAX_REQUESTS} ${PHP_CGI} -b ${BIND}"
|
||||
RETVAL="0"
|
||||
|
||||
start() {
|
||||
echo -n "Starting PHP FastCGI: "
|
||||
start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS
|
||||
RETVAL=$?
|
||||
echo "$PHP_CGI_NAME."
|
||||
start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- "$PHP_CGI_ARGS"
|
||||
RETVAL="$?"
|
||||
echo "${PHP_CGI_NAME}."
|
||||
}
|
||||
stop() {
|
||||
echo -n "Stopping PHP FastCGI: "
|
||||
killall -q -w -u $USER $PHP_CGI
|
||||
RETVAL=$?
|
||||
echo "$PHP_CGI_NAME."
|
||||
killall -q -w -u "${USER} ${PHP_CGI}"
|
||||
RETVAL="$?"
|
||||
echo "${PHP_CGI_NAME}."
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
@@ -38,4 +38,4 @@ case "$1" in
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit $RETVAL
|
||||
exit "$RETVAL"
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
additional_conditions = and TRIM(destination) <> '' and destination in (select destination from mail_users where email ='%s' and postfix = 'Y')
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
additional_conditions = and isemaildomain = '1' and deactivated = '0'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,4 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
additional_conditions = and postfix = 'Y'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
query = select distinct username from mail_users where postfix = 'Y' and email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
additional_conditions = and TRIM(destination) <> '' and destination in (select destination from mail_users where email ='%s' and postfix = 'Y')
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
additional_conditions = and isemaildomain = '1' and deactivated = '0'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,4 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
additional_conditions = and postfix = 'Y'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
query = select distinct username from mail_users where postfix = 'Y' and email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
additional_conditions = and TRIM(destination) <> '' and destination in (select destination from mail_users where email ='%s' and postfix = 'Y')
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
additional_conditions = and isemaildomain = '1' and deactivated = '0'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,4 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
additional_conditions = and postfix = 'Y'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
query = select distinct username from mail_users where postfix = 'Y' and email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
#!/bin/bash
|
||||
BIND=127.0.0.1:8888
|
||||
USER=www-data
|
||||
PHP_FCGI_CHILDREN=15
|
||||
PHP_FCGI_MAX_REQUESTS=1000
|
||||
BIND="127.0.0.1:8888"
|
||||
USER="www-data"
|
||||
PHP_FCGI_CHILDREN="15"
|
||||
PHP_FCGI_MAX_REQUESTS="1000"
|
||||
|
||||
PHP_CGI=/usr/bin/php-cgi
|
||||
PHP_CGI_NAME=`basename $PHP_CGI`
|
||||
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
|
||||
RETVAL=0
|
||||
PHP_CGI="/usr/bin/php-cgi"
|
||||
PHP_CGI_NAME="$(basename ${PHP_CGI})"
|
||||
PHP_CGI_ARGS="- USER=${USER} PATH=/usr/bin PHP_FCGI_CHILDREN=${PHP_FCGI_CHILDREN} PHP_FCGI_MAX_REQUESTS=${PHP_FCGI_MAX_REQUESTS} ${PHP_CGI} -b ${BIND}"
|
||||
RETVAL="0"
|
||||
|
||||
start() {
|
||||
echo -n "Starting PHP FastCGI: "
|
||||
start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS
|
||||
RETVAL=$?
|
||||
echo "$PHP_CGI_NAME."
|
||||
start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- "$PHP_CGI_ARGS"
|
||||
RETVAL="$?"
|
||||
echo "${PHP_CGI_NAME}."
|
||||
}
|
||||
stop() {
|
||||
echo -n "Stopping PHP FastCGI: "
|
||||
killall -q -w -u $USER $PHP_CGI
|
||||
RETVAL=$?
|
||||
echo "$PHP_CGI_NAME."
|
||||
killall -q -w -u "${USER} ${PHP_CGI}"
|
||||
RETVAL="$?"
|
||||
echo "${PHP_CGI_NAME}."
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
@@ -38,4 +38,4 @@ case "$1" in
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit $RETVAL
|
||||
exit "$RETVAL"
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
additional_conditions = and TRIM(destination) <> '' and destination in (select destination from mail_users where email ='%s' and postfix = 'Y')
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
additional_conditions = and isemaildomain = '1' and deactivated = '0'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,4 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
additional_conditions = and postfix = 'Y'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
query = select distinct username from mail_users where postfix = 'Y' and email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
additional_conditions = and TRIM(destination) > '' and destination in (select destination from mail_users where email ='%s' and postfix = 'Y')
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
additional_conditions = and isemaildomain = '1' and deactivated = '0'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,4 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
additional_conditions = and postfix = 'Y'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
query = select distinct username from mail_users where postfix = 'Y' and email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
additional_conditions = and TRIM(destination) <> '' and destination in (select destination from mail_users where email ='%s' and postfix = 'Y')
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
additional_conditions = and isemaildomain = '1' and deactivated = '0'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,4 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
additional_conditions = and postfix = 'Y'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
query = select distinct username from mail_users where postfix = 'Y' and email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
additional_conditions = and TRIM(destination) <> '' and destination in (select destination from mail_users where email ='%s' and postfix = 'Y')
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
additional_conditions = and isemaildomain = '1' and deactivated = '0'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -4,4 +4,5 @@ dbname = <SQL_DB>
|
||||
table = mail_users
|
||||
select_field = maildir
|
||||
where_field = email
|
||||
additional_conditions = and postfix = 'Y'
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
query = select distinct username from mail_users where email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
query = select distinct username from mail_users where postfix = 'Y' and email in ((select mail_virtual.email_full from mail_virtual where mail_virtual.email = '%s' union select mail_virtual.destination from mail_virtual where mail_virtual.email = '%s'));
|
||||
hosts = <SQL_HOST>
|
||||
|
||||
Reference in New Issue
Block a user