50033c32ddb72021bfb3c4284e44445b7863aa1a
bernd VHosts können bearbeitet we...

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 VHosts können bearbeitet we...

bernd authored 16 years ago

16) 
17) require_once('session/start.php');
18) 
19) require_once('vhosts.php');
20) 
Bernd Wurst Weise Benutzer auf Wartezei...

Bernd Wurst authored 11 years ago

21) require_once('inc/error.php');
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

22) require_once('inc/security.php');
23) require_once('class/domain.php');
24) 
25) require_role(ROLE_SYSTEMUSER);
26) 
27) require_once("inc/debug.php");
28) global $debugmode;
29) 
30) 
31) if ($_GET['action'] == 'edit')
32) {
33)   check_form_token('vhosts_edit_vhost');
34)   $id = (int) $_GET['vhost'];
35)   $vhost = empty_vhost();
36)   if ($id != 0)
37)     $vhost = get_vhost_details( $id );
38)   DEBUG($vhost);
39) 
bernd Erlaube wildcards bei vhosts

bernd authored 13 years ago

40)   $hostname = filter_input_hostname($_POST['hostname'], true);
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

41) 
Bernd Wurst Zeige Userdomains nur noch...

Bernd Wurst authored 9 years ago

42)   $domainname = NULL;
bernd Webalizer/Statistik-Funktio...

bernd authored 14 years ago

43)   $domain_id = (int) $_POST['domain'];
Bernd Wurst Ermögliche dem user Hosts m...

Bernd Wurst authored 9 years ago

44)   if ($domain_id >= 0) {
bernd domain = NULL ==> user-subd...

bernd authored 16 years ago

45)     $domain = new Domain( (int) $_POST['domain'] );
bernd Mehr config-optionen und co...

bernd authored 14 years ago

46)     $domain->ensure_userdomain();
bernd Webalizer/Statistik-Funktio...

bernd authored 14 years ago

47)     $domain_id = $domain->id;
Bernd Wurst Zeige Userdomains nur noch...

Bernd Wurst authored 9 years ago

48)     $domainname = $domain->fqdn;
bernd domain = NULL ==> user-subd...

bernd authored 16 years ago

49)   }
Bernd Wurst Zeige Userdomains nur noch...

Bernd Wurst authored 9 years ago

50)   elseif ($domain_id == -1) {
Bernd Wurst Ermögliche dem user Hosts m...

Bernd Wurst authored 9 years ago

51)     # use configured user_vhosts_domain
52)     $userdomain = userdomain();
53)     $domain = new Domain( (int) $userdomain['id'] );
54)     $domain_id = $domain->id;
Bernd Wurst Zeige Userdomains nur noch...

Bernd Wurst authored 9 years ago

55)     $domainname = $domain->fqdn;
Bernd Wurst Ermögliche dem user Hosts m...

Bernd Wurst authored 9 years ago

56)     $hostname = $hostname.'.'.$_SESSION['userinfo']['username'];
57)     $hostname = trim($hostname, " .-");
58)   }
Bernd Wurst Zeige Userdomains nur noch...

Bernd Wurst authored 9 years ago

59)   elseif ($domain_id == -2) {
60)     # use system masterdomain
61)     $domainname = $_SESSION['userinfo']['username'].".".config('masterdomain');
62)   }
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

63) 
Bernd Wurst Funktionsfähiger Prototyp

Bernd Wurst authored 7 years ago

64)   $aliaswww = (isset($_POST['aliaswww']) && $_POST['aliaswww'] == 'aliaswww');
65)   $forwardwww = NULL;
66)   if ($aliaswww && isset($_POST['forwardwww'])) {
67)     if ($_POST['forwardwww'] == 'forwardwww') {
68)       $forwardwww = 'forwardwww';
69)     } elseif ($_POST['forwardwww'] == 'forwardnowww') {
70)       $forwardwww = 'forwardnowww';
71)     }
72)   }
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

