bernd commited on 2012-01-03 08:03:23
Zeige 3 geänderte Dateien mit 88 Einfügungen und 2 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2107 87cf0b9e-d624-0410-a070-f6ee81989793
| ... | ... |
@@ -0,0 +1,24 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+require_once('inc/debug.php');
|
|
| 4 |
+ |
|
| 5 |
+require_once('webapp-installer.php');
|
|
| 6 |
+ |
|
| 7 |
+ |
|
| 8 |
+function validate_data($post) |
|
| 9 |
+{
|
|
| 10 |
+ DEBUG('Validating Data:');
|
|
| 11 |
+ DEBUG($post); |
|
| 12 |
+ $fields = array('adminpass');
|
|
| 13 |
+ foreach ($fields AS $field) |
|
| 14 |
+ if ((! isset($post[$field])) || $post[$field] == '') |
|
| 15 |
+ system_failure('Nicht alle Werte angegeben ('.$field.')');
|
|
| 16 |
+ |
|
| 17 |
+ $adminpass = sha1($post['adminpass']); |
|
| 18 |
+ |
|
| 19 |
+ $data = "adminpass={$adminpass}";
|
|
| 20 |
+ DEBUG($data); |
|
| 21 |
+ return $data; |
|
| 22 |
+} |
|
| 23 |
+ |
|
| 24 |
+ |
| ... | ... |
@@ -18,10 +18,10 @@ $form = '<h4>Anwendung auswählen</h4> |
| 18 | 18 |
<div style="margin-left: 2em;"> |
| 19 | 19 |
<p><input checked="checked" type="radio" name="application" id="application_mediawiki" value="mediawiki" /> <label for="application_mediawiki">MediaWiki</label></p> |
| 20 | 20 |
<p style="margin-left: 2em;">MediaWiki ist eine Wiki-Software, mit der Seiteninhalte von Besuchern geändert werden können. MediaWiki ist u.A. die Grundlage der Online-Enzyklopädie »Wikipedia«.</p> |
| 21 |
- <p><input type="radio" name="application" id="application_drupal6" value="drupal6" /> <label for="application_drupal6">Drupal (Version 6.x)</label></p> |
|
| 22 |
- <p style="margin-left: 2em;">Drupal ist ein verbreitetes Content-Management-System. Als solches bietet es die Möglichkeit, Seiten-Inhalte im Web-Browser zu ändern, einzelne Seiten nur angemeldeten Benutzern freizugeben oder z.B. das kommentieren einzelner Seiten.</p> |
|
| 23 | 21 |
<p><input type="radio" name="application" id="application_drupal7" value="drupal7" /> <label for="application_drupal7">Drupal (Version 7.x)</label></p> |
| 24 | 22 |
<p style="margin-left: 2em;">Drupal ist ein verbreitetes Content-Management-System. Als solches bietet es die Möglichkeit, Seiten-Inhalte im Web-Browser zu ändern, einzelne Seiten nur angemeldeten Benutzern freizugeben oder z.B. das kommentieren einzelner Seiten.</p> |
| 23 |
+ <p><input type="radio" name="application" id="application_owncloud" value="owncloud" /> <label for="application_owncloud">OwnCloud</label></p> |
|
| 24 |
+ <p style="margin-left: 2em;">Mit OwnCloud können Sie Ihre Dateien, Adressbücher oder Kalenderdaten zentral ablegen und von überall nutzen.</p> |
|
| 25 | 25 |
</div> |
| 26 | 26 |
'; |
| 27 | 27 |
|
| ... | ... |
@@ -0,0 +1,62 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+require_once('inc/base.php');
|
|
| 4 |
+require_once('session/start.php');
|
|
| 5 |
+ |
|
| 6 |
+require_role(ROLE_SYSTEMUSER); |
|
| 7 |
+ |
|
| 8 |
+title('OwnCloud einrichten');
|
|
| 9 |
+$section = 'webapps_install'; |
|
| 10 |
+ |
|
| 11 |
+// Wurde beim Schreiben in die Session schon verifiziert |
|
| 12 |
+$docroot = $_SESSION['webapp_docroot']; |
|
| 13 |
+$url = $_SESSION['webapp_url']; |
|
| 14 |
+ |
|
| 15 |
+if (! $docroot) |
|
| 16 |
+{
|
|
| 17 |
+ system_failure('Kann die Session-Daten nicht auslesen. So geht das nicht.');
|
|
| 18 |
+} |
|
| 19 |
+ |
|
| 20 |
+ |
|
| 21 |
+if (isset($_POST['submit'])) |
|
| 22 |
+{
|
|
| 23 |
+ require_once('install-owncloud.php');
|
|
| 24 |
+ require_once('webapp-installer.php');
|
|
| 25 |
+ |
|
| 26 |
+ check_form_token('install_owncloud');
|
|
| 27 |
+ |
|
| 28 |
+ $data = validate_data($_POST); |
|
| 29 |
+ if (! $data) |
|
| 30 |
+ system_failure('wtf?!');
|
|
| 31 |
+ create_new_webapp('owncloud', $docroot, $url, $data);
|
|
| 32 |
+ |
|
| 33 |
+ title("OwnCloud wird installiert");
|
|
| 34 |
+ output('<p>Ihre OwnCloud wird in Kürze installiert. Sie erhalten eine E-Mail, sobald die Anwendung betriebsbereit ist.</p>
|
|
| 35 |
+'); |
|
| 36 |
+ |
|
| 37 |
+} |
|
| 38 |
+else |
|
| 39 |
+{
|
|
| 40 |
+ |
|
| 41 |
+ require_once('modules/vhosts/include/vhosts.php');
|
|
| 42 |
+ $vhosts = list_vhosts(); |
|
| 43 |
+ |
|
| 44 |
+ $form = ' |
|
| 45 |
+<h4>Basisdaten</h4> |
|
| 46 |
+<div style="margin-left: 2em;"> |
|
| 47 |
+ <h5>Speicherort</h5> |
|
| 48 |
+ <p>Die Cloud wird im Verzeichnis <strong>'.$docroot.'</strong> installiert und wird später voraussichtlich unter <strong>'.$url.'</strong> abrufbar sein.</p> |
|
| 49 |
+ <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> |
|
| 50 |
+ |
|
| 51 |
+ <h5>Administrator</h5> |
|
| 52 |
+ <p>Ihre OwnCloud wird mit lediglich einem Administrator-benutzer installiert. Der Benutzername ist <strong>admin</strong>.</p> |
|
| 53 |
+ <p><label for="adminpass">Administrator-Passwort:</label> <input type="password" id="adminpass" name="adminpass" /></p> |
|
| 54 |
+</div> |
|
| 55 |
+ |
|
| 56 |
+<p><input type="submit" name="submit" value="OwnCloud installieren!" /></p> |
|
| 57 |
+'; |
|
| 58 |
+ |
|
| 59 |
+ output(html_form('install_owncloud', '', '', $form));
|
|
| 60 |
+ |
|
| 61 |
+} |
|
| 62 |
+ |
|
| 0 | 63 |