5effc2bd7685822df276c1372dab480cff321941
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 Lizenzinfos in eigenes Modu...

Bernd Wurst authored 10 years ago

5) Written 2008-2014 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) 
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
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 neues VHosts-Modul (unbenut...

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

29) $vhost = empty_vhost();
30) 
31) if ($id != 0)
32)   $vhost = get_vhost_details($id);
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

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

bernd authored 13 years ago

34) $have_v6 = false;
35) $server = (isset($vhost['server']) ? $vhost['server'] : $_SESSION['userinfo']['server']);
36) if (ipv6_possible($server))
37)   $have_v6 = true;
38) 
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

39) DEBUG($vhost);
bernd Aliases editieren

bernd authored 16 years ago

40) if ($id == 0) {
bernd Benutze überall title() sta...

bernd authored 13 years ago

41)   title("Neue Subdomain anlegen");
bernd Aliases editieren

bernd authored 16 years ago

42) }
43) else {
bernd Benutze überall title() sta...

bernd authored 13 years ago

44)   title("Subdomain bearbeiten");
bernd Aliases editieren

bernd authored 16 years ago

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

bernd authored 16 years ago

46) 
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

47) html_header("<script type=\"text/javascript\">
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

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

bernd authored 16 years ago

49)   function selectedDomain() {
50)     var selected;
51)     selected=document.getElementById('domain').options.selectedIndex;
52)     return document.getElementById('domain').options.item(selected).text;
53)     }
54)   
55)   function defaultDocumentRoot() {
56)     var hostname;
57)     if (document.getElementById('hostname').value == '') 
58)       hostname = selectedDomain();
59)     else
60)       hostname = document.getElementById('hostname').value + '.' + selectedDomain();
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

61)     var default_docroot = hostname + '/htdocs';
62)     useDefaultDocroot(default_docroot);
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

63)   }
64)   
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

65)   function useDefaultDocroot( default_docroot ) {
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

66)     var do_it = (document.getElementById('use_default_docroot').checked == true);
67)     var inputfield = document.getElementById('docroot');
68)     inputfield.disabled = do_it;
69)     if (do_it) {
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

70)       document.getElementById('docroot').value = default_docroot;
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

71)     }
72)   }
bernd Erster Versuch, SVN, DAV un...

bernd authored 16 years ago

73)   
74)   function showAppropriateLines() {
75)     if (document.getElementById('vhost_type_regular').checked == true) {
bernd Docroot auch bei WebDAV anz...

bernd authored 16 years ago

76)       document.getElementById('options_docroot').style.display = 'block';
77)       document.getElementById('options_scriptlang').style.display = 'block';
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

78)       document.getElementById('options_webapp').style.display = 'none';
bernd Erster Versuch, SVN, DAV un...

bernd authored 16 years ago

79)     }
bernd Docroot auch bei WebDAV anz...

bernd authored 16 years ago

80)     else if (document.getElementById('vhost_type_dav').checked == true) { 
81)       document.getElementById('options_docroot').style.display = 'block';
82)       document.getElementById('options_scriptlang').style.display = 'none';
83)       document.getElementById('options_webapp').style.display = 'none';
84)     }
85)     else if (document.getElementById('vhost_type_svn').checked == true) {
86)       document.getElementById('options_docroot').style.display = 'none';
87)       document.getElementById('options_scriptlang').style.display = 'none';
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

88)       document.getElementById('options_webapp').style.display = 'none';
bernd Erster Versuch, SVN, DAV un...

bernd authored 16 years ago

89)     }
90)     else if (document.getElementById('vhost_type_webapp').checked == true) {
bernd Docroot auch bei WebDAV anz...

bernd authored 16 years ago

91)       document.getElementById('options_docroot').style.display = 'none';
92)       document.getElementById('options_scriptlang').style.display = 'none';
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

93)       document.getElementById('options_webapp').style.display = 'block';
bernd Erster Versuch, SVN, DAV un...

bernd authored 16 years ago

94)     }
95)   }
Bernd Wurst JQuery als Include HSTS-Int...

Bernd Wurst authored 10 years ago

