Skip to content

Commit

Permalink
Support for other drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed Jun 7, 2011
1 parent 3a14845 commit 56a1bdd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugins/login-servers.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/
class AdminerLoginServers {
var $servers;
var $servers, $driver;

/** Set supported servers
* @param array array($domain) or array($domain => $description) or array($category => array())
* @param string
*/
function AdminerLoginServers($servers) {
function AdminerLoginServers($servers, $driver = "server") {
$this->servers = $servers;
$this->driver = $driver;
}

function login($login, $password) {
Expand All @@ -34,7 +36,7 @@ function login($login, $password) {
function loginForm() {
?>
<table cellspacing="0">
<tr><th><?php echo lang('Server'); ?><td><input type="hidden" name="driver" value="server"><select name="server"><?php echo optionlist($this->servers, SERVER); ?></select>
<tr><th><?php echo lang('Server'); ?><td><input type="hidden" name="driver" value="<?php echo $this->driver; ?>"><select name="server"><?php echo optionlist($this->servers, SERVER); ?></select>
<tr><th><?php echo lang('Username'); ?><td><input id="username" name="username" value="<?php echo h($_GET["username"]); ?>">
<tr><th><?php echo lang('Password'); ?><td><input type="password" name="password">
</table>
Expand Down

0 comments on commit 56a1bdd

Please sign in to comment.