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


PHP PMA_Util::showHint方法代码示例

本文整理汇总了PHP中PMA_Util::showHint方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Util::showHint方法的具体用法?PHP PMA_Util::showHint怎么用?PHP PMA_Util::showHint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PMA_Util的用法示例。


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

示例1: PMA_getUsersOverview

/**
 * Get HTML for display the users overview
 * (if less than 50 users, display them immediately)
 *
 * @param array  $result            ran sql query
 * @param array  $db_rights         user's database rights array
 * @param string $link_edit         standard link to edit privileges
 * @param string $pmaThemeImage     a image source link
 * @param string $text_dir          text directory
 * @param string $conditional_class if ajaxable 'Ajax' otherwise ''
 * @param string $link_export       standard link to export privileges
 *
 * @return string HTML snippet
 */
function PMA_getUsersOverview($result, $db_rights, $link_edit, $pmaThemeImage, $text_dir, $conditional_class, $link_export)
{
    while ($row = PMA_DBI_fetch_assoc($result)) {
        $row['privs'] = PMA_extractPrivInfo($row, true);
        $db_rights[$row['User']][$row['Host']] = $row;
    }
    @PMA_DBI_free_result($result);
    $html_output = '<form name="usersForm" id="usersForm" action="server_privileges.php" ' . 'method="post">' . "\n" . PMA_generate_common_hidden_inputs('', '') . '<table id="tableuserrights" class="data">' . "\n" . '<thead>' . "\n" . '<tr><th></th>' . "\n" . '<th>' . __('User') . '</th>' . "\n" . '<th>' . __('Host') . '</th>' . "\n" . '<th>' . __('Password') . '</th>' . "\n" . '<th>' . __('Global privileges') . ' ' . PMA_Util::showHint(__('Note: MySQL privilege names are expressed in English')) . '</th>' . "\n" . '<th>' . __('Grant') . '</th>' . "\n" . '<th colspan="2">' . __('Action') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n";
    $html_output .= '<tbody>' . "\n";
    $html_output .= PMA_getTableBodyForUserRightsTable($db_rights, $link_edit, $link_export);
    $html_output .= '</tbody>' . '</table>' . "\n";
    $html_output .= '<div style="float:left;">' . '<img class="selectallarrow"' . ' src="' . $pmaThemeImage . 'arrow_' . $text_dir . '.png"' . ' width="38" height="22"' . ' alt="' . __('With selected:') . '" />' . "\n" . '<input type="checkbox" id="checkall" title="' . __('Check All') . '" /> ' . '<label for="checkall">' . __('Check All') . '</label> ' . '<i style="margin-left: 2em">' . __('With selected:') . '</i>' . "\n";
    $html_output .= PMA_Util::getButtonOrImage('submit_mult', 'mult_submit', 'submit_mult_export', __('Export'), 'b_tblexport.png', 'export');
    $html_output .= '<input type="hidden" name="initial" ' . 'value="' . (isset($_GET['initial']) ? $_GET['initial'] : '') . '" />';
    $html_output .= '</div>' . '<div class="clear_both" style="clear:both"></div>';
    // add/delete user fieldset
    $html_output .= PMA_getFieldsetForAddDeleteUser($conditional_class);
    $html_output .= '</form>' . "\n";
    return $html_output;
}
开发者ID:SashiAsakura,项目名称:AWS_QuikID_website,代码行数:34,代码来源:server_privileges.lib.php

示例2: PMA_tableHeader

/**
 * display table header (<table><thead>...</thead><tbody>)
 *
 * @param boolean $db_is_system_schema whether db is information schema or not
 * @param boolean $replication         whether to sho replication status
 *
 * @return string html data
 */
function PMA_tableHeader($db_is_system_schema = false, $replication = false)
{
    $cnt = 0;
    // Let's count the columns...
    if ($db_is_system_schema) {
        $action_colspan = 4;
    } else {
        $action_colspan = 7;
    }
    $html_output = '<table class="data">' . "\n" . '<thead>' . "\n" . '<tr><th></th>' . "\n" . '<th>' . PMA_sortableTableHeader(__('Table'), 'table') . '</th>' . "\n";
    if ($replication) {
        $html_output .= '<th>' . "\n" . '        ' . __('Replication') . "\n" . '</th>';
    }
    $html_output .= '<th colspan="' . $action_colspan . '">' . "\n" . '        ' . __('Action') . "\n" . '</th>' . '<th>' . PMA_sortableTableHeader(__('Rows'), 'records', 'DESC') . PMA_Util::showHint(PMA_sanitize(__('May be approximate. See [doc@faq3-11]FAQ 3.11[/doc].'))) . "\n" . '</th>' . "\n";
    if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)) {
        $html_output .= '<th>' . PMA_sortableTableHeader(__('Type'), 'type') . '</th>' . "\n";
        $cnt++;
        $html_output .= '<th>' . PMA_sortableTableHeader(__('Collation'), 'collation') . '</th>' . "\n";
        $cnt++;
    }
    if ($GLOBALS['is_show_stats']) {
        // larger values are more interesting so default sort order is DESC
        $html_output .= '<th>' . PMA_sortableTableHeader(__('Size'), 'size', 'DESC') . '</th>' . "\n" . '<th>' . PMA_sortableTableHeader(__('Overhead'), 'overhead', 'DESC') . '</th>' . "\n";
        $cnt += 2;
    }
    if ($GLOBALS['cfg']['ShowDbStructureCreation']) {
        // larger values are more interesting so default sort order is DESC
        $html_output .= '<th>' . PMA_sortableTableHeader(__('Creation'), 'creation', 'DESC') . '</th>' . "\n";
        $cnt += 2;
    }
    if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']) {
        // larger values are more interesting so default sort order is DESC
        $html_output .= '<th>' . PMA_sortableTableHeader(__('Last update'), 'last_update', 'DESC') . '</th>' . "\n";
        $cnt += 2;
    }
    if ($GLOBALS['cfg']['ShowDbStructureLastCheck']) {
        // larger values are more interesting so default sort order is DESC
        $html_output .= '<th>' . PMA_sortableTableHeader(__('Last check'), 'last_check', 'DESC') . '</th>' . "\n";
        $cnt += 2;
    }
    $html_output .= '</tr>' . "\n";
    $html_output .= '</thead>' . "\n";
    $html_output .= '<tbody>' . "\n";
    $GLOBALS['colspan_for_structure'] = $cnt + $action_colspan + 3;
    return $html_output;
}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:54,代码来源:structure.lib.php

