From b8741540db58ef0638fa7d96240f583b364a24d2 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Tue, 27 Sep 2005 13:53:49 +0000 Subject: moved all code for queryboxes into libraries/sql_query_form.lib.php, replaced table with fieldsets, moved styles into css, minor interface changes related to queryboxes --- server_sql.php | 200 ++------------------------------------------------------- 1 file changed, 6 insertions(+), 194 deletions(-) (limited to 'server_sql.php') diff --git a/server_sql.php b/server_sql.php index bc0762f202..7b7ab60830 100644 --- a/server_sql.php +++ b/server_sql.php @@ -6,211 +6,23 @@ /** * Does the common work */ -require('./server_common.inc.php'); +require_once './server_common.inc.php'; +require_once './libraries/sql_query_form.lib.php'; /** * Displays the links */ -require('./server_links.inc.php'); - +require './server_links.inc.php'; /** - * Database work + * Query box, bookmark, insert data from textfile */ -if (isset($show_query) && $show_query == '1') { - // This script has been called by read_dump.php - if (isset($sql_query_cpy)) { - $query_to_display = $sql_query_cpy; - } - // Other cases - else { - $query_to_display = $sql_query; - } -} else { - $query_to_display = ''; -} - - -// loic1: defines wether file upload is available or not -// (now defined in common.lib.php) - -$auto_sel = ($cfg['TextareaAutoSelect'] - // 2003-02-05 rabus: This causes big trouble with Opera 7 for - // Windows, so let's disable it there... - && !(PMA_USR_OS == 'Win' && PMA_USR_BROWSER_AGENT == 'OPERA' && PMA_USR_BROWSER_VER >= 7)) - ? "\n" . ' onfocus="if (typeof(document.layers) == \'undefined\' || typeof(textarea_selected) == \'undefined\') {textarea_selected = 1; this.form.elements[\'sql_query\'].select();}"' - : ''; - - -// for better administration -$strHiddenFields = ' ' ."\n" - . ' ' .PMA_generate_common_hidden_inputs() . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n"; -?> - -
onsubmit="return checkSqlQuery(this)" name="sqlform"> - - - - - - - - - - - - - - - - ' . "\n" - . '' . "\n" - . '' . "\n" - . ' - - ' . "\n"; - echo ' ' - . ' ' . "\n\n"; - } // end if (isfirst > 0) - @closedir($handle); - } - else { - $upload_dir_error = '' . "\n" - . '' . "\n" - . '' . "\n"; - } -} // end if (web-server upload directory) -// Charset conversion options -if ($is_upload || $is_upload_dir) { - echo ' ' . "\n"; - echo ' ' . "\n"; - echo ' ' . "\n"; -} - +PMA_sqlQueryForm(); -// Encoding setting form appended by Y.Kawada -if (function_exists('PMA_set_enc_form')) { - echo PMA_set_enc_form(' '); -} -// modified by mkkeck 2004-05-08 -// showing UploadDir Error at the end of all option for SQL-Queries -if (isset($upload_dir_error)) { - echo $upload_dir_error; -} -?> -
- -
- -
- -
- - : -
-   - '; - // some browsers should respect this :) - echo ' ' . PMA_generateHiddenMaxFileSize($max_upload_size) . "\n"; - $is_gzip = ($cfg['GZipDump'] && @function_exists('gzopen')); - $is_bzip = ($cfg['BZipDump'] && @function_exists('bzdecompress')); - if ($is_bzip || $is_gzip) { - echo '
' . "\n"; - echo '   ' . $strCompression . ':
   ' . "\n" - . '   ' . "\n" - . '   ' . "\n"; - if ($is_gzip) { - echo '   ' . "\n"; - } - if ($is_bzip) { - echo '   ' . "\n"; - } - } else { - ?> - -
' . "\n"; - echo '  ' . $strWebServerUploadDirectory . ': ' . "\n"; - echo '
' . "\n"; - // add 2004-05-08 by mkkeck - // todo: building a php script for indexing files in UploadDir - //if ($cfg['UploadDirIndex']) { - // echo ' ' . $cfg['UploadDir'] . ' '; - //} - // end indexing - echo ' ' . "\n" - . '
' . $strError . '
' . $strWebServerUploadDirectoryError - . '
' . "\n"; - if (PMA_MYSQL_INT_VERSION < 40100 && $cfg['AllowAnywhereRecoding'] && $allow_recoding) { - $temp_charset = reset($cfg['AvailableCharsets']); - echo ' ' . $strCharsetOfFile . "\n" - . '
' . "\n" . ' '; - } elseif (PMA_MYSQL_INT_VERSION >= 40100) { - echo $strCharsetOfFile . "\n"; - echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', NULL, 'utf8', FALSE); - } // end if (recoding) - echo '
-
- -- cgit v1.2.3