2626dd47daad110c63a82c0560b134e2364eeac3
bernd biete auch Drupal 6 an

bernd authored 15 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 biete auch Drupal 6 an

bernd authored 15 years ago

16) 
17) require_once('inc/base.php');
18) require_once('session/start.php');
19) 
20) require_role(ROLE_SYSTEMUSER);
21) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

22) title('Drupal 6 einrichten');
bernd biete auch Drupal 6 an

bernd authored 15 years ago

23) $section = 'webapps_install';
24) 
25) // Wurde beim Schreiben in die Session schon verifiziert
26) $docroot = $_SESSION['webapp_docroot'];
27) $url = $_SESSION['webapp_url'];
28) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

29) if (! $docroot) {
30)     system_failure('Kann die Session-Daten nicht auslesen. So geht das nicht.');
bernd biete auch Drupal 6 an

bernd authored 15 years ago

31) }
32) 
33) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

34) if (isset($_POST['submit'])) {
35)     require_once('install-drupal6.php');
36)     require_once('webapp-installer.php');
bernd biete auch Drupal 6 an

bernd authored 15 years ago

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

Hanno authored 5 years ago

38)     check_form_token('install_drupal6');
bernd biete auch Drupal 6 an

bernd authored 15 years ago

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

Hanno authored 5 years ago

40)     $data = validate_data($_POST);
41)     if (! $data) {
42)         system_failure('wtf?!');
43)     }
44)     create_new_webapp('drupal6', $docroot, $url, $data);
bernd biete auch Drupal 6 an

bernd authored 15 years ago

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

Hanno authored 5 years ago

46)     title("Drupal wird installiert");
47)     output('<p>Ihr Drupal wird jetzt installiert. Sie erhalten eine E-Mail, sobald die Website betriebsbereit ist.</p>
bernd biete auch Drupal 6 an

bernd authored 15 years ago

48) ');
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

49) } else {
50)     require_once('modules/vhosts/include/vhosts.php');
51)     $vhosts = list_vhosts();
bernd biete auch Drupal 6 an

bernd authored 15 years ago

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

Hanno authored 5 years ago

53)     output('<p>Die Einrichtung von Drupal erfordert die Angabe ein paar weniger Daten.</p>');
bernd biete auch Drupal 6 an

bernd authored 15 years ago

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

Hanno authored 5 years ago

55)     $form = '
bernd biete auch Drupal 6 an

bernd authored 15 years ago

56) <h4>Basisdaten</h4>
57) <div style="margin-left: 2em;">
58)   <h5>Ort der neuen Website</h5>
59)   <p>Drupal wird im Verzeichnis <strong>'.$docroot.'</strong> installiert und wird später voraussichtlich unter <strong>'.$url.'</strong> abrufbar sein.</p>
60)   <p>Beachten Sie bitte: Die Installation wird in Ihrem Home-Verzeichnis durchgeführt und es wird ein normaler Host im Webinterface dafür angelegt. Sie können diese Einstellungen also jederzeit verändern.</p>
61)   
62)   <h5>Name der Seite</h5>
63)   <p>Der Seitenname wird im Titel jeder Seite angezeigt und für diverse Texte verwendet.</p>
64)   <p><label for="sitename">Seiten-Name:</label> <input type="text" id="sitename" name="sitename" /></p>
65)   
66)   <h5>E-Mail-Adresse der Seite</h5>
67)   <p>Wenn die Website E-Mails versendet (z.B. für neue Benutzer, bei kommentaren auf einzelnen Seiten, ...) erscheint diese Adresse als Absender.
bernd Mehr config-optionen und co...

bernd authored 14 years ago

68)   <p><label for="siteemail">E-Mail-Adresse:</label> <input type="text" id="siteemail" name="siteemail" value="'.$_SESSION['userinfo']['username'].'@'.config('masterdomain').'" /></p>
bernd biete auch Drupal 6 an

bernd authored 15 years ago

69) </div>
70) 
71) <h4>Drupal-Administrator</h4>
72) <div style="margin-left: 2em;">
73)   <p>Der Administrator kann später auf der Website neue Benutzer anlegen, Seiten erzeugen und verändern und sonstige Verwaltungsaufgaben durchführen.</p>
74)   <p><label for="adminuser">Benutzername:</label> <input type="text" id="adminuser" name="adminuser" value="'.$_SESSION['userinfo']['username'].'" /></p>
75)   <p><label for="adminpassword">Passwort:</label> <input type="password" id="adminpassword" name="adminpassword" /></p>
bernd Mehr config-optionen und co...

bernd authored 14 years ago

76)   <p><label for="adminemail">E-Mail-Adresse:</label> <input type="text" id="adminemail" name="adminemail" value="'.$_SESSION['userinfo']['username'].'@'.config('masterdomain').'" /></p>
bernd biete auch Drupal 6 an

bernd authored 15 years ago

77) </div>
78) 
79) <p><input type="submit" name="submit" value="Drupal installieren!" /></p>
80) ';
81) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

82)     output(html_form('install_drupal6', '', '', $form));