96) 
97) 
98)   function showhsts( event ) {
99)     var ssl = $('#ssl option:selected').val();
100)     if (ssl == 'forward') {
101)       $('#hsts_block').show();
102)     } else
103)       $('#hsts_block').hide();
104)   }
105) 
106)   function hsts_preset( event ) {
107)     var seconds = $('#hsts_preset option:selected').val();
108)     if (seconds == 'custom') {
109)       $('#hsts_seconds').show();
110)       if ($('#hsts').val() < 0) {
111)         $('#hsts').val(2592000); /* 30 Tage */
112)       }
113)     } else {
114)       $('#hsts_seconds').hide();
115)       $('#hsts').val(seconds);
116)     }
117)   }
118) 
119)   $(document).ready(function(){
120)     $('#ssl').change(showhsts);
121)     showhsts();
122)     if ($('#hsts_preset option:selected').val() != 'custom') {
123)       $('#hsts_seconds').hide();
124)     }
125)     $('#hsts_preset').change(hsts_preset);
126)     
127)   })
128) 
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

129)   </script>");
130) 
131) $defaultdocroot = $vhost['domain'];
bernd domain = NULL ==> user-subd...

bernd authored 16 years ago

132) if (! $vhost['domain'])
bernd Mehr config-optionen und co...

bernd authored 14 years ago

133)   $defaultdocroot = $_SESSION['userinfo']['username'].'.'.config('masterdomain');
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

134) if ($vhost['hostname'])
135)   $defaultdocroot = $vhost['hostname'].'.'.$defaultdocroot;
136) 
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

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

bernd authored 16 years ago

138) 
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

139) $is_default_docroot = ($vhost['docroot'] == NULL) || ($vhost['homedir'].'/websites/'.$defaultdocroot == $vhost['docroot']);
140) 
141) if ($vhost['docroot'] != '' && ! strstr($vhost['docroot'], '/websites/'))
142) {
143)   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.");
144)   $is_default_docroot = True;
145) }
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

146) 
147) $docroot = '';
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

148) if ($is_default_docroot)
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

149)   $docroot = $defaultdocroot;
150) else
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

151)   $docroot = substr($vhost['docroot'], strlen($vhost['homedir'].'/websites/'));
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

155) 
156) $vhost_type = 'regular';
157) if ($vhost['is_dav'])
158)   $vhost_type = 'dav';
159) elseif ($vhost['is_svn'])
160)   $vhost_type = 'svn';
161) elseif ($vhost['is_webapp'])
162)   $vhost_type = 'webapp';
163) 
bernd Webapps implementiert

bernd authored 16 years ago

164) $applist = list_available_webapps();
165) $webapp_options = '';
166) foreach ($applist as $app)
167)   $webapp_options .= "<option value=\"{$app['id']}\">{$app['displayname']}</option>\n";
168) 
169) 
bernd neues VHosts-Modul (unbenut...

bernd authored 16 years ago

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

bernd authored 16 years ago

171) <h4 style=\"margin-top: 2em;\">Name des VHost</h4>
bernd Schon beim tippen ändern, n...

bernd authored 16 years ago

172)     <div style=\"margin-left: 2em;\"><input type=\"text\" name=\"hostname\" id=\"hostname\" size=\"10\" value=\"{$vhost['hostname']}\" onkeyup=\"defaultDocumentRoot()\"  onchange=\"defaultDocumentRoot()\" /><strong>.</strong>".domainselect($vhost['domain_id'], 'onchange="defaultDocumentRoot()"');
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

173) $form .= "<br /><input type=\"checkbox\" name=\"options[]\" id=\"aliaswww\" value=\"aliaswww\" {$s}/> <label for=\"aliaswww\">Auch mit <strong>www</strong> davor.</label></div>
174) 
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

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

bernd authored 16 years ago

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

177)   <h4>Optionen</h4>
178)   <h5>Speicherort für Dateien (»Document Root«)</h5>
179)   <div style=\"margin-left: 2em;\">
bernd Fix bug #488

bernd authored 15 years ago

180)     <input type=\"checkbox\" id=\"use_default_docroot\" name=\"use_default_docroot\" value=\"1\" onclick=\"defaultDocumentRoot()\" ".($is_default_docroot ? 'checked="checked" ' : '')."/>&#160;<label for=\"use_default_docroot\">Standardeinstellung benutzen</label><br />
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

