Translated using Weblate (Interlingua)
[phpmyadmin.git] / browse_foreigners.php
blob038435036fe9aeb16f3ce5becefa46214e138227
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * display selection for relational field values
6 * @package PhpMyAdmin
7 */
9 require_once 'libraries/common.inc.php';
10 require_once 'libraries/transformations.lib.php';
11 require_once 'libraries/browse_foreigners.lib.php';
13 /**
14 * Sets globals from $_REQUEST
16 $request_params = array(
17 'data',
18 'field'
21 foreach ($request_params as $one_request_param) {
22 if (isset($_REQUEST[$one_request_param])) {
23 $GLOBALS[$one_request_param] = $_REQUEST[$one_request_param];
27 PMA_Util::checkParameters(array('db', 'table', 'field'));
29 $response = PMA_Response::getInstance();
30 $response->getFooter()->setMinimal();
31 $header = $response->getHeader();
32 $header->disableMenu();
33 $header->setBodyId('body_browse_foreigners');
35 /**
36 * Displays the frame
39 $cfgRelation = PMA_getRelationsParam();
40 $foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : false);
41 $foreign_limit = PMA_getForeignLimit(
42 isset($foreign_navig) ? $foreign_navig : 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
54 $code = PMA_getJsScriptToHandleSelectRelationalFields();
56 $header->getScripts()->addCode($code);
58 // HTML output
59 $html = PMA_getHtmlForRelationalFieldSelection(
60 $db, $table, $_REQUEST['field'], $foreignData,
61 isset($fieldkey) ? $fieldkey : null,
62 isset($data) ? $data : null
65 $response->addHtml($html);