1aaaa700cdfda9c1e0bd92741205d07d8e0132de
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

1) <?php
2) require_once('inc/debug.php');
3) require_once('inc/security.php');
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

4) require_once('inc/icons.php');
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

5) 
6) require_once('vhosts.php');
7) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

8) title("Subdomains");
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

14) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

15) output("<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 neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

34)     output("<tr class=\"{$class}\"><td>".internal_link('edit', $fqdn, "vhost={$vhost['id']}", 'title="Einstellungen bearbeiten"')."</td><td>".internal_link('save', icon_delete("»{$vhost['fqdn']}« löschen"), 'action=delete&vhost='.$vhost['id'] )."</td><td>");
bernd Weniger Datenbankzugriffe b...

bernd authored 14 years ago

35)     $aliases = get_all_aliases($vhost);
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)     }
bernd Webalizer/Statistik-Funktio...

bernd authored 14 years ago

60)     $stats = $vhost['stats'] ? internal_link("showstats", other_icon("chart_bar.png", "Statistiken anzeigen"), "vhost={$vhost['id']}").' ' : '';
61)     output("<td>{$stats}{$logfiles}</td>");
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

62)   
63)     if ($vhost['ssl'] == 'http')
64)     {
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

65)       output("<td>".icon_disabled('SSL ausgeschaltet')."</td>");
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

66)     }
67)     elseif ($vhost['cert'])
68)     {
69)       output("<td><img src=\"{$prefix}images/secure.png\" style=\"height: 16px; width: 16px;\" alt=\"cert\" title=\"SSL mit eigenem Zertifikat\" /></td>");
70)     }
71)     else
72)     {
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

73)       output("<td>".icon_enabled('SSL eingeschaltet')."</td>");
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

74)     }
75) 
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

84)     }
85)     else {
86)       $php = $vhost['php'];
87)       switch ($php)
88)       {
89)         case NULL:
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

90)           $php = icon_disabled('PHP ausgeschaltet');
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

91)           break;
92)         case 'mod_php':
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

93)           $php = icon_warning('[mod_php] Veraltet, bitte umstellen!').' Apache-Modul';
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

94)           break;
95)         case 'fastcgi':
bernd Neue Icons für PHP 5.2 und 5.3

bernd authored 13 years ago

96)           $php = icon_enabled_warning('PHP in veralteter Version aktiviert');
bernd Vorbereitung für PHP 5.3

bernd authored 14 years ago

97)           break;
98)         case 'php53':
bernd Neue Icons für PHP 5.2 und 5.3

bernd authored 13 years ago

99)           $php = icon_enabled('PHP eingeschaltet');
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

110)   output('</table>');
bernd addnew() eingeführt

bernd authored 14 years ago

111)   output('<p style="font-size: 90%;"><sup>*</sup>)&#160;schwach geschriebene Pfadangaben bezeichnen die Standardeinstellung. Ist ein Pfad fett dargestellt, so haben Sie einen davon abweichenden Wert eingegeben.</p>');
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

112) }
bernd Deutlich machen wenn keine...

bernd authored 14 years ago

113) else // keine VHosts vorhanden
114) {
115)   output("<p><strong><em>Bisher haben Sie keine Domain bzw. Subdomain eingerichtet.</em></strong></p>");
116) }
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

117) 
bernd addnew() eingeführt

bernd authored 14 years ago

118) addnew('edit', 'Neue Domain bzw. Subdomain einrichten');
119) 
120) addnew('../webapps/install', 'Neue Domain bzw. Subdomain mit vorinstallierter Web-Anwendung einrichten');