diff --git a/create-alias-domain.php b/create-alias-domain.php index 41bc11a3..5639645a 100644 --- a/create-alias-domain.php +++ b/create-alias-domain.php @@ -58,13 +58,31 @@ if ($result['rows'] > 0) { } } +# filter available alias domains +$alias_domains = array(); +foreach ($list_domains as $dom) { + if (isset($list_aliases[$dom]) || in_array($dom,$list_aliases)) continue; + $alias_domains[] = $dom; +} +if (count($alias_domains) == 0) { + $error = 1; + $tMessage = $PALANG['pCreate_alias_domain_error4']; +} + +# filter available target domains +foreach ($list_domains as $dom) { + if (isset($list_aliases[$dom])) continue; + $target_domains[] = $dom; +} + + if (isset ($_REQUEST['alias_domain'])) { $fAliasDomain = escape_string ($_REQUEST['alias_domain']); $fAliasDomain = strtolower ($fAliasDomain); } if (isset ($_REQUEST['target_domain'])) { $fTargetDomain = escape_string ($_REQUEST['target_domain']); - $fTargetDomain = strtolower ($fTargetDomain); + $fTargetDomain = strtolower ($fTargetDomain); } if (isset ($_REQUEST['active'])) { $fActive = (bool)$_REQUEST['active']; @@ -103,7 +121,10 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") else { db_log ($SESSID_USERNAME, $fAliasDomain, 'create_alias_domain', "$fAliasDomain -> $fTargetDomain"); - $tMessage = $PALANG['pCreate_alias_domain_success']; + flash_info($PALANG['pCreate_alias_domain_success']); + # we would have to update the list of domains available for aliasing. Doing a redirect is easier. + header("Location: " . $CONF['postfix_admin_url'] . "/create-alias-domain.php"); + exit; } } @@ -114,4 +135,5 @@ include ("templates/header.php"); include ("templates/menu.php"); include ("templates/create-alias-domain.php"); include ("templates/footer.php"); +/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?> diff --git a/languages/bg.lang b/languages/bg.lang index 54d4d2a1..80ffbbcd 100644 --- a/languages/bg.lang +++ b/languages/bg.lang @@ -101,6 +101,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'Не ви е позволено да използвате избраната конфигурация.'; $PALANG['pCreate_alias_domain_error2'] = 'Избраната конфигурация е невалидна. Изберете друга!'; $PALANG['pCreate_alias_domain_error3'] = 'Възникна грешка при добавяне в базата.'; +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Създай нов alias за вашия домейн.'; diff --git a/languages/ca.lang b/languages/ca.lang index 2da42a75..1f208f5a 100644 --- a/languages/ca.lang +++ b/languages/ca.lang @@ -99,6 +99,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Crear un nou àlies pel domini.'; diff --git a/languages/cn.lang b/languages/cn.lang index 70cb19e9..59912a2b 100644 --- a/languages/cn.lang +++ b/languages/cn.lang @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = '在你的域中新建一个别名.'; diff --git a/languages/cs.lang b/languages/cs.lang index de9da900..9885509a 100644 --- a/languages/cs.lang +++ b/languages/cs.lang @@ -105,6 +105,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Vytvořit nové přesměrování ve Vaší doméně.'; diff --git a/languages/da.lang b/languages/da.lang index 3c1a5975..c5cc807d 100644 --- a/languages/da.lang +++ b/languages/da.lang @@ -103,6 +103,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Tilføj nyt alias til dit domæne.'; diff --git a/languages/de.lang b/languages/de.lang index 8ca65e0a..7cbe2f0a 100644 --- a/languages/de.lang +++ b/languages/de.lang @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Neuen Alias für Ihre Domain anlegen'; diff --git a/languages/en.lang b/languages/en.lang index 90e8d887..14a61bae 100644 --- a/languages/en.lang +++ b/languages/en.lang @@ -104,6 +104,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; $PALANG['pCreate_alias_welcome'] = 'Create a new alias for your domain.'; diff --git a/languages/es.lang b/languages/es.lang index 7ce35bbf..799fa5a7 100644 --- a/languages/es.lang +++ b/languages/es.lang @@ -99,6 +99,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Crear un nuevo alias para el dominio.'; diff --git a/languages/et.lang b/languages/et.lang index f21e77a6..19e1ef4f 100644 --- a/languages/et.lang +++ b/languages/et.lang @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Loo uus alias domeenis.'; diff --git a/languages/eu.lang b/languages/eu.lang index 1d546bf9..bf723240 100644 --- a/languages/eu.lang +++ b/languages/eu.lang @@ -99,6 +99,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Domeinuarentzat alias berri bat sortu.'; $PALANG['pCreate_alias_address'] = 'Aliasa'; diff --git a/languages/fi.lang b/languages/fi.lang index 8e59c6e1..c427174c 100644 --- a/languages/fi.lang +++ b/languages/fi.lang @@ -103,6 +103,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Luo uusi alias.'; diff --git a/languages/fo.lang b/languages/fo.lang index fe768a79..55dc50d2 100644 --- a/languages/fo.lang +++ b/languages/fo.lang @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Stovna eitt nýtt dulnevni á tínum navnaøki.'; diff --git a/languages/fr.lang b/languages/fr.lang index 5736df19..2161de0b 100644 --- a/languages/fr.lang +++ b/languages/fr.lang @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Créer un nouvel alias pour votre domaine.'; $PALANG['pCreate_alias_address'] = 'Alias'; diff --git a/languages/hr.lang b/languages/hr.lang index 94a18db5..89699458 100644 --- a/languages/hr.lang +++ b/languages/hr.lang @@ -99,6 +99,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Stvori novi alias za domenu.'; diff --git a/languages/hu.lang b/languages/hu.lang index c66aff08..f8ad45d3 100644 --- a/languages/hu.lang +++ b/languages/hu.lang @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Új alias készítése az adott domainhez'; diff --git a/languages/is.lang b/languages/is.lang index f7bc6002..20c13b2e 100644 --- a/languages/is.lang +++ b/languages/is.lang @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Útbúa nýjan alias fyrir þitt lén.'; $PALANG['pCreate_alias_address'] = 'Alias'; diff --git a/languages/it.lang b/languages/it.lang index bfe12e7a..6df792e2 100644 --- a/languages/it.lang +++ b/languages/it.lang @@ -101,6 +101,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Crea un nuovo alias per il tuo dominio.'; diff --git a/languages/ja.lang b/languages/ja.lang index d41af344..e3182192 100644 --- a/languages/ja.lang +++ b/languages/ja.lang @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = '新しい転送先の作成'; diff --git a/languages/lt.lang b/languages/lt.lang index c9b670b4..4882955a 100644 --- a/languages/lt.lang +++ b/languages/lt.lang @@ -99,6 +99,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Naujas sinonimas.'; diff --git a/languages/mk.lang b/languages/mk.lang index 8a09e94d..7dd467d5 100644 --- a/languages/mk.lang +++ b/languages/mk.lang @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Креирање на нов алијас за вашиот домен.'; diff --git a/languages/nb.lang b/languages/nb.lang index b6adac5c..de260290 100644 --- a/languages/nb.lang +++ b/languages/nb.lang @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Legg til aliasdomene'; $PALANG['pCreate_alias_domain_error1'] = 'Du har ikke tillatelse til å opprette den valgte konfigurasjonen.'; $PALANG['pCreate_alias_domain_error2'] = 'Den valgte konfigurasjonen er ugyldig, vennligst endre den!'; $PALANG['pCreate_alias_domain_error3'] = 'Det mislyktes å lagre informasjonen i databasen.'; +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'Domenealiaset har blitt lagt inn i tabellen over aliasdomener!'; $PALANG['pCreate_alias_welcome'] = 'Opprett et nytt alias.'; diff --git a/languages/nl.lang b/languages/nl.lang index ff0ffdcb..5316a507 100644 --- a/languages/nl.lang +++ b/languages/nl.lang @@ -101,6 +101,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Voeg alias domein toe'; $PALANG['pCreate_alias_domain_error1'] = 'U heeft niet genoeg rechten om de huidige configuratie te maken.'; $PALANG['pCreate_alias_domain_error2'] = 'De huidige configuratie is ongeldig, slecteer een andere!'; $PALANG['pCreate_alias_domain_error3'] = 'Fout bij vullen database.'; +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'De domein alias is toegevoegd aan de alias domein tabel!'; $PALANG['pCreate_alias_welcome'] = 'Maak een nieuw alias aan voor uw domein.'; diff --git a/languages/nn.lang b/languages/nn.lang index c1b43da0..c1414235 100644 --- a/languages/nn.lang +++ b/languages/nn.lang @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Opprett et nytt alias.'; diff --git a/languages/pl.lang b/languages/pl.lang index 273283bb..4a6d5263 100644 --- a/languages/pl.lang +++ b/languages/pl.lang @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Utwórz nowy alias dla Twojej domeny.'; diff --git a/languages/pt-br.lang b/languages/pt-br.lang index 3c7b1821..49018164 100644 --- a/languages/pt-br.lang +++ b/languages/pt-br.lang @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Criar um novo alias para este domínio'; diff --git a/languages/ru.lang b/languages/ru.lang index 36ed6a6f..4487059d 100644 --- a/languages/ru.lang +++ b/languages/ru.lang @@ -104,6 +104,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Создать домен-алиас'; $PALANG['pCreate_alias_domain_error1'] = 'Вам не разрешено создавать выбранную конфигурацию.'; $PALANG['pCreate_alias_domain_error2'] = 'Выбранная конфигурация некорректна, пожалуйста, выберите другую!'; $PALANG['pCreate_alias_domain_error3'] = 'Не удалось добавить запись в базу данных.'; +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'Домен-алиас добавлен в таблицу доменов-алиасов!'; $PALANG['pCreate_alias_welcome'] = 'Создание нового алиаса в вашем домене.'; diff --git a/languages/sk.lang b/languages/sk.lang index 234064e9..537eccc1 100644 --- a/languages/sk.lang +++ b/languages/sk.lang @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Vytvoriť nový alias vo vašej doméne.'; diff --git a/languages/sl.lang b/languages/sl.lang index 21e72a12..77ec29ef 100644 --- a/languages/sl.lang +++ b/languages/sl.lang @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Ustvari nov alias za določeno domeno.'; diff --git a/languages/sv.lang b/languages/sv.lang index 5982a15b..0269ad3a 100644 --- a/languages/sv.lang +++ b/languages/sv.lang @@ -102,6 +102,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Skapa nytt alias för din domän.'; diff --git a/languages/tr.lang b/languages/tr.lang index 94f18844..3f0378c3 100644 --- a/languages/tr.lang +++ b/languages/tr.lang @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = 'Domaininiz için yeni bir alias yaratýn.'; diff --git a/languages/tw.lang b/languages/tw.lang index 6ea864f2..06ede860 100644 --- a/languages/tw.lang +++ b/languages/tw.lang @@ -100,6 +100,7 @@ $PALANG['pCreate_alias_domain_button'] = 'Add Alias Domain'; # XXX $PALANG['pCreate_alias_domain_error1'] = 'You are not allowed to create the chosen configuration.'; # XXX $PALANG['pCreate_alias_domain_error2'] = 'The chosen configuration is invalid, please choose a different one!'; # XXX $PALANG['pCreate_alias_domain_error3'] = 'Database insert failed.'; # XXX +$PALANG['pCreate_alias_domain_error4'] = 'All domains are already aliased.'; # XXX $PALANG['pCreate_alias_domain_success'] = 'The domain alias has been added to the alias domain table!'; # XXX $PALANG['pCreate_alias_welcome'] = '在你的網域中新建一個別名.'; diff --git a/templates/create-alias-domain.php b/templates/create-alias-domain.php index 81c4c425..b5c26b53 100644 --- a/templates/create-alias-domain.php +++ b/templates/create-alias-domain.php @@ -5,14 +5,18 @@

