96649f21ba18d07757afa9d98998f7a22c0d86a3
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
15) */
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

16) 
17) require_once('inc/debug.php');
18) require_once('inc/security.php');
Bernd Wurst JQuery als Include HSTS-Int...

Bernd Wurst authored 10 years ago

19) require_once('inc/jquery.php');
Bernd Wurst VHost-Edit-Seite auf JQuery...

Bernd Wurst authored 10 years ago

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

bernd authored 16 years ago

21) 
22) require_once('vhosts.php');
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

23) require_once('certs.php');
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

24) 
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

25) $section = 'vhosts_vhosts';
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

26) 
27) require_role(ROLE_SYSTEMUSER);
28) 
bernd Einige notices (undefined i...

bernd authored 14 years ago

29) $id = (isset($_GET['vhost']) ? (int) $_GET['vhost'] : 0);
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

30) $vhost = empty_vhost();
31) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

32) if ($id != 0) {
33)     $vhost = get_vhost_details($id);
34) }
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

35) 
bernd IPv6-Option nur anzeigen we...

bernd authored 13 years ago

36) $have_v6 = false;
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

37) $server = ($vhost['server'] ?? $_SESSION['userinfo']['server']);
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

38) if (ipv6_possible($server)) {
39)     $have_v6 = true;
40) }
bernd IPv6-Option nur anzeigen we...

bernd authored 13 years ago

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

bernd authored 16 years ago

42) DEBUG($vhost);
bernd Aliases editieren

bernd authored 16 years ago

43) if ($id == 0) {
Bernd Wurst Beschriftung im VHosts-Modu...

Bernd Wurst authored 5 years ago

44)     title("Neue Website anlegen");
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

45) } else {
Bernd Wurst Beschriftung im VHosts-Modu...

Bernd Wurst authored 5 years ago

46)     title("Website bearbeiten");
bernd Aliases editieren

bernd authored 16 years ago

47) }
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

48) 
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

49) $defaultdocroot = $vhost['domain'];
Bernd Wurst Ermögliche dem user Hosts m...

Bernd Wurst authored 9 years ago

50) if (! $vhost['domain']) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

51)     $defaultdocroot = $_SESSION['userinfo']['username'].'.'.config('masterdomain');
Bernd Wurst Ermögliche dem user Hosts m...

Bernd Wurst authored 9 years ago

52) }
53) if ($vhost['domain_id'] == -1) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

54)     $defaultdocroot = $_SESSION['userinfo']['username'].'.'.config('user_vhosts_domain');
55) }
56) if ($vhost['hostname']) {
57)     $defaultdocroot = $vhost['hostname'].'.'.$defaultdocroot;
Bernd Wurst Ermögliche dem user Hosts m...

Bernd Wurst authored 9 years ago

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

bernd authored 16 years ago

59) 
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

60) $defaultdocroot = $defaultdocroot.'/htdocs';
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

61) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

62) $is_default_docroot = ($vhost['docroot'] == null) || ($vhost['homedir'].'/websites/'.$defaultdocroot == $vhost['docroot']);
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

63) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

64) if ($vhost['docroot'] != '' && ! strstr($vhost['docroot'], '/websites/')) {
65)     warning("Sie verwenden einen Speicherplatz außerhalb von »~/websites/«. Diese Einstellung ist momentan nicht mehr gestattet. Ihre Einstellung wurde daher auf die Standardeinstellung zurückgesetzt. Prüfen Sie dies bitte und verschieben Sie ggf. ihre Dateien.");
66)     $is_default_docroot = true;
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

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

bernd authored 16 years ago

68) 
69) $docroot = '';
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

70) if ($is_default_docroot) {
71)     $docroot = $defaultdocroot;
72) } else {
73)     $docroot = substr($vhost['docroot'], strlen($vhost['homedir'].'/websites/'));
74) }
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

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

bernd authored 16 years ago

76) $s = (strstr($vhost['options'], 'aliaswww') ? ' checked="checked" ' : '');
bernd Einige notices (undefined i...

bernd authored 14 years ago

77) $errorlog = ($vhost['errorlog'] == 1 ? ' checked="checked" ' : '');
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

