DVL-003 phpmyadmin-4.0 for PHP 5.4 and phpmyadmin-4.7 for everything else

This commit is contained in:
cytopia 2017-04-20 12:55:30 +02:00
parent bc62d4e46c
commit 5ea5fb9d79
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
6941 changed files with 847683 additions and 397482 deletions

View File

@ -0,0 +1,471 @@
phpMyAdmin - ChangeLog
======================
4.0.10.20 (2017-03-28)
- issue #12881 Fix database search when locale is not 'en'
- issue [security] Possible to bypass $cfg['Servers'][$i]['AllowNoPassword'], see PMASA-2017-08
4.0.10.19 (2017-01-23)
- issue [security] Multiple vulnerabilities in setup script, see PMASA-2016-44.
- issue [security] Open redirect, see PMASA-2017-1.
- issue [security] php-gettext code execution, see PMASA-2017-2.
- issue [security] DOS vulnerabiltiy in table editing, see PMASA-2017-3.
- issue [security] CSS injection in themes, see PMASA-2017-4.
- issue [security] SSRF in replication, see PMASA-2017-6.
- issue [security] DOS in replication status, see PMASA-2017-7.
4.0.10.18 (2016-11-24)
- issue #12485 Do not show warning about short blowfish_secret if none is set
- issue [security] Open redirection issue, see PMASA-2016-57
- issue [security] Unsafe generation of $cfg['blowfish_secret'], see PMASA-2016-58
- issue [security] phpMyAdmin's phpinfo functionality is removed, see PMASA-2016-59
- issue [security] AllowRoot and allow/deny rule bypass with specially-crafted username, see PMASA-2016-60
- issue [security] Username matching weaknesses with allow/deny rules, see PMASA-2016-61
- issue [security] Full path disclosure (FPD) weaknesses, see PMASA-2016-63
- issue [security] Multiple cross-site scripting (XSS) weaknesses, see PMASA-2016-64
- issue [security] Multiple denial-of-service (DOS) vulnerabilities, see PMASA-2016-65
- issue [security] Possible to bypass white-list protection for URL redirection, see PMASA-2016-66
- issue [security] Multiple SQL injection vulnerabilities, see PMASA-2016-69
- issue [security] Incorrect serialized string parsing, see PMASA-2016-70
- issue [security] CSRF token not stripped from the URL, see PMASA-2016-71
4.0.10.17 (2016-08-16)
- issue [security] Weaknesses with cookie encryption, see PMASA-2016-29
- issue [security] Improve session cookie code for openid.php and signon.php example files
- issue [security] Full path disclosure in openid.php and signon.php example files
- issue [security] Multiple XSS vulnerabilities, see PMASA-2016-30
- issue [security] Unsafe generation of BlowfishSecret (when not supplied by the user)
- issue [security] Referrer leak when phpinfo is enabled
- issue [security] PHP code injection, see PMASA-2016-32
- issue [security] Full path disclosure, see PMASA-2016-33
- issue [security] SQL injection attack, see PMASA-2016-34
- issue [security] Local file exposure through LOAD DATA LOCAL INFILE, see PMASA-2016-35
- issue [security] Local file exposure through symlinks with UploadDir, see PMASA-2016-36
- issue [security] Path traversal with SaveDir and UploadDir, see PMASA-2016-37
- issue [security] Denial-of-service attack through transformation feature, see PMASA-2016-41
- issue [security] SQL injection vulnerability as control user, see PMASA-2016-42
- issue [security] Verify data before unserializing, see PMASA-2016-43
- issue [security] Use HTTPS for wiki links
- issue Remove Swekey support
- issue [security] Denial-of-service attack with $cfg['AllowArbitraryServer'] = true and persistent connections, see PMASA-2016-45
- issue [security] Improve SSL certificate handling
- issue [security] Fix full path disclosure in debugging code
- issue [security] Possible circumvention of IP-based allow/deny rules with IPv6 and proxy server, see PMASA-2016-47
- issue [security] Detect if user is logged in, see PMASA-2016-48
- issue [security] Bypass URL redirection protection, see PMASA-2016-49
- issue [security] Referrer leak, see PMASA-2016-50
- issue [security] Reflected File Download, see PMASA-2016-51
- issue [security] ArbitraryServerRegexp bypass, see PMASA-2016-52
- issue [security] Denial-of-service attack by entering long password, see PMASA-2016-53
- issue [security] Remote code execution vulnerability when running as CGI, see PMASA-2016-54
- issue [security] Denial-of-service attack when PHP uses dbase extension, see PMASA-2016-55
- issue [security] Remove tode execution vulnerability when PHP uses dbase extension, see PMASA-2016-56
- issue [security] Denial-of-service attack by using for loops, see PMASA-2016-46
4.0.10.16 (2016-06-23)
- issue [security] User SQL queries can be revealed through URL GET parameters, see PMASA-2016-14
- issue [security] Limit list of sites which can be passwd through url.php.
- issue [security] BBCode injection in setup script, see PMASA-2016-17
- issue [security] DOS attack vulnerability, see PMASA-2016-22
- issue [security] Multiple full path disclosure vulnerabilities, see PMASA-2016-26
- issue [security] XSS attack when checking database privileges, see PMASA-2016-21
- issue [security] XSS attack when MySQL server is using a specific payload log_bin directive, see PMASA-2016-26
- issue [security] XSS vulnerabilities in Transformation feature, PMASA-2016-28
4.0.10.15 (2016-02-29)
- issue [security] Multiple XSS vulnerabilities, see PMASA-2016-11.
4.0.10.14 (2016-01-29)
- issue #11891 Error with PMA 4.0.10.13 with PHP 5.2
4.0.10.13 (2016-01-28)
- issue [Security] Multiple full path disclosure vulnerabilities, see PMASA-2016-1
- issue [Security] Unsafe generation of CSRF token, see PMASA-2016-2
- issue [Security] Multiple XSS vulnerabilities, see PMASA-2016-3
- issue [Security] Insecure password generation in JavaScript, see PMASA-2016-4
- issue [Security] Unsafe comparison of CSRF token, see PMASA-2016-5
4.0.10.12 (2015-12-25)
- issue [Security] Path disclosure, see PMASA-2015-6
4.0.10.11 (2015-09-23)
- issue #11464 phpMyAdmin suggests upgrading to newer version not usable on that system
4.0.10.10 (2015-05-13)
- bug #4899 [security] CSRF vulnerability in setup
- bug #4900 [security] Vulnerability allowing Man-in-the-middle attack
4.0.10.9 (2015-03-04)
- bug [security] Risk of BREACH attack, see PMASA-2015-1
4.0.10.8 (2015-01-07)
- rfe #1588 recursive function too deep - operator change suggestion
- rfe #1589 support early versions of PHP5.2 (register_shutdown_function)
4.0.10.7 (2014-12-03)
- bug #4611 [security] DOS attack with long passwords
4.0.10.6 (2014-11-20)
- bug #4578 [security] XSS vulnerability in table print view
- bug #4579 [security] XSS vulnerability in zoom search page
- bug #4594 [security] Path traversal in file inclusion of GIS factory
- bug #4598 [security] XSS in multi submit
- bug #4597 [security] XSS through pma_fontsize cookie
4.0.10.5 (2014-10-21)
- bug #4562 [security] XSS in debug SQL output
- bug #4563 [security] XSS in monitor query analyzer
4.0.10.4 (2014-10-01)
- bug #4544 [security] XSS vulnerabilities in table search and table structure pages
4.0.10.3 (2014-09-13)
- bug #4530 [security] DOM based XSS that results to a CSRF that creates a
ROOT account in certain conditions
4.0.10.2 (2014-08-17)
- bug #4501 [security] XSS in table browse page
- bug #4502 [security] Self-XSS in enum value editor
- bug #4503 [security] Self-XSSes in monitor
- bug #4504 [security] Self-XSS in query charts
- bug #4517 [security] XSS in relation view
4.0.10.1 (2014-07-17)
- bug #4488 [security] XSS injection due to unescaped table name (triggers)
- bug #4492 [security] XSS in AJAX confirmation messages
4.0.10.0 (2013-12-04)
- bug #4150 Clicking database name in query window opens a new tab
- bug #4141 Wrong page is shown after editing; also, do not show a modal
dialog for multi-row edit
- bug #3939 PHP NavigationTree error when paging through list
- bug #4075 Support A10 Networks load balancer
- bug #4083 row deleting isn't binlogs friendly
- bug #4163 Setup script does not recognize manually-configured server
- bug #4158 Events page says no privileges with ALL PRIVILEGES
4.0.9.0 (2013-11-04)
- bug #4104 Can't edit updatable view when searching
- bug #4108 Missing refresh by deleting databases
- bug #3995 Drizzle server charset notice
- bug #3911 Filtering database names includes empty groupings
- bug #3678 Does not display or manipulate bit(64) fields appropriately
- bug #4129 Unneeded navi panel refresh
- bug #4120 SSL redirects to port 80
- bug #4144 DROP DATABASE displays wrong database name
- bug #4059 Running delete query asks for confirmation but says it was already executed
- bug #4147 Accessibility: Images without Alt nor title attribute
4.0.8.0 (2013-10-06)
- bug #3988 Rename view is not working
- bug #4041 Interaction between linkified fields and grid editing
- bug #3975 Table grouping isn't implemented properly
- bug #4060 Browser tries to remember wrong password when creating new user
- bug #4002 Edit Index on big table doesn't show "Loading" or any message
- bug #4098 Default table tab is ignored
- bug #4099 Server/library difference warning: setting is ignored
- bug #4100 table tree group strategy
- bug #4102 ALTER TABLE ORDER BY and InnoDB
- bug #4103 Tracking report: cannot delete a statement
- bug #3996 Drizzle navigation doesn't expand
- bug #4074 GIS column editor: point not displayed
- bug #4109 Drizzle tables in navigation are shown as views
- bug #4095 NUL symbols added to the end of database dump file
- bug #4105 More disappears in table Structure
- bug #3992 Multi-row edit doesn't clear values when checking NULL
4.0.7.0 (2013-09-23)
- bug #3993 Sorting in database overview with statistics doesn't work
- bug Handle the situation where PHP_SELF is not set
- bug #4080 Overwrite existing file not obeyed
- bug #3929 Database-specific privileges are not copied when cloning user
- bug #3997 Error handling in case MySQL extension is missing
- bug #4089 Moving Columns will alter column definition
- bug #4091 Insert ignore option does not work
- bug #4090 Downloading BLOB downloads page template
- bug #4092 Clicking on table name in view of information_schema redirects to wrong page
- bug #4079 Copy Table Add AUTO_INCREMENT value checkbox not working
- bug #4088 MySQL server version at index.php incorrect w/ controlhost
- bug #4001 Import error: Class 'ImportOds' not found
- bug #3986 Missing DROP VIEW button
4.0.6.0 (2013-09-05)
- bug #4036 Call to undefined function mb_detect_encoding (clarify the doc)
- bug Missing hints when changing a column's structure
- bug #4048 Cannot select foreign value in Search
- bug #4025 gzip export is not actually compressed with mod_deflate
- bug #4054 query analysis doesn't launch in status monitor
+ Add pmahomme icon credits (FamFamFam silk icon set)
- bug #4064 Table structure statistics "Space usage" caption too small for l10n
- bug #4051 Wrong tabindex when inserting rows
- bug #4066 varchar field not truncated in table browse mode
+ rfe #1435 Opening database should expand it in the navigation menu
- (performance) Removed ShowTooltip directive
- bug #4046 Exporting huge Tables causes memory-Problems
4.0.5.0 (2013-08-04)
- bug #3977 Not detected configuration storage
- bug #3970 Pressing enter in the filter field reloads page
- bug #3984 Cannot insert in this table (PHP < 5.4)
- bug #3989 Reloading privileges does not update the interface
- bug #3960 NavigationBarIconic config not honored
- bug #3985 Call to undefined function mb_detect_encoding
- bug #4007 Analyze option not shown for InnoDB tables
- bug #4015 Forcing a storage engine for configuration storage
- bug Incorrect Drizzle 7 detection
- bug #4019 Create database if not exists (export): add an option to the
interface to enable generating CREATE DATABASE and USE (false by default)
- bug #4012 Crash on CSV file import
- bug #4009 Statistic Monitor shows only last 3 digits in graph
- bug #3998 Non-permanent SQL history not working
- bug #3578 Transformations for text/plain on a BLOB column
- [security] Improved protection against cross framing, see PMASA-2013-10
+ Reinstated configuration directive: AllowThirdPartyFraming
4.0.4.2 (2013-07-28)
- [security] fix unescaped parameter, see PMASA-2013-8
- [security] Fix stored XSS in Server status monitor, see PMASA-2013-9
- [security] Fix stored XSS in navigation panel logo link, see PMASA-2013-9
- [security] Fix self-XSS in setup, trusted proxies validation, see PMASA-2013-9
- [security] Fix full path disclosure, see PMASA-2013-12
- [security] Fix control user SQL injection in pmd_pdf.php, see PMASA-2013-15
- [security] Fix control user SQL injection in schema_export.php, see PMASA-2013-15
- [security] Fix self-XSS in schema export, see PMASA-2013-14
- [security] Fix unencoded json object, see PMASA-2013-11
- [security] Fix stored XSS in link transformation plugin, see PMASA-2013-13
4.0.4.1 (2013-06-30)
- [security] Global variables scope injection vulnerability (see PMASA-2013-7)
4.0.4.0 (2013-06-17)
- bug #3959 Using DefaultTabDatabase in NavigationTree for Database Click
- bug #3961 Avoid Suhosin warning when in simulation mode
- bug #3897 Row Statistics and Space usage bugs
- bug #3966 Only display "table has no unique column" message when applicable
- bug #3965 Default language wrong with zh-TW
- bug #3921 Call to undefined function PMA_isSuperuser() if default server is
not set
- bug #3971 Ctrl/shift + click opens links in same window
- bug #3964 Import using https does not work
- bug Missing removeCRLF option in ExportCsv and ExportExcel plugins
- bug #3631 Drop not working Visio schema export.
- bug #3645 Better handling of invalid ODS documents
- bug #3976 Number of pages
- bug #3922 User privileges, database name unescaped
4.0.3.0 (2013-06-05)
- bug #3941 Recent tables list always empty
- bug #3933 Do not translate "Open Document" in export settings
- bug #3927 List of tables is missing after expanding in the navigation frame
- bug #3942 Warnings about reserved word for many non reserved words
- bug #3912 Exporting row selection, resulted by ORDER BY query
- bug #3957 Cookies must be enabled past this point
- bug #3956 "Browse foreign values" search filter / page selector not working
- bug #3579 NOW() function incorrectly selected (partial regression)
- [security] Javascript execution vulnerability in Create view,
reported by Maxim Rupp (see PMASA-2013-6)
4.0.2.0 (2013-05-24)
- bug #3902 Cannot browse when table name contains keyword "call"
+ center loading indicator for navigation refresh, related to bug #3920
- bug #3925 Table sorting in navigation panel is case-sensitive
- bug #3915 Import of CSV file (Replace table data with file) with duplicate values
- bug #3907 undefined variables, function parameter problems
- bug #3898 Structure not refreshed after column drop
- bug #3926 View is not updatable
- bug #3919 PropertiesIconic not honored
- bug #3930 Databases to choose for specific privileges show up escaped
- bug #3910 Export database with empty table as a php array, does not produce valid PHP
- bug #3936 Query profiler chart not loading from SQL Query page
- bug #3946 Missing CSV import option "Do not abort on INSERT error"
- bug #3943 Missing Operations>Table options>AUTO_INCREMENT
- bug Missing CREATE DATABASE statement when exporting at database level
- bug #3924 Show warning when CSV file does not contain data for all columns
- bug #3947 Missing Sql Query after modify structure
- bug #3948 Server export problems
- bug #3917 CountTables directive is deprecated
4.0.1.0 (2013-05-14)
- bug #3879 Import broken for CSV using LOAD DATA
- bug #3889 When login fails and error display is active, login data is displayed
- bug #3890 [import] Web server upload directory import fails
- bug #3891 [import] Server upload folder import file name missing in success message
+ rfe #1421 [auth] Add retry button on connection failure with config auth
- bug #3894 [interface] Provide feedback if no columns selected for multi-submit
- bug #3799 [interface] Incorrect select field change on ctrl key navigation in Firefox
- bug #3885 [browse] display_binary_as_hex option causes unexpected behavior
- bug #3899 Git commit links to Github missing
- bug #3900 CSP WARN in Firefox console
- bug #3901 Setup script warning for config auth (stored login data) shows link BBcode
- bug #3895 [browse] Fixed getting BLOB data
- bug #3905 [export] Custom Exporting exports all databases
- bug #3909 [import] Import of CSV FIle to selected table doesn't work
- bug #3904 Browsing an empty table should not display its Structure
- bug #3908 Calendar widget improperly redirects to home
- bug #3918 Greyed out tabs when there are no rows fixed
- bug #3916 [interface] Missing scrollbar (original theme)
+ [vendor] add tcpdf path to vendor_config.php
- bug fix compat with tcpdf >= 6.0 (tested with 6.0.012)
4.0.0.0 (2013-05-03)
+ Patch #3481047 for rfe #3480477 Insert as new row enhancement
+ Patch #3480999 Activate codemirror in the query window
- Patch #3495284 XML Import - fix message and redirect
+ rfe #3484063 Null checkbox behavior
+ Patch #3497179 Contest-5: Add user: Allow create DB w/same name + grant u_%
+ Patch #3498201 Contest-6: Export all privileges
+ Patch #3502814 for rfe #3187077 Change password buttons should match
+ rfe #3488640 Expand table-group in non-light navigation frame if only one
+ Patch #3509360 Contest-3: Option "Truncate table" before "insert"
+ Patch #3506552 Contest-2: Show index information in the data dictionary
+ Patch #3510656 Contest-1: Ignoring foreign keys while dropping tables
- Bug #3509686 Reverting sort on joined column does not work
+ New transformation: append string
+ rfe #3507804 Session upload progress (PHP 5.4)
+ rfe #3488185 draggable columns vs copy column name
+ Patch #3507001 Contest-4: Textarea for large character columns
+ Removed the PHP version of the ENUM editor
+ Patch #3507111 Display distinct results, linked to corresponding data rows
- bug #3507917 [export] JSON has unescaped values for allegedly numeric columns
+ rfe #3516187 show tables creation, last update, last check timestamps in db_structure
- bug #3059806 Supporting running from CIFS/Samba shares
- bug #3516341 [export] Open Document Text, Word and Texy! Text show table structure twice
- bug [export] Texy! Text: Columns containing Pipe Character don't export properly
+ [export] Show triggers in Open Document Text, Word and Texy! Text
- Patch #3415061 [auth] Login screen appears under the page
+ rfe #3517354 [interface] Allow disabling CodeMirror with $cfg['CodemirrorEnable'] = false
+ rfe #3475567 [interface] New directive $cfg['HideStructureActions']
- bug #3468272 [import] Fixed import of ODS with more paragraphs in a cell
- bug #3510196 [core] Improved redirecting with ForceSSL option
+ rfe #3518852 [edit] edit blob but not other binary, new option $cfg['ProtectBinary'] = 'noblob'
+ Hide language select box if there are no locales installed
+ Removed some directives: verbose_check, SuggestDBName, LightTabs,
VerboseMultiSubmit, ReplaceHelpImg
- Patch #3500882 Fixing checkbox behaviour while editing identical rows
+ rfe #3441722 [interface] Display description of datatypes
+ rfe #3517835 [structure] Move columns easily
+ Ajaxified "Create View" functionality
+ [import] New plugin: import mediawiki
+ New navigation system
+ Discontinued the use of a frame-based layout
+ rfe #3528994 [interface] Allow wrapping possibly long values in replication-status table
+ [interface] Autoselect username input on cookie login page
- bug #3563799 [interface] Grid editing destroying huge amount of data
+ [import] Remove support for the unactive docSQL import format
- bug #3577443 [edit] "Browse foreign values" does not show on ajax edit
+ rfe #3522109 [browse] Grid editing: action to trigger it (or disable)
- bug #3526598 [interface] SQL query not shown when creating table
+ Dropped configuration directive: AllowThirdPartyFraming
+ Dropped configuration directive: LeftFrameLight
+ Dropped configuration directive: DisplayDatabasesList
+ Dropped configuration directives: ShowTooltipAliasDB and ShowTooltipAliasTB
+ Dropped configuration directive: NaviDatabaseNameColor
+ Added configuration directive: MaxNavigationItems
+ Renamed configuration directive: LeftFrameDBTree => NavigationTreeEnableGrouping
+ Renamed configuration directive: LeftFrameDBSeparator => NavigationTreeDbSeparator
+ Renamed configuration directive: LeftFrameTableSeparator => NavigationTreeTableSeparator
+ Renamed configuration directive: LeftFrameTableLevel => NavigationTreeTableLevel
+ Renamed configuration directive: LeftPointerEnable => NavigationTreePointerEnable
+ Renamed configuration directive: LeftDefaultTabTable => NavigationTreeDefaultTabTable
+ Renamed configuration directive: LeftDisplayTableFilterMinimum => NavigationTreeDisplayTableFilterMinimum
+ Renamed configuration directive: LeftDisplayLogo => NavigationDisplayLogo
+ Renamed configuration directive: LeftLogoLink => NavigationLogoLink
+ Renamed configuration directive: LeftLogoLinkWindow => NavigationLogoLinkWindow
+ Renamed configuration directive: LeftDisplayServers => NavigationDisplayServers
+ Renamed configuration directive: LeftRecentTable => NumRecentTables
+ Renamed configuration directive: LeftDisplayDatabaseFilterMinimum => NavigationTreeDisplayDbFilterMinimum
+ Removed the "Mark row on click" feature; must now click the checkbox to mark
+ Removed the "Synchronize" feature
+ Improved layout of server variables page
+ rfe #1052091 [config] Double-underscores in PMA table names
+ Improved the "More" dropdown on the table structure page
+ [interface] Added "scroll to top" link in menubar
+ [designer] Fullscreen mode for the designer
+ Upgraded jquery to v1.8.3 and jquery-ui to v1.9.2
+ Patch #3597529 [status] Add raw value as title on server status page
+ Support MySQL 5.6 partitioning
+ Removed the AjaxEnable directive
+ rfe #3542567 Accept IPv6 ranges and IPv6 CIDR notations in $cfg['Servers'][$i]['AllowDeny']['rules']
- Bug #3576788 Grid editing shows the value before silent truncation
- Upgraded jqPlot to 1.0.4 r1121
- Upgraded to jquery-ui-timepicker-addon 1.1.1
+ rfe #3599046 [interface] Added comments for indexes
- Replaced qtip with jQuery UI tooltip
- Upgraded CodeMirror to 2.37
- bug #2951 [export] Correctly export decimal fields.
- bug #3762 [core] Make Advisor work on Windows withou COM extension.
- bug #3519 [export] Prevent infinite recursion in PDF export.
- bug #3827 Table specific privileges not displayed for db name containing
underscore
- rfe #1386 Add IF NOT EXISTS clause when copying database
- No longer package .travis.yml configuration file when creating a release.
- bug #3830 Can't export custom query because it lowercases table names
- bug #3829 Enabling query profiling crashes javascript based navigation
+ rfe #879 Reserved word warning
+ Remove the database ordering sub-feature of the only_db directive
- bug #3840 When exporting to gzip format, the data is compressed 2 times
+ rfe #1319 Permit to create index when creating foreign key
- bug #3703 Incorrect updating of the list of users
- bug #3853 Blowfish implementation might be broken (replace with phpseclib)
- bug #3865 Using like operator on each backslash needs 4 backslash protection
- bug #3860 Displayed git revision info is not set
- bug #3871 Check referential integrity broken across databases
- bug #3874 [export] No preselected option when exporting table
- bug #3873 Can't copy table to target database if table exists there
- bug #3683 Incorrect listing of records from to count
- bug #3876 [import] PHP 5.2 - unexpected T_PAAMAYIM_NEKUDOTAYIM
- [security] Local file inclusion vulnerability, reported by Janek Vind
(see PMASA-2013-4)
- [security] Global variables overwrite in export.php, reported by Janek Vind
(see PMASA-2013-5)
- bug #3892 [export] SQL Export files are empty
3.5.8.2 (2013-07-28)
- [security] Fix self-XSS in "Showing rows", see PMASA-2013-8
- [security] Fix self-XSS in Display chart, see PMASA-2013-9
- [security] Fix stored XSS in Server status monitor, see PMASA-2013-9
- [security] Fix stored XSS in navigation panel logo link, see PMASA-2013-9
- [security] Fix self-XSS in setup, trusted proxies validation, see PMASA-2013-9
+ [security] JSON content type header for version_check.php, see PMASA-2013-9
+ [security] Backport fix for jQuery issue #9521 from jQuery 1.6.3, see PMASA-2013-9
+ [security] Fix full path disclosure, see PMASA-2013-12
+ [security] Fix control user SQL injection in pmd_pdf.php, see PMASA-2013-15
+ [security] Fix control user SQL injection in schema_export.php, see PMASA-2013-15
- [security] Fix self-XSS in schema export, see PMASA-2013-14
- [security] Fix unencoded json object, see PMASA-2013-11
3.5.8.1 (2013-04-24)
- [security] Remote code execution (preg_replace), reported by Janek Vind
(see PMASA-2013-2)
- [security] Locally Saved SQL Dump File Multiple File Extension Remote Code
Execution, reported by Janek Vind (see PMASA-2013-3)
3.5.8.0 (2013-04-08)
- bug #3828 MariaDB reported as MySQL
- bug #3854 Incorrect header for Safari 6.0
- bug #3705 Attempt to open trigger for edit gives NULL
- Use HTML5 DOCTYPE
- [security] Self-XSS on GIS visualisation page, reported by Janek Vind
- bug #3800 Incorrect keyhandler behaviour #2
3.5.7.0 (2013-02-15)
- bug #3779 [core] Problem with backslash in enum fields
- bug #3816 Missing server_processlist.php
- bug #3821 Safari: white page
- Correct detection of the Chrome browser
3.5.6.0 (2013-01-28)
- bug #3593604 [status] Erroneous advisor rule
- bug #3596070 [status] localStorage broken in server status monitor
- bug #3598736 [routines] Editing a procedure with special characters
- bug #3600322 [core] Visualize GIS data throws Fatal Error
- bug #3599362 [core] Double-escaped error message
- bug #3776 [cookies] Login without auth on second server
--- Older ChangeLogs can be found on our project website ---
https://www.phpmyadmin.net/old-stuff/ChangeLogs/
# vim: et ts=4 sw=4 sts=4
# vim: ft=changelog fenc=utf-8
# vim: fde=getline(v\:lnum-1)=~'^\\s*$'&&getline(v\:lnum)=~'\\S'?'>1'\:1&&v\:lnum>4&&getline(v\:lnum)!~'^#'
# vim: fdn=1 fdm=expr

View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@ -0,0 +1,84 @@
phpMyAdmin - Readme
===================
Version 4.0.10.20
A set of PHP-scripts to manage MySQL over the web.
https://www.phpmyadmin.net/
Copyright
---------
Copyright (C) 1998-2000
Tobias Ratschiller <tobias_at_ratschiller.com>
Copyright (C) 2001-2014
Marc Delisle <marc_at_infomarc.info>
Olivier Müller <om_at_omnis.ch>
Robin Johnson <robbat2_at_users.sourceforge.net>
Alexander M. Turek <me_at_derrabus.de>
Michal Čihař <michal_at_cihar.com>
Garvin Hicking <me_at_supergarv.de>
Michael Keck <mkkeck_at_users.sourceforge.net>
Sebastian Mendel <cybot_tm_at_users.sourceforge.net>
[check documentation for more details]
License
-------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License version 2, as published by the
Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Requirements
------------
* PHP 5.2 or later
* MySQL 5.0 or later
* a web-browser (doh!)
Summary
-------
phpMyAdmin is intended to handle the administration of MySQL over the web.
For a summary of features, please see the documentation in the doc folder.
Download
--------
You can get the newest version at https://www.phpmyadmin.net/.
More Information
----------------
Please see the documentation in the doc folder.
Support
-------
See reference about support forums under https://www.phpmyadmin.net/
Enjoy!
------
The phpMyAdmin Devel team
PS:
Please, don't send us emails with question like "How do I compile PHP with
MySQL-support". We just don't have the time to be your free help desk.
Please send your questions to the appropriate mailing lists / forums. Before
contacting us, please read the documentation (especially the FAQ part).

View File

@ -0,0 +1 @@
Wed Mar 29 01:02:30 UTC 2017

View File

@ -0,0 +1,347 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* display selection for relational field values
*
* @package PhpMyAdmin
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/transformations.lib.php';
/**
* Sets globals from $_REQUEST
*/
$request_params = array(
'field',
'fieldkey',
'foreign_filter',
'pos',
'rownumber'
);
foreach ($request_params as $one_request_param) {
if (isset($_REQUEST[$one_request_param])) {
$GLOBALS[$one_request_param] = $_REQUEST[$one_request_param];
}
}
PMA_Util::checkParameters(array('db', 'table', 'field'));
$response = PMA_Response::getInstance();
$response->getFooter()->setMinimal();
$header = $response->getHeader();
$header->disableMenu();
$header->setBodyId('body_browse_foreigners');
/**
* Displays the frame
*/
$cfgRelation = PMA_getRelationsParam();
$foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : false);
$override_total = true;
if (! isset($pos)) {
$pos = 0;
}
$foreign_limit = 'LIMIT ' . $pos . ', ' . $GLOBALS['cfg']['MaxRows'] . ' ';
if (isset($foreign_navig) && $foreign_navig == __('Show all')) {
unset($foreign_limit);
}
$foreignData = PMA_getForeignData(
$foreigners, $field, $override_total,
isset($foreign_filter) ? $foreign_filter : '', $foreign_limit
);
if (isset($rownumber)) {
$rownumber_param = '&amp;rownumber=' . urlencode($rownumber);
} else {
$rownumber_param = '';
}
$gotopage = '';
$showall = '';
if (is_array($foreignData['disp_row'])) {
if ($cfg['ShowAll']
&& ($foreignData['the_total'] > $GLOBALS['cfg']['MaxRows'])
) {
$showall = '<input type="submit" name="foreign_navig" value="'
. __('Show all') . '" />';
}
$session_max_rows = $GLOBALS['cfg']['MaxRows'];
$pageNow = @floor($pos / $session_max_rows) + 1;
$nbTotalPage = @ceil($foreignData['the_total'] / $session_max_rows);
if ($foreignData['the_total'] > $GLOBALS['cfg']['MaxRows']) {
$gotopage = PMA_Util::pageselector(
'pos',
$session_max_rows,
$pageNow,
$nbTotalPage,
200,
5,
5,
20,
10,
__('Page number:')
);
}
}
// When coming from Table/Zoom search
if (isset($_REQUEST['fromsearch'])) {
// In table or zoom search, input fields are named "criteriaValues"
$element_name = " var field = 'criteriaValues';\n";
} else {
// In insert/edit, input fields are named "fields"
$element_name = " var field = 'fields';\n";
}
if (isset($rownumber)) {
$element_name .= " var element_name = field + '[multi_edit]["
. htmlspecialchars($rownumber) . "][' + fieldmd5 + ']';\n"
. " var null_name = field_null + '[multi_edit]["
. htmlspecialchars($rownumber) . "][' + fieldmd5 + ']';\n";
} else {
$element_name .= "var element_name = field + '[]'";
}
$error = PMA_jsFormat(
__(
'The target browser window could not be updated. '
. 'Maybe you have closed the parent window, or '
. 'your browser\'s security settings are '
. 'configured to block cross-window updates.'
)
);
if (! isset($fieldkey) || ! is_numeric($fieldkey)) {
$fieldkey = 0;
}
$code = <<<EOC
self.focus();
function formupdate(fieldmd5, key) {
var \$inline = window.opener.jQuery('.browse_foreign_clicked');
if (\$inline.length != 0) {
\$inline.removeClass('browse_foreign_clicked')
// for grid editing,
// puts new value in the previous element which is
// a span with class curr_value, and trigger .change()
.prev('.curr_value').text(key).change();
// for zoom-search editing, puts new value in the previous
// element which is an input field
\$inline.prev('input[type=text]').val(key);
self.close();
return false;
}
if (opener && opener.document && opener.document.insertForm) {
var field = 'fields';
var field_null = 'fields_null';
$element_name
var element_name_alt = field + '[$fieldkey]';
if (opener.document.insertForm.elements[element_name]) {
// Edit/Insert form
opener.document.insertForm.elements[element_name].value = key;
if (opener.document.insertForm.elements[null_name]) {
opener.document.insertForm.elements[null_name].checked = false;
}
self.close();
return false;
} else if (opener.document.insertForm.elements[element_name_alt]) {
// Search form
opener.document.insertForm.elements[element_name_alt].value = key;
self.close();
return false;
}
}
alert('$error');
}
EOC;
$header->getScripts()->addCode($code);
// HTML output
$output = '<form action="browse_foreigners.php" method="post">'
. '<fieldset>'
. PMA_generate_common_hidden_inputs($db, $table)
. '<input type="hidden" name="field" value="' . htmlspecialchars($field) . '" />'
. '<input type="hidden" name="fieldkey" value="'
. (isset($fieldkey) ? htmlspecialchars($fieldkey) : '') . '" />';
if (isset($rownumber)) {
$output .= '<input type="hidden" name="rownumber" value="'
. htmlspecialchars($rownumber) . '" />';
}
$output .= '<span class="formelement">'
. '<label for="input_foreign_filter">' . __('Search') . ':' . '</label>'
. '<input type="text" name="foreign_filter" id="input_foreign_filter" value="'
. (isset($foreign_filter) ? htmlspecialchars($foreign_filter) : '') . '" />'
. '<input type="submit" name="submit_foreign_filter" value="'
. __('Go') . '" />'
. '</span>'
. '<span class="formelement">' . $gotopage . '</span>'
. '<span class="formelement">' . $showall . '</span>'
. '</fieldset>'
. '</form>';
$output .= '<table width="100%">';
if (is_array($foreignData['disp_row'])) {
$header = '<tr>
<th>' . __('Keyname') . '</th>
<th>' . __('Description') . '</th>
<td width="20%"></td>
<th>' . __('Description') . '</th>
<th>' . __('Keyname') . '</th>
</tr>';
$output .= '<thead>' . $header . '</thead>' . "\n"
. '<tfoot>' . $header . '</tfoot>' . "\n"
. '<tbody>' . "\n";
$values = array();
$keys = array();
foreach ($foreignData['disp_row'] as $relrow) {
if ($foreignData['foreign_display'] != false) {
$values[] = $relrow[$foreignData['foreign_display']];
} else {
$values[] = '';
}
$keys[] = $relrow[$foreignData['foreign_field']];
}
asort($keys);
$hcount = 0;
$odd_row = true;
$val_ordered_current_row = 0;
$val_ordered_current_equals_data = false;
$key_ordered_current_equals_data = false;
foreach ($keys as $key_ordered_current_row => $value) {
$hcount++;
if ($cfg['RepeatCells'] > 0 && $hcount > $cfg['RepeatCells']) {
$output .= $header;
$hcount = 0;
$odd_row = true;
}
$key_ordered_current_key = $keys[$key_ordered_current_row];
$key_ordered_current_val = $values[$key_ordered_current_row];
$val_ordered_current_key = $keys[$val_ordered_current_row];
$val_ordered_current_val = $values[$val_ordered_current_row];
$val_ordered_current_row++;
if (PMA_strlen($val_ordered_current_val) <= $cfg['LimitChars']) {
$val_ordered_current_val = htmlspecialchars(
$val_ordered_current_val
);
$val_ordered_current_val_title = '';
} else {
$val_ordered_current_val_title = htmlspecialchars(
$val_ordered_current_val
);
$val_ordered_current_val = htmlspecialchars(
PMA_substr($val_ordered_current_val, 0, $cfg['LimitChars'])
. '...'
);
}
if (PMA_strlen($key_ordered_current_val) <= $cfg['LimitChars']) {
$key_ordered_current_val = htmlspecialchars(
$key_ordered_current_val
);
$key_ordered_current_val_title = '';
} else {
$key_ordered_current_val_title = htmlspecialchars(
$key_ordered_current_val
);
$key_ordered_current_val = htmlspecialchars(
PMA_substr(
$key_ordered_current_val, 0, $cfg['LimitChars']
) . '...'
);
}
if (! empty($data)) {
$val_ordered_current_equals_data = $val_ordered_current_key == $data;
$key_ordered_current_equals_data = $key_ordered_current_key == $data;
}
$output .= '<tr class="noclick ' . ($odd_row ? 'odd' : 'even') . '">';
$odd_row = ! $odd_row;
$output .= '<td class="nowrap">'
. ($key_ordered_current_equals_data ? '<strong>' : '')
. '<a href="#" title="' . __('Use this value')
. ($key_ordered_current_val_title != ''
? ': ' . $key_ordered_current_val_title
: '') . '"'
. ' onclick="formupdate(\'' . md5($field) . '\', \''
. PMA_jsFormat($key_ordered_current_key, false) . '\'); return false;">'
. htmlspecialchars($key_ordered_current_key)
. '</a>' . ($key_ordered_current_equals_data ? '</strong>' : '')
. '</td>';
$output .= '<td>'
. ($key_ordered_current_equals_data ? '<strong>' : '')
. '<a href="#" title="' . __('Use this value')
. ($key_ordered_current_val_title != '' ? ': '
. $key_ordered_current_val_title : '') . '" onclick="formupdate(\''
. md5($field) . '\', \''
. PMA_jsFormat($key_ordered_current_key, false)
. '\'); return false;">'
. $key_ordered_current_val . '</a>'
. ($key_ordered_current_equals_data ? '</strong>' : '')
. '</td>';
$output .= '<td width="20%">'
. '<img src="' . $GLOBALS['pmaThemeImage'] . 'spacer.png" alt=""'
. ' width="1" height="1" /></td>';
$output .= '<td>'
. ($val_ordered_current_equals_data ? '<strong>' : '')
. '<a href="#" title="' . __('Use this value')
. ($val_ordered_current_val_title != '' ? ': '
. $val_ordered_current_val_title : '') . '" onclick="formupdate(\''
. md5($field) . '\', \''
. PMA_jsFormat($val_ordered_current_key, false)
. '\'); return false;">'
. $val_ordered_current_val . '</a>'
. ($val_ordered_current_equals_data ? '</strong>' : '')
. '</td>';
$output .= '<td class="nowrap">'
. ($val_ordered_current_equals_data ? '<strong>' : '')
. '<a href="#" title="' . __('Use this value')
. ($val_ordered_current_val_title != ''
? ': ' . $val_ordered_current_val_title : '')
. '" onclick="formupdate(\'' . md5($field) . '\', \''
. PMA_jsFormat($val_ordered_current_key, false) . '\'); return false;">'
. htmlspecialchars($val_ordered_current_key)
. '</a>' . ($val_ordered_current_equals_data ? '</strong>' : '')
. '</td>';
$output .= '</tr>';
} // end while
}
$output .= '</tbody>'
. '</table>';
$response->addHtml($output);
?>

View File

@ -0,0 +1,153 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Simple script to set correct charset for changelog
*
* @package PhpMyAdmin
*/
/**
* Gets core libraries and defines some variables
*/
require 'libraries/common.inc.php';
$response = PMA_Response::getInstance();
$response->disable();
$filename = CHANGELOG_FILE;
/**
* Read changelog.
*/
// Check if the file is available, some distributions remove these.
if (is_readable($filename)) {
// Test if the if is in a compressed format
if (substr($filename, -3) == '.gz') {
ob_start();
readgzfile($filename);
$changelog = ob_get_contents();
ob_end_clean();
} else {
$changelog = file_get_contents($filename);
}
} else {
printf(
__('The %s file is not available on this system, please visit www.phpmyadmin.net for more information.'),
$filename
);
exit;
}
/**
* Whole changelog in variable.
*/
$changelog = htmlspecialchars($changelog);
$tracker_url = 'https://sourceforge.net/support/tracker.php?aid=\\1';
$tracker_url_bug = 'https://sourceforge.net/p/phpmyadmin/bugs/\\1/';
$tracker_url_rfe = 'https://sourceforge.net/p/phpmyadmin/feature-requests/\\1/';
$tracker_url_patch = 'https://sourceforge.net/p/phpmyadmin/patches/\\1/';
$github_url = 'https://github.com/phpmyadmin/phpmyadmin/';
$replaces = array(
'@(http://[./a-zA-Z0-9.-_-]*[/a-zA-Z0-9_])@'
=> '<a href="./url.php?url=\\1">\\1</a>',
// sourceforge users
'/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+[^ ]) +&lt;(.*)@users.sourceforge.net&gt;/i'
=> '\\1 <a href="./url.php?url=https://sourceforge.net/users/\\3/">\\2</a>',
'/thanks to ([^\(\r\n]+) \(([-\w]+)\)/i'
=> 'thanks to <a href="./url.php?url=https://sourceforge.net/users/\\2/">\\1</a>',
'/thanks to ([^\(\r\n]+) -\s+([-\w]+)/i'
=> 'thanks to <a href="./url.php?url=https://sourceforge.net/users/\\2/">\\1</a>',
// mail address
'/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+[^ ]) +&lt;(.*@.*)&gt;/i'
=> '\\1 <a href="mailto:\\3">\\2</a>',
// linking patches
'/patch\s*#?([0-9]{6,})/i'
=> '<a href="./url.php?url=' . $tracker_url . '">patch #\\1</a>',
// linking RFE
'/(?:rfe|feature)\s*#?([0-9]{6,})/i'
=> '<a href="./url.php?url=https://sourceforge.net/support/tracker.php?aid=\\1">RFE #\\1</a>',
// linking files
'/(\s+)([\\/a-z_0-9\.]+\.(?:php3?|html|pl|js|sh))/i'
=> '\\1<a href="./url.php?url=' . $github_url . 'commits/HEAD/\\2">\\2</a>',
// FAQ entries
'/FAQ ([0-9]+)\.([0-9a-z]+)/i'
=> '<a href="./url.php?url=https://docs.phpmyadmin.net/en/latest/faq.html#faq\\1-\\2">FAQ \\1.\\2</a>',
// linking bugs
'/bug\s*#?([0-9]{6,})/i'
=> '<a href="./url.php?url=https://sourceforge.net/support/tracker.php?aid=\\1">bug #\\1</a>',
// all other 6+ digit numbers are treated as bugs
'/(?<!bug|RFE|patch) #?([0-9]{6,})/i'
=> '<a href="./url.php?url=' . $tracker_url . '">bug #\\1</a>',
// transitioned SF.net project bug/rfe/patch links
// by the time we reach 6-digit numbers, we can probably retire the above links
'/patch\s*#?([0-9]{4,5}) /i'
=> '<a href="./url.php?url=' . $tracker_url_patch . '">patch #\\1</a> ',
'/(?:rfe|feature)\s*#?([0-9]{4,5}) /i'
=> '<a href="./url.php?url=' . $tracker_url_rfe . '">RFE #\\1</a> ',
'/bug\s*#?([0-9]{4,5}) /i'
=> '<a href="./url.php?url=' . $tracker_url_bug . '">bug #\\1</a> ',
'/(?<!bug|RFE|patch) #?([0-9]{4,5}) /i'
=> '<a href="./url.php?url=' . $tracker_url_bug . '">bug #\\1</a> ',
// CVE/CAN entries
'/((CAN|CVE)-[0-9]+-[0-9]+)/'
=> '<a href="./url.php?url=http://cve.mitre.org/cgi-bin/cvename.cgi?name=\\1">\\1</a>',
// PMASAentries
'/(PMASA-[0-9]+-[0-9]+)/'
=> '<a href="./url.php?url=https://www.phpmyadmin.net/security/\\1/">\\1</a>',
// Highlight releases (with links)
'/([0-9]+)\.([0-9]+)\.([0-9]+)\.0 (\([0-9-]+\))/'
=> '<a name="\\1_\\2_\\3"></a>'
. '<a href="./url.php?url=' . $github_url . 'commits/RELEASE_\\1_\\2_\\3">'
. '\\1.\\2.\\3.0 \\4</a>',
'/([0-9]+)\.([0-9]+)\.([0-9]+)\.([1-9][0-9]*) (\([0-9-]+\))/'
=> '<a name="\\1_\\2_\\3_\\4"></a>'
. '<a href="./url.php?url=' . $github_url . 'commits/RELEASE_\\1_\\2_\\3_\\4">'
. '\\1.\\2.\\3.\\4 \\5</a>',
// Highlight releases (not linkable)
'/( ### )(.*)/'
=> '\\1<b>\\2</b>',
);
header('Content-type: text/html; charset=utf-8');
?>
<!DOCTYPE HTML>
<html lang="en" dir="ltr">
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title>phpMyAdmin - ChangeLog</title>
<meta charset="utf-8" />
</head>
<body>
<h1>phpMyAdmin - ChangeLog</h1>
<?php
echo '<pre>';
echo preg_replace(array_keys($replaces), $replaces, $changelog);
echo '</pre>';
?>
<script type="text/javascript">
var links = document.getElementsByTagName("a");
for(var i = 0; i < links.length; i++) {
links[i].target = "_blank";
links[i].rel = "noopener noreferrer";
}
</script>
</body>
</html>

View File

@ -0,0 +1,15 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Displays status of phpMyAdmin configuration storage
*
* @package PhpMyAdmin
*/
require_once 'libraries/common.inc.php';
$response = PMA_Response::getInstance();
$response->addHTML(
PMA_getRelationsParamDiagnostic(PMA_getRelationsParam())
);
?>

View File

@ -0,0 +1,29 @@
{
"name": "phpmyadmin/phpmyadmin",
"type": "application",
"description": "MySQL web administration tool",
"keywords": ["phpmyadmin","mysql","web"],
"homepage": "https://www.phpmyadmin.net/",
"license": "GPL-2.0+",
"authors": [
{
"name": "The phpMyAdmin Team",
"email": "phpmyadmin-devel@lists.sourceforge.net",
"homepage": "https://www.phpmyadmin.net/team/"
}
],
"support": {
"forum": "https://sourceforge.net/p/phpmyadmin/discussion/Help",
"issues": "https://sourceforge.net/p/phpmyadmin/bugs/",
"wiki": "https://wiki.phpmyadmin.net/",
"source": "https://github.com/phpmyadmin/phpmyadmin"
},
"require": {
"php": ">=5.2.0"
},
"require-dev": {
"satooshi/php-coveralls": ">=0.6",
"phpunit/phpunit": "<4.2",
"phpunit/phpunit-selenium": ">=1.2"
}
}

View File

@ -0,0 +1,139 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
*
* All directives are explained in documentation in the doc/ folder
* or at <https://docs.phpmyadmin.net/>.
*
* @package PhpMyAdmin
*/
/**
* This is needed for cookie based authentication to encrypt password in
* cookie. Needs to be 32 chars long.
*/
$cfg['blowfish_secret'] = 'GObO60^(04#^5637%fdUGo(*6$%6#dy4'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/**
* Servers configuration
*/
$i = 0;
/**
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'mysql';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
/**
* phpMyAdmin configuration storage settings.
*/
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Storage database and tables */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma__relation';
// $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
// $cfg['Servers'][$i]['history'] = 'pma__history';
// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
// $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
/**
* End of servers configuration
*/
/**
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/**
* Defines whether a user should be displayed a "show all (records)"
* button in browse mode or not.
* default = false
*/
//$cfg['ShowAll'] = true;
/**
* Number of rows displayed when browsing a result set. If the result
* set contains more rows, "Previous" and "Next".
* Possible values: 25, 50, 100, 250, 500
* default = 25
*/
//$cfg['MaxRows'] = 50;
/**
* Disallow editing of binary fields
* valid values are:
* false allow editing
* 'blob' allow editing except for BLOB fields
* 'noblob' disallow editing except for BLOB fields
* 'all' disallow editing
* default = 'blob'
*/
//$cfg['ProtectBinary'] = false;
/**
* Default language to use, if not browser-defined or user-defined
* (you find all languages in the locale folder)
* uncomment the desired line:
* default = 'en'
*/
//$cfg['DefaultLang'] = 'en';
//$cfg['DefaultLang'] = 'de';
/**
* default display direction (horizontal|vertical|horizontalflipped)
*/
//$cfg['DefaultDisplay'] = 'vertical';
/**
* How many columns should be used for table display of a database?
* (a value larger than 1 results in some information being hidden)
* default = 1
*/
//$cfg['PropertiesNumColumns'] = 2;
/**
* Set to true if you want DB-based query history.If false, this utilizes
* JS-routines to display query history (lost by window close)
*
* This requires configuration storage enabled, see above.
* default = false
*/
//$cfg['QueryHistoryDB'] = true;
/**
* When using DB-based query history, how many entries should be kept?
* default = 25
*/
//$cfg['QueryHistoryMax'] = 100;
/*
* You can find more configuration options in the documentation
* in the doc/ folder or at <https://docs.phpmyadmin.net/>.
*/
?>

View File

@ -0,0 +1,139 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
*
* All directives are explained in documentation in the doc/ folder
* or at <https://docs.phpmyadmin.net/>.
*
* @package PhpMyAdmin
*/
/*
* This is needed for cookie based authentication to encrypt password in
* cookie. Needs to be 32 chars long.
*/
$cfg['blowfish_secret'] = 'a8b7c6d'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0;
/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
/*
* phpMyAdmin configuration storage settings.
*/
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Storage database and tables */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma__relation';
// $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
// $cfg['Servers'][$i]['history'] = 'pma__history';
// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
// $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
/*
* End of servers configuration
*/
/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/**
* Defines whether a user should be displayed a "show all (records)"
* button in browse mode or not.
* default = false
*/
//$cfg['ShowAll'] = true;
/**
* Number of rows displayed when browsing a result set. If the result
* set contains more rows, "Previous" and "Next".
* default = 30
*/
//$cfg['MaxRows'] = 50;
/**
* disallow editing of binary fields
* valid values are:
* false allow editing
* 'blob' allow editing except for BLOB fields
* 'noblob' disallow editing except for BLOB fields
* 'all' disallow editing
* default = blob
*/
//$cfg['ProtectBinary'] = 'false';
/**
* Default language to use, if not browser-defined or user-defined
* (you find all languages in the locale folder)
* uncomment the desired line:
* default = 'en'
*/
//$cfg['DefaultLang'] = 'en';
//$cfg['DefaultLang'] = 'de';
/**
* default display direction (horizontal|vertical|horizontalflipped)
*/
//$cfg['DefaultDisplay'] = 'vertical';
/**
* How many columns should be used for table display of a database?
* (a value larger than 1 results in some information being hidden)
* default = 1
*/
//$cfg['PropertiesNumColumns'] = 2;
/**
* Set to true if you want DB-based query history.If false, this utilizes
* JS-routines to display query history (lost by window close)
*
* This requires configuration storage enabled, see above.
* default = false
*/
//$cfg['QueryHistoryDB'] = true;
/**
* When using DB-based query history, how many entries should be kept?
*
* default = 25
*/
//$cfg['QueryHistoryMax'] = 100;
/*
* You can find more configuration options in the documentation
* in the doc/ folder or at <https://docs.phpmyadmin.net/>.
*/
?>

View File

@ -0,0 +1,148 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
*
* @package PhpMyAdmin
*/
/**
* Gets some core libraries
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/mysql_charsets.lib.php';
if (! PMA_DRIZZLE) {
include_once 'libraries/replication.inc.php';
}
require 'libraries/build_html_for_db.lib.php';
/**
* Sets globals from $_POST
*/
$post_params = array(
'db_collation',
'new_db'
);
foreach ($post_params as $one_post_param) {
if (isset($_POST[$one_post_param])) {
$GLOBALS[$one_post_param] = $_POST[$one_post_param];
}
}
PMA_Util::checkParameters(array('new_db'));
/**
* Defines the url to return to in case of error in a sql statement
*/
$err_url = 'index.php?' . PMA_generate_common_url();
/**
* Builds and executes the db creation sql query
*/
$sql_query = 'CREATE DATABASE ' . PMA_Util::backquote($new_db);
if (! empty($db_collation)) {
list($db_charset) = explode('_', $db_collation);
if (in_array($db_charset, $mysql_charsets)
&& in_array($db_collation, $mysql_collations[$db_charset])
) {
$sql_query .= ' DEFAULT' . PMA_generateCharsetQueryPart($db_collation);
}
$db_collation_for_ajax = $db_collation;
unset($db_charset, $db_collation);
}
$sql_query .= ';';
$result = PMA_DBI_try_query($sql_query);
if (! $result) {
$message = PMA_Message::rawError(PMA_DBI_getError());
// avoid displaying the not-created db name in header or navi panel
$GLOBALS['db'] = '';
$GLOBALS['table'] = '';
/**
* If in an Ajax request, just display the message with {@link PMA_Response}
*/
if ($GLOBALS['is_ajax_request'] == true) {
$response = PMA_Response::getInstance();
$response->isSuccess(false);
$response->addJSON('message', $message);
} else {
include_once 'index.php';
}
} else {
$message = PMA_Message::success(__('Database %1$s has been created.'));
$message->addParam($new_db);
$GLOBALS['db'] = $new_db;
/**
* If in an Ajax request, build the output and send it
*/
if ($GLOBALS['is_ajax_request'] == true) {
//Construct the html for the new database, so that it can be appended to
// the list of databases on server_databases.php
/**
* Build the array to be passed to {@link PMA_generate_common_url}
* to generate the links
*
* @global array $GLOBALS['db_url_params']
* @name $db_url_params
*/
$db_url_params['db'] = $new_db;
$is_superuser = PMA_isSuperuser();
$column_order = PMA_getColumnOrder();
$url_query = PMA_generate_common_url($new_db);
/**
* String that will contain the output HTML
* @name $new_db_string
*/
$new_db_string = '<tr>';
if (empty($db_collation_for_ajax)) {
$db_collation_for_ajax = PMA_getServerCollation();
}
// $dbstats comes from the create table dialog
if (! empty($dbstats)) {
$current = array(
'SCHEMA_NAME' => $new_db,
'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax,
'SCHEMA_TABLES' => '0',
'SCHEMA_TABLE_ROWS' => '0',
'SCHEMA_DATA_LENGTH' => '0',
'SCHEMA_MAX_DATA_LENGTH' => '0',
'SCHEMA_INDEX_LENGTH' => '0',
'SCHEMA_LENGTH' => '0',
'SCHEMA_DATA_FREE' => '0'
);
} else {
$current = array(
'SCHEMA_NAME' => $new_db
);
}
list($column_order, $generated_html) = PMA_buildHtmlForDb(
$current, $is_superuser, $url_query,
$column_order, $replication_types, $replication_info
);
$new_db_string .= $generated_html;
$new_db_string .= '</tr>';
$response = PMA_Response::getInstance();
$response->addJSON('message', $message);
$response->addJSON('new_db_string', $new_db_string);
$response->addJSON(
'sql_query',
PMA_Util::getMessage(
null, $sql_query, 'success'
)
);
} else {
include_once '' . $cfg['DefaultTabDatabase'];
}
}
?>

View File

@ -0,0 +1,291 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
*
* @package PhpMyAdmin
*/
/**
* Gets the variables sent or posted to this script, then displays headers
*/
require_once 'libraries/common.inc.php';
if (! isset($selected_tbl)) {
include 'libraries/db_common.inc.php';
include 'libraries/db_info.inc.php';
}
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$header->enablePrintView();
/**
* Gets the relations settings
*/
$cfgRelation = PMA_getRelationsParam();
require_once 'libraries/transformations.lib.php';
require_once 'libraries/Index.class.php';
/**
* Check parameters
*/
PMA_Util::checkParameters(array('db'));
/**
* Defines the url to return to in case of error in a sql statement
*/
if (strlen($table)) {
$err_url = 'tbl_sql.php?' . PMA_generate_common_url($db, $table);
} else {
$err_url = 'db_sql.php?' . PMA_generate_common_url($db);
}
if ($cfgRelation['commwork']) {
$comment = PMA_getDbComment($db);
/**
* Displays DB comment
*/
if ($comment) {
echo '<p>' . __('Database comment: ')
. '<i>' . htmlspecialchars($comment) . '</i></p>';
} // end if
}
/**
* Selects the database and gets tables names
*/
PMA_DBI_select_db($db);
$tables = PMA_DBI_get_tables($db);
$count = 0;
foreach ($tables as $table) {
$comments = PMA_getComments($db, $table);
echo '<div>' . "\n";
echo '<h2>' . htmlspecialchars($table) . '</h2>' . "\n";
/**
* Gets table informations
*/
$show_comment = PMA_Table::sGetStatusInfo($db, $table, 'TABLE_COMMENT');
/**
* Gets table keys and retains them
*/
PMA_DBI_select_db($db);
$indexes = PMA_DBI_get_table_indexes($db, $table);
$primary = '';
$indexes = array();
$lastIndex = '';
$indexes_info = array();
$indexes_data = array();
$pk_array = array(); // will be use to emphasis prim. keys in the table
// view
foreach ($indexes as $row) {
// Backups the list of primary keys
if ($row['Key_name'] == 'PRIMARY') {
$primary .= $row['Column_name'] . ', ';
$pk_array[$row['Column_name']] = 1;
}
// Retains keys informations
if ($row['Key_name'] != $lastIndex) {
$indexes[] = $row['Key_name'];
$lastIndex = $row['Key_name'];
}
$indexes_info[$row['Key_name']]['Sequences'][] = $row['Seq_in_index'];
$indexes_info[$row['Key_name']]['Non_unique'] = $row['Non_unique'];
if (isset($row['Cardinality'])) {
$indexes_info[$row['Key_name']]['Cardinality'] = $row['Cardinality'];
}
// I don't know what does following column mean....
// $indexes_info[$row['Key_name']]['Packed'] = $row['Packed'];
$indexes_info[$row['Key_name']]['Comment'] = $row['Comment'];
$indexes_data[$row['Key_name']][$row['Seq_in_index']]['Column_name'] = $row['Column_name'];
if (isset($row['Sub_part'])) {
$indexes_data[$row['Key_name']][$row['Seq_in_index']]['Sub_part'] = $row['Sub_part'];
}
} // end while
/**
* Gets columns properties
*/
$columns = PMA_DBI_get_columns($db, $table);
$fields_cnt = count($columns);
if (PMA_MYSQL_INT_VERSION < 50025) {
// We need this to correctly learn if a TIMESTAMP is NOT NULL, since
// SHOW FULL COLUMNS or INFORMATION_SCHEMA incorrectly says NULL
// and SHOW CREATE TABLE says NOT NULL
// http://bugs.mysql.com/20910.
$show_create_table_query = 'SHOW CREATE TABLE '
. PMA_Util::backquote($db) . '.'
. PMA_Util::backquote($table);
$show_create_table = PMA_DBI_fetch_value(
$show_create_table_query, 0, 1
);
$analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table));
}
// Check if we can use Relations
if (!empty($cfgRelation['relation'])) {
// Find which tables are related with the current one and write it in
// an array
$res_rel = PMA_getForeigners($db, $table);
if (count($res_rel) > 0) {
$have_rel = true;
} else {
$have_rel = false;
}
} else {
$have_rel = false;
} // end if
/**
* Displays the comments of the table if MySQL >= 3.23
*/
if (!empty($show_comment)) {
echo __('Table comments') . ': ' . htmlspecialchars($show_comment) . '<br /><br />';
}
/**
* Displays the table structure
*/
?>
<table width="100%" class="print">
<tr><th width="50"><?php echo __('Column'); ?></th>
<th width="80"><?php echo __('Type'); ?></th>
<?php /* <th width="50"><?php echo __('Attributes'); ?></th>*/ ?>
<th width="40"><?php echo __('Null'); ?></th>
<th width="70"><?php echo __('Default'); ?></th>
<?php /* <th width="50"><?php echo __('Extra'); ?></th>*/ ?>
<?php
if ($have_rel) {
echo ' <th>' . __('Links to') . '</th>' . "\n";
}
echo ' <th>' . __('Comments') . '</th>' . "\n";
if ($cfgRelation['mimework']) {
echo ' <th>MIME</th>' . "\n";
}
?>
</tr>
<?php
$odd_row = true;
foreach ($columns as $row) {
if ($row['Null'] == '') {
$row['Null'] = 'NO';
}
$extracted_columnspec
= PMA_Util::extractColumnSpec($row['Type']);
// reformat mysql query output
// set or enum types: slashes single quotes inside options
if ('set' == $extracted_columnspec['type'] || 'enum' == $extracted_columnspec['type']) {
$type_nowrap = '';
} else {
$type_nowrap = ' class="nowrap"';
}
$type = htmlspecialchars($extracted_columnspec['print_type']);
$attribute = $extracted_columnspec['attribute'];
if (! isset($row['Default'])) {
if ($row['Null'] != 'NO') {
$row['Default'] = '<i>NULL</i>';
}
} else {
$row['Default'] = htmlspecialchars($row['Default']);
}
$field_name = $row['Field'];
if (PMA_MYSQL_INT_VERSION < 50025
&& ! empty($analyzed_sql[0]['create_table_fields'][$field_name]['type'])
&& $analyzed_sql[0]['create_table_fields'][$field_name]['type'] == 'TIMESTAMP'
&& $analyzed_sql[0]['create_table_fields'][$field_name]['timestamp_not_null']
) {
// here, we have a TIMESTAMP that SHOW FULL COLUMNS reports as having the
// NULL attribute, but SHOW CREATE TABLE says the contrary. Believe
// the latter.
/**
* @todo merge this logic with the one in tbl_structure.php
* or move it in a function similar to PMA_DBI_get_columns_full()
* but based on SHOW CREATE TABLE because information_schema
* cannot be trusted in this case (MySQL bug)
*/
$row['Null'] = 'NO';
}
?>
<tr class="<?php echo $odd_row ? 'odd' : 'even'; $odd_row = ! $odd_row; ?>">
<td class="nowrap">
<?php
if (isset($pk_array[$row['Field']])) {
echo '<u>' . htmlspecialchars($field_name) . '</u>';
} else {
echo htmlspecialchars($field_name);
}
?>
</td>
<td<?php echo $type_nowrap; ?> lang="en" dir="ltr"><?php echo $type; ?></td>
<?php /* <td<?php echo $type_nowrap; ?>><?php echo $attribute; ?></td>*/ ?>
<td><?php echo (($row['Null'] == 'NO') ? __('No') : __('Yes')); ?></td>
<td class="nowrap"><?php
if (isset($row['Default'])) {
echo $row['Default'];
}
?></td>
<?php /* <td<?php echo $type_nowrap; ?>><?php echo $row['Extra']; ?></td>*/ ?>
<?php
if ($have_rel) {
echo ' <td>';
if (isset($res_rel[$field_name])) {
echo htmlspecialchars($res_rel[$field_name]['foreign_table'] . ' -> ' . $res_rel[$field_name]['foreign_field']);
}
echo '</td>' . "\n";
}
echo ' <td>';
if (isset($comments[$field_name])) {
echo htmlspecialchars($comments[$field_name]);
}
echo '</td>' . "\n";
if ($cfgRelation['mimework']) {
$mime_map = PMA_getMIME($db, $table, true);
echo ' <td>';
if (isset($mime_map[$field_name])) {
echo htmlspecialchars(str_replace('_', '/', $mime_map[$field_name]['mimetype']));
}
echo '</td>' . "\n";
}
?>
</tr>
<?php
} // end foreach
$count++;
?>
</table>
<?php
// display indexes information
if (count(PMA_Index::getFromTable($table, $db)) > 0) {
echo PMA_Index::getView($table, $db, true);
}
?>
</div>
<?php
} //ends main while
/**
* Displays the footer
*/
echo PMA_Util::getButton();
?>

View File

@ -0,0 +1,26 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Events management.
*
* @package PhpMyAdmin
*/
/**
* Include required files
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/Util.class.php';
/**
* Include all other files
*/
require_once 'libraries/rte/rte_events.lib.php';
/**
* Do the magic
*/
$_PMA_RTE = 'EVN';
require_once 'libraries/rte/rte_main.inc.php';
?>

View File

@ -0,0 +1,90 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* dumps a database
*
* @package PhpMyAdmin
*/
/**
* Gets some core libraries
*/
require_once 'libraries/common.inc.php';
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('export.js');
// $sub_part is also used in db_info.inc.php to see if we are coming from
// db_export.php, in which case we don't obey $cfg['MaxTableList']
$sub_part = '_export';
require_once 'libraries/db_common.inc.php';
$url_query .= '&amp;goto=db_export.php';
require_once 'libraries/db_info.inc.php';
/**
* Displays the form
*/
$export_page_title = __('View dump (schema) of database');
// exit if no tables in db found
if ($num_tables < 1) {
PMA_Message::error(__('No tables found in database.'))->display();
exit;
} // end if
$multi_values = '<div>';
$multi_values .= '<a href="#"';
$multi_values .= ' onclick="setSelectOptions(\'dump\', \'table_select[]\', true); return false;">';
$multi_values .= __('Select All');
$multi_values .= '</a>';
$multi_values .= ' / ';
$multi_values .= '<a href="#"';
$multi_values .= ' onclick="setSelectOptions(\'dump\', \'table_select[]\', false); return false;">';
$multi_values .= __('Unselect All');
$multi_values .= '</a><br />';
$multi_values .= '<select name="table_select[]" id="table_select" size="10" multiple="multiple">';
$multi_values .= "\n";
if (!empty($selected_tbl) && empty($table_select)) {
$table_select = $selected_tbl;
}
// Check if the selected tables are defined in $_GET
// (from clicking Back button on export.php)
if (isset($_GET['table_select'])) {
$_GET['table_select'] = urldecode($_GET['table_select']);
$_GET['table_select'] = explode(",", $_GET['table_select']);
}
foreach ($tables as $each_table) {
if (isset($_GET['table_select'])) {
if (in_array($each_table['Name'], $_GET['table_select'])) {
$is_selected = ' selected="selected"';
} else {
$is_selected = '';
}
} elseif (isset($table_select)) {
if (in_array($each_table['Name'], $table_select)) {
$is_selected = ' selected="selected"';
} else {
$is_selected = '';
}
} else {
$is_selected = ' selected="selected"';
}
$table_html = htmlspecialchars($each_table['Name']);
$multi_values .= ' <option value="' . $table_html . '"'
. $is_selected . '>'
. str_replace(' ', '&nbsp;', $table_html) . '</option>' . "\n";
} // end for
$multi_values .= "\n";
$multi_values .= '</select></div>';
$export_type = 'database';
require_once 'libraries/display_export.lib.php';
?>

View File

@ -0,0 +1,28 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
*
* @package PhpMyAdmin
*/
/**
*
*/
require_once 'libraries/common.inc.php';
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('import.js');
/**
* Gets tables informations and displays top links
*/
require 'libraries/db_common.inc.php';
require 'libraries/db_info.inc.php';
$import_type = 'database';
require 'libraries/display_import.lib.php';
?>

View File

@ -0,0 +1,294 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* handles miscellaneous db operations:
* - move/rename
* - copy
* - changing collation
* - changing comment
* - adding tables
* - viewing PDF schemas
*
* @package PhpMyAdmin
*/
/**
* requirements
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/mysql_charsets.lib.php';
/**
* functions implementation for this script
*/
require_once 'libraries/operations.lib.php';
// add a javascript file for jQuery functions to handle Ajax actions
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('db_operations.js');
/**
* Rename/move or copy database
*/
if (strlen($db)
&& (! empty($_REQUEST['db_rename']) || ! empty($_REQUEST['db_copy']))
) {
if (! empty($_REQUEST['db_rename'])) {
$move = true;
} else {
$move = false;
}
if (! isset($_REQUEST['newname']) || ! strlen($_REQUEST['newname'])) {
$message = PMA_Message::error(__('The database name is empty!'));
} else {
$sql_query = ''; // in case target db exists
$_error = false;
if ($move
|| (isset($_REQUEST['create_database_before_copying'])
&& $_REQUEST['create_database_before_copying'])
) {
$sql_query = PMA_getSqlQueryAndCreateDbBeforeCopy();
}
// here I don't use DELIMITER because it's not part of the
// language; I have to send each statement one by one
// to avoid selecting alternatively the current and new db
// we would need to modify the CREATE definitions to qualify
// the db name
PMA_runProcedureAndFunctionDefinitions($db);
// go back to current db, just in case
PMA_DBI_select_db($db);
$tables_full = PMA_DBI_get_tables_full($db);
include_once "libraries/plugin_interface.lib.php";
// remove all foreign key constraints, otherwise we can get errors
$export_sql_plugin = PMA_getPlugin(
"export",
"sql",
'libraries/plugins/export/',
array(
'single_table' => isset($single_table),
'export_type' => 'database'
)
);
$GLOBALS['sql_constraints_query_full_db']
= PMA_getSqlConstraintsQueryForFullDb(
$tables_full, $export_sql_plugin, $move, $db
);
$views = PMA_getViewsAndCreateSqlViewStandIn(
$tables_full, $export_sql_plugin, $db
);
list($sql_query, $_error) = PMA_getSqlQueryForCopyTable(
$tables_full, $sql_query, $move, $db
);
// handle the views
if (! $_error) {
$_error = PMA_handleTheViews($views, $move, $db);
}
unset($views);
// now that all tables exist, create all the accumulated constraints
if (! $_error && count($GLOBALS['sql_constraints_query_full_db']) > 0) {
PMA_createAllAccumulatedConstraints();
}
if (! PMA_DRIZZLE && PMA_MYSQL_INT_VERSION >= 50100) {
// here DELIMITER is not used because it's not part of the
// language; each statement is sent one by one
PMA_runEventDefinitionsForDb($db);
}
// go back to current db, just in case
PMA_DBI_select_db($db);
// Duplicate the bookmarks for this db (done once for each db)
PMA_duplicateBookmarks($_error, $db);
if (! $_error && $move) {
/**
* cleanup pmadb stuff for this db
*/
include_once 'libraries/relation_cleanup.lib.php';
PMA_relationsCleanupDatabase($db);
// if someday the RENAME DATABASE reappears, do not DROP
$local_query = 'DROP DATABASE ' . PMA_Util::backquote($db) . ';';
$sql_query .= "\n" . $local_query;
PMA_DBI_query($local_query);
$message = PMA_Message::success(__('Database %1$s has been renamed to %2$s'));
$message->addParam($db);
$message->addParam($_REQUEST['newname']);
} elseif (! $_error) {
$message = PMA_Message::success(__('Database %1$s has been copied to %2$s'));
$message->addParam($db);
$message->addParam($_REQUEST['newname']);
}
$reload = true;
/* Change database to be used */
if (! $_error && $move) {
$db = $_REQUEST['newname'];
} elseif (! $_error) {
if (isset($_REQUEST['switch_to_new'])
&& $_REQUEST['switch_to_new'] == 'true'
) {
$GLOBALS['PMA_Config']->setCookie('pma_switch_to_new', 'true');
$db = $_REQUEST['newname'];
} else {
$GLOBALS['PMA_Config']->setCookie('pma_switch_to_new', '');
}
}
if ($_error && ! isset($message)) {
$message = PMA_Message::error();
}
}
/**
* Database has been successfully renamed/moved. If in an Ajax request,
* generate the output with {@link PMA_Response} and exit
*/
if ($GLOBALS['is_ajax_request'] == true) {
$response = PMA_Response::getInstance();
$response->isSuccess($message->isSuccess());
$response->addJSON('message', $message);
$response->addJSON('newname', $_REQUEST['newname']);
$response->addJSON(
'sql_query',
PMA_Util::getMessage(null, $sql_query)
);
$response->addJSON('db', $db);
exit;
}
}
/**
* Settings for relations stuff
*/
$cfgRelation = PMA_getRelationsParam();
/**
* Check if comments were updated
* (must be done before displaying the menu tabs)
*/
if (isset($_REQUEST['comment'])) {
PMA_setDbComment($db, $_REQUEST['comment']);
}
/**
* Prepares the tables list if the user where not redirected to this script
* because there is no table in the database ($is_info is true)
*/
if (empty($is_info)) {
include 'libraries/db_common.inc.php';
$url_query .= '&amp;goto=db_operations.php';
// Gets the database structure
$sub_part = '_structure';
include 'libraries/db_info.inc.php';
echo "\n";
if (isset($message)) {
echo PMA_Util::getMessage($message, $sql_query);
unset($message);
}
}
$_REQUEST['db_collation'] = PMA_getDbCollation($db);
$is_information_schema = PMA_is_system_schema($db);
if (!$is_information_schema) {
if ($cfgRelation['commwork']) {
/**
* database comment
*/
$response->addHTML(PMA_getHtmlForDatabaseComment($db));
}
$response->addHTML('<div class="operations_half_width">');
ob_start();
include 'libraries/display_create_table.lib.php';
$content = ob_get_contents();
ob_end_clean();
$response->addHTML($content);
$response->addHTML('</div>');
/**
* rename database
*/
if ($db != 'mysql') {
$response->addHTML(PMA_getHtmlForRenameDatabase($db));
}
// Drop link if allowed
// Don't even try to drop information_schema.
// You won't be able to. Believe me. You won't.
// Don't allow to easily drop mysql database, RFE #1327514.
if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase'])
&& ! $db_is_information_schema
&& (PMA_DRIZZLE || $db != 'mysql')
) {
$response->addHTML(PMA_getHtmlForDropDatabaseLink($db));
}
/**
* Copy database
*/
$response->addHTML(PMA_getHtmlForCopyDatabase($db));
/**
* Change database charset
*/
$response->addHTML(PMA_getHtmlForChangeDatabaseCharset($db, $table));
if ($num_tables > 0
&& ! $cfgRelation['allworks']
&& $cfg['PmaNoRelation_DisableWarning'] == false
) {
$message = PMA_Message::notice(
__('The phpMyAdmin configuration storage has been deactivated. To find out why click %shere%s.')
);
$message->addParam(
'<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $url_query . '">',
false
);
$message->addParam('</a>', false);
/* Show error if user has configured something, notice elsewhere */
if (!empty($cfg['Servers'][$server]['pmadb'])) {
$message->isError(true);
}
$response->addHTML('<div class="operations_full_width">');
$response->addHTML($message->getDisplay());
$response->addHTML('</div>');
} // end if
} // end if (!$is_information_schema)
// not sure about displaying the PDF dialog in case db is information_schema
if ($cfgRelation['pdfwork'] && $num_tables > 0) {
// We only show this if we find something in the new pdf_pages table
$test_query = '
SELECT *
FROM ' . PMA_Util::backquote($GLOBALS['cfgRelation']['db'])
. '.' . PMA_Util::backquote($cfgRelation['pdf_pages']) . '
WHERE db_name = \'' . PMA_Util::sqlAddSlashes($db) . '\'';
$test_rs = PMA_queryAsControlUser($test_query, null, PMA_DBI_QUERY_STORE);
/*
* Export Relational Schema View
*/
$response->addHTML(PMA_getHtmlForExportRelationalSchemaView($url_query));
} // end if
?>

View File

@ -0,0 +1,252 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
*
* @package PhpMyAdmin
*/
/**
*
*/
require_once 'libraries/common.inc.php';
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$header->enablePrintView();
PMA_Util::checkParameters(array('db'));
/**
* Defines the url to return to in case of error in a sql statement
*/
$err_url = 'db_sql.php?' . PMA_generate_common_url($db);
/**
* Settings for relations stuff
*/
$cfgRelation = PMA_getRelationsParam();
/**
* Gets the list of the table in the current db and informations about these
* tables if possible
*
* @todo merge this speedup _optionaly_ into PMA_DBI_get_tables_full()
*
// speedup view on locked tables
// Special speedup for newer MySQL Versions (in 4.0 format changed)
if ($cfg['SkipLockedTables'] == true) {
$result = PMA_DBI_query('SHOW OPEN TABLES FROM ' . PMA_Util::backquote($db) . ';');
// Blending out tables in use
if ($result != false && PMA_DBI_num_rows($result) > 0) {
while ($tmp = PMA_DBI_fetch_row($result)) {
// if in use memorize tablename
if (preg_match('@in_use=[1-9]+@i', $tmp[0])) {
$sot_cache[$tmp[0]] = true;
}
}
PMA_DBI_free_result($result);
if (isset($sot_cache)) {
$result = PMA_DBI_query('SHOW TABLES FROM ' . PMA_Util::backquote($db) . ';', null, PMA_DBI_QUERY_STORE);
if ($result != false && PMA_DBI_num_rows($result) > 0) {
while ($tmp = PMA_DBI_fetch_row($result)) {
if (! isset($sot_cache[$tmp[0]])) {
$sts_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_Util::backquote($db) . ' LIKE \'' . sqlAddSlashes($tmp[0], true) . '\';');
$sts_tmp = PMA_DBI_fetch_assoc($sts_result);
$tables[] = $sts_tmp;
} else { // table in use
$tables[] = array('Name' => $tmp[0]);
}
}
PMA_DBI_free_result($result);
$sot_ready = true;
}
}
unset($tmp, $result);
}
}
if (! isset($sot_ready)) {
$result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_Util::backquote($db) . ';');
if (PMA_DBI_num_rows($result) > 0) {
while ($sts_tmp = PMA_DBI_fetch_assoc($result)) {
$tables[] = $sts_tmp;
}
PMA_DBI_free_result($result);
unset($res);
}
}
*/
/**
* If there is at least one table, displays the printer friendly view, else
* an error message
*/
$tables = PMA_DBI_get_tables_full($db);
$num_tables = count($tables);
echo '<br />';
// 1. No table
if ($num_tables == 0) {
echo __('No tables found in database.');
} else {
// 2. Shows table information
?>
<table>
<thead>
<tr>
<th><?php echo __('Table'); ?></th>
<th><?php echo __('Rows'); ?></th>
<th><?php echo __('Type'); ?></th>
<?php
if ($cfg['ShowStats']) {
echo '<th>' . __('Size') . '</th>';
}
?>
<th><?php echo __('Comments'); ?></th>
</tr>
</thead>
<tbody>
<?php
$sum_entries = $sum_size = 0;
$odd_row = true;
foreach ($tables as $sts_data) {
if (PMA_Table::isMerge($db, $sts_data['TABLE_NAME'])
|| strtoupper($sts_data['ENGINE']) == 'FEDERATED'
) {
$merged_size = true;
} else {
$merged_size = false;
}
$sum_entries += $sts_data['TABLE_ROWS'];
?>
<tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>">
<th>
<?php echo htmlspecialchars($sts_data['TABLE_NAME']); ?>
</th>
<?php
if (isset($sts_data['TABLE_ROWS'])) {
?>
<td class="right">
<?php
if ($merged_size) {
echo '<i>' . PMA_Util::formatNumber($sts_data['TABLE_ROWS'], 0) . '</i>' . "\n";
} else {
echo PMA_Util::formatNumber($sts_data['TABLE_ROWS'], 0) . "\n";
}
?>
</td>
<td class="nowrap">
<?php echo $sts_data['ENGINE']; ?>
</td>
<?php
if ($cfg['ShowStats']) {
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
$sum_size += $tblsize;
list($formated_size, $unit)
= PMA_Util::formatByteDown($tblsize, 3, 1);
?>
<td class="right nowrap">
<?php echo $formated_size . ' ' . $unit; ?>
</td>
<?php
} // end if
} else {
?>
<td colspan="3" class="center">
<?php echo __('in use'); ?>
</td>
<?php
}
?>
<td>
<?php
if (! empty($sts_data['Comment'])) {
echo htmlspecialchars($sts_data['Comment']);
$needs_break = '<br />';
} else {
$needs_break = '';
}
if (! empty($sts_data['Create_time'])
|| ! empty($sts_data['Update_time'])
|| ! empty($sts_data['Check_time'])
) {
echo $needs_break;
?>
<table width="100%">
<?php
if (! empty($sts_data['Create_time'])) {
?>
<tr>
<td class="right"><?php echo __('Creation') . ': '; ?></td>
<td class="right"><?php echo PMA_Util::localisedDate(strtotime($sts_data['Create_time'])); ?></td>
</tr>
<?php
}
if (! empty($sts_data['Update_time'])) {
?>
<tr>
<td class="right"><?php echo __('Last update') . ': '; ?></td>
<td class="right"><?php echo PMA_Util::localisedDate(strtotime($sts_data['Update_time'])); ?></td>
</tr>
<?php
}
if (! empty($sts_data['Check_time'])) {
?>
<tr>
<td class="right"><?php echo __('Last check') . ': '; ?></td>
<td class="right"><?php echo PMA_Util::localisedDate(strtotime($sts_data['Check_time'])); ?></td>
</tr>
<?php
}
?>
</table>
<?php
}
?>
</td>
</tr>
<?php
}
?>
<tr>
<th class="center">
<?php echo sprintf(_ngettext('%s table', '%s tables', $num_tables), PMA_Util::formatNumber($num_tables, 0)); ?>
</th>
<th class="right nowrap">
<?php echo PMA_Util::formatNumber($sum_entries, 0); ?>
</th>
<th class="center">
--
</th>
<?php
if ($cfg['ShowStats']) {
list($sum_formated, $unit)
= PMA_Util::formatByteDown($sum_size, 3, 1);
?>
<th class="right nowrap">
<?php echo $sum_formated . ' ' . $unit; ?>
</th>
<?php
}
?>
<th></th>
</tr>
</tbody>
</table>
<?php
}
/**
* Displays the footer
*/
echo PMA_Util::getButton();
echo "<div id='PMA_disable_floating_menubar'></div>\n";
?>

View File

@ -0,0 +1,68 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* query by example the whole database
*
* @package PhpMyAdmin
*/
/**
* requirements
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/DBQbe.class.php';
$response = PMA_Response::getInstance();
// Gets the relation settings
$cfgRelation = PMA_getRelationsParam();
/**
* A query has been submitted -> (maybe) execute it
*/
$message_to_display = false;
if (isset($_REQUEST['submit_sql']) && ! empty($sql_query)) {
if (! preg_match('@^SELECT@i', $sql_query)) {
$message_to_display = true;
} else {
$goto = 'db_sql.php';
include 'sql.php';
exit;
}
}
$sub_part = '_qbe';
require 'libraries/db_common.inc.php';
$url_query .= '&amp;goto=db_qbe.php';
$url_params['goto'] = 'db_qbe.php';
require 'libraries/db_info.inc.php';
if ($message_to_display) {
PMA_Message::error(__('You have to choose at least one column to display'))->display();
}
unset($message_to_display);
// create new qbe search instance
$db_qbe = new PMA_DBQbe($GLOBALS['db']);
/**
* Displays the Query by example form
*/
if ($cfgRelation['designerwork']) {
$url = 'pmd_general.php' . PMA_generate_common_url(
array_merge(
$url_params,
array('query' => 1)
)
);
$response->addHTML(
PMA_Message::notice(
sprintf(
__('Switch to %svisual builder%s'),
'<a href="' . $url . '">',
'</a>'
)
)
);
}
$response->addHTML($db_qbe->getSelectionForm($cfgRelation));
?>

View File

@ -0,0 +1,27 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Routines management.
*
* @package PhpMyAdmin
*/
/**
* Include required files
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/Util.class.php';
require_once 'libraries/mysql_charsets.lib.php';
/**
* Include all other files
*/
require_once 'libraries/rte/rte_routines.lib.php';
/**
* Do the magic
*/
$_PMA_RTE = 'RTN';
require_once 'libraries/rte/rte_main.inc.php';
?>

View File

@ -0,0 +1,57 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* searchs the entire database
*
* @todo make use of UNION when searching multiple tables
* @todo display executed query, optional?
* @package PhpMyAdmin
*/
/**
* Gets some core libraries
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/DbSearch.class.php';
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('db_search.js');
$scripts->addFile('sql.js');
$scripts->addFile('makegrid.js');
$scripts->addFile('jquery/jquery-ui-timepicker-addon.js');
require 'libraries/db_common.inc.php';
// If config variable $GLOBALS['cfg']['Usedbsearch'] is on false : exit.
if (! $GLOBALS['cfg']['UseDbSearch']) {
PMA_Util::mysqlDie(
__('Access denied'), '', false, $err_url
);
} // end if
$url_query .= '&amp;goto=db_search.php';
$url_params['goto'] = 'db_search.php';
// Create a database search instance
$db_search = new PMA_DbSearch($GLOBALS['db']);
// Display top links if we are not in an Ajax request
if ( $GLOBALS['is_ajax_request'] != true) {
include 'libraries/db_info.inc.php';
}
$response->addHTML('<div id="searchresults">');
// Main search form has been submitted, get results
if (isset($_REQUEST['submit_search'])) {
$response->addHTML($db_search->getSearchResults());
}
// If we are in an Ajax request, we need to exit after displaying all the HTML
if ($GLOBALS['is_ajax_request'] == true && empty($_REQUEST['ajax_page_request'])) {
exit;
}
// Display the search form
$response->addHTML($db_search->getSelectionForm($url_params));
?>

View File

@ -0,0 +1,65 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
*
* @package PhpMyAdmin
*/
/**
*
*/
require_once 'libraries/common.inc.php';
/**
* Runs common work
*/
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('functions.js');
$scripts->addFile('makegrid.js');
$scripts->addFile('sql.js');
require 'libraries/db_common.inc.php';
require_once 'libraries/sql_query_form.lib.php';
// After a syntax error, we return to this script
// with the typed query in the textarea.
$goto = 'db_sql.php';
$back = 'db_sql.php';
/**
* Sets globals from $_GET
*/
$get_params = array(
'db_query_force'
);
foreach ($get_params as $one_get_param) {
if (isset($_GET[$one_get_param])) {
$GLOBALS[$one_get_param] = $_GET[$one_get_param];
}
}
/**
* Gets informations about the database and, if it is empty, move to the
* "db_structure.php" script where table can be created
*/
require 'libraries/db_info.inc.php';
if ($num_tables == 0 && empty($db_query_force)) {
$sub_part = '';
$is_info = true;
include 'db_structure.php';
exit();
}
/**
* Query box, bookmark, insert data from textfile
*/
PMA_sqlQueryForm(
true, false,
isset($_REQUEST['delimiter']) ? htmlspecialchars($_REQUEST['delimiter']) : ';'
);
?>

View File

@ -0,0 +1,335 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
*
* @package PhpMyAdmin
*/
/**
*
*/
require_once 'libraries/common.inc.php';
/**
* Function implementations for this script
*/
require_once 'libraries/structure.lib.php';
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('db_structure.js');
$scripts->addFile('tbl_change.js');
$scripts->addFile('jquery/jquery-ui-timepicker-addon.js');
$post_params = array(
'error',
'is_info',
'message',
'mult_btn',
'selected_tbl',
'submit_mult'
);
foreach ($post_params as $one_post_param) {
if (isset($_POST[$one_post_param])) {
$GLOBALS[$one_post_param] = $_POST[$one_post_param];
}
}
/**
* Prepares the tables list if the user where not redirected to this script
* because there is no table in the database ($is_info is true)
*/
if (empty($_POST['is_info'])) {
// Drops/deletes/etc. multiple tables if required
if ((!empty($_POST['submit_mult']) && isset($_POST['selected_tbl']))
|| isset($_POST['mult_btn'])
) {
$action = 'db_structure.php';
$err_url = 'db_structure.php?'. PMA_generate_common_url($db);
// see bug #2794840; in this case, code path is:
// db_structure.php -> libraries/mult_submits.inc.php -> sql.php
// -> db_structure.php and if we got an error on the multi submit,
// we must display it here and not call again mult_submits.inc.php
if (! isset($_POST['error']) || false === $_POST['error']) {
include 'libraries/mult_submits.inc.php';
}
if (empty($_POST['message'])) {
$_POST['message'] = PMA_Message::success();
}
}
include 'libraries/db_common.inc.php';
$url_query .= '&amp;goto=db_structure.php';
// Gets the database structure
$sub_part = '_structure';
include 'libraries/db_info.inc.php';
if (!PMA_DRIZZLE) {
include_once 'libraries/replication.inc.php';
} else {
$server_slave_status = false;
}
}
require_once 'libraries/bookmark.lib.php';
require_once 'libraries/mysql_charsets.lib.php';
$db_collation = PMA_getDbCollation($db);
$titles = PMA_Util::buildActionTitles();
// 1. No tables
if ($num_tables == 0) {
$response->addHTML(
'<p>' . __('No tables found in database') . '</p>' . "\n"
);
if (empty($db_is_information_schema)) {
ob_start();
include 'libraries/display_create_table.lib.php';
$content = ob_get_contents();
ob_end_clean();
$response->addHTML($content);
unset($content);
} // end if (Create Table dialog)
exit;
}
// else
// 2. Shows table informations
/**
* Displays the tables list
*/
$response->addHTML('<div id="tableslistcontainer">');
$_url_params = array(
'pos' => $pos,
'db' => $db);
// Add the sort options if they exists
if (isset($_REQUEST['sort'])) {
$_url_params['sort'] = $_REQUEST['sort'];
}
if (isset($_REQUEST['sort_order'])) {
$_url_params['sort_order'] = $_REQUEST['sort_order'];
}
$response->addHTML(
PMA_Util::getListNavigator(
$total_num_tables, $pos, $_url_params, 'db_structure.php',
'frame_content', $GLOBALS['cfg']['MaxTableList']
)
);
// tables form
$response->addHTML(
'<form method="post" action="db_structure.php" '
. 'name="tablesForm" id="tablesForm">'
);
$response->addHTML(PMA_generate_common_hidden_inputs($db));
$response->addHTML(
PMA_TableHeader($db_is_information_schema, $server_slave_status)
);
$i = $sum_entries = 0;
$overhead_check = '';
$create_time_all = '';
$update_time_all = '';
$check_time_all = '';
$num_columns = $cfg['PropertiesNumColumns'] > 1
? ceil($num_tables / $cfg['PropertiesNumColumns']) + 1
: 0;
$row_count = 0;
$sum_size = (double) 0;
$overhead_size = (double) 0;
$hidden_fields = array();
$odd_row = true;
$sum_row_count_pre = '';
foreach ($tables as $keyname => $current_table) {
// Get valid statistics whatever is the table type
$drop_query = '';
$drop_message = '';
$overhead = '';
$table_is_view = false;
$table_encoded = urlencode($current_table['TABLE_NAME']);
// Sets parameters for links
$tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
// do not list the previous table's size info for a view
list($current_table, $formatted_size, $unit, $formatted_overhead,
$overhead_unit, $overhead_size, $table_is_view, $sum_size)
= PMA_getStuffForEngineTypeTable(
$current_table, $db_is_information_schema,
$is_show_stats, $table_is_view, $sum_size, $overhead_size
);
if (! PMA_Table::isMerge($db, $current_table['TABLE_NAME'])) {
$sum_entries += $current_table['TABLE_ROWS'];
}
if (isset($current_table['Collation'])) {
$collation = '<dfn title="'
. PMA_getCollationDescr($current_table['Collation']) . '">'
. $current_table['Collation'] . '</dfn>';
} else {
$collation = '---';
}
if ($is_show_stats) {
if ($formatted_overhead != '') {
$overhead = '<a href="tbl_structure.php?'
. $tbl_url_query . '#showusage">'
. '<span>' . $formatted_overhead . '</span>'
. '<span class="unit">' . $overhead_unit . '</span>'
. '</a>' . "\n";
$overhead_check .=
"markAllRows('row_tbl_" . ($i + 1) . "');";
} else {
$overhead = '-';
}
} // end if
unset($showtable);
if ($GLOBALS['cfg']['ShowDbStructureCreation']) {
list($create_time, $create_time_all) = PMA_getTimeForCreateUpdateCheck(
$current_table, 'Create_time', $create_time_all
);
}
if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']) {
// $showtable might already be set from ShowDbStructureCreation, see above
list($update_time, $update_time_all) = PMA_getTimeForCreateUpdateCheck(
$current_table, 'Update_time', $update_time_all
);
}
if ($GLOBALS['cfg']['ShowDbStructureLastCheck']) {
// $showtable might already be set from ShowDbStructureCreation, see above
list($check_time, $check_time_all) = PMA_getTimeForCreateUpdateCheck(
$current_table, 'Check_time', $check_time_all
);
}
list($alias, $truename) = PMA_getAliasAndTrueName(
$tooltip_aliasname, $current_table, $tooltip_truename
);
$i++;
$row_count++;
if ($table_is_view) {
$hidden_fields[] = '<input type="hidden" name="views[]" value="'
. htmlspecialchars($current_table['TABLE_NAME']) . '" />';
}
/*
* Always activate links for Browse, Search and Empty, even if
* the icons are greyed, because
* 1. for views, we don't know the number of rows at this point
* 2. for tables, another source could have populated them since the
* page was generated
*
* I could have used the PHP ternary conditional operator but I find
* the code easier to read without this operator.
*/
list($browse_table, $search_table, $browse_table_label, $empty_table,
$tracking_icon) = PMA_getHtmlForActionLinks(
$current_table, $table_is_view, $tbl_url_query,
$titles, $truename, $db_is_information_schema, $url_query
);
if (! $db_is_information_schema) {
list($drop_query, $drop_message)
= PMA_getTableDropQueryAndMessage($table_is_view, $current_table);
}
if ($num_columns > 0
&& $num_tables > $num_columns
&& ($row_count % $num_columns) == 0
) {
$row_count = 1;
$odd_row = true;
$response->addHTML(
'</tr></tbody></table>'
);
$response->addHTML(PMA_TableHeader(false, $server_slave_status));
}
list($do, $ignored) = PMA_getServerSlaveStatus(
$server_slave_status, $truename
);
list($html_output, $odd_row) = PMA_getHtmlForStructureTableRow(
$i, $odd_row, $table_is_view, $current_table,
$browse_table_label, $tracking_icon, $server_slave_status,
$browse_table, $tbl_url_query, $search_table, $db_is_information_schema,
$titles, $empty_table, $drop_query, $drop_message, $collation,
$formatted_size, $unit, $overhead,
(isset ($create_time) ? $create_time : ''),
(isset ($update_time) ? $update_time : ''),
(isset ($check_time) ? $check_time : ''),
$is_show_stats, $ignored, $do, $colspan_for_structure
);
$response->addHTML($html_output);
} // end foreach
// Show Summary
$response->addHTML('</tbody>');
$response->addHTML(
PMA_getHtmlBodyForTableSummary(
$num_tables, $server_slave_status, $db_is_information_schema, $sum_entries,
$db_collation, $is_show_stats, $sum_size, $overhead_size, $create_time_all,
$update_time_all, $check_time_all, $sum_row_count_pre
)
);
$response->addHTML('</table>');
//check all
$response->addHTML(
PMA_getHtmlForCheckAllTables(
$pmaThemeImage, $text_dir, $overhead_check,
$db_is_information_schema, $hidden_fields
)
);
$response->addHTML('</form>'); //end of form
// display again the table list navigator
$response->addHTML(
PMA_Util::getListNavigator(
$total_num_tables, $pos, $_url_params, 'db_structure.php',
'frame_content', $GLOBALS['cfg']['MaxTableList']
)
);
$response->addHTML('</div><hr />');
/**
* Work on the database
*/
/* DATABASE WORK */
/* Printable view of a table */
$response->addHTML(
PMA_getHtmlForTablePrintViewLink($url_query)
. PMA_getHtmlForDataDictionaryLink($url_query)
);
if (empty($db_is_information_schema)) {
ob_start();
include 'libraries/display_create_table.lib.php';
$content = ob_get_contents();
ob_end_clean();
$response->addHTML($content);
} // end if (Create Table dialog)
?>

View File

@ -0,0 +1,249 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* @package PhpMyAdmin
*/
/**
* Run common work
*/
require_once 'libraries/common.inc.php';
//Get some js files needed for Ajax requests
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('db_structure.js');
/**
* If we are not in an Ajax request, then do the common work and show the links etc.
*/
require 'libraries/db_common.inc.php';
$url_query .= '&amp;goto=tbl_tracking.php&amp;back=db_tracking.php';
// Get the database structure
$sub_part = '_structure';
require 'libraries/db_info.inc.php';
// Work to do?
// (here, do not use $_REQUEST['db] as it can be crafted)
if (isset($_REQUEST['delete_tracking']) && isset($_REQUEST['table'])) {
PMA_Tracker::deleteTracking($GLOBALS['db'], $_REQUEST['table']);
/**
* If in an Ajax request, generate the success message and use
* {@link PMA_Response()} to send the output
*/
if ($GLOBALS['is_ajax_request'] == true) {
$response = PMA_Response::getInstance();
$response->addJSON('message', PMA_Message::success());
exit;
}
}
// Get tracked data about the database
$data = PMA_Tracker::getTrackedData($_REQUEST['db'], '', '1');
// No tables present and no log exist
if ($num_tables == 0 && count($data['ddlog']) == 0) {
echo '<p>' . __('No tables found in database.') . '</p>' . "\n";
if (empty($db_is_information_schema)) {
include 'libraries/display_create_table.lib.php';
}
exit;
}
// ---------------------------------------------------------------------------
// Prepare statement to get HEAD version
$all_tables_query = ' SELECT table_name, MAX(version) as version FROM ' .
PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb']) . '.' .
PMA_Util::backquote($GLOBALS['cfg']['Server']['tracking']) .
' WHERE db_name = \'' . PMA_Util::sqlAddSlashes($_REQUEST['db']) . '\' ' .
' GROUP BY table_name' .
' ORDER BY table_name ASC';
$all_tables_result = PMA_queryAsControlUser($all_tables_query);
// If a HEAD version exists
if (PMA_DBI_num_rows($all_tables_result) > 0) {
?>
<div id="tracked_tables">
<h3><?php echo __('Tracked tables');?></h3>
<table id="versions" class="data">
<thead>
<tr>
<th><?php echo __('Database');?></th>
<th><?php echo __('Table');?></th>
<th><?php echo __('Last version');?></th>
<th><?php echo __('Created');?></th>
<th><?php echo __('Updated');?></th>
<th><?php echo __('Status');?></th>
<th><?php echo __('Action');?></th>
<th><?php echo __('Show');?></th>
</tr>
</thead>
<tbody>
<?php
// Print out information about versions
$drop_image_or_text = '';
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
$drop_image_or_text .= PMA_Util::getImage(
'b_drop.png',
__('Delete tracking data for this table')
);
}
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('text', 'both')
)
) {
$drop_image_or_text .= __('Drop');
}
$style = 'odd';
while ($one_result = PMA_DBI_fetch_array($all_tables_result)) {
list($table_name, $version_number) = $one_result;
$table_query = ' SELECT * FROM ' .
PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb']) . '.' .
PMA_Util::backquote($GLOBALS['cfg']['Server']['tracking']) .
' WHERE `db_name` = \'' . PMA_Util::sqlAddSlashes($_REQUEST['db'])
. '\' AND `table_name` = \'' . PMA_Util::sqlAddSlashes($table_name)
. '\' AND `version` = \'' . $version_number . '\'';
$table_result = PMA_queryAsControlUser($table_query);
$version_data = PMA_DBI_fetch_array($table_result);
if ($version_data['tracking_active'] == 1) {
$version_status = __('active');
} else {
$version_status = __('not active');
}
$tmp_link = 'tbl_tracking.php?' . $url_query . '&amp;table='
. htmlspecialchars($version_data['table_name']);
$delete_link = 'db_tracking.php?' . $url_query . '&amp;table='
. htmlspecialchars($version_data['table_name'])
. '&amp;delete_tracking=true&amp';
?>
<tr class="noclick <?php echo $style;?>">
<td><?php echo htmlspecialchars($version_data['db_name']);?></td>
<td><?php echo htmlspecialchars($version_data['table_name']);?></td>
<td><?php echo $version_data['version'];?></td>
<td><?php echo $version_data['date_created'];?></td>
<td><?php echo $version_data['date_updated'];?></td>
<td><?php echo $version_status;?></td>
<td><a class="drop_tracking_anchor ajax" href="<?php echo $delete_link;?>" ><?php echo $drop_image_or_text; ?></a></td>
<td> <a href="<?php echo $tmp_link; ?>"><?php echo __('Versions');?></a>
| <a href="<?php echo $tmp_link; ?>&amp;report=true&amp;version=<?php echo $version_data['version'];?>"><?php echo __('Tracking report');?></a>
| <a href="<?php echo $tmp_link; ?>&amp;snapshot=true&amp;version=<?php echo $version_data['version'];?>"><?php echo __('Structure snapshot');?></a></td>
</tr>
<?php
if ($style == 'even') {
$style = 'odd';
} else {
$style = 'even';
}
}
unset($tmp_link);
?>
</tbody>
</table>
</div>
<?php
}
$sep = $GLOBALS['cfg']['NavigationTreeTableSeparator'];
// Get list of tables
$table_list = PMA_Util::getTableList($GLOBALS['db']);
// For each table try to get the tracking version
foreach ($table_list as $key => $value) {
// If $value is a table group.
if (array_key_exists(('is' . $sep . 'group'), $value)
&& $value['is' . $sep . 'group']
) {
foreach ($value as $temp_table) {
// If $temp_table is a table with the value for 'Name' is set,
// rather than a propery of the table group.
if (is_array($temp_table)
&& array_key_exists('Name', $temp_table)
) {
$tracking_version = PMA_Tracker::getVersion(
$GLOBALS['db'],
$temp_table['Name']
);
if ($tracking_version == -1) {
$my_tables[] = $temp_table['Name'];
}
}
}
} else { // If $value is a table.
if (PMA_Tracker::getVersion($GLOBALS['db'], $value['Name']) == -1) {
$my_tables[] = $value['Name'];
}
}
}
// If untracked tables exist
if (isset($my_tables)) {
?>
<h3><?php echo __('Untracked tables');?></h3>
<table id="noversions" class="data">
<thead>
<tr>
<th style="width: 300px"><?php echo __('Table');?></th>
<th></th>
</tr>
</thead>
<tbody>
<?php
// Print out list of untracked tables
$style = 'odd';
foreach ($my_tables as $key => $tablename) {
if (PMA_Tracker::getVersion($GLOBALS['db'], $tablename) == -1) {
$my_link = '<a href="tbl_tracking.php?' . $url_query
. '&amp;table=' . htmlspecialchars($tablename) .'">';
$my_link .= PMA_Util::getIcon('eye.png', __('Track table'));
$my_link .= '</a>';
?>
<tr class="noclick <?php echo $style;?>">
<td><?php echo htmlspecialchars($tablename);?></td>
<td><?php echo $my_link;?></td>
</tr>
<?php
if ($style == 'even') {
$style = 'odd';
} else {
$style = 'even';
}
}
}
?>
</tbody>
</table>
<?php
}
// If available print out database log
if (count($data['ddlog']) > 0) {
$log = '';
foreach ($data['ddlog'] as $entry) {
$log .= '# ' . $entry['date'] . ' ' . $entry['username'] . "\n"
. $entry['statement'] . "\n";
}
echo PMA_Util::getMessage(__('Database Log'), $log);
}
?>

View File

@ -0,0 +1,25 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Triggers management.
*
* @package PhpMyAdmin
*/
/**
* Include required files
*/
require_once 'libraries/common.inc.php';
/**
* Include all other files
*/
require_once 'libraries/rte/rte_triggers.lib.php';
/**
* Do the magic
*/
$_PMA_RTE = 'TRI';
require_once 'libraries/rte/rte_main.inc.php';
?>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,30 @@
.. _copyright:
Copyright
=========
.. code-block:: none
Copyright (C) 1998-2000 Tobias Ratschiller <tobias_at_ratschiller.com>
Copyright (C) 2001-2013 Marc Delisle <marc_at_infomarc.info>
Olivier Müller <om_at_omnis.ch>
Robin Johnson <robbat2_at_users.sourceforge.net>
Alexander M. Turek <me_at_derrabus.de>
Michal Čihař <michal_at_cihar.com>
Garvin Hicking <me_at_supergarv.de>
Michael Keck <mkkeck_at_users.sourceforge.net>
Sebastian Mendel <cybot_tm_at_users.sourceforge.net>
[check credits for more details]
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see `http://www.gnu.org/licenses/
<http://www.gnu.org/licenses/>`_.

View File

@ -0,0 +1,597 @@
.. _credits:
Credits
=======
Credits, in chronological order
+++++++++++++++++++++++++++++++
* Tobias Ratschiller <tobias\_at\_ratschiller.com>
* creator of the phpmyadmin project
* maintainer from 1998 to summer 2000
* Marc Delisle <marc\_at\_infomarc.info>
* multi-language version in December 1998
* various fixes and improvements
* :term:`SQL` analyser (most of it)
* current project maintainer
* Olivier Müller <om\_at\_omnis.ch>
* started SourceForge phpMyAdmin project in March 2001
* sync'ed different existing CVS trees with new features and bugfixes
* multi-language improvements, dynamic language selection
* many bugfixes and improvements
* Loïc Chapeaux <lolo\_at\_phpheaven.net>
* rewrote and optimized javascript, DHTML and DOM stuff
* rewrote the scripts so they fit the :term:`PEAR` coding standards and
generate XHTML1.0 and CSS2 compliant codes
* improved the language detection system
* many bugfixes and improvements
* Robin Johnson <robbat2\_at\_users.sourceforge.net>
* database maintenance controls
* table type code
* Host authentication :term:`IP` Allow/Deny
* DB-based configuration (Not completed)
* :term:`SQL` parser and pretty-printer
* :term:`SQL` validator
* many bugfixes and improvements
* Armel Fauveau <armel.fauveau\_at\_globalis-ms.com>
* bookmarks feature
* multiple dump feature
* gzip dump feature
* zip dump feature
* Geert Lund <glund\_at\_silversoft.dk>
* various fixes
* moderator of the phpMyAdmin former users forum at phpwizard.net
* Korakot Chaovavanich <korakot\_at\_iname.com>
* "insert as new row" feature
* Pete Kelly <webmaster\_at\_trafficg.com>
* rewrote and fix dump code
* bugfixes
* Steve Alberty <alberty\_at\_neptunlabs.de>
* rewrote dump code for PHP4
* mySQL table statistics
* bugfixes
* Benjamin Gandon <gandon\_at\_isia.cma.fr>
* main author of the version 2.1.0.1
* bugfixes
* Alexander M. Turek <me\_at\_derrabus.de>
* MySQL 4.0 / 4.1 / 5.0 compatibility
* abstract database interface (PMA\_DBI) with MySQLi support
* privileges administration
* :term:`XML` exports
* various features and fixes
* German language file updates
* Mike Beck <mike.beck\_at\_web.de>
* automatic joins in QBE
* links column in printview
* Relation view
* Michal Čihař <michal\_at\_cihar.com>
* enhanced index creation/display feature
* feature to use a different charset for HTML than for MySQL
* improvements of export feature
* various features and fixes
* Czech language file updates
* Christophe Gesché from the "MySQL Form Generator for PHPMyAdmin"
(http://sf.net/projects/phpmysqlformgen/)
* suggested the patch for multiple table printviews
* Garvin Hicking <me\_at\_supergarv.de>
* built the patch for vertical display of table rows
* built the Javascript based Query window + :term:`SQL` history
* Improvement of column/db comments
* (MIME)-Transformations for columns
* Use custom alias names for Databases in left frame
* hierarchical/nested table display
* :term:`PDF`-scratchboard for WYSIWYG-
distribution of :term:`PDF` relations
* new icon sets
* vertical display of column properties page
* some bugfixes, features, support, German language additions
* Yukihiro Kawada <kawada\_at\_den.fujifilm.co.jp>
* japanese kanji encoding conversion feature
* Piotr Roszatycki <d3xter\_at\_users.sourceforge.net> and Dan Wilson
* the Cookie authentication mode
* Axel Sander <n8falke\_at\_users.sourceforge.net>
* table relation-links feature
* Maxime Delorme <delorme.maxime\_at\_free.fr>
* :term:`PDF` schema output, thanks also to
Olivier Plathey for the "FPDF" library (see <http://www.fpdf.org/>), Steven
Wittens for the "UFPDF" library (see <http://www.acko.net/node/56>) and
Nicola Asuni for the "TCPDF" library (see <http://www.tcpdf.org/>).
* Olof Edlund <olof.edlund\_at\_upright.se>
* :term:`SQL` validator server
* Ivan R. Lanin <ivanlanin\_at\_users.sourceforge.net>
* phpMyAdmin logo (until June 2004)
* Mike Cochrane <mike\_at\_graftonhall.co.nz>
* blowfish library from the Horde project (withdrawn in release 4.0)
* Marcel Tschopp <ne0x\_at\_users.sourceforge.net>
* mysqli support
* many bugfixes and improvements
* Nicola Asuni (Tecnick.com)
* TCPDF library (`http://www.tcpdf.org <http://www.tcpdf.org>`_)
* Michael Keck <mkkeck\_at\_users.sourceforge.net>
* redesign for 2.6.0
* phpMyAdmin sailboat logo (June 2004)
* Mathias Landhäußer
* Representation at conferences
* Sebastian Mendel <cybot\_tm\_at\_users.sourceforge.net>
* interface improvements
* various bugfixes
* Ivan A Kirillov
* new relations Designer
* Raj Kissu Rajandran (Google Summer of Code 2008)
* BLOBstreaming support (withdrawn in release 4.0)
* Piotr Przybylski (Google Summer of Code 2008, 2010 and 2011)
* improved setup script
* user preferences
* Drizzle support
* Derek Schaefer (Google Summer of Code 2009)
* Improved the import system
* Alexander Rutkowski (Google Summer of Code 2009)
* Tracking mechanism
* Zahra Naeem (Google Summer of Code 2009)
* Synchronization feature (removed in release 4.0)
* Tomáš Srnka (Google Summer of Code 2009)
* Replication support
* Muhammad Adnan (Google Summer of Code 2010)
* Relation schema export to multiple formats
* Lori Lee (Google Summer of Code 2010)
* User interface improvements
* ENUM/SET editor
* Simplified interface for export/import
* Ninad Pundalik (Google Summer of Code 2010)
* AJAXifying the interface
* Martynas Mickevičius (Google Summer of Code 2010)
* Charts
* Barrie Leslie
* BLOBstreaming support with PBMS PHP extension (withdrawn in release
4.0)
* Ankit Gupta (Google Summer of Code 2010)
* Visual query builder
* Madhura Jayaratne (Google Summer of Code 2011)
* OpenGIS support
* Ammar Yasir (Google Summer of Code 2011)
* Zoom search
* Aris Feryanto (Google Summer of Code 2011)
* Browse-mode improvements
* Thilanka Kaushalya (Google Summer of Code 2011)
* AJAXification
* Tyron Madlener (Google Summer of Code 2011)
* Query statistics and charts for the status page
* Zarubin Stas (Google Summer of Code 2011)
* Automated testing
* Rouslan Placella (Google Summer of Code 2011 and 2012)
* Improved support for Stored Routines, Triggers and Events
* Italian translation updates
* Removal of frames, new navigation
* Dieter Adriaenssens
* Various bugfixes
* Dutch translation updates
* Alex Marin (Google Summer of Code 2012)
* New plugins and properties system
* Thilina Buddika Abeyrathna (Google Summer of Code 2012)
* Refactoring
* Atul Pratap Singh (Google Summer of Code 2012)
* Refactoring
* Chanaka Indrajith (Google Summer of Code 2012)
* Refactoring
* Yasitha Pandithawatta (Google Summer of Code 2012)
* Automated testing
* Jim Wigginton (phpseclib.sourceforge.net)
* phpseclib
And also to the following people who have contributed minor changes,
enhancements, bugfixes or support for a new language since version
2.1.0:
Bora Alioglu, Ricardo ?, Sven-Erik Andersen, Alessandro Astarita,
Péter Bakondy, Borges Botelho, Olivier Bussier, Neil Darlow, Mats
Engstrom, Ian Davidson, Laurent Dhima, Kristof Hamann, Thomas Kläger,
Lubos Klokner, Martin Marconcini, Girish Nair, David Nordenberg,
Andreas Pauley, Bernard M. Piller, Laurent Haas, "Sakamoto", Yuval
Sarna, www.securereality.com.au, Alexis Soulard, Alvar Soome, Siu Sun,
Peter Svec, Michael Tacelosky, Rachim Tamsjadi, Kositer Uros, Luís V.,
Martijn W. van der Lee, Algis Vainauskas, Daniel Villanueva, Vinay,
Ignacio Vazquez-Abrams, Chee Wai, Jakub Wilk, Thomas Michael
Winningham, Vilius Zigmantas, "Manuzhai".
Translators
+++++++++++
Following people have contributed to translation of phpMyAdmin:
* Arabic
* Abdullah Al-Saedi <abdullah.10\_at\_windowslive.com>
* Bulgarian
* stoyanster <stoyanster\_at\_gmail.com>
* Catalan
* Xavier Navarro <xvnavarro\_at\_gmail.com>
* Czech
* Michal Čihař <michal\_at\_cihar.com>
* Danish
* opensource <opensource\_at\_jth.net>
* Jørgen Thomsen <opensource\_at\_jth.net>
* German
* mrbendig <mrbendig\_at\_mrbendig.com>
* torsten.funck <torsten.funck\_at\_googlemail.com>
* Sven Strickroth <email\_at\_cs-ware.de>
* typo3 <typo3\_at\_dirk-weise.de>
* Jo Michael <me\_at\_mynetx.net>
* Greek
* Panagiotis Papazoglou <papaz_p\_at\_yahoo.com>
* English (United Kingdom)
* Robert Readman <robert_readman\_at\_hotmail.com>
* Spanish
* Matías Bellone <matiasbellone\_at\_gmail.com>
* French
* Marc Delisle <marc\_at\_infomarc.info>
* Hindi
* u4663530 <u4663530\_at\_anu.edu.au>
* rsedwardian <rsedwardian\_at\_gmail.com>
* Hungarian
* gergo314 <gergo314\_at\_gmail.com>
* Italian
* Rouslan Placella <rouslan\_at\_placella.com>
* Japanese
* Yuichiro <yuichiro\_at\_pop07.odn.ne.jp>
* Lithuanian
* Kęstutis <forkik\_at\_gmail.com>
* Norwegian Bokmål
* Sven-Erik Andersen <sven.erik.andersen\_at\_gmail.com>
* Dutch
* Dieter Adriaenssens <ruleant\_at\_users.sourceforge.net>
* Herman van Rink <rink\_at\_initfour.nl>
* Polish
* Stanisław Krukowski <stankruk\_at\_neostrada.pl>
* Marcin Kozioł <lord_dark\_at\_wp.pl>
* Portuguese
* JoaoTMDias <contacto\_at\_joaodias.me>
* Portuguese (Brazil)
* wiltave <wiltave\_at\_gmail.com>
* emerson4br <emerson4br\_at\_gmail.com>
* Romanian
* alexukf <alex.ukf\_at\_gmail.com>
* Russian
* Victor Volkov <hanut\_at\_php-myadmin.ru>
* Sinhala
* Madhura Jayaratne <madhura.cj\_at\_gmail.com>
* Slovak
* Martin Lacina <martin\_at\_whistler.sk>
* Slovenian
* Domen <dbc334\_at\_gmail.com>
* Swedish
* stefan <stefan\_at\_inkopsforum.se>
* Tamil
* ysajeepan <ysajeepan\_at\_live.com>
* Telugu
* veeven <veeven\_at\_gmail.com>
* Thai
* kanitchet <kanichet\_at\_hotmail.com>
* Turkish
* Burak Yavuz <hitowerdigit\_at\_hotmail.com>
* Uighur
* gheni <gheni\_at\_yahoo.cn>
* Ukrainian
* typim <duke3d\_at\_ukr.net>
* oleg-ilnytskyi <ukraine.oleg\_at\_gmail.com>
* Urdu
* Mehbooob Khan <mehboobbugti\_at\_gmail.com>
* Simplified Chinese
* shanyan baishui <Siramizu\_at\_gmail.com>
* Traditional Chinese
* star <star\_at\_origin.club.tw>
Documentation translators
+++++++++++++++++++++++++
Following people have contributed to translation of phpMyAdmin documentation:
* Czech
* Michal Čihař <michal\_at\_cihar.com>
* Greek
* Panagiotis Papazoglou <papaz_p\_at\_yahoo.com>
* English (United Kingdom)
* Robert Readman <robert_readman\_at\_hotmail.com>
* French
* Cédric Corazza <cedric.corazza\_at\_wanadoo.fr>
* Japanese
* Yuichiro Takahashi <yuichiro\_at\_pop07.odn.ne.jp>
* Polish
* Stanisław Krukowski <stankruk\_at\_neostrada.pl>
* Portuguese (Brazil)
* mjaning <mjaning\_at\_gmail.com>
* Slovenian
* Domen <dbc334\_at\_gmail.com>
Original Credits of Version 2.1.0
+++++++++++++++++++++++++++++++++
This work is based on Peter Kuppelwieser's MySQL-Webadmin. It was his
idea to create a web-based interface to MySQL using PHP3. Although I
have not used any of his source-code, there are some concepts I've
borrowed from him. phpMyAdmin was created because Peter told me he
wasn't going to further develop his (great) tool.
Thanks go to
* Amalesh Kempf <ak-lsml\_at\_living-source.com> who contributed the
code for the check when dropping a table or database. He also
suggested that you should be able to specify the primary key on
tbl\_create.php3. To version 1.1.1 he contributed the ldi\_\*.php3-set
(Import text-files) as well as a bug-report. Plus many smaller
improvements.
* Jan Legenhausen <jan\_at\_nrw.net>: He made many of the changes that
were introduced in 1.3.0 (including quite significant ones like the
authentication). For 1.4.1 he enhanced the table-dump feature. Plus
bug-fixes and help.
* Marc Delisle <DelislMa\_at\_CollegeSherbrooke.qc.ca> made phpMyAdmin
language-independent by outsourcing the strings to a separate file. He
also contributed the French translation.
* Alexandr Bravo <abravo\_at\_hq.admiral.ru> who contributed
tbl\_select.php3, a feature to display only some columns from a table.
* Chris Jackson <chrisj\_at\_ctel.net> added support for MySQL functions
in tbl\_change.php3. He also added the "Query by Example" feature in
2.0.
* Dave Walton <walton\_at\_nordicdms.com> added support for multiple
servers and is a regular contributor for bug-fixes.
* Gabriel Ash <ga244\_at\_is8.nyu.edu> contributed the random access
features for 2.0.6.
The following people have contributed minor changes, enhancements,
bugfixes or support for a new language:
Jim Kraai, Jordi Bruguera, Miquel Obrador, Geert Lund, Thomas
Kleemann, Alexander Leidinger, Kiko Albiol, Daniel C. Chao, Pavel
Piankov, Sascha Kettler, Joe Pruett, Renato Lins, Mark Kronsbein,
Jannis Hermanns, G. Wieggers.
And thanks to everyone else who sent me email with suggestions, bug-
reports and or just some feedback.

View File

@ -0,0 +1,12 @@
.. _developers:
Developers Information
======================
phpMyAdmin is Open Source, so you're invited to contribute to it. Many
great features have been written by other people and you too can help
to make phpMyAdmin a useful tool.
You can check out all the possibilities to contribute in the
`contribute section on our website
<https://www.phpmyadmin.net/contribute/>`_.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,406 @@
.. _glossary:
Glossary
========
From Wikipedia, the free encyclopedia
.. glossary::
.htaccess
the default name of Apache's directory-level configuration file.
.. seealso:: <http://www.wikipedia.org/wiki/.htaccess>
ACL
Access Contol List
Blowfish
a keyed, symmetric block cipher, designed in 1993 by Bruce Schneier.
.. seealso:: <http://www.wikipedia.org/wiki/Blowfish_(cipher)>
Browser
a software application that enables a user to display and interact with text, images, and other information typically located on a web page at a website on the World Wide Web.
.. seealso:: <http://en.wikipedia.org/wiki/Web_browser>
bzip2
a free software/open source data compression algorithm and program developed by Julian Seward.
.. seealso:: <http://www.wikipedia.org/wiki/Bzip2>
CGI
Common Gateway Interface is an important World Wide Web technology that
enables a client web browser to request data from a program executed on
the Web server.
.. seealso:: <http://www.wikipedia.org/wiki/CGI>
Changelog
a log or record of changes made to a project.
.. seealso:: <http://www.wikipedia.org/wiki/Changelog>
Client
a computer system that accesses a (remote) service on another computer by some kind of network.
.. seealso:: <http://www.wikipedia.org/wiki/Client_(computing)>
column
a set of data values of a particular simple type, one for each row of the table.
.. seealso:: <http://www.wikipedia.org/wiki/Column_(database)>
Cookie
a packet of information sent by a server to a World Wide Web browser and then sent back by the browser each time it accesses that server.
.. seealso:: <http://www.wikipedia.org/wiki/HTTP_cookie>
CSV
Comma- separated values
.. seealso:: <http://www.wikipedia.org/wiki/Comma-separated_values>
DB
look at :term:`database`
database
an organized collection of data.
.. seealso:: <http://www.wikipedia.org/wiki/Database>
Engine
look at :term:`storage engines`
extension
a PHP module that extends PHP with additional functionality.
.. seealso:: <http://www.wikipedia.org/wiki/extension>
FAQ
Frequently Asked Questions is a list of commonly asked question and there
answers.
.. seealso:: <http://www.wikipedia.org/wiki/FAQ>
Field
one part of divided data/columns.
.. seealso:: <http://www.wikipedia.org/wiki/Field_(computer_science)>
foreign key
a column or group of columns in a database row that point to a key column
or group of columns forming a key of another database row in some
(usually different) table.
.. seealso:: <http://www.wikipedia.org/wiki/Foreign_key>
FPDF
the free :term:`PDF` library
.. seealso:: <http://www.fpdf.org/>
GD
Graphics Library by Thomas Boutell and others for dynamically manipulating images.
.. seealso:: <http://www.wikipedia.org/wiki/GD_Graphics_Library>
GD2
look at :term:`gd`
gzip
gzip is short for GNU zip, a GNU free software file compression program.
.. seealso:: <http://www.wikipedia.org/wiki/Gzip>
host
any machine connected to a computer network, a node that has a hostname.
.. seealso:: <http://www.wikipedia.org/wiki/Host>
hostname
the unique name by which a network attached device is known on a network.
.. seealso:: <http://www.wikipedia.org/wiki/Hostname>
HTTP
HyperText Transfer Protocol is the primary method used to transfer or
convey information on the World Wide Web.
.. seealso:: <http://www.wikipedia.org/wiki/HyperText_Transfer_Protocol>
https
a :term:`HTTP`-connection with additional security measures.
.. seealso:: <http://www.wikipedia.org/wiki/Https:_URI_scheme>
IEC
International Electrotechnical Commission
IIS
Internet Information Services is a set of Internet-based services for
servers using Microsoft Windows.
.. seealso:: <http://www.wikipedia.org/wiki/Internet_Information_Services>
Index
a feature that allows quick access to the rows in a table.
.. seealso:: <http://www.wikipedia.org/wiki/Index_(database)>
IP
Internet Protocol is a data-oriented protocol used by source and
destination hosts for communicating data across a packet-switched
internetwork.
.. seealso:: <http://www.wikipedia.org/wiki/Internet_Protocol>
IP Address
a unique number that devices use in order to identify and communicate with each other on a network utilizing the Internet Protocol standard.
.. seealso:: <http://www.wikipedia.org/wiki/IP_Address>
IPv6
IPv6 (Internet Protocol version 6) is the latest revision of the
Internet Protocol (:term:`IP`), designed to deal with the
long-anticipated problem of its precedessor IPv4 running out of addresses.
.. seealso:: <http://www.wikipedia.org/wiki/IPv6>
ISAPI
Internet Server Application Programming Interface is the API of Internet Information Services (IIS).
.. seealso:: <http://www.wikipedia.org/wiki/ISAPI>
ISP
Internet service provider is a business or organization that offers users
access to the Internet and related services.
.. seealso:: <http://www.wikipedia.org/wiki/ISP>
ISO
International Standards Organisation
JPEG
a most commonly used standard method of lossy compression for photographic images.
.. seealso:: <http://www.wikipedia.org/wiki/JPEG>
JPG
look at :term:`jpeg`
Key
look at :term:`index`
LATEX
a document preparation system for the TEX typesetting program.
.. seealso:: <http://www.wikipedia.org/wiki/LaTeX>
Mac
Apple Macintosh is line of personal computers is designed, developed, manufactured, and marketed by Apple Computer.
.. seealso:: <http://www.wikipedia.org/wiki/Mac>
Mac OS X
the operating system which is included with all currently shipping Apple Macintosh computers in the consumer and professional markets.
.. seealso:: <http://www.wikipedia.org/wiki/Mac_OS_X>
MCrypt
a cryptographic library.
.. seealso:: <http://www.wikipedia.org/wiki/MCrypt>
mcrypt
the MCrypt PHP extension.
.. seealso:: <http://php.net/mcrypt>
MIME
Multipurpose Internet Mail Extensions is
an Internet Standard for the format of e-mail.
.. seealso:: <http://www.wikipedia.org/wiki/MIME>
module
some sort of extension for the Apache Webserver.
.. seealso:: <http://www.wikipedia.org/wiki/module>
MySQL
a multithreaded, multi-user, SQL (Structured Query Language) Database Management System (DBMS).
.. seealso:: <http://www.wikipedia.org/wiki/MySQL>
mysqli
the improved MySQL client PHP extension.
.. seealso:: <http://php.net/mysqli>
mysql
the MySQL client PHP extension.
.. seealso:: <http://php.net/mysql>
OpenDocument
open standard for office documents.
.. seealso:: <http://www.wikipedia.org/wiki/OpenDocument>
OS X
look at :term:`Mac OS X`.
.. seealso:: <http://www.wikipedia.org/wiki/OS_X>
PDF
Portable Document Format is a file format developed by Adobe Systems for
representing two dimensional documents in a device independent and
resolution independent format.
.. seealso:: <http://www.wikipedia.org/wiki/Portable_Document_Format>
PEAR
the PHP Extension and Application Repository.
.. seealso:: <http://pear.php.net/>
PCRE
Perl Compatible Regular Expressions is the perl-compatible regular
expression functions for PHP
.. seealso:: <http://php.net/pcre>
PHP
short for "PHP: Hypertext Preprocessor", is an open-source, reflective
programming language used mainly for developing server-side applications
and dynamic web content, and more recently, a broader range of software
applications.
.. seealso:: <http://www.wikipedia.org/wiki/PHP>
port
a connection through which data is sent and received.
.. seealso:: <http://www.wikipedia.org/wiki/Port_(computing)>
RFC
Request for Comments (RFC) documents are a series of memoranda
encompassing new research, innovations, and methodologies applicable to
Internet technologies.
.. seealso:: <http://www.wikipedia.org/wiki/Request_for_Comments>
RFC 1952
GZIP file format specification version 4.3
.. seealso:: :rfc:`1952`
Row (record, tuple)
represents a single, implicitly structured data item in a table.
.. seealso:: <http://www.wikipedia.org/wiki/Row_(database)>
Server
a computer system that provides services to other computing systems over a network.
.. seealso:: <http://www.wikipedia.org/wiki/Server_(computing)>
Storage Engines
handlers for different table types
.. seealso:: <http://dev.mysql.com/doc/en/storage-engines.html>
SOAP
Simple Object Access Protocol is a protocol specification for exchanging
structured information in the implementation of Web Services in computer
networks.
.. seealso:: <http://en.wikipedia.org/wiki/SOAP>
socket
a form of inter-process communication.
.. seealso:: <http://www.wikipedia.org/wiki/Socket#Computer_sockets>
SSL
Secure Sockets Layer is a cryptographic protocol which provides secure
communication on the Internet.
.. seealso:: <http://www.wikipedia.org/wiki/Secure_Sockets_Layer>
Stored procedure
a subroutine available to applications accessing a relational database system
.. seealso:: <http://en.wikipedia.org/wiki/Stored_procedure>
SQL
Structured Query Language
.. seealso:: <http://www.wikipedia.org/wiki/SQL>
table
a set of data elements (cells) that is organized, defined and stored as
horizontal rows and vertical columns where each item can be uniquely
identified by a label or key or by it?s position in relation to other
items.
.. seealso:: <http://www.wikipedia.org/wiki/Table_(database)>
tar
a type of archive file format: the Tape ARchive format.
.. seealso:: <http://www.wikipedia.org/wiki/Tar_(file_format)>
TCP
Transmission Control Protocol is one of the core protocols of the
Internet protocol suite.
.. seealso:: <http://www.wikipedia.org/wiki/TCP>
TCPDF
Rewrite of :term:`UFPDF` with various improvements.
.. seealso:: <http://www.tcpdf.org/>
trigger
a procedural code that is automatically executed in response to certain events on a particular table or view in a database
.. seealso:: <http://en.wikipedia.org/wiki/Database_trigger>
UFPDF
Unicode/UTF-8 extension for :term:`FPDF`
.. seealso:: <http://www.acko.net/node/56>
URL
Uniform Resource Locator is a sequence of characters, conforming to a
standardized format, that is used for referring to resources, such as
documents and images on the Internet, by their location.
.. seealso:: <http://www.wikipedia.org/wiki/URL>
Webserver
A computer (program) that is responsible for accepting HTTP requests from clients and serving them Web pages.
.. seealso:: <http://www.wikipedia.org/wiki/Webserver>
XML
Extensible Markup Language is a W3C-recommended general- purpose markup
language for creating special-purpose markup languages, capable of
describing many different kinds of data.
.. seealso:: <http://www.wikipedia.org/wiki/XML>
ZIP
a popular data compression and archival format.
.. seealso:: <http://www.wikipedia.org/wiki/ZIP_(file_format)>
zlib
an open-source, cross- platform data compression library by Jean-loup Gailly and Mark Adler.
.. seealso:: <http://www.wikipedia.org/wiki/Zlib>

View File

@ -0,0 +1,68 @@
.. _intro:
Introduction
============
phpMyAdmin can manage a whole MySQL server (needs a super-user) as
well as a single database. To accomplish the latter you'll need a
properly set up MySQL user who can read/write only the desired
database. It's up to you to look up the appropriate part in the MySQL
manual.
Supported features
------------------
Currently phpMyAdmin can:
* browse and drop databases, tables, views, columns and indexes
* display multiple results sets through stored procedures or queries
* create, copy, drop, rename and alter databases, tables, columns and
indexes
* maintenance server, databases and tables, with proposals on server
configuration
* execute, edit and bookmark any :term:`SQL`-statement, even batch-queries
* load text files into tables
* create [#f1]_ and read dumps of tables
* export [#f1]_ data to various formats: :term:`CSV`, :term:`XML`, :term:`PDF`,
:term:`ISO`/:term:`IEC` 26300 - :term:`OpenDocument` Text and Spreadsheet, Microsoft
Word 2000, and LATEX formats
* import data and :term:`MySQL` structures from :term:`OpenDocument` spreadsheets, as
well as :term:`XML`, :term:`CSV`, and :term:`SQL` files
* administer multiple servers
* manage MySQL users and privileges
* check referential integrity in MyISAM tables
* using Query-by-example (QBE), create complex queries automatically
connecting required tables
* create :term:`PDF` graphics of your
database layout
* search globally in a database or a subset of it
* transform stored data into any format using a set of predefined
functions, like displaying BLOB-data as image or download-link
* track changes on databases, tables and views
* support InnoDB tables and foreign keys see :ref:`faq3_6`
* support mysqli, the improved MySQL extension see :ref:`faq1_17`
* create, edit, call, export and drop stored procedures and functions
* create, edit, export and drop events and triggers
* communicate in `62 different languages
<https://www.phpmyadmin.net/home_page/translations.php>`_
A word about users
------------------
Many people have difficulty understanding the concept of user
management with regards to phpMyAdmin. When a user logs in to
phpMyAdmin, that username and password are passed directly to MySQL.
phpMyAdmin does no account management on its own (other than allowing
one to manipulate the MySQL user account information); all users must
be valid MySQL users.
.. rubric:: Footnotes
.. [#f1]
phpMyAdmin can compress (:term:`Zip`, :term:`GZip` :term:`RFC 1952` or
:term:`Bzip2` formats) dumps and :term:`CSV` exports if you use PHP with
:term:`Zlib` support (``--with-zlib``) and/or :term:`Bzip2` support
(``--with-bz2``). Proper support may also need changes in :file:`php.ini`.

View File

@ -0,0 +1,18 @@
Other sources of information
============================
Printed Book
------------
The definitive guide to using phpMyAdmin is the book Mastering phpMyAdmin for
Effective MySQL Management by Marc Delisle. You can get information on that
book and other officially endorsed `books at the phpMyAdmin site`_.
.. _books at the phpMyAdmin site: https://www.phpmyadmin.net/home_page/docs.php?books
Tutorials
---------
Third party tutorials and articles are listed on our `wiki page`_.
.. _wiki page: https://wiki.phpmyadmin.net/pma/Articles

View File

@ -0,0 +1,50 @@
User management
===============
User management is the process of controlling which users are allowed to
connect to the MySQL server and what permissions they have on each database.
phpMyAdmin does not handle user management, rather it passes the username and
password on to MySQL, which then determines whether a user is permitted to
perform a particular action. Within phpMyAdmin, administrators have full
control over creating users, viewing and editing privileges for existing users,
and removing users.
Within phpMyAdmin, user management is controlled via the :guilabel:`Users` link
from the main page. Users can be created, edited, and removed.
Creating a new user
-------------------
To create a new user, click the :guilabel:`Add a new user` link near the bottom
of the :guilabel:`Users` page (you must be a "superuser", e.g., user "root").
Use the textboxes and drop-downs to configure the user to your particular
needs. You can then select whether to create a database for that user and grant
specific global privileges. Once you've created the user (by clicking Go), you
can define that user's permissions on a specific database (don't grant global
privileges in that case). In general, users do not need any global privileges
(other than USAGE), only permissions for their specific database.
Editing an existing user
------------------------
To edit an existing user, simply click the pencil icon to the right of that
user in the :guilabel:`Users` page. You can then edit their global- and
database-specific privileges, change their password, or even copy those
privileges to a new user.
Deleting a user
---------------
From the :guilabel:`Users` page, check the checkbox for the user you wish to
remove, select whether or not to also remove any databases of the same name (if
they exist), and click Go.
Assigning privileges to user for a specific database
----------------------------------------------------
Users are assigned to databases by editing the user record (from the
:guilabel:`Users` link on the home page) not from within the :guilabel:`Users`
link under the table. If you are creating a user specifically for a given table
you will have to create the user first (with no global privileges) and then go
back and edit that user to add the table and privileges for the individual
table.

View File

@ -0,0 +1,54 @@
.. _require:
Requirements
============
Web server
----------
Since, phpMyAdmin's interface is based entirely in your browser, you'll need a
web server (such as Apache, :term:`IIS`) to install phpMyAdmin's files into.
PHP
---
* You need PHP 5.2.0 or newer, with ``session`` support, the Standard PHP Library
(SPL) extension, JSON support, and the ``mbstring`` extension.
* To support uploading of ZIP files, you need the PHP ``zip`` extension.
* You need GD2 support in PHP to display inline thumbnails of JPEGs
("image/jpeg: inline") with their original aspect ratio.
* When using the cookie authentication (the default), the `mcrypt
<http://www.php.net/mcrypt>`_ extension is strongly suggested for most
users and is **required** for 64bit machines. Not using mcrypt will
cause phpMyAdmin to load pages significantly slower.
* To support upload progress bars, see :ref:`faq2_9`.
* To support XML and Open Document Spreadsheet importing, you need PHP
5.2.17 or newer and the `libxml <http://www.php.net/libxml>`_
extension.
* Performance suggestion: install the ``ctype`` extension.
.. seealso:: :ref:`faq1_31`, :ref:`authentication_modes`
Database
--------
phpMyAdmin support MySQL compatible databases.
* MySQL 5.0 or newer
* MariaDB 5.0 or newer
* Drizzle
.. seealso:: :ref:`faq1_17`
Web browser
-----------
To access phpMyAdmin you need a web browser with cookies and javascript
enabled.

View File

@ -0,0 +1,360 @@
.. _setup:
Installation
============
phpMyAdmin does not apply any special security methods to the MySQL
database server. It is still the system administrator's job to grant
permissions on the MySQL databases properly. phpMyAdmin's :guilabel:`Users`
page can be used for this.
.. warning::
:term:`Mac` users should note that if you are on a version before
:term:`Mac OS X`, StuffIt unstuffs with :term:`Mac` formats. So you'll have
to resave as in BBEdit to Unix style ALL phpMyAdmin scripts before
uploading them to your server, as PHP seems not to like :term:`Mac`-style
end of lines character ("``\r``").
.. _quick_install:
Quick Install
+++++++++++++
#. Choose an appropriate distribution kit from the phpmyadmin.net
Downloads page. Some kits contain only the English messages, others
contain all languages. We'll assume you chose a kit whose name
looks like ``phpMyAdmin-x.x.x -all-languages.tar.gz``.
#. Untar or unzip the distribution (be sure to unzip the subdirectories):
``tar -xzvf phpMyAdmin_x.x.x-all-languages.tar.gz`` in your
webserver's document root. If you don't have direct access to your
document root, put the files in a directory on your local machine,
and, after step 4, transfer the directory on your web server using,
for example, ftp.
#. Ensure that all the scripts have the appropriate owner (if PHP is
running in safe mode, having some scripts with an owner different from
the owner of other scripts will be a problem). See :ref:`faq4_2` and
:ref:`faq1_26` for suggestions.
#. Now you must configure your installation. There are two methods that
can be used. Traditionally, users have hand-edited a copy of
:file:`config.inc.php`, but now a wizard-style setup script is provided
for those who prefer a graphical installation. Creating a
:file:`config.inc.php` is still a quick way to get started and needed for
some advanced features.
Manually creating the file
--------------------------
To manually create the file, simply use your text editor to create the
file :file:`config.inc.php` (you can copy :file:`config.sample.inc.php` to get
minimal configuration file) in the main (top-level) phpMyAdmin
directory (the one that contains :file:`index.php`). phpMyAdmin first
loads :file:`libraries/config.default.php` and then overrides those values
with anything found in :file:`config.inc.php`. If the default value is
okay for a particular setting, there is no need to include it in
:file:`config.inc.php`. You'll need a few directives to get going, a
simple configuration may look like this:
.. code-block:: php
<?php
// use here a value of your choice at least 32 chars long
$cfg['blowfish_secret'] = '1{dd0`<Q),5XP_:R9UK%%8\"EEcyH#{o';
$i=0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
?>
Or, if you prefer to not be prompted every time you log in:
.. code-block:: php
<?php
$i=0;
$i++;
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'cbb74bc'; // use here your password
$cfg['Servers'][$i]['auth_type'] = 'config';
?>
For a full explanation of possible configuration values, see the
:ref:`config` of this document.
.. index:: Setup script
.. _setup_script:
Using Setup script
------------------
Instead of manually editing :file:`config.inc.php`, you can use phpMyAdmin's
setup feature. The file can be generated using the setup and you can download it
for upload to the server.
Next, open your browser and visit the location where you installed phpMyAdmin,
with the ``/setup`` suffix. The changes are not saved to the server, you need to
use the :guilabel:`Download` button to save them to your computer and then upload
to the server.
Now the file is ready to be used. You can choose to review or edit the
file with your favorite editor, if you prefer to set some advanced
options which the setup script does not provide.
#. If you are using the ``auth_type`` "config", it is suggested that you
protect the phpMyAdmin installation directory because using config
does not require a user to enter a password to access the phpMyAdmin
installation. Use of an alternate authentication method is
recommended, for example with HTTPAUTH in a :term:`.htaccess` file or switch to using
``auth_type`` cookie or http. See the :ref:`faqmultiuser`
for additional information, especially :ref:`faq4_4`.
#. Open the `main phpMyAdmin directory <index.php>`_ in your browser.
phpMyAdmin should now display a welcome screen and your databases, or
a login dialog if using :term:`HTTP` or
cookie authentication mode.
#. You should deny access to the ``./libraries`` and ``./setup/lib``
subfolders in your webserver configuration. For Apache you can use
supplied :term:`.htaccess` file in that folder, for other webservers, you should
configure this yourself. Such configuration prevents from possible
path exposure and cross side scripting vulnerabilities that might
happen to be found in that code.
#. It is generally good idea to protect public phpMyAdmin installation
against access by robots as they usually can not do anything good
there. You can do this using ``robots.txt`` file in root of your
webserver or limit access by web server configuration, see
:ref:`faq1_42`.
.. index::
single: Configuration storage
single: phpMyAdmin configuration storage
single: pmadb
.. _linked-tables:
phpMyAdmin configuration storage
++++++++++++++++++++++++++++++++
For a whole set of new features (bookmarks, comments, :term:`SQL`-history,
tracking mechanism, :term:`PDF`-generation, column contents transformation,
etc.) you need to create a set of special tables. Those tables can be located
in your own database, or in a central database for a multi-user installation
(this database would then be accessed by the controluser, so no other user
should have rights to it).
Please look at your ``./examples/`` directory, where you should find a
file called *create\_tables.sql*. (If you are using a Windows server,
pay special attention to :ref:`faq1_23`).
If you already had this infrastructure and upgraded to MySQL 4.1.2 or
newer, please use :file:`examples/upgrade_tables_mysql_4_1_2+.sql`
and then create new tables by importing
:file:`examples/create_tables.sql`.
You can use your phpMyAdmin to create the tables for you. Please be
aware that you may need special (administrator) privileges to create
the database and tables, and that the script may need some tuning,
depending on the database name.
After having imported the :file:`examples/create_tables.sql` file, you
should specify the table names in your :file:`config.inc.php` file. The
directives used for that can be found in the :ref:`config`. You will also need to
have a controluser with the proper rights to those tables (see section
:ref:`authentication_modes` below).
.. _upgrading:
Upgrading from an older version
+++++++++++++++++++++++++++++++
Simply copy :file:`config.inc.php` from your previous installation into
the newly unpacked one. Configuration files from old versions may
require some tweaking as some options have been changed or removed.
For compatibility with PHP 6, remove a
``set_magic_quotes_runtime(0);`` statement that you might find near
the end of your configuration file.
You should **not** copy :file:`libraries/config.default.php` over
:file:`config.inc.php` because the default configuration file is version-
specific.
If you have upgraded your MySQL server from a version previous to 4.1.2 to
version 5.x or newer and if you use the phpMyAdmin configuration storage, you
should run the :term:`SQL` script found in
:file:`examples/upgrade_tables_mysql_4_1_2+.sql`.
.. index:: Authentication mode
.. _authentication_modes:
Using authentication modes
++++++++++++++++++++++++++
:term:`HTTP` and cookie authentication modes are recommended in a **multi-user
environment** where you want to give users access to their own database and
don't want them to play around with others. Nevertheless be aware that MS
Internet Explorer seems to be really buggy about cookies, at least till version
6. Even in a **single-user environment**, you might prefer to use :term:`HTTP`
or cookie mode so that your user/password pair are not in clear in the
configuration file.
:term:`HTTP` and cookie authentication
modes are more secure: the MySQL login information does not need to be
set in the phpMyAdmin configuration file (except possibly for the
:config:option:`$cfg['Servers'][$i]['controluser']`).
However, keep in mind that the password travels in plain text, unless
you are using the HTTPS protocol. In cookie mode, the password is
stored, encrypted with the blowfish algorithm, in a temporary cookie.
.. note:
This section is only applicable if your MySQL server is running
with ``--skip-show-database``.
For ':term:`HTTP`' and 'cookie' modes, phpMyAdmin needs a controluser that has
**only** the ``SELECT`` privilege on the *`mysql`.`user` (all columns except
`Password`)*, *`mysql`.`db` (all columns)*, *`mysql`.`host` (all columns)* and
*`mysql`.`tables\_priv` (all columns except `Grantor` and `Timestamp`)* tables.
You must specify the details for the controluser in the :file:`config.inc.php`
file under the :config:option:`$cfg['Servers'][$i]['controluser']` and
:config:option:`$cfg['Servers'][$i]['controlpass']` settings. The following
example assumes you want to use ``pma`` as the controluser and ``pmapass`` as
the controlpass, but **this is only an example: use something else in your
file!** Input these statements from the phpMyAdmin :term:`SQL` Query window or
mysql commandline client. Of course you have to replace ``localhost`` with the
webserver's host if it's not the same as the MySQL server's one.
If you want to use the many new relation and bookmark features: (this of
course requires that your :ref:`linked-tables` be set up).
.. code-block:: mysql
GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
GRANT SELECT (
Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,
File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,
Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,
Execute_priv, Repl_slave_priv, Repl_client_priv
) ON mysql.user TO 'pma'@'localhost';
GRANT SELECT ON mysql.db TO 'pma'@'localhost';
GRANT SELECT ON mysql.host TO 'pma'@'localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
ON mysql.tables_priv TO 'pma'@'localhost';
If you want to use the many new relation and bookmark features:
.. code-block:: mysql
GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
(this of course requires that your phpMyAdmin
configuration storage be set up).
Then each of the *true* users should be granted a set of privileges
on a set of particular databases. Normally you shouldn't give global
privileges to an ordinary user, unless you understand the impact of those
privileges (for example, you are creating a superuser).
For example, to grant the user *real_user* with all privileges on
the database *user_base*:
.. code-block:: mysql
GRANT ALL PRIVILEGES ON user_base.* TO 'real_user'@localhost IDENTIFIED BY 'real_password';
What the user may now do is controlled entirely by the MySQL user management
system. With HTTP or cookie authentication mode, you don't need to fill the
user/password fields inside the :config:option:`$cfg['Servers']`.
.. index:: pair: HTTP; Authentication mode
HTTP authentication mode
------------------------
* Uses :term:`HTTP` Basic authentication
method and allows you to log in as any valid MySQL user.
* Is supported with most PHP configurations. For :term:`IIS` (:term:`ISAPI`)
support using :term:`CGI` PHP see :ref:`faq1_32`, for using with Apache
:term:`CGI` see :ref:`faq1_35`.
* See also :ref:`faq4_4` about not using the :term:`.htaccess` mechanism along with
':term:`HTTP`' authentication mode.
.. index:: pair: Cookie; Authentication mode
.. _cookie:
Cookie authentication mode
--------------------------
* You can use this method as a replacement for the :term:`HTTP` authentication
(for example, if you're running :term:`IIS`).
* Obviously, the user must enable cookies in the browser, but this is
now a requirement for all authentication modes.
* With this mode, the user can truly log out of phpMyAdmin and log in
back with the same username.
* If you want to log in to arbitrary server see :config:option:`$cfg['AllowArbitraryServer']` directive.
* As mentioned in the :ref:`require` section, having the ``mcrypt`` extension will
speed up access considerably, but is not required.
.. index:: pair: Signon; Authentication mode
Signon authentication mode
--------------------------
* This mode is a convenient way of using credentials from another
application to authenticate to phpMyAdmin.
* The other application has to store login information into session
data.
.. seealso::
:config:option:`$cfg['Servers'][$i]['auth_type']`,
:config:option:`$cfg['Servers'][$i]['SignonSession']`,
:config:option:`$cfg['Servers'][$i]['SignonScript']`,
:config:option:`$cfg['Servers'][$i]['SignonURL']`
.. index:: pair: Config; Authentication mode
Config authentication mode
--------------------------
* This mode is the less secure one because it requires you to fill the
:config:option:`$cfg['Servers'][$i]['user']` and
:config:option:`$cfg['Servers'][$i]['password']`
fields (and as a result, anyone who can read your :file:`config.inc.php`
can discover your username and password). But you don't need to setup
a "controluser" here: using the :config:option:`$cfg['Servers'][$i]['only_db']` might be enough.
* In the :ref:`faqmultiuser` section, there is an entry explaining how
to protect your configuration file.
* For additional security in this mode, you may wish to consider the
Host authentication :config:option:`$cfg['Servers'][$i]['AllowDeny']['order']`
and :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` configuration directives.
* Unlike cookie and http, does not require a user to log in when first
loading the phpMyAdmin site. This is by design but could allow any
user to access your installation. Use of some restriction method is
suggested, perhaps a :term:`.htaccess` file with the HTTP-AUTH directive or disallowing
incoming HTTP requests at ones router or firewall will suffice (both
of which are beyond the scope of this manual but easily searchable
with Google).
Securing your phpMyAdmin installation
+++++++++++++++++++++++++++++++++++++
The phpMyAdmin team tries hardly to make the application secure, however there
are always ways to make your installation more secure:
* remove ``setup`` directory from phpMyAdmin, you will probably not
use it after initial setup
* prevent access to ``libraries`` directory from browser,
as it is not needed, supplied ``.htaccess`` file does this
* properly choose authentication method - :ref:`cookie`
is probably the best choice for shared hosting
* in case you don't want all MySQL users to be able to access
phpMyAdmin, you can use :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` to limit them
* consider hiding phpMyAdmin behind authentication proxy, so that
MySQL credentials are not all users need to login

View File

@ -0,0 +1,138 @@
.. _transformations:
Transformations
===============
.. _transformationsintro:
Introduction
++++++++++++
To enable transformations, you have to setup the ``column_info``
table and the proper directives. Please see the :ref:`config` on how to do so.
You can apply different transformations to the contents of each
column. The transformation will take the content of each column and
transform it with certain rules defined in the selected
transformation.
Say you have a column 'filename' which contains a filename. Normally
you would see in phpMyAdmin only this filename. Using transformations
you can transform that filename into a HTML link, so you can click
inside of the phpMyAdmin structure on the column's link and will see
the file displayed in a new browser window. Using transformation
options you can also specify strings to append/prepend to a string or
the format you want the output stored in.
For a general overview of all available transformations and their
options, you can consult your *<www.your-host.com>/<your-install-
dir>/transformation\_overview.php* installation.
For a tutorial on how to effectively use transformations, see our
`Link section <https://www.phpmyadmin.net/home_page/docs.php>`_ on the
official phpMyAdmin homepage.
.. _transformationshowto:
Usage
+++++
Go to your *tbl\_structure.php* page (i.e. reached through clicking on
the 'Structure' link for a table). There click on "Change" (or change
icon) and there you will see three new fields at the end of the line.
They are called 'MIME-type', 'Browser transformation' and
'Transformation options'.
* The field 'MIME-type' is a drop-down field. Select the MIME-type that
corresponds to the column's contents. Please note that transformations
are inactive as long as no MIME-type is selected.
* The field 'Browser transformation' is a drop-down field. You can
choose from a hopefully growing amount of pre-defined transformations.
See below for information on how to build your own transformation.
There are global transformations and mimetype-bound transformations.
Global transformations can be used for any mimetype. They will take
the mimetype, if necessary, into regard. Mimetype-bound
transformations usually only operate on a certain mimetype. There are
transformations which operate on the main mimetype (like 'image'),
which will most likely take the subtype into regard, and those who
only operate on a specific subtype (like 'image/jpeg'). You can use
transformations on mimetypes for which the function was not defined
for. There is no security check for you selected the right
transformation, so take care of what the output will be like.
* The field 'Transformation options' is a free-type textfield. You have
to enter transform-function specific options here. Usually the
transforms can operate with default options, but it is generally a
good idea to look up the overview to see which options are necessary.
Much like the ENUM/SET-Fields, you have to split up several options
using the format 'a','b','c',...(NOTE THE MISSING BLANKS). This is
because internally the options will be parsed as an array, leaving the
first value the first element in the array, and so forth. If you want
to specify a MIME character set you can define it in the
transformation\_options. You have to put that outside of the pre-
defined options of the specific mime-transform, as the last value of
the set. Use the format "'; charset=XXX'". If you use a transform, for
which you can specify 2 options and you want to append a character
set, enter "'first parameter','second parameter','charset=us-ascii'".
You can, however use the defaults for the parameters: "'','','charset
=us-ascii'".
.. _transformationsfiles:
File structure
++++++++++++++
All specific transformations for mimetypes are defined through class
files in the directory 'libraries/plugins/transformations/'. Each of
them extends a certain transformation abstract class declared in
libraries/plugins/transformations/abstract.
They are stored in files to ease up customization and easy adding of
new transformations.
Because the user cannot enter own mimetypes, it is kept sure that
transformations always work. It makes no sense to apply a
transformation to a mimetype the transform-function doesn't know to
handle.
There is a file called '*transformations.lib.php*' that provides some
basic functions which can be included by any other transform function.
The file name convention is ``[Mimetype]_[Subtype]_[Transformation
Name].class.php``, while the abtract class that it extends has the
name ``[Transformation Name]TransformationsPlugin``. All of the
methods that have to be implemented by a transformations plug-in are:
#. getMIMEType() and getMIMESubtype() in the main class;
#. getName(), getInfo() and applyTransformation() in the abstract class
it extends.
The getMIMEType(), getMIMESubtype() and getName() methods return the
name of the MIME type, MIME Subtype and transformation accordingly.
getInfo() returns the transformation's description and possible
options it may receive and applyTransformation() is the method that
does the actual work of the transformation plug-in.
Please see the libraries/plugins/transformations/TEMPLATE and
libraries/plugins/transformations/TEMPLATE\_ABSTRACT files for adding
your own transformation plug-in. You can also generate a new
transformation plug-in (with or without the abstract transformation
class), by using
:file:`libraries/plugins/transformations/generator_plugin.sh` or
:file:`libraries/plugins/transformations/generator_main_class.sh`.
The applyTransformation() method always gets passed three variables:
#. **$buffer** - Contains the text inside of the column. This is the
text, you want to transform.
#. **$options** - Contains any user-passed options to a transform
function as an array.
#. **$meta** - Contains an object with information about your column. The
data is drawn from the output of the `mysql\_fetch\_field()
<http://www.php.net/mysql_fetch_field>`_ function. This means, all
object properties described on the `manual page
<http://www.php.net/mysql_fetch_field>`_ are available in this
variable and can be used to transform a column accordingly to
unsigned/zerofill/not\_null/... properties. The $meta->mimetype
variable contains the original MIME-type of the column (i.e.
'text/plain', 'image/jpeg' etc.)

View File

@ -0,0 +1,9 @@
User Guide
==========
.. toctree::
:maxdepth: 2
transformations
privileges
other

View File

@ -0,0 +1,34 @@
Distributing and packaging phpMyAdmin
=====================================
This document is intended to give advices to people who want to
redistribute phpMyAdmin inside other software package such as Linux
distribution or some all in one package including web server and MySQL
server.
Generally you can customize some basic aspects (paths to some files and
behavior) in :file:`libraries/vendor_config.php`.
For example if you want setup script to generate config file in var, change
``SETUP_CONFIG_FILE`` to :file:`/var/lib/phpmyadmin/config.inc.php` and you
will also probably want to skip directory writable check, so set
``SETUP_DIR_WRITABLE`` to false.
External libraries
------------------
phpMyAdmin includes several external libraries, you might want to
replace them with system ones if they are available, but please note
that you should test whether version you provide is compatible with the
one we ship.
Currently known list of external libraries:
js/jquery
jQuery js framework and various jQuery based libraries.
libraries/php-gettext
php-gettext library
libraries/tcpdf
tcpdf library, stripped down of not needed files

View File

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 673 B

View File

@ -0,0 +1,611 @@
/*
* basic.css
* ~~~~~~~~~
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* -- main layout ----------------------------------------------------------- */
div.clearer {
clear: both;
}
/* -- relbar ---------------------------------------------------------------- */
div.related {
width: 100%;
font-size: 90%;
}
div.related h3 {
display: none;
}
div.related ul {
margin: 0;
padding: 0 0 0 10px;
list-style: none;
}
div.related li {
display: inline;
}
div.related li.right {
float: right;
margin-right: 5px;
}
/* -- sidebar --------------------------------------------------------------- */
div.sphinxsidebarwrapper {
padding: 10px 5px 0 10px;
}
div.sphinxsidebar {
float: left;
width: 230px;
margin-left: -100%;
font-size: 90%;
word-wrap: break-word;
overflow-wrap : break-word;
}
div.sphinxsidebar ul {
list-style: none;
}
div.sphinxsidebar ul ul,
div.sphinxsidebar ul.want-points {
margin-left: 20px;
list-style: square;
}
div.sphinxsidebar ul ul {
margin-top: 0;
margin-bottom: 0;
}
div.sphinxsidebar form {
margin-top: 10px;
}
div.sphinxsidebar input {
border: 1px solid #98dbcc;
font-family: sans-serif;
font-size: 1em;
}
div.sphinxsidebar #searchbox input[type="text"] {
width: 170px;
}
img {
border: 0;
max-width: 100%;
}
/* -- search page ----------------------------------------------------------- */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* -- index page ------------------------------------------------------------ */
table.contentstable {
width: 90%;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
/* -- general index --------------------------------------------------------- */
table.indextable {
width: 100%;
}
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable dl, table.indextable dd {
margin-top: 0;
margin-bottom: 0;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
div.modindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
div.genindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
/* -- general body styles --------------------------------------------------- */
div.body p, div.body dd, div.body li, div.body blockquote {
-moz-hyphens: auto;
-ms-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
a.headerlink {
visibility: hidden;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink,
caption:hover > a.headerlink,
p.caption:hover > a.headerlink,
div.code-block-caption:hover > a.headerlink {
visibility: visible;
}
div.body p.caption {
text-align: inherit;
}
div.body td {
text-align: left;
}
.field-list ul {
padding-left: 1em;
}
.first {
margin-top: 0 !important;
}
p.rubric {
margin-top: 30px;
font-weight: bold;
}
img.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-right {
text-align: right;
}
/* -- sidebars -------------------------------------------------------------- */
div.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px 7px 0 7px;
background-color: #ffe;
width: 40%;
float: right;
}
p.sidebar-title {
font-weight: bold;
}
/* -- topics ---------------------------------------------------------------- */
div.topic {
border: 1px solid #ccc;
padding: 7px 7px 0 7px;
margin: 10px 0 10px 0;
}
p.topic-title {
font-size: 1.1em;
font-weight: bold;
margin-top: 10px;
}
/* -- admonitions ----------------------------------------------------------- */
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
}
div.admonition dt {
font-weight: bold;
}
div.admonition dl {
margin-bottom: 0;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
}
div.body p.centered {
text-align: center;
margin-top: 25px;
}
/* -- tables ---------------------------------------------------------------- */
table.docutils {
border: 0;
border-collapse: collapse;
}
table caption span.caption-number {
font-style: italic;
}
table caption span.caption-text {
}
table.docutils td, table.docutils th {
padding: 1px 8px 1px 5px;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #aaa;
}
table.field-list td, table.field-list th {
border: 0 !important;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
th {
text-align: left;
padding-right: 5px;
}
table.citation {
border-left: solid 1px gray;
margin-left: 1px;
}
table.citation td {
border-bottom: none;
}
/* -- figures --------------------------------------------------------------- */
div.figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption {
padding: 0.3em;
}
div.figure p.caption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text {
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
list-style: decimal;
}
ol.loweralpha {
list-style: lower-alpha;
}
ol.upperalpha {
list-style: upper-alpha;
}
ol.lowerroman {
list-style: lower-roman;
}
ol.upperroman {
list-style: upper-roman;
}
dl {
margin-bottom: 15px;
}
dd p {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
dt:target, .highlighted {
background-color: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
.system-message {
background-color: #fda;
padding: 5px;
border: 3px solid red;
}
.footnote:target {
background-color: #ffa;
}
.line-block {
display: block;
margin-top: 1em;
margin-bottom: 1em;
}
.line-block .line-block {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em;
}
.guilabel, .menuselection {
font-family: sans-serif;
}
.accelerator {
text-decoration: underline;
}
.classifier {
font-style: oblique;
}
abbr, acronym {
border-bottom: dotted 1px;
cursor: help;
}
/* -- code displays --------------------------------------------------------- */
pre {
overflow: auto;
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
span.pre {
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
}
td.linenos pre {
padding: 5px 0px;
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
margin-left: 0.5em;
}
table.highlighttable td {
padding: 0 0.5em 0 0.5em;
}
div.code-block-caption {
padding: 2px 5px;
font-size: small;
}
div.code-block-caption code {
background-color: transparent;
}
div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
}
div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;
}
div.code-block-caption span.caption-text {
}
div.literal-block-wrapper {
padding: 1em 1em 0;
}
div.literal-block-wrapper div.highlight {
margin: 0;
}
code.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
code.descclassname {
background-color: transparent;
}
code.xref, a code {
background-color: transparent;
font-weight: bold;
}
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
background-color: transparent;
}
.viewcode-link {
float: right;
}
.viewcode-back {
float: right;
font-family: sans-serif;
}
div.viewcode-block:target {
margin: -1px -10px;
padding: 0 10px;
}
/* -- math display ---------------------------------------------------------- */
img.math {
vertical-align: middle;
}
div.body div.math p {
text-align: center;
}
span.eqno {
float: right;
}
/* -- printout stylesheet --------------------------------------------------- */
@media print {
div.document,
div.documentwrapper,
div.bodywrapper {
margin: 0 !important;
width: 100%;
}
div.sphinxsidebar,
div.related,
div.footer,
#top-link {
display: none;
}
}

View File

@ -0,0 +1,261 @@
/*
* default.css_t
* ~~~~~~~~~~~~~
*
* Sphinx stylesheet -- default theme.
*
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
body {
font-family: sans-serif;
font-size: 100%;
background-color: #11303d;
color: #000;
margin: 0;
padding: 0;
}
div.document {
background-color: #1c4e63;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 230px;
}
div.body {
background-color: #ffffff;
color: #000000;
padding: 0 20px 30px 20px;
}
div.footer {
color: #ffffff;
width: 100%;
padding: 9px 0 9px 0;
text-align: center;
font-size: 75%;
}
div.footer a {
color: #ffffff;
text-decoration: underline;
}
div.related {
background-color: #133f52;
line-height: 30px;
color: #ffffff;
}
div.related a {
color: #ffffff;
}
div.sphinxsidebar {
}
div.sphinxsidebar h3 {
font-family: 'Trebuchet MS', sans-serif;
color: #ffffff;
font-size: 1.4em;
font-weight: normal;
margin: 0;
padding: 0;
}
div.sphinxsidebar h3 a {
color: #ffffff;
}
div.sphinxsidebar h4 {
font-family: 'Trebuchet MS', sans-serif;
color: #ffffff;
font-size: 1.3em;
font-weight: normal;
margin: 5px 0 0 0;
padding: 0;
}
div.sphinxsidebar p {
color: #ffffff;
}
div.sphinxsidebar p.topless {
margin: 5px 10px 10px 10px;
}
div.sphinxsidebar ul {
margin: 10px;
padding: 0;
color: #ffffff;
}
div.sphinxsidebar a {
color: #98dbcc;
}
div.sphinxsidebar input {
border: 1px solid #98dbcc;
font-family: sans-serif;
font-size: 1em;
}
/* -- hyperlink styles ------------------------------------------------------ */
a {
color: #355f7c;
text-decoration: none;
}
a:visited {
color: #355f7c;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* -- body styles ----------------------------------------------------------- */
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: 'Trebuchet MS', sans-serif;
background-color: #f2f2f2;
font-weight: normal;
color: #20435c;
border-bottom: 1px solid #ccc;
margin: 20px -20px 10px -20px;
padding: 3px 0 3px 10px;
}
div.body h1 { margin-top: 0; font-size: 200%; }
div.body h2 { font-size: 160%; }
div.body h3 { font-size: 140%; }
div.body h4 { font-size: 120%; }
div.body h5 { font-size: 110%; }
div.body h6 { font-size: 100%; }
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
div.body p, div.body dd, div.body li, div.body blockquote {
text-align: justify;
line-height: 130%;
}
div.admonition p.admonition-title + p {
display: inline;
}
div.admonition p {
margin-bottom: 5px;
}
div.admonition pre {
margin-bottom: 5px;
}
div.admonition ul, div.admonition ol {
margin-bottom: 5px;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.topic {
background-color: #eee;
}
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}
p.admonition-title {
display: inline;
}
p.admonition-title:after {
content: ":";
}
pre {
padding: 5px;
background-color: #eeffcc;
color: #333333;
line-height: 120%;
border: 1px solid #ac9;
border-left: none;
border-right: none;
}
code {
background-color: #ecf0f3;
padding: 0 1px 0 1px;
font-size: 0.95em;
}
th {
background-color: #ede;
}
.warning code {
background: #efc2c2;
}
.note code {
background: #d6d6d6;
}
.viewcode-back {
font-family: sans-serif;
}
div.viewcode-block:target {
background-color: #f4debf;
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
div.code-block-caption {
color: #efefef;
background-color: #1c4e63;
}

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1 @@
@import url("classic.css");

View File

@ -0,0 +1,287 @@
/*
* doctools.js
* ~~~~~~~~~~~
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
"profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function() {};
}
*/
/**
* small helper function to urldecode strings
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s == 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node) {
if (node.nodeType == 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
var span = document.createElement("span");
span.className = className;
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this);
});
}
}
return this.each(function() {
highlight(this);
});
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
/**
* Small JavaScript module for the documentation.
*/
var Documentation = {
init : function() {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
},
/**
* i18n support
*/
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
LOCALE : 'unknown',
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated == 'undefined')
return string;
return (typeof translated == 'string') ? translated : translated[0];
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated == 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
},
addTranslations : function(catalog) {
for (var key in catalog.messages)
this.TRANSLATIONS[key] = catalog.messages[key];
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
this.LOCALE = catalog.locale;
},
/**
* add context elements like header anchor links
*/
addContextElements : function() {
$('div[id] > :header:first').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this headline')).
appendTo(this);
});
$('dt[id]').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this definition')).
appendTo(this);
});
},
/**
* workaround a firefox stupidity
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash)
window.setTimeout(function() {
document.location.href += '';
}, 10);
},
/**
* highlight the search words provided in the url in the text
*/
highlightSearchWords : function() {
var params = $.getQueryParameters();
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
if (terms.length) {
var body = $('div.body');
if (!body.length) {
body = $('body');
}
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlighted');
});
}, 10);
$('<p class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
.appendTo($('#searchbox'));
}
},
/**
* init the domain index toggle buttons
*/
initIndexTable : function() {
var togglers = $('img.toggler').click(function() {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle();
if (src.substr(-9) == 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
}).css('display', '');
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
togglers.click();
}
},
/**
* helper function to hide the search marks again
*/
hideSearchWords : function() {
$('#searchbox .highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
},
/**
* make the url absolute
*/
makeURL : function(relativeURL) {
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
},
/**
* get the current relative url
*/
getCurrentURL : function() {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this == '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
},
initOnKeyListeners: function() {
$(document).keyup(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box or textarea
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');
if (prevHref) {
window.location.href = prevHref;
return false;
}
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
}
}
});
}
};
// quick alias for translations
_ = Documentation.gettext;
$(document).ready(function() {
Documentation.init();
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

View File

@ -0,0 +1,751 @@
/*
* searchtools.js_t
* ~~~~~~~~~~~~~~~~
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* Non-minified version JS is _stemmer.js if file is provided */
/**
* Porter Stemmer
*/
var Stemmer = function() {
var step2list = {
ational: 'ate',
tional: 'tion',
enci: 'ence',
anci: 'ance',
izer: 'ize',
bli: 'ble',
alli: 'al',
entli: 'ent',
eli: 'e',
ousli: 'ous',
ization: 'ize',
ation: 'ate',
ator: 'ate',
alism: 'al',
iveness: 'ive',
fulness: 'ful',
ousness: 'ous',
aliti: 'al',
iviti: 'ive',
biliti: 'ble',
logi: 'log'
};
var step3list = {
icate: 'ic',
ative: '',
alize: 'al',
iciti: 'ic',
ical: 'ic',
ful: '',
ness: ''
};
var c = "[^aeiou]"; // consonant
var v = "[aeiouy]"; // vowel
var C = c + "[^aeiouy]*"; // consonant sequence
var V = v + "[aeiou]*"; // vowel sequence
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
var s_v = "^(" + C + ")?" + v; // vowel in stem
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
if (w.length < 3)
return w;
var re;
var re2;
var re3;
var re4;
firstch = w.substr(0,1);
if (firstch == "y")
w = firstch.toUpperCase() + w.substr(1);
// Step 1a
re = /^(.+?)(ss|i)es$/;
re2 = /^(.+?)([^s])s$/;
if (re.test(w))
w = w.replace(re,"$1$2");
else if (re2.test(w))
w = w.replace(re2,"$1$2");
// Step 1b
re = /^(.+?)eed$/;
re2 = /^(.+?)(ed|ing)$/;
if (re.test(w)) {
var fp = re.exec(w);
re = new RegExp(mgr0);
if (re.test(fp[1])) {
re = /.$/;
w = w.replace(re,"");
}
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1];
re2 = new RegExp(s_v);
if (re2.test(stem)) {
w = stem;
re2 = /(at|bl|iz)$/;
re3 = new RegExp("([^aeiouylsz])\\1$");
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re2.test(w))
w = w + "e";
else if (re3.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
else if (re4.test(w))
w = w + "e";
}
}
// Step 1c
re = /^(.+?)y$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(s_v);
if (re.test(stem))
w = stem + "i";
}
// Step 2
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step2list[suffix];
}
// Step 3
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step3list[suffix];
}
// Step 4
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
re2 = /^(.+?)(s|t)(ion)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
if (re.test(stem))
w = stem;
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1] + fp[2];
re2 = new RegExp(mgr1);
if (re2.test(stem))
w = stem;
}
// Step 5
re = /^(.+?)e$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
re2 = new RegExp(meq1);
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
w = stem;
}
re = /ll$/;
re2 = new RegExp(mgr1);
if (re.test(w) && re2.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
// and turn initial Y back to y
if (firstch == "y")
w = firstch.toLowerCase() + w.substr(1);
return w;
}
}
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: function(result) {
return result[4];
},
*/
// query matches the full name of an object
objNameMatch: 11,
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5}, // used to be unimportantResults
// Used when the priority is not in the mapping.
objPrioDefault: 0,
// query found in title
title: 15,
// query found in terms
term: 5
};
var splitChars = (function() {
var result = {};
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
var i, j, start, end;
for (i = 0; i < singles.length; i++) {
result[singles[i]] = true;
}
var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
[722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
[1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
[1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
[1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
[2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
[2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
[2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
[2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
[2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
[2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
[2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
[3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
[3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
[3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
[3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
[3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
[3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
[4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
[4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
[4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
[4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
[5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
[6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
[6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
[6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
[6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
[7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
[7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
[8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
[8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
[8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
[10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
[11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
[12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
[12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
[12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
[19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
[42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
[42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
[43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
[43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
[43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
[43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
[44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
[57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
[64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
[65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
[65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
for (i = 0; i < ranges.length; i++) {
start = ranges[i][0];
end = ranges[i][1];
for (j = start; j <= end; j++) {
result[j] = true;
}
}
return result;
})();
function splitQuery(query) {
var result = [];
var start = -1;
for (var i = 0; i < query.length; i++) {
if (splitChars[query.charCodeAt(i)]) {
if (start !== -1) {
result.push(query.slice(start, i));
start = -1;
}
} else if (start === -1) {
start = i;
}
}
if (start !== -1) {
result.push(query.slice(start));
}
return result;
}
/**
* Search Module
*/
var Search = {
_index : null,
_queued_query : null,
_pulse_status : -1,
init : function() {
var params = $.getQueryParameters();
if (params.q) {
var query = params.q[0];
$('input[name="q"]')[0].value = query;
this.performSearch(query);
}
},
loadIndex : function(url) {
$.ajax({type: "GET", url: url, data: null,
dataType: "script", cache: true,
complete: function(jqxhr, textstatus) {
if (textstatus != "success") {
document.getElementById("searchindexloader").src = url;
}
}});
},
setIndex : function(index) {
var q;
this._index = index;
if ((q = this._queued_query) !== null) {
this._queued_query = null;
Search.query(q);
}
},
hasIndex : function() {
return this._index !== null;
},
deferQuery : function(query) {
this._queued_query = query;
},
stopPulse : function() {
this._pulse_status = 0;
},
startPulse : function() {
if (this._pulse_status >= 0)
return;
function pulse() {
var i;
Search._pulse_status = (Search._pulse_status + 1) % 4;
var dotString = '';
for (i = 0; i < Search._pulse_status; i++)
dotString += '.';
Search.dots.text(dotString);
if (Search._pulse_status > -1)
window.setTimeout(pulse, 500);
}
pulse();
},
/**
* perform a search for something (or wait until index is loaded)
*/
performSearch : function(query) {
// create the required interface elements
this.out = $('#search-results');
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
this.dots = $('<span></span>').appendTo(this.title);
this.status = $('<p style="display: none"></p>').appendTo(this.out);
this.output = $('<ul class="search"/>').appendTo(this.out);
$('#search-progress').text(_('Preparing search...'));
this.startPulse();
// index already loaded, the browser was quick!
if (this.hasIndex())
this.query(query);
else
this.deferQuery(query);
},
/**
* execute search (requires search index to be loaded)
*/
query : function(query) {
var i;
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
// stem the searchterms and add them to the correct list
var stemmer = new Stemmer();
var searchterms = [];
var excluded = [];
var hlterms = [];
var tmp = splitQuery(query);
var objectterms = [];
for (i = 0; i < tmp.length; i++) {
if (tmp[i] !== "") {
objectterms.push(tmp[i].toLowerCase());
}
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
tmp[i] === "") {
// skip this "word"
continue;
}
// stem the word
var word = stemmer.stemWord(tmp[i].toLowerCase());
var toAppend;
// select the correct list
if (word[0] == '-') {
toAppend = excluded;
word = word.substr(1);
}
else {
toAppend = searchterms;
hlterms.push(tmp[i].toLowerCase());
}
// only add if not already in the list
if (!$u.contains(toAppend, word))
toAppend.push(word);
}
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
// console.debug('SEARCH: searching for:');
// console.info('required: ', searchterms);
// console.info('excluded: ', excluded);
// prepare search
var terms = this._index.terms;
var titleterms = this._index.titleterms;
// array of [filename, title, anchor, descr, score]
var results = [];
$('#search-progress').empty();
// lookup as object
for (i = 0; i < objectterms.length; i++) {
var others = [].concat(objectterms.slice(0, i),
objectterms.slice(i+1, objectterms.length));
results = results.concat(this.performObjectSearch(objectterms[i], others));
}
// lookup as search terms in fulltext
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
// let the scorer override scores with a custom scoring function
if (Scorer.score) {
for (i = 0; i < results.length; i++)
results[i][4] = Scorer.score(results[i]);
}
// now sort the results by score (in opposite order of appearance, since the
// display function below uses pop() to retrieve items) and then
// alphabetically
results.sort(function(a, b) {
var left = a[4];
var right = b[4];
if (left > right) {
return 1;
} else if (left < right) {
return -1;
} else {
// same score: sort alphabetically
left = a[1].toLowerCase();
right = b[1].toLowerCase();
return (left > right) ? -1 : ((left < right) ? 1 : 0);
}
});
// for debugging
//Search.lastresults = results.slice(); // a copy
//console.info('search results:', Search.lastresults);
// print the results
var resultCount = results.length;
function displayNextItem() {
// results left, load the summary and display it
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
// dirhtml builder
var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) {
dirname = dirname.substring(0, dirname.length-6);
} else if (dirname == 'index/') {
dirname = '';
}
listItem.append($('<a/>').attr('href',
DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
highlightstring + item[2]).html(item[1]));
} else {
// normal html builders
listItem.append($('<a/>').attr('href',
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
highlightstring + item[2]).html(item[1]));
}
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
if (data !== '' && data !== undefined) {
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
}
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
}});
} else {
// no source available, just display title
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
}
}
// search finished, update title and status message
else {
Search.stopPulse();
Search.title.text(_('Search Results'));
if (!resultCount)
Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
else
Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
Search.status.fadeIn(500);
}
}
displayNextItem();
},
/**
* search for object names
*/
performObjectSearch : function(object, otherterms) {
var filenames = this._index.filenames;
var objects = this._index.objects;
var objnames = this._index.objnames;
var titles = this._index.titles;
var i;
var results = [];
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) {
var score = 0;
var parts = fullname.split('.');
// check for different match types: exact matches of full name or
// "last name" (i.e. last dotted part)
if (fullname == object || parts[parts.length - 1] == object) {
score += Scorer.objNameMatch;
// matches in last name
} else if (parts[parts.length - 1].indexOf(object) > -1) {
score += Scorer.objPartialMatch;
}
var match = objects[prefix][name];
var objname = objnames[match[1]][2];
var title = titles[match[0]];
// If more than one term searched for, we require other words to be
// found in the name/title/description
if (otherterms.length > 0) {
var haystack = (prefix + ' ' + name + ' ' +
objname + ' ' + title).toLowerCase();
var allfound = true;
for (i = 0; i < otherterms.length; i++) {
if (haystack.indexOf(otherterms[i]) == -1) {
allfound = false;
break;
}
}
if (!allfound) {
continue;
}
}
var descr = objname + _(', in ') + title;
var anchor = match[3];
if (anchor === '')
anchor = fullname;
else if (anchor == '-')
anchor = objnames[match[1]][1] + '-' + fullname;
// add custom score for some objects according to scorer
if (Scorer.objPrio.hasOwnProperty(match[2])) {
score += Scorer.objPrio[match[2]];
} else {
score += Scorer.objPrioDefault;
}
results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);
}
}
}
return results;
},
/**
* search for full-text terms in the index
*/
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
var filenames = this._index.filenames;
var titles = this._index.titles;
var i, j, file;
var fileMap = {};
var scoreMap = {};
var results = [];
// perform the search on the required terms
for (i = 0; i < searchterms.length; i++) {
var word = searchterms[i];
var files = [];
var _o = [
{files: terms[word], score: Scorer.term},
{files: titleterms[word], score: Scorer.title}
];
// no match but word was a required one
if ($u.every(_o, function(o){return o.files === undefined;})) {
break;
}
// found search word in contents
$u.each(_o, function(o) {
var _files = o.files;
if (_files === undefined)
return
if (_files.length === undefined)
_files = [_files];
files = files.concat(_files);
// set score for the word in each file to Scorer.term
for (j = 0; j < _files.length; j++) {
file = _files[j];
if (!(file in scoreMap))
scoreMap[file] = {}
scoreMap[file][word] = o.score;
}
});
// create the mapping
for (j = 0; j < files.length; j++) {
file = files[j];
if (file in fileMap)
fileMap[file].push(word);
else
fileMap[file] = [word];
}
}
// now check if the files don't contain excluded terms
for (file in fileMap) {
var valid = true;
// check if all requirements are matched
if (fileMap[file].length != searchterms.length)
continue;
// ensure that none of the excluded terms is in the search result
for (i = 0; i < excluded.length; i++) {
if (terms[excluded[i]] == file ||
titleterms[excluded[i]] == file ||
$u.contains(terms[excluded[i]] || [], file) ||
$u.contains(titleterms[excluded[i]] || [], file)) {
valid = false;
break;
}
}
// if we have still a valid result we can add it to the result list
if (valid) {
// select one (max) score for the file.
// for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
results.push([filenames[file], titles[file], '', null, score]);
}
}
return results;
},
/**
* helper function to return a node containing the
* search summary for a given text. keywords is a list
* of stemmed words, hlwords is the list of normal, unstemmed
* words. the first one is used to find the occurrence, the
* latter for highlighting it.
*/
makeSearchSummary : function(text, keywords, hlwords) {
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
var i = textLower.indexOf(this.toLowerCase());
if (i > -1)
start = i;
});
start = Math.max(start - 120, 0);
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
});
return rv;
}
};
$(document).ready(function() {
Search.init();
});

View File

@ -0,0 +1,159 @@
/*
* sidebar.js
* ~~~~~~~~~~
*
* This script makes the Sphinx sidebar collapsible.
*
* .sphinxsidebar contains .sphinxsidebarwrapper. This script adds
* in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
* used to collapse and expand the sidebar.
*
* When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
* and the width of the sidebar and the margin-left of the document
* are decreased. When the sidebar is expanded the opposite happens.
* This script saves a per-browser/per-session cookie used to
* remember the position of the sidebar among the pages.
* Once the browser is closed the cookie is deleted and the position
* reset to the default (expanded).
*
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
$(function() {
// global elements used by the functions.
// the 'sidebarbutton' element is defined as global after its
// creation, in the add_sidebar_button function
var bodywrapper = $('.bodywrapper');
var sidebar = $('.sphinxsidebar');
var sidebarwrapper = $('.sphinxsidebarwrapper');
// for some reason, the document has no sidebar; do not run into errors
if (!sidebar.length) return;
// original margin-left of the bodywrapper and width of the sidebar
// with the sidebar expanded
var bw_margin_expanded = bodywrapper.css('margin-left');
var ssb_width_expanded = sidebar.width();
// margin-left of the bodywrapper and width of the sidebar
// with the sidebar collapsed
var bw_margin_collapsed = '.8em';
var ssb_width_collapsed = '.8em';
// colors used by the current theme
var dark_color = $('.related').css('background-color');
var light_color = $('.document').css('background-color');
function sidebar_is_collapsed() {
return sidebarwrapper.is(':not(:visible)');
}
function toggle_sidebar() {
if (sidebar_is_collapsed())
expand_sidebar();
else
collapse_sidebar();
}
function collapse_sidebar() {
sidebarwrapper.hide();
sidebar.css('width', ssb_width_collapsed);
bodywrapper.css('margin-left', bw_margin_collapsed);
sidebarbutton.css({
'margin-left': '0',
'height': bodywrapper.height()
});
sidebarbutton.find('span').text('»');
sidebarbutton.attr('title', _('Expand sidebar'));
document.cookie = 'sidebar=collapsed';
}
function expand_sidebar() {
bodywrapper.css('margin-left', bw_margin_expanded);
sidebar.css('width', ssb_width_expanded);
sidebarwrapper.show();
sidebarbutton.css({
'margin-left': ssb_width_expanded-12,
'height': bodywrapper.height()
});
sidebarbutton.find('span').text('«');
sidebarbutton.attr('title', _('Collapse sidebar'));
document.cookie = 'sidebar=expanded';
}
function add_sidebar_button() {
sidebarwrapper.css({
'float': 'left',
'margin-right': '0',
'width': ssb_width_expanded - 28
});
// create the button
sidebar.append(
'<div id="sidebarbutton"><span>&laquo;</span></div>'
);
var sidebarbutton = $('#sidebarbutton');
light_color = sidebarbutton.css('background-color');
// find the height of the viewport to center the '<<' in the page
var viewport_height;
if (window.innerHeight)
viewport_height = window.innerHeight;
else
viewport_height = $(window).height();
sidebarbutton.find('span').css({
'display': 'block',
'margin-top': (viewport_height - sidebar.position().top - 20) / 2
});
sidebarbutton.click(toggle_sidebar);
sidebarbutton.attr('title', _('Collapse sidebar'));
sidebarbutton.css({
'color': '#FFFFFF',
'border-left': '1px solid ' + dark_color,
'font-size': '1.2em',
'cursor': 'pointer',
'height': bodywrapper.height(),
'padding-top': '1px',
'margin-left': ssb_width_expanded - 12
});
sidebarbutton.hover(
function () {
$(this).css('background-color', dark_color);
},
function () {
$(this).css('background-color', light_color);
}
);
}
function set_position_from_cookie() {
if (!document.cookie)
return;
var items = document.cookie.split(';');
for(var k=0; k<items.length; k++) {
var key_val = items[k].split('=');
var key = key_val[0].replace(/ /, ""); // strip leading spaces
if (key == 'sidebar') {
var value = key_val[1];
if ((value == 'collapsed') && (!sidebar_is_collapsed()))
collapse_sidebar();
else if ((value == 'expanded') && (sidebar_is_collapsed()))
expand_sidebar();
}
}
}
add_sidebar_button();
var sidebarbutton = $('#sidebarbutton');
set_position_from_cookie();
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

View File

@ -0,0 +1,808 @@
/*
* websupport.js
* ~~~~~~~~~~~~~
*
* sphinx.websupport utilities for all documentation.
*
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
(function($) {
$.fn.autogrow = function() {
return this.each(function() {
var textarea = this;
$.fn.autogrow.resize(textarea);
$(textarea)
.focus(function() {
textarea.interval = setInterval(function() {
$.fn.autogrow.resize(textarea);
}, 500);
})
.blur(function() {
clearInterval(textarea.interval);
});
});
};
$.fn.autogrow.resize = function(textarea) {
var lineHeight = parseInt($(textarea).css('line-height'), 10);
var lines = textarea.value.split('\n');
var columns = textarea.cols;
var lineCount = 0;
$.each(lines, function() {
lineCount += Math.ceil(this.length / columns) || 1;
});
var height = lineHeight * (lineCount + 1);
$(textarea).css('height', height);
};
})(jQuery);
(function($) {
var comp, by;
function init() {
initEvents();
initComparator();
}
function initEvents() {
$(document).on("click", 'a.comment-close', function(event) {
event.preventDefault();
hide($(this).attr('id').substring(2));
});
$(document).on("click", 'a.vote', function(event) {
event.preventDefault();
handleVote($(this));
});
$(document).on("click", 'a.reply', function(event) {
event.preventDefault();
openReply($(this).attr('id').substring(2));
});
$(document).on("click", 'a.close-reply', function(event) {
event.preventDefault();
closeReply($(this).attr('id').substring(2));
});
$(document).on("click", 'a.sort-option', function(event) {
event.preventDefault();
handleReSort($(this));
});
$(document).on("click", 'a.show-proposal', function(event) {
event.preventDefault();
showProposal($(this).attr('id').substring(2));
});
$(document).on("click", 'a.hide-proposal', function(event) {
event.preventDefault();
hideProposal($(this).attr('id').substring(2));
});
$(document).on("click", 'a.show-propose-change', function(event) {
event.preventDefault();
showProposeChange($(this).attr('id').substring(2));
});
$(document).on("click", 'a.hide-propose-change', function(event) {
event.preventDefault();
hideProposeChange($(this).attr('id').substring(2));
});
$(document).on("click", 'a.accept-comment', function(event) {
event.preventDefault();
acceptComment($(this).attr('id').substring(2));
});
$(document).on("click", 'a.delete-comment', function(event) {
event.preventDefault();
deleteComment($(this).attr('id').substring(2));
});
$(document).on("click", 'a.comment-markup', function(event) {
event.preventDefault();
toggleCommentMarkupBox($(this).attr('id').substring(2));
});
}
/**
* Set comp, which is a comparator function used for sorting and
* inserting comments into the list.
*/
function setComparator() {
// If the first three letters are "asc", sort in ascending order
// and remove the prefix.
if (by.substring(0,3) == 'asc') {
var i = by.substring(3);
comp = function(a, b) { return a[i] - b[i]; };
} else {
// Otherwise sort in descending order.
comp = function(a, b) { return b[by] - a[by]; };
}
// Reset link styles and format the selected sort option.
$('a.sel').attr('href', '#').removeClass('sel');
$('a.by' + by).removeAttr('href').addClass('sel');
}
/**
* Create a comp function. If the user has preferences stored in
* the sortBy cookie, use those, otherwise use the default.
*/
function initComparator() {
by = 'rating'; // Default to sort by rating.
// If the sortBy cookie is set, use that instead.
if (document.cookie.length > 0) {
var start = document.cookie.indexOf('sortBy=');
if (start != -1) {
start = start + 7;
var end = document.cookie.indexOf(";", start);
if (end == -1) {
end = document.cookie.length;
by = unescape(document.cookie.substring(start, end));
}
}
}
setComparator();
}
/**
* Show a comment div.
*/
function show(id) {
$('#ao' + id).hide();
$('#ah' + id).show();
var context = $.extend({id: id}, opts);
var popup = $(renderTemplate(popupTemplate, context)).hide();
popup.find('textarea[name="proposal"]').hide();
popup.find('a.by' + by).addClass('sel');
var form = popup.find('#cf' + id);
form.submit(function(event) {
event.preventDefault();
addComment(form);
});
$('#s' + id).after(popup);
popup.slideDown('fast', function() {
getComments(id);
});
}
/**
* Hide a comment div.
*/
function hide(id) {
$('#ah' + id).hide();
$('#ao' + id).show();
var div = $('#sc' + id);
div.slideUp('fast', function() {
div.remove();
});
}
/**
* Perform an ajax request to get comments for a node
* and insert the comments into the comments tree.
*/
function getComments(id) {
$.ajax({
type: 'GET',
url: opts.getCommentsURL,
data: {node: id},
success: function(data, textStatus, request) {
var ul = $('#cl' + id);
var speed = 100;
$('#cf' + id)
.find('textarea[name="proposal"]')
.data('source', data.source);
if (data.comments.length === 0) {
ul.html('<li>No comments yet.</li>');
ul.data('empty', true);
} else {
// If there are comments, sort them and put them in the list.
var comments = sortComments(data.comments);
speed = data.comments.length * 100;
appendComments(comments, ul);
ul.data('empty', false);
}
$('#cn' + id).slideUp(speed + 200);
ul.slideDown(speed);
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem retrieving the comments.');
},
dataType: 'json'
});
}
/**
* Add a comment via ajax and insert the comment into the comment tree.
*/
function addComment(form) {
var node_id = form.find('input[name="node"]').val();
var parent_id = form.find('input[name="parent"]').val();
var text = form.find('textarea[name="comment"]').val();
var proposal = form.find('textarea[name="proposal"]').val();
if (text == '') {
showError('Please enter a comment.');
return;
}
// Disable the form that is being submitted.
form.find('textarea,input').attr('disabled', 'disabled');
// Send the comment to the server.
$.ajax({
type: "POST",
url: opts.addCommentURL,
dataType: 'json',
data: {
node: node_id,
parent: parent_id,
text: text,
proposal: proposal
},
success: function(data, textStatus, error) {
// Reset the form.
if (node_id) {
hideProposeChange(node_id);
}
form.find('textarea')
.val('')
.add(form.find('input'))
.removeAttr('disabled');
var ul = $('#cl' + (node_id || parent_id));
if (ul.data('empty')) {
$(ul).empty();
ul.data('empty', false);
}
insertComment(data.comment);
var ao = $('#ao' + node_id);
ao.find('img').attr({'src': opts.commentBrightImage});
if (node_id) {
// if this was a "root" comment, remove the commenting box
// (the user can get it back by reopening the comment popup)
$('#ca' + node_id).slideUp();
}
},
error: function(request, textStatus, error) {
form.find('textarea,input').removeAttr('disabled');
showError('Oops, there was a problem adding the comment.');
}
});
}
/**
* Recursively append comments to the main comment list and children
* lists, creating the comment tree.
*/
function appendComments(comments, ul) {
$.each(comments, function() {
var div = createCommentDiv(this);
ul.append($(document.createElement('li')).html(div));
appendComments(this.children, div.find('ul.comment-children'));
// To avoid stagnating data, don't store the comments children in data.
this.children = null;
div.data('comment', this);
});
}
/**
* After adding a new comment, it must be inserted in the correct
* location in the comment tree.
*/
function insertComment(comment) {
var div = createCommentDiv(comment);
// To avoid stagnating data, don't store the comments children in data.
comment.children = null;
div.data('comment', comment);
var ul = $('#cl' + (comment.node || comment.parent));
var siblings = getChildren(ul);
var li = $(document.createElement('li'));
li.hide();
// Determine where in the parents children list to insert this comment.
for(i=0; i < siblings.length; i++) {
if (comp(comment, siblings[i]) <= 0) {
$('#cd' + siblings[i].id)
.parent()
.before(li.html(div));
li.slideDown('fast');
return;
}
}
// If we get here, this comment rates lower than all the others,
// or it is the only comment in the list.
ul.append(li.html(div));
li.slideDown('fast');
}
function acceptComment(id) {
$.ajax({
type: 'POST',
url: opts.acceptCommentURL,
data: {id: id},
success: function(data, textStatus, request) {
$('#cm' + id).fadeOut('fast');
$('#cd' + id).removeClass('moderate');
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem accepting the comment.');
}
});
}
function deleteComment(id) {
$.ajax({
type: 'POST',
url: opts.deleteCommentURL,
data: {id: id},
success: function(data, textStatus, request) {
var div = $('#cd' + id);
if (data == 'delete') {
// Moderator mode: remove the comment and all children immediately
div.slideUp('fast', function() {
div.remove();
});
return;
}
// User mode: only mark the comment as deleted
div
.find('span.user-id:first')
.text('[deleted]').end()
.find('div.comment-text:first')
.text('[deleted]').end()
.find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
.remove();
var comment = div.data('comment');
comment.username = '[deleted]';
comment.text = '[deleted]';
div.data('comment', comment);
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem deleting the comment.');
}
});
}
function showProposal(id) {
$('#sp' + id).hide();
$('#hp' + id).show();
$('#pr' + id).slideDown('fast');
}
function hideProposal(id) {
$('#hp' + id).hide();
$('#sp' + id).show();
$('#pr' + id).slideUp('fast');
}
function showProposeChange(id) {
$('#pc' + id).hide();
$('#hc' + id).show();
var textarea = $('#pt' + id);
textarea.val(textarea.data('source'));
$.fn.autogrow.resize(textarea[0]);
textarea.slideDown('fast');
}
function hideProposeChange(id) {
$('#hc' + id).hide();
$('#pc' + id).show();
var textarea = $('#pt' + id);
textarea.val('').removeAttr('disabled');
textarea.slideUp('fast');
}
function toggleCommentMarkupBox(id) {
$('#mb' + id).toggle();
}
/** Handle when the user clicks on a sort by link. */
function handleReSort(link) {
var classes = link.attr('class').split(/\s+/);
for (var i=0; i<classes.length; i++) {
if (classes[i] != 'sort-option') {
by = classes[i].substring(2);
}
}
setComparator();
// Save/update the sortBy cookie.
var expiration = new Date();
expiration.setDate(expiration.getDate() + 365);
document.cookie= 'sortBy=' + escape(by) +
';expires=' + expiration.toUTCString();
$('ul.comment-ul').each(function(index, ul) {
var comments = getChildren($(ul), true);
comments = sortComments(comments);
appendComments(comments, $(ul).empty());
});
}
/**
* Function to process a vote when a user clicks an arrow.
*/
function handleVote(link) {
if (!opts.voting) {
showError("You'll need to login to vote.");
return;
}
var id = link.attr('id');
if (!id) {
// Didn't click on one of the voting arrows.
return;
}
// If it is an unvote, the new vote value is 0,
// Otherwise it's 1 for an upvote, or -1 for a downvote.
var value = 0;
if (id.charAt(1) != 'u') {
value = id.charAt(0) == 'u' ? 1 : -1;
}
// The data to be sent to the server.
var d = {
comment_id: id.substring(2),
value: value
};
// Swap the vote and unvote links.
link.hide();
$('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
.show();
// The div the comment is displayed in.
var div = $('div#cd' + d.comment_id);
var data = div.data('comment');
// If this is not an unvote, and the other vote arrow has
// already been pressed, unpress it.
if ((d.value !== 0) && (data.vote === d.value * -1)) {
$('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
$('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
}
// Update the comments rating in the local data.
data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
data.vote = d.value;
div.data('comment', data);
// Change the rating text.
div.find('.rating:first')
.text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
// Send the vote information to the server.
$.ajax({
type: "POST",
url: opts.processVoteURL,
data: d,
error: function(request, textStatus, error) {
showError('Oops, there was a problem casting that vote.');
}
});
}
/**
* Open a reply form used to reply to an existing comment.
*/
function openReply(id) {
// Swap out the reply link for the hide link
$('#rl' + id).hide();
$('#cr' + id).show();
// Add the reply li to the children ul.
var div = $(renderTemplate(replyTemplate, {id: id})).hide();
$('#cl' + id)
.prepend(div)
// Setup the submit handler for the reply form.
.find('#rf' + id)
.submit(function(event) {
event.preventDefault();
addComment($('#rf' + id));
closeReply(id);
})
.find('input[type=button]')
.click(function() {
closeReply(id);
});
div.slideDown('fast', function() {
$('#rf' + id).find('textarea').focus();
});
}
/**
* Close the reply form opened with openReply.
*/
function closeReply(id) {
// Remove the reply div from the DOM.
$('#rd' + id).slideUp('fast', function() {
$(this).remove();
});
// Swap out the hide link for the reply link
$('#cr' + id).hide();
$('#rl' + id).show();
}
/**
* Recursively sort a tree of comments using the comp comparator.
*/
function sortComments(comments) {
comments.sort(comp);
$.each(comments, function() {
this.children = sortComments(this.children);
});
return comments;
}
/**
* Get the children comments from a ul. If recursive is true,
* recursively include childrens' children.
*/
function getChildren(ul, recursive) {
var children = [];
ul.children().children("[id^='cd']")
.each(function() {
var comment = $(this).data('comment');
if (recursive)
comment.children = getChildren($(this).find('#cl' + comment.id), true);
children.push(comment);
});
return children;
}
/** Create a div to display a comment in. */
function createCommentDiv(comment) {
if (!comment.displayed && !opts.moderator) {
return $('<div class="moderate">Thank you! Your comment will show up '
+ 'once it is has been approved by a moderator.</div>');
}
// Prettify the comment rating.
comment.pretty_rating = comment.rating + ' point' +
(comment.rating == 1 ? '' : 's');
// Make a class (for displaying not yet moderated comments differently)
comment.css_class = comment.displayed ? '' : ' moderate';
// Create a div for this comment.
var context = $.extend({}, opts, comment);
var div = $(renderTemplate(commentTemplate, context));
// If the user has voted on this comment, highlight the correct arrow.
if (comment.vote) {
var direction = (comment.vote == 1) ? 'u' : 'd';
div.find('#' + direction + 'v' + comment.id).hide();
div.find('#' + direction + 'u' + comment.id).show();
}
if (opts.moderator || comment.text != '[deleted]') {
div.find('a.reply').show();
if (comment.proposal_diff)
div.find('#sp' + comment.id).show();
if (opts.moderator && !comment.displayed)
div.find('#cm' + comment.id).show();
if (opts.moderator || (opts.username == comment.username))
div.find('#dc' + comment.id).show();
}
return div;
}
/**
* A simple template renderer. Placeholders such as <%id%> are replaced
* by context['id'] with items being escaped. Placeholders such as <#id#>
* are not escaped.
*/
function renderTemplate(template, context) {
var esc = $(document.createElement('div'));
function handle(ph, escape) {
var cur = context;
$.each(ph.split('.'), function() {
cur = cur[this];
});
return escape ? esc.text(cur || "").html() : cur;
}
return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
return handle(arguments[2], arguments[1] == '%' ? true : false);
});
}
/** Flash an error message briefly. */
function showError(message) {
$(document.createElement('div')).attr({'class': 'popup-error'})
.append($(document.createElement('div'))
.attr({'class': 'error-message'}).text(message))
.appendTo('body')
.fadeIn("slow")
.delay(2000)
.fadeOut("slow");
}
/** Add a link the user uses to open the comments popup. */
$.fn.comment = function() {
return this.each(function() {
var id = $(this).attr('id').substring(1);
var count = COMMENT_METADATA[id];
var title = count + ' comment' + (count == 1 ? '' : 's');
var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
var addcls = count == 0 ? ' nocomment' : '';
$(this)
.append(
$(document.createElement('a')).attr({
href: '#',
'class': 'sphinx-comment-open' + addcls,
id: 'ao' + id
})
.append($(document.createElement('img')).attr({
src: image,
alt: 'comment',
title: title
}))
.click(function(event) {
event.preventDefault();
show($(this).attr('id').substring(2));
})
)
.append(
$(document.createElement('a')).attr({
href: '#',
'class': 'sphinx-comment-close hidden',
id: 'ah' + id
})
.append($(document.createElement('img')).attr({
src: opts.closeCommentImage,
alt: 'close',
title: 'close'
}))
.click(function(event) {
event.preventDefault();
hide($(this).attr('id').substring(2));
})
);
});
};
var opts = {
processVoteURL: '/_process_vote',
addCommentURL: '/_add_comment',
getCommentsURL: '/_get_comments',
acceptCommentURL: '/_accept_comment',
deleteCommentURL: '/_delete_comment',
commentImage: '/static/_static/comment.png',
closeCommentImage: '/static/_static/comment-close.png',
loadingImage: '/static/_static/ajax-loader.gif',
commentBrightImage: '/static/_static/comment-bright.png',
upArrow: '/static/_static/up.png',
downArrow: '/static/_static/down.png',
upArrowPressed: '/static/_static/up-pressed.png',
downArrowPressed: '/static/_static/down-pressed.png',
voting: false,
moderator: false
};
if (typeof COMMENT_OPTIONS != "undefined") {
opts = jQuery.extend(opts, COMMENT_OPTIONS);
}
var popupTemplate = '\
<div class="sphinx-comments" id="sc<%id%>">\
<p class="sort-options">\
Sort by:\
<a href="#" class="sort-option byrating">best rated</a>\
<a href="#" class="sort-option byascage">newest</a>\
<a href="#" class="sort-option byage">oldest</a>\
</p>\
<div class="comment-header">Comments</div>\
<div class="comment-loading" id="cn<%id%>">\
loading comments... <img src="<%loadingImage%>" alt="" /></div>\
<ul id="cl<%id%>" class="comment-ul"></ul>\
<div id="ca<%id%>">\
<p class="add-a-comment">Add a comment\
(<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
<div class="comment-markup-box" id="mb<%id%>">\
reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
<code>``code``</code>, \
code blocks: <code>::</code> and an indented block after blank line</div>\
<form method="post" id="cf<%id%>" class="comment-form" action="">\
<textarea name="comment" cols="80"></textarea>\
<p class="propose-button">\
<a href="#" id="pc<%id%>" class="show-propose-change">\
Propose a change &#9657;\
</a>\
<a href="#" id="hc<%id%>" class="hide-propose-change">\
Propose a change &#9663;\
</a>\
</p>\
<textarea name="proposal" id="pt<%id%>" cols="80"\
spellcheck="false"></textarea>\
<input type="submit" value="Add comment" />\
<input type="hidden" name="node" value="<%id%>" />\
<input type="hidden" name="parent" value="" />\
</form>\
</div>\
</div>';
var commentTemplate = '\
<div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
<div class="vote">\
<div class="arrow">\
<a href="#" id="uv<%id%>" class="vote" title="vote up">\
<img src="<%upArrow%>" />\
</a>\
<a href="#" id="uu<%id%>" class="un vote" title="vote up">\
<img src="<%upArrowPressed%>" />\
</a>\
</div>\
<div class="arrow">\
<a href="#" id="dv<%id%>" class="vote" title="vote down">\
<img src="<%downArrow%>" id="da<%id%>" />\
</a>\
<a href="#" id="du<%id%>" class="un vote" title="vote down">\
<img src="<%downArrowPressed%>" />\
</a>\
</div>\
</div>\
<div class="comment-content">\
<p class="tagline comment">\
<span class="user-id"><%username%></span>\
<span class="rating"><%pretty_rating%></span>\
<span class="delta"><%time.delta%></span>\
</p>\
<div class="comment-text comment"><#text#></div>\
<p class="comment-opts comment">\
<a href="#" class="reply hidden" id="rl<%id%>">reply &#9657;</a>\
<a href="#" class="close-reply" id="cr<%id%>">reply &#9663;</a>\
<a href="#" id="sp<%id%>" class="show-proposal">proposal &#9657;</a>\
<a href="#" id="hp<%id%>" class="hide-proposal">proposal &#9663;</a>\
<a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
<span id="cm<%id%>" class="moderation hidden">\
<a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
</span>\
</p>\
<pre class="proposal" id="pr<%id%>">\
<#proposal_diff#>\
</pre>\
<ul class="comment-children" id="cl<%id%>"></ul>\
</div>\
<div class="clearleft"></div>\
</div>\
</div>';
var replyTemplate = '\
<li>\
<div class="reply-div" id="rd<%id%>">\
<form id="rf<%id%>">\
<textarea name="comment" cols="80"></textarea>\
<input type="submit" value="Add reply" />\
<input type="button" value="Cancel" />\
<input type="hidden" name="parent" value="<%id%>" />\
<input type="hidden" name="node" value="" />\
</form>\
</div>\
</li>';
$(document).ready(function() {
init();
});
})(jQuery);
$(document).ready(function() {
// add comment anchors for all paragraphs that are commentable
$('.sphinx-has-comment').comment();
// highlight search words in search results
$("div.context").each(function() {
var params = $.getQueryParameters();
var terms = (params.q) ? params.q[0].split(/\s+/) : [];
var result = $(this);
$.each(terms, function() {
result.highlightText(this.toLowerCase(), 'highlighted');
});
});
// directly open comment window if requested
var anchor = document.location.hash;
if (anchor.substring(0, 9) == '#comment-') {
$('#ao' + anchor.substring(9)).click();
document.location.hash = '#s' + anchor.substring(9);
}
});

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,133 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Copyright &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="#" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<link rel="next" title="Credits" href="credits.html" />
<link rel="prev" title="Distributing and packaging phpMyAdmin" href="vendors.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="credits.html" title="Credits"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="vendors.html" title="Distributing and packaging phpMyAdmin"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="copyright">
<span id="id1"></span><h1>Copyright<a class="headerlink" href="#copyright" title="Permalink to this headline"></a></h1>
<div class="highlight-none"><div class="highlight"><pre>Copyright (C) 1998-2000 Tobias Ratschiller &lt;tobias_at_ratschiller.com&gt;
Copyright (C) 2001-2013 Marc Delisle &lt;marc_at_infomarc.info&gt;
Olivier Müller &lt;om_at_omnis.ch&gt;
Robin Johnson &lt;robbat2_at_users.sourceforge.net&gt;
Alexander M. Turek &lt;me_at_derrabus.de&gt;
Michal Čihař &lt;michal_at_cihar.com&gt;
Garvin Hicking &lt;me_at_supergarv.de&gt;
Michael Keck &lt;mkkeck_at_users.sourceforge.net&gt;
Sebastian Mendel &lt;cybot_tm_at_users.sourceforge.net&gt;
[check credits for more details]
</pre></div>
</div>
<p>This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2, as
published by the Free Software Foundation.</p>
<p>This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a class="reference external" href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="vendors.html"
title="previous chapter">Distributing and packaging phpMyAdmin</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="credits.html"
title="next chapter">Credits</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/copyright.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="credits.html" title="Credits"
>next</a> |</li>
<li class="right" >
<a href="vendors.html" title="Distributing and packaging phpMyAdmin"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="#">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

View File

@ -0,0 +1,657 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Credits &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<link rel="next" title="Glossary" href="glossary.html" />
<link rel="prev" title="Copyright" href="copyright.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="glossary.html" title="Glossary"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="copyright.html" title="Copyright"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="credits">
<span id="id1"></span><h1>Credits<a class="headerlink" href="#credits" title="Permalink to this headline"></a></h1>
<div class="section" id="credits-in-chronological-order">
<h2>Credits, in chronological order<a class="headerlink" href="#credits-in-chronological-order" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>Tobias Ratschiller &lt;tobias_at_ratschiller.com&gt;<ul>
<li>creator of the phpmyadmin project</li>
<li>maintainer from 1998 to summer 2000</li>
</ul>
</li>
<li>Marc Delisle &lt;marc_at_infomarc.info&gt;<ul>
<li>multi-language version in December 1998</li>
<li>various fixes and improvements</li>
<li><a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a> analyser (most of it)</li>
<li>current project maintainer</li>
</ul>
</li>
<li>Olivier Müller &lt;om_at_omnis.ch&gt;<ul>
<li>started SourceForge phpMyAdmin project in March 2001</li>
<li>sync&#8217;ed different existing CVS trees with new features and bugfixes</li>
<li>multi-language improvements, dynamic language selection</li>
<li>many bugfixes and improvements</li>
</ul>
</li>
<li>Loïc Chapeaux &lt;lolo_at_phpheaven.net&gt;<ul>
<li>rewrote and optimized javascript, DHTML and DOM stuff</li>
<li>rewrote the scripts so they fit the <a class="reference internal" href="glossary.html#term-pear"><span class="xref std std-term">PEAR</span></a> coding standards and
generate XHTML1.0 and CSS2 compliant codes</li>
<li>improved the language detection system</li>
<li>many bugfixes and improvements</li>
</ul>
</li>
<li>Robin Johnson &lt;robbat2_at_users.sourceforge.net&gt;<ul>
<li>database maintenance controls</li>
<li>table type code</li>
<li>Host authentication <a class="reference internal" href="glossary.html#term-ip"><span class="xref std std-term">IP</span></a> Allow/Deny</li>
<li>DB-based configuration (Not completed)</li>
<li><a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a> parser and pretty-printer</li>
<li><a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a> validator</li>
<li>many bugfixes and improvements</li>
</ul>
</li>
<li>Armel Fauveau &lt;armel.fauveau_at_globalis-ms.com&gt;<ul>
<li>bookmarks feature</li>
<li>multiple dump feature</li>
<li>gzip dump feature</li>
<li>zip dump feature</li>
</ul>
</li>
<li>Geert Lund &lt;glund_at_silversoft.dk&gt;<ul>
<li>various fixes</li>
<li>moderator of the phpMyAdmin former users forum at phpwizard.net</li>
</ul>
</li>
<li>Korakot Chaovavanich &lt;korakot_at_iname.com&gt;<ul>
<li>&#8220;insert as new row&#8221; feature</li>
</ul>
</li>
<li>Pete Kelly &lt;webmaster_at_trafficg.com&gt;<ul>
<li>rewrote and fix dump code</li>
<li>bugfixes</li>
</ul>
</li>
<li>Steve Alberty &lt;alberty_at_neptunlabs.de&gt;<ul>
<li>rewrote dump code for PHP4</li>
<li>mySQL table statistics</li>
<li>bugfixes</li>
</ul>
</li>
<li>Benjamin Gandon &lt;gandon_at_isia.cma.fr&gt;<ul>
<li>main author of the version 2.1.0.1</li>
<li>bugfixes</li>
</ul>
</li>
<li>Alexander M. Turek &lt;me_at_derrabus.de&gt;<ul>
<li>MySQL 4.0 / 4.1 / 5.0 compatibility</li>
<li>abstract database interface (PMA_DBI) with MySQLi support</li>
<li>privileges administration</li>
<li><a class="reference internal" href="glossary.html#term-xml"><span class="xref std std-term">XML</span></a> exports</li>
<li>various features and fixes</li>
<li>German language file updates</li>
</ul>
</li>
<li>Mike Beck &lt;mike.beck_at_web.de&gt;<ul>
<li>automatic joins in QBE</li>
<li>links column in printview</li>
<li>Relation view</li>
</ul>
</li>
<li>Michal Čihař &lt;michal_at_cihar.com&gt;<ul>
<li>enhanced index creation/display feature</li>
<li>feature to use a different charset for HTML than for MySQL</li>
<li>improvements of export feature</li>
<li>various features and fixes</li>
<li>Czech language file updates</li>
</ul>
</li>
<li>Christophe Gesché from the &#8220;MySQL Form Generator for PHPMyAdmin&#8221;
(<a class="reference external" href="http://sf.net/projects/phpmysqlformgen/">http://sf.net/projects/phpmysqlformgen/</a>)<ul>
<li>suggested the patch for multiple table printviews</li>
</ul>
</li>
<li>Garvin Hicking &lt;me_at_supergarv.de&gt;<ul>
<li>built the patch for vertical display of table rows</li>
<li>built the Javascript based Query window + <a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a> history</li>
<li>Improvement of column/db comments</li>
<li>(MIME)-Transformations for columns</li>
<li>Use custom alias names for Databases in left frame</li>
<li>hierarchical/nested table display</li>
<li><a class="reference internal" href="glossary.html#term-pdf"><span class="xref std std-term">PDF</span></a>-scratchboard for WYSIWYG-
distribution of <a class="reference internal" href="glossary.html#term-pdf"><span class="xref std std-term">PDF</span></a> relations</li>
<li>new icon sets</li>
<li>vertical display of column properties page</li>
<li>some bugfixes, features, support, German language additions</li>
</ul>
</li>
<li>Yukihiro Kawada &lt;kawada_at_den.fujifilm.co.jp&gt;<ul>
<li>japanese kanji encoding conversion feature</li>
</ul>
</li>
<li>Piotr Roszatycki &lt;d3xter_at_users.sourceforge.net&gt; and Dan Wilson<ul>
<li>the Cookie authentication mode</li>
</ul>
</li>
<li>Axel Sander &lt;n8falke_at_users.sourceforge.net&gt;<ul>
<li>table relation-links feature</li>
</ul>
</li>
<li>Maxime Delorme &lt;delorme.maxime_at_free.fr&gt;<ul>
<li><a class="reference internal" href="glossary.html#term-pdf"><span class="xref std std-term">PDF</span></a> schema output, thanks also to
Olivier Plathey for the &#8220;FPDF&#8221; library (see &lt;<a class="reference external" href="http://www.fpdf.org/">http://www.fpdf.org/</a>&gt;), Steven
Wittens for the &#8220;UFPDF&#8221; library (see &lt;<a class="reference external" href="http://www.acko.net/node/56">http://www.acko.net/node/56</a>&gt;) and
Nicola Asuni for the &#8220;TCPDF&#8221; library (see &lt;<a class="reference external" href="http://www.tcpdf.org/">http://www.tcpdf.org/</a>&gt;).</li>
</ul>
</li>
<li>Olof Edlund &lt;olof.edlund_at_upright.se&gt;<ul>
<li><a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a> validator server</li>
</ul>
</li>
<li>Ivan R. Lanin &lt;ivanlanin_at_users.sourceforge.net&gt;<ul>
<li>phpMyAdmin logo (until June 2004)</li>
</ul>
</li>
<li>Mike Cochrane &lt;mike_at_graftonhall.co.nz&gt;<ul>
<li>blowfish library from the Horde project (withdrawn in release 4.0)</li>
</ul>
</li>
<li>Marcel Tschopp &lt;ne0x_at_users.sourceforge.net&gt;<ul>
<li>mysqli support</li>
<li>many bugfixes and improvements</li>
</ul>
</li>
<li>Nicola Asuni (Tecnick.com)<ul>
<li>TCPDF library (<a class="reference external" href="http://www.tcpdf.org">http://www.tcpdf.org</a>)</li>
</ul>
</li>
<li>Michael Keck &lt;mkkeck_at_users.sourceforge.net&gt;<ul>
<li>redesign for 2.6.0</li>
<li>phpMyAdmin sailboat logo (June 2004)</li>
</ul>
</li>
<li>Mathias Landhäußer<ul>
<li>Representation at conferences</li>
</ul>
</li>
<li>Sebastian Mendel &lt;cybot_tm_at_users.sourceforge.net&gt;<ul>
<li>interface improvements</li>
<li>various bugfixes</li>
</ul>
</li>
<li>Ivan A Kirillov<ul>
<li>new relations Designer</li>
</ul>
</li>
<li>Raj Kissu Rajandran (Google Summer of Code 2008)<ul>
<li>BLOBstreaming support (withdrawn in release 4.0)</li>
</ul>
</li>
<li>Piotr Przybylski (Google Summer of Code 2008, 2010 and 2011)<ul>
<li>improved setup script</li>
<li>user preferences</li>
<li>Drizzle support</li>
</ul>
</li>
<li>Derek Schaefer (Google Summer of Code 2009)<ul>
<li>Improved the import system</li>
</ul>
</li>
<li>Alexander Rutkowski (Google Summer of Code 2009)<ul>
<li>Tracking mechanism</li>
</ul>
</li>
<li>Zahra Naeem (Google Summer of Code 2009)<ul>
<li>Synchronization feature (removed in release 4.0)</li>
</ul>
</li>
<li>Tomáš Srnka (Google Summer of Code 2009)<ul>
<li>Replication support</li>
</ul>
</li>
<li>Muhammad Adnan (Google Summer of Code 2010)<ul>
<li>Relation schema export to multiple formats</li>
</ul>
</li>
<li>Lori Lee (Google Summer of Code 2010)<ul>
<li>User interface improvements</li>
<li>ENUM/SET editor</li>
<li>Simplified interface for export/import</li>
</ul>
</li>
<li>Ninad Pundalik (Google Summer of Code 2010)<ul>
<li>AJAXifying the interface</li>
</ul>
</li>
<li>Martynas Mickevičius (Google Summer of Code 2010)<ul>
<li>Charts</li>
</ul>
</li>
<li>Barrie Leslie<ul>
<li>BLOBstreaming support with PBMS PHP extension (withdrawn in release
4.0)</li>
</ul>
</li>
<li>Ankit Gupta (Google Summer of Code 2010)<ul>
<li>Visual query builder</li>
</ul>
</li>
<li>Madhura Jayaratne (Google Summer of Code 2011)<ul>
<li>OpenGIS support</li>
</ul>
</li>
<li>Ammar Yasir (Google Summer of Code 2011)<ul>
<li>Zoom search</li>
</ul>
</li>
<li>Aris Feryanto (Google Summer of Code 2011)<ul>
<li>Browse-mode improvements</li>
</ul>
</li>
<li>Thilanka Kaushalya (Google Summer of Code 2011)<ul>
<li>AJAXification</li>
</ul>
</li>
<li>Tyron Madlener (Google Summer of Code 2011)<ul>
<li>Query statistics and charts for the status page</li>
</ul>
</li>
<li>Zarubin Stas (Google Summer of Code 2011)<ul>
<li>Automated testing</li>
</ul>
</li>
<li>Rouslan Placella (Google Summer of Code 2011 and 2012)<ul>
<li>Improved support for Stored Routines, Triggers and Events</li>
<li>Italian translation updates</li>
<li>Removal of frames, new navigation</li>
</ul>
</li>
<li>Dieter Adriaenssens<ul>
<li>Various bugfixes</li>
<li>Dutch translation updates</li>
</ul>
</li>
<li>Alex Marin (Google Summer of Code 2012)<ul>
<li>New plugins and properties system</li>
</ul>
</li>
<li>Thilina Buddika Abeyrathna (Google Summer of Code 2012)<ul>
<li>Refactoring</li>
</ul>
</li>
<li>Atul Pratap Singh (Google Summer of Code 2012)<ul>
<li>Refactoring</li>
</ul>
</li>
<li>Chanaka Indrajith (Google Summer of Code 2012)<ul>
<li>Refactoring</li>
</ul>
</li>
<li>Yasitha Pandithawatta (Google Summer of Code 2012)<ul>
<li>Automated testing</li>
</ul>
</li>
<li>Jim Wigginton (phpseclib.sourceforge.net)<ul>
<li>phpseclib</li>
</ul>
</li>
</ul>
<p>And also to the following people who have contributed minor changes,
enhancements, bugfixes or support for a new language since version
2.1.0:</p>
<p>Bora Alioglu, Ricardo ?, Sven-Erik Andersen, Alessandro Astarita,
Péter Bakondy, Borges Botelho, Olivier Bussier, Neil Darlow, Mats
Engstrom, Ian Davidson, Laurent Dhima, Kristof Hamann, Thomas Kläger,
Lubos Klokner, Martin Marconcini, Girish Nair, David Nordenberg,
Andreas Pauley, Bernard M. Piller, Laurent Haas, &#8220;Sakamoto&#8221;, Yuval
Sarna, www.securereality.com.au, Alexis Soulard, Alvar Soome, Siu Sun,
Peter Svec, Michael Tacelosky, Rachim Tamsjadi, Kositer Uros, Luís V.,
Martijn W. van der Lee, Algis Vainauskas, Daniel Villanueva, Vinay,
Ignacio Vazquez-Abrams, Chee Wai, Jakub Wilk, Thomas Michael
Winningham, Vilius Zigmantas, &#8220;Manuzhai&#8221;.</p>
</div>
<div class="section" id="translators">
<h2>Translators<a class="headerlink" href="#translators" title="Permalink to this headline"></a></h2>
<p>Following people have contributed to translation of phpMyAdmin:</p>
<ul class="simple">
<li>Arabic<ul>
<li>Abdullah Al-Saedi &lt;abdullah.10_at_windowslive.com&gt;</li>
</ul>
</li>
<li>Bulgarian<ul>
<li>stoyanster &lt;stoyanster_at_gmail.com&gt;</li>
</ul>
</li>
<li>Catalan<ul>
<li>Xavier Navarro &lt;xvnavarro_at_gmail.com&gt;</li>
</ul>
</li>
<li>Czech<ul>
<li>Michal Čihař &lt;michal_at_cihar.com&gt;</li>
</ul>
</li>
<li>Danish<ul>
<li>opensource &lt;opensource_at_jth.net&gt;</li>
<li>Jørgen Thomsen &lt;opensource_at_jth.net&gt;</li>
</ul>
</li>
<li>German<ul>
<li>mrbendig &lt;mrbendig_at_mrbendig.com&gt;</li>
<li>torsten.funck &lt;torsten.funck_at_googlemail.com&gt;</li>
<li>Sven Strickroth &lt;email_at_cs-ware.de&gt;</li>
<li>typo3 &lt;typo3_at_dirk-weise.de&gt;</li>
<li>Jo Michael &lt;me_at_mynetx.net&gt;</li>
</ul>
</li>
<li>Greek<ul>
<li>Panagiotis Papazoglou &lt;papaz_p_at_yahoo.com&gt;</li>
</ul>
</li>
<li>English (United Kingdom)<ul>
<li>Robert Readman &lt;robert_readman_at_hotmail.com&gt;</li>
</ul>
</li>
<li>Spanish<ul>
<li>Matías Bellone &lt;matiasbellone_at_gmail.com&gt;</li>
</ul>
</li>
<li>French<ul>
<li>Marc Delisle &lt;marc_at_infomarc.info&gt;</li>
</ul>
</li>
<li>Hindi<ul>
<li>u4663530 &lt;u4663530_at_anu.edu.au&gt;</li>
<li>rsedwardian &lt;rsedwardian_at_gmail.com&gt;</li>
</ul>
</li>
<li>Hungarian<ul>
<li>gergo314 &lt;gergo314_at_gmail.com&gt;</li>
</ul>
</li>
<li>Italian<ul>
<li>Rouslan Placella &lt;rouslan_at_placella.com&gt;</li>
</ul>
</li>
<li>Japanese<ul>
<li>Yuichiro &lt;yuichiro_at_pop07.odn.ne.jp&gt;</li>
</ul>
</li>
<li>Lithuanian<ul>
<li>Kęstutis &lt;forkik_at_gmail.com&gt;</li>
</ul>
</li>
<li>Norwegian Bokmål<ul>
<li>Sven-Erik Andersen &lt;sven.erik.andersen_at_gmail.com&gt;</li>
</ul>
</li>
<li>Dutch<ul>
<li>Dieter Adriaenssens &lt;ruleant_at_users.sourceforge.net&gt;</li>
<li>Herman van Rink &lt;rink_at_initfour.nl&gt;</li>
</ul>
</li>
<li>Polish<ul>
<li>Stanisław Krukowski &lt;stankruk_at_neostrada.pl&gt;</li>
<li>Marcin Kozioł &lt;lord_dark_at_wp.pl&gt;</li>
</ul>
</li>
<li>Portuguese<ul>
<li>JoaoTMDias &lt;contacto_at_joaodias.me&gt;</li>
</ul>
</li>
<li>Portuguese (Brazil)<ul>
<li>wiltave &lt;wiltave_at_gmail.com&gt;</li>
<li>emerson4br &lt;emerson4br_at_gmail.com&gt;</li>
</ul>
</li>
<li>Romanian<ul>
<li>alexukf &lt;alex.ukf_at_gmail.com&gt;</li>
</ul>
</li>
<li>Russian<ul>
<li>Victor Volkov &lt;hanut_at_php-myadmin.ru&gt;</li>
</ul>
</li>
<li>Sinhala<ul>
<li>Madhura Jayaratne &lt;madhura.cj_at_gmail.com&gt;</li>
</ul>
</li>
<li>Slovak<ul>
<li>Martin Lacina &lt;martin_at_whistler.sk&gt;</li>
</ul>
</li>
<li>Slovenian<ul>
<li>Domen &lt;dbc334_at_gmail.com&gt;</li>
</ul>
</li>
<li>Swedish<ul>
<li>stefan &lt;stefan_at_inkopsforum.se&gt;</li>
</ul>
</li>
<li>Tamil<ul>
<li>ysajeepan &lt;ysajeepan_at_live.com&gt;</li>
</ul>
</li>
<li>Telugu<ul>
<li>veeven &lt;veeven_at_gmail.com&gt;</li>
</ul>
</li>
<li>Thai<ul>
<li>kanitchet &lt;kanichet_at_hotmail.com&gt;</li>
</ul>
</li>
<li>Turkish<ul>
<li>Burak Yavuz &lt;hitowerdigit_at_hotmail.com&gt;</li>
</ul>
</li>
<li>Uighur<ul>
<li>gheni &lt;gheni_at_yahoo.cn&gt;</li>
</ul>
</li>
<li>Ukrainian<ul>
<li>typim &lt;duke3d_at_ukr.net&gt;</li>
<li>oleg-ilnytskyi &lt;ukraine.oleg_at_gmail.com&gt;</li>
</ul>
</li>
<li>Urdu<ul>
<li>Mehbooob Khan &lt;mehboobbugti_at_gmail.com&gt;</li>
</ul>
</li>
<li>Simplified Chinese<ul>
<li>shanyan baishui &lt;Siramizu_at_gmail.com&gt;</li>
</ul>
</li>
<li>Traditional Chinese<ul>
<li>star &lt;star_at_origin.club.tw&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="documentation-translators">
<h2>Documentation translators<a class="headerlink" href="#documentation-translators" title="Permalink to this headline"></a></h2>
<p>Following people have contributed to translation of phpMyAdmin documentation:</p>
<ul class="simple">
<li>Czech<ul>
<li>Michal Čihař &lt;michal_at_cihar.com&gt;</li>
</ul>
</li>
<li>Greek<ul>
<li>Panagiotis Papazoglou &lt;papaz_p_at_yahoo.com&gt;</li>
</ul>
</li>
<li>English (United Kingdom)<ul>
<li>Robert Readman &lt;robert_readman_at_hotmail.com&gt;</li>
</ul>
</li>
<li>French<ul>
<li>Cédric Corazza &lt;cedric.corazza_at_wanadoo.fr&gt;</li>
</ul>
</li>
<li>Japanese<ul>
<li>Yuichiro Takahashi &lt;yuichiro_at_pop07.odn.ne.jp&gt;</li>
</ul>
</li>
<li>Polish<ul>
<li>Stanisław Krukowski &lt;stankruk_at_neostrada.pl&gt;</li>
</ul>
</li>
<li>Portuguese (Brazil)<ul>
<li>mjaning &lt;mjaning_at_gmail.com&gt;</li>
</ul>
</li>
<li>Slovenian<ul>
<li>Domen &lt;dbc334_at_gmail.com&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="original-credits-of-version-2-1-0">
<h2>Original Credits of Version 2.1.0<a class="headerlink" href="#original-credits-of-version-2-1-0" title="Permalink to this headline"></a></h2>
<p>This work is based on Peter Kuppelwieser&#8217;s MySQL-Webadmin. It was his
idea to create a web-based interface to MySQL using PHP3. Although I
have not used any of his source-code, there are some concepts I&#8217;ve
borrowed from him. phpMyAdmin was created because Peter told me he
wasn&#8217;t going to further develop his (great) tool.</p>
<p>Thanks go to</p>
<ul class="simple">
<li>Amalesh Kempf &lt;ak-lsml_at_living-source.com&gt; who contributed the
code for the check when dropping a table or database. He also
suggested that you should be able to specify the primary key on
tbl_create.php3. To version 1.1.1 he contributed the ldi_*.php3-set
(Import text-files) as well as a bug-report. Plus many smaller
improvements.</li>
<li>Jan Legenhausen &lt;jan_at_nrw.net&gt;: He made many of the changes that
were introduced in 1.3.0 (including quite significant ones like the
authentication). For 1.4.1 he enhanced the table-dump feature. Plus
bug-fixes and help.</li>
<li>Marc Delisle &lt;DelislMa_at_CollegeSherbrooke.qc.ca&gt; made phpMyAdmin
language-independent by outsourcing the strings to a separate file. He
also contributed the French translation.</li>
<li>Alexandr Bravo &lt;abravo_at_hq.admiral.ru&gt; who contributed
tbl_select.php3, a feature to display only some columns from a table.</li>
<li>Chris Jackson &lt;chrisj_at_ctel.net&gt; added support for MySQL functions
in tbl_change.php3. He also added the &#8220;Query by Example&#8221; feature in
2.0.</li>
<li>Dave Walton &lt;walton_at_nordicdms.com&gt; added support for multiple
servers and is a regular contributor for bug-fixes.</li>
<li>Gabriel Ash &lt;ga244_at_is8.nyu.edu&gt; contributed the random access
features for 2.0.6.</li>
</ul>
<p>The following people have contributed minor changes, enhancements,
bugfixes or support for a new language:</p>
<p>Jim Kraai, Jordi Bruguera, Miquel Obrador, Geert Lund, Thomas
Kleemann, Alexander Leidinger, Kiko Albiol, Daniel C. Chao, Pavel
Piankov, Sascha Kettler, Joe Pruett, Renato Lins, Mark Kronsbein,
Jannis Hermanns, G. Wieggers.</p>
<p>And thanks to everyone else who sent me email with suggestions, bug-
reports and or just some feedback.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Credits</a><ul>
<li><a class="reference internal" href="#credits-in-chronological-order">Credits, in chronological order</a></li>
<li><a class="reference internal" href="#translators">Translators</a></li>
<li><a class="reference internal" href="#documentation-translators">Documentation translators</a></li>
<li><a class="reference internal" href="#original-credits-of-version-2-1-0">Original Credits of Version 2.1.0</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="copyright.html"
title="previous chapter">Copyright</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="glossary.html"
title="next chapter">Glossary</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/credits.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="glossary.html" title="Glossary"
>next</a> |</li>
<li class="right" >
<a href="copyright.html" title="Copyright"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

View File

@ -0,0 +1,117 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Developers Information &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<link rel="next" title="Distributing and packaging phpMyAdmin" href="vendors.html" />
<link rel="prev" title="FAQ - Frequently Asked Questions" href="faq.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="vendors.html" title="Distributing and packaging phpMyAdmin"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="faq.html" title="FAQ - Frequently Asked Questions"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="developers-information">
<span id="developers"></span><h1>Developers Information<a class="headerlink" href="#developers-information" title="Permalink to this headline"></a></h1>
<p>phpMyAdmin is Open Source, so you&#8217;re invited to contribute to it. Many
great features have been written by other people and you too can help
to make phpMyAdmin a useful tool.</p>
<p>You can check out all the possibilities to contribute in the
<a class="reference external" href="https://www.phpmyadmin.net/contribute/">contribute section on our website</a>.</p>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="faq.html"
title="previous chapter">FAQ - Frequently Asked Questions</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="vendors.html"
title="next chapter">Distributing and packaging phpMyAdmin</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/developers.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="vendors.html" title="Distributing and packaging phpMyAdmin"
>next</a> |</li>
<li class="right" >
<a href="faq.html" title="FAQ - Frequently Asked Questions"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,626 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Glossary &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<link rel="prev" title="Credits" href="credits.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="credits.html" title="Credits"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="glossary">
<span id="id1"></span><h1>Glossary<a class="headerlink" href="#glossary" title="Permalink to this headline"></a></h1>
<p>From Wikipedia, the free encyclopedia</p>
<dl class="glossary docutils">
<dt id="term-htaccess">.htaccess</dt>
<dd><p class="first">the default name of Apache&#8217;s directory-level configuration file.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/.htaccess">http://www.wikipedia.org/wiki/.htaccess</a>&gt;</p>
</div>
</dd>
<dt id="term-acl">ACL</dt>
<dd>Access Contol List</dd>
<dt id="term-blowfish">Blowfish</dt>
<dd><p class="first">a keyed, symmetric block cipher, designed in 1993 by Bruce Schneier.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Blowfish_(cipher)">http://www.wikipedia.org/wiki/Blowfish_(cipher)</a>&gt;</p>
</div>
</dd>
<dt id="term-browser">Browser</dt>
<dd><p class="first">a software application that enables a user to display and interact with text, images, and other information typically located on a web page at a website on the World Wide Web.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://en.wikipedia.org/wiki/Web_browser">http://en.wikipedia.org/wiki/Web_browser</a>&gt;</p>
</div>
</dd>
<dt id="term-bzip2">bzip2</dt>
<dd><p class="first">a free software/open source data compression algorithm and program developed by Julian Seward.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Bzip2">http://www.wikipedia.org/wiki/Bzip2</a>&gt;</p>
</div>
</dd>
<dt id="term-cgi">CGI</dt>
<dd><p class="first">Common Gateway Interface is an important World Wide Web technology that
enables a client web browser to request data from a program executed on
the Web server.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/CGI">http://www.wikipedia.org/wiki/CGI</a>&gt;</p>
</div>
</dd>
<dt id="term-changelog">Changelog</dt>
<dd><p class="first">a log or record of changes made to a project.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Changelog">http://www.wikipedia.org/wiki/Changelog</a>&gt;</p>
</div>
</dd>
<dt id="term-client">Client</dt>
<dd><p class="first">a computer system that accesses a (remote) service on another computer by some kind of network.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Client_(computing)">http://www.wikipedia.org/wiki/Client_(computing)</a>&gt;</p>
</div>
</dd>
<dt id="term-column">column</dt>
<dd><p class="first">a set of data values of a particular simple type, one for each row of the table.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Column_(database)">http://www.wikipedia.org/wiki/Column_(database)</a>&gt;</p>
</div>
</dd>
<dt id="term-cookie">Cookie</dt>
<dd><p class="first">a packet of information sent by a server to a World Wide Web browser and then sent back by the browser each time it accesses that server.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/HTTP_cookie">http://www.wikipedia.org/wiki/HTTP_cookie</a>&gt;</p>
</div>
</dd>
<dt id="term-csv">CSV</dt>
<dd><p class="first">Comma- separated values</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Comma-separated_values">http://www.wikipedia.org/wiki/Comma-separated_values</a>&gt;</p>
</div>
</dd>
<dt id="term-db">DB</dt>
<dd>look at <a class="reference internal" href="#term-database"><span class="xref std std-term">database</span></a></dd>
<dt id="term-database">database</dt>
<dd><p class="first">an organized collection of data.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Database">http://www.wikipedia.org/wiki/Database</a>&gt;</p>
</div>
</dd>
<dt id="term-engine">Engine</dt>
<dd>look at <a class="reference internal" href="#term-storage-engines"><span class="xref std std-term">storage engines</span></a></dd>
<dt id="term-extension">extension</dt>
<dd><p class="first">a PHP module that extends PHP with additional functionality.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/extension">http://www.wikipedia.org/wiki/extension</a>&gt;</p>
</div>
</dd>
<dt id="term-faq">FAQ</dt>
<dd><p class="first">Frequently Asked Questions is a list of commonly asked question and there
answers.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/FAQ">http://www.wikipedia.org/wiki/FAQ</a>&gt;</p>
</div>
</dd>
<dt id="term-field">Field</dt>
<dd><p class="first">one part of divided data/columns.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Field_(computer_science)">http://www.wikipedia.org/wiki/Field_(computer_science)</a>&gt;</p>
</div>
</dd>
<dt id="term-foreign-key">foreign key</dt>
<dd><p class="first">a column or group of columns in a database row that point to a key column
or group of columns forming a key of another database row in some
(usually different) table.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Foreign_key">http://www.wikipedia.org/wiki/Foreign_key</a>&gt;</p>
</div>
</dd>
<dt id="term-fpdf">FPDF</dt>
<dd><p class="first">the free <a class="reference internal" href="#term-pdf"><span class="xref std std-term">PDF</span></a> library</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.fpdf.org/">http://www.fpdf.org/</a>&gt;</p>
</div>
</dd>
<dt id="term-gd">GD</dt>
<dd><p class="first">Graphics Library by Thomas Boutell and others for dynamically manipulating images.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/GD_Graphics_Library">http://www.wikipedia.org/wiki/GD_Graphics_Library</a>&gt;</p>
</div>
</dd>
<dt id="term-gd2">GD2</dt>
<dd>look at <a class="reference internal" href="#term-gd"><span class="xref std std-term">gd</span></a></dd>
<dt id="term-gzip">gzip</dt>
<dd><p class="first">gzip is short for GNU zip, a GNU free software file compression program.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Gzip">http://www.wikipedia.org/wiki/Gzip</a>&gt;</p>
</div>
</dd>
<dt id="term-host">host</dt>
<dd><p class="first">any machine connected to a computer network, a node that has a hostname.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Host">http://www.wikipedia.org/wiki/Host</a>&gt;</p>
</div>
</dd>
<dt id="term-hostname">hostname</dt>
<dd><p class="first">the unique name by which a network attached device is known on a network.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Hostname">http://www.wikipedia.org/wiki/Hostname</a>&gt;</p>
</div>
</dd>
<dt id="term-http">HTTP</dt>
<dd><p class="first">HyperText Transfer Protocol is the primary method used to transfer or
convey information on the World Wide Web.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/HyperText_Transfer_Protocol">http://www.wikipedia.org/wiki/HyperText_Transfer_Protocol</a>&gt;</p>
</div>
</dd>
<dt id="term-https">https</dt>
<dd><p class="first">a <a class="reference internal" href="#term-http"><span class="xref std std-term">HTTP</span></a>-connection with additional security measures.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Https:_URI_scheme">http://www.wikipedia.org/wiki/Https:_URI_scheme</a>&gt;</p>
</div>
</dd>
<dt id="term-iec">IEC</dt>
<dd>International Electrotechnical Commission</dd>
<dt id="term-iis">IIS</dt>
<dd><p class="first">Internet Information Services is a set of Internet-based services for
servers using Microsoft Windows.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Internet_Information_Services">http://www.wikipedia.org/wiki/Internet_Information_Services</a>&gt;</p>
</div>
</dd>
<dt id="term-index">Index</dt>
<dd><p class="first">a feature that allows quick access to the rows in a table.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Index_(database)">http://www.wikipedia.org/wiki/Index_(database)</a>&gt;</p>
</div>
</dd>
<dt id="term-ip">IP</dt>
<dd><p class="first">Internet Protocol is a data-oriented protocol used by source and
destination hosts for communicating data across a packet-switched
internetwork.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Internet_Protocol">http://www.wikipedia.org/wiki/Internet_Protocol</a>&gt;</p>
</div>
</dd>
<dt id="term-ip-address">IP Address</dt>
<dd><p class="first">a unique number that devices use in order to identify and communicate with each other on a network utilizing the Internet Protocol standard.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/IP_Address">http://www.wikipedia.org/wiki/IP_Address</a>&gt;</p>
</div>
</dd>
<dt id="term-ipv6">IPv6</dt>
<dd><p class="first">IPv6 (Internet Protocol version 6) is the latest revision of the
Internet Protocol (<a class="reference internal" href="#term-ip"><span class="xref std std-term">IP</span></a>), designed to deal with the
long-anticipated problem of its precedessor IPv4 running out of addresses.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/IPv6">http://www.wikipedia.org/wiki/IPv6</a>&gt;</p>
</div>
</dd>
<dt id="term-isapi">ISAPI</dt>
<dd><p class="first">Internet Server Application Programming Interface is the API of Internet Information Services (IIS).</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/ISAPI">http://www.wikipedia.org/wiki/ISAPI</a>&gt;</p>
</div>
</dd>
<dt id="term-isp">ISP</dt>
<dd><p class="first">Internet service provider is a business or organization that offers users
access to the Internet and related services.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/ISP">http://www.wikipedia.org/wiki/ISP</a>&gt;</p>
</div>
</dd>
<dt id="term-iso">ISO</dt>
<dd>International Standards Organisation</dd>
<dt id="term-jpeg">JPEG</dt>
<dd><p class="first">a most commonly used standard method of lossy compression for photographic images.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/JPEG">http://www.wikipedia.org/wiki/JPEG</a>&gt;</p>
</div>
</dd>
<dt id="term-jpg">JPG</dt>
<dd>look at <a class="reference internal" href="#term-jpeg"><span class="xref std std-term">jpeg</span></a></dd>
<dt id="term-key">Key</dt>
<dd>look at <a class="reference internal" href="#term-index"><span class="xref std std-term">index</span></a></dd>
<dt id="term-latex">LATEX</dt>
<dd><p class="first">a document preparation system for the TEX typesetting program.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/LaTeX">http://www.wikipedia.org/wiki/LaTeX</a>&gt;</p>
</div>
</dd>
<dt id="term-mac">Mac</dt>
<dd><p class="first">Apple Macintosh is line of personal computers is designed, developed, manufactured, and marketed by Apple Computer.</p>
<p class="last">. seealso:: &lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Mac">http://www.wikipedia.org/wiki/Mac</a>&gt;</p>
</dd>
<dt id="term-mac-os-x">Mac OS X</dt>
<dd><p class="first">the operating system which is included with all currently shipping Apple Macintosh computers in the consumer and professional markets.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Mac_OS_X">http://www.wikipedia.org/wiki/Mac_OS_X</a>&gt;</p>
</div>
</dd>
<dt id="term-mcrypt">MCrypt</dt>
<dd><p class="first">a cryptographic library.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/MCrypt">http://www.wikipedia.org/wiki/MCrypt</a>&gt;</p>
</div>
</dd>
<dt id="term-42">mcrypt</dt>
<dd><p class="first">the MCrypt PHP extension.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://php.net/mcrypt">http://php.net/mcrypt</a>&gt;</p>
</div>
</dd>
<dt id="term-mime">MIME</dt>
<dd><p class="first">Multipurpose Internet Mail Extensions is
an Internet Standard for the format of e-mail.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/MIME">http://www.wikipedia.org/wiki/MIME</a>&gt;</p>
</div>
</dd>
<dt id="term-module">module</dt>
<dd><p class="first">some sort of extension for the Apache Webserver.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/module">http://www.wikipedia.org/wiki/module</a>&gt;</p>
</div>
</dd>
<dt id="term-mysql">MySQL</dt>
<dd><p class="first">a multithreaded, multi-user, SQL (Structured Query Language) Database Management System (DBMS).</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/MySQL">http://www.wikipedia.org/wiki/MySQL</a>&gt;</p>
</div>
</dd>
<dt id="term-mysqli">mysqli</dt>
<dd><p class="first">the improved MySQL client PHP extension.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://php.net/mysqli">http://php.net/mysqli</a>&gt;</p>
</div>
</dd>
<dt id="term-47">mysql</dt>
<dd><p class="first">the MySQL client PHP extension.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://php.net/mysql">http://php.net/mysql</a>&gt;</p>
</div>
</dd>
<dt id="term-opendocument">OpenDocument</dt>
<dd><p class="first">open standard for office documents.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/OpenDocument">http://www.wikipedia.org/wiki/OpenDocument</a>&gt;</p>
</div>
</dd>
<dt id="term-os-x">OS X</dt>
<dd><p class="first">look at <a class="reference internal" href="#term-mac-os-x"><span class="xref std std-term">Mac OS X</span></a>.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/OS_X">http://www.wikipedia.org/wiki/OS_X</a>&gt;</p>
</div>
</dd>
<dt id="term-pdf">PDF</dt>
<dd><p class="first">Portable Document Format is a file format developed by Adobe Systems for
representing two dimensional documents in a device independent and
resolution independent format.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Portable_Document_Format">http://www.wikipedia.org/wiki/Portable_Document_Format</a>&gt;</p>
</div>
</dd>
<dt id="term-pear">PEAR</dt>
<dd><p class="first">the PHP Extension and Application Repository.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://pear.php.net/">http://pear.php.net/</a>&gt;</p>
</div>
</dd>
<dt id="term-pcre">PCRE</dt>
<dd><p class="first">Perl Compatible Regular Expressions is the perl-compatible regular
expression functions for PHP</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://php.net/pcre">http://php.net/pcre</a>&gt;</p>
</div>
</dd>
<dt id="term-php">PHP</dt>
<dd><p class="first">short for &#8220;PHP: Hypertext Preprocessor&#8221;, is an open-source, reflective
programming language used mainly for developing server-side applications
and dynamic web content, and more recently, a broader range of software
applications.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/PHP">http://www.wikipedia.org/wiki/PHP</a>&gt;</p>
</div>
</dd>
<dt id="term-port">port</dt>
<dd><p class="first">a connection through which data is sent and received.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Port_(computing)">http://www.wikipedia.org/wiki/Port_(computing)</a>&gt;</p>
</div>
</dd>
<dt id="term-rfc">RFC</dt>
<dd><p class="first">Request for Comments (RFC) documents are a series of memoranda
encompassing new research, innovations, and methodologies applicable to
Internet technologies.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Request_for_Comments">http://www.wikipedia.org/wiki/Request_for_Comments</a>&gt;</p>
</div>
</dd>
<dt id="term-rfc-1952">RFC 1952</dt>
<dd><p class="first">GZIP file format specification version 4.3</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><span class="target" id="index-0"></span><a class="rfc reference external" href="https://tools.ietf.org/html/rfc1952.html"><strong>RFC 1952</strong></a></p>
</div>
</dd>
<dt id="term-row-record-tuple">Row (record, tuple)</dt>
<dd><p class="first">represents a single, implicitly structured data item in a table.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Row_(database)">http://www.wikipedia.org/wiki/Row_(database)</a>&gt;</p>
</div>
</dd>
<dt id="term-server">Server</dt>
<dd><p class="first">a computer system that provides services to other computing systems over a network.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Server_(computing)">http://www.wikipedia.org/wiki/Server_(computing)</a>&gt;</p>
</div>
</dd>
<dt id="term-storage-engines">Storage Engines</dt>
<dd><p class="first">handlers for different table types</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://dev.mysql.com/doc/en/storage-engines.html">http://dev.mysql.com/doc/en/storage-engines.html</a>&gt;</p>
</div>
</dd>
<dt id="term-soap">SOAP</dt>
<dd><p class="first">Simple Object Access Protocol is a protocol specification for exchanging
structured information in the implementation of Web Services in computer
networks.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://en.wikipedia.org/wiki/SOAP">http://en.wikipedia.org/wiki/SOAP</a>&gt;</p>
</div>
</dd>
<dt id="term-socket">socket</dt>
<dd><p class="first">a form of inter-process communication.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Socket#Computer_sockets">http://www.wikipedia.org/wiki/Socket#Computer_sockets</a>&gt;</p>
</div>
</dd>
<dt id="term-ssl">SSL</dt>
<dd><p class="first">Secure Sockets Layer is a cryptographic protocol which provides secure
communication on the Internet.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Secure_Sockets_Layer">http://www.wikipedia.org/wiki/Secure_Sockets_Layer</a>&gt;</p>
</div>
</dd>
<dt id="term-stored-procedure">Stored procedure</dt>
<dd><p class="first">a subroutine available to applications accessing a relational database system</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://en.wikipedia.org/wiki/Stored_procedure">http://en.wikipedia.org/wiki/Stored_procedure</a>&gt;</p>
</div>
</dd>
<dt id="term-sql">SQL</dt>
<dd><p class="first">Structured Query Language</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/SQL">http://www.wikipedia.org/wiki/SQL</a>&gt;</p>
</div>
</dd>
<dt id="term-table">table</dt>
<dd><p class="first">a set of data elements (cells) that is organized, defined and stored as
horizontal rows and vertical columns where each item can be uniquely
identified by a label or key or by it?s position in relation to other
items.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Table_(database)">http://www.wikipedia.org/wiki/Table_(database)</a>&gt;</p>
</div>
</dd>
<dt id="term-tar">tar</dt>
<dd><p class="first">a type of archive file format: the Tape ARchive format.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Tar_(file_format)">http://www.wikipedia.org/wiki/Tar_(file_format)</a>&gt;</p>
</div>
</dd>
<dt id="term-tcp">TCP</dt>
<dd><p class="first">Transmission Control Protocol is one of the core protocols of the
Internet protocol suite.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/TCP">http://www.wikipedia.org/wiki/TCP</a>&gt;</p>
</div>
</dd>
<dt id="term-tcpdf">TCPDF</dt>
<dd><p class="first">Rewrite of <a class="reference internal" href="#term-ufpdf"><span class="xref std std-term">UFPDF</span></a> with various improvements.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.tcpdf.org/">http://www.tcpdf.org/</a>&gt;</p>
</div>
</dd>
<dt id="term-trigger">trigger</dt>
<dd><p class="first">a procedural code that is automatically executed in response to certain events on a particular table or view in a database</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://en.wikipedia.org/wiki/Database_trigger">http://en.wikipedia.org/wiki/Database_trigger</a>&gt;</p>
</div>
</dd>
<dt id="term-ufpdf">UFPDF</dt>
<dd><p class="first">Unicode/UTF-8 extension for <a class="reference internal" href="#term-fpdf"><span class="xref std std-term">FPDF</span></a></p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.acko.net/node/56">http://www.acko.net/node/56</a>&gt;</p>
</div>
</dd>
<dt id="term-url">URL</dt>
<dd><p class="first">Uniform Resource Locator is a sequence of characters, conforming to a
standardized format, that is used for referring to resources, such as
documents and images on the Internet, by their location.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/URL">http://www.wikipedia.org/wiki/URL</a>&gt;</p>
</div>
</dd>
<dt id="term-webserver">Webserver</dt>
<dd><p class="first">A computer (program) that is responsible for accepting HTTP requests from clients and serving them Web pages.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Webserver">http://www.wikipedia.org/wiki/Webserver</a>&gt;</p>
</div>
</dd>
<dt id="term-xml">XML</dt>
<dd><p class="first">Extensible Markup Language is a W3C-recommended general- purpose markup
language for creating special-purpose markup languages, capable of
describing many different kinds of data.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/XML">http://www.wikipedia.org/wiki/XML</a>&gt;</p>
</div>
</dd>
<dt id="term-zip">ZIP</dt>
<dd><p class="first">a popular data compression and archival format.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/ZIP_(file_format)">http://www.wikipedia.org/wiki/ZIP_(file_format)</a>&gt;</p>
</div>
</dd>
<dt id="term-zlib">zlib</dt>
<dd><p class="first">an open-source, cross- platform data compression library by Jean-loup Gailly and Mark Adler.</p>
<div class="last admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">&lt;<a class="reference external" href="http://www.wikipedia.org/wiki/Zlib">http://www.wikipedia.org/wiki/Zlib</a>&gt;</p>
</div>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="credits.html"
title="previous chapter">Credits</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/glossary.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="credits.html" title="Credits"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

View File

@ -0,0 +1,203 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to phpMyAdmins documentation! &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="#" />
<link rel="next" title="Introduction" href="intro.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="intro.html" title="Introduction"
accesskey="N">next</a> |</li>
<li class="nav-item nav-item-0"><a href="#">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="welcome-to-phpmyadmin-s-documentation">
<h1>Welcome to phpMyAdmin&#8217;s documentation!<a class="headerlink" href="#welcome-to-phpmyadmin-s-documentation" title="Permalink to this headline"></a></h1>
<p>Contents:</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a><ul>
<li class="toctree-l2"><a class="reference internal" href="intro.html#supported-features">Supported features</a></li>
<li class="toctree-l2"><a class="reference internal" href="intro.html#a-word-about-users">A word about users</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="require.html">Requirements</a><ul>
<li class="toctree-l2"><a class="reference internal" href="require.html#web-server">Web server</a></li>
<li class="toctree-l2"><a class="reference internal" href="require.html#php">PHP</a></li>
<li class="toctree-l2"><a class="reference internal" href="require.html#database">Database</a></li>
<li class="toctree-l2"><a class="reference internal" href="require.html#web-browser">Web browser</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="setup.html#quick-install">Quick Install</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#phpmyadmin-configuration-storage">phpMyAdmin configuration storage</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#upgrading-from-an-older-version">Upgrading from an older version</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#using-authentication-modes">Using authentication modes</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#securing-your-phpmyadmin-installation">Securing your phpMyAdmin installation</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="config.html">Configuration</a><ul>
<li class="toctree-l2"><a class="reference internal" href="config.html#basic-settings">Basic settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#server-connection-settings">Server connection settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#generic-settings">Generic settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#cookie-authentication-options">Cookie authentication options</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#navigation-panel-setup">Navigation panel setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#main-panel">Main panel</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#database-structure">Database structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#browse-mode">Browse mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#editing-mode">Editing mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#export-and-import-settings">Export and import settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#tabs-display-settings">Tabs display settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#documentation">Documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#languages">Languages</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#web-server-settings">Web server settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#theme-settings">Theme settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#design-customization">Design customization</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#text-fields">Text fields</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#sql-query-box-settings">SQL query box settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#web-server-upload-save-import-directories">Web server upload/save/import directories</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#various-display-setting">Various display setting</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#page-titles">Page titles</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#theme-manager-settings">Theme manager settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#default-queries">Default queries</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#sql-parser-settings">SQL parser settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#sql-validator-settings">SQL validator settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#mysql-settings">MySQL settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#developer">Developer</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="user.html">User Guide</a><ul>
<li class="toctree-l2"><a class="reference internal" href="transformations.html">Transformations</a></li>
<li class="toctree-l2"><a class="reference internal" href="privileges.html">User management</a></li>
<li class="toctree-l2"><a class="reference internal" href="other.html">Other sources of information</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ - Frequently Asked Questions</a><ul>
<li class="toctree-l2"><a class="reference internal" href="faq.html#server">Server</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#configuration">Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#known-limitations">Known limitations</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#isps-multi-user-installations">ISPs, multi-user installations</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#browsers-or-client-os">Browsers or client OS</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#using-phpmyadmin">Using phpMyAdmin</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#phpmyadmin-project">phpMyAdmin project</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#security">Security</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#synchronization">Synchronization</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="developers.html">Developers Information</a></li>
<li class="toctree-l1"><a class="reference internal" href="vendors.html">Distributing and packaging phpMyAdmin</a><ul>
<li class="toctree-l2"><a class="reference internal" href="vendors.html#external-libraries">External libraries</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="copyright.html">Copyright</a></li>
<li class="toctree-l1"><a class="reference internal" href="credits.html">Credits</a><ul>
<li class="toctree-l2"><a class="reference internal" href="credits.html#credits-in-chronological-order">Credits, in chronological order</a></li>
<li class="toctree-l2"><a class="reference internal" href="credits.html#translators">Translators</a></li>
<li class="toctree-l2"><a class="reference internal" href="credits.html#documentation-translators">Documentation translators</a></li>
<li class="toctree-l2"><a class="reference internal" href="credits.html#original-credits-of-version-2-1-0">Original Credits of Version 2.1.0</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="glossary.html">Glossary</a></li>
</ul>
</div>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li>
<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
<li><a class="reference internal" href="glossary.html#glossary"><span class="std std-ref">Glossary</span></a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="#">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Welcome to phpMyAdmin&#8217;s documentation!</a></li>
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
</ul>
<h4>Next topic</h4>
<p class="topless"><a href="intro.html"
title="next chapter">Introduction</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="intro.html" title="Introduction"
>next</a> |</li>
<li class="nav-item nav-item-0"><a href="#">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

View File

@ -0,0 +1,181 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Introduction &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<link rel="next" title="Requirements" href="require.html" />
<link rel="prev" title="Welcome to phpMyAdmins documentation!" href="index.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="require.html" title="Requirements"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Welcome to phpMyAdmins documentation!"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="introduction">
<span id="intro"></span><h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h1>
<p>phpMyAdmin can manage a whole MySQL server (needs a super-user) as
well as a single database. To accomplish the latter you&#8217;ll need a
properly set up MySQL user who can read/write only the desired
database. It&#8217;s up to you to look up the appropriate part in the MySQL
manual.</p>
<div class="section" id="supported-features">
<h2>Supported features<a class="headerlink" href="#supported-features" title="Permalink to this headline"></a></h2>
<p>Currently phpMyAdmin can:</p>
<ul class="simple">
<li>browse and drop databases, tables, views, columns and indexes</li>
<li>display multiple results sets through stored procedures or queries</li>
<li>create, copy, drop, rename and alter databases, tables, columns and
indexes</li>
<li>maintenance server, databases and tables, with proposals on server
configuration</li>
<li>execute, edit and bookmark any <a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a>-statement, even batch-queries</li>
<li>load text files into tables</li>
<li>create <a class="footnote-reference" href="#f1" id="id1">[1]</a> and read dumps of tables</li>
<li>export <a class="footnote-reference" href="#f1" id="id2">[1]</a> data to various formats: <a class="reference internal" href="glossary.html#term-csv"><span class="xref std std-term">CSV</span></a>, <a class="reference internal" href="glossary.html#term-xml"><span class="xref std std-term">XML</span></a>, <a class="reference internal" href="glossary.html#term-pdf"><span class="xref std std-term">PDF</span></a>,
<a class="reference internal" href="glossary.html#term-iso"><span class="xref std std-term">ISO</span></a>/<a class="reference internal" href="glossary.html#term-iec"><span class="xref std std-term">IEC</span></a> 26300 - <a class="reference internal" href="glossary.html#term-opendocument"><span class="xref std std-term">OpenDocument</span></a> Text and Spreadsheet, Microsoft
Word 2000, and LATEX formats</li>
<li>import data and <a class="reference internal" href="glossary.html#term-47"><span class="xref std std-term">MySQL</span></a> structures from <a class="reference internal" href="glossary.html#term-opendocument"><span class="xref std std-term">OpenDocument</span></a> spreadsheets, as
well as <a class="reference internal" href="glossary.html#term-xml"><span class="xref std std-term">XML</span></a>, <a class="reference internal" href="glossary.html#term-csv"><span class="xref std std-term">CSV</span></a>, and <a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a> files</li>
<li>administer multiple servers</li>
<li>manage MySQL users and privileges</li>
<li>check referential integrity in MyISAM tables</li>
<li>using Query-by-example (QBE), create complex queries automatically
connecting required tables</li>
<li>create <a class="reference internal" href="glossary.html#term-pdf"><span class="xref std std-term">PDF</span></a> graphics of your
database layout</li>
<li>search globally in a database or a subset of it</li>
<li>transform stored data into any format using a set of predefined
functions, like displaying BLOB-data as image or download-link</li>
<li>track changes on databases, tables and views</li>
<li>support InnoDB tables and foreign keys see <a class="reference internal" href="faq.html#faq3-6"><span class="std std-ref">3.6 What is currently not supported in phpMyAdmin about InnoDB?</span></a></li>
<li>support mysqli, the improved MySQL extension see <a class="reference internal" href="faq.html#faq1-17"><span class="std std-ref">1.17 Which MySQL versions does phpMyAdmin support?</span></a></li>
<li>create, edit, call, export and drop stored procedures and functions</li>
<li>create, edit, export and drop events and triggers</li>
<li>communicate in <a class="reference external" href="https://www.phpmyadmin.net/home_page/translations.php">62 different languages</a></li>
</ul>
</div>
<div class="section" id="a-word-about-users">
<h2>A word about users<a class="headerlink" href="#a-word-about-users" title="Permalink to this headline"></a></h2>
<p>Many people have difficulty understanding the concept of user
management with regards to phpMyAdmin. When a user logs in to
phpMyAdmin, that username and password are passed directly to MySQL.
phpMyAdmin does no account management on its own (other than allowing
one to manipulate the MySQL user account information); all users must
be valid MySQL users.</p>
<p class="rubric">Footnotes</p>
<table class="docutils footnote" frame="void" id="f1" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[1]</td><td><em>(<a class="fn-backref" href="#id1">1</a>, <a class="fn-backref" href="#id2">2</a>)</em> phpMyAdmin can compress (<a class="reference internal" href="glossary.html#term-zip"><span class="xref std std-term">Zip</span></a>, <a class="reference internal" href="glossary.html#term-gzip"><span class="xref std std-term">GZip</span></a> <a class="reference internal" href="glossary.html#term-rfc-1952"><span class="xref std std-term">RFC 1952</span></a> or
<a class="reference internal" href="glossary.html#term-bzip2"><span class="xref std std-term">Bzip2</span></a> formats) dumps and <a class="reference internal" href="glossary.html#term-csv"><span class="xref std std-term">CSV</span></a> exports if you use PHP with
<a class="reference internal" href="glossary.html#term-zlib"><span class="xref std std-term">Zlib</span></a> support (<code class="docutils literal"><span class="pre">--with-zlib</span></code>) and/or <a class="reference internal" href="glossary.html#term-bzip2"><span class="xref std std-term">Bzip2</span></a> support
(<code class="docutils literal"><span class="pre">--with-bz2</span></code>). Proper support may also need changes in <code class="file docutils literal"><span class="pre">php.ini</span></code>.</td></tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Introduction</a><ul>
<li><a class="reference internal" href="#supported-features">Supported features</a></li>
<li><a class="reference internal" href="#a-word-about-users">A word about users</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">Welcome to phpMyAdmin&#8217;s documentation!</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="require.html"
title="next chapter">Requirements</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/intro.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="require.html" title="Requirements"
>next</a> |</li>
<li class="right" >
<a href="index.html" title="Welcome to phpMyAdmins documentation!"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

View File

@ -0,0 +1,134 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Other sources of information &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<link rel="up" title="User Guide" href="user.html" />
<link rel="next" title="FAQ - Frequently Asked Questions" href="faq.html" />
<link rel="prev" title="User management" href="privileges.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="faq.html" title="FAQ - Frequently Asked Questions"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="privileges.html" title="User management"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="other-sources-of-information">
<h1>Other sources of information<a class="headerlink" href="#other-sources-of-information" title="Permalink to this headline"></a></h1>
<div class="section" id="printed-book">
<h2>Printed Book<a class="headerlink" href="#printed-book" title="Permalink to this headline"></a></h2>
<p>The definitive guide to using phpMyAdmin is the book Mastering phpMyAdmin for
Effective MySQL Management by Marc Delisle. You can get information on that
book and other officially endorsed <a class="reference external" href="https://www.phpmyadmin.net/home_page/docs.php?books">books at the phpMyAdmin site</a>.</p>
</div>
<div class="section" id="tutorials">
<h2>Tutorials<a class="headerlink" href="#tutorials" title="Permalink to this headline"></a></h2>
<p>Third party tutorials and articles are listed on our <a class="reference external" href="https://wiki.phpmyadmin.net/pma/Articles">wiki page</a>.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Other sources of information</a><ul>
<li><a class="reference internal" href="#printed-book">Printed Book</a></li>
<li><a class="reference internal" href="#tutorials">Tutorials</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="privileges.html"
title="previous chapter">User management</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="faq.html"
title="next chapter">FAQ - Frequently Asked Questions</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/other.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="faq.html" title="FAQ - Frequently Asked Questions"
>next</a> |</li>
<li class="right" >
<a href="privileges.html" title="User management"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

View File

@ -0,0 +1,168 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>User management &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<link rel="up" title="User Guide" href="user.html" />
<link rel="next" title="Other sources of information" href="other.html" />
<link rel="prev" title="Transformations" href="transformations.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="other.html" title="Other sources of information"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="transformations.html" title="Transformations"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="user-management">
<h1>User management<a class="headerlink" href="#user-management" title="Permalink to this headline"></a></h1>
<p>User management is the process of controlling which users are allowed to
connect to the MySQL server and what permissions they have on each database.
phpMyAdmin does not handle user management, rather it passes the username and
password on to MySQL, which then determines whether a user is permitted to
perform a particular action. Within phpMyAdmin, administrators have full
control over creating users, viewing and editing privileges for existing users,
and removing users.</p>
<p>Within phpMyAdmin, user management is controlled via the <span class="guilabel">Users</span> link
from the main page. Users can be created, edited, and removed.</p>
<div class="section" id="creating-a-new-user">
<h2>Creating a new user<a class="headerlink" href="#creating-a-new-user" title="Permalink to this headline"></a></h2>
<p>To create a new user, click the <span class="guilabel">Add a new user</span> link near the bottom
of the <span class="guilabel">Users</span> page (you must be a &#8220;superuser&#8221;, e.g., user &#8220;root&#8221;).
Use the textboxes and drop-downs to configure the user to your particular
needs. You can then select whether to create a database for that user and grant
specific global privileges. Once you&#8217;ve created the user (by clicking Go), you
can define that user&#8217;s permissions on a specific database (don&#8217;t grant global
privileges in that case). In general, users do not need any global privileges
(other than USAGE), only permissions for their specific database.</p>
</div>
<div class="section" id="editing-an-existing-user">
<h2>Editing an existing user<a class="headerlink" href="#editing-an-existing-user" title="Permalink to this headline"></a></h2>
<p>To edit an existing user, simply click the pencil icon to the right of that
user in the <span class="guilabel">Users</span> page. You can then edit their global- and
database-specific privileges, change their password, or even copy those
privileges to a new user.</p>
</div>
<div class="section" id="deleting-a-user">
<h2>Deleting a user<a class="headerlink" href="#deleting-a-user" title="Permalink to this headline"></a></h2>
<p>From the <span class="guilabel">Users</span> page, check the checkbox for the user you wish to
remove, select whether or not to also remove any databases of the same name (if
they exist), and click Go.</p>
</div>
<div class="section" id="assigning-privileges-to-user-for-a-specific-database">
<h2>Assigning privileges to user for a specific database<a class="headerlink" href="#assigning-privileges-to-user-for-a-specific-database" title="Permalink to this headline"></a></h2>
<p>Users are assigned to databases by editing the user record (from the
<span class="guilabel">Users</span> link on the home page) not from within the <span class="guilabel">Users</span>
link under the table. If you are creating a user specifically for a given table
you will have to create the user first (with no global privileges) and then go
back and edit that user to add the table and privileges for the individual
table.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">User management</a><ul>
<li><a class="reference internal" href="#creating-a-new-user">Creating a new user</a></li>
<li><a class="reference internal" href="#editing-an-existing-user">Editing an existing user</a></li>
<li><a class="reference internal" href="#deleting-a-user">Deleting a user</a></li>
<li><a class="reference internal" href="#assigning-privileges-to-user-for-a-specific-database">Assigning privileges to user for a specific database</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="transformations.html"
title="previous chapter">Transformations</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="other.html"
title="next chapter">Other sources of information</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/privileges.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="other.html" title="Other sources of information"
>next</a> |</li>
<li class="right" >
<a href="transformations.html" title="Transformations"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

View File

@ -0,0 +1,168 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Requirements &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<link rel="next" title="Installation" href="setup.html" />
<link rel="prev" title="Introduction" href="intro.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="setup.html" title="Installation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="intro.html" title="Introduction"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="requirements">
<span id="require"></span><h1>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline"></a></h1>
<div class="section" id="web-server">
<h2>Web server<a class="headerlink" href="#web-server" title="Permalink to this headline"></a></h2>
<p>Since, phpMyAdmin&#8217;s interface is based entirely in your browser, you&#8217;ll need a
web server (such as Apache, <a class="reference internal" href="glossary.html#term-iis"><span class="xref std std-term">IIS</span></a>) to install phpMyAdmin&#8217;s files into.</p>
</div>
<div class="section" id="php">
<h2>PHP<a class="headerlink" href="#php" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>You need PHP 5.2.0 or newer, with <code class="docutils literal"><span class="pre">session</span></code> support, the Standard PHP Library
(SPL) extension, JSON support, and the <code class="docutils literal"><span class="pre">mbstring</span></code> extension.</li>
<li>To support uploading of ZIP files, you need the PHP <code class="docutils literal"><span class="pre">zip</span></code> extension.</li>
<li>You need GD2 support in PHP to display inline thumbnails of JPEGs
(&#8220;image/jpeg: inline&#8221;) with their original aspect ratio.</li>
<li>When using the cookie authentication (the default), the <a class="reference external" href="http://www.php.net/mcrypt">mcrypt</a> extension is strongly suggested for most
users and is <strong>required</strong> for 64bit machines. Not using mcrypt will
cause phpMyAdmin to load pages significantly slower.</li>
<li>To support upload progress bars, see <a class="reference internal" href="faq.html#faq2-9"><span class="std std-ref">2.9 Seeing an upload progress bar</span></a>.</li>
<li>To support XML and Open Document Spreadsheet importing, you need PHP
5.2.17 or newer and the <a class="reference external" href="http://www.php.net/libxml">libxml</a>
extension.</li>
<li>Performance suggestion: install the <code class="docutils literal"><span class="pre">ctype</span></code> extension.</li>
</ul>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="faq.html#faq1-31"><span class="std std-ref">1.31 Does phpMyAdmin support PHP 5?</span></a>, <a class="reference internal" href="setup.html#authentication-modes"><span class="std std-ref">Using authentication modes</span></a></p>
</div>
</div>
<div class="section" id="database">
<h2>Database<a class="headerlink" href="#database" title="Permalink to this headline"></a></h2>
<p>phpMyAdmin support MySQL compatible databases.</p>
<ul class="simple">
<li>MySQL 5.0 or newer</li>
<li>MariaDB 5.0 or newer</li>
<li>Drizzle</li>
</ul>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="faq.html#faq1-17"><span class="std std-ref">1.17 Which MySQL versions does phpMyAdmin support?</span></a></p>
</div>
</div>
<div class="section" id="web-browser">
<h2>Web browser<a class="headerlink" href="#web-browser" title="Permalink to this headline"></a></h2>
<p>To access phpMyAdmin you need a web browser with cookies and javascript
enabled.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Requirements</a><ul>
<li><a class="reference internal" href="#web-server">Web server</a></li>
<li><a class="reference internal" href="#php">PHP</a></li>
<li><a class="reference internal" href="#database">Database</a></li>
<li><a class="reference internal" href="#web-browser">Web browser</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="intro.html"
title="previous chapter">Introduction</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="setup.html"
title="next chapter">Installation</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/require.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="setup.html" title="Installation"
>next</a> |</li>
<li class="right" >
<a href="intro.html" title="Introduction"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

View File

@ -0,0 +1,102 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/searchtools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="#" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
<script type="text/javascript" id="searchindexloader"></script>
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<h1 id="search-documentation">Search</h1>
<div id="fallback" class="admonition warning">
<script type="text/javascript">$('#fallback').hide();</script>
<p>
Please activate JavaScript to enable the search
functionality.
</p>
</div>
<p>
From here you can search these documents. Enter your search
words into the box below and click "search". Note that the search
function will automatically search for all of the words. Pages
containing fewer words won't appear in the result list.
</p>
<form action="" method="get">
<input type="text" name="q" value="" />
<input type="submit" value="search" />
<span id="search-progress" style="padding-left: 10px"></span>
</form>
<div id="search-results">
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,429 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Installation &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<link rel="next" title="Configuration" href="config.html" />
<link rel="prev" title="Requirements" href="require.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="config.html" title="Configuration"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="require.html" title="Requirements"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="installation">
<span id="setup"></span><h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
<p>phpMyAdmin does not apply any special security methods to the MySQL
database server. It is still the system administrator&#8217;s job to grant
permissions on the MySQL databases properly. phpMyAdmin&#8217;s <span class="guilabel">Users</span>
page can be used for this.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last"><a class="reference internal" href="glossary.html#term-mac"><span class="xref std std-term">Mac</span></a> users should note that if you are on a version before
<a class="reference internal" href="glossary.html#term-mac-os-x"><span class="xref std std-term">Mac OS X</span></a>, StuffIt unstuffs with <a class="reference internal" href="glossary.html#term-mac"><span class="xref std std-term">Mac</span></a> formats. So you&#8217;ll have
to resave as in BBEdit to Unix style ALL phpMyAdmin scripts before
uploading them to your server, as PHP seems not to like <a class="reference internal" href="glossary.html#term-mac"><span class="xref std std-term">Mac</span></a>-style
end of lines character (&#8220;<code class="docutils literal"><span class="pre">\r</span></code>&#8221;).</p>
</div>
<div class="section" id="quick-install">
<span id="id1"></span><h2>Quick Install<a class="headerlink" href="#quick-install" title="Permalink to this headline"></a></h2>
<ol class="arabic simple">
<li>Choose an appropriate distribution kit from the phpmyadmin.net
Downloads page. Some kits contain only the English messages, others
contain all languages. We&#8217;ll assume you chose a kit whose name
looks like <code class="docutils literal"><span class="pre">phpMyAdmin-x.x.x</span> <span class="pre">-all-languages.tar.gz</span></code>.</li>
<li>Untar or unzip the distribution (be sure to unzip the subdirectories):
<code class="docutils literal"><span class="pre">tar</span> <span class="pre">-xzvf</span> <span class="pre">phpMyAdmin_x.x.x-all-languages.tar.gz</span></code> in your
webserver&#8217;s document root. If you don&#8217;t have direct access to your
document root, put the files in a directory on your local machine,
and, after step 4, transfer the directory on your web server using,
for example, ftp.</li>
<li>Ensure that all the scripts have the appropriate owner (if PHP is
running in safe mode, having some scripts with an owner different from
the owner of other scripts will be a problem). See <a class="reference internal" href="faq.html#faq4-2"><span class="std std-ref">4.2 What&#8217;s the preferred way of making phpMyAdmin secure against evil access?</span></a> and
<a class="reference internal" href="faq.html#faq1-26"><span class="std std-ref">1.26 I just installed phpMyAdmin in my document root of IIS but I get the error &#8220;No input file specified&#8221; when trying to run phpMyAdmin.</span></a> for suggestions.</li>
<li>Now you must configure your installation. There are two methods that
can be used. Traditionally, users have hand-edited a copy of
<code class="file docutils literal"><span class="pre">config.inc.php</span></code>, but now a wizard-style setup script is provided
for those who prefer a graphical installation. Creating a
<code class="file docutils literal"><span class="pre">config.inc.php</span></code> is still a quick way to get started and needed for
some advanced features.</li>
</ol>
<div class="section" id="manually-creating-the-file">
<h3>Manually creating the file<a class="headerlink" href="#manually-creating-the-file" title="Permalink to this headline"></a></h3>
<p>To manually create the file, simply use your text editor to create the
file <code class="file docutils literal"><span class="pre">config.inc.php</span></code> (you can copy <code class="file docutils literal"><span class="pre">config.sample.inc.php</span></code> to get
minimal configuration file) in the main (top-level) phpMyAdmin
directory (the one that contains <code class="file docutils literal"><span class="pre">index.php</span></code>). phpMyAdmin first
loads <code class="file docutils literal"><span class="pre">libraries/config.default.php</span></code> and then overrides those values
with anything found in <code class="file docutils literal"><span class="pre">config.inc.php</span></code>. If the default value is
okay for a particular setting, there is no need to include it in
<code class="file docutils literal"><span class="pre">config.inc.php</span></code>. You&#8217;ll need a few directives to get going, a
simple configuration may look like this:</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>
<span class="c1">// use here a value of your choice at least 32 chars long</span>
<span class="nv">$cfg</span><span class="p">[</span><span class="s1">&#39;blowfish_secret&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;1{dd0`&lt;Q),5XP_:R9UK%%8\&quot;EEcyH#{o&#39;</span><span class="p">;</span>
<span class="nv">$i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span>
<span class="nv">$i</span><span class="o">++</span><span class="p">;</span>
<span class="nv">$cfg</span><span class="p">[</span><span class="s1">&#39;Servers&#39;</span><span class="p">][</span><span class="nv">$i</span><span class="p">][</span><span class="s1">&#39;auth_type&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;cookie&#39;</span><span class="p">;</span>
<span class="cp">?&gt;</span><span class="x"></span>
</pre></div>
</div>
<p>Or, if you prefer to not be prompted every time you log in:</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>
<span class="nv">$i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span>
<span class="nv">$i</span><span class="o">++</span><span class="p">;</span>
<span class="nv">$cfg</span><span class="p">[</span><span class="s1">&#39;Servers&#39;</span><span class="p">][</span><span class="nv">$i</span><span class="p">][</span><span class="s1">&#39;user&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;root&#39;</span><span class="p">;</span>
<span class="nv">$cfg</span><span class="p">[</span><span class="s1">&#39;Servers&#39;</span><span class="p">][</span><span class="nv">$i</span><span class="p">][</span><span class="s1">&#39;password&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;cbb74bc&#39;</span><span class="p">;</span> <span class="c1">// use here your password</span>
<span class="nv">$cfg</span><span class="p">[</span><span class="s1">&#39;Servers&#39;</span><span class="p">][</span><span class="nv">$i</span><span class="p">][</span><span class="s1">&#39;auth_type&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;config&#39;</span><span class="p">;</span>
<span class="cp">?&gt;</span><span class="x"></span>
</pre></div>
</div>
<p>For a full explanation of possible configuration values, see the
<a class="reference internal" href="config.html#config"><span class="std std-ref">Configuration</span></a> of this document.</p>
</div>
<div class="section" id="using-setup-script">
<span id="setup-script"></span><span id="index-0"></span><h3>Using Setup script<a class="headerlink" href="#using-setup-script" title="Permalink to this headline"></a></h3>
<p>Instead of manually editing <code class="file docutils literal"><span class="pre">config.inc.php</span></code>, you can use phpMyAdmin&#8217;s
setup feature. The file can be generated using the setup and you can download it
for upload to the server.</p>
<p>Next, open your browser and visit the location where you installed phpMyAdmin,
with the <code class="docutils literal"><span class="pre">/setup</span></code> suffix. The changes are not saved to the server, you need to
use the <span class="guilabel">Download</span> button to save them to your computer and then upload
to the server.</p>
<p>Now the file is ready to be used. You can choose to review or edit the
file with your favorite editor, if you prefer to set some advanced
options which the setup script does not provide.</p>
<ol class="arabic simple">
<li>If you are using the <code class="docutils literal"><span class="pre">auth_type</span></code> &#8220;config&#8221;, it is suggested that you
protect the phpMyAdmin installation directory because using config
does not require a user to enter a password to access the phpMyAdmin
installation. Use of an alternate authentication method is
recommended, for example with HTTPAUTH in a <a class="reference internal" href="glossary.html#term-htaccess"><span class="xref std std-term">.htaccess</span></a> file or switch to using
<code class="docutils literal"><span class="pre">auth_type</span></code> cookie or http. See the <a class="reference internal" href="faq.html#faqmultiuser"><span class="std std-ref">ISPs, multi-user installations</span></a>
for additional information, especially <a class="reference internal" href="faq.html#faq4-4"><span class="std std-ref">4.4 phpMyAdmin always gives &#8220;Access denied&#8221; when using HTTP authentication.</span></a>.</li>
<li>Open the <a class="reference external" href="index.php">main phpMyAdmin directory</a> in your browser.
phpMyAdmin should now display a welcome screen and your databases, or
a login dialog if using <a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a> or
cookie authentication mode.</li>
<li>You should deny access to the <code class="docutils literal"><span class="pre">./libraries</span></code> and <code class="docutils literal"><span class="pre">./setup/lib</span></code>
subfolders in your webserver configuration. For Apache you can use
supplied <a class="reference internal" href="glossary.html#term-htaccess"><span class="xref std std-term">.htaccess</span></a> file in that folder, for other webservers, you should
configure this yourself. Such configuration prevents from possible
path exposure and cross side scripting vulnerabilities that might
happen to be found in that code.</li>
<li>It is generally good idea to protect public phpMyAdmin installation
against access by robots as they usually can not do anything good
there. You can do this using <code class="docutils literal"><span class="pre">robots.txt</span></code> file in root of your
webserver or limit access by web server configuration, see
<a class="reference internal" href="faq.html#faq1-42"><span class="std std-ref">1.42 How can I prevent robots from accessing phpMyAdmin?</span></a>.</li>
</ol>
</div>
</div>
<div class="section" id="phpmyadmin-configuration-storage">
<span id="linked-tables"></span><span id="index-1"></span><h2>phpMyAdmin configuration storage<a class="headerlink" href="#phpmyadmin-configuration-storage" title="Permalink to this headline"></a></h2>
<p>For a whole set of new features (bookmarks, comments, <a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a>-history,
tracking mechanism, <a class="reference internal" href="glossary.html#term-pdf"><span class="xref std std-term">PDF</span></a>-generation, column contents transformation,
etc.) you need to create a set of special tables. Those tables can be located
in your own database, or in a central database for a multi-user installation
(this database would then be accessed by the controluser, so no other user
should have rights to it).</p>
<p>Please look at your <code class="docutils literal"><span class="pre">./examples/</span></code> directory, where you should find a
file called <em>create_tables.sql</em>. (If you are using a Windows server,
pay special attention to <a class="reference internal" href="faq.html#faq1-23"><span class="std std-ref">1.23 I&#8217;m running MySQL on a Win32 machine. Each time I create a new table the table and column names are changed to lowercase!</span></a>).</p>
<p>If you already had this infrastructure and upgraded to MySQL 4.1.2 or
newer, please use <code class="file docutils literal"><span class="pre">examples/upgrade_tables_mysql_4_1_2+.sql</span></code>
and then create new tables by importing
<code class="file docutils literal"><span class="pre">examples/create_tables.sql</span></code>.</p>
<p>You can use your phpMyAdmin to create the tables for you. Please be
aware that you may need special (administrator) privileges to create
the database and tables, and that the script may need some tuning,
depending on the database name.</p>
<p>After having imported the <code class="file docutils literal"><span class="pre">examples/create_tables.sql</span></code> file, you
should specify the table names in your <code class="file docutils literal"><span class="pre">config.inc.php</span></code> file. The
directives used for that can be found in the <a class="reference internal" href="config.html#config"><span class="std std-ref">Configuration</span></a>. You will also need to
have a controluser with the proper rights to those tables (see section
<a class="reference internal" href="#authentication-modes"><span class="std std-ref">Using authentication modes</span></a> below).</p>
</div>
<div class="section" id="upgrading-from-an-older-version">
<span id="upgrading"></span><h2>Upgrading from an older version<a class="headerlink" href="#upgrading-from-an-older-version" title="Permalink to this headline"></a></h2>
<p>Simply copy <code class="file docutils literal"><span class="pre">config.inc.php</span></code> from your previous installation into
the newly unpacked one. Configuration files from old versions may
require some tweaking as some options have been changed or removed.
For compatibility with PHP 6, remove a
<code class="docutils literal"><span class="pre">set_magic_quotes_runtime(0);</span></code> statement that you might find near
the end of your configuration file.</p>
<p>You should <strong>not</strong> copy <code class="file docutils literal"><span class="pre">libraries/config.default.php</span></code> over
<code class="file docutils literal"><span class="pre">config.inc.php</span></code> because the default configuration file is version-
specific.</p>
<p>If you have upgraded your MySQL server from a version previous to 4.1.2 to
version 5.x or newer and if you use the phpMyAdmin configuration storage, you
should run the <a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a> script found in
<code class="file docutils literal"><span class="pre">examples/upgrade_tables_mysql_4_1_2+.sql</span></code>.</p>
</div>
<div class="section" id="using-authentication-modes">
<span id="authentication-modes"></span><span id="index-2"></span><h2>Using authentication modes<a class="headerlink" href="#using-authentication-modes" title="Permalink to this headline"></a></h2>
<p><a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a> and cookie authentication modes are recommended in a <strong>multi-user
environment</strong> where you want to give users access to their own database and
don&#8217;t want them to play around with others. Nevertheless be aware that MS
Internet Explorer seems to be really buggy about cookies, at least till version
6. Even in a <strong>single-user environment</strong>, you might prefer to use <a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a>
or cookie mode so that your user/password pair are not in clear in the
configuration file.</p>
<p><a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a> and cookie authentication
modes are more secure: the MySQL login information does not need to be
set in the phpMyAdmin configuration file (except possibly for the
<span class="target" id="index-3"></span><a class="reference internal" href="config.html#cfg_Servers_controluser"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['controluser']</span></code></a>).
However, keep in mind that the password travels in plain text, unless
you are using the HTTPS protocol. In cookie mode, the password is
stored, encrypted with the blowfish algorithm, in a temporary cookie.</p>
<p>For &#8216;<a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a>&#8216; and &#8216;cookie&#8217; modes, phpMyAdmin needs a controluser that has
<strong>only</strong> the <code class="docutils literal"><span class="pre">SELECT</span></code> privilege on the <em>`mysql`.`user` (all columns except
`Password`)</em>, <em>`mysql`.`db` (all columns)</em>, <em>`mysql`.`host` (all columns)</em> and
<em>`mysql`.`tables_priv` (all columns except `Grantor` and `Timestamp`)</em> tables.
You must specify the details for the controluser in the <code class="file docutils literal"><span class="pre">config.inc.php</span></code>
file under the <span class="target" id="index-4"></span><a class="reference internal" href="config.html#cfg_Servers_controluser"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['controluser']</span></code></a> and
<span class="target" id="index-5"></span><a class="reference internal" href="config.html#cfg_Servers_controlpass"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['controlpass']</span></code></a> settings. The following
example assumes you want to use <code class="docutils literal"><span class="pre">pma</span></code> as the controluser and <code class="docutils literal"><span class="pre">pmapass</span></code> as
the controlpass, but <strong>this is only an example: use something else in your
file!</strong> Input these statements from the phpMyAdmin <a class="reference internal" href="glossary.html#term-sql"><span class="xref std std-term">SQL</span></a> Query window or
mysql commandline client. Of course you have to replace <code class="docutils literal"><span class="pre">localhost</span></code> with the
webserver&#8217;s host if it&#8217;s not the same as the MySQL server&#8217;s one.</p>
<p>If you want to use the many new relation and bookmark features: (this of
course requires that your <a class="reference internal" href="#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a> be set up).</p>
<div class="highlight-mysql"><div class="highlight"><pre><span class="k">GRANT</span> <span class="k">USAGE</span> <span class="k">ON</span> <span class="n">mysql</span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">&#39;pma&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span> <span class="n">IDENTIFIED</span> <span class="k">BY</span> <span class="s1">&#39;pmapass&#39;</span><span class="p">;</span>
<span class="k">GRANT</span> <span class="k">SELECT</span> <span class="p">(</span>
<span class="n">Host</span><span class="p">,</span> <span class="n">User</span><span class="p">,</span> <span class="n">Select_priv</span><span class="p">,</span> <span class="n">Insert_priv</span><span class="p">,</span> <span class="n">Update_priv</span><span class="p">,</span> <span class="n">Delete_priv</span><span class="p">,</span>
<span class="n">Create_priv</span><span class="p">,</span> <span class="n">Drop_priv</span><span class="p">,</span> <span class="n">Reload_priv</span><span class="p">,</span> <span class="n">Shutdown_priv</span><span class="p">,</span> <span class="n">Process_priv</span><span class="p">,</span>
<span class="n">File_priv</span><span class="p">,</span> <span class="n">Grant_priv</span><span class="p">,</span> <span class="n">References_priv</span><span class="p">,</span> <span class="n">Index_priv</span><span class="p">,</span> <span class="n">Alter_priv</span><span class="p">,</span>
<span class="n">Show_db_priv</span><span class="p">,</span> <span class="n">Super_priv</span><span class="p">,</span> <span class="n">Create_tmp_table_priv</span><span class="p">,</span> <span class="n">Lock_tables_priv</span><span class="p">,</span>
<span class="n">Execute_priv</span><span class="p">,</span> <span class="n">Repl_slave_priv</span><span class="p">,</span> <span class="n">Repl_client_priv</span>
<span class="p">)</span> <span class="k">ON</span> <span class="n">mysql</span><span class="p">.</span><span class="n">user</span> <span class="k">TO</span> <span class="s1">&#39;pma&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span><span class="p">;</span>
<span class="k">GRANT</span> <span class="k">SELECT</span> <span class="k">ON</span> <span class="n">mysql</span><span class="p">.</span><span class="n">db</span> <span class="k">TO</span> <span class="s1">&#39;pma&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span><span class="p">;</span>
<span class="k">GRANT</span> <span class="k">SELECT</span> <span class="k">ON</span> <span class="n">mysql</span><span class="p">.</span><span class="n">host</span> <span class="k">TO</span> <span class="s1">&#39;pma&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span><span class="p">;</span>
<span class="k">GRANT</span> <span class="k">SELECT</span> <span class="p">(</span><span class="n">Host</span><span class="p">,</span> <span class="n">Db</span><span class="p">,</span> <span class="n">User</span><span class="p">,</span> <span class="n">Table_name</span><span class="p">,</span> <span class="n">Table_priv</span><span class="p">,</span> <span class="n">Column_priv</span><span class="p">)</span>
<span class="k">ON</span> <span class="n">mysql</span><span class="p">.</span><span class="n">tables_priv</span> <span class="k">TO</span> <span class="s1">&#39;pma&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span><span class="p">;</span>
</pre></div>
</div>
<p>If you want to use the many new relation and bookmark features:</p>
<div class="highlight-mysql"><div class="highlight"><pre><span class="k">GRANT</span> <span class="k">SELECT</span><span class="p">,</span> <span class="k">INSERT</span><span class="p">,</span> <span class="k">UPDATE</span><span class="p">,</span> <span class="k">DELETE</span> <span class="k">ON</span> <span class="o">&lt;</span><span class="n">pma_db</span><span class="o">&gt;</span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">&#39;pma&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span><span class="p">;</span>
</pre></div>
</div>
<p>(this of course requires that your phpMyAdmin
configuration storage be set up).</p>
<p>Then each of the <em>true</em> users should be granted a set of privileges
on a set of particular databases. Normally you shouldn&#8217;t give global
privileges to an ordinary user, unless you understand the impact of those
privileges (for example, you are creating a superuser).
For example, to grant the user <em>real_user</em> with all privileges on
the database <em>user_base</em>:</p>
<div class="highlight-mysql"><div class="highlight"><pre><span class="k">GRANT</span> <span class="k">ALL</span> <span class="n">PRIVILEGES</span> <span class="k">ON</span> <span class="n">user_base</span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">&#39;real_user&#39;</span><span class="o">@</span><span class="n">localhost</span> <span class="n">IDENTIFIED</span> <span class="k">BY</span> <span class="s1">&#39;real_password&#39;</span><span class="p">;</span>
</pre></div>
</div>
<p>What the user may now do is controlled entirely by the MySQL user management
system. With HTTP or cookie authentication mode, you don&#8217;t need to fill the
user/password fields inside the <span class="target" id="index-6"></span><a class="reference internal" href="config.html#cfg_Servers"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers']</span></code></a>.</p>
<div class="section" id="http-authentication-mode">
<span id="index-7"></span><h3>HTTP authentication mode<a class="headerlink" href="#http-authentication-mode" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Uses <a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a> Basic authentication
method and allows you to log in as any valid MySQL user.</li>
<li>Is supported with most PHP configurations. For <a class="reference internal" href="glossary.html#term-iis"><span class="xref std std-term">IIS</span></a> (<a class="reference internal" href="glossary.html#term-isapi"><span class="xref std std-term">ISAPI</span></a>)
support using <a class="reference internal" href="glossary.html#term-cgi"><span class="xref std std-term">CGI</span></a> PHP see <a class="reference internal" href="faq.html#faq1-32"><span class="std std-ref">1.32 Can I use HTTP authentication with IIS?</span></a>, for using with Apache
<a class="reference internal" href="glossary.html#term-cgi"><span class="xref std std-term">CGI</span></a> see <a class="reference internal" href="faq.html#faq1-35"><span class="std std-ref">1.35 Can I use HTTP authentication with Apache CGI?</span></a>.</li>
<li>See also <a class="reference internal" href="faq.html#faq4-4"><span class="std std-ref">4.4 phpMyAdmin always gives &#8220;Access denied&#8221; when using HTTP authentication.</span></a> about not using the <a class="reference internal" href="glossary.html#term-htaccess"><span class="xref std std-term">.htaccess</span></a> mechanism along with
&#8216;<a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a>&#8216; authentication mode.</li>
</ul>
</div>
<div class="section" id="cookie-authentication-mode">
<span id="cookie"></span><span id="index-8"></span><h3>Cookie authentication mode<a class="headerlink" href="#cookie-authentication-mode" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>You can use this method as a replacement for the <a class="reference internal" href="glossary.html#term-http"><span class="xref std std-term">HTTP</span></a> authentication
(for example, if you&#8217;re running <a class="reference internal" href="glossary.html#term-iis"><span class="xref std std-term">IIS</span></a>).</li>
<li>Obviously, the user must enable cookies in the browser, but this is
now a requirement for all authentication modes.</li>
<li>With this mode, the user can truly log out of phpMyAdmin and log in
back with the same username.</li>
<li>If you want to log in to arbitrary server see <span class="target" id="index-9"></span><a class="reference internal" href="config.html#cfg_AllowArbitraryServer"><code class="xref config config-option docutils literal"><span class="pre">$cfg['AllowArbitraryServer']</span></code></a> directive.</li>
<li>As mentioned in the <a class="reference internal" href="require.html#require"><span class="std std-ref">Requirements</span></a> section, having the <code class="docutils literal"><span class="pre">mcrypt</span></code> extension will
speed up access considerably, but is not required.</li>
</ul>
</div>
<div class="section" id="signon-authentication-mode">
<span id="index-10"></span><h3>Signon authentication mode<a class="headerlink" href="#signon-authentication-mode" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>This mode is a convenient way of using credentials from another
application to authenticate to phpMyAdmin.</li>
<li>The other application has to store login information into session
data.</li>
</ul>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><span class="target" id="index-11"></span><a class="reference internal" href="config.html#cfg_Servers_auth_type"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['auth_type']</span></code></a>,
<span class="target" id="index-12"></span><a class="reference internal" href="config.html#cfg_Servers_SignonSession"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['SignonSession']</span></code></a>,
<span class="target" id="index-13"></span><a class="reference internal" href="config.html#cfg_Servers_SignonScript"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['SignonScript']</span></code></a>,
<span class="target" id="index-14"></span><a class="reference internal" href="config.html#cfg_Servers_SignonURL"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['SignonURL']</span></code></a></p>
</div>
</div>
<div class="section" id="config-authentication-mode">
<span id="index-15"></span><h3>Config authentication mode<a class="headerlink" href="#config-authentication-mode" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>This mode is the less secure one because it requires you to fill the
<span class="target" id="index-16"></span><a class="reference internal" href="config.html#cfg_Servers_user"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['user']</span></code></a> and
<span class="target" id="index-17"></span><a class="reference internal" href="config.html#cfg_Servers_password"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['password']</span></code></a>
fields (and as a result, anyone who can read your <code class="file docutils literal"><span class="pre">config.inc.php</span></code>
can discover your username and password). But you don&#8217;t need to setup
a &#8220;controluser&#8221; here: using the <span class="target" id="index-18"></span><a class="reference internal" href="config.html#cfg_Servers_only_db"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['only_db']</span></code></a> might be enough.</li>
<li>In the <a class="reference internal" href="faq.html#faqmultiuser"><span class="std std-ref">ISPs, multi-user installations</span></a> section, there is an entry explaining how
to protect your configuration file.</li>
<li>For additional security in this mode, you may wish to consider the
Host authentication <span class="target" id="index-19"></span><a class="reference internal" href="config.html#cfg_Servers_AllowDeny_order"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['AllowDeny']['order']</span></code></a>
and <span class="target" id="index-20"></span><a class="reference internal" href="config.html#cfg_Servers_AllowDeny_rules"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['AllowDeny']['rules']</span></code></a> configuration directives.</li>
<li>Unlike cookie and http, does not require a user to log in when first
loading the phpMyAdmin site. This is by design but could allow any
user to access your installation. Use of some restriction method is
suggested, perhaps a <a class="reference internal" href="glossary.html#term-htaccess"><span class="xref std std-term">.htaccess</span></a> file with the HTTP-AUTH directive or disallowing
incoming HTTP requests at ones router or firewall will suffice (both
of which are beyond the scope of this manual but easily searchable
with Google).</li>
</ul>
</div>
</div>
<div class="section" id="securing-your-phpmyadmin-installation">
<h2>Securing your phpMyAdmin installation<a class="headerlink" href="#securing-your-phpmyadmin-installation" title="Permalink to this headline"></a></h2>
<p>The phpMyAdmin team tries hardly to make the application secure, however there
are always ways to make your installation more secure:</p>
<ul class="simple">
<li>remove <code class="docutils literal"><span class="pre">setup</span></code> directory from phpMyAdmin, you will probably not
use it after initial setup</li>
<li>prevent access to <code class="docutils literal"><span class="pre">libraries</span></code> directory from browser,
as it is not needed, supplied <code class="docutils literal"><span class="pre">.htaccess</span></code> file does this</li>
<li>properly choose authentication method - <a class="reference internal" href="#cookie"><span class="std std-ref">Cookie authentication mode</span></a>
is probably the best choice for shared hosting</li>
<li>in case you don&#8217;t want all MySQL users to be able to access
phpMyAdmin, you can use <span class="target" id="index-21"></span><a class="reference internal" href="config.html#cfg_Servers_AllowDeny_rules"><code class="xref config config-option docutils literal"><span class="pre">$cfg['Servers'][$i]['AllowDeny']['rules']</span></code></a> to limit them</li>
<li>consider hiding phpMyAdmin behind authentication proxy, so that
MySQL credentials are not all users need to login</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Installation</a><ul>
<li><a class="reference internal" href="#quick-install">Quick Install</a><ul>
<li><a class="reference internal" href="#manually-creating-the-file">Manually creating the file</a></li>
<li><a class="reference internal" href="#using-setup-script">Using Setup script</a></li>
</ul>
</li>
<li><a class="reference internal" href="#phpmyadmin-configuration-storage">phpMyAdmin configuration storage</a></li>
<li><a class="reference internal" href="#upgrading-from-an-older-version">Upgrading from an older version</a></li>
<li><a class="reference internal" href="#using-authentication-modes">Using authentication modes</a><ul>
<li><a class="reference internal" href="#http-authentication-mode">HTTP authentication mode</a></li>
<li><a class="reference internal" href="#cookie-authentication-mode">Cookie authentication mode</a></li>
<li><a class="reference internal" href="#signon-authentication-mode">Signon authentication mode</a></li>
<li><a class="reference internal" href="#config-authentication-mode">Config authentication mode</a></li>
</ul>
</li>
<li><a class="reference internal" href="#securing-your-phpmyadmin-installation">Securing your phpMyAdmin installation</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="require.html"
title="previous chapter">Requirements</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="config.html"
title="next chapter">Configuration</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/setup.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="config.html" title="Configuration"
>next</a> |</li>
<li class="right" >
<a href="require.html" title="Requirements"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

View File

@ -0,0 +1,239 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Transformations &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<link rel="up" title="User Guide" href="user.html" />
<link rel="next" title="User management" href="privileges.html" />
<link rel="prev" title="User Guide" href="user.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="privileges.html" title="User management"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="user.html" title="User Guide"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="transformations">
<span id="id1"></span><h1>Transformations<a class="headerlink" href="#transformations" title="Permalink to this headline"></a></h1>
<div class="section" id="introduction">
<span id="transformationsintro"></span><h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h2>
<p>To enable transformations, you have to setup the <code class="docutils literal"><span class="pre">column_info</span></code>
table and the proper directives. Please see the <a class="reference internal" href="config.html#config"><span class="std std-ref">Configuration</span></a> on how to do so.</p>
<p>You can apply different transformations to the contents of each
column. The transformation will take the content of each column and
transform it with certain rules defined in the selected
transformation.</p>
<p>Say you have a column &#8216;filename&#8217; which contains a filename. Normally
you would see in phpMyAdmin only this filename. Using transformations
you can transform that filename into a HTML link, so you can click
inside of the phpMyAdmin structure on the column&#8217;s link and will see
the file displayed in a new browser window. Using transformation
options you can also specify strings to append/prepend to a string or
the format you want the output stored in.</p>
<p>For a general overview of all available transformations and their
options, you can consult your <em>&lt;www.your-host.com&gt;/&lt;your-install-
dir&gt;/transformation_overview.php</em> installation.</p>
<p>For a tutorial on how to effectively use transformations, see our
<a class="reference external" href="https://www.phpmyadmin.net/home_page/docs.php">Link section</a> on the
official phpMyAdmin homepage.</p>
</div>
<div class="section" id="usage">
<span id="transformationshowto"></span><h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline"></a></h2>
<p>Go to your <em>tbl_structure.php</em> page (i.e. reached through clicking on
the &#8216;Structure&#8217; link for a table). There click on &#8220;Change&#8221; (or change
icon) and there you will see three new fields at the end of the line.
They are called &#8216;MIME-type&#8217;, &#8216;Browser transformation&#8217; and
&#8216;Transformation options&#8217;.</p>
<ul class="simple">
<li>The field &#8216;MIME-type&#8217; is a drop-down field. Select the MIME-type that
corresponds to the column&#8217;s contents. Please note that transformations
are inactive as long as no MIME-type is selected.</li>
<li>The field &#8216;Browser transformation&#8217; is a drop-down field. You can
choose from a hopefully growing amount of pre-defined transformations.
See below for information on how to build your own transformation.
There are global transformations and mimetype-bound transformations.
Global transformations can be used for any mimetype. They will take
the mimetype, if necessary, into regard. Mimetype-bound
transformations usually only operate on a certain mimetype. There are
transformations which operate on the main mimetype (like &#8216;image&#8217;),
which will most likely take the subtype into regard, and those who
only operate on a specific subtype (like &#8216;image/jpeg&#8217;). You can use
transformations on mimetypes for which the function was not defined
for. There is no security check for you selected the right
transformation, so take care of what the output will be like.</li>
<li>The field &#8216;Transformation options&#8217; is a free-type textfield. You have
to enter transform-function specific options here. Usually the
transforms can operate with default options, but it is generally a
good idea to look up the overview to see which options are necessary.
Much like the ENUM/SET-Fields, you have to split up several options
using the format &#8216;a&#8217;,&#8217;b&#8217;,&#8217;c&#8217;,...(NOTE THE MISSING BLANKS). This is
because internally the options will be parsed as an array, leaving the
first value the first element in the array, and so forth. If you want
to specify a MIME character set you can define it in the
transformation_options. You have to put that outside of the pre-
defined options of the specific mime-transform, as the last value of
the set. Use the format &#8220;&#8217;; charset=XXX&#8217;&#8221;. If you use a transform, for
which you can specify 2 options and you want to append a character
set, enter &#8220;&#8216;first parameter&#8217;,&#8217;second parameter&#8217;,&#8217;charset=us-ascii&#8217;&#8221;.
You can, however use the defaults for the parameters: &#8220;&#8217;&#8216;,&#8217;&#8216;,&#8217;charset
=us-ascii&#8217;&#8221;.</li>
</ul>
</div>
<div class="section" id="file-structure">
<span id="transformationsfiles"></span><h2>File structure<a class="headerlink" href="#file-structure" title="Permalink to this headline"></a></h2>
<p>All specific transformations for mimetypes are defined through class
files in the directory &#8216;libraries/plugins/transformations/&#8217;. Each of
them extends a certain transformation abstract class declared in
libraries/plugins/transformations/abstract.</p>
<p>They are stored in files to ease up customization and easy adding of
new transformations.</p>
<p>Because the user cannot enter own mimetypes, it is kept sure that
transformations always work. It makes no sense to apply a
transformation to a mimetype the transform-function doesn&#8217;t know to
handle.</p>
<p>There is a file called &#8216;<em>transformations.lib.php</em>&#8216; that provides some
basic functions which can be included by any other transform function.</p>
<p>The file name convention is <code class="docutils literal"><span class="pre">[Mimetype]_[Subtype]_[Transformation</span>
<span class="pre">Name].class.php</span></code>, while the abtract class that it extends has the
name <code class="docutils literal"><span class="pre">[Transformation</span> <span class="pre">Name]TransformationsPlugin</span></code>. All of the
methods that have to be implemented by a transformations plug-in are:</p>
<ol class="arabic simple">
<li>getMIMEType() and getMIMESubtype() in the main class;</li>
<li>getName(), getInfo() and applyTransformation() in the abstract class
it extends.</li>
</ol>
<p>The getMIMEType(), getMIMESubtype() and getName() methods return the
name of the MIME type, MIME Subtype and transformation accordingly.
getInfo() returns the transformation&#8217;s description and possible
options it may receive and applyTransformation() is the method that
does the actual work of the transformation plug-in.</p>
<p>Please see the libraries/plugins/transformations/TEMPLATE and
libraries/plugins/transformations/TEMPLATE_ABSTRACT files for adding
your own transformation plug-in. You can also generate a new
transformation plug-in (with or without the abstract transformation
class), by using
<code class="file docutils literal"><span class="pre">libraries/plugins/transformations/generator_plugin.sh</span></code> or
<code class="file docutils literal"><span class="pre">libraries/plugins/transformations/generator_main_class.sh</span></code>.</p>
<p>The applyTransformation() method always gets passed three variables:</p>
<ol class="arabic simple">
<li><strong>$buffer</strong> - Contains the text inside of the column. This is the
text, you want to transform.</li>
<li><strong>$options</strong> - Contains any user-passed options to a transform
function as an array.</li>
<li><strong>$meta</strong> - Contains an object with information about your column. The
data is drawn from the output of the <a class="reference external" href="http://www.php.net/mysql_fetch_field">mysql_fetch_field()</a> function. This means, all
object properties described on the <a class="reference external" href="http://www.php.net/mysql_fetch_field">manual page</a> are available in this
variable and can be used to transform a column accordingly to
unsigned/zerofill/not_null/... properties. The $meta-&gt;mimetype
variable contains the original MIME-type of the column (i.e.
&#8216;text/plain&#8217;, &#8216;image/jpeg&#8217; etc.)</li>
</ol>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Transformations</a><ul>
<li><a class="reference internal" href="#introduction">Introduction</a></li>
<li><a class="reference internal" href="#usage">Usage</a></li>
<li><a class="reference internal" href="#file-structure">File structure</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="user.html"
title="previous chapter">User Guide</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="privileges.html"
title="next chapter">User management</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/transformations.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="privileges.html" title="User management"
>next</a> |</li>
<li class="right" >
<a href="user.html" title="User Guide"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

View File

@ -0,0 +1,134 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>User Guide &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<link rel="next" title="Transformations" href="transformations.html" />
<link rel="prev" title="Configuration" href="config.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="transformations.html" title="Transformations"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="config.html" title="Configuration"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="user-guide">
<h1>User Guide<a class="headerlink" href="#user-guide" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="transformations.html">Transformations</a><ul>
<li class="toctree-l2"><a class="reference internal" href="transformations.html#introduction">Introduction</a></li>
<li class="toctree-l2"><a class="reference internal" href="transformations.html#usage">Usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="transformations.html#file-structure">File structure</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="privileges.html">User management</a><ul>
<li class="toctree-l2"><a class="reference internal" href="privileges.html#creating-a-new-user">Creating a new user</a></li>
<li class="toctree-l2"><a class="reference internal" href="privileges.html#editing-an-existing-user">Editing an existing user</a></li>
<li class="toctree-l2"><a class="reference internal" href="privileges.html#deleting-a-user">Deleting a user</a></li>
<li class="toctree-l2"><a class="reference internal" href="privileges.html#assigning-privileges-to-user-for-a-specific-database">Assigning privileges to user for a specific database</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="other.html">Other sources of information</a><ul>
<li class="toctree-l2"><a class="reference internal" href="other.html#printed-book">Printed Book</a></li>
<li class="toctree-l2"><a class="reference internal" href="other.html#tutorials">Tutorials</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="config.html"
title="previous chapter">Configuration</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="transformations.html"
title="next chapter">Transformations</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/user.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="transformations.html" title="Transformations"
>next</a> |</li>
<li class="right" >
<a href="config.html" title="Configuration"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

View File

@ -0,0 +1,146 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Distributing and packaging phpMyAdmin &#8212; phpMyAdmin 4.0.10.20 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '4.0.10.20',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="top" title="phpMyAdmin 4.0.10.20 documentation" href="index.html" />
<link rel="next" title="Copyright" href="copyright.html" />
<link rel="prev" title="Developers Information" href="developers.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="copyright.html" title="Copyright"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="developers.html" title="Developers Information"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="distributing-and-packaging-phpmyadmin">
<h1>Distributing and packaging phpMyAdmin<a class="headerlink" href="#distributing-and-packaging-phpmyadmin" title="Permalink to this headline"></a></h1>
<p>This document is intended to give advices to people who want to
redistribute phpMyAdmin inside other software package such as Linux
distribution or some all in one package including web server and MySQL
server.</p>
<p>Generally you can customize some basic aspects (paths to some files and
behavior) in <code class="file docutils literal"><span class="pre">libraries/vendor_config.php</span></code>.</p>
<p>For example if you want setup script to generate config file in var, change
<code class="docutils literal"><span class="pre">SETUP_CONFIG_FILE</span></code> to <code class="file docutils literal"><span class="pre">/var/lib/phpmyadmin/config.inc.php</span></code> and you
will also probably want to skip directory writable check, so set
<code class="docutils literal"><span class="pre">SETUP_DIR_WRITABLE</span></code> to false.</p>
<div class="section" id="external-libraries">
<h2>External libraries<a class="headerlink" href="#external-libraries" title="Permalink to this headline"></a></h2>
<p>phpMyAdmin includes several external libraries, you might want to
replace them with system ones if they are available, but please note
that you should test whether version you provide is compatible with the
one we ship.</p>
<p>Currently known list of external libraries:</p>
<dl class="docutils">
<dt>js/jquery</dt>
<dd>jQuery js framework and various jQuery based libraries.</dd>
<dt>libraries/php-gettext</dt>
<dd>php-gettext library</dd>
<dt>libraries/tcpdf</dt>
<dd>tcpdf library, stripped down of not needed files</dd>
</dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Distributing and packaging phpMyAdmin</a><ul>
<li><a class="reference internal" href="#external-libraries">External libraries</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="developers.html"
title="previous chapter">Developers Information</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="copyright.html"
title="next chapter">Copyright</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/vendors.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="copyright.html" title="Copyright"
>next</a> |</li>
<li class="right" >
<a href="developers.html" title="Developers Information"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.0.10.20 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2013, The phpMyAdmin devel team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</div>
</body>
</html>

View File

@ -0,0 +1,46 @@
<?php
/**
* This example configuration shows how to configure phpMyAdmin for
* many hosts that all have identical configuration otherwise. To add
* a new host, just drop it into $hosts below. Contributed by
* Matthew Hawkins.
*/
$i=0;
$hosts = array (
"foo.example.com",
"bar.example.com",
"baz.example.com",
"quux.example.com",
);
foreach ($hosts as $host) {
$i++;
$cfg['Servers'][$i]['host'] = $host;
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['only_db'] = '';
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
}

View File

@ -0,0 +1,241 @@
-- --------------------------------------------------------
-- SQL Commands to set up the pmadb as described in the documentation.
--
-- This file is meant for use with MySQL 5 and above!
--
-- This script expects the user pma to already be existing. If we would put a
-- line here to create him too many users might just use this script and end
-- up with having the same password for the controluser.
--
-- This user "pma" must be defined in config.inc.php (controluser/controlpass)
--
-- Please don't forget to set up the tablenames in config.inc.php
--
-- --------------------------------------------------------
--
-- Database : `phpmyadmin`
--
CREATE DATABASE IF NOT EXISTS `phpmyadmin`
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
USE phpmyadmin;
-- --------------------------------------------------------
--
-- Privileges
--
-- (activate this statement if necessary)
-- GRANT SELECT, INSERT, DELETE, UPDATE ON `phpmyadmin`.* TO
-- 'pma'@localhost;
-- --------------------------------------------------------
--
-- Table structure for table `pma__bookmark`
--
CREATE TABLE IF NOT EXISTS `pma__bookmark` (
`id` int(11) NOT NULL auto_increment,
`dbase` varchar(255) NOT NULL default '',
`user` varchar(255) NOT NULL default '',
`label` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
`query` text NOT NULL,
PRIMARY KEY (`id`)
)
COMMENT='Bookmarks'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__column_info`
--
CREATE TABLE IF NOT EXISTS `pma__column_info` (
`id` int(5) unsigned NOT NULL auto_increment,
`db_name` varchar(64) NOT NULL default '',
`table_name` varchar(64) NOT NULL default '',
`column_name` varchar(64) NOT NULL default '',
`comment` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
`mimetype` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
`transformation` varchar(255) NOT NULL default '',
`transformation_options` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)
)
COMMENT='Column information for phpMyAdmin'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__history`
--
CREATE TABLE IF NOT EXISTS `pma__history` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`username` varchar(64) NOT NULL default '',
`db` varchar(64) NOT NULL default '',
`table` varchar(64) NOT NULL default '',
`timevalue` timestamp NOT NULL,
`sqlquery` text NOT NULL,
PRIMARY KEY (`id`),
KEY `username` (`username`,`db`,`table`,`timevalue`)
)
COMMENT='SQL history for phpMyAdmin'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__pdf_pages`
--
CREATE TABLE IF NOT EXISTS `pma__pdf_pages` (
`db_name` varchar(64) NOT NULL default '',
`page_nr` int(10) unsigned NOT NULL auto_increment,
`page_descr` varchar(50) COLLATE utf8_general_ci NOT NULL default '',
PRIMARY KEY (`page_nr`),
KEY `db_name` (`db_name`)
)
COMMENT='PDF relation pages for phpMyAdmin'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__recent`
--
CREATE TABLE IF NOT EXISTS `pma__recent` (
`username` varchar(64) NOT NULL,
`tables` text NOT NULL,
PRIMARY KEY (`username`)
)
COMMENT='Recently accessed tables'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__table_uiprefs`
--
CREATE TABLE IF NOT EXISTS `pma__table_uiprefs` (
`username` varchar(64) NOT NULL,
`db_name` varchar(64) NOT NULL,
`table_name` varchar(64) NOT NULL,
`prefs` text NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`username`,`db_name`,`table_name`)
)
COMMENT='Tables'' UI preferences'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__relation`
--
CREATE TABLE IF NOT EXISTS `pma__relation` (
`master_db` varchar(64) NOT NULL default '',
`master_table` varchar(64) NOT NULL default '',
`master_field` varchar(64) NOT NULL default '',
`foreign_db` varchar(64) NOT NULL default '',
`foreign_table` varchar(64) NOT NULL default '',
`foreign_field` varchar(64) NOT NULL default '',
PRIMARY KEY (`master_db`,`master_table`,`master_field`),
KEY `foreign_field` (`foreign_db`,`foreign_table`)
)
COMMENT='Relation table'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__table_coords`
--
CREATE TABLE IF NOT EXISTS `pma__table_coords` (
`db_name` varchar(64) NOT NULL default '',
`table_name` varchar(64) NOT NULL default '',
`pdf_page_number` int(11) NOT NULL default '0',
`x` float unsigned NOT NULL default '0',
`y` float unsigned NOT NULL default '0',
PRIMARY KEY (`db_name`,`table_name`,`pdf_page_number`)
)
COMMENT='Table coordinates for phpMyAdmin PDF output'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__table_info`
--
CREATE TABLE IF NOT EXISTS `pma__table_info` (
`db_name` varchar(64) NOT NULL default '',
`table_name` varchar(64) NOT NULL default '',
`display_field` varchar(64) NOT NULL default '',
PRIMARY KEY (`db_name`,`table_name`)
)
COMMENT='Table information for phpMyAdmin'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__designer_coords`
--
CREATE TABLE IF NOT EXISTS `pma__designer_coords` (
`db_name` varchar(64) NOT NULL default '',
`table_name` varchar(64) NOT NULL default '',
`x` INT,
`y` INT,
`v` TINYINT,
`h` TINYINT,
PRIMARY KEY (`db_name`,`table_name`)
)
COMMENT='Table coordinates for Designer'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__tracking`
--
CREATE TABLE IF NOT EXISTS `pma__tracking` (
`db_name` varchar(64) NOT NULL,
`table_name` varchar(64) NOT NULL,
`version` int(10) unsigned NOT NULL,
`date_created` datetime NOT NULL,
`date_updated` datetime NOT NULL,
`schema_snapshot` text NOT NULL,
`schema_sql` text,
`data_sql` longtext,
`tracking` set('UPDATE','REPLACE','INSERT','DELETE','TRUNCATE','CREATE DATABASE','ALTER DATABASE','DROP DATABASE','CREATE TABLE','ALTER TABLE','RENAME TABLE','DROP TABLE','CREATE INDEX','DROP INDEX','CREATE VIEW','ALTER VIEW','DROP VIEW') default NULL,
`tracking_active` int(1) unsigned NOT NULL default '1',
PRIMARY KEY (`db_name`,`table_name`,`version`)
)
COMMENT='Database changes tracking for phpMyAdmin'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__userconfig`
--
CREATE TABLE IF NOT EXISTS `pma__userconfig` (
`username` varchar(64) NOT NULL,
`timevalue` timestamp NOT NULL,
`config_data` text NOT NULL,
PRIMARY KEY (`username`)
)
COMMENT='User preferences storage for phpMyAdmin'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;

View File

@ -0,0 +1,227 @@
-- --------------------------------------------------------
-- SQL Commands to set up the pmadb as described in the documentation.
--
-- This file is meant for use with Drizzle 2011.03.13 and above!
--
-- This script expects that you take care of database permissions.
--
-- Please don't forget to set up the tablenames in config.inc.php
--
-- --------------------------------------------------------
--
-- Database : `phpmyadmin`
--
CREATE DATABASE IF NOT EXISTS `phpmyadmin`
COLLATE utf8_bin;
USE phpmyadmin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__bookmark`
--
CREATE TABLE IF NOT EXISTS `pma__bookmark` (
`id` int(11) NOT NULL auto_increment,
`dbase` varchar(255) NOT NULL default '',
`user` varchar(255) NOT NULL default '',
`label` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
`query` text NOT NULL,
PRIMARY KEY (`id`)
)
COMMENT='Bookmarks'
COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__column_info`
--
CREATE TABLE IF NOT EXISTS `pma__column_info` (
`id` int(5) NOT NULL auto_increment,
`db_name` varchar(64) NOT NULL default '',
`table_name` varchar(64) NOT NULL default '',
`column_name` varchar(64) NOT NULL default '',
`comment` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
`mimetype` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
`transformation` varchar(255) NOT NULL default '',
`transformation_options` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)
)
COMMENT='Column information for phpMyAdmin'
COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__history`
--
CREATE TABLE IF NOT EXISTS `pma__history` (
`id` bigint(20) NOT NULL auto_increment,
`username` varchar(64) NOT NULL default '',
`db` varchar(64) NOT NULL default '',
`table` varchar(64) NOT NULL default '',
`timevalue` timestamp NOT NULL,
`sqlquery` text NOT NULL,
PRIMARY KEY (`id`),
KEY `username` (`username`,`db`,`table`,`timevalue`)
)
COMMENT='SQL history for phpMyAdmin'
COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__pdf_pages`
--
CREATE TABLE IF NOT EXISTS `pma__pdf_pages` (
`db_name` varchar(64) NOT NULL default '',
`page_nr` int(10) NOT NULL auto_increment,
`page_descr` varchar(50) COLLATE utf8_general_ci NOT NULL default '',
PRIMARY KEY (`page_nr`),
KEY `db_name` (`db_name`)
)
COMMENT='PDF relation pages for phpMyAdmin'
COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__recent`
--
CREATE TABLE IF NOT EXISTS `pma__recent` (
`username` varchar(64) NOT NULL,
`tables` text NOT NULL,
PRIMARY KEY (`username`)
)
COMMENT='Recently accessed tables'
COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__table_uiprefs`
--
CREATE TABLE IF NOT EXISTS `pma__table_uiprefs` (
`username` varchar(64) NOT NULL,
`db_name` varchar(64) NOT NULL,
`table_name` varchar(64) NOT NULL,
`prefs` text NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`username`,`db_name`,`table_name`)
)
COMMENT='Tables'' UI preferences'
COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__relation`
--
CREATE TABLE IF NOT EXISTS `pma__relation` (
`master_db` varchar(64) NOT NULL default '',
`master_table` varchar(64) NOT NULL default '',
`master_field` varchar(64) NOT NULL default '',
`foreign_db` varchar(64) NOT NULL default '',
`foreign_table` varchar(64) NOT NULL default '',
`foreign_field` varchar(64) NOT NULL default '',
PRIMARY KEY (`master_db`,`master_table`,`master_field`),
KEY `foreign_field` (`foreign_db`,`foreign_table`)
)
COMMENT='Relation table'
COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__table_coords`
--
CREATE TABLE IF NOT EXISTS `pma__table_coords` (
`db_name` varchar(64) NOT NULL default '',
`table_name` varchar(64) NOT NULL default '',
`pdf_page_number` int(11) NOT NULL default '0',
`x` float NOT NULL default '0',
`y` float NOT NULL default '0',
PRIMARY KEY (`db_name`,`table_name`,`pdf_page_number`)
)
COMMENT='Table coordinates for phpMyAdmin PDF output'
COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__table_info`
--
CREATE TABLE IF NOT EXISTS `pma__table_info` (
`db_name` varchar(64) NOT NULL default '',
`table_name` varchar(64) NOT NULL default '',
`display_field` varchar(64) NOT NULL default '',
PRIMARY KEY (`db_name`,`table_name`)
)
COMMENT='Table information for phpMyAdmin'
COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__designer_coords`
--
CREATE TABLE IF NOT EXISTS `pma__designer_coords` (
`db_name` varchar(64) NOT NULL default '',
`table_name` varchar(64) NOT NULL default '',
`x` INT,
`y` INT,
`v` INT,
`h` INT,
PRIMARY KEY (`db_name`,`table_name`)
)
COMMENT='Table coordinates for Designer'
COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__tracking`
--
CREATE TABLE IF NOT EXISTS `pma__tracking` (
`db_name` varchar(64) NOT NULL,
`table_name` varchar(64) NOT NULL,
`version` int(10) NOT NULL,
`date_created` datetime NOT NULL,
`date_updated` datetime NOT NULL,
`schema_snapshot` text NOT NULL,
`schema_sql` text,
`data_sql` text,
`tracking` varchar(15) default NULL,
`tracking_active` int(1) NOT NULL default '1',
PRIMARY KEY (`db_name`,`table_name`,`version`)
)
COLLATE utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `pma__userconfig`
--
CREATE TABLE IF NOT EXISTS `pma__userconfig` (
`username` varchar(64) NOT NULL,
`timevalue` timestamp NOT NULL,
`config_data` text NOT NULL,
PRIMARY KEY (`username`)
)
COMMENT='User preferences storage for phpMyAdmin'
COLLATE utf8_bin;

View File

@ -0,0 +1,164 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Single signon for phpMyAdmin using OpenID
*
* This is just example how to use single signon with phpMyAdmin, it is
* not intended to be perfect code and look, only shows how you can
* integrate this functionality in your application.
*
* It uses OpenID pear package, see http://pear.php.net/package/OpenID
*
* User first authenticates using OpenID and based on content of $AUTH_MAP
* the login information is passed to phpMyAdmin in session data.
*
* @package PhpMyAdmin
* @subpackage Example
*/
if (false === @include_once 'OpenID/RelyingParty.php') {
exit;
}
/**
* Map of authenticated users to MySQL user/password pairs.
*/
$AUTH_MAP = array(
'http://launchpad.net/~username' => array(
'user' => 'root',
'password' => '',
),
);
/**
* Simple function to show HTML page with given content.
*
* @return void
*/
function show_page($contents)
{
header('Content-Type: text/html; charset=utf-8');
echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
?>
<!DOCTYPE HTML>
<html lang="en" dir="ltr">
<head>
<link rel="icon" href="../favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta charset="utf-8" />
<title>phpMyAdmin OpenID signon example</title>
</head>
<body>
<?php
if (isset($_SESSION) && isset($_SESSION['PMA_single_signon_error_message'])) {
echo '<p class="error">' . $_SESSION['PMA_single_signon_message'] . '</p>';
unset($_SESSION['PMA_single_signon_message']);
}
echo $contents;
?>
</body>
</html>
<?php
}
function die_error($e)
{
$contents = "<div class='relyingparty_results'>\n";
$contents .= "<pre>" . htmlspecialchars($e->getMessage()) . "</pre>\n";
$contents .= "</div class='relyingparty_results'>";
show_page($contents);
exit;
}
/* Need to have cookie visible from parent directory */
session_set_cookie_params(0, '/', '', true, true);
/* Create signon session */
$session_name = 'SignonSession';
session_name($session_name);
@session_start();
// Determine realm and return_to
$base = 'http';
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
$base .= 's';
}
$base .= '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'];
$realm = $base . '/';
$returnTo = $base . dirname($_SERVER['PHP_SELF']);
if ($returnTo[strlen($returnTo) - 1] != '/') {
$returnTo .= '/';
}
$returnTo .= 'openid.php';
/* Display form */
if (!count($_GET) && !count($_POST) || isset($_GET['phpMyAdmin'])) {
/* Show simple form */
$content = '<form action="openid.php" method="post">
OpenID: <input type="text" name="identifier" /><br />
<input type="submit" name="start" />
</form>
</body>
</html>';
show_page($content);
exit;
}
/* Grab identifier */
if (isset($_POST['identifier']) && is_string($_POST['identifier'])) {
$identifier = $_POST['identifier'];
} else if (isset($_SESSION['identifier']) && is_string($_SESSION['identifier'])) {
$identifier = $_SESSION['identifier'];
} else {
$identifier = null;
}
/* Create OpenID object */
try {
$o = new OpenID_RelyingParty($returnTo, $realm, $identifier);
} catch (Exception $e) {
die_error($e);
}
/* Redirect to OpenID provider */
if (isset($_POST['start'])) {
try {
$authRequest = $o->prepare();
} catch (Exception $e) {
die_error($e);
}
$url = $authRequest->getAuthorizeURL();
header("Location: $url");
exit;
} else {
/* Grab query string */
if (!count($_POST)) {
list(, $queryString) = explode('?', $_SERVER['REQUEST_URI']);
} else {
// I hate php sometimes
$queryString = file_get_contents('php://input');
}
/* Check reply */
try {
$message = new OpenID_Message($queryString, OpenID_Message::FORMAT_HTTP);
} catch (Exception $e) {
die_error($e);
}
$id = $message->get('openid.claimed_id');
if (!empty($id) && isset($AUTH_MAP[$id])) {
$_SESSION['PMA_single_signon_user'] = $AUTH_MAP[$id]['user'];
$_SESSION['PMA_single_signon_password'] = $AUTH_MAP[$id]['password'];
session_write_close();
/* Redirect to phpMyAdmin (should use absolute URL here!) */
header('Location: ../index.php');
} else {
show_page('<p>User not allowed!</p>');
exit;
}
}

View File

@ -0,0 +1,29 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Single signon for phpMyAdmin
*
* This is just example how to use script based single signon with
* phpMyAdmin, it is not intended to be perfect code and look, only
* shows how you can integrate this functionality in your application.
*
* @package PhpMyAdmin
* @subpackage Example
*/
/**
* This function returns username and password.
*
* It can optionally use configured username as parameter.
*
* @param string $user
*
* @return array
*/
function get_login_credentials($user)
{
return array('root', '');
}
?>

View File

@ -0,0 +1,65 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Single signon for phpMyAdmin
*
* This is just example how to use session based single signon with
* phpMyAdmin, it is not intended to be perfect code and look, only
* shows how you can integrate this functionality in your application.
*
* @package PhpMyAdmin
* @subpackage Example
*/
/* Need to have cookie visible from parent directory */
session_set_cookie_params(0, '/', '', true, true);
/* Create signon session */
$session_name = 'SignonSession';
session_name($session_name);
@session_start();
/* Was data posted? */
if (isset($_POST['user'])) {
/* Store there credentials */
$_SESSION['PMA_single_signon_user'] = $_POST['user'];
$_SESSION['PMA_single_signon_password'] = $_POST['password'];
$_SESSION['PMA_single_signon_host'] = $_POST['host'];
$_SESSION['PMA_single_signon_port'] = $_POST['port'];
/* Update another field of server configuration */
$_SESSION['PMA_single_signon_cfgupdate'] = array('verbose' => 'Signon test');
$id = session_id();
/* Close that session */
@session_write_close();
/* Redirect to phpMyAdmin (should use absolute URL here!) */
header('Location: ../index.php');
} else {
/* Show simple form */
header('Content-Type: text/html; charset=utf-8');
echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
?>
<!DOCTYPE HTML>
<html lang="en" dir="ltr">
<head>
<link rel="icon" href="../favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta charset="utf-8" />
<title>phpMyAdmin single signon example</title>
</head>
<body>
<?php
if (isset($_SESSION['PMA_single_signon_error_message'])) {
echo '<p class="error">' . $_SESSION['PMA_single_signon_error_message'] . '</p>';
}
?>
<form action="signon.php" method="post">
Username: <input type="text" name="user" /><br />
Password: <input type="password" name="password" /><br />
Host: (will use the one from config.inc.php by default) <input type="text" name="host" /><br />
Port: (will use the one from config.inc.php by default) <input type="text" name="port" /><br />
<input type="submit" />
</form>
</body>
</html>
<?php
}
?>

View File

@ -0,0 +1,982 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Main export handling code
*
* @package PhpMyAdmin
*/
/**
* If we are sending the export file (as opposed to just displaying it
* as text), we have to bypass the usual PMA_Response mechanism
*/
if ($_POST['output_format'] == 'sendit') {
define('PMA_BYPASS_GET_INSTANCE', 1);
}
/**
* Get the variables sent or posted to this script and a core script
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/zip.lib.php';
require_once 'libraries/plugin_interface.lib.php';
/**
* Sets globals from $_POST
*
* - Please keep the parameters in order of their appearance in the form
* - Some of these parameters are not used, as the code below directly
* verifies from the superglobal $_POST or $_REQUEST
*/
$post_params = array(
'db',
'table',
'single_table',
'export_type',
'export_method',
'quick_or_custom',
'db_select',
'table_select',
'limit_to',
'limit_from',
'allrows',
'output_format',
'filename_template',
'remember_template',
'charset_of_file',
'compression',
'what',
'htmlword_structure_or_data',
'htmlword_null',
'htmlword_columns',
'mediawiki_structure_or_data',
'mediawiki_caption',
'pdf_report_title',
'pdf_structure_or_data',
'odt_structure_or_data',
'odt_relation',
'odt_comments',
'odt_mime',
'odt_columns',
'odt_null',
'codegen_structure_or_data',
'codegen_format',
'excel_null',
'excel_removeCRLF',
'excel_columns',
'excel_edition',
'excel_structure_or_data',
'yaml_structure_or_data',
'ods_null',
'ods_structure_or_data',
'ods_columns',
'json_structure_or_data',
'xml_structure_or_data',
'xml_export_functions',
'xml_export_procedures',
'xml_export_tables',
'xml_export_triggers',
'xml_export_views',
'xml_export_contents',
'texytext_structure_or_data',
'texytext_columns',
'texytext_null',
'phparray_structure_or_data',
'sql_include_comments',
'sql_header_comment',
'sql_dates',
'sql_relation',
'sql_mime',
'sql_use_transaction',
'sql_disable_fk',
'sql_compatibility',
'sql_structure_or_data',
'sql_create_database',
'sql_drop_table',
'sql_procedure_function',
'sql_create_table_statements',
'sql_if_not_exists',
'sql_auto_increment',
'sql_backquotes',
'sql_truncate',
'sql_delayed',
'sql_ignore',
'sql_type',
'sql_insert_syntax',
'sql_max_query_size',
'sql_hex_for_blob',
'sql_utc_time',
'csv_separator',
'csv_enclosed',
'csv_escaped',
'csv_terminated',
'csv_null',
'csv_removeCRLF',
'csv_columns',
'csv_structure_or_data',
// csv_replace should have been here but we use it directly from $_POST
'latex_caption',
'latex_structure_or_data',
'latex_structure_caption',
'latex_structure_continued_caption',
'latex_structure_label',
'latex_relation',
'latex_comments',
'latex_mime',
'latex_columns',
'latex_data_caption',
'latex_data_continued_caption',
'latex_data_label',
'latex_null'
);
foreach ($post_params as $one_post_param) {
if (isset($_POST[$one_post_param])) {
$GLOBALS[$one_post_param] = $_POST[$one_post_param];
}
}
// sanitize this parameter which will be used below in a file inclusion
$what = PMA_securePath($what);
PMA_Util::checkParameters(array('what', 'export_type'));
// export class instance, not array of properties, as before
$export_plugin = PMA_getPlugin(
"export",
$what,
'libraries/plugins/export/',
array(
'export_type' => $export_type,
'single_table' => isset($single_table)
)
);
// Backward compatbility
$type = $what;
// Check export type
if (! isset($export_plugin)) {
PMA_fatalError(__('Bad type!'));
}
/**
* valid compression methods
*/
$compression_methods = array(
'zip',
'gzip',
'bzip2',
);
/**
* init and variable checking
*/
$compression = false;
$onserver = false;
$save_on_server = false;
$buffer_needed = false;
// Is it a quick or custom export?
if ($_REQUEST['quick_or_custom'] == 'quick') {
$quick_export = true;
} else {
$quick_export = false;
}
if ($_REQUEST['output_format'] == 'astext') {
$asfile = false;
} else {
$asfile = true;
if (in_array($_REQUEST['compression'], $compression_methods)) {
$compression = $_REQUEST['compression'];
$buffer_needed = true;
}
if (($quick_export && ! empty($_REQUEST['quick_export_onserver']))
|| (! $quick_export && ! empty($_REQUEST['onserver']))
) {
if ($quick_export) {
$onserver = $_REQUEST['quick_export_onserver'];
} else {
$onserver = $_REQUEST['onserver'];
}
// Will we save dump on server?
$save_on_server = ! empty($cfg['SaveDir']) && $onserver;
}
}
// Does export require to be into file?
if ($export_plugin->getProperties()->getForceFile() != null && ! $asfile) {
$message = PMA_Message::error(
__('Selected export type has to be saved in file!')
);
if ($export_type == 'server') {
$active_page = 'server_export.php';
include 'server_export.php';
} elseif ($export_type == 'database') {
$active_page = 'db_export.php';
include 'db_export.php';
} else {
$active_page = 'tbl_export.php';
include 'tbl_export.php';
}
exit();
}
// Generate error url and check for needed variables
if ($export_type == 'server') {
$err_url = 'server_export.php?' . PMA_generate_common_url();
} elseif ($export_type == 'database' && strlen($db)) {
$err_url = 'db_export.php?' . PMA_generate_common_url($db);
// Check if we have something to export
if (isset($table_select)) {
$tables = $table_select;
} else {
$tables = array();
}
} elseif ($export_type == 'table' && strlen($db) && strlen($table)) {
$err_url = 'tbl_export.php?' . PMA_generate_common_url($db, $table);
} else {
PMA_fatalError(__('Bad parameters!'));
}
/**
* Increase time limit for script execution and initializes some variables
*/
@set_time_limit($cfg['ExecTimeLimit']);
if (! empty($cfg['MemoryLimit'])) {
@ini_set('memory_limit', $cfg['MemoryLimit']);
}
// Start with empty buffer
$dump_buffer = '';
$dump_buffer_len = 0;
// We send fake headers to avoid browser timeout when buffering
$time_start = time();
/**
* Detect ob_gzhandler
*
* @return bool
*/
function PMA_isGzHandlerEnabled()
{
return in_array('ob_gzhandler', ob_list_handlers());
}
/**
* Detect whether gzencode is needed; it might not be needed if
* the server is already compressing by itself
*
* @return bool Whether gzencode is needed
*/
function PMA_gzencodeNeeded()
{
if (@function_exists('gzencode')
&& ! @ini_get('zlib.output_compression')
&& ! PMA_isGzHandlerEnabled()
) {
return true;
} else {
return false;
}
}
/**
* Output handler for all exports, if needed buffering, it stores data into
* $dump_buffer, otherwise it prints thems out.
*
* @param string $line the insert statement
*
* @return bool Whether output succeeded
*/
function PMA_exportOutputHandler($line)
{
global $time_start, $dump_buffer, $dump_buffer_len, $save_filename;
// Kanji encoding convert feature
if ($GLOBALS['output_kanji_conversion']) {
$line = PMA_kanji_str_conv(
$line,
$GLOBALS['knjenc'],
isset($GLOBALS['xkana']) ? $GLOBALS['xkana'] : ''
);
}
// If we have to buffer data, we will perform everything at once at the end
if ($GLOBALS['buffer_needed']) {
$dump_buffer .= $line;
if ($GLOBALS['onfly_compression']) {
$dump_buffer_len += strlen($line);
if ($dump_buffer_len > $GLOBALS['memory_limit']) {
if ($GLOBALS['output_charset_conversion']) {
$dump_buffer = PMA_convert_string(
'utf-8',
$GLOBALS['charset_of_file'],
$dump_buffer
);
}
// as bzipped
if ($GLOBALS['compression'] == 'bzip2'
&& @function_exists('bzcompress')
) {
$dump_buffer = bzcompress($dump_buffer);
} elseif ($GLOBALS['compression'] == 'gzip'
&& PMA_gzencodeNeeded()
) {
// as a gzipped file
// without the optional parameter level because it bugs
$dump_buffer = gzencode($dump_buffer);
}
if ($GLOBALS['save_on_server']) {
$write_result = @fwrite($GLOBALS['file_handle'], $dump_buffer);
if (! $write_result || ($write_result != strlen($dump_buffer))) {
$GLOBALS['message'] = PMA_Message::error(
__('Insufficient space to save the file %s.')
);
$GLOBALS['message']->addParam($save_filename);
return false;
}
} else {
echo $dump_buffer;
}
$dump_buffer = '';
$dump_buffer_len = 0;
}
} else {
$time_now = time();
if ($time_start >= $time_now + 30) {
$time_start = $time_now;
header('X-pmaPing: Pong');
} // end if
}
} else {
if ($GLOBALS['asfile']) {
if ($GLOBALS['output_charset_conversion']) {
$line = PMA_convert_string(
'utf-8',
$GLOBALS['charset_of_file'],
$line
);
}
if ($GLOBALS['save_on_server'] && strlen($line) > 0) {
$write_result = @fwrite($GLOBALS['file_handle'], $line);
if (! $write_result || ($write_result != strlen($line))) {
$GLOBALS['message'] = PMA_Message::error(
__('Insufficient space to save the file %s.')
);
$GLOBALS['message']->addParam($save_filename);
return false;
}
$time_now = time();
if ($time_start >= $time_now + 30) {
$time_start = $time_now;
header('X-pmaPing: Pong');
} // end if
} else {
// We export as file - output normally
echo $line;
}
} else {
// We export as html - replace special chars
echo htmlspecialchars($line);
}
}
return true;
} // end of the 'PMA_exportOutputHandler()' function
// Defines the default <CR><LF> format.
// For SQL always use \n as MySQL wants this on all platforms.
if ($what == 'sql') {
$crlf = "\n";
} else {
$crlf = PMA_Util::whichCrlf();
}
$output_kanji_conversion = function_exists('PMA_kanji_str_conv') && $type != 'xls';
// Do we need to convert charset?
$output_charset_conversion = $asfile
&& $GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE
&& isset($charset_of_file) && $charset_of_file != 'utf-8'
&& $type != 'xls';
// Use on the fly compression?
$onfly_compression = $GLOBALS['cfg']['CompressOnFly']
&& ($compression == 'gzip' || $compression == 'bzip2');
if ($onfly_compression) {
$memory_limit = trim(@ini_get('memory_limit'));
// 2 MB as default
if (empty($memory_limit)) {
$memory_limit = 2 * 1024 * 1024;
}
if (strtolower(substr($memory_limit, -1)) == 'm') {
$memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024;
} elseif (strtolower(substr($memory_limit, -1)) == 'k') {
$memory_limit = (int)substr($memory_limit, 0, -1) * 1024;
} elseif (strtolower(substr($memory_limit, -1)) == 'g') {
$memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024 * 1024;
} else {
$memory_limit = (int)$memory_limit;
}
// Some of memory is needed for other thins and as treshold.
// Nijel: During export I had allocated (see memory_get_usage function)
// approx 1.2MB so this comes from that.
if ($memory_limit > 1500000) {
$memory_limit -= 1500000;
}
// Some memory is needed for compression, assume 1/3
$memory_limit /= 8;
}
// Generate filename and mime type if needed
if ($asfile) {
$pma_uri_parts = parse_url($cfg['PmaAbsoluteUri']);
if ($export_type == 'server') {
if (isset($remember_template)) {
$GLOBALS['PMA_Config']->setUserValue(
'pma_server_filename_template',
'Export/file_template_server',
$filename_template
);
}
} elseif ($export_type == 'database') {
if (isset($remember_template)) {
$GLOBALS['PMA_Config']->setUserValue(
'pma_db_filename_template',
'Export/file_template_database',
$filename_template
);
}
} else {
if (isset($remember_template)) {
$GLOBALS['PMA_Config']->setUserValue(
'pma_table_filename_template',
'Export/file_template_table',
$filename_template
);
}
}
$filename = PMA_Util::expandUserString($filename_template);
// remove dots in filename (coming from either the template or already
// part of the filename) to avoid a remote code execution vulnerability
$filename = PMA_sanitizeFilename($filename, $replaceDots = true);
// Grab basic dump extension and mime type
// Check if the user already added extension;
// get the substring where the extension would be if it was included
$extension_start_pos = strlen($filename) - strlen(
$export_plugin->getProperties()->getExtension()
) - 1;
$user_extension = substr($filename, $extension_start_pos, strlen($filename));
$required_extension = "." . $export_plugin->getProperties()->getExtension();
if (strtolower($user_extension) != $required_extension) {
$filename .= $required_extension;
}
$mime_type = $export_plugin->getProperties()->getMimeType();
// If dump is going to be compressed, set correct mime_type and add
// compression to extension
if ($compression == 'bzip2') {
$filename .= '.bz2';
$mime_type = 'application/x-bzip2';
} elseif ($compression == 'gzip') {
$filename .= '.gz';
$mime_type = 'application/x-gzip';
} elseif ($compression == 'zip') {
$filename .= '.zip';
$mime_type = 'application/zip';
}
}
// Open file on server if needed
if ($save_on_server) {
$save_filename = PMA_Util::userDir($cfg['SaveDir'])
. preg_replace('@[/\\\\]@', '_', $filename);
unset($message);
if (file_exists($save_filename)
&& ((! $quick_export && empty($_REQUEST['onserverover']))
|| ($quick_export
&& $_REQUEST['quick_export_onserverover'] != 'saveitover'))
) {
$message = PMA_Message::error(
__('File %s already exists on server, change filename or check overwrite option.')
);
$message->addParam($save_filename);
} else {
if (is_file($save_filename) && ! is_writable($save_filename)) {
$message = PMA_Message::error(
__('The web server does not have permission to save the file %s.')
);
$message->addParam($save_filename);
} else {
if (! $file_handle = @fopen($save_filename, 'w')) {
$message = PMA_Message::error(
__('The web server does not have permission to save the file %s.')
);
$message->addParam($save_filename);
}
}
}
if (isset($message)) {
if ($export_type == 'server') {
$active_page = 'server_export.php';
include 'server_export.php';
} elseif ($export_type == 'database') {
$active_page = 'db_export.php';
include 'db_export.php';
} else {
$active_page = 'tbl_export.php';
include 'tbl_export.php';
}
exit();
}
}
/**
* Send headers depending on whether the user chose to download a dump file
* or not
*/
if (! $save_on_server) {
if ($asfile) {
// Download
// (avoid rewriting data containing HTML with anchors and forms;
// this was reported to happen under Plesk)
@ini_set('url_rewriter.tags', '');
$filename = PMA_sanitizeFilename($filename);
PMA_downloadHeader($filename, $mime_type);
} else {
// HTML
if ($export_type == 'database') {
$num_tables = count($tables);
if ($num_tables == 0) {
$message = PMA_Message::error(__('No tables found in database.'));
$active_page = 'db_export.php';
include 'db_export.php';
exit();
}
}
$backup_cfgServer = $cfg['Server'];
$cfg['Server'] = $backup_cfgServer;
unset($backup_cfgServer);
echo "\n" . '<div style="text-align: ' . $cell_align_left . '">' . "\n";
//echo ' <pre>' . "\n";
/**
* Displays a back button with all the $_REQUEST data in the URL
* (store in a variable to also display after the textarea)
*/
$back_button = '<p>[ <a href="';
if ($export_type == 'server') {
$back_button .= 'server_export.php?' . PMA_generate_common_url();
} elseif ($export_type == 'database') {
$back_button .= 'db_export.php?' . PMA_generate_common_url($db);
} else {
$back_button .= 'tbl_export.php?' . PMA_generate_common_url($db, $table);
}
// Convert the multiple select elements from an array to a string
if ($export_type == 'server' && isset($_REQUEST['db_select'])) {
$_REQUEST['db_select'] = implode(",", $_REQUEST['db_select']);
} elseif ($export_type == 'database' && isset($_REQUEST['table_select'])) {
$_REQUEST['table_select'] = implode(",", $_REQUEST['table_select']);
}
foreach ($_REQUEST as $name => $value) {
$back_button .= '&amp;' . urlencode($name) . '=' . urlencode($value);
}
$back_button .= '&amp;repopulate=1">Back</a> ]</p>';
echo $back_button;
echo ' <form name="nofunction">' . "\n"
// remove auto-select for now: there is no way to select
// only a part of the text; anyway, it should obey
// $cfg['TextareaAutoSelect']
//. ' <textarea name="sqldump" cols="50" rows="30" onclick="this.select();" id="textSQLDUMP" wrap="OFF">' . "\n";
. ' <textarea name="sqldump" cols="50" rows="30" id="textSQLDUMP" wrap="OFF">' . "\n";
} // end download
}
// Fake loop just to allow skip of remain of this code by break, I'd really
// need exceptions here :-)
do {
// Add possibly some comments to export
if (! $export_plugin->exportHeader($db)) {
break;
}
// Will we need relation & co. setup?
$do_relation = isset($GLOBALS[$what . '_relation']);
$do_comments = isset($GLOBALS[$what . '_include_comments']);
$do_mime = isset($GLOBALS[$what . '_mime']);
if ($do_relation || $do_comments || $do_mime) {
$cfgRelation = PMA_getRelationsParam();
}
if ($do_mime) {
include_once 'libraries/transformations.lib.php';
}
// Include dates in export?
$do_dates = isset($GLOBALS[$what . '_dates']);
/**
* Builds the dump
*/
// Gets the number of tables if a dump of a database has been required
if ($export_type == 'server') {
if (isset($db_select)) {
$tmp_select = implode($db_select, '|');
$tmp_select = '|' . $tmp_select . '|';
}
// Walk over databases
foreach ($GLOBALS['pma']->databases as $current_db) {
if (isset($tmp_select)
&& strpos(' ' . $tmp_select, '|' . $current_db . '|')
) {
if (! $export_plugin->exportDBHeader($current_db)) {
break 2;
}
if (! $export_plugin->exportDBCreate($current_db)) {
break 2;
}
if (method_exists($export_plugin, 'exportRoutines')
&& strpos($GLOBALS['sql_structure_or_data'], 'structure') !== false
&& isset($GLOBALS['sql_procedure_function'])
) {
$export_plugin->exportRoutines($current_db);
}
$tables = PMA_DBI_get_tables($current_db);
$views = array();
foreach ($tables as $table) {
// if this is a view, collect it for later;
// views must be exported after the tables
$is_view = PMA_Table::isView($current_db, $table);
if ($is_view) {
$views[] = $table;
}
if ($GLOBALS[$what . '_structure_or_data'] == 'structure'
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data'
) {
// for a view, export a stand-in definition of the table
// to resolve view dependencies
if (! $export_plugin->exportStructure(
$current_db, $table, $crlf, $err_url,
$is_view ? 'stand_in' : 'create_table', $export_type,
$do_relation, $do_comments, $do_mime, $do_dates
)) {
break 3;
}
}
// if this is a view or a merge table, don't export data
if (($GLOBALS[$what . '_structure_or_data'] == 'data'
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data')
&& ! ($is_view || PMA_Table::isMerge($current_db, $table))
) {
$local_query = 'SELECT * FROM ' . PMA_Util::backquote($current_db)
. '.' . PMA_Util::backquote($table);
if (! $export_plugin->exportData($current_db, $table, $crlf, $err_url, $local_query)) {
break 3;
}
}
// now export the triggers (needs to be done after the data
// because triggers can modify already imported tables)
if ($GLOBALS[$what . '_structure_or_data'] == 'structure'
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data'
) {
if (! $export_plugin->exportStructure(
$current_db, $table, $crlf, $err_url,
'triggers', $export_type,
$do_relation, $do_comments, $do_mime, $do_dates
)) {
break 2;
}
}
}
foreach ($views as $view) {
// no data export for a view
if ($GLOBALS[$what . '_structure_or_data'] == 'structure'
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data'
) {
if (! $export_plugin->exportStructure(
$current_db, $view, $crlf, $err_url,
'create_view', $export_type,
$do_relation, $do_comments, $do_mime, $do_dates
)) {
break 3;
}
}
}
if (! $export_plugin->exportDBFooter($current_db)) {
break 2;
}
}
}
} elseif ($export_type == 'database') {
if (! $export_plugin->exportDBHeader($db)) {
break;
}
if (! $export_plugin->exportDBCreate($db)) {
break;
}
if (method_exists($export_plugin, 'exportRoutines')
&& strpos($GLOBALS['sql_structure_or_data'], 'structure') !== false
&& isset($GLOBALS['sql_procedure_function'])
) {
$export_plugin->exportRoutines($db);
}
$i = 0;
$views = array();
// $tables contains the choices from the user (via $table_select)
foreach ($tables as $table) {
// if this is a view, collect it for later; views must be exported after
// the tables
$is_view = PMA_Table::isView($db, $table);
if ($is_view) {
$views[] = $table;
}
if ($GLOBALS[$what . '_structure_or_data'] == 'structure'
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data'
) {
// for a view, export a stand-in definition of the table
// to resolve view dependencies
if (! $export_plugin->exportStructure(
$db, $table, $crlf, $err_url,
$is_view ? 'stand_in' : 'create_table', $export_type,
$do_relation, $do_comments, $do_mime, $do_dates
)) {
break 2;
}
}
// if this is a view or a merge table, don't export data
if (($GLOBALS[$what . '_structure_or_data'] == 'data'
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data')
&& ! ($is_view || PMA_Table::isMerge($db, $table))
) {
$local_query = 'SELECT * FROM ' . PMA_Util::backquote($db)
. '.' . PMA_Util::backquote($table);
if (! $export_plugin->exportData($db, $table, $crlf, $err_url, $local_query)) {
break 2;
}
}
// now export the triggers (needs to be done after the data because
// triggers can modify already imported tables)
if ($GLOBALS[$what . '_structure_or_data'] == 'structure'
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data'
) {
if (! $export_plugin->exportStructure(
$db, $table, $crlf, $err_url,
'triggers', $export_type,
$do_relation, $do_comments, $do_mime, $do_dates
)) {
break 2;
}
}
}
foreach ($views as $view) {
// no data export for a view
if ($GLOBALS[$what . '_structure_or_data'] == 'structure'
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data'
) {
if (! $export_plugin->exportStructure(
$db, $view, $crlf, $err_url,
'create_view', $export_type,
$do_relation, $do_comments, $do_mime, $do_dates
)) {
break 2;
}
}
}
if (! $export_plugin->exportDBFooter($db)) {
break;
}
} else {
if (! $export_plugin->exportDBHeader($db)) {
break;
}
// We export just one table
// $allrows comes from the form when "Dump all rows" has been selected
if (isset($allrows) && $allrows == '0' && $limit_to > 0 && $limit_from >= 0) {
$add_query = ' LIMIT '
. (($limit_from > 0) ? $limit_from . ', ' : '')
. $limit_to;
} else {
$add_query = '';
}
$is_view = PMA_Table::isView($db, $table);
if ($GLOBALS[$what . '_structure_or_data'] == 'structure'
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data'
) {
if (! $export_plugin->exportStructure(
$db, $table, $crlf, $err_url,
$is_view ? 'create_view' : 'create_table', $export_type,
$do_relation, $do_comments, $do_mime, $do_dates
)) {
break;
}
}
// If this is an export of a single view, we have to export data;
// for example, a PDF report
// if it is a merge table, no data is exported
if (($GLOBALS[$what . '_structure_or_data'] == 'data'
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data')
&& ! PMA_Table::isMerge($db, $table)
) {
if (! empty($sql_query)) {
// only preg_replace if needed
if (! empty($add_query)) {
// remove trailing semicolon before adding a LIMIT
$sql_query = preg_replace('%;\s*$%', '', $sql_query);
}
$local_query = $sql_query . $add_query;
PMA_DBI_select_db($db);
} else {
$local_query = 'SELECT * FROM ' . PMA_Util::backquote($db)
. '.' . PMA_Util::backquote($table) . $add_query;
}
if (! $export_plugin->exportData($db, $table, $crlf, $err_url, $local_query)) {
break;
}
}
// now export the triggers (needs to be done after the data because
// triggers can modify already imported tables)
if ($GLOBALS[$what . '_structure_or_data'] == 'structure'
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data'
) {
if (! $export_plugin->exportStructure(
$db, $table, $crlf, $err_url,
'triggers', $export_type,
$do_relation, $do_comments, $do_mime, $do_dates
)) {
break 2;
}
}
if (! $export_plugin->exportDBFooter($db)) {
break;
}
}
if (! $export_plugin->exportFooter()) {
break;
}
} while (false);
// End of fake loop
if ($save_on_server && isset($message)) {
if ($export_type == 'server') {
$active_page = 'server_export.php';
include 'server_export.php';
} elseif ($export_type == 'database') {
$active_page = 'db_export.php';
include 'db_export.php';
} else {
$active_page = 'tbl_export.php';
include 'tbl_export.php';
}
exit();
}
/**
* Send the dump as a file...
*/
if (! empty($asfile)) {
// Convert the charset if required.
if ($output_charset_conversion) {
$dump_buffer = PMA_convert_string(
'utf-8',
$GLOBALS['charset_of_file'],
$dump_buffer
);
}
// Do the compression
// 1. as a zipped file
if ($compression == 'zip') {
if (@function_exists('gzcompress')) {
$zipfile = new ZipFile();
$zipfile->addFile($dump_buffer, substr($filename, 0, -4));
$dump_buffer = $zipfile->file();
}
} elseif ($compression == 'bzip2') {
// 2. as a bzipped file
if (@function_exists('bzcompress')) {
$dump_buffer = bzcompress($dump_buffer);
}
} elseif ($compression == 'gzip' && PMA_gzencodeNeeded()) {
// 3. as a gzipped file
// without the optional parameter level because it bugs
$dump_buffer = gzencode($dump_buffer);
}
/* If we saved on server, we have to close file now */
if ($save_on_server) {
$write_result = @fwrite($file_handle, $dump_buffer);
fclose($file_handle);
if (strlen($dump_buffer) > 0
&& (! $write_result || ($write_result != strlen($dump_buffer)))
) {
$message = new PMA_Message(
__('Insufficient space to save the file %s.'),
PMA_Message::ERROR,
$save_filename
);
} else {
$message = new PMA_Message(
__('Dump has been saved to file %s.'),
PMA_Message::SUCCESS,
$save_filename
);
}
if ($export_type == 'server') {
$active_page = 'server_export.php';
include_once 'server_export.php';
} elseif ($export_type == 'database') {
$active_page = 'db_export.php';
include_once 'db_export.php';
} else {
$active_page = 'tbl_export.php';
include_once 'tbl_export.php';
}
exit();
} else {
echo $dump_buffer;
}
} else {
/**
* Displays the dump...
*
* Close the html tags and add the footers if dump is displayed on screen
*/
echo '</textarea>' . "\n"
. ' </form>' . "\n";
echo $back_button;
echo "\n";
echo '</div>' . "\n";
echo "\n";
?>
<script type="text/javascript">
//<![CDATA[
var $body = $("body");
$("#textSQLDUMP")
.width($body.width() - 50)
.height($body.height() - 100);
//]]>
</script>
<?php
} // end if
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -27,3 +27,4 @@ if (isset($_REQUEST['monitorconfig'])) {
}
echo file_get_contents($_FILES['file']['tmp_name']);
}
?>

View File

@ -0,0 +1,416 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Editor for Geometry data types.
*
* @package PhpMyAdmin
*/
/**
* Escapes special characters if the variable is set.
* Returns an empty string otherwise.
*
* @param string $variable variable to be escaped
*
* @return escaped variable
*/
function escape($variable)
{
return isset($variable) ? htmlspecialchars($variable) : '';
}
require_once 'libraries/common.inc.php';
require_once 'libraries/gis/pma_gis_factory.php';
require_once 'libraries/gis_visualization.lib.php';
// Get data if any posted
$gis_data = array();
if (PMA_isValid($_REQUEST['gis_data'], 'array')) {
$gis_data = $_REQUEST['gis_data'];
}
$gis_types = array(
'POINT',
'MULTIPOINT',
'LINESTRING',
'MULTILINESTRING',
'POLYGON',
'MULTIPOLYGON',
'GEOMETRYCOLLECTION'
);
// Extract type from the initial call and make sure that it's a valid one.
// Extract from field's values if availbale, if not use the column type passed.
if (! isset($gis_data['gis_type'])) {
if (isset($_REQUEST['type']) && $_REQUEST['type'] != '') {
$gis_data['gis_type'] = strtoupper($_REQUEST['type']);
}
if (isset($_REQUEST['value']) && trim($_REQUEST['value']) != '') {
$start = (substr($_REQUEST['value'], 0, 1) == "'") ? 1 : 0;
$gis_data['gis_type'] = substr(
$_REQUEST['value'], $start, strpos($_REQUEST['value'], "(") - $start
);
}
if ((! isset($gis_data['gis_type']))
|| (! in_array($gis_data['gis_type'], $gis_types))
) {
$gis_data['gis_type'] = $gis_types[0];
}
}
$geom_type = $gis_data['gis_type'];
// Generate parameters from value passed.
$gis_obj = PMA_GIS_Factory::factory($geom_type);
if (isset($_REQUEST['value'])) {
$gis_data = array_merge(
$gis_data, $gis_obj->generateParams($_REQUEST['value'])
);
}
// Generate Well Known Text
$srid = (isset($gis_data['srid']) && $gis_data['srid'] != '')
? htmlspecialchars($gis_data['srid']) : 0;
$wkt = $gis_obj->generateWkt($gis_data, 0);
$wkt_with_zero = $gis_obj->generateWkt($gis_data, 0, '0');
$result = "'" . $wkt . "'," . $srid;
// Generate PNG or SVG based visualization
$format = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER <= 8)
? 'png' : 'svg';
$visualizationSettings = array(
'width' => 450,
'height' => 300,
'spatialColumn' => 'wkt'
);
$data = array(array('wkt' => $wkt_with_zero, 'srid' => $srid));
$visualization = PMA_GIS_visualizationResults(
$data, $visualizationSettings, $format
);
$open_layers = PMA_GIS_visualizationResults($data, $visualizationSettings, 'ol');
// If the call is to update the WKT and visualization make an AJAX response
if (isset($_REQUEST['generate']) && $_REQUEST['generate'] == true) {
$extra_data = array(
'result' => $result,
'visualization' => $visualization,
'openLayers' => $open_layers,
);
$response = PMA_Response::getInstance();
$response->addJSON($extra_data);
exit;
}
ob_start();
echo '<form id="gis_data_editor_form" action="gis_data_editor.php" method="post">';
echo '<input type="hidden" id="pmaThemeImage"'
. ' value="' . $GLOBALS['pmaThemeImage'] . '" />';
echo '<div id="gis_data_editor">';
echo '<h3>';
printf(
__('Value for the column "%s"'),
htmlspecialchars($_REQUEST['field'])
);
echo '</h3>';
echo '<input type="hidden" name="field" value="'
. htmlspecialchars($_REQUEST['field']) . '" />';
// The input field to which the final result should be added
// and corresponding null checkbox
if (isset($_REQUEST['input_name'])) {
echo '<input type="hidden" name="input_name" value="'
. htmlspecialchars($_REQUEST['input_name']) . '" />';
}
echo PMA_generate_common_hidden_inputs();
echo '<!-- Visualization section -->';
echo '<div id="placeholder" style="width:450px;height:300px;'
. ($srid != 0 ? 'display:none;' : '') . '">';
echo $visualization;
echo '</div>';
echo '<div id="openlayersmap" style="width:450px;height:300px;'
. ($srid == 0 ? 'display:none;' : '') . '">';
echo '</div>';
echo '<div class="choice" style="float:right;clear:right;">';
echo '<input type="checkbox" id="choice" value="useBaseLayer"'
. ($srid != 0 ? ' checked="checked"' : '') . '/>';
echo '<label for="choice">' . __("Use OpenStreetMaps as Base Layer") . '</label>';
echo '</div>';
echo '<script language="javascript" type="text/javascript">';
echo $open_layers;
echo '</script>';
echo '<!-- End of visualization section -->';
echo '<!-- Header section - Inclueds GIS type selector and input field for SRID -->';
echo '<div id="gis_data_header">';
echo '<select name="gis_data[gis_type]" class="gis_type">';
foreach ($gis_types as $gis_type) {
echo '<option value="' . $gis_type . '"';
if ($geom_type == $gis_type) {
echo ' selected="selected"';
}
echo '>' . $gis_type . '</option>';
}
echo '</select>';
echo '&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<label for="srid">' . __("SRID") . ':</label>';
echo '<input name="gis_data[srid]" type="text" value="' . $srid . '" />';
echo '</div>';
echo '<!-- End of header section -->';
echo '<!-- Data section -->';
echo '<div id="gis_data">';
$geom_count = 1;
if ($geom_type == 'GEOMETRYCOLLECTION') {
$geom_count = (isset($gis_data[$geom_type]['geom_count']))
? $gis_data[$geom_type]['geom_count'] : 1;
if (isset($gis_data[$geom_type]['add_geom'])) {
$geom_count++;
}
echo '<input type="hidden" name="gis_data[GEOMETRYCOLLECTION][geom_count]"'
. ' value="' . $geom_count . '" />';
}
for ($a = 0; $a < $geom_count; $a++) {
if ($geom_type == 'GEOMETRYCOLLECTION') {
echo '<br/><br/>';
echo __("Geometry") . ' ' . ($a + 1) . ': ';
echo '<br/>';
if (isset($gis_data[$a]['gis_type'])) {
$type = $gis_data[$a]['gis_type'];
} else {
$type = $gis_types[0];
}
echo '<select name="gis_data[' . $a . '][gis_type]" class="gis_type">';
foreach (array_slice($gis_types, 0, 6) as $gis_type) {
echo '<option value="' . $gis_type . '"';
if ($type == $gis_type) {
echo ' selected="selected"';
}
echo '>' . $gis_type . '</option>';
}
echo '</select>';
} else {
$type = $geom_type;
}
if ($type == 'POINT') {
echo '<br/>';
echo __("Point") . ': ';
echo '<label for="x">' . __("X") . '</label>';
echo '<input name="gis_data[' . $a . '][POINT][x]" type="text"'
. ' value="' . escape($gis_data[$a]['POINT']['x']) . '" />';
echo '<label for="y">' . __("Y") . '</label>';
echo '<input name="gis_data[' . $a . '][POINT][y]" type="text"'
. ' value="' . escape($gis_data[$a]['POINT']['y']) . '" />';
} elseif ($type == 'MULTIPOINT' || $type == 'LINESTRING') {
$no_of_points = isset($gis_data[$a][$type]['no_of_points'])
? $gis_data[$a][$type]['no_of_points'] : 1;
if ($type == 'LINESTRING' && $no_of_points < 2) {
$no_of_points = 2;
}
if ($type == 'MULTIPOINT' && $no_of_points < 1) {
$no_of_points = 1;
}
if (isset($gis_data[$a][$type]['add_point'])) {
$no_of_points++;
}
echo '<input type="hidden" value="' . $no_of_points . '"'
. ' name="gis_data[' . $a . '][' . $type . '][no_of_points]" />';
for ($i = 0; $i < $no_of_points; $i++) {
echo '<br/>';
printf(__('Point %d'), $i + 1);
echo ': ';
echo '<label for="x">' . __("X") . '</label>';
echo '<input type="text"'
. ' name="gis_data[' . $a . '][' . $type . '][' . $i . '][x]"'
. ' value="' . escape($gis_data[$a][$type][$i]['x']) . '" />';
echo '<label for="y">' . __("Y") . '</label>';
echo '<input type="text"'
. ' name="gis_data[' . $a . '][' . $type . '][' . $i . '][y]"'
. ' value="' . escape($gis_data[$a][$type][$i]['y']). '" />';
}
echo '<input type="submit"'
. ' name="gis_data[' . $a . '][' . $type . '][add_point]"'
. ' class="add addPoint" value="' . __("Add a point") . '" />';
} elseif ($type == 'MULTILINESTRING' || $type == 'POLYGON') {
$no_of_lines = isset($gis_data[$a][$type]['no_of_lines'])
? $gis_data[$a][$type]['no_of_lines'] : 1;
if ($no_of_lines < 1) {
$no_of_lines = 1;
}
if (isset($gis_data[$a][$type]['add_line'])) {
$no_of_lines++;
}
echo '<input type="hidden" value="' . $no_of_lines . '"'
. ' name="gis_data[' . $a . '][' . $type . '][no_of_lines]" />';
for ($i = 0; $i < $no_of_lines; $i++) {
echo '<br/>';
if ($type == 'MULTILINESTRING') {
echo __("Linestring") . ' ' . ($i + 1) . ':';
} else {
if ($i == 0) {
echo __("Outer Ring") . ':';
} else {
echo __("Inner Ring") . ' ' . $i . ':';
}
}
$no_of_points = isset($gis_data[$a][$type][$i]['no_of_points'])
? $gis_data[$a][$type][$i]['no_of_points'] : 2;
if ($type == 'MULTILINESTRING' && $no_of_points < 2) {
$no_of_points = 2;
}
if ($type == 'POLYGON' && $no_of_points < 4) {
$no_of_points = 4;
}
if (isset($gis_data[$a][$type][$i]['add_point'])) {
$no_of_points++;
}
echo '<input type="hidden" value="' . $no_of_points . '"'
. ' name="gis_data[' . $a . '][' . $type . '][' . $i . '][no_of_points]" />';
for ($j = 0; $j < $no_of_points; $j++) {
echo('<br/>');
printf(__('Point %d'), $j + 1);
echo ': ';
echo '<label for="x">' . __("X") . '</label>';
echo '<input type="text"'
. ' name="gis_data[' . $a . '][' . $type . '][' . $i . '][' . $j . '][x]"'
. ' value="' . escape($gis_data[$a][$type][$i][$j]['x']) . '" />';
echo '<label for="y">' . __("Y") . '</label>';
echo '<input type="text"'
. ' name="gis_data[' . $a . '][' . $type . '][' . $i . '][' . $j . '][y]"'
. ' value="' . escape($gis_data[$a][$type][$i][$j]['x']) . '" />';
}
echo '<input type="submit"'
. ' name="gis_data[' . $a . '][' . $type . '][' . $i . '][add_point]"'
. ' class="add addPoint" value="' . __("Add a point") . '" />';
}
$caption = ($type == 'MULTILINESTRING')
? __('Add a linestring')
: __('Add an inner ring');
echo '<br/>';
echo '<input type="submit"'
. ' name="gis_data[' . $a . '][' . $type . '][add_line]"'
. ' class="add addLine" value="' . $caption . '" />';
} elseif ($type == 'MULTIPOLYGON') {
$no_of_polygons = isset($gis_data[$a][$type]['no_of_polygons'])
? $gis_data[$a][$type]['no_of_polygons'] : 1;
if ($no_of_polygons < 1) {
$no_of_polygons = 1;
}
if (isset($gis_data[$a][$type]['add_polygon'])) {
$no_of_polygons++;
}
echo '<input type="hidden"'
. ' name="gis_data[' . $a . '][' . $type . '][no_of_polygons]"'
. ' value="' . $no_of_polygons . '" />';
for ($k = 0; $k < $no_of_polygons; $k++) {
echo '<br/>';
echo __("Polygon") . ' ' . ($k + 1) . ':';
$no_of_lines = isset($gis_data[$a][$type][$k]['no_of_lines'])
? $gis_data[$a][$type][$k]['no_of_lines'] : 1;
if ($no_of_lines < 1) {
$no_of_lines = 1;
}
if (isset($gis_data[$a][$type][$k]['add_line'])) {
$no_of_lines++;
}
echo '<input type="hidden"'
. ' name="gis_data[' . $a . '][' . $type . '][' . $k . '][no_of_lines]"'
. ' value="' . $no_of_lines . '" />';
for ($i = 0; $i < $no_of_lines; $i++) {
echo '<br/><br/>';
if ($i == 0) {
echo __("Outer Ring") . ':';
} else {
echo __("Inner Ring") . ' ' . $i . ':';
}
$no_of_points = isset($gis_data[$a][$type][$k][$i]['no_of_points'])
? $gis_data[$a][$type][$k][$i]['no_of_points'] : 4;
if ($no_of_points < 4) {
$no_of_points = 4;
}
if (isset($gis_data[$a][$type][$k][$i]['add_point'])) {
$no_of_points++;
}
echo '<input type="hidden"'
. ' name="gis_data[' . $a . '][' . $type . '][' . $k . '][' . $i . '][no_of_points]"'
. ' value="' . $no_of_points . '" />';
for ($j = 0; $j < $no_of_points; $j++) {
echo '<br/>';
printf(__('Point %d'), $j + 1);
echo ': ';
echo '<label for="x">' . __("X") . '</label>';
echo '<input type="text"'
. ' name="gis_data[' . $a . '][' . $type . '][' . $k . '][' . $i . '][' . $j . '][x]"'
. ' value="' . escape($gis_data[$a][$type][$k][$i][$j]['x']). '" />';
echo '<label for="y">' . __("Y") . '</label>';
echo '<input type="text"'
. ' name="gis_data[' . $a . '][' . $type . '][' . $k . '][' . $i . '][' . $j . '][y]"'
. ' value="' . escape($gis_data[$a][$type][$k][$i][$j]['y']) . '" />';
}
echo '<input type="submit"'
. ' name="gis_data[' . $a . '][' . $type . '][' . $k . '][' . $i . '][add_point]"'
. ' class="add addPoint" value="' . __("Add a point") . '" />';
}
echo '<br/>';
echo '<input type="submit"'
. ' name="gis_data[' . $a . '][' . $type . '][' . $k . '][add_line]"'
. ' class="add addLine" value="' . __('Add an inner ring'). '" />';
echo '<br/>';
}
echo '<br/>';
echo '<input type="submit"'
. ' name="gis_data[' . $a . '][' . $type . '][add_polygon]"'
. ' class="add addPolygon" value="' . __('Add a polygon') . '" />';
}
}
if ($geom_type == 'GEOMETRYCOLLECTION') {
echo '<br/><br/>';
echo '<input type="submit" name="gis_data[GEOMETRYCOLLECTION][add_geom]"'
. 'class="add addGeom" value="' . __("Add geometry") . '" />';
}
echo '</div>';
echo '<!-- End of data section -->';
echo '<br/>';
echo '<input type="submit" name="gis_data[save]" value="' . __('Go') . '" />';
echo '<div id="gis_data_output">';
echo '<h3>' . __('Output') . '</h3>';
echo '<p>';
echo __(
'Choose "GeomFromText" from the "Function" column and paste the'
. ' string below into the "Value" field'
);
echo '</p>';
echo '<textarea id="gis_data_textarea" cols="95" rows="5">';
echo $result;
echo '</textarea>';
echo '</div>';
echo '</div>';
echo '</form>';
PMA_Response::getInstance()->addJSON('gis_editor', ob_get_contents());
ob_end_clean();
?>

View File

@ -0,0 +1,643 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Core script for import, this is just the glue around all other stuff
*
* @package PhpMyAdmin
*/
/* Enable LOAD DATA LOCAL INFILE for LDI plugin */
if (isset($_POST['format']) && $_POST['format'] == 'ldi') {
define('PMA_ENABLE_LDI', 1);
}
/**
* Get the variables sent or posted to this script and a core script
*/
require_once 'libraries/common.inc.php';
//require_once 'libraries/display_import_functions.lib.php';
if (isset($_REQUEST['show_as_php'])) {
$GLOBALS['show_as_php'] = $_REQUEST['show_as_php'];
}
/**
* Sets globals from $_POST
*/
$post_params = array(
'action_bookmark',
'allow_interrupt',
'bkm_label',
'bookmark_variable',
'charset_of_file',
'format',
'id_bookmark',
'import_type',
'is_js_confirmed',
'MAX_FILE_SIZE',
'message_to_show',
'noplugin',
'skip_queries',
'local_import_file'
);
// TODO: adapt full list of allowed parameters, as in export.php
foreach ($post_params as $one_post_param) {
if (isset($_POST[$one_post_param])) {
$GLOBALS[$one_post_param] = $_POST[$one_post_param];
}
}
// reset import messages for ajax request
$_SESSION['Import_message']['message'] = null;
$_SESSION['Import_message']['go_back_url'] = null;
// default values
$GLOBALS['reload'] = false;
// Use to identify curren cycle is executing
// a multiquery statement or stored routine
if (!isset($_SESSION['is_multi_query'])) {
$_SESSION['is_multi_query'] = false;
}
// Are we just executing plain query or sql file?
// (eg. non import, but query box/window run)
if (! empty($sql_query)) {
// run SQL query
$import_text = $sql_query;
$import_type = 'query';
$format = 'sql';
// refresh navigation and main panels
if (preg_match('/^(DROP)\s+(VIEW|TABLE|DATABASE|SCHEMA)\s+/i', $sql_query)) {
$GLOBALS['reload'] = true;
}
// refresh navigation panel only
if (preg_match('/^(CREATE|ALTER)\s+(VIEW|TABLE|DATABASE|SCHEMA)\s+/i', $sql_query)) {
$ajax_reload['reload'] = true;
}
// do a dynamic reload if table is RENAMED
// (by sending the instruction to the AJAX response handler)
if (preg_match('/^RENAME\s+TABLE\s+(.*?)\s+TO\s+(.*?)($|;|\s)/i', $sql_query, $rename_table_names)) {
$ajax_reload['table_name'] = PMA_Util::unQuote($rename_table_names[2]);
$ajax_reload['reload'] = true;
}
$sql_query = '';
} elseif (! empty($sql_localfile)) {
// run SQL file on server
$local_import_file = $sql_localfile;
$import_type = 'queryfile';
$format = 'sql';
unset($sql_localfile);
} elseif (! empty($sql_file)) {
// run uploaded SQL file
$import_file = $sql_file;
$import_type = 'queryfile';
$format = 'sql';
unset($sql_file);
} elseif (! empty($id_bookmark)) {
// run bookmark
$import_type = 'query';
$format = 'sql';
}
// If we didn't get any parameters, either user called this directly, or
// upload limit has been reached, let's assume the second possibility.
;
if ($_POST == array() && $_GET == array()) {
$message = PMA_Message::error(
__('You probably tried to upload a file that is too large. Please refer to %sdocumentation%s for a workaround for this limit.')
);
$message->addParam('[doc@faq1-16]');
$message->addParam('[/doc]');
// so we can obtain the message
$_SESSION['Import_message']['message'] = $message->getDisplay();
$_SESSION['Import_message']['go_back_url'] = $goto;
$message->display();
exit; // the footer is displayed automatically
}
/**
* Sets globals from $_POST patterns, for import plugins
* We only need to load the selected plugin
*/
if (! in_array(
$format,
array(
'csv',
'ldi',
'mediawiki',
'ods',
'shp',
'sql',
'xml'
)
)
) {
// this should not happen for a normal user
// but only during an attack
PMA_fatalError('Incorrect format parameter');
}
$post_patterns = array(
'/^force_file_/',
'/^'. $format . '_/'
);
foreach (array_keys($_POST) as $post_key) {
foreach ($post_patterns as $one_post_pattern) {
if (preg_match($one_post_pattern, $post_key)) {
$GLOBALS[$post_key] = $_POST[$post_key];
}
}
}
// Check needed parameters
PMA_Util::checkParameters(array('import_type', 'format'));
// We don't want anything special in format
$format = PMA_securePath($format);
// Import functions
require_once 'libraries/import.lib.php';
// Create error and goto url
if ($import_type == 'table') {
$err_url = 'tbl_import.php?' . PMA_generate_common_url($db, $table);
$_SESSION['Import_message']['go_back_url'] = $err_url;
$goto = 'tbl_import.php';
} elseif ($import_type == 'database') {
$err_url = 'db_import.php?' . PMA_generate_common_url($db);
$_SESSION['Import_message']['go_back_url'] = $err_url;
$goto = 'db_import.php';
} elseif ($import_type == 'server') {
$err_url = 'server_import.php?' . PMA_generate_common_url();
$_SESSION['Import_message']['go_back_url'] = $err_url;
$goto = 'server_import.php';
} else {
if (empty($goto) || !preg_match('@^(server|db|tbl)(_[a-z]*)*\.php$@i', $goto)) {
if (strlen($table) && strlen($db)) {
$goto = 'tbl_structure.php';
} elseif (strlen($db)) {
$goto = 'db_structure.php';
} else {
$goto = 'server_sql.php';
}
}
if (strlen($table) && strlen($db)) {
$common = PMA_generate_common_url($db, $table);
} elseif (strlen($db)) {
$common = PMA_generate_common_url($db);
} else {
$common = PMA_generate_common_url();
}
$err_url = $goto . '?' . $common
. (preg_match('@^tbl_[a-z]*\.php$@', $goto)
? '&amp;table=' . htmlspecialchars($table)
: '');
$_SESSION['Import_message']['go_back_url'] = $err_url;
}
if (strlen($db)) {
PMA_DBI_select_db($db);
}
@set_time_limit($cfg['ExecTimeLimit']);
if (! empty($cfg['MemoryLimit'])) {
@ini_set('memory_limit', $cfg['MemoryLimit']);
}
$timestamp = time();
if (isset($allow_interrupt)) {
$maximum_time = ini_get('max_execution_time');
} else {
$maximum_time = 0;
}
// set default values
$timeout_passed = false;
$error = false;
$read_multiply = 1;
$finished = false;
$offset = 0;
$max_sql_len = 0;
$file_to_unlink = '';
$sql_query = '';
$sql_query_disabled = false;
$go_sql = false;
$executed_queries = 0;
$run_query = true;
$charset_conversion = false;
$reset_charset = false;
$bookmark_created = false;
// Bookmark Support: get a query back from bookmark if required
if (! empty($id_bookmark)) {
$id_bookmark = (int)$id_bookmark;
include_once 'libraries/bookmark.lib.php';
switch ($action_bookmark) {
case 0: // bookmarked query that have to be run
$import_text = PMA_Bookmark_get(
$db,
$id_bookmark,
'id',
isset($action_bookmark_all)
);
if (isset($bookmark_variable) && ! empty($bookmark_variable)) {
$import_text = preg_replace(
'|/\*(.*)\[VARIABLE\](.*)\*/|imsU',
'${1}' . PMA_Util::sqlAddSlashes($bookmark_variable) . '${2}',
$import_text
);
}
// refresh navigation and main panels
if (preg_match('/^(DROP)\s+(VIEW|TABLE|DATABASE|SCHEMA)\s+/i', $import_text)) {
$GLOBALS['reload'] = true;
}
// refresh navigation panel only
if (preg_match('/^(CREATE|ALTER)\s+(VIEW|TABLE|DATABASE|SCHEMA)\s+/i', $import_text)) {
$ajax_reload['reload'] = true;
}
break;
case 1: // bookmarked query that have to be displayed
$import_text = PMA_Bookmark_get($db, $id_bookmark);
if ($GLOBALS['is_ajax_request'] == true) {
$message = PMA_Message::success(__('Showing bookmark'));
$response = PMA_Response::getInstance();
$response->isSuccess($message->isSuccess());
$response->addJSON('message', $message);
$response->addJSON('sql_query', $import_text);
$response->addJSON('action_bookmark', $action_bookmark);
exit;
} else {
$run_query = false;
}
break;
case 2: // bookmarked query that have to be deleted
$import_text = PMA_Bookmark_get($db, $id_bookmark);
PMA_Bookmark_delete($db, $id_bookmark);
if ($GLOBALS['is_ajax_request'] == true) {
$message = PMA_Message::success(__('The bookmark has been deleted.'));
$response = PMA_Response::getInstance();
$response->isSuccess($message->isSuccess());
$response->addJSON('message', $message);
$response->addJSON('action_bookmark', $action_bookmark);
$response->addJSON('id_bookmark', $id_bookmark);
exit;
} else {
$run_query = false;
$error = true; // this is kind of hack to skip processing the query
}
break;
}
} // end bookmarks reading
// Do no run query if we show PHP code
if (isset($GLOBALS['show_as_php'])) {
$run_query = false;
$go_sql = true;
}
// We can not read all at once, otherwise we can run out of memory
$memory_limit = trim(@ini_get('memory_limit'));
// 2 MB as default
if (empty($memory_limit)) {
$memory_limit = 2 * 1024 * 1024;
}
// In case no memory limit we work on 10MB chunks
if ($memory_limit == -1) {
$memory_limit = 10 * 1024 * 1024;
}
// Calculate value of the limit
if (strtolower(substr($memory_limit, -1)) == 'm') {
$memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024;
} elseif (strtolower(substr($memory_limit, -1)) == 'k') {
$memory_limit = (int)substr($memory_limit, 0, -1) * 1024;
} elseif (strtolower(substr($memory_limit, -1)) == 'g') {
$memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024 * 1024;
} else {
$memory_limit = (int)$memory_limit;
}
// Just to be sure, there might be lot of memory needed for uncompression
$read_limit = $memory_limit / 8;
// handle filenames
if (isset($_FILES['import_file'])) {
$import_file = $_FILES['import_file']['tmp_name'];
}
if (! empty($local_import_file) && ! empty($cfg['UploadDir'])) {
// sanitize $local_import_file as it comes from a POST
$local_import_file = PMA_securePath($local_import_file);
$import_file = PMA_Util::userDir($cfg['UploadDir'])
. $local_import_file;
/*
* Do not allow symlinks to avoid security issues
* (user can create symlink to file he can not access,
* but phpMyAdmin can).
*/
if (is_link($import_file)) {
$import_file = 'none';
}
} elseif (empty($import_file) || ! is_uploaded_file($import_file)) {
$import_file = 'none';
}
// Do we have file to import?
if ($import_file != 'none' && ! $error) {
// work around open_basedir and other limitations
$open_basedir = @ini_get('open_basedir');
// If we are on a server with open_basedir, we must move the file
// before opening it. The doc explains how to create the "./tmp"
// directory
if (! empty($open_basedir)) {
$tmp_subdir = (PMA_IS_WINDOWS ? '.\\tmp\\' : 'tmp/');
if (is_writable($tmp_subdir)) {
$import_file_new = $tmp_subdir . basename($import_file) . uniqid();
if (move_uploaded_file($import_file, $import_file_new)) {
$import_file = $import_file_new;
$file_to_unlink = $import_file_new;
}
$size = filesize($import_file);
}
}
/**
* Handle file compression
* @todo duplicate code exists in File.class.php
*/
$compression = PMA_detectCompression($import_file);
if ($compression === false) {
$message = PMA_Message::error(__('File could not be read'));
$error = true;
} else {
switch ($compression) {
case 'application/bzip2':
if ($cfg['BZipDump'] && @function_exists('bzopen')) {
$import_handle = @bzopen($import_file, 'r');
} else {
$message = PMA_Message::error(
__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.')
);
$message->addParam($compression);
$error = true;
}
break;
case 'application/gzip':
if ($cfg['GZipDump'] && @function_exists('gzopen')) {
$import_handle = @gzopen($import_file, 'r');
} else {
$message = PMA_Message::error(
__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.')
);
$message->addParam($compression);
$error = true;
}
break;
case 'application/zip':
if ($cfg['ZipDump'] && @function_exists('zip_open')) {
/**
* Load interface for zip extension.
*/
include_once 'libraries/zip_extension.lib.php';
$result = PMA_getZipContents($import_file);
if (! empty($result['error'])) {
$message = PMA_Message::rawError($result['error']);
$error = true;
} else {
$import_text = $result['data'];
}
} else {
$message = PMA_Message::error(
__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.')
);
$message->addParam($compression);
$error = true;
}
break;
case 'none':
$import_handle = @fopen($import_file, 'r');
break;
default:
$message = PMA_Message::error(
__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.')
);
$message->addParam($compression);
$error = true;
break;
}
}
// use isset() because zip compression type does not use a handle
if (! $error && isset($import_handle) && $import_handle === false) {
$message = PMA_Message::error(__('File could not be read'));
$error = true;
}
} elseif (! $error) {
if (! isset($import_text) || empty($import_text)) {
$message = PMA_Message::error(
__('No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See [doc@faq1-16]FAQ 1.16[/doc].')
);
$error = true;
}
}
// so we can obtain the message
//$_SESSION['Import_message'] = $message->getDisplay();
// Convert the file's charset if necessary
if ($GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE && isset($charset_of_file)) {
if ($charset_of_file != 'utf-8') {
$charset_conversion = true;
}
} elseif (isset($charset_of_file) && $charset_of_file != 'utf8') {
if (PMA_DRIZZLE) {
// Drizzle doesn't support other character sets,
// so we can't fallback to SET NAMES - throw an error
$error = true;
$message = PMA_Message::error(
__('Cannot convert file\'s character set without character set conversion library')
);
} else {
PMA_DBI_query('SET NAMES \'' . $charset_of_file . '\'');
// We can not show query in this case, it is in different charset
$sql_query_disabled = true;
$reset_charset = true;
}
}
// Something to skip?
if (! $error && isset($skip)) {
$skip = intval($skip);
$original_skip = $skip;
while ($skip > 0 && ! $finished) {
PMA_importGetNextChunk($skip < $read_limit ? $skip : $read_limit);
// Disable read progresivity, otherwise we eat all memory!
$read_multiply = 1;
$skip -= $read_limit;
}
unset($skip);
}
// This array contain the data like numberof valid sql queries in the statement
// and complete valid sql statement (which affected for rows)
$sql_data = array('valid_sql' => array(), 'valid_queries' => 0);
if (! $error) {
// Check for file existance
include_once "libraries/plugin_interface.lib.php";
$import_plugin = PMA_getPlugin(
"import",
$format,
'libraries/plugins/import/',
$import_type
);
if ($import_plugin == null) {
$error = true;
$message = PMA_Message::error(
__('Could not load import plugins, please check your installation!')
);
} else {
// Do the real import
$import_plugin->doImport($sql_data);
}
}
if (! $error && false !== $import_handle && null !== $import_handle) {
fclose($import_handle);
}
// Cleanup temporary file
if ($file_to_unlink != '') {
unlink($file_to_unlink);
}
// Reset charset back, if we did some changes
if ($reset_charset) {
PMA_DBI_query('SET CHARACTER SET utf8');
PMA_DBI_query(
'SET SESSION collation_connection =\'' . $collation_connection . '\''
);
}
// Show correct message
if (! empty($id_bookmark) && $action_bookmark == 2) {
$message = PMA_Message::success(__('The bookmark has been deleted.'));
$display_query = $import_text;
$error = false; // unset error marker, it was used just to skip processing
} elseif (! empty($id_bookmark) && $action_bookmark == 1) {
$message = PMA_Message::notice(__('Showing bookmark'));
} elseif ($bookmark_created) {
$special_message = '[br]' . sprintf(
__('Bookmark %s created'),
htmlspecialchars($bkm_label)
);
} elseif ($finished && ! $error) {
if ($import_type == 'query') {
$message = PMA_Message::success();
} else {
if ($import_notice) {
$message = PMA_Message::success(
'<em>' . __('Import has been successfully finished, %d queries executed.') . '</em>'
);
$message->addParam($executed_queries);
$message->addString($import_notice);
if (isset($local_import_file)) {
$message->addString('(' . $local_import_file . ')');
} else {
$message->addString('(' . $_FILES['import_file']['name'] . ')');
}
} else {
$message = PMA_Message::success(
__('Import has been successfully finished, %d queries executed.')
);
$message->addParam($executed_queries);
if (isset($local_import_file)) {
$message->addString('(' . $local_import_file . ')');
} else {
$message->addString('(' . $_FILES['import_file']['name'] . ')');
}
}
}
}
// Did we hit timeout? Tell it user.
if ($timeout_passed) {
$message = PMA_Message::error(
__('Script timeout passed, if you want to finish import, please resubmit same file and import will resume.')
);
if ($offset == 0 || (isset($original_skip) && $original_skip == $offset)) {
$message->addString(
__('However on last run no data has been parsed, this usually means phpMyAdmin won\'t be able to finish this import unless you increase php time limits.')
);
}
}
// if there is any message, copy it into $_SESSION as well,
// so we can obtain it by AJAX call
if (isset($message)) {
$_SESSION['Import_message']['message'] = $message->getDisplay();
}
// Parse and analyze the query, for correct db and table name
// in case of a query typed in the query window
// (but if the query is too large, in case of an imported file, the parser
// can choke on it so avoid parsing)
if (strlen($sql_query) <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
include_once 'libraries/parse_analyze.lib.php';
}
// There was an error?
if (isset($my_die)) {
foreach ($my_die AS $key => $die) {
PMA_Util::mysqlDie(
$die['error'], $die['sql'], '', $err_url, $error
);
}
}
// we want to see the results of the last query that returned at least a row
if (! empty($last_query_with_results)) {
// but we want to show intermediate results too
$disp_query = $sql_query;
$disp_message = __('Your SQL query has been executed successfully');
$sql_query = $last_query_with_results;
$go_sql = true;
}
if ($go_sql) {
include 'sql.php';
} else if ($result) {
$response = PMA_Response::getInstance();
$response->isSuccess(true);
$response->addJSON('message', PMA_Message::success($msg));
$response->addJSON('sql_query', PMA_Util::getMessage($msg, $sql_query, 'success'));
} else if ($result == false) {
$response = PMA_Response::getInstance();
$response->isSuccess(false);
$response->addJSON('message', PMA_Message::error($msg));
} else {
$active_page = $goto;
include '' . $goto;
}
?>

View File

@ -0,0 +1,105 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
*
* @package PhpMyAdmin
*/
/* PHP 5.4 stores upload progress data only in the default session.
* After calling session_name(), we won't find the progress data anymore.
*
* https://bugs.php.net/bug.php?id=64075
*
* The bug should be somewhere in
* https://github.com/php/php-src/blob/master/ext/session/session.c#L2342
*
* Until this is fixed, we need to load the default session to load the data,
* export the upload progress information from there,
* and re-import after switching to our session.
*/
if (version_compare(PHP_VERSION, '5.4.0', '>=')
&& ini_get('session.upload_progress.enabled')
) {
$sessionupload = array();
define('UPLOAD_PREFIX', ini_get('session.upload_progress.prefix'));
session_start();
foreach ($_SESSION as $key => $value) {
// only copy session-prefixed data
if (substr($key, 0, strlen(UPLOAD_PREFIX)) == UPLOAD_PREFIX) {
$sessionupload[$key] = $value;
}
}
// PMA will kill all variables, so let's use a constant
define('SESSIONUPLOAD', serialize($sessionupload));
session_write_close();
session_name('phpMyAdmin');
session_id($_COOKIE['phpMyAdmin']);
}
define('PMA_MINIMUM_COMMON', 1);
require_once 'libraries/common.inc.php';
require_once 'libraries/display_import_ajax.lib.php';
if (defined('SESSIONUPLOAD')) {
// write sessionupload back into the loaded PMA session
$sessionupload = unserialize(SESSIONUPLOAD);
foreach ($sessionupload as $key => $value) {
$_SESSION[$key] = $value;
}
// remove session upload data that are not set anymore
foreach ($_SESSION as $key => $value) {
if (substr($key, 0, strlen(UPLOAD_PREFIX)) == UPLOAD_PREFIX
&& ! isset($sessionupload[$key])
) {
unset($_SESSION[$key]);
}
}
}
/**
* Sets globals from $_GET
*/
$get_params = array(
'message',
'id'
);
foreach ($get_params as $one_get_param) {
if (isset($_GET[$one_get_param])) {
$GLOBALS[$one_get_param] = $_GET[$one_get_param];
}
}
// AJAX requests can't be cached!
PMA_noCacheHeader();
// $GLOBALS["message"] is used for asking for an import message
if (isset($GLOBALS["message"]) && $GLOBALS["message"]) {
header('Content-type: text/html');
// wait 0.3 sec before we check for $_SESSION variable,
// which is set inside import.php
usleep(300000);
// wait until message is available
while ($_SESSION['Import_message']['message'] == null) {
usleep(250000); // 0.25 sec
}
echo $_SESSION['Import_message']['message'];
echo '<fieldset class="tblFooters">' . "\n";
echo ' [ <a href="' . $_SESSION['Import_message']['go_back_url']
. '">' . __('Back') . '</a> ]' . "\n";
echo '</fieldset>'."\n";
} else {
PMA_importAjaxStatus($GLOBALS["id"]);
}
?>

View File

@ -0,0 +1,624 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
*
* @package PhpMyAdmin
*/
/**
* Gets some core libraries and displays a top message if required
*/
require_once 'libraries/common.inc.php';
/**
* display Git revision if requested
*/
require_once 'libraries/display_git_revision.lib.php';
/**
* pass variables to child pages
*/
$drops = array(
'lang',
'server',
'collation_connection',
'db',
'table'
);
foreach ($drops as $each_drop) {
if (array_key_exists($each_drop, $_GET)) {
unset($_GET[$each_drop]);
}
}
unset($drops, $each_drop);
// If we have a valid target, let's load that script instead
if (! empty($_REQUEST['target'])
&& is_string($_REQUEST['target'])
&& ! preg_match('/^index/', $_REQUEST['target'])
&& in_array($_REQUEST['target'], $goto_whitelist)
) {
include $_REQUEST['target'];
exit;
}
/**
* Check if it is an ajax request to reload the recent tables list.
*/
require_once 'libraries/RecentTable.class.php';
if ($GLOBALS['is_ajax_request'] && ! empty($_REQUEST['recent_table'])) {
$response = PMA_Response::getInstance();
$response->addJSON(
'options',
PMA_RecentTable::getInstance()->getHtmlSelectOption()
);
exit;
}
if ($GLOBALS['PMA_Config']->isGitRevision()) {
if (isset($_REQUEST['git_revision']) && $GLOBALS['is_ajax_request'] == true) {
PMA_printGitRevision();
exit;
}
echo '<div id="is_git_revision"></div>';
}
// Handles some variables that may have been sent by the calling script
$GLOBALS['db'] = '';
$GLOBALS['table'] = '';
$show_query = '1';
// Any message to display?
if (! empty($message)) {
echo PMA_Util::getMessage($message);
unset($message);
}
$common_url_query = PMA_generate_common_url('', '');
// when $server > 0, a server has been chosen so we can display
// all MySQL-related information
if ($server > 0) {
include 'libraries/server_common.inc.php';
include 'libraries/StorageEngine.class.php';
// Use the verbose name of the server instead of the hostname
// if a value is set
$server_info = '';
if (! empty($cfg['Server']['verbose'])) {
$server_info .= htmlspecialchars($cfg['Server']['verbose']);
if ($GLOBALS['cfg']['ShowServerInfo']) {
$server_info .= ' (';
}
}
if ($GLOBALS['cfg']['ShowServerInfo'] || empty($cfg['Server']['verbose'])) {
$server_info .= PMA_DBI_get_host_info();
}
if (! empty($cfg['Server']['verbose']) && $GLOBALS['cfg']['ShowServerInfo']) {
$server_info .= ')';
}
$mysql_cur_user_and_host = PMA_DBI_fetch_value('SELECT USER();');
// should we add the port info here?
$short_server_info = (!empty($GLOBALS['cfg']['Server']['verbose'])
? $GLOBALS['cfg']['Server']['verbose']
: $GLOBALS['cfg']['Server']['host']);
}
echo '<div id="maincontainer">' . "\n";
echo '<div id="main_pane_left">';
if ($server > 0 || count($cfg['Servers']) > 1
) {
echo '<div class="group">';
echo '<h2>' . __('General Settings') . '</h2>';
echo '<ul>';
/**
* Displays the MySQL servers choice form
*/
if ($cfg['ServerDefault'] == 0
|| (! $cfg['NavigationDisplayServers']
&& (count($cfg['Servers']) > 1
|| ($server == 0 && count($cfg['Servers']) == 1)
)
)
) {
echo '<li id="li_select_server" class="no_bullets" >';
include_once 'libraries/select_server.lib.php';
echo PMA_Util::getImage('s_host.png') . " " . PMA_selectServer(true, true);
echo '</li>';
}
/**
* Displays the mysql server related links
*/
if ($server > 0 && ! PMA_DRIZZLE) {
include_once 'libraries/check_user_privileges.lib.php';
// Logout for advanced authentication
if ($cfg['Server']['auth_type'] != 'config') {
if ($cfg['ShowChgPassword']) {
$conditional_class = 'ajax';
PMA_printListItem(
PMA_Util::getImage('s_passwd.png') . " " . __('Change password'),
'li_change_password',
'user_password.php?' . $common_url_query,
null,
null,
'change_password_anchor',
"no_bullets",
$conditional_class
);
}
} // end if
echo ' <li id="li_select_mysql_collation" class="no_bullets" >';
echo ' <form method="post" action="index.php">' . "\n"
. PMA_generate_common_hidden_inputs(null, null, 4, 'collation_connection')
. ' <label for="select_collation_connection">' . "\n"
. ' '. PMA_Util::getImage('s_asci.png') . " "
. __('Server connection collation') . "\n"
// put the doc link in the form so that it appears on the same line
. PMA_Util::showMySQLDocu(
'MySQL_Database_Administration',
'Charset-connection'
)
. ': ' . "\n"
. ' </label>' . "\n"
. PMA_generateCharsetDropdownBox(
PMA_CSDROPDOWN_COLLATION,
'collation_connection',
'select_collation_connection',
$collation_connection,
true,
4,
true
)
. ' </form>' . "\n"
. ' </li>' . "\n";
} // end of if ($server > 0 && !PMA_DRIZZLE)
echo '</ul>';
echo '</div>';
}
echo '<div class="group">';
echo '<h2>' . __('Appearance Settings') . '</h2>';
echo ' <ul>';
// Displays language selection combo
if (empty($cfg['Lang']) && count($GLOBALS['available_languages']) > 1) {
echo '<li id="li_select_lang" class="no_bullets">';
include_once 'libraries/display_select_lang.lib.php';
echo PMA_Util::getImage('s_lang.png') . " " . PMA_getLanguageSelectorHtml();
echo '</li>';
}
// ThemeManager if available
if ($GLOBALS['cfg']['ThemeManager']) {
echo '<li id="li_select_theme" class="no_bullets">';
echo PMA_Util::getImage('s_theme.png') . " "
. $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox();
echo '</li>';
}
echo '<li id="li_select_fontsize">';
echo PMA_Config::getFontsizeForm();
echo '</li>';
echo '</ul>';
// User preferences
if ($server > 0) {
echo '<ul>';
PMA_printListItem(
PMA_Util::getImage('b_tblops.png')." " .__('More settings'),
'li_user_preferences',
'prefs_manage.php?' . $common_url_query,
null,
null,
null,
"no_bullets"
);
echo '</ul>';
}
echo '</div>';
echo '</div>';
echo '<div id="main_pane_right">';
if ($server > 0 && $GLOBALS['cfg']['ShowServerInfo']) {
echo '<div class="group">';
echo '<h2>' . __('Database server') . '</h2>';
echo '<ul>' . "\n";
PMA_printListItem(
__('Server') . ': ' . $server_info,
'li_server_info'
);
PMA_printListItem(
__('Server type') . ': ' . PMA_Util::getServerType(),
'li_server_type'
);
PMA_printListItem(
__('Server version') . ': ' . PMA_MYSQL_STR_VERSION . ' - ' . PMA_MYSQL_VERSION_COMMENT,
'li_server_version'
);
PMA_printListItem(
__('Protocol version') . ': ' . PMA_DBI_get_proto_info(),
'li_mysql_proto'
);
PMA_printListItem(
__('User') . ': ' . htmlspecialchars($mysql_cur_user_and_host),
'li_user_info'
);
echo ' <li id="li_select_mysql_charset">';
echo ' ' . __('Server charset') . ': '
. ' <span lang="en" dir="ltr">';
if (! PMA_DRIZZLE) {
echo ' ' . $mysql_charsets_descriptions[$mysql_charset_map['utf-8']] . "\n";
}
echo ' (' . $mysql_charset_map['utf-8'] . ')' . "\n"
. ' </span>' . "\n"
. ' </li>' . "\n";
echo ' </ul>';
echo ' </div>';
}
if ($GLOBALS['cfg']['ShowServerInfo']) {
echo '<div class="group">';
echo '<h2>' . __('Web server') . '</h2>';
echo '<ul>';
if ($GLOBALS['cfg']['ShowServerInfo']) {
PMA_printListItem($_SERVER['SERVER_SOFTWARE'], 'li_web_server_software');
if ($server > 0) {
$client_version_str = PMA_DBI_get_client_info();
if (preg_match('#\d+\.\d+\.\d+#', $client_version_str)
&& in_array($GLOBALS['cfg']['Server']['extension'], array('mysql', 'mysqli'))
) {
$client_version_str = 'libmysql - ' . $client_version_str;
}
PMA_printListItem(
__('Database client version') . ': ' . $client_version_str,
'li_mysql_client_version'
);
$php_ext_string = __('PHP extension') . ': '
. $GLOBALS['cfg']['Server']['extension'] . ' '
. PMA_Util::showPHPDocu(
'book.' . $GLOBALS['cfg']['Server']['extension'] . '.php'
);
PMA_printListItem(
$php_ext_string,
'li_used_php_extension'
);
}
}
echo ' </ul>';
echo ' </div>';
}
echo '<div class="group pmagroup">';
echo '<h2>phpMyAdmin</h2>';
echo '<ul>';
$class = null;
// We rely on CSP to allow access to https://www.phpmyadmin.net, but IE lacks
// support here and does not allow request to http once using https.
if ($GLOBALS['cfg']['VersionCheck']
&& (! $GLOBALS['PMA_Config']->get('is_https') || PMA_USR_BROWSER_AGENT != 'IE')
) {
$class = 'jsversioncheck';
}
PMA_printListItem(
__('Version information') . ': ' . PMA_VERSION,
'li_pma_version',
null,
null,
null,
null,
$class
);
PMA_printListItem(
__('Documentation'),
'li_pma_docs',
PMA_Util::getDocuLink('index'),
null,
'_blank'
);
PMA_printListItem(
__('Wiki'),
'li_pma_wiki',
PMA_linkURL('https://wiki.phpmyadmin.net/'),
null,
'_blank'
);
// does not work if no target specified, don't know why
PMA_printListItem(
__('Official Homepage'),
'li_pma_homepage',
PMA_linkURL('http://www.phpmyadmin.net/'),
null,
'_blank'
);
PMA_printListItem(
__('Contribute'),
'li_pma_contribute',
PMA_linkURL('https://www.phpmyadmin.net/home_page/improve.php'),
null,
'_blank'
);
PMA_printListItem(
__('Get support'),
'li_pma_support',
PMA_linkURL('https://www.phpmyadmin.net/home_page/support.php'),
null,
'_blank'
);
PMA_printListItem(
__('List of changes'),
'li_pma_changes',
PMA_linkURL('changelog.php'),
null,
'_blank'
);
?>
</ul>
</div>
</div>
</div>
<?php
/**
* Warning if using the default MySQL privileged account
*/
if ($server != 0
&& $cfg['Server']['user'] == 'root'
&& $cfg['Server']['password'] == ''
) {
trigger_error(
__('Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user \'root\'.'),
E_USER_WARNING
);
}
/**
* Nijel: As we try to handle charsets by ourself, mbstring overloads just
* break it, see bug 1063821.
*/
if (@extension_loaded('mbstring') && @ini_get('mbstring.func_overload') > 1) {
trigger_error(
__('You have enabled mbstring.func_overload in your PHP configuration. This option is incompatible with phpMyAdmin and might cause some data to be corrupted!'),
E_USER_WARNING
);
}
/**
* Nijel: mbstring is used for handling multibyte inside parser, so it is good
* to tell user something might be broken without it, see bug #1063149.
*/
if (! @extension_loaded('mbstring')) {
trigger_error(
__('The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.'),
E_USER_WARNING
);
}
/**
* Check whether session.gc_maxlifetime limits session validity.
*/
$gc_time = (int)@ini_get('session.gc_maxlifetime');
if ($gc_time < $GLOBALS['cfg']['LoginCookieValidity'] ) {
trigger_error(
__('Your PHP parameter [a@http://php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime@_blank]session.gc_maxlifetime[/a] is lower than cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.'),
E_USER_WARNING
);
}
/**
* Check whether LoginCookieValidity is limited by LoginCookieStore.
*/
if ($GLOBALS['cfg']['LoginCookieStore'] != 0
&& $GLOBALS['cfg']['LoginCookieStore'] < $GLOBALS['cfg']['LoginCookieValidity']
) {
trigger_error(
__('Login cookie store is lower than cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.'),
E_USER_WARNING
);
}
/**
* Check if user does not have defined blowfish secret and it is being used.
*/
if (! empty($_SESSION['encryption_key'])) {
if (empty($GLOBALS['cfg']['blowfish_secret'])) {
trigger_error(
__(
'The configuration file now needs a secret passphrase (blowfish_secret).'
),
E_USER_WARNING
);
} elseif (strlen($GLOBALS['cfg']['blowfish_secret']) < 32) {
trigger_error(
__(
'The secret passphrase in configuration (blowfish_secret) is too short.'
),
E_USER_WARNING
);
}
}
/**
* Check for existence of config directory which should not exist in
* production environment.
*/
if (file_exists('config')) {
trigger_error(
__('Directory [code]config[/code], which is used by the setup script, still exists in your phpMyAdmin directory. You should remove it once phpMyAdmin has been configured.'),
E_USER_WARNING
);
}
if ($server > 0) {
$cfgRelation = PMA_getRelationsParam();
if (! $cfgRelation['allworks']
&& $cfg['PmaNoRelation_DisableWarning'] == false
) {
$msg = PMA_Message::notice(__('The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click %shere%s.'));
$msg->addParam(
'<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $common_url_query . '">',
false
);
$msg->addParam('</a>', false);
/* Show error if user has configured something, notice elsewhere */
if (!empty($cfg['Servers'][$server]['pmadb'])) {
$msg->isError(true);
}
$msg->display();
} // end if
}
/**
* Warning about different MySQL library and server version
* (a difference on the third digit does not count).
* If someday there is a constant that we can check about mysqlnd,
* we can use it instead of strpos().
* If no default server is set, PMA_DBI_get_client_info() is not defined yet.
* Drizzle can speak MySQL protocol, so don't warn about version mismatch for
* Drizzle servers.
*/
if (function_exists('PMA_DBI_get_client_info')
&& !PMA_DRIZZLE
&& $cfg['ServerLibraryDifference_DisableWarning'] == false
) {
$_client_info = PMA_DBI_get_client_info();
if ($server > 0
&& strpos($_client_info, 'mysqlnd') === false
&& substr(PMA_MYSQL_CLIENT_API, 0, 3) != substr(PMA_MYSQL_INT_VERSION, 0, 3)
) {
trigger_error(
PMA_sanitize(
sprintf(
__('Your PHP MySQL library version %s differs from your MySQL server version %s. This may cause unpredictable behavior.'),
$_client_info,
substr(
PMA_MYSQL_STR_VERSION,
0,
strpos(PMA_MYSQL_STR_VERSION . '-', '-')
)
)
),
E_USER_NOTICE
);
}
unset($_client_info);
}
/**
* Warning about Suhosin
*/
if ($cfg['SuhosinDisableWarning'] == false
&& @ini_get('suhosin.request.max_value_length')
// warn about Suhosin only if its simulation mode is not enabled
&& @ini_get('suhosin.simulation') == '0'
) {
trigger_error(
sprintf(
__('Server running with Suhosin. Please refer to %sdocumentation%s for possible issues.'),
'[doc@faq1-38]',
'[/doc]'
),
E_USER_WARNING
);
}
/**
* Warning about mcrypt.
*/
if (! function_exists('mcrypt_encrypt')
&& ! $GLOBALS['cfg']['McryptDisableWarning']
) {
PMA_warnMissingExtension('mcrypt');
}
/**
* Warning about incomplete translations.
*
* The data file is created while creating release by ./scripts/remove-incomplete-mo
*/
if (file_exists('libraries/language_stats.inc.php')) {
include 'libraries/language_stats.inc.php';
/*
* This message is intentionally not translated, because we're
* handling incomplete translations here and focus on english
* speaking users.
*/
if (isset($GLOBALS['language_stats'][$lang])
&& $GLOBALS['language_stats'][$lang] < $cfg['TranslationWarningThreshold']
) {
trigger_error(
'You are using an incomplete translation, please help to make it better by [a@https://www.phpmyadmin.net/home_page/improve.php#translate@_blank]contributing[/a].',
E_USER_NOTICE
);
}
}
/**
* prints list item for main page
*
* @param string $name displayed text
* @param string $id id, used for css styles
* @param string $url make item as link with $url as target
* @param string $mysql_help_page display a link to MySQL's manual
* @param string $target special target for $url
* @param string $a_id id for the anchor,
* used for jQuery to hook in functions
* @param string $class class for the li element
* @param string $a_class class for the anchor element
*
* @return void
*/
function PMA_printListItem($name, $id = null, $url = null, $mysql_help_page = null,
$target = null, $a_id = null, $class = null, $a_class = null
) {
echo '<li id="' . $id . '"';
if (null !== $class) {
echo ' class="' . $class . '"';
}
echo '>';
if (null !== $url) {
echo '<a href="' . $url . '"';
if (null !== $target) {
echo ' target="' . $target . '"';
if ($target == '_blank') {
echo ' rel="noopener noreferrer"';
}
}
if (null != $a_id) {
echo ' id="' . $a_id .'"';
}
if (null != $a_class) {
echo ' class="' . $a_class .'"';
}
echo '>';
}
echo $name;
if (null !== $url) {
echo '</a>' . "\n";
}
if (null !== $mysql_help_page) {
echo PMA_Util::showMySQLDocu('', $mysql_help_page);
}
echo '</li>';
}
?>

View File

@ -0,0 +1,126 @@
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Namespace: Util.OSM
*/
OpenLayers.Util.OSM = {};
/**
* Constant: MISSING_TILE_URL
* {String} URL of image to display for missing tiles
*/
OpenLayers.Util.OSM.MISSING_TILE_URL = "http://www.openstreetmap.org/openlayers/img/404.png";
/**
* Property: originalOnImageLoadError
* {Function} Original onImageLoadError function.
*/
OpenLayers.Util.OSM.originalOnImageLoadError = OpenLayers.Util.onImageLoadError;
/**
* Function: onImageLoadError
*/
OpenLayers.Util.onImageLoadError = function() {
if (this.src.match(/^http:\/\/[abc]\.[a-z]+\.openstreetmap\.org\//)) {
this.src = OpenLayers.Util.OSM.MISSING_TILE_URL;
} else if (this.src.match(/^http:\/\/[def]\.tah\.openstreetmap\.org\//)) {
// do nothing - this layer is transparent
} else {
OpenLayers.Util.OSM.originalOnImageLoadError;
}
};
/**
* Class: OpenLayers.Layer.OSM.Mapnik
*
* Inherits from:
* - <OpenLayers.Layer.OSM>
*/
OpenLayers.Layer.OSM.Mapnik = OpenLayers.Class(OpenLayers.Layer.OSM, {
/**
* Constructor: OpenLayers.Layer.OSM.Mapnik
*
* Parameters:
* name - {String}
* options - {Object} Hashtable of extra options to tag onto the layer
*/
initialize: function(name, options) {
var url = [
"http://a.tile.openstreetmap.org/${z}/${x}/${y}.png",
"http://b.tile.openstreetmap.org/${z}/${x}/${y}.png",
"http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"
];
options = OpenLayers.Util.extend({
numZoomLevels: 19,
buffer: 0,
transitionEffect: "resize"
}, options);
var newArguments = [name, url, options];
OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
},
CLASS_NAME: "OpenLayers.Layer.OSM.Mapnik"
});
/**
* Class: OpenLayers.Layer.OSM.Osmarender
*
* Inherits from:
* - <OpenLayers.Layer.OSM>
*/
OpenLayers.Layer.OSM.Osmarender = OpenLayers.Class(OpenLayers.Layer.OSM, {
/**
* Constructor: OpenLayers.Layer.OSM.Osmarender
*
* Parameters:
* name - {String}
* options - {Object} Hashtable of extra options to tag onto the layer
*/
initialize: function(name, options) {
var url = [
"http://a.tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png",
"http://b.tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png",
"http://c.tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png"
];
options = OpenLayers.Util.extend({
numZoomLevels: 18,
buffer: 0,
transitionEffect: "resize"
}, options);
var newArguments = [name, url, options];
OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
},
CLASS_NAME: "OpenLayers.Layer.OSM.Osmarender"
});
/**
* Class: OpenLayers.Layer.OSM.CycleMap
*
* Inherits from:
* - <OpenLayers.Layer.OSM>
*/
OpenLayers.Layer.OSM.CycleMap = OpenLayers.Class(OpenLayers.Layer.OSM, {
/**
* Constructor: OpenLayers.Layer.OSM.CycleMap
*
* Parameters:
* name - {String}
* options - {Object} Hashtable of extra options to tag onto the layer
*/
initialize: function(name, options) {
var url = [
"http://a.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png",
"http://b.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png",
"http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png"
];
options = OpenLayers.Util.extend({
numZoomLevels: 19,
buffer: 0,
transitionEffect: "resize"
}, options);
var newArguments = [name, url, options];
OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
},
CLASS_NAME: "OpenLayers.Layer.OSM.CycleMap"
});

View File

@ -0,0 +1,819 @@
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* This object handles ajax requests for pages. It also
* handles the reloading of the main menu and scripts.
*/
var AJAX = {
/**
* @var bool active Whether we are busy
*/
active: false,
/**
* @var object source The object whose event initialized the request
*/
source: null,
/**
* @var function Callback to execute after a successful request
* Used by PMA_commonFunctions from common.js
*/
_callback: function () {},
/**
* @var bool _debug Makes noise in your Firebug console
*/
_debug: false,
/**
* @var object $msgbox A reference to a jQuery object that links to a message
* box that is generated by PMA_ajaxShowMessage()
*/
$msgbox: null,
/**
* Given the filename of a script, returns a hash to be
* used to refer to all the events registered for the file
*
* @param string key The filename for which to get the event name
*
* @return int
*/
hash: function (key){
/* http://burtleburtle.net/bob/hash/doobs.html#one */
key += "";
var len = key.length, hash=0, i=0;
for (; i<len; ++i) {
hash += key.charCodeAt(i);
hash += (hash << 10);
hash ^= (hash >> 6);
}
hash += (hash << 3);
hash ^= (hash >> 11);
hash += (hash << 15);
return Math.abs(hash);
},
/**
* Registers an onload event for a file
*
* @param string file The filename for which to register the event
* @param function func The function to execute when the page is ready
*
* @return self For chaining
*/
registerOnload: function (file, func) {
var eventName = 'onload_' + AJAX.hash(file);
$(document).bind(eventName, func);
this._debug && console.log(
// no need to translate
"Registered event " + eventName + " for file " + file
);
return this;
},
/**
* Registers a teardown event for a file. This is useful to execute functions
* that unbind events for page elements that are about to be removed.
*
* @param string file The filename for which to register the event
* @param function func The function to execute when
* the page is about to be torn down
*
* @return self For chaining
*/
registerTeardown: function (file, func) {
var eventName = 'teardown_' + AJAX.hash(file);
$(document).bind(eventName, func);
this._debug && console.log(
// no need to translate
"Registered event " + eventName + " for file " + file
);
return this;
},
/**
* Called when a page has finished loading, once for every
* file that registered to the onload event of that file.
*
* @param string file The filename for which to fire the event
*
* @return void
*/
fireOnload: function (file) {
var eventName = 'onload_' + AJAX.hash(file);
$(document).trigger(eventName);
this._debug && console.log(
// no need to translate
"Fired event " + eventName + " for file " + file
);
},
/**
* Called just before a page is torn down, once for every
* file that registered to the teardown event of that file.
*
* @param string file The filename for which to fire the event
*
* @return void
*/
fireTeardown: function (file) {
var eventName = 'teardown_' + AJAX.hash(file);
$(document).triggerHandler(eventName);
this._debug && console.log(
// no need to translate
"Fired event " + eventName + " for file " + file
);
},
/**
* Event handler for clicks on links and form submissions
*
* @param object e Event data
*
* @return void
*/
requestHandler: function (event) {
// In some cases we don't want to handle the request here and either
// leave the browser deal with it natively (e.g: file download)
// or leave an existing ajax event handler present elsewhere deal with it
var href = $(this).attr('href');
if (typeof event != 'undefined' && (event.shiftKey || event.ctrlKey)) {
return true;
} else if ($(this).attr('target')) {
return true;
} else if ($(this).hasClass('ajax') || $(this).hasClass('disableAjax')) {
return true;
} else if (href && href.match(/^#/)) {
return true;
} else if (href && href.match(/^mailto/)) {
return true;
} else if ($(this).hasClass('ui-datepicker-next') ||
$(this).hasClass('ui-datepicker-prev')
) {
return true;
}
if (typeof event != 'undefined') {
event.preventDefault();
event.stopImmediatePropagation();
}
if (AJAX.active == true) {
// Silently bail out, there is already a request in progress.
// TODO: save a reference to the request and cancel the old request
// when the user requests something else. Something like this is
// already implemented in the PMA_fastFilter object in navigation.js
return false;
}
AJAX.source = $(this);
$('html, body').animate({scrollTop: 0}, 'fast');
var isLink = !! href || false;
var url = isLink ? href : $(this).attr('action');
var params = 'ajax_request=true&ajax_page_request=true';
if (! isLink) {
params += '&' + $(this).serialize();
}
// Add a list of menu hashes that we have in the cache to the request
params += AJAX.cache.menus.getRequestParam();
AJAX._debug && console.log("Loading: " + url); // no need to translate
if (isLink) {
AJAX.active = true;
AJAX.$msgbox = PMA_ajaxShowMessage();
$.get(url, params, AJAX.responseHandler);
} else {
/**
* Manually fire the onsubmit event for the form, if any.
* The event was saved in the jQuery data object by an onload
* handler defined below. Workaround for bug #3583316
*/
var onsubmit = $(this).data('onsubmit');
// Submit the request if there is no onsubmit handler
// or if it returns a value that evaluates to true
if (typeof onsubmit !== 'function' || onsubmit.apply(this, [event])) {
AJAX.active = true;
AJAX.$msgbox = PMA_ajaxShowMessage();
$.post(url, params, AJAX.responseHandler);
}
}
},
/**
* Called after the request that was initiated by this.requestHandler()
* has completed successfully or with a caught error. For completely
* failed requests or requests with uncaught errors, see the .ajaxError
* handler at the bottom of this file.
*
* To refer to self use 'AJAX', instead of 'this' as this function
* is called in the jQuery context.
*
* @param object e Event data
*
* @return void
*/
responseHandler: function (data) {
if (data.success) {
$table_clone = false;
PMA_ajaxRemoveMessage(AJAX.$msgbox);
if (data._redirect) {
PMA_ajaxShowMessage(data._redirect, false);
AJAX.active = false;
return;
}
AJAX.scriptHandler.reset(function () {
if (data._reloadNavigation) {
PMA_reloadNavigation();
}
if (data._reloadQuerywindow) {
var params = data._reloadQuerywindow;
PMA_querywindow.reload(
params.db,
params.table,
params.sql_query
);
}
if (data._focusQuerywindow) {
PMA_querywindow.focus(
data._focusQuerywindow
);
}
if (data._title) {
$('title').replaceWith(data._title);
}
if (data._menu) {
AJAX.cache.menus.replace(data._menu);
AJAX.cache.menus.add(data._menuHash, data._menu);
} else if (data._menuHash) {
AJAX.cache.menus.replace(AJAX.cache.menus.get(data._menuHash));
}
// Remove all containers that may have
// been added outside of #page_content
$('body').children()
.not('#pma_navigation')
.not('#floating_menubar')
.not('#goto_pagetop')
.not('#page_content')
.not('#selflink')
.not('#session_debug')
.remove();
// Replace #page_content with new content
if (data.message && data.message.length > 0) {
$('#page_content').replaceWith(
"<div id='page_content'>" + data.message + "</div>"
);
}
if (data._selflink) {
$('#selflink > a').attr('href', data._selflink);
}
if (data._scripts) {
AJAX.scriptHandler.load(data._scripts);
}
if (data._selflink && data._scripts && data._menuHash && data._params) {
AJAX.cache.add(
data._selflink,
data._scripts,
data._menuHash,
data._params,
AJAX.source.attr('rel')
);
}
if (data._params) {
PMA_commonParams.setAll(data._params);
}
if (data._displayMessage) {
$('#page_content').prepend(data._displayMessage);
}
$('#pma_errors').remove();
if (data._errors) {
$('<div/>', {id:'pma_errors'})
.insertAfter('#selflink')
.append(data._errors);
}
if (typeof AJAX._callback === 'function') {
AJAX._callback.call();
}
AJAX._callback = function () {};
});
} else {
PMA_ajaxShowMessage(data.error, false);
AJAX.active = false;
}
},
/**
* This object is in charge of downloading scripts,
* keeping track of what's downloaded and firing
* the onload event for them when the page is ready.
*/
scriptHandler: {
/**
* @var array _scripts The list of files already downloaded
*/
_scripts: [],
/**
* @var array _scriptsToBeLoaded The list of files that
* need to be downloaded
*/
_scriptsToBeLoaded: [],
/**
* @var array _scriptsToBeFired The list of files for which
* to fire the onload event
*/
_scriptsToBeFired: [],
/**
* Records that a file has been downloaded
*
* @param string file The filename
* @param string fire Whether this file will be registering
* onload/teardown events
*
* @return self For chaining
*/
add: function (file, fire) {
this._scripts.push(file);
if (fire) {
// Record whether to fire any events for the file
// This is necessary to correctly tear down the initial page
this._scriptsToBeFired.push(file);
}
return this;
},
/**
* Download a list of js files in one request
*
* @param array files An array of filenames and flags
*
* @return void
*/
load: function (files) {
var self = this;
self._scriptsToBeLoaded = [];
self._scriptsToBeFired = [];
for (var i in files) {
self._scriptsToBeLoaded.push(files[i].name);
if (files[i].fire) {
self._scriptsToBeFired.push(files[i].name);
}
}
// Generate a request string
var request = [];
var needRequest = false;
for (var index in self._scriptsToBeLoaded) {
var script = self._scriptsToBeLoaded[index];
// Only for scripts that we don't already have
if ($.inArray(script, self._scripts) == -1) {
needRequest = true;
this.add(script);
request.push("scripts[]=" + script);
}
}
// Download the composite js file, if necessary
if (needRequest) {
$.ajax({
url: "js/get_scripts.js.php?" + request.join("&"),
cache: true,
success: function () {
self.done();
},
dataType: "script"
});
} else {
self.done();
}
},
/**
* Called whenever all files are loaded
*
* @return void
*/
done: function () {
for (var i in this._scriptsToBeFired) {
AJAX.fireOnload(this._scriptsToBeFired[i]);
}
AJAX.active = false;
},
/**
* Fires all the teardown event handlers for the current page
* and rebinds all forms and links to the request handler
*
* @param function callback The callback to call after resetting
*
* @return void
*/
reset: function (callback) {
for (var i in this._scriptsToBeFired) {
AJAX.fireTeardown(this._scriptsToBeFired[i]);
}
this._scriptsToBeFired = [];
/**
* Re-attach a generic event handler to clicks
* on pages and submissions of forms
*/
$('a').die('click').live('click', AJAX.requestHandler);
$('form').die('submit').live('submit', AJAX.requestHandler);
AJAX.cache.update();
callback();
}
}
};
/**
* Here we register a function that will remove the onsubmit event from all
* forms that will be handled by the generic page loader. We then save this
* event handler in the "jQuery data", so that we can fire it up later in
* AJAX.requestHandler().
*
* See bug #3583316
*/
AJAX.registerOnload('functions.js', function () {
// Registering the onload event for functions.js
// ensures that it will be fired for all pages
$('form').not('.ajax').not('.disableAjax').each(function () {
if ($(this).attr('onsubmit')) {
$(this).data('onsubmit', this.onsubmit).attr('onsubmit', '');
}
});
});
/**
* An implementation of a client-side page cache.
* This object also uses the cache to provide a simple microhistory,
* that is the ability to use the back and forward buttons in the browser
*/
AJAX.cache = {
/**
* @var int The maximum number of pages to keep in the cache
*/
MAX: 6,
/**
* @var object A hash used to prime the cache with data about the initially
* loaded page. This is set in the footer, and then loaded
* by a double-queued event further down this file.
*/
primer: {},
/**
* @var array Stores the content of the cached pages
*/
pages: [],
/**
* @var int The index of the currently loaded page
* This is used to know at which point in the history we are
*/
current: 0,
/**
* Saves a new page in the cache
*
* @param string hash The hash part of the url that is being loaded
* @param array scripts A list of scripts that is requured for the page
* @param string menu A hash that links to a menu stored
* in a dedicated menu cache
* @param array params A list of parameters used by PMA_commonParams()
* @param string rel A relationship to the current page:
* 'samepage': Forces the response to be treated as
* the same page as the current one
* 'newpage': Forces the response to be treated as
* a new page
* undefined: Default behaviour, 'samepage' if the
* selflinks of the two pages are the same.
* 'newpage' otherwise
*
* @return void
*/
add: function (hash, scripts, menu, params, rel) {
if (this.pages.length > AJAX.cache.MAX) {
// Trim the cache, to the maximum number of allowed entries
// This way we will have a cached menu for every page
for (var i=0; i<this.pages.length-this.MAX; i++) {
delete this.pages[i];
}
}
while (this.current < this.pages.length) {
// trim the cache if we went back in the history
// and are now going forward again
this.pages.pop();
}
if (rel === 'newpage' ||
(
typeof rel === 'undefined' && (
typeof this.pages[this.current - 1] === 'undefined'
||
this.pages[this.current - 1].hash !== hash
)
)
) {
this.pages.push({
hash: hash,
content: $('#page_content').html(),
scripts: scripts,
selflink: $('#selflink').html(),
menu: menu,
params: params
});
AJAX.setUrlHash(this.current, hash);
this.current++;
}
},
/**
* Restores a page from the cache. This is called when the hash
* part of the url changes and it's structure appears to be valid
*
* @param string index Which page from the history to load
*
* @return void
*/
navigate: function (index) {
if (typeof this.pages[index] === 'undefined') {
PMA_ajaxShowMessage(
'<div class="error">' + PMA_messages['strInvalidPage'] + '</div>',
false
);
} else {
AJAX.active = true;
var record = this.pages[index];
AJAX.scriptHandler.reset(function () {
$('#page_content').html(record.content);
$('#selflink').html(record.selflink);
AJAX.cache.menus.replace(AJAX.cache.menus.get(record.menu));
PMA_commonParams.setAll(record.params);
AJAX.scriptHandler.load(record.scripts);
AJAX.cache.current = ++index;
});
}
},
/**
* Resaves the content of the current page in the cache.
* Necessary in order not to show the user some outdated version of the page
*
* @return void
*/
update: function () {
var page = this.pages[this.current - 1];
if (page) {
page.content = $('#page_content').html();
}
},
/**
* @var object Dedicated menu cache
*/
menus: {
/**
* Returns the number of items in an associative array
*
* @return int
*/
size: function(obj) {
var size = 0, key;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
size++;
}
}
return size;
},
/**
* @var hash Stores the content of the cached menus
*/
data: {},
/**
* Saves a new menu in the cache
*
* @param string hash The hash (trimmed md5) of the menu to be saved
* @param string content The HTML code of the menu to be saved
*
* @return void
*/
add: function (hash, content) {
if (this.size(this.data) > AJAX.cache.MAX) {
// when the cache grows, we remove the oldest entry
var oldest, key, init = 0;
for (var i in this.data) {
if (this.data[i]) {
if (! init || this.data[i].timestamp.getTime() < oldest.getTime()) {
oldest = this.data[i].timestamp;
key = i;
init = 1;
}
}
}
delete this.data[key];
}
this.data[hash] = {
content: content,
timestamp: new Date()
};
},
/**
* Retrieves a menu given its hash
*
* @param string hash The hash of the menu to be retrieved
*
* @return string
*/
get: function (hash) {
if (this.data[hash]) {
return this.data[hash].content;
} else {
// This should never happen as long as the number of stored menus
// is larger or equal to the number of pages in the page cache
return '';
}
},
/**
* Prepares part of the parameter string used during page requests,
* this is necessary to tell the server which menus we have in the cache
*
* @return string
*/
getRequestParam: function () {
var param = '';
var menuHashes = [];
for (var i in this.data) {
menuHashes.push(i);
}
var menuHashesParam = menuHashes.join('-');
if (menuHashesParam) {
param = '&menuHashes=' + menuHashesParam;
}
return param;
},
/**
* Replaces the menu with new content
*
* @return void
*/
replace: function (content) {
$('#floating_menubar').html(content)
// Remove duplicate wrapper
// TODO: don't send it in the response
.children().first().remove();
$('#topmenu').menuResizer(PMA_mainMenuResizerCallback);
}
}
};
/**
* URL hash management module.
* Allows direct bookmarking and microhistory.
*/
AJAX.setUrlHash = (function (jQuery, window) {
"use strict";
/**
* Indictaes whether we have already completed
* the initialisation of the hash
*
* @access private
*/
var ready = false;
/**
* Stores a hash that needed to be set when we were not ready
*
* @access private
*/
var savedHash = "";
/**
* Flag to indicate if the change of hash was triggered
* by a user pressing the back/forward button or if
* the change was triggered internally
*
* @access private
*/
var userChange = true;
// Fix favicon disappearing in Firefox when setting location.hash
function resetFavicon() {
if (jQuery.browser.mozilla) {
// Move the link tags for the favicon to the bottom
// of the head element to force a reload of the favicon
$('head > link[href=favicon\\.ico]').appendTo('head');
}
}
/**
* Sets the hash part of the URL
*
* @access public
*/
function setUrlHash(index, hash) {
/*
* Known problem:
* Setting hash leads to reload in webkit:
* http://www.quirksmode.org/bugreports/archives/2005/05/Safari_13_visual_anomaly_with_windowlocationhref.html
*
* so we expect that users are not running an ancient Safari version
*/
userChange = false;
if (ready) {
window.location.hash = "PMAURL-" + index + ":" + hash;
resetFavicon();
} else {
savedHash = "PMAURL-" + index + ":" + hash;
}
}
/**
* Start initialisation
*/
var urlhash = window.location.hash;
if (urlhash.substring(0, 8) == '#PMAURL-') {
// We have a valid hash, let's redirect the user
// to the page that it's pointing to
var colon_position = urlhash.indexOf(':');
var questionmark_position = urlhash.indexOf('?');
if (colon_position != -1 && questionmark_position != -1 && colon_position < questionmark_position) {
var hash_url = urlhash.substring(colon_position + 1, questionmark_position);
if (PMA_gotoWhitelist.indexOf(hash_url) != -1) {
window.location = urlhash.substring(
colon_position + 1
);
}
}
} else {
// We don't have a valid hash, so we'll set it up
// when the page finishes loading
jQuery(function(){
/* Check if we should set URL */
if (savedHash != "") {
window.location.hash = savedHash;
savedHash = "";
resetFavicon();
}
// Indicate that we're done initialising
ready = true;
});
}
/**
* Register an event handler for when the url hash changes
*/
jQuery(function(){
jQuery(window).hashchange(function () {
if (userChange === false) {
// Ignore internally triggered hash changes
userChange = true;
} else if (/^#PMAURL-\d+:/.test(window.location.hash)) {
// Change page if the hash changed was triggered by a user action
var index = window.location.hash.substring(
8, window.location.hash.indexOf(':')
);
AJAX.cache.navigate(index);
}
});
});
/**
* Publicly exposes a reference to the otherwise private setUrlHash function
*/
return setUrlHash;
})(jQuery, window);
/**
* Page load event handler
*/
$(function () {
// Add the menu from the initial page into the cache
// The cache primer is set by the footer class
if (AJAX.cache.primer.url) {
AJAX.cache.menus.add(
AJAX.cache.primer.menuHash,
$('<div></div>')
.append('<div></div>')
.append($('#serverinfo').clone())
.append($('#topmenucontainer').clone())
.html()
);
}
$(function () {
// Queue up this event twice to make sure that we get a copy
// of the page after all other onload events have been fired
if (AJAX.cache.primer.url) {
AJAX.cache.add(
AJAX.cache.primer.url,
AJAX.cache.primer.scripts,
AJAX.cache.primer.menuHash
);
}
});
});
/**
* Attach a generic event handler to clicks
* on pages and submissions of forms
*/
$('a').live('click', AJAX.requestHandler);
$('form').live('submit', AJAX.requestHandler);
/**
* Gracefully handle fatal server errors
* (e.g: 500 - Internal server error)
*/
$(document).ajaxError(function(event, request, settings){
if (request.status !== 0) { // Don't handle aborted requests
var errorCode = $.sprintf(PMA_messages['strErrorCode'], request.status);
var errorText = $.sprintf(PMA_messages['strErrorText'], request.statusText);
PMA_ajaxShowMessage(
'<div class="error">'
+ PMA_messages['strErrorProcessingRequest']
+ '<div>' + escapeHtml(errorCode) + '</div>'
+ '<div>' + escapeHtml(errorText) + '</div>'
+ '</div>',
false
);
AJAX.active = false;
}
});

View File

@ -0,0 +1,22 @@
Copyright (c) 2010-2011 Gabe Lerner (gabelerner@gmail.com) - http://code.google.com/p/canvg/
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,541 @@
/**
* Chart type enumerations
*/
var ChartType = {
LINE : 'line',
SPLINE : 'spline',
AREA : 'area',
BAR : 'bar',
COLUMN : 'column',
PIE : 'pie',
TIMELINE: 'timeline'
};
/**
* Abstract chart factory which defines the contract for chart factories
*/
var ChartFactory = function() {
};
ChartFactory.prototype = {
createChart : function(type, options) {
throw new Error("createChart must be implemented by a subclass");
}
};
/**
* Abstract chart which defines the contract for charts
*
* @param elementId
* id of the div element the chart is drawn in
*/
var Chart = function(elementId) {
this.elementId = elementId;
};
Chart.prototype = {
draw : function(data, options) {
throw new Error("draw must be implemented by a subclass");
},
redraw : function(options) {
throw new Error("redraw must be implemented by a subclass");
},
destroy : function() {
throw new Error("destroy must be implemented by a subclass");
}
};
/**
* Abstract representation of charts that operates on DataTable where,<br />
* <ul>
* <li>First column provides index to the data.</li>
* <li>Each subsequent columns are of type
* <code>ColumnType.NUMBER<code> and represents a data series.</li>
* </ul>
* Line chart, area chart, bar chart, column chart are typical examples.
*
* @param elementId
* id of the div element the chart is drawn in
*/
var BaseChart = function(elementId) {
Chart.call(this, elementId);
};
BaseChart.prototype = new Chart();
BaseChart.prototype.constructor = BaseChart;
BaseChart.prototype.validateColumns = function(dataTable) {
var columns = dataTable.getColumns();
if (columns.length < 2) {
throw new Error("Minimum of two columns are required for this chart");
}
for ( var i = 1; i < columns.length; i++) {
if (columns[i].type != ColumnType.NUMBER) {
throw new Error("Column " + (i + 1) + " should be of type 'Number'");
}
}
return true;
};
/**
* Abstract pie chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var PieChart = function(elementId) {
BaseChart.call(this, elementId);
};
PieChart.prototype = new BaseChart();
PieChart.prototype.constructor = PieChart;
PieChart.prototype.validateColumns = function(dataTable) {
var columns = dataTable.getColumns();
if (columns.length > 2) {
throw new Error("Pie charts can draw only one series");
}
return BaseChart.prototype.validateColumns.call(this, dataTable);
};
/**
* Abstract timeline chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var TimelineChart = function(elementId) {
BaseChart.call(this, elementId);
};
TimelineChart.prototype = new BaseChart();
TimelineChart.prototype.constructor = TimelineChart;
TimelineChart.prototype.validateColumns = function(dataTable) {
var result = BaseChart.prototype.validateColumns.call(this, dataTable);
if (result) {
var columns = dataTable.getColumns();
if (columns[0].type != ColumnType.DATE) {
throw new Error("First column of timeline chart need to be a date column");
}
}
return result;
};
/**
* The data table contains column information and data for the chart.
*/
var DataTable = function() {
var columns = [];
var data;
this.addColumn = function(type, name) {
columns.push({
'type' : type,
'name' : name
});
};
this.getColumns = function() {
return columns;
};
this.setData = function(rows) {
data = rows;
fillMissingValues();
};
this.getData = function() {
return data;
};
var fillMissingValues = function() {
if (columns.length == 0) {
throw new Error("Set columns first");
}
var row, column;
for ( var i = 0; i < data.length; i++) {
row = data[i];
if (row.length > columns.length) {
row.splice(columns.length - 1, row.length - columns.length);
} else if (row.length < columns.length) {
for ( var j = row.length; j < columns.length; j++) {
row.push(null);
}
}
}
};
};
/**
* Column type enumeration
*/
var ColumnType = {
STRING : 'string',
NUMBER : 'number',
BOOLEAN : 'boolean',
DATE : 'date'
};
/*******************************************************************************
* JQPlot specifc code
******************************************************************************/
/**
* Chart factory that returns JQPlotCharts
*/
var JQPlotChartFactory = function() {
};
JQPlotChartFactory.prototype = new ChartFactory();
JQPlotChartFactory.prototype.createChart = function(type, elementId) {
var chart;
switch (type) {
case ChartType.LINE:
chart = new JQPlotLineChart(elementId);
break;
case ChartType.SPLINE:
chart = new JQPlotSplineChart(elementId);
break;
case ChartType.TIMELINE:
chart = new JQPlotTimelineChart(elementId);
break;
case ChartType.AREA:
chart = new JQPlotAreaChart(elementId);
break;
case ChartType.BAR:
chart = new JQPlotBarChart(elementId);
break;
case ChartType.COLUMN:
chart = new JQPlotColumnChart(elementId);
break;
case ChartType.PIE:
chart = new JQPlotPieChart(elementId);
break;
}
return chart;
};
/**
* Abstract JQplot chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotChart = function(elementId) {
Chart.call(this, elementId);
this.plot;
this.validator;
};
JQPlotChart.prototype = new Chart();
JQPlotChart.prototype.constructor = JQPlotChart;
JQPlotChart.prototype.draw = function(data, options) {
if (this.validator.validateColumns(data)) {
this.plot = $.jqplot(this.elementId, this.prepareData(data), this
.populateOptions(data, options));
}
};
JQPlotChart.prototype.destroy = function() {
if (this.plot != null) {
this.plot.destroy();
}
};
JQPlotChart.prototype.redraw = function(options) {
if (this.plot != null) {
this.plot.replot(options);
}
};
JQPlotChart.prototype.populateOptions = function(dataTable, options) {
throw new Error("populateOptions must be implemented by a subclass");
};
JQPlotChart.prototype.prepareData = function(dataTable) {
throw new Error("prepareData must be implemented by a subclass");
};
/**
* JQPlot line chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotLineChart = function(elementId) {
JQPlotChart.call(this, elementId);
this.validator = BaseChart.prototype;
};
JQPlotLineChart.prototype = new JQPlotChart();
JQPlotLineChart.prototype.constructor = JQPlotLineChart;
JQPlotLineChart.prototype.populateOptions = function(dataTable, options) {
var columns = dataTable.getColumns();
var optional = {
axes : {
xaxis : {
label : columns[0].name,
renderer : $.jqplot.CategoryAxisRenderer,
ticks : []
},
yaxis : {
label : (columns.length == 2 ? columns[1].name : 'Values'),
labelRenderer : $.jqplot.CanvasAxisLabelRenderer
}
},
series : []
};
$.extend(true, optional, options);
if (optional.series.length == 0) {
for ( var i = 1; i < columns.length; i++) {
optional.series.push({
label : columns[i].name.toString()
});
}
}
if (optional.axes.xaxis.ticks.length == 0) {
var data = dataTable.getData();
for ( var i = 0; i < data.length; i++) {
optional.axes.xaxis.ticks.push(data[i][0].toString());
}
}
return optional;
};
JQPlotLineChart.prototype.prepareData = function(dataTable) {
var data = dataTable.getData(), row;
var retData = [], retRow;
for ( var i = 0; i < data.length; i++) {
row = data[i];
for ( var j = 1; j < row.length; j++) {
retRow = retData[j - 1];
if (retRow == null) {
retRow = [];
retData[j - 1] = retRow;
}
retRow.push(row[j]);
}
}
return retData;
};
/**
* JQPlot spline chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotSplineChart = function(elementId) {
JQPlotLineChart.call(this, elementId);
};
JQPlotSplineChart.prototype = new JQPlotLineChart();
JQPlotSplineChart.prototype.constructor = JQPlotSplineChart;
JQPlotSplineChart.prototype.populateOptions = function(dataTable, options) {
var optional = {};
var opt = JQPlotLineChart.prototype.populateOptions.call(this, dataTable,
options);
var compulsory = {
seriesDefaults : {
rendererOptions : {
smooth : true
}
}
};
$.extend(true, optional, opt, compulsory);
return optional;
};
/**
* JQPlot timeline chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotTimelineChart = function(elementId) {
JQPlotLineChart.call(this, elementId);
this.validator = TimelineChart.prototype;
};
JQPlotTimelineChart.prototype = new JQPlotLineChart();
JQPlotTimelineChart.prototype.constructor = JQPlotAreaChart;
JQPlotTimelineChart.prototype.populateOptions = function(dataTable, options) {
var optional = {
axes : {
xaxis : {
tickOptions : {
formatString:'%b %#d, %y'
}
}
}
};
var opt = JQPlotLineChart.prototype.populateOptions.call(this, dataTable, options);
var compulsory = {
axes : {
xaxis : {
renderer : $.jqplot.DateAxisRenderer
}
}
};
$.extend(true, optional, opt, compulsory);
return optional;
};
JQPlotTimelineChart.prototype.prepareData = function(dataTable) {
var data = dataTable.getData(), row, d;
var retData = [], retRow;
for ( var i = 0; i < data.length; i++) {
row = data[i];
d = row[0];
for ( var j = 1; j < row.length; j++) {
retRow = retData[j - 1];
if (retRow == null) {
retRow = [];
retData[j - 1] = retRow;
}
if (d != null) {
retRow.push([d.getTime(), row[j]]);
}
}
}
return retData;
};
/**
* JQPlot area chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotAreaChart = function(elementId) {
JQPlotLineChart.call(this, elementId);
};
JQPlotAreaChart.prototype = new JQPlotLineChart();
JQPlotAreaChart.prototype.constructor = JQPlotAreaChart;
JQPlotAreaChart.prototype.populateOptions = function(dataTable, options) {
var optional = {
seriesDefaults : {
fillToZero : true
}
};
var opt = JQPlotLineChart.prototype.populateOptions.call(this, dataTable,
options);
var compulsory = {
seriesDefaults : {
fill : true
}
};
$.extend(true, optional, opt, compulsory);
return optional;
};
/**
* JQPlot column chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotColumnChart = function(elementId) {
JQPlotLineChart.call(this, elementId);
};
JQPlotColumnChart.prototype = new JQPlotLineChart();
JQPlotColumnChart.prototype.constructor = JQPlotColumnChart;
JQPlotColumnChart.prototype.populateOptions = function(dataTable, options) {
var optional = {
seriesDefaults : {
fillToZero : true
}
};
var opt = JQPlotLineChart.prototype.populateOptions.call(this, dataTable,
options);
var compulsory = {
seriesDefaults : {
renderer : $.jqplot.BarRenderer
}
};
$.extend(true, optional, opt, compulsory);
return optional;
};
/**
* JQPlot bar chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotBarChart = function(elementId) {
JQPlotLineChart.call(this, elementId);
};
JQPlotBarChart.prototype = new JQPlotLineChart();
JQPlotBarChart.prototype.constructor = JQPlotBarChart;
JQPlotBarChart.prototype.populateOptions = function(dataTable, options) {
var columns = dataTable.getColumns();
var optional = {
axes : {
yaxis : {
label : columns[0].name,
labelRenderer : $.jqplot.CanvasAxisLabelRenderer,
renderer : $.jqplot.CategoryAxisRenderer,
ticks : []
},
xaxis : {
label : (columns.length == 2 ? columns[1].name : 'Values'),
labelRenderer : $.jqplot.CanvasAxisLabelRenderer
}
},
series : [],
seriesDefaults : {
fillToZero : true
}
};
var compulsory = {
seriesDefaults : {
renderer : $.jqplot.BarRenderer,
rendererOptions : {
barDirection : 'horizontal'
}
}
};
$.extend(true, optional, options, compulsory);
if (optional.axes.yaxis.ticks.length == 0) {
var data = dataTable.getData();
for ( var i = 0; i < data.length; i++) {
optional.axes.yaxis.ticks.push(data[i][0].toString());
}
}
if (optional.series.length == 0) {
for ( var i = 1; i < columns.length; i++) {
optional.series.push({
label : columns[i].name.toString()
});
}
}
return optional;
};
/**
* JQPlot pie chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotPieChart = function(elementId) {
JQPlotChart.call(this, elementId);
this.validator = PieChart.prototype;
};
JQPlotPieChart.prototype = new JQPlotChart();
JQPlotPieChart.prototype.constructor = JQPlotPieChart;
JQPlotPieChart.prototype.populateOptions = function(dataTable, options) {
var optional = {};
var compulsory = {
seriesDefaults : {
renderer : $.jqplot.PieRenderer
}
};
$.extend(true, optional, options, compulsory);
return optional;
};
JQPlotPieChart.prototype.prepareData = function(dataTable) {
var data = dataTable.getData(), row;
var retData = [];
for ( var i = 0; i < data.length; i++) {
row = data[i];
retData.push([ row[0], row[1] ]);
}
return [ retData ];
};

View File

@ -0,0 +1,19 @@
Copyright (C) 2011 by Marijn Haverbeke <marijnh@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Some files were not shown because too many files have changed in this diff Show More