" . ('From') . ": \n"; - echo ('Subject') . ": \n"; + echo Adminer\script("qsl('div').onkeydown = partial(bodyKeydown, 'email');"); + echo "
" . ('From') . ": \n"; + echo ('Subject') . ": \n"; echo "
" . ('Attachments') . ": "; - echo script("qsl('input').onchange = function () { + echo Adminer\script("qsl('input').onchange = function () { this.onchange = function () { }; var el = this.cloneNode(true); el.value = ''; this.parentNode.appendChild(el); };"); - echo "
" . (count($emailFields) == 1 ? '' : html_select("email_field", $emailFields)); - echo "" . confirm(); + echo "
" . (count($emailFields) == 1 ? '' : Adminer\html_select("email_field", $emailFields)); + echo "" . Adminer\confirm(); echo "
| ' . h($key) . ' | '; + echo '' . Adminer\h($key) . ' | '; echo '';
if (is_scalar($val) || $val === null) {
if (is_bool($val)) {
@@ -27,7 +27,7 @@ class AdminerJsonColumn {
} elseif ($val === null) {
$val = 'null';
} elseif (!is_numeric($val)) {
- $val = '"' . h(addcslashes($val, "\r\n\"")) . '"';
+ $val = '"' . Adminer\h(addcslashes($val, "\r\n\"")) . '"';
}
echo '' . $val . '';
} else {
diff --git a/plugins/login-otp.php b/plugins/login-otp.php
index 7000df9e..b25ea1d9 100644
--- a/plugins/login-otp.php
+++ b/plugins/login-otp.php
@@ -24,7 +24,7 @@ class AdminerLoginOtp {
if ($name == 'password') {
return $heading . $value . "\n"
. " | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| OTP" - . " | \n" + . " | \n"
;
}
}
@@ -34,9 +34,9 @@ class AdminerLoginOtp {
$timeSlot = floor(time() / 30);
foreach (array(0, -1, 1) as $skew) {
if ($_SESSION["otp"] == $this->getOtp($timeSlot + $skew)) {
- restart_session();
+ Adminer\restart_session();
unset($_SESSION["otp"]);
- stop_session();
+ Adminer\stop_session();
return;
}
}
diff --git a/plugins/login-password-less.php b/plugins/login-password-less.php
index f501b3e9..ee67d9e1 100644
--- a/plugins/login-password-less.php
+++ b/plugins/login-password-less.php
@@ -18,7 +18,7 @@ class AdminerLoginPasswordLess {
}
function credentials() {
- $password = get_password();
+ $password = Adminer\get_password();
return array(SERVER, $_GET["username"], (password_verify($password, $this->password_hash) ? "" : $password));
}
diff --git a/plugins/login-servers.php b/plugins/login-servers.php
index d8ee2ca0..d2650a46 100644
--- a/plugins/login-servers.php
+++ b/plugins/login-servers.php
@@ -22,7 +22,7 @@ class AdminerLoginServers {
}
function credentials() {
- return array($this->servers[SERVER]["server"], $_GET["username"], get_password());
+ return array($this->servers[SERVER]["server"], $_GET["username"], Adminer\get_password());
}
function login($login, $password) {
@@ -35,7 +35,7 @@ class AdminerLoginServers {
if ($name == 'driver') {
return '';
} elseif ($name == 'server') {
- return $heading . "\n";
+ return $heading . "\n";
}
}
diff --git a/plugins/login-table.php b/plugins/login-table.php
index efc6e358..e46f7144 100644
--- a/plugins/login-table.php
+++ b/plugins/login-table.php
@@ -27,8 +27,8 @@ class AdminerLoginTable {
}
function login($login, $password) {
- $connection = connection();
- return (bool) $connection->result("SELECT COUNT(*) FROM " . idf_escape($this->database) . ".login WHERE login = " . q($login) . " AND password_sha1 = " . q(sha1($password)));
+ $connection = Adminer\connection();
+ return (bool) $connection->result("SELECT COUNT(*) FROM " . idf_escape($this->database) . ".login WHERE login = " . Adminer\q($login) . " AND password_sha1 = " . Adminer\q(sha1($password)));
}
}
diff --git a/plugins/master-slave.php b/plugins/master-slave.php
index e76bb047..90524da8 100644
--- a/plugins/master-slave.php
+++ b/plugins/master-slave.php
@@ -24,18 +24,18 @@ class AdminerMasterSlave {
function login($login, $password) {
if (!$_POST && ($master = &$_SESSION["master"])) {
- $connection = connection();
- $connection->query("DO MASTER_POS_WAIT('" . q($master['File']) . "', $master[Position])");
+ $connection = Adminer\connection();
+ $connection->query("DO MASTER_POS_WAIT('" . Adminer\q($master['File']) . "', $master[Position])");
$master = null;
}
}
function messageQuery($query, $time, $failed = false) {
//! doesn't work with sql.inc.php
- $connection = connection();
+ $connection = Adminer\connection();
$result = $connection->query('SHOW MASTER STATUS');
if ($result) {
- restart_session();
+ Adminer\restart_session();
$_SESSION["master"] = $result->fetch_assoc();
}
}
diff --git a/plugins/plugin.php b/plugins/plugin.php
index 03f6b5fd..8f71a030 100644
--- a/plugins/plugin.php
+++ b/plugins/plugin.php
@@ -6,7 +6,7 @@
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/
-class AdminerPlugin extends Adminer {
+class AdminerPlugin extends Adminer\Adminer {
/** @access protected */
var $plugins;
diff --git a/plugins/slugify.php b/plugins/slugify.php
index 094d4d1e..13ad7a8c 100644
--- a/plugins/slugify.php
+++ b/plugins/slugify.php
@@ -34,8 +34,8 @@ class AdminerSlugify {
}
$slug = $slugify[$field["field"]];
if ($slug !== null) {
- return ""
- . script("qsl('input').onchange = function () {
+ return ""
+ . Adminer\script("qsl('input').onchange = function () {
var find = '$this->from';
var repl = '$this->to';
this.form['fields[$slug]'].value = this.value.toLowerCase()
diff --git a/plugins/sql-log.php b/plugins/sql-log.php
index d4891d81..1babed22 100644
--- a/plugins/sql-log.php
+++ b/plugins/sql-log.php
@@ -27,7 +27,7 @@ class AdminerSqlLog {
function _log($query) {
if ($this->filename == "") {
- $adminer = adminer();
+ $adminer = Adminer\adminer();
$this->filename = $adminer->database() . ".sql"; // no database goes to ".sql" to avoid collisions
}
$fp = fopen($this->filename, "a");
diff --git a/plugins/struct-comments.php b/plugins/struct-comments.php
index 05380ca8..80c216df 100644
--- a/plugins/struct-comments.php
+++ b/plugins/struct-comments.php
@@ -9,6 +9,6 @@
class AdminerStructComments {
function fieldName(&$field, $order = 0) {
- return '' . h($field["field"]) . '';
+ return '' . Adminer\h($field["field"]) . '';
}
}
diff --git a/plugins/table-indexes-structure.php b/plugins/table-indexes-structure.php
index e0d2b714..e00e0404 100644
--- a/plugins/table-indexes-structure.php
+++ b/plugins/table-indexes-structure.php
@@ -14,13 +14,13 @@ class AdminerTableIndexesStructure {
*/
function tableIndexesPrint($indexes) {
echo "
|