From 37797202b6e720c69ab4818dba98b2b04bf9c42c Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Sat, 27 Sep 2008 01:44:13 +0000 Subject: [PATCH] Links to tables and views operations git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@500 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- index.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/index.php b/index.php index 34e851f5..dc19619f 100644 --- a/index.php +++ b/index.php @@ -157,15 +157,11 @@ if (isset($_GET["download"])) { echo "\n"; echo '\n"; while ($row = $result->fetch_assoc()) { - echo '\n"; }
' . lang('Table') . '' . lang('Engine') . '' . lang('Collation') . '' . lang('Data Length') . '' . lang('Index Length') . '' . lang('Data Free') . '' . lang('Auto Increment') . '' . lang('Rows') . "
'; - if (isset($row["Rows"])) { - echo '' . htmlspecialchars($row["Name"]) . "$row[Engine]$row[Collation]"; - $row["count"] = $mysql->result($mysql->query("SELECT COUNT(*) FROM " . idf_escape($row["Name"]))); - foreach (array("Data_length", "Index_length", "Data_free", "Auto_increment", "count") as $val) { - echo '' . (strlen($row[$val]) ? number_format($row[$val], 0, '.', lang(',')) : ' '); - } - } else { - echo ' ' . htmlspecialchars($row["Name"]) . '' . lang('View'); + echo '
' . (isset($row["Rows"]) ? '' . htmlspecialchars($row["Name"]) . "$row[Engine]$row[Collation]" : ' ' . htmlspecialchars($row["Name"]) . '' . lang('View')); + $row["count"] = $mysql->result($mysql->query("SELECT COUNT(*) FROM " . idf_escape($row["Name"]))); + foreach ((isset($row["Rows"]) ? array("Data_length" => "create", "Index_length" => "indexes", "Data_free" => "", "Auto_increment" => "", "count" => "select") : array("count" => "select")) as $key => $link) { + $num = (strlen($row[$key]) ? number_format($row[$key], 0, '.', lang(',')) : ' '); + echo '' . ($link ? '' . "$num" : $num); } echo "