Browse code

remove whitespace in empty lines

Hanno authored on26/06/2018 23:36:40
Showing1 changed files
... ...
@@ -54,7 +54,7 @@ if (count(additional_servers()) > 0) {
54 54
     $available_servers = additional_servers();
55 55
     $available_servers[] = my_server_id();
56 56
     $available_servers = array_unique($available_servers);
57
-  
57
+
58 58
     $selectable_servers = array();
59 59
     $all_servers = server_names();
60 60
     foreach ($all_servers as $id => $fqdn) {
... ...
@@ -72,7 +72,7 @@ if (count($users) > 0) {
72 72
         $form .= '<p><input type="checkbox" id="access_'.$user['username'].'" name="access[]" value="'.$user['username'].'" /> <label for="access_'.$user['username'].'">'.$user['username'].'</label></p>';
73 73
     }
74 74
 }
75
- 
75
+
76 76
 $form .= '<p><input type="submit" name="submit" value="Speichern"/><p>';
77 77
 
78 78
 
Browse code

Fix coding style with php-cs-checker, see https://cs.sensiolabs.org/

Hanno authored on26/06/2018 13:58:19
Showing1 changed files
... ...
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely
8 8
 
9 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 10
 
11
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
12 12
 http://creativecommons.org/publicdomain/zero/1.0/
13 13
 
14 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.
... ...
@@ -31,14 +31,14 @@ title('Neue MySQL-Datenbank');
31 31
 
32 32
 $dbnames = array();
33 33
 foreach ($dbs as $db) {
34
-  $dbnames[] = $db['name'];
34
+    $dbnames[] = $db['name'];
35 35
 }
36 36
 
37 37
 $suggestion = $username.'_1';
38 38
 $count = 2;
39 39
 while (in_array($suggestion, $dbnames)) {
40
-  $suggestion = $username.'_'.$count;
41
-  $count++;
40
+    $suggestion = $username.'_'.$count;
41
+    $count++;
42 42
 }
43 43
 
44 44
 $hint = 'Der Datenbankname muss mit <strong>'.$username.'_</strong> beginnen.';
... ...
@@ -49,32 +49,31 @@ $form = '<h4>Name der neuen Datenbank</h4>
49 49
 <p><label for="description">Optionale Beschreibung dieser Datenbank:</label> <input type="text" name="description" id="description" /></p>
50 50
 ';
51 51
 if (count(additional_servers()) > 0) {
52
-  $form .= '<h4>Server</h4>';
53
-  $form .= '<p>Auf welchem Server soll diese Datenbank eingerichtet werden?</p>';
54
-  $available_servers = additional_servers();
55
-  $available_servers[] = my_server_id();
56
-  $available_servers = array_unique($available_servers);
52
+    $form .= '<h4>Server</h4>';
53
+    $form .= '<p>Auf welchem Server soll diese Datenbank eingerichtet werden?</p>';
54
+    $available_servers = additional_servers();
55
+    $available_servers[] = my_server_id();
56
+    $available_servers = array_unique($available_servers);
57 57
   
58
-  $selectable_servers = array();
59
-  $all_servers = server_names();
60
-  foreach ($all_servers as $id => $fqdn) {
61
-    if (in_array($id, $available_servers)) {
62
-      $selectable_servers[$id] = $fqdn;
58
+    $selectable_servers = array();
59
+    $all_servers = server_names();
60
+    foreach ($all_servers as $id => $fqdn) {
61
+        if (in_array($id, $available_servers)) {
62
+            $selectable_servers[$id] = $fqdn;
63
+        }
63 64
     }
64
-  }
65
-  $form .= html_select('server', $selectable_servers, my_server_id());
66
-  $form .= '<p>Alle Benutzer die auf diese Datenbank zugreifen dürfen, werden automatisch auf dem passenden Server eingerichtet</p>';
65
+    $form .= html_select('server', $selectable_servers, my_server_id());
66
+    $form .= '<p>Alle Benutzer die auf diese Datenbank zugreifen dürfen, werden automatisch auf dem passenden Server eingerichtet</p>';
67 67
 }
68 68
 if (count($users) > 0) {
69
-  $form .= '<h4>Berechtigungen</h4>';
70
-  $form .= '<p>Welche der bisher vorhandenen Datenbank-Benutzer dürfen auf diese Datenbank zugreifen?</p>';
71
-  foreach ($users as $user) {
72
-    $form .= '<p><input type="checkbox" id="access_'.$user['username'].'" name="access[]" value="'.$user['username'].'" /> <label for="access_'.$user['username'].'">'.$user['username'].'</label></p>';
73
-  }
69
+    $form .= '<h4>Berechtigungen</h4>';
70
+    $form .= '<p>Welche der bisher vorhandenen Datenbank-Benutzer dürfen auf diese Datenbank zugreifen?</p>';
71
+    foreach ($users as $user) {
72
+        $form .= '<p><input type="checkbox" id="access_'.$user['username'].'" name="access[]" value="'.$user['username'].'" /> <label for="access_'.$user['username'].'">'.$user['username'].'</label></p>';
73
+    }
74 74
 }
75 75
  
76 76
 $form .= '<p><input type="submit" name="submit" value="Speichern"/><p>';
77 77
 
78 78
 
79 79
 output(html_form('mysql_newdb', 'save', 'action=newdb', $form));
80
-
Browse code

Copyright year update

Bernd Wurst authored on13/01/2018 06:07:05
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2014 by schokokeks.org Hosting, namely
5
+Written 2008-2018 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Zeige deutlich an, welche MySQL-Namen erlaubt sind. Und zeige eine unübersehbare Fehlermeldung an wenn etwas nicht stimmt.

Bernd Wurst authored on12/03/2014 05:09:01
Showing1 changed files
... ...
@@ -41,9 +41,11 @@ while (in_array($suggestion, $dbnames)) {
41 41
   $count++;
42 42
 }
43 43
 
44
+$hint = 'Der Datenbankname muss mit <strong>'.$username.'_</strong> beginnen.';
45
+
44 46
 $form = '<h4>Name der neuen Datenbank</h4>
45 47
 <input type="text" name="newdb" value="'.$suggestion.'" />
46
-<p>Bitte nur Kleinbuchstaben, Zahlen und Unterstrich verwenden. Der Datenbankname muss mit dem Benutzernamen beginnen.</p>
48
+<p>Bitte nur Kleinbuchstaben, Zahlen und Unterstrich verwenden. '.$hint.'</p>
47 49
 <p><label for="description">Optionale Beschreibung dieser Datenbank:</label> <input type="text" name="description" id="description" /></p>
48 50
 ';
49 51
 if (count(additional_servers()) > 0) {
Browse code

Lizenzinfos in eigenes Modul ausgelagert und Copyright auf 2014 angepasst

Bernd Wurst authored on08/02/2014 05:45:07
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2013 by schokokeks.org Hosting, namely
5
+Written 2008-2014 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Neue MySQL-Verwaltung

Bernd Wurst authored on28/02/2013 15:51:12
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,78 @@
1
+<?php
2
+/*
3
+This file belongs to the Webinterface of schokokeks.org Hosting
4
+
5
+Written 2008-2013 by schokokeks.org Hosting, namely
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
+*/
16
+
17
+require_once('session/start.php');
18
+require_once('inc/icons.php');
19
+require_role(array(ROLE_SYSTEMUSER));
20
+
21
+global $prefix;
22
+
23
+require_once('mysql.php');
24
+
25
+$dbs = get_mysql_databases($_SESSION['userinfo']['uid']);
26
+$users = get_mysql_accounts($_SESSION['userinfo']['uid']);
27
+$username = $_SESSION['userinfo']['username'];
28
+
29
+$section = 'mysql_overview';
30
+title('Neue MySQL-Datenbank');
31
+
32
+$dbnames = array();
33
+foreach ($dbs as $db) {
34
+  $dbnames[] = $db['name'];
35
+}
36
+
37
+$suggestion = $username.'_1';
38
+$count = 2;
39
+while (in_array($suggestion, $dbnames)) {
40
+  $suggestion = $username.'_'.$count;
41
+  $count++;
42
+}
43
+
44
+$form = '<h4>Name der neuen Datenbank</h4>
45
+<input type="text" name="newdb" value="'.$suggestion.'" />
46
+<p>Bitte nur Kleinbuchstaben, Zahlen und Unterstrich verwenden. Der Datenbankname muss mit dem Benutzernamen beginnen.</p>
47
+<p><label for="description">Optionale Beschreibung dieser Datenbank:</label> <input type="text" name="description" id="description" /></p>
48
+';
49
+if (count(additional_servers()) > 0) {
50
+  $form .= '<h4>Server</h4>';
51
+  $form .= '<p>Auf welchem Server soll diese Datenbank eingerichtet werden?</p>';
52
+  $available_servers = additional_servers();
53
+  $available_servers[] = my_server_id();
54
+  $available_servers = array_unique($available_servers);
55
+  
56
+  $selectable_servers = array();
57
+  $all_servers = server_names();
58
+  foreach ($all_servers as $id => $fqdn) {
59
+    if (in_array($id, $available_servers)) {
60
+      $selectable_servers[$id] = $fqdn;
61
+    }
62
+  }
63
+  $form .= html_select('server', $selectable_servers, my_server_id());
64
+  $form .= '<p>Alle Benutzer die auf diese Datenbank zugreifen dürfen, werden automatisch auf dem passenden Server eingerichtet</p>';
65
+}
66
+if (count($users) > 0) {
67
+  $form .= '<h4>Berechtigungen</h4>';
68
+  $form .= '<p>Welche der bisher vorhandenen Datenbank-Benutzer dürfen auf diese Datenbank zugreifen?</p>';
69
+  foreach ($users as $user) {
70
+    $form .= '<p><input type="checkbox" id="access_'.$user['username'].'" name="access[]" value="'.$user['username'].'" /> <label for="access_'.$user['username'].'">'.$user['username'].'</label></p>';
71
+  }
72
+}
73
+ 
74
+$form .= '<p><input type="submit" name="submit" value="Speichern"/><p>';
75
+
76
+
77
+output(html_form('mysql_newdb', 'save', 'action=newdb', $form));
78
+