mirror of
https://github.com/vrana/adminer.git
synced 2025-08-15 02:54:28 +02:00
Use namespaces in plugins
This commit is contained in:
@@ -27,20 +27,20 @@ class AdminerEmailTable {
|
||||
|
||||
function selectEmailPrint($emailFields, $columns) {
|
||||
if ($emailFields) {
|
||||
print_fieldset("email", ('E-mail'));
|
||||
Adminer\print_fieldset("email", ('E-mail'));
|
||||
echo "<div>\n";
|
||||
echo script("qsl('div').onkeydown = partial(bodyKeydown, 'email');");
|
||||
echo "<p>" . ('From') . ": <input name='email_from' value='" . h($_POST ? $_POST["email_from"] : $_COOKIE["adminer_email"]) . "'>\n";
|
||||
echo ('Subject') . ": <select name='email_id'><option>" . optionlist(get_key_vals("SELECT $this->id, $this->title FROM $this->table ORDER BY $this->title"), $_POST["email_id"], true) . "</select>\n";
|
||||
echo Adminer\script("qsl('div').onkeydown = partial(bodyKeydown, 'email');");
|
||||
echo "<p>" . ('From') . ": <input name='email_from' value='" . Adminer\h($_POST ? $_POST["email_from"] : $_COOKIE["adminer_email"]) . "'>\n";
|
||||
echo ('Subject') . ": <select name='email_id'><option>" . Adminer\optionlist(Adminer\get_key_vals("SELECT $this->id, $this->title FROM $this->table ORDER BY $this->title"), $_POST["email_id"], true) . "</select>\n";
|
||||
echo "<p>" . ('Attachments') . ": <input type='file' name='email_files[]'>";
|
||||
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 "<p>" . (count($emailFields) == 1 ? '<input type="hidden" name="email_field" value="' . h(key($emailFields)) . '">' : html_select("email_field", $emailFields));
|
||||
echo "<input type='submit' name='email' value='" . ('Send') . "'>" . confirm();
|
||||
echo "<p>" . (count($emailFields) == 1 ? '<input type="hidden" name="email_field" value="' . Adminer\h(key($emailFields)) . '">' : Adminer\html_select("email_field", $emailFields));
|
||||
echo "<input type='submit' name='email' value='" . ('Send') . "'>" . Adminer\confirm();
|
||||
echo "</div>\n";
|
||||
echo "</div></fieldset>\n";
|
||||
return true;
|
||||
@@ -48,9 +48,9 @@ class AdminerEmailTable {
|
||||
}
|
||||
|
||||
function selectEmailProcess($where, $foreignKeys) {
|
||||
$connection = connection();
|
||||
$connection = Adminer\connection();
|
||||
if ($_POST["email_id"]) {
|
||||
$result = $connection->query("SELECT $this->subject, $this->message FROM $this->table WHERE $this->id = " . q($_POST["email_id"]));
|
||||
$result = $connection->query("SELECT $this->subject, $this->message FROM $this->table WHERE $this->id = " . Adminer\q($_POST["email_id"]));
|
||||
$row = $result->fetch_row();
|
||||
$_POST["email_subject"] = $row[0];
|
||||
$_POST["email_message"] = $row[1];
|
||||
|
Reference in New Issue
Block a user