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


PHP Message::notice方法代码示例

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


在下文中一共展示了Message::notice方法的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="' . ($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

示例2: _getDemoMessage

 /**
  * Returns the message for demo server to error messages
  *
  * @return string
  */
 private function _getDemoMessage()
 {
     $message = '<a href="/">' . __('phpMyAdmin Demo Server') . '</a>: ';
     if (file_exists('./revision-info.php')) {
         include './revision-info.php';
         $message .= sprintf(__('Currently running Git revision %1$s from the %2$s branch.'), '<a target="_blank" href="' . $repobase . $fullrevision . '">' . $revision . '</a>', '<a target="_blank" href="' . $repobranchbase . $branch . '">' . $branch . '</a>');
     } else {
         $message .= __('Git information missing!');
     }
     return Message::notice($message)->getDisplay();
 }
开发者ID:flash1452,项目名称:phpmyadmin,代码行数:16,代码来源:Footer.php

示例3: PMA_getHtmlForProcessListAutoRefresh

/**
 * Prints html for auto refreshing processes list
 *
 * @return string
 */
function PMA_getHtmlForProcessListAutoRefresh()
{
    $notice = Message::notice(__('Note: Enabling the auto refresh here might cause ' . 'heavy traffic between the web server and the MySQL server.'))->getDisplay();
    $retval = $notice . '<div class="tabLinks">';
    $retval .= '<label>' . __('Refresh rate') . ': ';
    $retval .= ServerStatusData::getHtmlForRefreshList('refreshRate', 5, array(2, 3, 4, 5, 10, 20, 40, 60, 120, 300, 600, 1200));
    $retval .= '</label>';
    $retval .= '<a id="toggleRefresh" href="#">';
    $retval .= Util::getImage('play.png') . __('Start auto refresh');
    $retval .= '</a>';
    $retval .= '</div>';
    return $retval;
}
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:18,代码来源:server_status_processes.lib.php

