sorry, wrong version checked in
[phpmyadmin/arisferyanto.git] / tbl_query_box.php
blobe9167a1b22bcead572c5e7d64ac1b92c95e768a5
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
4 /**
5 * provides the sql form
6 *
7 * @usedby server_sql.php server SQL-tab
8 * @usedby db_details.php database SQL-tab
9 * @usedby server_sql.php server SQL-tab
12 // Check parameters
13 require_once('./libraries/common.lib.php');
14 require_once('./libraries/bookmark.lib.php');
15 require_once './libraries/sql_query_form.lib.php';
17 if ( empty( $querydisplay_tab ) ) {
18 $querydisplay_tab = '';
21 if ( $is_inside_querywindow ) {
22 // ... we redirect to appropriate query sql page
23 // works only full if $db and $table is also stored/grabbed from $_COOKIE
24 if ( ! empty( $table ) ) {
25 require './tbl_properties.php';
27 elseif ( ! empty( $db ) ) {
28 require './db_details.php';
30 else {
31 require './server_sql.php';
33 exit;
36 /**
37 * Defines the query to be displayed in the query textarea
39 if ( ! empty( $show_query ) ) {
40 $query_to_display = $sql_query;
41 } else {
42 $query_to_display = '';
44 unset( $sql_query );
46 PMA_sqlQueryForm( $query_to_display, $querydisplay_tab );