當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。