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


PHP PMA_showMySQLDocu函数代码示例

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


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

示例1: PMA_RTE_getFooterLinks

/**
 * Creates a fieldset for adding a new item, if the user has the privileges.
 *
 * @param    string   $docu   String used to create a link to the MySQL docs
 * @param    string   $priv   Privilege to check for adding a new item
 * @param    string   $name   MySQL name of the item
 *
 * @return   string   An HTML snippet with the link to add a new item
 */
function PMA_RTE_getFooterLinks($docu, $priv, $name)
{
    global $db, $url_query, $ajax_class;
    $icon = 'b_' . strtolower($name) . '_add.png';
    $retval = "";
    $retval .= "<!-- ADD " . $name . " FORM START -->\n";
    $retval .= "<fieldset class='left'>\n";
    $retval .= "    <legend>" . __('New') . "</legend>\n";
    $retval .= "        <div class='wrap'>\n";
    if (PMA_currentUserHasPrivilege($priv, $db)) {
        $retval .= "            <a {$ajax_class['add']} ";
        $retval .= "href='db_" . strtolower($name) . "s.php";
        $retval .= "?{$url_query}&amp;add_item=1'>";
        $retval .= PMA_getIcon($icon);
        $retval .= PMA_RTE_getWord('add') . "</a>\n";
    } else {
        $retval .= "            " . PMA_getIcon($icon);
        $retval .= PMA_RTE_getWord('no_create') . "\n";
    }
    $retval .= "            " . PMA_showMySQLDocu('SQL-Syntax', $docu) . "\n";
    $retval .= "        </div>\n";
    $retval .= "</fieldset>\n";
    $retval .= "<!-- ADD " . $name . " FORM END -->\n\n";
    return $retval;
}
开发者ID:AmberWish,项目名称:laba_web,代码行数:34,代码来源:rte_footer.lib.php

