当前位置: 首页>>代码示例>>PHP>>正文


PHP PMA_URL_getHiddenInputs函数代码示例

本文整理汇总了PHP中PMA_URL_getHiddenInputs函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_URL_getHiddenInputs函数的具体用法?PHP PMA_URL_getHiddenInputs怎么用?PHP PMA_URL_getHiddenInputs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了PMA_URL_getHiddenInputs函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: PMA_getHtmlForChangePassword

/**
 * Get HTML for the Change password dialog
 *
 * @param string $username username
 * @param string $hostname hostname
 *
 * @return string html snippet
 */
function PMA_getHtmlForChangePassword($username, $hostname)
{
    /**
     * autocomplete feature of IE kills the "onchange" event handler and it
     * must be replaced by the "onpropertychange" one in this case
     */
    $chg_evt_handler = PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5 && PMA_USR_BROWSER_VER < 7 ? 'onpropertychange' : 'onchange';
    $is_privileges = basename($_SERVER['SCRIPT_NAME']) === 'server_privileges.php';
    $html = '<form method="post" id="change_password_form" ' . 'action="' . basename($GLOBALS['PMA_PHP_SELF']) . '" ' . 'name="chgPassword" ' . 'class="ajax' . ($is_privileges ? ' submenu-item' : '') . '">';
    $html .= PMA_URL_getHiddenInputs();
    /** @var PMA_String $pmaStr */
    $pmaStr = $GLOBALS['PMA_String'];
    if ($pmaStr->strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) {
        $html .= '<input type="hidden" name="username" ' . 'value="' . htmlspecialchars($username) . '" />' . '<input type="hidden" name="hostname" ' . 'value="' . htmlspecialchars($hostname) . '" />';
    }
    $html .= '<fieldset id="fieldset_change_password">' . '<legend' . ($is_privileges ? ' data-submenu-label="' . __('Change password') . '"' : '') . '>' . __('Change password') . '</legend>' . '<table class="data noclick">' . '<tr class="odd">' . '<td colspan="2">' . '<input type="radio" name="nopass" value="1" id="nopass_1" ' . 'onclick="pma_pw.value = \'\'; pma_pw2.value = \'\'; ' . 'this.checked = true" />' . '<label for="nopass_1">' . __('No Password') . '</label>' . '</td>' . '</tr>' . '<tr class="even vmiddle">' . '<td>' . '<input type="radio" name="nopass" value="0" id="nopass_0" ' . 'onclick="document.getElementById(\'text_pma_pw\').focus();" ' . 'checked="checked " />' . '<label for="nopass_0">' . __('Password:') . '&nbsp;</label>' . '</td>' . '<td>' . '<input type="password" name="pma_pw" id="text_pma_pw" size="10" ' . 'class="textfield"' . $chg_evt_handler . '="nopass[1].checked = true" />' . '&nbsp;&nbsp;' . __('Re-type:') . '&nbsp;' . '<input type="password" name="pma_pw2" id="text_pma_pw2" size="10" ' . 'class="textfield"' . $chg_evt_handler . '="nopass[1].checked = true" />' . '</td>' . '</tr>';
    if (PMA_MYSQL_INT_VERSION < 50705) {
        $html .= '<tr class="vmiddle">' . '<td>' . __('Password Hashing:') . '</td>' . '<td>' . '<input type="radio" name="pw_hash" id="radio_pw_hash_new" ' . 'value="new" checked="checked" />' . '<label for="radio_pw_hash_new">MySQL&nbsp;4.1+</label>' . '</td>' . '</tr>' . '<tr id="tr_element_before_generate_password">' . '<td>&nbsp;</td>' . '<td>' . '<input type="radio" name="pw_hash" id="radio_pw_hash_old" ' . 'value="old" />' . '<label for="radio_pw_hash_old">' . __('MySQL 4.0 compatible') . '</label>' . '</td>' . '</tr>';
    } else {
        // See http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-5.html
        $html .= '<input type="hidden" name="pw_hash" value="new" />';
    }
    $html .= '</table>' . '</fieldset>' . '<fieldset id="fieldset_change_password_footer" class="tblFooters">' . '<input type="submit" name="change_pw" value="' . __('Go') . '" />' . '</fieldset>' . '</form>';
    return $html;
}
开发者ID:FilipeRamosFernandes,项目名称:phpmyadmin,代码行数:33,代码来源:display_change_password.lib.php

示例2: PMA_getHtmlForCreateTable