示例4: indexAction

 /**
  * Index action
  *
  * @return void
  */
 public function indexAction()
 {
     // Add/Remove favorite tables using Ajax request.
     if ($GLOBALS['is_ajax_request'] && !empty($_REQUEST['favorite_table'])) {
         $this->addRemoveFavoriteTablesAction();
         return;
     }
     // If there is an Ajax request for real row count of a table.
     if ($GLOBALS['is_ajax_request'] && isset($_REQUEST['real_row_count']) && $_REQUEST['real_row_count'] == true) {
         $this->handleRealRowCountRequestAction();
         return;
     }
     // Drops/deletes/etc. multiple tables if required
     if (!empty($_POST['submit_mult']) && isset($_POST['selected_tbl']) || isset($_POST['mult_btn'])) {
         $this->multiSubmitAction();
     }
     $this->response->getHeader()->getScripts()->addFiles(array('db_structure.js', 'tbl_change.js', 'jquery/jquery-ui-timepicker-addon.js'));
     $this->_url_query .= '&amp;goto=db_structure.php';
     // Gets the database structure
     $sub_part = '_structure';
     list($tables, $num_tables, $total_num_tables, , $is_show_stats, $db_is_system_schema, , , $pos) = Util::getDbInfo($GLOBALS['db'], $sub_part);
     $this->_tables = $tables;
     // updating $tables seems enough for #11376, but updating other
     // variables too in case they may cause some other problem.
     $this->_num_tables = $num_tables;
     $this->_pos = $pos;
     $this->_db_is_system_schema = $db_is_system_schema;
     $this->_total_num_tables = $total_num_tables;
     $this->_is_show_stats = $is_show_stats;
     include_once 'libraries/replication.inc.php';
     PageSettings::showGroup('DbStructure');
     // 1. No tables
     if ($this->_num_tables == 0) {
         $this->response->addHTML(Message::notice(__('No tables found in database.')));
         if (empty($db_is_system_schema)) {
             $this->response->addHTML(PMA_getHtmlForCreateTable($this->db));
         }
         return;
     }
     // else
     // 2. Shows table information
     /**
      * Displays the tables list
      */
     $this->response->addHTML('<div id="tableslistcontainer">');
     $_url_params = array('pos' => $this->_pos, 'db' => $this->db);
     // Add the sort options if they exists
     if (isset($_REQUEST['sort'])) {
         $_url_params['sort'] = $_REQUEST['sort'];
     }
     if (isset($_REQUEST['sort_order'])) {
         $_url_params['sort_order'] = $_REQUEST['sort_order'];
     }
     $this->response->addHTML(Util::getListNavigator($this->_total_num_tables, $this->_pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']));
     $this->displayTableList();
     // display again the table list navigator
     $this->response->addHTML(Util::getListNavigator($this->_total_num_tables, $this->_pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']));
     $this->response->addHTML('</div><hr />');
     /**
      * Work on the database
      */
     /* DATABASE WORK */
     /* Printable view of a table */
     $this->response->addHTML(Template::get('database/structure/print_view_data_dictionary_link')->render(array('url_query' => $this->_url_query)));
     if (empty($this->_db_is_system_schema)) {
         $this->response->addHTML(PMA_getHtmlForCreateTable($this->db));
     }
 }
开发者ID:netroby,项目名称:phpmyadmin,代码行数:73,代码来源:DatabaseStructureController.php

示例5: PMA_getHtmlFixPMATables

/**
 * Get Html for PMA tables fixing anchor.
 *
 * @param boolean $allTables whether to create all tables
 * @param boolean $createDb  whether to create the pmadb also
 *
 * @return string Html
 */
function PMA_getHtmlFixPMATables($allTables, $createDb = false)
{
    $retval = '';
    $url_query = PMA_URL_getCommon(array('db' => $GLOBALS['db']));
    if ($allTables) {
        if ($createDb) {
            $url_query .= '&amp;goto=db_operations.php&amp;create_pmadb=1';
            $message = Message::notice(__('%sCreate%s a database named \'phpmyadmin\' and setup ' . 'the phpMyAdmin configuration storage there.'));
        } else {
            $url_query .= '&amp;goto=db_operations.php&amp;fixall_pmadb=1';
            $message = Message::notice(__('%sCreate%s the phpMyAdmin configuration storage in the ' . 'current database.'));
        }
    } else {
        $url_query .= '&amp;goto=db_operations.php&amp;fix_pmadb=1';
        $message = Message::notice(__('%sCreate%s missing phpMyAdmin configuration storage tables.'));
    }
    $message->addParam('<a href="' . $GLOBALS['cfg']['PmaAbsoluteUri'] . 'chk_rel.php' . $url_query . '">', false);
    $message->addParam('</a>', false);
    $retval .= $message->getDisplay();
    return $retval;
}
开发者ID:iShareLife,项目名称:phpmyadmin,代码行数:29,代码来源:relation.lib.php

示例6: PMA_getHtmlForUserOverview

/**
 * Get HTML snippet for display user overview page
 *
 * @param string $pmaThemeImage a image source link
 * @param string $text_dir      text directory
 *
 * @return string $html_output
 */
function PMA_getHtmlForUserOverview($pmaThemeImage, $text_dir)
{
    $html_output = '<h2>' . "\n" . Util::getIcon('b_usrlist.png') . __('User accounts overview') . "\n" . '</h2>' . "\n";
    $password_column = 'Password';
    if (Util::getServerType() == 'MySQL' && PMA_MYSQL_INT_VERSION >= 50706) {
        $password_column = 'authentication_string';
    }
    // $sql_query is for the initial-filtered,
    // $sql_query_all is for counting the total no. of users
    $sql_query = $sql_query_all = 'SELECT *,' . " IF(`" . $password_column . "` = _latin1 '', 'N', 'Y') AS 'Password'" . ' FROM `mysql`.`user`';
    $sql_query .= isset($_REQUEST['initial']) ? PMA_rangeOfUsers($_REQUEST['initial']) : '';
    $sql_query .= ' ORDER BY `User` ASC, `Host` ASC;';
    $sql_query_all .= ' ;';
    $res = $GLOBALS['dbi']->tryQuery($sql_query, null, PMA\libraries\DatabaseInterface::QUERY_STORE);
    $res_all = $GLOBALS['dbi']->tryQuery($sql_query_all, null, PMA\libraries\DatabaseInterface::QUERY_STORE);
    if (!$res) {
        // the query failed! This may have two reasons:
        // - the user does not have enough privileges
        // - the privilege tables use a structure of an earlier version.
        // so let's try a more simple query
        $GLOBALS['dbi']->freeResult($res);
        $GLOBALS['dbi']->freeResult($res_all);
        $sql_query = 'SELECT * FROM `mysql`.`user`';
        $res = $GLOBALS['dbi']->tryQuery($sql_query, null, PMA\libraries\DatabaseInterface::QUERY_STORE);
        if (!$res) {
            $html_output .= PMA_getHtmlForViewUsersError();
            $html_output .= PMA_getAddUserHtmlFieldset();
        } else {
            // This message is hardcoded because I will replace it by
            // a automatic repair feature soon.
            $raw = 'Your privilege table structure seems to be older than' . ' this MySQL version!<br />' . 'Please run the <code>mysql_upgrade</code> command' . '(<code>mysql_fix_privilege_tables</code> on older systems)' . ' that should be included in your MySQL server distribution' . ' to solve this problem!';
            $html_output .= Message::rawError($raw)->getDisplay();
        }
        $GLOBALS['dbi']->freeResult($res);
    } else {
        $db_rights = PMA_getDbRightsForUserOverview();
        // for all initials, even non A-Z
        $array_initials = array();
        foreach ($db_rights as $right) {
            foreach ($right as $account) {
                if (empty($account['User']) && $account['Host'] == 'localhost') {
                    $html_output .= Message::notice(__('A user account allowing any user from localhost to ' . 'connect is present. This will prevent other users ' . 'from connecting if the host part of their account ' . 'allows a connection from any (%) host.') . Util::showMySQLDocu('problems-connecting'))->getDisplay();
                    break 2;
                }
            }
        }
        /**
         * Displays the initials
         * Also not necessary if there is less than 20 privileges
         */
        if ($GLOBALS['dbi']->numRows($res_all) > 20) {
            $html_output .= PMA_getHtmlForInitials($array_initials);
        }
        /**
         * Display the user overview
         * (if less than 50 users, display them immediately)
         */
        if (isset($_REQUEST['initial']) || isset($_REQUEST['showall']) || $GLOBALS['dbi']->numRows($res) < 50) {
            $html_output .= PMA_getUsersOverview($res, $db_rights, $pmaThemeImage, $text_dir);
        } else {
            $html_output .= PMA_getAddUserHtmlFieldset();
        }
        // end if (display overview)
        if (!$GLOBALS['is_ajax_request'] || !empty($_REQUEST['ajax_page_request'])) {
            if (isset($GLOBALS['flush_priv']) && $GLOBALS['flush_priv']) {
                $flushnote = new Message(__('Note: phpMyAdmin gets the users\' privileges directly ' . 'from MySQL\'s privilege tables. The content of these ' . 'tables may differ from the privileges the server uses, ' . 'if they have been changed manually. In this case, ' . 'you should %sreload the privileges%s before you continue.'), Message::NOTICE);
                $flushLink = '<a href="server_privileges.php' . PMA_URL_getCommon(array('flush_privileges' => 1)) . '" id="reload_privileges_anchor">';
                $flushnote->addParam($flushLink, false);
                $flushnote->addParam('</a>', false);
            } else {
                $flushnote = new Message(__('Note: phpMyAdmin gets the users\' privileges directly ' . 'from MySQL\'s privilege tables. The content of these ' . 'tables may differ from the privileges the server uses, ' . 'if they have been changed manually. In this case, ' . 'the privileges have to be reloaded but currently, you ' . 'don\'t have the RELOAD privilege.') . Util::showMySQLDocu('privileges-provided', false, 'priv_reload'), Message::NOTICE);
            }
            $html_output .= $flushnote->getDisplay();
        }
    }
    return $html_output;
}
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:85,代码来源:server_privileges.lib.php

示例7: PMA_executeSqlQuery

/**
 * Executes the sql query and get the result, then move back to the calling page
 *
 * @param array $url_params url parameters array
 * @param array $query      built query from PMA_buildSqlQuery()
 *
 * @return array            $url_params, $total_affected_rows, $last_messages
 *                          $warning_messages, $error_messages, $return_to_sql_query
 */
function PMA_executeSqlQuery($url_params, $query)
{
    $return_to_sql_query = '';
    if (!empty($GLOBALS['sql_query'])) {
        $url_params['sql_query'] = $GLOBALS['sql_query'];
        $return_to_sql_query = $GLOBALS['sql_query'];
    }
    $GLOBALS['sql_query'] = implode('; ', $query) . ';';
    // to ensure that the query is displayed in case of
    // "insert as new row" and then "insert another new row"
    $GLOBALS['display_query'] = $GLOBALS['sql_query'];
    $total_affected_rows = 0;
    $last_messages = array();
    $warning_messages = array();
    $error_messages = array();
    foreach ($query as $single_query) {
        if ($_REQUEST['submit_type'] == 'showinsert') {
            $last_messages[] = Message::notice(__('Showing SQL query'));
            continue;
        }
        if ($GLOBALS['cfg']['IgnoreMultiSubmitErrors']) {
            $result = $GLOBALS['dbi']->tryQuery($single_query);
        } else {
            $result = $GLOBALS['dbi']->query($single_query);
        }
        if (!$result) {
            $error_messages[] = Message::sanitize($GLOBALS['dbi']->getError());
        } else {
            // The next line contains a real assignment, it's not a typo
            if ($tmp = @$GLOBALS['dbi']->affectedRows()) {
                $total_affected_rows += $tmp;
            }
            unset($tmp);
            $insert_id = $GLOBALS['dbi']->insertId();
            if ($insert_id != 0) {
                // insert_id is id of FIRST record inserted in one insert, so if we
                // inserted multiple rows, we had to increment this
                if ($total_affected_rows > 0) {
                    $insert_id = $insert_id + $total_affected_rows - 1;
                }
                $last_message = Message::notice(__('Inserted row id: %1$d'));
                $last_message->addParam($insert_id);
                $last_messages[] = $last_message;
            }
            $GLOBALS['dbi']->freeResult($result);
        }
        $warning_messages = PMA_getWarningMessages();
    }
    return array($url_params, $total_affected_rows, $last_messages, $warning_messages, $error_messages, $return_to_sql_query);
}
开发者ID:ryanfmurphy,项目名称:phpmyadmin,代码行数:59,代码来源:insert_edit.lib.php

示例8: PMA_deleteColumnsFromList

/**
 * if $isTable is true it removes all columns of given tables as $field_select from
 * central columns list otherwise $field_select is columns list and it removes
 * given columns if present in central list
 *
 * @param array $field_select if $isTable selected list of tables otherwise
 * selected list of columns to remove from central list
 * @param bool  $isTable      if passed array is of tables or columns
 *
 * @return true|PMA\libraries\Message
 */
function PMA_deleteColumnsFromList($field_select, $isTable = true)
{
    $cfgCentralColumns = PMA_centralColumnsGetParams();
    if (empty($cfgCentralColumns)) {
        return PMA_configErrorMessage();
    }
    $db = $_REQUEST['db'];
    $pmadb = $cfgCentralColumns['db'];
    $central_list_table = $cfgCentralColumns['table'];
    $GLOBALS['dbi']->selectDb($db, $GLOBALS['userlink']);
    $message = true;
    $colNotExist = array();
    $fields = array();
    if ($isTable) {
        $cols = '';
        foreach ($field_select as $table) {
            $fields[$table] = (array) $GLOBALS['dbi']->getColumnNames($db, $table, $GLOBALS['userlink']);
            foreach ($fields[$table] as $col_select) {
                $cols .= '\'' . Util::sqlAddSlashes($col_select) . '\',';
            }
        }
        $cols = trim($cols, ',');
        $has_list = PMA_findExistingColNames($db, $cols);
        foreach ($field_select as $table) {
            foreach ($fields[$table] as $column) {
                if (!in_array($column, $has_list)) {
                    $colNotExist[] = "'" . $column . "'";
                }
            }
        }
    } else {
        $cols = '';
        foreach ($field_select as $col_select) {
            $cols .= '\'' . Util::sqlAddSlashes($col_select) . '\',';
        }
        $cols = trim($cols, ',');
        $has_list = PMA_findExistingColNames($db, $cols);
        foreach ($field_select as $column) {
            if (!in_array($column, $has_list)) {
                $colNotExist[] = "'" . $column . "'";
            }
        }
    }
    if (!empty($colNotExist)) {
        $colNotExist = implode(",", array_unique($colNotExist));
        $message = Message::notice(sprintf(__('Couldn\'t remove Column(s) %1$s ' . 'as they don\'t exist in central columns list!'), htmlspecialchars($colNotExist)));
    }
    $GLOBALS['dbi']->selectDb($pmadb, $GLOBALS['controllink']);
    $query = 'DELETE FROM ' . Util::backquote($central_list_table) . ' ' . 'WHERE db_name = \'' . $db . '\' AND col_name IN (' . $cols . ');';
    if (!$GLOBALS['dbi']->tryQuery($query, $GLOBALS['controllink'])) {
        $message = Message::error(__('Could not remove columns!'));
        $message->addMessage('<br />' . htmlspecialchars($cols) . '<br />');
        $message->addMessage(Message::rawError($GLOBALS['dbi']->getError($GLOBALS['controllink'])));
    }
    return $message;
}
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:67,代码来源:central_columns.lib.php

示例9: PMA_getHtmlForReplicationSlavesTable

/**
 * returns html code for table with slave users connected to this master
 *
 * @param boolean $hidden - if true, then default style is set to hidden,
 *                        - default value false
 *
 * @return string
 */
function PMA_getHtmlForReplicationSlavesTable($hidden = false)
{
    $html = '';
    // Fetch data
    $data = $GLOBALS['dbi']->fetchResult('SHOW SLAVE HOSTS', null, null);
    $html .= '  <br />';
    $html .= '  <div id="replication_slaves_section" style="';
    $html .= ($hidden ? 'display: none;' : '') . '"> ';
    $html .= '    <table class="data">';
    $html .= '    <thead>';
    $html .= '      <tr>';
    $html .= '        <th>' . __('Server ID') . '</th>';
    $html .= '        <th>' . __('Host') . '</th>';
    $html .= '      </tr>';
    $html .= '    </thead>';
    $html .= '    <tbody>';
    $odd_row = true;
    foreach ($data as $slave) {
        $html .= '    <tr class="' . ($odd_row ? 'odd' : 'even') . '">';
        $html .= '      <td class="value">' . $slave['Server_id'] . '</td>';
        $html .= '      <td class="value">' . $slave['Host'] . '</td>';
        $html .= '    </tr>';
        $odd_row = !$odd_row;
    }
    $html .= '    </tbody>';
    $html .= '    </table>';
    $html .= '    <br />';
    $html .= Message::notice(__('Only slaves started with the ' . '--report-host=host_name option are visible in this list.'))->getDisplay();
    $html .= '    <br />';
    $html .= '  </div>';
    return $html;
}
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:40,代码来源:replication_gui.lib.php

示例10: __

                     class="prefsmanage_opts disabled">
                    <span class="localStorage-supported">
                        <?php 
echo __('Settings will be saved in your browser\'s local ' . 'storage.');
?>
                        <div class="localStorage-exists">
                            <b>
                                <?php 
echo __('Existing settings will be overwritten!');
?>
                            </b>
                        </div>
                    </span>
                    <div class="localStorage-unsupported">
                        <?php 
Message::notice(__('This feature is not supported by your web browser'))->display();
?>
                    </div>
                </div>
                <br />
                <?php 
echo '<input type="submit" name="submit_export" value="', __('Go'), '" />';
?>
            </form>
        </div>
        <div class="group">
            <h2><?php 
echo __('Reset');
?>
</h2>
            <form class="group-cnt prefs-form disableAjax" name="prefs_reset"
开发者ID:Dhrumil1808,项目名称:phpmyadmin,代码行数:31,代码来源:prefs_manage.php

示例11: PMA_getHtmlForTrackingReport

/**
 * Function to get html for tracking report and tracking report export
 *
 * @param string  $url_query        url query
 * @param array   $data             data
 * @param array   $url_params       url params
 * @param boolean $selection_schema selection schema
 * @param boolean $selection_data   selection data
 * @param boolean $selection_both   selection both
 * @param int     $filter_ts_to     filter time stamp from
 * @param int     $filter_ts_from   filter time stamp tp
 * @param array   $filter_users     filter users
 *
 * @return string
 */
function PMA_getHtmlForTrackingReport($url_query, $data, $url_params, $selection_schema, $selection_data, $selection_both, $filter_ts_to, $filter_ts_from, $filter_users)
{
    $html = '<h3>' . __('Tracking report') . '  [<a href="tbl_tracking.php' . $url_query . '">' . __('Close') . '</a>]</h3>';
    $html .= '<small>' . __('Tracking statements') . ' ' . htmlspecialchars($data['tracking']) . '</small><br/>';
    $html .= '<br/>';
    list($str1, $str2, $str3, $str4, $str5) = PMA_getHtmlForElementsOfTrackingReport($selection_schema, $selection_data, $selection_both);
    // Prepare delete link content here
    $drop_image_or_text = '';
    if (PMA\libraries\Util::showIcons('ActionLinksMode')) {
        $drop_image_or_text .= PMA\libraries\Util::getImage('b_drop.png', __('Delete tracking data row from report'));
    }
    if (PMA\libraries\Util::showText('ActionLinksMode')) {
        $drop_image_or_text .= __('Delete');
    }
    /*
     *  First, list tracked data definition statements
     */
    if (count($data['ddlog']) == 0 && count($data['dmlog']) == 0) {
        $msg = Message::notice(__('No data'));
        $msg->display();
    }
    $html .= PMA_getHtmlForTrackingReportExportForm1($data, $url_params, $selection_schema, $selection_data, $selection_both, $filter_ts_to, $filter_ts_from, $filter_users, $str1, $str2, $str3, $str4, $str5, $drop_image_or_text);
    $html .= PMA_getHtmlForTrackingReportExportForm2($url_params, $str1, $str2, $str3, $str4, $str5);
    $html .= "<br/><br/><hr/><br/>\n";
    return $html;
}
开发者ID:rclakmal,项目名称:phpmyadmin,代码行数:41,代码来源:tracking.lib.php

示例12: _getHtmlForNoticeEnableStatistics

 /**
  * Returns the html for Enable Statistics
  *
  * @return string
  */
 private function _getHtmlForNoticeEnableStatistics()
 {
     $html = '';
     $notice = Message::notice(__('Note: Enabling the database statistics here might cause ' . 'heavy traffic between the web server and the MySQL server.'))->getDisplay();
     $html .= $notice;
     $items = array();
     $items[] = array('content' => '<strong>' . "\n" . __('Enable statistics') . '</strong><br />' . "\n", 'class' => 'li_switch_dbstats', 'url' => array('href' => 'server_databases.php' . $GLOBALS['url_query'] . '&amp;dbstats=1', 'title' => __('Enable statistics')));
     $html .= Template::get('list/unordered')->render(array('items' => $items));
     return $html;
 }
开发者ID:flash1452,项目名称:phpmyadmin,代码行数:15,代码来源:ServerDatabasesController.php

示例13: indexAction

 /**
  * Index action
  *
  * @return void
  */
 public function indexAction()
 {
     // Add/Remove favorite tables using Ajax request.
     if ($GLOBALS['is_ajax_request'] && !empty($_REQUEST['favorite_table'])) {
         $this->addRemoveFavoriteTablesAction();
         return;
     }
     $this->response->getHeader()->getScripts()->addFiles(array('db_structure.js', 'tbl_change.js', 'jquery/jquery-ui-timepicker-addon.js'));
     // Drops/deletes/etc. multiple tables if required
     if (!empty($_POST['submit_mult']) && isset($_POST['selected_tbl']) || isset($_POST['mult_btn'])) {
         $action = 'db_structure.php';
         $err_url = 'db_structure.php' . PMA_URL_getCommon(array('db' => $this->db));
         // see bug #2794840; in this case, code path is:
         // db_structure.php -> libraries/mult_submits.inc.php -> sql.php
         // -> db_structure.php and if we got an error on the multi submit,
         // we must display it here and not call again mult_submits.inc.php
         if (!isset($_POST['error']) || false === $_POST['error']) {
             include 'libraries/mult_submits.inc.php';
         }
         if (empty($_POST['message'])) {
             $_POST['message'] = Message::success();
         }
     }
     $this->_url_query .= '&amp;goto=db_structure.php';
     // Gets the database structure
     $sub_part = '_structure';
     list($tables, $num_tables, $total_num_tables, , $is_show_stats, $db_is_system_schema, $tooltip_truename, $tooltip_aliasname, $pos) = Util::getDbInfo($GLOBALS['db'], isset($sub_part) ? $sub_part : '');
     $this->_tables = $tables;
     // updating $tables seems enough for #11376, but updating other
     // variables too in case they may cause some other problem.
     $this->_num_tables = $num_tables;
     $this->_pos = $pos;
     $this->_db_is_system_schema = $db_is_system_schema;
     $this->_total_num_tables = $total_num_tables;
     $this->_is_show_stats = $is_show_stats;
     // If there is an Ajax request for real row count of a table.
     if ($GLOBALS['is_ajax_request'] && isset($_REQUEST['real_row_count']) && $_REQUEST['real_row_count'] == true) {
         $this->handleRealRowCountRequestAction();
         return;
     }
     include_once 'libraries/replication.inc.php';
     PageSettings::showGroup('DbStructure');
     $db_collation = PMA_getDbCollation($this->db);
     $titles = Util::buildActionTitles();
     // 1. No tables
     if ($this->_num_tables == 0) {
         $this->response->addHTML(Message::notice(__('No tables found in database.')));
         if (empty($db_is_system_schema)) {
             $this->response->addHTML(PMA_getHtmlForCreateTable($this->db));
         }
         return;
     }
     // else
     // 2. Shows table information
     /**
      * Displays the tables list
      */
     $this->response->addHTML('<div id="tableslistcontainer">');
     $_url_params = array('pos' => $this->_pos, 'db' => $this->db);
     // Add the sort options if they exists
     if (isset($_REQUEST['sort'])) {
         $_url_params['sort'] = $_REQUEST['sort'];
     }
     if (isset($_REQUEST['sort_order'])) {
         $_url_params['sort_order'] = $_REQUEST['sort_order'];
     }
     $this->response->addHTML(Util::getListNavigator($this->_total_num_tables, $this->_pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']));
     // table form
     $this->response->addHTML(Template::get('database/structure/table_header')->render(array('db' => $this->db, 'db_is_system_schema' => $this->_db_is_system_schema, 'replication' => $GLOBALS['replication_info']['slave']['status'])));
     $i = $sum_entries = 0;
     $overhead_check = '';
     $create_time_all = '';
     $update_time_all = '';
     $check_time_all = '';
     $num_columns = $GLOBALS['cfg']['PropertiesNumColumns'] > 1 ? ceil($this->_num_tables / $GLOBALS['cfg']['PropertiesNumColumns']) + 1 : 0;
     $row_count = 0;
     $sum_size = (double) 0;
     $overhead_size = (double) 0;
     $hidden_fields = array();
     $odd_row = true;
     $overall_approx_rows = false;
     // Instance of RecentFavoriteTable class.
     $fav_instance = RecentFavoriteTable::getInstance('favorite');
     foreach ($this->_tables as $keyname => $current_table) {
         // Get valid statistics whatever is the table type
         $drop_query = '';
         $drop_message = '';
         $overhead = '';
         $table_is_view = false;
         $table_encoded = urlencode($current_table['TABLE_NAME']);
         // Sets parameters for links
         $tbl_url_query = $this->_url_query . '&amp;table=' . $table_encoded;
         // do not list the previous table's size info for a view
         list($current_table, $formatted_size, $unit, $formatted_overhead, $overhead_unit, $overhead_size, $table_is_view, $sum_size) = $this->getStuffForEngineTypeTable($current_table, $sum_size, $overhead_size);
         $curTable = $this->dbi->getTable($this->db, $current_table['TABLE_NAME']);
//.........这里部分代码省略.........
开发者ID:sergiorocha1004,项目名称:phpmyadmin,代码行数:101,代码来源:DatabaseStructureController.php

示例14: basename

$script_name = basename($GLOBALS['PMA_PHP_SELF']);
foreach (array_keys($forms) as $formset) {
    $tab = array('link' => 'prefs_forms.php', 'text' => PMA_lang('Form_' . $formset), 'icon' => $tabs_icons[$formset], 'active' => $script_name == 'prefs_forms.php' && $formset == $form_param);
    $content .= PMA\libraries\Util::getHtmlTab($tab, array('form' => $formset)) . "\n";
}
echo PMA\libraries\Template::get('list/unordered')->render(array('id' => 'topmenu2', 'class' => 'user_prefs_tabs', 'content' => $content));
echo '<div class="clearfloat"></div>';
// show "configuration saved" message and reload navigation panel if needed
if (!empty($_GET['saved'])) {
    Message::rawSuccess(__('Configuration has been saved.'))->display();
}
/* debug code
$arr = $cf->getConfigArray();
$arr2 = array();
foreach ($arr as $k => $v) {
    $arr2[] = "<b>$k</b> " . var_export($v, true);
}
$arr2 = implode(', ', $arr2);
$arr2 .= '<br />Blacklist: ' . (empty($cfg['UserprefsDisallow'])
        ? '<i>empty</i>'
        : implode(', ', $cfg['UserprefsDisallow']));
$msg = Message::notice('Settings: ' . $arr2);
$msg->display();
//*/
// warn about using session storage for settings
$cfgRelation = PMA_getRelationsParam();
if (!$cfgRelation['userconfigwork']) {
    $msg = __('Your preferences will be saved for current session only. Storing them ' . 'permanently requires %sphpMyAdmin configuration storage%s.');
    $msg = PMA_sanitize(sprintf($msg, '[doc@linked-tables]', '[/doc]'));
    Message::notice($msg)->display();
}
开发者ID:KoMyoThant,项目名称:phpmyadmin,代码行数:31,代码来源:user_preferences.inc.php

示例15: findDuplicates

 /**
  * Function to check over array of indexes and look for common problems
  *
  * @param string $table  table name
  * @param string $schema schema name
  *
  * @return string  Output HTML
  * @access  public
  */
 public static function findDuplicates($table, $schema)
 {
     $indexes = Index::getFromTable($table, $schema);
     $output = '';
     // count($indexes) < 2:
     //   there is no need to check if there less than two indexes
     if (count($indexes) < 2) {
         return $output;
     }
     // remove last index from stack and ...
     while ($while_index = array_pop($indexes)) {
         // ... compare with every remaining index in stack
         foreach ($indexes as $each_index) {
             if ($each_index->getCompareData() !== $while_index->getCompareData()) {
                 continue;
             }
             // did not find any difference
             // so it makes no sense to have this two equal indexes
             $message = Message::notice(__('The indexes %1$s and %2$s seem to be equal and one of them ' . 'could possibly be removed.'));
             $message->addParam($each_index->getName());
             $message->addParam($while_index->getName());
             $output .= $message->getDisplay();
             // there is no need to check any further indexes if we have already
             // found that this one has a duplicate
             continue 2;
         }
     }
     return $output;
 }
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:38,代码来源:Index.php


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