Hanno Böck This code is published under a 0BSD license. Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code. */ require_once('inc/debug.php'); require_once('inc/security.php'); require_once('vhosts.php'); title("Aliasnamen für Website bearbeiten"); $section = 'vhosts_vhosts'; require_role(ROLE_SYSTEMUSER); $id = (int) $_GET['vhost']; $vhost = get_vhost_details($id); DEBUG($vhost); $aliases = get_aliases($id); DEBUG($aliases); $mainalias = (strstr($vhost['options'], 'aliaswww') ? '
www.' . $vhost['fqdn'] . '' : ''); $form = " "; foreach ($aliases as $alias) { $aliastype = 'Zusätzliche Adresse'; if (strstr($alias['options'], 'forward')) { $aliastype = 'Umleitung auf Haupt-Adresse'; } $formtoken = generate_form_token('aliases_toggle'); $havewww = '
www.' . $alias['fqdn'] . '   (' . internal_link('aliasoptions', 'WWW-Alias entfernen', "alias={$alias['id']}&aliaswww=0&formtoken={$formtoken}") . ')'; $nowww = '
' . internal_link('aliasoptions', 'Auch mit WWW', "alias={$alias['id']}&aliaswww=1&formtoken={$formtoken}"); $wwwalias = (strstr($alias['options'], 'aliaswww') ? $havewww : $nowww); $to_forward = internal_link('aliasoptions', 'In Umleitung umwandeln', "alias={$alias['id']}&forward=1&formtoken={$formtoken}"); $remove_forward = internal_link('aliasoptions', 'In zusätzliche Adresse umwandeln', "alias={$alias['id']}&forward=0&formtoken={$formtoken}"); $typetoggle = (strstr($alias['options'], 'forward') ? $remove_forward : $to_forward); $form .= " "; } $form .= "
AdresseVerhalten 
{$vhost['fqdn']}{$mainalias}Haupt-Adresse 
{$alias['fqdn']}{$wwwalias} {$aliastype}
{$typetoggle}
" . internal_link('save', 'Aliasname löschen', "action=deletealias&alias={$alias['id']}") . "
Neuen Aliasnamen hinzufügen
." . domainselect() . "
"; output(html_form('vhosts_add_alias', 'save', 'action=addalias&vhost=' . $vhost['id'], $form)); output("

" . internal_link("vhosts", "Zurück zur Übersicht") . "

");