- Customer can now select http-redirect-code for domains (if path is an URL), only works for apache as lighttpd does not support this until version 1.5.0, fixes #184
This commit is contained in:
@@ -152,6 +152,24 @@ return array(
|
|||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
|
'customredirect_enabled' => array(
|
||||||
|
'label' => $lng['serversettings']['customredirect_enabled'],
|
||||||
|
'settinggroup' => 'customredirect',
|
||||||
|
'varname' => 'enabled',
|
||||||
|
'type' => 'bool',
|
||||||
|
'default' => false,
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
|
'customredirect_default' => array(
|
||||||
|
'label' => $lng['serversettings']['customredirect_default'],
|
||||||
|
'settinggroup' => 'customredirect',
|
||||||
|
'varname' => 'default',
|
||||||
|
'type' => 'option',
|
||||||
|
'default' => '1',
|
||||||
|
'option_mode' => 'one',
|
||||||
|
'option_options_method' => 'getRedirectCodes',
|
||||||
|
'save_method' => 'storeSettingField',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'ssl' => array(
|
'ssl' => array(
|
||||||
|
|||||||
@@ -226,6 +226,7 @@ elseif($page == 'domains')
|
|||||||
$aliasdomain_check = array(
|
$aliasdomain_check = array(
|
||||||
'id' => 0
|
'id' => 0
|
||||||
);
|
);
|
||||||
|
$_doredirect = false;
|
||||||
|
|
||||||
if($aliasdomain != 0)
|
if($aliasdomain != 0)
|
||||||
{
|
{
|
||||||
@@ -238,6 +239,7 @@ elseif($page == 'domains')
|
|||||||
&& validateUrl($idna_convert->encode($_POST['url'])))
|
&& validateUrl($idna_convert->encode($_POST['url'])))
|
||||||
{
|
{
|
||||||
$path = $_POST['url'];
|
$path = $_POST['url'];
|
||||||
|
$_doredirect = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -250,6 +252,10 @@ elseif($page == 'domains')
|
|||||||
$path = $userinfo['documentroot'] . '/' . $path;
|
$path = $userinfo['documentroot'] . '/' . $path;
|
||||||
$path = makeCorrectDir($path);
|
$path = makeCorrectDir($path);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$_doredirect = true;
|
||||||
|
}
|
||||||
|
|
||||||
if(isset($_POST['openbasedir_path'])
|
if(isset($_POST['openbasedir_path'])
|
||||||
&& $_POST['openbasedir_path'] == '1')
|
&& $_POST['openbasedir_path'] == '1')
|
||||||
@@ -326,6 +332,13 @@ elseif($page == 'domains')
|
|||||||
`ssl_redirect` = '" . $ssl_redirect . "',
|
`ssl_redirect` = '" . $ssl_redirect . "',
|
||||||
`phpsettingid` = '" . $phpsid_result['phpsettingid'] . "'");
|
`phpsettingid` = '" . $phpsid_result['phpsettingid'] . "'");
|
||||||
|
|
||||||
|
if($_doredirect)
|
||||||
|
{
|
||||||
|
$did = $db->insert_id();
|
||||||
|
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : $settings['customredirect']['default'];
|
||||||
|
addRedirectToDomain($did, $redirect);
|
||||||
|
}
|
||||||
|
|
||||||
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
|
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
@@ -351,6 +364,16 @@ elseif($page == 'domains')
|
|||||||
$aliasdomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
|
$aliasdomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($settings['customredirect']['enabled'] == '1')
|
||||||
|
{
|
||||||
|
$redirectcode = '';
|
||||||
|
$codes = getRedirectCodesArray();
|
||||||
|
foreach($codes as $rc)
|
||||||
|
{
|
||||||
|
$redirectcode .= makeoption($rc['code'], $rc['id'], $settings['customredirect']['default']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||||
$openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true);
|
$openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true);
|
||||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||||
@@ -364,6 +387,7 @@ elseif($page == 'domains')
|
|||||||
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path`, `d`.`ipandport`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
|
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path`, `d`.`ipandport`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
|
||||||
$alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\'');
|
$alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\'');
|
||||||
$alias_check = $alias_check['count'];
|
$alias_check = $alias_check['count'];
|
||||||
|
$_doredirect = false;
|
||||||
|
|
||||||
if(isset($result['customerid'])
|
if(isset($result['customerid'])
|
||||||
&& $result['customerid'] == $userinfo['customerid'])
|
&& $result['customerid'] == $userinfo['customerid'])
|
||||||
@@ -376,6 +400,7 @@ elseif($page == 'domains')
|
|||||||
&& validateUrl($idna_convert->encode($_POST['url'])))
|
&& validateUrl($idna_convert->encode($_POST['url'])))
|
||||||
{
|
{
|
||||||
$path = $_POST['url'];
|
$path = $_POST['url'];
|
||||||
|
$_doredirect = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -388,6 +413,10 @@ elseif($page == 'domains')
|
|||||||
$path = $userinfo['documentroot'] . '/' . $path;
|
$path = $userinfo['documentroot'] . '/' . $path;
|
||||||
$path = makeCorrectDir($path);
|
$path = makeCorrectDir($path);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$_doredirect = true;
|
||||||
|
}
|
||||||
|
|
||||||
$aliasdomain = intval($_POST['alias']);
|
$aliasdomain = intval($_POST['alias']);
|
||||||
|
|
||||||
@@ -461,6 +490,12 @@ elseif($page == 'domains')
|
|||||||
$log->logAction(USR_ACTION, LOG_NOTICE, "automatically deleted mail-table entries for '" . $idna_convert->decode($result['domain']) . "'");
|
$log->logAction(USR_ACTION, LOG_NOTICE, "automatically deleted mail-table entries for '" . $idna_convert->decode($result['domain']) . "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($_doredirect)
|
||||||
|
{
|
||||||
|
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : false;
|
||||||
|
updateRedirectOfDomain($id, $redirect);
|
||||||
|
}
|
||||||
|
|
||||||
if($path != $result['documentroot']
|
if($path != $result['documentroot']
|
||||||
|| $isemaildomain != $result['isemaildomain']
|
|| $isemaildomain != $result['isemaildomain']
|
||||||
|| $iswildcarddomain != $result['iswildcarddomain']
|
|| $iswildcarddomain != $result['iswildcarddomain']
|
||||||
@@ -502,6 +537,17 @@ elseif($page == 'domains')
|
|||||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']);
|
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($settings['customredirect']['enabled'] == '1')
|
||||||
|
{
|
||||||
|
$def_code = getDomainRedirectId($id);
|
||||||
|
$redirectcode = '';
|
||||||
|
$codes = getRedirectCodesArray();
|
||||||
|
foreach($codes as $rc)
|
||||||
|
{
|
||||||
|
$redirectcode .= makeoption($rc['code'], $rc['id'], $def_code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||||
$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
|
$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
|
||||||
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
||||||
|
|||||||
@@ -451,7 +451,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.6');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.7-svn1');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
||||||
@@ -568,6 +568,8 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (137, 'ticket', 'default_priority', '2');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (137, 'ticket', 'default_priority', '2');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (138, 'system', 'mod_fcgid_defaultini', '1');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (138, 'system', 'mod_fcgid_defaultini', '1');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (139, 'system', 'ftpserver', 'proftpd');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (139, 'system', 'ftpserver', 'proftpd');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (140, 'customredirect', 'enabled', '1');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (141, 'customredirect', 'default', '1');
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
@@ -828,6 +830,7 @@ CREATE TABLE IF NOT EXISTS `panel_syslog` (
|
|||||||
# Table structure for table `mail_autoresponder`
|
# Table structure for table `mail_autoresponder`
|
||||||
#
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `mail_autoresponder`;
|
||||||
CREATE TABLE `mail_autoresponder` (
|
CREATE TABLE `mail_autoresponder` (
|
||||||
`email` varchar(255) NOT NULL default '',
|
`email` varchar(255) NOT NULL default '',
|
||||||
`message` text NOT NULL,
|
`message` text NOT NULL,
|
||||||
@@ -852,6 +855,7 @@ CREATE TABLE `mail_autoresponder` (
|
|||||||
# Table structure for table `panel_phpconfigs`
|
# Table structure for table `panel_phpconfigs`
|
||||||
#
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `panel_phpconfigs`;
|
||||||
CREATE TABLE `panel_phpconfigs` (
|
CREATE TABLE `panel_phpconfigs` (
|
||||||
`id` int(11) unsigned NOT NULL auto_increment,
|
`id` int(11) unsigned NOT NULL auto_increment,
|
||||||
`description` varchar(50) NOT NULL,
|
`description` varchar(50) NOT NULL,
|
||||||
@@ -875,6 +879,7 @@ INSERT INTO `panel_phpconfigs` (`id`, `description`, `binary`, `file_extensions`
|
|||||||
# Tabellenstruktur fuer Tabelle `aps_instances`
|
# Tabellenstruktur fuer Tabelle `aps_instances`
|
||||||
#
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `aps_instances`;
|
||||||
CREATE TABLE IF NOT EXISTS `aps_instances` (
|
CREATE TABLE IF NOT EXISTS `aps_instances` (
|
||||||
`ID` int(4) NOT NULL auto_increment,
|
`ID` int(4) NOT NULL auto_increment,
|
||||||
`CustomerID` int(4) NOT NULL,
|
`CustomerID` int(4) NOT NULL,
|
||||||
@@ -889,6 +894,7 @@ CREATE TABLE IF NOT EXISTS `aps_instances` (
|
|||||||
# Tabellenstruktur fuer Tabelle `aps_packages`
|
# Tabellenstruktur fuer Tabelle `aps_packages`
|
||||||
#
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `aps_packages`;
|
||||||
CREATE TABLE IF NOT EXISTS `aps_packages` (
|
CREATE TABLE IF NOT EXISTS `aps_packages` (
|
||||||
`ID` int(4) NOT NULL auto_increment,
|
`ID` int(4) NOT NULL auto_increment,
|
||||||
`Path` varchar(500) NOT NULL,
|
`Path` varchar(500) NOT NULL,
|
||||||
@@ -905,6 +911,7 @@ CREATE TABLE IF NOT EXISTS `aps_packages` (
|
|||||||
# Tabellenstruktur fuer Tabelle `aps_settings`
|
# Tabellenstruktur fuer Tabelle `aps_settings`
|
||||||
#
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `aps_settings`;
|
||||||
CREATE TABLE IF NOT EXISTS `aps_settings` (
|
CREATE TABLE IF NOT EXISTS `aps_settings` (
|
||||||
`ID` int(4) NOT NULL auto_increment,
|
`ID` int(4) NOT NULL auto_increment,
|
||||||
`InstanceID` int(4) NOT NULL,
|
`InstanceID` int(4) NOT NULL,
|
||||||
@@ -919,6 +926,7 @@ CREATE TABLE IF NOT EXISTS `aps_settings` (
|
|||||||
# Tabellenstruktur fuer Tabelle `aps_tasks`
|
# Tabellenstruktur fuer Tabelle `aps_tasks`
|
||||||
#
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `aps_tasks`;
|
||||||
CREATE TABLE IF NOT EXISTS `aps_tasks` (
|
CREATE TABLE IF NOT EXISTS `aps_tasks` (
|
||||||
`ID` int(4) NOT NULL auto_increment,
|
`ID` int(4) NOT NULL auto_increment,
|
||||||
`InstanceID` int(4) NOT NULL,
|
`InstanceID` int(4) NOT NULL,
|
||||||
@@ -932,6 +940,7 @@ CREATE TABLE IF NOT EXISTS `aps_tasks` (
|
|||||||
# Tabellenstruktur fuer Tabelle `aps_temp_settings`
|
# Tabellenstruktur fuer Tabelle `aps_temp_settings`
|
||||||
#
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `aps_temp_settings`;
|
||||||
CREATE TABLE IF NOT EXISTS `aps_temp_settings` (
|
CREATE TABLE IF NOT EXISTS `aps_temp_settings` (
|
||||||
`ID` int(4) NOT NULL auto_increment,
|
`ID` int(4) NOT NULL auto_increment,
|
||||||
`PackageID` int(4) NOT NULL,
|
`PackageID` int(4) NOT NULL,
|
||||||
@@ -947,6 +956,7 @@ CREATE TABLE IF NOT EXISTS `aps_temp_settings` (
|
|||||||
# Tabellenstruktur fuer Tabelle `cronjobs_run`
|
# Tabellenstruktur fuer Tabelle `cronjobs_run`
|
||||||
#
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `cronjobs_run`;
|
||||||
CREATE TABLE IF NOT EXISTS `cronjobs_run` (
|
CREATE TABLE IF NOT EXISTS `cronjobs_run` (
|
||||||
`id` bigint(20) NOT NULL auto_increment,
|
`id` bigint(20) NOT NULL auto_increment,
|
||||||
`module` varchar(250) NOT NULL,
|
`module` varchar(250) NOT NULL,
|
||||||
@@ -977,6 +987,7 @@ INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`,
|
|||||||
# Tabellenstruktur fuer Tabelle `ftp_quotalimits`
|
# Tabellenstruktur fuer Tabelle `ftp_quotalimits`
|
||||||
#
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `ftp_quotalimits`;
|
||||||
CREATE TABLE IF NOT EXISTS `ftp_quotalimits` (
|
CREATE TABLE IF NOT EXISTS `ftp_quotalimits` (
|
||||||
`name` varchar(30) default NULL,
|
`name` varchar(30) default NULL,
|
||||||
`quota_type` enum('user','group','class','all') NOT NULL default 'user',
|
`quota_type` enum('user','group','class','all') NOT NULL default 'user',
|
||||||
@@ -1002,6 +1013,7 @@ INSERT INTO `ftp_quotalimits` (`name`, `quota_type`, `per_session`, `limit_type`
|
|||||||
# Tabellenstruktur fuer Tabelle `ftp_quotatallies`
|
# Tabellenstruktur fuer Tabelle `ftp_quotatallies`
|
||||||
#
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `ftp_quotatallies`;
|
||||||
CREATE TABLE IF NOT EXISTS `ftp_quotatallies` (
|
CREATE TABLE IF NOT EXISTS `ftp_quotatallies` (
|
||||||
`name` varchar(30) NOT NULL,
|
`name` varchar(30) NOT NULL,
|
||||||
`quota_type` enum('user','group','class','all') NOT NULL,
|
`quota_type` enum('user','group','class','all') NOT NULL,
|
||||||
@@ -1012,3 +1024,40 @@ CREATE TABLE IF NOT EXISTS `ftp_quotatallies` (
|
|||||||
`files_out_used` int(10) unsigned NOT NULL,
|
`files_out_used` int(10) unsigned NOT NULL,
|
||||||
`files_xfer_used` int(10) unsigned NOT NULL
|
`files_xfer_used` int(10) unsigned NOT NULL
|
||||||
) ENGINE=MyISAM;
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
# --------------------------------------------------------
|
||||||
|
|
||||||
|
#
|
||||||
|
# Tabellenstruktur fuer Tabelle `redirect_codes`
|
||||||
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `redirect_codes`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `redirect_codes` (
|
||||||
|
`id` int(5) NOT NULL auto_increment,
|
||||||
|
`code` varchar(3) NOT NULL,
|
||||||
|
`enabled` tinyint(1) DEFAULT '1',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Dumping data for table `redirect_codes`
|
||||||
|
#
|
||||||
|
|
||||||
|
INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (1, '---', 1);
|
||||||
|
INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (2, '301', 1);
|
||||||
|
INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (3, '302', 1);
|
||||||
|
INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (4, '303', 1);
|
||||||
|
INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (5, '307', 1);
|
||||||
|
|
||||||
|
# --------------------------------------------------------
|
||||||
|
|
||||||
|
#
|
||||||
|
# Tabellenstruktur fuer Tabelle `domain_redirect_codes`
|
||||||
|
#
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `domain_redirect_codes`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `domain_redirect_codes` (
|
||||||
|
`rid` int(5) NOT NULL,
|
||||||
|
`did` int(11) unsigned NOT NULL,
|
||||||
|
UNIQUE KEY `rc` (`rid`, `did`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|||||||
@@ -550,21 +550,21 @@ if(isFroxlorVersion('0.9.6-svn2'))
|
|||||||
if(isset($_POST['update_deferr_401'])
|
if(isset($_POST['update_deferr_401'])
|
||||||
&& trim($_POST['update_deferr_401']) != ''
|
&& trim($_POST['update_deferr_401']) != ''
|
||||||
) {
|
) {
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_401'])."');");
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err401', '".$db->escape($_POST['update_deferr_401'])."');");
|
||||||
$err401 = true;
|
$err401 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['update_deferr_403'])
|
if(isset($_POST['update_deferr_403'])
|
||||||
&& trim($_POST['update_deferr_403']) != ''
|
&& trim($_POST['update_deferr_403']) != ''
|
||||||
) {
|
) {
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_403'])."');");
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err403', '".$db->escape($_POST['update_deferr_403'])."');");
|
||||||
$err403 = true;
|
$err403 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['update_deferr_404'])
|
if(isset($_POST['update_deferr_404'])
|
||||||
&& trim($_POST['update_deferr_404']) != ''
|
&& trim($_POST['update_deferr_404']) != ''
|
||||||
) {
|
) {
|
||||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_404'])."');");
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '".$db->escape($_POST['update_deferr_404'])."');");
|
||||||
$err404 = true;
|
$err404 = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -661,4 +661,68 @@ if(isFroxlorVersion('0.9.6-svn6'))
|
|||||||
updateToVersion('0.9.6');
|
updateToVersion('0.9.6');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.6'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.6 to 0.9.7-svn1", false);
|
||||||
|
|
||||||
|
$update_customredirect_enable = isset($_POST['update_customredirect_enable']) ? 1 : 0;
|
||||||
|
$update_customredirect_default = isset($_POST['update_customredirect_default']) ? (int)$_POST['update_customredirect_default'] : 1;
|
||||||
|
|
||||||
|
showUpdateStep("Adding new tables to database");
|
||||||
|
$db->query("CREATE TABLE IF NOT EXISTS `redirect_codes` (
|
||||||
|
`id` int(5) NOT NULL auto_increment,
|
||||||
|
`code` varchar(3) NOT NULL,
|
||||||
|
`enabled` tinyint(1) DEFAULT '1',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;");
|
||||||
|
|
||||||
|
$db->query("CREATE TABLE IF NOT EXISTS `domain_redirect_codes` (
|
||||||
|
`rid` int(5) NOT NULL,
|
||||||
|
`did` int(11) unsigned NOT NULL,
|
||||||
|
UNIQUE KEY `rc` (`rid`, `did`)
|
||||||
|
) ENGINE=MyISAM;");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
showUpdateStep("Filling new tables with default data");
|
||||||
|
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (1, '---', 1);");
|
||||||
|
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (2, '301', 1);");
|
||||||
|
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (3, '302', 1);");
|
||||||
|
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (4, '303', 1);");
|
||||||
|
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (5, '307', 1);");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
showUpdateStep("Updating domains");
|
||||||
|
$res = $db->query("SELECT `id` FROM `".TABLE_PANEL_DOMAINS."` ORDER BY `id` ASC");
|
||||||
|
$updated_domains = 0;
|
||||||
|
while($d = $db->fetch_array($res))
|
||||||
|
{
|
||||||
|
$db->query("INSERT INTO `domain_redirect_codes` (`rid`, `did`) VALUES ('".(int)$update_customredirect_default."', '".(int)$d['id']."');");
|
||||||
|
$updated_domains++;
|
||||||
|
}
|
||||||
|
lastStepStatus(0, 'Updated '.$updated_domains.' domain(s)');
|
||||||
|
|
||||||
|
showUpdateStep("Adding new settings");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('customredirect', 'enabled', '".(int)$update_customredirect_enable."');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('customredirect', 'default', '".(int)$update_customredirect_default."');");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
// need to fix default-error-copy-and-paste-shizzle
|
||||||
|
showUpdateStep("Checking if anything is ok with the default-error-handler");
|
||||||
|
if(!isset($settings['defaultwebsrverrhandler']['err404']))
|
||||||
|
{
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '');");
|
||||||
|
}
|
||||||
|
if(!isset($settings['defaultwebsrverrhandler']['err403']))
|
||||||
|
{
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err403', '');");
|
||||||
|
}
|
||||||
|
if(!isset($settings['defaultwebsrverrhandler']['err401']))
|
||||||
|
{
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err401', '');");
|
||||||
|
}
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.7-svn1');
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ function versionInUpdate($current_version, $version_to_check)
|
|||||||
// to compare it correctly
|
// to compare it correctly
|
||||||
if($pos_a === false && $pos_b !== false)
|
if($pos_a === false && $pos_b !== false)
|
||||||
{
|
{
|
||||||
$current_version.= '-svn0';
|
$current_version.= '-svn9999';
|
||||||
}
|
}
|
||||||
|
|
||||||
return version_compare($current_version, $version_to_check, '<');
|
return version_compare($current_version, $version_to_check, '<');
|
||||||
|
|||||||
@@ -107,4 +107,21 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
|||||||
$question .= '</select>';
|
$question .= '</select>';
|
||||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(versionInUpdate($current_version, '0.9.7-svn1'))
|
||||||
|
{
|
||||||
|
$has_preconfig = true;
|
||||||
|
$description = 'You can now choose whether customers can select the http-redirect code and which of them acts as default.';
|
||||||
|
$question = '<strong>Allow customer chosen redirects?:</strong> ';
|
||||||
|
$question.= makeyesno('update_customredirect_enable', '1', '0', '1').'<br /><br />';
|
||||||
|
$question.= '<strong>Select default redirect code (default: empty):</strong> ';
|
||||||
|
$question.= '<select name="update_customredirect_default">';
|
||||||
|
$redirects = makeoption('---', 1, '1');
|
||||||
|
$redirects.= makeoption('301', 2, '1');
|
||||||
|
$redirects.= makeoption('302', 3, '1');
|
||||||
|
$redirects.= makeoption('303', 4, '1');
|
||||||
|
$redirects.= makeoption('307', 5, '1');
|
||||||
|
$question .= $redirects.'</select>';
|
||||||
|
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
163
lib/functions/output/function.RedirectCode.php
Normal file
163
lib/functions/output/function.RedirectCode.php
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Functions
|
||||||
|
* @version $$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* return an array of all enabled redirect-codes
|
||||||
|
*
|
||||||
|
* @return array array of enabled redirect-codes
|
||||||
|
*/
|
||||||
|
function getRedirectCodesArray()
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM `".TABLE_PANEL_REDIRECTCODES."` WHERE `enabled` = '1' ORDER BY `id` ASC";
|
||||||
|
$result = $db->query($sql);
|
||||||
|
|
||||||
|
$codes = array();
|
||||||
|
while($rc = $db->fetch_array($result))
|
||||||
|
{
|
||||||
|
$codes[] = $rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $codes;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* return an array of all enabled redirect-codes
|
||||||
|
* for the settings form
|
||||||
|
*
|
||||||
|
* @return array array of enabled redirect-codes
|
||||||
|
*/
|
||||||
|
function getRedirectCodes()
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM `".TABLE_PANEL_REDIRECTCODES."` WHERE `enabled` = '1' ORDER BY `id` ASC";
|
||||||
|
$result = $db->query($sql);
|
||||||
|
|
||||||
|
$codes = array();
|
||||||
|
while($rc = $db->fetch_array($result))
|
||||||
|
{
|
||||||
|
$codes[$rc['id']] = $rc['code'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $codes;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the redirect-code for a given
|
||||||
|
* domain-id
|
||||||
|
*
|
||||||
|
* @param integer $domainid id of the domain
|
||||||
|
*
|
||||||
|
* @return string redirect-code
|
||||||
|
*/
|
||||||
|
function getDomainRedirectCode($domainid = 0)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
$code = '';
|
||||||
|
if($domainid > 0)
|
||||||
|
{
|
||||||
|
$sql = "SELECT `r`.`code` as `redirect`
|
||||||
|
FROM `".TABLE_PANEL_REDIRECTCODES."` `r`, `".TABLE_PANEL_DOMAINREDIRECTS."` `rc`
|
||||||
|
WHERE `r`.`id` = `rc`.`rid` and `rc`.`did` = '".(int)$domainid."'";
|
||||||
|
|
||||||
|
$result = $db->query_first($sql);
|
||||||
|
|
||||||
|
if(is_array($result)
|
||||||
|
&& isset($result['redirect'])
|
||||||
|
) {
|
||||||
|
$code = ($result['redirect'] == '---') ? '' : $result['redirect'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the redirect-id for a given
|
||||||
|
* domain-id
|
||||||
|
*
|
||||||
|
* @param integer $domainid id of the domain
|
||||||
|
*
|
||||||
|
* @return integer redirect-code-id
|
||||||
|
*/
|
||||||
|
function getDomainRedirectId($domainid = 0)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
$code = 1;
|
||||||
|
if($domainid > 0)
|
||||||
|
{
|
||||||
|
$sql = "SELECT `r`.`id` as `redirect`
|
||||||
|
FROM `".TABLE_PANEL_REDIRECTCODES."` `r`, `".TABLE_PANEL_DOMAINREDIRECTS."` `rc`
|
||||||
|
WHERE `r`.`id` = `rc`.`rid` and `rc`.`did` = '".(int)$domainid."'";
|
||||||
|
|
||||||
|
$result = $db->query_first($sql);
|
||||||
|
|
||||||
|
if(is_array($result)
|
||||||
|
&& isset($result['redirect'])
|
||||||
|
) {
|
||||||
|
$code = (int)$result['redirect'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* adds a redirectcode for a domain
|
||||||
|
*
|
||||||
|
* @param integer $domainid id of the domain to add the code for
|
||||||
|
* @param integer $redirect selected redirect-id
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
function addRedirectToDomain($domainid = 0, $redirect = 1)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
if($domainid > 0)
|
||||||
|
{
|
||||||
|
$db->query("INSERT INTO `".TABLE_PANEL_DOMAINREDIRECTS."`
|
||||||
|
SET `rid` = '".(int)$redirect."', `did` = '".(int)$domainid."'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* updates the redirectcode of a domain
|
||||||
|
* if redirect-code is false, nothing happens
|
||||||
|
*
|
||||||
|
* @param integer $domainid id of the domain to update
|
||||||
|
* @param integer $redirect selected redirect-id or false
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
function updateRedirectOfDomain($domainid = 0, $redirect = false)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
if($redirect == false)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($domainid > 0)
|
||||||
|
{
|
||||||
|
$db->query("UPDATE `".TABLE_PANEL_DOMAINREDIRECTS."`
|
||||||
|
SET `rid` = '".(int)$redirect."'
|
||||||
|
WHERE `did` = '".(int)$domainid."'");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
* @copyright (c) the authors
|
* @copyright (c) the authors
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
* @package Language
|
* @package Functions
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ define('TABLE_APS_SETTINGS', 'aps_settings');
|
|||||||
define('TABLE_APS_TASKS', 'aps_tasks');
|
define('TABLE_APS_TASKS', 'aps_tasks');
|
||||||
define('TABLE_APS_TEMP_SETTINGS', 'aps_temp_settings');
|
define('TABLE_APS_TEMP_SETTINGS', 'aps_temp_settings');
|
||||||
define('TABLE_PANEL_CRONRUNS', 'cronjobs_run');
|
define('TABLE_PANEL_CRONRUNS', 'cronjobs_run');
|
||||||
|
define('TABLE_PANEL_REDIRECTCODES', 'redirect_codes');
|
||||||
|
define('TABLE_PANEL_DOMAINREDIRECTS', 'domain_redirect_codes');
|
||||||
|
|
||||||
// APS constants
|
// APS constants
|
||||||
|
|
||||||
@@ -70,7 +72,7 @@ define('PACKAGE_ENABLED', 2);
|
|||||||
|
|
||||||
// VERSION INFO
|
// VERSION INFO
|
||||||
|
|
||||||
$version = '0.9.6';
|
$version = '0.9.7-svn1';
|
||||||
$dbversion = '2';
|
$dbversion = '2';
|
||||||
$branding = '';
|
$branding = '';
|
||||||
|
|
||||||
|
|||||||
@@ -1394,5 +1394,11 @@ $lng['serversettings']['ftpprefix']['description'] = 'Which prefix should ftp ac
|
|||||||
// ADDED IN FROXLOR 0.9.7-svn1
|
// ADDED IN FROXLOR 0.9.7-svn1
|
||||||
$lng['customer']['ftp_add']['infomail_subject'] = '[Froxlor] New ftp-user created';
|
$lng['customer']['ftp_add']['infomail_subject'] = '[Froxlor] New ftp-user created';
|
||||||
$lng['customer']['ftp_add']['infomail_body']['main'] = "Hello {CUST_NAME},\n\nyou have just added a new ftp-user. Here is the entered information:\n\nUsername: {USR_NAME}\nPassword: {USR_PASS}\nPath: {USR_PATH}\n\nYours sincerely, the Froxlor-Team";
|
$lng['customer']['ftp_add']['infomail_body']['main'] = "Hello {CUST_NAME},\n\nyou have just added a new ftp-user. Here is the entered information:\n\nUsername: {USR_NAME}\nPassword: {USR_PASS}\nPath: {USR_PATH}\n\nYours sincerely, the Froxlor-Team";
|
||||||
|
$lng['domains']['redirectifpathisurl'] = 'Redirect code (default: empty)';
|
||||||
|
$lng['domains']['redirectifpathisurlinfo'] = 'You only need to select one of these if you entered an URL as path';
|
||||||
|
$lng['serversettings']['customredirect_enabled']['title'] = 'Allow customer redirects';
|
||||||
|
$lng['serversettings']['customredirect_enabled']['description'] = 'Allow customers to choose the http-status code for redirects which will be used';
|
||||||
|
$lng['serversettings']['customredirect_default']['title'] = 'Default redirect';
|
||||||
|
$lng['serversettings']['customredirect_default']['description'] = 'Set the default redirect-code which should be used if the customer does not set it himself';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1390,5 +1390,11 @@ $lng['serversettings']['ftpprefix']['description'] = 'Welchen Prefix sollen die
|
|||||||
// ADDED IN FROXLOR 0.9.7-svn1
|
// ADDED IN FROXLOR 0.9.7-svn1
|
||||||
$lng['customer']['ftp_add']['infomail_subject'] = '[Froxlor] Neuer FTP-Benutzer erstellt';
|
$lng['customer']['ftp_add']['infomail_subject'] = '[Froxlor] Neuer FTP-Benutzer erstellt';
|
||||||
$lng['customer']['ftp_add']['infomail_body']['main'] = "Hallo {CUST_NAME},\n\ndu hast gerade einen neuen FTP-Benutzer angelegt. Hier die angegebenen Informationen:\n\nBenutzername: {USR_NAME}\nPasswort: {USR_PASS}\nPfad: {USR_PATH}\n\nVielen Dank, das Froxlor-Team";
|
$lng['customer']['ftp_add']['infomail_body']['main'] = "Hallo {CUST_NAME},\n\ndu hast gerade einen neuen FTP-Benutzer angelegt. Hier die angegebenen Informationen:\n\nBenutzername: {USR_NAME}\nPasswort: {USR_PASS}\nPfad: {USR_PATH}\n\nVielen Dank, das Froxlor-Team";
|
||||||
|
$lng['domains']['redirectifpathisurl'] = 'Redirect code (Standard: leer)';
|
||||||
|
$lng['domains']['redirectifpathisurlinfo'] = 'Der Redirect code kann gewählt werden, wenn der eingegebene Pfad eine URL ist';
|
||||||
|
$lng['serversettings']['customredirect_enabled']['title'] = 'Erlaube Kunden-Redirect';
|
||||||
|
$lng['serversettings']['customredirect_enabled']['description'] = 'Erlaubt es Kunden den HTTP-Status Code für einen Redirect zu wählen';
|
||||||
|
$lng['serversettings']['customredirect_default']['title'] = 'Standard Redirect';
|
||||||
|
$lng['serversettings']['customredirect_default']['description'] = 'Dieser Redirect wird immer genutzt, sofern der Kunde keinen anderen auswählt.';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -622,7 +622,8 @@ class apache
|
|||||||
|
|
||||||
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
||||||
{
|
{
|
||||||
$vhost_content.= ' Redirect 301 / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n";
|
$code = getDomainRedirectCode($domain['id']);
|
||||||
|
$vhost_content.= ' Redirect '.$code.' / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,23 +13,30 @@ $header
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><select class="tendina_nobordo" name="alias">$aliasdomains</select></td>
|
<td class="main_field_display" nowrap="nowrap"><select name="alias">$aliasdomains</select></td>
|
||||||
</tr>
|
</tr>
|
||||||
<if $settings['panel']['pathedit'] != 'Dropdown'><tr>
|
<if $settings['panel']['pathedit'] != 'Dropdown'>
|
||||||
<td class="main_field_name">
|
<tr>
|
||||||
{$lng['panel']['pathorurl']}:<br />
|
<td class="main_field_name">{$lng['panel']['pathorurl']}:<br /><font size="1">{$lng['panel']['pathDescription']}</font></td>
|
||||||
<font size="1">{$lng['panel']['pathDescription']}</font>
|
|
||||||
</td>
|
|
||||||
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
||||||
</tr></if>
|
</tr>
|
||||||
<if $settings['panel']['pathedit'] == 'Dropdown'><tr>
|
</if>
|
||||||
|
<if $settings['panel']['pathedit'] == 'Dropdown'>
|
||||||
|
<tr>
|
||||||
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
||||||
<td class="main_field_display">{$pathSelect}</td>
|
<td class="main_field_display">{$pathSelect}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
|
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
|
||||||
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
|
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
|
||||||
</tr></if>
|
</tr>
|
||||||
|
</if>
|
||||||
|
<if $settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1'>
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_name">{$lng['domains']['redirectifpathisurl']}:<br /><font size="1">{$lng['domains']['redirectifpathisurlinfo']}</font></td>
|
||||||
|
<td class="main_field_display" nowrap="nowrap"><select name="redirectcode">$redirectcode</select></td>
|
||||||
|
</tr>
|
||||||
|
</if>
|
||||||
<if $settings['system']['use_ssl'] == '1'>
|
<if $settings['system']['use_ssl'] == '1'>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">SSL Redirect:</td>
|
<td class="main_field_name">SSL Redirect:</td>
|
||||||
|
|||||||
@@ -16,33 +16,46 @@ $header
|
|||||||
<td class="main_field_name">{$lng['dns']['destinationip']}:</td>
|
<td class="main_field_name">{$lng['dns']['destinationip']}:</td>
|
||||||
<td class="main_field_display" nowrap="nowrap">{$domainip}</td>
|
<td class="main_field_display" nowrap="nowrap">{$domainip}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<if $alias_check == '0'><tr>
|
<if $alias_check == '0'>
|
||||||
|
<tr>
|
||||||
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><select class="tendina_nobordo" name="alias">$domains</select></td>
|
<td class="main_field_display" nowrap="nowrap"><select class="tendina_nobordo" name="alias">$domains</select></td>
|
||||||
</tr></if>
|
</tr>
|
||||||
<if $settings['panel']['pathedit'] != 'Dropdown'><tr>
|
</if>
|
||||||
<td class="main_field_name">
|
<if $settings['panel']['pathedit'] != 'Dropdown'>
|
||||||
{$lng['panel']['pathorurl']}:<br />
|
<tr>
|
||||||
<font size="1">{$lng['panel']['pathDescription']}</font>
|
<td class="main_field_name">{$lng['panel']['pathorurl']}:<br /><font size="1">{$lng['panel']['pathDescription']}</font></td>
|
||||||
</td>
|
|
||||||
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
||||||
</tr></if>
|
</tr>
|
||||||
<if $settings['panel']['pathedit'] == 'Dropdown'><tr>
|
</if>
|
||||||
|
<if $settings['panel']['pathedit'] == 'Dropdown'>
|
||||||
|
<tr>
|
||||||
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
||||||
<td class="main_field_display">{$pathSelect}</td>
|
<td class="main_field_display">{$pathSelect}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
|
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
|
||||||
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
|
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
|
||||||
</tr></if>
|
</tr>
|
||||||
<if $result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0' ><tr>
|
</if>
|
||||||
|
<if $settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1'>
|
||||||
|
<tr>
|
||||||
|
<td class="main_field_name">{$lng['domains']['redirectifpathisurl']}:<br /><font size="1">{$lng['domains']['redirectifpathisurlinfo']}</font></td>
|
||||||
|
<td class="main_field_display" nowrap="nowrap"><select name="redirectcode">$redirectcode</select></td>
|
||||||
|
</tr>
|
||||||
|
</if>
|
||||||
|
<if $result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0' >
|
||||||
|
<tr>
|
||||||
<td class="main_field_name">{$lng['domains']['wildcarddomain']}</td>
|
<td class="main_field_name">{$lng['domains']['wildcarddomain']}</td>
|
||||||
<td class="main_field_display" nowrap="nowrap">$iswildcarddomain</td>
|
<td class="main_field_display" nowrap="nowrap">$iswildcarddomain</td>
|
||||||
</tr></if>
|
</tr>
|
||||||
<if ( $result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2' ) && $result['parentdomainid'] != '0' ><tr>
|
</if>
|
||||||
|
<if ( $result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2' ) && $result['parentdomainid'] != '0' >
|
||||||
|
<tr>
|
||||||
<td class="main_field_name">Emaildomain:</td>
|
<td class="main_field_name">Emaildomain:</td>
|
||||||
<td class="main_field_display" nowrap="nowrap">$isemaildomain</td>
|
<td class="main_field_display" nowrap="nowrap">$isemaildomain</td>
|
||||||
</tr></if>
|
</tr>
|
||||||
|
</if>
|
||||||
<if $settings['system']['use_ssl'] == '1'>
|
<if $settings['system']['use_ssl'] == '1'>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">SSL Redirect:</td>
|
<td class="main_field_name">SSL Redirect:</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user