mirror of
https://github.com/vrana/adminer.git
synced 2025-08-18 04:11:27 +02:00
Display table links above table structure
Move body_load back to <body onload> git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1119 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -66,12 +66,24 @@ class Adminer {
|
||||
return '<span title="' . h($field["full_type"]) . '">' . h($field["field"]) . '</span>';
|
||||
}
|
||||
|
||||
/** Links after select heading
|
||||
/** Print links after select heading
|
||||
* @param array result of SHOW TABLE STATUS
|
||||
* @return string
|
||||
* @param strin new item options, NULL for no new item
|
||||
* @return null
|
||||
*/
|
||||
function selectLinks($tableStatus) {
|
||||
return '<a href="' . h(ME) . 'table=' . urlencode($_GET['select']) . '">' . lang('Table structure') . '</a>';
|
||||
function selectLinks($tableStatus, $set = "") {
|
||||
$TABLE = $tableStatus["Name"];
|
||||
echo '<p><a href="' . h(ME) . 'select=' . urlencode($TABLE) . '">' . lang('Select table') . '</a>';
|
||||
echo ' <a href="' . h(ME) . 'table=' . urlencode($TABLE) . '">' . lang('Table structure') . '</a>';
|
||||
if (isset($tableStatus["Rows"])) {
|
||||
echo ' <a href="' . h(ME) . 'create=' . urlencode($TABLE) . '">' . lang('Alter table') . '</a>';
|
||||
} else {
|
||||
echo ' <a href="' . h(ME) . 'view=' . urlencode($TABLE) . '">' . lang('Alter view') . '</a>';
|
||||
}
|
||||
if (isset($set)) {
|
||||
echo ' <a href="' . h(ME . 'edit=' . urlencode($TABLE) . $set) . '">' . lang('New item') . '</a>';
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
/** Find backward keys for table
|
||||
@@ -421,10 +433,6 @@ class Adminer {
|
||||
<span class="version"><?php echo $VERSION; ?></span>
|
||||
<a href="http://www.adminer.org/#download" id="version"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?></a>
|
||||
</h1>
|
||||
<script type="text/javascript">
|
||||
body_load();
|
||||
<?php echo (isset($_COOKIE["adminer_version"]) ? "" : "verify_version();"); ?>
|
||||
</script>
|
||||
<?php
|
||||
if ($missing != "auth") {
|
||||
$databases = get_databases();
|
||||
|
@@ -15,7 +15,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||
<link rel="stylesheet" type="text/css" href="adminer.css">
|
||||
<?php } ?>
|
||||
|
||||
<body>
|
||||
<body onload="body_load();<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verify_version();"); ?>">
|
||||
<script type="text/javascript" src="../adminer/functions.js"></script>
|
||||
<script type="text/javascript" src="editing.js"></script>
|
||||
|
||||
|
Reference in New Issue
Block a user