/** * Get HTML for "check all" check box with "with selected" dropdown * * @param string $pmaThemeImage pma theme image url * @param string $text_dir url for text directory * * @return string $html_output */ function PMA_getCentralColumnsTableFooter($pmaThemeImage, $text_dir) { $html_output = Util::getWithSelected($pmaThemeImage, $text_dir, "tableslistcontainer"); $html_output .= Util::getButtonOrImage('edit_central_columns', 'mult_submit change_central_columns', 'submit_mult_change', __('Edit'), 'b_edit.png', 'edit central columns'); $html_output .= Util::getButtonOrImage('delete_central_columns', 'mult_submit', 'submit_mult_central_columns_remove', __('Delete'), 'b_drop.png', 'remove_from_central_columns'); return $html_output; }
/** * Get HTML for display the users overview * (if less than 50 users, display them immediately) * * @param array $result ran sql query * @param array $db_rights user's database rights array * @param string $pmaThemeImage a image source link * @param string $text_dir text directory * * @return string HTML snippet */ function PMA_getUsersOverview($result, $db_rights, $pmaThemeImage, $text_dir) { while ($row = $GLOBALS['dbi']->fetchAssoc($result)) { $row['privs'] = PMA_extractPrivInfo($row, true); $db_rights[$row['User']][$row['Host']] = $row; } @$GLOBALS['dbi']->freeResult($result); $user_group_count = 0; if ($GLOBALS['cfgRelation']['menuswork']) { $user_group_count = PMA_getUserGroupCount(); } $html_output = '<form name="usersForm" id="usersForm" action="server_privileges.php" ' . 'method="post">' . "\n" . PMA_URL_getHiddenInputs('', '') . '<table id="tableuserrights" class="data">' . "\n" . '<thead>' . "\n" . '<tr><th></th>' . "\n" . '<th>' . __('User name') . '</th>' . "\n" . '<th>' . __('Host name') . '</th>' . "\n" . '<th>' . __('Password') . '</th>' . "\n" . '<th>' . __('Global privileges') . ' ' . Util::showHint(__('Note: MySQL privilege names are expressed in English.')) . '</th>' . "\n"; if ($GLOBALS['cfgRelation']['menuswork']) { $html_output .= '<th>' . __('User group') . '</th>' . "\n"; } $html_output .= '<th>' . __('Grant') . '</th>' . "\n" . '<th colspan="' . ($user_group_count > 0 ? '3' : '2') . '">' . __('Action') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n"; $html_output .= '<tbody>' . "\n"; $html_output .= PMA_getHtmlTableBodyForUserRights($db_rights); $html_output .= '</tbody>' . '</table>' . "\n"; $html_output .= '<div class="floatleft">' . Util::getWithSelected($pmaThemeImage, $text_dir, "usersForm") . "\n"; $html_output .= Util::getButtonOrImage('submit_mult', 'mult_submit', 'submit_mult_export', __('Export'), 'b_tblexport.png', 'export'); $html_output .= '<input type="hidden" name="initial" ' . 'value="' . (isset($_GET['initial']) ? $_GET['initial'] : '') . '" />'; $html_output .= '</div>' . '<div class="clear_both" style="clear:both"></div>'; // add/delete user fieldset $html_output .= PMA_getFieldsetForAddDeleteUser(); $html_output .= '</form>' . "\n"; return $html_output; }
/** * Returns the html for Table footer buttons * * @return string */ private function _getHtmlForTableFooterButtons() { if (!$GLOBALS['is_superuser'] && !$GLOBALS['cfg']['AllowUserDropDatabase']) { return ''; } $html = Util::getWithSelected($GLOBALS['pmaThemeImage'], $GLOBALS['text_dir'], "dbStatsForm"); $html .= Util::getButtonOrImage('', 'mult_submit' . ' ajax', 'drop_selected_dbs', __('Drop'), 'b_deltbl.png'); return $html; }