185) 
Bernd Wurst prepare for experimental PH...

Bernd Wurst authored 12 years ago

186) /*
187)  * Boolean option, to be used when only one PHP version is available
188)  */
bernd Zeige PHP-Versionsauswahl n...

bernd authored 13 years ago

189) $have_php = ($vhost['php'] == 'php53' ? ' checked="checked" ' : '');
190) 
Bernd Wurst make PHP 5.4 available as e...

Bernd Wurst authored 12 years ago

191) /*
bernd Zeige PHP-Versionsauswahl n...

bernd authored 13 years ago

192) $phpoptions = "<h5>PHP</h5>
193)   <div style=\"margin-left: 2em;\">
194)     <input type=\"checkbox\" name=\"php\" id=\"php\" value=\"php53\" {$have_php}/>&#160;<label for=\"php\">PHP einschalten</label>
195)   </div>
196) ";
Bernd Wurst make PHP 5.4 available as e...

Bernd Wurst authored 12 years ago

197) */
bernd Zeige PHP-Versionsauswahl n...

bernd authored 13 years ago

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

Bernd Wurst authored 12 years ago

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

bernd authored 13 years ago

200)  */
Bernd Wurst make PHP 5.4 available as e...

Bernd Wurst authored 12 years ago

201) //if ($vhost['php'] == 'php54')
202) //{
Hanno Böck php 5.5 default

Hanno Böck authored 10 years ago

203)   $options = array("none" => 'ausgeschaltet', "php53" => 'PHP 5.3 (veraltet)' , "php54" => "PHP 5.4", "php55" => "PHP 5.5");
bernd Zeige PHP-Versionsauswahl n...

bernd authored 13 years ago

204)   $phpoptions = "
205)   <h5>PHP</h5>
206)   <div style=\"margin-left: 2em;\">
207)     ".html_select("php", $options, $vhost['php'])."
208)   </div>";
Bernd Wurst make PHP 5.4 available as e...

Bernd Wurst authored 12 years ago

209) //}
bernd Vorbereitung für PHP 5.3

bernd authored 14 years ago

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

bernd authored 13 years ago

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

bernd authored 14 years ago

212) 
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

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

bernd authored 13 years ago

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

bernd authored 13 years ago

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

bernd authored 14 years ago

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

bernd authored 13 years ago

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

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

bernd authored 15 years ago

220) </div>
221) ";
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

222) 
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

235) <h4>Verwendung</h4>
236)         <div style=\"margin-left: 2em;\">
237) 	  <input class=\"usageoption\" onclick=\"showAppropriateLines()\" 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

238) ";
239) if ($vhost_type=='webapp')
240) {
241)   // Wird nur noch angezeigt wenn der Vhost schon auf webapp konfiguriert ist, ansonsten nicht.
242)   // Die User sollen den Webapp-Installer benutzen.
243)   $form .= "
bernd Gloable Webapps weiter hoch

bernd authored 16 years ago

244) 	  <input class=\"usageoption\" onclick=\"showAppropriateLines()\" 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

245) ";
246) }
Bernd Wurst JQuery als Include HSTS-Int...

Bernd Wurst authored 10 years ago

247) $hsts_value = $vhost['hsts'];
248) $hsts_preset_values = array("-1" => "aus", "86400" => "1 Tag", "2592000" => "30 Tage", "31536000" => "1 Jahr", "63072000" => "2 Jahre", "custom" => "Individuell");
249) $hsts_preset_value = 'custom';
250) if (isset($hsts_preset_values[$hsts_value])) {
251)   $hsts_preset_value = $hsts_value;
252) }
bernd R.I.P. Shared-Drupal

bernd authored 15 years ago

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

bernd authored 16 years ago

254) 	  <input class=\"usageoption\" onclick=\"showAppropriateLines()\" 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 />
bernd Gloable Webapps weiter hoch

bernd authored 16 years ago

255) 	  <input class=\"usageoption\" onclick=\"showAppropriateLines()\" 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

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

bernd authored 16 years ago

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

bernd authored 15 years ago

