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

📄 setup.php

📁 一个用PHP编写的
💻 PHP
📖 第 1 页 / 共 5 页
字号:
                echo '<label for="select_' . $val[1] . '" class="desc" title="' . $val[2] . '">' . $val[0] . get_cfg_doc($prefix . $val[1]) . '</label>';                echo '<select name="' . $val[1] . '" id="select_' . $val[1] . '" ' . ' title="' . $val[2] . '">';                foreach ($val[3] as $opt) {                    echo '<option value="' . $opt . '"';                    if (isset($defaults[$val[1]])) {                        if (is_bool($defaults[$val[1]])) {                            if (($defaults[$val[1]] && $opt == 'TRUE') || (!$defaults[$val[1]] && $opt == 'FALSE')) {                                echo ' selected="selected"';                            }                        } else {                            if ($defaults[$val[1]] == $opt) {                                echo ' selected="selected"';                            }                        }                    } else {                        $def_val = $PMA_Config->get($val[1]);                        if (is_bool($val)) {                            if (($def_val && $opt == 'TRUE') || (!$def_val && $opt == 'FALSE')) {                                echo ' selected="selected"';                            }                        } else {                            if ($def_val == $opt) {                                echo ' selected="selected"';                            }                        }                        unset($def_val);                    }                    echo '>' . $opt . '</option>';                }                echo '</select>';                break;        }        echo '</div>' . "\n";    }    echo '<div class="buttons">';    echo '<div class="desc">Actions:</div>';    echo '<input type="submit" name="submit_save" value="' . $save .'" class="save" />';    echo '<input type="submit" name="submit_ignore" value="Cancel" class="cancel" />';    echo '</div>' . "\n";    echo '</fieldset>' . "\n";    echo "\n";}/** * Shows security options configuration form * * @param   array   optional defaults * * @return  nothing */function show_security_form($defaults = array()) {    ?><form method="post" action="">    <input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />    <input type="hidden" name="action" value="feat_security_real" />    <?php        echo get_hidden_cfg();        show_config_form(array(            array('Blowfish secret', 'blowfish_secret', 'Secret passphrase used for encrypting cookies'),            array('Force SSL connection', 'ForceSSL', 'Whether to force using secured connection while using phpMyAdmin', FALSE),            array('Show phpinfo output', 'ShowPhpInfo', 'Whether to allow users to see phpinfo() output', FALSE),            array('Show password change form', 'ShowChgPassword', 'Whether to show form for changing password, this does not limit ability to execute the same command directly', FALSE),            array('Allow login to any MySQL server', 'AllowArbitraryServer', 'If enabled user can enter any MySQL server in login form for cookie auth.', FALSE),            array('Recall user name', 'LoginCookieRecall', 'Whether to recall user name while using cookie auth.', TRUE),            array('Login cookie validity', 'LoginCookieValidity', 'How long is login valid without performing any action.'),            ),            'Configure security features',            'Please note that phpMyAdmin is just a user interface and it\'s features do not limit MySQL.',            $defaults);    ?></form>    <?php}/** * Shows MySQL manual configuration form * * @param   array   optional defaults * * @return  nothing */function show_manual_form($defaults = array()) {    ?><form method="post" action="">    <input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />    <input type="hidden" name="action" value="feat_manual_real" />    <?php        echo get_hidden_cfg();        show_config_form(array(            array('Type of MySQL documentation', 'MySQLManualType', 'These types are same as listed on MySQL download page', array('viewable', 'chapters', 'big', 'none')),            array('Base URL of MySQL documentation', 'MySQLManualBase', 'Where is MySQL documentation placed, this is usually top level directory.'),            ),            'Configure MySQL manual links',            'If you have local copy of MySQL documentation, you might want to use it in documentation links. Otherwise use <code>viewable</code> type and <code>http://dev.mysql.com/doc/refman</code> as manual base URL.',            $defaults);    ?></form>    <?php}/** * Shows charset options configuration form * * @param   array   optional defaults * * @return  nothing */function show_charset_form($defaults = array()) {    global $PMA_Config;    ?><form method="post" action="">    <input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />    <input type="hidden" name="action" value="feat_charset_real" />    <?php        echo get_hidden_cfg();        show_config_form(array(            array('Allow charset conversion', 'AllowAnywhereRecoding', 'If you want to use such functions.', FALSE),            array('Default charset', 'DefaultCharset', 'Default charset for conversion.', $PMA_Config->get('AvailableCharsets')),            array('Recoding engine', 'RecodingEngine', 'PHP can contain iconv and/or recode, select which one to use or keep autodetection.', array('auto', 'iconv', 'recode')),            array('Extra params for iconv', 'IconvExtraParams', 'Iconv can get some extra parameters for conversion see man iconv_open.'),            ),            'Configure charset conversions',            'phpMyAdmin can perform charset conversions so that you can import and export in any charset you want.',            $defaults);    ?></form>    <?php}/** * Shows PHP extensions configuration form * * @param   array   optional defaults * * @return  nothing */function show_extensions_form($defaults = array()) {    ?><form method="post" action="">    <input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />    <input type="hidden" name="action" value="feat_extensions_real" />    <?php        echo get_hidden_cfg();        show_config_form(array(            array('GD 2 is available', 'GD2Available', 'Whether you have GD 2 or newer installed', array('auto', 'yes', 'no')),            ),            'Configure extensions',            'phpMyAdmin can use several extensions, however here are configured only those that didn\'t fit elsewhere. MySQL extension is configured within server, charset conversion one on separate charsets page.',            $defaults);    ?></form>    <?php}/** * Shows MIME/relation/history configuration form * * @param   array   optional defaults * * @return  nothing */function show_relation_form($defaults = array()) {    global $PMA_Config;    ?><form method="post" action="">    <input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />    <input type="hidden" name="action" value="feat_relation_real" />    <?php        echo get_hidden_cfg();        show_config_form(array(            array('Permanent query history', 'QueryHistoryDB', 'Store history into database.', FALSE),            array('Maximal history size', 'QueryHistoryMax', 'How many queries are kept in history.'),            array('Use MIME transformations', 'BrowseMIME', 'Use MIME transformations while browsing.', TRUE),            array('PDF default page size', 'PDFDefaultPageSize', 'Default page size for PDF, you can change this while creating page.', $PMA_Config->get('PDFPageSizes')),            ),            'Configure MIME/relation/history',            'phpMyAdmin can provide additional featrues like MIME transformation, internal relations, permanent history and PDF pages generating. You have to configure database and tables that will store such information on server page. Behaviour of those functions is configured here.',            $defaults);    ?></form>    <?php}/** * Shows upload/save configuration form * * @param   array   optional defaults * * @return  nothing */function show_upload_form($defaults = array()) {    ?><form method="post" action="">    <input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />    <input type="hidden" name="action" value="feat_upload_real" />    <?php        echo get_hidden_cfg();        show_config_form(array(            array('Upload directory', 'UploadDir', 'Directory on server where you can upload files for import'),            array('Save directory', 'SaveDir', 'Directory where exports can be saved on server'),            array('Directory with docSQL', 'docSQLDir', 'Directory on server where you can place docSQL files for import'),            ),            'Configure upload/save directories',            'Enter directories, either absolute path or relative to phpMyAdmin top level directory.',            $defaults);    ?></form>    <?php}/** * Shows server configuration form * * @param   array   optional defaults * * @return  nothing */function show_server_form($defaults = array(), $number = FALSE) {    ?><form method="post" action="">    <input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />    <input type="hidden" name="action" value="addserver_real" />    <?php        echo get_hidden_cfg();        if (!($number === FALSE)) {            echo '<input type="hidden" name="server" value="' . $number . '" />';        }        $hi = array ('bookmarktable', 'relation', 'table_info', 'table_coords', 'pdf_pages', 'column_info', 'history', 'AllowDeny');        foreach ($hi as $k) {            if (isset($defaults[$k]) && (!is_string($defaults[$k]) || strlen($defaults[$k]) > 0)) {                echo '<input type="hidden" name="' . $k . '" value="' . htmlspecialchars(serialize($defaults[$k])) . '" />';            }        }        show_config_form(array(            array('Server hostname', 'host', 'Hostname where MySQL server is running'),            array('Server port', 'port', 'Port on which MySQL server is listening, leave empty if don\'t know'),            array('Server socket', 'socket', 'Socket on which MySQL server is listening, leave empty if don\'t know'),            array('Connection type', 'connect_type', 'How to connect to server, keep tcp if don\'t know', array('tcp', 'socket')),            array('PHP extension to use', 'extension', 'What PHP extension to use, use mysqli if supported', array('mysql', 'mysqli')),            array('Compress connection', 'compress', 'Whether to compress connection to MySQL server', FALSE),            array('Authentication type', 'auth_type', 'Authentication method to use', array('cookie', 'http', 'config')),            array('User for config auth', 'user', 'Leave empty if not using config auth'),            array('Password for config auth', 'password', 'Leave empty if not using config auth', 'password'),            array('Only database to show', 'only_db', 'Limit listing of databases in left frame to this one'),            array('Verbose name of this server', 'verbose', 'Name to display in server selection'),            array('phpMyAdmin control user', 'controluser', 'User which phpMyAdmin can use for various actions'),            array('phpMyAdmin control user password', 'controlpass', 'Password for user which phpMyAdmin can use for various actions', 'password'),            array('phpMyAdmin database for advanced features', 'pmadb', 'phpMyAdmin will allow much more when you enable this. Table names are filled in automatically.'),            ),            'Configure server',            ($number === FALSE) ? 'Enter new server connection parameters.' : 'Editing server ' . get_server_name($defaults, $number),            $defaults, $number === FALSE ? 'Add' : '', 'Servers_');    ?></form>    <?php}/** * Shows left frame configuration form * * @param   array   optional defaults * * @return  nothing */function show_left_form($defaults = array()) {    ?><form method="post" action="">    <input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />    <input type="hidden" name="action" value="lay_left_real" />    <?php        echo get_hidden_cfg();        show_config_form(array(            array('Use light version', 'LeftFrameLight', 'Disable this if you want to see all databases at one time.', TRUE),            array('Display databases in tree', 'LeftFrameDBTree', 'Whether to display databases in tree (determined by separator defined lower)', TRUE),            array('Databases tree separator', 'LeftFrameDBSeparator', 'String that separates databases into different tree level'),            array('Table tree separator', 'LeftFrameTableSeparator', 'String that separates tables into different tree level'),            array('Maximum table tree nesting', 'LeftFrameTableLevel', 'Maximum number of childs in table tree'),            array('Show logo', 'LeftDisplayLogo', 'Whether to show logo in left frame', TRUE),            array('Display servers selection', 'LeftDisplayServers', 'Whether to show server selection in left frame', FALSE),            array('Enable pointer highlighting', 'LeftPointerEnable', 'Whether you want to highlight server under mouse', TRUE),            ),            'Configure left frame',            'Choose how do you like left frame.',            $defaults);    ?></form>    <?php}/** * Shows tabs configuration form * * @param   array   optional defaults * * @return  nothing */function show_tabs_form($defaults = array()) {    ?><form method="post" action="">    <input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />    <input type="hidden" name="action" value="lay_tabs_real" />    <?php        echo get_hidden_cfg();        show_config_form(array(            array('Default tab for server', 'DefaultTabServer', 'Tab that is displayed when entering server', array('main.php', 'server_databases.php', 'server_status.php', 'server_variables.php', 'server_privileges.php', 'server_processlist.php')),            array('Default tab for database', 'DefaultTabDatabase', 'Tab that is displayed when entering database', array('db_details_structure.php', 'db_details.php', 'db_search.php', 'db_operations.php')),            array('Default tab for table', 'DefaultTabTable', 'Tab that is displayed when entering table', array('tbl_properties_structure.php', 'sql.php', 'tbl_properties.php', 'tbl_select.php', 'tbl_change.php')),            array('Use lighter tabs', 'LightTabs', 'If you want simpler tabs enable this', FALSE),            ),            'Configure tabs',            'Choose how you want tabs to work.',            $defaults);    ?></form>    <?php}/** * Shows icons configuration form * * @param   array   optional defaults * * @return  nothing */function show_icons_form($defaults = array()) {    ?><form method="post" action="">    <input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />    <input type="hidden" name="action" value="lay_icons_real" />    <?php        echo get_hidden_cfg();        show_config_form(array(            array('Icons on errors', 'ErrorIconic', 'Whether to use icons in error messages.', TRUE),            array('Icons on main page', 'MainPageIconic', 'Whether to use icons on main page.', TRUE),            array('Icons as help links', 'ReplaceHelpImg', 'Whether to use icons as help links.', TRUE),            array('Navigation with icons', 'NavigationBarIconic', 'Whether to display navigation (eg. tabs) with icons.', array('TRUE', 'FALSE', 'both')),            array('Properties pages with icons', 'PropertiesIconic', 'Whether to display properties (eg. table lists and structure) with icons.', array('TRUE', 'FALSE', 'both')),            ),            'Configure icons',            'Select whether you prefer text or icons. Both means that text and icons will be displayed.',            $defaults);    ?></form>    <?php}/** * Shows browsing  configuration form *

⌨️ 快捷键说明

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