Translated using Weblate (Bulgarian)
[phpmyadmin.git] / tbl_printview.php
blob94542728a3169be4a7cd3984323aae05cd612ff8
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Print view for table
6 * @package PhpMyAdmin
7 */
9 /**
10 * include the common file
12 require_once 'libraries/common.inc.php';
14 $response = PMA_Response::getInstance();
15 $response->getHeader()->enablePrintView();
17 require 'libraries/tbl_common.inc.php';
19 // Check parameters
21 if (! isset($the_tables) || ! is_array($the_tables)) {
22 $the_tables = array();
25 /**
26 * Gets the relations settings
28 require_once 'libraries/transformations.lib.php';
29 require_once 'libraries/Index.class.php';
30 require_once 'libraries/tbl_printview.lib.php';
32 $cfgRelation = PMA_getRelationsParam();
34 /** @var PMA_String $pmaString */
35 $pmaString = $GLOBALS['PMA_String'];
37 /**
38 * Defines the url to return to in case of error in a sql statement
40 if ($pmaString->strlen($table)) {
41 $err_url = 'tbl_sql.php?' . PMA_URL_getCommon($db, $table);
42 } else {
43 $err_url = 'db_sql.php?' . PMA_URL_getCommon($db);
47 /**
48 * Selects the database
50 $GLOBALS['dbi']->selectDb($db);
52 /**
53 * Multi-tables printview
55 if (isset($_POST['selected_tbl']) && is_array($_POST['selected_tbl'])) {
56 $the_tables = $_POST['selected_tbl'];
57 } elseif ($pmaString->strlen($table)) {
58 $the_tables[] = $table;
61 $response->addHTML(PMA_getHtmlForTablesInfo($the_tables));
62 $response->addHTML(
63 PMA_getHtmlForTablesDetail(
64 $the_tables, $db, $cfg, $cfgRelation,
65 $cell_align_left
69 /**
70 * Displays the footer
72 $response->addHTML(PMA_getHtmlForPrintViewFooter());
74 exit;