49fd23ed86038fd5f9a9687e0d8f180438777c9a
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 'fpm70':
Bernd Wurst zwinge PHP 7.0 auf FPM (har...

Bernd Wurst authored 8 years ago

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

Hanno Böck authored 8 years ago

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

Bernd Wurst authored 7 years ago

102)       case 'fpm71':
103)         $php = 'fpm71';
104)         break;
Hanno Böck add PHP 7.2 support, re-cre...

Hanno Böck authored 6 years ago

105)       case 'fpm72':
106)         $php = 'fpm72';
107)         break;
bernd vhost-Modul kann jetzt SVN-...

bernd authored 16 years ago

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

bernd authored 13 years ago

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

bernd authored 14 years ago

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

bernd authored 13 years ago

114)     $cgi = 0;
bernd CGI abschaltbar

bernd authored 14 years ago

115)   }
116) 
bernd SuExec-Useraccount einstellbar

bernd authored 14 years ago

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

Bernd Wurst authored 11 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

Bernd Wurst authored 10 years ago

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

bernd authored 16 years ago

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

Bernd Wurst authored 10 years ago

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

Bernd Wurst authored 7 years ago

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

Bernd Wurst authored 10 years ago

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

Bernd Wurst authored 7 years ago

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

Bernd Wurst authored 10 years ago

175)   }
176)  
bernd fix a warning

bernd authored 14 years ago

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

bernd authored 14 years ago

178) 
bernd fix a warning

bernd authored 14 years ago

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

bernd authored 14 years ago

180) 
bernd IPv6

bernd authored 14 years ago

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

bernd authored 13 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

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

Bernd Wurst authored 7 years ago

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

bernd authored 16 years ago

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

Bernd Wurst authored 8 years ago

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

bernd authored 16 years ago

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

Bernd Wurst authored 8 years ago

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

bernd authored 16 years ago

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

Bernd Wurst authored 7 years ago

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

Bernd Wurst authored 8 years ago

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

Bernd Wurst authored 7 years ago

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

Bernd Wurst authored 8 years ago

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

Bernd Wurst authored 8 years ago

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

Bernd Wurst authored 8 years ago

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

Bernd Wurst authored 8 years ago

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

Bernd Wurst authored 8 years ago

248)       # 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

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

Bernd Wurst authored 8 years ago

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

Bernd Wurst authored 8 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

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

Bernd Wurst authored 10 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

Bernd Wurst authored 11 years ago

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

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

bernd authored 15 years ago

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

bernd authored 16 years ago

290) 
291) }
bernd Aliases editieren

bernd authored 16 years ago

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

bernd authored 13 years ago

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

bernd authored 16 years ago

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

Bernd Wurst authored 9 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

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

Bernd Wurst authored 9 years ago

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

bernd authored 16 years ago

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

bernd authored 14 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

396)       header("Location: vhosts");