Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtul Pratap Singh <atulpratapsingh05@gmail.com>2012-07-05 06:55:23 +0400
committerAtul Pratap Singh <atulpratapsingh05@gmail.com>2012-07-05 06:55:23 +0400
commit4ce4dee2da0ad39906664d1721b19460c7853302 (patch)
tree8d5960ce106fa22a25c8e04e499e999567a47bcb /db_qbe.php
parent270ab5e2254b0ca03954ffe3949efc1ef419a3dc (diff)
Form function to display search table footer elements
Diffstat (limited to 'db_qbe.php')
-rw-r--r--db_qbe.php78
1 files changed, 48 insertions, 30 deletions
diff --git a/db_qbe.php b/db_qbe.php
index 714d86c44f..efe1ab29d0 100644
--- a/db_qbe.php
+++ b/db_qbe.php
@@ -410,6 +410,50 @@ function PMA_dbQbegetCriteriaInputboxRow(
return $html_output;
}
+/**
+ * Provides footer options for adding/deleting row/columns
+ *
+ * @param string $type Whether row or column
+ *
+ * @return HTML for footer options
+ */
+function PMA_dbQbeGetFootersOptions($type)
+{
+ $html_output = '<div class="floatleft">';
+ $html_output .= (($type == 'row')
+ ? __('Add/Delete criteria rows') : __('Add/Delete columns'));
+ $html_output .= ':<select size="1" name="'
+ . (($type == 'row') ? 'add_row' : 'add_col') . '">';
+ $html_output .= '<option value="-3">-3</option>';
+ $html_output .= '<option value="-2">-2</option>';
+ $html_output .= '<option value="-1">-1</option>';
+ $html_output .= '<option value="0" selected="selected">0</option>';
+ $html_output .= '<option value="1">1</option>';
+ $html_output .= '<option value="2">2</option>';
+ $html_output .= '<option value="3">3</option>';
+ $html_output .= '</select>';
+ $html_output .= '</div>';
+ return $html_output;
+}
+
+/**
+ * Provides search form table's footer options
+ *
+ * @return HTML for table footer
+ */
+function PMA_dbQbeGetTableFooters()
+{
+ $html_output = '<fieldset class="tblFooters">';
+ $html_output .= PMA_dbQbeGetFootersOptions("row");
+ $html_output .= PMA_dbQbeGetFootersOptions("column");
+ $html_output .= '<div class="floatleft">';
+ $html_output .= '<input type="submit" name="modify"'
+ . 'value="' . __('Update Query') . '" />';
+ $html_output .= '</div>';
+ $html_output .= '</fieldset>';
+ return $html_output;
+}
+
if ($cfgRelation['designerwork']) {
$url = 'pmd_general.php' . PMA_generate_common_url(
array_merge(
@@ -686,36 +730,10 @@ $url_params['rows'] = $w;
echo PMA_generate_common_hidden_inputs($url_params);
?>
</fieldset>
-<fieldset class="tblFooters">
- <div class="floatleft">
- <?php echo __('Add/Delete criteria rows'); ?>:
- <select size="1" name="add_row">
- <option value="-3">-3</option>
- <option value="-2">-2</option>
- <option value="-1">-1</option>
- <option value="0" selected="selected">0</option>
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- </select>
- </div>
- <div class="floatleft">
- <?php echo __('Add/Delete columns'); ?>:
- <select size="1" name="add_col">
- <option value="-3">-3</option>
- <option value="-2">-2</option>
- <option value="-1">-1</option>
- <option value="0" selected="selected">0</option>
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- </select>
- </div>
- <!-- Generates a query -->
- <div class="floatleft">
- <input type="submit" name="modify" value="<?php echo __('Update Query'); ?>" />
- </div>
-</fieldset>
+
+<?php
+echo PMA_dbQbeGetTableFooters();
+?>
<div class="floatleft">
<fieldset>