2626dd47daad110c63a82c0560b134e2364eeac3
Bernd Wurst Neue MySQL-Verwaltung

Bernd Wurst authored 11 years ago

1) <?php
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 Neue MySQL-Verwaltung

Bernd Wurst authored 11 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) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Neue MySQL-Verwaltung

Bernd Wurst authored 11 years ago

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('Beschreibung ändern');
31) 
32) if (isset($_GET['db'])) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

33)     $thisdb = null;
34)     foreach ($dbs as $db) {
35)         if ($db['name'] == $_GET['db']) {
36)             $thisdb = $db;
37)         }
Bernd Wurst Neue MySQL-Verwaltung

Bernd Wurst authored 11 years ago

38)     }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

39)     $form = '<p>Ändern Sie hier die Beschreibung der Datenbank <strong>'.$thisdb['name'].'</strong>.</p>';
40)     $form .= '<p><input type="text" name="description" value="'.$thisdb['description'].'" /></p>
Bernd Wurst Neue MySQL-Verwaltung

Bernd Wurst authored 11 years ago

41) <p><input type="submit" value="Speichern" /></p>';
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

42)     output(html_form('mysql_description', 'save', "action=description&db={$thisdb['name']}", $form));
Bernd Wurst Neue MySQL-Verwaltung

Bernd Wurst authored 11 years ago

43) }
44) if (isset($_GET['username'])) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

45)     $thisuser = null;
46)     foreach ($users as $user) {
47)         if ($user['username'] == $_GET['username']) {
48)             $thisuser = $user;
49)         }
Bernd Wurst Neue MySQL-Verwaltung

Bernd Wurst authored 11 years ago

50)     }
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

51)     $form = '<p>Ändern Sie hier die Beschreibung der Datenbank <strong>'.$thisuser['username'].'</strong>.</p>';
52)     $form .= '<p><input type="text" name="description" value="'.$thisuser['description'].'" /></p>
Bernd Wurst Neue MySQL-Verwaltung

Bernd Wurst authored 11 years ago

53) <p><input type="submit" value="Speichern" /></p>';
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

54)     output(html_form('mysql_description', 'save', "action=description&username={$thisuser['username']}", $form));