/**
 * Returns the html for create table.
 *
 * @param string $db database name
 *
 * @return string
 */
function PMA_getHtmlForCreateTable($db)
{
    $html = '<form id="create_table_form_minimal" method="post" ' . 'action="tbl_create.php">';
    $html .= '<fieldset>';
    $html .= '<legend>';
    if (PMA_Util::showIcons('ActionLinksMode')) {
        $html .= PMA_Util::getImage('b_newtbl.png');
    }
    $html .= __('Create table');
    $html .= ' </legend>';
    $html .= PMA_URL_getHiddenInputs($db);
    $html .= '<div class="formelement">';
    $html .= __('Name') . ":";
    $html .= '  <input type="text" name="table" maxlength="64" ' . 'size="30" required="required" />';
    $html .= ' </div>';
    $html .= '  <div class="formelement">';
    $html .= __('Number of columns') . ":";
    $html .= '  <input type="number" min="1" name="num_fields" value="4" required="required" />';
    $html .= ' </div>';
    $html .= '  <div class="clearfloat"></div>';
    $html .= '</fieldset>';
    $html .= '<fieldset class="tblFooters">';
    $html .= '   <input type="submit" value="' . __('Go') . '" />';
    $html .= '</fieldset>';
    $html .= '</form>';
    return $html;
}
开发者ID:skduncan,项目名称:pizza-order,代码行数:34,代码来源:display_create_table.lib.php

示例3: PMA_getHtmlForDataDefinitionAndManipulationStatements

/**
 * Function to get html for data definition and data manipulation statements
 *
 * @param string $url_query    url query
 * @param int    $last_version last version
 *
 * @return string
 */
function PMA_getHtmlForDataDefinitionAndManipulationStatements($url_query, $last_version)
{
    $html = '<div id="div_create_version">';
    $html .= '<form method="post" action="tbl_tracking.php?' . $url_query . '">';
    $html .= PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
    $html .= '<fieldset>';
    $html .= '<legend>';
    $html .= sprintf(__('Create version %1$s of %2$s'), $last_version + 1, htmlspecialchars($GLOBALS['db'] . '.' . $GLOBALS['table']));
    $html .= '</legend>';
    $html .= '<input type="hidden" name="version" value="' . ($last_version + 1) . '" />';
    $html .= '<p>' . __('Track these data definition statements:') . '</p>';
    $html .= '<input type="checkbox" name="alter_table" value="true"' . ' checked="checked" /> ALTER TABLE<br/>';
    $html .= '<input type="checkbox" name="rename_table" value="true"' . ' checked="checked" /> RENAME TABLE<br/>';
    $html .= '<input type="checkbox" name="create_table" value="true"' . ' checked="checked" /> CREATE TABLE<br/>';
    $html .= '<input type="checkbox" name="drop_table" value="true"' . ' checked="checked" /> DROP TABLE<br/>';
    $html .= '<br/>';
    $html .= '<input type="checkbox" name="create_index" value="true"' . ' checked="checked" /> CREATE INDEX<br/>';
    $html .= '<input type="checkbox" name="drop_index" value="true"' . ' checked="checked" /> DROP INDEX<br/>';
    $html .= '<p>' . __('Track these data manipulation statements:') . '</p>';
    $html .= '<input type="checkbox" name="insert" value="true"' . ' checked="checked" /> INSERT<br/>';
    $html .= '<input type="checkbox" name="update" value="true"' . ' checked="checked" /> UPDATE<br/>';
    $html .= '<input type="checkbox" name="delete" value="true"' . ' checked="checked" /> DELETE<br/>';
    $html .= '<input type="checkbox" name="truncate" value="true"' . ' checked="checked" /> TRUNCATE<br/>';
    $html .= '</fieldset>';
    $html .= '<fieldset class="tblFooters">';
    $html .= '<input type="hidden" name="submit_create_version" value="1" />';
    $html .= '<input type="submit" value="' . __('Create version') . '" />';
    $html .= '</fieldset>';
    $html .= '</form>';
    $html .= '</div>';
    return $html;
}
开发者ID:minggLu,项目名称:openemr,代码行数:40,代码来源:tbl_tracking.lib.php

示例4: PMA_getLogSelector

/**
 * Returns the html for log selector.
 *
 * @param Array $binary_logs Binary logs file names
 * @param Array $url_params  links parameters
 *
 * @return string
 */