258) <br />
259) <br />
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

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

bernd authored 16 years ago

261) 
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

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

bernd authored 16 years ago

263) <div style=\"margin-left: 2em;\">
264)     <h5>SSL-Verschlüsselung</h5>
265)     <div style=\"margin-left: 2em;\">
266)     <select name=\"ssl\" id=\"ssl\">
Bernd Wurst Menüpunkt umbenannt: Webser...

Bernd Wurst authored 11 years ago

267)       <option value=\"none\" ".($vhost['ssl'] == NULL ? 'selected="selected"' : '')." >Normal</option>
268)       ".($vhost['ssl'] == 'http' ? "<option value=\"http\" selected=\"selected\">kein SSL</option>" : '')."
269)       ".($vhost['ssl'] == 'https' ? "<option value=\"https\" selected=\"selected\">nur SSL</option>" : '')."
bernd SSL auch über webinterface...

bernd authored 16 years ago

270)       <option value=\"forward\" ".($vhost['ssl'] == 'forward' ? 'selected="selected"' : '')." >Immer auf SSL umleiten</option>
Bernd Wurst JQuery als Include HSTS-Int...

Bernd Wurst authored 10 years ago

271)     </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=\"http://de.wikipedia.org/wiki/Hypertext_Transfer_Protocol_Secure#HSTS\">HSTS</a>:</label> ".html_select('hsts_preset', $hsts_preset_values, $hsts_preset_value)." <span id=\"hsts_seconds\"><input type=\"text\" name=\"hsts\" id=\"hsts\" size=\"10\" style=\"text-align: right;\" value=\"{$hsts_value}\" /> Sekunden</span>
272)     </span>
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

273)     </div>
274)     <h5>Logfiles <span class=\"warning\">*</span></h5>
275)     <div style=\"margin-left: 2em;\">
276)       <select name=\"logtype\" id=\"logtype\">
277)         <option value=\"none\" ".($vhost['logtype'] == NULL ? 'selected="selected"' : '')." >keine Logfiles</option>
278)         <option value=\"anonymous\" ".($vhost['logtype'] == 'anonymous' ? 'selected="selected"' : '')." >anonymisiert</option>
279)         <option value=\"default\" ".($vhost['logtype'] == 'default' ? 'selected="selected"' : '')." >vollständige Logfile</option>
280)       </select><br />
bernd Webalizer/Statistik-Funktio...

bernd authored 14 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

284)     <p>Logfiles werden unter <b>/var/log/apache2/".$_SESSION['userinfo']['username']."</b> abgelegt.</p>
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

285) </div>
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

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

bernd authored 16 years ago

287) 
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

288) $ipaddrs = user_ipaddrs();
289) $certs = user_certs();
bernd SuExec-Useraccount einstellbar

bernd authored 14 years ago

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

Bernd Wurst authored 11 years ago

291) $available_servers = additional_servers();
292) $available_servers[] = my_server_id();
293) $available_servers = array_unique($available_servers);
294) 
295) $selectable_servers = array();
296) $all_servers = server_names();
297) foreach ($all_servers as $id => $fqdn) {
298)   if (in_array($id, $available_servers)) {
299)     $selectable_servers[$id] = $fqdn;
300)   }
301) }
302) if (!$vhost['server']) {
303)   $vhost['server'] = my_server_id();
304) }
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

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

bernd authored 13 years ago

306) $extended = '';
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

307)   if (count($certs))
308)   {
309)     $certselect = array(0 => 'kein Zertifikat / System-Standard benutzen');
310)     foreach ($certs as $c)
311)     {
312)       $certselect[$c['id']] = $c['subject'];
313)     }
bernd IPv6-Option nur anzeigen we...

bernd authored 13 years ago

314)     $extended .= "
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

315)       <h5>verwendetes SSL-Zertifikat</h5>
316)       <div style=\"margin-left: 2em;\">
317)       ".html_select('cert', $certselect, $vhost['certid'])."
318)       </div>";
319)   }
bernd IP-Adressen aktivieren

bernd authored 14 years ago

320)   if (count($ipaddrs))
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

