Translated using Weblate (Albanian)
[phpmyadmin.git] / browse_foreigners.php
blobac28f304236a7ae5186eea42b59c0255a5192342
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 use PMA\libraries\Response;
10 require_once 'libraries/common.inc.php';
11 require_once 'libraries/transformations.lib.php';
12 require_once 'libraries/browse_foreigners.lib.php';
14 /**
15 * Sets globals from $_REQUEST
17 $request_params = array(
18 'data',
19 'field'
22 foreach ($request_params as $one_request_param) {
23 if (isset($_REQUEST[$one_request_param])) {
24 $GLOBALS[$one_request_param] = $_REQUEST[$one_request_param];
28 PMA\libraries\Util::checkParameters(array('db', 'table', 'field'));
30 $response = Response::getInstance();
31 $response->getFooter()->setMinimal();
32 $header = $response->getHeader();
33 $header->disableMenuAndConsole();
34 $header->setBodyId('body_browse_foreigners');
36 /**
37 * Displays the frame
40 $foreigners = PMA_getForeigners($db, $table);
41 $foreign_limit = PMA_getForeignLimit(
42 isset($_REQUEST['foreign_showAll']) ? $_REQUEST['foreign_showAll'] : null
45 $foreignData = PMA_getForeignData(
46 $foreigners, $_REQUEST['field'], true,
47 isset($_REQUEST['foreign_filter'])
48 ? $_REQUEST['foreign_filter']
49 : '',
50 isset($foreign_limit) ? $foreign_limit : null,
51 true // for getting value in $foreignData['the_total']
54 // HTML output
55 $html = PMA_getHtmlForRelationalFieldSelection(
56 $db, $table, $_REQUEST['field'], $foreignData,
57 isset($fieldkey) ? $fieldkey : null,
58 isset($data) ? $data : null
61 $response->addHtml($html);