function PMA_getLogSelector($binary_logs, $url_params)
{
    $html = "";
    if (count($binary_logs) > 1) {
        $html .= '<form action="server_binlog.php" method="get">';
        $html .= PMA_URL_getHiddenInputs($url_params);
        $html .= '<fieldset><legend>';
        $html .= __('Select binary log to view');
        $html .= '</legend><select name="log">';
        $full_size = 0;
        foreach ($binary_logs as $each_log) {
            $html .= '<option value="' . $each_log['Log_name'] . '"';
            if ($each_log['Log_name'] == $_REQUEST['log']) {
                $html .= ' selected="selected"';
            }
            $html .= '>' . $each_log['Log_name'];
            if (isset($each_log['File_size'])) {
                $full_size += $each_log['File_size'];
                $html .= ' (' . implode(' ', PMA_Util::formatByteDown($each_log['File_size'], 3, 2)) . ')';
            }
            $html .= '</option>';
        }
        $html .= '</select> ';
        $html .= count($binary_logs) . ' ' . __('Files') . ', ';
        if ($full_size > 0) {
            $html .= implode(' ', PMA_Util::formatByteDown($full_size));
        }
        $html .= '</fieldset>';
        $html .= '<fieldset class="tblFooters">';
        $html .= '<input type="submit" value="' . __('Go') . '" />';
        $html .= '</fieldset>';
        $html .= '</form>';
    }
    return $html;
}
开发者ID:mercysmart,项目名称:naikelas,代码行数:43,代码来源:server_bin_log.lib.php

示例5: testPMASelectServer

 /**
  * Test for PMA_selectServer
  *
  * @return void
  */
 public function testPMASelectServer()
 {
     $not_only_options = false;
     $ommit_fieldset = false;
     $GLOBALS['cfg']['DefaultTabServer'] = "DefaultTabServer";
     $GLOBALS['cfg']['Servers'] = array('0' => array('host' => 'host0', 'port' => 'port0', 'only_db' => 'only_db0', 'user' => 'user0', 'auth_type' => 'config'), '1' => array('host' => 'host1', 'port' => 'port1', 'only_db' => 'only_db1', 'user' => 'user1', 'auth_type' => 'config'));
     //$not_only_options=false & $ommit_fieldset=false
     $html = PMA_selectServer($not_only_options, $ommit_fieldset);
     $server = $GLOBALS['cfg']['Servers']['0'];
     //server items
     $this->assertContains($server['host'], $html);
     $this->assertContains($server['port'], $html);
     $this->assertContains($server['only_db'], $html);
     $this->assertContains($server['user'], $html);
     $not_only_options = true;
     $ommit_fieldset = true;
     $GLOBALS['cfg']['DisplayServersList'] = null;
     //$not_only_options=true & $ommit_fieldset=true
     $html = PMA_selectServer($not_only_options, $ommit_fieldset);
     //$GLOBALS['cfg']['DefaultTabServer']
     $this->assertContains($GLOBALS['cfg']['DefaultTabServer'], $html);
     //PMA_URL_getHiddenInputs
     $this->assertContains(PMA_URL_getHiddenInputs(), $html);
     //labels
     $this->assertContains(__('Current Server:'), $html);
     $this->assertContains('(' . __('Servers') . ')', $html);
     //server items
     $server = $GLOBALS['cfg']['Servers']['0'];
     $this->assertContains($server['host'], $html);
     $this->assertContains($server['port'], $html);
     $this->assertContains($server['only_db'], $html);
     $this->assertContains($server['user'], $html);
 }
开发者ID:kfjihailong,项目名称:phpMyAdmin,代码行数:38,代码来源:PMA_select_server_test.php

示例6: PMA_getHtmlForChangePassword

/**
 * Get HTML for the Change password dialog
 *
 * @param string $username username
 * @param string $hostname hostname
 *
 * @return string html snippet
 */