78) 
79) $vhost_type = 'regular';
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

80) if ($vhost['is_dav']) {
81)     $vhost_type = 'dav';
82) } elseif ($vhost['is_svn']) {
83)     $vhost_type = 'svn';
84) } elseif ($vhost['is_webapp']) {
85)     $vhost_type = 'webapp';
86) }
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

87) 
bernd Webapps implementiert

bernd authored 16 years ago

88) $applist = list_available_webapps();
89) $webapp_options = '';
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

90) foreach ($applist as $app) {
91)     $webapp_options .= "<option value=\"{$app['id']}\">{$app['displayname']}</option>\n";
92) }
bernd Webapps implementiert

bernd authored 16 years ago

93) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

94) $aliaswww_options = ["forwardwww" => "Umleiten auf www-Subdomain", "forwardnowww" => "Umleiten auf Stammdomain (ohne www)", "noforward" => "Keine Umleitung"];
Bernd Wurst Funktionsfähiger Prototyp

Bernd Wurst authored 7 years ago

95) $aliaswww_option = 'forwardwww';
96) if (strstr($vhost['options'], 'aliaswww')) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

97)     // Wenn aliaswww gar nicht gesetzt war, dann soll die select-Option für forwardwww trotzdem auf dem default stehen.
Bernd Wurst Funktionsfähiger Prototyp

Bernd Wurst authored 7 years ago

98)     // Ist nicht sichtbar und wird beim Speichern auch wieder entfernt
99)     if (strstr($vhost['options'], 'forwardwww')) {
100)         $aliaswww_option = 'forwardwww';
101)     } elseif (strstr($vhost['options'], 'forwardnowww')) {
102)         $aliaswww_option = 'forwardnowww';
103)     } else {
104)         $aliaswww_option = 'noforward';
105)     }
106) }
bernd Webapps implementiert

bernd authored 16 years ago

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

bernd authored 16 years ago

108) $form = "
Hanno formulierung, vhost vermeid...

Hanno authored 5 years ago

109) <h4 style=\"margin-top: 2em;\">Adresse der Website</h4>
Bernd Wurst VHost-Edit-Seite auf JQuery...

Bernd Wurst authored 10 years ago

110)     <div style=\"margin-left: 2em;\"><input type=\"text\" name=\"hostname\" id=\"hostname\" size=\"10\" value=\"{$vhost['hostname']}\" /><strong>.</strong>".domainselect($vhost['domain_id']);
Bernd Wurst Alte checkbox wieder eingeb...

Bernd Wurst authored 7 years ago

111) $form .= "<br />
Bernd Wurst Funktionsfähiger Prototyp

Bernd Wurst authored 7 years ago

112)     <input type=\"checkbox\" name=\"aliaswww\" id=\"aliaswww\" value=\"aliaswww\" {$s}/> <label for=\"aliaswww\">Auch mit <strong>www</strong> davor.</label><br/>
113)     <span id=\"aliaswww_option\"><label for=\"forwardwww\">Umleitungs-Option </label>".html_select('forwardwww', $aliaswww_options, $aliaswww_option)."</span><br />
Bernd Wurst Mockup für zwei Möglichkeit...

Bernd Wurst authored 7 years ago

114) </div>
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

115) <div class=\"vhostsidebyside\">
bernd Docroot auch bei WebDAV anz...

bernd authored 16 years ago

116) <div class=\"vhostoptions\" id=\"options_docroot\" ".($vhost_type=='regular' || $vhost_type=='dav' ? '' : 'style="display: none;"').">
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

117)   <h4>Optionen</h4>
118)   <h5>Speicherort für Dateien (»Document Root«)</h5>
119)   <div style=\"margin-left: 2em;\">
Bernd Wurst VHost-Edit-Seite auf JQuery...

Bernd Wurst authored 10 years ago

