1ab9db55d272aaa37a76d7a5c179e55c2ca52267
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) 
bernd Aliases editieren

bernd authored 16 years ago

7) $title = "Subdomains";
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

8) $error = '';
9) 
10) require_role(ROLE_SYSTEMUSER);
11) 
bernd VHost-Löschen als icon

bernd authored 16 years ago

12) global $prefix;
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

13) 
bernd Aliases editieren

bernd authored 16 years ago

14) output("<h3>Subdomains</h3>
bernd typo

bernd authored 16 years ago

15) <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>
bernd Beta-Hinweis im vhost-modul

bernd authored 16 years ago

16) <p>Änderungen an Ihren Einstellungen werden im 5-Minuten-Takt auf dem Server übernommen.</p>
17) ");
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

18) 
bernd Bugfix: Funktion-Dopplung v...

bernd authored 16 years ago

19) 
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

20) $vhosts = list_vhosts();
21) 
22) if (count($vhosts) > 0)
23) {
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

24)   output("<table><tr><th>(Sub-)Domain</th><th></th><th>Zusätzliche Alias-Namen</th><th>Protokoll</th><th>SSL</th><th>PHP</th><th>Lokaler Pfad<sup>*</sup></th></tr>\n");
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

25) 
26)   $even = True;
bernd Aliases editieren

bernd authored 16 years ago

27) 
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

28)   foreach ($vhosts as $vhost)
29)   {
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

30)     $even = ! $even;
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

31)     $fqdn = $vhost['fqdn'];
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

32)     $class = 'odd';
33)     if ($even) $class = 'even';
bernd Bildgrößen definieren

bernd authored 15 years ago

34)     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>");
bernd Aliases editieren

bernd authored 16 years ago

35)     $aliases = get_all_aliases($vhost['id']);
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

36)     $tmp = '';
37)     if (count($aliases) > 0)
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

38)     {
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

39)       foreach ($aliases as $alias)
40)       {
41)         $tmp .= $alias['fqdn'].'<br />';
42)       }
43)     } else {
44)       $tmp = '<em>- keine -</em>';
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

45)     }
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

46)     output(internal_link('aliases', $tmp, 'vhost='.$vhost['id'], 'title="Aliase verwalten"'));
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

47)     output('</td>');
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

48)     $logfiles = 'Kein Protokoll';
bernd Logfile-Status in der vhost...

bernd authored 16 years ago

49)     if ($vhost['logtype'] == 'default')
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

50)       $logfiles = 'Zugriffe';
bernd Logfile-Status in der vhost...

bernd authored 16 years ago

51)     elseif ($vhost['logtype'] == 'anonymous')
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

52)       $logfiles = 'Zugriffe anonym';
bernd Logfile-Status in der vhost...

bernd authored 16 years ago

53)     if ($vhost['errorlog'] == 1)
54)     {
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

55)       if ($vhost['logtype'] == NULL)
56)         $logfiles = 'Nur Fehler';
bernd Logfile-Status in der vhost...

bernd authored 16 years ago

57)       else
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

58)         $logfiles .= ' und Fehler';
bernd Logfile-Status in der vhost...

bernd authored 16 years ago

59)     }
60)     output("<td>{$logfiles}</td>");
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

61)   
62)     if ($vhost['ssl'] == 'http')
63)     {
64)       output("<td><img src=\"{$prefix}images/error.png\" style=\"height: 18px; width: 18px;\" alt=\"aus\" title=\"SSL ausgeschaltet\" /></td>");
65)     }
66)     elseif ($vhost['cert'])
67)     {
68)       output("<td><img src=\"{$prefix}images/secure.png\" style=\"height: 16px; width: 16px;\" alt=\"cert\" title=\"SSL mit eigenem Zertifikat\" /></td>");
69)     }
70)     else
71)     {
72)       output("<td><img src=\"{$prefix}images/ok.png\" style=\"height: 17px; width: 17px;\" alt=\"ein\" title=\"SSL eingeschaltet\" /></td>");
73)     }
74) 
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

75)     if ($vhost['is_webapp'] == 1) {
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

76)       output('<td colspan="2"><em><strong>Sonderanwendung:</strong> Vorinstallierte Webanwendung</em></td>');
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

77)     }
78)     elseif ($vhost['is_dav'] == 1) {
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

79)       output('<td colspan="2"><em><strong>Sonderanwendung:</strong> WebDAV</em></td>');
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

80)     }
81)     elseif ($vhost['is_svn'] == 1) {
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

82)       output('<td colspan="2"><em><strong>Sonderanwendung:</strong> Subversion-Server</em></td>');
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

83)     }
84)     else {
85)       $php = $vhost['php'];
86)       switch ($php)
87)       {
88)         case NULL:
bernd Bildgrößen definieren

bernd authored 15 years ago

89)           $php = "<img src=\"{$prefix}images/error.png\" style=\"height: 18px; width: 18px;\" alt=\"aus\" title=\"PHP ausgeschaltet\" />";
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

90)           break;
91)         case 'mod_php':
bernd Bildgrößen definieren

bernd authored 15 years ago

92)           $php = "<img src=\"{$prefix}images/warning.png\" style=\"height: 17px; width: 17px;\" alt=\"mod_php\" title=\"Veraltet: Bitte umstellen\" /> Apache-Modul";
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

93)           break;
94)         case 'fastcgi':
bernd Bildgrößen definieren

bernd authored 15 years ago

95)           $php = "<img src=\"{$prefix}images/ok.png\" style=\"height: 17px; width: 17px;\" alt=\"ein\" title=\"PHP eingeschaltet\" />";
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

96)           break;
97)       }
98)       output("<td>{$php}</td>");
99)       if ($vhost['docroot_is_default'] == 1)
100)         output("<td><span style=\"color:#777;\">{$vhost['docroot']}</span></td>");
101)       else
102)         output("<td><strong>{$vhost['docroot']}</strong></td>");
103)     }
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

104)     output("</tr>\n");
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

105)   }
bernd VHosts anlegen geht auch we...

bernd authored 16 years ago

106)   output('</table>');
bernd Entities repariert

bernd authored 16 years ago

107)   output('<p><sup>*</sup>)&#160;schwach geschriebene Pfadangaben bezeichnen die Standardeinstellung. Ist ein Pfad fett dargestellt, so haben Sie einen davon abweichenden Wert eingegeben.</p>');
bernd VHosts anlegen geht auch we...

bernd authored 16 years ago

108)   output('  <br />');
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

109) }
bernd Deutlich machen wenn keine...

bernd authored 14 years ago

110) else // keine VHosts vorhanden
111) {
112)   output("<p><strong><em>Bisher haben Sie keine Domain bzw. Subdomain eingerichtet.</em></strong></p>");
113) }
bernd eliminate .php extensions f...

bernd authored 15 years ago

114) output('<p>'.internal_link('edit', 'Neue Domain bzw. Subdomain einrichten').'</p>');
bernd VHosts anlegen geht auch we...

bernd authored 16 years ago

115) output('  <br />');