<?php
require_once('session/start.php');
require_once('inc/icons.php');
require_role(array(ROLE_SYSTEMUSER));
global $prefix;
require_once('mysql.php');
$dbs = get_mysql_databases($_SESSION['userinfo']['uid']);
$users = get_mysql_accounts($_SESSION['userinfo']['uid']);
$username = $_SESSION['userinfo']['username'];
$section = 'mysql_overview';
title('Beschreibung ändern');
if (isset($_GET['db'])) {
$thisdb = null;
foreach ($dbs as $db) {
if ($db['name'] == $_GET['db']) {
$thisdb = $db;
}
}
$form = '<p>Ändern Sie hier die Beschreibung der Datenbank <strong>'.$thisdb['name'].'</strong>.</p>';
$form .= '<p><input type="text" name="description" value="'.filter_input_general($thisdb['description']).'" /></p>
<p><input type="submit" value="Speichern" /></p>';
output(html_form('mysql_description', 'save', "action=description&db={$thisdb['name']}", $form));
}
if (isset($_GET['username'])) {
$thisuser = null;
foreach ($users as $user) {
if ($user['username'] == $_GET['username']) {
$thisuser = $user;
}
}
$form = '<p>Ändern Sie hier die Beschreibung des DB-Benutzers <strong>'.$thisuser['username'].'</strong>.</p>';