c61521fa744024963e46a2d89065740866edfa98
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 mod_php deprecated, zwang z...

bernd authored 15 years ago

24)   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");
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 VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

69)     }
70)     else {
71)       $php = $vhost['php'];
72)       switch ($php)
73)       {
74)         case NULL:
bernd Bildgrößen definieren

bernd authored 15 years ago

75)           $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

76)           break;
77)         case 'mod_php':
bernd Bildgrößen definieren

bernd authored 15 years ago

78)           $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

79)           break;
80)         case 'fastcgi':
bernd Bildgrößen definieren

bernd authored 15 years ago

81)           $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

82)           break;
83)       }
84)       output("<td>{$php}</td>");
85)       if ($vhost['docroot_is_default'] == 1)
86)         output("<td><span style=\"color:#777;\">{$vhost['docroot']}</span></td>");
87)       else
88)         output("<td><strong>{$vhost['docroot']}</strong></td>");
89)     }
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

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

bernd authored 16 years ago

95) }
bernd eliminate .php extensions f...

bernd authored 15 years ago

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

bernd authored 16 years ago

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