示例3: setProperties

 /**
  * Sets the import plugin properties.
  * Called in the constructor.
  *
  * @return void
  */
 protected function setProperties()
 {
     $this->_setAnalyze(false);
     if ($GLOBALS['plugin_param'] !== 'table') {
         $this->_setAnalyze(true);
     }
     $generalOptions = parent::setProperties();
     $this->properties->setText('CSV');
     $this->properties->setExtension('csv');
     if ($GLOBALS['plugin_param'] !== 'table') {
         $leaf = new BoolPropertyItem();
         $leaf->setName("col_names");
         $leaf->setText(__('The first line of the file contains the table column names' . ' <i>(if this is unchecked, the first line will become part' . ' of the data)</i>'));
         $generalOptions->addProperty($leaf);
     } else {
         $hint = new PMA_Message(__('If the data in each row of the file is not' . ' in the same order as in the database, list the corresponding' . ' column names here. Column names must be separated by commas' . ' and not enclosed in quotations.'));
         $leaf = new TextPropertyItem();
         $leaf->setName("columns");
         $leaf->setText(__('Column names: ') . PMA_Util::showHint($hint));
         $generalOptions->addProperty($leaf);
     }
     $leaf = new BoolPropertyItem();
     $leaf->setName("ignore");
     $leaf->setText(__('Do not abort on INSERT error'));
     $generalOptions->addProperty($leaf);
 }
开发者ID:mercysmart,项目名称:naikelas,代码行数:32,代码来源:ImportCsv.class.php

示例4: getServerTrafficHtml

/**
 * Prints server traffic information
 *
 * @param Object $ServerStatusData An instance of the PMA_ServerStatusData class
 *
 * @return string
 */