73) 
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

74)   $docroot = '';
bernd Docroot auch bei WebDAV anz...

bernd authored 16 years ago

75)   if ($_POST['vhost_type'] == 'regular' || $_POST['vhost_type'] == 'dav')
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

76)   {
Bernd Wurst Zeige Userdomains nur noch...

Bernd Wurst authored 9 years ago

77)     $defaultdocroot = $vhost['homedir'].'/websites/'.((strlen($hostname) > 0) ? $hostname.'.' : '').($domainname).'/htdocs';
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

78)   
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

79)     $docroot = '';
80)     if (isset($_POST['docroot']))
81)     {
82)       if (! check_path( $_POST['docroot'] ))
83)         system_failure("Eingegebener Pfad enthält ungültige Angaben");
84)       $docroot = $vhost['homedir'].'/websites/'.$_POST['docroot'];
85)     }
86)     if ((isset($_POST['use_default_docroot']) && $_POST['use_default_docroot'] == '1') || ($docroot == $defaultdocroot)) {
Bernd Wurst Bugfix: Werte dürfen nicht...

Bernd Wurst authored 10 years ago

87)       $docroot = NULL;
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

88)     }
89)   
90)     DEBUG("Document-Root: ".$docroot);
bernd Docroot auch bei WebDAV anz...

bernd authored 16 years ago

91)   }
Bernd Wurst Bugfix: Werte dürfen nicht...

Bernd Wurst authored 10 years ago

92)   $php = NULL;
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

93)   if ($_POST['vhost_type'] == 'regular' && isset($_POST['php']))
bernd Docroot auch bei WebDAV anz...

bernd authored 16 years ago

94)   {
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

95)     switch ($_POST['php']) {
Bernd Wurst PHP 5.6 experimentell

Bernd Wurst authored 9 years ago

96)       case 'php56':
97)         $php = 'php56';
98)         break;
Bernd Wurst PHP <= 5.5 entfernt und Vor...

Bernd Wurst authored 7 years ago

99)       case 'php70':
100)       case 'fpm70':
Bernd Wurst zwinge PHP 7.0 auf FPM (har...

Bernd Wurst authored 8 years ago

101)         $php = 'fpm70';
Hanno Böck PHP 7.0 support

Hanno Böck authored 8 years ago

102)         break;
Bernd Wurst PHP <= 5.5 entfernt und Vor...

Bernd Wurst authored 7 years ago

103)       case 'php71':
104)       case 'fpm71':
105)         $php = 'fpm71';
106)         break;
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

107)       /* Wenn etwas anderes kommt, ist das "kein PHP". So einfach ist das. */
108)     }
109)   }
bernd "CGI-Aktivieren" ist jetzt...

bernd authored 13 years ago

110)   $cgi = 1;
111)   if (isset($_POST['safemode']) && $_POST['safemode'] == 'yes')
bernd CGI abschaltbar

bernd authored 14 years ago

112)   {
bernd "CGI-Aktivieren" ist jetzt...

bernd authored 13 years ago

113)     $cgi = 0;
bernd CGI abschaltbar

bernd authored 14 years ago

114)   }
115) 
bernd SuExec-Useraccount einstellbar

bernd authored 14 years ago

116)   if (isset($_POST['suexec_user']))
117)     $vhost['suexec_user'] = $_POST['suexec_user'];
118) 
Bernd Wurst Ermögliche das Auswählen de...

Bernd Wurst authored 11 years ago

119)   if (isset($_POST['server']))
120)     $vhost['server'] = $_POST['server'];
121) 
bernd Docroot auch bei WebDAV anz...

bernd authored 16 years ago

122)   if ($_POST['vhost_type'] == 'regular') {
123)     $vhost['is_dav'] = 0;
124)     $vhost['is_svn'] = 0;
125)     $vhost['is_webapp'] = 0;
126)   }
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

