72518278 |
<?php
require_once('inc/debug.php');
require_once('inc/security.php');
require_once('vhosts.php');
|
709c9ea2 |
$title = "Subdomains";
|
72518278 |
$error = '';
require_role(ROLE_SYSTEMUSER);
|
3cda75a7 |
global $prefix;
|
72518278 |
|
709c9ea2 |
output("<h3>Subdomains</h3>
|
046705ef |
<p>Mit dieser Funktion legen Sie fest, welche Domains und Subdomains als Webserver-Ressource verfügbar sein sollen und welches Verzeichnis die Dateien enthalten soll.</p>
|
b3c8f947 |
<p>Änderungen an Ihren Einstellungen werden im 5-Minuten-Takt auf dem Server übernommen.</p>
");
|
72518278 |
|
d70a5791 |
|
72518278 |
$vhosts = list_vhosts();
if (count($vhosts) > 0)
{
|
33c1bcb0 |
output("<table><tr><th>(Sub-)Domain</th><th></th><th>Zusätzliche Alias-Namen</th><th>Protokoll</th><th>PHP</th><th>Lokaler Pfad<sup>*</sup></th></tr>\n");
$even = True;
|
709c9ea2 |
|
72518278 |
foreach ($vhosts as $vhost)
{
|
33c1bcb0 |
$even = ! $even;
|
72518278 |
$fqdn = $vhost['fqdn'];
|
33c1bcb0 |
$class = 'odd';
if ($even) $class = 'even';
|
ffb6684c |
output("<tr class=\"{$class}\"><td>".internal_link('edit', $fqdn, "vhost={$vhost['id']}", 'title="Einstellungen bearbeiten"')."</td><td>".internal_link('save', "<img src=\"{$prefix}images/delete.png\" style=\"height: 16px; width: 16px;\" title=\"»{$vhost['fqdn']}« löschen\" alt=\"löschen\" />", 'action=delete&vhost='.$vhost['id'] )."</td><td>");
|
709c9ea2 |
$aliases = get_all_aliases($vhost['id']);
|
33c1bcb0 |
$tmp = '';
if (count($aliases) > 0)
|
72518278 |
{
|
33c1bcb0 |
foreach ($aliases as $alias)
{
$tmp .= $alias['fqdn'].'<br />';
}
} else {
$tmp = '<em>- keine -</em>';
|
72518278 |
}
|
33c1bcb0 |
output(internal_link('aliases', $tmp, 'vhost='.$vhost['id'], 'title="Aliase verwalten"'));
|
72518278 |
output('</td>');
|
33c1bcb0 |
$logfiles = 'Kein Protokoll';
|
47b732dc |
if ($vhost['logtype'] == 'default')
|
33c1bcb0 |
$logfiles = 'Zugriffe';
|
47b732dc |
elseif ($vhost['logtype'] == 'anonymous')
|
33c1bcb0 |
$logfiles = 'Zugriffe anonym';
|
47b732dc |
if ($vhost['errorlog'] == 1)
{
|
33c1bcb0 |
if ($vhost['logtype'] == NULL)
$logfiles = 'Nur Fehler';
|
47b732dc |
else
|
33c1bcb0 |
$logfiles .= ' und Fehler';
|
47b732dc |
}
output("<td>{$logfiles}</td>");
|
832d06da |
if ($vhost['is_webapp'] == 1) {
|
33c1bcb0 |
output('<td colspan="2"><em><strong>Sonderanwendung:</strong> Vorinstallierte Webanwendung</em></td>');
|
832d06da |
}
elseif ($vhost['is_dav'] == 1) {
|
33c1bcb0 |
output('<td colspan="2"><em><strong>Sonderanwendung:</strong> WebDAV</em></td>');
|
832d06da |
}
elseif ($vhost['is_svn'] == 1) {
|
33c1bcb0 |
output('<td colspan="2"><em><strong>Sonderanwendung:</strong> Subversion-Server</em></td>');
|
832d06da |
}
else {
$php = $vhost['php'];
switch ($php)
{
case NULL:
|
ffb6684c |
$php = "<img src=\"{$prefix}images/error.png\" style=\"height: 18px; width: 18px;\" alt=\"aus\" title=\"PHP ausgeschaltet\" />";
|
832d06da |
break;
case 'mod_php':
|
ffb6684c |
$php = "<img src=\"{$prefix}images/warning.png\" style=\"height: 17px; width: 17px;\" alt=\"mod_php\" title=\"Veraltet: Bitte umstellen\" /> Apache-Modul";
|
832d06da |
break;
case 'fastcgi':
|
ffb6684c |
$php = "<img src=\"{$prefix}images/ok.png\" style=\"height: 17px; width: 17px;\" alt=\"ein\" title=\"PHP eingeschaltet\" />";
|
832d06da |
break;
}
output("<td>{$php}</td>");
if ($vhost['docroot_is_default'] == 1)
output("<td><span style=\"color:#777;\">{$vhost['docroot']}</span></td>");
else
output("<td><strong>{$vhost['docroot']}</strong></td>");
}
|
33c1bcb0 |
output("</tr>\n");
|
72518278 |
}
|
ec226905 |
output('</table>');
|
ec0c81a8 |
output('<p><sup>*</sup>) schwach geschriebene Pfadangaben bezeichnen die Standardeinstellung. Ist ein Pfad fett dargestellt, so haben Sie einen davon abweichenden Wert eingegeben.</p>');
|
ec226905 |
output(' <br />');
|
72518278 |
}
|
63a0529b |
output('<p>'.internal_link('edit', 'Neue Domain bzw. Subdomain einrichten').'</p>');
|
ec226905 |
output(' <br />');
|
72518278 |
?>
|