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


PHP PMA_getExtraDataForAjaxBehavior函数代码示例

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


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

示例1: testPMAGetExtraDataForAjaxBehavior

 /**
  * Test for PMA_getExtraDataForAjaxBehavior
  *
  * @return void
  */
 public function testPMAGetExtraDataForAjaxBehavior()
 {
     $password = "pma_password";
     $sql_query = "pma_sql_query";
     $username = "pma_username";
     $hostname = "pma_hostname";
     $GLOBALS['dbname'] = "pma_dbname";
     $_REQUEST['adduser_submit'] = "adduser_submit";
     $_REQUEST['change_copy'] = "change_copy";
     $_REQUEST['validate_username'] = "validate_username";
     $_REQUEST['username'] = "username";
     $_POST['update_privs'] = "update_privs";
     //PMA_getExtraDataForAjaxBehavior
     $extra_data = PMA_getExtraDataForAjaxBehavior($password, $sql_query, $hostname, $username);
     //user_exists
     $this->assertEquals(false, $extra_data['user_exists']);
     //db_wildcard_privs
     $this->assertEquals(true, $extra_data['db_wildcard_privs']);
     //user_exists
     $this->assertEquals(false, $extra_data['db_specific_privs']);
     //new_user_initial
     $this->assertEquals('P', $extra_data['new_user_initial']);
     //sql_query
     $this->assertEquals(PMA\libraries\Util::getMessage(null, $sql_query), $extra_data['sql_query']);
     //new_user_string
     $this->assertContains(htmlspecialchars($hostname), $extra_data['new_user_string']);
     $this->assertContains(htmlspecialchars($username), $extra_data['new_user_string']);
     //new_privileges
     $this->assertContains(join(', ', PMA_extractPrivInfo(null, true)), $extra_data['new_privileges']);
 }
开发者ID:netroby,项目名称:phpmyadmin,代码行数:35,代码来源:PMA_server_privileges_test.php

示例2: isset

    && ! isset($_REQUEST['export'])
    && (! isset($_REQUEST['submit_mult']) || $_REQUEST['submit_mult'] != 'export')
    && (! isset($_REQUEST['adduser']) || $_add_user_error)
    && (! isset($_REQUEST['initial']) || empty($_REQUEST['initial']))
    && ! isset($_REQUEST['showall'])
    && ! isset($_REQUEST['edit_user_dialog'])
    && ! isset($_REQUEST['db_specific'])
) {
    $isPass = false;
    if (isset($password)) {
        $isPass = true;
    }

    $extra_data = PMA_getExtraDataForAjaxBehavior(
        $isPass, $link_export,
        (isset($sql_query) ? $sql_query : ''),
        $link_edit, $dbname_is_wildcard,
        $hostname, $username
    );

    if ($message instanceof PMA_Message) {
        $response = PMA_Response::getInstance();
        $response->isSuccess($message->isSuccess());
        $response->addJSON('message', $message);
        $response->addJSON($extra_data);
        exit;
    }
}

/**
 * Displays the links
 */
开发者ID:rajatsinghal,项目名称:phpmyadmin,代码行数:32,代码来源:server_privileges.php

示例3: join

    $sql_query = join("\n", $queries);
}
/**
 * Reloads the privilege tables into memory
 */
$message_ret = PMA_updateMessageForReload();
if (isset($message_ret)) {
    $message = $message_ret;
    unset($message_ret);
}
/**
 * If we are in an Ajax request for Create User/Edit User/Revoke User/
 * Flush Privileges, show $message and exit.
 */
if ($GLOBALS['is_ajax_request'] && empty($_REQUEST['ajax_page_request']) && !isset($_REQUEST['export']) && (!isset($_REQUEST['submit_mult']) || $_REQUEST['submit_mult'] != 'export') && (!isset($_REQUEST['initial']) || $_REQUEST['initial'] === null || $_REQUEST['initial'] === '' || isset($_REQUEST['delete']) && $_REQUEST['delete'] === 'Go') && !isset($_REQUEST['showall']) && !isset($_REQUEST['edit_user_group_dialog']) && !isset($_REQUEST['db_specific'])) {
    $extra_data = PMA_getExtraDataForAjaxBehavior(isset($password) ? $password : '', isset($sql_query) ? $sql_query : '', isset($hostname) ? $hostname : '', isset($username) ? $username : '');
    if (!empty($message) && $message instanceof PMA_Message) {
        $response = PMA_Response::getInstance();
        $response->isSuccess($message->isSuccess());
        $response->addJSON('message', $message);
        $response->addJSON($extra_data);
        exit;
    }
}
/**
 * Displays the links
 */
if (isset($_REQUEST['viewing_mode']) && $_REQUEST['viewing_mode'] == 'db') {
    $GLOBALS['db'] = $_REQUEST['db'] = $_REQUEST['checkprivsdb'];
    $url_query .= '&goto=db_operations.php';
    // Gets the database structure
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:31,代码来源:server_privileges.php

示例4: isset

/**
 * If we are in an Ajax request for Create User/Edit User/Revoke User/
 * Flush Privileges, show $message and exit.
 */
if ($GLOBALS['is_ajax_request']
    && ! isset($_REQUEST['export'])
    && (! isset($_REQUEST['submit_mult']) || $_REQUEST['submit_mult'] != 'export')
    && (! isset($_REQUEST['adduser']) || $_add_user_error)
    && (! isset($_REQUEST['initial']) || empty($_REQUEST['initial']))
    && ! isset($_REQUEST['showall'])
    && ! isset($_REQUEST['edit_user_dialog'])
    && ! isset($_REQUEST['db_specific'])
) {
    $extra_data = PMA_getExtraDataForAjaxBehavior(
        (isset ($password) ? $password : ''), $link_export,
        (isset($sql_query) ? $sql_query : ''),
        $link_edit, $hostname, $username
    );

    if ($message instanceof PMA_Message) {
        $response = PMA_Response::getInstance();
        $response->isSuccess($message->isSuccess());
        $response->addJSON('message', $message);
        $response->addJSON($extra_data);
        exit;
    }
}

/**
 * Displays the links
 */
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:31,代码来源:server_privileges.php


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