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


PHP PMA_getMessageAndSqlQueryForPrivilegesRevoke函数代码示例

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


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

示例1: list

    } else {
        list($sql_query, $message) = PMA_updatePrivileges(isset($username) ? $username : '', isset($hostname) ? $hostname : '', isset($tablename) ? $tablename : '', isset($dbname) ? $dbname : '');
    }
}
/**
 * Assign users to user groups
 */
if (!empty($_REQUEST['changeUserGroup']) && $cfgRelation['menuswork'] && $GLOBALS['is_superuser'] && $GLOBALS['is_createuser']) {
    PMA_setUserGroup($username, $_REQUEST['userGroup']);
    $message = PMA_Message::success();
}
/**
 * Revokes Privileges
 */
if (isset($_REQUEST['revokeall'])) {
    list($message, $sql_query) = PMA_getMessageAndSqlQueryForPrivilegesRevoke(isset($dbname) ? $dbname : '', isset($tablename) ? $tablename : '', $username, $hostname);
}
/**
 * Updates the password
 */
if (isset($_REQUEST['change_pw'])) {
    $message = PMA_updatePassword($err_url, $username, $hostname);
}
/**
 * Deletes users
 *   (Changes / copies a user, part IV)
 */
if (isset($_REQUEST['delete']) || isset($_REQUEST['change_copy']) && $_REQUEST['mode'] < 4) {
    $queries = PMA_getDataForDeleteUsers($queries);
    if (empty($_REQUEST['change_copy'])) {
        list($sql_query, $message) = PMA_deleteUser($queries);
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:31,代码来源:server_privileges.php

示例2: testPMAGetMessageAndSqlQueryForPrivilegesRevoke

 /**
  * Test for PMA_getMessageAndSqlQueryForPrivilegesRevoke
  *
  * @return void
  */
 public function testPMAGetMessageAndSqlQueryForPrivilegesRevoke()
 {
     $dbname = 'pma_dbname';
     $username = 'pma_username';
     $hostname = 'pma_hostname';
     $tablename = 'pma_tablename';
     $_REQUEST['adduser_submit'] = true;
     $_POST['pred_username'] = 'any';
     $_POST['pred_hostname'] = 'localhost';
     $_REQUEST['createdb-3'] = true;
     $_POST['Grant_priv'] = 'Y';
     $_POST['max_questions'] = 1000;
     list($message, $sql_query) = PMA_getMessageAndSqlQueryForPrivilegesRevoke($dbname, $tablename, $username, $hostname, '');
     $this->assertEquals("You have revoked the privileges for 'pma_username'@'pma_hostname'.", $message->getMessage());
     $this->assertEquals("REVOKE ALL PRIVILEGES ON  `pma_dbname`.`pma_tablename` " . "FROM 'pma_username'@'pma_hostname'; " . "REVOKE GRANT OPTION ON  `pma_dbname`.`pma_tablename` " . "FROM 'pma_username'@'pma_hostname';", $sql_query);
 }
开发者ID:netroby,项目名称:phpmyadmin,代码行数:21,代码来源:PMA_server_privileges_test.php

示例3: PMA_setUserGroup

if (! empty($_REQUEST['changeUserGroup']) && $cfgRelation['menuswork']
    && $GLOBALS['is_superuser'] && $GLOBALS['is_createuser']
) {
    PMA_setUserGroup($username, $_REQUEST['userGroup']);
    $message = PMA\libraries\Message::success();
}

/**
 * Revokes Privileges
 */
if (isset($_REQUEST['revokeall'])) {
    list ($message, $sql_query) = PMA_getMessageAndSqlQueryForPrivilegesRevoke(
        (isset($dbname) ? $dbname : ''),
        (isset($tablename)
            ? $tablename
            : (isset($routinename) ? $routinename : '')),
        $username,
        $hostname,
        $itemType
    );
}

/**
 * Updates the password
 */
if (isset($_REQUEST['change_pw'])) {
    $message = PMA_updatePassword(
        $err_url, $username, $hostname
    );
}
开发者ID:nijel,项目名称:phpmyadmin,代码行数:30,代码来源:server_privileges.php


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