part 2 of datepicker walk through
[openemr.git] / phpmyadmin / browse_foreigners.php
blob793c00b7e53ebae106843fd897b0876ae13eb7d6
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->disableMenuAndConsole();
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($_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
53 // HTML output
54 $html = PMA_getHtmlForRelationalFieldSelection(
55 $db, $table, $_REQUEST['field'], $foreignData,
56 isset($fieldkey) ? $fieldkey : null,
57 isset($data) ? $data : null
60 $response->addHtml($html);