354c05a4ddd678c49bcbba458bffa7d13482139a
bernd Webapp-Installer für Drupal-7

bernd authored 13 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

5) Written 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

10) 
11) 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.
12) */
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

13) 
14) require_once('inc/base.php');
15) require_once('session/start.php');
16) 
17) require_role(ROLE_SYSTEMUSER);
18) 
19) title('Drupal 7 einrichten');
20) $section = 'webapps_install';
21) 
22) // Wurde beim Schreiben in die Session schon verifiziert
23) $docroot = $_SESSION['webapp_docroot'];
24) $url = $_SESSION['webapp_url'];
25) 
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 6 months ago

26) if (!$docroot) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

27)     system_failure('Kann die Session-Daten nicht auslesen. So geht das nicht.');
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

28) }
29) 
30) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

31) if (isset($_POST['submit'])) {
32)     require_once('install-drupal7.php');
33)     require_once('webapp-installer.php');
Hanno remove whitespace in empty...

Hanno authored 5 years ago

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

Hanno authored 5 years ago

35)     check_form_token('install_drupal7');
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

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

Hanno authored 5 years ago

37)     $data = validate_data($_POST);
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 6 months ago

38)     if (!$data) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

39)         system_failure('wtf?!');
40)     }
41)     create_new_webapp('drupal7', $docroot, $url, $data);
Hanno remove whitespace in empty...

Hanno authored 5 years ago

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

Hanno authored 5 years ago

43)     title("Drupal wird installiert");
44)     output('<p>Ihre Drupal-Website wird jetzt installiert. Sie erhalten eine E-Mail, sobald die Website betriebsbereit ist.</p>
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

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

Hanno authored 5 years ago

46) } else {
47)     require_once('modules/vhosts/include/vhosts.php');
48)     $vhosts = list_vhosts();
Hanno remove whitespace in empty...

Hanno authored 5 years ago

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

Hanno authored 5 years ago

50)     output('<p>Die Einrichtung von Drupal erfordert die Angabe ein paar weniger Daten.</p>');
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

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

Hanno authored 5 years ago

52)     $form = '
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

53) <h4>Basisdaten</h4>
54) <div style="margin-left: 2em;">
55)   <h5>Ort der neuen Website</h5>
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

56)   <p>Drupal wird im Verzeichnis <strong>' . $docroot . '</strong> installiert und wird später voraussichtlich unter <strong>' . $url . '</strong> abrufbar sein.</p>
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

57)   <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. Auch die dafür angelegte Datenbank können Sie jederzeit selbst verwalten oder löschen.</p>
58)   
59)   <h5>Name der Seite</h5>
60)   <p>Der Seitenname wird im Titel jeder Seite angezeigt und für diverse Texte verwendet.</p>
61)   <p><label for="sitename">Seiten-Name:</label> <input type="text" id="sitename" name="sitename" /></p>
62)   
63)   <h5>E-Mail-Adresse der Seite</h5>
64)   <p>Wenn die Website E-Mails versendet (z.B. für neue Benutzer, bei kommentaren auf einzelnen Seiten, ...) erscheint diese Adresse als Absender.
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

65)   <p><label for="siteemail">E-Mail-Adresse:</label> <input type="text" id="siteemail" name="siteemail" value="' . $_SESSION['userinfo']['username'] . '@' . config('masterdomain') . '" /></p>
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

66) </div>
67) 
68) <h4>Drupal-Administrator</h4>
69) <div style="margin-left: 2em;">
70)   <p>Der Administrator kann später auf der Website neue Benutzer anlegen, Seiten erzeugen und verändern und sonstige Verwaltungsaufgaben durchführen.</p>
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

71)   <p><label for="adminuser">Benutzername:</label> <input type="text" id="adminuser" name="adminuser" value="' . $_SESSION['userinfo']['username'] . '" /></p>
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

72)   <p><label for="adminpassword">Passwort:</label> <input type="password" id="adminpassword" name="adminpassword" /></p>
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

73)   <p><label for="adminemail">E-Mail-Adresse:</label> <input type="text" id="adminemail" name="adminemail" value="' . $_SESSION['userinfo']['username'] . '@' . config('masterdomain') . '" /></p>
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

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

Hanno authored 5 years ago

79)     output(html_form('install_drupal7', '', '', $form));