Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e50d0b0440 |
@@ -58,14 +58,6 @@ return array(
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingHostname',
|
||||
),
|
||||
'system_froxlordirectlyviahostname' => array(
|
||||
'label' => $lng['serversettings']['froxlordirectlyviahostname'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'froxlordirectlyviahostname',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_stdsubdomain' => array(
|
||||
'label' => $lng['serversettings']['stdsubdomainhost'],
|
||||
'settinggroup' => 'system',
|
||||
@@ -109,6 +101,18 @@ return array(
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_httpuser' => array(
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'httpuser',
|
||||
'type' => 'hidden',
|
||||
'default' => 'www-data',
|
||||
),
|
||||
'system_httpgroup' => array(
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'httpgroup',
|
||||
'type' => 'hidden',
|
||||
'default' => 'www-data',
|
||||
),
|
||||
'system_debug_cron' => array(
|
||||
'label' => $lng['serversettings']['cron']['debug'],
|
||||
'settinggroup' => 'system',
|
||||
|
||||
@@ -33,22 +33,6 @@ return array(
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'system_httpuser' => array(
|
||||
'label' => $lng['admin']['webserver_user'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'httpuser',
|
||||
'type' => 'string',
|
||||
'default' => 'www-data',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_httpgroup' => array(
|
||||
'label' => $lng['admin']['webserver_group'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'httpgroup',
|
||||
'type' => 'string',
|
||||
'default' => 'www-data',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_apacheconf_vhost' => array(
|
||||
'label' => $lng['serversettings']['apacheconf_vhost'],
|
||||
'settinggroup' => 'system',
|
||||
@@ -128,64 +112,6 @@ return array(
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'defaultwebsrverrhandler_enabled' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_enabled'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'defaultwebsrverrhandler_err401' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err401'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'err401',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'defaultwebsrverrhandler_err403' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err403'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'err403',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'defaultwebsrverrhandler_err404' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err404'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'err404',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'defaultwebsrverrhandler_err500' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err500'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'err500',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'customredirect_enabled' => array(
|
||||
'label' => $lng['serversettings']['customredirect_enabled'],
|
||||
'settinggroup' => 'customredirect',
|
||||
'varname' => 'enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'customredirect_default' => array(
|
||||
'label' => $lng['serversettings']['customredirect_default'],
|
||||
'settinggroup' => 'customredirect',
|
||||
'varname' => 'default',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options_method' => 'getRedirectCodes',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
'ssl' => array(
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id: 220.ftpserver.php 1 2010-04-07 10:00:00Z monotek $
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'ftpserver' => array(
|
||||
'title' => $lng['admin']['ftpserversettings'],
|
||||
'fields' => array(
|
||||
'ftpserver' => array(
|
||||
'label' => $lng['admin']['ftpserver'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'ftpserver',
|
||||
'type' => 'option',
|
||||
'default' => 'proftpd',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('proftpd' => 'Proftpd', 'pureftpd' => 'Pureftpd'),
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -59,24 +59,6 @@ return array(
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_dns_createmailentry' => array(
|
||||
'label' => $lng['serversettings']['mail_also_with_mxservers'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'dns_createmailentry',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_defaultttl' => array(
|
||||
'label' => $lng['serversettings']['defaultttl'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'defaultttl',
|
||||
'type' => 'int',
|
||||
'default' => 604800, /* 1 week */
|
||||
'int_min' => 3600, /* 1 hour */
|
||||
'int_max' => 2147483647, /* integer max */
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -125,16 +125,6 @@ return array(
|
||||
'type' => 'hidden',
|
||||
'default' => '',
|
||||
),
|
||||
'ticket_default_priority' => array(
|
||||
'label' => $lng['serversettings']['ticket']['default_priority'],
|
||||
'settinggroup' => 'ticket',
|
||||
'varname' => 'default_priority',
|
||||
'type' => 'option',
|
||||
'default' => 2,
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(1 => $lng['ticket']['unf_high'], 2 => $lng['ticket']['unf_normal'], 3 => $lng['ticket']['unf_low']),
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
@@ -59,7 +59,7 @@ return array(
|
||||
'type' => 'option',
|
||||
'default' => '',
|
||||
'option_mode' => 'multiple',
|
||||
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap', 'json' => 'json', 'ldap' => 'LDAP', 'hash' => 'hash', 'mbstring' => 'mbstring'),
|
||||
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap'),
|
||||
'save_method' => 'storeSettingApsPhpExtensions',
|
||||
),
|
||||
'aps_php-function' => array(
|
||||
|
||||
@@ -100,16 +100,6 @@ return array(
|
||||
'default' => 250,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_defaultini' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_defaultini',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options_method' => 'getPhpConfigs',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -93,7 +93,6 @@ if($page == 'admins'
|
||||
$i++;
|
||||
}
|
||||
|
||||
$admincount = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("admins/admins") . "\";");
|
||||
}
|
||||
elseif($action == 'su')
|
||||
|
||||
@@ -115,7 +115,6 @@ if($page == 'customers'
|
||||
$i++;
|
||||
}
|
||||
|
||||
$customercount = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("customers/customers") . "\";");
|
||||
}
|
||||
elseif($action == 'su'
|
||||
@@ -185,34 +184,9 @@ if($page == 'customers'
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$result2 = $db->query("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name`='" . $row['username'] . "'");
|
||||
}
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_GROUPS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
|
||||
// Delete all waiting "create user" -tasks for this user, #276
|
||||
// Note: the WHERE selects part of a serialized array, but it should be safe this way
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '2' AND `data` LIKE '%:\"" . $db->escape($result['loginname']) . "\";%';");
|
||||
|
||||
// remove everything APS-related, #216
|
||||
$apsresult = $db->query("SELECT `ID` FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
|
||||
while($apsrow = $db->fetch_array($apsresult))
|
||||
{
|
||||
// remove all package related settings
|
||||
$db->query("DELETE FROM `".TABLE_APS_SETTINGS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
|
||||
// maybe some leftovers in the tasks
|
||||
$db->query("DELETE FROM `".TABLE_APS_TASKS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
|
||||
}
|
||||
// now remove all user instances
|
||||
$db->query("DELETE FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
|
||||
// eventually some temp-setting-leftovers
|
||||
$db->query("DELETE FROM `".TABLE_APS_TEMP_SETTINGS."` WHERE `CustomerID`='".(int)$id."'");
|
||||
// eof APS-related removings, #216
|
||||
|
||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` - 1 ";
|
||||
$admin_update_query.= ", `domains_used` = `domains_used` - 0" . (int)($domains_deleted - $result['subdomains_used']);
|
||||
|
||||
@@ -256,11 +230,6 @@ if($page == 'customers'
|
||||
$admin_update_query.= ", `tickets_used` = `tickets_used` - 0" . (int)$result['tickets'];
|
||||
}
|
||||
|
||||
if($result['aps_packages'] != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `aps_packages` = `aps_packages` - 0" . (int)$result['aps_packages'];
|
||||
}
|
||||
|
||||
if(($result['diskspace'] / 1024) != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `diskspace_used` = `diskspace_used` - 0" . (int)$result['diskspace'];
|
||||
@@ -419,7 +388,7 @@ if($page == 'customers'
|
||||
}
|
||||
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
$password = validate($_POST['new_customer_password'], 'password');
|
||||
$password = validate($_POST['customer_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
$sendpassword = intval($_POST['sendpassword']);
|
||||
$phpenabled = intval($_POST['phpenabled']);
|
||||
@@ -473,11 +442,11 @@ if($page == 'customers'
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($_POST['new_loginname'])
|
||||
&& $_POST['new_loginname'] != '')
|
||||
if(isset($_POST['loginname'])
|
||||
&& $_POST['loginname'] != '')
|
||||
{
|
||||
$accountnumber = intval($settings['system']['lastaccountnumber']);
|
||||
$loginname = validate($_POST['new_loginname'], 'loginname', '/^[a-z0-9\-_]+$/i');
|
||||
$loginname = validate($_POST['loginname'], 'loginname', '/^[a-z0-9\-_]+$/i');
|
||||
|
||||
// Accounts which match systemaccounts are not allowed, filtering them
|
||||
|
||||
@@ -623,7 +592,6 @@ if($page == 'customers'
|
||||
inserttask('1');
|
||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
|
||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_GROUPS . "` " . "(`customerid`, `groupname`, `gid`, `members`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($guid) . "', '" . $db->escape($loginname) . "')");
|
||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($loginname) . "', 'user', '0', '0', '0', '0', '0', '0')");
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added ftp-account for user '" . $loginname . "'");
|
||||
|
||||
if($createstdsubdomain == '1')
|
||||
@@ -754,7 +722,7 @@ if($page == 'customers'
|
||||
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
|
||||
$customernumber = validate($_POST['customernumber'], 'customer number', '/^[A-Za-z0-9 \-]*$/Di');
|
||||
$def_language = validate($_POST['def_language'], 'default language');
|
||||
$password = validate($_POST['new_customer_password'], 'new password');
|
||||
$password = validate($_POST['customer_password'], 'new password');
|
||||
$diskspace = intval_ressource($_POST['diskspace']);
|
||||
|
||||
if(isset($_POST['diskspace_ul']))
|
||||
|
||||
@@ -130,8 +130,6 @@ if($page == 'domains'
|
||||
$i++;
|
||||
}
|
||||
|
||||
$domainscount = $db->num_rows($result);
|
||||
|
||||
// Display the list
|
||||
|
||||
eval("echo \"" . getTemplate("domains/domains") . "\";");
|
||||
@@ -308,7 +306,7 @@ if($page == 'domains'
|
||||
}
|
||||
else
|
||||
{
|
||||
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
|
||||
$phpsettingid = '1';
|
||||
$mod_fcgid_starter = '-1';
|
||||
$mod_fcgid_maxrequests = '-1';
|
||||
}
|
||||
@@ -317,7 +315,7 @@ if($page == 'domains'
|
||||
{
|
||||
$openbasedir = '1';
|
||||
$safemode = '1';
|
||||
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
|
||||
$phpsettingid = '1';
|
||||
$mod_fcgid_starter = '-1';
|
||||
$mod_fcgid_maxrequests = '-1';
|
||||
}
|
||||
@@ -369,14 +367,7 @@ if($page == 'domains'
|
||||
|
||||
if(!preg_match('/^https?\:\/\//', $documentroot))
|
||||
{
|
||||
if(strstr($documentroot, ":") !== FALSE)
|
||||
{
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
else
|
||||
{
|
||||
$documentroot = makeCorrectDir($documentroot);
|
||||
}
|
||||
$documentroot = makeCorrectDir($documentroot);
|
||||
}
|
||||
|
||||
$domain_check = $db->query_first("SELECT `id`, `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '" . $db->escape(strtolower($domain)) . "'");
|
||||
@@ -386,8 +377,7 @@ if($page == 'domains'
|
||||
|
||||
if($aliasdomain != 0)
|
||||
{
|
||||
// also check ip/port combination to be the same, #176
|
||||
$aliasdomain_check = $db->query_first('SELECT `d`.`id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
|
||||
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
|
||||
}
|
||||
|
||||
if($openbasedir != '1')
|
||||
@@ -573,7 +563,7 @@ if($page == 'domains'
|
||||
$row_ipandport['ip'] = '[' . $row_ipandport['ip'] . ']';
|
||||
}
|
||||
|
||||
$ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id'], $settings['system']['defaultip']);
|
||||
$ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id']);
|
||||
}
|
||||
|
||||
$ssl_ipsandports = '';
|
||||
@@ -618,7 +608,7 @@ if($page == 'domains'
|
||||
|
||||
while($row = $db->fetch_array($configs))
|
||||
{
|
||||
$phpconfigs.= makeoption($row['description'], $row['id'], $settings['system']['mod_fcgid_defaultini'], true, true);
|
||||
$phpconfigs.= makeoption($row['description'], $row['id'], '1', true, true);
|
||||
}
|
||||
|
||||
$isbinddomain = makeyesno('isbinddomain', '1', '0', '1');
|
||||
@@ -751,12 +741,6 @@ if($page == 'domains'
|
||||
{
|
||||
$documentroot = $customer['documentroot'];
|
||||
}
|
||||
|
||||
if(!preg_match('/^https?\:\/\//', $documentroot)
|
||||
&& strstr($documentroot, ":") !== FALSE
|
||||
) {
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -906,8 +890,7 @@ if($page == 'domains'
|
||||
|
||||
if($aliasdomain != 0)
|
||||
{
|
||||
// also check ip/port combination to be the same, #176
|
||||
$aliasdomain_check = $db->query_first('SELECT `d`.`id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
|
||||
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
|
||||
}
|
||||
|
||||
if($aliasdomain_check['id'] != $aliasdomain)
|
||||
|
||||
@@ -100,7 +100,7 @@ if($page == 'overview')
|
||||
&& count($latestversion) >= 1)
|
||||
{
|
||||
$_version = $latestversion[0];
|
||||
$_message = isset($latestversion[1]) ? $latestversion[1] : '';
|
||||
$_message = $latestversion[1];
|
||||
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
|
||||
|
||||
$lookfornewversion_lable = $_version;
|
||||
|
||||
@@ -97,7 +97,7 @@ if($page == 'overview')
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` SET `description` = '" . $db->escape($description) . "', `binary` = '" . $db->escape($binary) . "', `file_extensions` = '" . $db->escape($file_extensions) . "', `mod_fcgid_starter` = '" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests` = '" . $db->escape($mod_fcgid_maxrequests) . "', `phpsettings` = '" . $db->escape($phpsettings) . "'");
|
||||
inserttask('1');
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $description . "' has been created by '" . $userinfo['loginname'] . "'");
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $value . "' has been created by '" . $userinfo['loginname'] . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -102,12 +102,11 @@ if($page == 'tickets'
|
||||
if($_cid != $row['customerid'])
|
||||
{
|
||||
$cid = $row['customerid'];
|
||||
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
$usr = $db->query_first('SELECT `firstname`, `name`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
WHERE `customerid` = "' . (int)$cid . '"');
|
||||
|
||||
if(isset($usr['loginname'])) {
|
||||
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
|
||||
//$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
|
||||
$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
|
||||
} else {
|
||||
$customer = $lng['ticket']['nonexistingcustomer'];
|
||||
}
|
||||
@@ -198,12 +197,12 @@ if($page == 'tickets'
|
||||
else
|
||||
{
|
||||
$categories = '';
|
||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
|
||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `name` ASC');
|
||||
|
||||
if(isset($result['name'])
|
||||
&& $result['name'] != '')
|
||||
{
|
||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
|
||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `name` ASC');
|
||||
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
@@ -220,12 +219,27 @@ if($page == 'tickets'
|
||||
|
||||
while($row_customer = $db->fetch_array($result_customers))
|
||||
{
|
||||
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
if($row_customer['company'] == '')
|
||||
{
|
||||
$customers.= makeoption($row_customer['name'] . ', ' . $row_customer['firstname'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($row_customer['name'] != ''
|
||||
&& $row_customer['firstname'] != '')
|
||||
{
|
||||
$customers.= makeoption($row_customer['name'] . ', ' . $row_customer['firstname'] . ' | ' . $row_customer['company'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$customers.= makeoption($row_customer['company'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
|
||||
$priorities = makeoption($lng['ticket']['unf_high'], '1');
|
||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2');
|
||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3');
|
||||
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -421,11 +435,10 @@ elseif($page == 'categories'
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets::categories");
|
||||
$fields = array(
|
||||
'name' => $lng['ticket']['category'],
|
||||
'logicalorder' => $lng['ticket']['logicalorder']
|
||||
'name' => $lng['ticket']['category']
|
||||
);
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKET_CATS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$result = $db->query("SELECT `main`.`id`, `main`.`name`, `main`.`logicalorder`, (
|
||||
$result = $db->query("SELECT `main`.`id`, `main`.`name`, (
|
||||
SELECT COUNT(`sub`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub`
|
||||
WHERE `sub`.`category` = `main`.`id`
|
||||
AND `sub`.`answerto` = '0' AND `sub`.`adminid` = '" . $userinfo['adminid'] . "')
|
||||
@@ -468,12 +481,6 @@ elseif($page == 'categories'
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$category = validate($_POST['category'], 'category');
|
||||
$order = validate($_POST['logicalorder'], 'logicalorder');
|
||||
|
||||
if($order < 1 || $order >= 1000)
|
||||
{
|
||||
$order = 1;
|
||||
}
|
||||
|
||||
if($category == '')
|
||||
{
|
||||
@@ -481,7 +488,7 @@ elseif($page == 'categories'
|
||||
}
|
||||
else
|
||||
{
|
||||
ticket::addCategory($db, $category, $userinfo['adminid'], $order);
|
||||
ticket::addCategory($db, $category, $userinfo['adminid']);
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "added ticket-category '" . $category . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
@@ -498,12 +505,6 @@ elseif($page == 'categories'
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$category = validate($_POST['category'], 'category');
|
||||
$order = validate($_POST['logicalorder'], 'logicalorder');
|
||||
|
||||
if($order < 1 || $order >= 1000)
|
||||
{
|
||||
$order = 1;
|
||||
}
|
||||
|
||||
if($category == '')
|
||||
{
|
||||
@@ -511,7 +512,7 @@ elseif($page == 'categories'
|
||||
}
|
||||
else
|
||||
{
|
||||
ticket::editCategory($db, $category, $id, $order);
|
||||
ticket::editCategory($db, $category, $id);
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "edited ticket-category '" . $category . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
@@ -633,15 +634,14 @@ elseif($page == 'archive'
|
||||
if($_cid != $ticket['customerid'])
|
||||
{
|
||||
$cid = $ticket['customerid'];
|
||||
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
$usr = $db->query_first('SELECT `firstname`, `name`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
WHERE `customerid` = "' . (int)$cid . '"');
|
||||
|
||||
if(isset($usr['loginname'])) {
|
||||
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
|
||||
$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
|
||||
} else {
|
||||
$customer = $lng['ticket']['nonexistingcustomer'];
|
||||
}
|
||||
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
|
||||
}
|
||||
|
||||
@@ -718,11 +718,18 @@ elseif($page == 'archive'
|
||||
}
|
||||
|
||||
$customers = makeoption($lng['ticket']['nocustomer'], '-1', '-1');
|
||||
$result_customers = $db->query("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY `name` ASC");
|
||||
$result = $db->query_first('SELECT `customerid` FROM `' . TABLE_PANEL_CUSTOMERS . '` ' . ($userinfo['customers_see_all'] ? '' : ' WHERE `adminid` = "' . (int)$userinfo['adminid'] . '" ') . 'ORDER BY `name` ASC');
|
||||
|
||||
while($row_customer = $db->fetch_array($result_customers))
|
||||
if(isset($result['customerid'])
|
||||
&& $result['customerid'] != '')
|
||||
{
|
||||
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
$result2 = $db->query('SELECT `customerid`, `loginname`, `firstname`, `name`
|
||||
FROM `' . TABLE_PANEL_CUSTOMERS . '` ' . ($userinfo['customers_see_all'] ? '' : ' WHERE `adminid` = "' . (int)$userinfo['adminid'] . '" ') . ' ORDER BY `name` ASC');
|
||||
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
$customers.= makeoption($row['name'] . ', ' . $row['firstname'] . ' (' . $row['loginname'] . ')', $row['customerid']);
|
||||
}
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/archive") . "\";");
|
||||
|
||||
@@ -72,7 +72,7 @@ if($page == 'overview')
|
||||
|
||||
include_once './install/updatesql.php';
|
||||
|
||||
$redirect_url = 'admin_index.php?s=' . $s;
|
||||
$redirect_url = 'admin_index.php';
|
||||
eval("echo \"" . getTemplate("update/update_end") . "\";");
|
||||
|
||||
updateCounters();
|
||||
@@ -116,7 +116,7 @@ if($page == 'overview')
|
||||
*/
|
||||
|
||||
$success_message = $lng['update']['noupdatesavail'];
|
||||
$redirect_url = 'admin_index.php?s=' . $s;
|
||||
$redirect_url = 'admin_index.php';
|
||||
eval("echo \"" . getTemplate("update/noupdatesavail") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ if($action == "add")
|
||||
}
|
||||
|
||||
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
||||
$date_until_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
||||
$date_until_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
||||
|
||||
eval("echo \"" . getTemplate("email/autoresponder_add") . "\";");
|
||||
}
|
||||
@@ -229,7 +229,7 @@ if($action == "edit")
|
||||
$deactivated = '0';
|
||||
$date_until = date('d-m-Y', $date_until);
|
||||
}
|
||||
$date_until_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
|
||||
$date_from_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
|
||||
|
||||
$checked = '';
|
||||
|
||||
|
||||
@@ -226,12 +226,10 @@ elseif($page == 'domains')
|
||||
$aliasdomain_check = array(
|
||||
'id' => 0
|
||||
);
|
||||
$_doredirect = false;
|
||||
|
||||
if($aliasdomain != 0)
|
||||
{
|
||||
// also check ip/port combination to be the same, #176
|
||||
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$domain_check['ipandport'].'\'');
|
||||
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
|
||||
}
|
||||
|
||||
if(isset($_POST['url'])
|
||||
@@ -239,7 +237,6 @@ elseif($page == 'domains')
|
||||
&& validateUrl($idna_convert->encode($_POST['url'])))
|
||||
{
|
||||
$path = $_POST['url'];
|
||||
$_doredirect = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -251,14 +248,6 @@ elseif($page == 'domains')
|
||||
{
|
||||
$path = $userinfo['documentroot'] . '/' . $path;
|
||||
$path = makeCorrectDir($path);
|
||||
if (strstr($path, ":") !== FALSE)
|
||||
{
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_doredirect = true;
|
||||
}
|
||||
|
||||
if(isset($_POST['openbasedir_path'])
|
||||
@@ -336,13 +325,6 @@ elseif($page == 'domains')
|
||||
`ssl_redirect` = '" . $ssl_redirect . "',
|
||||
`phpsettingid` = '" . $phpsid_result['phpsettingid'] . "'");
|
||||
|
||||
if($_doredirect)
|
||||
{
|
||||
$did = $db->insert_id();
|
||||
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : $settings['customredirect']['default'];
|
||||
addRedirectToDomain($did, $redirect);
|
||||
}
|
||||
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
|
||||
inserttask('1');
|
||||
@@ -368,16 +350,6 @@ elseif($page == 'domains')
|
||||
$aliasdomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
|
||||
}
|
||||
|
||||
if($settings['customredirect']['enabled'] == '1')
|
||||
{
|
||||
$redirectcode = '';
|
||||
$codes = getRedirectCodesArray();
|
||||
foreach($codes as $rc)
|
||||
{
|
||||
$redirectcode .= makeoption($rc['code'], $rc['id'], $settings['customredirect']['default']);
|
||||
}
|
||||
}
|
||||
|
||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
$openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true);
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
@@ -391,7 +363,6 @@ elseif($page == 'domains')
|
||||
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path`, `d`.`ipandport`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
|
||||
$alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\'');
|
||||
$alias_check = $alias_check['count'];
|
||||
$_doredirect = false;
|
||||
|
||||
if(isset($result['customerid'])
|
||||
&& $result['customerid'] == $userinfo['customerid'])
|
||||
@@ -404,7 +375,6 @@ elseif($page == 'domains')
|
||||
&& validateUrl($idna_convert->encode($_POST['url'])))
|
||||
{
|
||||
$path = $_POST['url'];
|
||||
$_doredirect = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -416,14 +386,6 @@ elseif($page == 'domains')
|
||||
{
|
||||
$path = $userinfo['documentroot'] . '/' . $path;
|
||||
$path = makeCorrectDir($path);
|
||||
if (strstr($path, ":") !== FALSE)
|
||||
{
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_doredirect = true;
|
||||
}
|
||||
|
||||
$aliasdomain = intval($_POST['alias']);
|
||||
@@ -498,12 +460,6 @@ elseif($page == 'domains')
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "automatically deleted mail-table entries for '" . $idna_convert->decode($result['domain']) . "'");
|
||||
}
|
||||
|
||||
if($_doredirect)
|
||||
{
|
||||
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : false;
|
||||
updateRedirectOfDomain($id, $redirect);
|
||||
}
|
||||
|
||||
if($path != $result['documentroot']
|
||||
|| $isemaildomain != $result['isemaildomain']
|
||||
|| $iswildcarddomain != $result['iswildcarddomain']
|
||||
@@ -524,8 +480,7 @@ elseif($page == 'domains')
|
||||
{
|
||||
$result['domain'] = $idna_convert->decode($result['domain']);
|
||||
$domains = makeoption($lng['domains']['noaliasdomain'], 0, $result['aliasdomain'], true);
|
||||
// also check ip/port combination to be the same, #176
|
||||
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` AND `d`.`ipandport` = '".(int)$result['ipandport']."' ORDER BY `d`.`domain` ASC");
|
||||
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC");
|
||||
|
||||
while($row_domain = $db->fetch_array($result_domains))
|
||||
{
|
||||
@@ -545,17 +500,6 @@ elseif($page == 'domains')
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']);
|
||||
}
|
||||
|
||||
if($settings['customredirect']['enabled'] == '1')
|
||||
{
|
||||
$def_code = getDomainRedirectId($id);
|
||||
$redirectcode = '';
|
||||
$codes = getRedirectCodesArray();
|
||||
foreach($codes as $rc)
|
||||
{
|
||||
$redirectcode .= makeoption($rc['code'], $rc['id'], $def_code);
|
||||
}
|
||||
}
|
||||
|
||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
|
||||
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
||||
|
||||
@@ -139,10 +139,8 @@ elseif($page == 'emails')
|
||||
}
|
||||
}
|
||||
|
||||
$emaildomains_count = $db->query_first("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC");
|
||||
$emaildomains_count = $db->query_first("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC");
|
||||
$emaildomains_count = $emaildomains_count['count'];
|
||||
|
||||
$emailscount = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("email/emails") . "\";");
|
||||
}
|
||||
elseif($action == 'delete'
|
||||
@@ -184,12 +182,6 @@ elseif($page == 'emails')
|
||||
$number_forwarders = 0;
|
||||
}
|
||||
|
||||
if(isset($_POST['delete_userfiles'])
|
||||
&& (int)$_POST['delete_userfiles'] == 1)
|
||||
{
|
||||
inserttask('7', $result['loginname'], $result['email']);
|
||||
}
|
||||
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `emails_used`=`emails_used` - 1 , `email_forwarders_used` = `email_forwarders_used` - " . (int)$number_forwarders . " $update_users_query_addon WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted email address '" . $result['email'] . "'");
|
||||
@@ -197,7 +189,7 @@ elseif($page == 'emails')
|
||||
}
|
||||
else
|
||||
{
|
||||
ask_yesno_withcheckbox('email_reallydelete', 'admin_customer_alsoremovemail', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
|
||||
ask_yesno('email_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ elseif($page == 'htaccess')
|
||||
else
|
||||
{
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
$options_indexes = makeyesno('options_indexes', '1', '0', '0');
|
||||
$options_indexes = makeyesno('options_indexes', '1', '0', '1');
|
||||
eval("echo \"" . getTemplate("extras/htaccess_add") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,11 +97,6 @@ elseif($page == 'accounts')
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `up_count`=`up_count`+'" . (int)$result['up_count'] . "', `up_bytes`=`up_bytes`+'" . (int)$result['up_bytes'] . "', `down_count`=`down_count`+'" . (int)$result['down_count'] . "', `down_bytes`=`down_bytes`+'" . (int)$result['down_bytes'] . "' WHERE `username`='" . $db->escape($userinfo['loginname']) . "'");
|
||||
$result = $db->query("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $db->escape($row['username']) . "'");
|
||||
}
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted ftp-account '" . $result['username'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=REPLACE(`members`,'," . $db->escape($result['username']) . "','') WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
@@ -142,12 +137,6 @@ elseif($page == 'accounts')
|
||||
$password = validate($_POST['ftp_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
|
||||
$sendinfomail = intval($_POST['sendinfomail']);
|
||||
if($sendinfomail != 1)
|
||||
{
|
||||
$sendinfomail = 0;
|
||||
}
|
||||
|
||||
if($settings['customer']['ftpatdomain'] == '1')
|
||||
{
|
||||
$ftpusername = validate($_POST['ftp_username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
|
||||
@@ -187,51 +176,11 @@ elseif($page == 'accounts')
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_FTP_USERS . "` (`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($path) . "', 'y', '" . (int)$userinfo['guid'] . "', '" . (int)$userinfo['guid'] . "')");
|
||||
$result = $db->query("SELECT `bytes_in_used` FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $userinfo['loginname'] . "'");
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($username) . "', 'user', '" . $db->escape($row[bytes_in_used]) . "', '0', '0', '0', '0', '0')");
|
||||
}
|
||||
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=CONCAT_WS(',',`members`,'" . $db->escape($username) . "') WHERE `customerid`='" . $userinfo['customerid'] . "' AND `gid`='" . (int)$userinfo['guid'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'");
|
||||
inserttask(5);
|
||||
|
||||
if($sendinfomail == 1)
|
||||
{
|
||||
$replace_arr = array(
|
||||
'CUST_NAME' => getCorrectUserSalutation($userinfo),
|
||||
'USR_NAME' => $username,
|
||||
'USR_PASS' => $password,
|
||||
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
|
||||
);
|
||||
|
||||
$mail_body = replace_variables($lng['customer']['ftp_add']['infomail_body']['main'], $replace_arr);
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->Subject = $lng['customer']['ftp_add']['infomail_subject'];
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
$_mailerror = true;
|
||||
} catch (Exception $e) {
|
||||
$mailerr_msg = $e->getMessage();
|
||||
$_mailerror = true;
|
||||
}
|
||||
|
||||
if ($_mailerror) {
|
||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $userinfo['email']);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
@@ -251,8 +200,6 @@ elseif($page == 'accounts')
|
||||
}
|
||||
}
|
||||
|
||||
$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
|
||||
|
||||
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -342,4 +289,4 @@ elseif($page == 'accounts')
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -52,7 +52,7 @@ elseif($page == 'mysqls')
|
||||
'description' => $lng['mysql']['databasedescription']
|
||||
);
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_DATABASES, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$result = $db->query("SELECT `id`, `databasename`, `description`, `dbserver` FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
|
||||
@@ -209,12 +209,12 @@ elseif($page == 'tickets')
|
||||
else
|
||||
{
|
||||
$categories = '';
|
||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
|
||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
|
||||
|
||||
if(isset($result['name'])
|
||||
&& $result['name'] != '')
|
||||
{
|
||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
|
||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
|
||||
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
@@ -226,9 +226,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']['unf_high'], '1');
|
||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2');
|
||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3');
|
||||
$ticketsopen = 0;
|
||||
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
|
||||
WHERE `customerid` = "' . $userinfo['customerid'] . '"
|
||||
|
||||
@@ -178,18 +178,9 @@ else
|
||||
FROM `" . TABLE_PANEL_TRAFFIC . "`
|
||||
WHERE `customerid`='" . $userinfo['customerid'] . "'
|
||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
||||
|
||||
$nums = mysql_num_rows($result);
|
||||
if($nums > 0)
|
||||
{
|
||||
$row = mysql_fetch_row($result);
|
||||
rsort($row);
|
||||
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));
|
||||
} else {
|
||||
// no records yet
|
||||
$traf['max'] = 0;
|
||||
}
|
||||
|
||||
$row = mysql_fetch_row($result);
|
||||
rsort($row);
|
||||
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));
|
||||
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
||||
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
||||
|
||||
@@ -248,7 +248,6 @@ CREATE TABLE `panel_databases` (
|
||||
`databasename` varchar(255) NOT NULL default '',
|
||||
`description` varchar(255) NOT NULL default '',
|
||||
`dbserver` int(11) unsigned NOT NULL default '0',
|
||||
`apsdb` tinyint(1) NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `customerid` (`customerid`)
|
||||
) TYPE=MyISAM ;
|
||||
@@ -452,7 +451,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.10');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.5');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
||||
@@ -560,20 +559,6 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (128, 'system', 'stdsubdomain', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (129, 'system', 'awstats_path', '/usr/bin/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (130, 'system', 'awstats_conf', '/etc/awstats/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (131, 'system', 'defaultttl', '604800');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (132, 'defaultwebsrverrhandler', 'enabled', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (133, 'defaultwebsrverrhandler', 'err401', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (134, 'defaultwebsrverrhandler', 'err403', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (135, 'defaultwebsrverrhandler', 'err404', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (136, 'defaultwebsrverrhandler', 'err500', '');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (137, 'ticket', 'default_priority', '2');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (138, 'system', 'mod_fcgid_defaultini', '1');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (139, 'system', 'ftpserver', 'proftpd');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (140, 'customredirect', 'enabled', '1');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (141, 'customredirect', 'default', '1');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (142, 'system', 'dns_createmailentry', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (143, 'system', 'froxlordirectlyviahostname', '0');
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
@@ -796,7 +781,6 @@ CREATE TABLE `panel_ticket_categories` (
|
||||
`id` smallint(5) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(60) NOT NULL,
|
||||
`adminid` int(11) NOT NULL,
|
||||
`logicalorder` int(3) NOT NULL default '1',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
@@ -833,7 +817,6 @@ CREATE TABLE IF NOT EXISTS `panel_syslog` (
|
||||
# Table structure for table `mail_autoresponder`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `mail_autoresponder`;
|
||||
CREATE TABLE `mail_autoresponder` (
|
||||
`email` varchar(255) NOT NULL default '',
|
||||
`message` text NOT NULL,
|
||||
@@ -858,7 +841,6 @@ CREATE TABLE `mail_autoresponder` (
|
||||
# Table structure for table `panel_phpconfigs`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `panel_phpconfigs`;
|
||||
CREATE TABLE `panel_phpconfigs` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`description` varchar(50) NOT NULL,
|
||||
@@ -882,7 +864,6 @@ INSERT INTO `panel_phpconfigs` (`id`, `description`, `binary`, `file_extensions`
|
||||
# Tabellenstruktur fuer Tabelle `aps_instances`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `aps_instances`;
|
||||
CREATE TABLE IF NOT EXISTS `aps_instances` (
|
||||
`ID` int(4) NOT NULL auto_increment,
|
||||
`CustomerID` int(4) NOT NULL,
|
||||
@@ -897,7 +878,6 @@ CREATE TABLE IF NOT EXISTS `aps_instances` (
|
||||
# Tabellenstruktur fuer Tabelle `aps_packages`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `aps_packages`;
|
||||
CREATE TABLE IF NOT EXISTS `aps_packages` (
|
||||
`ID` int(4) NOT NULL auto_increment,
|
||||
`Path` varchar(500) NOT NULL,
|
||||
@@ -914,7 +894,6 @@ CREATE TABLE IF NOT EXISTS `aps_packages` (
|
||||
# Tabellenstruktur fuer Tabelle `aps_settings`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `aps_settings`;
|
||||
CREATE TABLE IF NOT EXISTS `aps_settings` (
|
||||
`ID` int(4) NOT NULL auto_increment,
|
||||
`InstanceID` int(4) NOT NULL,
|
||||
@@ -929,7 +908,6 @@ CREATE TABLE IF NOT EXISTS `aps_settings` (
|
||||
# Tabellenstruktur fuer Tabelle `aps_tasks`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `aps_tasks`;
|
||||
CREATE TABLE IF NOT EXISTS `aps_tasks` (
|
||||
`ID` int(4) NOT NULL auto_increment,
|
||||
`InstanceID` int(4) NOT NULL,
|
||||
@@ -943,7 +921,6 @@ CREATE TABLE IF NOT EXISTS `aps_tasks` (
|
||||
# Tabellenstruktur fuer Tabelle `aps_temp_settings`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `aps_temp_settings`;
|
||||
CREATE TABLE IF NOT EXISTS `aps_temp_settings` (
|
||||
`ID` int(4) NOT NULL auto_increment,
|
||||
`PackageID` int(4) NOT NULL,
|
||||
@@ -959,7 +936,6 @@ CREATE TABLE IF NOT EXISTS `aps_temp_settings` (
|
||||
# Tabellenstruktur fuer Tabelle `cronjobs_run`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `cronjobs_run`;
|
||||
CREATE TABLE IF NOT EXISTS `cronjobs_run` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`module` varchar(250) NOT NULL,
|
||||
@@ -983,85 +959,3 @@ INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`,
|
||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (6, 'froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic');
|
||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (7, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 MONTH', '1', 'cron_ticketsreset');
|
||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (8, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '1', 'cron_ticketarchive');
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
#
|
||||
# Tabellenstruktur fuer Tabelle `ftp_quotalimits`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `ftp_quotalimits`;
|
||||
CREATE TABLE IF NOT EXISTS `ftp_quotalimits` (
|
||||
`name` varchar(30) default NULL,
|
||||
`quota_type` enum('user','group','class','all') NOT NULL default 'user',
|
||||
`per_session` enum('false','true') NOT NULL default 'false',
|
||||
`limit_type` enum('soft','hard') NOT NULL default 'hard',
|
||||
`bytes_in_avail` float NOT NULL,
|
||||
`bytes_out_avail` float NOT NULL,
|
||||
`bytes_xfer_avail` float NOT NULL,
|
||||
`files_in_avail` int(10) unsigned NOT NULL,
|
||||
`files_out_avail` int(10) unsigned NOT NULL,
|
||||
`files_xfer_avail` int(10) unsigned NOT NULL
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
#
|
||||
# Dumping data for table `ftp_quotalimits`
|
||||
#
|
||||
|
||||
INSERT INTO `ftp_quotalimits` (`name`, `quota_type`, `per_session`, `limit_type`, `bytes_in_avail`, `bytes_out_avail`, `bytes_xfer_avail`, `files_in_avail`, `files_out_avail`, `files_xfer_avail`) VALUES ('froxlor', 'user', 'false', 'hard', 0, 0, 0, 0, 0, 0);
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
#
|
||||
# Tabellenstruktur fuer Tabelle `ftp_quotatallies`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `ftp_quotatallies`;
|
||||
CREATE TABLE IF NOT EXISTS `ftp_quotatallies` (
|
||||
`name` varchar(30) NOT NULL,
|
||||
`quota_type` enum('user','group','class','all') NOT NULL,
|
||||
`bytes_in_used` float NOT NULL,
|
||||
`bytes_out_used` float NOT NULL,
|
||||
`bytes_xfer_used` float NOT NULL,
|
||||
`files_in_used` int(10) unsigned NOT NULL,
|
||||
`files_out_used` int(10) unsigned NOT NULL,
|
||||
`files_xfer_used` int(10) unsigned NOT NULL
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
#
|
||||
# Tabellenstruktur fuer Tabelle `redirect_codes`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `redirect_codes`;
|
||||
CREATE TABLE IF NOT EXISTS `redirect_codes` (
|
||||
`id` int(5) NOT NULL auto_increment,
|
||||
`code` varchar(3) NOT NULL,
|
||||
`desc` varchar(200) NOT NULL,
|
||||
`enabled` tinyint(1) DEFAULT '1',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
#
|
||||
# Dumping data for table `redirect_codes`
|
||||
#
|
||||
|
||||
INSERT INTO `redirect_codes` (`id`, `code`, `desc`, `enabled`) VALUES (1, '---', 'rc_default', 1);
|
||||
INSERT INTO `redirect_codes` (`id`, `code`, `desc`, `enabled`) VALUES (2, '301', 'rc_movedperm', 1);
|
||||
INSERT INTO `redirect_codes` (`id`, `code`, `desc`, `enabled`) VALUES (3, '302', 'rc_found', 1);
|
||||
INSERT INTO `redirect_codes` (`id`, `code`, `desc`, `enabled`) VALUES (4, '303', 'rc_seeother', 1);
|
||||
INSERT INTO `redirect_codes` (`id`, `code`, `desc`, `enabled`) VALUES (5, '307', 'rc_tempred', 1);
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
#
|
||||
# Tabellenstruktur fuer Tabelle `domain_redirect_codes`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `domain_redirect_codes`;
|
||||
CREATE TABLE IF NOT EXISTS `domain_redirect_codes` (
|
||||
`rid` int(5) NOT NULL,
|
||||
`did` int(11) unsigned NOT NULL,
|
||||
UNIQUE KEY `rc` (`rid`, `did`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
@@ -503,7 +503,7 @@ if(isset($_POST['installstep'])
|
||||
|
||||
if($result)
|
||||
{
|
||||
$filename = "/tmp/froxlor_backup_" . date('YmdHi') . ".sql";
|
||||
$filename = "/tmp/froxlor_backup_" . date(YmdHi) . ".sql";
|
||||
|
||||
if(is_file("/usr/bin/mysqldump"))
|
||||
{
|
||||
@@ -637,7 +637,6 @@ if(isset($_POST['installstep'])
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/lighttpd reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/lighttpd.pem' WHERE `settinggroup` = 'system' AND `varname` = 'ssl_cert_file'");
|
||||
$ssettings = '';
|
||||
}
|
||||
|
||||
// insert the lastcronrun to be the installation date
|
||||
|
||||
@@ -29,8 +29,8 @@ if(isFroxlorVersion('0.9-r0'))
|
||||
if(isset($settings['system']['dbversion']) && (int)$settings['system']['dbversion'] < 2)
|
||||
{
|
||||
$db->query("ALTER TABLE `panel_ipsandports` CHANGE `ssl_cert` `ssl_cert_file` VARCHAR( 255 ) NOT NULL,
|
||||
ADD `ssl_key_file` VARCHAR( 255 ) NOT NULL,
|
||||
ADD `ssl_ca_file` VARCHAR( 255 ) NOT NULL,
|
||||
ADD `ssl_key_file` VARCHAR( 255 ) NOT NULL,
|
||||
ADD `ssl_ca_file` VARCHAR( 255 ) NOT NULL,
|
||||
ADD `default_vhostconf_domain` TEXT NOT NULL;");
|
||||
|
||||
$db->query("INSERT INTO `panel_settings` SET `settinggroup` = 'system', `varname` = 'ssl_key_file', `value` = '';");
|
||||
@@ -177,9 +177,9 @@ if(isFroxlorVersion('0.9-r0'))
|
||||
$db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "`
|
||||
MODIFY `traffic` BIGINT(30),
|
||||
MODIFY `traffic_used` BIGINT(30)");
|
||||
|
||||
|
||||
lastStepStatus(0);
|
||||
|
||||
|
||||
updateToVersion('0.9-r1');
|
||||
}
|
||||
|
||||
@@ -187,20 +187,12 @@ if(isFroxlorVersion('0.9-r1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9-r1 to 0.9-r2", false);
|
||||
showUpdateStep("Updating settings table");
|
||||
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('spf', 'use_spf', '0');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('spf', 'spf_entry', '@ IN TXT \"v=spf1 a mx -all\"');");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'froxlor_graphic' WHERE `varname` = 'syscp_graphic'");
|
||||
if(isset($settings['admin']['syscp_graphic'])
|
||||
&& $settings['admin']['syscp_graphic'] != ''
|
||||
){
|
||||
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$settings['admin']['froxlor_graphic'] = 'images/header.gif';
|
||||
}
|
||||
|
||||
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
|
||||
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9-r2');
|
||||
@@ -209,7 +201,7 @@ if(isFroxlorVersion('0.9-r1'))
|
||||
if(isFroxlorVersion('0.9-r2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9-r2 to 0.9-r3", false);
|
||||
showUpdateStep("Updating tables");
|
||||
showUpdateStep("Updating tables");
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'debug_cron', '0');");
|
||||
$db->query("ALTER TABLE `" . TABLE_MAIL_AUTORESPONDER . "` ADD `date_from` int(15) NOT NULL default '-1' AFTER `enabled`");
|
||||
@@ -223,11 +215,11 @@ if(isFroxlorVersion('0.9-r2'))
|
||||
if(isFroxlorVersion('0.9-r3'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9-r3 to 0.9-r4", false);
|
||||
showUpdateStep("Creating new table 'cronjobs_run'");
|
||||
showUpdateStep("Creating new table 'cronjobs_run'");
|
||||
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `cronjobs_run` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`module` varchar(250) NOT NULL,
|
||||
`module` varchar(250) NOT NULL,
|
||||
`cronfile` varchar(250) NOT NULL,
|
||||
`lastrun` int(15) NOT NULL DEFAULT '0',
|
||||
`interval` varchar(100) NOT NULL DEFAULT '5 MINUTE',
|
||||
@@ -238,28 +230,28 @@ if(isFroxlorVersion('0.9-r3'))
|
||||
|
||||
lastStepStatus(0);
|
||||
showUpdateStep("Inserting new values into table");
|
||||
|
||||
|
||||
// checking for active ticket-module
|
||||
$ticket_active = 0;
|
||||
if((int)$settings['ticket']['enabled'] == 1)
|
||||
{
|
||||
$ticket_active = 1;
|
||||
}
|
||||
|
||||
|
||||
// checking for active aps-module
|
||||
$aps_active = 0;
|
||||
if((int)$settings['aps']['aps_active'] == 1)
|
||||
{
|
||||
$aps_active = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// checking for active autoresponder-module
|
||||
$ar_active = 0;
|
||||
if((int)$settings['autoresponder']['autoresponder_active'] == 1)
|
||||
{
|
||||
$ar_active = 1;
|
||||
}
|
||||
|
||||
|
||||
$db->query("INSERT INTO `cronjobs_run` (`module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES ('froxlor/core', 'cron_tasks.php', '5 MINUTE', '1', 'cron_tasks');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES ('froxlor/core', 'cron_legacy.php', '5 MINUTE', '1', 'cron_legacy');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES ('froxlor/aps', 'cron_apsinstaller.php', '5 MINUTE', ".$aps_active.", 'cron_apsinstaller');");
|
||||
@@ -268,30 +260,29 @@ if(isFroxlorVersion('0.9-r3'))
|
||||
$db->query("INSERT INTO `cronjobs_run` (`module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES ('froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES ('froxlor/ticket', 'cron_used_tickets_reset.php', '1 MONTH', '".$ticket_active."', 'cron_ticketsreset');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES ('froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '".$ticket_active."', 'cron_ticketarchive');");
|
||||
|
||||
|
||||
lastStepStatus(0);
|
||||
showUpdateStep("Updating old settings values");
|
||||
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = 'Froxlor Support' WHERE `settinggroup`='ticket' AND `varname`='noreply_name' AND `value`='SysCP Support'");
|
||||
|
||||
lastStepStatus(0);
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9-r4');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9-r4'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9-r4 to 0.9 final");
|
||||
lastStepStatus(0);
|
||||
showUpdateStep("Updating from 0.9-r4 to 0.9 final", false);
|
||||
updateToVersion('0.9');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9 to 0.9.1", false);
|
||||
|
||||
|
||||
showUpdateStep("Updating settings values");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = 'images/header.gif' WHERE `varname` = 'froxlor_graphic' AND `value` = 'images/header.png'");
|
||||
|
||||
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9.1');
|
||||
}
|
||||
@@ -299,13 +290,13 @@ if(isFroxlorVersion('0.9'))
|
||||
if(isFroxlorVersion('0.9.1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.1 to 0.9.2", false);
|
||||
|
||||
|
||||
showUpdateStep("Checking whether last-system-guid is sane");
|
||||
|
||||
|
||||
$result = $db->query_first("SELECT MAX(`guid`) as `latestguid` FROM `".TABLE_PANEL_CUSTOMERS."`");
|
||||
|
||||
if (isset($result['latestguid'])
|
||||
&& (int)$result['latestguid'] > 0
|
||||
|
||||
if (isset($result['latestguid'])
|
||||
&& (int)$result['latestguid'] > 0
|
||||
&& $result['latestguid'] != $settings['system']['lastguid']
|
||||
) {
|
||||
checkLastGuid();
|
||||
@@ -327,7 +318,7 @@ if(isFroxlorVersion('0.9.3'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.3 to 0.9.3-svn1", false);
|
||||
|
||||
showUpdateStep("Updating tables");
|
||||
showUpdateStep("Updating tables");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'password_min_length', '0');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'store_index_file_subs', '1');");
|
||||
lastStepStatus(0);
|
||||
@@ -339,7 +330,7 @@ if(isFroxlorVersion('0.9.3-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.3-svn1 to 0.9.3-svn2", false);
|
||||
|
||||
showUpdateStep("Updating tables");
|
||||
showUpdateStep("Updating tables");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'adminmail_defname', 'Froxlor Administrator');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'adminmail_return', '');");
|
||||
lastStepStatus(0);
|
||||
@@ -404,7 +395,7 @@ if(isFroxlorVersion('0.9.3-svn5'))
|
||||
if(isFroxlorVersion('0.9.4'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.4 to 0.9.4-svn1", false);
|
||||
|
||||
|
||||
/**
|
||||
* some users might still have the setting in their database
|
||||
* because we already had this back in older versions.
|
||||
@@ -415,14 +406,13 @@ if(isFroxlorVersion('0.9.4'))
|
||||
) {
|
||||
showUpdateStep("Updating awstats path setting");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/usr/bin/' WHERE `settinggroup` = 'system' AND `varname` = 'awstats_path';");
|
||||
lastStepStatus(0);
|
||||
}
|
||||
elseif(!isset($settings['system']['awstats_path']))
|
||||
else
|
||||
{
|
||||
showUpdateStep("Adding new awstats path setting");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_path', '/usr/bin/');");
|
||||
lastStepStatus(0);
|
||||
}
|
||||
lastStepStatus(0);
|
||||
|
||||
if(isset($settings['system']['awstats_domain_file'])
|
||||
&& $settings['system']['awstats_domain_file'] != ''
|
||||
@@ -443,15 +433,15 @@ if(isFroxlorVersion('0.9.4'))
|
||||
if(isFroxlorVersion('0.9.4-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.4-svn1 to 0.9.4-svn2", false);
|
||||
|
||||
|
||||
$update_domains = isset($_POST['update_domainwildcardentry']) ? intval($_POST['update_domainwildcardentry']) : 0;
|
||||
|
||||
if($update_domains != 1)
|
||||
|
||||
if($update_domains != 1)
|
||||
{
|
||||
$update_domains = 0;
|
||||
}
|
||||
|
||||
if($update_domains == 1)
|
||||
|
||||
if($update_domains == 1)
|
||||
{
|
||||
showUpdateStep("Updating domains with iswildcarddomain=yes");
|
||||
$query = "SELECT `d`.`id` FROM `".TABLE_PANEL_DOMAINS."` `d`, `".TABLE_PANEL_CUSTOMERS."` `c` ";
|
||||
@@ -468,7 +458,7 @@ if(isFroxlorVersion('0.9.4-svn1'))
|
||||
showUpdateStep("Won't update domains with iswildcarddomain=yes as requested");
|
||||
lastStepStatus(1);
|
||||
}
|
||||
|
||||
|
||||
showUpdateStep("Updating database table definition for panel_domains");
|
||||
$db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` MODIFY `iswildcarddomain` tinyint(1) NOT NULL default '1';");
|
||||
lastStepStatus(0);
|
||||
@@ -482,405 +472,4 @@ if(isFroxlorVersion('0.9.4-svn2'))
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9.5');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.5'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.5 to 0.9.6-svn1", false);
|
||||
|
||||
showUpdateStep("Adding time-to-live configuration setting");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'defaultttl', '604800');");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Updating database table structure for panel_ticket_categories");
|
||||
$db->query("ALTER TABLE `" . TABLE_PANEL_TICKET_CATS . "` ADD `logicalorder` int(3) NOT NULL default '1' AFTER `adminid`;");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.6-svn1');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.6-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6-svn1 to 0.9.6-svn2", false);
|
||||
|
||||
$update_adminmail = isset($_POST['update_adminmail']) ? validate($_POST['update_adminmail'], 'update_adminmail') : false;
|
||||
$do_update = true;
|
||||
|
||||
if($update_adminmail !== false)
|
||||
{
|
||||
showUpdateStep("Checking newly entered admin-mail");
|
||||
if(!PHPMailer::ValidateAddress($update_adminmail))
|
||||
{
|
||||
$do_update = false;
|
||||
lastStepStatus(2, 'E-Mail still not valid, go back and try again');
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '".$db->escape($update_adminmail)."' WHERE `settinggroup` = 'panel' AND `varname` = 'adminmail';");
|
||||
lastStepStatus(0);
|
||||
}
|
||||
}
|
||||
|
||||
if($do_update)
|
||||
{
|
||||
updateToVersion('0.9.6-svn2');
|
||||
}
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.6-svn2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6-svn2 to 0.9.6-svn3", false);
|
||||
|
||||
$update_deferr_enable = isset($_POST['update_deferr_enable']) ? true : false;
|
||||
|
||||
$err500 = false;
|
||||
$err401 = false;
|
||||
$err403 = false;
|
||||
$err404 = false;
|
||||
|
||||
showUpdateStep("Adding new webserver configurations to database");
|
||||
if($update_deferr_enable == true)
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'enabled', '1');");
|
||||
|
||||
if(isset($_POST['update_deferr_500'])
|
||||
&& trim($_POST['update_deferr_500']) != ''
|
||||
) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_500'])."');");
|
||||
$err500 = true;
|
||||
}
|
||||
|
||||
if(isset($_POST['update_deferr_401'])
|
||||
&& trim($_POST['update_deferr_401']) != ''
|
||||
) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err401', '".$db->escape($_POST['update_deferr_401'])."');");
|
||||
$err401 = true;
|
||||
}
|
||||
|
||||
if(isset($_POST['update_deferr_403'])
|
||||
&& trim($_POST['update_deferr_403']) != ''
|
||||
) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err403', '".$db->escape($_POST['update_deferr_403'])."');");
|
||||
$err403 = true;
|
||||
}
|
||||
|
||||
if(isset($_POST['update_deferr_404'])
|
||||
&& trim($_POST['update_deferr_404']) != ''
|
||||
) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '".$db->escape($_POST['update_deferr_404'])."');");
|
||||
$err404 = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$update_deferr_enable) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'enabled', '0');");
|
||||
}
|
||||
if(!$err401) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err401', '');");
|
||||
}
|
||||
if(!$err403) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err403', '');");
|
||||
}
|
||||
if(!$err404) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '');");
|
||||
}
|
||||
if(!$err500) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '');");
|
||||
}
|
||||
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.6-svn3');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.6-svn3'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6-svn3 to 0.9.6-svn4", false);
|
||||
|
||||
$update_deftic_priority = isset($_POST['update_deftic_priority']) ? intval($_POST['update_deftic_priority']) : 2;
|
||||
|
||||
showUpdateStep("Setting default support-ticket priority");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('ticket', 'default_priority', '".(int)$update_deftic_priority."');");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.6-svn4');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.6-svn4'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6-svn4 to 0.9.6-svn5", false);
|
||||
|
||||
$update_defsys_phpconfig = isset($_POST['update_defsys_phpconfig']) ? intval($_POST['update_defsys_phpconfig']) : 1;
|
||||
|
||||
if($update_defsys_phpconfig != 1) {
|
||||
showUpdateStep("Setting default php-configuration to user defined config #".$update_defsys_phpconfig);
|
||||
} else {
|
||||
showUpdateStep("Adding default php-configuration setting to the database");
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_defaultini', '".(int)$update_defsys_phpconfig."');");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.6-svn5');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.6-svn5'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6-svn5 to 0.9.6-svn6", false);
|
||||
|
||||
showUpdateStep("Adding new FTP-quota settings");
|
||||
|
||||
$update_defsys_ftpserver = isset($_POST['update_defsys_ftpserver']) ? intval($_POST['update_defsys_ftpserver']) : 'proftpd';
|
||||
|
||||
// add ftp server setting
|
||||
$db->query("INSERT INTO `panel_settings` SET `settinggroup` = 'system', `varname` = 'ftpserver', `value` = '".$db->escape($update_defsys_ftpserver)."';");
|
||||
|
||||
// add proftpd quota
|
||||
$db->query("CREATE TABLE `ftp_quotalimits` (`name` varchar(30) default NULL, `quota_type` enum('user','group','class','all') NOT NULL default 'user', `per_session` enum('false','true') NOT NULL default 'false', `limit_type` enum('soft','hard') NOT NULL default 'hard', `bytes_in_avail` float NOT NULL, `bytes_out_avail` float NOT NULL, `bytes_xfer_avail` float NOT NULL, `files_in_avail` int(10) unsigned NOT NULL, `files_out_avail` int(10) unsigned NOT NULL, `files_xfer_avail` int(10) unsigned NOT NULL) ENGINE=MyISAM;");
|
||||
|
||||
$db->query("INSERT INTO `ftp_quotalimits` (`name`, `quota_type`, `per_session`, `limit_type`, `bytes_in_avail`, `bytes_out_avail`, `bytes_xfer_avail`, `files_in_avail`, `files_out_avail`, `files_xfer_avail`) VALUES ('froxlor', 'user', 'false', 'hard', 0, 0, 0, 0, 0, 0);");
|
||||
|
||||
$db->query("CREATE TABLE `ftp_quotatallies` (`name` varchar(30) NOT NULL, `quota_type` enum('user','group','class','all') NOT NULL, `bytes_in_used` float NOT NULL, `bytes_out_used` float NOT NULL, `bytes_xfer_used` float NOT NULL, `files_in_used` int(10) unsigned NOT NULL, `files_out_used` int(10) unsigned NOT NULL, `files_xfer_used` int(10) unsigned NOT NULL ) ENGINE=MyISAM;");
|
||||
|
||||
// fill quota tallies
|
||||
$result_ftp_users = $db->query("SELECT username FROM `" . TABLE_FTP_USERS . "` WHERE 1;");
|
||||
|
||||
while($row_ftp_users = $db->fetch_array($result_ftp_users))
|
||||
{
|
||||
$result_ftp_quota = $db->query("SELECT diskspace_used FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE loginname = SUBSTRING_INDEX('" . $row_ftp_users['username'] . "', '" . $settings['customer']['ftpprefix'] . "', 1);");
|
||||
$row_ftp_quota = mysql_fetch_row($result_ftp_quota);
|
||||
$db->query("INSERT INTO `ftp_quotatallies` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $row_ftp_users['username'] . "', 'user', '" . $row_ftp_quota[0] . "'*1024, '0', '0', '0', '0', '0');");
|
||||
}
|
||||
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.6-svn6');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.6-svn6'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6-svn6 to 0.9.6 final");
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9.6');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.6'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6 to 0.9.7-svn1", false);
|
||||
|
||||
$update_customredirect_enable = isset($_POST['update_customredirect_enable']) ? 1 : 0;
|
||||
$update_customredirect_default = isset($_POST['update_customredirect_default']) ? (int)$_POST['update_customredirect_default'] : 1;
|
||||
|
||||
showUpdateStep("Adding new tables to database");
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `redirect_codes` (
|
||||
`id` int(5) NOT NULL auto_increment,
|
||||
`code` varchar(3) NOT NULL,
|
||||
`enabled` tinyint(1) DEFAULT '1',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM;");
|
||||
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `domain_redirect_codes` (
|
||||
`rid` int(5) NOT NULL,
|
||||
`did` int(11) unsigned NOT NULL,
|
||||
UNIQUE KEY `rc` (`rid`, `did`)
|
||||
) ENGINE=MyISAM;");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Filling new tables with default data");
|
||||
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (1, '---', 1);");
|
||||
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (2, '301', 1);");
|
||||
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (3, '302', 1);");
|
||||
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (4, '303', 1);");
|
||||
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (5, '307', 1);");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Updating domains");
|
||||
$res = $db->query("SELECT `id` FROM `".TABLE_PANEL_DOMAINS."` ORDER BY `id` ASC");
|
||||
$updated_domains = 0;
|
||||
while($d = $db->fetch_array($res))
|
||||
{
|
||||
$db->query("INSERT INTO `domain_redirect_codes` (`rid`, `did`) VALUES ('".(int)$update_customredirect_default."', '".(int)$d['id']."');");
|
||||
$updated_domains++;
|
||||
}
|
||||
lastStepStatus(0, 'Updated '.$updated_domains.' domain(s)');
|
||||
|
||||
showUpdateStep("Adding new settings");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('customredirect', 'enabled', '".(int)$update_customredirect_enable."');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('customredirect', 'default', '".(int)$update_customredirect_default."');");
|
||||
lastStepStatus(0);
|
||||
|
||||
// need to fix default-error-copy-and-paste-shizzle
|
||||
showUpdateStep("Checking if anything is ok with the default-error-handler");
|
||||
if(!isset($settings['defaultwebsrverrhandler']['err404']))
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '');");
|
||||
}
|
||||
if(!isset($settings['defaultwebsrverrhandler']['err403']))
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err403', '');");
|
||||
}
|
||||
if(!isset($settings['defaultwebsrverrhandler']['err401']))
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err401', '');");
|
||||
}
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.7-svn1');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.7-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.7-svn1 to 0.9.7-svn2", false);
|
||||
|
||||
showUpdateStep("Updating open_basedir due to security - issue");
|
||||
$result = $db->query("SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `documentroot` LIKE '%:%' AND `documentroot` NOT LIKE 'http://%' AND `openbasedir_path` = '0' AND `openbasedir` = '1'");
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
$db->query("UPDATE `".TABLE_PANEL_DOMAINS."` SET `openbasedir_path` = '1' WHERE `id` = " . $row['id']);
|
||||
}
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.7-svn2');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.7-svn2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.7-svn2 to 0.9.7-svn3", false);
|
||||
|
||||
showUpdateStep("Updating database tables");
|
||||
$db->query("ALTER TABLE `redirect_codes` ADD `desc` varchar(200) NOT NULL AFTER `code`;");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Updating field-values");
|
||||
$db->query("UPDATE `redirect_codes` SET `desc` = 'rc_default' WHERE `code` = '---';");
|
||||
$db->query("UPDATE `redirect_codes` SET `desc` = 'rc_movedperm' WHERE `code` = '301';");
|
||||
$db->query("UPDATE `redirect_codes` SET `desc` = 'rc_found' WHERE `code` = '302';");
|
||||
$db->query("UPDATE `redirect_codes` SET `desc` = 'rc_seeother' WHERE `code` = '303';");
|
||||
$db->query("UPDATE `redirect_codes` SET `desc` = 'rc_tempred' WHERE `code` = '307';");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.7-svn3');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.7-svn3'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.7-svn3 to 0.9.7 final");
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9.7');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.7'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.7 to 0.9.8 final");
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9.8');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.8'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.8 to 0.9.9-svn1", false);
|
||||
|
||||
$update_defdns_mailentry = isset($_POST['update_defdns_mailentry']) ? '1' : '0';
|
||||
|
||||
showUpdateStep("Adding new settings");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'dns_createmailentry', '".(int)$update_defdns_mailentry."');");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.9-svn1');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.9-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.9-svn1 to 0.9.9 final");
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9.9');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.9'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.9 to 0.9.10-svn1", false);
|
||||
|
||||
showUpdateStep("Checking whether you are missing any settings", false);
|
||||
$nonefound = true;
|
||||
|
||||
$update_httpuser = isset($_POST['update_httpuser']) ? $_POST['update_httpuser'] : false;
|
||||
$update_httpgroup = isset($_POST['update_httpgroup']) ? $_POST['update_httpgroup'] : false;
|
||||
|
||||
if($update_httpuser !== false)
|
||||
{
|
||||
$nonefound = false;
|
||||
showUpdateStep("Adding missing setting 'httpuser'");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'httpuser', '".$update_httpuser."');");
|
||||
lastStepStatus(0);
|
||||
}
|
||||
|
||||
if($update_httpgroup !== false)
|
||||
{
|
||||
$nonefound = false;
|
||||
showUpdateStep("Adding missing setting 'httpgroup'");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'httpgroup', '".$update_httpgroup."');");
|
||||
lastStepStatus(0);
|
||||
}
|
||||
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'debug_cron'");
|
||||
if(!isset($result) || !isset($result['value']))
|
||||
{
|
||||
$nonefound = false;
|
||||
showUpdateStep("Adding missing setting 'debug_cron'");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'debug_cron', '0');");
|
||||
lastStepStatus(0);
|
||||
}
|
||||
|
||||
if($nonefound) {
|
||||
showUpdateStep("No missing settings found");
|
||||
lastStepStatus(0);
|
||||
}
|
||||
|
||||
updateToVersion('0.9.10-svn1');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.10-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.10-svn1 to 0.9.10-svn2", false);
|
||||
|
||||
showUpdateStep("Updating database table definition for panel_databases");
|
||||
$db->query("ALTER TABLE `" . TABLE_PANEL_DATABASES . "` ADD `apsdb` tinyint(1) NOT NULL default '0' AFTER `dbserver`;");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Adding APS databases to customers overview");
|
||||
$count_dbupdates = 0;
|
||||
$db_root = null;
|
||||
openRootDB();
|
||||
$result = $db_root->query("SHOW DATABASES;");
|
||||
while($row = $db_root->fetch_array($result))
|
||||
{
|
||||
if(preg_match('/^web([0-9]+)aps([0-9]+)$/', $row['Database'], $matches))
|
||||
{
|
||||
$cid = $matches[1];
|
||||
$databasedescription = 'APS DB';
|
||||
$result = $db->query('INSERT INTO `' . TABLE_PANEL_DATABASES . '` (`customerid`, `databasename`, `description`, `dbserver`, `apsdb`) VALUES ("' . (int)$cid . '", "' . $db->escape($row['Database']) . '", "' . $db->escape($databasedescription) . '", "0", "1")');
|
||||
$result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1 WHERE `customerid`="' . (int)$cid . '"');
|
||||
$count_dbupdates++;
|
||||
}
|
||||
}
|
||||
closeRootDB();
|
||||
if($count_dbupdates > 0) {
|
||||
lastStepStatus(0, "Found ".$count_dbupdates." customer APS databases");
|
||||
} else {
|
||||
lastStepStatus(0, "None found");
|
||||
}
|
||||
|
||||
updateToVersion('0.9.10-svn2');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.10-svn2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.10-svn2 to 0.9.10", false);
|
||||
|
||||
$update_directlyviahostname = isset($_POST['update_directlyviahostname']) ? '1' : '0';
|
||||
|
||||
showUpdateStep("Adding new settings");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'froxlordirectlyviahostname', '".(int)$update_directlyviahostname."');");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.10');
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -33,7 +33,7 @@ function getPreConfig($current_version)
|
||||
include_once makeCorrectFile(dirname(__FILE__).'/preconfig/0.9/preconfig_0.9.inc.php');
|
||||
parseAndOutputPreconfig($has_preconfig, $return, $current_version);
|
||||
|
||||
$return .= '<br /><br />'.makecheckbox('update_changesagreed', '<strong>I have read the update notifications above and I am aware of the changes made to my system.</strong>', '1', true, '0', true);
|
||||
$return .= '<br /><br />'.makecheckbox('update_changesagreed', '<strong>I have read the update notifications and I am aware of the changes made to my system.</strong>', '1', true, '0', true);
|
||||
$return .= '</div>';
|
||||
$return .= '<input type="hidden" name="update_preconfig" value="1" />';
|
||||
|
||||
@@ -46,16 +46,13 @@ function getPreConfig($current_version)
|
||||
|
||||
function versionInUpdate($current_version, $version_to_check)
|
||||
{
|
||||
if (!isFroxlor()) {
|
||||
return true;
|
||||
}
|
||||
$pos_a = strpos($current_version, '-svn');
|
||||
$pos_b = strpos($version_to_check, '-svn');
|
||||
$pos_b = strpos($current_version, '-svn');
|
||||
// if we compare svn-versions, we have to add -svn0 to the version
|
||||
// to compare it correctly
|
||||
if($pos_a === false && $pos_b !== false)
|
||||
{
|
||||
$current_version.= '-svn9999';
|
||||
$current_version.= '-svn0';
|
||||
}
|
||||
|
||||
return version_compare($current_version, $version_to_check, '<');
|
||||
|
||||
@@ -17,207 +17,22 @@
|
||||
|
||||
/**
|
||||
* checks if the new-version has some updating to do
|
||||
*
|
||||
*
|
||||
* @param boolean $has_preconfig pointer to check if any preconfig has to be output
|
||||
* @param string $return pointer to output string
|
||||
* @param string $current_version current froxlor version
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
{
|
||||
global $settings, $lng, $db;
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.4-svn2'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'Froxlor now enables the usage of a domain-wildcard entry and subdomains for this domain at the same time (subdomains are parsed before the main-domain vhost container).';
|
||||
$description.= 'This makes it possible to catch all non-existing subdomains with the main vhost but also have the ability to use subdomains for that domain.<br />';
|
||||
$description.= 'If you would like Froxlor to do so with your domains, the update script can set the correct values for existing domains for you. Note: future domains will have wildcard-entries enabled by default no matter how you decide here.';
|
||||
$question = '<strong>Do you want to use wildcard-entries for existing domains?:</strong> ';
|
||||
$question.= makeyesno('update_domainwildcardentry', '1', '0', '1');
|
||||
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.6-svn2'))
|
||||
{
|
||||
if(!PHPMailer::ValidateAddress($settings['panel']['adminmail']))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'Froxlor uses a newer version of the phpMailerClass and determined that your current admin-mail address is invalid.';
|
||||
$question = '<strong>Please specify a new admin-email address:</strong> <input type="text" class="text" name="update_adminmail" value="'.$settings['panel']['adminmail'].'" />';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.6-svn3'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'You now have the possibility to define default error-documents for your webserver which replace the default webserver error-messages.';
|
||||
$question = '<strong>Do you want to enable default error-documents?:</strong> ';
|
||||
$question .= makeyesno('update_deferr_enable', '1', '0', '0').'<br /><br />';
|
||||
if($settings['system']['webserver'] == 'apache2')
|
||||
{
|
||||
$question .= 'Path/URL for error 500: <input type="text" class="text" name="update_deferr_500" /><br /><br />';
|
||||
$question .= 'Path/URL for error 401: <input type="text" class="text" name="update_deferr_401" /><br /><br />';
|
||||
$question .= 'Path/URL for error 403: <input type="text" class="text" name="update_deferr_403" /><br /><br />';
|
||||
}
|
||||
$question .= 'Path/URL for error 404: <input type="text" class="text" name="update_deferr_404" />';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.6-svn4'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'You can define a default support-ticket priority level which is pre-selected for new support-tickets.';
|
||||
$question = '<strong>Which should be the default ticket-priority?:</strong> ';
|
||||
$question .= '<select name="update_deftic_priority">';
|
||||
$priorities = makeoption($lng['ticket']['unf_high'], '1', '2');
|
||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', '2');
|
||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3', '2');
|
||||
$question .= $priorities.'</select>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.6-svn5'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'If you have more than one PHP configurations defined in Froxlor you can now set a default one which will be used for every domain.';
|
||||
$question = '<strong>Select default PHP configuration:</strong> ';
|
||||
$question .= '<select name="update_defsys_phpconfig">';
|
||||
$configs_array = getPhpConfigs();
|
||||
$configs = '';
|
||||
foreach($configs_array as $idx => $desc)
|
||||
{
|
||||
$configs .= makeoption($desc, $idx, '1');
|
||||
}
|
||||
$question .= $configs.'</select>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.6-svn6'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'For the new FTP-quota feature, you can now chose the currently used ftpd-software.';
|
||||
$question = '<strong>Used FTPd-software:</strong> ';
|
||||
$question .= '<select name="update_defsys_ftpserver">';
|
||||
$question .= makeoption('ProFTPd', 'proftpd', 'proftpd');
|
||||
$question .= makeoption('PureFTPd', 'pureftpd', 'proftpd');
|
||||
$question .= '</select>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.7-svn1'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'You can now choose whether customers can select the http-redirect code and which of them acts as default.';
|
||||
$question = '<strong>Allow customer chosen redirects?:</strong> ';
|
||||
$question.= makeyesno('update_customredirect_enable', '1', '0', '1').'<br /><br />';
|
||||
$question.= '<strong>Select default redirect code (default: empty):</strong> ';
|
||||
$question.= '<select name="update_customredirect_default">';
|
||||
$redirects = makeoption('--- ('.$lng['redirect_desc']['rc_default'].')', 1, '1');
|
||||
$redirects.= makeoption('301 ('.$lng['redirect_desc']['rc_movedperm'].')', 2, '1');
|
||||
$redirects.= makeoption('302 ('.$lng['redirect_desc']['rc_found'].')', 3, '1');
|
||||
$redirects.= makeoption('303 ('.$lng['redirect_desc']['rc_seeother'].')', 4, '1');
|
||||
$redirects.= makeoption('307 ('.$lng['redirect_desc']['rc_tempred'].')', 5, '1');
|
||||
$question .= $redirects.'</select>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.7-svn2'))
|
||||
{
|
||||
$result = $db->query("SELECT `domain` FROM " . TABLE_PANEL_DOMAINS . " WHERE `documentroot` LIKE '%:%' AND `documentroot` NOT LIKE 'http://%' AND `openbasedir_path` = '0' AND `openbasedir` = '1'");
|
||||
$wrongOpenBasedirDomain = array();
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
$wrongOpenBasedirDomain[] = $row['domain'];
|
||||
}
|
||||
|
||||
if(count($wrongOpenBasedirDomain) > 0)
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'Resetting the open_basedir to customer - root';
|
||||
$question = '<strong>Due to a security - issue regarding open_basedir, Froxlor will set the open_basedir for the following domains to the customers root instead of the chosen documentroot:</strong><br /> ';
|
||||
$question.= '<ul>';
|
||||
$idna_convert = new idna_convert_wrapper();
|
||||
foreach($wrongOpenBasedirDomain as $domain)
|
||||
{
|
||||
$question.= '<li>' . $idna_convert->decode($domain) . '</li>';
|
||||
}
|
||||
$question.= '</ul>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.9-svn1'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'When entering MX servers to Froxlor there was no mail-, imap-, pop3- and smtp-"A record" created. You can now chose whether this should be done or not.';
|
||||
$question = '<strong>Do you want these A-records to be created even with MX servers given?:</strong> ';
|
||||
$question.= makeyesno('update_defdns_mailentry', '1', '0', '0');
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.10-svn1'))
|
||||
{
|
||||
$has_nouser = false;
|
||||
$has_nogroup = false;
|
||||
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'");
|
||||
if(!isset($result) || !isset($result['value']))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$has_nouser = true;
|
||||
$guessed_user = 'www-data';
|
||||
if(function_exists('posix_getuid')
|
||||
&& function_exists('posix_getpwuid')
|
||||
) {
|
||||
$_httpuser = posix_getpwuid(posix_getuid());
|
||||
$guessed_user = $_httpuser['name'];
|
||||
}
|
||||
}
|
||||
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'");
|
||||
if(!isset($result) || !isset($result['value']))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$has_nogroup = true;
|
||||
$guessed_group = 'www-data';
|
||||
if(function_exists('posix_getgid')
|
||||
&& function_exists('posix_getgrgid')
|
||||
) {
|
||||
$_httpgroup = posix_getgrgid(posix_getgid());
|
||||
$guessed_group = $_httpgroup['name'];
|
||||
}
|
||||
}
|
||||
|
||||
if($has_nouser || $has_nogroup)
|
||||
{
|
||||
$description = 'Please enter the correct username/groupname of the webserver on your system We\'re guessing the user but it might not be correct, so please check.';
|
||||
if($has_nouser)
|
||||
{
|
||||
$question = '<strong>Please enter the webservers username:</strong> <input type="text" class="text" name="update_httpuser" value="'.$guessed_user.'" />';
|
||||
}
|
||||
elseif($has_nogroup)
|
||||
{
|
||||
$question2 = '<strong>Please enter the webservers groupname:</strong> <input type="text" class="text" name="update_httpgroup" value="'.$guessed_group.'" />';
|
||||
if($has_nouser) {
|
||||
$question .= '<br /><br />'.$question2;
|
||||
} else {
|
||||
$question = $question2;
|
||||
}
|
||||
}
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.10'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'you can now decide whether Froxlor should be reached via hostname/froxlor or directly via the hostname.';
|
||||
$question = '<strong>Do you want Froxlor to be reached directly via the hostname?:</strong> ';
|
||||
$question.= makeyesno('update_directlyviahostname', '1', '0', '0');
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
$return .= 'Froxlor now enables the usage of a domain-wildcard entry and subdomains for this domain at the same time (subdomains are parsed before the main-domain vhost container). ';
|
||||
$return .= 'This makes it possible to catch all non-existing subdomains with the main vhost but also have the ability to use subdomains for that domain.<br />';
|
||||
$return .= 'If you would like Froxlor to do so with your domains, the update script can set the correct values for existing domains for you. Note: future domains will have wildcard-entries enabled by default no matter how you decide here.<br /><br />';
|
||||
$return .= '<strong>Do you want to use wildcard-entries for existing domains?:</strong> ';
|
||||
$return .= makeyesno('update_domainwildcardentry', '1', '0', '1').'<br /><br />';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,18 +19,6 @@
|
||||
|
||||
$updatelog = FroxlorLogger::getInstanceOf(array('loginname' => 'updater'), $db, $settings);
|
||||
|
||||
$updatelogfile = validateUpdateLogFile(makeCorrectFile(dirname(__FILE__).'/update.log'));
|
||||
$filelog = FileLogger::getInstanceOf(array('loginname' => 'updater'), $settings);
|
||||
$filelog->setLogFile($updatelogfile);
|
||||
|
||||
// if first writing does not work we'll stop, tell the user to fix it
|
||||
// and then let him try again.
|
||||
try {
|
||||
$filelog->logAction(ADM_ACTION, LOG_WARNING, '-------------- START LOG --------------');
|
||||
} catch(Exception $e) {
|
||||
standard_error('exception', $e->getMessage());
|
||||
}
|
||||
|
||||
/*
|
||||
* since froxlor, we have to check if there's still someone
|
||||
* out there using syscp and needs to upgrade
|
||||
@@ -102,8 +90,6 @@ if(!isFroxlor())
|
||||
if(isFroxlor())
|
||||
{
|
||||
include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/0.9/update_0.9.inc.php'));
|
||||
$filelog->logAction(ADM_ACTION, LOG_WARNING, '--------------- END LOG ---------------');
|
||||
unset($filelog);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -32,7 +32,6 @@ class ApsInstaller extends ApsParser
|
||||
private $RealPath = '';
|
||||
private $RootDir = '';
|
||||
private $Hosts = '';
|
||||
private $aps_version = '1.0';
|
||||
|
||||
/**
|
||||
* constructor of class. setup some basic variables
|
||||
@@ -73,8 +72,6 @@ class ApsInstaller extends ApsParser
|
||||
|
||||
$XmlContent = file_get_contents($this->RootDir . 'packages/' . $Row['Path'] . '/APP-META.xml');
|
||||
$Xml = new SimpleXMLElement($XmlContent);
|
||||
|
||||
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||
|
||||
//check for unparseable xml data
|
||||
|
||||
@@ -149,16 +146,9 @@ class ApsInstaller extends ApsParser
|
||||
$ReturnStatus = 0;
|
||||
|
||||
// make configure-script executable
|
||||
if($this->aps_version != '1.0')
|
||||
{
|
||||
$scriptname = (string)$Xml->service->provision->{'configuration-script'}['name'];
|
||||
} else {
|
||||
$scriptname = 'configure';
|
||||
}
|
||||
chmod($this->RealPath . $this->DomainPath . '/install_scripts/configure', 0755);
|
||||
|
||||
chmod($this->RealPath . $this->DomainPath . '/install_scripts/'.$scriptname, 0755);
|
||||
|
||||
$Return = safe_exec('php ' . escapeshellarg($this->RealPath . $this->DomainPath . '/install_scripts/'.$scriptname) . ' install', $ReturnStatus);
|
||||
$Return = safe_exec('php ' . escapeshellarg($this->RealPath . $this->DomainPath . '/install_scripts/configure') . ' install', $ReturnStatus);
|
||||
|
||||
if($ReturnStatus != 0)
|
||||
{
|
||||
@@ -219,24 +209,16 @@ class ApsInstaller extends ApsParser
|
||||
}
|
||||
elseif($Task == TASK_REMOVE)
|
||||
{
|
||||
// check for database
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$Xml->registerXPathNamespace('db', 'http://apstandard.com/ns/1/db');
|
||||
|
||||
$XmlDb = new DynamicProperties;
|
||||
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||
}
|
||||
//FIXME cleanup installation
|
||||
//remove files from: $this->RealPath . $this->DomainPath . '/'
|
||||
//remove permissions
|
||||
//drop database
|
||||
|
||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||
|
||||
if($XmlDb->db->id)
|
||||
{
|
||||
//drop database permissions
|
||||
//database management
|
||||
|
||||
$Database = 'web' . $Row['CustomerID'] . 'aps' . $Row['InstanceID'];
|
||||
foreach(array_map('trim', explode(',', $this->Hosts)) as $DatabaseHost)
|
||||
@@ -246,15 +228,8 @@ class ApsInstaller extends ApsParser
|
||||
$this->db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $this->db->escape($Database) . '" AND `Host` = "' . $this->db->escape($DatabaseHost) . '"');
|
||||
}
|
||||
|
||||
//drop database
|
||||
$this->db_root->query('DROP DATABASE IF EXISTS `' . $this->db->escape($Database) . '`');
|
||||
$this->db_root->query('FLUSH PRIVILEGES');
|
||||
|
||||
/*
|
||||
* remove database from customer-mysql overview, #272
|
||||
*/
|
||||
$this->db->query('DELETE FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$Row['CustomerID'] . '" AND `databasename`="' . $this->db->escape($Database) . '" AND `apsdb`="1"');
|
||||
$result = $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`-1 WHERE `customerid`="' . (int)$Row['CustomerID'] . '"');
|
||||
}
|
||||
|
||||
//remove task & delete package instance + settings
|
||||
@@ -262,20 +237,6 @@ class ApsInstaller extends ApsParser
|
||||
$this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . TASK_REMOVE . ' AND `InstanceID` = ' . $this->db->escape($Row['InstanceID']));
|
||||
$this->db->query('DELETE FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . $this->db->escape($Row['InstanceID']));
|
||||
$this->db->query('DELETE FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID']));
|
||||
|
||||
//remove data, #273
|
||||
if($this->DomainPath != '' && $this->DomainPath != '/') {
|
||||
self::UnlinkRecursive($this->RealPath . $this->DomainPath . '/');
|
||||
} else {
|
||||
// save awstats/webalizer folder if it's the docroot
|
||||
self::UnlinkRecursive($this->RealPath . $this->DomainPath . '/', true);
|
||||
// place standard-index file
|
||||
$loginname = getLoginNameByUid($Row['CustomerID']);
|
||||
if($loginname !== false)
|
||||
{
|
||||
storeDefaultIndex($loginname, $this->RealPath . $this->DomainPath . '/');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,19 +278,6 @@ class ApsInstaller extends ApsParser
|
||||
|
||||
private function PrepareFiles($Xml, $Row, $Task)
|
||||
{
|
||||
if($this->aps_version != '1.0')
|
||||
{
|
||||
$mapping = $Xml->service->provision->{'url-mapping'}->mapping;
|
||||
$mapping_path = $Xml->service->provision->{'url-mapping'}->mapping['path'];
|
||||
$mapping_url = $Xml->service->provision->{'url-mapping'}->mapping['url'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mapping = $Xml->mapping;
|
||||
$mapping_path = $Xml->mapping['path'];
|
||||
$mapping_url = $Xml->mapping['url'];
|
||||
}
|
||||
|
||||
if($Task == TASK_INSTALL)
|
||||
{
|
||||
//FIXME truncate customer directory
|
||||
@@ -339,7 +287,7 @@ class ApsInstaller extends ApsParser
|
||||
|
||||
//extract all files and chown them to the customer guid
|
||||
|
||||
if(self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], $mapping_path, $this->RealPath . $this->DomainPath . '/') == false
|
||||
if(self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], $Xml->mapping['path'], $this->RealPath . $this->DomainPath . '/') == false
|
||||
|| self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], 'scripts', $this->RealPath . $this->DomainPath . '/install_scripts/') == false)
|
||||
{
|
||||
$this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID']));
|
||||
@@ -371,7 +319,7 @@ class ApsInstaller extends ApsParser
|
||||
|
||||
//recursive mappings
|
||||
|
||||
self::PrepareMappings($mapping, $mapping_url, $this->RealPath . $this->DomainPath . '/');
|
||||
self::PrepareMappings($Xml->mapping, $Xml->mapping['url'], $this->RealPath . $this->DomainPath . '/');
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -388,37 +336,34 @@ class ApsInstaller extends ApsParser
|
||||
//check for special PHP permissions
|
||||
//must be done with xpath otherwise check not possible (XML parser problem with attributes)
|
||||
|
||||
if($ParentMapping && $ParentMapping !== null)
|
||||
$ParentMapping->registerXPathNamespace('p', 'http://apstandard.com/ns/1/php');
|
||||
$Result = $ParentMapping->xpath('p:permissions');
|
||||
|
||||
if($Result[0]['writable'] == 'true')
|
||||
{
|
||||
$ParentMapping->registerXPathNamespace('p', 'http://apstandard.com/ns/1/php');
|
||||
$Result = $ParentMapping->xpath('p:permissions');
|
||||
|
||||
if($Result[0]['writable'] == 'true')
|
||||
//fixing file permissions to writeable
|
||||
|
||||
if(is_dir($Path))
|
||||
{
|
||||
//fixing file permissions to writeable
|
||||
|
||||
if(is_dir($Path))
|
||||
{
|
||||
chmod($Path, 0775);
|
||||
}
|
||||
else
|
||||
{
|
||||
chmod($Path, 0664);
|
||||
}
|
||||
chmod($Path, 0775);
|
||||
}
|
||||
|
||||
if($Result[0]['readable'] == 'false')
|
||||
else
|
||||
{
|
||||
//fixing file permissions to non readable
|
||||
|
||||
if(is_dir($Path))
|
||||
{
|
||||
chmod($Path, 0333);
|
||||
}
|
||||
else
|
||||
{
|
||||
chmod($Path, 0222);
|
||||
}
|
||||
chmod($Path, 0664);
|
||||
}
|
||||
}
|
||||
|
||||
if($Result[0]['readable'] == 'false')
|
||||
{
|
||||
//fixing file permissions to non readable
|
||||
|
||||
if(is_dir($Path))
|
||||
{
|
||||
chmod($Path, 0333);
|
||||
}
|
||||
else
|
||||
{
|
||||
chmod($Path, 0222);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,20 +373,18 @@ class ApsInstaller extends ApsParser
|
||||
putenv('WEB_' . $EnvVariable . '_DIR=' . $Path);
|
||||
|
||||
//resolve deeper mappings
|
||||
if($ParentMapping && $ParentMapping !== null)
|
||||
|
||||
foreach($ParentMapping->mapping as $Mapping)
|
||||
{
|
||||
foreach($ParentMapping->mapping as $Mapping)
|
||||
//recursive check of other mappings
|
||||
|
||||
if($Url == '/')
|
||||
{
|
||||
//recursive check of other mappings
|
||||
|
||||
if($Url == '/')
|
||||
{
|
||||
self::PrepareMappings($Mapping, $Url . $Mapping['url'], $Path . $Mapping['url']);
|
||||
}
|
||||
else
|
||||
{
|
||||
self::PrepareMappings($Mapping, $Url . '/' . $Mapping['url'], $Path . '/' . $Mapping['url']);
|
||||
}
|
||||
self::PrepareMappings($Mapping, $Url . $Mapping['url'], $Path . $Mapping['url']);
|
||||
}
|
||||
else
|
||||
{
|
||||
self::PrepareMappings($Mapping, $Url . '/' . $Mapping['url'], $Path . '/' . $Mapping['url']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -490,22 +433,9 @@ class ApsInstaller extends ApsParser
|
||||
|
||||
private function PrepareDatabase($Xml, $Row, $Task)
|
||||
{
|
||||
global $db_root;
|
||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$Xml->registerXPathNamespace('db', 'http://apstandard.com/ns/1/db');
|
||||
|
||||
$XmlDb = new DynamicProperties;
|
||||
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||
}
|
||||
|
||||
if($XmlDb->db->id)
|
||||
{
|
||||
//database management
|
||||
@@ -526,13 +456,6 @@ class ApsInstaller extends ApsParser
|
||||
}
|
||||
|
||||
$this->db_root->query('FLUSH PRIVILEGES');
|
||||
|
||||
/*
|
||||
* add database to customers databases, #272
|
||||
*/
|
||||
$databasedescription = $Xml->name.' '.$Xml->version.' (Release ' . $Xml->release . ')';
|
||||
$result = $this->db->query('INSERT INTO `' . TABLE_PANEL_DATABASES . '` (`customerid`, `databasename`, `description`, `dbserver`, `apsdb`) VALUES ("' . (int)$Row['CustomerID'] . '", "' . $this->db->escape($NewDatabase) . '", "' . $this->db->escape($databasedescription) . '", "0", "1")');
|
||||
$result = $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1 WHERE `customerid`="' . (int)$Row['CustomerID'] . '"');
|
||||
}
|
||||
|
||||
//get first mysql access host
|
||||
@@ -653,3 +576,5 @@ class ApsInstaller extends ApsParser
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -38,7 +38,6 @@ class ApsParser
|
||||
private $settings = array();
|
||||
private $db = false;
|
||||
private $RootDir = '';
|
||||
private $aps_version = '1.0';
|
||||
|
||||
/**
|
||||
* Constructor of class, setup basic variables needed by the class
|
||||
@@ -400,9 +399,9 @@ class ApsParser
|
||||
* unlink files recursively
|
||||
*
|
||||
* @param dir directory to delete recursive
|
||||
* @param boolean whether the base-directory should be kept or not
|
||||
*/
|
||||
protected function UnlinkRecursive($Dir, $save_base = false)
|
||||
|
||||
protected function UnlinkRecursive($Dir)
|
||||
{
|
||||
if(!$DirHandle = @opendir($Dir))return;
|
||||
|
||||
@@ -411,12 +410,6 @@ class ApsParser
|
||||
if($Object == '.'
|
||||
|| $Object == '..')continue;
|
||||
|
||||
if($save_base
|
||||
&& (strtoupper($Object) == 'AWSTATS' || strtoupper($Object) == 'WEBALIZER')
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!@unlink($Dir . '/' . $Object))
|
||||
{
|
||||
self::UnlinkRecursive($Dir . '/' . $Object);
|
||||
@@ -424,10 +417,7 @@ class ApsParser
|
||||
}
|
||||
|
||||
closedir($DirHandle);
|
||||
if(!$save_base)
|
||||
{
|
||||
@rmdir($Dir);
|
||||
}
|
||||
@rmdir($Dir);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -998,26 +988,14 @@ class ApsParser
|
||||
if($Xml == false)continue;
|
||||
$Icon = './images/default.png';
|
||||
|
||||
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||
|
||||
//show data and status of package
|
||||
|
||||
if($this->aps_version != '1.0')
|
||||
if($Xml->icon['path'])
|
||||
{
|
||||
$iconpath = $Xml->presentation->icon['path'];
|
||||
$Summary = htmlspecialchars($Xml->presentation->summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
$iconpath = $Xml->icon['path'];
|
||||
$Summary = htmlspecialchars($Xml->summary);
|
||||
}
|
||||
|
||||
if($iconpath)
|
||||
{
|
||||
$Icon = './packages/' . $Row2['Path'] . '/' . basename($iconpath);
|
||||
$Icon = './packages/' . $Row2['Path'] . '/' . basename($Xml->icon['path']);
|
||||
}
|
||||
|
||||
$Summary = $Xml->summary;
|
||||
$Fieldname = $lng['aps']['version'];
|
||||
$Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')';
|
||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||
@@ -1360,43 +1338,23 @@ class ApsParser
|
||||
|
||||
private function InstallNewPackage($Filename)
|
||||
{
|
||||
global $lng, $userinfo;
|
||||
global $lng;
|
||||
|
||||
if(file_exists($Filename)
|
||||
&& $Xml = self::GetXmlFromZip($Filename))
|
||||
{
|
||||
$Error = array();
|
||||
|
||||
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||
|
||||
//check alot of stuff if package is supported
|
||||
//php modules
|
||||
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$XmlPhp = $Xml->requirements->children('http://apstandard.com/ns/1/php');
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$Xml->registerXPathNamespace('php', 'http://apstandard.com/ns/1/php');
|
||||
|
||||
$XmlPhp = new DynamicProperties;
|
||||
$XmlPhp->extension = getXPathValue($Xml, '//php:extension', false);
|
||||
$XmlPhp->function = getXPathValue($Xml, '//php:function', false);
|
||||
}
|
||||
$XmlPhp = $Xml->requirements->children('http://apstandard.com/ns/1/php');
|
||||
|
||||
if($XmlPhp->extension)
|
||||
{
|
||||
$ExtensionsLoaded = get_loaded_extensions();
|
||||
foreach($XmlPhp->extension as $Extension)
|
||||
{
|
||||
if(strtolower($Extension) == 'php')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!in_array($Extension, $ExtensionsLoaded)
|
||||
&& !self::CheckException('php', 'extension', $Extension))
|
||||
{
|
||||
@@ -1431,11 +1389,6 @@ class ApsParser
|
||||
);
|
||||
foreach($PhpValues as $Value)
|
||||
{
|
||||
if ($this->aps_version != '1.0')
|
||||
{
|
||||
$XmlPhp->{$Value} = getXPathValue($Xml, '//php:'.$Value);
|
||||
}
|
||||
|
||||
if($XmlPhp->{$Value})
|
||||
{
|
||||
if(self::TrueFalseIniGet($Value) != $XmlPhp->{$Value}
|
||||
@@ -1446,11 +1399,6 @@ class ApsParser
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->aps_version != '1.0')
|
||||
{
|
||||
$XmlPhp->{'post-max-size'} = getXPathValue($Xml, '//php:post-max-size');
|
||||
}
|
||||
|
||||
if($XmlPhp->{'post-max-size'})
|
||||
{
|
||||
if(self::PhpMemorySizeToBytes(ini_get('post_max_size')) < intval($XmlPhp->{'post-max-size'})
|
||||
@@ -1460,11 +1408,6 @@ class ApsParser
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->aps_version != '1.0')
|
||||
{
|
||||
$XmlPhp->{'memory-limit'} = getXPathValue($Xml, '//php:memory-limit');
|
||||
}
|
||||
|
||||
if($XmlPhp->{'memory-limit'})
|
||||
{
|
||||
if(self::PhpMemorySizeToBytes(ini_get('memory_limit')) < intval($XmlPhp->{'memory-limit'})
|
||||
@@ -1474,11 +1417,6 @@ class ApsParser
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->aps_version != '1.0')
|
||||
{
|
||||
$XmlPhp->{'max-execution-time'} = getXPathValue($Xml, '//php:max-execution-time');
|
||||
}
|
||||
|
||||
if($XmlPhp->{'max-execution-time'})
|
||||
{
|
||||
if(ini_get('max_execution_time') < intval($XmlPhp->{'max-execution-time'})
|
||||
@@ -1512,21 +1450,7 @@ class ApsParser
|
||||
|
||||
//database
|
||||
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$Xml->registerXPathNamespace('db', 'http://apstandard.com/ns/1/db');
|
||||
|
||||
$XmlDb = new DynamicProperties;
|
||||
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||
$XmlDb->db->{'server-type'} = getXPathValue($Xml, '//db:server-type');
|
||||
$XmlDb->db->{'server-min-version'} = getXPathValue($Xml, '//db:server-min-version');
|
||||
}
|
||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||
|
||||
if($XmlDb->db->id)
|
||||
{
|
||||
@@ -1543,21 +1467,7 @@ class ApsParser
|
||||
|
||||
//ASP.NET
|
||||
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$XmlAsp = $Xml->requirements->children('http://apstandard.com/ns/1/aspnet');
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$Xml->registerXPathNamespace('aspnet', 'http://apstandard.com/ns/1/aspnet');
|
||||
|
||||
$XmlAsp = new DynamicProperties;
|
||||
$XmlAsp->handler = getXPathValue($Xml, '//aspnet:handler');
|
||||
$XmlAsp->permissions = getXPathValue($Xml, '//aspnet:permissions');
|
||||
$XmlAsp->version = getXPathValue($Xml, '//aspnet:version');
|
||||
}
|
||||
$XmlAsp = $Xml->requirements->children('http://apstandard.com/ns/1/aspnet');
|
||||
|
||||
if($XmlAsp->handler
|
||||
|| $XmlAsp->permissions
|
||||
@@ -1568,19 +1478,7 @@ class ApsParser
|
||||
|
||||
//CGI
|
||||
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$XmlCgi = $Xml->requirements->children('http://apstandard.com/ns/1/cgi');
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$Xml->registerXPathNamespace('cgi', 'http://apstandard.com/ns/1/cgi');
|
||||
|
||||
$XmlCgi = new DynamicProperties;
|
||||
$XmlCgi->handler = getXPathValue($Xml, '//cgi:handler');
|
||||
}
|
||||
$XmlCgi = $Xml->requirements->children('http://apstandard.com/ns/1/cgi');
|
||||
|
||||
if($XmlCgi->handler)
|
||||
{
|
||||
@@ -1589,20 +1487,7 @@ class ApsParser
|
||||
|
||||
//webserver modules
|
||||
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$XmlWebserver = $Xml->requirements->children('http://apstandard.com/ns/1/apache');
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$Xml->registerXPathNamespace('apache', 'http://apstandard.com/ns/1/apache');
|
||||
|
||||
$XmlWebserver = new DynamicProperties;
|
||||
$XmlWebserver->{'required-module'} = getXPathValue($Xml, '//apache:required-module');
|
||||
$XmlWebserver->htaccess = getXPathValue($Xml, '//apache:htaccess');
|
||||
}
|
||||
$XmlWebserver = $Xml->requirements->children('http://apstandard.com/ns/1/apache');
|
||||
|
||||
if($XmlWebserver->{'required-module'})
|
||||
{
|
||||
@@ -1642,21 +1527,7 @@ class ApsParser
|
||||
|
||||
//validation against a charset not possible in current version
|
||||
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$aps_settings_array = $Xml->settings->group;
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$aps_settings_array = $Xml->{'global-settings'}->setting;
|
||||
if(!is_array($aps_settings_array)) {
|
||||
$aps_settings_array = $Xml->service->settings->group;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($aps_settings_array as $Group)
|
||||
foreach($Xml->settings->group as $Group)
|
||||
{
|
||||
foreach($Group->setting as $Setting)
|
||||
{
|
||||
@@ -1673,16 +1544,13 @@ class ApsParser
|
||||
|
||||
//check different errors/features in submappings
|
||||
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
$Return = self::CheckSubmappings($Xml->mapping, $Xml->mapping['url']);
|
||||
$Return = self::CheckSubmappings($Xml->mapping, $Xml->mapping['url']);
|
||||
|
||||
if(count($Return) != 0)
|
||||
if(count($Return) != 0)
|
||||
{
|
||||
foreach($Return as $Value)
|
||||
{
|
||||
foreach($Return as $Value)
|
||||
{
|
||||
if(!in_array($Value, $Error))$Error[] = $Value;
|
||||
}
|
||||
if(!in_array($Value, $Error))$Error[] = $Value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1748,57 +1616,28 @@ class ApsParser
|
||||
self::GetContentFromZip($Filename, 'APP-META.xml', $Destination . 'APP-META.xml');
|
||||
|
||||
//copy screenshots
|
||||
|
||||
if ($this->aps_version != '1.0')
|
||||
{
|
||||
$xml_screenshots = $Xml->presentation->screenshot;;
|
||||
}
|
||||
else
|
||||
{
|
||||
$xml_screenshots = $Xml->screenshot;
|
||||
}
|
||||
|
||||
|
||||
if($xml_screenshots)
|
||||
if($Xml->screenshot)
|
||||
{
|
||||
foreach($xml_screenshots as $Screenshot)
|
||||
foreach($Xml->screenshot as $Screenshot)
|
||||
{
|
||||
self::GetContentFromZip($Filename, $Screenshot['path'], $Destination . basename($Screenshot['path']));
|
||||
}
|
||||
}
|
||||
|
||||
//copy icon
|
||||
|
||||
if ($this->aps_version != '1.0')
|
||||
{
|
||||
$xml_iconpath = $Xml->presentation->icon['path'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$xml_iconpath = $Xml->icon['path'];
|
||||
}
|
||||
|
||||
if($xml_iconpath)
|
||||
if($Xml->icon['path'])
|
||||
{
|
||||
self::GetContentFromZip($Filename, $xml_iconpath, $Destination . basename($xml_iconpath));
|
||||
self::GetContentFromZip($Filename, $Xml->icon['path'], $Destination . basename($Xml->icon['path']));
|
||||
}
|
||||
|
||||
//copy license
|
||||
|
||||
if ($this->aps_version != '1.0')
|
||||
{
|
||||
$xml_license = $Xml->service->license;
|
||||
}
|
||||
else
|
||||
{
|
||||
$xml_license = $Xml->license;
|
||||
}
|
||||
|
||||
|
||||
if($xml_license
|
||||
&& $xml_license->text->file)
|
||||
if($Xml->license
|
||||
&& $Xml->license->text->file)
|
||||
{
|
||||
self::GetContentFromZip($Filename, $xml_license->text->file, $Destination . 'license.txt');
|
||||
self::GetContentFromZip($Filename, $Xml->license->text->file, $Destination . 'license.txt');
|
||||
}
|
||||
|
||||
//insert package to database
|
||||
@@ -1840,7 +1679,7 @@ class ApsParser
|
||||
|
||||
public function MainHandler($Action)
|
||||
{
|
||||
global $lng, $filename, $s, $page, $action, $Id, $userinfo;
|
||||
global $lng, $filename, $s, $page, $action, $Id;
|
||||
|
||||
//check for basic functions, classes and permissions
|
||||
|
||||
@@ -2191,13 +2030,6 @@ class ApsParser
|
||||
return;
|
||||
}
|
||||
|
||||
// no more contingent, #278
|
||||
if($userinfo['aps_packages'] == $userinfo['aps_packages_used']
|
||||
&& $userinfo['aps_packages'] != '-1'
|
||||
){
|
||||
self::InfoBox($lng['aps']['nocontingent']);
|
||||
}
|
||||
|
||||
//show packages
|
||||
|
||||
while($Row3 = $this->db->fetch_array($result2))
|
||||
@@ -2531,26 +2363,10 @@ class ApsParser
|
||||
|
||||
if($Xml == false)return false;
|
||||
|
||||
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||
|
||||
//check all data fields of xml file against inut of customer
|
||||
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$aps_settings_array = $Xml->settings->group;
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$aps_settings_array = $Xml->{'global-settings'}->setting;
|
||||
if(!is_array($aps_settings_array)) {
|
||||
$aps_settings_array = $Xml->service->settings->group;
|
||||
}
|
||||
}
|
||||
|
||||
$Error = array();
|
||||
foreach($aps_settings_array as $Group)
|
||||
foreach($Xml->settings->group as $Group)
|
||||
{
|
||||
foreach($Group->setting as $Setting)
|
||||
{
|
||||
@@ -2726,19 +2542,7 @@ class ApsParser
|
||||
|
||||
//database required?
|
||||
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$Xml->registerXPathNamespace('db', 'http://apstandard.com/ns/1/db');
|
||||
|
||||
$XmlDb = new DynamicProperties;
|
||||
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||
}
|
||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||
|
||||
if($XmlDb->db->id)
|
||||
{
|
||||
@@ -2860,19 +2664,10 @@ class ApsParser
|
||||
self::SetInstallationValue($PackageId, $CustomerId, 'main_location', '');
|
||||
}
|
||||
|
||||
if ($this->aps_version != '1.0')
|
||||
if($Xml->license)
|
||||
{
|
||||
$xml_license = $Xml->service->license;
|
||||
}
|
||||
else
|
||||
{
|
||||
$xml_license = $Xml->license;
|
||||
}
|
||||
|
||||
if($xml_license)
|
||||
{
|
||||
if($xml_license['must-accept']
|
||||
&& $xml_license['must-accept'] == 'true')
|
||||
if($Xml->license['must-accept']
|
||||
&& $Xml->license['must-accept'] == 'true')
|
||||
{
|
||||
if(isset($_POST['license'])
|
||||
&& $_POST['license'] == 'true')
|
||||
@@ -2917,8 +2712,6 @@ class ApsParser
|
||||
|
||||
if($Xml == false)return false;
|
||||
|
||||
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||
|
||||
//show notifcation if customer has reached his installation limit
|
||||
|
||||
if($this->userinfo['aps_packages'] != '-1'
|
||||
@@ -2931,19 +2724,10 @@ class ApsParser
|
||||
//icon for package
|
||||
|
||||
$Icon = './images/default.png';
|
||||
|
||||
if($this->aps_version != '1.0')
|
||||
{
|
||||
$iconpath = $Xml->presentation->icon['path'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$iconpath = $Xml->icon['path'];
|
||||
}
|
||||
|
||||
if($iconpath)
|
||||
if($Xml->icon['path'])
|
||||
{
|
||||
$Icon = './packages/' . $Row['Path'] . '/' . basename($iconpath);
|
||||
$Icon = './packages/' . $Row['Path'] . '/' . basename($Xml->icon['path']);
|
||||
}
|
||||
|
||||
//show error message if some input was wrong
|
||||
@@ -2977,7 +2761,7 @@ class ApsParser
|
||||
{
|
||||
if($Value)
|
||||
{
|
||||
if($Row3['id'] == $Value)
|
||||
if($Row3['ID'] == $Value)
|
||||
{
|
||||
$Temp.= '<option selected="selected" value="' . $Row3['id'] . '">' . $Row3['domain'] . '</option>';
|
||||
}
|
||||
@@ -3029,19 +2813,7 @@ class ApsParser
|
||||
|
||||
//database required?
|
||||
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$Xml->registerXPathNamespace('db', 'http://apstandard.com/ns/1/db');
|
||||
|
||||
$XmlDb = new DynamicProperties;
|
||||
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||
}
|
||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||
|
||||
if($XmlDb->db->id)
|
||||
{
|
||||
@@ -3059,22 +2831,8 @@ class ApsParser
|
||||
$Fieldvalue = $Temp;
|
||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||
}
|
||||
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$aps_settings_array = $Xml->settings->group;
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$aps_settings_array = $Xml->{'global-settings'}->setting;
|
||||
if(!is_array($aps_settings_array)) {
|
||||
$aps_settings_array = $Xml->service->settings->group;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($aps_settings_array as $Group)
|
||||
foreach($Xml->settings->group as $Group)
|
||||
{
|
||||
$GroupPrinted = false;
|
||||
foreach($Group->setting as $Setting)
|
||||
@@ -3257,25 +3015,16 @@ class ApsParser
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->aps_version != '1.0')
|
||||
{
|
||||
$xml_license = $Xml->service->license;
|
||||
}
|
||||
else
|
||||
{
|
||||
$xml_license = $Xml->license;
|
||||
}
|
||||
|
||||
if($xml_license)
|
||||
if($Xml->license)
|
||||
{
|
||||
$Temp = '';
|
||||
|
||||
if($xml_license['must-accept']
|
||||
&& $xml_license['must-accept'] == 'true')
|
||||
if($Xml->license['must-accept']
|
||||
&& $Xml->license['must-accept'] == 'true')
|
||||
{
|
||||
if($xml_license->text->name)$Temp.= $xml_license->text->name . '<br/>';
|
||||
if($Xml->license->text->name)$Temp.= $Xml->license->text->name . '<br/>';
|
||||
|
||||
if($xml_license->text->file)
|
||||
if($Xml->license->text->file)
|
||||
{
|
||||
$Temp.= '<textarea name="text" rows="10" cols="55">';
|
||||
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
|
||||
@@ -3288,7 +3037,7 @@ class ApsParser
|
||||
}
|
||||
else
|
||||
{
|
||||
$Temp.= '<a target="_blank" href="' . htmlspecialchars($xml_license->text->url) . '">' . $lng['aps']['error_license'] . '</a>';
|
||||
$Temp.= '<a target="_blank" href="' . htmlspecialchars($Xml->license->text->url) . '">' . $lng['aps']['error_license'] . '</a>';
|
||||
$Groupname = $lng['aps']['license'];
|
||||
$Fieldname = $lng['aps']['license'];
|
||||
$Fieldvalue = $Temp;
|
||||
@@ -3339,37 +3088,14 @@ class ApsParser
|
||||
if($Xml == false)return false;
|
||||
$Icon = './images/default.png';
|
||||
|
||||
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||
|
||||
//show icon and basic data
|
||||
if($this->aps_version != '1.0')
|
||||
|
||||
if($Xml->icon['path'])
|
||||
{
|
||||
$iconpath = $Xml->presentation->icon['path'];
|
||||
$Summary = htmlspecialchars($Xml->presentation->summary);
|
||||
$categories = $Xml->presentation->categories;
|
||||
$languages = $Xml->presentation->languages;
|
||||
$description = $Xml->presentation->description;
|
||||
$changelogs = $Xml->presentation->changelog;
|
||||
$license = $Xml->service->license;
|
||||
$screenshots = $Xml->presentation->screenshot;
|
||||
}
|
||||
else
|
||||
{
|
||||
$iconpath = $Xml->icon['path'];
|
||||
$Summary = htmlspecialchars($Xml->summary);
|
||||
$categories = $Xml->categories;
|
||||
$languages = $Xml->languages;
|
||||
$description = $Xml->description;
|
||||
$changelogs = $Xml->changelog;
|
||||
$license = $Xml->license;
|
||||
$screenshots = $Xml->screenshot;
|
||||
}
|
||||
|
||||
if($iconpath)
|
||||
{
|
||||
$Icon = './packages/' . $Row['Path'] . '/' . basename($iconpath);
|
||||
$Icon = './packages/' . $Row['Path'] . '/' . basename($Xml->icon['path']);
|
||||
}
|
||||
|
||||
$Summary = htmlspecialchars($Xml->summary);
|
||||
$Fieldname = $lng['aps']['version'];
|
||||
$Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')';
|
||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||
@@ -3394,12 +3120,12 @@ class ApsParser
|
||||
|
||||
//show categories
|
||||
|
||||
if($categories)
|
||||
if($Xml->categories)
|
||||
{
|
||||
$Temp = '';
|
||||
foreach($categories->category as $_categories)
|
||||
foreach($Xml->categories->category as $Categories)
|
||||
{
|
||||
$Temp.= htmlspecialchars($_categories[0]) . '<br/>';
|
||||
$Temp.= htmlspecialchars($Categories[0]) . '<br/>';
|
||||
}
|
||||
|
||||
$Fieldname = $lng['aps']['categories'];
|
||||
@@ -3409,12 +3135,12 @@ class ApsParser
|
||||
|
||||
//show available languages
|
||||
|
||||
if($languages)
|
||||
if($Xml->languages)
|
||||
{
|
||||
$Temp = '';
|
||||
foreach($languages->language as $_languages)
|
||||
foreach($Xml->languages->language as $Languages)
|
||||
{
|
||||
$Temp.= $_languages[0] . ' ';
|
||||
$Temp.= $Languages[0] . ' ';
|
||||
}
|
||||
|
||||
$Fieldname = $lng['aps']['languages'];
|
||||
@@ -3427,7 +3153,7 @@ class ApsParser
|
||||
if($All == true)
|
||||
{
|
||||
$Fieldname = $lng['aps']['long_description'];
|
||||
$Fieldvalue = htmlspecialchars($description);
|
||||
$Fieldvalue = htmlspecialchars($Xml->description);
|
||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||
|
||||
//show config script language
|
||||
@@ -3442,7 +3168,7 @@ class ApsParser
|
||||
//show changelog
|
||||
|
||||
$Temp = '<ul>';
|
||||
foreach($changelogs->version as $Versions)
|
||||
foreach($Xml->changelog->version as $Versions)
|
||||
{
|
||||
$Temp.= '<li><strong>' . $Versions['version'] . ' (Release ' . $Versions['release'] . ')</strong>';
|
||||
$Temp.= '<ul>';
|
||||
@@ -3461,13 +3187,13 @@ class ApsParser
|
||||
|
||||
//show license
|
||||
|
||||
if($license)
|
||||
if($Xml->license)
|
||||
{
|
||||
if($license->text->file)
|
||||
if($Xml->license->text->file)
|
||||
{
|
||||
$Temp = '';
|
||||
|
||||
if($license->text->name)$Temp = $license->text->name . '<br/>';
|
||||
if($Xml->license->text->name)$Temp = $Xml->license->text->name . '<br/>';
|
||||
$Temp.= '<form name="license" action="#"><textarea name="text" rows="10" cols="70">';
|
||||
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
|
||||
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'ISO-8859-1');
|
||||
@@ -3479,23 +3205,23 @@ class ApsParser
|
||||
else
|
||||
{
|
||||
$Fieldname = $lng['aps']['license'];
|
||||
$Fieldvalue = '<a target="_blank" href="' . htmlspecialchars($license->text->url) . '">' . $lng['aps']['linktolicense'] . '</a>';
|
||||
$Fieldvalue = '<a target="_blank" href="' . htmlspecialchars($Xml->license->text->url) . '">' . $lng['aps']['linktolicense'] . '</a>';
|
||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
//show screenshots
|
||||
|
||||
if($screenshots)
|
||||
if($Xml->screenshot)
|
||||
{
|
||||
$Count = 0;
|
||||
$Temp = '';
|
||||
foreach($screenshots as $Screenshot)
|
||||
foreach($Xml->screenshot as $Screenshot)
|
||||
{
|
||||
$Count+= 1;
|
||||
$Temp.= '<img src="./packages/' . $Row['Path'] . '/' . basename($Screenshot['path']) . '" alt="' . $Screenshot->description . '"/><br/><em>' . $Screenshot->description . '</em><br/>';
|
||||
|
||||
if(count($screenshots) != $Count)$Temp.= '<br/>';
|
||||
if(count($Xml->screenshot) != $Count)$Temp.= '<br/>';
|
||||
}
|
||||
|
||||
$Fieldname = $lng['aps']['screenshots'];
|
||||
@@ -3504,41 +3230,6 @@ class ApsParser
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* check if packages needs a database
|
||||
* and if the customer has contingent for that, #272
|
||||
*/
|
||||
if ($this->aps_version == '1.0')
|
||||
{
|
||||
// the good ole way
|
||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
||||
}
|
||||
else
|
||||
{
|
||||
// since 1.1
|
||||
$Xml->registerXPathNamespace('db', 'http://apstandard.com/ns/1/db');
|
||||
|
||||
$XmlDb = new DynamicProperties;
|
||||
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||
}
|
||||
|
||||
if($XmlDb->db->id)
|
||||
{
|
||||
if($userinfo['mysqls_used'] < $userinfo['mysqls']
|
||||
|| $userinfo['mysqls'] == '-1'
|
||||
){
|
||||
$can_use_db = true;
|
||||
} else {
|
||||
$can_use_db = false;
|
||||
}
|
||||
} else { $can_use_db = true; }
|
||||
|
||||
$db_info = '';
|
||||
if(!$can_use_db)
|
||||
{
|
||||
$db_info = $lng['aps']['packageneedsdb'];
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("aps/package") . "\";");
|
||||
unset($Xml);
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package APS
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
class DynamicProperties { /* empty class for some magic */ }
|
||||
@@ -169,7 +169,7 @@ class FileLogger extends AbstractLogger
|
||||
}
|
||||
}
|
||||
|
||||
public function setLogFile($filename = null)
|
||||
private function setLogFile($filename = null)
|
||||
{
|
||||
if($filename != null
|
||||
&& $filename != ''
|
||||
|
||||
@@ -344,19 +344,12 @@ class ticket
|
||||
* Add a support-categories
|
||||
*/
|
||||
|
||||
static public function addCategory($_db, $_category = null, $_admin = 1, $_order = 1)
|
||||
static public function addCategory($_db, $_category = null, $_admin = 1)
|
||||
{
|
||||
if($_category != null
|
||||
&& $_category != '')
|
||||
{
|
||||
if($_order < 1) {
|
||||
$_order = 1;
|
||||
}
|
||||
|
||||
$_db->query('INSERT INTO `' . TABLE_PANEL_TICKET_CATS . '` SET
|
||||
`name` = "' . $_db->escape($_category) . '",
|
||||
`adminid` = "' . (int)$_admin . '",
|
||||
`logicalorder` = "' . (int)$_order . '"');
|
||||
$_db->query('INSERT INTO `' . TABLE_PANEL_TICKET_CATS . '` (`name`, `adminid`) VALUES ("' . $_db->escape($_category) . '", "' . (int)$_admin . '")');
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -367,19 +360,13 @@ class ticket
|
||||
* Edit a support-categories
|
||||
*/
|
||||
|
||||
static public function editCategory($_db, $_category = null, $_id = 0, $_order = 1)
|
||||
static public function editCategory($_db, $_category = null, $_id = 0)
|
||||
{
|
||||
if($_category != null
|
||||
&& $_category != ''
|
||||
&& $_id != 0)
|
||||
{
|
||||
if($_order < 1) {
|
||||
$_order = 1;
|
||||
}
|
||||
|
||||
$_db->query('UPDATE `' . TABLE_PANEL_TICKET_CATS . '` SET
|
||||
`name` = "' . $_db->escape($_category) . '",
|
||||
`logicalorder` = "' . (int)$_order . '"
|
||||
$_db->query('UPDATE `' . TABLE_PANEL_TICKET_CATS . '` SET `name` = "' . $_db->escape($_category) . '"
|
||||
WHERE `id` = "' . (int)$_id . '"');
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -272,9 +272,10 @@ return Array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
|
||||
@@ -58,7 +58,7 @@ return Array(
|
||||
'cd /usr/ports/dns/powerdns',
|
||||
'make config',
|
||||
'make install',
|
||||
'echo "pdns_enable=\"YES\"" >> /etc/rc.conf',
|
||||
'echo "add pdns_enable=\"YES\"" >> /etc/rc.conf',
|
||||
),
|
||||
'files' => Array(
|
||||
'usr_local_etc_pdns_pdns.conf' => '/usr/local/etc/pdns/pdns.conf'
|
||||
@@ -155,7 +155,7 @@ return Array(
|
||||
'set ManageSieve support (optional)',
|
||||
'set MySQL support ',
|
||||
'make install',
|
||||
'echo "dovecot_enable=\"YES\"" >> /etc/rc.conf'
|
||||
'echo "add dovecot_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => Array(
|
||||
'usr_local_etc_dovecot.conf' => '/usr/local/etc/dovecot.conf',
|
||||
@@ -198,32 +198,10 @@ return Array(
|
||||
'commands' => Array(
|
||||
'cd /usr/ports/www/awstats/',
|
||||
'make install clean',
|
||||
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir($settings['system']['awstats_conf']),
|
||||
'sed -i.bak \'s/^LogFile/# LogFile/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^LogType/# LogType/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^LogFormat/# LogFormat/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^LogSeparator/# LogSeparator/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^SiteDomain/# SiteDomain/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||
)
|
||||
),
|
||||
'libnss' => Array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands_1' => Array(
|
||||
'cd /usr/ports/net/libnss-mysql',
|
||||
'make install clean',
|
||||
'echo "nscd_enable=\"YES\"" >> /etc/rc.conf'
|
||||
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir($settings['system']['awstats_conf'])
|
||||
),
|
||||
'files' => Array(
|
||||
'usr_local_etc_libnss-mysql.cfg' => '/usr/local/etc/libnss-mysql.cfg',
|
||||
'usr_local_etc_libnss-mysql-root.cfg' => '/usr/local/etc/libnss-mysql-root.cfg',
|
||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'chmod 600 /usr/local/etc/libnss-mysql.cfg /usr/local/etc/libnss-mysql-root.cfg'
|
||||
),
|
||||
'restart' => Array(
|
||||
'sh /etc/rc.d/nscd restart'
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -89,48 +89,9 @@ return Array(
|
||||
'smtp' => Array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix_courier' => Array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'postfix' => Array(
|
||||
'label' => 'Postfix',
|
||||
'commands_1' => Array(
|
||||
'echo "mail-mta/postfix -dovecot-sasl sasl" >> /etc/portage/package.use',
|
||||
'emerge -av postfix',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||
'chmod 0750 ' . $settings['system']['vmail_homedir'],
|
||||
'mv /etc/postfix/main.cf /etc/postfix/main.cf.gentoo',
|
||||
'touch /etc/postfix/main.cf',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/sasl2/smtpd.conf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:root /etc/sasl2/smtpd.conf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0600 /etc/sasl2/smtpd.conf',
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'rc-update add postfix default',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => Array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands_1' => Array(
|
||||
'echo "mail-mta/postfix dovecot-sasl -sasl" >> /etc/portage/package.use',
|
||||
'emerge -av postfix',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||
'chmod 0750 ' . $settings['system']['vmail_homedir'],
|
||||
@@ -140,23 +101,27 @@ return Array(
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/sasl2/smtpd.conf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:root /etc/postfix/master.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:root /etc/sasl2/smtpd.conf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0644 /etc/postfix/master.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0600 /etc/sasl2/smtpd.conf',
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf'
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'rc-update add postfix default',
|
||||
@@ -320,8 +285,10 @@ milter_default_action = accept" >> /etc/postfix/main.cf'
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'emerge awstats',
|
||||
'awstats_configure.pl',
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
'awstats_configure.pl'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
|
||||
@@ -95,26 +95,30 @@ return Array(
|
||||
'smtp' => Array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix_courier' => Array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'commands' => Array(
|
||||
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
||||
'postfix' => Array(
|
||||
'label' => 'Postfix',
|
||||
'commands_1' => Array(
|
||||
'mkdir -p /etc/postfix/sasl',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
||||
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||
'mv /etc/postfix/main.cf /etc/postfix/main.cf.ubuntu',
|
||||
'touch /etc/postfix/main.cf',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/sasl/smtpd.conf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:root /etc/postfix/master.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0644 /etc/postfix/master.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
@@ -122,6 +126,7 @@ return Array(
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
@@ -132,42 +137,6 @@ return Array(
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => Array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => Array(
|
||||
'apt-get install postfix postfix-mysql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
||||
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:root /etc/postfix/master.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0644 /etc/postfix/master.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
@@ -297,9 +266,10 @@ return Array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
|
||||
@@ -96,10 +96,11 @@ return Array(
|
||||
'smtp' => Array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix_courier' => Array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'postfix' => Array(
|
||||
'label' => 'Postfix',
|
||||
'commands' => Array(
|
||||
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
||||
'mkdir -p /etc/postfix/sasl',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
||||
@@ -111,11 +112,13 @@ return Array(
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/sasl/smtpd.conf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:root /etc/postfix/master.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0644 /etc/postfix/master.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
@@ -123,6 +126,7 @@ return Array(
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
@@ -133,42 +137,6 @@ return Array(
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => Array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => Array(
|
||||
'apt-get install postfix postfix-mysql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
||||
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:root /etc/postfix/master.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0644 /etc/postfix/master.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
@@ -305,9 +273,10 @@ return Array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
|
||||
@@ -1,335 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Configfiles
|
||||
* @version $Id: lenny.inc.php 860 2010-04-30 16:38:02Z Dessa $
|
||||
*/
|
||||
|
||||
return Array(
|
||||
'ubuntu_lucid' => Array(
|
||||
'label' => 'Ubuntu 10.04 (Lucid)',
|
||||
'services' => Array(
|
||||
'http' => Array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => Array(
|
||||
'apache2' => Array(
|
||||
'label' => 'Apache 2',
|
||||
'commands' => Array(
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'a2dismod userdir'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/apache2 restart'
|
||||
),
|
||||
),
|
||||
'lighttpd' => Array(
|
||||
'label' => 'Lighttpd Webserver',
|
||||
'commands_1' => Array(
|
||||
'apt-get install lighttpd',
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf',
|
||||
),
|
||||
'commands_2' => Array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'dns' => Array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => Array(
|
||||
'bind' => Array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => Array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
)
|
||||
),
|
||||
'powerdns' => Array(
|
||||
'label' => 'PowerDNS',
|
||||
'files' => Array(
|
||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => Array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix_courier' => Array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'commands' => Array(
|
||||
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
||||
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/sasl/smtpd.conf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0600 /etc/postfix/sasl/smtpd.conf',
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => Array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => Array(
|
||||
'apt-get install postfix postfix-mysql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
||||
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:root /etc/postfix/master.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0644 /etc/postfix/master.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => Array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => Array(
|
||||
'dpkg-reconfigure exim4-config',
|
||||
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
||||
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
||||
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
||||
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
||||
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'chmod o-rx /var/lib/exim4',
|
||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/exim4 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => Array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => Array(
|
||||
'courier' => Array(
|
||||
'label' => 'Courier',
|
||||
'commands' => Array(
|
||||
'apt-get install courier-pop courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
|
||||
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => Array(
|
||||
'label' => 'Dovecot',
|
||||
'commands' => Array(
|
||||
'apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_dovecot_auth.d_01-dovecot-postfix.auth' => '/etc/dovecot/auth.d/01-dovecot-postfix.auth',
|
||||
'etc_dovecot_conf.d_01-dovecot-postfix.conf' => '/etc/dovecot/conf.d/01-dovecot-postfix.conf',
|
||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => Array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => Array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => Array(
|
||||
'label' => 'Pure FTPd',
|
||||
'commands' => Array(
|
||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID',
|
||||
'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile',
|
||||
'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous',
|
||||
'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime',
|
||||
'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone',
|
||||
'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication',
|
||||
'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf',
|
||||
'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof',
|
||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/pure-ftpd-mysql restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => Array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => Array(
|
||||
'cron' => Array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => Array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/cron restart'
|
||||
)
|
||||
),
|
||||
'xinetd' => Array(
|
||||
'label' => 'xinet.d (froxlor updates in realtime)',
|
||||
'commands' => Array(
|
||||
'apt-get install xinetd'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/xinetd restart'
|
||||
)
|
||||
),
|
||||
'awstats' => Array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands' => Array(
|
||||
'apt-get install libnss-mysql nscd',
|
||||
'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_nss-mysql.conf' => '/etc/nss-mysql.conf',
|
||||
'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf',
|
||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/nscd restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -153,9 +153,10 @@ return Array(
|
||||
'awstats' => Array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'awstats_configure.pl',
|
||||
makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
'awstats_configure.pl'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -45,6 +45,6 @@ else
|
||||
|
||||
$cfgPath = 'lib/configfiles/';
|
||||
$configfiles = Array();
|
||||
$configfiles = array_merge(include $cfgPath . 'lenny.inc.php', include $cfgPath . 'etch.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'lucid.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse10.inc.php', include $cfgPath . 'freebsd.inc.php');
|
||||
$configfiles = array_merge(include $cfgPath . 'lenny.inc.php', include $cfgPath . 'etch.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse10.inc.php', include $cfgPath . 'freebsd.inc.php');
|
||||
|
||||
?>
|
||||
@@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package APS
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
function getXPathValue($xmlobj = null, $path = null, $single = true)
|
||||
{
|
||||
$result = null;
|
||||
|
||||
$tmpxml = new DynamicProperties;
|
||||
$tmpxml = ($xmlobj->xpath($path)) ? $xmlobj->xpath($path) : false;
|
||||
|
||||
if($result !== false)
|
||||
{
|
||||
$result = ($single == true) ? (string)$tmpxml[0] : $tmpxml;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
* @author Florian Lippert <flo@syscp.org>
|
||||
*/
|
||||
|
||||
function isConfigDir($dir, $ifexists = false)
|
||||
function isConfigDir($dir)
|
||||
{
|
||||
if(file_exists($dir))
|
||||
{
|
||||
@@ -42,16 +42,9 @@ function isConfigDir($dir, $ifexists = false)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!$ifexists)
|
||||
if(substr($dir, -1) == '/')
|
||||
{
|
||||
if(substr($dir, -1) == '/')
|
||||
{
|
||||
$returnval = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$returnval = false;
|
||||
}
|
||||
$returnval = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -29,15 +29,6 @@
|
||||
|
||||
function makeCorrectFile($filename)
|
||||
{
|
||||
if (!isset($filename)
|
||||
|| trim($filename) == ''
|
||||
) {
|
||||
$error = 'Given filename for function '.__FUNCTION__.' is empty.'."\n";
|
||||
$error.= 'This is very dangerous and should not happen.'."\n";
|
||||
$error.= 'Please inform the Froxlor team about this issue so they can fix it.';
|
||||
die($error);
|
||||
}
|
||||
|
||||
if(substr($filename, 0, 1) != '/')
|
||||
{
|
||||
$filename = '/' . $filename;
|
||||
|
||||
@@ -20,12 +20,10 @@
|
||||
/**
|
||||
* Returns a valid html tag for the choosen $fieldType for pathes
|
||||
*
|
||||
* @param string path The path to start searching in
|
||||
* @param integer uid The uid which must match the found directories
|
||||
* @param integer gid The gid which must match the found direcotries
|
||||
* @param string fieldType Either "Manual" or "Dropdown"
|
||||
* @param string value the value for the input-field
|
||||
*
|
||||
* @param string path The path to start searching in
|
||||
* @param integer uid The uid which must match the found directories
|
||||
* @param integer gid The gid which must match the found direcotries
|
||||
* @param string fieldType Either "Manual" or "Dropdown"
|
||||
* @return string The html tag for the choosen $fieldType
|
||||
*
|
||||
* @author Martin Burchert <martin.burchert@syscp.de>
|
||||
@@ -44,12 +42,6 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
|
||||
}
|
||||
elseif($fieldType == 'Dropdown')
|
||||
{
|
||||
// path is given without starting slash
|
||||
// but dirList holds the paths with starting slash
|
||||
// so we just add one here to get the correct
|
||||
// default path selected, #225
|
||||
$value = '/'.$value;
|
||||
|
||||
$dirList = findDirs($path, $uid, $gid);
|
||||
|
||||
natcasesort($dirList);
|
||||
@@ -72,9 +64,6 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
|
||||
}
|
||||
else
|
||||
{
|
||||
// remove starting slash we added
|
||||
// for the Dropdown, #225
|
||||
$value = substr($value, 1);
|
||||
$field = $lng['panel']['toomanydirs'];
|
||||
$field.= '<input type="text" name="path" value="' . htmlspecialchars($value) . '" />';
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
* @param int The uid of the user
|
||||
* @param int The gid of the user
|
||||
* @param bool Place standard-index.html into the new folder
|
||||
* @param bool Allow creating a directory out of the customers docroot
|
||||
*
|
||||
* @return bool true if everything went okay, false if something went wrong
|
||||
*
|
||||
@@ -35,7 +34,7 @@
|
||||
* @author Martin Burchert <martin.burchert@syscp.org>
|
||||
*/
|
||||
|
||||
function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid, $placeindex = false, $allow_notwithinhomedir = false)
|
||||
function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid, $placeindex = false)
|
||||
{
|
||||
$returncode = true;
|
||||
|
||||
@@ -48,33 +47,24 @@ function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid, $placeind
|
||||
if(substr($dirToCreate, 0, strlen($homeDir)) == $homeDir)
|
||||
{
|
||||
$subdir = substr($dirToCreate, strlen($homeDir));
|
||||
$within_homedir = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$subdir = $dirToCreate;
|
||||
$within_homedir = false;
|
||||
}
|
||||
|
||||
$subdir = makeCorrectDir($subdir);
|
||||
$subdirs = array();
|
||||
$subdirlen = strlen($subdir);
|
||||
$subdirs = array();
|
||||
array_push($subdirs, $dirToCreate);
|
||||
$offset = 0;
|
||||
|
||||
if($within_homedir || !$allow_notwithinhomedir)
|
||||
while($offset < $subdirlen)
|
||||
{
|
||||
$subdirlen = strlen($subdir);
|
||||
$offset = 0;
|
||||
|
||||
while($offset < $subdirlen)
|
||||
{
|
||||
$offset = strpos($subdir, '/', $offset);
|
||||
$subdirelem = substr($subdir, 0, $offset);
|
||||
$offset++;
|
||||
array_push($subdirs, makeCorrectDir($homeDir . $subdirelem));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
array_push($subdirs, $dirToCreate);
|
||||
$offset = strpos($subdir, '/', $offset);
|
||||
$subdirelem = substr($subdir, 0, $offset);
|
||||
$offset++;
|
||||
array_push($subdirs, makeCorrectDir($homeDir . $subdirelem));
|
||||
}
|
||||
|
||||
$subdirs = array_unique($subdirs);
|
||||
|
||||
@@ -229,59 +229,6 @@ function getOutstandingTasks()
|
||||
}
|
||||
}
|
||||
|
||||
$query2 = "SELECT DISTINCT `Task` FROM `".TABLE_APS_TASKS."` ORDER BY `Task` ASC";
|
||||
$result2 = $db->query($query2);
|
||||
|
||||
while($row2 = $db->fetch_array($result2))
|
||||
{
|
||||
/*
|
||||
* install
|
||||
*/
|
||||
if($row2['Task'] == '1')
|
||||
{
|
||||
$task_desc = $lng['tasks']['aps_task_install'];
|
||||
}
|
||||
/*
|
||||
* remove
|
||||
*/
|
||||
elseif($row2['Task'] == '2')
|
||||
{
|
||||
$task_desc = $lng['tasks']['aps_task_remove'];
|
||||
}
|
||||
/*
|
||||
* reconfigure
|
||||
*/
|
||||
elseif($row2['Task'] == '3')
|
||||
{
|
||||
$task_desc = $lng['tasks']['aps_task_reconfigure'];
|
||||
}
|
||||
/*
|
||||
* upgrade
|
||||
*/
|
||||
elseif($row2['Task'] == '4')
|
||||
{
|
||||
$task_desc = $lng['tasks']['aps_task_upgrade'];
|
||||
}
|
||||
/*
|
||||
* system update
|
||||
*/
|
||||
elseif($row2['Task'] == '5')
|
||||
{
|
||||
$task_desc = $lng['tasks']['aps_task_sysupdate'];
|
||||
}
|
||||
/*
|
||||
* system download
|
||||
*/
|
||||
elseif($row2['Task'] == '6')
|
||||
{
|
||||
$task_desc = $lng['tasks']['aps_task_sysdownload'];
|
||||
}
|
||||
|
||||
if($task_desc != '') {
|
||||
$tasks .= '<li>'.$task_desc.'</li>';
|
||||
}
|
||||
}
|
||||
|
||||
if(trim($tasks) == '') {
|
||||
$outstanding_tasks .= '<li>'.$lng['tasks']['noneoutstanding'].'</li>';
|
||||
} else {
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Functions
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* returns an array for the settings-array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function getPhpConfigs()
|
||||
{
|
||||
global $db;
|
||||
|
||||
$query = 'SELECT * FROM `' . TABLE_PANEL_PHPCONFIGS . '` ';
|
||||
$result = $db->query($query);
|
||||
$configs_array = array();
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if(!isset($configs_array[$row['id']])
|
||||
&& !in_array($row['id'], $configs_array))
|
||||
{
|
||||
$configs_array[$row['id']] = html_entity_decode($row['description']);
|
||||
}
|
||||
}
|
||||
|
||||
return $configs_array;
|
||||
}
|
||||
@@ -62,17 +62,6 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '')
|
||||
$db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`, `data`) VALUES ("6", "' . $db->escape($data) . '")');
|
||||
$doupdate = true;
|
||||
}
|
||||
elseif($type == '7'
|
||||
&& $param1 != ''
|
||||
&& $param2 != '')
|
||||
{
|
||||
$data = Array();
|
||||
$data['loginname'] = $param1;
|
||||
$data['email'] = $param2;
|
||||
$data = serialize($data);
|
||||
$db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`, `data`) VALUES ("7", "' . $db->escape($data) . '")');
|
||||
$doupdate = true;
|
||||
}
|
||||
|
||||
if($doupdate === true
|
||||
&& (int)$settings['system']['realtime_port'] !== 0
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function openRootDB($debugHandler = false, $lockfile = false)
|
||||
function openRootDB($debugHandler, $lockfile)
|
||||
{
|
||||
global $db_root;
|
||||
|
||||
@@ -47,22 +47,14 @@ function openRootDB($debugHandler = false, $lockfile = false)
|
||||
/**
|
||||
* Do not proceed further if no database connection could be established
|
||||
*/
|
||||
if(isset($debugHandler) && $debugHandler !== false)
|
||||
{
|
||||
fclose($debugHandler);
|
||||
}
|
||||
if(isset($lockfile) && $lockfile !== false)
|
||||
{
|
||||
unlink($lockfile);
|
||||
}
|
||||
|
||||
fclose($debugHandler);
|
||||
unlink($lockfile);
|
||||
die('root can\'t connect to mysqlserver. Please check userdata.inc.php! Exiting...');
|
||||
}
|
||||
|
||||
unset($db_root->password);
|
||||
if(isset($debugHandler) && $debugHandler !== false)
|
||||
{
|
||||
fwrite($debugHandler, 'Database-rootconnection established' . "\n");
|
||||
}
|
||||
fwrite($debugHandler, 'Database-rootconnection established' . "\n");
|
||||
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ function hasUpdates($to_check = null)
|
||||
*/
|
||||
function showUpdateStep($task = null, $needs_status = true)
|
||||
{
|
||||
global $updatelog, $filelog;
|
||||
global $updatelog;
|
||||
|
||||
// output
|
||||
echo $task;
|
||||
@@ -126,7 +126,6 @@ function showUpdateStep($task = null, $needs_status = true)
|
||||
}
|
||||
|
||||
$updatelog->logAction(ADM_ACTION, LOG_WARNING, $task);
|
||||
$filelog->logAction(ADM_ACTION, LOG_WARNING, $task);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -141,7 +140,7 @@ function showUpdateStep($task = null, $needs_status = true)
|
||||
*/
|
||||
function lastStepStatus($status = -1, $message = '')
|
||||
{
|
||||
global $updatelog, $filelog;
|
||||
global $updatelog;
|
||||
|
||||
switch($status)
|
||||
{
|
||||
@@ -165,35 +164,8 @@ function lastStepStatus($status = -1, $message = '')
|
||||
// output
|
||||
echo "<span style=\"margin-left: 5em; font-weight: bold; color: #".$status_color."\">".$status_sign."</span><br />";
|
||||
|
||||
if($status == -1 || $status == 2)
|
||||
if($status == -1)
|
||||
{
|
||||
$updatelog->logAction(ADM_ACTION, LOG_WARNING, 'Attention - last update task failed!!!');
|
||||
$filelog->logAction(ADM_ACTION, LOG_WARNING, 'Attention - last update task failed!!!');
|
||||
}
|
||||
elseif($status == 0 || $status == 1)
|
||||
{
|
||||
$filelog->logAction(ADM_ACTION, LOG_WARNING, 'Success');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* validate if full path to update.log is sane
|
||||
* if not, the update.log is created in /tmp/
|
||||
*
|
||||
* @param string $filename the file name to validate
|
||||
*
|
||||
* @return string the full path with filename (can differ if not writeable => /tmp)
|
||||
*/
|
||||
function validateUpdateLogFile($filename)
|
||||
{
|
||||
if(!is_dir($filename))
|
||||
{
|
||||
$fh = @fopen($filename, 'a');
|
||||
if($fh)
|
||||
{
|
||||
fclose($fh);
|
||||
return $filename;
|
||||
}
|
||||
}
|
||||
return '/tmp/froxlor_update.log';
|
||||
}
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Functions
|
||||
* @version $$
|
||||
*/
|
||||
|
||||
/**
|
||||
* return an array of all enabled redirect-codes
|
||||
*
|
||||
* @return array array of enabled redirect-codes
|
||||
*/
|
||||
function getRedirectCodesArray()
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT * FROM `".TABLE_PANEL_REDIRECTCODES."` WHERE `enabled` = '1' ORDER BY `id` ASC";
|
||||
$result = $db->query($sql);
|
||||
|
||||
$codes = array();
|
||||
while($rc = $db->fetch_array($result))
|
||||
{
|
||||
$codes[] = $rc;
|
||||
}
|
||||
|
||||
return $codes;
|
||||
}
|
||||
|
||||
/**
|
||||
* return an array of all enabled redirect-codes
|
||||
* for the settings form
|
||||
*
|
||||
* @return array array of enabled redirect-codes
|
||||
*/
|
||||
function getRedirectCodes()
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT * FROM `".TABLE_PANEL_REDIRECTCODES."` WHERE `enabled` = '1' ORDER BY `id` ASC";
|
||||
$result = $db->query($sql);
|
||||
|
||||
$codes = array();
|
||||
while($rc = $db->fetch_array($result))
|
||||
{
|
||||
$codes[$rc['id']] = $rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')';
|
||||
}
|
||||
|
||||
return $codes;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the redirect-code for a given
|
||||
* domain-id
|
||||
*
|
||||
* @param integer $domainid id of the domain
|
||||
*
|
||||
* @return string redirect-code
|
||||
*/
|
||||
function getDomainRedirectCode($domainid = 0)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$code = '';
|
||||
if($domainid > 0)
|
||||
{
|
||||
$sql = "SELECT `r`.`code` as `redirect`
|
||||
FROM `".TABLE_PANEL_REDIRECTCODES."` `r`, `".TABLE_PANEL_DOMAINREDIRECTS."` `rc`
|
||||
WHERE `r`.`id` = `rc`.`rid` and `rc`.`did` = '".(int)$domainid."'";
|
||||
|
||||
$result = $db->query_first($sql);
|
||||
|
||||
if(is_array($result)
|
||||
&& isset($result['redirect'])
|
||||
) {
|
||||
$code = ($result['redirect'] == '---') ? '' : $result['redirect'];
|
||||
}
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the redirect-id for a given
|
||||
* domain-id
|
||||
*
|
||||
* @param integer $domainid id of the domain
|
||||
*
|
||||
* @return integer redirect-code-id
|
||||
*/
|
||||
function getDomainRedirectId($domainid = 0)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$code = 1;
|
||||
if($domainid > 0)
|
||||
{
|
||||
$sql = "SELECT `r`.`id` as `redirect`
|
||||
FROM `".TABLE_PANEL_REDIRECTCODES."` `r`, `".TABLE_PANEL_DOMAINREDIRECTS."` `rc`
|
||||
WHERE `r`.`id` = `rc`.`rid` and `rc`.`did` = '".(int)$domainid."'";
|
||||
|
||||
$result = $db->query_first($sql);
|
||||
|
||||
if(is_array($result)
|
||||
&& isset($result['redirect'])
|
||||
) {
|
||||
$code = (int)$result['redirect'];
|
||||
}
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* adds a redirectcode for a domain
|
||||
*
|
||||
* @param integer $domainid id of the domain to add the code for
|
||||
* @param integer $redirect selected redirect-id
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function addRedirectToDomain($domainid = 0, $redirect = 1)
|
||||
{
|
||||
global $db;
|
||||
if($domainid > 0)
|
||||
{
|
||||
$db->query("INSERT INTO `".TABLE_PANEL_DOMAINREDIRECTS."`
|
||||
SET `rid` = '".(int)$redirect."', `did` = '".(int)$domainid."'");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* updates the redirectcode of a domain
|
||||
* if redirect-code is false, nothing happens
|
||||
*
|
||||
* @param integer $domainid id of the domain to update
|
||||
* @param integer $redirect selected redirect-id or false
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function updateRedirectOfDomain($domainid = 0, $redirect = false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
if($redirect == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if($domainid > 0)
|
||||
{
|
||||
$db->query("UPDATE `".TABLE_PANEL_DOMAINREDIRECTS."`
|
||||
SET `rid` = '".(int)$redirect."'
|
||||
WHERE `did` = '".(int)$domainid."'");
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Functions
|
||||
* @package Language
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Functions
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* checks give path for security issues
|
||||
* and returns a string that can be appended
|
||||
* to a line for a open_basedir directive
|
||||
*
|
||||
* @param string $path the path to check and append
|
||||
* @param boolean $first if true, no ':' will be prefixed to the path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function appendOpenBasedirPath($path = '', $first = false)
|
||||
{
|
||||
$path = makeCorrectDir($path);
|
||||
if($path != ''
|
||||
&& $path != '/'
|
||||
&& !preg_match("#^/dev#i", $path)
|
||||
&& !preg_match("#^/proc#i", $path)
|
||||
&& !preg_match("#^/etc#i", $path)
|
||||
&& !preg_match("#^/sys#i", $path)
|
||||
&& !preg_match("#:#", $path)
|
||||
) {
|
||||
if($first)
|
||||
return $path;
|
||||
|
||||
return ':' . $path;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@@ -39,13 +39,22 @@ function validateDomain($domainname)
|
||||
|
||||
// there is a bug in php 5.2.13 - 5.3.2 which
|
||||
// lets filter_var fail if the domain has
|
||||
// a dash (-) in it. As the PHP_VERSION constant
|
||||
// gives also patch-brandings, e.g. '5.3.2-pl0-gentoo'
|
||||
// we just always use our regex
|
||||
$pattern = '/^http:\/\/([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6}$/i';
|
||||
if(preg_match($pattern, $domainname_tmp))
|
||||
{
|
||||
return $domainname;
|
||||
// a dash (-) in it. #
|
||||
if(version_compare("5.2.13", PHP_VERSION, "=")
|
||||
|| version_compare("5.3.2", PHP_VERSION, "="))
|
||||
{
|
||||
$pattern = '/^([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6}$/i';
|
||||
if(preg_match($pattern, $domainname_tmp))
|
||||
{
|
||||
return $domainname;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(filter_var($domainname_tmp, FILTER_VALIDATE_URL) !== false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED) === false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_QUERY_REQUIRED) === false)
|
||||
{
|
||||
return $domainname;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -28,51 +28,45 @@
|
||||
|
||||
function validateUrl($url)
|
||||
{
|
||||
global $idna_convert;
|
||||
|
||||
if(strtolower(substr($url, 0, 7)) != "http://"
|
||||
&& strtolower(substr($url, 0, 8)) != "https://")
|
||||
&& strtolower(substr($url, 0, 8)) != "https://")
|
||||
{
|
||||
$url = 'http://' . $url;
|
||||
}
|
||||
|
||||
// needs converting
|
||||
$url = $idna_convert->encode($url);
|
||||
|
||||
$pattern = "/^https?:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?$/i";
|
||||
if(preg_match($pattern, $url))
|
||||
if(filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) !== false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// not an fqdn
|
||||
if(strtolower(substr($url, 0, 7)) == "http://"
|
||||
|| strtolower(substr($url, 0, 8)) == "https://")
|
||||
else
|
||||
{
|
||||
if(strtolower(substr($url, 0, 7)) == "http://")
|
||||
if(strtolower(substr($url, 0, 7)) == "http://"
|
||||
|| strtolower(substr($url, 0, 8)) == "https://")
|
||||
{
|
||||
$ip = strtolower(substr($url, 7));
|
||||
}
|
||||
if(strtolower(substr($url, 0, 7)) == "http://")
|
||||
{
|
||||
$ip = strtolower(substr($url, 7));
|
||||
}
|
||||
|
||||
if(strtolower(substr($url, 0, 8)) == "https://")
|
||||
{
|
||||
$ip = strtolower(substr($url, 8));
|
||||
}
|
||||
if(strtolower(substr($url, 0, 8)) == "https://")
|
||||
{
|
||||
$ip = strtolower(substr($url, 8));
|
||||
}
|
||||
|
||||
$ip = substr($ip, 0, strpos($ip, '/'));
|
||||
$ip = substr($ip, 0, strpos($ip, '/'));
|
||||
|
||||
if(validate_ip($ip, true) !== false)
|
||||
{
|
||||
return true;
|
||||
if(validate_ip($ip, true) !== false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
50
lib/init.php
50
lib/init.php
@@ -158,15 +158,7 @@ $settings = loadSettings($settings_data, $db);
|
||||
if(!isset($settings['admin']['froxlor_graphic'])
|
||||
|| $settings['admin']['froxlor_graphic'] == ''
|
||||
) {
|
||||
if(isset($settings['admin']['syscp_graphic'])
|
||||
&& $settings['admin']['syscp_graphic'] != ''
|
||||
){
|
||||
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$settings['admin']['froxlor_graphic'] = 'images/header.gif';
|
||||
}
|
||||
$settings['admin']['froxlor_graphic'] = ($settings['admin']['syscp_graphic'] != '') ? $settings['admin']['syscp_graphic'] : 'images/header.gif';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -265,31 +257,23 @@ foreach($langs as $key => $value)
|
||||
$languages[$key] = $key;
|
||||
}
|
||||
|
||||
if (isset($userinfo['language']) && isset($languages[$userinfo['language']]))
|
||||
if(!isset($userinfo['def_language'])
|
||||
|| !isset($languages[$userinfo['def_language']]))
|
||||
{
|
||||
// default: use language from session, #277
|
||||
$language = $userinfo['language'];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!isset($userinfo['def_language'])
|
||||
|| !isset($languages[$userinfo['def_language']]))
|
||||
if(isset($_GET['language'])
|
||||
&& isset($languages[$_GET['language']]))
|
||||
{
|
||||
if(isset($_GET['language'])
|
||||
&& isset($languages[$_GET['language']]))
|
||||
{
|
||||
$language = $_GET['language'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$language = $settings['panel']['standardlanguage'];
|
||||
}
|
||||
$language = $_GET['language'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$language = $userinfo['def_language'];
|
||||
$language = $settings['panel']['standardlanguage'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$language = $userinfo['def_language'];
|
||||
}
|
||||
|
||||
// include every english language file we can get
|
||||
|
||||
@@ -430,14 +414,12 @@ if($page == '')
|
||||
/**
|
||||
* Initialize the mailingsystem
|
||||
*/
|
||||
|
||||
$mail = new PHPMailer();
|
||||
if(PHPMailer::ValidateAddress($settings['panel']['adminmail']) !== false)
|
||||
{
|
||||
// set return-to address and custom sender-name, see #76
|
||||
$mail->SetFrom($settings['panel']['adminmail'], $settings['panel']['adminmail_defname']);
|
||||
if ($settings['panel']['adminmail_return'] != '') {
|
||||
$mail->AddReplyTo($settings['panel']['adminmail_return'], $settings['panel']['adminmail_defname']);
|
||||
}
|
||||
// set return-to address and custom sender-name, see #76
|
||||
$mail->SetFrom($settings['panel']['adminmail'], $settings['panel']['adminmail_defname']);
|
||||
if ($settings['panel']['adminmail_return'] != '') {
|
||||
$mail->AddReplyTo($settings['panel']['adminmail_return'], $settings['panel']['adminmail_defname']);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
|
||||
define('TABLE_FTP_GROUPS', 'ftp_groups');
|
||||
define('TABLE_FTP_USERS', 'ftp_users');
|
||||
define('TABLE_FTP_QUOTALIMITS', 'ftp_quotalimits');
|
||||
define('TABLE_FTP_QUOTATALLIES', 'ftp_quotatallies');
|
||||
define('TABLE_MAIL_USERS', 'mail_users');
|
||||
define('TABLE_MAIL_VIRTUAL', 'mail_virtual');
|
||||
define('TABLE_PANEL_ADMINS', 'panel_admins');
|
||||
@@ -51,8 +49,6 @@ define('TABLE_APS_SETTINGS', 'aps_settings');
|
||||
define('TABLE_APS_TASKS', 'aps_tasks');
|
||||
define('TABLE_APS_TEMP_SETTINGS', 'aps_temp_settings');
|
||||
define('TABLE_PANEL_CRONRUNS', 'cronjobs_run');
|
||||
define('TABLE_PANEL_REDIRECTCODES', 'redirect_codes');
|
||||
define('TABLE_PANEL_DOMAINREDIRECTS', 'domain_redirect_codes');
|
||||
|
||||
// APS constants
|
||||
|
||||
@@ -72,7 +68,7 @@ define('PACKAGE_ENABLED', 2);
|
||||
|
||||
// VERSION INFO
|
||||
|
||||
$version = '0.9.10';
|
||||
$version = '0.9.5';
|
||||
$dbversion = '2';
|
||||
$branding = '';
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ $lng['error']['wwwnotallowed'] = 'www is not allowed for subdomains.';
|
||||
$lng['error']['subdomainiswrong'] = 'The subdomain %s contains invalid characters.';
|
||||
$lng['error']['domaincantbeempty'] = 'The domain-name can not be empty.';
|
||||
$lng['error']['domainexistalready'] = 'The domain %s already exists.';
|
||||
$lng['error']['domainisaliasorothercustomer'] = 'The selected alias domain is either itself an alias domain, has a different ip/port combination or belongs to another customer.';
|
||||
$lng['error']['domainisaliasorothercustomer'] = 'The selected alias domain is either itself an alias domain or belongs to another customer.';
|
||||
$lng['error']['emailexistalready'] = 'The e-mail-Address %s already exists.';
|
||||
$lng['error']['maindomainnonexist'] = 'The main-domain %s does not exist.';
|
||||
$lng['error']['destinationnonexist'] = 'Please create your forwarder in the field \'Destination\'.';
|
||||
@@ -256,7 +256,6 @@ $lng['question']['ftp_reallydelete'] = 'Do you really want to delete the FTP acc
|
||||
$lng['question']['mysql_reallydelete'] = 'Do you really want to delete the database %s? This cannot be undone!';
|
||||
$lng['question']['admin_configs_reallyrebuild'] = 'Do you really want to rebuild all config files?';
|
||||
$lng['question']['admin_customer_alsoremovefiles'] = 'Remove user files too?';
|
||||
$lng['question']['admin_customer_alsoremovemail'] = 'Completely remove email data from filesystem?';
|
||||
|
||||
/**
|
||||
* Mails
|
||||
@@ -1065,7 +1064,7 @@ $lng['aps']['nospecialchars'] = 'Special characters are not allowed in the searc
|
||||
$lng['aps']['noitemsfound'] = 'No Packages were found!';
|
||||
$lng['aps']['nopackagesinstalled'] = 'You haven\'t installed any package yet which could be shown.';
|
||||
$lng['aps']['instance_install'] = 'Package Installation pending';
|
||||
$lng['aps']['instance_task_active'] = 'Package is currently being processed';
|
||||
$lng['aps']['instance_task_active'] = 'Installation running at this moment';
|
||||
$lng['aps']['instance_success'] = 'Package is installed/was installed successfully';
|
||||
$lng['aps']['instance_error'] = 'Package isn\'t installed - there occured some errors on the Installation';
|
||||
$lng['aps']['instance_uninstall'] = 'Package Uninstallation pending';
|
||||
@@ -1351,7 +1350,7 @@ $lng['serversettings']['stdsubdomainhost']['description'] = 'What hostname shoul
|
||||
// ADDED IN FROXLOR 0.9.4-svn1
|
||||
$lng['ftp']['account_edit'] = 'Edit ftp account';
|
||||
$lng['ftp']['editpassdescription'] = 'Set new password or leave blank for no change.';
|
||||
$lng['customer']['sendinfomail'] = 'Send data via email to me';
|
||||
$lng['mysql']['sendinfomail'] = 'Send data via email to me';
|
||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] New database created';
|
||||
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nYou can access your databases using phpMyAdmin via {URI}\n";
|
||||
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hello {CUST_NAME},\n\nyou have just added a new database. Here is the entered information:\n\nDatabasename: {DB_NAME}\nPassword: {DB_PASS}\nDescription: {DB_DESC}\nDB-Hostname: {DB_SRV}\n{PMA_URI}\nYours sincerely, the Froxlor-Team";
|
||||
@@ -1363,78 +1362,4 @@ $lng['admin']['configfiles']['compactoverview'] = 'Compact-overview';
|
||||
$lng['admin']['lastlogin_succ'] = 'Last login';
|
||||
$lng['panel']['neverloggedin'] = 'No login yet';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn1
|
||||
$lng['serversettings']['defaultttl'] = 'Domain TTL for bind in seconds (default \'604800\' = 1 week)';
|
||||
$lng['ticket']['logicalorder'] = 'Logical order';
|
||||
$lng['ticket']['orderdesc'] = 'Here you can define your own logical order for the ticket-category. Use 1 - 999, lower numbers are displayed first.';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn3
|
||||
$lng['serversettings']['defaultwebsrverrhandler_enabled'] = 'Enable default errordocuments for all customers';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err401']['title'] = 'File/URL for error 401';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err401']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err403']['title'] = 'File/URL for error 403';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err403']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err404'] = 'File/URL for error 404';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['title'] = 'File/URL for error 500';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn4
|
||||
$lng['serversettings']['ticket']['default_priority'] = 'Default support-ticket priority';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn5
|
||||
$lng['serversettings']['mod_fcgid']['defaultini'] = 'Default PHP configuration for new domains';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn6
|
||||
$lng['admin']['ftpserver'] = 'FTP Server';
|
||||
$lng['admin']['ftpserversettings'] = 'FTP Server settings';
|
||||
$lng['serversettings']['ftpserver']['desc'] = 'If pureftpd is selected the .ftpquota files for user quotas are created and updated daily';
|
||||
|
||||
// CHANGED IN FROXLOR 0.9.6-svn6
|
||||
$lng['serversettings']['ftpprefix']['description'] = 'Which prefix should ftp accounts have?<br/><b>If you change this you also have to change the Quota SQL Query in your FTP Server config file in case you use it!</b> ';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.7-svn1
|
||||
$lng['customer']['ftp_add']['infomail_subject'] = '[Froxlor] New ftp-user created';
|
||||
$lng['customer']['ftp_add']['infomail_body']['main'] = "Hello {CUST_NAME},\n\nyou have just added a new ftp-user. Here is the entered information:\n\nUsername: {USR_NAME}\nPassword: {USR_PASS}\nPath: {USR_PATH}\n\nYours sincerely, the Froxlor-Team";
|
||||
$lng['domains']['redirectifpathisurl'] = 'Redirect code (default: empty)';
|
||||
$lng['domains']['redirectifpathisurlinfo'] = 'You only need to select one of these if you entered an URL as path';
|
||||
$lng['serversettings']['customredirect_enabled']['title'] = 'Allow customer redirects';
|
||||
$lng['serversettings']['customredirect_enabled']['description'] = 'Allow customers to choose the http-status code for redirects which will be used';
|
||||
$lng['serversettings']['customredirect_default']['title'] = 'Default redirect';
|
||||
$lng['serversettings']['customredirect_default']['description'] = 'Set the default redirect-code which should be used if the customer does not set it himself';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.7-svn2
|
||||
$lng['error']['pathmaynotcontaincolon'] = 'The path you have entered should not contain a colon (":"). Please enter a correct path value.';
|
||||
$lng['tasks']['aps_task_install'] = 'Installing one or more APS packages';
|
||||
$lng['tasks']['aps_task_remove'] = 'Removing one or more APS packages';
|
||||
$lng['tasks']['aps_task_reconfigure'] = 'Reconfigurating one or more APS packages';
|
||||
$lng['tasks']['aps_task_upgrade'] = 'Upgrading one or more APS packages';
|
||||
$lng['tasks']['aps_task_sysupdate'] = 'Updating all APS packages';
|
||||
$lng['tasks']['aps_task_sysdownload'] = 'Downloading new APS packages';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.7-svn3
|
||||
|
||||
// these stay only in english.lng.php - they are the same
|
||||
// for all other languages and are used if not found there
|
||||
$lng['redirect_desc']['rc_default'] = 'default';
|
||||
$lng['redirect_desc']['rc_movedperm'] = 'moved permanently';
|
||||
$lng['redirect_desc']['rc_found'] = 'found';
|
||||
$lng['redirect_desc']['rc_seeother'] = 'see other';
|
||||
$lng['redirect_desc']['rc_tempred'] = 'temporary redirect';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.8
|
||||
$lng['error']['exception'] = '%s';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.9-svn1
|
||||
$lng['serversettings']['mail_also_with_mxservers'] = 'Create mail-, imap-, pop3- and smtp-"A record" also with MX-Servers set';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.10-svn1
|
||||
$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_user'] = 'Webserver user-name';
|
||||
$lng['admin']['webserver_group'] = 'Webserver group-name';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.10
|
||||
$lng['serversettings']['froxlordirectlyviahostname'] = 'Access Froxlor directly via the hostname';
|
||||
|
||||
?>
|
||||
|
||||
@@ -227,7 +227,7 @@ $lng['error']['wwwnotallowed'] = 'Ihre Subdomain darf nicht www heissen.';
|
||||
$lng['error']['subdomainiswrong'] = 'Die Subdomain %s enthält ungültige Zeichen.';
|
||||
$lng['error']['domaincantbeempty'] = 'Der Domain-Name darf nicht leer sein.';
|
||||
$lng['error']['domainexistalready'] = 'Die Domain %s existiert bereits.';
|
||||
$lng['error']['domainisaliasorothercustomer'] = 'Die ausgewählte Aliasdomain ist entweder selber eine Aliasdomain, hat nicht die gleiche IP/Port Kombination oder gehört zu einem anderen Kunden.';
|
||||
$lng['error']['domainisaliasorothercustomer'] = 'Die ausgewählte Aliasdomain ist entweder selber eine Aliasdomain oder gehört zu einem anderen Kunden.';
|
||||
$lng['error']['emailexistalready'] = 'Die E-Mail-Adresse %s existiert bereits.';
|
||||
$lng['error']['maindomainnonexist'] = 'Die Haupt-Domain %s existiert nicht.';
|
||||
$lng['error']['destinationnonexist'] = 'Bitte geben Sie Ihre Weiterleitungsadresse im Feld \'Nach\' ein.';
|
||||
@@ -256,7 +256,6 @@ $lng['question']['ftp_reallydelete'] = 'Wollen Sie das FTP-Benutzerkonto %s wirk
|
||||
$lng['question']['mysql_reallydelete'] = 'Wollen Sie die Datenbank %s wirklich löschen?<br />ACHTUNG! Alle Daten gehen unwiderruflich verloren!';
|
||||
$lng['question']['admin_configs_reallyrebuild'] = 'Wollen Sie wirklich alle Konfigurationsdateien neu erstellen lassen?';
|
||||
$lng['question']['admin_customer_alsoremovefiles'] = 'Auch Kunden-Daten löschen?';
|
||||
$lng['question']['admin_customer_alsoremovemail'] = 'E-Mail Daten auf dem Dateisystem löschen?';
|
||||
|
||||
/**
|
||||
* Mails
|
||||
@@ -933,7 +932,7 @@ $lng['customer']['email_pop3'] = 'E-Mail POP3';
|
||||
$lng['customer']['mail_quota'] = 'E-Mail Kontingent';
|
||||
$lng['panel']['megabyte'] = 'MegaByte';
|
||||
$lng['emails']['quota_edit'] = 'E-Mail Kontingent ändern';
|
||||
$lng['panel']['not_supported'] = 'Nicht unterstüzt in: ';
|
||||
$lng['panel']['not_supported'] = 'Nicht ünterstüzt in: ';
|
||||
$lng['error']['allocatetoomuchquota'] = 'Sie versuchen %s MB ' . $lng['emails']['quota'] . ' zu zuweisen, haben aber nicht genug übrig.';
|
||||
|
||||
// Autoresponder module
|
||||
@@ -1070,7 +1069,7 @@ $lng['aps']['nospecialchars'] = 'Sonderzeichen sind im Suchausdruck nicht erlaub
|
||||
$lng['aps']['noitemsfound'] = 'Es wurden keine Pakete gefunden!';
|
||||
$lng['aps']['nopackagesinstalled'] = 'Sie haben noch kein Paket installiert welches angezeigt werden könnte.';
|
||||
$lng['aps']['instance_install'] = 'Paket wurde zur Installation vorgemerkt';
|
||||
$lng['aps']['instance_task_active'] = 'Paket wird gerade bearbeitet';
|
||||
$lng['aps']['instance_task_active'] = 'Paket wird gerade installiert';
|
||||
$lng['aps']['instance_success'] = 'Paket ist installiert bzw. wurde erfolgreich installiert';
|
||||
$lng['aps']['instance_error'] = 'Paket ist nicht installiert - bei der Installation traten Fehler auf';
|
||||
$lng['aps']['instance_uninstall'] = 'Paket wurde zur Deinstallation vorgemerkt';
|
||||
@@ -1331,7 +1330,7 @@ $lng['serversettings']['stdsubdomainhost']['description'] = 'Welcher Hostname so
|
||||
// ADDED IN FROXLOR 0.9.4-svn1
|
||||
$lng['ftp']['account_edit'] = 'FTP Konto bearbeiten';
|
||||
$lng['ftp']['editpassdescription'] = 'Neues Passwort setzen oder leer für keine Änderung.';
|
||||
$lng['customer']['sendinfomail'] = 'Daten per E-Mail an mich senden';
|
||||
$lng['mysql']['sendinfomail'] = 'Daten per E-Mail an mich senden';
|
||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] Neue Datenbank erstellt';
|
||||
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nDie Datenbank kann mit phpMyAdmin via {URI} verwaltet werden.\n";
|
||||
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hallo {CUST_NAME},\n\ndu hast gerade eine neue Datenbank angelegt. Hier die angegebenen Informationen:\n\nDatenbankname: {DB_NAME}\nPasswort: {DB_PASS}\nBeschreibung: {DB_DESC}\nDatenbank-Server: {DB_SRV}\n{PMA_URI}\nVielen Dank, das Froxlor-Team";
|
||||
@@ -1359,65 +1358,4 @@ $lng['success']['settingssaved'] = 'Die Einstellungen wurden erfolgreich gespeic
|
||||
$lng['admin']['lastlogin_succ'] = 'Letzte Anmeldung';
|
||||
$lng['panel']['neverloggedin'] = 'Keine Anmeldung bisher';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn1
|
||||
$lng['serversettings']['defaultttl'] = 'Domain TTL für Bind in Sekunden (default \'604800\' = 1 Woche)';
|
||||
$lng['ticket']['logicalorder'] = 'Logische Sortierung';
|
||||
$lng['ticket']['orderdesc'] = 'Hier kann eine logische Sortierung für die Ticket-Kategorien angegeben werden. Benutze 1 - 999, niedrigere Zahlen werden zuerst angezeigt.';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn3
|
||||
$lng['serversettings']['defaultwebsrverrhandler_enabled'] = 'Verwende Standard-Fehlerdokumente für alle Kunden';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err401']['title'] = 'Datei/URL für Fehler 401';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err401']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err403']['title'] = 'Datei/URL für Fehler 403';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err403']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err404'] = 'Datei/URL für Fehler 404';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['title'] = 'Datei/URL für Fehler 500';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn4
|
||||
$lng['serversettings']['ticket']['default_priority'] = 'Voreingestellte Support-Ticket Priorität';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn5
|
||||
$lng['serversettings']['mod_fcgid']['defaultini'] = 'Voreingestellte PHP Konfiguration für neue Domains';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn5
|
||||
$lng['admin']['ftpserver'] = 'FTP Server';
|
||||
$lng['admin']['ftpserversettings'] = 'FTP Server Einstellungen';
|
||||
$lng['serversettings']['ftpserver']['desc'] = 'Wenn pureftpd ausgewählt ist, werden die .ftpquota Dateien für das Quota erstellt und täglich aktualisiert.';
|
||||
|
||||
// CHANGED IN FROXLOR 0.9.6-svn5
|
||||
$lng['serversettings']['ftpprefix']['description'] = 'Welchen Prefix sollen die FTP-Benutzerkonten haben?<br/><b>Wenn du das änderst, musst du auch das Quota SQL Query in der FTP Server Config ändern, solltest du FTP-Quotas benutzen!</b>';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.7-svn1
|
||||
$lng['customer']['ftp_add']['infomail_subject'] = '[Froxlor] Neuer FTP-Benutzer erstellt';
|
||||
$lng['customer']['ftp_add']['infomail_body']['main'] = "Hallo {CUST_NAME},\n\ndu hast gerade einen neuen FTP-Benutzer angelegt. Hier die angegebenen Informationen:\n\nBenutzername: {USR_NAME}\nPasswort: {USR_PASS}\nPfad: {USR_PATH}\n\nVielen Dank, das Froxlor-Team";
|
||||
$lng['domains']['redirectifpathisurl'] = 'Redirect code (Standard: leer)';
|
||||
$lng['domains']['redirectifpathisurlinfo'] = 'Der Redirect code kann gewählt werden, wenn der eingegebene Pfad eine URL ist';
|
||||
$lng['serversettings']['customredirect_enabled']['title'] = 'Erlaube Kunden-Redirect';
|
||||
$lng['serversettings']['customredirect_enabled']['description'] = 'Erlaubt es Kunden den HTTP-Status Code für einen Redirect zu wählen';
|
||||
$lng['serversettings']['customredirect_default']['title'] = 'Standard Redirect';
|
||||
$lng['serversettings']['customredirect_default']['description'] = 'Dieser Redirect wird immer genutzt, sofern der Kunde keinen anderen auswählt.';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.7-svn2
|
||||
$lng['error']['pathmaynotcontaincolon'] = 'Der eingegebene Pfad sollte keinen Doppelpunkt (":") enthalten. Bitte geben Sie einen korrekten Wert für den Pfad ein.';
|
||||
$lng['tasks']['aps_task_install'] = 'Installation eines oder mehrerer APS Pakete';
|
||||
$lng['tasks']['aps_task_remove'] = 'Deinstallation eines oder mehrerer APS Pakete';
|
||||
$lng['tasks']['aps_task_reconfigure'] = 'Rekonfiguration eines oder mehrerer APS Pakete';
|
||||
$lng['tasks']['aps_task_upgrade'] = 'Upgrade eines oder mehrerer APS Pakete';
|
||||
$lng['tasks']['aps_task_sysupdate'] = 'Aktualisiere alle APS Pakete';
|
||||
$lng['tasks']['aps_task_sysdownload'] = 'Herunterladen neuer APS Pakete';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.9-svn1
|
||||
$lng['serversettings']['mail_also_with_mxservers'] = 'Erstelle mail-, imap-, pop3- and smtp-"A Record" auch wenn MX-Server angegeben sind';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.10-svn1
|
||||
$lng['aps']['nocontingent'] = 'Sie haben kein ausreichendes APS-Kontingent und können daher keine Pakete installieren.';
|
||||
$lng['aps']['packageneedsdb'] = 'Dieses Paket benötigt eine Datenbank, Sie haben allerdings keine mehr frei';
|
||||
$lng['aps']['cannoteditordeleteapsdb'] = 'APS-Datenbanken können hier nicht bearbeitet oder gelöscht werden';
|
||||
$lng['admin']['webserver_user'] = 'Benutzername Webserver';
|
||||
$lng['admin']['webserver_group'] = 'Gruppenname Webserver';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.10
|
||||
$lng['serversettings']['froxlordirectlyviahostname'] = 'Froxlor direkt über den Hostnamen erreichbar machen';
|
||||
|
||||
?>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -254,7 +254,6 @@ $lng['question']['extras_reallydelete_pathoptions'] = 'Do you really want to del
|
||||
$lng['question']['ftp_reallydelete'] = 'Czy na pewno chcesz skasować konto FTP %s?';
|
||||
$lng['question']['mysql_reallydelete'] = 'Czy na pewno chcesz skasować bazę danych %s? Ta czynność jest niedwracalna!';
|
||||
$lng['question']['admin_configs_reallyrebuild'] = 'Czy napewno chcesz przebudować pliki konfiguracyjne Apacha i Binda?';
|
||||
$lng['question']['admin_customer_alsoremovefiles'] = 'Remove user files too?';
|
||||
|
||||
/**
|
||||
* Mails
|
||||
@@ -344,12 +343,12 @@ $lng['serversettings']['ipaddress']['title'] = 'Adres IP';
|
||||
$lng['serversettings']['ipaddress']['description'] = 'Jaki jest adres IP tego serwera?';
|
||||
$lng['serversettings']['hostname']['title'] = 'Hostname';
|
||||
$lng['serversettings']['hostname']['description'] = 'Jaki jest Hostname serwera?';
|
||||
$lng['serversettings']['apachereload_command']['title'] = 'Komenda prze<7A>adowania Apache';
|
||||
$lng['serversettings']['apachereload_command']['description'] = 'Jaka jest komenda, do prze<7A>adowania plik<69>w konfiguracyjnych Apacha?';
|
||||
$lng['serversettings']['bindconf_directory']['title'] = 'Katalog z konfiguracj<63> Bunda';
|
||||
$lng['serversettings']['bindconf_directory']['description'] = 'Gdzie maja by<62> zapisywane pliki konfiguracyjne dla Binda?';
|
||||
$lng['serversettings']['bindreload_command']['title'] = 'Komenda prze<7A>adowania Binda';
|
||||
$lng['serversettings']['bindreload_command']['description'] = 'Jaka jest komenda, do prze<7A>adowania plik<69>w konfiguracyjnych Binda?';
|
||||
$lng['serversettings']['apachereload_command']['title'] = 'Apache reload command';
|
||||
$lng['serversettings']['apachereload_command']['description'] = 'What\'s the apache command to reload apache configfiles?';
|
||||
$lng['serversettings']['bindconf_directory']['title'] = 'Bind config directory';
|
||||
$lng['serversettings']['bindconf_directory']['description'] = 'Where should bind configfiles be saved?';
|
||||
$lng['serversettings']['bindreload_command']['title'] = 'Bind reload command';
|
||||
$lng['serversettings']['bindreload_command']['description'] = 'What\'s the bind command to reload bind configfiles?';
|
||||
$lng['serversettings']['binddefaultzone']['title'] = 'Bind default zone';
|
||||
$lng['serversettings']['binddefaultzone']['description'] = 'What\'s the name of the default zone?';
|
||||
$lng['serversettings']['vmail_uid']['title'] = 'Mails-UID';
|
||||
@@ -367,7 +366,7 @@ $lng['serversettings']['webmail_url']['description'] = 'Jaki jest adres URL do W
|
||||
$lng['serversettings']['webftp_url']['title'] = 'URL do WebFTPa';
|
||||
$lng['serversettings']['webftp_url']['description'] = 'Jaki jest adres URL do WebFTPa? (Musi się rozpoczynać do http(s)://)';
|
||||
$lng['serversettings']['language']['description'] = 'Jaki jest standardowy język serwera?';
|
||||
$lng['serversettings']['maxloginattempts']['title'] = 'Maksymalna ilo<6C><6F> pr<70>b logowania';
|
||||
$lng['serversettings']['maxloginattempts']['title'] = 'Max Login Attempts';
|
||||
$lng['serversettings']['maxloginattempts']['description'] = 'Maximum login attempts after which the account gets deactivated.';
|
||||
$lng['serversettings']['deactivatetime']['title'] = 'Czas zablokowania';
|
||||
$lng['serversettings']['deactivatetime']['description'] = 'Czas (sek.) zablokowania dostępu do konta po nieudanym logowaniu.';
|
||||
@@ -710,7 +709,7 @@ $lng['serversettings']['mod_fcgid']['tmpdir'] = 'Katalog plik
|
||||
$lng['serversettings']['ticket']['reset_cycle'] = 'Okresowe reset licznika użycia zgłoszeń pomocy technicznej';
|
||||
$lng['serversettings']['ticket']['reset_cycle_desc'] = 'Resetowanie zgłoszeń pomocy technicznej powoduje ustawienie licznika na wartość 0 przy każdym cyklu';
|
||||
$lng['admin']['tickets']['daily'] = 'Dziennie';
|
||||
$lng['admin']['tickets']['weekly'] = 'Tygodniowo';
|
||||
$lng['admin']['tickets']['weekly'] = 'Wygodniowo';
|
||||
$lng['admin']['tickets']['monthly'] = 'Miesięcznie';
|
||||
$lng['admin']['tickets']['yearly'] = 'Rocznie';
|
||||
$lng['error']['ticketresetcycleiswrong'] = 'The cycle for ticket-resets has to be "daily", "weekly", "monthly" or "yearly".';
|
||||
@@ -825,6 +824,8 @@ $lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'You cannot enable Weba
|
||||
$lng['serversettings']['webalizer_enabled'] = 'Enable webalizer statistics';
|
||||
$lng['serversettings']['awstats_enabled'] = 'Enable awstats statistics';
|
||||
$lng['admin']['awstatssettings'] = 'Ustawienia Awstats';
|
||||
$lng['serversettings']['awstats_domain_file']['title'] = 'Awstats domainfiles directory';
|
||||
$lng['serversettings']['awstats_model_file']['title'] = 'Awstats model file';
|
||||
|
||||
// ADDED IN 1.2.19-svn16
|
||||
|
||||
@@ -1260,6 +1261,22 @@ $lng['update']['proceed'] = 'Proceed';
|
||||
$lng['update']['update_information']['part_a'] = 'The Froxlor files have been updated to version <strong>%newversion</strong>. The installed version is <strong>%curversion</strong>.';
|
||||
$lng['update']['update_information']['part_b'] = '<br /><br />Customers will not be able to log in until the update has been finished.<br /><strong>Proceed?</strong>';
|
||||
$lng['update']['noupdatesavail'] = '<strong>You already have the latest Froxlor version.</strong>';
|
||||
$lng['admin']['cron']['cronsettings'] = 'ustawienia Cronjob';
|
||||
$lng['cron']['cronname'] = 'cronjob-name';
|
||||
$lng['cron']['lastrun'] = 'last run';
|
||||
$lng['cron']['interval'] = 'interval';
|
||||
$lng['cron']['isactive'] = 'enabled';
|
||||
$lng['admin']['cron']['add'] = 'Add a new cronjob';
|
||||
$lng['cron']['description'] = 'description';
|
||||
$lng['crondesc']['cron_unknown_desc'] = 'no description given';
|
||||
$lng['crondesc']['cron_tasks'] = 'przebudowanie plik<69>w konfiguracyjnych';
|
||||
$lng['crondesc']['cron_legacy'] = 'legacy (old) cronjob';
|
||||
$lng['crondesc']['cron_apsinstaller'] = 'Instalator aplikacji';
|
||||
$lng['crondesc']['cron_autoresponder'] = 'e-mail autoresponder';
|
||||
$lng['crondesc']['cron_apsupdater'] = 'Aktualizacja pakiet<65>w instalatora aplikacji';
|
||||
$lng['crondesc']['cron_traffic'] = 'obliczanie ruchu';
|
||||
$lng['crondesc']['cron_ticketsreset'] = 'resetowanie licznika zgłoszeń';
|
||||
$lng['crondesc']['cron_ticketarchive'] = 'archiwizowanie starych zgłoszeń';
|
||||
$lng['admin']['specialsettingsforsubdomains'] = 'Apply specialsettings to all subdomains (*.example.com)';
|
||||
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'If yes these custom vhost-settings will be added to all subdomains; if no subdomain-specialsettings are being removed.';
|
||||
$lng['tasks']['outstanding_tasks'] = 'Outstanding cron-tasks';
|
||||
@@ -1274,13 +1291,13 @@ $lng['admin']['ticket_nocustomeraddingavailable'] = 'It\'s not possible to open
|
||||
|
||||
// ADDED IN FROXLOR 0.9.1
|
||||
|
||||
$lng['admin']['accountdata'] = 'Dane konta';
|
||||
$lng['admin']['contactdata'] = 'Dane kontaktowe';
|
||||
$lng['admin']['servicedata'] = 'Dane usługi';
|
||||
$lng['admin']['accountdata'] = 'Account Data';
|
||||
$lng['admin']['contactdata'] = 'Contact Data';
|
||||
$lng['admin']['servicedata'] = 'Service Data';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.2
|
||||
|
||||
$lng['admin']['newerversionavailable'] = 'Jest dostępna nowa wersja Froxlora';
|
||||
$lng['admin']['newerversionavailable'] = 'Jest dost<EFBFBD>pna nowa wersja Froxlora';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.3
|
||||
|
||||
@@ -1289,7 +1306,7 @@ $lng['error']['hiddenfieldvaluechanged'] = 'The value for the hidden field "
|
||||
|
||||
// ADDED IN FROXLOR 0.9.3-svn1
|
||||
|
||||
$lng['serversettings']['panel_password_min_length']['title'] = 'Minimalna długość hasła';
|
||||
$lng['serversettings']['panel_password_min_length']['title'] = 'Minimalna d<EFBFBD>ugo<EFBFBD><EFBFBD> has<61>a';
|
||||
$lng['serversettings']['panel_password_min_length']['description'] = 'Here you can set a minimum length for passwords. \'0\' means: no minimum length required.';
|
||||
$lng['error']['notrequiredpasswordlength'] = 'The given password is too short. Please enter at least %s characters.';
|
||||
$lng['serversettings']['system_store_index_file_subs']['title'] = 'Store default index file also to new subfolders';
|
||||
@@ -1314,12 +1331,12 @@ $lng['dkim']['dkim_add_adsp']['description'] = 'If you don\'t know what this is,
|
||||
$lng['dkim']['dkim_add_adsppolicy']['title'] = 'ADSP policy';
|
||||
$lng['dkim']['dkim_add_adsppolicy']['description'] = 'For more information about this setting see <a href="http://wiki.froxlor.org/contrib/dkim-adsp-policies">http://wiki.froxlor.org/contrib/dkim-adsp-policies</a>';
|
||||
|
||||
$lng['admin']['cron']['cronsettings'] = 'ustawienia zadań cyklicznych';
|
||||
$lng['admin']['cron']['cronsettings'] = 'ustawienia zada<EFBFBD> cyklicznych';
|
||||
$lng['cron']['cronname'] = 'cronjob-name';
|
||||
$lng['cron']['lastrun'] = 'ostatnio uruchomiony';
|
||||
$lng['cron']['interval'] = 'interwał';
|
||||
$lng['cron']['isactive'] = 'włączony';
|
||||
$lng['cron']['description'] = 'opis';
|
||||
$lng['cron']['lastrun'] = 'last run';
|
||||
$lng['cron']['interval'] = 'interval';
|
||||
$lng['cron']['isactive'] = 'enabled';
|
||||
$lng['cron']['description'] = 'description';
|
||||
$lng['crondesc']['cron_unknown_desc'] = 'no description given';
|
||||
$lng['admin']['cron']['add'] = 'Add cronjob';
|
||||
$lng['crondesc']['cron_tasks'] = 'przebudowanie plik<69>w konfiguracyjnych';
|
||||
@@ -1330,64 +1347,33 @@ $lng['crondesc']['cron_apsupdater'] = 'Aktualizacja pakiet
|
||||
$lng['crondesc']['cron_traffic'] = 'obliczanie ruchu';
|
||||
$lng['crondesc']['cron_ticketsreset'] = 'resetowanie licznik<69>w zgłoszeń';
|
||||
$lng['crondesc']['cron_ticketarchive'] = 'archiwizowanie starych zgłoszeń';
|
||||
$lng['cronmgmt']['seconds'] = 'sekund';
|
||||
$lng['cronmgmt']['minutes'] = 'minut';
|
||||
$lng['cronmgmt']['hours'] = 'godzin';
|
||||
$lng['cronmgmt']['days'] = 'dni';
|
||||
$lng['cronmgmt']['weeks'] = 'tygodni';
|
||||
$lng['cronmgmt']['months'] = 'miesięcy';
|
||||
$lng['cronmgmt']['seconds'] = 'seconds';
|
||||
$lng['cronmgmt']['minutes'] = 'minutes';
|
||||
$lng['cronmgmt']['hours'] = 'hours';
|
||||
$lng['cronmgmt']['days'] = 'days';
|
||||
$lng['cronmgmt']['weeks'] = 'weeks';
|
||||
$lng['cronmgmt']['months'] = 'months';
|
||||
$lng['admin']['cronjob_edit'] = 'Edytuj zadania cykliczne';
|
||||
$lng['cronjob']['cronjobsettings'] = 'Ustawienia zadania cykliczne';
|
||||
$lng['cronjob']['cronjobinterval'] = 'Interwał uruchomienia';
|
||||
$lng['panel']['options'] = 'opcje';
|
||||
$lng['admin']['warning'] = 'WAŻNE - Przeczytaj to!';
|
||||
$lng['cronjob']['cronjobsettings'] = 'Cronjob settings';
|
||||
$lng['cronjob']['cronjobinterval'] = 'Runtime interval';
|
||||
$lng['panel']['options'] = 'options';
|
||||
$lng['admin']['warning'] = 'WARNING - Please note!';
|
||||
$lng['cron']['changewarning'] = 'Changing these values can have a negative cause to the behavior of Froxlor and its automated tasks.<br /><br />Please, only change values here if you are *damn sure* you know what you are doing.';
|
||||
|
||||
$lng['serversettings']['stdsubdomainhost']['title'] = 'Customer standard subdomain';
|
||||
$lng['serversettings']['stdsubdomainhost']['description'] = 'What hostname should be used to create standard subdomains for customer. If empty, the system-hostname is used.';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.4-svn1
|
||||
$lng['ftp']['account_edit'] = 'Edytuj konto ftp';
|
||||
$lng['ftp']['editpassdescription'] = 'Ustal nowe hasło lub zostaw puste by nie zmieniać.';
|
||||
$lng['customer']['sendinfomail'] = 'Send data via email to me';
|
||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] Nowa baza danych utworzona';
|
||||
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nMasz dostęp do Twojej bazy danych uzywając phpMyAdmina pod adresem {URI}\n";
|
||||
$lng['customer']['mysql_add']['infomail_body']['main'] = "Witaj {CUST_NAME},\n\nwłaśnie dodałeś nową bazę danych. Przesyłamy dane uruchomieniowe:\n\nBaza danych: {DB_NAME}\nHasło: {DB_PASS}\nOpis: {DB_DESC}\n{PMA_URI}\nZ poważaniem, Froxlor";
|
||||
$lng['error']['domains_cantdeletedomainwithapsinstances'] = 'Nie możesz usunąć domeny, ponieważ jest na niej zainstalowana aplikacja z instalatora aplikacji. W pierwszej kolejności odinstaluj tą aplikację.';
|
||||
$lng['serversettings']['awstats_path'] = '<27>cieżka do AWStats \'awstats_buildstaticpages.pl\'';
|
||||
$lng['ftp']['account_edit'] = 'Edit ftp account';
|
||||
$lng['ftp']['editpassdescription'] = 'Set new password or leave blank for no change.';
|
||||
$lng['mysql']['sendinfomail'] = 'Send data via email to me';
|
||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] New database created';
|
||||
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nYou can access your databases using phpMyAdmin via {URI}\n";
|
||||
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hello {CUST_NAME},\n\nyou have just added a new database. Here is the entered information:\n\nDatabasename: {DB_NAME}\nPassword: {DB_PASS}\nDescription: {DB_DESC}\nDB-Hostname: {DB_SRV}\n{PMA_URI}\nYours sincerely, the Froxlor-Team";
|
||||
$lng['error']['domains_cantdeletedomainwithapsinstances'] = 'You cannot delete a domain which is used by an installed APS package. You have to uninstall it first.';
|
||||
$lng['serversettings']['awstats_path'] = '<27>cie<EFBFBD>ka do AWStats \'awstats_buildstaticpages.pl\'';
|
||||
$lng['serversettings']['awstats_conf'] = 'AWStats configuration path';
|
||||
$lng['error']['overviewsettingoptionisnotavalidfield'] = 'Woops, a field that should be displayed as an option in the settings-overview is not an excepted type. You can blame the developers for this. This should not happen!';
|
||||
$lng['admin']['configfiles']['compactoverview'] = 'Compact-overview';
|
||||
$lng['admin']['lastlogin_succ'] = 'Ostatnie logowanie';
|
||||
$lng['panel']['neverloggedin'] = 'Brak logowania do tej pory';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn1
|
||||
$lng['serversettings']['defaultttl'] = 'TTL domeny dla binda w sekundach (domyślnie \'604800\' = 1 tydzień)';
|
||||
$lng['ticket']['logicalorder'] = 'Logical order';
|
||||
$lng['ticket']['orderdesc'] = 'Here you can define your own logical order for the ticket-category. Use 1 - 999, lower numbers are displayed first.';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn3
|
||||
$lng['serversettings']['defaultwebsrverrhandler_enabled'] = 'Włączone standardowe strony błęd<31>w dla wszystkich klient<6E>w';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err401']['title'] = 'Plik/URL dla błędu 401';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err401']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err403']['title'] = 'Plik/URL dla błędu 403';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err403']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err404'] = 'Plik/URL dla błędu 404';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['title'] = 'Plik/URL dla błędu 500';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn4
|
||||
$lng['serversettings']['ticket']['default_priority'] = 'Standardowy priorytet dla zg<7A>osze<7A> pomocy technicznej';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn5
|
||||
$lng['serversettings']['mod_fcgid']['defaultini'] = 'Default PHP configuration for new domains';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn6
|
||||
$lng['admin']['ftpserver'] = 'Serwer FTP';
|
||||
$lng['admin']['ftpserversettings'] = 'Ustawienia Serwera FTP';
|
||||
$lng['serversettings']['ftpserver']['desc'] = 'Je<4A>li pureftpd jest zaznaczone, plik .ftpquota z quotami u<>ytkownika b<>dzie tworzony i aktualizowany codziennie';
|
||||
|
||||
// CHANGED IN FROXLOR 0.9.6-svn6
|
||||
$lng['serversettings']['ftpprefix']['description'] = 'Which prefix should ftp accounts have?<br/><b>If you change this you also have to change the Quota SQL Query in your FTP Server config file in case you use it!</b> ';
|
||||
|
||||
?>
|
||||
@@ -80,7 +80,7 @@ if($db->num_rows($result) > 0)
|
||||
|
||||
$path = $row['homedir'] . $row['maildir'] . "new/";
|
||||
|
||||
if(!is_dir($path))
|
||||
if(!is_dir($path) || !is_readable($path))
|
||||
{
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error accessing maildir: " . $path);
|
||||
continue;
|
||||
|
||||
@@ -183,7 +183,7 @@ class bind
|
||||
$date = date('Ymd');
|
||||
$bindserial = (preg_match('/^' . $date . '/', $domain['bindserial']) ? $domain['bindserial'] + 1 : $date . '00');
|
||||
$this->db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `bindserial`=\'' . $bindserial . '\' WHERE `id`=\'' . $domain['id'] . '\'');
|
||||
$zonefile = '$TTL ' . (int)$this->settings['system']['defaultttl'] . "\n";
|
||||
$zonefile = '$TTL 1W' . "\n";
|
||||
|
||||
if(count($this->nameservers) == 0)
|
||||
{
|
||||
@@ -225,17 +225,6 @@ class bind
|
||||
{
|
||||
$zonefile.= '@ IN MX ' . trim($mxserver) . "\n";
|
||||
}
|
||||
|
||||
if($this->settings['system']['dns_createmailentry'] == '1')
|
||||
{
|
||||
$zonefile.= 'mail IN ' . $ip_a_record . "\n";
|
||||
if($domain['iswildcarddomain'] != '1')
|
||||
{
|
||||
$zonefile.= 'imap IN ' . $ip_a_record . "\n";
|
||||
$zonefile.= 'smtp IN ' . $ip_a_record . "\n";
|
||||
$zonefile.= 'pop3 IN ' . $ip_a_record . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -67,86 +67,18 @@ class apache
|
||||
*/
|
||||
private function _createStandardDirectoryEntry()
|
||||
{
|
||||
$vhosts_folder = '';
|
||||
if(is_dir($this->settings['system']['apacheconf_vhost']))
|
||||
$vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/05_froxlor_dirfix_nofcgid.conf');
|
||||
|
||||
if(!isset($this->virtualhosts_data[$vhosts_filename]))
|
||||
{
|
||||
$vhosts_folder = makeCorrectDir($this->settings['system']['apacheconf_vhost']);
|
||||
} else {
|
||||
$vhosts_folder = makeCorrectDir(dirname($this->settings['system']['apacheconf_vhost']));
|
||||
$this->virtualhosts_data[$vhosts_filename] = '';
|
||||
}
|
||||
$vhosts_filename = makeCorrectFile($vhosts_folder . '/05_froxlor_dirfix_nofcgid.conf');
|
||||
|
||||
if($this->settings['system']['mod_fcgid'] == '1')
|
||||
{
|
||||
// if we use fcgid we don't need this file
|
||||
if(file_exists($vhosts_filename))
|
||||
{
|
||||
fwrite($this->debugHandler, ' apache::_createStandardDirectoryEntry: unlinking ' . basename($vhosts_filename) . "\n");
|
||||
$this->logger->logAction(CRON_ACTION, LOG_NOTICE, 'unlinking ' . basename($vhosts_filename));
|
||||
unlink(makeCorrectFile($vhosts_filename));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!isset($this->virtualhosts_data[$vhosts_filename]))
|
||||
{
|
||||
$this->virtualhosts_data[$vhosts_filename] = '';
|
||||
}
|
||||
|
||||
$this->virtualhosts_data[$vhosts_filename].= ' <Directory "' . $this->settings['system']['documentroot_prefix'] . '">' . "\n";
|
||||
$this->virtualhosts_data[$vhosts_filename].= ' Order allow,deny' . "\n";
|
||||
$this->virtualhosts_data[$vhosts_filename].= ' allow from all' . "\n";
|
||||
$this->virtualhosts_data[$vhosts_filename].= ' </Directory>' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* define a default ErrorDocument-statement, bug #unknown-yet
|
||||
*/
|
||||
private function _createStandardErrorHandler()
|
||||
{
|
||||
if($this->settings['defaultwebsrverrhandler']['enabled'] == '1'
|
||||
&& ($this->settings['defaultwebsrverrhandler']['err401'] != ''
|
||||
|| $this->settings['defaultwebsrverrhandler']['err403'] != ''
|
||||
|| $this->settings['defaultwebsrverrhandler']['err404'] != ''
|
||||
|| $this->settings['defaultwebsrverrhandler']['err500'] != '')
|
||||
) {
|
||||
$vhosts_folder = '';
|
||||
if(is_dir($this->settings['system']['apacheconf_vhost']))
|
||||
{
|
||||
$vhosts_folder = makeCorrectDir($this->settings['system']['apacheconf_vhost']);
|
||||
} else {
|
||||
$vhosts_folder = makeCorrectDir(dirname($this->settings['system']['apacheconf_vhost']));
|
||||
}
|
||||
|
||||
$vhosts_filename = makeCorrectFile($vhosts_folder . '/05_froxlor_default_errorhandler.conf');
|
||||
|
||||
if(!isset($this->virtualhosts_data[$vhosts_filename]))
|
||||
{
|
||||
$this->virtualhosts_data[$vhosts_filename] = '';
|
||||
}
|
||||
|
||||
if($this->settings['defaultwebsrverrhandler']['err401'] != '')
|
||||
{
|
||||
$this->virtualhosts_data[$vhosts_filename].= 'ErrorDocument 401 ' . $this->settings['defaultwebsrverrhandler']['err401'] . "\n";
|
||||
}
|
||||
|
||||
if($this->settings['defaultwebsrverrhandler']['err403'] != '')
|
||||
{
|
||||
$this->virtualhosts_data[$vhosts_filename].= 'ErrorDocument 403 ' . $this->settings['defaultwebsrverrhandler']['err403'] . "\n";
|
||||
}
|
||||
|
||||
if($this->settings['defaultwebsrverrhandler']['err404'] != '')
|
||||
{
|
||||
$this->virtualhosts_data[$vhosts_filename].= 'ErrorDocument 404 ' . $this->settings['defaultwebsrverrhandler']['err404'] . "\n";
|
||||
}
|
||||
|
||||
if($this->settings['defaultwebsrverrhandler']['err500'] != '')
|
||||
{
|
||||
$this->virtualhosts_data[$vhosts_filename].= 'ErrorDocument 500 ' . $this->settings['defaultwebsrverrhandler']['err500'] . "\n";
|
||||
}
|
||||
|
||||
}
|
||||
$this->virtualhosts_data[$vhosts_filename].= '# ' . basename($vhosts_filename) . "\n" . '# Created ' . date('d.m.Y H:i') . "\n" . '# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.' . "\n" . "\n";
|
||||
$this->virtualhosts_data[$vhosts_filename].= ' <Directory "' . $this->settings['system']['documentroot_prefix'] . '">' . "\n";
|
||||
$this->virtualhosts_data[$vhosts_filename].= ' Order allow,deny' . "\n";
|
||||
$this->virtualhosts_data[$vhosts_filename].= ' allow from all' . "\n";
|
||||
$this->virtualhosts_data[$vhosts_filename].= ' </Directory>' . "\n";
|
||||
}
|
||||
|
||||
public function createIpPort()
|
||||
@@ -192,14 +124,7 @@ class apache
|
||||
/**
|
||||
* add 'real'-vhost content here, like doc-root :)
|
||||
*/
|
||||
if($this->settings['system']['froxlordirectlyviahostname'])
|
||||
{
|
||||
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__))));
|
||||
}
|
||||
else
|
||||
{
|
||||
$mypath = makeCorrectDir(dirname(dirname(dirname(dirname(__FILE__)))));
|
||||
}
|
||||
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__))));
|
||||
$this->virtualhosts_data[$vhosts_filename].= 'DocumentRoot "'.$mypath.'"'."\n";
|
||||
|
||||
if($row_ipsandports['vhostcontainer_servername_statement'] == '1')
|
||||
@@ -271,11 +196,6 @@ class apache
|
||||
* bug #32
|
||||
*/
|
||||
$this->_createStandardDirectoryEntry();
|
||||
|
||||
/**
|
||||
* bug #unknown-yet
|
||||
*/
|
||||
$this->_createStandardErrorHandler();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -292,22 +212,23 @@ class apache
|
||||
|
||||
if($domain['openbasedir'] == '1')
|
||||
{
|
||||
if($domain['openbasedir_path'] == '1' || strstr($domain['documentroot'], ":") !== false)
|
||||
if($this->settings['system']['phpappendopenbasedir'] != '')
|
||||
{
|
||||
$_phpappendopenbasedir = appendOpenBasedirPath($domain['customerroot'], true);
|
||||
$_phpappendopenbasedir = ':' . $this->settings['system']['phpappendopenbasedir'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$_phpappendopenbasedir = appendOpenBasedirPath($domain['documentroot'], true);
|
||||
}
|
||||
|
||||
$_custom_openbasedir = explode(':', $this->settings['system']['phpappendopenbasedir']);
|
||||
foreach($_custom_openbasedir as $cobd)
|
||||
{
|
||||
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
|
||||
$_phpappendopenbasedir = '';
|
||||
}
|
||||
|
||||
$php_options_text.= ' php_admin_value open_basedir "' . $_phpappendopenbasedir . '"'."\n";
|
||||
if($domain['openbasedir_path'] == '1')
|
||||
{
|
||||
$php_options_text.= ' php_admin_value open_basedir "' . $domain['customerroot'] . $_phpappendopenbasedir . "\"\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$php_options_text.= ' php_admin_value open_basedir "' . $domain['documentroot'] . $_phpappendopenbasedir . "\"\n";
|
||||
}
|
||||
}
|
||||
|
||||
if($domain['safemode'] == '0')
|
||||
@@ -643,8 +564,7 @@ class apache
|
||||
|
||||
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
||||
{
|
||||
$code = getDomainRedirectCode($domain['id']);
|
||||
$vhost_content.= ' Redirect '.$code.' / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n";
|
||||
$vhost_content.= ' Redirect 301 / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -684,7 +604,7 @@ class apache
|
||||
}
|
||||
}
|
||||
|
||||
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true, true);
|
||||
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true);
|
||||
$vhost_content.= $this->getWebroot($domain);
|
||||
$vhost_content.= $this->composePhpOptions($domain);
|
||||
$vhost_content.= $this->getStats($domain);
|
||||
@@ -936,8 +856,14 @@ class apache
|
||||
mkdir($this->settings['system']['apacheconf_htpasswddir'], 0751);
|
||||
umask($umask);
|
||||
}
|
||||
elseif(!is_dir($this->settings['system']['apacheconf_htpasswddir']))
|
||||
{
|
||||
fwrite($this->debugHandler, ' cron_tasks: WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!' . "\n");
|
||||
echo 'WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!';
|
||||
$this->logger->logAction(CRON_ACTION, LOG_WARNING, 'WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!');
|
||||
}
|
||||
|
||||
if(isConfigDir($this->settings['system']['apacheconf_htpasswddir'], true))
|
||||
if(is_dir($this->settings['system']['apacheconf_htpasswddir']))
|
||||
{
|
||||
foreach($this->htpasswds_data as $htpasswd_filename => $htpasswd_file)
|
||||
{
|
||||
@@ -949,12 +875,6 @@ class apache
|
||||
|
||||
$this->wipeOutOldHtpasswdConfigs();
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite($this->debugHandler, ' cron_tasks: WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!' . "\n");
|
||||
echo 'WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!';
|
||||
$this->logger->logAction(CRON_ACTION, LOG_WARNING, 'WARNING!!! ' . $this->settings['system']['apacheconf_htpasswddir'] . ' is not a directory. htpasswd directory protection is disabled!!!');
|
||||
}
|
||||
}
|
||||
|
||||
// Write virtualhosts
|
||||
@@ -1028,7 +948,9 @@ class apache
|
||||
fwrite($this->debugHandler, ' apache::wipeOutOldVhostConfigs: cleaning ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_vhost']);
|
||||
|
||||
if(isConfigDir($this->settings['system']['apacheconf_vhost'], true))
|
||||
if(isConfigDir($this->settings['system']['apacheconf_vhost'])
|
||||
&& file_exists($this->settings['system']['apacheconf_vhost'])
|
||||
&& is_dir($this->settings['system']['apacheconf_vhost']))
|
||||
{
|
||||
$vhost_file_dirhandle = opendir($this->settings['system']['apacheconf_vhost']);
|
||||
|
||||
@@ -1057,7 +979,9 @@ class apache
|
||||
fwrite($this->debugHandler, ' apache::wipeOutOldDiroptionConfigs: cleaning ' . $this->settings['system']['apacheconf_diroptions'] . "\n");
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_diroptions']);
|
||||
|
||||
if(isConfigDir($this->settings['system']['apacheconf_diroptions'], true))
|
||||
if(isConfigDir($this->settings['system']['apacheconf_diroptions'])
|
||||
&& file_exists($this->settings['system']['apacheconf_diroptions'])
|
||||
&& is_dir($this->settings['system']['apacheconf_diroptions']))
|
||||
{
|
||||
$diroptions_file_dirhandle = opendir($this->settings['system']['apacheconf_diroptions']);
|
||||
|
||||
@@ -1086,14 +1010,16 @@ class apache
|
||||
fwrite($this->debugHandler, ' apache::wipeOutOldHtpasswdConfigs: cleaning ' . $this->settings['system']['apacheconf_htpasswddir'] . "\n");
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_htpasswddir']);
|
||||
|
||||
if(isConfigDir($this->settings['system']['apacheconf_htpasswddir'], true))
|
||||
if(isConfigDir($this->settings['system']['apacheconf_htpasswddir'])
|
||||
&& file_exists($this->settings['system']['apacheconf_htpasswddir'])
|
||||
&& is_dir($this->settings['system']['apacheconf_htpasswddir']))
|
||||
{
|
||||
$htpasswds_file_dirhandle = opendir($this->settings['system']['apacheconf_htpasswddir']);
|
||||
|
||||
while(false !== ($htpasswd_filename = readdir($htpasswds_file_dirhandle)))
|
||||
{
|
||||
if($htpasswd_filename != '.'
|
||||
&& $htpasswd_filename != '..'
|
||||
&& $htpasswd_filename != '..'
|
||||
&& !in_array($htpasswd_filename, $this->known_htpasswdsfilenames)
|
||||
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_htpasswddir'] . '/' . $htpasswd_filename)))
|
||||
{
|
||||
|
||||
@@ -166,42 +166,22 @@ class apache_fcgid extends apache
|
||||
if($domain['openbasedir'] == '1')
|
||||
{
|
||||
$openbasedirc = '';
|
||||
$_phpappendopenbasedir = '';
|
||||
|
||||
$_custom_openbasedir = explode(':', $this->settings['system']['mod_fcgid_peardir']);
|
||||
foreach($_custom_openbasedir as $cobd)
|
||||
if($domain['openbasedir_path'] == '0')
|
||||
{
|
||||
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
|
||||
}
|
||||
|
||||
$_custom_openbasedir = explode(':', $this->settings['system']['phpappendopenbasedir']);
|
||||
foreach($_custom_openbasedir as $cobd)
|
||||
{
|
||||
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
|
||||
}
|
||||
|
||||
if($domain['openbasedir_path'] == '0' && strstr($domain['documentroot'], ":") === false)
|
||||
{
|
||||
$openbasedir = appendOpenBasedirPath($domain['documentroot'], true);
|
||||
$openbasedir = $domain['documentroot'] . ':' . $tmpdir . ':' . $this->settings['system']['mod_fcgid_peardir'] . ':' . $this->settings['system']['phpappendopenbasedir'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$openbasedir = appendOpenBasedirPath($domain['customerroot'], true);
|
||||
$openbasedir = $domain['customerroot'] . ':' . $tmpdir . ':' . $this->settings['system']['mod_fcgid_peardir'] . ':' . $this->settings['system']['phpappendopenbasedir'];
|
||||
}
|
||||
|
||||
$openbasedir .= appendOpenBasedirPath($tmpdir);
|
||||
$openbasedir .= $_phpappendopenbasedir;
|
||||
|
||||
$openbasedir = explode(':', $openbasedir);
|
||||
$clean_openbasedir = array();
|
||||
foreach($openbasedir as $number => $path)
|
||||
{
|
||||
if(trim($path) != '/')
|
||||
{
|
||||
$clean_openbasedir[] = makeCorrectDir($path);
|
||||
}
|
||||
$openbasedir[$number] = makeCorrectDir($path);
|
||||
}
|
||||
$openbasedir = implode(':', $clean_openbasedir);
|
||||
|
||||
$openbasedir = implode(':', $openbasedir);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -107,14 +107,7 @@ class lighttpd
|
||||
$this->lighttpd_data[$vhost_filename].= '# Froxlor default vhost' . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= '$HTTP["host"] =~ "^(?:www\.|)' . $myhost . '$" {' . "\n";
|
||||
|
||||
if($this->settings['system']['froxlordirectlyviahostname'])
|
||||
{
|
||||
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__))));
|
||||
}
|
||||
else
|
||||
{
|
||||
$mypath = makeCorrectDir(dirname(dirname(dirname(dirname(__FILE__)))));
|
||||
}
|
||||
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__))));
|
||||
$this->lighttpd_data[$vhost_filename].= ' server.document-root = "'.$mypath.'"'."\n";
|
||||
|
||||
/**
|
||||
@@ -158,30 +151,6 @@ class lighttpd
|
||||
|
||||
$this->lighttpd_data[$vhost_filename].= '}' . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* bug #unknown-yet
|
||||
*/
|
||||
$this->_createStandardErrorHandler();
|
||||
}
|
||||
|
||||
/**
|
||||
* define a default server.error-handler-404-statement, bug #unknown-yet
|
||||
*/
|
||||
private function _createStandardErrorHandler()
|
||||
{
|
||||
if($this->settings['defaultwebsrverrhandler']['enabled'] == '1'
|
||||
&& $this->settings['defaultwebsrverrhandler']['err404'] != ''
|
||||
) {
|
||||
$vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/05_froxlor_default_errorhandler.conf');
|
||||
|
||||
if(!isset($this->lighttpd_data[$vhost_filename]))
|
||||
{
|
||||
$this->lighttpd_data[$vhost_filename] = '';
|
||||
}
|
||||
|
||||
$this->lighttpd_data[$vhost_filename] = 'server.error-handler-404 = "'.$this->settings['defaultwebsrverrhandler']['err404'].'"';
|
||||
}
|
||||
}
|
||||
|
||||
protected function create_htaccess($domain)
|
||||
@@ -200,6 +169,23 @@ class lighttpd
|
||||
|
||||
if(!in_array($row_htpasswds['path'], $needed_htpasswds))
|
||||
{
|
||||
if(empty($needed_htpasswds))
|
||||
{
|
||||
$auth_backend_loaded[$domain['ipandport']] = 'yes';
|
||||
|
||||
if(!$this->auth_backend_loaded)
|
||||
{
|
||||
$htaccess_text.= ' auth.backend = "htpasswd"' . "\n";
|
||||
}
|
||||
|
||||
$htaccess_text.= ' auth.backend.htpasswd.userfile = "' . makeCorrectFile($this->settings['system']['apacheconf_htpasswddir'] . '/' . $filename) . '"' . "\n";
|
||||
$htaccess_text.= ' auth.require = ( ' . "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$htaccess_text.= ' ,' . "\n";
|
||||
}
|
||||
|
||||
if(!isset($this->needed_htpasswds[$filename])) {
|
||||
$this->needed_htpasswds[$filename] = '';
|
||||
}
|
||||
@@ -209,26 +195,22 @@ class lighttpd
|
||||
$this->needed_htpasswds[$filename].= $row_htpasswds['username'] . ':' . $row_htpasswds['password'] . "\n";
|
||||
}
|
||||
|
||||
$htaccess_path = substr($row_htpasswds['path'], strlen($domain['documentroot']) - 1);
|
||||
$htaccess_path = makeCorrectDir($htaccess_path);
|
||||
|
||||
$htaccess_text.= ' $HTTP["url"] =~ "^'.$htaccess_path.'" {' . "\n";
|
||||
$htaccess_text.= ' auth.backend = "htpasswd"' . "\n";
|
||||
$htaccess_text.= ' auth.backend.htpasswd.userfile = "' . makeCorrectFile($this->settings['system']['apacheconf_htpasswddir'] . '/' . $filename) . '"' . "\n";
|
||||
$htaccess_text.= ' auth.require = ( ' . "\n";
|
||||
$htaccess_text.= ' "' . $htaccess_path . '" =>' . "\n";
|
||||
$htaccess_text.= ' (' . "\n";
|
||||
$htaccess_text.= ' "method" => "basic",' . "\n";
|
||||
$htaccess_text.= ' "realm" => "Restricted Area",' . "\n";
|
||||
$htaccess_text.= ' "require" => "valid-user"' . "\n";
|
||||
$htaccess_text.= ' )' . "\n";
|
||||
$htaccess_text.= ' )' . "\n";
|
||||
$htaccess_text.= ' }' . "\n";
|
||||
|
||||
$needed_htpasswds[] = $row_htpasswds['path'];
|
||||
$htaccess_path = substr($row_htpasswds['path'], strlen($domain['documentroot']) - 1);
|
||||
$htaccess_text.= ' "' . makeCorrectDir($htaccess_path) . '" =>' . "\n";
|
||||
$htaccess_text.= ' (' . "\n";
|
||||
$htaccess_text.= ' "method" => "basic",' . "\n";
|
||||
$htaccess_text.= ' "realm" => "Restricted Area",' . "\n";
|
||||
$htaccess_text.= ' "require" => "user=' . $row_htpasswds['username'] . '"' . "\n";
|
||||
$htaccess_text.= ' )' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if(strlen(trim($htaccess_text)) > 0)
|
||||
{
|
||||
$htaccess_text.= ' )' . "\n";
|
||||
}
|
||||
|
||||
return $htaccess_text;
|
||||
}
|
||||
|
||||
@@ -277,18 +259,10 @@ class lighttpd
|
||||
if((int)$domain['parentdomainid'] == 0)
|
||||
{
|
||||
$vhost_no = '51';
|
||||
if($ssl == '1')
|
||||
{
|
||||
$vhost_no = '61';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$vhost_no = '50';
|
||||
if($ssl == '1')
|
||||
{
|
||||
$vhost_no = '60';
|
||||
}
|
||||
}
|
||||
|
||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'].'/vhosts/'.$vhost_no.'_'.$domain['domain'].'.conf');
|
||||
@@ -370,22 +344,14 @@ class lighttpd
|
||||
}
|
||||
else
|
||||
{
|
||||
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true, true);
|
||||
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true);
|
||||
|
||||
$only_webroot = false;
|
||||
if($ssl_vhost === false && $domain['ssl_redirect'] == '1')
|
||||
{
|
||||
$only_webroot = true;
|
||||
}
|
||||
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
|
||||
if(!$only_webroot)
|
||||
{
|
||||
$vhost_content.= $this->create_htaccess($domain);
|
||||
$vhost_content.= $this->create_pathOptions($domain);
|
||||
$vhost_content.= $this->composePhpOptions($domain);
|
||||
$vhost_content.= $this->getStats($domain);
|
||||
$vhost_content.= $this->getLogFiles($domain);
|
||||
}
|
||||
$vhost_content.= $this->create_htaccess($domain);
|
||||
$vhost_content.= $this->create_pathOptions($domain);
|
||||
$vhost_content.= $this->composePhpOptions($domain);
|
||||
$vhost_content.= $this->getStats($domain);
|
||||
$vhost_content.= $this->getLogFiles($domain);
|
||||
}
|
||||
|
||||
if ($domain['specialsettings'] != "") {
|
||||
@@ -572,7 +538,7 @@ class lighttpd
|
||||
$diroption_text.= '(' . "\n";
|
||||
$diroption_text.= ' "method" => "basic",' . "\n";
|
||||
$diroption_text.= ' "realm" => "Restricted Area",' . "\n";
|
||||
$diroption_text.= ' "require" => "valid-user"' . "\n";
|
||||
$diroption_text.= ' "require" => "user=' . $row_htpasswds['username'] . '"' . "\n";
|
||||
$diroption_text.= ')' . "\n";
|
||||
|
||||
if($this->auth_backend_loaded[$domain['ssl_ipandport']] == 'yes')
|
||||
@@ -841,7 +807,9 @@ class lighttpd
|
||||
fwrite($this->debugHandler, ' lighttpd::wipeOutOldConfigs: cleaning ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_vhost']);
|
||||
|
||||
if(isConfigDir($this->settings['system']['apacheconf_vhost'], true))
|
||||
if(isConfigDir($this->settings['system']['apacheconf_vhost'])
|
||||
&& file_exists($this->settings['system']['apacheconf_vhost'])
|
||||
&& is_dir($this->settings['system']['apacheconf_vhost']))
|
||||
{
|
||||
$vhost_file_dirhandle = opendir($this->settings['system']['apacheconf_vhost']);
|
||||
|
||||
|
||||
@@ -190,42 +190,22 @@ class lighttpd_fcgid extends lighttpd
|
||||
if($domain['openbasedir'] == '1')
|
||||
{
|
||||
$openbasedirc = '';
|
||||
$_phpappendopenbasedir = '';
|
||||
|
||||
$_custom_openbasedir = explode(':', $this->settings['system']['mod_fcgid_peardir']);
|
||||
foreach($_custom_openbasedir as $cobd)
|
||||
if($domain['openbasedir_path'] == '0')
|
||||
{
|
||||
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
|
||||
}
|
||||
|
||||
$_custom_openbasedir = explode(':', $this->settings['system']['phpappendopenbasedir']);
|
||||
foreach($_custom_openbasedir as $cobd)
|
||||
{
|
||||
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
|
||||
}
|
||||
|
||||
if($domain['openbasedir_path'] == '0' && strstr($domain['documentroot'], ":") === false)
|
||||
{
|
||||
$openbasedir = appendOpenBasedirPath($domain['documentroot'], true);
|
||||
$openbasedir = $domain['documentroot'] . ':' . $tmpdir . ':' . $this->settings['system']['mod_fcgid_peardir'] . ':' . $this->settings['system']['phpappendopenbasedir'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$openbasedir = appendOpenBasedirPath($domain['customerroot'], true);
|
||||
$openbasedir = $domain['customerroot'] . ':' . $tmpdir . ':' . $this->settings['system']['mod_fcgid_peardir'] . ':' . $this->settings['system']['phpappendopenbasedir'];
|
||||
}
|
||||
|
||||
$openbasedir .= appendOpenBasedirPath($tmpdir);
|
||||
$openbasedir .= $_phpappendopenbasedir;
|
||||
|
||||
$openbasedir = explode(':', $openbasedir);
|
||||
$clean_openbasedir = array();
|
||||
foreach($openbasedir as $number => $path)
|
||||
{
|
||||
if(trim($path) != '/')
|
||||
{
|
||||
$clean_openbasedir[] = makeCorrectDir($path);
|
||||
}
|
||||
$openbasedir[$number] = makeCorrectDir($path);
|
||||
}
|
||||
$openbasedir = implode(':', $clean_openbasedir);
|
||||
|
||||
$openbasedir = implode(':', $openbasedir);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -213,7 +213,7 @@ $awstatsclean['headerold']) {
|
||||
/*
|
||||
* remove homedir
|
||||
*/
|
||||
$homedir = makeCorrectDir($settings['system']['documentroot_prefix'] . '/' . $row['data']['loginname']);
|
||||
$homedir = makeCorrectDir($settings['system']['documentroot_prefix'] . $row['data']['loginname']);
|
||||
|
||||
if($homedir != '/'
|
||||
&& $homedir != $settings['system']['documentroot_prefix']
|
||||
@@ -226,67 +226,7 @@ $awstatsclean['headerold']) {
|
||||
/*
|
||||
* remove maildir
|
||||
*/
|
||||
$maildir = makeCorrectDir($settings['system']['vmail_homedir'] . '/' . $row['data']['loginname']);
|
||||
|
||||
if($maildir != '/'
|
||||
&& $maildir != $settings['system']['vmail_homedir']
|
||||
&& substr($maildir, 0, strlen($settings['system']['vmail_homedir'])) == $settings['system']['vmail_homedir'])
|
||||
{
|
||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: rm -rf ' . escapeshellarg($maildir));
|
||||
safe_exec('rm -rf '.escapeshellarg($maildir));
|
||||
}
|
||||
|
||||
/*
|
||||
* see if we have some php-fcgid leftovers if used
|
||||
* and remove them, #200
|
||||
*/
|
||||
if($settings['system']['mod_fcgid'] == 1)
|
||||
{
|
||||
// e.g. /var/www/php-fcgi-starter/web1/
|
||||
$configdir = makeCorrectDir($settings['system']['mod_fcgid_configdir'] . '/' . $row['data']['loginname'] . '/');
|
||||
|
||||
if (is_dir($configdir))
|
||||
{
|
||||
$its = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($configdir)
|
||||
);
|
||||
|
||||
// iterate through all subdirs,
|
||||
// look for php-fcgi-starter files
|
||||
// and take chattr +i away from them
|
||||
// so we can delete them :)
|
||||
foreach ($its as $fullFileName => $it )
|
||||
{
|
||||
if ($it->isFile() && $it->getFilename() == 'php-fcgi-starter')
|
||||
{
|
||||
safe_exec('chattr -i ' . escapeshellarg($its->getPathname()));
|
||||
}
|
||||
}
|
||||
// now get rid of old stuff
|
||||
safe_exec('rm -rf '. escapeshellarg($configdir));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TYPE=7 Customer deleted an email account and wants the data to be deleted on the filesystem
|
||||
*/
|
||||
elseif ($row['type'] == '7')
|
||||
{
|
||||
fwrite($debugHandler, ' cron_tasks: Task7 started - deleting customer e-mail data' . "\n");
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, 'Task7 started - deleting customer e-mail data');
|
||||
|
||||
if(is_array($row['data']))
|
||||
{
|
||||
if(isset($row['data']['loginname'])
|
||||
&& isset($row['data']['email'])
|
||||
) {
|
||||
/*
|
||||
* remove specific maildir
|
||||
*/
|
||||
$maildir = makeCorrectDir($settings['system']['vmail_homedir'] .'/'. $row['data']['loginname'] .'/'. $row['data']['email']);
|
||||
$maildir = makeCorrectDir($settings['system']['vmail_homedir'] . $row['data']['loginname']);
|
||||
|
||||
if($maildir != '/'
|
||||
&& $maildir != $settings['system']['vmail_homedir']
|
||||
|
||||
@@ -35,7 +35,7 @@ while($row_ticket = $db->fetch_array($result_tickets))
|
||||
if($days >= $settings['ticket']['archiving_days'])
|
||||
{
|
||||
fwrite($debugHandler, 'archiving ticket "' . $row_ticket['subject'] . '" (ID #' . $row_ticket['id'] . ')' . "\n");
|
||||
$mainticket = ticket::getInstanceOf(null, $db, $settings, (int)$row_ticket['id']);
|
||||
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$row_ticket['id']);
|
||||
$mainticket->Set('lastchange', $now, true, true);
|
||||
$mainticket->Set('lastreplier', '1', true, true);
|
||||
$mainticket->Set('status', '3', true, true);
|
||||
|
||||
@@ -17,48 +17,6 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* chowns either awstats or webalizer folder,
|
||||
* either with webserver-user or - if fcgid
|
||||
* is used - the customers name, #258
|
||||
*
|
||||
* @param array $row array if panel_customers
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function makeChownWithNewStats($row)
|
||||
{
|
||||
global $settings;
|
||||
|
||||
// get correct user
|
||||
if($settings['system']['mod_fcgid'] == 1)
|
||||
{
|
||||
$user = $row['loginname'];
|
||||
$group = $row['loginname'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$user = $row['guid'];
|
||||
$group = $row['guid'];
|
||||
}
|
||||
|
||||
// get correct directory
|
||||
$dir = $row['documentroot'];
|
||||
if($settings['system']['awstats_enabled'] == '1')
|
||||
{
|
||||
$dir .= '/awstats/';
|
||||
} else {
|
||||
$dir .= '/webalizer/';
|
||||
}
|
||||
|
||||
// only run chown if directory exists
|
||||
if (file_exists($dir))
|
||||
{
|
||||
// run chown
|
||||
safe_exec('chown -R '.escapeshellarg($user).':'.escapeshellarg($group).' '.escapeshellarg(makeCorrectDir($dir)));
|
||||
}
|
||||
}
|
||||
|
||||
function awstatsDoSingleDomain($domain, $outputdir)
|
||||
{
|
||||
global $cronlog, $settings;
|
||||
@@ -78,7 +36,6 @@ function awstatsDoSingleDomain($domain, $outputdir)
|
||||
* check for correct path of awstats_buildstaticpages.pl
|
||||
*/
|
||||
$awbsp = makeCorrectFile($settings['system']['awstats_path'].'/awstats_buildstaticpages.pl');
|
||||
$awprog = makeCorrectFile($settings['system']['awstats_path'].'/awstats.pl');
|
||||
|
||||
if (!file_exists($awbsp)) {
|
||||
echo "WANRING: Necessary awstats_buildstaticpages.pl script could not be found, no traffic is being calculated and no stats are generated. Please check your AWStats-Path setting";
|
||||
@@ -87,7 +44,7 @@ function awstatsDoSingleDomain($domain, $outputdir)
|
||||
}
|
||||
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Running awstats_buildstaticpages.pl for domain '".$domain."' (Output: '".$outputdir."')");
|
||||
safe_exec($awbsp.' -awstatsprog='.escapeshellarg($awprog).' -update -config=' . $domain . ' -dir='.escapeshellarg($outputdir));
|
||||
safe_exec($awbsp.' -update -config=' . $domain . ' -dir='.escapeshellarg($outputdir));
|
||||
|
||||
/**
|
||||
* index file is saved like 'awstats.[domain].html',
|
||||
|
||||
@@ -173,7 +173,7 @@ while($row = $db->fetch_array($result))
|
||||
{
|
||||
$httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'] . '-' . $domain, $row['documentroot'] . '/webalizer/' . $domain . '/', $domain, $domainlist[$row['customerid']]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
reset($domainlist[$row['customerid']]);
|
||||
@@ -191,9 +191,6 @@ while($row = $db->fetch_array($result))
|
||||
{
|
||||
$httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'], $row['documentroot'] . '/webalizer/', $caption, $domainlist[$row['customerid']]));
|
||||
}
|
||||
|
||||
// make the stuff readable for the customer, #258
|
||||
makeChownWithNewStats($row);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -368,31 +365,6 @@ while($row = $db->fetch_array($result))
|
||||
|
||||
$diskusage = floatval($webspaceusage + $emailusage + $mysqlusage);
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `diskspace_used`='" . (float)$current_diskspace['all'] . "', `traffic_used`='" . (float)$sum_month_traffic['all'] . "' WHERE `customerid`='" . (int)$row['customerid'] . "'");
|
||||
|
||||
/**
|
||||
* Proftpd Quota
|
||||
*/
|
||||
|
||||
$db->query("UPDATE `" . TABLE_FTP_QUOTATALLIES . "` SET `bytes_in_used`='" . (float)$current_diskspace['all'] . "'*1024 WHERE `name` = '" . $row['loginname'] . "' OR `name` LIKE '" . $row['loginname'] . $settings['customer']['ftpprefix'] . "%'");
|
||||
|
||||
/**
|
||||
* Pureftpd Quota
|
||||
*/
|
||||
|
||||
if($settings['system']['ftpserver'] == "pureftpd")
|
||||
{
|
||||
$result_quota = $db->query("SELECT homedir FROM `" . TABLE_FTP_USERS . "` WHERE customerid = '" . $row['customerid'] . "'");
|
||||
|
||||
while($row_quota = $db->fetch_array($result_quota))
|
||||
{
|
||||
$quotafile = "" . $row_quota['homedir'] . ".ftpquota";
|
||||
$fh = fopen($quotafile, 'w');
|
||||
$stringdata = "0 " . $current_diskspace['all']*1024 . "";
|
||||
fwrite($fh, $stringdata);
|
||||
fclose($fh);
|
||||
safe_exec('chown ' . $row['loginname'] . ':' . $row['loginname'] . ' ' . escapeshellarg($quotafile) . '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page"/>
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left" colspan="3"><b><img src="images/title.gif" alt="" /> {$lng['admin']['admins']}</b> ({$admincount})</td>
|
||||
<td class="maintitle_search_left" colspan="3"><b><img src="images/title.gif" alt="" /> {$lng['admin']['admins']}</b></td>
|
||||
<td class="maintitle_search_right" colspan="<if $settings['ticket']['enabled'] == 1 >7<else>6</if>">{$searchcode}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -4,7 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page"/>
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left" colspan="3" ><b><img src="images/title.gif" alt="" /> {$lng['admin']['customers']}</b> ({$customercount})</td>
|
||||
<td class="maintitle_search_left" colspan="3" ><b><img src="images/title.gif" alt="" /> {$lng['admin']['customers']}</b></td>
|
||||
<td class="maintitle_search_right" colspan="<if $settings['ticket']['enabled'] == 1 >8<else>7</if>">{$searchcode}</td>
|
||||
</tr>
|
||||
<if ($userinfo['customers_used'] < $userinfo['customers'] || $userinfo['customers'] == '-1') && 15 < $userinfo['customers_used']>
|
||||
|
||||
@@ -18,7 +18,7 @@ $header
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['login']['username']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="new_loginname" value="" maxlength="10" /></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="loginname" value="" maxlength="10" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['admin']['stdsubdomain_add']}?</td>
|
||||
@@ -26,7 +26,7 @@ $header
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['login']['password']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="new_customer_password" value="" /></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="customer_password" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['admin']['sendpassword']}?</td>
|
||||
@@ -94,32 +94,32 @@ $header
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['diskspace']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="diskspace" value="0" maxlength="6" /> {$diskspace_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="diskspace" value="" maxlength="6" /> {$diskspace_ul}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['traffic']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="traffic" value="0" maxlength="4" /> {$traffic_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="traffic" value="" maxlength="4" /> {$traffic_ul}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['subdomains']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="subdomains" value="0" maxlength="9" /> {$subdomains_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="subdomains" value="" maxlength="9" /> {$subdomains_ul}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['emails']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="emails" value="0" maxlength="9" /> {$emails_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="emails" value="" maxlength="9" /> {$emails_ul}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['accounts']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_accounts" value="0" maxlength="9" /> {$email_accounts_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_accounts" value="" maxlength="9" /> {$email_accounts_ul}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['forwarders']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_forwarders" value="0" maxlength="9" /> {$email_forwarders_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_forwarders" value="" maxlength="9" /> {$email_forwarders_ul}</td>
|
||||
</tr>
|
||||
<if $settings['system']['mail_quota_enabled'] == 1>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['email_quota']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_quota" value="0" maxlength="9" /> {$email_quota_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_quota" value="" maxlength="9" /> {$email_quota_ul}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<tr>
|
||||
@@ -132,17 +132,17 @@ $header
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['ftps']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="ftps" value="0" maxlength="9" /> {$ftps_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="ftps" value="" maxlength="9" /> {$ftps_ul}</td>
|
||||
</tr>
|
||||
<if $settings['ticket']['enabled'] == 1 >
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['tickets']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="tickets" value="0" maxlength="9" /> {$tickets_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="tickets" value="" maxlength="9" /> {$tickets_ul}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['mysqls']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="mysqls" value="0" maxlength="9" /> {$mysqls_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="mysqls" value="" maxlength="9" /> {$mysqls_ul}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['admin']['phpenabled']}?</td>
|
||||
|
||||
@@ -35,7 +35,7 @@ $header
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['login']['password']} ({$lng['panel']['emptyfornochanges']}):</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="new_customer_password" value="" /></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="customer_password" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['login']['language']}:</td>
|
||||
|
||||
@@ -4,7 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page"/>
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['admin']['domains']}</b> ({$domainscount})</td>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['admin']['domains']}</b></td>
|
||||
<td class="maintitle_search_right" colspan="4">{$searchcode}</td>
|
||||
</tr>
|
||||
<if ($userinfo['domains_used'] < $userinfo['domains'] || $userinfo['domains'] == '-1') && 15 < $count && 0 < $countcustomers >
|
||||
|
||||
@@ -6,7 +6,7 @@ $header
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['menue']['ticket']['categories']}</b></td>
|
||||
<td class="maintitle_search_right" colspan="4">{$searchcode}</td>
|
||||
<td class="maintitle_search_right" colspan="3">{$searchcode}</td>
|
||||
</tr>
|
||||
<if 15 < $categories_count >
|
||||
<tr>
|
||||
@@ -15,18 +15,17 @@ $header
|
||||
</if>
|
||||
<tr>
|
||||
<td class="field_display_border_left">{$lng['ticket']['category']} {$arrowcode['name']}</td>
|
||||
<td class="field_display">{$lng['ticket']['logicalorder']} {$arrowcode['logicalorder']}</td>
|
||||
<td class="field_display">{$lng['ticket']['ticketcount']} <if $categories_count < 0 >{$arrowcode['ticketcount']}</if></td>
|
||||
<td class="field_display_search" colspan="2">{$sortcode}</td>
|
||||
</tr>
|
||||
$ticketcategories
|
||||
<if $pagingcode != ''>
|
||||
<tr>
|
||||
<td class="field_display_border_left" colspan="5" style=" text-align: center; ">{$pagingcode}</td>
|
||||
<td class="field_display_border_left" colspan="43" style=" text-align: center; ">{$pagingcode}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<tr>
|
||||
<td class="field_display_border_left" colspan="5"><a href="$filename?page=categories&action=addcategory&s=$s">{$lng['ticket']['ticket_newcateory']}</a></td>
|
||||
<td class="field_display_border_left" colspan="4"><a href="$filename?page=categories&action=addcategory&s=$s">{$lng['ticket']['ticket_newcateory']}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
<tr class="" onmouseover="this.className='RowOverSelected';" onmouseout="this.className='';">
|
||||
<tr class="" onmouseover="this.className='RowOverSelected';" onmouseout="this.className='';">
|
||||
<td class="field_name_border_left">{$row['name']}</td>
|
||||
<td class="field_name">{$row['logicalorder']}</td>
|
||||
<td class="field_name">{$row['ticketcount']} ({$row['ticketcountnotclosed']} {$lng['ticket']['open']} | {$closedtickets_count} {$lng['ticket']['closed']})</td>
|
||||
<td class="field_name">{$row['ticketcount']} ({$row['ticketcountnotclosed']} {$lng['ticket']['open']} | {$closedtickets_count} {$lng['ticket']['closed']})</td>
|
||||
<td class="field_name">
|
||||
<a href="$filename?page=categories&action=editcategory&id={$row['id']}&s=$s">{$lng['panel']['edit']}</a>
|
||||
</td>
|
||||
<td class="field_name">
|
||||
<a href="$filename?page=categories&action=deletecategory&id={$row['id']}&s=$s">{$lng['panel']['delete']}</a>
|
||||
</td>
|
||||
<a href="$filename?page=categories&action=editcategory&id={$row['id']}&s=$s">{$lng['panel']['edit']}</a>
|
||||
</td>
|
||||
<td class="field_name">
|
||||
<a href="$filename?page=categories&action=deletecategory&id={$row['id']}&s=$s">{$lng['panel']['delete']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -9,13 +9,9 @@ $header
|
||||
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['ticket']['ticket_editcateory']}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"><b>{$lng['ticket']['category']}:</b></td>
|
||||
<td class="main_field_name">{$lng['ticket']['category']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="category" maxlength="50" value="{$row['name']}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"><b>{$lng['ticket']['logicalorder']}:</b><br />{$lng['ticket']['orderdesc']}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="logicalorder" maxlength="3" value="{$row['logicalorder']}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['ticket']['ticket_editcateory']}" /></td>
|
||||
</tr>
|
||||
|
||||
@@ -8,13 +8,9 @@ $header
|
||||
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['ticket']['ticket_newcateory']}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"><b>{$lng['ticket']['category']}:</b></td>
|
||||
<td class="main_field_name">{$lng['ticket']['category']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="category" maxlength="50" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"><b>{$lng['ticket']['logicalorder']}:</b><br />{$lng['ticket']['orderdesc']}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="logicalorder" maxlength="3" value="1" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['ticket']['ticket_newcateory']}" /></td>
|
||||
</tr>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<div class="preconfigitem">
|
||||
<p>
|
||||
<span class="preconfdesc">{$description}</span>
|
||||
{$question}
|
||||
</p>
|
||||
</div>
|
||||
@@ -29,7 +29,7 @@
|
||||
<input class="bottom" type="submit" value="{$lng['aps']['back']}" />
|
||||
</form>
|
||||
</if>
|
||||
<if $action != 'customerstatus' && ( $userinfo['aps_packages'] != $userinfo['aps_packages_used'] ) && $db_info == ''>
|
||||
<if $action != 'customerstatus' && ( $userinfo['aps_packages'] != $userinfo['aps_packages_used'] )>
|
||||
<form method="get" action="$filename" style="float:left; padding-left: 5px;">
|
||||
<input type="hidden" name="s" value="$s" />
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
@@ -38,9 +38,6 @@
|
||||
<input class="bottom" type="submit" value="{$lng['aps']['install']}" />
|
||||
</form>
|
||||
</if>
|
||||
<if $db_info != ''>
|
||||
<span style="padding-left: 5px;">{$db_info}</span>
|
||||
</if>
|
||||
<if ($action == 'customerstatus') && ($Row['Status'] == 2 || $Row['Status'] == 3)>
|
||||
<form method="get" action="$filename" style="float:left;">
|
||||
<input type="hidden" name="s" value="$s" />
|
||||
|
||||
@@ -4,7 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['domains']['domainsettings']}</b> ({$domains_count})</td>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['domains']['domainsettings']}</b></td>
|
||||
<td class="maintitle_search_right" colspan="3">{$searchcode}</td>
|
||||
</tr>
|
||||
<if ($userinfo['subdomains_used'] < $userinfo['subdomains'] || $userinfo['subdomains'] == '-1') && 15 < $domains_count && $parentdomains_count != 0 >
|
||||
|
||||
@@ -13,31 +13,24 @@ $header
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select name="alias">$aliasdomains</select></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select class="tendina_nobordo" name="alias">$aliasdomains</select></td>
|
||||
</tr>
|
||||
<if $settings['panel']['pathedit'] != 'Dropdown'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['pathorurl']}:<br /><font size="1">{$lng['panel']['pathDescription']}</font></td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['panel']['pathedit'] == 'Dropdown'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
||||
<td class="main_field_display">{$pathSelect}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
|
||||
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['redirectifpathisurl']}:<br /><font size="1">{$lng['domains']['redirectifpathisurlinfo']}</font></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select name="redirectcode">$redirectcode</select></td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['system']['use_ssl'] == '1'>
|
||||
<if $settings['panel']['pathedit'] != 'Dropdown'><tr>
|
||||
<td class="main_field_name">
|
||||
{$lng['panel']['pathorurl']}:<br />
|
||||
<font size="1">{$lng['panel']['pathDescription']}</font>
|
||||
</td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
||||
</tr></if>
|
||||
<if $settings['panel']['pathedit'] == 'Dropdown'><tr>
|
||||
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
||||
<td class="main_field_display">{$pathSelect}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
|
||||
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
|
||||
</tr></if>
|
||||
<if $settings['system']['use_ssl'] == '1'>
|
||||
<tr>
|
||||
<td class="main_field_name">SSL Redirect:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">$ssl_redirect</td>
|
||||
|
||||
@@ -16,46 +16,33 @@ $header
|
||||
<td class="main_field_name">{$lng['dns']['destinationip']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$domainip}</td>
|
||||
</tr>
|
||||
<if $alias_check == '0'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select class="tendina_nobordo" name="alias">$domains</select></td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['panel']['pathedit'] != 'Dropdown'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['pathorurl']}:<br /><font size="1">{$lng['panel']['pathDescription']}</font></td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['panel']['pathedit'] == 'Dropdown'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
||||
<td class="main_field_display">{$pathSelect}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
|
||||
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['redirectifpathisurl']}:<br /><font size="1">{$lng['domains']['redirectifpathisurlinfo']}</font></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select name="redirectcode">$redirectcode</select></td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0' >
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['wildcarddomain']}</td>
|
||||
<td class="main_field_display" nowrap="nowrap">$iswildcarddomain</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if ( $result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2' ) && $result['parentdomainid'] != '0' >
|
||||
<tr>
|
||||
<td class="main_field_name">Emaildomain:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">$isemaildomain</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $alias_check == '0'><tr>
|
||||
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select class="tendina_nobordo" name="alias">$domains</select></td>
|
||||
</tr></if>
|
||||
<if $settings['panel']['pathedit'] != 'Dropdown'><tr>
|
||||
<td class="main_field_name">
|
||||
{$lng['panel']['pathorurl']}:<br />
|
||||
<font size="1">{$lng['panel']['pathDescription']}</font>
|
||||
</td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
||||
</tr></if>
|
||||
<if $settings['panel']['pathedit'] == 'Dropdown'><tr>
|
||||
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
||||
<td class="main_field_display">{$pathSelect}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
|
||||
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
|
||||
</tr></if>
|
||||
<if $result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0' ><tr>
|
||||
<td class="main_field_name">{$lng['domains']['wildcarddomain']}</td>
|
||||
<td class="main_field_display" nowrap="nowrap">$iswildcarddomain</td>
|
||||
</tr></if>
|
||||
<if ( $result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2' ) && $result['parentdomainid'] != '0' ><tr>
|
||||
<td class="main_field_name">Emaildomain:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">$isemaildomain</td>
|
||||
</tr></if>
|
||||
<if $settings['system']['use_ssl'] == '1'>
|
||||
<tr>
|
||||
<td class="main_field_name">SSL Redirect:</td>
|
||||
|
||||
@@ -4,7 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['menue']['email']['emails']}</b> ({$emailscount})</td>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['menue']['email']['emails']}</b></td>
|
||||
<td class="maintitle_search_right" colspan="6">{$searchcode}</td>
|
||||
</tr>
|
||||
<if ($userinfo['emails_used'] < $userinfo['emails'] || $userinfo['emails'] == '-1') && 15 < $emails_count && $emaildomains_count !=0 >
|
||||
|
||||
@@ -19,7 +19,7 @@ $header
|
||||
<tr>
|
||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['emails']['emails_add']}" /></td>
|
||||
</tr>
|
||||
<else>
|
||||
<else
|
||||
<tr>
|
||||
<td class="main_field_name" colspan="2">{$lng['emails']['noemaildomainaddedyet']}</td>
|
||||
</tr>
|
||||
|
||||
@@ -5,7 +5,7 @@ $header
|
||||
<input type="hidden" name="send" value="send" />
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['menue']['ftp']['accounts']}</b> ({$ftps_count})</td>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['menue']['ftp']['accounts']}</b></td>
|
||||
<td class="maintitle_search_right" colspan="3">{$searchcode}</td>
|
||||
</tr>
|
||||
<if ($userinfo['ftps_used'] < $userinfo['ftps'] || $userinfo['ftps'] == '-1') && 15 < $ftps_count >
|
||||
|
||||
@@ -25,10 +25,6 @@ $header
|
||||
<td class="main_field_name">{$lng['login']['password']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="ftp_password" size="30" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['sendinfomail']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$sendinfomail}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['ftp']['account_add']}" /></td>
|
||||
</tr>
|
||||
|
||||
@@ -4,7 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['menue']['mysql']['databases']}</b> ({$mysqls_count})</td>
|
||||
<td class="maintitle_search_left" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['menue']['mysql']['databases']}</b></td>
|
||||
<td class="maintitle_search_right" colspan="3">{$searchcode}</td>
|
||||
</tr>
|
||||
<if ($userinfo['mysqls_used'] < $userinfo['mysqls'] || $userinfo['mysqls'] == '-1') && 15 < $mysqls_count >
|
||||
|
||||
@@ -22,7 +22,7 @@ $header
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="mysql_password" maxlength="50" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['sendinfomail']}:</td>
|
||||
<td class="main_field_name">{$lng['mysql']['sendinfomail']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$sendinfomail}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
<td class="field_name_border_left">{$row['databasename']}</td>
|
||||
<td class="field_name">{$row['description']}</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="$filename?page=mysqls&action=edit&id={$row['id']}&s=$s">{$lng['panel']['edit']}</a></td>
|
||||
<td class="field_name"><a href="$filename?page=mysqls&action=delete&id={$row['id']}&s=$s">{$lng['panel']['delete']}</a></td>
|
||||
<else>
|
||||
<td class="field_name" colspan="2">{$lng['aps']['cannoteditordeleteapsdb']}</td>
|
||||
</if>
|
||||
<td class="field_name"><a href="$filename?page=mysqls&action=edit&id={$row['id']}&s=$s">{$lng['panel']['edit']}</a></td>
|
||||
<td class="field_name"><a href="$filename?page=mysqls&action=delete&id={$row['id']}&s=$s">{$lng['panel']['delete']}</a></td>
|
||||
</tr>
|
||||
|
||||
@@ -458,14 +458,3 @@ TR.RowOverSelected {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.preconfigitem
|
||||
{
|
||||
padding: 0.15em;
|
||||
border-bottom: 1px solid #cccccc;
|
||||
}
|
||||
|
||||
.preconfdesc
|
||||
{
|
||||
display: block;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
# Include local configuration options identical for all virtual hosts
|
||||
Include "{AWSTATS_CONF}awstats.model.conf"
|
||||
|
||||
LogFile="{LOG_FILE}"
|
||||
LogType=W
|
||||
LogFormat = 1
|
||||
@@ -8,3 +5,6 @@ LogSeparator=" "
|
||||
SiteDomain="{SITE_DOMAIN}"
|
||||
HostAliases="{HOST_ALIASES}"
|
||||
DirData="{CUSTOMER_DOCROOT}"
|
||||
|
||||
# Include local configuration options identical for all virtual hosts
|
||||
Include "{AWSTATS_CONF}awstats.model.conf"
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
# Include local configuration options identical for all virtual hosts
|
||||
Include "{AWSTATS_CONF}awstats.model.conf"
|
||||
|
||||
LogFile="{LOG_FILE}"
|
||||
LogType=W
|
||||
LogFormat = "%host %virtualname %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"
|
||||
@@ -9,3 +6,5 @@ SiteDomain="{SITE_DOMAIN}"
|
||||
HostAliases="{HOST_ALIASES}"
|
||||
DirData="{CUSTOMER_DOCROOT}"
|
||||
|
||||
# Include local configuration options identical for all virtual hosts
|
||||
Include "{AWSTATS_CONF}awstats.model.conf"
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# for Froxlor and AWStats to work together
|
||||
# you have to change the following line
|
||||
|
||||
# look for
|
||||
DirData="/some/folder/"
|
||||
|
||||
# and comment this out with a hash (#)
|
||||
#DirData="/some/folder/"
|
||||
@@ -3,7 +3,7 @@ protocols = imap pop3 <SSLPROTOCOLS>
|
||||
listen = *
|
||||
mail_access_groups = vmail
|
||||
mail_debug = no
|
||||
## allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
|
||||
## Uncomment this line to allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
|
||||
disable_plaintext_auth = no
|
||||
|
||||
### SSL Settings
|
||||
@@ -20,13 +20,13 @@ protocol imap {
|
||||
}
|
||||
|
||||
protocol pop3 {
|
||||
# leave this uncommented if you are migrating from Courier also see Migration from Courier
|
||||
# Uncomment this line if you are migrating from Courier also see Migration from Courier
|
||||
pop3_uidl_format = UID%u-%v
|
||||
mail_plugins = quota
|
||||
|
||||
}
|
||||
protocol lda {
|
||||
# postmaster is the one in charge of the mail system. MUST be set to a valid address!
|
||||
# postmaster is the one in charge of the mail system. MUST be set to a vailid address!
|
||||
postmaster_address = <postmaster-address>
|
||||
auth_socket_path = /var/run/dovecot/auth-master
|
||||
mail_plugins = quota
|
||||
|
||||
@@ -8,9 +8,9 @@ shadow.where_clause = ;
|
||||
shadow.userid_column = u.id;
|
||||
shadow.user_column = u.username;
|
||||
shadow.password_column = u.password;
|
||||
shadow.lastchange_column = FLOOR(UNIX_TIMESTAMP()/86400-1);
|
||||
shadow.min_column = 0;
|
||||
shadow.max_column = 99999;
|
||||
shadow.lastchange_column = UNIX_TIMESTAMP()-10;
|
||||
shadow.min_column = 1;
|
||||
shadow.max_column = 2;
|
||||
shadow.warn_column = 7;
|
||||
shadow.inact_column = -1;
|
||||
shadow.expire_column = -1;
|
||||
|
||||
@@ -4,7 +4,7 @@ users.database = <SQL_DB>;
|
||||
users.db_user = <SQL_UNPRIVILEGED_USER>;
|
||||
users.db_password = <SQL_UNPRIVILEGED_PASSWORD>;
|
||||
users.table = ftp_users u;
|
||||
users.where_clause = u.login_enabled = 'Y';
|
||||
users.where_clause =;
|
||||
users.user_column = u.username;
|
||||
users.password_column = u.password;
|
||||
users.userid_column = u.id;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user