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


PHP PMA_message类代码示例

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


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

示例1: PMA_RTE_sendEditor

/**
 * Send TRI or EVN editor via ajax or by echoing.
 *
 * @param string $type      TRI or EVN
 * @param string $mode      Editor mode 'add' or 'edit'
 * @param array  $item      Data necessary to create the editor
 * @param string $title     Title of the editor
 * @param string $db        Database
 * @param string $operation Operation 'change' or ''
 *
 * @return void
 */
function PMA_RTE_sendEditor($type, $mode, $item, $title, $db, $operation = null)
{
    if ($item !== false) {
        // Show form
        if ($type == 'TRI') {
            $editor = PMA_TRI_getEditorForm($mode, $item);
        } else {
            // EVN
            $editor = PMA_EVN_getEditorForm($mode, $operation, $item);
        }
        if ($GLOBALS['is_ajax_request']) {
            $response = PMA_Response::getInstance();
            $response->addJSON('message', $editor);
            $response->addJSON('title', $title);
        } else {
            echo "\n\n<h2>{$title}</h2>\n\n{$editor}";
            unset($_POST);
        }
        exit;
    } else {
        $message = __('Error in processing request:') . ' ';
        $message .= sprintf(PMA_RTE_getWord('not_found'), htmlspecialchars(PMA_Util::backquote($_REQUEST['item_name'])), htmlspecialchars(PMA_Util::backquote($db)));
        $message = PMA_message::error($message);
        if ($GLOBALS['is_ajax_request']) {
            $response = PMA_Response::getInstance();
            $response->isSuccess(false);
            $response->addJSON('message', $message);
            exit;
        } else {
            $message->display();
        }
    }
}
开发者ID:FuhrerMalkovich,项目名称:Blogpost,代码行数:45,代码来源:rte_general.lib.php

示例2: PMA_RTE_handleExport

/**
 * This function is called from one of the other functions in this file
 * and it completes the handling of the export functionality.
 *
 * @param string $item_name   The name of the item that we are exporting
 * @param string $export_data The SQL query to create the requested item
 *
 * @return void
 */
function PMA_RTE_handleExport($item_name, $export_data)
{
    global $db;
    $item_name = htmlspecialchars(PMA_Util::backquote($_GET['item_name']));
    if ($export_data !== false) {
        $export_data = '<textarea cols="40" rows="15" style="width: 100%;">' . htmlspecialchars(trim($export_data)) . '</textarea>';
        $title = sprintf(PMA_RTE_getWord('export'), $item_name);
        if ($GLOBALS['is_ajax_request'] == true) {
            $response = PMA_Response::getInstance();
            $response->addJSON('message', $export_data);
            $response->addJSON('title', $title);
            exit;
        } else {
            echo "<fieldset>\n" . "<legend>{$title}</legend>\n" . $export_data . "</fieldset>\n";
        }
    } else {
        $_db = htmlspecialchars(PMA_Util::backquote($db));
        $message = __('Error in processing request:') . ' ' . sprintf(PMA_RTE_getWord('not_found'), $item_name, $_db);
        $response = PMA_message::error($message);
        if ($GLOBALS['is_ajax_request'] == true) {
            $response = PMA_Response::getInstance();
            $response->isSuccess(false);
            $response->addJSON('message', $message);
            exit;
        } else {
            $response->display();
        }
    }
}
开发者ID:ecssjapan,项目名称:guiding-you-afteropen,代码行数:38,代码来源:rte_export.lib.php

示例3: PMA_RTE_handleExport

/**
 * This function is called from one of the other functions in this file
 * and it completes the handling of the export functionality.
 *
 * @param  string  $item_name    The name of the item that we are exporting
 * @param  string  $export_data  The SQL query to create the requested item
 */
function PMA_RTE_handleExport($item_name, $export_data)
{
    global $db;
    $item_name = htmlspecialchars(PMA_backquote($_GET['item_name']));
    if ($export_data !== false) {
        $export_data = '<textarea cols="40" rows="15" style="width: 100%;">' . htmlspecialchars(trim($export_data)) . '</textarea>';
        $title = sprintf(PMA_RTE_getWord('export'), $item_name);
        if ($GLOBALS['is_ajax_request'] == true) {
            $extra_data = array('title' => $title);
            PMA_ajaxResponse($export_data, true, $extra_data);
        } else {
            echo "<fieldset>\n" . "<legend>{$title}</legend>\n" . $export_data . "</fieldset>\n";
        }
    } else {
        $_db = htmlspecialchars(PMA_backquote($db));
        $response = __('Error in Processing Request') . ' : ' . sprintf(PMA_RTE_getWord('not_found'), $item_name, $_db);
        $response = PMA_message::error($response);
        if ($GLOBALS['is_ajax_request'] == true) {
            PMA_ajaxResponse($response, false);
        } else {
            $response->display();
        }
    }
}
开发者ID:kirhgoph,项目名称:VMWare-Workstation-web-interface,代码行数:31,代码来源:rte_export.lib.php

示例4: PMA_TRI_handleEditor


//.........这里部分代码省略.........
                        $message->addParam(PMA_Util::backquote($_REQUEST['item_name']));
                        $sql_query = $drop_item . $item_query;
                    }
                }
            } else {
                // 'Add a new item' mode
                $result = PMA_DBI_try_query($item_query);
                if (!$result) {
                    $errors[] = sprintf(__('The following query has failed: "%s"'), htmlspecialchars($item_query)) . '<br /><br />' . __('MySQL said: ') . PMA_DBI_getError(null);
                } else {
                    $message = PMA_Message::success(__('Trigger %1$s has been created.'));
                    $message->addParam(PMA_Util::backquote($_REQUEST['item_name']));
                    $sql_query = $item_query;
                }
            }
        }
        if (count($errors)) {
            $message = PMA_Message::error(__('<b>One or more errors have occured while processing your request:</b>'));
            $message->addString('<ul>');
            foreach ($errors as $string) {
                $message->addString('<li>' . $string . '</li>');
            }
            $message->addString('</ul>');
        }
        $output = PMA_Util::getMessage($message, $sql_query);
        if ($GLOBALS['is_ajax_request']) {
            $response = PMA_Response::getInstance();
            if ($message->isSuccess()) {
                $items = PMA_DBI_get_triggers($db, $table, '');
                $trigger = false;
                foreach ($items as $value) {
                    if ($value['name'] == $_REQUEST['item_name']) {
                        $trigger = $value;
                    }
                }
                $insert = false;
                if (empty($table) || $trigger !== false && $table == $trigger['table']) {
                    $insert = true;
                    $response->addJSON('new_row', PMA_TRI_getRowForList($trigger));
                    $response->addJSON('name', htmlspecialchars(strtoupper($_REQUEST['item_name'])));
                }
                $response->addJSON('insert', $insert);
                $response->addJSON('message', $output);
            } else {
                $response->addJSON('message', $message);
                $response->isSuccess(false);
            }
            exit;
        }
    }
    /**
     * Display a form used to add/edit a trigger, if necessary
     */
    if (count($errors) || empty($_REQUEST['editor_process_add']) && empty($_REQUEST['editor_process_edit']) && (!empty($_REQUEST['add_item']) || !empty($_REQUEST['edit_item']))) {
        // Get the data for the form (if any)
        if (!empty($_REQUEST['add_item'])) {
            $title = PMA_RTE_getWord('add');
            $item = PMA_TRI_getDataFromRequest();
            $mode = 'add';
        } else {
            if (!empty($_REQUEST['edit_item'])) {
                $title = __("Edit trigger");
                if (!empty($_REQUEST['item_name']) && empty($_REQUEST['editor_process_edit'])) {
                    $item = PMA_TRI_getDataFromName($_REQUEST['item_name']);
                    if ($item !== false) {
                        $item['item_original_name'] = $item['item_name'];
                    }
                } else {
                    $item = PMA_TRI_getDataFromRequest();
                }
                $mode = 'edit';
            }
        }
        if ($item !== false) {
            // Show form
            $editor = PMA_TRI_getEditorForm($mode, $item);
            if ($GLOBALS['is_ajax_request']) {
                $response = PMA_Response::getInstance();
                $response->addJSON('message', $editor);
                $response->addJSON('title', $title);
            } else {
                echo "\n\n<h2>{$title}</h2>\n\n{$editor}";
                unset($_POST);
            }
            exit;
        } else {
            $message = __('Error in processing request') . ' : ';
            $message .= sprintf(PMA_RTE_getWord('not_found'), htmlspecialchars(PMA_Util::backquote($_REQUEST['item_name'])), htmlspecialchars(PMA_Util::backquote($db)));
            $message = PMA_message::error($message);
            if ($GLOBALS['is_ajax_request']) {
                $response = PMA_Response::getInstance();
                $response->isSuccess(false);
                $response->addJSON('message', $message);
                exit;
            } else {
                $message->display();
            }
        }
    }
}
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:101,代码来源:rte_triggers.lib.php

示例5: PMA_getReservedWordColumnNameMessages

/**
 * Check column names for MySQL reserved words
 *
 * @param string $db    database name
 * @param string $table tablename
 *
 * @return array $messages      array of PMA_Messages
 */
function PMA_getReservedWordColumnNameMessages($db, $table)
{
    $messages = array();
    if ($GLOBALS['cfg']['ReservedWordDisableWarning'] === false) {
        $pma_table = new PMA_Table($table, $db);
        $columns = $pma_table->getReservedColumnNames();
        if (!empty($columns)) {
            foreach ($columns as $column) {
                $msg = PMA_message::notice(__('The column name \'%s\' is a MySQL reserved keyword.'));
                $msg->addParam($column);
                $messages[] = $msg;
            }
        }
    }
    return $messages;
}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:24,代码来源:structure.lib.php

示例6: PMA_auth

/**
 * Displays authentication form
 *
 * this function MUST exit/quit the application
 *
 * @global  string    the last connection error
 *
 * @access  public
 */
function PMA_auth()
{
    global $conn_error;
    /* Perform logout to custom URL */
    if (!empty($_REQUEST['old_usr']) && !empty($GLOBALS['cfg']['Server']['LogoutURL'])) {
        PMA_sendHeaderLocation($GLOBALS['cfg']['Server']['LogoutURL']);
        exit;
    }
    /* No recall if blowfish secret is not configured as it would produce garbage */
    if ($GLOBALS['cfg']['LoginCookieRecall'] && !empty($GLOBALS['cfg']['blowfish_secret'])) {
        $default_user = $GLOBALS['PHP_AUTH_USER'];
        $default_server = $GLOBALS['pma_auth_server'];
        $autocomplete = '';
    } else {
        $default_user = '';
        $default_server = '';
        // skip the IE autocomplete feature.
        $autocomplete = ' autocomplete="off"';
    }
    $cell_align = $GLOBALS['text_dir'] == 'ltr' ? 'left' : 'right';
    // Defines the charset to be used
    header('Content-Type: text/html; charset=utf-8');
    /* HTML header; do not show here the PMA version to improve security */
    $page_title = 'phpMyAdmin ';
    include './libraries/header_meta_style.inc.php';
    // if $page_title is set, this script uses it as the title:
    include './libraries/header_scripts.inc.php';
    ?>
</head>

<body class="loginform">

    <?php 
    if (file_exists(CUSTOM_HEADER_FILE)) {
        include CUSTOM_HEADER_FILE;
    }
    ?>

<div class="container">
<a href="<?php 
    echo PMA_linkURL('http://www.phpmyadmin.net/');
    ?>
" target="_blank" class="logo"><?php 
    $logo_image = $GLOBALS['pmaThemeImage'] . 'logo_right.png';
    if (@file_exists($logo_image)) {
        echo '<img src="' . $logo_image . '" id="imLogo" name="imLogo" alt="phpMyAdmin" border="0" />';
    } else {
        echo '<img name="imLogo" id="imLogo" src="' . $GLOBALS['pmaThemeImage'] . 'pma_logo.png' . '" ' . 'border="0" width="88" height="31" alt="phpMyAdmin" />';
    }
    ?>
</a>
<h1>
    <?php 
    echo sprintf(__('Welcome to %s'), '<bdo dir="ltr" lang="en">' . $page_title . '</bdo>');
    ?>
</h1>
    <?php 
    // Show error message
    if (!empty($conn_error)) {
        PMA_Message::rawError($conn_error)->display();
    }
    echo "<noscript>\n";
    PMA_message::error(__("Javascript must be enabled past this point"))->display();
    echo "</noscript>\n";
    echo "<div class='hide js-show'>";
    // Displays the languages form
    if (empty($GLOBALS['cfg']['Lang'])) {
        include_once './libraries/display_select_lang.lib.php';
        // use fieldset, don't show doc link
        PMA_select_language(true, false);
    }
    echo "</div>";
    ?>
<br />
<!-- Login form -->
<form method="post" action="index.php" name="login_form"<?php 
    echo $autocomplete;
    ?>
 target="_top" class="login hide js-show">
    <fieldset>
    <legend>
<?php 
    echo __('Log in');
    echo PMA_showDocu('');
    ?>
</legend>

<?php 
    if ($GLOBALS['cfg']['AllowArbitraryServer']) {
        ?>
        <div class="item">
//.........这里部分代码省略.........
开发者ID:nicokaiser,项目名称:phpmyadmin,代码行数:101,代码来源:cookie.auth.lib.php

示例7: PMA_RTN_handleExecute


//.........这里部分代码省略.........
                        $output .= "</tr>";
                        $color_class = 'odd';
                        while ($row = PMA_DBI_fetch_assoc($result)) {
                            $output .= "<tr>";
                            foreach ($row as $key => $value) {
                                if ($value === null) {
                                    $value = '<i>NULL</i>';
                                } else {
                                    $value = htmlspecialchars($value);
                                }
                                $output .= "<td class='" . $color_class . "'>" . $value . "</td>";
                            }
                            $output .= "</tr>";
                            $color_class = $color_class == 'odd' ? 'even' : 'odd';
                        }
                        $output .= "</table>";
                        $num_of_rusults_set_to_display++;
                        $affected = $num_rows;
                    }
                    if (!PMA_DBI_more_results()) {
                        break;
                    }
                    $output .= "<br/>";
                    PMA_DBI_free_result($result);
                } while (PMA_DBI_next_result());
                $output .= "</fieldset>";
                $message = __('Your SQL query has been executed successfully');
                if ($routine['item_type'] == 'PROCEDURE') {
                    $message .= '<br />';
                    // TODO : message need to be modified according to the
                    // output from the routine
                    $message .= sprintf(_ngettext('%d row affected by the last statement inside the procedure', '%d rows affected by the last statement inside the procedure', $affected), $affected);
                }
                $message = PMA_message::success($message);
                if ($num_of_rusults_set_to_display == 0) {
                    $notice = __('MySQL returned an empty result set (i.e. zero rows).');
                    $output .= PMA_message::notice($notice)->getDisplay();
                }
            } else {
                $output = '';
                $message = PMA_message::error(sprintf(__('The following query has failed: "%s"'), htmlspecialchars($query)) . '<br /><br />' . __('MySQL said: ') . PMA_DBI_getError(null));
            }
            // Print/send output
            if ($GLOBALS['is_ajax_request']) {
                $response = PMA_Response::getInstance();
                $response->isSuccess($message->isSuccess());
                $response->addJSON('message', $message->getDisplay() . $output);
                $response->addJSON('dialog', false);
                exit;
            } else {
                echo $message->getDisplay() . $output;
                if ($message->isError()) {
                    // At least one query has failed, so shouldn't
                    // execute any more queries, so we quit.
                    exit;
                }
                unset($_POST);
                // Now deliberately fall through to displaying the routines list
            }
        } else {
            $message = __('Error in processing request') . ' : ';
            $message .= sprintf(PMA_RTE_getWord('not_found'), htmlspecialchars(PMA_Util::backquote($_REQUEST['item_name'])), htmlspecialchars(PMA_Util::backquote($db)));
            $message = PMA_message::error($message);
            if ($GLOBALS['is_ajax_request']) {
                $response = PMA_Response::getInstance();
                $response->isSuccess(false);
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:67,代码来源:rte_routines.lib.php

示例8: 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'] = PMA_Message::success();
         }
     }
     $this->_url_query .= '&amp;goto=db_structure.php';
     // Gets the database structure
     $sub_part = '_structure';
     list($tables, $num_tables, $total_num_tables, $sub_part, $is_show_stats, $db_is_system_schema, $tooltip_truename, $tooltip_aliasname, $pos) = PMA_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;
     }
     if (!PMA_DRIZZLE) {
         include_once 'libraries/replication.inc.php';
     } else {
         $GLOBALS['replication_info']['slave']['status'] = false;
     }
     PMA_PageSettings::showGroup('DbStructure');
     $db_collation = PMA_getDbCollation($this->db);
     $titles = PMA_Util::buildActionTitles();
     // 1. No tables
     if ($this->_num_tables == 0) {
         $this->response->addHTML(PMA_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(PMA_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 PMA_RecentFavoriteTable class.
     $fav_instance = PMA_RecentFavoriteTable::getInstance('favorite');
     foreach ($this->_tables as $keyname => $current_table) {
         // Get valid statistics whatever is the table type
         $drop_query = '';
         $drop_message = '';
         $already_favorite = false;
         $overhead = '';
         $table_is_view = false;
         $table_encoded = urlencode($current_table['TABLE_NAME']);
//.........这里部分代码省略.........
开发者ID:TheBlackBloodyUnicorn,项目名称:pico_wanderblog,代码行数:101,代码来源:DatabaseStructureController.class.php

示例9: PMA_EVN_handleEditor


//.........这里部分代码省略.........
                            // and now even the backup query does not execute!
                            // This should not happen, but we better handle this just in case.
                            $errors[] = __('Sorry, we failed to restore the dropped event.') . '<br />' . __('The backed up query was:') . "\"{$create_item}\"" . '<br />' . __('MySQL said: ') . PMA_DBI_getError(null);
                        }
                    } else {
                        $message = PMA_Message::success(__('Event %1$s has been modified.'));
                        $message->addParam(PMA_backquote($_REQUEST['item_name']));
                        $sql_query = $drop_item . $item_query;
                    }
                }
            } else {
                // 'Add a new item' mode
                $result = PMA_DBI_try_query($item_query);
                if (!$result) {
                    $errors[] = sprintf(__('The following query has failed: "%s"'), $item_query) . '<br /><br />' . __('MySQL said: ') . PMA_DBI_getError(null);
                } else {
                    $message = PMA_Message::success(__('Event %1$s has been created.'));
                    $message->addParam(PMA_backquote($_REQUEST['item_name']));
                    $sql_query = $item_query;
                }
            }
        }
        if (count($errors)) {
            $message = PMA_Message::error(__('<b>One or more errors have occured while processing your request:</b>'));
            $message->addString('<ul>');
            foreach ($errors as $string) {
                $message->addString('<li>' . $string . '</li>');
            }
            $message->addString('</ul>');
        }
        $output = PMA_showMessage($message, $sql_query);
        if ($GLOBALS['is_ajax_request']) {
            $extra_data = array();
            if ($message->isSuccess()) {
                $columns = "`EVENT_NAME`, `EVENT_TYPE`, `STATUS`";
                $where = "EVENT_SCHEMA='" . PMA_sqlAddSlashes($db) . "' " . "AND EVENT_NAME='" . PMA_sqlAddSlashes($_REQUEST['item_name']) . "'";
                $query = "SELECT {$columns} FROM `INFORMATION_SCHEMA`.`EVENTS` WHERE {$where};";
                $event = PMA_DBI_fetch_single_row($query);
                $extra_data['name'] = htmlspecialchars(strtoupper($_REQUEST['item_name']));
                $extra_data['new_row'] = PMA_EVN_getRowForList($event);
                $extra_data['insert'] = !empty($event);
                $response = $output;
            } else {
                $response = $message;
            }
            PMA_ajaxResponse($response, $message->isSuccess(), $extra_data);
        }
    }
    /**
     * Display a form used to add/edit a trigger, if necessary
     */
    if (count($errors) || empty($_REQUEST['editor_process_add']) && empty($_REQUEST['editor_process_edit']) && (!empty($_REQUEST['add_item']) || !empty($_REQUEST['edit_item']) || !empty($_REQUEST['item_changetype']))) {
        // FIXME: this must be simpler than that
        $operation = '';
        if (!empty($_REQUEST['item_changetype'])) {
            $operation = 'change';
        }
        // Get the data for the form (if any)
        if (!empty($_REQUEST['add_item'])) {
            $title = PMA_RTE_getWord('add');
            $item = PMA_EVN_getDataFromRequest();
            $mode = 'add';
        } else {
            if (!empty($_REQUEST['edit_item'])) {
                $title = __("Edit event");
                if (!empty($_REQUEST['item_name']) && empty($_REQUEST['editor_process_edit']) && empty($_REQUEST['item_changetype'])) {
                    $item = PMA_EVN_getDataFromName($_REQUEST['item_name']);
                    if ($item !== false) {
                        $item['item_original_name'] = $item['item_name'];
                    }
                } else {
                    $item = PMA_EVN_getDataFromRequest();
                }
                $mode = 'edit';
            }
        }
        if ($item !== false) {
            // Show form
            $editor = PMA_EVN_getEditorForm($mode, $operation, $item);
            if ($GLOBALS['is_ajax_request']) {
                $extra_data = array('title' => $title);
                PMA_ajaxResponse($editor, true, $extra_data);
            } else {
                echo "\n\n<h2>{$title}</h2>\n\n{$editor}";
                unset($_POST);
                include './libraries/footer.inc.php';
            }
            // exit;
        } else {
            $message = __('Error in processing request') . ' : ';
            $message .= sprintf(PMA_RTE_getWord('not_found'), htmlspecialchars(PMA_backquote($_REQUEST['item_name'])), htmlspecialchars(PMA_backquote($db)));
            $message = PMA_message::error($message);
            if ($GLOBALS['is_ajax_request']) {
                PMA_ajaxResponse($message, false);
            } else {
                $message->display();
            }
        }
    }
}
开发者ID:AmberWish,项目名称:laba_web,代码行数:101,代码来源:rte_events.lib.php

示例10: PMA_getRelationsParam

 */
$cfgRelation = PMA_getRelationsParam();
/**
 * Runs common work
 */
require_once 'libraries/tbl_common.inc.php';
$url_query .= '&amp;goto=tbl_structure.php&amp;back=tbl_structure.php';
$url_params['goto'] = 'tbl_structure.php';
$url_params['back'] = 'tbl_structure.php';
// Check column names for MySQL reserved words
if ($cfg['ReservedWordDisableWarning'] === false) {
    $pma_table = new PMA_Table($table, $db);
    $columns = $pma_table->getReservedColumnNames();
    if (!empty($columns)) {
        foreach ($columns as $column) {
            $msg = PMA_message::notice(__('The column name \'%s\' is a MySQL reserved keyword.'));
            $msg->addParam($column);
            $response->addHTML($msg);
        }
    }
}
/**
 * Prepares the table structure display
 */
/**
 * Gets tables informations
 */
require_once 'libraries/tbl_info.inc.php';
require_once 'libraries/Index.class.php';
// 2. Gets table keys and retains them
// @todo should be: $server->db($db)->table($table)->primary()
开发者ID:fanscky,项目名称:HTPMS,代码行数:31,代码来源:tbl_structure.php

示例11: define

    </head>

    <body>
        <?php 
        // Include possible custom headers
        if (file_exists(CUSTOM_HEADER_FILE)) {
            include CUSTOM_HEADER_FILE;
        }
        // message of "Cookies required" displayed for auth_type http or config
        // note: here, the decoration won't work because without cookies,
        // our standard CSS is not operational
        if (empty($_COOKIE)) {
            PMA_Message::notice(__('Cookies must be enabled past this point.'))->display();
        }
        echo "<noscript>\n";
        PMA_message::error(__("Javascript must be enabled past this point"))->display();
        echo "</noscript>\n";
        // offer to load user preferences from localStorage
        if ($userprefs_offer_import) {
            include_once './libraries/user_preferences.lib.php';
            PMA_userprefs_autoload_header();
        }
        // add recently used table and reload the navigation
        if (strlen($GLOBALS['table']) && $GLOBALS['cfg']['LeftRecentTable'] > 0) {
            PMA_addRecentTable($GLOBALS['db'], $GLOBALS['table']);
        }
        if (!defined('PMA_DISPLAY_HEADING')) {
            define('PMA_DISPLAY_HEADING', 1);
        }
        // pass configuration for hint tooltip display
        // (to be used by PMA_createqTip in js/functions.js)
开发者ID:nicokaiser,项目名称:phpmyadmin,代码行数:31,代码来源:header.inc.php

示例12: PMA_handleRealRowCountRequest

if ($GLOBALS['is_ajax_request'] && isset($_REQUEST['real_row_count']) && $_REQUEST['real_row_count'] == true) {
    PMA_handleRealRowCountRequest();
    exit;
}
if (!PMA_DRIZZLE) {
    include_once 'libraries/replication.inc.php';
} else {
    $GLOBALS['replication_info']['slave']['status'] = false;
}
require_once 'libraries/bookmark.lib.php';
require_once 'libraries/mysql_charsets.inc.php';
$db_collation = PMA_getDbCollation($db);
$titles = PMA_Util::buildActionTitles();
// 1. No tables
if ($num_tables == 0) {
    $response->addHTML(PMA_message::notice(__('No tables found in database.')));
    PMA_possiblyShowCreateTableDialog($db, $db_is_system_schema, $response);
    exit;
}
// else
// 2. Shows table informations
/**
 * Displays the tables list
 */
$response->addHTML('<div id="tableslistcontainer">');
$_url_params = array('pos' => $pos, 'db' => $db);
// Add the sort options if they exists
if (isset($_REQUEST['sort'])) {
    $_url_params['sort'] = $_REQUEST['sort'];
}
if (isset($_REQUEST['sort_order'])) {
开发者ID:graurus,项目名称:testgit_t37,代码行数:31,代码来源:db_structure.php

示例13: auth

 /**
  * Displays authentication form
  *
  * this function MUST exit/quit the application
  *
  * @global string the last connection error
  *
  * @return void
  */
 public function auth()
 {
     global $conn_error;
     $response = PMA_Response::getInstance();
     if ($response->isAjax()) {
         $response->isSuccess(false);
         if (!empty($conn_error)) {
             $response->addJSON('message', PMA_Message::error($conn_error));
         } else {
             $response->addJSON('message', PMA_Message::error(__('Your session has expired. Please login again.')));
         }
         exit;
     }
     /* Perform logout to custom URL */
     if (!empty($_REQUEST['old_usr']) && !empty($GLOBALS['cfg']['Server']['LogoutURL'])) {
         PMA_sendHeaderLocation($GLOBALS['cfg']['Server']['LogoutURL']);
         exit;
     }
     // No recall if blowfish secret is not configured as it would produce
     // garbage
     if ($GLOBALS['cfg']['LoginCookieRecall'] && !empty($GLOBALS['cfg']['blowfish_secret'])) {
         $default_user = $GLOBALS['PHP_AUTH_USER'];
         $default_server = $GLOBALS['pma_auth_server'];
         $autocomplete = '';
     } else {
         $default_user = '';
         $default_server = '';
         // skip the IE autocomplete feature.
         $autocomplete = ' autocomplete="off"';
     }
     $cell_align = $GLOBALS['text_dir'] == 'ltr' ? 'left' : 'right';
     $response->getFooter()->setMinimal();
     $header = $response->getHeader();
     $header->setBodyId('loginform');
     $header->setTitle('phpMyAdmin');
     $header->disableMenu();
     $header->disableWarnings();
     if (file_exists(CUSTOM_HEADER_FILE)) {
         include CUSTOM_HEADER_FILE;
     }
     echo '
 <div class="container">
 <a href="';
     echo PMA_linkURL('http://www.phpmyadmin.net/');
     echo '" target="_blank" class="logo">';
     $logo_image = $GLOBALS['pmaThemeImage'] . 'logo_right.png';
     if (@file_exists($logo_image)) {
         echo '<img src="' . $logo_image . '" id="imLogo" name="imLogo" alt="phpMyAdmin" border="0" />';
     } else {
         echo '<img name="imLogo" id="imLogo" src="' . $GLOBALS['pmaThemeImage'] . 'pma_logo.png' . '" ' . 'border="0" width="88" height="31" alt="phpMyAdmin" />';
     }
     echo '</a>
    <h1>';
     echo sprintf(__('Welcome to %s'), '<bdo dir="ltr" lang="en">phpMyAdmin</bdo>');
     echo "</h1>";
     // Show error message
     if (!empty($conn_error)) {
         PMA_Message::rawError($conn_error)->display();
     }
     echo "<noscript>\n";
     PMA_message::error(__("Javascript must be enabled past this point"))->display();
     echo "</noscript>\n";
     echo "<div class='hide js-show'>";
     // Displays the languages form
     if (empty($GLOBALS['cfg']['Lang'])) {
         include_once './libraries/display_select_lang.lib.php';
         // use fieldset, don't show doc link
         PMA_Language_select(true, false);
     }
     echo '</div>
 <br />
 <!-- Login form -->
 <form method="post" action="index.php" name="login_form"' . $autocomplete . ' target="_top" class="login hide js-show">
     <fieldset>
     <legend>';
     echo __('Log in');
     echo PMA_Util::showDocu('');
     echo '</legend>';
     if ($GLOBALS['cfg']['AllowArbitraryServer']) {
         echo '
         <div class="item">
             <label for="input_servername" title="';
         echo __('You can enter hostname/IP address and port separated by space.');
         echo '">';
         echo __('Server:');
         echo '</label>
             <input type="text" name="pma_servername" id="input_servername"';
         echo ' value="';
         echo htmlspecialchars($default_server);
         echo '" size="24" class="textfield" title="';
         echo __('You can enter hostname/IP address and port separated by space.');
//.........这里部分代码省略.........
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:101,代码来源:AuthenticationCookie.class.php

示例14: _getWarnings

 /**
  * Returns some warnings to be displayed at the top of the page
  *
  * @return string The warnings
  */
 private function _getWarnings()
 {
     $retval = '';
     if ($this->_warningsEnabled) {
         // message of "Cookies required" displayed for auth_type http or config
         // note: here, the decoration won't work because without cookies,
         // our standard CSS is not operational
         if (empty($_COOKIE)) {
             $retval .= PMA_Message::notice(__('Cookies must be enabled past this point.'))->getDisplay();
         }
         $retval .= "<noscript>";
         $retval .= PMA_message::error(__("Javascript must be enabled past this point"))->getDisplay();
         $retval .= "</noscript>";
     }
     return $retval;
 }
开发者ID:rajatsinghal,项目名称:phpmyadmin,代码行数:21,代码来源:Header.class.php

示例15: auth

 /**
  * Displays authentication form
  *
  * this function MUST exit/quit the application
  *
  * @global string $conn_error the last connection error
  *
  * @return boolean|void
  */
 public function auth()
 {
     global $conn_error;
     $response = PMA_Response::getInstance();
     if ($response->isAjax()) {
         $response->setRequestStatus(false);
         // redirect_flag redirects to the login page
         $response->addJSON('redirect_flag', '1');
         if (defined('TESTSUITE')) {
             return true;
         } else {
             exit;
         }
     }
     /* Perform logout to custom URL */
     if (!empty($_REQUEST['old_usr']) && !empty($GLOBALS['cfg']['Server']['LogoutURL'])) {
         PMA_sendHeaderLocation($GLOBALS['cfg']['Server']['LogoutURL']);
         if (defined('TESTSUITE')) {
             return true;
         } else {
             exit;
         }
     }
     // No recall if blowfish secret is not configured as it would produce
     // garbage
     if ($GLOBALS['cfg']['LoginCookieRecall'] && !empty($GLOBALS['cfg']['blowfish_secret'])) {
         $default_user = $GLOBALS['PHP_AUTH_USER'];
         $default_server = $GLOBALS['pma_auth_server'];
         $autocomplete = '';
     } else {
         $default_user = '';
         $default_server = '';
         // skip the IE autocomplete feature.
         $autocomplete = ' autocomplete="off"';
     }
     $response->getFooter()->setMinimal();
     $header = $response->getHeader();
     $header->setBodyId('loginform');
     $header->setTitle('phpMyAdmin');
     $header->disableMenuAndConsole();
     $header->disableWarnings();
     if (file_exists(CUSTOM_HEADER_FILE)) {
         include CUSTOM_HEADER_FILE;
     }
     echo '
 <div class="container">
 <a href="';
     echo PMA_linkURL('https://www.phpmyadmin.net/');
     echo '" target="_blank" class="logo">';
     $logo_image = $GLOBALS['pmaThemeImage'] . 'logo_right.png';
     if (@file_exists($logo_image)) {
         echo '<img src="' . $logo_image . '" id="imLogo" name="imLogo" alt="phpMyAdmin" border="0" />';
     } else {
         echo '<img name="imLogo" id="imLogo" src="' . $GLOBALS['pmaThemeImage'] . 'pma_logo.png' . '" ' . 'border="0" width="88" height="31" alt="phpMyAdmin" />';
     }
     echo '</a>
    <h1>';
     echo sprintf(__('Welcome to %s'), '<bdo dir="ltr" lang="en">phpMyAdmin</bdo>');
     echo "</h1>";
     // Show error message
     if (!empty($conn_error)) {
         PMA_Message::rawError($conn_error)->display();
     } elseif (isset($_GET['session_expired']) && intval($_GET['session_expired']) == 1) {
         PMA_Message::rawError(__('Your session has expired. Please log in again.'))->display();
     }
     echo "<noscript>\n";
     PMA_message::error(__("Javascript must be enabled past this point!"))->display();
     echo "</noscript>\n";
     echo "<div class='hide js-show'>";
     // Displays the languages form
     if (empty($GLOBALS['cfg']['Lang'])) {
         include_once './libraries/display_select_lang.lib.php';
         // use fieldset, don't show doc link
         echo PMA_getLanguageSelectorHtml(true, false);
     }
     echo '</div>
 <br />
 <!-- Login form -->
 <form method="post" action="index.php" name="login_form"' . $autocomplete . ' class="disableAjax login hide js-show">
     <fieldset>
     <legend>';
     echo __('Log in');
     echo PMA_Util::showDocu('index');
     echo '</legend>';
     if ($GLOBALS['cfg']['AllowArbitraryServer']) {
         echo '
         <div class="item">
             <label for="input_servername" title="';
         echo __('You can enter hostname/IP address and port separated by space.');
         echo '">';
         echo __('Server:');
//.........这里部分代码省略.........
开发者ID:nervo,项目名称:phpmyadmin,代码行数:101,代码来源:AuthenticationCookie.class.php


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