* Handle AJAX request for changing field information
 * (value,collation,operators,field values) in input form
 * @var post_params Object containing parameters for the POST request
 */
if (isset($_REQUEST['change_tbl_info']) && $_REQUEST['change_tbl_info'] == true) {
    $response = PMA_Response::getInstance();
    $field = $_REQUEST['field'];
    if ($field == 'pma_null') {
        $response->addJSON('field_type', '');
        $response->addJSON('field_collation', '');
        $response->addJSON('field_operators', '');
        $response->addJSON('field_value', '');
        exit;
    }
    $key = array_search($field, $table_search->getColumnNames());
    $properties = $table_search->getColumnProperties($_REQUEST['it'], $key);
    $response->addJSON('field_type', htmlspecialchars($properties['type']));
    $response->addJSON('field_collation', $properties['collation']);
    $response->addJSON('field_operators', $properties['func']);
    $response->addJSON('field_value', $properties['value']);
    exit;
}
// Gets some core libraries
require_once './libraries/tbl_common.inc.php';
$url_query .= '&goto=tbl_select.php&back=tbl_select.php';
// Gets tables informations
require_once './libraries/tbl_info.inc.php';
if (!isset($goto)) {
    $goto = $GLOBALS['cfg']['DefaultTabTable'];
}
// Defines the url to return to in case of error in the next sql statement
Пример #2
0
if (isset($_REQUEST['change_tbl_info']) && $_REQUEST['change_tbl_info'] == true) {
    $response = PMA_Response::getInstance();
    $field = $_REQUEST['field'];
    if ($field == 'pma_null') {
        $response->addJSON('field_type', '');
        $response->addJSON('field_collation', '');
        $response->addJSON('field_operators', '');
        $response->addJSON('field_value', '');
        exit;
    }
    $key = array_search($field, $table_search->getColumnNames());
    $search_index = 0;
    if (PMA_isValid($_REQUEST['it'], 'integer')) {
        $search_index = $_REQUEST['it'];
    }
    $properties = $table_search->getColumnProperties($search_index, $key);
    $response->addJSON('field_type', htmlspecialchars($properties['type']));
    $response->addJSON('field_collation', $properties['collation']);
    $response->addJSON('field_operators', $properties['func']);
    $response->addJSON('field_value', $properties['value']);
    exit;
}
// Gets some core libraries
require_once './libraries/tbl_common.inc.php';
$url_query .= '&goto=tbl_select.php&back=tbl_select.php';
// Gets tables informations
require_once './libraries/tbl_info.inc.php';
if (!isset($goto)) {
    $goto = $GLOBALS['cfg']['DefaultTabTable'];
}
// Defines the url to return to in case of error in the next sql statement