preferSelect = $preferSelect;
$this->reorderLinks = $reorderLinks;
}
/**
* Prints HTML code inside
.
*/
public function head()
{
?>
\n";
} else {
echo "\n";
}
foreach ($tables as $table => $status) {
$name = Adminer::tableName($status);
$active = in_array($table, array($_GET["select"], $_GET["edit"], $_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"]));
if ($this->preferSelect) {
$action = "select";
$title = "Select data";
} else {
$action = "table";
$title = "Show structure";
}
echo "- ";
if ($this->preferSelect || support("table") || support("indexes")) {
echo '$name";
} else {
echo "$name";
}
echo "
\n";
}
echo "
\n";
return true;
}
/*
* Prints links after select heading.
*
* @param array $tableStatus Result of SHOW TABLE STATUS.
* @param string $set New item options, NULL for no new item.
*
* @return bool|null
*/
public function selectLinks($tableStatus, $set = "")
{
if (!$this->reorderLinks) {
return null; // null has to be returned to force Adminer print original links.
}
echo '';
$links = array();
if ($this->preferSelect) {
$links["select"] = lang('Select data');
}
if (support("table") || support("indexes")) {
$links["table"] = lang('Show structure');
}
if (!$this->preferSelect) {
$links["select"] = lang('Select data');
}
if (support("table")) {
if (is_view($tableStatus)) {
$links["view"] = lang('Alter view');
} else {
$links["create"] = lang('Alter table');
}
}
if ($set !== null) {
$links["edit"] = lang('New item');
}
foreach ($links as $key => $val) {
echo " $val";
}
echo "\n";
return true;
}
}