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


PHP PMA_analyseShowGrant函数代码示例

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


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

示例1: PMA_DBI_free_result

            }
            // end while
            PMA_DBI_free_result($rs_usr);
            unset($rs_usr, $row, $re0, $re1);
        } else {
            // Finally, let's try to get the user's privileges by using SHOW
            // GRANTS...
            // Maybe we'll find a little CREATE priv there :)
            $rs_usr = PMA_DBI_try_query('SHOW GRANTS FOR ' . $mysql_cur_user_and_host . ';', $controllink, PMA_DBI_QUERY_STORE);
            if (!$rs_usr) {
                // OK, now we'd have to guess the user's hostname, but we
                // only try out the 'username'@'%' case.
                $rs_usr = PMA_DBI_try_query('SHOW GRANTS FOR ' . PMA_convert_using(PMA_sqlAddslashes($mysql_cur_user), 'quoted') . ';', $controllink, PMA_DBI_QUERY_STORE);
            }
            unset($local_query);
            if ($rs_usr) {
                PMA_analyseShowGrant($rs_usr, $is_create_db_priv, $db_to_create, $is_reload_priv, $dbs_where_create_table_allowed);
                PMA_DBI_free_result($rs_usr);
                unset($rs_usr);
            }
            // end if
        }
        // end elseif
    }
    // end if
}
// end else (MySQL < 4.1.2)
// If disabled, don't show it
if (!$cfg['SuggestDBName']) {
    $db_to_create = '';
}
开发者ID:Kishaaa,项目名称:cs160-website,代码行数:31,代码来源:check_user_privileges.lib.php

示例2: PMA_DBI_free_result

             // end while
             PMA_DBI_free_result($rs_usr);
             unset($rs_usr, $row, $re0, $re1);
         } else {
             // Finally, let's try to get the user's privileges by using SHOW
             // GRANTS...
             // Maybe we'll find a little CREATE priv there :)
             $rs_usr = PMA_DBI_try_query('SHOW GRANTS FOR ' . $mysql_cur_user_and_host . ';', $dbh, PMA_DBI_QUERY_STORE);
             if (!$rs_usr) {
                 // OK, now we'd have to guess the user's hostname, but we
                 // only try out the 'username'@'%' case.
                 $rs_usr = PMA_DBI_try_query('SHOW GRANTS FOR ' . $mysql_cur_user . ';', $dbh, PMA_DBI_QUERY_STORE);
             }
             unset($local_query);
             if ($rs_usr) {
                 PMA_analyseShowGrant($rs_usr, $is_create_priv, $db_to_create);
                 PMA_DBI_free_result($rs_usr);
                 unset($rs_usr);
             }
             // end if
         }
         // end elseif
     }
     // end if
 }
 // end else (MySQL < 4.1.2)
 if (!$cfg['SuggestDBName']) {
     $db_to_create = '';
 }
 $common_url_query = PMA_generate_common_url();
 if ($is_superuser) {
开发者ID:BackupTheBerlios,项目名称:smileinstaller,代码行数:31,代码来源:main.php

示例3: preg_replace

                    if ($GLOBALS['cfg']['SuggestDBName']) {
                        $GLOBALS['db_to_create'] = preg_replace('/' . $re0 . '_/', '\\1?', $show_grants_dbname);
                        $GLOBALS['db_to_create'] = preg_replace('/' . $re0 . '%/', '\\1...', $GLOBALS['db_to_create']);
                        $GLOBALS['db_to_create'] = preg_replace('/' . $re1 . '(%|_)/', '\\1\\3', $GLOBALS['db_to_create']);
                    }
                    $GLOBALS['is_create_db_priv'] = true;
                    /**
                     * @todo collect $GLOBALS['db_to_create'] into an array, to display a
                     * drop-down in the "Create new database" dialog
                     */
                    // we don't break, we want all possible databases
                    //break;
                }
                // end if
            }
            // end elseif
        }
        // end if
    }
    // end while
    PMA_DBI_free_result($rs_usr);
    // must also PMA_cacheUnset() them in libraries/auth/cookie.auth.lib.php
    PMA_cacheSet('is_create_db_priv', $GLOBALS['is_create_db_priv'], true);
    PMA_cacheSet('is_process_priv', $GLOBALS['is_process_priv'], true);
    PMA_cacheSet('is_reload_priv', $GLOBALS['is_reload_priv'], true);
    PMA_cacheSet('db_to_create', $GLOBALS['db_to_create'], true);
    PMA_cacheSet('dbs_where_create_table_allowed', $GLOBALS['dbs_where_create_table_allowed'], true);
}
// end function
PMA_analyseShowGrant();
开发者ID:dingdong2310,项目名称:g5_theme,代码行数:30,代码来源:check_user_privileges.lib.php

示例4: PMA_DBI_free_result

            // end while
            PMA_DBI_free_result($rs_usr);
            unset($rs_usr, $row, $re0, $re1);
        } else {
            // Finally, let's try to get the user's privileges by using SHOW
            // GRANTS...
            // Maybe we'll find a little CREATE priv there :)
            $rs_usr = PMA_DBI_try_query('SHOW GRANTS FOR ' . $mysql_cur_user_and_host . ';', $dbh, PMA_DBI_QUERY_STORE);
            if (!$rs_usr) {
                // OK, now we'd have to guess the user's hostname, but we
                // only try out the 'username'@'%' case.
                $rs_usr = PMA_DBI_try_query('SHOW GRANTS FOR ' . $mysql_cur_user . ';', $dbh, PMA_DBI_QUERY_STORE);
            }
            unset($local_query);
            if ($rs_usr) {
                PMA_analyseShowGrant($rs_usr, $is_create_priv, $db_to_create, $is_reload_priv);
                PMA_DBI_free_result($rs_usr);
                unset($rs_usr);
            }
            // end if
        }
        // end elseif
    }
    // end if
}
// end else (MySQL < 4.1.2)
// If disabled, don't show it
if (!$cfg['SuggestDBName']) {
    $db_to_create = '';
}
?>
开发者ID:mike503,项目名称:phpmyadmin,代码行数:31,代码来源:check_user_privileges.lib.php


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