function PMA_getHtmlForChangePassword($username, $hostname)
{
    /**
     * autocomplete feature of IE kills the "onchange" event handler and it
     * must be replaced by the "onpropertychange" one in this case
     */
    $chg_evt_handler = PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5 && PMA_USR_BROWSER_VER < 7 ? 'onpropertychange' : 'onchange';
    $is_privileges = basename($_SERVER['SCRIPT_NAME']) === 'server_privileges.php';
    $html = '<form method="post" id="change_password_form" ' . 'action="' . basename($GLOBALS['PMA_PHP_SELF']) . '" ' . 'name="chgPassword" ' . 'class="' . ($is_privileges ? 'submenu-item' : '') . '">';
    $html .= PMA_URL_getHiddenInputs();
    if (strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) {
        $html .= '<input type="hidden" name="username" ' . 'value="' . htmlspecialchars($username) . '" />' . '<input type="hidden" name="hostname" ' . 'value="' . htmlspecialchars($hostname) . '" />';
    }
    $html .= '<fieldset id="fieldset_change_password">' . '<legend' . ($is_privileges ? ' data-submenu-label="' . __('Change password') . '"' : '') . '>' . __('Change password') . '</legend>' . '<table class="data noclick">' . '<tr class="odd">' . '<td colspan="2">' . '<input type="radio" name="nopass" value="1" id="nopass_1" ' . 'onclick="pma_pw.value = \'\'; pma_pw2.value = \'\'; ' . 'this.checked = true" />' . '<label for="nopass_1">' . __('No Password') . '</label>' . '</td>' . '</tr>' . '<tr class="even vmiddle">' . '<td>' . '<input type="radio" name="nopass" value="0" id="nopass_0" ' . 'onclick="document.getElementById(\'text_pma_pw\').focus();" ' . 'checked="checked" />' . '<label for="nopass_0">' . __('Password:') . '&nbsp;</label>' . '</td>' . '<td>' . '<input type="password" name="pma_pw" id="text_pma_pw" size="10" ' . 'class="textfield"' . $chg_evt_handler . '="nopass[1].checked = true" />' . '&nbsp;&nbsp;' . __('Re-type:') . '&nbsp;' . '<input type="password" name="pma_pw2" id="text_pma_pw2" size="10" ' . 'class="textfield"' . $chg_evt_handler . '="nopass[1].checked = true" />' . '</td>' . '</tr>';
    $html .= '<tr class="vmiddle">' . '<td>' . __('Password Hashing:') . '</td><td>';
    $serverType = PMA\libraries\Util::getServerType();
    $orig_auth_plugin = PMA_getCurrentAuthenticationPlugin('change', $username, $hostname);
    if ($serverType == 'MySQL' && PMA_MYSQL_INT_VERSION >= 50507 || $serverType == 'MariaDB' && PMA_MYSQL_INT_VERSION >= 50200) {
        $auth_plugin_dropdown = PMA_getHtmlForAuthPluginsDropdown($username, $hostname, $orig_auth_plugin, 'change_pw', 'new');
        $html .= $auth_plugin_dropdown;
        $html .= '</td></tr>';
        $html .= '<tr id="tr_element_before_generate_password"></tr>';
        $html .= '</table>';
        $html .= '<div ' . ($orig_auth_plugin != 'sha256_password' ? 'style="display:none"' : '') . ' id="ssl_reqd_warning_cp">' . Message::notice(__('This method requires using an \'<i>SSL connection</i>\' ' . 'or an \'<i>unencrypted connection that encrypts the password ' . 'using RSA</i>\'; while connecting to the server.') . PMA\libraries\Util::showMySQLDocu('sha256-authentication-plugin'))->getDisplay() . '</div>';
        $html .= '<div ' . ($orig_auth_plugin != 'sha256_password' ? 'style="display:none"' : '') . ' id="ssl_reqd_warning_cp">' . Message::notice(__('This method requires using an \'<i>SSL connection</i>\' ' . 'or an \'<i>unencrypted connection that encrypts the password ' . 'using RSA</i>\'; while connecting to the server.') . PMA\libraries\Util::showMySQLDocu('sha256-authentication-plugin'))->getDisplay() . '</div>';
    } else {
        $auth_plugin_dropdown = PMA_getHtmlForAuthPluginsDropdown($username, $hostname, $orig_auth_plugin, 'change_pw', 'old');
        $html .= $auth_plugin_dropdown . '</td></tr>' . '<tr id="tr_element_before_generate_password"></tr>' . '</table>';
    }
    $html .= '</fieldset>' . '<fieldset id="fieldset_change_password_footer" class="tblFooters">' . '<input type="hidden" name="change_pw" value="1" />' . '<input type="submit" value="' . __('Go') . '" />' . '</fieldset>' . '</form>';
    return $html;
}
开发者ID:ryanfmurphy,项目名称:phpmyadmin,代码行数:40,代码来源:display_change_password.lib.php

示例7: PMA_getHtmlForDatabase

