// some types, for example longtext, are reported as
    // "longtext character set latin7" when their charset and / or collation
    // differs from the ones of the corresponding database.
    $tmp = mb_strpos($type, 'character set');
    if ($tmp) {
        $type = mb_substr($type, 0, $tmp - 1);
    }
    // rtrim the type, for cases like "float unsigned"
    $type = rtrim($type);
    if (isset($submit_length) && $submit_length != false) {
        $length = $submit_length;
    }
    // Variable tell if current column is bound in a foreign key constraint or not.
    if (isset($columnMeta['Field']) && isset($_form_params['table'])) {
        $columnMeta['column_status'] = PMA_checkChildForeignReferences($_form_params['db'], $_form_params['table'], $columnMeta['Field'], $foreigners, $child_references);
    }
    // old column attributes
    if ($is_backup) {
        $_form_params = PMA_getFormParamsForOldColumn($columnMeta, $length, $_form_params, $columnNumber, $type, $extracted_columnspec);
    }
    $content_cells[$columnNumber] = PMA_getHtmlForColumnAttributes($columnNumber, isset($columnMeta) ? $columnMeta : array(), mb_strtoupper($type), $length_values_input_size, $length, isset($default_current_timestamp) ? $default_current_timestamp : null, isset($extracted_columnspec) ? $extracted_columnspec : null, isset($submit_attribute) ? $submit_attribute : null, isset($analyzed_sql) ? $analyzed_sql : null, isset($submit_default_current_timestamp) ? $submit_default_current_timestamp : null, $comments_map, isset($fields_meta) ? $fields_meta : null, $is_backup, isset($move_columns) ? $move_columns : array(), $cfgRelation, isset($available_mime) ? $available_mime : array(), isset($mime_map) ? $mime_map : array());
}
// end for
$html = PMA_getHtmlForTableCreateOrAddField($action, $_form_params, $content_cells, $header_cells);
unset($_form_params);
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('jquery/jquery.uitablefilter.js');
$scripts->addFile('indexes.js');
$response->addHTML($html);
コード例 #2
0
        }
        $type = $extracted_columnspec['type'];
        $length = $extracted_columnspec['spec_in_brackets'];
    } else {
        // creating a column
        $columnMeta['Type'] = '';
        $type = '';
        $length = '';
    }
    // some types, for example longtext, are reported as
    // "longtext character set latin7" when their charset and / or collation
    // differs from the ones of the corresponding database.
    $tmp = strpos($type, 'character set');
    if ($tmp) {
        $type = substr($type, 0, $tmp - 1);
    }
    // rtrim the type, for cases like "float unsigned"
    $type = rtrim($type);
    if (isset($submit_length) && $submit_length != false) {
        $length = $submit_length;
    }
    // old column attributes
    if ($is_backup) {
        $_form_params = PMA_getFormParamsForOldColumn($columnMeta, $length, $_form_params);
    }
    $content_cells[$columnNumber] = PMA_getHtmlForColumnAttributes($columnNumber, isset($columnMeta) ? $columnMeta : null, strtoupper($type), $length_values_input_size, $length, isset($default_current_timestamp) ? $default_current_timestamp : null, isset($extracted_columnspec) ? $extracted_columnspec : null, isset($submit_attribute) ? $submit_attribute : null, isset($analyzed_sql) ? $analyzed_sql : null, isset($submit_default_current_timestamp) ? $submit_default_current_timestamp : null, $comments_map, isset($fields_meta) ? $fields_meta : null, $is_backup, isset($move_columns) ? $move_columns : null, $cfgRelation, $available_mime, $mime_map);
}
// end for
$html = PMA_getHtmlForTableCreateOrAddField($action, $_form_params, $content_cells, $header_cells);
unset($_form_params);
PMA_Response::getInstance()->addHTML($html);