+ + 0) { +?> + $dom\n"; } ?> @@ -38,12 +41,22 @@ />   + '; } print $tMessage; if ($error) { print ''; } ?> + 0) { +?> + + diff --git a/templates/list-virtual.php b/templates/list-virtual.php index f52215b6..71477d27 100644 --- a/templates/list-virtual.php +++ b/templates/list-virtual.php @@ -72,7 +72,9 @@ if ($tDisplay_next_show == 1) print "\n"; -if (boolconf('alias_domain') && ((sizeof ($tAliasDomains) > 0) || is_array ($tTargetDomain))) +if (boolconf('alias_domain')) { +# XXX: the following block misses one intention level +if ((sizeof ($tAliasDomains) > 0) || (is_array ($tTargetDomain) )) { print "\n"; print " \n"; @@ -116,8 +118,11 @@ if (boolconf('alias_domain') && ((sizeof ($tAliasDomains) > 0) || is_array ($tTa } print "
\n"; +} +# XXX: the above block misses one intention level if (!is_array($tTargetDomain)) { + # TODO: don't print create link if no domains are left for aliasing print "

" . $PALANG['pMenu_create_alias_domain'] . "\n"; } } @@ -215,6 +220,7 @@ if($tCanAddAlias) { print "

" . $PALANG['pMenu_create_alias'] . "\n"; } +if (sizeof ($tMailbox) > 0) { print "

\n
"; if ( $limit['mbox_pgindex_count'] ) print "".$PALANG['pOverview_mailbox_title']."  "; ($tDisplay_back_show == 1) ? $highlight_at = $tDisplay_back / $CONF['page_size'] + 1 : $highlight_at = 0; @@ -231,22 +237,20 @@ if($tCanAddAlias) { } print ""; -if ($tDisplay_back_show == 1) -{ - print "\""\n"; -} -if ($tDisplay_up_show == 1) -{ - print "\""\n"; -} -if ($tDisplay_next_show == 1) -{ - print "\""\n"; -} -print "
\n"; + if ($tDisplay_back_show == 1) + { + print "\""\n"; + } + if ($tDisplay_up_show == 1) + { + print "\""\n"; + } + if ($tDisplay_next_show == 1) + { + print "\""\n"; + } + print "\n"; -if (sizeof ($tMailbox) > 0) -{ $colspan=8; if ($CONF['vacation_control_admin'] == 'YES') $colspan=$colspan+1; if ($CONF['alias_control_admin'] == 'YES') $colspan=$colspan+1;