120)     <input type=\"checkbox\" id=\"use_default_docroot\" name=\"use_default_docroot\" value=\"1\" ".($is_default_docroot ? 'checked="checked" ' : '')."/>&#160;<label for=\"use_default_docroot\">Standardeinstellung benutzen</label><br />
Bernd Wurst Sprre da Docroot-Eingabefel...

Bernd Wurst authored 9 years ago

121)     <strong>".$vhost['homedir']."/websites/</strong>&#160;<input type=\"text\" id=\"docroot\" name=\"docroot\" size=\"30\" value=\"".$docroot."\"/>
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

122)   </div>
bernd Docroot auch bei WebDAV anz...

bernd authored 16 years ago

123) </div>
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

124) ";
bernd Docroot auch bei WebDAV anz...

bernd authored 16 years ago

125) 
bernd Zeige PHP-Versionsauswahl n...

bernd authored 13 years ago

126) /*
Bernd Wurst prepare for experimental PH...

Bernd Wurst authored 12 years ago

127)  * Choose what PHP version to use
bernd Zeige PHP-Versionsauswahl n...

bernd authored 13 years ago

128)  */
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

129) $options = ["none" => 'ausgeschaltet', "default" => "Eingeschaltet (empfohlene Version)"];
Bernd Wurst added php version tag "defa...

Bernd Wurst authored 3 years ago

130) $phpinfo = valid_php_versions();
131) $php_default_version = null;
132)     foreach ($phpinfo as $v) {
133)         if ($v['default'] == true) {
134)             $php_default_version = $v['major'].'.'.$v['minor'];
135)             break;
136)         }
137)     }
138) foreach ($phpinfo as $tag => $info) {
Hanno Böck Fix indent / codingstyle

Hanno Böck authored 3 years ago

139)     $options[$tag] = 'PHP '.$info['major'].'.'.$info['minor'];
140)     if ($info['status'] == 'deprecated') {
141)         $options[$tag] .= ' (veraltet)';
142)     } elseif ($info['status'] == 'beta') {
143)         $options[$tag] .= ' (Testversion)';
144)     } elseif ($info['status'] == 'used') {
145)         $options[$tag] .= ' (nur Bestandsschutz)';
146)     }
Bernd Wurst added php version tag "defa...

Bernd Wurst authored 3 years ago

147) }
148) $phpoptions = "
149) <h5>PHP</h5>
150) <div style=\"margin-left: 2em;\">
151)     ".html_select("php", $options, $vhost['php'])."<br>
Bernd Wurst text changes ("empfohlene V...

Bernd Wurst authored 3 years ago

152)     <p>Aktuell empfohlene Version: $php_default_version.<br>Bei der Einstellung \"empfohlene Version\" wird Ihre Website immer mit einer von uns ausgesuchten PHP-Version betrieben. Meist ist dies die zweit-neueste Version.</p>
Bernd Wurst added php version tag "defa...

Bernd Wurst authored 3 years ago

153) </div>";
bernd Vorbereitung für PHP 5.3

bernd authored 14 years ago

154) 
bernd "CGI-Aktivieren" ist jetzt...

bernd authored 13 years ago

155) $safemode = ($vhost['cgi'] == 1 ? '' : ' checked="checked" ');
bernd CGI abschaltbar

bernd authored 14 years ago

156) 
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

157) $form .= "
158) <div class=\"vhostoptions\" id=\"options_scriptlang\" ".($vhost_type=='regular' ? '' : 'style="display: none;"').">
bernd Zeige PHP-Versionsauswahl n...

bernd authored 13 years ago

159)   ".$phpoptions."
bernd "CGI-Aktivieren" ist jetzt...

bernd authored 13 years ago

160)   <h5>Abgesicherter Modus</h5>
bernd CGI abschaltbar

bernd authored 14 years ago

161)   <div style=\"margin-left: 2em;\">
bernd "CGI-Aktivieren" ist jetzt...

bernd authored 13 years ago

