break; } $sql = "DROP DATABASE `{$dbname}`;"; $res = mysql_query($sql); if (!$res) { $error = mysql_error(); setmsg($error, 'error', 'self'); } setmsg(t('Database deleted!'), 'notice', "db.php?task=edit&name={$user}"); //redirect("?task=edit&name=$user"); break; case 'error': break; case 'flush': $sql = "FLUSH PRIVILEGES"; mysql_query($sql); setmsg(t('FLUSH PRIVILEGES'), 'notice'); // no break needed // no break needed case 'list': default: $task = 'list'; $users = ZDatabase::getDbUsers(); break; } if (!$norender) { include template('db'); } if (is_resource($db)) { mysql_close($db); }
function getDbUsers() { return ZDatabase::getDbUsers(); }