began to 'clean up' for future releases (APS, Autoresponder and Backup)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,6 +1,4 @@
|
||||
packages/*
|
||||
lib/classes/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/*/
|
||||
temp/*
|
||||
templates/*
|
||||
install/update.log
|
||||
.buildpath
|
||||
|
||||
@@ -85,21 +85,6 @@ return array(
|
||||
'default' => 100,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_autoresponder_enabled' => array(
|
||||
'label' => $lng['serversettings']['autoresponder_active'],
|
||||
'settinggroup' => 'autoresponder',
|
||||
'varname' => 'autoresponder_active',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/autoresponder',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_last_autoresponder_run' => array(
|
||||
'settinggroup' => 'autoresponder',
|
||||
'varname' => 'last_autoresponder_run',
|
||||
'type' => 'hidden',
|
||||
'default' => 0,
|
||||
),
|
||||
'system_catchall_enabled' => array(
|
||||
'label' => $lng['serversettings']['catchall_enabled'],
|
||||
'settinggroup' => 'catchall',
|
||||
|
||||
@@ -1,102 +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
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'aps' => array(
|
||||
'title' => $lng['admin']['aps'],
|
||||
'fields' => array(
|
||||
'aps_enable' => array(
|
||||
'label' => $lng['aps']['activate_aps'],
|
||||
'settinggroup' => 'aps',
|
||||
'varname' => 'aps_active',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/aps',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'aps_items_per_page' => array(
|
||||
'label' => $lng['aps']['packages_per_page'],
|
||||
'settinggroup' => 'aps',
|
||||
'varname' => 'items_per_page',
|
||||
'type' => 'int',
|
||||
'default' => 20,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'aps_upload_fields' => array(
|
||||
'label' => $lng['aps']['upload_fields'],
|
||||
'settinggroup' => 'aps',
|
||||
'varname' => 'upload_fields',
|
||||
'type' => 'int',
|
||||
'default' => 5,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'aps_exceptions' => array(
|
||||
'label' => $lng['aps']['exceptions'],
|
||||
'type' => 'label',
|
||||
),
|
||||
'aps_php-extension' => array(
|
||||
'label' => $lng['aps']['settings_php_extensions'],
|
||||
'settinggroup' => 'aps',
|
||||
'varname' => 'php-extension',
|
||||
'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', 'Zend Optimizer' => 'Zend Guard'),
|
||||
'save_method' => 'storeSettingApsPhpExtensions',
|
||||
),
|
||||
'aps_php-function' => array(
|
||||
'settinggroup' => 'aps',
|
||||
'varname' => 'php-function',
|
||||
'type' => 'hidden',
|
||||
'default' => '',
|
||||
),
|
||||
'aps_php-configuration' => array(
|
||||
'label' => $lng['aps']['settings_php_configuration'],
|
||||
'settinggroup' => 'aps',
|
||||
'varname' => 'php-configuration',
|
||||
'type' => 'option',
|
||||
'default' => '',
|
||||
'option_mode' => 'multiple',
|
||||
'option_options' => array('short_open_tag' => 'short_open_tag', 'file_uploads' => 'file_uploads', 'magic_quotes_gpc' => 'magic_quotes_gpc', 'register_globals' => 'register_globals', 'allow_url_fopen' => 'allow_url_fopen', 'safe_mode' => 'safe_mode', 'post_max_size' => 'post_max_size', 'memory_limit' => 'memory_limit', 'max_execution_time' => 'max_execution_time'),
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'aps_webserver-module' => array(
|
||||
'label' => $lng['aps']['settings_webserver_modules'],
|
||||
'settinggroup' => 'aps',
|
||||
'varname' => 'webserver-module',
|
||||
'type' => 'option',
|
||||
'default' => '',
|
||||
'option_mode' => 'multiple',
|
||||
'option_options' => array('mod_perl' => 'mod_perl', 'mod_rewrite' => 'mod_rewrite', 'mod_access' => 'mod_access', 'fcgid-any' => 'FastCGI/mod_fcgid', 'htaccess' => '.htaccess'),
|
||||
'save_method' => 'storeSettingApsWebserverModules',
|
||||
),
|
||||
'aps_webserver-htaccess' => array(
|
||||
'settinggroup' => 'aps',
|
||||
'varname' => 'webserver-htaccess',
|
||||
'type' => 'hidden',
|
||||
'default' => '',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -1,118 +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
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'backup' => array(
|
||||
'title' => $lng['backup'],
|
||||
'fields' => array(
|
||||
'backup_enabled' => array(
|
||||
'label' => $lng['serversettings']['backup_enabled'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/backup',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'backup_dir' => array(
|
||||
'label' => $lng['serversettings']['backupdir']['description'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_dir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/customers/backups/',
|
||||
'string_regexp' => '#^/.*/$#',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'backup_mysqldump_path' => array(
|
||||
'label' => $lng['serversettings']['mysqldump_path']['description'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_mysqldump_path',
|
||||
'type' => 'string',
|
||||
'default' => '/usr/bin/mysqldump',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'backup_count' => array(
|
||||
'label' => $lng['serversettings']['backup_count'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_count',
|
||||
'type' => 'bool',
|
||||
'default' => 'true',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false
|
||||
),
|
||||
'backup_bigfile' => array(
|
||||
'label' => $lng['serversettings']['backup_bigfile'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_bigfile',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false
|
||||
),
|
||||
'backup_ftp_enabled_' => array(
|
||||
'label' => $lng['serversettings']['backup_ftp_enabled'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_ftp_enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false
|
||||
),
|
||||
'backup_server' => array(
|
||||
'label' => $lng['serversettings']['backup_ftp_server'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_ftp_server',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'backup_user' => array(
|
||||
'label' => $lng['serversettings']['backup_ftp_user'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_ftp_user',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'backup_pass' => array(
|
||||
'label' => $lng['serversettings']['backup_ftp_pass'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_ftp_pass',
|
||||
'type' => 'hiddenstring',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'backup_passive_mode' => array(
|
||||
'label' => $lng['serversettings']['backup_ftp_passive_mode'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_ftp_passive',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -81,7 +81,7 @@ if ($page == 'admins'
|
||||
$traffic_doublepercent = 0;
|
||||
}
|
||||
|
||||
$row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps subdomains tickets');
|
||||
$row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains tickets');
|
||||
$row = htmlentities_array($row);
|
||||
eval("\$admins.=\"" . getTemplate("admins/admins_admin") . "\";");
|
||||
$count++;
|
||||
@@ -233,16 +233,6 @@ if ($page == 'admins'
|
||||
$email_quota = - 1;
|
||||
}
|
||||
|
||||
if ($settings['autoresponder']['autoresponder_active'] == '1') {
|
||||
|
||||
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
|
||||
if (isset($_POST['email_autoresponder_ul'])) {
|
||||
$email_autoresponder = - 1;
|
||||
}
|
||||
} else {
|
||||
$email_autoresponder = 0;
|
||||
}
|
||||
|
||||
$ftps = intval_ressource($_POST['ftps']);
|
||||
if (isset($_POST['ftps_ul'])) {
|
||||
$ftps = - 1;
|
||||
@@ -263,19 +253,6 @@ if ($page == 'admins'
|
||||
$mysqls = - 1;
|
||||
}
|
||||
|
||||
if ($settings['aps']['aps_active'] == '1') {
|
||||
|
||||
$number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']);
|
||||
if (isset($_POST['number_of_aps_packages_ul'])) {
|
||||
$number_of_aps_packages = - 1;
|
||||
}
|
||||
$can_manage_aps_packages = isset($_POST['can_manage_aps_packages']) ? 1 : 0;
|
||||
|
||||
} else {
|
||||
$number_of_aps_packages = 0;
|
||||
$can_manage_aps_packages = 0;
|
||||
}
|
||||
|
||||
$customers_see_all = 0;
|
||||
if (isset($_POST['customers_see_all'])) {
|
||||
$customers_see_all = intval($_POST['customers_see_all']);
|
||||
@@ -401,9 +378,6 @@ if ($page == 'admins'
|
||||
'tickets_see_all' => $tickets_see_all,
|
||||
'mysqls' => $mysqls,
|
||||
'ip' => $ipaddress,
|
||||
'can_manage_aps_packages' => $can_manage_aps_packages,
|
||||
'aps_packages' => $number_of_aps_packages,
|
||||
'autoresponder' => $email_autoresponder,
|
||||
'theme' => $_theme
|
||||
);
|
||||
|
||||
@@ -432,9 +406,6 @@ if ($page == 'admins'
|
||||
`tickets_see_all` = :tickets_see_all,
|
||||
`mysqls` = :mysqls,
|
||||
`ip` = :ip,
|
||||
`can_manage_aps_packages` = :can_manage_aps_packages,
|
||||
`aps_packages` = :aps_packages,
|
||||
`email_autoresponder` = :autoresponder,
|
||||
`theme` = :theme
|
||||
");
|
||||
Database::pexecute($ins_stmt, $ins_data);
|
||||
@@ -476,11 +447,9 @@ if ($page == 'admins'
|
||||
$email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
|
||||
$admin_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_add.php';
|
||||
$admin_add_form = htmlform::genHTMLForm($admin_add_data);
|
||||
@@ -520,7 +489,6 @@ if ($page == 'admins'
|
||||
$email_accounts = $result['email_accounts'];
|
||||
$email_forwarders = $result['email_forwarders'];
|
||||
$email_quota = $result['email_quota'];
|
||||
$email_autoresponder = $result['email_autoresponder'];
|
||||
$ftps = $result['ftps'];
|
||||
$tickets = $result['tickets'];
|
||||
$mysqls = $result['mysqls'];
|
||||
@@ -532,8 +500,6 @@ if ($page == 'admins'
|
||||
$diskspace = $result['diskspace'];
|
||||
$traffic = $result['traffic'];
|
||||
$ipaddress = $result['ip'];
|
||||
$can_manage_aps_packages = $result['can_manage_aps_packages'];
|
||||
$number_of_aps_packages = $result['aps_packages'];
|
||||
|
||||
} else {
|
||||
|
||||
@@ -580,15 +546,6 @@ if ($page == 'admins'
|
||||
$email_quota = -1;
|
||||
}
|
||||
|
||||
if ($settings['autoresponder']['autoresponder_active'] == '1') {
|
||||
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
|
||||
if (isset($_POST['email_autoresponder_ul'])) {
|
||||
$email_autoresponder = -1;
|
||||
}
|
||||
} else {
|
||||
$email_autoresponder = 0;
|
||||
}
|
||||
|
||||
$ftps = intval_ressource($_POST['ftps']);
|
||||
if (isset($_POST['ftps_ul'])) {
|
||||
$ftps = -1;
|
||||
@@ -608,16 +565,6 @@ if ($page == 'admins'
|
||||
$mysqls = - 1;
|
||||
}
|
||||
|
||||
if ($settings['aps']['aps_active'] == '1') {
|
||||
$number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']);
|
||||
if (isset($_POST['number_of_aps_packages_ul'])) {
|
||||
$number_of_aps_packages = -1;
|
||||
}
|
||||
$can_manage_aps_packages = isset($_POST['can_manage_aps_packages']) ? 1 : 0;
|
||||
} else {
|
||||
$number_of_aps_packages = 0;
|
||||
}
|
||||
|
||||
$customers_see_all = 0;
|
||||
if (isset($_POST['customers_see_all'])) {
|
||||
$customers_see_all = intval($_POST['customers_see_all']);
|
||||
@@ -723,9 +670,6 @@ if ($page == 'admins'
|
||||
if ($email_quota != $result['email_quota'] && $email_quota < $result['email_quota_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email quota');
|
||||
}
|
||||
if ($email_autoresponder != $result['email_autoresponder'] && $email_autoresponder < $result['email_autoresponder_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email autoresponder');
|
||||
}
|
||||
if ($ftps != $result['ftps'] && $ftps < $result['ftps_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'ftps');
|
||||
}
|
||||
@@ -735,9 +679,6 @@ if ($page == 'admins'
|
||||
if ($mysqls != $result['mysqls'] && $mysqls < $result['mysqls_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'mysqls');
|
||||
}
|
||||
if ($number_of_aps_packages != $result['aps_packages'] && $number_of_aps_packages < $result['aps_packages_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'aps packages');
|
||||
}
|
||||
|
||||
if ($res_warning != "") {
|
||||
$link = '';
|
||||
@@ -770,9 +711,6 @@ if ($page == 'admins'
|
||||
'mysqls' => $mysqls,
|
||||
'ip' => $ipaddress,
|
||||
'deactivated' => $deactivated,
|
||||
'can_manage_aps_packages' => $can_manage_aps_packages,
|
||||
'aps_packages' => $number_of_aps_packages,
|
||||
'autoresponder' => $email_autoresponder,
|
||||
'adminid' => $id
|
||||
);
|
||||
|
||||
@@ -800,10 +738,7 @@ if ($page == 'admins'
|
||||
`tickets_see_all` = :tickets_see_all,
|
||||
`mysqls` = :mysqls,
|
||||
`ip` = :ip,
|
||||
`deactivated` = :deactivated,
|
||||
`can_manage_aps_packages` = :can_manage_aps_packages,
|
||||
`aps_packages` = :aps_packages,
|
||||
`email_autoresponder` = :autoresponder
|
||||
`deactivated` = :deactivated
|
||||
WHERE `adminid` = :adminid
|
||||
");
|
||||
Database::pexecute($upd_stmt, $upd_data);
|
||||
@@ -863,11 +798,6 @@ if ($page == 'admins'
|
||||
$result['email_quota'] = '';
|
||||
}
|
||||
|
||||
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, $result['email_autoresponder'], true, true);
|
||||
if ($result['email_autoresponder'] == '-1') {
|
||||
$result['email_autoresponder'] = '';
|
||||
}
|
||||
|
||||
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
|
||||
if ($result['ftps'] == '-1') {
|
||||
$result['ftps'] = '';
|
||||
@@ -883,11 +813,6 @@ if ($page == 'admins'
|
||||
$result['mysqls'] = '';
|
||||
}
|
||||
|
||||
$number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, $result['aps_packages'], true, true);
|
||||
if ($result['aps_packages'] == '-1') {
|
||||
$result['aps_packages'] = '';
|
||||
}
|
||||
|
||||
$language_options = '';
|
||||
while (list($language_file, $language_name) = each($languages)) {
|
||||
$language_options.= makeoption($language_name, $language_file, $result['def_language'], true);
|
||||
|
||||
@@ -1,33 +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 Panel
|
||||
*
|
||||
*/
|
||||
|
||||
// Required code
|
||||
|
||||
define('AREA', 'admin');
|
||||
require './lib/init.php';
|
||||
$Id = 0;
|
||||
|
||||
if(isset($_GET['id']))$Id = (int)$_GET['id'];
|
||||
|
||||
if(isset($_POST['id']))$Id = (int)$_POST['id'];
|
||||
eval("echo \"" . getTemplate("aps/header") . "\";");
|
||||
$Aps = new ApsParser($userinfo, $settings);
|
||||
$Aps->MainHandler($action);
|
||||
eval("echo \"" . getTemplate("aps/footer") . "\";");
|
||||
|
||||
@@ -1,34 +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 Panel
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'customer');
|
||||
require './lib/init.php';
|
||||
|
||||
$Id = 0;
|
||||
if (isset($_GET['id'])) {
|
||||
$Id = (int)$_GET['id'];
|
||||
}
|
||||
if (isset($_POST['id'])) {
|
||||
$Id = (int)$_POST['id'];
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate('aps/header') . "\";");
|
||||
$Aps = new ApsParser($userinfo, $settings);
|
||||
$Aps->MainHandler($action);
|
||||
eval("echo \"" . getTemplate('aps/footer') . "\";");
|
||||
@@ -29,36 +29,6 @@ if(isset($_POST['id'])) {
|
||||
if($page == 'overview') {
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras");
|
||||
eval("echo \"" . getTemplate("extras/extras") . "\";");
|
||||
} elseif($page == 'backup') {
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras_backup");
|
||||
|
||||
$result_stmt = Database::prepare("SELECT `backup_enabled` FROM `" . TABLE_PANEL_CUSTOMERS . "`
|
||||
WHERE `customerid`= :customerid"
|
||||
);
|
||||
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid']));
|
||||
$row = $result_stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
$backup_enabled = makeyesno('backup_enabled', '1', '0', $row['backup_enabled']);
|
||||
|
||||
if(isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
$backup_enabled = ($_POST['backup_enabled'] == '1' ? '1' : '0');
|
||||
|
||||
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "`
|
||||
SET `backup_enabled`= :backupenabled
|
||||
WHERE `customerid`= :customerid"
|
||||
);
|
||||
Database::pexecute($stmt, array("backupenabled" => $backup_enabled, "customerid" => $userinfo['customerid']));
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
|
||||
$backup_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.backup.php';
|
||||
$backup_form = htmlform::genHTMLForm($backup_data);
|
||||
|
||||
$title = $backup_data['backup']['title'];
|
||||
$image = $backup_data['backup']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("extras/backup") . "\";");
|
||||
} elseif($page == 'htpasswds') {
|
||||
if($action == '') {
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras::htpasswds");
|
||||
@@ -67,7 +37,7 @@ if($page == 'overview') {
|
||||
'path' => $lng['panel']['path']
|
||||
);
|
||||
$paging = new paging($userinfo, TABLE_PANEL_HTPASSWDS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "`
|
||||
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "`
|
||||
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()
|
||||
);
|
||||
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid']));
|
||||
@@ -110,7 +80,7 @@ if($page == 'overview') {
|
||||
AND `id`= :id"
|
||||
);
|
||||
Database::pexecute($stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
|
||||
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
|
||||
inserttask('1');
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
@@ -130,7 +100,7 @@ if($page == 'overview') {
|
||||
$username = validate($_POST['username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
|
||||
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
|
||||
validate($_POST['directory_password'], 'password');
|
||||
|
||||
|
||||
$username_path_check_stmt = Database::prepare("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "`
|
||||
WHERE `username`= :username
|
||||
AND `path`= :path
|
||||
@@ -213,18 +183,18 @@ if($page == 'overview') {
|
||||
} else {
|
||||
$password = crypt($_POST['directory_password']);
|
||||
}
|
||||
|
||||
|
||||
$params = array(
|
||||
"customerid" => $userinfo['customerid'],
|
||||
"id" => $id
|
||||
);
|
||||
|
||||
|
||||
$pwd_sql = '';
|
||||
if($_POST['directory_password'] != '') {
|
||||
$pwd_sql = "`password`= :password ";
|
||||
$params["password"] = $password;
|
||||
}
|
||||
|
||||
|
||||
$auth_sql = '';
|
||||
if($authname != $result['authname']) {
|
||||
$auth_sql = "`authname`= :authname ";
|
||||
@@ -344,7 +314,7 @@ if($page == 'overview') {
|
||||
);
|
||||
Database::pexecute($path_dupe_check_stmt, array("path" => $path, "customerid" => $userinfo['customerid']));
|
||||
$path_dupe_check = $path_dupe_check_stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
|
||||
if(!$_POST['path']) {
|
||||
standard_error('invalidpath');
|
||||
}
|
||||
@@ -353,18 +323,18 @@ if($page == 'overview') {
|
||||
$options_cgi = '1';
|
||||
} else {
|
||||
$options_cgi = '0';
|
||||
}
|
||||
}
|
||||
|
||||
$error404path = '';
|
||||
if (isset($_POST['error404path'])) {
|
||||
$error404path = correctErrorDocument($_POST['error404path']);
|
||||
}
|
||||
|
||||
|
||||
$error403path = '';
|
||||
if (isset($_POST['error403path'])) {
|
||||
$error403path = correctErrorDocument($_POST['error403path']);
|
||||
}
|
||||
|
||||
|
||||
$error500path = '';
|
||||
if (isset($_POST['error500path'])) {
|
||||
$error500path = correctErrorDocument($_POST['error500path']);
|
||||
@@ -402,10 +372,6 @@ if($page == 'overview') {
|
||||
} else {
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
|
||||
/*
|
||||
$options_indexes = makeyesno('options_indexes', '1', '0', '0');
|
||||
$options_cgi = makeyesno('options_cgi', '1', '0', '0');
|
||||
*/
|
||||
|
||||
$htaccess_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_add.php';
|
||||
$htaccess_add_form = htmlform::genHTMLForm($htaccess_add_data);
|
||||
@@ -417,7 +383,7 @@ if($page == 'overview') {
|
||||
}
|
||||
} elseif(($action == 'edit') && ($id != 0)) {
|
||||
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "`
|
||||
WHERE `customerid` = :customerid
|
||||
WHERE `customerid` = :customerid
|
||||
AND `id` = :id"
|
||||
);
|
||||
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
|
||||
@@ -444,8 +410,9 @@ if($page == 'overview') {
|
||||
|| ($error404path != $result['error404path'])
|
||||
|| ($error403path != $result['error403path'])
|
||||
|| ($error500path != $result['error500path'])
|
||||
|| ($options_cgi != $result['options_cgi'])) {
|
||||
|
||||
|| ($options_cgi != $result['options_cgi'])
|
||||
) {
|
||||
|
||||
inserttask('1');
|
||||
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_HTACCESS . "`
|
||||
SET `options_indexes` = :options_indexes,
|
||||
@@ -489,7 +456,7 @@ if($page == 'overview') {
|
||||
|
||||
$htaccess_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_edit.php';
|
||||
$htaccess_edit_form = htmlform::genHTMLForm($htaccess_edit_data);
|
||||
|
||||
|
||||
$title = $htaccess_edit_data['htaccess_edit']['title'];
|
||||
$image = $htaccess_edit_data['htaccess_edit']['image'];
|
||||
|
||||
@@ -498,5 +465,3 @@ if($page == 'overview') {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -38,21 +38,21 @@ if ($action == 'logout') {
|
||||
);
|
||||
}
|
||||
Database::pexecute($stmt, $params);
|
||||
|
||||
|
||||
redirectTo('index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($page == 'overview') {
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_index");
|
||||
|
||||
|
||||
$domain_stmt = Database::prepare("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "`
|
||||
WHERE `customerid` = :customerid
|
||||
AND `parentdomainid` = '0'
|
||||
AND `id` <> :standardsubdomain
|
||||
");
|
||||
Database::pexecute($domain_stmt, array("customerid" => $userinfo['customerid'], "standardsubdomain" => $userinfo['standardsubdomain']));
|
||||
|
||||
|
||||
$domains = '';
|
||||
$domainArray = array();
|
||||
|
||||
@@ -91,7 +91,6 @@ if ($page == 'overview') {
|
||||
if ($userinfo['pop3'] == '1') $se[] = "POP3";
|
||||
if ($userinfo['phpenabled'] == '1') $se[] = "PHP";
|
||||
if ($userinfo['perlenabled'] == '1') $se[] = "Perl/CGI";
|
||||
if ($userinfo['backup_enabled'] == '1' && $userinfo['backup_allowed'] == '1') $se[] = "Backup";
|
||||
$services_enabled = implode(", ", $se);
|
||||
|
||||
eval("echo \"" . getTemplate('index/index') . "\";");
|
||||
@@ -154,7 +153,7 @@ if ($page == 'overview') {
|
||||
} else {
|
||||
$new_webalizer_password = crypt($new_password);
|
||||
}
|
||||
|
||||
|
||||
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_HTPASSWDS . "`
|
||||
SET `password` = :password
|
||||
WHERE `customerid` = :customerid
|
||||
@@ -182,20 +181,20 @@ if ($page == 'overview') {
|
||||
WHERE `customerid` = :customerid"
|
||||
);
|
||||
Database::pexecute($stmt, array("lang" => $def_language, "customerid" => $userinfo['customerid']));
|
||||
|
||||
|
||||
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_SESSIONS . "`
|
||||
SET `language` = :lang
|
||||
WHERE `hash` = :hash"
|
||||
);
|
||||
Database::pexecute($stmt, array("lang" => $def_language, "hash" => $s));
|
||||
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default language to '" . $def_language . "'");
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('s' => $s));
|
||||
} else {
|
||||
$default_lang = $settings['panel']['standardlanguage'];
|
||||
if ($userinfo['def_language'] != '') {
|
||||
if ($userinfo['def_language'] != '') {
|
||||
$default_lang = $userinfo['def_language'];
|
||||
}
|
||||
|
||||
@@ -209,19 +208,19 @@ if ($page == 'overview') {
|
||||
} elseif ($page == 'change_theme') {
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
$theme = validate($_POST['theme'], 'theme');
|
||||
|
||||
|
||||
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "`
|
||||
SET `theme` = :theme
|
||||
WHERE `customerid` = :customerid"
|
||||
);
|
||||
Database::pexecute($stmt, array("theme" => $theme, "customerid" => $userinfo['customerid']));
|
||||
|
||||
|
||||
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_SESSIONS . "`
|
||||
SET `theme` = :theme
|
||||
WHERE `hash` = :hash"
|
||||
);
|
||||
Database::pexecute($stmt, array("theme" => $theme, "hash" => $s));
|
||||
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default theme to '" . $theme . "'");
|
||||
redirectTo($filename, Array('s' => $s));
|
||||
} else {
|
||||
|
||||
@@ -128,11 +128,6 @@ CREATE TABLE `panel_admins` (
|
||||
`lastlogin_fail` int(11) unsigned NOT NULL default '0',
|
||||
`loginfail_count` int(11) unsigned NOT NULL default '0',
|
||||
`reportsent` tinyint(4) unsigned NOT NULL default '0',
|
||||
`can_manage_aps_packages` tinyint(1) NOT NULL default '1',
|
||||
`aps_packages` int(5) NOT NULL default '0',
|
||||
`aps_packages_used` int(5) NOT NULL default '0',
|
||||
`email_autoresponder` int(5) NOT NULL default '0',
|
||||
`email_autoresponder_used` int(5) NOT NULL default '0',
|
||||
`theme` varchar(255) NOT NULL default 'Sparkle',
|
||||
PRIMARY KEY (`adminid`),
|
||||
UNIQUE KEY `loginname` (`loginname`)
|
||||
@@ -191,14 +186,8 @@ CREATE TABLE `panel_customers` (
|
||||
`reportsent` tinyint(4) unsigned NOT NULL default '0',
|
||||
`pop3` tinyint(1) NOT NULL default '1',
|
||||
`imap` tinyint(1) NOT NULL default '1',
|
||||
`aps_packages` int(5) NOT NULL default '0',
|
||||
`aps_packages_used` int(5) NOT NULL default '0',
|
||||
`perlenabled` tinyint(1) NOT NULL default '0',
|
||||
`email_autoresponder` int(5) NOT NULL default '0',
|
||||
`email_autoresponder_used` int(5) NOT NULL default '0',
|
||||
`theme` varchar(255) NOT NULL default 'Sparkle',
|
||||
`backup_allowed` TINYINT( 1 ) NOT NULL DEFAULT '1',
|
||||
`backup_enabled` TINYINT( 1 ) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`customerid`),
|
||||
UNIQUE KEY `loginname` (`loginname`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
@@ -212,7 +201,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`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
@@ -374,18 +362,8 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('dkim', 'dkim_domains', 'domains'),
|
||||
('dkim', 'dkim_dkimkeys', 'dkim-keys.conf'),
|
||||
('dkim', 'dkimrestart_command', '/etc/init.d/dkim-filter restart'),
|
||||
('autoresponder', 'autoresponder_active', '0'),
|
||||
('autoresponder', 'last_autoresponder_run', '0'),
|
||||
('admin', 'show_version_login', '0'),
|
||||
('admin', 'show_version_footer', '0'),
|
||||
('aps', 'items_per_page', '20'),
|
||||
('aps', 'upload_fields', '5'),
|
||||
('aps', 'aps_active', '0'),
|
||||
('aps', 'php-extension', ''),
|
||||
('aps', 'php-configuration', ''),
|
||||
('aps', 'webserver-htaccess', ''),
|
||||
('aps', 'php-function', ''),
|
||||
('aps', 'webserver-module', ''),
|
||||
('spf', 'use_spf', '0'),
|
||||
('spf', 'spf_entry', '@ IN TXT "v=spf1 a mx -all"'),
|
||||
('dkim', 'dkim_algorithm', 'all'),
|
||||
@@ -491,16 +469,6 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('system', 'report_webmax', '90'),
|
||||
('system', 'report_trafficmax', '90'),
|
||||
('system', 'validate_domain', '1'),
|
||||
('system', 'backup_enabled', '0'),
|
||||
('system', 'backup_dir', '/var/customers/backups/'),
|
||||
('system', 'backup_mysqldump_path', '/usr/bin/mysqldump'),
|
||||
('system', 'backup_count', '1'),
|
||||
('system', 'backup_bigfile', '1'),
|
||||
('system', 'backup_ftp_enabled', '0'),
|
||||
('system', 'backup_ftp_server', ''),
|
||||
('system', 'backup_ftp_user', ''),
|
||||
('system', 'backup_ftp_pass', ''),
|
||||
('system', 'backup_ftp_passive', '1'),
|
||||
('system', 'diskquota_enabled', '0'),
|
||||
('system', 'diskquota_repquota_path', '/usr/sbin/repquota'),
|
||||
('system', 'diskquota_quotatool_path', '/usr/bin/quotatool'),
|
||||
@@ -552,7 +520,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('panel', 'phpconfigs_hidestdsubdomain', '0'),
|
||||
('panel', 'allow_theme_change_admin', '1'),
|
||||
('panel', 'allow_theme_change_customer', '1'),
|
||||
('panel', 'version', '0.9.31-rc1');
|
||||
('panel', 'version', '0.9.31-rc99');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_tasks`;
|
||||
@@ -727,23 +695,6 @@ CREATE TABLE IF NOT EXISTS `panel_syslog` (
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `mail_autoresponder`;
|
||||
CREATE TABLE `mail_autoresponder` (
|
||||
`email` varchar(255) NOT NULL default '',
|
||||
`message` text NOT NULL,
|
||||
`enabled` tinyint(1) NOT NULL default '0',
|
||||
`date_from` int(15) NOT NULL default '-1',
|
||||
`date_until` int(15) NOT NULL default '-1',
|
||||
`subject` varchar(255) NOT NULL default '',
|
||||
`customerid` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (`email`),
|
||||
KEY `customerid` (`customerid`),
|
||||
FULLTEXT KEY `message` (`message`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_phpconfigs`;
|
||||
CREATE TABLE `panel_phpconfigs` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
@@ -765,63 +716,6 @@ INSERT INTO `panel_phpconfigs` (`id`, `description`, `binary`, `file_extensions`
|
||||
(1, 'Default Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = Off\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_exec,curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 16M\r\n{OPEN_BASEDIR_C}open_basedir = "{OPEN_BASEDIR}"\r\noutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n');
|
||||
|
||||
|
||||
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,
|
||||
`PackageID` int(4) NOT NULL,
|
||||
`Status` int(4) NOT NULL,
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
|
||||
|
||||
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,
|
||||
`Name` varchar(500) NOT NULL,
|
||||
`Version` varchar(20) NOT NULL,
|
||||
`Release` int(4) NOT NULL,
|
||||
`Status` int(1) NOT NULL default '1',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
|
||||
|
||||
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,
|
||||
`Name` varchar(250) NOT NULL,
|
||||
`Value` varchar(250) NOT NULL,
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
|
||||
|
||||
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,
|
||||
`Task` int(4) NOT NULL,
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
|
||||
|
||||
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,
|
||||
`CustomerID` int(4) NOT NULL,
|
||||
`Name` varchar(250) NOT NULL,
|
||||
`Value` varchar(250) NOT NULL,
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `cronjobs_run`;
|
||||
CREATE TABLE IF NOT EXISTS `cronjobs_run` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
@@ -835,18 +729,13 @@ CREATE TABLE IF NOT EXISTS `cronjobs_run` (
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
|
||||
|
||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES
|
||||
(1, 'froxlor/core', 'cron_tasks.php', '5 MINUTE', '1', 'cron_tasks'),
|
||||
(2, 'froxlor/aps', 'cron_apsinstaller.php', '5 MINUTE', '0', 'cron_apsinstaller'),
|
||||
(3, 'froxlor/autoresponder', 'cron_autoresponder.php', '5 MINUTE', '0', 'cron_autoresponder'),
|
||||
(4, 'froxlor/aps', 'cron_apsupdater.php', '1 HOUR', '0', 'cron_apsupdater'),
|
||||
(5, 'froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic'),
|
||||
(6, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 DAY', '1', 'cron_ticketsreset'),
|
||||
(7, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '1', 'cron_ticketarchive'),
|
||||
(8, 'froxlor/reports', 'cron_usage_report.php', '1 DAY', '1', 'cron_usage_report'),
|
||||
(9, 'froxlor/backup', 'cron_backup.php', '1 DAY', '1', 'cron_backup'),
|
||||
(10, 'froxlor/core', 'cron_mailboxsize.php', '6 HOUR', '1', 'cron_mailboxsize');
|
||||
(2, 'froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic'),
|
||||
(3, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 DAY', '1', 'cron_ticketsreset'),
|
||||
(4, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '1', 'cron_ticketarchive'),
|
||||
(5, 'froxlor/reports', 'cron_usage_report.php', '1 DAY', '1', 'cron_usage_report'),
|
||||
(6, 'froxlor/core', 'cron_mailboxsize.php', '6 HOUR', '1', 'cron_mailboxsize');
|
||||
|
||||
|
||||
|
||||
@@ -931,3 +820,4 @@ CREATE TABLE IF NOT EXISTS `panel_domaintoip` (
|
||||
`id_ipandports` int(11) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id_domain`,`id_ipandports`)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
|
||||
@@ -2519,3 +2519,50 @@ if (isFroxlorVersion('0.9.31-dev6')) {
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9.31-rc1');
|
||||
}
|
||||
|
||||
if (isFroxlorVersion('0.9.31-rc1')) {
|
||||
showUpdateStep("Updating from 0.9.31-rc1 to 0.9.31-rc99");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Removing APS-module (deprecated)");
|
||||
Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `settinggroup` = 'aps';");
|
||||
Database::query("ALTER TABLE `".TABLE_PANEL_ADMINS."` DROP `can_manage_aps_packages`;");
|
||||
Database::query("ALTER TABLE `".TABLE_PANEL_ADMINS."` DROP `aps_packages`;");
|
||||
Database::query("ALTER TABLE `".TABLE_PANEL_ADMINS."` DROP `aps_packages_used`;");
|
||||
Database::query("ALTER TABLE `".TABLE_PANEL_CUSTOMERS."` DROP `aps_packages`;");
|
||||
Database::query("ALTER TABLE `".TABLE_PANEL_CUSTOMERS."` DROP `aps_packages_used`;");
|
||||
// FIXME what to do with APS-databases? (before dropping the field)
|
||||
Database::query("ALTER TABLE `".TABLE_PANEL_DATABASES."` DROP `apsdb`;");
|
||||
Database::query("DROP TABLE IF EXISTS `aps_packages`;");
|
||||
Database::query("DROP TABLE IF EXISTS `aps_instances`;");
|
||||
Database::query("DROP TABLE IF EXISTS `aps_settings`;");
|
||||
Database::query("DROP TABLE IF EXISTS `aps_tasks`;");
|
||||
Database::query("DROP TABLE IF EXISTS `aps_temp_settings`;");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Removing backup-module (deprecated)");
|
||||
Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `varname` = 'backup_enabled';");
|
||||
Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `varname` = 'backup_dir';");
|
||||
Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `varname` = 'backup_mysqldump_path';");
|
||||
Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `varname` = 'backup_count';");
|
||||
Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `varname` = 'backup_bigfile';");
|
||||
Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `varname` = 'backup_ftp_enabled';");
|
||||
Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `varname` = 'backup_ftp_server';");
|
||||
Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `varname` = 'backup_ftp_user';");
|
||||
Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `varname` = 'backup_ftp_pass';");
|
||||
Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `varname` = 'backup_ftp_passive';");
|
||||
Database::query("ALTER TABLE `".TABLE_PANEL_CUSTOMERS."` DROP `backup_allowed`;");
|
||||
Database::query("ALTER TABLE `".TABLE_PANEL_CUSTOMERS."` DROP `backup_enabled`;");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Removing autoresponder-module (deprecated)");
|
||||
Database::query("DELETE FROM `".TABLE_PANEL_SETTINGS."` WHERE `settinggroup` = 'autoresponder';");
|
||||
Database::query("ALTER TABLE `".TABLE_PANEL_ADMINS."` DROP `email_autoresponder`;");
|
||||
Database::query("ALTER TABLE `".TABLE_PANEL_ADMINS."` DROP `email_autoresponder_used`;");
|
||||
Database::query("ALTER TABLE `".TABLE_PANEL_CUSTOMERS."` DROP `email_autoresponder`;");
|
||||
Database::query("ALTER TABLE `".TABLE_PANEL_CUSTOMERS."` DROP `email_autoresponder_used`;");
|
||||
Database::query("DROP TABLE IF EXISTS `mail_autoresponder`;");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.31-rc99');
|
||||
}
|
||||
|
||||
@@ -1,691 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Implementation of the Application Packaging Standard from SwSoft/Parallels
|
||||
* http://apsstandard.com
|
||||
*
|
||||
* 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 APS
|
||||
*
|
||||
* @todo logging
|
||||
* run with user uid/gid
|
||||
* folder truncation/tar all files
|
||||
*/
|
||||
|
||||
class ApsInstaller extends ApsParser {
|
||||
|
||||
private $DomainPath = '';
|
||||
private $Domain = '';
|
||||
private $RealPath = '';
|
||||
private $RootDir = '';
|
||||
private $Hosts = '';
|
||||
private $aps_version = '1.0';
|
||||
|
||||
/**
|
||||
* constructor of class. setup some basic variables
|
||||
*
|
||||
* @param settings array with the global settings from froxlor
|
||||
*/
|
||||
public function __construct($settings) {
|
||||
|
||||
$this->RootDir = dirname(dirname(dirname(dirname(__FILE__)))) . '/';
|
||||
$this->Hosts = $settings['system']['mysql_access_host'];
|
||||
}
|
||||
|
||||
/**
|
||||
* main function of class which handles all
|
||||
*/
|
||||
public function InstallHandler() {
|
||||
|
||||
chdir($this->RootDir);
|
||||
$result_stmt = Database::query("
|
||||
SELECT * FROM `" . TABLE_APS_TASKS . "` AS `t`
|
||||
INNER JOIN `" . TABLE_APS_INSTANCES . "` AS `i` ON `t`.`InstanceID` = `i`.`ID`
|
||||
INNER JOIN `" . TABLE_APS_PACKAGES . "` AS `p` ON `i`.`PackageID` = `p`.`ID`
|
||||
INNER JOIN `" . TABLE_PANEL_CUSTOMERS . "` AS `c` ON `i`.`CustomerID` = `c`.`customerid`
|
||||
WHERE `TASK` NOT IN (" . TASK_SYSTEM_UPDATE . ", " . TASK_SYSTEM_DOWNLOAD . ")
|
||||
");
|
||||
|
||||
while ($Row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
//check for existing aps xml file
|
||||
if (!file_exists($this->RootDir . 'packages/' . $Row['Path'] . '/APP-META.xml')) {
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_APS_INSTANCES . "` SET `Status` = " . INSTANCE_ERROR . " WHERE `ID` = :id
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('id' => $Row['InstanceID']));
|
||||
continue;
|
||||
}
|
||||
|
||||
//get contents and parse them
|
||||
$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
|
||||
if ($Xml == false) {
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_APS_INSTANCES . "` SET `Status` = " . INSTANCE_ERROR . " WHERE `ID` = :id
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('id' => $Row['InstanceID']));
|
||||
continue;
|
||||
}
|
||||
|
||||
$Task = $Row['Task'];
|
||||
$this->DomainPath = '';
|
||||
$this->Domain = '';
|
||||
$this->RealPath = '';
|
||||
|
||||
//lock instance so installation cannot be canceled from the panel
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_APS_INSTANCES . "` SET `Status` = " . INSTANCE_TASK_ACTIVE . " WHERE `ID` = :id
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('id' => $Row['InstanceID']));
|
||||
|
||||
//setup environment with data for domain/installation location
|
||||
self::PrepareBasics($Row);
|
||||
|
||||
//create database if necessary and setup environment variables
|
||||
self::PrepareDatabase($Xml, $Row, $Task);
|
||||
|
||||
//unpack installation scripts and package files if necessary
|
||||
if (self::PrepareFiles($Xml, $Row, $Task)) {
|
||||
//setup environment variables fetched from installation wizard
|
||||
self::PrepareWizardData($Xml, $Row, $Task);
|
||||
//run installation scripts from packages
|
||||
self::RunInstaller($Xml, $Row, $Task);
|
||||
}
|
||||
|
||||
//remove installation scripts
|
||||
self::CleanupData($Xml, $Row, $Task);
|
||||
unset($Xml);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* run the installation script and log errors if there are some
|
||||
*
|
||||
* @param xml instance of a valid xml object with a parsed APP-META.xml file
|
||||
* @param row current entry from the database for app to handle
|
||||
* @param task numeric code to specify what to do
|
||||
* @return success true/error false
|
||||
*/
|
||||
private function RunInstaller($Xml, $Row, $Task) {
|
||||
//installation
|
||||
|
||||
if ($Task == TASK_INSTALL) {
|
||||
//setup right path and run installation script
|
||||
if (!is_dir($this->RealPath . $this->DomainPath . '/install_scripts/')) {
|
||||
echo 'Directory: '. $this->RealPath . $this->DomainPath . '/install_scripts/ does not exist';
|
||||
return;
|
||||
}
|
||||
|
||||
chdir($this->RealPath . $this->DomainPath . '/install_scripts/');
|
||||
|
||||
// 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/'.$scriptname, 0755);
|
||||
|
||||
$Return = array();
|
||||
|
||||
// first 'true' to indicate that we want the return-status from exec.
|
||||
// after exec() is called, the value will be the return-status of the
|
||||
// program executed
|
||||
$ReturnStatus = true;
|
||||
|
||||
$Return = safe_exec('php ' . escapeshellarg($this->RealPath . $this->DomainPath . '/install_scripts/'.$scriptname) . ' install', $ReturnStatus);
|
||||
|
||||
if ($ReturnStatus != 0) {
|
||||
//write output of script on error into database for admin
|
||||
$Buffer = '';
|
||||
$Count = 0;
|
||||
foreach ($Return as $Line) {
|
||||
$Count+= 1;
|
||||
$Buffer.= $Line;
|
||||
if ($Count != count($Return)) {
|
||||
$Buffer.= "\n";
|
||||
}
|
||||
}
|
||||
|
||||
//FIXME error logging
|
||||
echo ("error : installer\n" . $Buffer . "\n");
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_APS_INSTANCES . "` SET `Status` = " . INSTANCE_ERROR . " WHERE `ID` = :id
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('id' => $Row['InstanceID']));
|
||||
return false;
|
||||
|
||||
} else {
|
||||
//installation succeeded
|
||||
//chown all files if installtion script has created some new files. otherwise customers cannot edit the files via ftp
|
||||
safe_exec('chown -R ' . (int)$Row['guid'] . ':' . (int)$Row['guid'] . ' ' . escapeshellarg($this->RealPath . $this->DomainPath . '/'));
|
||||
|
||||
//update database
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_APS_INSTANCES . "` SET `Status` = " . INSTANCE_SUCCESS . " WHERE `ID` = :id
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('id' => $Row['InstanceID']));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* remove installation scripts from filesystem and remove tasks and update the database
|
||||
*
|
||||
* @param xml instance of a valid xml object with a parsed APP-META.xml file
|
||||
* @param row current entry from the database for app to handle
|
||||
* @param task numeric code to specify what to do
|
||||
*/
|
||||
private function CleanupData($Xml, $Row, $Task) {
|
||||
|
||||
chdir($this->RootDir);
|
||||
|
||||
if ($Task == TASK_INSTALL) {
|
||||
//cleanup installation
|
||||
self::UnlinkRecursive($this->RealPath . $this->DomainPath . '/install_scripts/');
|
||||
//remove task
|
||||
$del_stmt = Database::prepare("
|
||||
DELETE FROM `" . TABLE_APS_TASKS . "` WHERE `Task` = " . TASK_INSTALL . " AND `InstanceID` = :id
|
||||
");
|
||||
Database::pexecute($del_stmt, array('id' => $Row['InstanceID']));
|
||||
|
||||
} 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 = new DynamicProperties;
|
||||
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||
}
|
||||
|
||||
if ($XmlDb->db->id) {
|
||||
//drop database permissions
|
||||
Database::needRoot(true);
|
||||
// FIXME ### here
|
||||
$Database = 'web' . $Row['CustomerID'] . 'aps' . $Row['InstanceID'];
|
||||
foreach (array_map('trim', explode(',', $this->Hosts)) as $DatabaseHost) {
|
||||
|
||||
if (Database::getAttribute(PDO::ATTR_SERVER_VERSION) < '5.0.2') {
|
||||
// Revoke privileges (only required for MySQL 4.1.2 - 5.0.1)
|
||||
$stmt = Database::prepare("REVOKE ALL PRIVILEGES, GRANT OPTION FROM :databasename");
|
||||
Database::pexecute($stmt, array("databasename" => $DatabaseHost));
|
||||
}
|
||||
|
||||
$host_res_stmt = Database::prepare("
|
||||
SELECT `Host` FROM `mysql`.`user`
|
||||
WHERE `User`= :databasename
|
||||
");
|
||||
Database::pexecute($host_res_stmt, array("databasename" => $DatabaseHost));
|
||||
|
||||
while ($host = $host_res_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
// as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+)
|
||||
$stmt = Database::prepare("DROP USER :databasename@:host");
|
||||
Database::pexecute($stmt, array("databasename" => $DatabaseHost, "host" => $host['Host']));
|
||||
}
|
||||
}
|
||||
|
||||
// drop database
|
||||
$stmt = Database::prepare("DROP DATABASE IF EXISTS `" . $DatabaseHost . "`");
|
||||
Database::pexecute($stmt, array(), false);
|
||||
$stmt = Database::prepare("FLUSH PRIVILEGES");
|
||||
Database::pexecute($stmt);
|
||||
Database::needRoot(false);
|
||||
|
||||
// remove database from customer-mysql overview, #272
|
||||
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_DATABASES . "`
|
||||
WHERE `customerid` = :customerid
|
||||
AND `databasename` = :databasename
|
||||
AND `apsdb` = '1'
|
||||
");
|
||||
Database::pexecute($stmt, array("customerid" => $Row['CustomerID'], "databasename" => $Database));
|
||||
|
||||
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "`
|
||||
SET `mysqls_used` = `mysqls_used` - 1
|
||||
WHERE `customerid` = :customerid"
|
||||
);
|
||||
Database::pexecute($stmt, array("customerid" => $Row['CustomerID']));
|
||||
}
|
||||
|
||||
// remove task & delete package instance + settings
|
||||
$del_stmt = Database::prepare("
|
||||
DELETE FROM `" . TABLE_APS_TASKS . "` WHERE `Task` = '" . TASK_REMOVE . "'
|
||||
AND `InstanceID` = :instanceid
|
||||
");
|
||||
Database::pexecute($del_stmt, array('instanceid' => $Row['InstanceID']));
|
||||
|
||||
$del_stmt = Database::prepare("
|
||||
DELETE FROM `" . TABLE_APS_INSTANCES . "` WHERE `ID` = :instanceid
|
||||
");
|
||||
Database::pexecute($del_stmt, array('instanceid' => $Row['InstanceID']));
|
||||
|
||||
$del_stmt = Database::prepare("
|
||||
DELETE FROM `" . TABLE_APS_SETTINGS . "` WHERE `InstanceID` = :instanceid
|
||||
");
|
||||
Database::pexecute($del_stmt, array('instanceid' => $Row['InstanceID']));
|
||||
|
||||
if ($this->RealPath != ''
|
||||
&& checkDisallowedPaths($this->RealPath)
|
||||
) {
|
||||
//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 . '/');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* setup all environment variables from the wizard, they're all needed by the installation script
|
||||
*
|
||||
* @param xml instance of a valid xml object with a parsed APP-META.xml file
|
||||
* @param row current entry from the database for app to handle
|
||||
* @param task numeric code to specify what to do
|
||||
*/
|
||||
private function PrepareWizardData($Xml, $Row, $Task) {
|
||||
|
||||
//data collected by wizard
|
||||
//FIXME install_only parameter/reconfigure
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT * FROM `" . TABLE_APS_SETTINGS . "` WHERE `InstanceID` = :instanceid
|
||||
");
|
||||
Database::pexecute($result_stmt, array('instanceid' => $Row['InstanceID']));
|
||||
|
||||
while ($Row2 = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
//skip APS internal data
|
||||
if ($Row2['Name'] == 'main_location'
|
||||
|| $Row2['Name'] == 'main_domain'
|
||||
|| $Row2['Name'] == 'main_database_password'
|
||||
|| $Row2['Name'] == 'license'
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
putenv('SETTINGS_' . $Row2['Name'] . '=' . $Row2['Value']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* extract all needed files from the aps packages
|
||||
*
|
||||
* @param xml instance of a valid xml object with a parsed APP-META.xml file
|
||||
* @param row current entry from the database for app to handle
|
||||
* @param task numeric code to specify what to do
|
||||
* @return success true/error false
|
||||
*/
|
||||
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 ($this->RealPath == '' || !checkDisallowedPaths($this->RealPath)) {
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_APS_INSTANCES . "` SET `Status` = " . INSTANCE_ERROR . " WHERE `ID` = :id
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('id' => $Row['InstanceID']));
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($Task == TASK_INSTALL) {
|
||||
//FIXME truncate customer directory
|
||||
//remove files from: $this->RealPath . $this->DomainPath . '/*'
|
||||
if (!file_exists($this->RealPath . $this->DomainPath . '/')) {
|
||||
mkdir($this->RealPath . $this->DomainPath . '/', 0777, true);
|
||||
}
|
||||
|
||||
//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
|
||||
|| self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], 'scripts', $this->RealPath . $this->DomainPath . '/install_scripts/') == false
|
||||
) {
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_APS_INSTANCES . "` SET `Status` = " . INSTANCE_ERROR . " WHERE `ID` = :id
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('id' => $Row['InstanceID']));
|
||||
|
||||
//FIXME clean up already installed data
|
||||
//remove files from: $this->RealPath . $this->DomainPath . '/*'
|
||||
return false;
|
||||
}
|
||||
|
||||
safe_exec('chown -R ' . (int)$Row['guid'] . ':' . (int)$Row['guid'] . ' ' . escapeshellarg($this->RealPath . $this->DomainPath . '/'));
|
||||
|
||||
} else {
|
||||
|
||||
if (self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], 'scripts', $this->RealPath . $this->DomainPath . '/install_scripts/') == false) {
|
||||
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_APS_INSTANCES . "` SET `Status` = " . INSTANCE_ERROR . " WHERE `ID` = :id
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('id' => $Row['InstanceID']));
|
||||
|
||||
//clean up already installed data
|
||||
self::UnlinkRecursive($this->RealPath . $this->DomainPath . '/install_scripts/');
|
||||
return false;
|
||||
}
|
||||
|
||||
//set right file owner
|
||||
safe_exec('chown -R ' . (int)$Row['guid'] . ':' . (int)$Row['guid'] . ' ' . escapeshellarg($this->RealPath . $this->DomainPath . '/'));
|
||||
}
|
||||
|
||||
//recursive mappings
|
||||
self::PrepareMappings($mapping, $mapping_url, $this->RealPath . $this->DomainPath . '/');
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* setup path environment variables for the installation script
|
||||
*
|
||||
* @param parentmapping instance of parsed xml file, current mapping position
|
||||
* @param url relative path for application specifying the current path within the mapping tree
|
||||
* @param path absolute path for application specifying the current path within the mapping tree
|
||||
*/
|
||||
private function PrepareMappings($ParentMapping, $Url, $Path) {
|
||||
|
||||
//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 (is_array($Result)
|
||||
&& isset($Result[0])
|
||||
&& is_array($Result[0])
|
||||
) {
|
||||
if (isset($Result[0]['writable'])
|
||||
&& $Result[0]['writable'] == 'true'
|
||||
) {
|
||||
// fixing file permissions to writeable
|
||||
if (is_dir($Path)) {
|
||||
chmod($Path, 0775);
|
||||
} else {
|
||||
chmod($Path, 0664);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($Result[0]['readable'])
|
||||
&& $Result[0]['readable'] == 'false'
|
||||
) {
|
||||
//fixing file permissions to non readable
|
||||
if (is_dir($Path)) {
|
||||
chmod($Path, 0333);
|
||||
} else {
|
||||
chmod($Path, 0222);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//set environment variables
|
||||
$EnvVariable = str_replace("/", "_", $Url);
|
||||
putenv('WEB_' . $EnvVariable . '_DIR=' . $Path);
|
||||
|
||||
//resolve deeper mappings
|
||||
if ($ParentMapping && $ParentMapping !== null) {
|
||||
foreach ($ParentMapping->mapping as $Mapping) {
|
||||
//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']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* setup domain environment variables for the installation script
|
||||
*
|
||||
* @param xml instance of a valid xml object with a parsed APP-META.xml file
|
||||
*/
|
||||
private function PrepareBasics($Row) {
|
||||
//domain
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT * FROM `" . TABLE_APS_SETTINGS . "` WHERE `InstanceID` = :instanceid AND `Name` = 'main_domain'
|
||||
");
|
||||
$Row3 = Database::pexecute_first($result_stmt, array('instanceid' => $Row['InstanceID']));
|
||||
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `id` = :domainid
|
||||
");
|
||||
$Row3 = Database::pexecute_first($result_stmt, array('instanceid' => $Row3['Value']));
|
||||
$this->Domain = $Row3['domain'];
|
||||
$this->RealPath = $Row3['documentroot'];
|
||||
|
||||
//location
|
||||
$result3_stmt = Database::prepare("
|
||||
SELECT * FROM `" . TABLE_APS_SETTINGS . "` WHERE `InstanceID` = :instanceid AND `Name` = 'main_location'
|
||||
");
|
||||
$Row3 = Database::pexecute_first($result_stmt, array('instanceid' => $Row['InstanceID']));
|
||||
$this->DomainPath = $Row3['Value'];
|
||||
|
||||
//if application is directly installed on domain remove / at the end
|
||||
if ($this->DomainPath == '') {
|
||||
$this->RealPath = substr($this->RealPath, 0, strlen($this->RealPath) - 1);
|
||||
}
|
||||
|
||||
//url environment variables
|
||||
putenv('BASE_URL_HOST=' . $this->Domain);
|
||||
putenv('BASE_URL_PATH=' . $this->DomainPath . '/');
|
||||
putenv('BASE_URL_SCHEME=http');
|
||||
}
|
||||
|
||||
/**
|
||||
* create a database if necessary and setup environment variables
|
||||
*
|
||||
* @param xml instance of a valid xml object with a parsed APP-META.xml file
|
||||
* @param row current entry from the database for app to handle
|
||||
* @param task numeric code to specify what to do
|
||||
*/
|
||||
private function PrepareDatabase($Xml, $Row, $Task) {
|
||||
|
||||
$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 = new DynamicProperties;
|
||||
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
|
||||
}
|
||||
|
||||
if ($XmlDb->db->id) {
|
||||
//database management
|
||||
$NewDatabase = 'web' . $Row['CustomerID'] . 'aps' . $Row['InstanceID'];
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT * FROM `" . TABLE_APS_SETTINGS . "` WHERE `InstanceID` = :instanceid AND `Name` = 'main_database_password'
|
||||
");
|
||||
$Row3 = Database::pexecute_first($result_stmt, array('instanceid' => $Row['InstanceID']));
|
||||
$DbPassword = $Row3['Value'];
|
||||
|
||||
if ($Task == TASK_INSTALL) {
|
||||
Database::needRoot(true);
|
||||
$drp_stmt = Database::prepare("DROP DATABASE IF EXISTS :newdb");
|
||||
Database::pexecute($drp_stmt, array('newdb' => $NewDatabase));
|
||||
$crt_stmt = Database::prepare("CREATE DATABASE IF NOT EXISTS :newdb");
|
||||
Database::pexecute($crt_stmt, array('newdb' => $NewDatabase));
|
||||
|
||||
foreach (array_map('trim', explode(',', $this->Hosts)) as $DatabaseHost) {
|
||||
$stmt = Database::prepare("GRANT ALL PRIVILEGES ON `" . $NewDatabase . "`.*
|
||||
TO :username@:host
|
||||
IDENTIFIED BY 'password'"
|
||||
);
|
||||
Database::pexecute($stmt, array("username" => $NewDatabase, "host" => $DatabaseHost));
|
||||
$stmt = Database::prepare("SET PASSWORD FOR :username@:host = PASSWORD(:password)");
|
||||
Database::pexecute($stmt, array("username" => $NewDatabase, "host" => $DatabaseHost, "password" => $DbPassword));
|
||||
}
|
||||
Database::query('FLUSH PRIVILEGES');
|
||||
Database::needRoot(false);
|
||||
|
||||
// add database to customers databases, #272
|
||||
$databasedescription = $Xml->name.' '.$Xml->version.' (Release ' . $Xml->release . ')';
|
||||
$ins_stmt = Database::prepare("
|
||||
INSERT INTO `" . TABLE_PANEL_DATABASES . "`
|
||||
(`customerid`, `databasename`, `description`, `dbserver`, `apsdb`)
|
||||
VALUES
|
||||
(:customerid, :databasename, :desc, '0', '1')
|
||||
");
|
||||
$ins_data = array(
|
||||
'customerid' => $Row['CustomerID'],
|
||||
'databasename' => $NewDatabase,
|
||||
'desc' => $databasedescription
|
||||
);
|
||||
Database::pexecute($ins_stmt, $ins_data);
|
||||
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET
|
||||
`mysqls_used`=`mysqls_used`+1 WHERE `customerid` = :customerid
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('customerid' => $Row['CustomerID']));
|
||||
}
|
||||
|
||||
//get first mysql access host
|
||||
$AccessHosts = array_map('trim', explode(',', $this->Hosts));
|
||||
|
||||
//environment variables
|
||||
putenv('DB_' . $XmlDb->db->id . '_TYPE=mysql');
|
||||
putenv('DB_' . $XmlDb->db->id . '_NAME=' . $NewDatabase);
|
||||
putenv('DB_' . $XmlDb->db->id . '_LOGIN=' . $NewDatabase);
|
||||
putenv('DB_' . $XmlDb->db->id . '_PASSWORD=' . $DbPassword);
|
||||
putenv('DB_' . $XmlDb->db->id . '_HOST=' . $AccessHosts[0]);
|
||||
putenv('DB_' . $XmlDb->db->id . '_PORT=3306');
|
||||
putenv('DB_' . $XmlDb->db->id . '_VERSION=' . Database::getAttribute(PDO::ATTR_SERVER_VERSION));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* extract complete directories from a zipfile
|
||||
*
|
||||
* @param filename path to zipfile to extract
|
||||
* @param directory which directory in zipfile to extract
|
||||
* @param destination destination directory for files to extract
|
||||
* @return success true/error false
|
||||
*/
|
||||
private function ExtractZip($Filename, $Directory, $Destination) {
|
||||
|
||||
if (!file_exists($Filename)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// fix slash notation for correct paths
|
||||
if (substr($Directory, -1, 1) == '/') {
|
||||
$Directory = substr($Directory, 0, strlen($Directory) - 1);
|
||||
}
|
||||
|
||||
if (substr($Destination, -1, 1) != '/') {
|
||||
$Destination.= '/';
|
||||
}
|
||||
|
||||
//open zipfile to read its contents
|
||||
$ZipHandle = zip_open(realpath($Filename));
|
||||
|
||||
if (is_resource($ZipHandle)) {
|
||||
|
||||
while ($ZipEntry = zip_read($ZipHandle)) {
|
||||
|
||||
if (substr(zip_entry_name($ZipEntry), 0, strlen($Directory)) == $Directory) {
|
||||
//fix relative path from zipfile
|
||||
$NewPath = zip_entry_name($ZipEntry);
|
||||
$NewPath = substr($NewPath, strlen($Directory));
|
||||
|
||||
//directory
|
||||
if (substr($NewPath, -1, 1) == '/') {
|
||||
if(!file_exists($Destination . $NewPath))mkdir($Destination . $NewPath, 0777, true);
|
||||
} else {
|
||||
//files
|
||||
if (zip_entry_open($ZipHandle, $ZipEntry)) {
|
||||
// handle new directory
|
||||
$dir = dirname($Destination.$NewPath);
|
||||
if (!file_exists($dir)) {
|
||||
mkdir ($dir, 0777, true);
|
||||
}
|
||||
|
||||
$File = fopen($Destination . $NewPath, "wb");
|
||||
|
||||
if ($File) {
|
||||
while ($Line = zip_entry_read($ZipEntry)) {
|
||||
fwrite($File, $Line);
|
||||
}
|
||||
fclose($File);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
zip_close($ZipHandle);
|
||||
return true;
|
||||
|
||||
} else {
|
||||
|
||||
$ReturnLines = array();
|
||||
|
||||
// first 'true' to indicate that we want the return-status from exec.
|
||||
// after exec() is called, the value will be the return-status of the
|
||||
// program executed
|
||||
$ReturnVal = true;
|
||||
|
||||
|
||||
//on 64 bit systems the zip functions can fail -> use exec to extract the files
|
||||
$ReturnLines = safe_exec('unzip -o -qq ' . escapeshellarg(realpath($Filename)) . ' ' . escapeshellarg($Directory . '/*') . ' -d ' . escapeshellarg(sys_get_temp_dir()), $ReturnVal);
|
||||
|
||||
if ($ReturnVal == 0) {
|
||||
//fix absolute structure of extracted data
|
||||
if (!file_exists($Destination)) {
|
||||
mkdir($Destination, 0777, true);
|
||||
}
|
||||
safe_exec('cp -Rf ' . sys_get_temp_dir() . '/' . $Directory . '/*' . ' ' . escapeshellarg($Destination));
|
||||
self::UnlinkRecursive(sys_get_temp_dir() . '/' . $Directory . '/');
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,259 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Implementation of the Application Packaging Standard from SwSoft/Parallels
|
||||
* http://apsstandard.com
|
||||
*
|
||||
* 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 APS
|
||||
*
|
||||
* @todo logging
|
||||
* install specific packages by name
|
||||
* other solution than using url_fopen
|
||||
* move url for distributionserver into panel
|
||||
*/
|
||||
|
||||
class ApsUpdater extends ApsParser {
|
||||
|
||||
private $settings = array();
|
||||
private $RequestDomain = '';
|
||||
private $RootUrl = '';
|
||||
private $RootDir = '';
|
||||
|
||||
/**
|
||||
* FroxlorLogger
|
||||
* @var FroxlorLogger
|
||||
*/
|
||||
private $_cronlog = null;
|
||||
|
||||
/**
|
||||
* constructor of class. setup some basic variables needed by class
|
||||
*
|
||||
* @param cronlog instance of the froxlor logger
|
||||
*/
|
||||
public function __construct($cronlog) {
|
||||
|
||||
$this->RequestDomain = 'apscatalog.com';
|
||||
$this->RootUrl = '/1/';
|
||||
$this->RootDir = dirname(dirname(dirname(dirname(__FILE__)))) . '/';
|
||||
$this->_cronlog = $cronlog;
|
||||
}
|
||||
|
||||
/**
|
||||
* Main function of class which handles all around the update mechanism
|
||||
*/
|
||||
public function UpdateHandler() {
|
||||
|
||||
$this->_cronlog->logAction(CRON_ACTION, LOG_NOTICE, "Changing directory to '" . $this->RootDir . "'");
|
||||
chdir($this->RootDir);
|
||||
|
||||
//return if allow_url_fopen is disabled
|
||||
if (!ini_get('allow_url_fopen')) {
|
||||
$this->_cronlog->logAction(CRON_ACTION, LOG_ERROR, "The APS updater cronjob requires that allow_url_fopen is enabled for the PHP CLI binary!");
|
||||
echo "The APS updater cronjob requires that allow_url_fopen is enabled for the PHP CLI binary!\n";
|
||||
return;
|
||||
}
|
||||
|
||||
//return if no task exists
|
||||
$Result_stmt = Database::query("SELECT * FROM `" . TABLE_APS_TASKS . "` WHERE `Task` IN (" . TASK_SYSTEM_UPDATE . ", " . TASK_SYSTEM_DOWNLOAD . ")");
|
||||
|
||||
if (Database::num_rows() == 0) {
|
||||
$this->_cronlog->logAction(CRON_ACTION, LOG_NOTICE, "No tasks for ApsUpdater");
|
||||
return;
|
||||
}
|
||||
|
||||
//query first task -> updater can only do one job within a run
|
||||
$Task = $Result_stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$del_stmt = Database::prepare("
|
||||
DELETE FROM `" . TABLE_APS_TASKS . "` WHERE `Task` = :task
|
||||
");
|
||||
Database::pexecute($del_stmt, array('task' => $Task['Task']));
|
||||
|
||||
//fetch all vendors
|
||||
$this->_cronlog->logAction(CRON_ACTION, LOG_NOTICE, "Fetching all Vendors from '" . $this->RootUrl . "'");
|
||||
$Vendors = self::FetchSubUrls($this->RootUrl);
|
||||
|
||||
if ($Vendors !== false) {
|
||||
|
||||
foreach ($Vendors as $Vendor) {
|
||||
|
||||
//fetch all applications from vendors
|
||||
$this->_cronlog->logAction(CRON_ACTION, LOG_NOTICE, "Fetching all from Vendor '" . $Vendor. "'");
|
||||
$Applications = self::FetchSubUrls($this->RootUrl . $Vendor);
|
||||
|
||||
if ($Applications !== false) {
|
||||
|
||||
foreach ($Applications as $Application) {
|
||||
|
||||
//get newest version of package which is already installed
|
||||
$this->_cronlog->logAction(CRON_ACTION, LOG_NOTICE, "Checking application '" . substr($Application, 0, -1) . "'");
|
||||
|
||||
$CurrentVersion = '';
|
||||
$Result_stmt = Database::prepare("
|
||||
SELECT * FROM `" . TABLE_APS_PACKAGES . "` WHERE `Name` = :name
|
||||
");
|
||||
Database::pexecute($Result_stmt, array('name' => substr($Application, 0, -1)));
|
||||
$numrows_result = Database::num_rows();
|
||||
|
||||
while ($Row = $Result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
if (version_compare($Row['Version'] . '-' . $Row['Release'], $CurrentVersion) == 1) {
|
||||
$CurrentVersion = $Row['Version'] . '-' . $Row['Release'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($numrows_result!= 0) {
|
||||
//package already installed in system, search for newer version
|
||||
if ($Task['Task'] != TASK_SYSTEM_UPDATE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//fetch different versions of application from distribution server
|
||||
$NewerVersion = '';
|
||||
$Versions = self::FetchSubUrls($this->RootUrl . $Vendor . $Application);
|
||||
|
||||
if ($Versions !== false) {
|
||||
foreach ($Versions as $Version) {
|
||||
$OnlineVersion = substr($Version, 0, -1);
|
||||
//is package newer than current version?
|
||||
if (version_compare($OnlineVersion, $CurrentVersion) == 1) {
|
||||
//is new package newer than another one found before?
|
||||
if (version_compare($OnlineVersion, $NewerVersion) == 1) {
|
||||
$NewerVersion = $OnlineVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($NewerVersion != '') {
|
||||
//download package as an update
|
||||
self::DownloadPackage($this->RootUrl . $Vendor . $Application . $NewerVersion, substr($Application, 0, -1), $NewerVersion);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if ($Task['Task'] != TASK_SYSTEM_DOWNLOAD) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//new packages
|
||||
$NewVersion = '';
|
||||
$Versions = self::FetchSubUrls($this->RootUrl . $Vendor . $Application);
|
||||
|
||||
foreach ($Versions as $Version) {
|
||||
$OnlineVersion = substr($Version, 0, -1);
|
||||
//is package newer than another one found before?
|
||||
if (version_compare($OnlineVersion, $NewVersion) == 1) {
|
||||
$NewVersion = $OnlineVersion;
|
||||
}
|
||||
}
|
||||
|
||||
if ($NewVersion != '') {
|
||||
//download package as a new one
|
||||
self::DownloadPackage($this->RootUrl . $Vendor . $Application . $NewVersion, substr($Application, 0, -1), $NewVersion);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* download a package from the distribution server and move the downloaded file in the temporary directory
|
||||
*
|
||||
* @param url url to download
|
||||
* @param application string identifying the application name
|
||||
* @param version string identifying the application version
|
||||
* @return success true/error false
|
||||
*/
|
||||
private function DownloadPackage($Url, $Application, $Version) {
|
||||
|
||||
$Downloads = self::FetchSubUrls($Url . '/');
|
||||
|
||||
//make url valid
|
||||
$path = dirname($Url);
|
||||
$file = urlencode(basename($Url));
|
||||
$file_url = 'http://' . $this->RequestDomain . $path . '/' . $file . '.aps' . $Downloads[0];
|
||||
|
||||
//get content from website url
|
||||
$this->_cronlog->logAction(CRON_ACTION, LOG_NOTICE, "Downloading '" . $file_url . "'");
|
||||
$Content = @file_get_contents($file_url);
|
||||
|
||||
if ($Content != false) {
|
||||
//open file to write contents on disk
|
||||
$FileHandle = fopen($this->RootDir . 'temp/' . $Application . '-' . $Version . '.app.zip', 'wb');
|
||||
|
||||
if ($FileHandle == true) {
|
||||
//write results to disk
|
||||
fwrite($FileHandle, $Content);
|
||||
fclose($FileHandle);
|
||||
|
||||
//set right permissions
|
||||
chmod($this->RootDir . 'temp/' . $Application . '-' . $Version . '.app.zip', 0664);
|
||||
return true;
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* fetch html content of distribution server and parse all information
|
||||
*
|
||||
* @param requestdomain domain to aps-/mirrorserver with package api
|
||||
* @param url url to fetch sub links from
|
||||
* @return error false/success array with relative sub links
|
||||
*/
|
||||
private function FetchSubUrls($Url) {
|
||||
|
||||
$Return = array();
|
||||
|
||||
//make url valid
|
||||
$Url = str_replace(' ', '%20', $Url);
|
||||
$file_url = 'http://' . $this->RequestDomain . $Url;
|
||||
|
||||
//get content from website url
|
||||
$Content = @file($file_url);
|
||||
|
||||
if ($Content !== false) {
|
||||
|
||||
foreach ($Content as $Temp) {
|
||||
//skip empty lines
|
||||
if ($Temp != "\r\n"
|
||||
&& $Temp != "\r"
|
||||
&& $Temp != "\n"
|
||||
&& $Temp != ""
|
||||
) {
|
||||
//remove unwanted characters
|
||||
$Temp = trim($Temp);
|
||||
|
||||
//grep URLs which match defined format
|
||||
if (preg_match("/^<a href=\"(.+)\".+class=\"(vendor|application|version|packager)\"/", $Temp, $Matches)) {
|
||||
if (!in_array(urldecode($Matches[1]), $Return)) {
|
||||
$Return[] = urldecode($Matches[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $Return;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
*
|
||||
*/
|
||||
|
||||
class DynamicProperties { /* empty class for some magic */ }
|
||||
@@ -177,14 +177,6 @@ return array(
|
||||
'mandatory' => true,
|
||||
'ul_field' => $email_quota_ul
|
||||
),
|
||||
'email_autoresponder' => array(
|
||||
'label' => $lng['customer']['autoresponder'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
'visible' => ($settings['autoresponder']['autoresponder_active'] == '1' ? true : false),
|
||||
'ul_field' => $email_autoresponder_ul
|
||||
),
|
||||
'ftps' => array(
|
||||
'label' => $lng['customer']['ftps'],
|
||||
'type' => 'textul',
|
||||
@@ -215,23 +207,6 @@ return array(
|
||||
'maxlength' => 9,
|
||||
'mandatory' => true,
|
||||
'ul_field' => $mysqls_ul
|
||||
),
|
||||
'can_manage_aps_packages' => array(
|
||||
'label' => $lng['aps']['canmanagepackages'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array(),
|
||||
'visible' => ($settings['aps']['aps_active'] == '1' ? true : false)
|
||||
),
|
||||
'number_of_aps_packages' => array(
|
||||
'label' => $lng['aps']['numberofapspackages'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
'visible' => ($settings['aps']['aps_active'] == '1' ? true : false),
|
||||
'ul_field' => $number_of_aps_packages_ul
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -191,14 +191,6 @@ return array(
|
||||
'mandatory' => true,
|
||||
'ul_field' => $email_quota_ul
|
||||
),
|
||||
'email_autoresponder' => array(
|
||||
'label' => $lng['customer']['autoresponder'],
|
||||
'type' => 'textul',
|
||||
'value' => $result['email_autoresponder'],
|
||||
'maxlength' => 9,
|
||||
'visible' => ($settings['autoresponder']['autoresponder_active'] == '1' ? true : false),
|
||||
'ul_field' => $email_autoresponder_ul
|
||||
),
|
||||
'ftps' => array(
|
||||
'label' => $lng['customer']['ftps'],
|
||||
'type' => 'textul',
|
||||
@@ -229,23 +221,6 @@ return array(
|
||||
'maxlength' => 9,
|
||||
'mandatory' => true,
|
||||
'ul_field' => $mysqls_ul
|
||||
),
|
||||
'can_manage_aps_packages' => array(
|
||||
'label' => $lng['aps']['canmanagepackages'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array($result['can_manage_aps_packages']),
|
||||
'visible' => ($settings['aps']['aps_active'] == '1' ? true : false)
|
||||
),
|
||||
'number_of_aps_packages' => array(
|
||||
'label' => $lng['aps']['numberofapspackages'],
|
||||
'type' => 'textul',
|
||||
'value' => $result['aps_packages'],
|
||||
'maxlength' => 9,
|
||||
'visible' => ($settings['aps']['aps_active'] == '1' ? true : false),
|
||||
'ul_field' => $number_of_aps_packages_ul
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1,36 +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 Formfields
|
||||
*/
|
||||
|
||||
return array(
|
||||
'backup' => array(
|
||||
'title' => $lng['backup'],
|
||||
'image' => 'icons/backup.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['backup'],
|
||||
'image' => 'icons/backup.png',
|
||||
'fields' => array(
|
||||
'path' => array(
|
||||
'label' => $lng['extras']['backup_create'],
|
||||
'desc' => sprintf($lng['extras']['backup_info'], $userinfo['loginname']).'<br />'.($settings['system']['backup_bigfile'] == 1 ? $lng['extras']['backup_info_big'] : $lng['extras']['backup_info_sep']).'<br />'.($settings['system']['backup_count'] == 1 ? $lng['extras']['backup_count_info'] : ''),
|
||||
'type' => 'yesno',
|
||||
'yesno_var' => $backup_enabled
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -43,34 +43,13 @@ define('TABLE_PANEL_IPSANDPORTS', 'panel_ipsandports');
|
||||
define('TABLE_PANEL_TICKETS', 'panel_tickets');
|
||||
define('TABLE_PANEL_TICKET_CATS', 'panel_ticket_categories');
|
||||
define('TABLE_PANEL_LOG', 'panel_syslog');
|
||||
define('TABLE_MAIL_AUTORESPONDER', 'mail_autoresponder');
|
||||
define('TABLE_PANEL_PHPCONFIGS', 'panel_phpconfigs');
|
||||
define('TABLE_APS_PACKAGES', 'aps_packages');
|
||||
define('TABLE_APS_INSTANCES', 'aps_instances');
|
||||
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');
|
||||
define('TABLE_PANEL_DOMAIN_SSL_SETTINGS', 'domain_ssl_settings');
|
||||
define('TABLE_DOMAINTOIP', 'panel_domaintoip');
|
||||
|
||||
// APS constants
|
||||
define('TASK_INSTALL', 1);
|
||||
define('TASK_REMOVE', 2);
|
||||
define('TASK_RECONFIGURE', 3);
|
||||
define('TASK_UPGRADE', 4);
|
||||
define('TASK_SYSTEM_UPDATE', 5);
|
||||
define('TASK_SYSTEM_DOWNLOAD', 6);
|
||||
define('INSTANCE_INSTALL', 1);
|
||||
define('INSTANCE_TASK_ACTIVE', 2);
|
||||
define('INSTANCE_SUCCESS', 3);
|
||||
define('INSTANCE_ERROR', 4);
|
||||
define('INSTANCE_UNINSTALL', 5);
|
||||
define('PACKAGE_LOCKED', 1);
|
||||
define('PACKAGE_ENABLED', 2);
|
||||
|
||||
// VERSION INFO
|
||||
$version = '0.9.31-rc1';
|
||||
$dbversion = '2';
|
||||
|
||||
@@ -911,25 +911,8 @@ $lng['panel']['not_supported'] = 'Not supported in: ';
|
||||
$lng['emails']['quota_edit'] = 'Change E-Mail Quota';
|
||||
$lng['error']['allocatetoomuchquota'] = 'You tried to allocate %s MB Quota, but you do not have enough left.';
|
||||
|
||||
// Autoresponder module
|
||||
|
||||
$lng['menue']['email']['autoresponder'] = 'Autoresponder';
|
||||
$lng['autoresponder']['active'] = 'Active';
|
||||
$lng['autoresponder']['autoresponder_add'] = 'Add autoresponder';
|
||||
$lng['autoresponder']['autoresponder_edit'] = 'Edit autoresponder';
|
||||
$lng['autoresponder']['autoresponder_new'] = 'Create new autoresponder';
|
||||
$lng['autoresponder']['subject'] = 'Subject';
|
||||
$lng['autoresponder']['message'] = 'Message';
|
||||
$lng['autoresponder']['account'] = 'Account';
|
||||
$lng['autoresponder']['sender'] = 'Sender';
|
||||
$lng['question']['autoresponderdelete'] = 'Do you really want to delete the autoresponder?';
|
||||
$lng['error']['noemailaccount'] = 'There can be two reasons why you cannot create a new autoresponder: You need at least one email account to create a new autoresponder. Secondly it can be possible that all accounts already have an autoresponder configured.';
|
||||
$lng['error']['missingfields'] = 'Not all required fields were filled out.';
|
||||
$lng['error']['accountnotexisting'] = 'The given email account doesn\'t exist.';
|
||||
$lng['error']['autoresponderalreadyexists'] = 'There is already an autoresponder configured for this account.';
|
||||
$lng['error']['invalidautoresponder'] = 'The given account is invalid.';
|
||||
$lng['serversettings']['autoresponder_active']['title'] = 'Use autoresponder module';
|
||||
$lng['serversettings']['autoresponder_active']['description'] = 'Do you want to use the autoresponder module?';
|
||||
$lng['admin']['security_settings'] = 'Security Options';
|
||||
$lng['admin']['know_what_youre_doing'] = 'Change only, if you know what you\'re doing!';
|
||||
$lng['admin']['show_version_login']['title'] = 'Show Froxlor version on login';
|
||||
@@ -996,174 +979,6 @@ $lng['error']['index_file_extension'] = 'The file extension for the index file m
|
||||
$lng['admin']['expert_settings'] = 'Expert settings!';
|
||||
$lng['admin']['mod_fcgid_starter']['title'] = 'PHP Processes for this domain (empty for default value)';
|
||||
|
||||
//added with aps installer
|
||||
|
||||
$lng['admin']['aps'] = 'APS Installer';
|
||||
$lng['customer']['aps'] = 'APS Installer';
|
||||
$lng['aps']['scan'] = 'Scan for new packages';
|
||||
$lng['aps']['upload'] = 'Upload new packages';
|
||||
$lng['aps']['managepackages'] = 'Manage packages';
|
||||
$lng['aps']['manageinstances'] = 'Manage instances';
|
||||
$lng['aps']['overview'] = 'Package overview';
|
||||
$lng['aps']['status'] = 'My packages';
|
||||
$lng['aps']['search'] = 'Search for packages';
|
||||
$lng['aps']['upload_description'] = 'Please select the APS Installer zipfiles to install them in the system.';
|
||||
$lng['aps']['search_description'] = 'Name, Description, Keyword, Version';
|
||||
$lng['aps']['detail'] = 'More information';
|
||||
$lng['aps']['install'] = 'Install package';
|
||||
$lng['aps']['data'] = 'Data';
|
||||
$lng['aps']['version'] = 'Version';
|
||||
$lng['aps']['homepage'] = 'Homepage';
|
||||
$lng['aps']['installed_size'] = 'Size after Installation';
|
||||
$lng['aps']['categories'] = 'Categories';
|
||||
$lng['aps']['languages'] = 'Languages';
|
||||
$lng['aps']['long_description'] = 'Long description';
|
||||
$lng['aps']['configscript'] = 'Configuration script';
|
||||
$lng['aps']['changelog'] = 'Changelog';
|
||||
$lng['aps']['license'] = 'License';
|
||||
$lng['aps']['license_link'] = 'Link to License';
|
||||
$lng['aps']['screenshots'] = 'Screenshots';
|
||||
$lng['aps']['back'] = 'Back to overview';
|
||||
$lng['aps']['install_wizard'] = 'Installation wizard...';
|
||||
$lng['aps']['wizard_error'] = 'Your input contains invalid data. Please correct yourself to continue the installation.';
|
||||
$lng['aps']['basic_settings'] = 'Basic settings';
|
||||
$lng['aps']['application_location'] = 'Installation location';
|
||||
$lng['aps']['application_location_description'] = 'Location where the application will be installed.';
|
||||
$lng['aps']['no_domains'] = 'No domains found';
|
||||
$lng['aps']['database_password'] = 'Database password';
|
||||
$lng['aps']['database_password_description'] = 'Password which should be used for the new created database.';
|
||||
$lng['aps']['license_agreement'] = 'Agreement';
|
||||
$lng['aps']['cancel_install'] = 'Abort Installation';
|
||||
$lng['aps']['notazipfile'] = 'The uploaded file is not a zipfile.';
|
||||
$lng['aps']['filetoobig'] = 'The file is too big.';
|
||||
$lng['aps']['filenotcomplete'] = 'The file wasn\'t uploaded completely.';
|
||||
$lng['aps']['phperror'] = 'There occured a PHP internal error. The PHP upload errorcode is #';
|
||||
$lng['aps']['moveproblem'] = 'The script failed to move the uploaded file into the destination directory. Please ensure that all permissions are set correctly.';
|
||||
$lng['aps']['uploaderrors'] = '<strong>Errors for the file <em>%s</em></strong><br/><ul>%s</ul>';
|
||||
$lng['aps']['nospecialchars'] = 'Special characters are not allowed in the search term!';
|
||||
$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_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 uninstall pending';
|
||||
$lng['aps']['unknown_status'] = 'Error - Unknown value';
|
||||
$lng['aps']['currentstatus'] = 'Current status';
|
||||
$lng['aps']['activetasks'] = 'Current tasks';
|
||||
$lng['aps']['task_install'] = 'Installation pending';
|
||||
$lng['aps']['task_remove'] = 'Uninstallation pending';
|
||||
$lng['aps']['task_reconfigure'] = 'Reconfiguration pending';
|
||||
$lng['aps']['task_upgrade'] = 'Update/Upgrade pending';
|
||||
$lng['aps']['no_task'] = 'No tasks pending';
|
||||
$lng['aps']['applicationlinks'] = 'Application links';
|
||||
$lng['aps']['mainsite'] = 'Main site';
|
||||
$lng['aps']['uninstall'] = 'Uninstall package';
|
||||
$lng['aps']['reconfigure'] = 'Change settings';
|
||||
$lng['aps']['erroronnewinstance'] = '<strong>This package cannot be installed.</strong><br/><br/>Please go back to the package overview and start a new Installation.';
|
||||
$lng['aps']['successonnewinstance'] = '<strong><em>%s</em> will be installed now.</strong><br/><br/>Go back to "My packages" and wait until the Installation has finished. This can take some time.';
|
||||
$lng['aps']['php_misc_handler'] = 'PHP - Misc - There is no support for other file extensions than .php for the PHP Parser.';
|
||||
$lng['aps']['php_misc_directoryhandler'] = 'PHP - Misc - There is no support for per directory disabled PHP Handlers.';
|
||||
$lng['aps']['asp_net'] = 'ASP.NET - Package not supported.';
|
||||
$lng['aps']['cgi'] = 'CGI - Package not supported.';
|
||||
$lng['aps']['php_extension'] = 'PHP - Extension "%s" missing.';
|
||||
$lng['aps']['php_function'] = 'PHP - Function "%s" missing.';
|
||||
$lng['aps']['php_configuration'] = 'PHP - Configuration - Current "%s" setting not supported by package.';
|
||||
$lng['aps']['php_configuration_post_max_size'] = 'PHP - Configuration - "post_max_size" value too low.';
|
||||
$lng['aps']['php_configuration_memory_limit'] = 'PHP - Configuration - "memory_limit" value too low.';
|
||||
$lng['aps']['php_configuration_max_execution_time'] = 'PHP - Configuration - "max_execution_time" value too low.';
|
||||
$lng['aps']['php_general_old'] = 'PHP - General - PHP Version too old.';
|
||||
$lng['aps']['php_general_new'] = 'PHP - General - PHP Version too new.';
|
||||
$lng['aps']['db_mysql_support'] = 'Database - The package needs another database engine than MySQL.';
|
||||
$lng['aps']['db_mysql_version'] = 'Database - MySQL server too old.';
|
||||
$lng['aps']['webserver_module'] = 'Webserver - Module "%s" missing.';
|
||||
$lng['aps']['webserver_fcgid'] = 'Webserver - This package requires additional modules from the webserver. In your FastCGI/mod_fcgid environment the function "apache_get_modules" doesn\'t exist. The package cannot be installed because the APS Installer is unable to verify if this modules are installed.';
|
||||
$lng['aps']['webserver_htaccess'] = 'Webserver - This package requires that .htaccess files are parsed by the webserver. The package cannot be installed because the APS Installer is unable to determine if this is enabled.';
|
||||
$lng['aps']['misc_configscript'] = 'Misc - The language of the configuration script is not supported.';
|
||||
$lng['aps']['misc_charset'] = 'Misc - In the current Installer version its not possibel to validate formfields from the wizard against a specific charset. The package cannot be installed.';
|
||||
$lng['aps']['misc_version_already_installed'] = 'Same version of package already installed.';
|
||||
$lng['aps']['misc_only_newer_versions'] = 'For security reasons only newer package versions can be installed on the system than them which are already installed.';
|
||||
$lng['aps']['erroronscan'] = '<strong>Errors for <em>%s</em></strong><ul>%s</ul>';
|
||||
$lng['aps']['invalidzipfile'] = '<strong>Errors for <em>%s</em></strong><br/><ul><li>This is not a valid APS zipfile!</li></ul>';
|
||||
$lng['aps']['successpackageupdate'] = '<strong><em>%s</em> successfully installed as a package update</strong>';
|
||||
$lng['aps']['successpackageinstall'] = '<strong><em>%s</em> successfully installed as a new package</strong>';
|
||||
$lng['aps']['class_zip_missing'] = 'SimpleXML Class, exec function or ZIP Functions missing or not enabled! For further information about this problem look into the handbook for this module.';
|
||||
$lng['aps']['dir_permissions'] = 'The PHP/webserver process must be able to write in the directory {$path}temp/ and {$path}packages/';
|
||||
$lng['aps']['initerror'] = '<strong>There are some problems with this module:</strong><ul>%s</ul>Fix these problems, otherwise the module cannot be used!';
|
||||
$lng['aps']['iderror'] = 'Wrong id specified!';
|
||||
$lng['aps']['nopacketsforinstallation'] = 'There are no packages to install.';
|
||||
$lng['aps']['nopackagestoinstall'] = 'There are no packages to view or install.';
|
||||
$lng['aps']['nodomains'] = 'Select a domain from the list. If there is none, the package cannot be installed!';
|
||||
$lng['aps']['wrongpath'] = 'Either this path contains invalid characters or there is another application installed already.';
|
||||
$lng['aps']['dbpassword'] = 'Specify a password with a minimum length of 8 characters.';
|
||||
$lng['aps']['error_text'] = 'Specify a text without special characters.';
|
||||
$lng['aps']['error_email'] = 'Specify a valid e-mail address.';
|
||||
$lng['aps']['error_domain'] = 'Specify a valid URL like http://www.example.com/';
|
||||
$lng['aps']['error_integer'] = 'Specify a numeric value (Integer-Format) e.g. <em>5</em> or <em>7</em>.';
|
||||
$lng['aps']['error_float'] = 'Specify a numeric value (Float-Format) e.g. <em>5,2432</em> or <em>7,5346</em>.';
|
||||
$lng['aps']['error_password'] = 'Specify a password.';
|
||||
$lng['aps']['error_license'] = 'Yes, I have read the license and will abide by its terms.';
|
||||
$lng['aps']['error_licensenoaccept'] = 'You must accept the license to install this application.';
|
||||
$lng['aps']['stopinstall'] = 'Abort Installation';
|
||||
$lng['aps']['installstopped'] = 'The Installation of this package was aborted successfully.';
|
||||
$lng['aps']['installstoperror'] = 'The Installation cannot be aborted anymore because installation has started already. If you\'d like to uninstall the package, wait until the Installation has finished and then go to "My packages" to trigger an Uninstall.';
|
||||
$lng['aps']['waitfortask'] = 'There are no actions to select. Wait until all tasks have finished.';
|
||||
$lng['aps']['removetaskexisting'] = '<strong>There is already a task for uninstallation.</strong><br/><br/>Please go back to "My packages" and wait until the uninstall has finished.';
|
||||
$lng['aps']['packagewillberemoved'] = '<strong>The package will be uninstalled now.</strong><br/><br/>Please go back to "My packages" and wait until the uninstall has finished.';
|
||||
$lng['question']['reallywanttoremove'] = '<strong>Do you really want to uninstall this package?</strong><br/><br/>All database contents and files will be erased. Be sure to make a manual backup of a files you need for any further usage!<br/><br/>';
|
||||
$lng['aps']['searchoneresult'] = '%s package found';
|
||||
$lng['aps']['searchmultiresult'] = '%s packages found';
|
||||
$lng['question']['reallywanttostop'] = 'Do you really want to abort the installation of this package?<br/><br/>';
|
||||
$lng['aps']['packagenameandversion'] = 'Packagename & version';
|
||||
$lng['aps']['package_locked'] = 'Locked';
|
||||
$lng['aps']['package_enabled'] = 'Enabled';
|
||||
$lng['aps']['lock'] = 'Lock';
|
||||
$lng['aps']['unlock'] = 'Enable';
|
||||
$lng['aps']['remove'] = 'Remove';
|
||||
$lng['aps']['allpackages'] = 'All packages';
|
||||
$lng['question']['reallyremovepackages'] = '<strong>Do you really want to delete these packages?</strong><br/><br/>Packages with dependencies can only be remove if the corresponding Instances have been removed!<br/><br/>';
|
||||
$lng['aps']['nopackagesinsystem'] = 'There were no packages installed in the system which could be managed.';
|
||||
$lng['aps']['packagenameandstatus'] = 'Packagename & status';
|
||||
$lng['aps']['activate_aps']['title'] = 'Enable APS installer';
|
||||
$lng['aps']['activate_aps']['description'] = 'Here the APS installer can be enabled and disabled globaly.';
|
||||
$lng['aps']['packages_per_page']['title'] = 'Packages per page';
|
||||
$lng['aps']['packages_per_page']['description'] = 'How many packages should be displayed per page for customers?';
|
||||
$lng['aps']['upload_fields']['title'] = 'Upload fields per page';
|
||||
$lng['aps']['upload_fields']['description'] = 'How many upload fields should be displayed on the page to install new packages in the system?';
|
||||
$lng['aps']['exceptions']['title'] = 'Exceptions for package validation';
|
||||
$lng['aps']['exceptions']['description'] = 'Some packages need special configuration parameters or modules. The installer cannot always determine if this options/extensions are available. For this reason you can now define exceptions that packages can be installed in the system. Do only select options which match your real configuration setup. For further information about this problem look into the handbook for this module.';
|
||||
$lng['aps']['settings_php_extensions'] = 'PHP-Extensions';
|
||||
$lng['aps']['settings_php_configuration'] = 'PHP-Configuration';
|
||||
$lng['aps']['settings_webserver_modules'] = 'Webserver modules';
|
||||
$lng['aps']['settings_webserver_misc'] = 'Webserver miscellaneous';
|
||||
$lng['aps']['specialoptions'] = 'Special options';
|
||||
$lng['aps']['removeunused'] = 'Remove unused packages';
|
||||
$lng['aps']['enablenewest'] = 'Enabled newest version of package, lock others';
|
||||
$lng['aps']['installations'] = 'Installations';
|
||||
$lng['aps']['statistics'] = 'Statistics';
|
||||
$lng['aps']['numerofpackagesinstalled'] = '%s packages installed<br/>';
|
||||
$lng['aps']['numerofpackagesenabled'] = '%s packages enabled<br/>';
|
||||
$lng['aps']['numerofpackageslocked'] = '%s packages locked<br/>';
|
||||
$lng['aps']['numerofinstances'] = '%s Instances installed<br/>';
|
||||
$lng['question']['reallydoaction'] = '<strong>Do you really want to execute the selected actions?</strong><br/><br/>Data which can be lost by continuing, cannot be restored later.<br/><br/>';
|
||||
$lng['aps']['linktolicense'] = 'Link to license';
|
||||
$lng['aps']['initerror_customer'] = 'There is currently a problem with this Froxlor extension. Contact your administrator for further information.';
|
||||
$lng['aps']['numerofinstances'] = '%s Installations at all<br/>';
|
||||
$lng['aps']['numerofinstancessuccess'] = '%s successful Installations<br/>';
|
||||
$lng['aps']['numerofinstanceserror'] = '%s failed Installations<br/>';
|
||||
$lng['aps']['numerofinstancesaction'] = '%s planed Installations/Uninstallations';
|
||||
$lng['aps']['downloadallpackages'] = 'Download all packages from distribution server';
|
||||
$lng['aps']['updateallpackages'] = 'Update all packages by distribution server';
|
||||
$lng['aps']['downloadtaskexists'] = 'There is already a task for the download of all packages. Please wait until this task has finished.';
|
||||
$lng['aps']['downloadtaskinserted'] = 'A task for the download of all packages has been created. This can take up to several minutes.';
|
||||
$lng['aps']['updatetaskexists'] = 'There is already an task for the update of all packages. Please wait until this task has finished.';
|
||||
$lng['aps']['updatetaskinserted'] = 'A task for the update of all packages has been created. This can take up to several minutes.';
|
||||
$lng['aps']['canmanagepackages'] = 'Can manage APS packages';
|
||||
$lng['aps']['numberofapspackages'] = 'Amount of APS installations';
|
||||
$lng['aps']['allpackagesused'] = '<strong>Error</strong><br/><br/>You have already reached the number of installable APS applications.';
|
||||
$lng['aps']['noinstancesexisting'] = 'There are currently no instances which could be managed. There must be installed at least one application by a customer.';
|
||||
$lng['aps']['lightywarning'] = 'Warning';
|
||||
$lng['aps']['lightywarningdescription'] = 'You are using the lighttpd webserver together with Froxlor. The APS module was mainly written for Apache, so it can be possible that some features do not work with lighttpd. Please remember this when using the APS module. If you have found or experienced any problems in connection with lighttpd and the APS module please report them to the developers that they can be fixed within the next release if Froxlor.';
|
||||
$lng['error']['customerdoesntexist'] = 'The customer you have chosen doesn\'t exist.';
|
||||
$lng['error']['admindoesntexist'] = 'The admin you have chosen doesn\'t exist.';
|
||||
|
||||
@@ -1192,7 +1007,6 @@ $lng['serversettings']['mod_fcgid']['maxrequests']['description'] = 'How many re
|
||||
// fix bug #1124
|
||||
$lng['admin']['webserver'] = 'Webserver';
|
||||
$lng['error']['admin_domain_emailsystemhostname'] = 'The server-hostname cannot be used as email-domain.';
|
||||
$lng['aps']['license_link'] = 'Link to the license';
|
||||
|
||||
// ADDED IN 1.4.2.1-1
|
||||
|
||||
@@ -1230,9 +1044,6 @@ $lng['panel']['toomanydirs'] = 'Too many subdirectories. Falling back to manual
|
||||
$lng['panel']['abort'] = 'Abort';
|
||||
$lng['serversettings']['cron']['debug']['title'] = 'Cronscript debugging';
|
||||
$lng['serversettings']['cron']['debug']['description'] = 'Activate to keep the lockfile after a cron-run for debugging.<br /><b>Attention:</b>Keeping the lockfile can cause the next scheduled cron not to run properly.';
|
||||
$lng['autoresponder']['date_from'] = 'Start date';
|
||||
$lng['autoresponder']['date_until'] = 'End date';
|
||||
$lng['autoresponder']['startenddate'] = 'Start/end date';
|
||||
$lng['panel']['not_activated'] = 'not activated';
|
||||
$lng['panel']['off'] = 'off';
|
||||
$lng['update']['updateinprogress_onlyadmincanlogin'] = 'A newer version of Froxlor has been installed but not yet set up.<br />Only the administrator can log in and finish the update.';
|
||||
@@ -1305,9 +1116,6 @@ $lng['crondesc']['cron_unknown_desc'] = 'no description given';
|
||||
$lng['admin']['cron']['add'] = 'Add cronjob';
|
||||
$lng['crondesc']['cron_tasks'] = 'generating of configfiles';
|
||||
$lng['crondesc']['cron_legacy'] = 'legacy (old) cronjob';
|
||||
$lng['crondesc']['cron_apsinstaller'] = 'APS-installer';
|
||||
$lng['crondesc']['cron_autoresponder'] = 'e-mail autoresponder';
|
||||
$lng['crondesc']['cron_apsupdater'] = 'updating APS packages';
|
||||
$lng['crondesc']['cron_traffic'] = 'traffic calculation';
|
||||
$lng['crondesc']['cron_ticketsreset'] = 'resetting ticket-counters';
|
||||
$lng['crondesc']['cron_ticketarchive'] = 'archiving old tickets';
|
||||
@@ -1334,7 +1142,6 @@ $lng['ftp']['editpassdescription'] = 'Set new password or leave blank for no cha
|
||||
$lng['customer']['sendinfomail'] = 'Send data via email to me';
|
||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] New database created';
|
||||
$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}\nphpMyAdmin: {PMA_URI}\nYours sincerely, your administrator";
|
||||
$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'] = 'Path to 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!';
|
||||
@@ -1383,12 +1190,6 @@ $lng['serversettings']['customredirect_default']['description'] = 'Set the defau
|
||||
|
||||
// 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
|
||||
|
||||
@@ -1407,9 +1208,6 @@ $lng['error']['exception'] = '%s';
|
||||
$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';
|
||||
|
||||
@@ -1476,9 +1274,6 @@ $lng['admin']['templates']['forgotpwd'] = 'Notification-mails for password-reset
|
||||
$lng['admin']['templates']['password_reset'] = 'Customer-notification for passwort-reset';
|
||||
$lng['admin']['store_defaultindex'] = 'Store default index-file to customers docroot';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.13-svn1
|
||||
$lng['customer']['autoresponder'] = 'Autoresponder';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.14
|
||||
$lng['serversettings']['mod_fcgid']['defaultini_ownvhost'] = 'Default PHP configuration for Froxlor-vHost';
|
||||
$lng['serversettings']['awstats_icons']['title'] = 'Path to AWstats icons folder';
|
||||
@@ -1582,30 +1377,12 @@ $lng['traffic']['months']['total'] = 'Total';
|
||||
$lng['traffic']['details'] = 'Details';
|
||||
$lng['menue']['traffic']['table'] = 'Traffic';
|
||||
$lng['error']['admin_domain_emailsystemhostname'] = 'Sorry, the system - hostname may not be used as a customer domain';
|
||||
$lng['backup'] = 'Backup';
|
||||
$lng['backup_allowed'] = 'Backup allowed';
|
||||
$lng['extras']['backup_create'] = 'Create Backup?';
|
||||
$lng['extras']['backup_info'] = 'Backup will be saved once daily to a FTP directory. The FTP username is "%s_backup". The FTP password is the same as for your main FTP account.';
|
||||
$lng['extras']['backup_info_sep'] = 'It contains compressed archives of your web-directory and databases.';
|
||||
$lng['extras']['backup_info_big'] = 'It contains a compressed archive of your web-directory and databases.';
|
||||
$lng['extras']['backup_count_info'] = '<br /><br />Please note that the backup will charge your webspace!';
|
||||
$lng['serversettings']['backup_count'] = 'Should backup size be subtracted from webspace size?';
|
||||
$lng['serversettings']['backup_enabled'] = 'Backup activated?';
|
||||
$lng['serversettings']['backupdir']['description'] = 'Backup dir path?';
|
||||
$lng['serversettings']['mysqldump_path']['description'] = 'Path to mysqldump binary?';
|
||||
$lng['serversettings']['backup_bigfile'] = 'Save backup in 1 big file instead in separeted files for html and databases?';
|
||||
$lng['serversettings']['backup_ftp_enabled'] = 'FTP Upload activated?';
|
||||
$lng['serversettings']['backup_ftp_server'] = 'FTP Server:';
|
||||
$lng['serversettings']['backup_ftp_user'] = 'FTP Username:';
|
||||
$lng['serversettings']['backup_ftp_pass'] = 'FTP Password:';
|
||||
$lng['crondesc']['cron_backup'] = 'Backup cronjob';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.21
|
||||
$lng['gender']['title'] = 'Title';
|
||||
$lng['gender']['male'] = 'Mr.';
|
||||
$lng['gender']['female'] = 'Mrs.';
|
||||
$lng['gender']['undef'] = '';
|
||||
$lng['serversettings']['backup_ftp_passive_mode'] = 'Use passive mode';
|
||||
|
||||
// Country code (ISO-3166-2)
|
||||
$lng['country']['AF'] = "Afghanistan";
|
||||
|
||||
@@ -911,25 +911,8 @@ $lng['emails']['quota_edit'] = 'E-Mail Kontingent ändern';
|
||||
$lng['panel']['not_supported'] = 'Nicht unterstüzt in: ';
|
||||
$lng['error']['allocatetoomuchquota'] = 'Sie versuchen "%s" MB Kontingent zu zuweisen, haben aber nicht genug übrig.';
|
||||
|
||||
// Autoresponder module
|
||||
|
||||
$lng['menue']['email']['autoresponder'] = 'Abwesenheitsnachrichten';
|
||||
$lng['autoresponder']['active'] = 'Aktiviert';
|
||||
$lng['autoresponder']['autoresponder_add'] = 'Abwesenheitsnachricht hinzufügen';
|
||||
$lng['autoresponder']['autoresponder_edit'] = 'Abwesenheitsnachricht bearbeiten';
|
||||
$lng['autoresponder']['autoresponder_new'] = 'Neue Abwesenheitsnachricht erstellen';
|
||||
$lng['autoresponder']['subject'] = 'Betreff';
|
||||
$lng['autoresponder']['message'] = 'Nachricht';
|
||||
$lng['autoresponder']['account'] = 'Konto';
|
||||
$lng['autoresponder']['sender'] = 'Absender';
|
||||
$lng['question']['autoresponderdelete'] = 'Abwesenheitsnachricht wirklich löschen?';
|
||||
$lng['error']['noemailaccount'] = 'Es gibt zwei mögliche Gründe warum keine Abwesenheitsnachricht erstellt werden kann: Sie benötigen mindestens einen E-Mail Account. Zweitens kann es sein dass bereits für alle Accounts eine Abwesenheitsnachricht eingerichtet wurde.';
|
||||
$lng['error']['missingfields'] = 'Es wurden nicht alle Felder augefüllt.';
|
||||
$lng['error']['accountnotexisting'] = 'Der angegebene E-Mail-Account existiert nicht.';
|
||||
$lng['error']['autoresponderalreadyexists'] = 'Für dieses Konto existiert bereits eine Abwesenheitsnachricht.';
|
||||
$lng['error']['invalidautoresponder'] = 'Das angegebene Konto ist ungültig.';
|
||||
$lng['serversettings']['autoresponder_active']['title'] = 'Abwesenheitsnachrichten-Modul verwenden';
|
||||
$lng['serversettings']['autoresponder_active']['description'] = 'Möchten Sie das Abwesenheitsnachrichten-Modul verwenden?';
|
||||
$lng['admin']['show_version_login']['title'] = 'Zeige Froxlor Version beim Login';
|
||||
$lng['admin']['show_version_login']['description'] = 'Zeige Froxlor Version in der Fußzeile der Loginseite';
|
||||
$lng['admin']['show_version_footer']['title'] = 'Zeige Froxlor Version in Fußzeile';
|
||||
@@ -996,173 +979,6 @@ $lng['admin']['security_settings'] = 'Sicherheitseinstellungen';
|
||||
$lng['admin']['expert_settings'] = 'Experteneinstellungen!';
|
||||
$lng['admin']['mod_fcgid_starter']['title'] = 'PHP-Prozesse für diese Domain (leer für Standardwert)';
|
||||
|
||||
//added with aps installer
|
||||
|
||||
$lng['admin']['aps'] = 'APS-Installer';
|
||||
$lng['customer']['aps'] = 'APS-Installer';
|
||||
$lng['aps']['scan'] = 'Neue Pakete einlesen';
|
||||
$lng['aps']['upload'] = 'Neue Pakete hochladen';
|
||||
$lng['aps']['managepackages'] = 'Pakete verwalten';
|
||||
$lng['aps']['manageinstances'] = 'Instanzen verwalten';
|
||||
$lng['aps']['overview'] = 'Paketübersicht';
|
||||
$lng['aps']['status'] = 'Meine Pakete';
|
||||
$lng['aps']['search'] = 'Paket suchen';
|
||||
$lng['aps']['upload_description'] = 'Bitte wählen Sie die APS-ZIP-Dateien aus, um diese im System zu installieren.';
|
||||
$lng['aps']['search_description'] = 'Name, Beschreibung, Schlagwort, Version';
|
||||
$lng['aps']['detail'] = 'Weitere Informationen';
|
||||
$lng['aps']['install'] = 'Paket installieren';
|
||||
$lng['aps']['data'] = 'Daten';
|
||||
$lng['aps']['version'] = 'Version';
|
||||
$lng['aps']['homepage'] = 'Homepage';
|
||||
$lng['aps']['installed_size'] = 'Größe nach Installation';
|
||||
$lng['aps']['categories'] = 'Kategorien';
|
||||
$lng['aps']['languages'] = 'Sprachen';
|
||||
$lng['aps']['long_description'] = 'Langbeschreibung';
|
||||
$lng['aps']['configscript'] = 'Konfigurationskript';
|
||||
$lng['aps']['changelog'] = 'Changelog';
|
||||
$lng['aps']['license'] = 'Lizenz';
|
||||
$lng['aps']['linktolicense'] = 'Link zur Lizenz';
|
||||
$lng['aps']['screenshots'] = 'Screenshots';
|
||||
$lng['aps']['back'] = 'Zurück zur Übersicht';
|
||||
$lng['aps']['install_wizard'] = 'Installationsassistent...';
|
||||
$lng['aps']['wizard_error'] = 'Ihre Eingaben enthalten ungültige Daten. Bitte korrigieren Sie diese, um mit der Installation fortzufahren.';
|
||||
$lng['aps']['basic_settings'] = 'Grundlegende Einstellungen';
|
||||
$lng['aps']['application_location'] = 'Installationsort';
|
||||
$lng['aps']['application_location_description'] = 'Ort an dem die Anwendung installiert werden soll.';
|
||||
$lng['aps']['no_domains'] = 'Keine Domains gefunden';
|
||||
$lng['aps']['database_password'] = 'Datenbankpasswort';
|
||||
$lng['aps']['database_password_description'] = 'Passwort welches für die neu zu erstellende Datenbank verwendet werden soll.';
|
||||
$lng['aps']['license_agreement'] = 'Zustimmung';
|
||||
$lng['aps']['cancel_install'] = 'Installation abbrechen';
|
||||
$lng['aps']['notazipfile'] = 'Die hochgeladene Datei ist keine gültige ZIP-Datei.';
|
||||
$lng['aps']['filetoobig'] = 'Die Datei ist zu groß.';
|
||||
$lng['aps']['filenotcomplete'] = 'Die Datei wurde nicht vollständig hochgeladen.';
|
||||
$lng['aps']['phperror'] = 'Es trat ein PHP interner Fehler auf. Der Upload Fehlercode lautet #';
|
||||
$lng['aps']['moveproblem'] = 'Die hochgeladene Datei konnte nicht aus dem temporären Ordner verschoben werden. Prüfen Sie ob alle Rechte korrekt gesetzt sind. Dies gilt insbesondere fü die Ordner {$path}temp/ und {$path}packages/.';
|
||||
$lng['aps']['uploaderrors'] = '<strong>Fehler für die Datei <em>"%s"</em></strong><br/><ul>"%s"</ul>';
|
||||
$lng['aps']['nospecialchars'] = 'Sonderzeichen sind im Suchausdruck nicht erlaubt!';
|
||||
$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_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';
|
||||
$lng['aps']['unknown_status'] = 'Fehler - Unbekannter Wert';
|
||||
$lng['aps']['currentstatus'] = 'Aktueller Status';
|
||||
$lng['aps']['activetasks'] = 'Aktuelle Jobs';
|
||||
$lng['aps']['task_install'] = 'Installation ausstehend';
|
||||
$lng['aps']['task_remove'] = 'Deinstallation ausstehend';
|
||||
$lng['aps']['task_reconfigure'] = 'Neukonfiguration ausstehend';
|
||||
$lng['aps']['task_upgrade'] = 'Aktualisierung ausstehend';
|
||||
$lng['aps']['no_task'] = 'Kein Task ausstehend';
|
||||
$lng['aps']['applicationlinks'] = 'Anwendungslinks';
|
||||
$lng['aps']['mainsite'] = 'Hauptseite';
|
||||
$lng['aps']['uninstall'] = 'Paket deinstallieren';
|
||||
$lng['aps']['reconfigure'] = 'Einstellungen ändern';
|
||||
$lng['aps']['erroronnewinstance'] = '<strong>Dieses Paket kann nicht installiert werden.</strong><br/><br/>Bitte gehen Sie zurück zur Paketübersicht und starten Sie eine neue Installation.';
|
||||
$lng['aps']['successonnewinstance'] = '<strong><em>"%s"</em> wird nun installiert.</strong><br/><br/>Gehen Sie zurück zu "Meine Pakete" und warten Sie bis die Installation abgeschlossen ist. Dies kann einige Minuten in Anspruch nehmen.';
|
||||
$lng['aps']['php_misc_handler'] = 'PHP - Sonstiges - Es werden keine anderen Dateiendungen als .php zum Parsen unterstützt.';
|
||||
$lng['aps']['php_misc_directoryhandler'] = 'PHP - Sonstiges - Je Verzeichnis deaktivierte PHP Handler werden nicht unterstützt.';
|
||||
$lng['aps']['asp_net'] = 'ASP.NET - Paket wird nicht unterstützt.';
|
||||
$lng['aps']['cgi'] = 'CGI - Paket wird nicht unterstützt.';
|
||||
$lng['aps']['php_extension'] = 'PHP - Erweiterung "%s" fehlt.';
|
||||
$lng['aps']['php_function'] = 'PHP - Funktion "%s" fehlt.';
|
||||
$lng['aps']['php_configuration'] = 'PHP - Konfiguration - Aktuelle "%s" Einstellung wird von Paket nicht unterstützt.';
|
||||
$lng['aps']['php_configuration_post_max_size'] = 'PHP - Konfiguration - "post_max_size" Wert zu klein.';
|
||||
$lng['aps']['php_configuration_memory_limit'] = 'PHP - Konfiguration - "memory_limit" Wert zu klein.';
|
||||
$lng['aps']['php_configuration_max_execution_time'] = 'PHP - Konfiguration - "max_execution_time" Wert zu klein.';
|
||||
$lng['aps']['php_general_old'] = 'PHP - Generell - PHP-Version zu alt.';
|
||||
$lng['aps']['php_general_new'] = 'PHP - Generell - PHP-Version zu neu.';
|
||||
$lng['aps']['db_mysql_support'] = 'Datenbank - Das Paket benötigt eine andere Datenbank Engine als MySQL.';
|
||||
$lng['aps']['db_mysql_version'] = 'Datenbank - MySQL Server zu alt.';
|
||||
$lng['aps']['webserver_module'] = 'Webserver - Modul "%s" fehlt.';
|
||||
$lng['aps']['webserver_fcgid'] = 'Webserver - Von diesem Paket werden einige Webserver Module benötigt. Da Sie Froxlor in einer FastCGI/mod_fcgid Umgebung verwenden, existiert die Funktion "apache_get_modules" nicht. Es kann also nicht ermittelt werden, ob das Paket unterstützt wird.';
|
||||
$lng['aps']['webserver_htaccess'] = 'Webserver - Dieses Paket benötigt, dass ".htaccess"-Dateien vom Webserver geparst werden. Das Paket kann nicht installiert werden, da nicht ermittelt werden kann, ob diese Funktion aktiviert ist.';
|
||||
$lng['aps']['misc_configscript'] = 'Sonstiges - Die Sprache des Konfigurationsskriptes wird nicht unterstützt.';
|
||||
$lng['aps']['misc_charset'] = 'Sonstiges - In der aktuellen Version wird eine Validierung gegen einen gewissen Zeichensatz im Installationsassitenten nicht unterstützt.';
|
||||
$lng['aps']['misc_version_already_installed'] = 'Die gleiche Paketversion ist bereits installiert.';
|
||||
$lng['aps']['misc_only_newer_versions'] = 'Aus Sicherheitsgründen können nur Pakete installiert werden, die neuer sind als die bereits im System installierten Pakete sind.';
|
||||
$lng['aps']['erroronscan'] = '<strong>Fehler für <em>"%s"</em></strong><ul>"%s"</ul>';
|
||||
$lng['aps']['invalidzipfile'] = '<strong>Fehler für <em>"%s"</em></strong><br/><ul><li>Dies ist keine gültige APS-ZIP-Datei!</li></ul>';
|
||||
$lng['aps']['successpackageupdate'] = '<strong><em>"%s"</em> erfolgreich als Paketupdate installiert</strong>';
|
||||
$lng['aps']['successpackageinstall'] = '<strong><em>"%s"</em> erfolgreich als neues Paket installiert</strong>';
|
||||
$lng['aps']['class_zip_missing'] = 'SimpleXML-Klasse, exec-Funktion oder ZIP-Funktionen nicht vorhanden bzw. aktiviert! Für genauere Informationen zu diesem Problem schauen Sie bitte in das Handbuch zu diesem Modul.';
|
||||
$lng['aps']['dir_permissions'] = 'Der PHP- bzw. Webserver-Prozess muss Schreibrechte für {$path}temp/ und {$path}packages/ haben.';
|
||||
$lng['aps']['initerror'] = '<strong>Es gibt ein paar Probleme mit diesem Modul:</strong><ul>"%s"</ul>Beheben Sie diese Probleme, andernfalls kann das Modul nicht genutzt werden!';
|
||||
$lng['aps']['iderror'] = 'Es wurde eine falsche ID übergeben!';
|
||||
$lng['aps']['nopacketsforinstallation'] = 'Es wurden keine Pakete zur Installation gefunden.';
|
||||
$lng['aps']['nopackagestoinstall'] = 'Es existieren keine Pakete die angezeigt oder installiert werden könnten.';
|
||||
$lng['aps']['nodomains'] = 'Wählen Sie eine Domain aus der Liste. Sollte keine Domain vorhanden sein können Sie keine Pakete installieren!';
|
||||
$lng['aps']['wrongpath'] = 'Entweder enthält dieser Pfad ungültige Zeichen oder es ist bereits eine Anwendung am gegebenen Ort installiert.';
|
||||
$lng['aps']['dbpassword'] = 'Geben Sie ein Passwort mit einer minimalen Länge von 8 Zeichen ein.';
|
||||
$lng['aps']['error_text'] = 'Geben Sie einen Text ohne Sonderzeichen ein.';
|
||||
$lng['aps']['error_email'] = 'Geben Sie eine gültige E-Mail Adresse ein.';
|
||||
$lng['aps']['error_domain'] = 'Geben Sie eine gültige URL wie "http://www.example.com/" ein.';
|
||||
$lng['aps']['error_integer'] = 'Geben Sie eine Zahl (Integer-Format) ein. Beispiel: <em>5</em> oder <em>7</em>.';
|
||||
$lng['aps']['error_float'] = 'Geben Sie eine Zahl (Float-Format) ein. Beispiel: <em>5,2432</em> oder <em>7,5346</em>.';
|
||||
$lng['aps']['error_password'] = 'Geben Sie ein Passwort ein.';
|
||||
$lng['aps']['error_license'] = 'Ja, ich habe die Lizenz gelesen und willige ein diese zu befolgen.';
|
||||
$lng['aps']['error_licensenoaccept'] = 'Sie müssen die Lizenz annehmen um die Anwendung installieren zu können.';
|
||||
$lng['aps']['stopinstall'] = 'Installation abbrechen';
|
||||
$lng['aps']['installstopped'] = 'Die Installation für dieses Paket wurde erfolgreich abgebrochen.';
|
||||
$lng['aps']['installstoperror'] = 'Die Installation kann nicht mehr abgebrochen werden, da diese bereits gestartet wurde. Möchten Sie das Paket entfernen, so warten Sie die Installation ab und entfernen Sie dann das Paket unter "Meine Pakete"';
|
||||
$lng['aps']['waitfortask'] = 'Es stehen momentan keine Aktionen zur Verfügung. Warten Sie bis alle Tasks abgearbeitet wurden.';
|
||||
$lng['aps']['removetaskexisting'] = '<strong>Es gibt bereits einen Task zur Deinstallation.</strong><br/><br/>Bitte gehen Sie zurück zu "Meine Pakete" und warten Sie bis die Deinstallation abgeschlossen ist.';
|
||||
$lng['aps']['packagewillberemoved'] = '<strong>Das Paket wird nun deinstalliert.</strong><br/><br/>Gehen Sie zurück zu "Meine Pakete" und warten Sie bis die Deinstallation abgeschlossen ist.';
|
||||
$lng['question']['reallywanttoremove'] = '<strong>Wollen Sie dieses Paket wirklich deinstallieren?</strong><br/><br/>Alle Datenbankinhalte und Dateien werden unwiderruflich gelöscht. Wenn Sie die enthaltenen Daten weiterhin benötigen, stellen Sie sicher dass Sie diese vorher sichern!<br/><br/>';
|
||||
$lng['aps']['searchoneresult'] = '"%s" Paket gefunden';
|
||||
$lng['aps']['searchmultiresult'] = '"%s" Pakete gefunden';
|
||||
$lng['question']['reallywanttostop'] = 'Wollen Sie die Installation dieses Paketes wirklich abbrechen?<br/><br/>';
|
||||
$lng['aps']['packagenameandversion'] = 'Paketname & Version';
|
||||
$lng['aps']['package_locked'] = 'Gesperrt';
|
||||
$lng['aps']['package_enabled'] = 'Freigegeben';
|
||||
$lng['aps']['lock'] = 'Sperren';
|
||||
$lng['aps']['unlock'] = 'Freigeben';
|
||||
$lng['aps']['remove'] = 'Löschen';
|
||||
$lng['aps']['allpackages'] = 'Alle Pakete';
|
||||
$lng['question']['reallyremovepackages'] = '<strong>Wollen Sie diese Pakete wirklich löschen?</strong><br/><br/>Pakete mit Abhängigkeiten können erst gelöscht werden wenn die entsprechenden Instanzen dafür deinstalliert wurden!<br/><br/>';
|
||||
$lng['aps']['nopackagesinsystem'] = 'Es wurden noch keine Pakete im System installiert, die verwaltet werden könnten.';
|
||||
$lng['aps']['packagenameandstatus'] = 'Paketname & Status';
|
||||
$lng['aps']['activate_aps']['title'] = 'APS-Installer aktivieren';
|
||||
$lng['aps']['activate_aps']['description'] = 'Hier können Sie den APS-Installer global aktivieren bzw. deaktivieren.';
|
||||
$lng['aps']['packages_per_page']['title'] = 'Pakete pro Seite';
|
||||
$lng['aps']['packages_per_page']['description'] = 'Wieviele Pakete sollen Kunden pro Seite angezeigt bekommen?';
|
||||
$lng['aps']['upload_fields']['title'] = 'Uploadfelder pro Seite';
|
||||
$lng['aps']['upload_fields']['description'] = 'Wieviele Uploadfelder sollen im Panel zur Installation von Paketen angezeigt werden?';
|
||||
$lng['aps']['exceptions']['title'] = 'Ausnahmen für Paketvalidierung';
|
||||
$lng['aps']['exceptions']['description'] = 'Manche Pakete benötigen spezielle Konfigurationsparameter oder Module. Der Installer selbst kann nicht immer eindeutig feststellen ob diese Optionen/Erweiterungen aktiviert sind. Aus diesem Grund kann man hier nun Ausnahmen festlegen damit Pakete dann trotzdem installiert werden können. Wählen Sie nur die Optionen aus, die auch wirklich so mit der Realität übereinstimmen. Für genauere Informationen zu diesem Problem schauen Sie bitte in das Handbuch zu diesem Modul.';
|
||||
$lng['aps']['settings_php_extensions'] = 'PHP-Erweiterungen';
|
||||
$lng['aps']['settings_php_configuration'] = 'PHP-Konfiguration';
|
||||
$lng['aps']['settings_webserver_modules'] = 'Webserver-Module';
|
||||
$lng['aps']['settings_webserver_misc'] = 'Webserver - Sonstiges';
|
||||
$lng['aps']['specialoptions'] = 'Sonderoptionen';
|
||||
$lng['aps']['removeunused'] = 'Ungenutzte Pakete entfernen';
|
||||
$lng['aps']['enablenewest'] = 'Von jedem Paket neueste Version freigeben, alte Version sperren';
|
||||
$lng['aps']['installations'] = 'Installationen';
|
||||
$lng['aps']['statistics'] = 'Statistiken';
|
||||
$lng['aps']['numerofpackagesinstalled'] = '"%s" Pakete vorhanden<br/>';
|
||||
$lng['aps']['numerofpackagesenabled'] = '"%s" Pakete freigegeben<br/>';
|
||||
$lng['aps']['numerofpackageslocked'] = '"%s" Pakete gesperrt<br/>';
|
||||
$lng['aps']['numerofinstances'] = '"%s" Instanzen installiert<br/>';
|
||||
$lng['question']['reallydoaction'] = '<strong>Wollen Sie die gewählten Aktionen wirklich durchführen?</strong><br/><br/>Daten, die durch diese Vorgänge möglicherweise gelöscht werden, können anschließend nicht wieder hergestellt werden.<br/><br/>';
|
||||
$lng['aps']['initerror_customer'] = 'Es gibt momentan ein Problem mit dieser Froxlor-Erweiterung. Wenden Sie sich bitte für weitere Informationen an Ihren Administrator.';
|
||||
$lng['aps']['numerofinstances'] = '"%s" Installationen insgesamt<br/>';
|
||||
$lng['aps']['numerofinstancessuccess'] = '"%s" erfolgreiche Installationen<br/>';
|
||||
$lng['aps']['numerofinstanceserror'] = '"%s" fehlgeschlagene Installationen<br/>';
|
||||
$lng['aps']['numerofinstancesaction'] = '"%s" geplante Installationen/Deinstallationen';
|
||||
$lng['aps']['downloadallpackages'] = 'Alle Pakete vom Distributionsserver herunterladen';
|
||||
$lng['aps']['updateallpackages'] = 'Alle Pakete über Distributionsserver aktualisieren';
|
||||
$lng['aps']['downloadtaskexists'] = 'Es gibt bereits einen Task zum Download aller Pakete. Bitte warten Sie bis dieser abgeschlossen ist.';
|
||||
$lng['aps']['downloadtaskinserted'] = 'Es wurde ein Task zum Download aller Pakete erstellt. Dieser Vorgang kann einige Minuten in Anspruch nehmen.';
|
||||
$lng['aps']['updatetaskexists'] = 'Es gibt bereits einen Task zur Aktualisierung aller Pakete. Bitte warten Sie bis dieser abgeschlossen ist.';
|
||||
$lng['aps']['updatetaskinserted'] = 'Es wurde ein Task zur Aktualisierung aller Pakete erstellt. Dieser Vorgang kann einige Minuten in Anspruch nehmen.';
|
||||
$lng['aps']['canmanagepackages'] = 'Darf APS-Pakete verwalten';
|
||||
$lng['aps']['numberofapspackages'] = 'Anzahl an APS-Installationen';
|
||||
$lng['aps']['allpackagesused'] = '<strong>Fehler</strong><br/><br/>Sie haben bereits die Anzahl an installierbaren APS-Anwendungen erreicht bzw. überschritten.';
|
||||
$lng['aps']['noinstancesexisting'] = 'Es gibt momentan noch keine Instanzen, die verwaltet werden könnten. Es muss mindestens eine Anwendung von einem Kunden installiert worden sein.';
|
||||
$lng['aps']['lightywarning'] = 'Warnung';
|
||||
$lng['aps']['lightywarningdescription'] = 'Sie verwenden den lighttpd-Webserver zusammen mit Froxlor. Da das APS-Modul hauptsächlich für den Apache-Webserver geschrieben wurde, kann es unter Umständen vorkommen, dass gewisse Features mit lighttpd nicht funktionieren. Bitte beachten Sie dies bei der Verwendung des APS-Moduls. Sollten Sie Fehler bei der Verwendung oder Probleme bei der Nutzung haben, so leiten Sie diese bitte an die Entwickler weiter, damit diese Probleme in der nächsten Version behoben werden können.';
|
||||
$lng['error']['customerdoesntexist'] = 'Der ausgewählte Kunde existiert nicht.';
|
||||
$lng['error']['admindoesntexist'] = 'Der ausgewählte Admin existiert nicht.';
|
||||
|
||||
@@ -1191,7 +1007,6 @@ $lng['serversettings']['mod_fcgid']['maxrequests']['description'] = 'Wieviele PH
|
||||
// fix bug #1124
|
||||
$lng['admin']['webserver'] = 'Webserver';
|
||||
$lng['error']['admin_domain_emailsystemhostname'] = 'Der Server-Hostname kann leider nicht als E-Mail-Domain verwendet werden.';
|
||||
$lng['aps']['license_link'] = 'Link zur Lizenz';
|
||||
|
||||
// ADDED IN FROXLOR 0.9
|
||||
|
||||
@@ -1203,9 +1018,6 @@ $lng['panel']['toomanydirs'] = 'Zu viele Unterverzeichnisse. Weiche auf manuelle
|
||||
$lng['panel']['abort'] = 'Abbrechen';
|
||||
$lng['serversettings']['cron']['debug']['title'] = 'Debuggen des Cronscripts';
|
||||
$lng['serversettings']['cron']['debug']['description'] = 'Wenn aktiviert, wird die Lockdatei nach dem Cronlauf zum Debuggen nicht gelöscht<br /><b>Achtung:</b> Eine alte Lockdatei kann weitere Cronjobs behindern und dafür sorgen, dass diese nicht vollständig ausgeführt werden.';
|
||||
$lng['autoresponder']['date_from'] = 'Start-Datum';
|
||||
$lng['autoresponder']['date_until'] = 'End-Datum';
|
||||
$lng['autoresponder']['startenddate'] = 'Start/End-Datum';
|
||||
$lng['panel']['not_activated'] = 'Nicht aktiviert';
|
||||
$lng['panel']['off'] = 'aus';
|
||||
$lng['update']['updateinprogress_onlyadmincanlogin'] = 'Eine neuere Version von Froxlor wurde installiert, aber noch nicht eingerichtet.<br />Nur der Administrator kann sich anmelden und die Aktualisierung abschließen.';
|
||||
@@ -1278,9 +1090,6 @@ $lng['crondesc']['cron_unknown_desc'] = 'Keine Beschreibung angegeben';
|
||||
$lng['admin']['cron']['add'] = 'Cronjob hinzufügen';
|
||||
$lng['crondesc']['cron_tasks'] = 'Erstellen von Konfigurationsdateien';
|
||||
$lng['crondesc']['cron_legacy'] = 'Legacy (alter) Cronjob';
|
||||
$lng['crondesc']['cron_apsinstaller'] = 'APS-Installer';
|
||||
$lng['crondesc']['cron_autoresponder'] = 'E-Mail Autoresponder';
|
||||
$lng['crondesc']['cron_apsupdater'] = 'Aktualisieren der APS-Pakete';
|
||||
$lng['crondesc']['cron_traffic'] = 'Traffic-Berechnung';
|
||||
$lng['crondesc']['cron_ticketsreset'] = 'Zurücksetzen der Ticket-Zähler';
|
||||
$lng['crondesc']['cron_ticketarchive'] = 'Archivieren alter Tickets';
|
||||
@@ -1307,7 +1116,6 @@ $lng['ftp']['editpassdescription'] = 'Neues Passwort setzen oder leer für keine
|
||||
$lng['customer']['sendinfomail'] = 'Daten per E-Mail an mich senden';
|
||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] Neue Datenbank erstellt';
|
||||
$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}\nphpMyAdmin: {PMA_URI}\nVielen Dank, Ihr Administrator";
|
||||
$lng['error']['domains_cantdeletedomainwithapsinstances'] = 'Sie können keine Domain löschen, die noch von APS Paketen verwendet wird. Löschen Sie zuerst alle installierten APS Pakete dieser Domain.';
|
||||
$lng['serversettings']['awstats_path'] = 'Pfad zu AWStats \'awstats_buildstaticpages.pl\'';
|
||||
$lng['serversettings']['awstats_conf'] = 'AWStats Konfigurations-Pfad';
|
||||
$lng['error']['overviewsettingoptionisnotavalidfield'] = 'Hoppla, ein Feld, dass als Option in der Konfigurationsübersicht angezeigt werden soll, hat nicht den erwarteten Wert. Sie können den Entwicklern die Schuld geben. Dies sollte nicht passieren!';
|
||||
@@ -1374,20 +1182,11 @@ $lng['serversettings']['customredirect_default']['description'] = 'Dieser Redire
|
||||
|
||||
// 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';
|
||||
|
||||
@@ -1454,9 +1253,6 @@ $lng['admin']['templates']['forgotpwd'] = 'Benachrichtigungs-Mails bei Zurückse
|
||||
$lng['admin']['templates']['password_reset'] = 'Kunden-Benachrichtigung nach Zurücksetzen des Passworts';
|
||||
$lng['admin']['store_defaultindex'] = 'Erstelle Standard-Index-Datei im Kunden-Ordner';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.13-svn1
|
||||
$lng['customer']['autoresponder'] = 'Abwesenheitsnachrichten';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.14
|
||||
$lng['serversettings']['mod_fcgid']['defaultini_ownvhost'] = 'Voreingestellte PHP-Konfiguration für den Froxlor-Vhost';
|
||||
$lng['serversettings']['awstats_icons']['title'] = 'Pfad zum AWstats-Icon-Ordner';
|
||||
@@ -1558,31 +1354,12 @@ $lng['traffic']['months']['total'] = 'Gesamt';
|
||||
$lng['traffic']['details'] = 'Details';
|
||||
$lng['menue']['traffic']['table'] = 'Übersicht';
|
||||
$lng['error']['admin_domain_emailsystemhostname'] = 'Der System - Hostname kann nicht als Kundendomain verwendet werden.';
|
||||
$lng['backup'] = 'Backup';
|
||||
$lng['backup_allowed'] = 'Backup erlaubt';
|
||||
$lng['extras']['backup_create'] = 'Backup erstellen?';
|
||||
$lng['extras']['backup_info'] = 'Das Backup wird täglich in einem FTP Verzeichnis abgelegt. Der FTP Username ist "%s_backup". Das FTP Passwort ist das gleiche wie bei ihrem Haupt FTP Account.';
|
||||
$lng['extras']['backup_info_sep'] = 'Es sind komprimierte Archive von Ihrem Webverzeichnis und Ihren Datenbanken enthalten.';
|
||||
$lng['extras']['backup_info_big'] = 'Es ist ein komprimiertes Archiv von Ihrem Webverzeichnis und Ihren Datenbanken enthalten.';
|
||||
$lng['extras']['backup_count_info'] = '<br /><br />Beachten Sie bitte, dass das Backup den verfügbaren Speicherplatz belastet!';
|
||||
$lng['serversettings']['backup_count'] = 'Soll die Größe des Backups vom verfügbaren Webspace-Limit abgezogen werden?';
|
||||
$lng['serversettings']['backup_enabled'] = 'Backup aktivieren?';
|
||||
$lng['serversettings']['backup_ftp_enabled'] = 'FTP Upload aktivieren?';
|
||||
$lng['serversettings']['backup_ftp_server'] = 'FTP Server:';
|
||||
$lng['serversettings']['backup_ftp_user'] = 'FTP Benutzer:';
|
||||
$lng['serversettings']['backup_ftp_pass'] = 'FTP Passwort:';
|
||||
$lng['serversettings']['backupdir']['description'] = 'Pfad des Backup-Verzeichnisses?';
|
||||
$lng['serversettings']['mysqldump_path']['description'] = 'Pfad zum mysqldump Programm:';
|
||||
$lng['serversettings']['backup_count'] = 'Soll die Größe des Backups vom verfügbaren Webspace abgezogen werden?';
|
||||
$lng['crondesc']['cron_backup'] = 'Backup Cronjob';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.21
|
||||
$lng['gender']['title'] = 'Geschlecht';
|
||||
$lng['gender']['male'] = 'Herr';
|
||||
$lng['gender']['female'] = 'Frau';
|
||||
$lng['gender']['undef'] = '';
|
||||
$lng['serversettings']['backup_ftp_passive_mode'] = 'Passiven Übertragungsmodus verwenden';
|
||||
$lng['serversettings']['backup_bigfile'] = 'Backup von Kundenverzeichnissen und Datenbanken in eine Datei speichern, statt zu splitten?';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.22-svn1
|
||||
$lng['diskquota'] = 'Quota';
|
||||
|
||||
1
packages/.gitignore
vendored
1
packages/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php if (!defined('MASTER_CRONJOB')) die('You cannot access this file directly!');
|
||||
|
||||
/**
|
||||
* 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 Cron
|
||||
*
|
||||
*/
|
||||
|
||||
$Aps = new ApsInstaller($settings);
|
||||
$Aps->InstallHandler();
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php if (!defined('MASTER_CRONJOB')) die('You cannot access this file directly!');
|
||||
|
||||
/**
|
||||
* 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 Cron
|
||||
*
|
||||
*/
|
||||
|
||||
$Aps = new ApsUpdater($cronlog);
|
||||
$Aps->UpdateHandler();
|
||||
@@ -1,258 +0,0 @@
|
||||
<?php if (!defined('MASTER_CRONJOB')) die('You cannot access this file directly!');
|
||||
|
||||
/**
|
||||
* 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 Remo Fritzsche
|
||||
* @author Manuel Aller
|
||||
* @author Michael Schlechtinger
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Cron
|
||||
*
|
||||
* @todo skip mail parsing after x bytes for large mails
|
||||
*/
|
||||
|
||||
$mail = new PHPMailer(true);
|
||||
|
||||
//dont do anything when module is disabled
|
||||
if ((int)$settings['autoresponder']['autoresponder_active'] == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
//only send autoresponder to mails which were delivered since last run
|
||||
if ((int)$settings['autoresponder']['last_autoresponder_run'] == 0) {
|
||||
//mails from last 5 minutes, otherwise all mails will be parsed -> mailbomb prevention
|
||||
$cycle = 300;
|
||||
} else {
|
||||
// calculate seconds since last check
|
||||
$cycle = time() - (int)$settings['autoresponder']['last_autoresponder_run'];
|
||||
//prevent mailbombs when cycle is bigger than two days
|
||||
if($cycle > (2 * 60 * 60 * 24))$cycle = (60 * 60 * 24);
|
||||
}
|
||||
|
||||
// set last_autoresponder_run
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = :timeval
|
||||
WHERE `settinggroup` = 'autoresponder' AND `varname` = 'last_autoresponder_run'
|
||||
");
|
||||
Database::pexecute($upd_stmt, array('timeval' => time()));
|
||||
|
||||
// get all customer set ip autoresponders
|
||||
$result_stmt = Database::query("
|
||||
SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` INNER JOIN `" . TABLE_MAIL_USERS . "`
|
||||
ON `" . TABLE_MAIL_AUTORESPONDER . "`.`email` = `" . TABLE_MAIL_USERS . "`.`email`
|
||||
WHERE `enabled` = 1
|
||||
");
|
||||
|
||||
if (Database::num_rows() > 0) {
|
||||
|
||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
//check if specific autoresponder should be used
|
||||
$ts_now = time();
|
||||
$ts_start = (int)$row['date_from'];
|
||||
$ts_end = (int)$row['date_until'];
|
||||
|
||||
$row['email'] = strtolower($row['email']);
|
||||
|
||||
// not yet
|
||||
if($ts_start != -1 && $ts_start > $ts_now) continue;
|
||||
// already ended
|
||||
if($ts_end != -1 && $ts_end < $ts_now) continue;
|
||||
|
||||
// setup mail-path (e.g. /var/customers/mail/[loginname]/[user@domain.tld]/new
|
||||
$path = makeCorrectDir($row['homedir'] . $row['maildir'] . "new/");
|
||||
|
||||
// if the directory does not exist, inform syslog
|
||||
if (!is_dir($path)) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error accessing maildir: " . $path);
|
||||
continue;
|
||||
}
|
||||
|
||||
// get all files
|
||||
$its = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($path)
|
||||
);
|
||||
|
||||
$responded_counter = 0;
|
||||
foreach ($its as $fullFilename => $it ) {
|
||||
if ($it->getFilename() == '.' || $it->getFilename() == '..') {
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* is the time passed between now and
|
||||
* the time we received the mail lower/equal
|
||||
* than our cycle-seconds?
|
||||
*/
|
||||
$filemtime = $it->getMTime();
|
||||
if (time() - $filemtime <= $cycle) {
|
||||
// why not read up to k lines?
|
||||
// I've been patching this forever, to avoid FATAL ERROR / memory exhausted
|
||||
// (fgets() is now binary safe, too)
|
||||
// $content = file($fullFilename);
|
||||
$lcount = 0; $content = array(); $handle = @fopen($fullFilename, "r");
|
||||
if ($handle) {
|
||||
// 1023 lines of an email should be enough to analyze it
|
||||
while (($lcount++<1023) && (($buffer = fgets($handle)) !== false)) {
|
||||
$content[]=$buffer;
|
||||
}
|
||||
fclose($handle);
|
||||
}
|
||||
|
||||
// error reading mail contents or just empty
|
||||
if (count($content) == 0) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Unable to read mail from maildir: " . dirname($fullFilename));
|
||||
continue;
|
||||
}
|
||||
|
||||
$match = array();
|
||||
$from = '';
|
||||
$to = '';
|
||||
$sender = '';
|
||||
$spam = false;
|
||||
foreach ($content as $line) {
|
||||
// header ends on first empty line, skip rest of mail
|
||||
if (strlen(rtrim($line)) == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
//fetching from field
|
||||
if (!strlen($from)
|
||||
&& preg_match("/^From:(.+)<(.*)>$/", $line, $match)
|
||||
) {
|
||||
$from = strtolower($match[2]);
|
||||
}
|
||||
elseif (!strlen($from)
|
||||
&& preg_match("/^From:\s+(.*@.*)$/", $line, $match)
|
||||
) {
|
||||
$from = strtolower($match[1]);
|
||||
}
|
||||
|
||||
//fetching to field
|
||||
if ((!strlen($to) || $to != $row['email'])
|
||||
&& preg_match("/^To:(.+)<(.*)>$/", $line, $match)
|
||||
) {
|
||||
$to = strtolower($match[2]);
|
||||
}
|
||||
elseif ((!strlen($to) || $to != $row['email'])
|
||||
&& preg_match("/^To:\s+(.*@.*)$/", $line, $match)
|
||||
) {
|
||||
$to = strtolower($match[1]);
|
||||
}
|
||||
/*
|
||||
* if we still don't have a To:-address
|
||||
* OR even worse, the $to is NOT the mail-address
|
||||
* of the customer which autoresponder this is
|
||||
* we have to check for CC too, #476
|
||||
*/
|
||||
elseif ((!strlen($to) || $to != $row['email'])
|
||||
&& preg_match("/^Cc:(.+)<(.*)>$/", $line, $match)
|
||||
) {
|
||||
$to = strtolower($match[2]);
|
||||
}
|
||||
elseif ((!strlen($to) || $to != $row['email'])
|
||||
&& preg_match("/^Cc:\s+(.*@.*)$/", $line, $match)
|
||||
) {
|
||||
$to = strtolower($match[1]);
|
||||
}
|
||||
|
||||
// fetching sender field
|
||||
if (!strlen($sender)
|
||||
&& preg_match("/^Sender:(.+)<(.*)>$/", $line, $match)
|
||||
) {
|
||||
$sender = strtolower($match[2]);
|
||||
}
|
||||
elseif (!strlen($sender)
|
||||
&& preg_match("/Sender:\s+(.*@.*)$/", $line, $match)
|
||||
) {
|
||||
$sender = strtolower($match[1]);
|
||||
}
|
||||
|
||||
//check for amavis/spamassassin spam headers
|
||||
if (preg_match("/^X-Spam-Status: (Yes|No)(.*)$/", $line, $match)) {
|
||||
if(strtolower($match[1]) == 'yes') {
|
||||
$spam = true;
|
||||
}
|
||||
}
|
||||
|
||||
//check for precedence header
|
||||
if (preg_match("/^Precedence: (bulk|list|junk)(.*)$/", $line, $match)) {
|
||||
// use the spam flag to skip reply
|
||||
$spam = true;
|
||||
}
|
||||
}
|
||||
|
||||
// check if the receiver is really the one
|
||||
// with the autoresponder
|
||||
if (!strlen($to) || $to != $row['email']) {
|
||||
$to = '';
|
||||
}
|
||||
|
||||
//skip mail when marked as spam
|
||||
if ($spam == true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//error while parsing mail
|
||||
if ($to == '' || $from == '') {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "No valid headers found in mail to parse");
|
||||
continue;
|
||||
}
|
||||
|
||||
//important! prevent mailbombs when mail comes from a maildaemon/mailrobot
|
||||
//robot/daemon mails must go to Sender: field in envelope header
|
||||
//refers to "Das Postfix-Buch" / RFC 2822
|
||||
if ($sender != '') {
|
||||
$from = $sender;
|
||||
}
|
||||
|
||||
//make message valid to email format
|
||||
$message = str_replace("\r\n", "\n", $row['message']);
|
||||
|
||||
//check if mail is already an answer
|
||||
$fullcontent = implode("", $content);
|
||||
|
||||
if (strstr($fullcontent, $message) || $from == $to) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->CharSet = "UTF-8";
|
||||
$mail->SetFrom($to, $to);
|
||||
$mail->AddReplyTo($to, $to);
|
||||
$mail->Subject = $row['subject'];
|
||||
$mail->AltBody = $message;
|
||||
$html_message = str_replace("\n", "<br />", $message);
|
||||
$mail->MsgHTML(html_entity_decode($html_message));
|
||||
$mail->AddAddress($from, $from);
|
||||
$mail->AddCustomHeader('Precedence: bulk');
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
$_mailerror = true;
|
||||
} catch (Exception $e) {
|
||||
$mailerr_msg = $e->getMessage();
|
||||
$_mailerror = true;
|
||||
}
|
||||
|
||||
if ($_mailerror) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error sending autoresponder mail: " . $mailerr_msg);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
$responded_counter++;
|
||||
}
|
||||
}
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Responded to '" . $responded_counter . "' mails from '".$path."'");
|
||||
}
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
<?php if (!defined('MASTER_CRONJOB')) die('You cannot access this file directly!');
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Cron
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Backup
|
||||
*/
|
||||
if ($settings['system']['backup_enabled'] == '1') {
|
||||
|
||||
fwrite($debugHandler, 'backup customers started...' . "\n");
|
||||
|
||||
// get sql-root access data for mysqldump
|
||||
Database::needRoot(true);
|
||||
Database::needSqlData();
|
||||
$sql_root = Database::getSqlData();
|
||||
Database::needRoot(false);
|
||||
|
||||
$result_stmt = Database::query("
|
||||
SELECT customerid, loginname, guid, documentroot, backup_allowed, backup_enabled
|
||||
FROM `" . TABLE_PANEL_CUSTOMERS . "` ORDER BY `customerid` ASC;
|
||||
");
|
||||
|
||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
|
||||
fwrite($debugHandler, 'backup for ' . $row['loginname'] . ' started...' . "\n");
|
||||
|
||||
// backup
|
||||
if ($row['backup_allowed'] == '1'
|
||||
&& $row['backup_enabled'] == '1'
|
||||
) {
|
||||
// get uid & gid from ftp table
|
||||
$ftp_result_stmt = Database::prepare("
|
||||
SELECT uid, gid FROM `" . TABLE_FTP_USERS . "`
|
||||
WHERE `username` = :loginname
|
||||
");
|
||||
$ftp_row = Database::pexecute_first($ftp_result_stmt, array('loginname' => $row['loginname']));
|
||||
|
||||
// create backup dir an set rights
|
||||
$_backupdir = makeCorrectDir($settings['system']['backup_dir'] . $row['loginname']);
|
||||
if (!file_exists($_backupdir)) {
|
||||
safe_exec('install -d ' . escapeshellarg($_backupdir) . ' -o ' . escapeshellarg($ftp_row['uid']) . ' -g ' . escapeshellarg($ftp_row['gid']) . ' -m ' . '0500');
|
||||
}
|
||||
|
||||
// create customers html backup
|
||||
safe_exec('tar -C ' . escapeshellarg($row['documentroot']) . ' -c -z -f ' . escapeshellarg($_backupdir) . '/' . escapeshellarg($row['loginname']) . 'html.tar.gz .');
|
||||
|
||||
// get customer dbs
|
||||
$dbs_result_stmt = Database::prepare("
|
||||
SELECT `databasename` FROM `" . TABLE_PANEL_DATABASES . "`
|
||||
WHERE `customerid` = :customerid
|
||||
");
|
||||
Database::pexecute($dbs_result_stmt, array('customerid' => $row['customerid']));
|
||||
|
||||
while ($dbs_row = $dbs_result_stmt->fetch(PDO::FETCH_ASSOC)){
|
||||
// create customers sql backup
|
||||
safe_exec(escapeshellcmd($settings['system']['backup_mysqldump_path']) . ' --opt --force --allow-keywords -u ' . escapeshellarg($sql_root['user']) . ' -p' . escapeshellarg($sql_root['passwd']) . ' -h ' . $sql_root['host'] . ' -B ' . escapeshellarg($dbs_row['databasename']) . ' -r ' . escapeshellarg($_backupdir) . '/' . escapeshellarg($dbs_row['databasename']) . '.sql' );
|
||||
// compress sql backup
|
||||
safe_exec('tar -C ' . escapeshellarg($_backupdir) . ' -c -z -f ' . escapeshellarg($settings['system']['backup_dir']) . $row['loginname'] . '/' . escapeshellarg($dbs_row['databasename']) . '.tar.gz ' . escapeshellarg($dbs_row['databasename']) . '.sql');
|
||||
// remove uncompresed sql files
|
||||
safe_exec('rm ' . escapeshellarg($_backupdir) . '/' . escapeshellarg($dbs_row['databasename']) . '.sql');
|
||||
}
|
||||
|
||||
// create 1 big file with html & db
|
||||
if ($settings['system']['backup_bigfile'] == 1) {
|
||||
safe_exec('tar -C ' . escapeshellarg($_backupdir) . '/' . ' --exclude=' . escapeshellarg($row['loginname']) . '.tar.gz -c -z -f ' . escapeshellarg($_backupdir) . '/' . escapeshellarg($row['loginname']) . '.tar.gz .');
|
||||
// remove separated files
|
||||
$tmp_files = scandir($_backupdir);
|
||||
foreach ($tmp_files as $tmp_file) {
|
||||
if (preg_match('/.*(html|sql|aps).*\.tar\.gz$/', $tmp_file) && !preg_match('/^' . $row['loginname'] . '\.tar\.gz$/', $tmp_file)) {
|
||||
safe_exec('rm ' . escapeshellarg($_backupdir) . '/' . escapeshellarg($tmp_file));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//remove big file if separated backups are used
|
||||
if (file_exists(makeCorrectFile($_backupdir . '/' . $row['loginname'] . '.tar.gz'))) {
|
||||
safe_exec('rm ' . escapeshellarg($_backupdir) . '/' . escapeshellarg($row['loginname']) . '.tar.gz');
|
||||
}
|
||||
}
|
||||
|
||||
// chown & chmod files to prevent manipulation
|
||||
safe_exec('chown ' . escapeshellarg($row['guid']) . ':' . escapeshellarg($row['guid']) . ' ' . escapeshellarg($_backupdir) . '/*');
|
||||
safe_exec('chmod 0400 ' . escapeshellarg($_backupdir) . '/*');
|
||||
|
||||
// create ftp backup user
|
||||
$user_result_stmt = Database::prepare("
|
||||
SELECT username, password FROM `" . TABLE_FTP_USERS . "`
|
||||
WHERE `customerid` = :customerid AND `username` = :username;
|
||||
");
|
||||
$user_row = Database::pexecute_first($user_result_stmt, array('customerid' => $row['customerid'], 'username' => $row['loginname']));
|
||||
|
||||
$ins_stmt = Database::prepare("
|
||||
REPLACE INTO `" . TABLE_FTP_USERS . "`
|
||||
(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`)
|
||||
VALUES
|
||||
(:customerid, :username, :password, :homedir, 'y', :guid, :guid)
|
||||
");
|
||||
$ins_data = array(
|
||||
'customerid' => $row['customerid'],
|
||||
'username' => $row['loginname']."_backup",
|
||||
'password' => $user_row['password'],
|
||||
'homedir' => makeCorrectDir($settings['system']['backup_dir'].'/'.$row['loginname'].'/'),
|
||||
'guid' => $row['guid']
|
||||
);
|
||||
Database::pexecute($ins_stmt, $ins_data);
|
||||
|
||||
if ($settings['system']['backup_ftp_enabled'] == '1') {
|
||||
// upload backup to customers ftp server
|
||||
$_ftpdir = makeCorrectDir($settings['system']['backup_dir'].'/'.$row['loginname'].'/');
|
||||
$ftp_files = scandir($_ftpdir);
|
||||
|
||||
foreach ($ftp_files as $ftp_file) {
|
||||
if (preg_match('/.*\.tar\.gz$/', $ftp_file)) {
|
||||
|
||||
$ftp_con = ftp_connect($settings['system']['backup_ftp_server']);
|
||||
$ftp_login = ftp_login($ftp_con, $settings['system']['backup_ftp_user'], $settings['system']['backup_ftp_pass']);
|
||||
|
||||
// Check whether to use passive mode or not
|
||||
if ($settings['system']['backup_ftp_passive'] == 1) {
|
||||
ftp_pasv($ftp_con, true);
|
||||
} else {
|
||||
ftp_pasv($ftp_con, false);
|
||||
}
|
||||
$_file = makeCorrectFile($_ftpdir.'/'.$ftp_file);
|
||||
$ftp_upload = ftp_put($ftp_con, $ftp_file, $_file, FTP_BINARY);
|
||||
}
|
||||
}
|
||||
}
|
||||
fwrite($debugHandler, 'backup for ' . $row['loginname'] . ' finished...' . "\n");
|
||||
}
|
||||
// delete old backup data (deletes backup if customer or admin disables backup)
|
||||
elseif ($row['backup_allowed'] == '0' || $row['backup_enabled'] == '0') {
|
||||
$_ftpdir = makeCorrectDir($settings['system']['backup_dir'].'/'.$row['loginname'].'/');
|
||||
if (file_exists($_ftpdir)){
|
||||
$files = scandir($_ftpdir);
|
||||
foreach ($files as $file) {
|
||||
if (preg_match('/.*\.tar\.gz$/', $file)){
|
||||
$_file = makeCorrectFile($_ftpdir.'/'.$file);
|
||||
safe_exec('rm -f ' . escapeshellarg($_file));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fwrite($debugHandler, 'backup customers finished...' . "\n");
|
||||
}
|
||||
1
temp/.gitignore
vendored
1
temp/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*
|
||||
Reference in New Issue
Block a user