⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tbl_change.php

📁 phpMyAdmin图形界面化操作,我已经配置好了,只要把解要压缩后的文件放到站点下就可以用了
💻 PHP
📖 第 1 页 / 共 4 页
字号:
                        $onclick .= '1, ';                    } else {                        $onclick .= '2, ';                    }                } elseif (strstr($field['True_Type'], 'set')) {                    $onclick     .= '3, ';                } elseif ($foreigners && isset($foreigners[$field['Field']]) && $foreignData['foreign_link'] == false) {                    // foreign key in a drop-down                    $onclick     .= '4, ';                } elseif ($foreigners && isset($foreigners[$field['Field']]) && $foreignData['foreign_link'] == true) {                    // foreign key with a browsing icon                     $onclick     .= '6, ';                } else {                    $onclick     .= '5, ';                }                $onclick         .= '\'' . PMA_escapeJsString($field['Field_html']) . '\', \'' . $field['Field_md5'] . '\', \'' . PMA_escapeJsString($vkey) . '\'); this.checked = true}; return true" />' . "\n";                echo $onclick;            } else {                echo '            <input type="hidden" name="fields_null' . $field_name_appendix . '"';                if ($real_null_value && !$field['first_timestamp']) {                    echo ' value="on"';                }                echo ' />' . "\n";            }        }        echo '        </td>' . "\n";        // The value column (depends on type)        // ----------------        // See bug #1667887 for the reason why we don't use the maxlength        // HTML attribute        echo '        <td>' . "\n";        if ($foreignData['foreign_link'] == true) {            echo $backup_field . "\n";            ?>            <input type="hidden" name="fields_type<?php echo $field_name_appendix; ?>"                value="foreign" />            <input type="hidden" name="fields<?php echo $field_name_appendix; ?>"                value="" id="field_<?php echo ($idindex); ?>_3A" />            <input type="text" name="field_<?php echo $field_name_appendix_md5; ?>"                class="textfield" <?php echo $unnullify_trigger; ?>                tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>"                id="field_<?php echo ($idindex); ?>_3"                value="<?php echo htmlspecialchars($data); ?>" />            <script type="text/javascript">            //<![CDATA[                document.writeln('<a target="_blank" onclick="window.open(this.href, \'foreigners\', \'width=640,height=240,scrollbars=yes,resizable=yes\'); return false"');                document.write(' href="browse_foreigners.php?');                document.write('<?php echo PMA_generate_common_url($db, $table); ?>');                document.writeln('&amp;field=<?php echo PMA_escapeJsString(urlencode($field['Field']) . $browse_foreigners_uri); ?>">');                document.writeln('<?php echo str_replace("'", "\'", $titles['Browse']); ?></a>');            //]]>            </script>            <?php        } elseif (is_array($foreignData['disp_row'])) {            echo $backup_field . "\n";            ?>            <input type="hidden" name="fields_type<?php echo $field_name_appendix; ?>"                value="foreign" />            <input type="hidden" name="fields<?php echo $field_name_appendix; ?>"                value="" id="field_<?php echo $idindex; ?>_3A" />            <select name="field_<?php echo $field_name_appendix_md5; ?>"                <?php echo $unnullify_trigger; ?>                tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>"                id="field_<?php echo ($idindex); ?>_3">                <?php echo PMA_foreignDropdown($foreignData['disp_row'], $foreignData['foreign_field'], $foreignData['foreign_display'], $data, $cfg['ForeignKeyMaxLimit']); ?>            </select>            <?php                // still needed? :            unset($foreignData['disp_row']);        } elseif ($cfg['LongtextDoubleTextarea'] && strstr($field['pma_type'], 'longtext')) {            ?>            &nbsp;</td>        </tr>        <tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>">            <td colspan="5" align="right">                <?php echo $backup_field . "\n"; ?>                <textarea name="fields<?php echo $field_name_appendix; ?>"                    rows="<?php echo ($cfg['TextareaRows']*2); ?>"                    cols="<?php echo ($cfg['TextareaCols']*2); ?>"                    dir="<?php echo $text_dir; ?>"                    id="field_<?php echo ($idindex); ?>_3"                    <?php echo $unnullify_trigger; ?>                    tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>"                    ><?php echo $special_chars_encoded; ?></textarea>          <?php        } elseif (strstr($field['pma_type'], 'text')) {            echo $backup_field . "\n";            ?>                <textarea name="fields<?php echo $field_name_appendix; ?>"                    rows="<?php echo $cfg['TextareaRows']; ?>"                    cols="<?php echo $cfg['TextareaCols']; ?>"                    dir="<?php echo $text_dir; ?>"                    id="field_<?php echo ($idindex); ?>_3"                    <?php echo $unnullify_trigger; ?>                    tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>"                    ><?php echo $special_chars_encoded; ?></textarea>            <?php            echo "\n";            if (strlen($special_chars) > 32000) {                echo "        </td>\n";                echo '        <td>' . $strTextAreaLength;            }        } elseif ($field['pma_type'] == 'enum') {            if (! isset($table_fields[$i]['values'])) {                $table_fields[$i]['values'] = array();                foreach ($extracted_fieldspec['enum_set_values'] as $val) {                    // Removes automatic MySQL escape format                    $val = str_replace('\'\'', '\'', str_replace('\\\\', '\\', $val));                    $table_fields[$i]['values'][] = array(                        'plain' => $val,                        'html'  => htmlspecialchars($val),                    );                }            }            $field_enum_values = $table_fields[$i]['values'];            ?>                <input type="hidden" name="fields_type<?php echo $field_name_appendix; ?>" value="enum" />                <input type="hidden" name="fields<?php echo $field_name_appendix; ?>" value="" />            <?php            echo "\n" . '            ' . $backup_field . "\n";            // show dropdown or radio depend on length            if (strlen($field['Type']) > 20) {                ?>                <select name="field_<?php echo $field_name_appendix_md5; ?>"                    <?php echo $unnullify_trigger; ?>                    tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>"                    id="field_<?php echo ($idindex); ?>_3">                    <option value="">&nbsp;</option>                <?php                echo "\n";                foreach ($field_enum_values as $enum_value) {                    echo '                ';                    echo '<option value="' . $enum_value['html'] . '"';                    if ($data == $enum_value['plain']                     || ($data == ''                      && (! isset($primary_key) || $field['Null'] != 'YES')                      && isset($field['Default'])                      && $enum_value['plain'] == $field['Default'])) {                        echo ' selected="selected"';                    }                    echo '>' . $enum_value['html'] . '</option>' . "\n";                } // end for                ?>                </select>                <?php            } else {                $j = 0;                foreach ($field_enum_values as $enum_value) {                    echo '            ';                    echo '<input type="radio" name="field_' . $field_name_appendix_md5 . '"';                    echo ' value="' . $enum_value['html'] . '"';                    echo ' id="field_' . ($idindex) . '_3_'  . $j . '"';                    echo ' onclick="';                    echo "if (typeof(document.forms['insertForm'].elements['fields_null"                        . $field_name_appendix . "']) != 'undefined') {document.forms['insertForm'].elements['fields_null"                        . $field_name_appendix . "'].checked = false}";                    echo '"';                    if ($data == $enum_value['plain']                     || ($data == ''                      && (! isset($primary_key) || $field['Null'] != 'YES')                      && isset($field['Default'])                      && $enum_value['plain'] == $field['Default'])) {                        echo ' checked="checked"';                    }                    echo ' tabindex="' . ($tabindex + $tabindex_for_value) . '" />';                    echo '<label for="field_' . $idindex . '_3_' . $j . '">'                        . $enum_value['html'] . '</label>' . "\n";                    $j++;                } // end for            } // end else        } elseif ($field['pma_type'] == 'set') {            if (! isset($table_fields[$i]['values'])) {                $table_fields[$i]['values'] = array();                foreach ($extracted_fieldspec['enum_set_values'] as $val) {                    $table_fields[$i]['values'][] = array(                        'plain' => $val,                        'html'  => htmlspecialchars($val),                    );                }                $table_fields[$i]['select_size'] = min(4, count($table_fields[$i]['values']));            }            $field_set_values = $table_fields[$i]['values'];            $select_size = $table_fields[$i]['select_size'];            $vset = array_flip(explode(',', $data));            echo $backup_field . "\n";            ?>                <input type="hidden" name="fields_type<?php echo $field_name_appendix; ?>" value="set" />                <input type="hidden" name="fields<?php echo $field_name_appendix; ?>" value="" />                <select name="field_<?php echo $field_name_appendix_md5; ?>"                    size="<?php echo $select_size; ?>"                    multiple="multiple" <?php echo $unnullify_trigger; ?>                    tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>"                    id="field_<?php echo ($idindex); ?>_3">            <?php            foreach ($field_set_values as $field_set_value) {                echo '                ';                echo '<option value="' . $field_set_value['html'] . '"';                if (isset($vset[$field_set_value['plain']])) {                    echo ' selected="selected"';                }                echo '>' . $field_set_value['html'] . '</option>' . "\n";            } // end for            ?>                </select>            <?php        }        // Change by Bernard M. Piller <bernard@bmpsystems.com>        // We don't want binary data destroyed        elseif ($field['is_binary'] || $field['is_blob']) {            if (($cfg['ProtectBinary'] && $field['is_blob'])                || ($cfg['ProtectBinary'] == 'all' && $field['is_binary'])) {                echo "\n";                    // rajk - for blobstreaming                    $bs_reference_exists = FALSE;                    if (isset ($tbl_type) && strlen ($tbl_type) > 0)                    {                        // load PMA_Config                        $PMA_Config = $_SESSION['PMA_Config'];                        if (!empty($PMA_Config))                        {                            $requiredTblType = $PMA_Config->get('PBXT_NAME');                            if ($requiredTblType == strtolower ($tbl_type))                            {                                $pluginsExist = $PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST');                                // check if blobstreaming plugins exist                                if ($pluginsExist)                                {                                    $bs_tables = $PMA_Config->get('BLOBSTREAMABLE_DATABASES');                                    if (!empty($bs_tables) && strlen($db) > 0)                                    {                                        $bs_tables = $bs_tables[$db];                                        if (isset($bs_tables))                                        {                                            $allBSTablesExist = TRUE;                                            foreach ($bs_tables as $table_key=>$bs_tbl)                                                if (!$bs_tables[$table_key]['Exists'])                                                {                                                    $allBSTablesExist = FALSE;                                                    break;                                                }                                            if ($allBSTablesExist)                                                $bs_reference_exists = PMA_BS_ReferenceExists($data, $db);                                        }   // end if (isset($bs_tables))                                    }   // end if (!empty($bs_tables) && strlen($db) > 0)                                }   // end if ($pluginsExist)                            }   // end if ($requiredTblType == strtolower ($tbl_type))                        }   // end if (!empty($PMA_Config))                    }   // end if (isset ($tbl_type) && strlen ($tbl_type) > 0)                    if ($bs_reference_exists)                    {                        echo '<input type="hidden" name="remove_blob_ref_' . $field['Field_html'] . $vkey . '" value="' . $data . '" />';                        echo '<input type="checkbox" name="remove_blob_repo_' . $field['Field_html'] . $vkey . '" /> ' . $strBLOBRepositoryRemove . "<br />";                        echo PMA_BS_CreateReferenceLink($data, $db);                        echo "<br />";                    }                    else                    {                        echo $strBinaryDoNotEdit;                        if (isset($data)) {                            $data_size = PMA_formatByteDown(strlen(stripslashes($data)), 3, 1);                            echo ' ('. $data_size [0] . ' ' . $data_size[1] . ')';                                    unset($data_size);                        }                        echo "\n";                    }   // end if ($bs_reference_exists)                ?>                <input type="hidden" name="fields_type<?php echo $field_name_appendix; ?>" value="protected" />                <input type="hidden" name="fields<?php echo $field_name_appendix; ?>" value="" />                <?php            } elseif ($field['is_blob']) {                echo "\n";                echo $backup_field . "\n";                ?>                <textarea name="fields<?php echo $field_name_appendix; ?>"                    rows="<?php echo $cfg['TextareaRows']; ?>"                    cols="<?php echo $cfg['TextareaCols']; ?>"                    dir="<?php echo $text_dir; ?>"                    id="field_<?php echo ($idindex); ?>_3"                    <?php echo $unnullify_trigger; ?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -