File: sqlite.php

package info (click to toggle)
adminer 5.4.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,828 kB
  • sloc: php: 28,768; javascript: 1,188; xml: 107; makefile: 48; sh: 3
file content (22 lines) | stat: -rw-r--r-- 693 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
// see ../plugins/editor-setup.php for an easier solution

function adminer_object() {
	include_once "../plugins/login-password-less.php";

	class AdminerCustomization extends Adminer\Plugins {
		function loginFormField($name, $heading, $value) {
			return parent::loginFormField($name, $heading, str_replace("value='server'", "value='sqlite'", $value));
		}
		function database() {
			return "PATH_TO_YOUR_SQLITE_HERE";
		}
	}

	return new AdminerCustomization(array(
		// TODO: inline the result of password_hash() so that the password is not visible in source codes
		new AdminerLoginPasswordLess(password_hash("YOUR_PASSWORD_HERE", PASSWORD_DEFAULT)),
	));
}

include "./index.php";