/**
 * Returns the html for Database List
 *
 * @param Array  $databases         GBI return databases
 * @param int    $databases_count   database count
 * @param int    $pos               display pos
 * @param Array  $dbstats           database status
 * @param string $sort_by           sort by string
 * @param string $sort_order        sort order string
 * @param bool   $is_superuser      User status
 * @param Array  $cfg               configuration
 * @param string $replication_types replication types
 * @param string $replication_info  replication info
 * @param string $url_query         url query
 *
 * @return string
 */
function PMA_getHtmlForDatabase($databases, $databases_count, $pos, $dbstats, $sort_by, $sort_order, $is_superuser, $cfg, $replication_types, $replication_info, $url_query)
{
    $html = '<div id="tableslistcontainer">';
    reset($databases);
    $first_database = current($databases);
    // table col order
    $column_order = PMA_getColumnOrder();
    $_url_params = array('pos' => $pos, 'dbstats' => $dbstats, 'sort_by' => $sort_by, 'sort_order' => $sort_order);
    $html .= PMA_Util::getListNavigator($databases_count, $pos, $_url_params, 'server_databases.php', 'frame_content', $GLOBALS['cfg']['MaxDbList']);
    $_url_params['pos'] = $pos;
    $html .= '<form class="ajax" action="server_databases.php" ';
    $html .= 'method="post" name="dbStatsForm" id="dbStatsForm">' . "\n";
    $html .= PMA_URL_getHiddenInputs($_url_params);
    $_url_params['sort_by'] = 'SCHEMA_NAME';
    $_url_params['sort_order'] = $sort_by == 'SCHEMA_NAME' && $sort_order == 'asc' ? 'desc' : 'asc';
    $html .= '<table id="tabledatabases" class="data">' . "\n" . '<thead>' . "\n" . '<tr>' . "\n";
    $html .= PMA_getHtmlForColumnOrderWithSort($is_superuser, $cfg['AllowUserDropDatabase'], $_url_params, $sort_by, $sort_order, $column_order, $first_database);
    $html .= PMA_getHtmlForReplicationType($is_superuser, $replication_types, $cfg['ActionLinksMode']);
    $html .= '</tr>' . "\n" . '</thead>' . "\n";
    list($output, $column_order) = PMA_getHtmlAndColumnOrderForDatabaseList($databases, $is_superuser, $url_query, $column_order, $replication_types, $replication_info);
    $html .= $output;
    unset($output);
    $html .= PMA_getHtmlForTableFooter($cfg['AllowUserDropDatabase'], $is_superuser, $databases_count, $column_order, $replication_types, $first_database);
    $html .= '</table>' . "\n";
    $html .= PMA_getHtmlForTableFooterButtons($cfg['AllowUserDropDatabase'], $is_superuser, $sort_by, $sort_order, $dbstats);
    if (empty($dbstats)) {
        //we should put notice above database list
        $html = PMA_getHtmlForNoticeEnableStatistics($url_query, $html);
    }
    $html .= '</form>';
    $html .= '</div>';
    return $html;
}
开发者ID:yszar,项目名称:linuxwp,代码行数:50,代码来源:server_databases.lib.php

示例8: PMA_getHtmlForSqlQueryForm

/**
 * return HTML for the sql query boxes
 *
 * @param boolean|string $query       query to display in the textarea
 *                                    or true to display last executed
 * @param boolean|string $display_tab sql|files|history|full|false
 *                                    what part to display
 *                                    false if not inside querywindow
 * @param string         $delimiter   delimiter
 *
 * @return string
 *
 * @usedby  server_sql.php
 * @usedby  db_sql.php
 * @usedby  tbl_sql.php
 * @usedby  tbl_structure.php
 * @usedby  tbl_tracking.php
 */
