Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 348 lines (314 sloc) 11.841 kB
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Handles table zoom search tab
5 *
6 * display table zoom search form, create SQL queries from form data
7 *
0335bba @madhuracj Add missing package tag
madhuracj authored
8 * @package PhpMyAdmin
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
9 */
10
11 /**
12 * Gets some core libraries
13 */
14 require_once './libraries/common.inc.php';
15 require_once './libraries/mysql_charsets.lib.php';
91d372f @ammaryasir Added a library file for the table-search and zoom-search code
ammaryasir authored
16 require_once './libraries/tbl_select.lib.php';
eaea003 @ammaryasir Added some features
ammaryasir authored
17 require_once './libraries/relation.lib.php';
03a1a84 @ammaryasir Test
ammaryasir authored
18 require_once './libraries/tbl_info.inc.php';
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
19
eaea003 @ammaryasir Added some features
ammaryasir authored
20 $GLOBALS['js_include'][] = 'makegrid.js';
21 $GLOBALS['js_include'][] = 'sql.js';
543df4c @ammaryasir Added interface for browsing/editing points
ammaryasir authored
22 $GLOBALS['js_include'][] = 'functions.js';
7a821c8 @ammaryasir Improved the panning feature
ammaryasir authored
23 $GLOBALS['js_include'][] = 'date.js';
7a295f9 @lem9 Problems under IE 8
lem9 authored
24 /* < IE 9 doesn't support canvas natively */
25 if (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER < 9) {
26 $GLOBALS['js_include'][] = 'canvg/flashcanvas.js';
27 }
28
3d82362 @lem9 simple plot
lem9 authored
29 $GLOBALS['js_include'][] = 'jqplot/jquery.jqplot.js';
30 $GLOBALS['js_include'][] = 'jqplot/plugins/jqplot.canvasTextRenderer.js';
f5ac325 @lem9 Parse numbers; axis labels
lem9 authored
31 $GLOBALS['js_include'][] = 'jqplot/plugins/jqplot.canvasAxisLabelRenderer.js';
d584260 @lem9 Handling of dates
lem9 authored
32 $GLOBALS['js_include'][] = 'jqplot/plugins/jqplot.dateAxisRenderer.js';
d00d62e @lem9 Highlighter for data label
lem9 authored
33 $GLOBALS['js_include'][] = 'jqplot/plugins/jqplot.highlighter.js';
9f6dc05 @lem9 Zoom
lem9 authored
34 $GLOBALS['js_include'][] = 'jqplot/plugins/jqplot.cursor.js';
1653fd3 @ammaryasir Plot functionality using Hihcharts
ammaryasir authored
35 $GLOBALS['js_include'][] = 'canvg/canvg.js';
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
36 $GLOBALS['js_include'][] = 'jquery/timepicker.js';
3d82362 @lem9 simple plot
lem9 authored
37 $GLOBALS['js_include'][] = 'tbl_zoom_plot_jqplot.js';
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
38
49b6e49 Don't rely on grab_globals in tbl_zoom_select
Jo Michael authored
39 /**
40 * Sets globals from $_POST
41 */
42 $post_params = array(
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
43 'criteriaColumnCollations',
49b6e49 Don't rely on grab_globals in tbl_zoom_select
Jo Michael authored
44 'dataLabel',
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
45 'criteriaValues',
46 'criteriaColumnNullFlags',
47 'criteriaColumnNames',
49b6e49 Don't rely on grab_globals in tbl_zoom_select
Jo Michael authored
48 'maxPlotLimit',
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
49 'criteriaColumnTypes',
49b6e49 Don't rely on grab_globals in tbl_zoom_select
Jo Michael authored
50 'zoom_submit',
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
51 'criteriaColumnOperators'
49b6e49 Don't rely on grab_globals in tbl_zoom_select
Jo Michael authored
52 );
53 foreach ($post_params as $one_post_param) {
54 if (isset($_POST[$one_post_param])) {
55 $GLOBALS[$one_post_param] = $_POST[$one_post_param];
56 }
57 }
c7cef3b @ammaryasir Refactored the tbl_select.php and tbl_zoom_select.php code in librari…
ammaryasir authored
58
6f619e4 @nijel Whitespace cleanup
nijel authored
59 /**
241caff @ammaryasir Used AJAX to get data row on point select, hence reducing the amount …
ammaryasir authored
60 * Handle AJAX request for data row on point select
61 * @var post_params Object containing parameters for the POST request
62 */
63
64 if (isset($_REQUEST['get_data_row']) && $_REQUEST['get_data_row'] == true) {
6f619e4 @nijel Whitespace cleanup
nijel authored
65 $extra_data = array();
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
66 $row_info_query = 'SELECT * FROM `' . $_REQUEST['db'] . '`.`'
67 . $_REQUEST['table'] . '` WHERE ' . $_REQUEST['where_clause'];
68 $result = PMA_DBI_query($row_info_query . ";", null, PMA_DBI_QUERY_STORE);
241caff @ammaryasir Used AJAX to get data row on point select, hence reducing the amount …
ammaryasir authored
69 $fields_meta = PMA_DBI_get_fields_meta($result);
c2e7d4b @lem9 Remove tab characters; coding style (first part)
lem9 authored
70 while ($row = PMA_DBI_fetch_assoc($result)) {
e71182b @madhuracj Convert bit values to printable form
madhuracj authored
71 // for bit fields we need to convert them to printable form
72 $i = 0;
73 foreach ($row as $col => $val) {
74 if ($fields_meta[$i]->type == 'bit') {
3467896 @madhuracj These have been missed when functions were renamed
madhuracj authored
75 $row[$col] = PMA_printableBitValue($val, $fields_meta[$i]->length);
e71182b @madhuracj Convert bit values to printable form
madhuracj authored
76 }
77 $i++;
78 }
c2e7d4b @lem9 Remove tab characters; coding style (first part)
lem9 authored
79 $extra_data['row_info'] = $row;
80 }
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
81 PMA_ajaxResponse(null, true, $extra_data);
241caff @ammaryasir Used AJAX to get data row on point select, hence reducing the amount …
ammaryasir authored
82 }
83
9be5d8e @ammaryasir Used AJAX for updating field information(type,collation,operators,fie…
ammaryasir authored
84 /**
8243eac @madhuracj Wrap some long lines
madhuracj authored
85 * Handle AJAX request for changing field information
86 * (value,collation,operators,field values) in input form
9be5d8e @ammaryasir Used AJAX for updating field information(type,collation,operators,fie…
ammaryasir authored
87 * @var post_params Object containing parameters for the POST request
88 */
89
90 if (isset($_REQUEST['change_tbl_info']) && $_REQUEST['change_tbl_info'] == true) {
91 $extra_data = array();
92 $field = $_REQUEST['field'];
e482a94 @ruleant improve coding style
ruleant authored
93 if ($field == 'pma_null') {
9be5d8e @ammaryasir Used AJAX for updating field information(type,collation,operators,fie…
ammaryasir authored
94 $extra_data['field_type'] = '';
95 $extra_data['field_collation'] = '';
96 $extra_data['field_operators'] = '';
e482a94 @ruleant improve coding style
ruleant authored
97 PMA_ajaxResponse(null, true, $extra_data);
9be5d8e @ammaryasir Used AJAX for updating field information(type,collation,operators,fie…
ammaryasir authored
98 }
99
100
101 // Gets the list and number of fields
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
102 list($columnNames, $columnTypes, $columnCollations, $columnNullFlags)
8243eac @madhuracj Wrap some long lines
madhuracj authored
103 = PMA_tbl_getFields($_REQUEST['db'], $_REQUEST['table']);
9be5d8e @ammaryasir Used AJAX for updating field information(type,collation,operators,fie…
ammaryasir authored
104
105 $foreigners = PMA_getForeigners($db, $table);
106 $titles['Browse'] = PMA_getIcon('b_browse.png', __('Browse foreign values'));
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
107 $key = array_search($field, $columnNames);
108 $extra_data['field_type'] = $columnTypes[$key];
109 $extra_data['field_collation'] = $columnCollations[$key];
ff66fdb @roccivic Remove stray trailing whitespaces
roccivic authored
110
111 // HTML for operators
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
112 $html = '<select name="criteriaColumnOperators[]">';
13bd089 @nijel Centralize generating of operators list
nijel authored
113 $html .= $GLOBALS['PMA_Types']->getTypeOperatorsHtml(
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
114 preg_replace('@\(.*@s', '', $columnTypes[$key]),
115 $columnNullFlags[$key]
13bd089 @nijel Centralize generating of operators list
nijel authored
116 );
9be5d8e @ammaryasir Used AJAX for updating field information(type,collation,operators,fie…
ammaryasir authored
117 $html .= '</select>';
118 $extra_data['field_operators'] = $html;
119
120 // retrieve keys into foreign fields, if any
121 // check also foreigners even if relwork is FALSE (to get
122 // foreign keys from innodb)
123 $foreignData = PMA_getForeignData($foreigners, $field, false, '', '');
124
125 // HTML for field values
e482a94 @ruleant improve coding style
ruleant authored
126 $html = PMA_getForeignFields_Values(
127 $foreigners,
128 $foreignData,
129 $field,
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
130 array($_REQUEST['it'] => $columnTypes[$key]),
e482a94 @ruleant improve coding style
ruleant authored
131 $_REQUEST['it'],
132 $_REQUEST['db'],
133 $_REQUEST['table'],
134 $titles,
135 $GLOBALS['cfg']['ForeignKeyMaxLimit'],
136 ''
137 );
9be5d8e @ammaryasir Used AJAX for updating field information(type,collation,operators,fie…
ammaryasir authored
138 $extra_data['field_value'] = $html;
e482a94 @ruleant improve coding style
ruleant authored
139 PMA_ajaxResponse(null, true, $extra_data);
9be5d8e @ammaryasir Used AJAX for updating field information(type,collation,operators,fie…
ammaryasir authored
140 }
141
effa795 @madhuracj Wrong message used in 8373e5feec2232e6a17b342eb0bf74930431bfcc
madhuracj authored
142 $titles['Browse'] = PMA_getIcon('b_browse.png', __('Browse foreign values'));
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
143 /**
144 * Not selection yet required -> displays the selection form
145 */
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
146
c2e7d4b @lem9 Remove tab characters; coding style (first part)
lem9 authored
147 // Gets some core libraries
28923b4 @roccivic Renamed tbl_common.php to tbl_common.inc.php for better consistency
roccivic authored
148 require_once './libraries/tbl_common.inc.php';
c2e7d4b @lem9 Remove tab characters; coding style (first part)
lem9 authored
149 $url_query .= '&amp;goto=tbl_select.php&amp;back=tbl_select.php';
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
150
c2e7d4b @lem9 Remove tab characters; coding style (first part)
lem9 authored
151 /**
152 * Gets tables informations
153 */
154 require_once './libraries/tbl_info.inc.php';
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
155
c2e7d4b @lem9 Remove tab characters; coding style (first part)
lem9 authored
156 if (! isset($goto)) {
157 $goto = $GLOBALS['cfg']['DefaultTabTable'];
158 }
159 // Defines the url to return to in case of error in the next sql statement
160 $err_url = $goto . '?' . PMA_generate_common_url($db, $table);
161
162 // Gets the list and number of fields
163
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
164 list($columnNames, $columnTypes, $columnCollations, $columnNullFlags)
8243eac @madhuracj Wrap some long lines
madhuracj authored
165 = PMA_tbl_getFields($db, $table);
c2e7d4b @lem9 Remove tab characters; coding style (first part)
lem9 authored
166
167 // retrieve keys into foreign fields, if any
168 // check also foreigners even if relwork is FALSE (to get
169 // foreign keys from innodb)
170 $foreigners = PMA_getForeigners($db, $table);
49b6e49 Don't rely on grab_globals in tbl_zoom_select
Jo Michael authored
171
c2e7d4b @lem9 Remove tab characters; coding style (first part)
lem9 authored
172 ?>
362a57f @ammaryasir Functionality for edit data points added (primitive)
ammaryasir authored
173 <div id="sqlqueryresults"></div>
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
174 <fieldset id="fieldset_subtab">
175 <?php
176 $url_params = array();
177 $url_params['db'] = $db;
178 $url_params['table'] = $table;
3467896 @madhuracj These have been missed when functions were renamed
madhuracj authored
179 echo PMA_generateHtmlTabs(PMA_tbl_getSubTabs(), $url_params, 'topmenu2');
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
180
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
181 /*
182 * Form for input criteria
183 */
f939564 @ammaryasir Created the SVG based scatter-plot functionality
ammaryasir authored
184
18694f2 @ammaryasir Added generate plot feature using SVG ( only for numeric fields )
ammaryasir authored
185 ?>
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
186 <form method="post" action="tbl_zoom_select.php" name="insertForm" id="zoom_search_form"
187 <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''); ?>>
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
188 <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
189 <input type="hidden" name="goto" value="<?php echo $goto; ?>" />
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
190 <input type="hidden" name="back" value="tbl_zoom_select.php" />
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
191
543df4c @ammaryasir Added interface for browsing/editing points
ammaryasir authored
192 <fieldset id="inputSection">
18694f2 @ammaryasir Added generate plot feature using SVG ( only for numeric fields )
ammaryasir authored
193
d9486e2 @ammaryasir Validations for input form submit
ammaryasir authored
194 <legend><?php echo __('Do a "query by example" (wildcard: "%") for two different columns') ?></legend>
6f619e4 @nijel Whitespace cleanup
nijel authored
195
27c1ab6 @zixtor Functions for some part of zoom search form display
zixtor authored
196 <?php
197 echo PMA_tblSearchGetFieldsTableHtml(
198 $db, $table, $columnNames, $columnTypes, $columnCollations, $columnNullFlags,
6719025 @zixtor Remove unnecessary variable columnCount
zixtor authored
199 NULL, $foreigners, "zoom"
27c1ab6 @zixtor Functions for some part of zoom search form display
zixtor authored
200 );
c2e7d4b @lem9 Remove tab characters; coding style (first part)
lem9 authored
201 //Set default datalabel if not selected
60ccfbe @zixtor Improve if statement that sets default datalabel
zixtor authored
202 if ( !isset($_POST['zoom_submit']) || $_POST['dataLabel'] == '') {
203 $dataLabel = PMA_getDisplayField($db, $table);
0bf475b @lem9 Coding style
lem9 authored
204 }
ad33688 @zixtor Formed function to display datalabel and maxrowplotlimit options
zixtor authored
205 echo PMA_tblSearchGetOptionsZoom($columnNames, $dataLabel);
0bf475b @lem9 Coding style
lem9 authored
206 ?>
64425cc @ammaryasir Fixed some issues and added support for plotting strings
ammaryasir authored
207
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
208 </fieldset>
209 <fieldset class="tblFooters">
d9486e2 @ammaryasir Validations for input form submit
ammaryasir authored
210 <input type="submit" name="zoom_submit" id="inputFormSubmitId" value="<?php echo __('Go'); ?>" />
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
211 </fieldset>
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
212 </form>
dc35ecf @lem9 XHTML problems
lem9 authored
213 </fieldset>
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
214
6f619e4 @nijel Whitespace cleanup
nijel authored
215 <?php
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
216
217 /*
0bf475b @lem9 Coding style
lem9 authored
218 * Handle the input criteria and generate the query result
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
219 * Form for displaying query results
220 */
8243eac @madhuracj Wrap some long lines
madhuracj authored
221 if (isset($zoom_submit)
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
222 && $criteriaColumnNames[0] != 'pma_null'
223 && $criteriaColumnNames[1] != 'pma_null'
224 && $criteriaColumnNames[0] != $criteriaColumnNames[1]
8243eac @madhuracj Wrap some long lines
madhuracj authored
225 ) {
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
226 /*
227 * Query generation part
228 */
6a85bdd @zixtor Use existing function to build SQL query
zixtor authored
229 $sql_query = PMA_tblSearchBuildSqlQuery();
0bf475b @lem9 Coding style
lem9 authored
230 $sql_query .= ' LIMIT ' . $maxPlotLimit;
04e82bb @ammaryasir Default data label now taken from table display field
ammaryasir authored
231
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
232 /*
233 * Query execution part
234 */
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
235 $result = PMA_DBI_query($sql_query . ";", null, PMA_DBI_QUERY_STORE);
362a57f @ammaryasir Functionality for edit data points added (primitive)
ammaryasir authored
236 $fields_meta = PMA_DBI_get_fields_meta($result);
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
237 while ($row = PMA_DBI_fetch_assoc($result)) {
8243eac @madhuracj Wrap some long lines
madhuracj authored
238 //Need a row with indexes as 0,1,2 for the PMA_getUniqueCondition
239 // hence using a temporary array
0bf475b @lem9 Coding style
lem9 authored
240 $tmpRow = array();
241 foreach ($row as $val) {
242 $tmpRow[] = $val;
243 }
362a57f @ammaryasir Functionality for edit data points added (primitive)
ammaryasir authored
244 //Get unique conditon on each row (will be needed for row update)
8243eac @madhuracj Wrap some long lines
madhuracj authored
245 $uniqueCondition = PMA_getUniqueCondition(
6719025 @zixtor Remove unnecessary variable columnCount
zixtor authored
246 $result, count($columnNames), $fields_meta, $tmpRow, true
8243eac @madhuracj Wrap some long lines
madhuracj authored
247 );
e3cb99d @ammaryasir Added better support for datetime fields
ammaryasir authored
248
0bf475b @lem9 Coding style
lem9 authored
249 //Append it to row array as where_clause
250 $row['where_clause'] = $uniqueCondition[0];
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
251 if ($dataLabel == $criteriaColumnNames[0] || $dataLabel == $criteriaColumnNames[1]) {
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
252 $data[] = array(
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
253 $criteriaColumnNames[0] => $row[$criteriaColumnNames[0]],
254 $criteriaColumnNames[1] => $row[$criteriaColumnNames[1]],
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
255 'where_clause' => $uniqueCondition[0]
256 );
0bf475b @lem9 Coding style
lem9 authored
257 } elseif ($dataLabel) {
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
258 $data[] = array(
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
259 $criteriaColumnNames[0] => $row[$criteriaColumnNames[0]],
260 $criteriaColumnNames[1] => $row[$criteriaColumnNames[1]],
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
261 $dataLabel => $row[$dataLabel],
262 'where_clause' => $uniqueCondition[0]
263 );
0bf475b @lem9 Coding style
lem9 authored
264 } else {
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
265 $data[] = array(
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
266 $criteriaColumnNames[0] => $row[$criteriaColumnNames[0]],
267 $criteriaColumnNames[1] => $row[$criteriaColumnNames[1]],
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
268 $dataLabel => '',
269 'where_clause' => $uniqueCondition[0]
270 );
0bf475b @lem9 Coding style
lem9 authored
271 }
6f619e4 @nijel Whitespace cleanup
nijel authored
272 }
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
273 /*
274 * Form for displaying point data and also the scatter plot
275 */
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
276 ?>
277 <form method="post" action="tbl_zoom_select.php" name="displayResultForm" id="zoom_display_form"
278 <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''); ?>>
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
279 <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
280 <input type="hidden" name="goto" value="<?php echo $goto; ?>" />
281 <input type="hidden" name="back" value="tbl_zoom_select.php" />
282
283 <fieldset id="displaySection">
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
284 <legend><?php echo __('Browse/Edit the points') ?></legend>
285 <center>
286 <?php
0bf475b @lem9 Coding style
lem9 authored
287 //JSON encode the data(query result)
288 if (isset($zoom_submit) && ! empty($data)) {
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
289 ?>
4ffeb06 @lem9 Improve resizer
lem9 authored
290 <div id="resizer">
13d741e @lem9 onClick should be onclick
lem9 authored
291 <center><a href="#" onclick="displayHelp();"><?php echo __('How to use'); ?></a></center>
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
292 <div id="querydata" style="display:none">
293 <?php
6e05e71 @nijel Whitespace cleanup
nijel authored
294 echo json_encode($data);
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
295 ?>
296 </div>
4ffeb06 @lem9 Improve resizer
lem9 authored
297 <div id="querychart"></div>
0264dee @lem9 Reset zoom
lem9 authored
298 <button class="button-reset"><?php echo __('Reset zoom'); ?></button>
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
299 </div>
300 <?php
6e05e71 @nijel Whitespace cleanup
nijel authored
301 }
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
302 ?>
303 </center>
b131ec7 @roccivic Improved layout for the data editor from the zoom search feature
roccivic authored
304 <div id='dataDisplay' style="display:none">
305 <table>
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
306 <thead>
307 <tr>
308 <th> <?php echo __('Column'); ?> </th>
309 <th> <?php echo __('Null'); ?> </th>
310 <th> <?php echo __('Value'); ?> </th>
311 </tr>
312 </thead>
313 <tbody>
314 <?php
0bf475b @lem9 Coding style
lem9 authored
315 $odd_row = true;
6719025 @zixtor Remove unnecessary variable columnCount
zixtor authored
316 for ($i = 4; $i < count($columnNames) + 4; $i++) {
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
317 $tbl_fields_type[$i] = $columnTypes[$i - 4];
318 $fieldpopup = $columnNames[$i - 4];
0bf475b @lem9 Coding style
lem9 authored
319 $foreignData = PMA_getForeignData($foreigners, $fieldpopup, false, '', '');
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
320 ?>
321 <tr class="noclick <?php echo $odd_row ? 'odd' : 'even'; $odd_row = ! $odd_row; ?>">
2d9217f @zixtor Make variable names uniform in search scripts
zixtor authored
322 <th><?php echo htmlspecialchars($columnNames[$i - 4]); ?></th>
323 <th><?php echo ($columnNullFlags[$i - 4] == 'YES')
324 ? '<input type="checkbox" class="checkbox_null" name="criteriaColumnNullFlags[ '
20ca1e4 @madhuracj bug #3410999 - Zoom search, problems with data editor
madhuracj authored
325 . $i . ' ]" id="fields_null_id_' . $i . '" />'
326 : ''; ?>
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
327 </th>
328 <th> <?php
329 echo PMA_getForeignFields_Values(
330 $foreigners, $foreignData, $fieldpopup, $tbl_fields_type,
20ca1e4 @madhuracj bug #3410999 - Zoom search, problems with data editor
madhuracj authored
331 $i, $db, $table, $titles,
332 $GLOBALS['cfg']['ForeignKeyMaxLimit'], '', false, true
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
333 ); ?>
334 </th>
335 </tr>
336 <?php
6e05e71 @nijel Whitespace cleanup
nijel authored
337 }
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
338 ?>
339 </tbody>
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
340 </table>
b131ec7 @roccivic Improved layout for the data editor from the zoom search feature
roccivic authored
341 </div>
41715e5 @ammaryasir Removed mode feature, appended a missing configuration directive and …
ammaryasir authored
342 <input type="hidden" id="queryID" name="sql_query" />
602a64a @ammaryasir Added the Show/Hide search criteria feature
ammaryasir authored
343 </form>
7b4bb1c @madhuracj Coding style improvements
madhuracj authored
344 <?php
41715e5 @ammaryasir Removed mode feature, appended a missing configuration directive and …
ammaryasir authored
345 }
0bf475b @lem9 Coding style
lem9 authored
346 require './libraries/footer.inc.php';
7396fa3 @ammaryasir Designed the zoom-search form(tbl_zoom_select.php)
ammaryasir authored
347 ?>
Something went wrong with that request. Please try again.