Aliasnamen für Subdomain bearbeiten");
$mainalias = (strstr($vhost['options'], 'aliaswww') ? '
www.'.$vhost['fqdn'].'' : '');
$form = "
  
    | Adresse | Verhalten |   | 
    | {$vhost['fqdn']}{$mainalias} | Haupt-Adresse |   | 
";
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 .= "
    | {$alias['fqdn']}{$wwwalias} | 
    {$aliastype} {$typetoggle} | 
    ".internal_link('save', 'Aliasname löschen', "action=deletealias&alias={$alias['id']}")." | 
  ";
}
$form .= "
  
    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")."
");
?>