create-alias-domain.php:

- filter available alias and target domains (and print an error message
  if none is available)
- print success message via flash_info, not inside the form and do a
  redirect afterwards. We would have to update the list of domains
  available for aliasing otherwise.
- added vim: settings
 
templates/create-alias-domain.php:
- hide form if no domains are available for aliasing
- move logic of skipping non-available domains to /create-alias-domain.php
- added vim: settings

templates/list-virtual.php:
- show "create alias domain" link (only) if it makes sence (not perfect
  yet, but better than before)
- don't create empty <div> etc. if domain has no mailboxes
- intentionally skipped most whitespace fixes (added a comment instead),
  they would make the patch unreadable

languages/*:
- additional error message for alias domains: 'All domains are already 
  aliased.'


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@422 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
Christian Boltz 16 years ago
parent be3db620f8
commit 41d5ee4ecb

@ -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: */
?>

@ -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 за вашия домейн.';

@ -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.';

@ -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'] = '在你的域中新建一个别名.';

@ -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ě.';

@ -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.';

@ -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&uuml;r Ihre Domain anlegen';

@ -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.';

@ -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.';

@ -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.';

@ -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';

@ -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.';

@ -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.';

@ -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';

@ -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.';

@ -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';

@ -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';

@ -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.';

@ -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'] = '新しい転送先の作成';

@ -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.';

@ -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'] = 'Креирање на нов алијас за вашиот домен.';

@ -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.';

@ -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.';

@ -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.';

@ -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.';

@ -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';

@ -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'] = 'Создание нового алиаса в вашем домене.';

@ -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&#357; nov&yacute; alias vo va&scaron;ej dom&eacute;ne.';

@ -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.';

@ -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.';

@ -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.';

@ -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'] = '在你的網域中新建一個別名.';

@ -5,14 +5,18 @@
<tr>
<td colspan="3"><h3><?php print $PALANG['pCreate_alias_domain_welcome']; ?></h3></td>
</tr>
<?php
if (count($alias_domains) > 0) {
?>
<tr>
<td><?php print $PALANG['pCreate_alias_domain_alias'] . ":"; ?></td>
<td>
<select class="flat" name="alias_domain">
<?php
foreach ($list_domains as $dom)
foreach ($alias_domains as $dom)
{
if (isset($list_aliases[$dom]) || in_array($dom,$list_aliases)) continue;
print "<option value=\"$dom\"".(($fAliasDomain == $dom) ? ' selected' : '').">$dom</option>\n";
}
?>
@ -24,9 +28,8 @@
<td>
<select class="flat" name="target_domain">
<?php
foreach ($list_domains as $dom)
foreach ($target_domains as $dom)
{
if (isset($list_aliases[$dom])) continue;
print "<option value=\"$dom\"".(($fTargetDomain == $dom) ? ' selected' : '').">$dom</option>\n";
}
?>
@ -38,12 +41,22 @@
<td><input class="flat" type="checkbox" name="active" value="1"<?php if ($fActive) { print ' checked'; } ?> /></td>
<td>&nbsp;</td>
</tr>
<?php
}
?>
<tr>
<td colspan="3" class="standout"><?php if ($error) { print '<span class="error_msg">'; } print $tMessage; if ($error) { print '</span>'; } ?></td>
</tr>
<?php
if (count($alias_domains) > 0) {
?>
<tr>
<td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $PALANG['pCreate_alias_domain_button']; ?>" /></td>
</tr>
<?php
}
?>
</table>
</form>
</div>
<?php /* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?>

@ -72,7 +72,9 @@ if ($tDisplay_next_show == 1)
print "</td></tr></table></div>\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 "<table id=\"alias_domain_table\">\n";
print " <tr>\n";
@ -116,8 +118,11 @@ if (boolconf('alias_domain') && ((sizeof ($tAliasDomains) > 0) || is_array ($tTa
}
print "</table>\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 "<p><a href=\"create-alias-domain.php?target_domain=$fDomain\">" . $PALANG['pMenu_create_alias_domain'] . "</a>\n";
}
}
@ -215,6 +220,7 @@ if($tCanAddAlias) {
print "<p><a href=\"create-alias.php?domain=$fDomain\">" . $PALANG['pMenu_create_alias'] . "</a>\n";
}
if (sizeof ($tMailbox) > 0) {
print "<div id=\"nav_bar\"><a name=\"MidArrow\"></a>\n<table width=730><colgroup span=\"1\"> <col width=\"550\"></col></colgroup> <tr><td align=left >";
if ( $limit['mbox_pgindex_count'] ) print "<b>".$PALANG['pOverview_mailbox_title']."</b>&nbsp&nbsp";
($tDisplay_back_show == 1) ? $highlight_at = $tDisplay_back / $CONF['page_size'] + 1 : $highlight_at = 0;
@ -231,22 +237,20 @@ if($tCanAddAlias) {
}
print "</td><td valign=middle align=right>";
if ($tDisplay_back_show == 1)
{
print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back#MidArrow\"><img border=\"0\" src=\"images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n";
}
if ($tDisplay_up_show == 1)
{
print "<a href=\"$file?domain=$fDomain&limit=0#MidArrow\"><img border=\"0\" src=\"images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n";
}
if ($tDisplay_next_show == 1)
{
print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next#MidArrow\"><img border=\"0\" src=\"images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n";
}
print "</td></tr></table></div>\n";
if ($tDisplay_back_show == 1)
{
print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_back#MidArrow\"><img border=\"0\" src=\"images/arrow-l.png\" title=\"" . $PALANG['pOverview_left_arrow'] . "\" alt=\"" . $PALANG['pOverview_left_arrow'] . "\" /></a>\n";
}
if ($tDisplay_up_show == 1)
{
print "<a href=\"$file?domain=$fDomain&limit=0#MidArrow\"><img border=\"0\" src=\"images/arrow-u.png\" title=\"" . $PALANG['pOverview_up_arrow'] . "\" alt=\"" . $PALANG['pOverview_up_arrow'] . "\" /></a>\n";
}
if ($tDisplay_next_show == 1)
{
print "<a href=\"$file?domain=$fDomain&limit=$tDisplay_next#MidArrow\"><img border=\"0\" src=\"images/arrow-r.png\" title=\"" . $PALANG['pOverview_right_arrow'] . "\" alt=\"" . $PALANG['pOverview_right_arrow'] . "\" /></a>\n";
}
print "</td></tr></table></div>\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;

Loading…
Cancel
Save