示例2: PMA_mysqlDie

 /**
  * Displays a MySQL error message in the right frame.
  *
  * @param   string   the error message
  * @param   string   the sql query that failed
  * @param   boolean  whether to show a "modify" link or not
  * @param   string   the "back" link url (full path is not required)
  * @param   boolean  EXIT the page?
  *
  * @global  array    the configuration array
  *
  * @access  public
  */
 function PMA_mysqlDie($error_message = '', $the_query = '', $is_modify_link = TRUE, $back_url = '', $exit = TRUE)
 {
     global $cfg, $table, $db, $sql_query;
     require_once './header.inc.php';
     if (!$error_message) {
         $error_message = PMA_DBI_getError();
     }
     if (!$the_query && !empty($GLOBALS['sql_query'])) {
         $the_query = $GLOBALS['sql_query'];
     }
     // --- Added to solve bug #641765
     // Robbat2 - 12 January 2003, 9:46PM
     // Revised, Robbat2 - 13 Janurary 2003, 2:59PM
     if (!function_exists('PMA_SQP_isError') || PMA_SQP_isError()) {
         $formatted_sql = htmlspecialchars($the_query);
     } else {
         $formatted_sql = PMA_formatSql(PMA_SQP_parse($the_query), $the_query);
     }
     // ---
     echo "\n" . '<!-- PMA-SQL-ERROR -->' . "\n";
     echo '    <table border="0" cellpadding="2" cellspacing="1">' . '        <tr>' . "\n" . '            <th class="tblHeadError"><div class="errorhead">' . $GLOBALS['strError'] . '</div></th>' . "\n" . '        </tr>' . "\n" . '        <tr>' . "\n" . '            <td>';
     // if the config password is wrong, or the MySQL server does not
     // respond, do not show the query that would reveal the
     // username/password
     if (!empty($the_query) && !strstr($the_query, 'connect')) {
         // --- Added to solve bug #641765
         // Robbat2 - 12 January 2003, 9:46PM
         // Revised, Robbat2 - 13 Janurary 2003, 2:59PM
         if (function_exists('PMA_SQP_isError') && PMA_SQP_isError()) {
             echo PMA_SQP_getErrorString();
         }
         // ---
         // modified to show me the help on sql errors (Michael Keck)
         echo '<div class="tblWarn"><p>' . "\n";
         echo '    <b>' . $GLOBALS['strSQLQuery'] . ':</b>' . "\n";
         if (strstr(strtolower($formatted_sql), 'select')) {
             // please show me help to the error on select
             echo PMA_showMySQLDocu('Reference', 'SELECT');
         }
         if ($is_modify_link && isset($db)) {
             if (isset($table)) {
                 $doedit_goto = '<a href="tbl_properties.php?' . PMA_generate_common_url($db, $table) . '&amp;sql_query=' . urlencode($the_query) . '&amp;show_query=1">';
             } else {
                 $doedit_goto = '<a href="db_details.php?' . PMA_generate_common_url($db) . '&amp;sql_query=' . urlencode($the_query) . '&amp;show_query=1">';
             }
             if ($GLOBALS['cfg']['PropertiesIconic']) {
                 echo $doedit_goto . '<img src=" ' . $GLOBALS['pmaThemeImage'] . 'b_edit.png" width="16" height="16" border="0" hspace="2" align="middle" alt="' . $GLOBALS['strEdit'] . '" />' . '</a>';
             } else {
                 echo '    [' . $doedit_goto . $GLOBALS['strEdit'] . '</a>' . ']' . "\n";
             }
         }
         // end if
         echo '</p>' . "\n" . '<p>' . "\n" . '    ' . $formatted_sql . "\n" . '</p></div>' . "\n";
     }
     // end if
     $tmp_mysql_error = '';
     // for saving the original $error_message
     if (!empty($error_message)) {
         $tmp_mysql_error = strtolower($error_message);
         // save the original $error_message
         $error_message = htmlspecialchars($error_message);
         $error_message = preg_replace("@((\r\n)|(\r)|(\n)){3,}@", "\n\n", $error_message);
     }
     // modified to show me the help on error-returns (Michael Keck)
     echo '<div class="tblWarn"><p>' . "\n" . '    <b>' . $GLOBALS['strMySQLSaid'] . '</b>' . PMA_showMySQLDocu('Error-returns', 'Error-returns') . "\n" . '</p>' . "\n";
     // The error message will be displayed within a CODE segment.
     // To preserve original formatting, but allow wordwrapping, we do a couple of replacements
     // Replace all non-single blanks with their HTML-counterpart
     $error_message = str_replace('  ', '&nbsp;&nbsp;', $error_message);
     // Replace TAB-characters with their HTML-counterpart
     $error_message = str_replace("\t", '&nbsp;&nbsp;&nbsp;&nbsp;', $error_message);
     // Replace linebreaks
     $error_message = nl2br($error_message);
     echo '<code>' . "\n" . $error_message . "\n" . '</code><br />' . "\n";
     // feature request #1036254:
     // Add a link by MySQL-Error #1062 - Duplicate entry
     // 2004-10-20 by mk.keck
     if (substr($error_message, 1, 4) == '1062') {
         // TODO: do not assume that the error message is in English
         // and do not use mysql_result()
         // explode the entry and the column
         $arr_mysql_val_key = explode('entry \'', $tmp_mysql_error);
         $arr_mysql_val_key = explode('\' for key', $arr_mysql_val_key[1]);
         // get the duplicate value
         $string_duplicate_val = trim(strtolower($arr_mysql_val_key[0]));
         // get the field name ...
         $string_duplicate_key = mysql_result(mysql_query("SHOW FIELDS FROM " . $table), $arr_mysql_val_key[1] - 1, 0);
//.........这里部分代码省略.........
开发者ID:Apxe,项目名称:Rubin_final,代码行数:101,代码来源:common.lib.php

示例3: PMA_generateCharsetDropdownBox

        <td width="25">&nbsp;</td>
        <td>
    <?php 
    echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'tbl_collation', null, isset($_REQUEST['tbl_collation']) ? $_REQUEST['tbl_collation'] : null, false, 3);
    ?>
        </td>
    </tr>
    <?php 
    if (PMA_Partition::havePartitioning()) {
        ?>
    <tr valign="top">
        <th><?php 
        echo __('PARTITION definition');
        ?>
:&nbsp;<?php 
        echo PMA_showMySQLDocu('Partitioning', 'Partitioning');
        ?>
        </th>
    </tr>
    <tr>
        <td>
            <textarea name="partition_definition" id="partitiondefinition"
                cols="<?php 
        echo $GLOBALS['cfg']['TextareaCols'];
        ?>
"
                rows="<?php 
        echo $GLOBALS['cfg']['TextareaRows'];
        ?>
"
                dir="<?php 
开发者ID:BGCX262,项目名称:zuozhenshi-prego-svn-to-git,代码行数:31,代码来源:tbl_properties.inc.php

示例4: PMA_mysqlDie

/**
 * Displays a MySQL error message in the right frame.
 *
 * @param string $error_message  the error message
 * @param string $the_query      the sql query that failed
 * @param bool   $is_modify_link whether to show a "modify" link or not
 * @param string $back_url       the "back" link url (full path is not required)
 * @param bool   $exit           EXIT the page?
 *
 * @global  string    the curent table
 * @global  string    the current db
 *
 * @access  public
 */
function PMA_mysqlDie($error_message = '', $the_query = '', $is_modify_link = true, $back_url = '', $exit = true)
{
    global $table, $db;
    /**
     * start http output, display html headers
     */
    include_once './libraries/header.inc.php';
    $error_msg_output = '';
    if (!$error_message) {
        $error_message = PMA_DBI_getError();
    }
    if (!$the_query && !empty($GLOBALS['sql_query'])) {
        $the_query = $GLOBALS['sql_query'];
    }
    // --- Added to solve bug #641765
    if (!function_exists('PMA_SQP_isError') || PMA_SQP_isError()) {
        $formatted_sql = htmlspecialchars($the_query);
    } elseif (empty($the_query) || trim($the_query) == '') {
        $formatted_sql = '';
    } else {
        if (strlen($the_query) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
            $formatted_sql = htmlspecialchars(substr($the_query, 0, $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'])) . '[...]';
        } else {
            $formatted_sql = PMA_formatSql(PMA_SQP_parse($the_query), $the_query);
        }
    }
    // ---
    $error_msg_output .= "\n" . '<!-- PMA-SQL-ERROR -->' . "\n";
    $error_msg_output .= '    <div class="error"><h1>' . __('Error') . '</h1>' . "\n";
    // if the config password is wrong, or the MySQL server does not
    // respond, do not show the query that would reveal the
    // username/password
    if (!empty($the_query) && !strstr($the_query, 'connect')) {
        // --- Added to solve bug #641765
        if (function_exists('PMA_SQP_isError') && PMA_SQP_isError()) {
            $error_msg_output .= PMA_SQP_getErrorString() . "\n";
            $error_msg_output .= '<br />' . "\n";
        }
        // ---
        // modified to show the help on sql errors
        $error_msg_output .= '    <p><strong>' . __('SQL query') . ':</strong>' . "\n";
        if (strstr(strtolower($formatted_sql), 'select')) {
            // please show me help to the error on select
            $error_msg_output .= PMA_showMySQLDocu('SQL-Syntax', 'SELECT');
        }
        if ($is_modify_link) {
            $_url_params = array('sql_query' => $the_query, 'show_query' => 1);
            if (strlen($table)) {
                $_url_params['db'] = $db;
                $_url_params['table'] = $table;
                $doedit_goto = '<a href="tbl_sql.php' . PMA_generate_common_url($_url_params) . '">';
            } elseif (strlen($db)) {
                $_url_params['db'] = $db;
                $doedit_goto = '<a href="db_sql.php' . PMA_generate_common_url($_url_params) . '">';
            } else {
                $doedit_goto = '<a href="server_sql.php' . PMA_generate_common_url($_url_params) . '">';
            }
            $error_msg_output .= $doedit_goto . PMA_getIcon('b_edit.png', __('Edit')) . '</a>';
        }
        // end if
        $error_msg_output .= '    </p>' . "\n" . '    <p>' . "\n" . '        ' . $formatted_sql . "\n" . '    </p>' . "\n";
    }
    // end if
    if (!empty($error_message)) {
        $error_message = preg_replace("@((\r\n)|(\r)|(\n)){3,}@", "\n\n", $error_message);
    }
    // modified to show the help on error-returns
    // (now error-messages-server)
    $error_msg_output .= '<p>' . "\n" . '    <strong>' . __('MySQL said: ') . '</strong>' . PMA_showMySQLDocu('Error-messages-server', 'Error-messages-server') . "\n" . '</p>' . "\n";
    // The error message will be displayed within a CODE segment.
    // To preserve original formatting, but allow wordwrapping,
    // we do a couple of replacements
    // Replace all non-single blanks with their HTML-counterpart
    $error_message = str_replace('  ', '&nbsp;&nbsp;', $error_message);
    // Replace TAB-characters with their HTML-counterpart
    $error_message = str_replace("\t", '&nbsp;&nbsp;&nbsp;&nbsp;', $error_message);
    // Replace linebreaks
    $error_message = nl2br($error_message);
    $error_msg_output .= '<code>' . "\n" . $error_message . "\n" . '</code><br />' . "\n";
    $error_msg_output .= '</div>';
    $_SESSION['Import_message']['message'] = $error_msg_output;
    if ($exit) {
        /**
         * If in an Ajax request
         * - avoid displaying a Back link
         * - use PMA_ajaxResponse() to transmit the message and exit
//.........这里部分代码省略.........
开发者ID:AmberWish,项目名称:laba_web,代码行数:101,代码来源:common.lib.php

示例5: urlencode

        echo $GLOBALS['cfg']['MainPageIconic'] ? '' : ' - ';
        echo '<a href="index.php?' . $query_url . '&amp;old_usr=' . urlencode($PHP_AUTH_USER) . '" target="_parent"' . ' title="' . $strLogout . '" >' . ($GLOBALS['cfg']['MainPageIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 's_loggoff.png" ' . ' width="16" height="16" alt="' . $strLogout . '" />' : $strLogout) . '</a>' . "\n";
    }
    // end if ($GLOBALS['cfg']['Server']['auth_type'] != 'config'
    $anchor = 'querywindow.php?' . PMA_generate_common_url($db, $table);
    if ($GLOBALS['cfg']['MainPageIconic']) {
        $query_frame_link_text = '<img class="icon" src="' . $pmaThemeImage . 'b_selboard.png"' . ' width="16" height="16" alt="' . $strQueryFrame . '" />';
    } else {
        echo '<br />' . "\n";
        $query_frame_link_text = $strQueryFrame;
    }
    echo '<a href="' . $anchor . '&amp;no_js=true"' . ' title="' . $strQueryFrame . '"';
    echo ' onclick="javascript:if (window.parent.open_querywindow()) return false;"';
    echo '>' . $query_frame_link_text . '</a>' . "\n";
}
// end if ($server != 0)
if ($GLOBALS['cfg']['MainPageIconic']) {
    echo '    <a href="Documentation.html" target="documentation"' . ' title="' . $strPmaDocumentation . '" >' . '<img class="icon" src="' . $pmaThemeImage . 'b_docs.png" width="16" height="16"' . ' alt="' . $strPmaDocumentation . '" /></a>' . "\n";
    echo '    ' . PMA_showMySQLDocu('', '', TRUE) . "\n";
}
echo '</div>' . "\n";
/**
 * Displays the MySQL servers choice form
 */
if ($GLOBALS['cfg']['LeftDisplayServers'] && (count($GLOBALS['cfg']['Servers']) > 1 || $server == 0 && count($GLOBALS['cfg']['Servers']) == 1)) {
    echo '<div id="serverinfo">';
    include './libraries/select_server.lib.php';
    PMA_select_server(true, true);
    echo '</div><br />';
}
// end if LeftDisplayServers
开发者ID:alexhava,项目名称:elixirjuice,代码行数:31,代码来源:navigation_header.inc.php

示例6: PMA_sqlQueryFormInsert

/**
 * prints querybox fieldset
 *
 * @usedby  PMA_sqlQueryForm()
 * @uses    $GLOBALS['text_dir']
 * @uses    $GLOBALS['cfg']['TextareaAutoSelect']
 * @uses    $GLOBALS['cfg']['TextareaCols']
 * @uses    $GLOBALS['cfg']['TextareaRows']
 * @uses    $GLOBALS['strShowThisQuery']
 * @uses    $GLOBALS['strGo']
 * @uses    PMA_availableDatabases()
 * @uses    PMA_USR_OS
 * @uses    PMA_USR_BROWSER_AGENT
 * @uses    PMA_USR_BROWSER_VER
 * @uses    PMA_availableDatabases()
 * @uses    htmlspecialchars()
 * @param   string      $query          query to display in the textarea
 * @param   boolean     $is_querywindow if inside querywindow or not
 */
function PMA_sqlQueryFormInsert($query = '', $is_querywindow = false)
{
    // enable auto select text in textarea
    if ($GLOBALS['cfg']['TextareaAutoSelect']) {
        $auto_sel = ' onfocus="selectContent( this, sql_box_locked, true )"';
    } else {
        $auto_sel = '';
    }
    // enable locking if inside query window
    if ($is_querywindow) {
        $locking = ' onkeypress="document.sqlform.elements[\'LockFromUpdate\'].' . 'checked = true;"';
    } else {
        $locking = '';
    }
    $table = '';
    $db = '';
    $fields_list = array();
    if (!isset($GLOBALS['db']) || !strlen($GLOBALS['db'])) {
        // prepare for server related
        $legend = sprintf($GLOBALS['strRunSQLQueryOnServer'], htmlspecialchars($GLOBALS['cfg']['Servers'][$GLOBALS['server']]['host']));
    } elseif (!isset($GLOBALS['table']) || !strlen($GLOBALS['table'])) {
        // prepare for db related
        $db = $GLOBALS['db'];
        // if you want navigation:
        $strDBLink = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db) . '"';
        if ($is_querywindow) {
            $strDBLink .= ' target="_self"' . ' onclick="this.target=window.opener.frames[1].name"';
        }
        $strDBLink .= '>' . htmlspecialchars($db) . '</a>';
        // else use
        // $strDBLink = htmlspecialchars($db);
        $legend = sprintf($GLOBALS['strRunSQLQuery'], $strDBLink);
        if (empty($query)) {
            $query = str_replace('%d', PMA_backquote($db), $GLOBALS['cfg']['DefaultQueryDatabase']);
        }
    } else {
        $table = $GLOBALS['table'];
        $db = $GLOBALS['db'];
        // Get the list and number of fields
        // we do a try_query here, because we could be in the query window,
        // trying to synchonize and the table has not yet been created
        $fields_list = PMA_DBI_fetch_result('SHOW FULL COLUMNS FROM ' . PMA_backquote($db) . '.' . PMA_backquote($GLOBALS['table']));
        $strDBLink = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db) . '"';
        if ($is_querywindow) {
            $strDBLink .= ' target="_self"' . ' onclick="this.target=window.opener.frames[1].name"';
        }
        $strDBLink .= '>' . htmlspecialchars($db) . '</a>';
        // else use
        // $strDBLink = htmlspecialchars($db);
        $legend = sprintf($GLOBALS['strRunSQLQuery'], $strDBLink);
        if (empty($query) && count($fields_list)) {
            $field_names = array();
            foreach ($fields_list as $field) {
                $field_names[] = PMA_backquote($field['Field']);
            }
            $query = str_replace('%d', PMA_backquote($db), str_replace('%t', PMA_backquote($table), str_replace('%f', implode(', ', $field_names), $GLOBALS['cfg']['DefaultQueryTable'])));
            unset($field_names);
        }
    }
    $legend .= ': ' . PMA_showMySQLDocu('SQL-Syntax', 'SELECT');
    if (count($fields_list)) {
        $sqlquerycontainer_id = 'sqlquerycontainer';
    } else {
        $sqlquerycontainer_id = 'sqlquerycontainerfull';
    }
    echo '<a name="querybox"></a>' . "\n" . '<div id="queryboxcontainer">' . "\n" . '<fieldset id="querybox">' . "\n";
    echo '<legend>' . $legend . '</legend>' . "\n";
    echo '<div id="queryfieldscontainer">' . "\n";
    echo '<div id="' . $sqlquerycontainer_id . '">' . "\n" . '<textarea name="sql_query" id="sqlquery"' . '  cols="' . $GLOBALS['cfg']['TextareaCols'] . '"' . '  rows="' . $GLOBALS['cfg']['TextareaRows'] . '"' . '  dir="' . $GLOBALS['text_dir'] . '"' . $auto_sel . $locking . '>' . htmlspecialchars($query) . '</textarea>' . "\n";
    echo '</div>' . "\n";
    if (count($fields_list)) {
        echo '<div id="tablefieldscontainer">' . "\n" . '<label>' . $GLOBALS['strFields'] . '</label>' . "\n" . '<select id="tablefields" name="dummy" ' . 'size="' . ($GLOBALS['cfg']['TextareaRows'] - 2) . '" ' . 'multiple="multiple" ondblclick="insertValueQuery()">' . "\n";
        foreach ($fields_list as $field) {
            echo '<option value="' . PMA_backquote(htmlspecialchars($field['Field'])) . '"';
            if (isset($field['Field']) && strlen($field['Field']) && isset($field['Comment'])) {
                echo ' title="' . htmlspecialchars($field['Comment']) . '"';
            }
            echo '>' . htmlspecialchars($field['Field']) . '</option>' . "\n";
        }
        echo '</select>' . "\n" . '<div id="tablefieldinsertbuttoncontainer">' . "\n";
        if ($GLOBALS['cfg']['PropertiesIconic']) {
//.........这里部分代码省略.........
开发者ID:hoogle,项目名称:ttt,代码行数:101,代码来源:sql_query_form.lib.php

示例7: checkFormElementInRange

         */
        ?>
    <!-- Indexes form -->
    <form action="./tbl_indexes.php" method="post" onsubmit="return checkFormElementInRange(this, 'idx_num_fields', '<?php 
        echo str_replace('\'', '\\\'', $GLOBALS['strInvalidColumnCount']);
        ?>
', 1)">
    <table border="0" cellpadding="2" cellspacing="1">
    <tr><td class="tblHeaders" colspan="7">
        <?php 
        echo PMA_generate_common_hidden_inputs($db, $table);
        ?>
    <?php 
        echo "\n";
        echo '        ' . $strIndexes . ':' . "\n";
        echo '        ' . PMA_showMySQLDocu('optimization', 'optimizing-database-structure') . "\n";
        ?>
</td></tr><?php 
        $edit_link_text = '';
        $drop_link_text = '';
        // We need to copy the value or else the == 'both' check will always return true
        $propicon = (string) $cfg['PropertiesIconic'];
        if ($cfg['PropertiesIconic'] === true || $propicon == 'both') {
            $edit_link_text = '<img src="' . $pmaThemeImage . 'b_edit.png" width="16" height="16" hspace="2" border="0" title="' . $strEdit . '" alt="' . $strEdit . '" />';
            $drop_link_text = '<img src="' . $pmaThemeImage . 'b_drop.png" width="16" height="16" hspace="2" border="0" title="' . $strDrop . '" alt="' . $strDrop . '" />';
        }
        if ($cfg['PropertiesIconic'] === false || $propicon == 'both') {
            $edit_link_text .= $strEdit;
            $drop_link_text .= $strDrop;
        }
        if ($propicon == 'both') {
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:31,代码来源:tbl_indexes.php

示例8: PMA_backquote

        $this_sql_query = 'DROP DATABASE ' . PMA_backquote($GLOBALS['db']);
        $this_url_params = array('sql_query' => $this_sql_query, 'back' => 'db_operations.php', 'goto' => 'main.php', 'reload' => '1', 'purge' => '1', 'message_to_show' => sprintf(__('Database %s has been dropped.'), htmlspecialchars(PMA_backquote($db))), 'db' => null);
        ?>
        <li><a href="sql.php<?php 
        echo PMA_generate_common_url($this_url_params);
        ?>
" <?php 
        echo $GLOBALS['cfg']['AjaxEnable'] ? 'id="drop_db_anchor"' : '';
        ?>
>
            <?php 
        echo __('Drop the database (DROP)');
        ?>
</a>
        <?php 
        echo PMA_showMySQLDocu('SQL-Syntax', 'DROP_DATABASE');
        ?>
    </li>
</ul>
</fieldset>
</div>
<?php 
    }
    /**
     * Copy database
     */
    ?>
        <div class="operations_half_width clearfloat">
        <form id="copy_db_form" <?php 
    echo $GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax" ' : '';
    ?>
开发者ID:rizwanaabbas,项目名称:phpmyadmin,代码行数:31,代码来源:db_operations.php

示例9: checkSqlQuery

    echo ' enctype="multipart/form-data"';
}
?>
 onsubmit="return checkSqlQuery(this)" name="sqlform">
<?php 
echo $strHiddenFields;
?>
<a name="querybox"></a>
<table border="0" cellpadding="2" cellspacing="0">
<tr><td class="tblHeaders" colspan="2">
    <?php 
// if you want navigation:
$strDBLink = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . PMA_generate_common_url() . '&amp;db=' . urlencode($db) . '">' . htmlspecialchars($db) . '</a>';
// else use
// $strDBLink = htmlspecialchars($db);
echo '&nbsp;' . sprintf($strRunSQLQuery, $strDBLink) . ':&nbsp;' . PMA_showMySQLDocu('Reference', 'SELECT');
?>
</td></tr>
<tr align="center" bgcolor="<?php 
echo $cfg['BgcolorOne'];
?>
"><td colspan="2">
<textarea name="sql_query" cols="<?php 
echo $cfg['TextareaCols'] * 2;
?>
" rows="<?php 
echo $cfg['TextareaRows'];
?>
" dir="<?php 
echo $text_dir;
?>
开发者ID:mike503,项目名称:phpmyadmin,代码行数:31,代码来源:db_details.php

示例10: getView

 /**
  * Show index data
  *
  * @param   string      $table          The tablename
  * @param   array       $indexes_info   Referenced info array
  * @param   array       $indexes_data   Referenced data array
  * @param   boolean     $print_mode
  * @access  public
  * @return  array       Index collection array
  */
 public static function getView($table, $schema, $print_mode = false)
 {
     $indexes = PMA_Index::getFromTable($table, $schema);
     if (count($indexes) < 1) {
         return PMA_Message::error(__('No index defined!'))->getDisplay();
     }
     $r = '';
     $r .= '<h2>' . __('Indexes') . ': ';
     $r .= PMA_showMySQLDocu('optimization', 'optimizing-database-structure');
     $r .= '</h2>';
     $r .= '<table>';
     $r .= '<thead>';
     $r .= '<tr>';
     if (!$print_mode) {
         $r .= '<th colspan="2">' . __('Action') . '</th>';
     }
     $r .= '<th>' . __('Keyname') . '</th>';
     $r .= '<th>' . __('Type') . '</th>';
     $r .= '<th>' . __('Unique') . '</th>';
     $r .= '<th>' . __('Packed') . '</th>';
     $r .= '<th>' . __('Column') . '</th>';
     $r .= '<th>' . __('Cardinality') . '</th>';
     $r .= '<th>' . __('Collation') . '</th>';
     $r .= '<th>' . __('Null') . '</th>';
     $r .= '<th>' . __('Comment') . '</th>';
     $r .= '</tr>';
     $r .= '</thead>';
     $r .= '<tbody>';
     $odd_row = true;
     foreach ($indexes as $index) {
         $row_span = ' rowspan="' . $index->getColumnCount() . '" ';
         $r .= '<tr class="' . ($odd_row ? 'odd' : 'even') . '">';
         if (!$print_mode) {
             $this_params = $GLOBALS['url_params'];
             $this_params['index'] = $index->getName();
             $r .= '<td ' . $row_span . '>' . '    <a href="tbl_indexes.php' . PMA_generate_common_url($this_params) . '">' . PMA_getIcon('b_edit.png', __('Edit')) . '</a>' . '</td>' . "\n";
             $this_params = $GLOBALS['url_params'];
             if ($index->getName() == 'PRIMARY') {
                 $this_params['sql_query'] = 'ALTER TABLE ' . PMA_backquote($table) . ' DROP PRIMARY KEY';
                 $this_params['message_to_show'] = __('The primary key has been dropped');
                 $js_msg = PMA_jsFormat('ALTER TABLE ' . $table . ' DROP PRIMARY KEY');
             } else {
                 $this_params['sql_query'] = 'ALTER TABLE ' . PMA_backquote($table) . ' DROP INDEX ' . PMA_backquote($index->getName());
                 $this_params['message_to_show'] = sprintf(__('Index %s has been dropped'), $index->getName());
                 $js_msg = PMA_jsFormat('ALTER TABLE ' . $table . ' DROP INDEX ' . $index->getName());
             }
             $r .= '<td ' . $row_span . '>';
             $r .= '<input type="hidden" class="drop_primary_key_index_msg" value="' . $js_msg . '" />';
             $r .= '    <a ';
             if ($GLOBALS['cfg']['AjaxEnable']) {
                 $r .= 'class="drop_primary_key_index_anchor" ';
             }
             $r .= ' href="sql.php' . PMA_generate_common_url($this_params) . '" >' . PMA_getIcon('b_drop.png', __('Drop')) . '</a>' . '</td>' . "\n";
         }
         $r .= '<th ' . $row_span . '>' . htmlspecialchars($index->getName()) . '</th>';
         $r .= '<td ' . $row_span . '>' . htmlspecialchars($index->getType()) . '</td>';
         $r .= '<td ' . $row_span . '>' . $index->isUnique(true) . '</td>';
         $r .= '<td ' . $row_span . '>' . $index->isPacked(true) . '</td>';
         foreach ($index->getColumns() as $column) {
             if ($column->getSeqInIndex() > 1) {
                 $r .= '<tr class="' . ($odd_row ? 'odd' : 'even') . '">';
             }
             $r .= '<td>' . htmlspecialchars($column->getName());
             if ($column->getSubPart()) {
                 $r .= ' (' . $column->getSubPart() . ')';
             }
             $r .= '</td>';
             $r .= '<td>' . htmlspecialchars($column->getCardinality()) . '</td>';
             $r .= '<td>' . htmlspecialchars($column->getCollation()) . '</td>';
             $r .= '<td>' . htmlspecialchars($column->getNull()) . '</td>';
             if ($column->getSeqInIndex() == 1) {
                 $r .= '<td ' . $row_span . '>' . htmlspecialchars($index->getComments()) . '</td>';
             }
             $r .= '</tr>';
         }
         // end foreach $index['Sequences']
         $odd_row = !$odd_row;
     }
     // end while
     $r .= '</tbody>';
     $r .= '</table>';
     if (!$print_mode) {
         $r .= PMA_Index::findDuplicates($table, $schema);
     }
     return $r;
 }
开发者ID:BGCX262,项目名称:zuozhenshi-prego-svn-to-git,代码行数:96,代码来源:Index.class.php

示例11: foreach

</tr>
</thead>
<tbody>
<?php
$odd_row = true;
foreach ($serverVars as $name => $value) {
    $has_session_value = isset($serverVarsSession[$name]) && $serverVarsSession[$name] != $value;
    $row_class = ($odd_row ? 'odd' : 'even') . ' ' . ($has_session_value ? 'diffSession' : '');
    ?>
<tr class="<?php echo $row_class; ?>">
    <th class="nowrap"><?php echo htmlspecialchars(str_replace('_', ' ', $name)); ?></th>
    <td class="value"><?php echo formatVariable($name, $value); ?></td>
    <td class="value"><?php
    // To display variable documentation link
    if (isset($VARIABLE_DOC_LINKS[$name])) {
        echo PMA_showMySQLDocu($VARIABLE_DOC_LINKS[$name][1], $VARIABLE_DOC_LINKS[$name][1], false, $VARIABLE_DOC_LINKS[$name][2] . '_' . $VARIABLE_DOC_LINKS[$name][0]);
    }
    ?></td>
    <?php
    if ($has_session_value) {
        ?>
</tr>
<tr class="<?php echo $odd_row ? 'odd' : 'even'; ?> ">
    <td>(<?php echo __('Session value'); ?>)</td>
    <td class="value"><?php echo formatVariable($name, $serverVarsSession[$name]); ?></td>
    <td class="value"></td>
    <?php } ?>
</tr>
    <?php
    $odd_row = ! $odd_row;
}
开发者ID:nicokaiser,项目名称:phpmyadmin,代码行数:31,代码来源:server_variables.php

示例12: PMA_generate_common_hidden_inputs

    echo PMA_generate_common_hidden_inputs('', '', 5);
    ?>
            <input type="hidden" name="reload" value="1" />
            <input type="text" name="new_db" value="<?php 
    echo $db_to_create;
    ?>
" maxlength="64" class="textfield" id="text_create_db"/>
    <?php 
    include_once './libraries/mysql_charsets.lib.php';
    echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', null, null, true, 5);
    if (!empty($dbstats)) {
        echo '<input type="hidden" name="dbstats" value="1" />';
    }
    ?>
            <input type="submit" value="<?php 
    echo __('Create');
    ?>
" id="buttonGo" />
        </form>
    <?php 
} else {
    ?>
    <!-- db creation no privileges message -->
        <strong><?php 
    echo __('Create database') . ':&nbsp;' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE');
    ?>
</strong><br />
        <?php 
    echo '<span class="noPrivileges">' . ($cfg['ErrorIconic'] ? PMA_getImage('s_error2.png', '', array('hspace' => 2, 'border' => 0, 'align' => 'middle')) : '') . '' . __('No Privileges') . '</span>';
}
// end create db form or message
开发者ID:AmberWish,项目名称:laba_web,代码行数:31,代码来源:display_create_database.lib.php

示例13: array

echo $GLOBALS['strSearchNeedle'];
?>
</td>
        <td><input type="text" name="search_str" size="60"
                value="<?php 
echo $searched;
?>
" /></td>
    </tr>
    <tr><td align="right" valign="top">
            <?php 
echo $GLOBALS['strSearchType'];
?>
</td>
            <td><?php 
$choices = array('1' => $GLOBALS['strSearchOption1'] . PMA_showHint($GLOBALS['strSplitWordsWithSpace']), '2' => $GLOBALS['strSearchOption2'] . PMA_showHint($GLOBALS['strSplitWordsWithSpace']), '3' => $GLOBALS['strSearchOption3'], '4' => $GLOBALS['strSearchOption4'] . ' ' . PMA_showMySQLDocu('Regexp', 'Regexp'));
// 4th parameter set to true to add line breaks
// 5th parameter set to false to avoid htmlspecialchars() escaping in the label
//  since we have some HTML in some labels
PMA_display_html_radio('search_option', $choices, $search_option, true, false);
unset($choices);
?>
            </td>
    </tr>
    <tr><td align="right" valign="top">
            <?php 
echo $GLOBALS['strSearchInTables'];
?>
</td>
        <td rowspan="2">
<?php 
开发者ID:fathitarek,项目名称:cop5725-dbms-project,代码行数:31,代码来源:db_search.php

示例14: PMA_printListItem

/**
 * prints list item for main page
 *
 * @param   string  $name   displayed text
 * @param   string  $id     id, used for css styles
 * @param   string  $url    make item as link with $url as target
 * @param   string  $mysql_help_page  display a link to MySQL's manual
 * @param   string  $target special target for $url
 * @param   string  $a_id   id for the anchor, used for jQuery to hook in functions
 * @param   string  $class  class for the li element
 * @param   string  $a_class  class for the anchor element
 */
function PMA_printListItem($name, $id = null, $url = null, $mysql_help_page = null, $target = null, $a_id = null, $class = null, $a_class = null)
{
    echo '<li id="' . $id . '"';
    if (null !== $class) {
        echo ' class="' . $class . '"';
    }
    echo '>';
    if (null !== $url) {
        echo '<a href="' . $url . '"';
        if (null !== $target) {
            echo ' target="' . $target . '"';
        }
        if (null != $a_id) {
            echo ' id="' . $a_id . '"';
        }
        if (null != $a_class) {
            echo ' class="' . $a_class . '"';
        }
        echo '>';
    }
    echo $name;
    if (null !== $url) {
        echo '</a>' . "\n";
    }
    if (null !== $mysql_help_page) {
        echo PMA_showMySQLDocu('', $mysql_help_page);
    }
    echo '</li>';
}
开发者ID:dingdong2310,项目名称:g5_theme,代码行数:41,代码来源:main.php

示例15: htmlspecialchars

    : $strModifyIndexTopic);
?>
    </legend>

<div class="formelement">
<label for="input_index_name"><?php echo $strIndexName; ?></label>
<input type="text" name="index[Key_name]" id="input_index_name" size="25"
    value="<?php echo htmlspecialchars($index->getName()); ?>" onfocus="this.select()" />
</div>

<div class="formelement">
<label for="select_index_type"><?php echo $strIndexType; ?></label>
<select name="index[Index_type]" id="select_index_type" onchange="return checkIndexName()">
    <?php echo $index->generateIndexSelector(); ?>
</select>
<?php echo PMA_showMySQLDocu('SQL-Syntax', 'ALTER_TABLE'); ?>
</div>


<br class="clearfloat" />
<?php
PMA_Message::warning('strPrimaryKeyWarning')->display();
?>

<table>
<thead>
<tr><th><?php echo $strField; ?></th>
    <th><?php echo $strSize; ?></th>
</tr>
</thead>
<tbody>
开发者ID:blumenbach,项目名称:blumenbach-online.de,代码行数:31,代码来源:tbl_indexes.php


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