function PMA_getHtmlForSqlQueryForm($query = true, $display_tab = false, $delimiter = ';')
{
    $html = '';
    if (!$display_tab) {
        $display_tab = 'full';
    }
    // query to show
    if (true === $query) {
        $query = $GLOBALS['sql_query'];
    }
    // set enctype to multipart for file uploads
    if ($GLOBALS['is_upload']) {
        $enctype = ' enctype="multipart/form-data"';
    } else {
        $enctype = '';
    }
    $table = '';
    $db = '';
    if (!mb_strlen($GLOBALS['db'])) {
        // prepare for server related
        $goto = empty($GLOBALS['goto']) ? 'server_sql.php' : $GLOBALS['goto'];
    } elseif (!mb_strlen($GLOBALS['table'])) {
        // prepare for db related
        $db = $GLOBALS['db'];
        $goto = empty($GLOBALS['goto']) ? 'db_sql.php' : $GLOBALS['goto'];
    } else {
        $table = $GLOBALS['table'];
        $db = $GLOBALS['db'];
        $goto = empty($GLOBALS['goto']) ? 'tbl_sql.php' : $GLOBALS['goto'];
    }
    // start output
    $html .= '<form method="post" action="import.php" ' . $enctype;
    $html .= ' class="ajax lock-page"';
    $html .= ' id="sqlqueryform" name="sqlform">' . "\n";
    $html .= '<input type="hidden" name="is_js_confirmed" value="0" />' . "\n" . PMA_URL_getHiddenInputs($db, $table) . "\n" . '<input type="hidden" name="pos" value="0" />' . "\n" . '<input type="hidden" name="goto" value="' . htmlspecialchars($goto) . '" />' . "\n" . '<input type="hidden" name="message_to_show" value="' . __('Your SQL query has been executed successfully.') . '" />' . "\n" . '<input type="hidden" name="prev_sql_query" value="' . htmlspecialchars($query) . '" />' . "\n";
    // display querybox
    if ($display_tab === 'full' || $display_tab === 'sql') {
        $html .= PMA_getHtmlForSqlQueryFormInsert($query, $delimiter);
    }
    // display uploads
    if ($display_tab === 'files' && $GLOBALS['is_upload']) {
        $html .= PMA_getHtmlForSqlQueryFormUpload();
    }
    // Bookmark Support
    if ($display_tab === 'full' || $display_tab === 'history') {
        $cfgBookmark = PMA_Bookmark_getParams();
        if ($cfgBookmark) {
            $html .= PMA_getHtmlForSqlQueryFormBookmark();
        }
    }
    // Encoding setting form appended by Y.Kawada
    if (function_exists('PMA_Kanji_encodingForm')) {
        $html .= PMA_Kanji_encodingForm();
    }
    $html .= '</form>' . "\n";
    // print an empty div, which will be later filled with
    // the sql query results by ajax
    $html .= '<div id="sqlqueryresults"></div>';
    return $html;
}
开发者ID:ecssjapan,项目名称:guiding-you-afteropen,代码行数:78,代码来源:sql_query_form.lib.php

示例9: PMA_getHtmlForDisplayIndexes

/**
 * Get HTML for display indexes
 *
 * @return string $html_output
 */
function PMA_getHtmlForDisplayIndexes()
{
    $html_output = '<div id="index_div" class="ajax" >';
    $html_output .= PMA_Util::getDivForSliderEffect('indexes', __('Indexes'));
    $html_output .= PMA_Index::getView($GLOBALS['table'], $GLOBALS['db']);
    $html_output .= '<fieldset class="tblFooters" style="text-align: left;">' . '<form action="tbl_indexes.php" method="post">';
    $html_output .= PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
    $html_output .= sprintf(__('Create an index on &nbsp;%s&nbsp;columns'), '<input type="number" name="added_fields" value="1" ' . 'min="1" required="required" />');
    $html_output .= '<input type="hidden" name="create_index" value="1" />' . '<input class="add_index ajax"' . ' type="submit" value="' . __('Go') . '" />';
    $html_output .= '</form>' . '</fieldset>' . '</div>' . '</div>';
    return $html_output;
}
开发者ID:skduncan,项目名称:pizza-order,代码行数:17,代码来源:index.lib.php

示例10: testPMAGetHtmlForChangePassword

    /**
     * Test for PMA_getHtmlForChangePassword
     *
     * @return void
     */
    public function testPMAGetHtmlForChangePassword()
    {
        $username = "pma_username";
        $hostname = "pma_hostname";

        //Call the test function
        $html = PMA_getHtmlForChangePassword($username, $hostname);

        //PMA_PHP_SELF
        $this->assertContains(
            $GLOBALS['PMA_PHP_SELF'],
            $html
        );

        //PMA_URL_getHiddenInputs
        $this->assertContains(
            PMA_URL_getHiddenInputs(),
            $html
        );

        //$username & $hostname
        $this->assertContains(
            htmlspecialchars($username),
            $html
        );
        $this->assertContains(
            htmlspecialchars($hostname),
            $html
        );

        //labels
        $this->assertContains(
            __('Change password'),
            $html
        );
        $this->assertContains(
            __('No Password'),
            $html
        );
        $this->assertContains(
            __('Password:'),
            $html
        );
        $this->assertContains(
            __('Password:'),
            $html
        );
        $this->assertContains(
            __('Password Hashing:'),
            $html
        );
    }
