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


PHP PMA_getHtmlForColumnPrivileges函数代码示例

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


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

示例1: PMA_getHtmlForAttachedPrivilegesToTableSpecificColumn

/**
 * Get HTML snippet for privileges that are attached to a specific column
 *
 * @param array $columns columns array
 * @param array $row     first row from result or boolean false
 *
 * @return string $html_output
 */
function PMA_getHtmlForAttachedPrivilegesToTableSpecificColumn($columns, $row)
{
    $html_output = PMA_getHtmlForColumnPrivileges($columns, $row, 'Select_priv', 'SELECT', 'select', __('Allows reading data.'), 'Select');
    $html_output .= PMA_getHtmlForColumnPrivileges($columns, $row, 'Insert_priv', 'INSERT', 'insert', __('Allows inserting and replacing data.'), 'Insert');
    $html_output .= PMA_getHtmlForColumnPrivileges($columns, $row, 'Update_priv', 'UPDATE', 'update', __('Allows changing data.'), 'Update');
    $html_output .= PMA_getHtmlForColumnPrivileges($columns, $row, 'References_priv', 'REFERENCES', 'references', __('Has no effect in this MySQL version.'), 'References');
    return $html_output;
}
开发者ID:siddhantsomani,项目名称:phpmyadmin,代码行数:16,代码来源:server_privileges.lib.php

示例2: testPMAGetHtmlForColumnPrivileges

 /**
  * Test for PMA_getHtmlForColumnPrivileges
  *
  * @return void
  */
 public function testPMAGetHtmlForColumnPrivileges()
 {
     $columns = array('row1' => 'name1');
     $row = array('name_for_select' => 'Y');
     $name_for_select = 'name_for_select';
     $priv_for_header = 'priv_for_header';
     $name = 'name';
     $name_for_dfn = 'name_for_dfn';
     $name_for_current = 'name_for_current';
     $html = PMA_getHtmlForColumnPrivileges($columns, $row, $name_for_select, $priv_for_header, $name, $name_for_dfn, $name_for_current);
     //$name
     $this->assertContains($name, $html);
     //$name_for_dfn
     $this->assertContains($name_for_dfn, $html);
     //$priv_for_header
     $this->assertContains($priv_for_header, $html);
     //$name_for_select
     $this->assertContains($name_for_select, $html);
     //$columns and $row
     $this->assertContains(htmlspecialchars('row1'), $html);
     //$columns and $row
     $this->assertContains(_pgettext('None privileges', 'None'), $html);
 }
开发者ID:netroby,项目名称:phpmyadmin,代码行数:28,代码来源:PMA_server_privileges_test.php


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