Translated using Weblate (Bulgarian)
[phpmyadmin.git] / browse_foreigners.php
bloba073cb2bcbda178db4cb4b7886611f16cc9071a1
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * display selection for relational field values
6 * @package PhpMyAdmin
7 */
8 declare(strict_types=1);
10 use PhpMyAdmin\BrowseForeigners;
11 use PhpMyAdmin\Controllers\BrowseForeignersController;
12 use PhpMyAdmin\DatabaseInterface;
13 use PhpMyAdmin\Response;
14 use PhpMyAdmin\Template;
15 use PhpMyAdmin\Util;
17 if (! defined('ROOT_PATH')) {
18 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
21 require_once ROOT_PATH . 'libraries/common.inc.php';
23 Util::checkParameters(['db', 'table', 'field'], true);
25 /** @var Response $response */
26 $response = $containerBuilder->get(Response::class);
28 /** @var DatabaseInterface $dbi */
29 $dbi = $containerBuilder->get(DatabaseInterface::class);
31 /** @var Template $template */
32 $template = $containerBuilder->get('template');
33 /* Register BrowseForeignersController dependencies */
34 $containerBuilder->set(
35 'browse_foreigners',
36 new BrowseForeigners(
37 (int) $GLOBALS['cfg']['LimitChars'],
38 (int) $GLOBALS['cfg']['MaxRows'],
39 (int) $GLOBALS['cfg']['RepeatCells'],
40 (bool) $GLOBALS['cfg']['ShowAll'],
41 $GLOBALS['pmaThemeImage'],
42 $template
46 /** @var BrowseForeignersController $controller */
47 $controller = $containerBuilder->get(BrowseForeignersController::class);
49 $response->getFooter()->setMinimal();
50 $header = $response->getHeader();
51 $header->disableMenuAndConsole();
52 $header->setBodyId('body_browse_foreigners');
54 $response->addHTML($controller->index([
55 'db' => $_POST['db'] ?? null,
56 'table' => $_POST['table'] ?? null,
57 'field' => $_POST['field'] ?? null,
58 'fieldkey' => $_POST['fieldkey'] ?? null,
59 'data' => $_POST['data'] ?? null,
60 'foreign_showAll' => $_POST['foreign_showAll'] ?? null,
61 'foreign_filter' => $_POST['foreign_filter'] ?? null,
62 ]));