function getServerTrafficHtml($ServerStatusData)
{
    $hour_factor = 3600 / $ServerStatusData->status['Uptime'];
    $start_time = PMA_DBI_fetch_value('SELECT UNIX_TIMESTAMP() - ' . $ServerStatusData->status['Uptime']);
    $retval = '<h3>';
    $retval .= sprintf(__('Network traffic since startup: %s'), implode(' ', PMA_Util::formatByteDown($ServerStatusData->status['Bytes_received'] + $ServerStatusData->status['Bytes_sent'], 3, 1)));
    $retval .= '</h3>';
    $retval .= '<p>';
    $retval .= sprintf(__('This MySQL server has been running for %1$s. It started up on %2$s.'), PMA_Util::timespanFormat($ServerStatusData->status['Uptime']), PMA_Util::localisedDate($start_time)) . "\n";
    $retval .= '</p>';
    if ($GLOBALS['server_master_status'] || $GLOBALS['server_slave_status']) {
        $retval .= '<p class="notice">';
        if ($GLOBALS['server_master_status'] && $GLOBALS['server_slave_status']) {
            $retval .= __('This MySQL server works as <b>master</b> and ' . '<b>slave</b> in <b>replication</b> process.');
        } elseif ($GLOBALS['server_master_status']) {
            $retval .= __('This MySQL server works as <b>master</b> ' . 'in <b>replication</b> process.');
        } elseif ($GLOBALS['server_slave_status']) {
            $retval .= __('This MySQL server works as <b>slave</b> ' . 'in <b>replication</b> process.');
        }
        $retval .= ' ';
        $retval .= __('For further information about replication status on the server, ' . 'please visit the <a href="#replication">replication section</a>.');
        $retval .= '</p>';
    }
    /*
     * if the server works as master or slave in replication process,
     * display useful information
     */
    if ($GLOBALS['server_master_status'] || $GLOBALS['server_slave_status']) {
        $retval .= '<hr class="clearfloat" />';
        $retval .= '<h3><a name="replication">';
        $retval .= __('Replication status');
        $retval .= '</a></h3>';
        foreach ($GLOBALS['replication_types'] as $type) {
            if (isset(${"server_{$type}_status"}) && ${"server_{$type}_status"}) {
                PMA_replication_print_status_table($type);
            }
        }
    }
    $retval .= '<table id="serverstatustraffic" class="data noclick">';
    $retval .= '<thead>';
    $retval .= '<tr>';
    $retval .= '<th colspan="2">';
    $retval .= __('Traffic') . '&nbsp;';
    $retval .= PMA_Util::showHint(__('On a busy server, the byte counters may overrun, so those statistics ' . 'as reported by the MySQL server may be incorrect.'));
    $retval .= '</th>';
    $retval .= '<th>&oslash; ' . __('per hour') . '</th>';
    $retval .= '</tr>';
    $retval .= '</thead>';
    $retval .= '<tbody>';
    $retval .= '<tr class="odd">';
    $retval .= '<th class="name">' . __('Received') . '</th>';
    $retval .= '<td class="value">';
    $retval .= implode(' ', PMA_Util::formatByteDown($ServerStatusData->status['Bytes_received'], 3, 1));
    $retval .= '</td>';
    $retval .= '<td class="value">';
    $retval .= implode(' ', PMA_Util::formatByteDown($ServerStatusData->status['Bytes_received'] * $hour_factor, 3, 1));
    $retval .= '</td>';
    $retval .= '</tr>';
    $retval .= '<tr class="even">';
    $retval .= '<th class="name">' . __('Sent') . '</th>';
    $retval .= '<td class="value">';
    $retval .= implode(' ', PMA_Util::formatByteDown($ServerStatusData->status['Bytes_sent'], 3, 1));
    $retval .= '</td>';
    $retval .= '<td class="value"><?php echo';
    $retval .= implode(' ', PMA_Util::formatByteDown($ServerStatusData->status['Bytes_sent'] * $hour_factor, 3, 1));
    $retval .= '</td>';
    $retval .= '</tr>';
    $retval .= '<tr class="odd">';
    $retval .= '<th class="name">' . __('Total') . '</th>';
    $retval .= '<td class="value">';
    $retval .= implode(' ', PMA_Util::formatByteDown($ServerStatusData->status['Bytes_received'] + $ServerStatusData->status['Bytes_sent'], 3, 1));
    $retval .= '</td>';
    $retval .= '<td class="value">';
    $retval .= implode(' ', PMA_Util::formatByteDown(($ServerStatusData->status['Bytes_received'] + $ServerStatusData->status['Bytes_sent']) * $hour_factor, 3, 1));
    $retval .= '</td>';
    $retval .= '</tr>';
    $retval .= '</tbody>';
    $retval .= '</table>';
    $retval .= '<table id="serverstatusconnections" class="data noclick">';
    $retval .= '<thead>';
    $retval .= '<tr>';
    $retval .= '<th colspan="2">' . __('Connections') . '</th>';
    $retval .= '<th>&oslash; ' . __('per hour') . '</th>';
    $retval .= '<th>%</th>';
    $retval .= '</tr>';
    $retval .= '</thead>';
    $retval .= '<tbody>';
    $retval .= '<tr class="odd">';
    $retval .= '<th class="name">' . __('max. concurrent connections') . '</th>';
    $retval .= '<td class="value">';
    $retval .= PMA_Util::formatNumber($ServerStatusData->status['Max_used_connections'], 0);
    $retval .= '</td>';
    $retval .= '<td class="value">--- </td>';
//.........这里部分代码省略.........
开发者ID:dennisblokland,项目名称:MyReddit,代码行数:101,代码来源:server_status.php

示例5: PMA_getHtmlForTableInfoForm

/**
 * returns HTML for TableInfoForm
 *
 * @param int $hostname_length Selected hostname length
 *
 * @return String HTML code
 */
function PMA_getHtmlForTableInfoForm($hostname_length)
{
    $html = '        <option value="hosttable"' . (isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'hosttable' ? ' selected="selected"' : '') . '>' . __('Use Host Table') . '</option>' . '        <option value="userdefined"' . (isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'userdefined' ? ' selected="selected"' : '') . '>' . __('Use text field:') . '</option>' . '    </select>' . '</span>' . '<input type="text" name="hostname" maxlength="' . $hostname_length . '" value="' . (isset($_REQUEST['hostname']) ? $_REQUEST['hostname'] : '') . '" title="' . __('Host') . '" onchange="pred_hostname.value = \'userdefined\';" />' . PMA_Util::showHint(__('When Host table is used, this field is ignored ' . 'and values stored in Host table are used instead.')) . '</div>' . '<div class="item">' . '<label for="select_pred_password">' . '    ' . __('Password:') . '</label>' . '<span class="options">' . '    <select name="pred_password" id="select_pred_password" title="' . __('Password') . '"' . '            onchange="if (this.value == \'none\') ' . '{ pma_pw.value = \'\'; pma_pw2.value = \'\'; } ' . 'else if (this.value == \'userdefined\') ' . '{ pma_pw.focus(); pma_pw.select(); }">' . '        <option value="none"';
    if (isset($_REQUEST['username'])) {
        $html .= '  selected="selected"';
    }
    $html .= '>' . __('No Password') . '</option>' . '        <option value="userdefined"' . (isset($_REQUEST['username']) ? '' : ' selected="selected"') . '>' . __('Use text field:') . '</option>' . '    </select>' . '</span>' . '<input type="password" id="text_pma_pw" name="pma_pw" title="' . __('Password') . '" onchange="pred_password.value = \'userdefined\';" />' . '</div>' . '<div class="item">' . '<label for="text_pma_pw2">' . '    ' . __('Re-type:') . '</label>' . '<span class="options">&nbsp;</span>' . '<input type="password" name="pma_pw2" id="text_pma_pw2" title="' . __('Re-type') . '" onchange="pred_password.value = \'userdefined\';" />' . '</div>' . '<div class="item">' . '<label for="button_generate_password">' . '    ' . __('Generate Password:') . '</label>' . '<span class="options">' . '    <input type="button" class="button" ' . 'id="button_generate_password" value="' . __('Generate') . '" onclick="suggestPassword(this.form)" />' . '</span>' . '<input type="text" name="generated_pw" id="generated_pw" />' . '</div>' . '</fieldset>';
    $html .= '<fieldset id="fieldset_user_privtable_footer" class="tblFooters">' . '    <input type="hidden" name="adduser_submit" value="1" />' . '    <input type="submit" id="adduser_submit" value="' . __('Go') . '" />' . '</fieldset>';
    return $html;
}
开发者ID:bajajahsaas,项目名称:phpmyadmin,代码行数:17,代码来源:replication_gui.lib.php

示例6: foreach

if (count($columns) > 0) {
    foreach ($columns as $row) {
        $save_row[] = $row;
    }
    $saved_row_cnt  = count($save_row);
    ?>
    <fieldset>
    <legend><?php echo __('Relations'); ?></legend>

    <table>
    <tr><th><?php echo __('Column'); ?></th>
    <?php
    if ($cfgRelation['relwork']) {
        echo '<th>' . __('Internal relation');
        if (PMA_Util::isForeignKeySupported($tbl_storage_engine)) {
            echo PMA_Util::showHint(__('An internal relation is not necessary when a corresponding FOREIGN KEY relation exists.'));
        }
        echo '</th>';
    }
    if (PMA_Util::isForeignKeySupported($tbl_storage_engine)) {
        // this does not have to be translated, it's part of the MySQL syntax
        echo '<th colspan="2">' . __('Foreign key constraint') . ' (' . $tbl_storage_engine . ')';
        echo '</th>';
    }
    ?>
    </tr>
    <?php
    $odd_row = true;
    for ($i = 0; $i < $saved_row_cnt; $i++) {
        $myfield = $save_row[$i]['Field'];
        // Use an md5 as array index to avoid having special characters in the name atttibure (see bug #1746964 )
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:31,代码来源:tbl_relation.php

示例7: PMA_getHtmlForForeignKeyForm

/**
 * Function to get html for Foreign key form
 *
 * @param array  $columns            columns
 * @param array  $existrel_foreign   db, table, column
 * @param string $db                 current database
 * @param string $tbl_storage_engine table storage engine
 * @param array  $options_array      options array
 *
 * @return string
 */
function PMA_getHtmlForForeignKeyForm($columns, $existrel_foreign, $db, $tbl_storage_engine, $options_array)
{
    $html_output = '<fieldset>' . '<legend>' . __('Foreign key constraints') . '</legend>' . '<table id="foreign_keys" class="relationalTable">';
    $html_output .= '<tr><th>' . __('Actions') . '</th>';
    $html_output .= '<th>' . __('Constraint properties') . '</th>' . '<th>' . __('Column') . PMA_Util::showHint(__('Only columns with index will be displayed. You can define an' . ' index below.')) . '</th>';
    $html_output .= '<th colspan="3">' . __('Foreign key constraint') . ' (' . $tbl_storage_engine . ')';
    $html_output .= '</th></tr>';
    $odd_row = true;
    $i = 0;
    foreach ($existrel_foreign as $key => $one_key) {
        $html_output .= PMA_getHtmlForForeignKeyRow($one_key, $odd_row, $columns, $i++, $options_array, $tbl_storage_engine, $db);
        $odd_row = !$odd_row;
    }
    $html_output .= PMA_getHtmlForForeignKeyRow(array(), $odd_row, $columns, $i++, $options_array, $tbl_storage_engine, $db);
    $html_output .= '<tr>' . '<td colspan="5"><a class="formelement clearfloat' . ' add_foreign_key" href="">' . __('+ Add constraint') . '</td>';
    $html_output .= '</tr>';
    $html_output .= '</table>' . '</fieldset>';
    return $html_output;
}
开发者ID:1290800466,项目名称:yiyuanduobao,代码行数:30,代码来源:tbl_relation.lib.php

示例8: PMA_replication_gui_master_addslaveuser

/**
 * Print code to add a replication slave user to the master
 *
 * @return void
 */
function PMA_replication_gui_master_addslaveuser()
{
    list($username_length, $hostname_length) = PMA_replication_get_username_hostname_length();
    if (isset($GLOBALS['username']) && strlen($GLOBALS['username']) === 0) {
        $GLOBALS['pred_username'] = 'any';
    }
    echo '<div id="master_addslaveuser_gui">';
    echo '<form autocomplete="off" method="post" action="server_privileges.php" onsubmit="return checkAddUser(this);">';
    echo PMA_generate_common_hidden_inputs('', '');
    echo '<fieldset id="fieldset_add_user_login">' . '<legend>' . __('Add slave replication user') . '</legend>' . '<input type="hidden" name="grant_count" value="25" />' . '<input type="hidden" name="createdb" id="createdb_0" value="0" />' . '<input id="checkbox_Repl_slave_priv" type="hidden" title="Needed for the replication slaves." value="Y" name="Repl_slave_priv"/>' . '<input id="checkbox_Repl_client_priv" type="hidden" title="Needed for the replication slaves." value="Y" name="Repl_client_priv"/>' . '' . '<input type="hidden" name="sr_take_action" value="true" />' . '<div class="item">' . '<label for="select_pred_username">' . '    ' . __('User name') . ':' . '</label>' . '<span class="options">' . '    <select name="pred_username" id="select_pred_username" title="' . __('User name') . '"' . '        onchange="if (this.value == \'any\') { username.value = \'\'; } else if (this.value == \'userdefined\') { username.focus(); username.select(); }">' . '        <option value="any"' . (isset($GLOBALS['pred_username']) && $GLOBALS['pred_username'] == 'any' ? ' selected="selected"' : '') . '>' . __('Any user') . '</option>' . '        <option value="userdefined"' . (!isset($GLOBALS['pred_username']) || $GLOBALS['pred_username'] == 'userdefined' ? ' selected="selected"' : '') . '>' . __('Use text field') . ':</option>' . '    </select>' . '</span>' . '<input type="text" name="username" maxlength="' . $username_length . '" title="' . __('User name') . '"' . (empty($GLOBALS['username']) ? '' : ' value="' . (isset($GLOBALS['new_username']) ? $GLOBALS['new_username'] : $GLOBALS['username']) . '"') . ' onchange="pred_username.value = \'userdefined\';" />' . '</div>' . '<div class="item">' . '<label for="select_pred_hostname">' . '    ' . __('Host') . ':' . '</label>' . '<span class="options">' . '    <select name="pred_hostname" id="select_pred_hostname" title="' . __('Host') . '"';
    $_current_user = PMA_DBI_fetch_value('SELECT USER();');
    if (!empty($_current_user)) {
        $thishost = str_replace("'", '', substr($_current_user, strrpos($_current_user, '@') + 1));
        if ($thishost == 'localhost' || $thishost == '127.0.0.1') {
            unset($thishost);
        }
    }
    echo '    onchange="if (this.value == \'any\') { hostname.value = \'%\'; } else if (this.value == \'localhost\') { hostname.value = \'localhost\'; } ' . (empty($thishost) ? '' : 'else if (this.value == \'thishost\') { hostname.value = \'' . addslashes(htmlspecialchars($thishost)) . '\'; } ') . 'else if (this.value == \'hosttable\') { hostname.value = \'\'; } else if (this.value == \'userdefined\') { hostname.focus(); hostname.select(); }">' . "\n";
    unset($_current_user);
    // when we start editing a user, $GLOBALS['pred_hostname'] is not defined
    if (!isset($GLOBALS['pred_hostname']) && isset($GLOBALS['hostname'])) {
        switch (strtolower($GLOBALS['hostname'])) {
            case 'localhost':
            case '127.0.0.1':
                $GLOBALS['pred_hostname'] = 'localhost';
                break;
            case '%':
                $GLOBALS['pred_hostname'] = 'any';
                break;
            default:
                $GLOBALS['pred_hostname'] = 'userdefined';
                break;
        }
    }
    echo '        <option value="any"' . (isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'any' ? ' selected="selected"' : '') . '>' . __('Any host') . '</option>' . '        <option value="localhost"' . (isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'localhost' ? ' selected="selected"' : '') . '>' . __('Local') . '</option>';
    if (!empty($thishost)) {
        echo '        <option value="thishost"' . (isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'thishost' ? ' selected="selected"' : '') . '>' . __('This Host') . '</option>';
    }
    unset($thishost);
    echo '        <option value="hosttable"' . (isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'hosttable' ? ' selected="selected"' : '') . '>' . __('Use Host Table') . '</option>' . '        <option value="userdefined"' . (isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'userdefined' ? ' selected="selected"' : '') . '>' . __('Use text field') . ':</option>' . '    </select>' . '</span>' . '<input type="text" name="hostname" maxlength="' . $hostname_length . '" value="' . (isset($GLOBALS['hostname']) ? $GLOBALS['hostname'] : '') . '" title="' . __('Host') . '" onchange="pred_hostname.value = \'userdefined\';" />' . PMA_Util::showHint(__('When Host table is used, this field is ignored and values stored in Host table are used instead.')) . '</div>' . '<div class="item">' . '<label for="select_pred_password">' . '    ' . __('Password') . ':' . '</label>' . '<span class="options">' . '    <select name="pred_password" id="select_pred_password" title="' . __('Password') . '"' . '            onchange="if (this.value == \'none\') { pma_pw.value = \'\'; pma_pw2.value = \'\'; } else if (this.value == \'userdefined\') { pma_pw.focus(); pma_pw.select(); }">' . '        <option value="none"';
    if (isset($GLOBALS['username'])) {
        echo '  selected="selected"';
    }
    echo '>' . __('No Password') . '</option>' . '        <option value="userdefined"' . (isset($GLOBALS['username']) ? '' : ' selected="selected"') . '>' . __('Use text field') . ':</option>' . '    </select>' . '</span>' . '<input type="password" id="text_pma_pw" name="pma_pw" title="' . __('Password') . '" onchange="pred_password.value = \'userdefined\';" />' . '</div>' . '<div class="item">' . '<label for="text_pma_pw2">' . '    ' . __('Re-type') . ':' . '</label>' . '<span class="options">&nbsp;</span>' . '<input type="password" name="pma_pw2" id="text_pma_pw2" title="' . __('Re-type') . '" onchange="pred_password.value = \'userdefined\';" />' . '</div>' . '<div class="item">' . '<label for="button_generate_password">' . '    ' . __('Generate Password') . ':' . '</label>' . '<span class="options">' . '    <input type="button" class="button" id="button_generate_password" value="' . __('Generate') . '" onclick="suggestPassword(this.form)" />' . '</span>' . '<input type="text" name="generated_pw" id="generated_pw" />' . '</div>' . '</fieldset>';
    echo '<fieldset id="fieldset_user_privtable_footer" class="tblFooters">' . '    <input type="hidden" name="adduser_submit" value="1" />' . '    <input type="submit" id="adduser_submit" value="' . __('Go') . '" />' . '</fieldset>';
    echo '</form>';
    echo '</div>';
}
开发者ID:mindfeederllc,项目名称:openemr,代码行数:53,代码来源:replication_gui.lib.php

示例9: PMA_getHeaderCells

/**
 * Function to get header cells
 *
 * @param bool       $is_backup  whether backup or not
 * @param array|null $columnMeta column meta data
 * @param bool       $mimework   whether mimework or not
 * @param string     $db         current database
 * @param string     $table      current table
 *
 * @return array
 */
function PMA_getHeaderCells($is_backup, $columnMeta, $mimework, $db, $table)
{
    $header_cells = array();
    $header_cells[] = __('Name');
    $header_cells[] = __('Type') . PMA_Util::showMySQLDocu('data-types');
    $header_cells[] = __('Length/Values') . PMA_Util::showHint(__('If column type is "enum" or "set", please enter the values using' . ' this format: \'a\',\'b\',\'c\'…<br />If you ever need to put' . ' a backslash ("\\") or a single quote ("\'") amongst those' . ' values, precede it with a backslash (for example \'\\\\xyz\'' . ' or \'a\\\'b\').'));
    $header_cells[] = __('Default') . PMA_Util::showHint(__('For default values, please enter just a single value,' . ' without backslash escaping or quotes, using this format: a'));
    $header_cells[] = __('Collation');
    $header_cells[] = __('Attributes');
    $header_cells[] = __('Null');
    // We could remove this 'if' and let the key information be shown and
    // editable. However, for this to work, structure.lib.php must be modified
    // to use the key fields, as tbl_addfield does.
    if (!$is_backup) {
        $header_cells[] = __('Index');
    }
    $header_cells[] = '<abbr title="AUTO_INCREMENT">A_I</abbr>';
    $header_cells[] = __('Comments');
    if (isset($columnMeta)) {
        $header_cells[] = __('Move column');
    }
    if ($mimework && $GLOBALS['cfg']['BrowseMIME']) {
        $header_cells[] = __('MIME type');
        $header_link = '<a href="transformation_overview.php?' . PMA_URL_getCommon($db, $table) . '#%s" title="' . __('List of available transformations and their options') . '" target="_blank">%s</a>';
        $transformations_hint = PMA_Util::showHint(__('Please enter the values for transformation options using this' . ' format: \'a\', 100, b,\'c\'…<br />If you ever need to put' . ' a backslash ("\\") or a single quote ("\'") amongst those' . ' values, precede it with a backslash (for example \'\\\\xyz\'' . ' or \'a\\\'b\').'));
        $header_cells[] = sprintf($header_link, 'transformation', __('Browser display transformation'));
        $header_cells[] = __('Browser display transformation options') . $transformations_hint;
        $header_cells[] = sprintf($header_link, 'input_transformation', __('Input transformation'));
        $header_cells[] = __('Input transformation options') . $transformations_hint;
    }
    return $header_cells;
}
开发者ID:FilipeRamosFernandes,项目名称:phpmyadmin,代码行数:43,代码来源:tbl_columns_definition_form.lib.php

示例10: PMA_DBI_get_columns

    // end while over tables
}
// end if
// Now find out the columns of our $table
// need to use PMA_DBI_QUERY_STORE with PMA_DBI_num_rows() in mysqli
$columns = PMA_DBI_get_columns($db, $table);
if (count($columns) > 0) {
    foreach ($columns as $row) {
        $save_row[] = $row;
    }
    $saved_row_cnt = count($save_row);
    $html_output .= '<fieldset>' . '<legend>' . __('Relations') . '</legend>' . '<table>' . '<tr><th>' . __('Column') . '</th>';
    if ($cfgRelation['relwork']) {
        $html_output .= '<th>' . __('Internal relation');
        if (PMA_Util::isForeignKeySupported($tbl_storage_engine)) {
            $html_output .= PMA_Util::showHint(__('An internal relation is not necessary when a corresponding' . ' FOREIGN KEY relation exists.'));
        }
        $html_output .= '</th>';
    }
    if (PMA_Util::isForeignKeySupported($tbl_storage_engine)) {
        // this does not have to be translated, it's part of the MySQL syntax
        $html_output .= '<th colspan="2">' . __('Foreign key constraint') . ' (' . $tbl_storage_engine . ')';
        $html_output .= '</th>';
    }
    $html_output .= '</tr>';
    $odd_row = true;
    for ($i = 0; $i < $saved_row_cnt; $i++) {
        $myfield = $save_row[$i]['Field'];
        // Use an md5 as array index to avoid having special characters
        // in the name atttibure (see bug #1746964 )
        $myfield_md5 = md5($myfield);
开发者ID:mindfeederllc,项目名称:openemr,代码行数:31,代码来源:tbl_relation.php

示例11: getHtmlVariables

 /**
  * returns as HTML table of the engine's server variables
  *
  * @return string The table that was generated based on the retrieved
  *                information
  */
 function getHtmlVariables()
 {
     $odd_row = false;
     $ret = '';
     foreach ($this->getVariablesStatus() as $details) {
         $ret .= '<tr class="' . ($odd_row ? 'odd' : 'even') . '">' . "\n" . '    <td>' . "\n";
         if (!empty($details['desc'])) {
             $ret .= '        ' . PMA_Util::showHint($details['desc']) . "\n";
         }
         $ret .= '    </td>' . "\n" . '    <th>' . htmlspecialchars($details['title']) . '</th>' . "\n" . '    <td class="value">';
         switch ($details['type']) {
             case PMA_ENGINE_DETAILS_TYPE_SIZE:
                 $parsed_size = $this->resolveTypeSize($details['value']);
                 $ret .= $parsed_size[0] . '&nbsp;' . $parsed_size[1];
                 unset($parsed_size);
                 break;
             case PMA_ENGINE_DETAILS_TYPE_NUMERIC:
                 $ret .= PMA_Util::formatNumber($details['value']) . ' ';
                 break;
             default:
                 $ret .= htmlspecialchars($details['value']) . '   ';
         }
         $ret .= '</td>' . "\n" . '</tr>' . "\n";
         $odd_row = !$odd_row;
     }
     if (!$ret) {
         $ret = '<p>' . "\n" . '    ' . __('There is no detailed status information available for this storage engine.') . "\n" . '</p>' . "\n";
     } else {
         $ret = '<table class="data">' . "\n" . $ret . '</table>' . "\n";
     }
     return $ret;
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:38,代码来源:StorageEngine.class.php

示例12: testPMAGetHtmlForIndexForm

 /**
  * Tests for PMA_getHtmlForIndexForm() method.
  *
  * @return void
  * @test
  */
 public function testPMAGetHtmlForIndexForm()
 {
     $fields = array("field_name" => "field_type");
     $index = new PMA_Index();
     $form_params = array('db' => 'db', 'table' => 'table', 'create_index' => 1);
     $add_fields = 3;
     $html = PMA_getHtmlForIndexForm($fields, $index, $form_params, $add_fields);
     //PMA_URL_getHiddenInputs
     $this->assertContains(PMA_URL_getHiddenInputs($form_params), $html);
     //Index name
     $this->assertContains(__('Index name:'), $html);
     $doc_html = PMA_Util::showHint(PMA_Message::notice(__('"PRIMARY" <b>must</b> be the name of' . ' and <b>only of</b> a primary key!')));
     $this->assertContains($doc_html, $html);
     //Index name
     $this->assertContains(__('Index name:'), $html);
     $this->assertContains(PMA_Util::showMySQLDocu('ALTER_TABLE'), $html);
     //generateIndexSelector
     $this->assertContains($index->generateIndexSelector(), $html);
     //items
     $this->assertContains(__('Column'), $html);
     $this->assertContains(__('Size'), $html);
     $this->assertContains(sprintf(__('Add %s column(s) to index'), 1), $html);
     //$field_name & $field_type
     $this->assertContains("field_name", $html);
     $this->assertContains("field_type", $html);
 }
开发者ID:FilipeRamosFernandes,项目名称:phpmyadmin,代码行数:32,代码来源:PMA_tbl_indexes_test.php

示例13: printMonitor

/**
 * Prints html with monitor
 *
 * @return void
 */
function printMonitor()
{
    global $server_status, $server_db_isLocal;

?>
    <div class="tabLinks" style="display:none;">
        <a href="#pauseCharts">
            <?php echo PMA_Util::getImage('play.png'); ?>
            <?php echo __('Start Monitor'); ?>
        </a>
        <a href="#settingsPopup" class="popupLink" style="display:none;">
            <?php echo PMA_Util::getImage('s_cog.png'); ?>
            <?php echo __('Settings'); ?>
        </a>
        <?php
        if (! PMA_DRIZZLE) {
            ?>
        <a href="#monitorInstructionsDialog">
            <?php echo PMA_Util::getImage('b_help.png'); ?>
            <?php echo __('Instructions/Setup'); ?>
        </a>
        <?php
        }
        ?>
        <a href="#endChartEditMode" style="display:none;">
            <?php echo PMA_Util::getImage('s_okay.png'); ?>
            <?php echo __('Done rearranging/editing charts'); ?>
        </a>
    </div>

    <div class="popupContent settingsPopup">
        <a href="#addNewChart">
            <?php echo PMA_Util::getImage('b_chart.png'); ?>
            <?php echo __('Add chart'); ?>
        </a>
        <a href="#rearrangeCharts"><?php echo PMA_Util::getImage('b_tblops.png'); ?><?php echo __('Rearrange/edit charts'); ?></a>
        <div class="clearfloat paddingtop"></div>
        <div class="floatleft">
            <?php
            echo __('Refresh rate') . '<br />';
            echo PMA_getRefreshList('gridChartRefresh', 5, Array(2, 3, 4, 5, 10, 20, 40, 60, 120, 300, 600, 1200));
        ?><br />
        </div>
        <div class="floatleft">
            <?php echo __('Chart columns'); ?> <br />
            <select name="chartColumns">
                <option>1</option>
                <option>2</option>
                <option>3</option>
                <option>4</option>
                <option>5</option>
                <option>6</option>
                <option>7</option>
                <option>8</option>
                <option>9</option>
                <option>10</option>
            </select>
        </div>

        <div class="clearfloat paddingtop">
            <b><?php echo __('Chart arrangement'); ?></b> <?php echo PMA_Util::showHint(__('The arrangement of the charts is stored to the browsers local storage. You may want to export it if you have a complicated set up.')); ?><br/>
        <a href="#importMonitorConfig"><?php echo __('Import'); ?></a>&nbsp;&nbsp;<a href="#exportMonitorConfig"><?php echo __('Export'); ?></a>&nbsp;&nbsp;<a href="#clearMonitorConfig"><?php echo __('Reset to default'); ?></a>
        </div>
    </div>

    <div id="monitorInstructionsDialog" title="<?php echo __('Monitor Instructions'); ?>" style="display:none;">
        <?php echo __('The phpMyAdmin Monitor can assist you in optimizing the server configuration and track down time intensive queries. For the latter you will need to set log_output to \'TABLE\' and have either the slow_query_log or general_log enabled. Note however, that the general_log produces a lot of data and increases server load by up to 15%'); ?>
    <?php if (PMA_MYSQL_INT_VERSION < 50106) { ?>
        <p>
        <?php echo PMA_Util::getImage('s_attention.png'); ?>
        <?php
            echo __('Unfortunately your Database server does not support logging to table, which is a requirement for analyzing the database logs with phpMyAdmin. Logging to table is supported by MySQL 5.1.6 and onwards. You may still use the server charting features however.');
        ?>
        </p>
    <?php
    } else {
    ?>
        <p></p>
        <img class="ajaxIcon" src="<?php echo $GLOBALS['pmaThemeImage']; ?>ajax_clock_small.gif" alt="Loading" />
        <div class="ajaxContent"></div>
        <div class="monitorUse" style="display:none;">
            <p></p>
            <?php
                echo '<strong>';
                echo __('Using the monitor:');
                echo '</strong><p>';
                echo __('Your browser will refresh all displayed charts in a regular interval. You may add charts and change the refresh rate under \'Settings\', or remove any chart using the cog icon on each respective chart.');
                echo '</p><p>';
                echo __('To display queries from the logs, select the relevant time span on any chart by holding down the left mouse button and panning over the chart. Once confirmed, this will load a table of grouped queries, there you may click on any occuring SELECT statements to further analyze them.');
                echo '</p>';
            ?>
            <p>
            <?php echo PMA_Util::getImage('s_attention.png'); ?>
            <?php
                echo '<strong>';
//.........这里部分代码省略.........
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:101,代码来源:server_status.php

示例14: testDisplayFormAction

 /**
  * Tests for displayFormAction()
  *
  * @return void
  * @test
  */
 public function testDisplayFormAction()
 {
     $table = $this->getMockBuilder('PMA_Table')->disableOriginalConstructor()->getMock();
     $table->expects($this->any())->method('getStatusInfo')->will($this->returnValue(""));
     $table->expects($this->any())->method('isView')->will($this->returnValue(false));
     $table->expects($this->any())->method('getNameAndTypeOfTheColumns')->will($this->returnValue(array("field_name" => "field_type")));
     $GLOBALS['dbi']->expects($this->any())->method('getTable')->will($this->returnValue($table));
     $container = Container::getDefaultContainer();
     $container->set('db', 'db');
     $container->set('table', 'table');
     $container->set('dbi', $GLOBALS['dbi']);
     $response = new \PMA\Test\Stubs\PMA_Response();
     $container->set('PMA_Response', $response);
     $container->alias('response', 'PMA_Response');
     $index = new PMA_Index();
     $ctrl = new TableIndexesController($index);
     $_REQUEST['create_index'] = true;
     $_REQUEST['added_fields'] = 3;
     $ctrl->displayFormAction();
     $html = $response->getHTMLResult();
     //PMA_URL_getHiddenInputs
     $this->assertContains(PMA_URL_getHiddenInputs(array('db' => 'db', 'table' => 'table', 'create_index' => 1)), $html);
     $doc_html = PMA_Util::showHint(PMA_Message::notice(__('"PRIMARY" <b>must</b> be the name of' . ' and <b>only of</b> a primary key!')));
     $this->assertContains($doc_html, $html);
     $this->assertContains(PMA_Util::showMySQLDocu('ALTER_TABLE'), $html);
     // generateIndexSelector
     $this->assertContains(PMA\Template::trim($index->generateIndexChoiceSelector(false)), $html);
     $this->assertContains(sprintf(__('Add %s column(s) to index'), 1), $html);
     //$field_name & $field_type
     $this->assertContains("field_name", $html);
     $this->assertContains("field_type", $html);
 }
开发者ID:yonh,项目名称:php-mvc,代码行数:38,代码来源:TableIndexesController_test.php

示例15: __

$header_cells[] = __('Comments');
if (isset($fields_meta)) {
    // for moving, load all available column names
    $move_columns_sql_query = 'SELECT * FROM ' . PMA_Util::backquote($db) . '.' . PMA_Util::backquote($table) . ' LIMIT 1';
    $move_columns_sql_result = PMA_DBI_try_query($move_columns_sql_query);
    $move_columns = PMA_DBI_get_fields_meta($move_columns_sql_result);
    unset($move_columns_sql_query, $move_columns_sql_result);
    $header_cells[] = __('Move column');
}
if ($cfgRelation['mimework'] && $GLOBALS['cfg']['BrowseMIME']) {
    $mime_map = PMA_getMIME($db, $table);
    $available_mime = PMA_getAvailableMIMEtypes();
    $hint = '<br />' . sprintf(__('For a list of available transformation options and their MIME' . ' type transformations, click on %stransformation descriptions%s'), '<a href="transformation_overview.php?' . PMA_generate_common_url($db, $table) . '" target="_blank">', '</a>');
    $header_cells[] = __('MIME type');
    $header_cells[] = __('Browser transformation');
    $header_cells[] = __('Transformation options') . PMA_Util::showHint(__('Please enter the values for transformation options using this' . ' format: \'a\', 100, b,\'c\'…<br />If you ever need to put' . ' a backslash ("\\") or a single quote ("\'") amongst those' . ' values, precede it with a backslash (for example \'\\\\xyz\'' . ' or \'a\\\'b\').') . $hint);
}
//  workaround for field_fulltext, because its submitted indices contain
//  the index as a value, not a key. Inserted here for easier maintaineance
//  and less code to change in existing files.
if (isset($field_fulltext) && is_array($field_fulltext)) {
    foreach ($field_fulltext as $fulltext_nr => $fulltext_indexkey) {
        $submit_fulltext[$fulltext_indexkey] = $fulltext_indexkey;
    }
}
for ($i = 0; $i < $num_fields; $i++) {
    if (!empty($regenerate)) {
        // An error happened with previous inputs, so we will restore the data
        // to embed it once again in this form.
        $row['Field'] = isset($_REQUEST['field_name'][$i]) ? $_REQUEST['field_name'][$i] : false;
        $row['Type'] = isset($_REQUEST['field_type'][$i]) ? $_REQUEST['field_type'][$i] : false;
开发者ID:mindfeederllc,项目名称:openemr,代码行数:31,代码来源:tbl_columns_definition_form.inc.php


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