Neue MySQL-Verwaltung
Bernd Wurst authored 12 years ago
|
1) <?php
2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4)
|
Lizenzinfos in eigenes Modu...
Bernd Wurst authored 11 years ago
|
5) Written 2008-2014 by schokokeks.org Hosting, namely
|
Neue MySQL-Verwaltung
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) */
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)
|
Zeige deutlich an, welche M...
Bernd Wurst authored 11 years ago
|
44) $hint = 'Der Datenbankname muss mit <strong>'.$username.'_</strong> beginnen.';
45)
|
Neue MySQL-Verwaltung
Bernd Wurst authored 12 years ago
|
46) $form = '<h4>Name der neuen Datenbank</h4>
47) <input type="text" name="newdb" value="'.$suggestion.'" />
|
Zeige deutlich an, welche M...
Bernd Wurst authored 11 years ago
|
48) <p>Bitte nur Kleinbuchstaben, Zahlen und Unterstrich verwenden. '.$hint.'</p>
|