127)   elseif ($_POST['vhost_type'] == 'dav') {
128)     $vhost['is_dav'] = 1;
129)     $vhost['is_svn'] = 0;
130)     $vhost['is_webapp'] = 0;
131)   }
132)   elseif ($_POST['vhost_type'] == 'svn') {
133)     $vhost['is_dav'] = 0;
134)     $vhost['is_svn'] = 1;
135)     $vhost['is_webapp'] = 0;
136)   }
137)   elseif ($_POST['vhost_type'] == 'webapp') {
138)     $vhost['is_dav'] = 0;
139)     $vhost['is_svn'] = 0;
140)     $vhost['is_webapp'] = 1;
bernd Webapps implementiert

bernd authored 16 years ago

141)     $vhost['webapp_id'] = (int) $_POST['webapp'];
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

142)   }
143) 
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

144)   
Bernd Wurst Bugfix: Werte dürfen nicht...

Bernd Wurst authored 10 years ago

145)   $ssl = NULL;
bernd SSL auch über webinterface...

bernd authored 16 years ago

146)   switch ($_POST['ssl']) {
147)     case 'http':
148)       $ssl = 'http';
149)       break;
150)     case 'https':
151)       $ssl = 'https';
152)       break;
153)     case 'forward':
154)       $ssl = 'forward';
155)       break;
156)     /* Wenn etwas anderes kommt, ist das "beides". So einfach ist das. */
157)   }
158) 
Bernd Wurst JQuery als Include HSTS-Int...

Bernd Wurst authored 10 years ago

159)   $hsts = NULL;
Bernd Wurst HSTS-Optionen includeSubdom...

Bernd Wurst authored 7 years ago

160)   $hsts_subdomains = false;
161)   $hsts_preload = false;
Bernd Wurst JQuery als Include HSTS-Int...

Bernd Wurst authored 10 years ago

162)   if (isset($_POST['hsts'])) {
163)     if (is_numeric($_POST['hsts']) && (int) $_POST['hsts'] > -2) {
164)       $hsts = (int) $_POST['hsts'];
165)     } else {
166)       system_failure('Es wurde ein ungültiger HSTS-Wert eingegeben. Dort sind nur Sekunden erlaubt.');
167)     }
Bernd Wurst HSTS-Optionen includeSubdom...

Bernd Wurst authored 7 years ago

168)     if (isset($_POST['hsts_subdomains']) and $_POST['hsts_subdomains'] == 1) {
169)       $hsts_subdomains = true;
170)       if (isset($_POST['hsts_preload']) and $_POST['hsts_preload'] == 1) {
171)         $hsts_preload = true;
172)       }
173)     }
Bernd Wurst JQuery als Include HSTS-Int...

Bernd Wurst authored 10 years ago

174)   }
175)  
bernd fix a warning

bernd authored 14 years ago

176)   $cert = (isset($_POST['cert']) ? (int) $_POST['cert'] : NULL);
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

177) 
bernd fix a warning

bernd authored 14 years ago

178)   $ipv4 = (isset($_POST['ipv4']) ? $_POST['ipv4'] : NULL);
bernd IP-Adressen aktivieren

bernd authored 14 years ago

179) 
bernd IPv6

bernd authored 14 years ago

180)   if (isset($_POST['ipv6']) && $_POST['ipv6'] == 'yes')
181)   {
182)     $vhost['autoipv6'] = 1;
bernd Zusätzlicher Haken für eige...

bernd authored 13 years ago

183)     if (isset($_POST['ipv6_separate']) && $_POST['ipv6_separate'] = 'yes')
184)     {
185)       $vhost['autoipv6'] = 2;
186)     }
bernd IPv6

bernd authored 14 years ago

187)   } else {
188)     $vhost['autoipv6'] = 0;
189)   }
190)   
bernd Webalizer/Statistik-Funktio...

bernd authored 14 years ago

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

bernd authored 16 years ago

