From d2dfc5aa7c71599849d8fad4808849b8d617faa4 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Wed, 3 Jun 2009 18:33:50 +0000 Subject: [PATCH] Move comment to end git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@648 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- index.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index 84696fd9..1a75a4b1 100644 --- a/index.php +++ b/index.php @@ -171,15 +171,21 @@ if (isset($_GET["download"])) { } else { echo "
\n"; echo "\n"; - echo '\n"; + echo '\n"; while ($row = $result->fetch_assoc()) { table_comment($row); - echo '"; + foreach (array("Data_length" => "create", "Index_length" => "indexes", "Data_free" => "edit", "Auto_increment" => "create", "Rows" => "select") as $key => $link) { + $val = number_format($row[$key], 0, '.', lang(',')); + echo ''; + } + echo ""; + } else { + echo ''; } - echo "\n"; + echo "\n"; } echo "
' . lang('Table') . '' . lang('Engine') . '' . lang('Comment') . '' . lang('Collation') . '' . lang('Data Length') . '' . lang('Index Length') . '' . lang('Data Free') . '' . lang('Auto Increment') . '' . lang('Rows') . "
' . lang('Table') . '' . lang('Engine') . '' . lang('Collation') . '' . lang('Data Length') . '' . lang('Index Length') . '' . lang('Data Free') . '' . lang('Auto Increment') . '' . lang('Rows') . '' . lang('Comment') . "
' . (isset($row["Rows"]) ? '' . htmlspecialchars($row["Name"]) . "$row[Engine]" . (strlen(trim($row["Comment"])) ? htmlspecialchars($row["Comment"]) : " ") . "$row[Collation]" : ' ' . htmlspecialchars($row["Name"]) . '' . lang('View') . ''); - foreach ((isset($row["Rows"]) ? array("Data_length" => "create", "Index_length" => "indexes", "Data_free" => "edit", "Auto_increment" => "create", "Rows" => "select") : array()) as $key => $link) { - $val = number_format($row[$key], 0, '.', lang(',')); - echo '' . (strlen($row[$key]) ? '' . ($key == "Rows" && $row["Engine"] == "InnoDB" && $val ? lang('~ %s', $val) : $val) . '' : ' '); + echo '
'; + if (isset($row["Rows"])) { + echo '' . htmlspecialchars($row["Name"]) . "$row[Engine]$row[Collation]' . (strlen($row[$key]) ? '' . ($key == "Rows" && $row["Engine"] == "InnoDB" && $val ? lang('~ %s', $val) : $val) . '' : '') . '" . htmlspecialchars($row["Comment"]) . "' . htmlspecialchars($row["Name"]) . '' . lang('View') . '
\n"; echo "

\n";