adminer 4.5.0, loginsqlite plugin
This commit is contained in:
parent
fdd6071dd3
commit
b92f7a0a63
3 changed files with 1148 additions and 1043 deletions
2153
adminer.php
2153
adminer.php
File diff suppressed because one or more lines are too long
|
|
@ -11,7 +11,7 @@ function adminer_object() {
|
|||
$plugins[] = new $plugin();
|
||||
}
|
||||
|
||||
return new AdminerPlugin($plugins);
|
||||
return new AdminerPlugin($plugins);
|
||||
}
|
||||
|
||||
include "./adminer.php";
|
||||
36
plugins/AdminerLoginSqlite.php
Normal file
36
plugins/AdminerLoginSqlite.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
/** Enable auto-login for SQLite
|
||||
* @link https://www.adminer.org/plugins/#use
|
||||
* @author Jakub Vrana, https://www.vrana.cz/
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerLoginSqlite {
|
||||
|
||||
function login($login, $password) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function loginForm() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
addEventListener('load', function () {
|
||||
var driver = document.getElementsByName('auth[driver]')[0];
|
||||
if (isTag(driver, 'select')) {
|
||||
driver.onchange = function () {
|
||||
var trs = parentTag(driver, 'table').rows;
|
||||
for (var i=1; i < trs.length - 1; i++) {
|
||||
var disabled = /sqlite/.test(driver.value);
|
||||
alterClass(trs[i], 'hidden', disabled);
|
||||
trs[i].getElementsByTagName('input')[0].disabled = disabled;
|
||||
}
|
||||
};
|
||||
}
|
||||
driver.onchange();
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue