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


PHP PMA_message::success方法代码示例

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


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

示例1: PMA_RTN_handleExecute


//.........这里部分代码省略.........
                    if ($result !== false && $num_rows > 0) {
                        $output .= "<table><tr>";
                        foreach (PMA_DBI_get_fields_meta($result) as $key => $field) {
                            $output .= "<th>";
                            $output .= htmlspecialchars($field->name);
                            $output .= "</th>";
                        }
                        $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
            }
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:67,代码来源:rte_routines.lib.php

示例2: PMA_getBookmarkCreatedMessage

/**
 * Returns a message for successful creation of a bookmark or null if a bookmark
 * was not created
 *
 * @return PMA_message $bookmark_created_msg
 */
function PMA_getBookmarkCreatedMessage()
{
    if (isset($_GET['label'])) {
        $bookmark_created_msg = PMA_message::success(__('Bookmark %s has been created.'));
        $bookmark_created_msg->addParam($_GET['label']);
    } else {
        $bookmark_created_msg = null;
    }
    return $bookmark_created_msg;
}
开发者ID:harryboulderdash,项目名称:PlayGFC,代码行数:16,代码来源:sql.lib.php

示例3: PMA_profilingResults

 }
 if (isset($profiling_results)) {
     PMA_profilingResults($profiling_results);
 }
 // Displays the results in a table
 if (empty($disp_mode)) {
     // see the "PMA_setDisplayMode()" function in
     // libraries/display_tbl.lib.php
     $disp_mode = 'urdr111101';
 }
 // hide edit and delete links for information_schema
 if ($db == 'information_schema') {
     $disp_mode = 'nnnn110111';
 }
 if (isset($label)) {
     $message = PMA_message::success('strBookmarkCreated');
     $message->addParam($label);
     $message->display();
 }
 PMA_displayTable($result, $disp_mode, $analyzed_sql);
 PMA_DBI_free_result($result);
 // BEGIN INDEX CHECK See if indexes should be checked.
 if (isset($query_type) && $query_type == 'check_tbl' && isset($selected) && is_array($selected)) {
     foreach ($selected as $idx => $tbl_name) {
         $check = PMA_Index::findDuplicates($tbl_name, $db);
         if (!empty($check)) {
             printf($strIndexWarningTable, $tbl_name);
             echo $check;
         }
     }
 }
开发者ID:kirstynoble,项目名称:AzureTest,代码行数:31,代码来源:sql.php


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