cf54502a10b16c985ea28db17885d377226b6145
bernd Webapp-Installer, erste Ver...

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) 
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 Webapp-Installer, erste Ver...

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('MediaWiki einrichten');
bernd Webapp-Installer, erste Ver...

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) 
29) if (! $docroot)
30) {
31)   system_failure('Kann die Session-Daten nicht auslesen. So geht das nicht.');
32) }
33) 
34) 
35) if (isset($_POST['submit']))
36) {
37)   require_once('install-mediawiki.php');
38)   require_once('webapp-installer.php');
39)   
40)   check_form_token('install_mediawiki');
41) 
42)   $data = validate_data($_POST);
43)   if (! $data)
44)     system_failure('wtf?!');
45)   create_new_webapp('mediawiki', $docroot, $url, $data); 
46)   
bernd Benutze überall title() sta...

bernd authored 13 years ago

47)   title("MediaWiki wird installiert");
48)   output('<p>Ihr MediaWiki wird jetzt installiert. Sie erhalten eine E-Mail, sobald das Wiki betriebsbereit ist.</p>
bernd Webapp-Installer, erste Ver...

bernd authored 15 years ago

49) ');
bernd Sinnvolle Ausgabe wenn fertig

bernd authored 15 years ago

50)   
bernd Webapp-Installer, erste Ver...

bernd authored 15 years ago

51) }
bernd Sinnvolle Ausgabe wenn fertig

bernd authored 15 years ago

52) else
53) {
bernd Webapp-Installer, erste Ver...

bernd authored 15 years ago

54) 
bernd Sinnvolle Ausgabe wenn fertig

bernd authored 15 years ago

55)   require_once('modules/vhosts/include/vhosts.php');
56)   $vhosts = list_vhosts();
57)   
bernd Benutze überall title() sta...

bernd authored 13 years ago

58)   output('<p>Die Einrichtung von MediaWiki erfordert die Angabe ein paar weniger Daten.</p>');
bernd Webapp-Installer, erste Ver...

bernd authored 15 years ago

59) 
bernd Sinnvolle Ausgabe wenn fertig

bernd authored 15 years ago

60)   $form = '
bernd Webapp-Installer, erste Ver...

bernd authored 15 years ago

61) <h4>Basisdaten</h4>
62) <div style="margin-left: 2em;">
63)   <h5>Ort des neuen Wikis</h5>
64)   <p>Das Wiki wird im Verzeichnis <strong>'.$docroot.'</strong> installiert und wird später voraussichtlich unter <strong>'.$url.'</strong> abrufbar sein.</p>
65)   <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>
66)   
67)   <h5>Name des Wikis</h5>
68)   <p>Jedes MediaWiki benötigt einen griffigen Namen. Der Name kann entweder in »WikiSchreibweise« (zusammengezogene Wörter mit großgeschriebenen Anfangsbuchstaben) oder in normaler Schreibweise sein.</p>
69)   <p><label for="wikiname">Wiki-Name:</label> <input type="text" id="wikiname" name="wikiname" /></p>
70) </div>
71) 
72) <h4>Wiki-Administrator</h4>
73) <div style="margin-left: 2em;">
74)   <p>Der Wiki-Administrator kann später im Wiki neue Benutzer anlegen, Seiten sperren oder sonstige Verwaltungsaufgaben durchführen.</p>
75)   <p><label for="adminuser">Benutzername:</label> <input type="text" id="adminuser" name="adminuser" value="WikiSysop" /></p>
76)   <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

77)   <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, erste Ver...

bernd authored 15 years ago

78) </div>
79) 
80) <p><input type="submit" name="submit" value="Wiki installieren!" /></p>
81) ';
82) 
bernd Sinnvolle Ausgabe wenn fertig

bernd authored 15 years ago

83)   output(html_form('install_mediawiki', '', '', $form));
bernd Webapp-Installer, erste Ver...

bernd authored 15 years ago

84) 
bernd Sinnvolle Ausgabe wenn fertig

bernd authored 15 years ago

85) }