Hide select export and import
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1096 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
4ee2e686d7
commit
dc667ea1a7
|
@ -136,7 +136,7 @@ class Adminer {
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function selectColumnsPrint($select, $columns) {
|
function selectColumnsPrint($select, $columns) {
|
||||||
echo '<fieldset><legend><a href="#fieldset-select" onclick="return !toggle(\'fieldset-select\');">' . lang('Select') . "</a></legend><div id='fieldset-select'" . ($select ? "" : " class='hidden'") . ">\n";
|
print_fieldset("select", lang('Select'), $select);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$fun_group = array(lang('Functions') => $this->functions, lang('Aggregation') => $this->grouping);
|
$fun_group = array(lang('Functions') => $this->functions, lang('Aggregation') => $this->grouping);
|
||||||
foreach ($select as $key => $val) {
|
foreach ($select as $key => $val) {
|
||||||
|
@ -157,7 +157,7 @@ class Adminer {
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function selectSearchPrint($where, $columns, $indexes) {
|
function selectSearchPrint($where, $columns, $indexes) {
|
||||||
echo '<fieldset><legend><a href="#fieldset-search" onclick="return !toggle(\'fieldset-search\');">' . lang('Search') . "</a></legend><div id='fieldset-search'" . ($where ? "" : " class='hidden'") . ">\n";
|
print_fieldset("search", lang('Search'), $where);
|
||||||
foreach ($indexes as $i => $index) {
|
foreach ($indexes as $i => $index) {
|
||||||
if ($index["type"] == "FULLTEXT") {
|
if ($index["type"] == "FULLTEXT") {
|
||||||
echo "(<i>" . implode("</i>, <i>", array_map('h', $index["columns"])) . "</i>) AGAINST";
|
echo "(<i>" . implode("</i>, <i>", array_map('h', $index["columns"])) . "</i>) AGAINST";
|
||||||
|
@ -188,7 +188,7 @@ class Adminer {
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function selectOrderPrint($order, $columns, $indexes) {
|
function selectOrderPrint($order, $columns, $indexes) {
|
||||||
echo '<fieldset><legend><a href="#fieldset-sort" onclick="return !toggle(\'fieldset-sort\');">' . lang('Sort') . "</a></legend><div id='fieldset-sort'" . ($order ? "" : " class='hidden'") . ">\n";
|
print_fieldset("sort", lang('Sort'), $order);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ((array) $_GET["order"] as $key => $val) {
|
foreach ((array) $_GET["order"] as $key => $val) {
|
||||||
if (isset($columns[$val])) {
|
if (isset($columns[$val])) {
|
||||||
|
|
|
@ -557,3 +557,13 @@ function is_email($email) {
|
||||||
$domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component
|
$domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component
|
||||||
return eregi("^$atom+(\\.$atom+)*@($domain?\\.)+$domain\$", $email);
|
return eregi("^$atom+(\\.$atom+)*@($domain?\\.)+$domain\$", $email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Print header for hidden fieldset (close by </div></fieldset>)
|
||||||
|
* @param string
|
||||||
|
* @param string
|
||||||
|
* @param bool
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
function print_fieldset($id, $legend, $visible = false) {
|
||||||
|
echo "<fieldset><legend><a href='#fieldset-$id' onclick=\"return !toggle('fieldset-$id');\">$legend</a></legend><div id='fieldset-$id'" . ($visible ? "" : " class='hidden'") . ">\n";
|
||||||
|
}
|
||||||
|
|
|
@ -282,9 +282,13 @@ if (!$columns) {
|
||||||
echo " (" . lang('%d row(s)', $found_rows) . ') <label><input type="checkbox" name="all" value="1">' . lang('whole result') . "</label>\n";
|
echo " (" . lang('%d row(s)', $found_rows) . ') <label><input type="checkbox" name="all" value="1">' . lang('whole result') . "</label>\n";
|
||||||
|
|
||||||
echo (information_schema(DB) ? "" : "<fieldset><legend>" . lang('Edit') . "</legend><div><input type='submit' name='edit' value='" . lang('Edit') . "'> <input type='submit' name='clone' value='" . lang('Clone') . "'> <input type='submit' name='delete' value='" . lang('Delete') . "'$confirm></div></fieldset>\n");
|
echo (information_schema(DB) ? "" : "<fieldset><legend>" . lang('Edit') . "</legend><div><input type='submit' name='edit' value='" . lang('Edit') . "'> <input type='submit' name='clone' value='" . lang('Clone') . "'> <input type='submit' name='delete' value='" . lang('Delete') . "'$confirm></div></fieldset>\n");
|
||||||
echo "<fieldset><legend>" . lang('Export') . "</legend><div>$dump_output $dump_format $dump_compress <input type='submit' name='export' value='" . lang('Export') . "'></div></fieldset>\n";
|
print_fieldset("export", lang('Export'));
|
||||||
|
echo "$dump_output $dump_format $dump_compress <input type='submit' name='export' value='" . lang('Export') . "'>\n";
|
||||||
|
echo "</div></fieldset>\n";
|
||||||
}
|
}
|
||||||
echo "<fieldset><legend>" . lang('CSV Import') . "</legend><div><input type='hidden' name='token' value='$token'><input type='file' name='csv_file'> <input type='submit' name='import' value='" . lang('Import') . "'></div></fieldset>\n";
|
print_fieldset("import", lang('CSV Import'), !$result->num_rows);
|
||||||
|
echo "<input type='hidden' name='token' value='$token'><input type='file' name='csv_file'> <input type='submit' name='import' value='" . lang('Import') . "'>\n";
|
||||||
|
echo "</div></fieldset>\n";
|
||||||
|
|
||||||
$adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns);
|
$adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue