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


PHP PMA_getDataPrivilegeTable函数代码示例

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


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

示例1: PMA_getHtmlForGlobalOrDbSpecificPrivs

/**
 * Get HTML for global or database specific privileges
 *
 * @param string $db    the database
 * @param string $table the table
 * @param string $row   first row from result or boolean false
 *
 * @return string $html_output
 */
function PMA_getHtmlForGlobalOrDbSpecificPrivs($db, $table, $row)
{
    $privTable_names = array(0 => __('Data'), 1 => __('Structure'), 2 => __('Administration'));
    $privTable = array();
    // d a t a
    $privTable[0] = PMA_getDataPrivilegeTable($db);
    // s t r u c t u r e
    $privTable[1] = PMA_getStructurePrivilegeTable($table, $row);
    // a d m i n i s t r a t i o n
    $privTable[2] = PMA_getAdministrationPrivilegeTable($db);
    $html_output = '<input type="hidden" name="grant_count" value="' . (count($privTable[0]) + count($privTable[1]) + count($privTable[2]) - (isset($row['Grant_priv']) ? 1 : 0)) . '" />';
    if ($db == '*') {
        $legend = __('Global privileges');
        $menu_label = __('Global');
    } else {
        if ($table == '*') {
            $legend = __('Database-specific privileges');
            $menu_label = __('Database');
        } else {
            $legend = __('Table-specific privileges');
            $menu_label = __('Table');
        }
    }
    $html_output .= '<fieldset id="fieldset_user_global_rights">' . '<legend data-submenu-label="' . $menu_label . '">' . $legend . '<input type="checkbox" id="addUsersForm_checkall" ' . 'class="checkall_box" title="' . __('Check All') . '" /> ' . '<label for="addUsersForm_checkall">' . __('Check All') . '</label> ' . '</legend>' . '<p><small><i>' . __('Note: MySQL privilege names are expressed in English.') . '</i></small></p>';
    // Output the Global privilege tables with checkboxes
    $html_output .= PMA_getHtmlForGlobalPrivTableWithCheckboxes($privTable, $privTable_names, $row);
    // The "Resource limits" box is not displayed for db-specific privs
    if ($db == '*') {
        $html_output .= PMA_getHtmlForResourceLimits($row);
        $html_output .= PMA_getHtmlForRequires($row);
    }
    // for Safari 2.0.2
    $html_output .= '<div class="clearfloat"></div>';
    return $html_output;
}
开发者ID:siddhantsomani,项目名称:phpmyadmin,代码行数:44,代码来源:server_privileges.lib.php

示例2: PMA_getHtmlForGlobalOrDbSpecificPrivs

/**
 * Get HTML for global or database specific privileges
 *
 * @param string $db       the database
 * @param string $table    the table
 * @param string $row      first row from result or boolean false
 *
 * @return string $html_output
 */
function PMA_getHtmlForGlobalOrDbSpecificPrivs($db, $table, $row)
{
    $privTable_names = array(0 => __('Data'), 1 => __('Structure'), 2 => __('Administration'));
    $privTable = array();
    // d a t a
    $privTable[0] = PMA_getDataPrivilegeTable($db);
    // s t r u c t u r e
    $privTable[1] = PMA_getStructurePrivilegeTable($table, $row);
    // a d m i n i s t r a t i o n
    $privTable[2] = PMA_getAdministrationPrivilegeTable($db);
    $html_output = '<input type="hidden" name="grant_count" value="' . (count($privTable[0]) + count($privTable[1]) + count($privTable[2]) - (isset($row['Grant_priv']) ? 1 : 0)) . '" />';
    $html_output .= '<fieldset id="fieldset_user_global_rights"><legend>';
    if ($db == '*') {
        $html_output .= __('Global privileges');
    } else {
        if ($table == '*') {
            $html_output .= __('Database-specific privileges');
        } else {
            $html_output .= __('Table-specific privileges');
        }
    }
    $html_output .= ' (<a href="#" ' . 'onclick="setCheckboxes(\'fieldset_user_global_rights\', true); ' . 'return false;">' . __('Check All') . '</a> /' . '<a href="#" ' . 'onclick="setCheckboxes(\'fieldset_user_global_rights\', false); ' . 'return false;">' . __('Uncheck All') . '</a>)';
    $html_output .= '</legend>';
    $html_output .= '<p><small><i>' . __('Note: MySQL privilege names are expressed in English') . '</i></small></p>';
    // Output the Global privilege tables with checkboxes
    $html_output .= PMA_getHtmlForGlobalPrivTableWithCheckboxes($privTable, $privTable_names, $row);
    // The "Resource limits" box is not displayed for db-specific privs
    if ($db == '*') {
        $html_output .= PMA_getHtmlForDisplayResourceLimits($row);
    }
    // for Safari 2.0.2
    $html_output .= '<div class="clearfloat"></div>';
    return $html_output;
}
开发者ID:SashiAsakura,项目名称:AWS_QuikID_website,代码行数:43,代码来源:server_privileges.lib.php


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