Translated using Weblate.
[phpmyadmin.git] / db_sql.php
blob5c64af77b6b0ded82f05b6539160af7a60f8555c
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package PhpMyAdmin
6 */
8 /**
11 require_once './libraries/common.inc.php';
13 /**
14 * Runs common work
16 $GLOBALS['js_include'][] = 'functions.js';
17 $GLOBALS['js_include'][] = 'makegrid.js';
18 $GLOBALS['js_include'][] = 'sql.js';
19 $GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js';
20 $GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
22 require './libraries/db_common.inc.php';
23 require_once './libraries/sql_query_form.lib.php';
25 // After a syntax error, we return to this script
26 // with the typed query in the textarea.
27 $goto = 'db_sql.php';
28 $back = 'db_sql.php';
30 /**
31 * Sets globals from $_GET
34 $get_params = array(
35 'db_query_force'
38 foreach ($get_params as $one_get_param) {
39 if (isset($_GET[$one_get_param])) {
40 $GLOBALS[$one_get_param] = $_GET[$one_get_param];
44 /**
45 * Gets informations about the database and, if it is empty, move to the
46 * "db_structure.php" script where table can be created
48 require './libraries/db_info.inc.php';
49 if ($num_tables == 0 && empty($db_query_force)) {
50 $sub_part = '';
51 $is_info = true;
52 include './db_structure.php';
53 exit();
56 /**
57 * Query box, bookmark, insert data from textfile
59 PMA_sqlQueryForm(true, false, isset($_REQUEST['delimiter']) ? htmlspecialchars($_REQUEST['delimiter']) : ';');
61 /**
62 * Displays the footer
64 require './libraries/footer.inc.php';