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

📄 tbl_indexes.php

📁 WEBGAME源码,有架设说明,只是非常简单
💻 PHP
📖 第 1 页 / 共 2 页
字号:
            $edited_index_info['Sequences'][] = $i;            $edited_index_data[$i]            = array('Column_name' => '',                'Sub_part' => '');        } // end for        // Restore entered values        foreach ($column AS $i => $name) {            if ($name != '--ignore--'){                $edited_index_data[$i+1]['Column_name'] = $name;                $edited_index_data[$i+1]['Sub_part']    = $sub_part[$i];            }        } // end while    } // end if    // end preparing form values    ?><div style="float: left;"><form action="./tbl_indexes.php" method="post" name="index_frm"    onsubmit="if (typeof(this.elements['index'].disabled) != 'undefined') {        this.elements['index'].disabled = false}">    <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>    <?php    if (isset($create_index)) {        echo '<input type="hidden" name="create_index" value="1" />' . "\n";    }    if (isset($added_fields)) {        echo '    <input type="hidden" name="prev_add_fields" value="'            . $added_fields . '" />' . "\n";    }    if (isset($idx_num_fields)) {        echo '    <input type="hidden" name="idx_num_fields" value="'            . $idx_num_fields . '" />' . "\n";    }    ?><input type="hidden" name="old_index" value="<?php    echo (isset($create_index) ? '' : htmlspecialchars($old_index)); ?>" /><fieldset>    <legend>    <?php    echo (isset($create_index) ? $strCreateIndexTopic : $strModifyIndexTopic);    ?>    </legend><div class="formelement"><label for="input_index_name"><?php echo $strIndexName; ?></label><input type="text" name="index" id="input_index_name" size="25"    value="<?php echo htmlspecialchars($index); ?>" onfocus="this.select()" /></div><div class="formelement"><label for="select_index_type"><?php echo $strIndexType; ?></label><select name="index_type" id="select_index_type" onchange="return checkIndexName()">    <?php    for ($i = 0; $i < $index_types_cnt; $i++) {        if ($index_types[$i] == 'PRIMARY') {            if ($index == 'PRIMARY' || !isset($indexes_info['PRIMARY'])) {                echo '                '                     . '<option value="PRIMARY"'                     . (($index_type == 'PRIMARY') ? ' selected="selected"' : '')                     . '>PRIMARY</option>' . "\n";            }        } else {            echo '                '                 . '<option value="' . $index_types[$i] . '"'                 . (($index_type == $index_types[$i]) ? ' selected="selected"' : '')                 . '>'. $index_types[$i] . '</option>' . "\n";        } // end if... else...    } // end for    ?></select><?php echo PMA_showMySQLDocu('SQL-Syntax', 'ALTER_TABLE'); ?></div><br class="clearfloat" /><div class="warning"><?php echo $strPrimaryKeyWarning; ?></div><table><thead><tr><th><?php echo $strField; ?></th>    <th><?php echo $strSize; ?></th></tr></thead><tbody>    <?php    $odd_row = true;    foreach ($edited_index_info['Sequences'] as $seq_index) {        $add_type     = (is_array($fields_types) && count($fields_types) == count($fields_names));        $selected     = $edited_index_data[$seq_index]['Column_name'];        if (!empty($edited_index_data[$seq_index]['Sub_part'])) {            $sub_part = ' value="' . $edited_index_data[$seq_index]['Sub_part'] . '"';        } else {            $sub_part = '';        }        ?><tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>">    <td><select name="column[]">            <option value="--ignore--"                <?php if ('--ignore--' == $selected) { echo ' selected="selected"'; } ?>>                -- <?php echo $strIgnore; ?> --</option>        <?php        foreach ($fields_names AS $key => $val) {            if ($index_type != 'FULLTEXT'                || preg_match('@^(varchar|text|tinytext|mediumtext|longtext)@i', $fields_types[$key])) {                echo "\n" . '                '                     . '<option value="' . htmlspecialchars($val) . '"'                     . (($val == $selected) ? ' selected="selected"' : '') . '>'                     . htmlspecialchars($val) . (($add_type) ? ' ['                     . $fields_types[$key] . ']' : '' ) . '</option>' . "\n";            }        } // end foreach $fields_names        ?>        </select>    </td>    <td><input type="text" size="5" onfocus="this.select()"            name="sub_part[]"<?php echo $sub_part; ?> />    </td></tr>        <?php        $odd_row = !$odd_row;    } // end foreach $edited_index_info['Sequences']    ?></tbody></table></fieldset><fieldset class="tblFooters">    <input type="submit" name="do_save_data" value="<?php echo $strSave; ?>" />    <?php    echo $strOr;    echo '    ' . sprintf($strAddToIndex,            '<input type="text" name="added_fields" size="2" value="1"'        .' onfocus="this.select()" />') . "\n";    echo '    <input type="submit" name="add_fields" value="' . $strGo . '"'        .' onclick="return checkFormElementInRange(this.form,'        .' \'added_fields\', \''        . str_replace('\'', '\\\'', $GLOBALS['strInvalidColumnCount'])        . '\', 1)" />' . "\n";    ?></fieldset></form></div><?php} else {    /**     * Display indexes     */    ?>    <form action="./tbl_indexes.php" method="post"        onsubmit="return checkFormElementInRange(this, 'idx_num_fields',            '<?php echo str_replace('\'', '\\\'', $GLOBALS['strInvalidColumnCount']); ?>',            1)">    <?php    echo PMA_generate_common_hidden_inputs( $db, $table );    ?>    <table id="table_indexes" class="data">        <caption class="tblHeaders">        <?php        echo $strIndexes . ':' . "\n";        echo '        ' . PMA_showMySQLDocu('optimization',            'optimizing-database-structure');        ?>        </caption>    <?php    if ( count($ret_keys) > 0) {        $edit_link_text = '';        $drop_link_text = '';        // We need to copy the value or else the == 'both' check will always        // return true        $propicon = (string) $cfg['PropertiesIconic'];        if ($cfg['PropertiesIconic'] === true || $propicon == 'both') {            $edit_link_text = '<img class="icon" src="' . $pmaThemeImage                . 'b_edit.png" width="16" height="16" title="' . $strEdit                . '" alt="' . $strEdit . '" />';            $drop_link_text = '<img class="icon" src="' . $pmaThemeImage                . 'b_drop.png" width="16" height="16" title="' . $strDrop                . '" alt="' . $strDrop . '" />';        }        if ($cfg['PropertiesIconic'] === false || $propicon == 'both') {            $edit_link_text .= $strEdit;            $drop_link_text .= $strDrop;        }        if ($propicon == 'both') {            $edit_link_text = '<nobr>' . $edit_link_text . '</nobr>';            $drop_link_text = '<nobr>' . $drop_link_text . '</nobr>';        }        ?>        <thead>        <tr><th><?php echo $strKeyname; ?></th>            <th><?php echo $strType; ?></th>            <th><?php echo $strCardinality; ?></th>            <th colspan="2"><?php echo $strAction; ?></th>            <th colspan="2"><?php echo $strField; ?></th>        </tr>        </thead>        <tbody>        <?php        $idx_collection = PMA_show_indexes($table, $indexes, $indexes_info,            $indexes_data, true);        echo PMA_check_indexes($idx_collection);    } // end display indexes    else {        // none indexes        echo '<tbody>'            .'<tr><td colspan="7"><div class="warning">' . $strNoIndex            .'</div></td></tr>' . "\n";    }    ?>    <tr class="tblFooters"><td colspan="7">    <?php echo sprintf($strCreateIndex,        '<input type="text" size="2" name="idx_num_fields" value="1" />'); ?>    <input type="submit" name="create_index" value="<?php echo $strGo; ?>"        onclick="return checkFormElementInRange(this.form,            'idx_num_fields',            '<?php echo str_replace('\'', '\\\'', $GLOBALS['strInvalidColumnCount']); ?>',            1)" />    </td></tr>    </tbody>    </table>    </form>    <?php} // end display indexes/** * Displays the footer */echo "\n";if (!defined('PMA_IDX_INCLUDED')){    require_once('./libraries/footer.inc.php');}?>

⌨️ 快捷键说明

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