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


PHP PMA_getListForExportUserDefinition函数代码示例

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


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

示例1: ob_get_contents

    $content = ob_get_contents();
    ob_end_clean();
    $response->addHTML($content . "\n");
} else {
    if (!empty($GLOBALS['message'])) {
        $response->addHTML(PMA_Util::getMessage($GLOBALS['message']));
        unset($GLOBALS['message']);
    }
}
/**
 * Displays the page
 */
$response->addHTML(PMA_getHtmlForUserGroupDialog(isset($username) ? $username : null, $cfgRelation['menuswork']));
// export user definition
if (isset($_REQUEST['export']) || isset($_REQUEST['submit_mult']) && $_REQUEST['submit_mult'] == 'export') {
    list($title, $export) = PMA_getListForExportUserDefinition(isset($username) ? $username : null, isset($hostname) ? $hostname : null);
    unset($username, $hostname, $grants, $one_grant);
    $response = PMA_Response::getInstance();
    if ($GLOBALS['is_ajax_request']) {
        $response->addJSON('message', $export);
        $response->addJSON('title', $title);
        exit;
    } else {
        $response->addHTML("<h2>{$title}</h2>{$export}");
    }
}
if (isset($_REQUEST['adduser'])) {
    // Add user
    $response->addHTML(PMA_getHtmlForAddUser(isset($dbname) ? $dbname : ''));
} elseif (isset($_REQUEST['checkprivsdb'])) {
    if (isset($_REQUEST['checkprivstable'])) {
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:31,代码来源:server_privileges.php

示例2: testPMAGetHtmlForExportUserDefinition

 /**
  * Test for PMA_getListForExportUserDefinition
  *
  * @return void
  */
 public function testPMAGetHtmlForExportUserDefinition()
 {
     $username = "PMA_username";
     $hostname = "PMA_hostname";
     list($title, $export) = PMA_getListForExportUserDefinition($username, $hostname);
     //validate 1: $export
     $this->assertContains('grant user2 delete', $export);
     $this->assertContains('grant user1 select', $export);
     $this->assertContains('<textarea class="export"', $export);
     //validate 2: $title
     $title_user = __('User') . ' `' . htmlspecialchars($username) . '`@`' . htmlspecialchars($hostname) . '`';
     $this->assertContains($title_user, $title);
 }
开发者ID:netroby,项目名称:phpmyadmin,代码行数:18,代码来源:PMA_server_privileges_test.php

示例3: testPMAGetHtmlForExportUserDefinition

 /**
  * Test for PMA_getListForExportUserDefinition
  *
  * @return void
  */
 public function testPMAGetHtmlForExportUserDefinition()
 {
     $username = "PMA_username";
     $hostname = "PMA_hostname";
     $GLOBALS['cfg']['TextareaCols'] = 'TextareaCols';
     $GLOBALS['cfg']['TextareaRows'] = 'TextareaCols';
     list($title, $export) = PMA_getListForExportUserDefinition($username, $hostname);
     //validate 1: $export
     $result = '<textarea class="export" cols="' . $GLOBALS['cfg']['TextareaCols'] . '" rows="' . $GLOBALS['cfg']['TextareaRows'];
     $this->assertContains('grant user2 delete', $export);
     $this->assertContains('grant user1 select', $export);
     $this->assertContains($result, $export);
     //validate 2: $title
     $title_user = __('User') . ' `' . htmlspecialchars($username) . '`@`' . htmlspecialchars($hostname) . '`';
     $this->assertContains($title_user, $title);
 }
开发者ID:elenacaseyroby,项目名称:MetaphoricalFruit,代码行数:21,代码来源:PMA_server_privileges_test.php


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