162)     <input type=\"checkbox\" name=\"safemode\" id=\"safemode\" value=\"yes\" {$safemode}/>&#160;<label for=\"safemode\">Abgesicherter Modus</label><br /><em>(Deaktiviert CGI, mod_rewrite und einige weitere Funktionen mit denen die Website auf andere Orte des Home-Verzeichnisses zugreifen könnte.)</em>
bernd CGI abschaltbar

bernd authored 14 years ago

163)   </div>
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

164) </div>
165) ";
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

166) 
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

167) $form .= "
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

168) <div class=\"vhostoptions\" id=\"options_webapp\" ".($vhost_type=='webapp' ? '' : 'style="display: none;"').">
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

169)   <h4>Optionen</h4>
170)   <h5>Anwendung</h5>
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

171)   <select name=\"webapp\" id=\"webapp\" size=\"1\">
bernd Webapps implementiert

bernd authored 16 years ago

172)     {$webapp_options}
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

173)   </select>
bernd Info-Text über E-mail mit Z...

bernd authored 16 years ago

174)   <p>Wenn Sie diese Option wählen, wird die Anwendung automatisch eingerichtet. Sie erhalten dann ihre Zugangsdaten per E-Mail.</p>
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

175) </div>
bernd R.I.P. Shared-Drupal

bernd authored 15 years ago

176) ";
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

177) 
bernd R.I.P. Shared-Drupal

bernd authored 15 years ago

178) $form .= "
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

179) <h4>Verwendung</h4>
180)         <div style=\"margin-left: 2em;\">
Bernd Wurst VHost-Edit-Seite auf JQuery...

Bernd Wurst authored 10 years ago

181) 	  <input class=\"usageoption\" type=\"radio\" name=\"vhost_type\" id=\"vhost_type_regular\" value=\"regular\" ".(($vhost_type=='regular') ? 'checked="checked" ' : '')."/><label for=\"vhost_type_regular\">&#160;Normal (selbst Dateien hinterlegen)</label><br />
bernd R.I.P. Shared-Drupal

bernd authored 15 years ago

182) ";
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

183) if ($vhost_type=='webapp') {
184)     // Wird nur noch angezeigt wenn der Vhost schon auf webapp konfiguriert ist, ansonsten nicht.
185)     // Die User sollen den Webapp-Installer benutzen.
186)     $form .= "
Bernd Wurst VHost-Edit-Seite auf JQuery...

Bernd Wurst authored 10 years ago

187) 	  <input class=\"usageoption\" type=\"radio\" name=\"vhost_type\" id=\"vhost_type_webapp\" value=\"webapp\" ".(($vhost_type=='webapp') ? 'checked="checked" ' : '')."/><label for=\"vhost_type_webapp\">&#160;Eine vorgefertigte Applikation nutzen</label><br />
bernd R.I.P. Shared-Drupal

bernd authored 15 years ago

188) ";
189) }
Bernd Wurst JQuery als Include HSTS-Int...

Bernd Wurst authored 10 years ago

190) $hsts_value = $vhost['hsts'];
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

191) $hsts_preset_values = ["-1" => "aus", "86400" => "1 Tag", "2592000" => "30 Tage", "31536000" => "1 Jahr", "63072000" => "2 Jahre", "custom" => "Individuell"];
Bernd Wurst JQuery als Include HSTS-Int...

Bernd Wurst authored 10 years ago

192) $hsts_preset_value = 'custom';
193) if (isset($hsts_preset_values[$hsts_value])) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

194)     $hsts_preset_value = $hsts_value;
Bernd Wurst JQuery als Include HSTS-Int...

Bernd Wurst authored 10 years ago

195) }
bernd R.I.P. Shared-Drupal

bernd authored 15 years ago

196) $form .= "
Bernd Wurst VHost-Edit-Seite auf JQuery...

Bernd Wurst authored 10 years ago

197) 	  <input class=\"usageoption\" type=\"radio\" name=\"vhost_type\" id=\"vhost_type_dav\" value=\"dav\" ".(($vhost_type=='dav') ? 'checked="checked" ' : '')."/><label for=\"vhost_type_dav\">&#160;WebDAV</label><br />
198) 	  <input class=\"usageoption\" type=\"radio\" name=\"vhost_type\" id=\"vhost_type_svn\" value=\"svn\" ".(($vhost_type=='svn') ? 'checked="checked" ' : '')."/><label for=\"vhost_type_svn\">&#160;Subversion-Server</label>
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

