mirror of
https://github.com/vrana/adminer.git
synced 2025-08-17 20:01:25 +02:00
Add login-otp plugin
This commit is contained in:
@@ -118,19 +118,25 @@ class Adminer {
|
||||
*/
|
||||
function loginForm() {
|
||||
global $drivers;
|
||||
?>
|
||||
<table cellspacing="0">
|
||||
<tr><th><?php echo lang('System'); ?><td><?php echo html_select("auth[driver]", $drivers, DRIVER) . "\n"; ?>
|
||||
<tr><th><?php echo lang('Server'); ?><td><input name="auth[server]" value="<?php echo h(SERVER); ?>" title="hostname[:port]" placeholder="localhost" autocapitalize="off">
|
||||
<tr><th><?php echo lang('Username'); ?><td><input name="auth[username]" id="username" value="<?php echo h($_GET["username"]); ?>" autocapitalize="off">
|
||||
<tr><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]">
|
||||
<tr><th><?php echo lang('Database'); ?><td><input name="auth[db]" value="<?php echo h($_GET["db"]); ?>" autocapitalize="off">
|
||||
</table>
|
||||
<?php
|
||||
echo script("focus(qs('#username'));");
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo $this->loginFormField('driver', '<tr><th>' . lang('System') . '<td>' . html_select("auth[driver]", $drivers, DRIVER) . "\n");
|
||||
echo $this->loginFormField('server', '<tr><th>' . lang('Server') . '<td><input name="auth[server]" value="' . h(SERVER) . '" title="hostname[:port]" placeholder="localhost" autocapitalize="off">' . "\n");
|
||||
echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td><input name="auth[username]" id="username" value="' . h($_GET["username"]) . '" autocapitalize="off">' . script("focus(qs('#username'));"));
|
||||
echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td><input type="password" name="auth[password]">' . "\n");
|
||||
echo $this->loginFormField('db', '<tr><th>' . lang('Database') . '<td><input name="auth[db]" value="' . h($_GET["db"]) . '" autocapitalize="off">' . "\n");
|
||||
echo "</table>\n";
|
||||
echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
|
||||
echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
|
||||
}
|
||||
|
||||
/** Get login form field
|
||||
* @param string
|
||||
* @param string HTML
|
||||
* @return string
|
||||
*/
|
||||
function loginFormField($name, $default) {
|
||||
return $default;
|
||||
}
|
||||
|
||||
/** Authorize the user
|
||||
* @param string
|
||||
|
Reference in New Issue
Block a user