本文整理汇总了PHP中PMA_getHtmlForSubMenusOnUsersPage函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_getHtmlForSubMenusOnUsersPage函数的具体用法?PHP PMA_getHtmlForSubMenusOnUsersPage怎么用?PHP PMA_getHtmlForSubMenusOnUsersPage使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_getHtmlForSubMenusOnUsersPage函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testPMAGetHtmlForSubMenusOnUsersPage
/**
* Test for PMA_getHtmlForSubMenusOnUsersPage
*
* @return void
*/
public function testPMAGetHtmlForSubMenusOnUsersPage()
{
$html = PMA_getHtmlForSubMenusOnUsersPage('server_privileges.php');
//validate 1: topmenu2
$this->assertContains('<ul id="topmenu2">', $html);
//validate 2: tabactive for server_privileges.php
$this->assertContains('<a class="tabactive" href="server_privileges.php', $html);
$this->assertContains(__('User accounts overview'), $html);
//validate 3: not-active for server_user_groups.php
$this->assertContains('<a href="server_user_groups.php', $html);
$this->assertContains(__('User groups'), $html);
}
示例2: PMA_getRelationsParam
* functions implementation for this script
*/
require_once 'libraries/display_change_password.lib.php';
require_once 'libraries/server_privileges.lib.php';
$cfgRelation = PMA_getRelationsParam();
/**
* Does the common work
*/
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('server_privileges.js');
if (isset($_REQUEST['viewing_mode']) && $_REQUEST['viewing_mode'] == 'server' && isset($GLOBALS['cfgRelation']['menuswork']) && $GLOBALS['cfgRelation']['menuswork']) {
include_once 'libraries/server_users.lib.php';
$response->addHTML('<div>');
$response->addHTML(PMA_getHtmlForSubMenusOnUsersPage('server_privileges.php'));
}
/**
* Sets globals from $_POST patterns, for privileges and max_* vars
*/
$post_patterns = array('/_priv$/i', '/^max_/i');
PMA_setPostAsGlobal($post_patterns);
require 'libraries/server_common.inc.php';
/**
* Messages are built using the message name
*/
$strPrivDescAllPrivileges = __('Includes all privileges except GRANT.');
$strPrivDescAlter = __('Allows altering the structure of existing tables.');
$strPrivDescAlterRoutine = __('Allows altering and dropping stored routines.');
$strPrivDescCreateDb = __('Allows creating new databases and tables.');
$strPrivDescCreateRoutine = __('Allows creating stored routines.');
示例3:
$scripts = $header->getScripts();
$scripts->addFile('server_user_groups.js');
/**
* Only allowed to superuser
*/
if (! $GLOBALS['is_superuser']) {
$response->addHTML(
PMA\libraries\Message::error(__('No Privileges'))
->getDisplay()
);
exit;
}
$response->addHTML('<div>');
$response->addHTML(PMA_getHtmlForSubMenusOnUsersPage('server_user_groups.php'));
/**
* Delete user group
*/
if (! empty($_REQUEST['deleteUserGroup'])) {
PMA_deleteUserGroup($_REQUEST['userGroup']);
}
/**
* Add a new user group
*/
if (! empty($_REQUEST['addUserGroupSubmit'])) {
PMA_editUserGroup($_REQUEST['userGroup'], true);
}