199) 	</div>
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

200) <br />
bernd R.I.P. Shared-Drupal

bernd authored 15 years ago

201) <br />
202) <br />
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

203) </div>
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

204) 
Hanno Böck Reihenfolge geändert: TLS-O...

Hanno Böck authored 7 years ago

205) <h4 style=\"clear: right; margin-top: 3em;\">Optionen</h4>
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

206) <div style=\"margin-left: 2em;\">
Bernd Wurst Wähle automatisch ein Lets-...

Bernd Wurst authored 7 years ago

207)     <h5>Sichere Verbindung erzwingen</h5>
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

208)     <div style=\"margin-left: 2em;\">
209)     <select name=\"ssl\" id=\"ssl\">
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

210)       <option value=\"none\" ".($vhost['ssl'] == null ? 'selected="selected"' : '')." >Nein</option>
Bernd Wurst Interface für Zertifikate i...

Bernd Wurst authored 7 years ago

211)       ".($vhost['ssl'] == 'http' ? "<option value=\"http\" selected=\"selected\">kein HTTPS anbieten</option>" : '')."
212)       ".($vhost['ssl'] == 'https' ? "<option value=\"https\" selected=\"selected\">Konfiguration nur für HTTPS verwenden</option>" : '')."
Bernd Wurst Formulierung für vhost-SSL...

Bernd Wurst authored 9 years ago

213)       <option value=\"forward\" ".($vhost['ssl'] == 'forward' ? 'selected="selected"' : '')." >Ja, immer auf HTTPS umleiten</option>
Bernd Wurst HSTS-Optionen includeSubdom...

Bernd Wurst authored 7 years ago

214)     </select>  <span id=\"hsts_block\" style=\"padding-top: 0.2em;\"> <label for=\"hsts\"><a title=\"Mit HSTS können Sie festlegen, dass eine bestimmte Website niemals ohne Verschlüsselung aufgerufen werden soll. Zudem werden Zertifikate strenger geprüft.\" href=\"https://de.wikipedia.org/wiki/HTTP_Strict_Transport_Security\">HSTS</a>:</label> <span id=\"hsts_select\" style=\"display: none\">".html_select('hsts_preset', $hsts_preset_values, $hsts_preset_value)."</span> <span id=\"hsts_seconds\"><input type=\"text\" name=\"hsts\" id=\"hsts\" size=\"10\" style=\"text-align: right;\" value=\"{$hsts_value}\" /> Sekunden</span><br />
215)     <span id=\"hsts_preload_options\"><input type=\"checkbox\" id=\"hsts_subdomains\" name=\"hsts_subdomains\" value=\"1\" ".(strstr($vhost['options'], 'hsts_subdomains') ? 'checked="checked"' : '')."/> <label for=\"hsts_subdomains\">Einschließlich aller Subdomains</label><br />
216)     <input type=\"checkbox\" id=\"hsts_preload\" name=\"hsts_preload\" value=\"1\" ".(strstr($vhost['options'], 'hsts_preload') ? 'checked="checked"' : '')."/> <label for=\"hsts_preload\">Diese Domain soll in die Preload-Liste aufgenommen werden (diese Option setzt den <em>preload</em>-Parameter)</label></span>
Bernd Wurst JQuery als Include HSTS-Int...

Bernd Wurst authored 10 years ago

217)     </span>
Hanno Böck Reihenfolge geändert: TLS-O...

Hanno Böck authored 7 years ago

218)     </div>";
219) 
Bernd Wurst Zeige die Zertifikatsauswah...

Bernd Wurst authored 6 years ago

220) $certs = user_certs();
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

221) $certselect = [];
Bernd Wurst Zeige die Zertifikatsauswah...

Bernd Wurst authored 6 years ago