192)   $logtype = '';
193)   switch ($_POST['logtype']) {
194)     case 'anonymous':
195)       $logtype = 'anonymous';
196)       break;
197)     case 'default':
198)       $logtype = 'default';
199)       break;
200)     /* Wenn etwas anderes kommt, ist das "kein Logging". So einfach ist das. */
201)   }
202) 
bernd error_log konfigurierbar

bernd authored 16 years ago

203)   $errorlog = 0;
204)   if (isset($_POST['errorlog']) and ($_POST['errorlog'] == 1))
205)     $errorlog = 1;
206) 
bernd Webalizer/Statistik-Funktio...

bernd authored 14 years ago

207) 
208)   if (isset($_POST['stats']) && $_POST['stats'] == 1)
209)   {
210)     if ($vhost['stats'] == NULL)
211)       $vhost['stats'] = 'private';
212)   }
213)   else
214)     $vhost['stats'] = NULL;
215) 
216)   if ($logtype == '')
217)     $vhost['stats'] = NULL;
218)   
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

219)   DEBUG("PHP: {$php} / Logging: {$logtype}");
220) 
221)   $old_options = explode(',', $vhost['options']);
222)   $new_options = array();
223)   foreach ($old_options AS $op)
224)   {
Bernd Wurst Funktionsfähiger Prototyp

Bernd Wurst authored 7 years ago

225)     if (! in_array($op, array('aliaswww', 'forwardwww', 'hsts_subdomains', 'hsts_preload'))) {
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

226)       array_push($new_options, $op);
Bernd Wurst * Ermögliche SAN bei CSRs *...

Bernd Wurst authored 8 years ago

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

bernd authored 16 years ago

228)   }
Bernd Wurst Status der letsencrypt-Opti...

Bernd Wurst authored 8 years ago

229)   if ($aliaswww) {
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

230)     array_push($new_options, 'aliaswww');
Bernd Wurst Funktionsfähiger Prototyp

Bernd Wurst authored 7 years ago

231)     if ($forwardwww) {
232)         array_push($new_options, $forwardwww);
233)     }
Bernd Wurst * Ermögliche SAN bei CSRs *...

Bernd Wurst authored 8 years ago

234)   }
Bernd Wurst HSTS-Optionen includeSubdom...

Bernd Wurst authored 7 years ago

235)   if ($hsts_subdomains) {
236)     array_push($new_options, 'hsts_subdomains');
237)   }
238)   if ($hsts_preload) {
239)     array_push($new_options, 'hsts_preload');
240)   }
Bernd Wurst Status der letsencrypt-Opti...

Bernd Wurst authored 8 years ago

241)   $letsencrypt = ($cert == 0 ? false : ($cert == -1 || cert_is_letsencrypt($cert)));
242) 
243)   if ($letsencrypt) {
Bernd Wurst * Ermögliche SAN bei CSRs *...

Bernd Wurst authored 8 years ago

244)     array_push($new_options, 'letsencrypt');
Bernd Wurst Letsencrypt vorbereitet und...

Bernd Wurst authored 8 years ago

245)     if ($vhost['cert'] != 0) {
Bernd Wurst Status der letsencrypt-Opti...

Bernd Wurst authored 8 years ago

246)       # Wenn der User manuell von einem gültigen Cert auf "letsencrypt" umgestellt hat, 
Bernd Wurst Letsencrypt vorbereitet und...

Bernd Wurst authored 8 years ago

247)       # dann sollte das alte Cert noch so lange eingetragen bleiben bis das neue da ist.
Bernd Wurst Status der letsencrypt-Opti...

Bernd Wurst authored 8 years ago

