echo '<p><a href="' . htmlspecialchars($SELF) . 'user=">' . lang('Create user') . "</a></p>";
$result = $dbh->query("SELECT User, Host FROM mysql.user ORDER BY Host, User");
if (!$result) {
- //! utilize information_schema.USER_PRIVILEGES in MySQL 5
?>
<form action=""><p>
<?php if (strlen($_GET["server"])) { ?><input type="hidden" name="server" value="<?php echo htmlspecialchars($_GET["server"]); ?>" /><?php } ?>
<input type="submit" value="<?php echo lang('Edit'); ?>" />
</p></form>
<?php
- // list logged user
+ // list logged user, information_schema.USER_PRIVILEGES lists just the current user too
$result = $dbh->query("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', 1) AS User, SUBSTRING_INDEX(CURRENT_USER, '@', -1) AS Host");
}
echo "<table cellspacing='0'>\n";
$row = $_POST;
$grants = $new_grants;
} else {
- $row = $_GET + array("host" => "localhost"); // create user on localhost by default
+ $row = $_GET + array("host" => $dbh->result($dbh->query("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', -1)"))); // create user on the same domain by default
$row["pass"] = $old_pass;
if (strlen($old_pass)) {
$row["hashed"] = true;
Edit default values directly in table creation
Single column foreign key definition in table creation
Offer enum items in search
+Use event $intervals + microseconds in relative date functions
Ability to select external style - list downloaded by JavaScript
? Column and table names auto-completition in SQL textarea
? Save token also to cookie - for session expiration and login in other window