forked from phpmyadmin/phpmyadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtbl_query_box.php
47 lines (42 loc) · 1.06 KB
/
tbl_query_box.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:
/**
* provides the sql form
*
* @usedby server_sql.php server SQL-tab
* @usedby db_details.php database SQL-tab
* @usedby server_sql.php server SQL-tab
*/
// Check parameters
require_once('./libraries/common.lib.php');
require_once('./libraries/bookmark.lib.php');
require_once './libraries/sql_query_form.lib.php';
if ( empty( $querydisplay_tab ) ) {
$querydisplay_tab = '';
}
if ( $is_inside_querywindow ) {
// ... we redirect to appropriate query sql page
// works only full if $db and $table is also stored/grabbed from $_COOKIE
if ( ! empty( $table ) ) {
require './tbl_properties.php';
}
elseif ( ! empty( $db ) ) {
require './db_details.php';
}
else {
require './server_sql.php';
}
exit;
}
/**
* Defines the query to be displayed in the query textarea
*/
if ( ! empty( $show_query ) ) {
$query_to_display = $sql_query;
} else {
$query_to_display = '';
}
unset( $sql_query );
PMA_sqlQueryForm( $query_to_display, $querydisplay_tab );
?>