Translated using Weblate (Turkish)
[phpmyadmin.git] / browse_foreigners.php
blobf3c3fab41b1fd647fa27a577c029c98d5e417f62
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 use PhpMyAdmin\BrowseForeigners;
10 use PhpMyAdmin\Relation;
11 use PhpMyAdmin\Response;
12 use PhpMyAdmin\Util;
14 require_once 'libraries/common.inc.php';
16 /**
17 * Sets globals from $_POST
19 $request_params = array(
20 'data',
21 'field'
24 foreach ($request_params as $one_request_param) {
25 if (isset($_POST[$one_request_param])) {
26 $GLOBALS[$one_request_param] = $_POST[$one_request_param];
30 Util::checkParameters(array('db', 'table', 'field'));
32 $response = Response::getInstance();
33 $response->getFooter()->setMinimal();
34 $header = $response->getHeader();
35 $header->disableMenuAndConsole();
36 $header->setBodyId('body_browse_foreigners');
38 $relation = new Relation();
40 /**
41 * Displays the frame
43 $foreigners = $relation->getForeigners($db, $table);
44 $browseForeigners = new BrowseForeigners(
45 $GLOBALS['cfg']['LimitChars'],
46 $GLOBALS['cfg']['MaxRows'],
47 $GLOBALS['cfg']['RepeatCells'],
48 $GLOBALS['cfg']['ShowAll'],
49 $GLOBALS['pmaThemeImage']
51 $foreign_limit = $browseForeigners->getForeignLimit(
52 isset($_POST['foreign_showAll']) ? $_POST['foreign_showAll'] : null
55 $foreignData = $relation->getForeignData(
56 $foreigners, $_POST['field'], true,
57 isset($_POST['foreign_filter'])
58 ? $_POST['foreign_filter']
59 : '',
60 isset($foreign_limit) ? $foreign_limit : null,
61 true // for getting value in $foreignData['the_total']
64 // HTML output
65 $html = $browseForeigners->getHtmlForRelationalFieldSelection(
66 $db,
67 $table,
68 $_POST['field'],
69 $foreignData,
70 isset($fieldkey) ? $fieldkey : null,
71 isset($data) ? $data : null
74 $response->addHtml($html);