Translated using Weblate (German)
[phpmyadmin.git] / browse_foreigners.php
blob96cdc617c26ccd0450e1e9fdbac197bd2272d03c
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\Di\Container;
14 use PhpMyAdmin\Relation;
15 use PhpMyAdmin\Response;
16 use PhpMyAdmin\Util;
18 if (! defined('ROOT_PATH')) {
19 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
22 require_once ROOT_PATH . 'libraries/common.inc.php';
24 Util::checkParameters(['db', 'table', 'field'], true);
26 $container = Container::getDefaultContainer();
27 $container->set(Response::class, Response::getInstance());
29 /** @var Response $response */
30 $response = $container->get(Response::class);
32 /** @var DatabaseInterface $dbi */
33 $dbi = $container->get(DatabaseInterface::class);
35 $controller = new BrowseForeignersController(
36 $response,
37 $dbi,
38 new BrowseForeigners(
39 $GLOBALS['cfg']['LimitChars'],
40 $GLOBALS['cfg']['MaxRows'],
41 $GLOBALS['cfg']['RepeatCells'],
42 $GLOBALS['cfg']['ShowAll'],
43 $GLOBALS['pmaThemeImage']
45 new Relation($dbi)
48 $response->getFooter()->setMinimal();
49 $header = $response->getHeader();
50 $header->disableMenuAndConsole();
51 $header->setBodyId('body_browse_foreigners');
53 $response->addHTML($controller->index([
54 'db' => $_POST['db'] ?? null,
55 'table' => $_POST['table'] ?? null,
56 'field' => $_POST['field'] ?? null,
57 'fieldkey' => $_POST['fieldkey'] ?? null,
58 'data' => $_POST['data'] ?? null,
59 'foreign_showAll' => $_POST['foreign_showAll'] ?? null,
60 'foreign_filter' => $_POST['foreign_filter'] ?? null,
61 ]));