321)   {
322)     $ipselect = array(0 => 'System-Standard');
323)     foreach ($ipaddrs AS $i)
324)     {
325)       $ipselect[$i] = $i;
326)     }
bernd IPv6-Option nur anzeigen we...

bernd authored 13 years ago

327)     $extended .= "
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

331)       </div>";
bernd IP-Adressen aktivieren

bernd authored 14 years ago

332)   } 
bernd SuExec-Useraccount einstellbar

bernd authored 14 years ago

333)   if (count($available_users))
334)   {
335)     $userselect = array(0 => 'Eigener Benutzeraccount');
336)     foreach ($available_users AS $u)
337)     {
338)       $userselect[$u['uid']] = $u['username'];
339)     }
bernd IPv6-Option nur anzeigen we...

bernd authored 13 years ago

340)     $extended .= "
bernd SuExec-Useraccount einstellbar

bernd authored 14 years ago

341)       <h5>SuExec-Benutzeraccount</h5>
342)       <div style=\"margin-left: 2em;\">
343)       ".html_select('suexec_user', $userselect, $vhost['suexec_user'])."
344)       </div>";
345)   }
Bernd Wurst Zeige Server-Auswahl nur we...

Bernd Wurst authored 11 years ago

346)   if (count($available_servers) > 1)
Bernd Wurst Ermögliche das Auswählen de...

Bernd Wurst authored 11 years ago

347)   {
348)     $extended .= "
349)       <h5>Einrichten auf Server</h5>
350)       <div style=\"margin-left: 2em;\">
351)       ".html_select('server', $selectable_servers, $vhost['server'])."
352)       </div>";
353) 
354)   }
bernd IPv6-Option nur anzeigen we...

bernd authored 13 years ago

355) if ($have_v6) 
356) {
bernd IPv6-Regelbetrieb vorbereit...

bernd authored 13 years ago

357)   $ipv6_address = '';
bernd Zusätzlicher Haken für eige...

bernd authored 13 years ago

358)   if ($vhost['id'] && ($vhost['autoipv6'] >0 ))
359)     $ipv6_address = '<strong>IPv6-Adresse dieser Subdomain:</strong> '.autoipv6_address($vhost['id'], $vhost['autoipv6']);
360)   $checked = ($vhost['autoipv6'] > 0) ? ' checked="checked"' : '';
361)   $checked2 = ($vhost['autoipv6'] == 2) ? ' checked="checked"' : '';
bernd IPv6-Option nur anzeigen we...

bernd authored 13 years ago

362)   $extended .= '<h5>IPv6</h5>
bernd IPv6

bernd authored 14 years ago

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

bernd authored 13 years ago

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

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

366) '.$ipv6_address.'
bernd IPv6

bernd authored 14 years ago

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

bernd authored 13 years ago

368) }
369) if ($extended)
370)   $form .= "
371) <h4 style=\"margin-top: 3em;\">Erweiterte Optionen</h4>
372) <div style=\"margin-left: 2em;\">
373) ".$extended."</div>";
bernd IPv6

bernd authored 14 years ago

374) 
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

375) 
376) 
377) 
bernd VHosts-Modul mit neuem Layo...

bernd authored 16 years ago

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

bernd authored 15 years ago

379)   <p><input type="submit" value="Speichern" />&#160;&#160;&#160;&#160;'.internal_link('vhosts', 'Abbrechen').'</p>
bernd mod_php deprecated, zwang z...

bernd authored 15 years ago

380)   <p class="warning"><span class="warning">*</span>Es ist im Moment fraglich, ob die Speicherung von Logfiles mit IP-Adressen auf Webservern
bernd warnung bzgl. logfiles eing...

bernd authored 16 years ago

381)   zulässig ist. Wir weisen alle Nutzer darauf hin, dass sie selbst dafür verantwortlich sind, bei geloggten Nutzerdaten die
382)   Seitenbesucher darauf hinzuweisen. Wir empfehlen, wenn möglich, Logfiles abzuschalten oder anonymes Logging einzusetzen.</p>
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

383) ';
bernd eliminate .php extensions f...

bernd authored 15 years ago

384) output(html_form('vhosts_edit_vhost', 'save', 'action=edit&vhost='.$vhost['id'], $form));