8d92bc6da2d5b83b63bab9844cf3cd80af76fdb3
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

1) <?php
2) require_once('inc/debug.php');
3) require_once('inc/security.php');
4) 
5) require_once('vhosts.php');
6) 
7) $title = "Webserver VHosts";
8) $error = '';
9) 
10) require_role(ROLE_SYSTEMUSER);
11) 
12) 
13) output("<h3>Webserver (VHosts)</h3>
14) <p>Mit dieser Funtkion legen Sie fest, welche Domains und Subdomains verfügbar sein sollen und welches Verzeichnis die Dateien enthalten soll.</p>");
15) 
16) $vhosts = list_vhosts();
17) 
18) if (count($vhosts) > 0)
19) {
20)   output("<table><tr><th>(Sub-)Domain</th><th>Zusätzliche Alias-Namen</th><th>Lokaler Pfad</th><th>PHP</th></tr>");
21)   
22)   foreach ($vhosts as $vhost)
23)   {
24)     $fqdn = $vhost['fqdn'];
25)     output("<tr><td>".internal_link('edit.php', $fqdn, "vhost={$vhost['id']}")."</td><td>");
26)     $aliases = get_aliases($vhost['id']);
27)     if (strstr($vhost['options'], 'aliaswww'))
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

28)       output('www.'.$vhost['fqdn'].'<br />');
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

29)     foreach ($aliases as $alias)
30)     {
31)       if (strstr($alias['options'], 'aliaswww'))
32)         output('www.'.$alias['fqdn'].'<br />');
33)       output($alias['fqdn'].'<br />');
34)     }
35)     output('</td>');
36)     if ($vhost['docroot_is_default'] == 1)
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

37)       output("<td><span style=\"color:#777;\">{$vhost['docroot']}</span></td>");
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

38)     else
39)       output("<td><strong>{$vhost['docroot']}</strong></td>");
40)     $php = $vhost['php'];
41)     switch ($php)
42)     {
43)       case NULL:
44)         $php = 'kein PHP';
45)         break;
46)       case 'mod_php':
47)         $php = 'Apache-Modul';
48)         break;
49)       case 'fastcgi':
50)         $php = 'FastCGI';
51)         break;
52)     }
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

53)     output("<td>{$php}</td>
54)     <td>".internal_link('save.php', 'Subdomain löschen', 'action=delete&vhost='.$vhost['id'] )."</td>
55)     </tr>");
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

56)   }
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

57)   output('</table>
58) <p><a href="edit.php">Neue Subdomain anlegen</a></p>
59)   <br />');