Compare commits
5 Commits
0.9.24-rc1
...
0.9.24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1e083c8b2 | ||
|
|
70a077da48 | ||
|
|
c5fb8bee6b | ||
|
|
418990e271 | ||
|
|
93ab8964f1 |
@@ -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',
|
||||
),
|
||||
|
||||
@@ -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) . '"');
|
||||
}
|
||||
|
||||
|
||||
@@ -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.24-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');
|
||||
|
||||
@@ -1693,7 +1693,6 @@ if(isFroxlorVersion('0.9.23'))
|
||||
updateToVersion('0.9.24-svn1');
|
||||
}
|
||||
|
||||
|
||||
if(isFroxlorVersion('0.9.24-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.24-svn1 to 0.9.24-rc1");
|
||||
@@ -1702,3 +1701,11 @@ if(isFroxlorVersion('0.9.24-svn1'))
|
||||
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');
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -73,6 +73,6 @@ define('PACKAGE_ENABLED', 2);
|
||||
|
||||
// VERSION INFO
|
||||
|
||||
$version = '0.9.24-rc1';
|
||||
$version = '0.9.24';
|
||||
$dbversion = '2';
|
||||
$branding = '';
|
||||
|
||||
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>
|
||||
@@ -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']}">
|
||||
|
||||
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>
|
||||
Reference in New Issue
Block a user