248)       $cert = $vhost['cert'];
249)     } elseif ($cert > 0) {
250)       # Das Cert was der user gewählt hat, ist von Lets encrypt
251)       # tu nix, $cert ist schon korrekt
252)     } else {
253)       # Wenn vorher kein Zertifikat aktiv war, dann setze jetzt auch keines. 
254)       # Der letsencrypt-Automatismus macht das dann schon.
255)       $cert = 0;
256)     }
257)   } else {
258)     # Wenn kein Letsencrypt gewünscht ist, entferne die Letsencrypt-Option
259)     $key = array_search('letsencrypt',$new_options);
260)     if ($key !== false) {
261)       unset($new_options[$key]);
Bernd Wurst Letsencrypt vorbereitet und...

Bernd Wurst authored 8 years ago

262)     }
Bernd Wurst * Ermögliche SAN bei CSRs *...

Bernd Wurst authored 8 years ago

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

bernd authored 16 years ago

264) 
265)   DEBUG($old_options);
266)   DEBUG($new_options);
267)   $options = implode(',', $new_options);
268)   DEBUG('New options: '.$options);
269) 
270)   $vhost['hostname'] = $hostname;
bernd Webalizer/Statistik-Funktio...

bernd authored 14 years ago

271)   $vhost['domain_id'] = $domain_id;
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

272)   $vhost['docroot'] = $docroot;
273)   $vhost['php'] = $php;
bernd CGI abschaltbar

bernd authored 14 years ago

274)   $vhost['cgi'] = $cgi;
bernd SSL auch über webinterface...

bernd authored 16 years ago

275)   $vhost['ssl'] = $ssl;
Bernd Wurst JQuery als Include HSTS-Int...

Bernd Wurst authored 10 years ago

276)   $vhost['hsts'] = $hsts;
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

277)   $vhost['cert'] = $cert;
bernd IP-Adressen aktivieren

bernd authored 14 years ago

278)   $vhost['ipv4'] = $ipv4;
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

279)   $vhost['logtype'] = $logtype;
bernd error_log konfigurierbar

bernd authored 16 years ago

280)   $vhost['errorlog'] = $errorlog; 
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

281)   $vhost['options'] = $options;
282)     
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

283)   DEBUG($vhost);
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

284)   save_vhost($vhost);
Bernd Wurst Weise Benutzer auf Wartezei...

Bernd Wurst authored 11 years ago

285)   success_msg("Ihre Einstellungen wurden gespeichert. Es dauert jedoch einige Minuten bis die Änderungen wirksam werden.");
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

286) 
287)   if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

288)     header('Location: vhosts');
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

289) 
290) }
bernd Aliases editieren

bernd authored 16 years ago

291) elseif ($_GET['action'] == 'addalias')
292) {
293)   check_form_token('vhosts_add_alias');
294)   $id = (int) $_GET['vhost'];
295)   $vhost = get_vhost_details( $id );
296)   DEBUG($vhost);
297) 
298)   $alias = empty_alias();
299)   $alias['vhost'] = $vhost['id'];
300) 
301)   
bernd Erlaube wildcards bei vhosts

bernd authored 13 years ago

302)   $hostname = filter_input_hostname($_POST['hostname'], true);
bernd auch aliases dürfen usernam...

bernd authored 16 years ago

303)   $domainid = (int) $_POST['domain'];
Bernd Wurst Ermögliche dem user Hosts m...

Bernd Wurst authored 9 years ago

304)   if ($domainid >= 0) {
bernd auch aliases dürfen usernam...

bernd authored 16 years ago

305)     $domain = new Domain( (int) $_POST['domain'] );
bernd Mehr config-optionen und co...

bernd authored 14 years ago

306)     $domain->ensure_userdomain();
bernd auch aliases dürfen usernam...

bernd authored 16 years ago

307)     $domainid = $domain->id;
308)   }
Bernd Wurst Ermögliche dem user Hosts m...

Bernd Wurst authored 9 years ago

309)   if ($domainid == -1) {
310)     # use configured user_vhosts_domain
311)     $userdomain = userdomain();
312)     $domain = new Domain( (int) $userdomain['id'] );
313)     $domainid = $domain->id;
314)     $hostname = $hostname.'.'.$_SESSION['userinfo']['username'];
315)     $hostname = trim($hostname, " .-");
316)   }
bernd Aliases editieren