开发者ID:roccivic,项目名称:phpmyadmin,代码行数:57,代码来源:PMA_display_change_password_test.php

示例11: PMA_getHtmlForHiddenInputs

/**
 * Prints Html For Display Import Hidden Input
 *
 * @param String $import_type Import type: server, database, table
 * @param String $db          Selected DB
 * @param String $table       Selected Table
 *
 * @return string
 */
function PMA_getHtmlForHiddenInputs($import_type, $db, $table)
{
    $html = '';
    if ($import_type == 'server') {
        $html .= PMA_URL_getHiddenInputs('', '', 1);
    } elseif ($import_type == 'database') {
        $html .= PMA_URL_getHiddenInputs($db, '', 1);
    } else {
        $html .= PMA_URL_getHiddenInputs($db, $table, 1);
    }
    $html .= '    <input type="hidden" name="import_type" value="' . $import_type . '" />' . "\n";
    return $html;
}
开发者ID:kokigit,项目名称:phpmyadmin,代码行数:22,代码来源:display_import.lib.php

示例12: testPMAGetHtmlForDataDefinitionAndManipulationStatements

 /**
  * Tests for PMA_getHtmlForDataDefinitionAndManipulationStatements() method.
  *
  * @return void
  * @test
  */
 public function testPMAGetHtmlForDataDefinitionAndManipulationStatements()
 {
     $url_query = "url_query";
     $last_version = "10";
     $html = PMA_getHtmlForDataDefinitionAndManipulationStatements($url_query, $last_version, $GLOBALS['db'], array($GLOBALS['table']));
     $this->assertContains('<div id="div_create_version">', $html);
     $this->assertContains($url_query, $html);
     $this->assertContains(PMA_URL_getHiddenInputs($GLOBALS['db']), $html);
     $item = sprintf(__('Create version %1$s of %2$s'), $last_version + 1, htmlspecialchars($GLOBALS['db'] . '.' . $GLOBALS['table']));
     $this->assertContains($item, $html);
     $item = '<input type="checkbox" name="delete" value="true"' . ' checked="checked" /> DELETE<br/>';
     $this->assertContains($item, $html);
     $this->assertContains(__('Create version'), $html);
 }
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:20,代码来源:PMA_tbl_tracking_test.php

示例13: PMA_getHtmlForChangePassword

/**
 * Get HTML for the Change password dialog
 *
 * @param string $username username
 * @param string $hostname hostname
 *
 * @return string html snippet
 */
function PMA_getHtmlForChangePassword($username, $hostname)
{
    /**
     * autocomplete feature of IE kills the "onchange" event handler and it
     * must be replaced by the "onpropertychange" one in this case
     */
    $chg_evt_handler = PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5 && PMA_USR_BROWSER_VER < 7 ? 'onpropertychange' : 'onchange';
    $html = '<form method="post" id="change_password_form" ' . 'action="' . $GLOBALS['PMA_PHP_SELF'] . '" ' . 'name="chgPassword" ' . 'class="ajax" >';
    $html .= PMA_URL_getHiddenInputs();
    if (strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) {
        $html .= '<input type="hidden" name="username" ' . 'value="' . htmlspecialchars($username) . '" />' . '<input type="hidden" name="hostname" ' . 'value="' . htmlspecialchars($hostname) . '" />';
    }
    $html .= '<fieldset id="fieldset_change_password">' . '<legend>' . __('Change password') . '</legend>' . '<table class="data noclick">' . '<tr class="odd">' . '<td colspan="2">' . '<input type="radio" name="nopass" value="1" id="nopass_1" ' . 'onclick="pma_pw.value = \'\'; pma_pw2.value = \'\'; ' . 'this.checked = true" />' . '<label for="nopass_1">' . __('No Password') . '</label>' . '</td>' . '</tr>' . '<tr class="even vmiddle">' . '<td>' . '<input type="radio" name="nopass" value="0" id="nopass_0" ' . 'onclick="document.getElementById(\'text_pma_pw\').focus();" ' . 'checked="checked " />' . '<label for="nopass_0">' . __('Password:') . '&nbsp;</label>' . '</td>' . '<td>' . '<input type="password" name="pma_pw" id="text_pma_pw" size="10" ' . 'class="textfield"' . $chg_evt_handler . '="nopass[1].checked = true" />' . '&nbsp;&nbsp;' . __('Re-type:') . '&nbsp;' . '<input type="password" name="pma_pw2" id="text_pma_pw2" size="10" ' . 'class="textfield"' . $chg_evt_handler . '="nopass[1].checked = true" />' . '</td>' . '</tr>' . '<tr class="vmiddle">' . '<td>' . __('Password Hashing:') . '</td>' . '<td>' . '<input type="radio" name="pw_hash" id="radio_pw_hash_new" ' . 'value="new" checked="checked" />' . '<label for="radio_pw_hash_new">MySQL&nbsp;4.1+</label>' . '</td>' . '</tr>' . '<tr id="tr_element_before_generate_password">' . '<td>&nbsp;</td>' . '<td>' . '<input type="radio" name="pw_hash" id="radio_pw_hash_old" ' . 'value="old" />' . '<label for="radio_pw_hash_old">' . __('MySQL 4.0 compatible') . '</label>' . '</td>' . '</tr>' . '</table>' . '</fieldset>' . '<fieldset id="fieldset_change_password_footer" class="tblFooters">' . '<input type="submit" name="change_pw" value="' . __('Go') . '" />' . '</fieldset>' . '</form>';
    return $html;
}
开发者ID:AtomPy,项目名称:AtomPySite,代码行数:23,代码来源:display_change_password.lib.php

