b7b9e16561a247922945c9e5880251da3c936267
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 Aliases editieren

bernd authored 16 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 Aliases editieren

bernd authored 16 years ago

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

bernd authored 16 years ago

16) <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

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

25)   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

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

33)     $class = 'odd';
34)     if ($even) $class = 'even';
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

35)     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 Aliases editieren

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

60)     }
61)     output("<td>{$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 Vorbereitung für PHP 5.3

bernd authored 14 years ago

96)           $php = icon_enabled('PHP eingeschaltet (PHP 5.2)');
97)           break;
98)         case 'php53':
99)           $php = icon_enabled('PHP eingeschaltet (PHP 5.3)');
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');