bernd authored 16 years ago

317) 
318)   if (! is_array($_POST['options']))
319)     $_POST['options'] = array();
320)   $aliaswww = in_array('aliaswww', $_POST['options']);
321)   $forward = in_array('forward', $_POST['options']);
322) 
323)   $new_options = array();
324)   if ($aliaswww)
325)     array_push($new_options, 'aliaswww');
326)   if ($forward)
327)     array_push($new_options, 'forward');
328)   DEBUG($new_options);
329)   $options = implode(',', $new_options);
330)   DEBUG('New options: '.$options);
331) 
332)   $alias['hostname'] = $hostname;
bernd domainid -> domain_id, fies...

bernd authored 14 years ago

333)   $alias['domain_id'] = $domainid;
bernd Aliases editieren

bernd authored 16 years ago

334)     
335)   $alias ['options'] = $options;
336)     
337)   save_alias($alias);
338) 
339)   if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

340)     header('Location: aliases?vhost='.$vhost['id']);
bernd Aliases editieren

bernd authored 16 years ago

341) 
342) }
343) elseif ($_GET['action'] == 'deletealias')
344) {
345)   $title = "Subdomain löschen";
346)   $section = 'vhosts_vhosts';
347)   
348)   $alias = get_alias_details( (int) $_GET['alias'] );
349)   DEBUG($alias);
bernd domain = NULL ==> user-subd...

bernd authored 16 years ago

350)   $alias_string = $alias['fqdn'];
bernd Aliases editieren

bernd authored 16 years ago

351)   
352)   $vhost = get_vhost_details( $alias['vhost'] );
353)   DEBUG($vhost);
bernd domain = NULL ==> user-subd...

bernd authored 16 years ago

354)   $vhost_string = $vhost['fqdn'];
bernd Aliases editieren

bernd authored 16 years ago

355)   
356)   $sure = user_is_sure();
357)   if ($sure === NULL)
358)   {
bernd * alle internen Links sinnv...

bernd authored 15 years ago

359)     are_you_sure("action=deletealias&alias={$_GET['alias']}", "Möchten Sie das Alias »{$alias_string}« für die Subdomain »{$vhost_string}« wirklich löschen?");
bernd Aliases editieren

bernd authored 16 years ago

360)   }
361)   elseif ($sure === true)
362)   {
363)     delete_alias($alias['id']);
364)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

365)       header('Location: aliases?vhost='.$vhost['id']);
bernd Aliases editieren

bernd authored 16 years ago

366)   }
367)   elseif ($sure === false)
368)   {
369)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

370)       header('Location: aliases?vhost='.$vhost['id']);
bernd Aliases editieren

bernd authored 16 years ago

371)   }
372) }
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

373) elseif ($_GET['action'] == 'delete')
374) {
bernd Aliases editieren

bernd authored 16 years ago

375)   $title = "Subdomain löschen";
376)   $section = 'vhosts_vhosts';
377)   
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

378)   $vhost = get_vhost_details( (int) $_GET['vhost'] );
bernd domain = NULL ==> user-subd...

bernd authored 16 years ago

379)   $vhost_string = $vhost['fqdn'];
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

380)   
381)   $sure = user_is_sure();
382)   if ($sure === NULL)
383)   {
bernd * alle internen Links sinnv...

bernd authored 15 years ago

384)     are_you_sure("action=delete&vhost={$_GET['vhost']}", "Möchten Sie die Subdomain »{$vhost_string}« wirklich löschen?");
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

385)   }
386)   elseif ($sure === true)
387)   {
388)     delete_vhost($vhost['id']);
389)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

390)       header("Location: vhosts");
bernd VHosts können bearbeitet we...

bernd authored 16 years ago

391)   }
392)   elseif ($sure === false)
393)   {
394)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

395)       header("Location: vhosts");