Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 55 lines (47 sloc) 1.269 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
<?php
class AdminerBase {

function name() {
return lang('Editor');
}

function server() {
return "";
}

function username() {
return "";
}

function password() {
return "";
}

function table_name($row) {
return htmlspecialchars(strlen($row["Comment"]) ? $row["Comment"] : $row["Name"]);
}

function field_name($fields, $key) {
return htmlspecialchars(strlen($fields[$key]["comment"]) ? $fields[$key]["comment"] : $key);
}

function navigation($missing) {
global $SELF;
if ($missing != "auth") {
?>
<form action="" method="post">
<p>
<input type="hidden" name="token" value="<?php echo $_SESSION["tokens"][$_GET["server"]]; ?>" />
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" />
</p>
</form>
<?php
if ($missing != "db" && strlen($_GET["db"])) {
$table_status = table_status();
if (!$table_status) {
echo "<p class='message'>" . lang('No tables.') . "</p>\n";
} else {
echo "<p>\n";
foreach ($table_status as $row) {
echo '<a href="' . htmlspecialchars($SELF) . 'select=' . urlencode($row["Name"]) . '">' . $this->table_name($row) . "</a><br />\n";
}
echo "</p>\n";
}
}
}
}
}

$adminer = (class_exists("Adminer") ? new Adminer : new AdminerBase);
Something went wrong with that request. Please try again.