222) $certselect[0] = 'kein Zertifikat / System-Standard benutzen';
223) if ($vhost_type != 'dav' && $vhost_type != 'svn') {
224)     $certselect[-1] = 'Automatische Zertifikatsverwaltung mit Let\'s Encrypt';
225) }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

226) foreach ($certs as $c) {
Bernd Wurst Blende Lets-Encrypt-Zertifi...

Bernd Wurst authored 6 years ago

227)     if (! cert_is_letsencrypt($c['id'])) {
228)         $certselect[$c['id']] = $c['subject'];
229)     }
Bernd Wurst Zeige die Zertifikatsauswah...

Bernd Wurst authored 6 years ago

230) }
231) if (strstr($vhost['options'], 'letsencrypt')) {
Hanno Böck Reihenfolge geändert: TLS-O...

Hanno Böck authored 7 years ago

232)     $vhost['certid'] = -1;
Bernd Wurst Zeige die Zertifikatsauswah...

Bernd Wurst authored 6 years ago

233) }
234) if (count($certselect) > 1) {
235)     // Nur dann gibt es was zum Auswählen
236)     $form .= "
237)         <h5>Verwendetes Zertifikat</h5>
238)         <div style=\"margin-left: 2em;\">
239)         ".html_select('cert', $certselect, $vhost['certid'])."
240)         </div>
241)         <p class=\"warning\"><b>Datenschutz-Hinweis:</b><br>
242)         Alle erstellten HTTPS-Zertifikate werden
243)         automatisch in den für jeden zugänglichen Certificate-Transparency-Logs abgelegt.
244)         Die zugehörigen Subdomains sind damit auch öffentlich.
245)         Sie können die Logs mit dem Service <a href=\"https://crt.sh/\">crt.sh</a> durchsuchen.</p>";
246) } else {
247)     $form .= "<h5>Verwendetes Zertifikat</h5>
248)     <div style=\"margin-left: 2em;\"><p>Für Sonderanwendungen (WebDAV, SVN) kann momentan kein Lets-Encrypt-Zertifikat verwaltet werden. Bitte beschaffen Sie ggf. ein Zertifikat und tragen Sie dieses unten auf der Websites-Übersichtsseite ein, damit es hier ausgewählt werden kann.</p></div>";
249) }
250) $form.="
251) <h5>Logfiles</h5>
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

252)     <div style=\"margin-left: 2em;\">
253)       <select name=\"logtype\" id=\"logtype\">
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

254)         <option value=\"none\" ".($vhost['logtype'] == null ? 'selected="selected"' : '')." >keine Logfiles</option>
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

255)         <option value=\"anonymous\" ".($vhost['logtype'] == 'anonymous' ? 'selected="selected"' : '')." >anonymisiert</option>
256)         <option value=\"default\" ".($vhost['logtype'] == 'default' ? 'selected="selected"' : '')." >vollständige Logfile</option>
257)       </select><br />
bernd Webalizer/Statistik-Funktio...

bernd authored 14 years ago

258)       <input type=\"checkbox\" id=\"errorlog\" name=\"errorlog\" value=\"1\" ".($vhost['errorlog'] == 1 ? ' checked="checked" ' : '')." />&#160;<label for=\"errorlog\">Fehlerprotokoll (error_log) einschalten</label><br />
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

259)     </div>
bernd Webalizer/Statistik-Funktio...

bernd authored 14 years ago

260)     <p>Logfiles werden unter <b>/var/log/apache2/".$_SESSION['userinfo']['username']."</b> abgelegt.</p>
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

261)     ";
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

262) 
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

263) $ipaddrs = user_ipaddrs();
bernd SuExec-Useraccount einstellbar

bernd authored 14 years ago

264) $available_users = available_suexec_users();
Bernd Wurst Ermögliche das Auswählen de...

Bernd Wurst authored 11 years ago

265) $available_servers = additional_servers();
266) $available_servers[] = my_server_id();
267) $available_servers = array_unique($available_servers);
268) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

269) $selectable_servers = [];
Bernd Wurst Ermögliche das Auswählen de...

