PMA_backquote (line 868)
Adds backquotes on both sides of a database, table or field name.
and escapes backquotes inside the name with another backquote
example:
mixed
PMA_backquote
(mixed $a_name, [boolean $do_it = true])
-
mixed
$a_name: the database, table or field name to "backquote" or array of it
-
boolean
$do_it: a flag to bypass this function (used by dump functions)
PMA_buttonOrImage (line 2008)
Generate a button or image tag
void
PMA_buttonOrImage
(string $button_name, string $button_class, string $image_name, string $text, string $image)
-
string
$button_name: name of button element
-
string
$button_class: class of button element
-
string
$image_name: name of image element
-
string
$text: text to display
-
string
$image: image to display
PMA_checkParameters (line 1827)
Function added to avoid path disclosures.
Called by each script that needs parameters, it displays an error message and, by default, stops the execution.
Not sure we could use a strMissingParameter message here, would have to check if the error message file is always available
void
PMA_checkParameters
(array $params, [boolean $die = true], [boolean $request = true])
-
array
$params: The names of the parameters needed by the calling script.
-
boolean
$die: Stop the execution? (Set this manually to false in the calling script until you know all needed parameters to check).
-
boolean
$request: Whether to include this list in checking for special params.
PMA_displayMaximumUploadSize (line 141)
Displays the maximum size for an upload
string
PMA_displayMaximumUploadSize
(integer $max_upload_size)
-
integer
$max_upload_size: the size
PMA_escape_mysql_wildcards (line 216)
Add slashes before "_" and "%" characters for using them in MySQL database, table and field names.
Note: This function does not escape backslashes!
string
PMA_escape_mysql_wildcards
(string $name)
-
string
$name: the string to escape
PMA_externalBug (line 2289)
Displays a lightbulb hint explaining a known external bug that affects a functionality
void
PMA_externalBug
(string $functionality, string $component, string $minimum_version, string $bugref)
-
string
$functionality: localized message explaining the func.
-
string
$component: 'mysql' (eventually, 'php')
-
string
$minimum_version: of this component
-
string
$bugref: bug reference for this component
PMA_flipstring (line 1768)
Takes a string and outputs each character on a line for itself. Used mainly for horizontalflipped display mode.
Takes care of special html-characters. Fulfills todo-item http://sf.net/tracker/?func=detail&aid=544361&group_id=23067&atid=377411
string
PMA_flipstring
(string $string, [string $Separator = "<br />\n"])
-
string
$string: The string
-
string
$Separator: The Separator (defaults to "
\n")
PMA_formatByteDown (line 1288)
Formats $value to byte view
array
PMA_formatByteDown
(double $value, [integer $limes = 6], [integer $comma = 0])
-
double
$value: the value to format
-
integer
$limes: the sensitiveness
-
integer
$comma: the number of decimals to retain
PMA_formatNumber (line 1345)
Formats $value to the given length and appends SI prefixes
$comma is not substracted from the length with a $length of 0 no truncation occurs, number is only formated to the current locale
examples:
string
PMA_formatNumber
(double $value, [integer $length = 3], [integer $comma = 0], [boolean $only_down = false])
-
double
$value: the value to format
-
integer
$length: the max length
-
integer
$comma: the number of decimals to retain
-
boolean
$only_down: do not reformat numbers below 1
PMA_formatSql (line 296)
format sql strings
string
PMA_formatSql
(mixed $parsed_sql, [ $unparsed_sql = ''])
-
mixed
$parsed_sql: pre-parsed SQL structure
-
$unparsed_sql
PMA_generateHiddenMaxFileSize (line 157)
Generates a hidden field which should indicate to the browser the maximum size for upload
string
PMA_generateHiddenMaxFileSize
(integer $max_size)
-
integer
$max_size: the size
PMA_getDbLink (line 2260)
returns html code for db link to default db page
string
PMA_getDbLink
([string $database = null])
PMA_getEnumSetOptions (line 1428)
Extracts ENUM / SET options from a type definition string
array
PMA_getEnumSetOptions
(string $type_def)
-
string
$type_def: The column type definition
PMA_getIcon (line 79)
string PMA_getIcon(string $icon)
html
PMA_getIcon
(string $icon, [string $alternate = ''], [boolean $container = false], [ $force_text = false], boolean $$force_text)
-
string
$icon: name of icon file
-
string
$alternate: alternate text
-
boolean
$container: include in container
-
boolean
$$force_text: whether to force alternate text to be displayed
-
$force_text
PMA_getTab (line 1491)
returns a tab for tabbed navigation.
If the variables $link and $args ar left empty, an inactive tab is created
string
PMA_getTab
(array $tab)
-
array
$tab: array with all options
PMA_getTableList (line 741)
returns array with tables of given db with extended information and grouped
void
PMA_getTableList
(string $db, [string $tables = null], [ $limit_offset = 0], [ $limit_count = false])
-
string
$db: name of db
-
string
$tables: name of tables return array (recursive) grouped table list
-
$limit_offset
-
$limit_count
PMA_getTabs (line 1584)
returns html-code for a tab navigation
string
PMA_getTabs
(array $tabs, [string $tag_id = 'topmenu'])
-
array
$tabs: one element per tab
-
string
$tag_id: id used for the html-tag
PMA_getUniqueCondition (line 1884)
Function to generate unique condition for specified row.
string
PMA_getUniqueCondition
(resource $handle, integer $fields_cnt, array $fields_meta, array $row, [boolean $force_unique = false])
-
resource
$handle: current query result
-
integer
$fields_cnt: number of fields
-
array
$fields_meta: meta information about fields
-
array
$row: current row
-
boolean
$force_unique: generate condition only on pk or unique
PMA_linkOrButton (line 1616)
Displays a link, or a button if the link's URL is too large, to accommodate some browsers' limitations
string
PMA_linkOrButton
(string $url, string $message, [mixed $tag_params = array()], [boolean $new_form = true], [ $strip_img = false], [ $target = ''])
-
mixed
$tag_params: string: js confirmation array: additional tag params (f.e. style="")
-
boolean
$new_form: we set this to false when we are already in a form, to avoid generating nested forms
-
string
$url: the URL
-
string
$message: the link message
-
$strip_img
-
$target
PMA_listNavigator (line 2151)
Generate navigation for a list
void
PMA_listNavigator
(integer $count, integer $pos, array $_url_params, string $script, string $frame, integer $max_count)
-
integer
$count: number of elements in the list
-
integer
$pos: current position in the list
-
array
$_url_params: url parameters
-
string
$script: script name for form target
-
string
$frame: target frame
-
integer
$max_count: maximum number of elements to display from the list
PMA_localisedDate (line 1449)
Writes localised date
string
PMA_localisedDate
([string $timestamp = -1], [ $format = ''])
-
string
$timestamp: the current timestamp
-
$format
PMA_mysqlDie (line 506)
Displays a MySQL error message in the right frame.
void
PMA_mysqlDie
([string $error_message = ''], [string $the_query = ''], [boolean $is_modify_link = true], [string $back_url = ''], [boolean $exit = true])
-
string
$error_message: the error message
-
string
$the_query: the sql query that failed
-
boolean
$is_modify_link: whether to show a "modify" link or not
-
string
$back_url: the "back" link url (full path is not required)
-
boolean
$exit: EXIT the page?
PMA_pageselector (line 2061)
Generate a pagination selector for browsing resultsets
void
PMA_pageselector
(string $url, string $rows, [string $pageNow = 1], [string $nbTotalPage = 1], [string $showAll = 200], [string $sliceStart = 5], [string $sliceEnd = 5], [string $percent = 20], [string $range = 10], [string $prompt = ''])
-
string
$url: URL for the JavaScript
-
string
$rows: Number of rows in the pagination set
-
string
$pageNow: current page number
-
string
$nbTotalPage: number of total pages
-
string
$showAll: If the number of pages is lower than this variable, no pages will be ommitted in pagination
-
string
$sliceStart: How many rows at the beginning should always be shown?
-
string
$sliceEnd: How many rows at the end should always be shown?
-
string
$percent: Percentage of calculation page offsets to hop to a next page
-
string
$range: Near the current page, how many pages should be considered "nearby" and displayed as well?
-
string
$prompt: The prompt to display (sometimes empty)
PMA_pow (line 22)
Exponential expression / raise number into power
mixed
PMA_pow
(number $base, number $exp, [string $use_function = false])
-
number
$base
-
number
$exp
-
string
$use_function: pow function use, or false for auto-detect
PMA_profilingCheckbox (line 1235)
Displays a form with the Profiling checkbox
void
PMA_profilingCheckbox
(string $sql_query)
PMA_profilingResults (line 1257)
Displays the results of SHOW PROFILE
void
PMA_profilingResults
(array $profiling_results)
-
array
$profiling_results: the results
PMA_reloadNavigation (line 926)
Reloads navigation if needed.
void
PMA_reloadNavigation
()
PMA_sendHeaderLocation (line 672)
Send HTTP header, taking IIS limits into account (600 seems ok)
boolean
PMA_sendHeaderLocation
(string $uri)
-
string
$uri: the header to send
PMA_showHint (line 432)
returns HTML for a footnote marker and add the messsage to the footnotes
string
PMA_showHint
(string $message, [ $bbcode = false], [ $type = 'notice'])
-
string
$message: the error message
-
$bbcode
-
$type
PMA_showMessage (line 958)
displays the message and the query usually the message is the result of the query executed
void
PMA_showMessage
(string $message, [string $sql_query = null], [ $type = 'notice'])
-
string
$message: the message to display
-
string
$sql_query: the query to display
-
$type
PMA_showMySQLDocu (line 363)
Displays a link to the official MySQL documentation
string
PMA_showMySQLDocu
(string $chapter, string $link, [bool $big_icon = false])
-
string
$chapter: chapter of "HTML, one page per chapter" documentation
-
string
$link: contains name of page/anchor that is being linked
-
bool
$big_icon: whether to use big icon (like in left frame)
PMA_sqlAddslashes (line 180)
Add slashes before "'" and "\" characters so a value containing them can be used in a sql comparison.
string
PMA_sqlAddslashes
([string $a_string = ''], [boolean $is_like = false], [boolean $crlf = false], [boolean $php_code = false])
-
string
$a_string: the string to slash
-
boolean
$is_like: whether the string will be used in a 'LIKE' clause (it then requires two more escaped sequences) or not
-
boolean
$crlf: whether to treat cr/lfs as escape-worthy entities (converts \n to \\n, \r to \\r)
-
boolean
$php_code: whether this function is used as part of the "Create PHP code" dialog
PMA_timespanFormat (line 1734)
Returns a given timespan value in a readable format.
string
PMA_timespanFormat
(int $seconds)
-
int
$seconds: the timespan
PMA_unescape_mysql_wildcards (line 233)
removes slashes before "_" and "%" characters Note: This function does not unescape backslashes!
string
PMA_unescape_mysql_wildcards
(string $name)
-
string
$name: the string to escape
PMA_unQuote (line 252)
removes quotes (',",`) from a quoted string
checks if the sting is quoted and removes this quotes
string
PMA_unQuote
(string $quoted_string, [string $quote = null])
-
string
$quoted_string: string to remove quotes from
-
string
$quote: type of quote to remove
PMA_userDir (line 2236)
replaces %u in given path with current user name
example:
$user_dir =
PMA_userDir('/var/pma_tmp/%u/'); // '/var/pma_tmp/root/'
string
PMA_userDir
(string $dir)
-
string
$dir: with wildcard for user
PMA_whichCrlf (line 899)
Defines the <CR><LF> value depending on the user OS.
string
PMA_whichCrlf
()