mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 10:04:07 +02:00
Comments
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@729 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -3,6 +3,7 @@ page_header(lang('Privileges'));
|
||||
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 } ?>
|
||||
@@ -12,12 +13,13 @@ if (!$result) {
|
||||
<input type="submit" value="<?php echo lang('Edit'); ?>" />
|
||||
</p></form>
|
||||
<?php
|
||||
// list logged user
|
||||
$result = $dbh->query("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', 1) AS User, SUBSTRING_INDEX(CURRENT_USER, '@', -1) AS Host");
|
||||
}
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<thead><tr><th> </th><th>" . lang('Username') . "</th><th>" . lang('Server') . "</th></tr></thead>\n";
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
echo '<tr' . odd() . '><td><a href="' . htmlspecialchars($SELF) . 'user=' . urlencode($row["User"]) . '&host=' . urlencode($row["Host"]) . '">' . lang('edit') . '</a></td><td>' . htmlspecialchars($row["User"]) . "</td><td>" . htmlspecialchars($row["Host"]) . "</td></tr>\n";
|
||||
echo '<tr' . odd() . '><td><a href="' . htmlspecialchars($SELF . 'user=' . urlencode($row["User"]) . '&host=' . urlencode($row["Host"])) . '">' . lang('edit') . '</a></td><td>' . htmlspecialchars($row["User"]) . "</td><td>" . htmlspecialchars($row["Host"]) . "</td></tr>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
$result->free();
|
||||
|
Reference in New Issue
Block a user