Bernd Wurst authored 11 years ago

270) $all_servers = server_names();
271) foreach ($all_servers as $id => $fqdn) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

272)     if (in_array($id, $available_servers)) {
273)         $selectable_servers[$id] = $fqdn;
274)     }
Bernd Wurst Ermögliche das Auswählen de...

Bernd Wurst authored 11 years ago

275) }
276) if (!$vhost['server']) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

277)     $vhost['server'] = my_server_id();
Bernd Wurst Ermögliche das Auswählen de...

Bernd Wurst authored 11 years ago

278) }
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

279) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

280)   if (count($ipaddrs)) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

281)       $ipselect = [0 => 'System-Standard'];
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

282)       foreach ($ipaddrs as $i) {
283)           $ipselect[$i] = $i;
284)       }
285)       $form .= "
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

286)       <h5>IP-Adresse</h5>
287)       <div style=\"margin-left: 2em;\">
bernd IP-Adressen aktivieren

bernd authored 14 years ago

288)       ".html_select('ipv4', $ipselect, $vhost['ipv4'])."
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

289)       </div>";
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

290)   }
291)   if (count($available_users)) {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 2 years ago

292)       $userselect = [0 => 'Eigener Benutzeraccount'];
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

293)       foreach ($available_users as $u) {
294)           $userselect[$u['uid']] = $u['username'];
295)       }
296)       $form .= "
bernd SuExec-Useraccount einstellbar

bernd authored 14 years ago

297)       <h5>SuExec-Benutzeraccount</h5>
298)       <div style=\"margin-left: 2em;\">
299)       ".html_select('suexec_user', $userselect, $vhost['suexec_user'])."
300)       </div>";
301)   }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

302)   if (count($available_servers) > 1) {
303)       $form .= "
Bernd Wurst Ermögliche das Auswählen de...

Bernd Wurst authored 11 years ago

304)       <h5>Einrichten auf Server</h5>
305)       <div style=\"margin-left: 2em;\">
306)       ".html_select('server', $selectable_servers, $vhost['server'])."
307)       </div>";
308)   }
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

309) if ($have_v6) {
310)     $ipv6_address = '';
311)     if ($vhost['id'] && ($vhost['autoipv6'] >0)) {
Bernd Wurst Beschriftung im VHosts-Modu...

Bernd Wurst authored 5 years ago

312)         $ipv6_address = '<strong>IPv6-Adresse dieser Website:</strong> '.autoipv6_address($vhost['id'], $vhost['autoipv6']);
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

313)     }
314)     $checked = ($vhost['autoipv6'] > 0) ? ' checked="checked"' : '';
315)     $checked2 = ($vhost['autoipv6'] == 2) ? ' checked="checked"' : '';
316)     $form .= '<h5>IPv6</h5>
bernd IPv6

bernd authored 14 years ago

317) <div style="margin-left: 2em;">
bernd IPv6-Regelbetrieb vorbereit...

bernd authored 13 years ago

318) <input type="checkbox" name="ipv6" id="ipv6" value="yes" '.$checked.'/>&#160;<label for="ipv6">Auch über IPv6 erreichbar machen</label><br />
bernd Zusätzlicher Haken für eige...

bernd authored 13 years ago

319) <input type="checkbox" name="ipv6_separate" id="ipv6_separate" value="yes" '.$checked2.'/>&#160;<label for="ipv6_separate">Für diese Website eine eigene IPv6-Adresse reservieren</label><br />
bernd IPv6-Regelbetrieb vorbereit...

bernd authored 13 years ago

320) '.$ipv6_address.'
bernd IPv6

bernd authored 14 years ago

321) </div>';
bernd IPv6-Option nur anzeigen we...

bernd authored 13 years ago

322) }
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

323) 
324) 
325) 
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

326) $form .= '
bernd eliminate .php extensions f...

bernd authored 15 years ago

327)   <p><input type="submit" value="Speichern" />&#160;&#160;&#160;&#160;'.internal_link('vhosts', 'Abbrechen').'</p>
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

328) ';