示例14: testPMAGetHtmlForCreateTable

 /**
  * Test for PMA_getHtmlForCreateTable
  *
  * @return void
  */
 public function testPMAGetHtmlForCreateTable()
 {
     $db = "pma_db";
     //Call the test function
     $html = PMA_getHtmlForCreateTable($db);
     //getImage
     $this->assertContains(PMA\libraries\Util::getImage('b_table_add.png'), $html);
     //__('Create table')
     $this->assertContains(__('Create table'), $html);
     //PMA_URL_getHiddenInputs
     $this->assertContains(PMA_URL_getHiddenInputs($db), $html);
     //label
     $this->assertContains(__('Name'), $html);
     $this->assertContains(__('Number of columns'), $html);
     //button
     $this->assertContains(__('Go'), $html);
 }
开发者ID:flash1452,项目名称:phpmyadmin,代码行数:22,代码来源:PMA_display_create_table_test.php

示例15: PMA_getLanguageSelectorHtml

/**
 * Returns HTML code for the language selector
 *
 * @param boolean $use_fieldset whether to use fieldset for selection
 * @param boolean $show_doc     whether to show documentation links
 *
 * @return string
 *
 * @access  public
 */
function PMA_getLanguageSelectorHtml($use_fieldset = false, $show_doc = true)
{
    global $lang;
    $retval = '';
    // Display language selection only if there
    // is more than one language to choose from
    if (count($GLOBALS['available_languages']) > 1) {
        $retval .= '<form method="get" action="index.php" class="disableAjax">';
        $_form_params = array('db' => $GLOBALS['db'], 'table' => $GLOBALS['table']);
        $retval .= PMA_URL_getHiddenInputs($_form_params);
        // For non-English, display "Language" with emphasis because it's
        // not a proper word in the current language; we show it to help
        // people recognize the dialog
        $language_title = __('Language') . (__('Language') != 'Language' ? ' - <em>Language</em>' : '');
        if ($show_doc) {
            $language_title .= PMA_Util::showDocu('faq', 'faq7-2');
        }
        if ($use_fieldset) {
            $retval .= '<fieldset><legend lang="en" dir="ltr">' . $language_title . '</legend>';
        } else {
            $retval .= '<bdo lang="en" dir="ltr"><label for="sel-lang">' . $language_title . ': </label></bdo>';
        }
        $retval .= '<select name="lang" class="autosubmit" lang="en"' . ' dir="ltr" id="sel-lang">';
        uasort($GLOBALS['available_languages'], 'PMA_languageCmp');
        foreach ($GLOBALS['available_languages'] as $id => $tmplang) {
            $lang_name = PMA_languageName($tmplang);
            //Is current one active?
            if ($lang == $id) {
                $selected = ' selected="selected"';
            } else {
                $selected = '';
            }
            $retval .= '<option value="' . $id . '"' . $selected . '>';
            $retval .= $lang_name;
            $retval .= '</option>';
        }
        $retval .= '</select>';
        if ($use_fieldset) {
            $retval .= '</fieldset>';
        }
        $retval .= '</form>';
    }
    return $retval;
}
开发者ID:skduncan,项目名称:pizza-order,代码行数:54,代码来源:display_select_lang.lib.php


注:本文中的PMA_URL_getHiddenInputs函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。