1
0
mirror of https://github.com/vrana/adminer.git synced 2025-09-04 11:45:48 +02:00

Compare commits

..

460 Commits

Author SHA1 Message Date
Jakub Vrana
7cb3e768bb Release 4.6.2 2018-02-20 09:20:42 +01:00
Jakub Vrana
baf7225602 Fix test 2018-02-20 09:17:13 +01:00
Jakub Vrana
0cfc68e6c6 Fix typo 2018-02-20 00:00:47 +01:00
Jakub Vrana
03dfea2943 Comment 2018-02-20 00:00:00 +01:00
Jakub Vrana
54f6806339 Use function after declaring it 2018-02-19 23:48:51 +01:00
Jakub Vrana
ee4f7db641 Remove test server 2018-02-19 23:38:32 +01:00
Jakub Vrana
b53762ae5f Make test works with MariaDB 2018-02-19 23:37:19 +01:00
Jakub Vrana
866d109a9b Make test work on wide screen 2018-02-19 23:25:43 +01:00
Jakub Vrana
37c57c386a Editor: Fix displaying of true boolean values 2018-02-19 23:09:46 +01:00
Jakub Vrana
1f5ca321b6 Comment 2018-02-19 23:04:27 +01:00
Jakub Vrana
059d6266e2 Store current version before authentication and in Editor 2018-02-19 23:02:39 +01:00
Jakub Vrana
0e1d8c67fc Update design (thanks to Jan) 2018-02-19 14:07:11 +01:00
Jakub Vrana
a113a25123 Add missing fullstop 2018-02-15 22:25:45 +01:00
Róbert Mesároš
49a865d106 Version 4.6.1.1 (#254)
Update to Version 4.6.1.1
2018-02-15 22:25:16 +01:00
Nuri Akman
026b362e7d Turkish language file updated. 2018-02-15 22:20:58 +01:00
Jakub Vrana
7c32360c67 Align Whole result 2018-02-14 06:46:59 +01:00
Jakub Vrana
8a94bc6f41 Always hide import 2018-02-14 06:42:07 +01:00
Jakub Vrana
3f901cfe30 Print email only with rows or page 2018-02-14 06:41:44 +01:00
Jakub Vrana
c8fd73d70a Move import out of footer 2018-02-13 22:24:59 +01:00
Jakub Vrana
30d0060b96 Move pagination to fieldset 2018-02-13 22:17:59 +01:00
Jakub Vrana
8b157a673e Update readme 2018-02-10 01:58:14 +01:00
Jakub Vrana
ce381aaf48 Make Login test work with jush-textarea 2018-02-10 01:56:48 +01:00
Jakub Vrana
d3eac979d4 Add SQLite test 2018-02-10 01:51:03 +01:00
Jakub Vrana
f19e23c98b Test warnings 2018-02-10 01:47:29 +01:00
Jakub Vrana
705d3a910f Convert tests to Katalon 2018-02-10 01:24:14 +01:00
Jakub Vrana
d18c7b3587 Promote MongoDB, demote Oracle and MS SQL 2018-02-10 00:09:07 +01:00
Jakub Vrana
1f12ea4e4a Capitalize Whole result 2018-02-09 23:45:53 +01:00
Jakub Vrana
71a6a1269d Fill footer to the right 2018-02-09 23:36:53 +01:00
Jakub Vrana
6a3bce1174 Make footer smaller 2018-02-09 23:33:46 +01:00
Jakub Vrana
28acee861f Move pagination outside footer 2018-02-09 23:28:19 +01:00
Jakub Vrana
42b15654c4 Wrap more into if (!is_ajax) 2018-02-09 23:09:05 +01:00
Jakub Vrana
e2d858d638 Move <p> 2018-02-09 23:05:21 +01:00
Jakub Vrana
879963dec1 PostgreSQL: Add IF EXISTS to DROP SEQUENCE in export (bug #595) 2018-02-09 22:11:27 +01:00
Jakub Vrana
daa19b0a6e Make footer border more obvious 2018-02-09 22:05:11 +01:00
Jakub Vrana
d27ee7a388 Make footer margin not transparent 2018-02-09 21:55:18 +01:00
Jakub Vrana
1ec4637ade Centralize oninput 2018-02-09 21:23:42 +01:00
Jakub Vrana
ea1ff7e902 Speed up alter table
Alter table mysql.user takes 0.9 instead of 1.5 seconds.
2018-02-09 21:11:12 +01:00
Jakub Vrana
2761f44cf4 Use Unicode arrows in alt 2018-02-09 17:54:52 +01:00
Jakub Vrana
557b8b178e Avoid hiding column only to show it later 2018-02-09 17:50:25 +01:00
Jakub Vrana
07d1bc4291 Respect unchecked Default values 2018-02-09 17:45:50 +01:00
Jakub Vrana
7ac96dd0b2 Update UI when coming from history 2018-02-09 17:35:17 +01:00
Jakub Vrana
eeb7ce1939 PostgreSQL: Fix exporting string default values (thanks to PotatoPangolin) 2018-02-09 15:29:54 +01:00
Jakub Vrana
ea4ac5c8f3 Semi-transparent border on table actions 2018-02-09 15:14:10 +01:00
Jakub Vrana
3906231dc5 Fix exporting sequences in PostgreSQL 10 2018-02-09 14:43:25 +01:00
Jakub Vrana
fad20d1065 Do not append empty values 2018-02-09 13:48:50 +01:00
Jakub Vrana
ffb4ee3a61 Shorten JSON values in select (bug #594) 2018-02-09 13:48:33 +01:00
Jakub Vrana
34d338b185 Fix id in databases list 2018-02-09 13:34:46 +01:00
Jakub Vrana
1b148bc08c Suggest updating Git submodules 2018-02-09 11:09:49 +01:00
Jakub Vrana
f4983dfd5f Declare MariaDB support 2018-02-09 09:24:12 +01:00
Jakub Vrana
800fbb9b9e Release 4.6.1 2018-02-09 00:20:58 +01:00
Jakub Vrana
4b1960f498 Round 9.2 to 9.2 2018-02-08 23:58:09 +01:00
Jakub Vrana
e299e9d82d MariaDB: Links to documentation in syntax highlighting 2018-02-08 23:47:16 +01:00
Jakub Vrana
cf7fe88990 Display notification about performing action after relogin 2018-02-08 16:49:56 +01:00
Jakub Vrana
60e5d24116 Reorder changes 2018-02-08 14:34:43 +01:00
Jakub Vrana
a1927d5b71 Allow specifying server name displayed in breadcrumbs 2018-02-08 14:32:21 +01:00
Jakub Vrana
76d7560d27 MariaDB: Links to documentation 2018-02-08 13:56:22 +01:00
Jakub Vrana
f0b7d8ccd0 Reorder changes 2018-02-08 12:10:37 +01:00
Jakub Vrana
d322e0165b Remove .lcZ from timeFormat (bug #593) 2018-02-08 11:52:11 +01:00
Jakub Vrana
4009ede3ee Add todo 2018-02-08 11:26:21 +01:00
Jakub Vrana
cddd61c214 Add more system tables help links 2018-02-08 11:21:33 +01:00
Jakub Vrana
8b8cfd9f04 Respect empty tableName in tablesPrint 2018-02-08 10:35:54 +01:00
Jakub Vrana
99d7b88341 Use tableName() in table.inc.php 2018-02-08 10:34:43 +01:00
Jakub Vrana
2db1c74310 Avoid qsl in a loop 2018-02-08 09:52:23 +01:00
Jakub Vrana
fb2d34f739 Support Shift+click in server export 2018-02-08 09:47:15 +01:00
Jakub Vrana
6e2f681faa Avoid qsl in a loop 2018-02-08 09:30:16 +01:00
Jakub Vrana
686865bc10 Sticky position of table actions 2018-02-08 00:14:32 +01:00
Jakub Vrana
996ebf61d7 Document regression 2018-02-07 21:08:24 +01:00
Jakub Vrana
6a7ee5a2f3 Avoid qsl in check[]
Table with 1000 rows rendered in 1.8 instead of 7.5 seconds.
2018-02-07 18:55:28 +01:00
Jakub Vrana
4b45722fad Avoid qsl in a loop
Table with 500 rows rendered in 1.5 instead of 5.5 seconds.
2018-02-07 18:55:16 +01:00
Jakub Vrana
14998e12b6 Mark optional parameter 2018-02-07 18:14:00 +01:00
Jakub Vrana
718f9d3791 SQLite: Support ` in PRIMARY KEY 2018-02-07 16:43:21 +01:00
Jakub Vrana
964a988fef Avoid Invalid credentials with no credentials 2018-02-07 16:29:57 +01:00
Jakub Vrana
66e7ec56bb SQLite: Allow deleting PRIMARY KEY from tables with auto increment 2018-02-07 14:47:29 +01:00
Jakub Vrana
ca336427f5 Do not wrap alter table thead 2018-02-07 14:22:58 +01:00
Jakub Vrana
8a75cbc630 Add version() to use in plugins 2018-02-07 12:49:53 +01:00
Jakub Vrana
c8bb112a5d Select original if nothing else is selected 2018-02-07 12:46:43 +01:00
Jakub Vrana
06660882b5 Remove nested array 2018-02-07 12:42:46 +01:00
Jakub Vrana
42eec7d728 Support connecting to MySQL via SSL 2018-02-07 12:13:58 +01:00
Jakub Vrana
cac523402a Display Invalid credentials if connection error is empty 2018-02-07 11:37:53 +01:00
Jakub Vrana
02cd416093 Delete unused functions 2018-02-06 16:33:47 +01:00
Jakub Vrana
33f0023d37 Ignore functions in Min_Driver 2018-02-06 16:32:56 +01:00
Jakub Vrana
f09d26a51d Remove unnecessary quotes 2018-02-06 16:25:58 +01:00
Jakub Vrana
b500a46f9a Add truncate_sql to PostgreSQL 2018-02-06 16:24:12 +01:00
Jakub Vrana
19653de764 PostgreSQL: Unescape bytea fields 2018-02-06 16:05:50 +01:00
Jakub Vrana
29c127e94a Save bytes 2018-02-06 15:54:19 +01:00
Jakub Vrana
4417a8b220 Add missing function to compile.php 2018-02-06 15:52:48 +01:00
Jakub Vrana
17b110f0d5 PostgreSQL: Upload binary files to bytea fields 2018-02-06 15:42:14 +01:00
Jakub Vrana
b649fb2f3f Allow using number_type() as pattern 2018-02-06 14:52:12 +01:00
Jakub Vrana
d3914ea58e Translate thousands separator in JS 2018-02-06 14:47:43 +01:00
Jakub Vrana
31d8803db2 Editor: Use type=search for Search tables 2018-02-06 14:13:51 +01:00
Jakub Vrana
d43b773214 Move tableCheck() below </form> 2018-02-06 13:53:15 +01:00
Jakub Vrana
f09a04ed09 Pass operator from db.inc.php 2018-02-06 13:51:56 +01:00
Jakub Vrana
d7f9b6b5de PostgreSQL: Cast to string when searching using LIKE (bug #325) 2018-02-06 13:51:53 +01:00
Jakub Vrana
197abdcb70 MySQL: Support non-utf8 charset in search in column 2018-02-06 13:51:23 +01:00
Jakub Vrana
c2de3b8ec1 Use ST_GeomFromText in MySQL 8 (bug #574) 2018-02-06 13:50:40 +01:00
Jakub Vrana
c52fb951b0 Do not modify $_GET["where"] 2018-02-06 13:00:17 +01:00
Jakub Vrana
14429ff355 Display empty operator as LIKE %% 2018-02-06 12:56:18 +01:00
Jakub Vrana
a7632fd9fd Fix whitespace 2018-02-06 12:50:44 +01:00
Jakub Vrana
967d5c64a3 Avoid deprecated each() 2018-02-06 12:49:39 +01:00
Jakub Vrana
c34ada5368 PostgreSQL: Fix condition for selecting no rows 2018-02-06 12:43:10 +01:00
Jakub Vrana
2d7bda4d1e Fix error display in Search tables 2018-02-06 12:40:28 +01:00
Jakub Vrana
6cfb3676a7 PostgreSQL: Don't treat interval type as number (bug #474) 2018-02-06 12:17:01 +01:00
Jakub Vrana
11a7fc0277 Pass required parameter 2018-02-06 12:00:22 +01:00
Jakub Vrana
de539cf0c7 Use existing variable 2018-02-06 11:57:02 +01:00
Jakub Vrana
880902da17 Add class to use in designs 2018-02-06 08:47:28 +01:00
Jakub Vrana
89ceb06208 Use primary key instead of LIMIT 1 if available 2018-02-05 11:21:19 +01:00
Jakub Vrana
d2ed0f7810 Release 4.6.0 2018-02-05 09:30:33 +01:00
Jakub Vrana
7b0c58af32 Fix affected rows after getting warnings 2018-02-05 09:23:07 +01:00
Jakub Vrana
d3cdfc17de Fix number of affected rows after getting warnings 2018-02-05 09:09:41 +01:00
Jakub Vrana
f097817386 Fix test 2018-02-05 08:43:31 +01:00
Jakub Vrana
3b55c4c0f7 Fix 5.1 being displayed as 5.09999... 2018-02-05 08:42:25 +01:00
Jakub Vrana
6636434378 PRIMARY KEY in SQLite 2018-02-05 08:32:51 +01:00
Jakub Vrana
dd3e57086b Add design Esterka 2018-02-02 09:18:38 +01:00
Jakub Vrana
473b60361b Disable autocompleting password on create user page 2018-02-02 08:52:15 +01:00
Jakub Vrana
f128c2d1ea Use primary key to edit rows even if not selected 2018-02-01 23:09:40 +01:00
Jakub Vrana
c75096f173 Space between DB and Use 2018-02-01 22:22:29 +01:00
Jakub Vrana
c0b2c506bc Translate DB 2018-02-01 22:20:56 +01:00
Jakub Vrana
0ebf710d41 Select converted fields only once 2018-02-01 22:03:48 +01:00
Jakub Vrana
fa41126c37 Don't count rows if we reached the end 2018-02-01 20:59:05 +01:00
Jakub Vrana
09920e0056 Fix count_rows with more than one group by column 2018-02-01 20:45:49 +01:00
Jakub Vrana
685bf29abc Use separator in limit1 2018-02-01 18:53:53 +01:00
Jakub Vrana
0866c79afb SQLite: Limit rows in data manipulation without unique key 2018-02-01 18:47:57 +01:00
Jakub Vrana
e8e3ced948 Document that tests don't work with oninput 2018-02-01 17:04:50 +01:00
Jakub Vrana
52d98e16fa PostgreSQL: Limit rows in data manipulation without unique key 2018-02-01 16:58:01 +01:00
Jakub Vrana
763e66a148 Don't use ctid as it's not stable 2018-02-01 16:45:31 +01:00
Jakub Vrana
8868b48e4c Move variables close to their usage 2018-02-01 16:40:58 +01:00
Jakub Vrana
4961588f7d Limit non-unique where updates 2018-02-01 16:25:30 +01:00
Jakub Vrana
f4625da53d Use Oid as the name of the column 2018-02-01 16:15:36 +01:00
Jakub Vrana
dc94b2ec38 Save bytes 2018-02-01 16:00:40 +01:00
Jakub Vrana
f8af8c9cbf Update rmsoft design 2018-02-01 15:38:15 +01:00
Jakub Vrana
e55f0d7cb2 MySQL: Add FIND_IN_SET search operator 2018-02-01 15:25:38 +01:00
Jakub Vrana
5b7f2d9086 Add rmsoft design 2018-02-01 14:54:18 +01:00
Jakub Vrana
6d55395d9e MySQL: Add floor and ceil functions 2018-02-01 14:32:01 +01:00
Jakub Vrana
2e6190fdf1 Fix links to PostgreSQL 10 documentation 2018-02-01 14:02:25 +01:00
Jakub Vrana
b9ad864b75 Delete unused variable 2018-02-01 13:57:46 +01:00
Jakub Vrana
7296f017fb Display options for timestamp columns when creating a new table (thanks to Robert Vlach) 2018-02-01 13:55:11 +01:00
Jakub Vrana
ae91088cb3 Don't display warnings for failed queries 2018-02-01 13:16:37 +01:00
Jakub Vrana
51a574926d Fix variable name 2018-02-01 13:08:28 +01:00
Jakub Vrana
532a4ee083 Reorder variables 2018-02-01 12:27:22 +01:00
Jakub Vrana
6b9c0dee14 Use pg_last_notice only with pgsql 2018-02-01 12:03:11 +01:00
Jakub Vrana
be75939344 Print warnings in call 2018-02-01 11:58:04 +01:00
Jakub Vrana
d667f585e0 Pass start time to selectQuery 2018-02-01 11:54:56 +01:00
Jakub Vrana
ebb23a7a88 PostgreSQL: Display warnings 2018-02-01 11:50:15 +01:00
Jakub Vrana
e9add6d985 Return string from warnings() 2018-02-01 11:43:44 +01:00
Jakub Vrana
e3346fb0bc Display warnings in messages 2018-02-01 09:21:50 +01:00
Jakub Vrana
ae2ea56681 Show select warnings 2018-02-01 08:59:46 +01:00
Colin Mollenhour
080fd0f374 Support X-Forwarded-Prefix (e.g. Traefik PathPrefixStrip feature) 2018-01-31 20:38:14 +01:00
Jakub Vrana
e32f90f8ff Lowercase EXPLAIN but don't translate it 2018-01-31 20:25:41 +01:00
Jakub Vrana
7ad09d2cb4 Move explain below warnings 2018-01-31 20:25:11 +01:00
Jakub Vrana
40038d4210 Fix return type 2018-01-31 18:29:01 +01:00
Jakub Vrana
2adc174541 MySQL: Display warnings in SQL command 2018-01-31 17:28:12 +01:00
Jakub Vrana
2fb2d208c0 Quote default values not starting with a letter 2018-01-31 16:46:50 +01:00
Jakub Vrana
4de6e3180d Stop redirecting links via adminer.org 2018-01-31 11:11:34 +01:00
Jakub Vrana
8829ccdf93 Fix min_version use 2018-01-30 23:53:04 +01:00
Jakub Vrana
0320bcdda6 Quote dates in default value 2018-01-30 17:00:34 +01:00
Jakub Vrana
851700516d Fully support functions in default values 2018-01-30 16:50:37 +01:00
Jakub Vrana
d542843fdd Fix min_version use 2018-01-30 16:42:13 +01:00
Jakub Vrana
4bb2f806b1 PostgreSQL: Allow now() as default value (bug #525) 2018-01-30 16:24:31 +01:00
Jakub Vrana
cc31a69b65 Fix edit_type after 1f21cd43 2018-01-30 16:21:04 +01:00
Jakub Vrana
78f0a1152e PostgreSQL: Allow editing views with uppercase letters (bug #467) 2018-01-30 16:03:13 +01:00
Jakub Vrana
1f21cd4329 PostgreSQL: Allow creating trigger functions 2018-01-30 15:55:50 +01:00
Jakub Vrana
9f69160797 Add placeholders 2018-01-30 15:24:01 +01:00
Jakub Vrana
e81334ef87 PostgreSQL: Support functions 2018-01-30 15:18:26 +01:00
Jakub Vrana
6c3e1e2768 Add min_version to compile.php 2018-01-30 14:47:22 +01:00
Jakub Vrana
92739f48ce SimpleDB: Document that allow_url_fopen is required (bug #340) 2018-01-30 13:19:21 +01:00
Jakub Vrana
d28d01e76c Focus correct field in selectSearch 2018-01-29 21:19:11 +01:00
Jakub Vrana
75450548b3 Support JSON since MariaDB 10.2 (bug #590) 2018-01-29 21:08:38 +01:00
Jakub Vrana
c3b4208853 Use min_version 2018-01-29 20:54:24 +01:00
Jakub Vrana
d38c673e2a Add min_version 2018-01-29 19:34:26 +01:00
Jakub Vrana
93686eab65 Save bytes 2018-01-29 18:33:26 +01:00
Pisyek
224ddb5a33 add malay translation 2018-01-29 18:25:58 +01:00
Radosław Kowalewski
4db23fd471 Added and translated missing keys in polish translation 2018-01-29 18:13:50 +01:00
Steven Adger
a003866a55 Update compatibility with TinyMCE v4 (#247) 2018-01-29 18:09:35 +01:00
Jakub Vrana
0d90f1f1dd Fix elastic after ef5a7639 2018-01-27 11:08:56 +01:00
helix84
ef5a76392d fix elastic.inc.php to work on PHP 5.2
Without this change, I get the following syntax error on PHP 5.2.6:
PHP Parse error:  syntax error, unexpected ':' in /var/www/adminer/adminer/drivers/elastic.inc.php on line 415

I haven't actually tested the alter_table() method.
2018-01-26 16:48:34 +01:00
Jakub Vrana
8d0cbb6eb4 Fix counting selected rows after going back to select page 2018-01-26 08:52:12 +01:00
Jakub Vrana
536999d4dc Release 4.5.0 2018-01-24 21:55:47 +01:00
Jakub Vrana
827a2b8a54 Fix tests after 95d02bb9 2018-01-24 20:52:44 +01:00
Jakub Vrana
a954f7d4b4 Simplify drop object confirmation questions 2018-01-24 18:36:19 +01:00
Jakub Vrana
a137f248f7 Translate message added in 4.4.0 2018-01-24 18:22:20 +01:00
Jakub Vrana
95d02bb924 Display name of the object in confirmation when dropping it 2018-01-24 18:13:05 +01:00
Jakub Vrana
921e57b9aa Display error when getting row to edit 2018-01-24 17:37:35 +01:00
Jakub Vrana
25f9655a38 Avoid CONVERT() except in MySQL (bug #509) 2018-01-24 17:37:14 +01:00
Jakub Vrana
919204dd38 Bump version 2018-01-24 16:51:53 +01:00
Jakub Vrana
34f25afe90 MySQL: Support routines with comments in parameters (bug #460) 2018-01-24 16:37:38 +01:00
Jakub Vrana
8b29ae910f Verify if adminer.version was created on www.adminer.org 2018-01-24 15:10:44 +01:00
Jakub Vrana
6c96b060e7 Store current Adminer version server-side to avoid excessive requests 2018-01-24 15:09:11 +01:00
Jakub Vrana
f4662d5e27 Send token as last param 2018-01-24 13:44:31 +01:00
Jakub Vrana
b15618fcfd Allow using adminer.invalid by other users in a group 2018-01-24 12:11:26 +01:00
Jakub Vrana
03e3f517a8 Extract file_open_lock and file_write_unlock 2018-01-24 12:04:53 +01:00
Jakub Vrana
f0d2af329a Display boolean values as code (bug #562) 2018-01-24 10:53:25 +01:00
Jakub Vrana
452b9ad7f1 MariaDB: Support fulltext and spatial indexes in InnoDB (bug #583) 2018-01-24 09:18:19 +01:00
Jakub Vrana
fb18e814de PostgreSQL: Display foreign tables (bug #576) 2018-01-23 15:03:53 +01:00
Jakub Vrana
75413c56d2 Add designs.php 2018-01-23 14:36:32 +01:00
Jakub Vrana
c3d83d5412 Fix compiled version after 5cc831c1 2018-01-23 14:10:21 +01:00
Jakub Vrana
b14aa75a98 Hide window.opener from pages opened in a new window (bug #561) 2018-01-23 12:53:22 +01:00
Jakub Vrana
dbc76a2b1e Fix GPL version 2018-01-23 12:21:42 +01:00
Jakub Vrana
6d774794c8 Add plugin for switching designs 2018-01-23 12:15:38 +01:00
Jakub Vrana
81be5edb97 Display bold parts of error (bug #565) 2018-01-23 11:16:28 +01:00
Jakub Vrana
e30e5dd059 Add bottom border to last cells 2018-01-23 11:11:41 +01:00
Jakub Vrana
0cdd8beab1 Editor: Fix displaying of false values in PostgreSQL (bug #568) 2018-01-23 11:02:15 +01:00
Jakub Vrana
7b9d5a29aa Decrease float precision (bug #578) 2018-01-23 10:52:57 +01:00
Andrea Giacobino
5cc831c1e1 Add ability to override file name (path) when loading dump from webserver 2018-01-23 09:24:57 +01:00
Jakub Vrana
72aa3c5127 Support current_timestamp() as default of time fields (bug #572) 2018-01-23 08:36:11 +01:00
Jakub Vrana
43ccfcef8f Display newlines in column comments (bug #573) 2018-01-22 21:05:56 +01:00
Jakub Vrana
c789c147b7 MySQL: Support geometry in MySQL 8 (bug #574) 2018-01-22 20:56:35 +01:00
Uherkovich Péter
a2adb67d2f MSSQL driver fixed for freetds drivers. See bug #167, #291 2018-01-22 18:35:08 +01:00
Jakub Vrana
34e2f47761 Fix search focus (regression from 4.4.0) 2018-01-22 18:34:16 +01:00
Jakub Vrana
0d2b232bd7 Compatibility with PHP < 5.3 2018-01-22 17:30:12 +01:00
Jakub Vrana
83e16e059f Add mongodb as a possible driver 2018-01-22 17:12:48 +01:00
Jakub Vrana
6e4dc3911f Save bytes 2018-01-22 17:05:49 +01:00
Vladimir Goncharov
2a08a11e89 php7 support with minimal changes of original code 2018-01-22 16:59:55 +01:00
Jakub Vrana
993dce398d PostgreSQL: Export DROP SEQUENCE if dropping table 2018-01-22 14:33:21 +01:00
Jakub Vrana
eee9a62c8f PostgreSQL: Do not export triggers if not requested 2018-01-22 14:25:27 +01:00
Jakub Vrana
ce17b6cf46 Ignore removed CREATE+ALTER mode in trigger_sql() 2018-01-22 14:14:42 +01:00
Jakub Vrana
923c0ffc87 Fix whitespace 2018-01-22 13:51:47 +01:00
Jakub Vrana
48ed20323f CSP: Allow any CSS 2018-01-22 12:22:25 +01:00
Troy
9a4cd8936d adminer-theme-mancave2-2.0.alpha 2018-01-22 12:20:33 +01:00
Jáchym Toušek
019ada8da5 Fix NULL value in edit form with Postgres 2018-01-22 12:06:15 +01:00
Jakub Vrana
6a95b71164 Do not warn about MySQL specific functions 2018-01-22 12:00:38 +01:00
Jakub Vrana
3b4ce4a0b4 Fix single driver non-MySQL compiled versions (regression from 150301ed) 2018-01-22 11:42:17 +01:00
Jakub Vrana
a414896885 Hide driver selection in single-driver version (regression from e762a6aa) 2018-01-22 11:34:25 +01:00
Peter Knut
47734d8ff4 Unify HTML for list of tables in Editor according to Adminer 2018-01-22 10:57:20 +01:00
Peter Knut
fef1808288 Encapsulate fulltext part in search box into <div> 2018-01-22 10:53:50 +01:00
Fabio Montefuscolo
d2c82fdeca Enhance ElasticSearch integration 2018-01-19 18:32:41 +01:00
Jakub Vrana
e657cdbc3a Allow PHP 5.6 in Travis 2018-01-19 18:20:02 +01:00
Jakub Vrana
bc14e8432f Select numeric database name in DB list (bug #580) 2018-01-19 17:39:27 +01:00
Jakub Vrana
34b03ef835 SQLite: Enable foreign key checks 2018-01-19 14:57:58 +01:00
Jakub Vrana
329b7de9cc CSP: Allow any images, media and fonts, disallow base-uri 2018-01-19 11:05:26 +01:00
Jakub Vrana
2dcad1f284 Define JS functions in AdminerTablesFilter sooner 2018-01-19 10:55:51 +01:00
Jakub Vrana
1b98a10100 Adminer: Fix Search data in tables 2018-01-19 10:46:35 +01:00
Jakub Vrana
187dd56b1c Release 4.4.0 2018-01-17 12:41:38 +01:00
Jakub Vrana
ba9099f084 Allow sending multiple CSP headers 2018-01-17 11:05:59 +01:00
Jakub Vrana
16e05167a4 Use __construct for constructor 2018-01-16 20:05:07 +01:00
Jakub Vrana
756e304c92 Set session cache limiter only without session.auto_start (bug #586) 2018-01-16 16:56:14 +01:00
Jakub Vrana
e762a6aa95 Add missing newline 2018-01-16 16:44:49 +01:00
Jakub Vrana
b3d5c9affe Require specifying credentials in login-sqlite plugin 2018-01-16 16:37:59 +01:00
Jakub Vrana
0268aba85a Avoid count(null) 2018-01-16 16:22:24 +01:00
Jakub Vrana
9ca92309a1 Disallow PHP 5.3 in Travis 2018-01-16 13:51:02 +01:00
Jakub Vrana
0fae40fb61 Disallow connecting to privileged ports (thanks to hyp3rlinx) 2018-01-16 11:18:32 +01:00
Jakub Vrana
0e5df34ea8 Rate limit password-less login attempts from the same IP address (thanks to hyp3rlinx) 2018-01-16 11:17:25 +01:00
Jakub Vrana
f3938c1a66 Use HTTPS 2018-01-14 11:03:54 +01:00
Jakub Vrana
07aa80048a Use HTTPS in doc_link() 2018-01-14 10:38:01 +01:00
Jakub Vrana
c57e7ac3e3 Do not set '' for empty enum 2018-01-14 10:19:56 +01:00
Jakub Vrana
6d14b47d02 Fix select function onchange 2018-01-14 10:18:38 +01:00
Jakub Vrana
ef3b468626 Clone all event handlers in cloneNode() 2018-01-14 10:04:53 +01:00
Jakub Vrana
4d38c09db5 Use border-collapse to prevent unnecessary wrapping in Chrome 2018-01-14 09:35:13 +01:00
Jakub Vrana
3ba99a1c2a Fix whitespace 2018-01-14 08:52:22 +01:00
Jakub Vrana
9cbdb6262b Fix selectCount() in information_schema 2018-01-14 08:36:10 +01:00
Jakub Vrana
cc268428b8 Fix SQL command toggle 2018-01-14 00:10:42 +01:00
Jakub Vrana
80d030f51a Disallow scripts without nonce 2018-01-13 22:19:16 +01:00
Jakub Vrana
e23da5da0e Fix wrapping in Create table 2018-01-13 17:40:21 +01:00
Jakub Vrana
9d532fc0a1 Use script_src for <script src> 2018-01-13 16:25:11 +01:00
Jakub Vrana
144c7de27f Fix typo in script() 2018-01-13 15:23:47 +01:00
Jakub Vrana
b7fcebfba8 Do not send empty CSP 2018-01-13 14:21:54 +01:00
Jakub Vrana
d39a6e59c7 Move inline event handlers to <script> 2018-01-13 09:34:01 +01:00
Jakub Vrana
fc559a1cf6 Move inline event handlers to <script> 2018-01-13 09:21:21 +01:00
Jakub Vrana
f457053d85 Use the fact that we handle oninput in whisper() 2018-01-13 09:07:35 +01:00
Jakub Vrana
e255ba9aa4 Move inline event handlers to <script> 2018-01-13 08:58:01 +01:00
Jakub Vrana
3fe0d88f98 Editor: Fix Search data in tables 2018-01-12 23:59:04 +01:00
Jakub Vrana
68c6b1c942 Move inline event handlers to <script> 2018-01-12 23:42:20 +01:00
Jakub Vrana
001c37e240 Use <script> instead of inline event handler for skipping original 2018-01-12 23:27:14 +01:00
Jakub Vrana
b6cc584f48 Move inline event handlers to <script> 2018-01-12 22:46:16 +01:00
Jakub Vrana
af1ad47a64 Return false from editingMoveRow() 2018-01-12 22:35:05 +01:00
Jakub Vrana
2eaac2e94e Move inline event handlers to <script> 2018-01-12 22:25:38 +01:00
Jakub Vrana
40abffe8de Use oninput instead of onchange 2018-01-12 22:18:54 +01:00
Jakub Vrana
259a465125 Move inline event handlers to <script> 2018-01-12 21:57:54 +01:00
Jakub Vrana
6c1fbf13c6 Fix fieldChange() after 6353a898 2018-01-12 21:49:45 +01:00
Jakub Vrana
6353a89816 Use oninput instead of onkeyup 2018-01-12 18:46:44 +01:00
Jakub Vrana
38aac7ada2 Move inline event handlers to <script> 2018-01-12 18:34:19 +01:00
Jakub Vrana
24245867d7 Use <script> instead of inline event handler in on_help() 2018-01-12 18:11:00 +01:00
Jakub Vrana
1459df56bc Move inline event handlers to <script> 2018-01-12 17:59:46 +01:00
Jakub Vrana
dc3a0e1a32 Clone onchange in cloneNode() 2018-01-12 17:33:23 +01:00
Jakub Vrana
0411495d20 Move inline event handlers to <script> 2018-01-12 17:19:47 +01:00
Jakub Vrana
3d69fbf5f7 Allow searching data in tables by Ctrl+Enter 2018-01-12 17:11:29 +01:00
Jakub Vrana
5e9df49fd1 Move inline event handlers to <script> 2018-01-12 17:11:29 +01:00
Jakub Vrana
565a5ca0eb Fix selectors in schema after 58b2904d 2018-01-12 17:11:29 +01:00
Jakub Vrana
9061583538 Rely on event always passed to handlers 2018-01-12 17:11:29 +01:00
Jakub Vrana
35b1db6974 Move inline event handlers to <script> 2018-01-12 17:11:29 +01:00
Jakub Vrana
068ee71bf7 Return false from editingRemoveRow 2018-01-12 17:11:29 +01:00
Jakub Vrana
efcf37d162 Move inline event handlers to <script> 2018-01-12 17:11:29 +01:00
Jakub Vrana
e645693147 Use script() for <script> 2018-01-12 17:10:33 +01:00
Jakub Vrana
12fbfc9847 Move inline event handlers to <script> 2018-01-12 17:09:41 +01:00
Jakub Vrana
6b2ba65084 Use <script> instead of inline event handler in print_fieldset() 2018-01-12 17:09:41 +01:00
Jakub Vrana
a5ee3451ac Use <script> instead of inline event handler in confirm() 2018-01-12 17:09:41 +01:00
Jakub Vrana
da671df728 Move inline event handlers to <script> 2018-01-12 17:09:41 +01:00
Jakub Vrana
650221357d Return false from ajaxSetHtml() 2018-01-12 17:09:41 +01:00
Jakub Vrana
d996b48cfa Move inline event handlers to <script> 2018-01-12 17:09:41 +01:00
Jakub Vrana
22b4322710 Revert using @this in formChecked 2018-01-12 17:09:41 +01:00
Jakub Vrana
36edd445a6 Move inline event handlers to <script> 2018-01-12 17:09:41 +01:00
Jakub Vrana
7305783c21 Return false from toggle() 2018-01-12 17:09:41 +01:00
Jakub Vrana
ee3a88d574 onchange='selectFieldChange 2018-01-12 17:09:41 +01:00
Jakub Vrana
e5c52589ec Use @this in selectFieldChange 2018-01-12 17:09:41 +01:00
Jakub Vrana
3b0e1cf289 Move inline event handlers to <script> 2018-01-12 17:09:41 +01:00
Jakub Vrana
767fc0e47e Fix indexesAddColumn after 14778165 2018-01-12 17:09:41 +01:00
Jakub Vrana
63581af0f6 Move inline event handlers to <script> 2018-01-12 17:09:35 +01:00
Jakub Vrana
813ada6661 Revert using @this in formChecked 2018-01-11 18:58:00 +01:00
Jakub Vrana
4be72a2a0d Allow customizing CSP 2018-01-11 18:39:49 +01:00
Jakub Vrana
541c3c1fed Allow img-src data: common in skins 2018-01-11 18:39:49 +01:00
Jakub Vrana
3408d4ad78 Use JSON.parse if available 2018-01-11 18:39:49 +01:00
Jakub Vrana
e614ae08c4 Add Content Security Policy 2018-01-11 18:39:49 +01:00
Jakub Vrana
552d2a6be4 Always send security headers in customization 2018-01-11 18:39:49 +01:00
Jakub Vrana
415253b1b1 Add nosniff header 2018-01-11 18:39:22 +01:00
Jakub Vrana
d07b7e3773 Use Referrer-Policy instead of <meta name="referrer">
To make securityheaders.io happy.

Also fix a typo in the value (https://lists.w3.org/Archives/Public/public-webappsec/2015May/0059.html).
2018-01-11 18:38:15 +01:00
Jakub Vrana
3de101dff4 Editor: Fix doubleclick on database page 2018-01-11 17:24:57 +01:00
Jakub Vrana
48dacd1e97 Fix a typo from 9cb28186 2018-01-11 17:05:37 +01:00
Jakub Vrana
14778165a8 Use @this in JavaScript (prepares for removing inline event handlers) 2018-01-11 17:01:29 +01:00
Jakub Vrana
72b199378a Prevent PHP 7.1 warning about non-numeric values 2018-01-11 16:22:29 +01:00
Jakub Vrana
329fa55af5 Unindent doc-comments 2018-01-11 15:14:05 +01:00
Jakub Vrana
ecf34769ad Delete type="text/css" from <style> as it is the default in HTML5 2018-01-11 14:14:15 +01:00
Jakub Vrana
dc85ba2d86 Delete type="text/javascript" from <script> as it is the default in HTML5 2018-01-11 14:13:43 +01:00
Jakub Vrana
741b76fbd4 Replace getElementsByTagName by shortcut for querySelectorAll 2018-01-11 14:00:04 +01:00
Jakub Vrana
58b2904d62 Use querySelector 2018-01-11 13:55:48 +01:00
Jakub Vrana
9cb281868f Replace getElementById by shortcut for querySelector (requires IE8) 2018-01-11 13:51:32 +01:00
Jakub Vrana
67f6aea77f Fix skin for Chrome 61 (thanks to Dominik Ulrich) 2017-10-28 15:05:07 +02:00
Jakub Vrana
7bcba262df Editor: Display field comment's text inside [] only in edit form 2017-10-01 08:45:17 -07:00
Itamar Schen
75c0786d2e Fix hebrew typos (#228) 2017-09-29 09:25:32 +02:00
Jakub Vrana
c4f6cbb32e Add new Hebrew translations 2017-09-11 13:25:49 +02:00
Jakub Vrana
b10e9e127e Add Hebrew translation 2017-09-09 12:06:14 +02:00
Lukas Tribus
32f1e856ad Editor: Don't set time zone from PHP
Current implementation checks the delta between the local time and
UTC, and applies the delta as time zone for MySQL.

This assumption is wrong if the current time is DST enabled, but the
time that is converted isn't - and vice versa.

For example, Europe/Prague is "CET-1CEST,M3.5.0,M10.5.0/3", when
the MySQL connections is setup now (September, DST enabled) and
we are reading a TIMESTAMP from November, then MySQL applies +0200
instead of +0100 to that timestamp even though November is supposed
to be DST disabled.

There is no reliable and portable way in PHP to understand the
time zone, especially since PHP >= 5.4.0 ignores environment
variable and OS settings [1].

MySQL needs to be properly setup (TZ data loaded [2] and default
TZ set [3]), then everything will work just fine.

The current implementation however causes wrong data 50% of the
time, even when OS/MySQL/PHP is properly setup. As a MySQL
connection will converte timestamps from both DST enabled and
DST disabled dates, a static UTC offset must never be set at
connection level (set time_zone = ...).

This change removes the current implementation, therefor maintaining
OS/MySQL defaults, fixing the DST issue in properly configured
environments.

[1] http://php.net/manual/en/function.date-default-timezone-get.php
[2] https://dev.mysql.com/doc/refman/5.5/en/mysql-tzinfo-to-sql.html
[3] https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html
2017-09-09 11:44:42 +02:00
Jonathan Vollebregt
17e45e9a9c Make sure all sidebar elements are pushed down, not just the form.
This was breaking the #logins block at the log in screen.
2017-09-09 11:39:47 +02:00
Jonathan Vollebregt
e1f43da8df Update AdminerTablesFilter to produce li as per c9801e2e24 2017-05-19 11:23:35 +02:00
Jakub Vrana
70aef8a55a MySQL: Remove dedicated view for replication status 2017-05-19 11:11:44 +02:00
Jakub Vrana
0b824dad29 Sort table names (bug #552) 2017-05-19 10:57:20 +02:00
Alfonso Montero
65fa4b4e31 Update es.inc.php 2017-04-22 10:07:55 +02:00
Jakub Vrana
c0a3f30060 Add a donate link 2017-04-16 10:42:27 +02:00
Jakub Vrana
7af1ee3702 Release 4.3.1 2017-04-14 09:48:11 +02:00
Jakub Vrana
3cbece1ec0 Fix SQL command autofocus 2017-04-09 12:30:34 +02:00
Jakub Vrana
0d73372c50 Add a todo 2017-04-09 12:13:18 +02:00
Jakub Vrana
fb7bd02713 Don't overwrite previous cookies (bug #539) 2017-04-09 11:04:57 +02:00
Jakub Vrana
fb71941daa PostgreSQL: Fix JSONB version support 2017-04-08 20:17:08 +02:00
Jakub Vrana
504c56216c PostgreSQL: Support JSON and JSONB data types (bug #542) 2017-04-08 19:59:13 +02:00
Jakub Vrana
88803c6d0e Update haeckel design (thanks to Klemens Haeckel) 2017-04-08 19:51:13 +02:00
Andre Polykanine A.K.A. Menelion Elensúlë
b585ee8261 Updating Russian translation 2017-04-08 19:41:36 +02:00
Deni
f4817e8568 Fix table dependency on export 2017-04-08 19:38:03 +02:00
Deni
105aca9b04 Fix PostgreSQL nullable fields in export 2017-04-08 19:37:56 +02:00
Jakub Vrana
f556f6acb1 PostgreSQL: Fix index size computation in PostgreSQL < 9.0 (reverts 4c78976c) 2017-04-08 19:33:46 +02:00
Jakub Vrana
22d0cf4171 Release 4.3.0 2017-03-15 18:24:12 +01:00
Jakub Vrana
fa0963f370 Reorder changelog 2017-03-15 16:57:58 +01:00
Jakub Vrana
ba28845651 Update JUSH 2017-03-15 12:53:26 +01:00
Jakub Vrana
8fd7ff0187 Highlight JSON 2017-03-10 08:56:58 +01:00
Jakub Vrana
e040b296c5 Print number of bytes in blob in italics 2017-03-10 08:19:58 +01:00
Jakub Vrana
b616c57352 MySQL: Support JSON data type 2017-03-10 08:15:52 +01:00
Jakub Vrana
50390ea38c Support MySQL 8 2017-03-09 18:52:00 +01:00
Jakub Vrana
9d7d30891e Use SameSite cookies (except session cookie) 2017-03-07 18:12:23 +01:00
Jakub Vrana
4cf73abccd Rely on noreferrer in Firefox too 2017-03-01 11:35:01 +01:00
Jakub Vrana
2d6451b99a Improve SQLite login error message 2017-03-01 11:23:20 +01:00
Jakub Vrana
40d1feec9f Update URL 2017-02-27 13:44:22 +01:00
Jakub Vrana
e40d9692c7 Save bytes 2017-02-22 11:49:25 +01:00
Jakub Vrana
770fc9673c Lint PHP files 2017-02-21 13:47:19 +01:00
Jakub Vrana
56b6590a4f Simplify SQLite development 2017-02-21 13:13:39 +01:00
Jakub Vrana
f8fd4dd6e3 Document new engines 2017-02-21 13:05:43 +01:00
Jakub Vrana
d8c28d1c91 Avoid referencing global variable (doesn't work in PHP 7.1 if Adminer is included inside a function) 2017-02-21 12:07:13 +01:00
Jakub Vrana
46f39f3cdb Bump version 2017-02-21 12:07:13 +01:00
Jakub Vrana
8a9df8ede1 Elasticsearch: allow empty server name 2017-02-21 12:07:13 +01:00
Jakub Vrana
e4d35f9591 Hide materialized views in MySQL 2017-02-20 19:28:16 +01:00
Jakub Vrana
346353153d Unindent 2017-02-20 19:28:16 +01:00
Jakub Vrana
9df33e82e6 Elasticsearch: Support HTTPS by inputting https://server (bug #446) 2017-02-20 18:06:14 +01:00
Jakub Vrana
fa09eba15e Save bytes 2017-02-20 17:25:59 +01:00
Jakub Vrana
d5b329a1a4 MySQL: Support spatial indexes (bug #455) 2017-02-20 17:25:34 +01:00
Jakub Vrana
0cd02bb98a Fix dropping foreign keys linking to other database 2017-02-20 16:59:13 +01:00
Jakub Vrana
a7cbf66347 Move 'Create user' above the list of users 2017-02-20 16:52:10 +01:00
Jakub Vrana
fa6865da6a Use 'Create database' instead of 'Create new database' 2017-02-20 16:47:03 +01:00
Jakub Vrana
63b6b99365 Support high Unicode characters in shorten_utf8 (bug #481) 2017-02-20 16:22:30 +01:00
Jakub Vrana
a0a1476e5b Fix where() escaping in MS SQL (bug #496) 2017-02-20 15:23:22 +01:00
Jakub Vrana
8a9d803137 Add jsonly class to JS checkboxes 2017-02-20 15:11:47 +01:00
Jakub Vrana
4588af77ac Display message about missing master status 2017-02-20 14:06:19 +01:00
Jakub Vrana
91bd2e84f5 Add Czech translation 2017-02-20 12:55:57 +01:00
Matthew Gamble
2a534798fa Add basic support for MySQL replication 2017-02-20 12:54:40 +01:00
Adam Kuśmierz
a062e9cc58 Checkbox for bool in psql 2017-02-20 12:31:36 +01:00
Peter Knut
6c84764334 Fixed all alternative designs after changes in a list of tables made here: https://github.com/vrana/adminer/pull/116 2017-02-20 12:21:50 +01:00
Jakub Vrana
a01ca3ade4 PostgreSQL: Allow changing materialized views 2017-02-20 12:13:09 +01:00
Jakub Vrana
6ee4692afd PostgreSQL: Fix index size computation 2017-02-20 12:06:41 +01:00
Jakub Vrana
b8cd3b317d Verify commit success after import.
Fixes https://sourceforge.net/p/adminer/bugs-and-features/521/.
2017-02-19 14:22:41 +01:00
Jonathan Vollebregt
64a49e95e8 Add javascript move for editing 2017-02-19 13:55:50 +01:00
Jan Kalina
8dd971ca5e foreign key link fix - added missing ns 2017-02-19 13:02:55 +01:00
Peter Knut
c9801e2e24 Tables list implemented as <ul>
Encapsulation of list items is necessery for advanced CSS themes.
2017-02-19 11:39:04 +01:00
newsiram
4578d47409 Changed NULL format
+ <i> was not italics
+ reduce font & showed border
2017-02-19 11:36:20 +01:00
Loren Klingman
12aaf506b8 Fix MS SQL Driver to not show warnings for version fetching on connection and to retrieve the next set of results properly 2017-02-19 11:35:24 +01:00
Mathieu Rochette
4cfe6263d9 fix logger for SQL commands 2017-02-19 11:00:07 +01:00
Felix Geyer
b8bea7fc56 Hide databases the user can't connect to
pg_database lists all databases including the ones the user can't connect to.
There is little point in showing them when we know connecting will fail.
2017-02-19 10:33:22 +01:00
0xACE
cd8ff96a09 Breadcumb no longer blocks the logout button.
Not sure why the top bar is blocking the logout button. This patch allows the user  to see and click the logout button.
2017-02-19 10:15:05 +01:00
Kakysha
4a69059e1b Edit json and jsonb types in textarea 2017-02-19 10:02:51 +01:00
Gargaj
842ea0bd46 Add namespace to routine call
MSSQL is picky about this, shouldn't affect the drivers that don't use namespaces.
2017-02-19 09:53:51 +01:00
K0n24d
1d0607177d Do not set input type as numeric if field is an array 2017-02-19 09:45:05 +01:00
isra00
9e4d9fda65 New skin 'flat' 2017-02-19 09:31:19 +01:00
nafex
47c582acb3 make bytea fields shortable 2017-02-19 09:30:39 +01:00
Lubor Bilek
32334f1106 PostgreSQL export: table structure, columns, sequences, indexes, foreign keys, comments, trigger definition 2017-02-19 09:26:47 +01:00
Matthew Gamble
a10238516c Add plugin for printing table indexes structure in expanded format 2017-02-18 19:22:47 +01:00
Matthew Gamble
4801da091b Add plugin for printing table structure in expanded format
Instead of trying to squeeze everything into three columns, this plugin
uses multiple columns for each part of a column's structure.
2017-02-18 19:21:16 +01:00
Matthew Gamble
76612b1e8a Move rendering of table structure and indexes list into plugin system
This allows the creation of a plugin to extend the display of either or
both of these things.
2017-02-18 19:15:23 +01:00
Matthew Gamble
eb8c9929d3 Handle checkboxes properly in selectAddRow() 2017-02-18 18:59:06 +01:00
Ion Bazan
cf10398104 fixed Elastic table_status() 2017-02-18 18:45:23 +01:00
Jiří Barouš
d00927ce66 Improve limit check in edit-foreign plugin
The limit is enforced in the query to prevent out-of-memory errors for big target tables.
2017-02-18 18:32:32 +01:00
Jonathan Vollebregt
28a84fec18 AdminerTablesFilter: Persist filter value in a tab 2017-02-18 18:13:05 +01:00
Jonathan Vollebregt
2c8eff9b53 Update AdminerTablesFilter
* Removes children request (Should work on IE6, 7, 8 now)
* Uses <strong> instead of <b>
* Doesn't leave said <strong> tags behind after updating the list
* Highlights multiple matches in a single table name
* Works case insensitively
* Improves performance with setTimeout
    With 400 tables, the old implementation locks up the tab (or
    browser if using something without multiprocess) for about
    half a second per keyup. Yes, this includes modifiers that
    don't actually change the filter. The new version handles
    the same event in 0.09 milliseconds.

    That's with all the above improvements.
    Tested in firefox 45.1.1 performance monitor.
2017-02-18 18:12:58 +01:00
Alessandro Frangioni
5f26d3a1b8 Added support for binary foreign keys selection on edit 2017-02-18 18:06:14 +01:00
Adam Kuśmierz
3344fae96e Plugin: Use <select> on custom user types in psql 2017-02-18 18:01:17 +01:00
Janne Cederberg
dedbd01f64 Tabs must also be escaped in JSON strings
If database table data contains tab characters (0x09) then those
must also be escaped along with newlines and carriage returns for
the resulting JSON file to be valid.
2017-02-18 17:51:55 +01:00
PiR-B-
4c78976cba Fix index length with Postgresql 2017-02-18 17:42:34 +01:00
soleuu
1a6186648c postgresql error with index on hidden columns (ctid) 2017-02-18 17:41:45 +01:00
Daniel Berthereau
36f42d0fda Fixed background of the list of the tables. 2017-02-18 17:40:00 +01:00
Jakub Vrana
45712a5d4c Document changes 2017-02-18 17:37:12 +01:00
Charles Wu
73690164b7 Added pdo_dblib as a driver for MSSQL (as native MSSQL driver does not exist for PHP7) 2017-02-18 17:35:36 +01:00
Jakub Vrana
3fa1eadf2c Use null instead of undefined on after parsing JSON 2017-02-18 17:32:40 +01:00
shaununderwood
3a1c251065 Changed 'undefined' to 'null'
'undefined' is not a valid JSON attribute value and should been 'null'
2017-02-18 17:32:40 +01:00
Massimiliano Torromeo
d0268c69da Fixed mssql driver for usage with microsoft's php7 sqlsrv extension 2017-02-18 17:32:40 +01:00
Adam Kusmierz
fd3d1c7e2e Plugin which shows sql structure comments in field names title 2017-02-18 17:32:40 +01:00
Adam Kusmierz
cbd3adc564 PHP Warning hidden and better parsing times (at least for postgresql) 2017-02-18 17:32:40 +01:00
soleuu
86e26846a8 postgresql : ERROR: function connection_id() does not exist 2017-02-18 17:32:40 +01:00
soleuu
6860478950 postgresql : unique partial index musn't be considered as unique. can cause problems on row edition 2017-02-18 17:32:40 +01:00
Jakub Vrana
dc9ae77e2f Fix error found by PHPStan 2017-02-16 19:05:45 +01:00
jose
8f60870d9a mistype correction 2017-02-13 17:17:36 +01:00
Jakub Vrana
d6c3430607 Add accessibility labels to Foreign keys 2017-01-23 15:12:42 -08:00
Jakub Vrana
2cee788ad3 Add accessibility labels to Indexes 2017-01-23 14:29:00 -08:00
Jakub Vrana
647cab7c69 Use class instead inline style 2017-01-23 14:10:50 -08:00
Jakub Vrana
9bb75e1230 Add accessibility labels to databases and tables checkboxes 2017-01-23 14:05:47 -08:00
Jakub Vrana
7099560add Escape quote in field name to make it work in Chrome (thanks to zcepenela pani) 2017-01-23 13:30:05 -08:00
Lucas Sandery
14cb9ca1ef Additional theme with responsive and RTL support
Signed-off-by: Lucas Sandery <lucas-sandery@users.noreply.github.com>
2017-01-23 12:53:27 -08:00
Lucas Sandery
31057f0ef2 RTL layout fixes
Signed-off-by: Lucas Sandery <lucas-sandery@users.noreply.github.com>
2017-01-23 12:50:23 -08:00
Jakub Vrana
fa09962ab1 Add SQLite auto-login plugin 2016-11-28 10:09:51 -08:00
Jakub Vrana
bad3c6b086 Disallow selecting driver if there's only one 2016-11-28 10:07:03 -08:00
MegaXLR
0922b312d3 Changed 'geraakt' to 'beinvloed' in Dutch translation 2016-10-02 11:27:23 +02:00
Jakub Vrana
949b913d4f Change comment not supported by compile.php 2016-09-27 22:04:44 -07:00
Jakub Vrana
af25827ff4 Add Cache-Control: immutable to static files 2016-09-27 21:53:11 -07:00
Jakub Vrana
9872229e11 Make maxlength in edit fields a soft limit 2016-09-19 10:12:33 -07:00
Jakub Vrana
682e86d236 Add accessibility labels to Create Table fields 2016-09-19 15:33:12 +02:00
Jakub Vrana
f0a5fb56a5 Update Indonesian translation (thanks to Benny) 2016-07-22 17:30:38 +02:00
Jakub Vrana
53dfafd2ea Release 4.2.5 2016-06-01 10:09:29 -07:00
Jakub Vrana
7a33661b72 SQLite: Require credentials to use (thanks to Vincent Waart) 2016-06-01 09:59:20 -07:00
Jakub Vrana
a5b65fba5b Fix remote execution in SQLite query (thanks to Vincent Waart) 2016-06-01 09:56:40 -07:00
Jakub Vrana
63f2a041ed Remove global variable 2016-02-28 12:30:52 -08:00
Bernhard J. M. Gruen
3289eca040 improved kill command support for MySQL and initial support for PgSQL 2016-02-28 12:27:45 -08:00
Petr Sedlacek
c5a7174a2a Fix http:// links in stylesheets to protocol-independent ones (//)
The http links do not load on https pages due to mixed content restriction
of modern browsers
2016-02-28 11:34:10 -08:00
Jakub Vrana
49e2ac4559 Release 4.2.4 2016-02-06 11:10:16 -08:00
Jakub Vrana
e5352cc5ac Fix remote execution in SQLite query (discovered by 庞申杰(千霄)) 2016-02-06 11:00:19 -08:00
Jakub Vrana
0bb5a52dc4 Add Finnish translation 2016-02-06 10:50:57 -08:00
Jakub Vrana
37b9f0ec01 Add Bosnian translation 2016-02-01 09:10:07 -08:00
ekurtovic
73f94e4873 Bosnian language 2016-02-01 09:09:54 -08:00
Jakub Vrana
a2f0806804 Delete unused variable and method 2016-01-24 14:25:17 -08:00
Jakub Vrana
b317fe156a Support PHP 7 2016-01-24 12:02:41 -08:00
Angristan
763d3e9f89 Use HTTPS Google Font URL 2016-01-24 11:23:33 -08:00
Jakub Vrana
f83e3f41d2 Release 4.2.3 2015-11-15 10:49:48 -08:00
Jakub Vrana
aa40e803e2 Add escaping (not fixing any XSS) 2015-11-08 12:15:45 -08:00
Jakub Vrana
4be0b6655e Fix XSS in indexes (non-MySQL only) 2015-11-08 12:12:16 -08:00
Jakub Vrana
6c6bb45d3d Update Bulgarian translation 2015-11-03 08:48:08 -08:00
Jakub Vrana
0a31742ee8 Add Bulgarian translation 2015-11-01 11:33:04 -08:00
David Grudl
1f700ceea0 plugin.php: added missing arguments 2015-11-01 11:09:21 -08:00
David Grudl
a6ebd4a3e0 uses PHP 5 constructors 2015-11-01 11:08:46 -08:00
Jakub Vrana
d1aa3542ae Update xx translation 2015-09-22 08:52:53 -07:00
Jakub Vrana
b1da3995f6 Update Greek translation 2015-09-22 08:47:14 -07:00
Jakub Vrana
79d438ed80 Add Galician translation 2015-09-22 08:29:49 -07:00
Jakub Vrana
35b71f0472 Add Greek translation 2015-09-20 11:09:34 -07:00
Jakub Vrana
a01b2efc22 Change links to HTTPS 2015-09-10 09:26:36 -07:00
Jakub Vrana
a248f8b008 Change protocol to HTTPS 2015-09-08 11:41:29 -07:00
Nabil Kadimi
69ff979ee7 Improve Arabic translation 2015-08-13 09:13:18 -07:00
Nabil Kadimi
1aa7833a90 Improve Arabic translation 2015-08-13 09:10:50 -07:00
Jakub Vrana
40ce23d5ae Add nicu style 2015-08-06 09:01:14 -07:00
Jakub Vrana
060e220806 Add galkaev design 2015-08-05 19:13:29 -07:00
Jakub Vrana
1fcdaedb5f Add release date 2015-08-05 18:29:29 -07:00
192 changed files with 12345 additions and 4037 deletions

5
.travis.yml Normal file
View File

@@ -0,0 +1,5 @@
language: php
php:
- '5.6'
- '7.1'
script: git diff --name-only $TRAVIS_COMMIT_RANGE | grep '\.php$' | xargs -n1 -P8 php -l | grep -v 'No syntax errors'; test $? -eq 1

View File

@@ -1,8 +1,8 @@
<?php <?php
$PROCEDURE = $_GET["call"]; $PROCEDURE = ($_GET["name"] ? $_GET["name"] : $_GET["call"]);
page_header(lang('Call') . ": " . h($PROCEDURE), $error); page_header(lang('Call') . ": " . h($PROCEDURE), $error);
$routine = routine($PROCEDURE, (isset($_GET["callf"]) ? "FUNCTION" : "PROCEDURE")); $routine = routine($_GET["call"], (isset($_GET["callf"]) ? "FUNCTION" : "PROCEDURE"));
$in = array(); $in = array();
$out = array(); $out = array();
foreach ($routine["fields"] as $i => $field) { foreach ($routine["fields"] as $i => $field) {
@@ -29,10 +29,13 @@ if (!$error && $_POST) {
$call[] = (isset($out[$key]) ? "@" . idf_escape($field["field"]) : $val); $call[] = (isset($out[$key]) ? "@" . idf_escape($field["field"]) : $val);
} }
$query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . idf_escape($PROCEDURE) . "(" . implode(", ", $call) . ")"; $query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . table($PROCEDURE) . "(" . implode(", ", $call) . ")";
echo "<p><code class='jush-$jush'>" . h($query) . "</code> <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>\n"; $start = microtime(true);
$result = $connection->multi_query($query);
$affected = $connection->affected_rows; // getting warnigns overwrites this
echo $adminer->selectQuery($query, $start, !$result);
if (!$connection->multi_query($query)) { if (!$result) {
echo "<p class='error'>" . error() . "\n"; echo "<p class='error'>" . error() . "\n";
} else { } else {
$connection2 = connect(); $connection2 = connect();
@@ -45,7 +48,7 @@ if (!$error && $_POST) {
if (is_object($result)) { if (is_object($result)) {
select($result, $connection2); select($result, $connection2);
} else { } else {
echo "<p class='message'>" . lang('Routine has been called, %d row(s) affected.', $connection->affected_rows) . "\n"; echo "<p class='message'>" . lang('Routine has been called, %d row(s) affected.', $affected) . "\n";
} }
} while ($connection->next_result()); } while ($connection->next_result());

View File

@@ -35,7 +35,6 @@ if ($_POST && !process_fields($row["fields"]) && !$error) {
$all_fields = array(); $all_fields = array();
$use_all_fields = false; $use_all_fields = false;
$foreign = array(); $foreign = array();
ksort($row["fields"]);
$orig_field = reset($orig_fields); $orig_field = reset($orig_fields);
$after = " FIRST"; $after = " FIRST";
@@ -121,7 +120,7 @@ page_header(($TABLE != "" ? lang('Alter table') : lang('Create table')), $error,
if (!$_POST) { if (!$_POST) {
$row = array( $row = array(
"Engine" => $_COOKIE["adminer_engine"], "Engine" => $_COOKIE["adminer_engine"],
"fields" => array(array("field" => "", "type" => (isset($types["int"]) ? "int" : (isset($types["integer"]) ? "integer" : "")))), "fields" => array(array("field" => "", "type" => (isset($types["int"]) ? "int" : (isset($types["integer"]) ? "integer" : "")), "on_update" => "")),
"partition_names" => array(""), "partition_names" => array(""),
); );
@@ -164,8 +163,8 @@ foreach ($engines as $engine) {
<p> <p>
<?php if (support("columns") || $TABLE == "") { ?> <?php if (support("columns") || $TABLE == "") { ?>
<?php echo lang('Table name'); ?>: <input name="name" maxlength="64" value="<?php echo h($row["name"]); ?>" autocapitalize="off"> <?php echo lang('Table name'); ?>: <input name="name" maxlength="64" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
<?php if ($TABLE == "" && !$_POST) { ?><script type='text/javascript'>focus(document.getElementById('form')['name']);</script><?php } ?> <?php if ($TABLE == "" && !$_POST) { echo script("focus(qs('#form')['name']);"); } ?>
<?php echo ($engines ? "<select name='Engine' onchange='helpClose();'" . on_help("getTarget(event).value", 1) . ">" . optionlist(array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) . "</select>" : ""); ?> <?php echo ($engines ? "<select name='Engine'>" . optionlist(array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) . "</select>" . on_help("getTarget(event).value", 1) . script("qsl('select').onchange = helpClose;") : ""); ?>
<?php echo ($collations && !preg_match("~sqlite|mssql~", $jush) ? html_select("Collation", array("" => "(" . lang('collation') . ")") + $collations, $row["Collation"]) : ""); ?> <?php echo ($collations && !preg_match("~sqlite|mssql~", $jush) ? html_select("Collation", array("" => "(" . lang('collation') . ")") + $collations, $row["Collation"]) : ""); ?>
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<?php } ?> <?php } ?>
@@ -187,25 +186,26 @@ edit_fields($row["fields"], $collations, "TABLE", $foreign_keys, $comments);
</table> </table>
<p> <p>
<?php echo lang('Auto Increment'); ?>: <input type="number" name="Auto_increment" size="6" value="<?php echo h($row["Auto_increment"]); ?>"> <?php echo lang('Auto Increment'); ?>: <input type="number" name="Auto_increment" size="6" value="<?php echo h($row["Auto_increment"]); ?>">
<?php echo checkbox("defaults", 1, true, lang('Default values'), "columnShow(this.checked, 5)", "jsonly"); ?> <?php echo checkbox("defaults", 1, !$_POST || $_POST["defaults"], lang('Default values'), "columnShow(this.checked, 5)", "jsonly"); ?>
<?php if (!$_POST["defaults"]) { ?><script type="text/javascript">editingHideDefaults()</script><?php } ?> <?php echo ($_POST ? "" : script("editingHideDefaults();")); ?>
<?php echo (support("comment") <?php echo (support("comment")
? "<label><input type='checkbox' name='comments' value='1' class='jsonly' onclick=\"columnShow(this.checked, 6); toggle('Comment'); if (this.checked) this.form['Comment'].focus();\"" . ($comments ? " checked" : "") . ">" . lang('Comment') . "</label>" ? "<label><input type='checkbox' name='comments' value='1' class='jsonly'" . ($comments ? " checked" : "") . ">" . lang('Comment') . "</label>"
. ' <input name="Comment" id="Comment" value="' . h($row["Comment"]) . '" maxlength="' . ($connection->server_info >= 5.5 ? 2048 : 60) . '"' . ($comments ? '' : ' class="hidden"') . '>' . script("qsl('input').onclick = partial(editingCommentsClick, true);")
. ' <input name="Comment" value="' . h($row["Comment"]) . '" maxlength="' . (min_version(5.5) ? 2048 : 60) . '"' . ($comments ? '' : ' class="hidden"') . '>'
: '') : '')
; ?> ; ?>
<p> <p>
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<?php } ?> <?php } ?>
<?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?> <?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $TABLE)); ?><?php } ?>
<?php <?php
if (support("partitioning")) { if (support("partitioning")) {
$partition_table = preg_match('~RANGE|LIST~', $row["partition_by"]); $partition_table = preg_match('~RANGE|LIST~', $row["partition_by"]);
print_fieldset("partition", lang('Partition by'), $row["partition_by"]); print_fieldset("partition", lang('Partition by'), $row["partition_by"]);
?> ?>
<p> <p>
<?php echo "<select name='partition_by' onchange='partitionByChange(this);'" . on_help("getTarget(event).value.replace(/./, 'PARTITION BY \$&')", 1) . ">" . optionlist(array("" => "") + $partition_by, $row["partition_by"]) . "</select>"; ?> <?php echo "<select name='partition_by'>" . optionlist(array("" => "") + $partition_by, $row["partition_by"]) . "</select>" . on_help("getTarget(event).value.replace(/./, 'PARTITION BY \$&')", 1) . script("qsl('select').onchange = partitionByChange;"); ?>
(<input name="partition" value="<?php echo h($row["partition"]); ?>">) (<input name="partition" value="<?php echo h($row["partition"]); ?>">)
<?php echo lang('Partitions'); ?>: <input type="number" name="partitions" class="size<?php echo ($partition_table || !$row["partition_by"] ? " hidden" : ""); ?>" value="<?php echo h($row["partitions"]); ?>"> <?php echo lang('Partitions'); ?>: <input type="number" name="partitions" class="size<?php echo ($partition_table || !$row["partition_by"] ? " hidden" : ""); ?>" value="<?php echo h($row["partitions"]); ?>">
<table cellspacing="0" id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>> <table cellspacing="0" id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>>
@@ -213,7 +213,8 @@ if (support("partitioning")) {
<?php <?php
foreach ($row["partition_names"] as $key => $val) { foreach ($row["partition_names"] as $key => $val) {
echo '<tr>'; echo '<tr>';
echo '<td><input name="partition_names[]" value="' . h($val) . '"' . ($key == count($row["partition_names"]) - 1 ? ' onchange="partitionNameChange(this);"' : '') . ' autocapitalize="off">'; echo '<td><input name="partition_names[]" value="' . h($val) . '" autocapitalize="off">';
echo ($key == count($row["partition_names"]) - 1 ? script("qsl('input').oninput = partitionNameChange;") : '');
echo '<td><input name="partition_values[]" value="' . h($row["partition_values"][$key]) . '">'; echo '<td><input name="partition_values[]" value="' . h($row["partition_values"][$key]) . '">';
} }
?> ?>
@@ -224,3 +225,4 @@ foreach ($row["partition_names"] as $key => $val) {
?> ?>
<input type="hidden" name="token" value="<?php echo $token; ?>"> <input type="hidden" name="token" value="<?php echo $token; ?>">
</form> </form>
<?php echo script("qs('#form')['defaults'].onclick();" . (support("comment") ? " editingCommentsClick.call(qs('#form')['comments']);" : "")); ?>

View File

@@ -63,14 +63,15 @@ echo ($_POST["add_x"] || strpos($name, "\n")
: '<input name="name" id="name" value="' . h($name) . '" maxlength="64" autocapitalize="off">' : '<input name="name" id="name" value="' . h($name) . '" maxlength="64" autocapitalize="off">'
) . "\n" . ($collations ? html_select("collation", array("" => "(" . lang('collation') . ")") + $collations, $row["collation"]) . doc_link(array( ) . "\n" . ($collations ? html_select("collation", array("" => "(" . lang('collation') . ")") + $collations, $row["collation"]) . doc_link(array(
'sql' => "charset-charsets.html", 'sql' => "charset-charsets.html",
'mariadb' => "supported-character-sets-and-collations/",
'mssql' => "ms187963.aspx", 'mssql' => "ms187963.aspx",
)) : ""); )) : "");
echo script("focus(qs('#name'));");
?> ?>
<script type='text/javascript'>focus(document.getElementById('name'));</script>
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<?php <?php
if (DB != "") { if (DB != "") {
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n"; echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', DB)) . "\n";
} elseif (!$_POST["add_x"] && $_GET["db"] == "") { } elseif (!$_POST["add_x"] && $_GET["db"] == "") {
echo "<input type='image' class='icon' name='add' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>\n"; echo "<input type='image' class='icon' name='add' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>\n";
} }

View File

@@ -4,7 +4,7 @@ $tables_views = array_merge((array) $_POST["tables"], (array) $_POST["views"]);
if ($tables_views && !$error && !$_POST["search"]) { if ($tables_views && !$error && !$_POST["search"]) {
$result = true; $result = true;
$message = ""; $message = "";
if ($jush == "sql" && count($_POST["tables"]) > 1 && ($_POST["drop"] || $_POST["truncate"] || $_POST["copy"])) { if ($jush == "sql" && $_POST["tables"] && count($_POST["tables"]) > 1 && ($_POST["drop"] || $_POST["truncate"] || $_POST["copy"])) {
queries("SET foreign_key_checks = 0"); // allows to truncate or drop several tables at once queries("SET foreign_key_checks = 0"); // allows to truncate or drop several tables at once
} }
@@ -56,23 +56,27 @@ if ($adminer->homepage()) {
echo "<form action='' method='post'>\n"; echo "<form action='' method='post'>\n";
if (support("table")) { if (support("table")) {
echo "<fieldset><legend>" . lang('Search data in tables') . " <span id='selected2'></span></legend><div>"; echo "<fieldset><legend>" . lang('Search data in tables') . " <span id='selected2'></span></legend><div>";
echo "<input type='search' name='query' value='" . h($_POST["query"]) . "'> <input type='submit' name='search' value='" . lang('Search') . "'>\n"; echo "<input type='search' name='query' value='" . h($_POST["query"]) . "'>";
echo script("qsl('input').onkeydown = partialArg(bodyKeydown, 'search');", "");
echo " <input type='submit' name='search' value='" . lang('Search') . "'>\n";
echo "</div></fieldset>\n"; echo "</div></fieldset>\n";
if ($_POST["search"] && $_POST["query"] != "") { if ($_POST["search"] && $_POST["query"] != "") {
$_GET["where"][0]["op"] = "LIKE %%";
search_tables(); search_tables();
} }
} }
echo "<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n";
echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^(tables|views)\[/);">';
$doc_link = doc_link(array('sql' => 'show-table-status.html')); $doc_link = doc_link(array('sql' => 'show-table-status.html'));
echo "<table cellspacing='0' class='nowrap checkable'>\n";
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
echo '<thead><tr class="wrap">';
echo '<td><input id="check-all" type="checkbox" class="jsonly">' . script("qs('#check-all').onclick = partial(formCheck, /^(tables|views)\[/);", "");
echo '<th>' . lang('Table'); echo '<th>' . lang('Table');
echo '<td>' . lang('Engine') . doc_link(array('sql' => 'storage-engines.html')); echo '<td>' . lang('Engine') . doc_link(array('sql' => 'storage-engines.html'));
echo '<td>' . lang('Collation') . doc_link(array('sql' => 'charset-mysql.html')); echo '<td>' . lang('Collation') . doc_link(array('sql' => 'charset-charsets.html', 'mariadb' => 'supported-character-sets-and-collations/'));
echo '<td>' . lang('Data Length') . $doc_link; echo '<td>' . lang('Data Length') . $doc_link;
echo '<td>' . lang('Index Length') . $doc_link; echo '<td>' . lang('Index Length') . $doc_link;
echo '<td>' . lang('Data Free') . $doc_link; echo '<td>' . lang('Data Free') . $doc_link;
echo '<td>' . lang('Auto Increment') . doc_link(array('sql' => 'example-auto-increment.html')); echo '<td>' . lang('Auto Increment') . doc_link(array('sql' => 'example-auto-increment.html', 'mariadb' => 'auto_increment/'));
echo '<td>' . lang('Rows') . $doc_link; echo '<td>' . lang('Rows') . $doc_link;
echo (support("comment") ? '<td>' . lang('Comment') . $doc_link : ''); echo (support("comment") ? '<td>' . lang('Comment') . $doc_link : '');
echo "</thead>\n"; echo "</thead>\n";
@@ -80,10 +84,11 @@ if ($adminer->homepage()) {
$tables = 0; $tables = 0;
foreach ($tables_list as $name => $type) { foreach ($tables_list as $name => $type) {
$view = ($type !== null && !preg_match('~table~i', $type)); $view = ($type !== null && !preg_match('~table~i', $type));
echo '<tr' . odd() . '><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "formUncheck('check-all');"); $id = h("Table-" . $name);
echo '<th>' . (support("table") || support("indexes") ? '<a href="' . h(ME) . 'table=' . urlencode($name) . '" title="' . lang('Show structure') . '">' . h($name) . '</a>' : h($name)); echo '<tr' . odd() . '><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "", "", $id);
echo '<th>' . (support("table") || support("indexes") ? "<a href='" . h(ME) . "table=" . urlencode($name) . "' title='" . lang('Show structure') . "' id='$id'>" . h($name) . '</a>' : h($name));
if ($view) { if ($view) {
echo '<td colspan="6"><a href="' . h(ME) . "view=" . urlencode($name) . '" title="' . lang('Alter view') . '">' . (preg_match('~materialized~i', $type) ? lang('Materialized View') : lang('View')) . '</a>'; echo '<td colspan="6"><a href="' . h(ME) . "view=" . urlencode($name) . '" title="' . lang('Alter view') . '">' . (preg_match('~materialized~i', $type) ? lang('Materialized view') : lang('View')) . '</a>';
echo '<td align="right"><a href="' . h(ME) . "select=" . urlencode($name) . '" title="' . lang('Select data') . '">?</a>'; echo '<td align="right"><a href="' . h(ME) . "select=" . urlencode($name) . '" title="' . lang('Select data') . '">?</a>';
} else { } else {
foreach (array( foreach (array(
@@ -115,17 +120,18 @@ if ($adminer->homepage()) {
echo "</table>\n"; echo "</table>\n";
if (!information_schema(DB)) { if (!information_schema(DB)) {
$vacuum = "<input type='submit' value='" . lang('Vacuum') . "'" . on_help("'VACUUM'") . "> "; echo "<div class='footer'><div>\n";
$optimize = "<input type='submit' name='optimize' value='" . lang('Optimize') . "'" . on_help($jush == "sql" ? "'OPTIMIZE TABLE'" : "'VACUUM OPTIMIZE'") . "> "; $vacuum = "<input type='submit' value='" . lang('Vacuum') . "'> " . on_help("'VACUUM'");
$optimize = "<input type='submit' name='optimize' value='" . lang('Optimize') . "'> " . on_help($jush == "sql" ? "'OPTIMIZE TABLE'" : "'VACUUM OPTIMIZE'");
echo "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>" echo "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>"
. ($jush == "sqlite" ? $vacuum . ($jush == "sqlite" ? $vacuum
: ($jush == "pgsql" ? $vacuum . $optimize : ($jush == "pgsql" ? $vacuum . $optimize
: ($jush == "sql" ? "<input type='submit' value='" . lang('Analyze') . "'" . on_help("'ANALYZE TABLE'") . "> " . $optimize : ($jush == "sql" ? "<input type='submit' value='" . lang('Analyze') . "'> " . on_help("'ANALYZE TABLE'") . $optimize
. "<input type='submit' name='check' value='" . lang('Check') . "'" . on_help("'CHECK TABLE'") . "> " . "<input type='submit' name='check' value='" . lang('Check') . "'> " . on_help("'CHECK TABLE'")
. "<input type='submit' name='repair' value='" . lang('Repair') . "'" . on_help("'REPAIR TABLE'") . "> " . "<input type='submit' name='repair' value='" . lang('Repair') . "'> " . on_help("'REPAIR TABLE'")
: ""))) : "")))
. "<input type='submit' name='truncate' value='" . lang('Truncate') . "'" . confirm() . on_help($jush == "sqlite" ? "'DELETE'" : "'TRUNCATE" . ($jush == "pgsql" ? "'" : " TABLE'")) . "> " . "<input type='submit' name='truncate' value='" . lang('Truncate') . "'> " . on_help($jush == "sqlite" ? "'DELETE'" : "'TRUNCATE" . ($jush == "pgsql" ? "'" : " TABLE'")) . confirm()
. "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . on_help("'DROP TABLE'") . ">\n"; . "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . on_help("'DROP TABLE'") . confirm() . "\n";
$databases = (support("scheme") ? $adminer->schemas() : $adminer->databases()); $databases = (support("scheme") ? $adminer->schemas() : $adminer->databases());
if (count($databases) != 1 && $jush != "sqlite") { if (count($databases) != 1 && $jush != "sqlite") {
$db = (isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB)); $db = (isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB));
@@ -135,17 +141,18 @@ if ($adminer->homepage()) {
echo (support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "'>" : ""); echo (support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "'>" : "");
echo "\n"; echo "\n";
} }
echo "<input type='hidden' name='all' value='' onclick=\"selectCount('selected', formChecked(this, /^(tables|views)\[/));" . (support("table") ? " selectCount('selected2', formChecked(this, /^tables\[/) || $tables);" : "") . "\">\n"; // used by trCheck() echo "<input type='hidden' name='all' value=''>"; // used by trCheck()
echo script("qsl('input').onclick = function () { selectCount('selected', formChecked(this, /^(tables|views)\[/));" . (support("table") ? " selectCount('selected2', formChecked(this, /^tables\[/) || $tables);" : "") . " }");
echo "<input type='hidden' name='token' value='$token'>\n"; echo "<input type='hidden' name='token' value='$token'>\n";
echo "</div></fieldset>\n"; echo "</div></fieldset>\n";
echo "</div></div>\n";
} }
echo "</form>\n"; echo "</form>\n";
echo "<script type='text/javascript'>tableCheck();</script>\n"; echo script("tableCheck();");
} }
echo '<p class="links"><a href="' . h(ME) . 'create=">' . lang('Create table') . "</a>\n"; echo '<p class="links"><a href="' . h(ME) . 'create=">' . lang('Create table') . "</a>\n";
echo (support("view") ? '<a href="' . h(ME) . 'view=">' . lang('Create view') . "</a>\n" : ""); echo (support("view") ? '<a href="' . h(ME) . 'view=">' . lang('Create view') . "</a>\n" : "");
echo (support("materializedview") ? '<a href="' . h(ME) . 'view=&amp;materialized=1">' . lang('Create materialized view') . "</a>\n" : "");
if (support("routine")) { if (support("routine")) {
echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n"; echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n";
@@ -155,11 +162,12 @@ if ($adminer->homepage()) {
echo '<thead><tr><th>' . lang('Name') . '<td>' . lang('Type') . '<td>' . lang('Return type') . "<td>&nbsp;</thead>\n"; echo '<thead><tr><th>' . lang('Name') . '<td>' . lang('Type') . '<td>' . lang('Return type') . "<td>&nbsp;</thead>\n";
odd(''); odd('');
foreach ($routines as $row) { foreach ($routines as $row) {
$name = ($row["SPECIFIC_NAME"] == $row["ROUTINE_NAME"] ? "" : "&name=" . urlencode($row["ROUTINE_NAME"])); // not computed on the pages to be able to print the header first
echo '<tr' . odd() . '>'; echo '<tr' . odd() . '>';
echo '<th><a href="' . h(ME) . ($row["ROUTINE_TYPE"] != "PROCEDURE" ? 'callf=' : 'call=') . urlencode($row["ROUTINE_NAME"]) . '">' . h($row["ROUTINE_NAME"]) . '</a>'; echo '<th><a href="' . h(ME . ($row["ROUTINE_TYPE"] != "PROCEDURE" ? 'callf=' : 'call=') . urlencode($row["SPECIFIC_NAME"]) . $name) . '">' . h($row["ROUTINE_NAME"]) . '</a>';
echo '<td>' . h($row["ROUTINE_TYPE"]); echo '<td>' . h($row["ROUTINE_TYPE"]);
echo '<td>' . h($row["DTD_IDENTIFIER"]); echo '<td>' . h($row["DTD_IDENTIFIER"]);
echo '<td><a href="' . h(ME) . ($row["ROUTINE_TYPE"] != "PROCEDURE" ? 'function=' : 'procedure=') . urlencode($row["ROUTINE_NAME"]) . '">' . lang('Alter') . "</a>"; echo '<td><a href="' . h(ME . ($row["ROUTINE_TYPE"] != "PROCEDURE" ? 'function=' : 'procedure=') . urlencode($row["SPECIFIC_NAME"]) . $name) . '">' . lang('Alter') . "</a>";
} }
echo "</table>\n"; echo "</table>\n";
} }
@@ -222,7 +230,7 @@ if ($adminer->homepage()) {
} }
if ($tables_list) { if ($tables_list) {
echo "<script type='text/javascript'>ajaxSetHtml('" . js_escape(ME) . "script=db');</script>\n"; echo script("ajaxSetHtml('" . js_escape(ME) . "script=db');");
} }
} }
} }

14
adminer/designs.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
function adminer_object() {
include_once "../plugins/plugin.php";
include_once "../plugins/designs.php";
$designs = array();
foreach (glob("../designs/*", GLOB_ONLYDIR) as $filename) {
$designs["$filename/adminer.css"] = basename($filename);
}
return new AdminerPlugin(array(
new AdminerDesigns($designs),
));
}
include "./index.php";

View File

@@ -6,5 +6,5 @@ header("Content-Disposition: attachment; filename=" . friendly_url("$TABLE-" . i
$select = array(idf_escape($_GET["field"])); $select = array(idf_escape($_GET["field"]));
$result = $driver->select($TABLE, $select, array(where($_GET, $fields)), $select); $result = $driver->select($TABLE, $select, array(where($_GET, $fields)), $select);
$row = ($result ? $result->fetch_row() : array()); $row = ($result ? $result->fetch_row() : array());
echo $row[0]; echo $driver->value($row[0], $fields[$_GET["field"]]);
exit; // don't output footer exit; // don't output footer

View File

@@ -17,9 +17,10 @@ if (isset($_GET["elastic"])) {
*/ */
function rootQuery($path, $content = array(), $method = 'GET') { function rootQuery($path, $content = array(), $method = 'GET') {
@ini_set('track_errors', 1); // @ - may be disabled @ini_set('track_errors', 1); // @ - may be disabled
$file = @file_get_contents($this->_url . '/' . ltrim($path, '/'), false, stream_context_create(array('http' => array( $file = @file_get_contents("$this->_url/" . ltrim($path, '/'), false, stream_context_create(array('http' => array(
'method' => $method, 'method' => $method,
'content' => json_encode($content), 'content' => $content === null ? $content : json_encode($content),
'header' => 'Content-Type: application/json',
'ignore_errors' => 1, // available since PHP 5.2.10 'ignore_errors' => 1, // available since PHP 5.2.10
)))); ))));
if (!$file) { if (!$file) {
@@ -59,7 +60,8 @@ if (isset($_GET["elastic"])) {
} }
function connect($server, $username, $password) { function connect($server, $username, $password) {
$this->_url = "http://$username:$password@$server/"; preg_match('~^(https?://)?(.*)~', $server, $match);
$this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]";
$return = $this->query(''); $return = $this->query('');
if ($return) { if ($return) {
$this->server_info = $return['version']['number']; $this->server_info = $return['version']['number'];
@@ -81,7 +83,7 @@ if (isset($_GET["elastic"])) {
class Min_Result { class Min_Result {
var $num_rows, $_rows; var $num_rows, $_rows;
function Min_Result($rows) { function __construct($rows) {
$this->num_rows = count($this->_rows); $this->num_rows = count($this->_rows);
$this->_rows = $rows; $this->_rows = $rows;
reset($this->_rows); reset($this->_rows);
@@ -146,7 +148,7 @@ if (isset($_GET["elastic"])) {
$start = microtime(true); $start = microtime(true);
$search = $this->_conn->query($query, $data); $search = $this->_conn->query($query, $data);
if ($print) { if ($print) {
echo $adminer->selectQuery("$query: " . print_r($data, true), format_time($start)); echo $adminer->selectQuery("$query: " . print_r($data, true), $start, !$search);
} }
if (!$search) { if (!$search) {
return false; return false;
@@ -155,7 +157,7 @@ if (isset($_GET["elastic"])) {
foreach ($search['hits']['hits'] as $hit) { foreach ($search['hits']['hits'] as $hit) {
$row = array(); $row = array();
if ($select == array("*")) { if ($select == array("*")) {
$row["_id"] = $hit["_id"]; $row["_id"] = $hit["_id"];
} }
$fields = $hit['_source']; $fields = $hit['_source'];
if ($select != array("*")) { if ($select != array("*")) {
@@ -175,6 +177,47 @@ if (isset($_GET["elastic"])) {
return new Min_Result($return); return new Min_Result($return);
} }
function update($type, $record, $queryWhere) {
$parts = preg_split('~ *= *~', $queryWhere);
if (count($parts) == 2) {
$id = trim($parts[1]);
$query = "$type/$id";
return $this->_conn->query($query, $record, 'POST');
}
return false;
}
function insert($type, $record) {
$id = ""; //! user should be able to inform _id
$query = "$type/$id";
$response = $this->_conn->query($query, $record, 'POST');
$this->_conn->last_id = $response['_id'];
return $response['created'];
}
function delete($type, $queryWhere) {
$ids = array();
if (is_array($_GET["where"]) && $_GET["where"]["_id"]) {
$ids[] = $_GET["where"]["_id"];
}
if (is_array($_POST['check'])) {
foreach ($_POST['check'] as $check) {
$parts = preg_split('~ *= *~', $check);
if (count($parts) == 2) {
$ids[] = trim($parts[1]);
}
}
}
$this->_conn->affected_rows = 0;
foreach ($ids as $id) {
$query = "{$type}/{$id}";
$response = $this->_conn->query($query, '{}', 'DELETE');
if (is_array($response) && $response['found'] == true) {
$this->_conn->affected_rows++;
}
}
return $this->_conn->affected_rows;
}
} }
@@ -222,9 +265,14 @@ if (isset($_GET["elastic"])) {
function count_tables($databases) { function count_tables($databases) {
global $connection; global $connection;
$return = $connection->query('_mapping'); $return = array();
if ($return) { $result = $connection->query('_stats');
$return = array_map('count', $return); if ($result && $result['indices']) {
$indices = $result['indices'];
foreach ($indices as $indice => $stats) {
$indexing = $stats['total']['indexing'];
$return[$indice] = $indexing['index_total'];
}
} }
return $return; return $return;
} }
@@ -240,26 +288,28 @@ if (isset($_GET["elastic"])) {
function table_status($name = "", $fast = false) { function table_status($name = "", $fast = false) {
global $connection; global $connection;
$search = $connection->query("_search?search_type=count", array( $search = $connection->query("_search", array(
"facets" => array( "size" => 0,
"aggregations" => array(
"count_by_type" => array( "count_by_type" => array(
"terms" => array( "terms" => array(
"field" => "_type", "field" => "_type"
) )
) )
) )
), "POST"); ), "POST");
$return = array(); $return = array();
if ($search) { if ($search) {
foreach ($search["facets"]["count_by_type"]["terms"] as $table) { $tables = $search["aggregations"]["count_by_type"]["buckets"];
$return[$table["term"]] = array( foreach ($tables as $table) {
"Name" => $table["term"], $return[$table["key"]] = array(
"Name" => $table["key"],
"Engine" => "table", "Engine" => "table",
"Rows" => $table["count"], "Rows" => $table["doc_count"],
); );
} if ($name != "" && $name == $table["key"]) {
if ($name != "" && $name == $table["term"]) { return $return[$name];
return $return[$name]; }
} }
} }
return $return; return $return;
@@ -335,16 +385,16 @@ if (isset($_GET["elastic"])) {
return null; return null;
} }
/** Create database /** Create index
* @param string * @param string
* @return mixed * @return mixed
*/ */
function create_database($db) { function create_database($db) {
global $connection; global $connection;
return $connection->rootQuery(urlencode($db), array(), 'PUT'); return $connection->rootQuery(urlencode($db), null, 'PUT');
} }
/** Drop databases /** Remove index
* @param array * @param array
* @return mixed * @return mixed
*/ */
@@ -353,7 +403,27 @@ if (isset($_GET["elastic"])) {
return $connection->rootQuery(urlencode(implode(',', $databases)), array(), 'DELETE'); return $connection->rootQuery(urlencode(implode(',', $databases)), array(), 'DELETE');
} }
/** Drop tables /** Alter type
* @param array
* @return mixed
*/
function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
global $connection;
$properties = array();
foreach ($fields as $f) {
$field_name = trim($f[1][0]);
$field_type = trim($f[1][1] ? $f[1][1] : "text");
$properties[$field_name] = array(
'type' => $field_type
);
}
if (!empty($properties)) {
$properties = array('properties' => $properties);
}
return $connection->query("_mapping/{$name}", $properties, 'PUT');
}
/** Drop types
* @param array * @param array
* @return bool * @return bool
*/ */
@@ -366,9 +436,25 @@ if (isset($_GET["elastic"])) {
return $return; return $return;
} }
function last_id() {
global $connection;
return $connection->last_id;
}
$jush = "elastic"; $jush = "elastic";
$operators = array("=", "query"); $operators = array("=", "query");
$functions = array(); $functions = array();
$grouping = array(); $grouping = array();
$edit_functions = array(array("json")); $edit_functions = array(array("json"));
$types = array(); ///< @var array ($type => $maximum_unsigned_length, ...)
$structured_types = array(); ///< @var array ($description => array($type, ...), ...)
foreach (array(
lang('Numbers') => array("long" => 3, "integer" => 5, "short" => 8, "byte" => 10, "double" => 20, "float" => 66, "half_float" => 12, "scaled_float" => 21),
lang('Date and time') => array("date" => 10),
lang('Strings') => array("string" => 65535, "text" => 65535),
lang('Binary') => array("binary" => 255),
) as $key => $val) {
$types += $val;
$structured_types[$key] = array_keys($val);
}
} }

View File

@@ -81,7 +81,7 @@ if (isset($_GET["firebird"])) {
class Min_Result { class Min_Result {
var $num_rows, $_result, $_offset = 0; var $num_rows, $_result, $_offset = 0;
function Min_Result($result) { function __construct($result) {
$this->_result = $result; $this->_result = $result;
// $this->num_rows = ibase_num_rows($result); // $this->num_rows = ibase_num_rows($result);
} }
@@ -147,8 +147,8 @@ if (isset($_GET["firebird"])) {
return $return; return $return;
} }
function limit1($query, $where) { function limit1($table, $query, $where, $separator = "\n") {
return limit($query, $where, 1); return limit($query, $where, 1, 0, $separator);
} }
function db_collation($db, $collations) { function db_collation($db, $collations) {

View File

@@ -1,8 +1,8 @@
<?php <?php
$drivers["mongo"] = "MongoDB (beta)"; $drivers["mongo"] = "MongoDB";
if (isset($_GET["mongo"])) { if (isset($_GET["mongo"])) {
$possible_drivers = array("mongo"); $possible_drivers = array("mongo", "mongodb");
define("DRIVER", "mongo"); define("DRIVER", "mongo");
if (class_exists('MongoDB')) { if (class_exists('MongoDB')) {
@@ -52,7 +52,7 @@ if (isset($_GET["mongo"])) {
class Min_Result { class Min_Result {
var $num_rows, $_rows = array(), $_offset = 0, $_charset = array(); var $num_rows, $_rows = array(), $_offset = 0, $_charset = array();
function Min_Result($result) { function __construct($result) {
foreach ($result as $item) { foreach ($result as $item) {
$row = array(); $row = array();
foreach ($item as $key => $val) { foreach ($item as $key => $val) {
@@ -109,97 +109,502 @@ if (isset($_GET["mongo"])) {
} }
} }
}
class Min_Driver extends Min_SQL { class Min_Driver extends Min_SQL {
public $primary = "_id"; public $primary = "_id";
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) { function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
$select = ($select == array("*") $select = ($select == array("*")
? array() ? array()
: array_fill_keys($select, true) : array_fill_keys($select, true)
); );
$sort = array(); $sort = array();
foreach ($order as $val) { foreach ($order as $val) {
$val = preg_replace('~ DESC$~', '', $val, 1, $count); $val = preg_replace('~ DESC$~', '', $val, 1, $count);
$sort[$val] = ($count ? -1 : 1); $sort[$val] = ($count ? -1 : 1);
}
return new Min_Result($this->_conn->_db->selectCollection($table)
->find(array(), $select)
->sort($sort)
->limit($limit != "" ? +$limit : 0)
->skip($page * $limit)
);
}
function insert($table, $set) {
try {
$return = $this->_conn->_db->selectCollection($table)->insert($set);
$this->_conn->errno = $return['code'];
$this->_conn->error = $return['err'];
$this->_conn->last_id = $set['_id'];
return !$return['err'];
} catch (Exception $ex) {
$this->_conn->error = $ex->getMessage();
return false;
}
} }
return new Min_Result($this->_conn->_db->selectCollection($table)
->find(array(), $select)
->sort($sort)
->limit(+$limit)
->skip($page * $limit)
);
} }
function insert($table, $set) { function get_databases($flush) {
try { global $connection;
$return = $this->_conn->_db->selectCollection($table)->insert($set); $return = array();
$this->_conn->errno = $return['code']; $dbs = $connection->_link->listDBs();
$this->_conn->error = $return['err']; foreach ($dbs['databases'] as $db) {
$this->_conn->last_id = $set['_id']; $return[] = $db['name'];
return !$return['err']; }
} catch (Exception $ex) { return $return;
$this->_conn->error = $ex->getMessage(); }
function count_tables($databases) {
global $connection;
$return = array();
foreach ($databases as $db) {
$return[$db] = count($connection->_link->selectDB($db)->getCollectionNames(true));
}
return $return;
}
function tables_list() {
global $connection;
return array_fill_keys($connection->_db->getCollectionNames(true), 'table');
}
function drop_databases($databases) {
global $connection;
foreach ($databases as $db) {
$response = $connection->_link->selectDB($db)->drop();
if (!$response['ok']) {
return false;
}
}
return true;
}
function indexes($table, $connection2 = null) {
global $connection;
$return = array();
foreach ($connection->_db->selectCollection($table)->getIndexInfo() as $index) {
$descs = array();
foreach ($index["key"] as $column => $type) {
$descs[] = ($type == -1 ? '1' : null);
}
$return[$index["name"]] = array(
"type" => ($index["name"] == "_id_" ? "PRIMARY" : ($index["unique"] ? "UNIQUE" : "INDEX")),
"columns" => array_keys($index["key"]),
"lengths" => array(),
"descs" => $descs,
);
}
return $return;
}
function fields($table) {
return fields_from_edit();
}
function found_rows($table_status, $where) {
global $connection;
//! don't call count_rows()
return $connection->_db->selectCollection($_GET["select"])->count($where);
}
$operators = array("=");
} elseif (class_exists('MongoDB\Driver\Manager')) {
class Min_DB {
var $extension = "MongoDB", $error, $last_id;
/** @var MongoDB\Driver\Manager */
var $_link;
var $_db, $_db_name;
function connect($server, $username, $password) {
global $adminer;
$db = $adminer->database();
$options = array();
if ($username != "") {
$options["username"] = $username;
$options["password"] = $password;
}
if ($db != "") {
$options["db"] = $db;
}
try {
$class = 'MongoDB\Driver\Manager';
$this->_link = new $class("mongodb://$server", $options);
return true;
} catch (Exception $ex) {
$this->error = $ex->getMessage();
return false;
}
}
function query($query) {
return false; return false;
} }
function select_db($database) {
try {
$this->_db_name = $database;
return true;
} catch (Exception $ex) {
$this->error = $ex->getMessage();
return false;
}
}
function quote($string) {
return $string;
}
} }
}
class Min_Result {
var $num_rows, $_rows = array(), $_offset = 0, $_charset = array();
function __construct($result) {
foreach ($result as $item) {
$row = array();
foreach ($item as $key => $val) {
if (is_a($val, 'MongoDB\BSON\Binary')) {
$this->_charset[$key] = 63;
}
$row[$key] =
(is_a($val, 'MongoDB\BSON\ObjectID') ? 'MongoDB\BSON\ObjectID("' . strval($val) . '")' :
(is_a($val, 'MongoDB\BSON\UTCDatetime') ? $val->toDateTime()->format('Y-m-d H:i:s') :
(is_a($val, 'MongoDB\BSON\Binary') ? $val->bin : //! allow downloading
(is_a($val, 'MongoDB\BSON\Regex') ? strval($val) :
(is_object($val) ? json_encode($val, 256) : // 256 = JSON_UNESCAPED_UNICODE
$val // MongoMinKey, MongoMaxKey
)))));
}
$this->_rows[] = $row;
foreach ($row as $key => $val) {
if (!isset($this->_rows[0][$key])) {
$this->_rows[0][$key] = null;
}
}
}
$this->num_rows = $result->count;
}
function fetch_assoc() {
$row = current($this->_rows);
if (!$row) {
return $row;
}
$return = array();
foreach ($this->_rows[0] as $key => $val) {
$return[$key] = $row[$key];
}
next($this->_rows);
return $return;
}
function fetch_row() {
$return = $this->fetch_assoc();
if (!$return) {
return $return;
}
return array_values($return);
}
function fetch_field() {
$keys = array_keys($this->_rows[0]);
$name = $keys[$this->_offset++];
return (object) array(
'name' => $name,
'charsetnr' => $this->_charset[$name],
);
}
function connect() {
global $adminer;
$connection = new Min_DB;
$credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
return $connection;
} }
return $connection->error;
}
function error() {
global $connection;
return h($connection->error);
}
function logged_user() { class Min_Driver extends Min_SQL {
global $adminer; public $primary = "_id";
$credentials = $adminer->credentials();
return $credentials[1];
}
function get_databases($flush) { function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
global $connection; global $connection;
$return = array(); $select = ($select == array("*")
$dbs = $connection->_link->listDBs(); ? array()
foreach ($dbs['databases'] as $db) { : array_fill_keys($select, 1)
$return[] = $db['name']; );
if (count($select) && !isset($select['_id'])) {
$select['_id'] = 0;
}
$where = where_to_query($where);
$sort = array();
foreach ($order as $val) {
$val = preg_replace('~ DESC$~', '', $val, 1, $count);
$sort[$val] = ($count ? -1 : 1);
}
if (isset($_GET['limit']) && is_numeric($_GET['limit']) && $_GET['limit'] > 0) {
$limit = $_GET['limit'];
}
$limit = min(200, max(1, (int) $limit));
$skip = $page * $limit;
$class = 'MongoDB\Driver\Query';
$query = new $class($where, array('projection' => $select, 'limit' => $limit, 'skip' => $skip, 'sort' => $sort));
$results = $connection->_link->executeQuery("$connection->_db_name.$table", $query);
return new Min_Result($results);
}
function update($table, $set, $queryWhere, $limit = 0, $separator = "\n") {
global $connection;
$db = $connection->_db_name;
$where = sql_query_where_parser($queryWhere);
$class = 'MongoDB\Driver\BulkWrite';
$bulk = new $class(array());
if (isset($set['_id'])) {
unset($set['_id']);
}
$removeFields = array();
foreach ($set as $key => $value) {
if ($value == 'NULL') {
$removeFields[$key] = 1;
unset($set[$key]);
}
}
$update = array('$set' => $set);
if (count($removeFields)) {
$update['$unset'] = $removeFields;
}
$bulk->update($where, $update, array('upsert' => false));
$results = $connection->_link->executeBulkWrite("$db.$table", $bulk);
$connection->affected_rows = $results->getModifiedCount();
return true;
}
function delete($table, $queryWhere, $limit = 0) {
global $connection;
$db = $connection->_db_name;
$where = sql_query_where_parser($queryWhere);
$class = 'MongoDB\Driver\BulkWrite';
$bulk = new $class(array());
$bulk->delete($where, array('limit' => $limit));
$results = $connection->_link->executeBulkWrite("$db.$table", $bulk);
$connection->affected_rows = $results->getDeletedCount();
return true;
}
function insert($table, $set) {
global $connection;
$db = $connection->_db_name;
$class = 'MongoDB\Driver\BulkWrite';
$bulk = new $class(array());
if (isset($set['_id']) && empty($set['_id'])) {
unset($set['_id']);
}
$bulk->insert($set);
$results = $connection->_link->executeBulkWrite("$db.$table", $bulk);
$connection->affected_rows = $results->getInsertedCount();
return true;
}
} }
return $return;
}
function collations() { function get_databases($flush) {
return array(); /** @var $connection Min_DB */
} global $connection;
$return = array();
function db_collation($db, $collations) { $class = 'MongoDB\Driver\Command';
} $command = new $class(array('listDatabases' => 1));
$results = $connection->_link->executeCommand('admin', $command);
function count_tables($databases) { foreach ($results as $dbs) {
global $connection; foreach ($dbs->databases as $db) {
$return = array(); $return[] = $db->name;
foreach ($databases as $db) { }
$return[$db] = count($connection->_link->selectDB($db)->getCollectionNames(true)); }
return $return;
} }
return $return;
function count_tables($databases) {
$return = array();
return $return;
}
function tables_list() {
global $connection;
$class = 'MongoDB\Driver\Command';
$command = new $class(array('listCollections' => 1));
$results = $connection->_link->executeCommand($connection->_db_name, $command);
$collections = array();
foreach ($results as $result) {
$collections[$result->name] = 'table';
}
return $collections;
}
function drop_databases($databases) {
return false;
}
function indexes($table, $connection2 = null) {
global $connection;
$return = array();
$class = 'MongoDB\Driver\Command';
$command = new $class(array('listIndexes' => $table));
$results = $connection->_link->executeCommand($connection->_db_name, $command);
foreach ($results as $index) {
$descs = array();
$columns = array();
foreach (get_object_vars($index->key) as $column => $type) {
$descs[] = ($type == -1 ? '1' : null);
$columns[] = $column;
}
$return[$index->name] = array(
"type" => ($index->name == "_id_" ? "PRIMARY" : (isset($index->unique) ? "UNIQUE" : "INDEX")),
"columns" => $columns,
"lengths" => array(),
"descs" => $descs,
);
}
return $return;
}
function fields($table) {
$fields = fields_from_edit();
if (!count($fields)) {
global $driver;
$result = $driver->select($table, array("*"), null, null, array(), 10);
while ($row = $result->fetch_assoc()) {
foreach ($row as $key => $val) {
$row[$key] = null;
$fields[$key] = array(
"field" => $key,
"type" => "string",
"null" => ($key != $driver->primary),
"auto_increment" => ($key == $driver->primary),
"privileges" => array(
"insert" => 1,
"select" => 1,
"update" => 1,
),
);
}
}
}
return $fields;
}
function found_rows($table_status, $where) {
global $connection;
$where = where_to_query($where);
$class = 'MongoDB\Driver\Command';
$command = new $class(array('count' => $table_status['Name'], 'query' => $where));
$results = $connection->_link->executeCommand($connection->_db_name, $command);
$toArray = $results->toArray();
return $toArray[0]->n;
}
function sql_query_where_parser($queryWhere) {
$queryWhere = trim(preg_replace('/WHERE[\s]?[(]?\(?/', '', $queryWhere));
$queryWhere = preg_replace('/\)\)\)$/', ')', $queryWhere);
$wheres = explode(' AND ', $queryWhere);
$wheresOr = explode(') OR (', $queryWhere);
$where = array();
foreach ($wheres as $whereStr) {
$where[] = trim($whereStr);
}
if (count($wheresOr) == 1) {
$wheresOr = array();
} elseif (count($wheresOr) > 1) {
$where = array();
}
return where_to_query($where, $wheresOr);
}
function where_to_query($whereAnd = array(), $whereOr = array()) {
global $operators;
$data = array();
foreach (array('and' => $whereAnd, 'or' => $whereOr) as $type => $where) {
if (is_array($where)) {
foreach ($where as $expression) {
list($col, $op, $val) = explode(" ", $expression, 3);
if ($col == "_id") {
$val = str_replace('MongoDB\BSON\ObjectID("', "", $val);
$val = str_replace('")', "", $val);
$class = 'MongoDB\BSON\ObjectID';
$val = new $class($val);
}
if (!in_array($op, $operators)) {
continue;
}
if (preg_match('~^\(f\)(.+)~', $op, $match)) {
$val = (float) $val;
$op = $match[1];
} elseif (preg_match('~^\(date\)(.+)~', $op, $match)) {
$dateTime = new DateTime($val);
$class = 'MongoDB\BSON\UTCDatetime';
$val = new $class($dateTime->getTimestamp() * 1000);
$op = $match[1];
}
switch ($op) {
case '=':
$op = '$eq';
break;
case '!=':
$op = '$ne';
break;
case '>':
$op = '$gt';
break;
case '<':
$op = '$lt';
break;
case '>=':
$op = '$gte';
break;
case '<=':
$op = '$lte';
break;
case 'regex':
$op = '$regex';
break;
default:
continue;
}
if ($type == 'and') {
$data['$and'][] = array($col => array($op => $val));
} elseif ($type == 'or') {
$data['$or'][] = array($col => array($op => $val));
}
}
}
}
return $data;
}
$operators = array(
"=",
"!=",
">",
"<",
">=",
"<=",
"regex",
"(f)=",
"(f)!=",
"(f)>",
"(f)<",
"(f)>=",
"(f)<=",
"(date)=",
"(date)!=",
"(date)>",
"(date)<",
"(date)>=",
"(date)<=",
);
} }
function tables_list() { function table($idf) {
global $connection; return $idf;
return array_fill_keys($connection->_db->getCollectionNames(true), 'table'); }
function idf_escape($idf) {
return $idf;
} }
function table_status($name = "", $fast = false) { function table_status($name = "", $fast = false) {
@@ -213,43 +618,73 @@ if (isset($_GET["mongo"])) {
return $return; return $return;
} }
function information_schema() { function last_id() {
}
function is_view($table_status) {
}
function drop_databases($databases) {
global $connection; global $connection;
foreach ($databases as $db) { return $connection->last_id;
$response = $connection->_link->selectDB($db)->drop(); }
if (!$response['ok']) {
function error() {
global $connection;
return h($connection->error);
}
function collations() {
return array();
}
function logged_user() {
global $adminer;
$credentials = $adminer->credentials();
return $credentials[1];
}
function connect() {
global $adminer;
$connection = new Min_DB;
$credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
return $connection;
}
return $connection->error;
}
function alter_indexes($table, $alter) {
global $connection;
foreach ($alter as $val) {
list($type, $name, $set) = $val;
if ($set == "DROP") {
$return = $connection->_db->command(array("deleteIndexes" => $table, "index" => $name));
} else {
$columns = array();
foreach ($set as $column) {
$column = preg_replace('~ DESC$~', '', $column, 1, $count);
$columns[$column] = ($count ? -1 : 1);
}
$return = $connection->_db->selectCollection($table)->ensureIndex($columns, array(
"unique" => ($type == "UNIQUE"),
"name" => $name,
//! "sparse"
));
}
if ($return['errmsg']) {
$connection->error = $return['errmsg'];
return false; return false;
} }
} }
return true; return true;
} }
function indexes($table, $connection2 = null) { function support($feature) {
global $connection; return preg_match("~database|indexes~", $feature);
$return = array();
foreach ($connection->_db->selectCollection($table)->getIndexInfo() as $index) {
$descs = array();
foreach ($index["key"] as $column => $type) {
$descs[] = ($type == -1 ? '1' : null);
}
$return[$index["name"]] = array(
"type" => ($index["name"] == "_id_" ? "PRIMARY" : ($index["unique"] ? "UNIQUE" : "INDEX")),
"columns" => array_keys($index["key"]),
"lengths" => array(),
"descs" => $descs,
);
}
return $return;
} }
function fields($table) { function db_collation($db, $collations) {
return fields_from_edit(); }
function information_schema() {
}
function is_view($table_status) {
} }
function convert_field($field) { function convert_field($field) {
@@ -270,12 +705,6 @@ if (isset($_GET["mongo"])) {
return array(); return array();
} }
function found_rows($table_status, $where) {
global $connection;
//! don't call count_rows()
return $connection->_db->selectCollection($_GET["select"])->count($where);
}
function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) { function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
global $connection; global $connection;
if ($table == "") { if ($table == "") {
@@ -306,51 +735,7 @@ if (isset($_GET["mongo"])) {
return true; return true;
} }
function alter_indexes($table, $alter) {
global $connection;
foreach ($alter as $val) {
list($type, $name, $set) = $val;
if ($set == "DROP") {
$return = $connection->_db->command(array("deleteIndexes" => $table, "index" => $name));
} else {
$columns = array();
foreach ($set as $column) {
$column = preg_replace('~ DESC$~', '', $column, 1, $count);
$columns[$column] = ($count ? -1 : 1);
}
$return = $connection->_db->selectCollection($table)->ensureIndex($columns, array(
"unique" => ($type == "UNIQUE"),
"name" => $name,
//! "sparse"
));
}
if ($return['errmsg']) {
$connection->error = $return['errmsg'];
return false;
}
}
return true;
}
function last_id() {
global $connection;
return $connection->last_id;
}
function table($idf) {
return $idf;
}
function idf_escape($idf) {
return $idf;
}
function support($feature) {
return preg_match("~database|indexes~", $feature);
}
$jush = "mongo"; $jush = "mongo";
$operators = array("=");
$functions = array(); $functions = array();
$grouping = array(); $grouping = array();
$edit_functions = array(array("json")); $edit_functions = array(array("json"));

View File

@@ -5,10 +5,10 @@
* @author Jakub Vrana * @author Jakub Vrana
*/ */
$drivers["mssql"] = "MS SQL"; $drivers["mssql"] = "MS SQL (beta)";
if (isset($_GET["mssql"])) { if (isset($_GET["mssql"])) {
$possible_drivers = array("SQLSRV", "MSSQL"); $possible_drivers = array("SQLSRV", "MSSQL", "PDO_DBLIB");
define("DRIVER", "mssql"); define("DRIVER", "mssql");
if (extension_loaded("sqlsrv")) { if (extension_loaded("sqlsrv")) {
class Min_DB { class Min_DB {
@@ -93,7 +93,7 @@ if (isset($_GET["mssql"])) {
class Min_Result { class Min_Result {
var $_result, $_offset = 0, $_fields, $num_rows; var $_result, $_offset = 0, $_fields, $num_rows;
function Min_Result($result) { function __construct($result) {
$this->_result = $result; $this->_result = $result;
// $this->num_rows = sqlsrv_num_rows($result); // available only in scrollable results // $this->num_rows = sqlsrv_num_rows($result); // available only in scrollable results
} }
@@ -109,11 +109,11 @@ if (isset($_GET["mssql"])) {
} }
function fetch_assoc() { function fetch_assoc() {
return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_ASSOC, SQLSRV_SCROLL_NEXT)); return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_ASSOC));
} }
function fetch_row() { function fetch_row() {
return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_NUMERIC, SQLSRV_SCROLL_NEXT)); return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_NUMERIC));
} }
function fetch_field() { function fetch_field() {
@@ -164,7 +164,7 @@ if (isset($_GET["mssql"])) {
} }
function query($query, $unbuffered = false) { function query($query, $unbuffered = false) {
$result = mssql_query($query, $this->_link); //! $unbuffered $result = @mssql_query($query, $this->_link); //! $unbuffered
$this->error = ""; $this->error = "";
if (!$result) { if (!$result) {
$this->error = mssql_get_last_message(); $this->error = mssql_get_last_message();
@@ -186,7 +186,7 @@ if (isset($_GET["mssql"])) {
} }
function next_result() { function next_result() {
return mssql_next_result($this->_result); return mssql_next_result($this->_result->_result);
} }
function result($query, $field = 0) { function result($query, $field = 0) {
@@ -201,7 +201,7 @@ if (isset($_GET["mssql"])) {
class Min_Result { class Min_Result {
var $_result, $_offset = 0, $_fields, $num_rows; var $_result, $_offset = 0, $_fields, $num_rows;
function Min_Result($result) { function __construct($result) {
$this->_result = $result; $this->_result = $result;
$this->num_rows = mssql_num_rows($result); $this->num_rows = mssql_num_rows($result);
} }
@@ -234,8 +234,21 @@ if (isset($_GET["mssql"])) {
} }
} }
} } elseif (extension_loaded("pdo_dblib")) {
class Min_DB extends Min_PDO {
var $extension = "PDO_DBLIB";
function connect($server, $username, $password) {
$this->dsn("dblib:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\\d)~', ';port=\\1', $server)), $username, $password);
return true;
}
function select_db($database) {
// database selection is separated from the connection so dbname in DSN can't be used
return $this->query("USE " . idf_escape($database));
}
}
}
class Min_Driver extends Min_SQL { class Min_Driver extends Min_SQL {
@@ -288,20 +301,20 @@ if (isset($_GET["mssql"])) {
} }
function get_databases() { function get_databases() {
return get_vals("EXEC sp_databases"); return get_vals("SELECT name FROM sys.databases WHERE name NOT IN ('master', 'tempdb', 'model', 'msdb')");
} }
function limit($query, $where, $limit, $offset = 0, $separator = " ") { function limit($query, $where, $limit, $offset = 0, $separator = " ") {
return ($limit !== null ? " TOP (" . ($limit + $offset) . ")" : "") . " $query$where"; // seek later return ($limit !== null ? " TOP (" . ($limit + $offset) . ")" : "") . " $query$where"; // seek later
} }
function limit1($query, $where) { function limit1($table, $query, $where, $separator = "\n") {
return limit($query, $where, 1); return limit($query, $where, 1, 0, $separator);
} }
function db_collation($db, $collations) { function db_collation($db, $collations) {
global $connection; global $connection;
return $connection->result("SELECT collation_name FROM sys.databases WHERE name = " . q($db)); return $connection->result("SELECT collation_name FROM sys.databases WHERE name = " . q($db));
} }
function engines() { function engines() {
@@ -348,7 +361,7 @@ if (isset($_GET["mssql"])) {
function fields($table) { function fields($table) {
$return = array(); $return = array();
foreach (get_rows("SELECT c.*, t.name type, d.definition [default] foreach (get_rows("SELECT c.max_length, c.precision, c.scale, c.name, c.is_nullable, c.is_identity, c.collation_name, t.name type, CAST(d.definition as text) [default]
FROM sys.all_columns c FROM sys.all_columns c
JOIN sys.all_objects o ON c.object_id = o.object_id JOIN sys.all_objects o ON c.object_id = o.object_id
JOIN sys.types t ON c.user_type_id = t.user_type_id JOIN sys.types t ON c.user_type_id = t.user_type_id

View File

@@ -9,20 +9,26 @@ if (!defined("DRIVER")) {
class Min_DB extends MySQLi { class Min_DB extends MySQLi {
var $extension = "MySQLi"; var $extension = "MySQLi";
function Min_DB() { function __construct() {
parent::init(); parent::init();
} }
function connect($server, $username, $password) { function connect($server = "", $username = "", $password = "", $database = null, $port = null, $socket = null) {
global $adminer;
mysqli_report(MYSQLI_REPORT_OFF); // stays between requests, not required since PHP 5.3.4 mysqli_report(MYSQLI_REPORT_OFF); // stays between requests, not required since PHP 5.3.4
list($host, $port) = explode(":", $server, 2); // part after : is used for port or socket list($host, $port) = explode(":", $server, 2); // part after : is used for port or socket
$ssl = $adminer->connectSsl();
if ($ssl) {
$this->ssl_set($ssl['key'], $ssl['cert'], $ssl['ca'], '', '');
}
$return = @$this->real_connect( $return = @$this->real_connect(
($server != "" ? $host : ini_get("mysqli.default_host")), ($server != "" ? $host : ini_get("mysqli.default_host")),
($server . $username != "" ? $username : ini_get("mysqli.default_user")), ($server . $username != "" ? $username : ini_get("mysqli.default_user")),
($server . $username . $password != "" ? $password : ini_get("mysqli.default_pw")), ($server . $username . $password != "" ? $password : ini_get("mysqli.default_pw")),
null, $database,
(is_numeric($port) ? $port : ini_get("mysqli.default_port")), (is_numeric($port) ? $port : ini_get("mysqli.default_port")),
(!is_numeric($port) ? $port : null) (!is_numeric($port) ? $port : $socket),
($ssl ? 64 : 0) // 64 - MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT (not available before PHP 5.6.16)
); );
return $return; return $return;
} }
@@ -181,7 +187,7 @@ if (!defined("DRIVER")) {
/** Constructor /** Constructor
* @param resource * @param resource
*/ */
function Min_Result($result) { function __construct($result) {
$this->_result = $result; $this->_result = $result;
$this->num_rows = mysql_num_rows($result); $this->num_rows = mysql_num_rows($result);
} }
@@ -223,7 +229,22 @@ if (!defined("DRIVER")) {
var $extension = "PDO_MySQL"; var $extension = "PDO_MySQL";
function connect($server, $username, $password) { function connect($server, $username, $password) {
$this->dsn("mysql:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\\d)~', ';port=\\1', $server)), $username, $password); global $adminer;
$options = array();
$ssl = $adminer->connectSsl();
if ($ssl) {
$options = array(
PDO::MYSQL_ATTR_SSL_KEY => $ssl['key'],
PDO::MYSQL_ATTR_SSL_CERT => $ssl['cert'],
PDO::MYSQL_ATTR_SSL_CA => $ssl['ca'],
);
}
$this->dsn(
"mysql:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\\d)~', ';port=\\1', $server)),
$username,
$password,
$options
);
return true; return true;
} }
@@ -276,6 +297,32 @@ if (!defined("DRIVER")) {
} }
return queries($prefix . implode(",\n", $values) . $suffix); return queries($prefix . implode(",\n", $values) . $suffix);
} }
function convertSearch($idf, $val, $field) {
return (preg_match('~char|text|enum|set~', $field["type"]) && !preg_match("~^utf8~", $field["collation"])
? "CONVERT($idf USING " . charset($this->_conn) . ")"
: $idf
);
}
function warnings() {
$result = $this->_conn->query("SHOW WARNINGS");
if ($result && $result->num_rows) {
ob_start();
select($result); // select() usually needs to print a big table progressively
return ob_get_clean();
}
}
function tableHelp($name) {
$maria = preg_match('~MariaDB~', $this->_conn->server_info);
if (information_schema(DB)) {
return strtolower(($maria ? "information-schema-$name-table/" : str_replace("_", "-", $name) . "-table.html"));
}
if (DB == "mysql") {
return ($maria ? "mysql$name-table/" : "system-database.html"); //! more precise link
}
}
} }
@@ -301,12 +348,16 @@ if (!defined("DRIVER")) {
* @return mixed Min_DB or string for error * @return mixed Min_DB or string for error
*/ */
function connect() { function connect() {
global $adminer; global $adminer, $types, $structured_types;
$connection = new Min_DB; $connection = new Min_DB;
$credentials = $adminer->credentials(); $credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) { if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
$connection->set_charset(charset($connection)); // available in MySQLi since PHP 5.0.5 $connection->set_charset(charset($connection)); // available in MySQLi since PHP 5.0.5
$connection->query("SET sql_quote_show_create = 1, autocommit = 1"); $connection->query("SET sql_quote_show_create = 1, autocommit = 1");
if (min_version('5.7.8', 10.2, $connection)) {
$structured_types[lang('Strings')][] = "json";
$types["json"] = 4294967295;
}
return $connection; return $connection;
} }
$return = $connection->error; $return = $connection->error;
@@ -321,11 +372,10 @@ if (!defined("DRIVER")) {
* @return array * @return array
*/ */
function get_databases($flush) { function get_databases($flush) {
global $connection;
// SHOW DATABASES can take a very long time so it is cached // SHOW DATABASES can take a very long time so it is cached
$return = get_session("dbs"); $return = get_session("dbs");
if ($return === null) { if ($return === null) {
$query = ($connection->server_info >= 5 $query = (min_version(5)
? "SELECT SCHEMA_NAME FROM information_schema.SCHEMATA" ? "SELECT SCHEMA_NAME FROM information_schema.SCHEMATA"
: "SHOW DATABASES" : "SHOW DATABASES"
); // SHOW DATABASES can be disabled by skip_show_database ); // SHOW DATABASES can be disabled by skip_show_database
@@ -350,12 +400,14 @@ if (!defined("DRIVER")) {
} }
/** Formulate SQL modification query with limit 1 /** Formulate SQL modification query with limit 1
* @param string
* @param string everything after UPDATE or DELETE * @param string everything after UPDATE or DELETE
* @param string * @param string
* @param string
* @return string * @return string
*/ */
function limit1($query, $where) { function limit1($table, $query, $where, $separator = "\n") {
return limit($query, $where, 1); return limit($query, $where, 1, 0, $separator);
} }
/** Get database collation /** Get database collation
@@ -401,8 +453,7 @@ if (!defined("DRIVER")) {
* @return array array($name => $type) * @return array array($name => $type)
*/ */
function tables_list() { function tables_list() {
global $connection; return get_key_vals(min_version(5)
return get_key_vals($connection->server_info >= 5
? "SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME" ? "SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME"
: "SHOW TABLES" : "SHOW TABLES"
); );
@@ -426,10 +477,9 @@ if (!defined("DRIVER")) {
* @return array array($name => array("Name" => , "Engine" => , "Comment" => , "Oid" => , "Rows" => , "Collation" => , "Auto_increment" => , "Data_length" => , "Index_length" => , "Data_free" => )) or only inner array with $name * @return array array($name => array("Name" => , "Engine" => , "Comment" => , "Oid" => , "Rows" => , "Collation" => , "Auto_increment" => , "Data_length" => , "Index_length" => , "Data_free" => )) or only inner array with $name
*/ */
function table_status($name = "", $fast = false) { function table_status($name = "", $fast = false) {
global $connection;
$return = array(); $return = array();
foreach (get_rows($fast && $connection->server_info >= 5 foreach (get_rows($fast && min_version(5)
? "SELECT TABLE_NAME AS Name, Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() " . ($name != "" ? "AND TABLE_NAME = " . q($name) : "ORDER BY Name") ? "SELECT TABLE_NAME AS Name, ENGINE AS Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() " . ($name != "" ? "AND TABLE_NAME = " . q($name) : "ORDER BY Name")
: "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "") : "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "")
) as $row) { ) as $row) {
if ($row["Engine"] == "InnoDB") { if ($row["Engine"] == "InnoDB") {
@@ -460,9 +510,8 @@ if (!defined("DRIVER")) {
* @return bool * @return bool
*/ */
function fk_support($table_status) { function fk_support($table_status) {
global $connection;
return preg_match('~InnoDB|IBMDB2I~i', $table_status["Engine"]) return preg_match('~InnoDB|IBMDB2I~i', $table_status["Engine"])
|| (preg_match('~NDB~i', $table_status["Engine"]) && version_compare($connection->server_info, '5.6') >= 0); || (preg_match('~NDB~i', $table_status["Engine"]) && min_version(5.6));
} }
/** Get information about fields /** Get information about fields
@@ -500,10 +549,11 @@ if (!defined("DRIVER")) {
function indexes($table, $connection2 = null) { function indexes($table, $connection2 = null) {
$return = array(); $return = array();
foreach (get_rows("SHOW INDEX FROM " . table($table), $connection2) as $row) { foreach (get_rows("SHOW INDEX FROM " . table($table), $connection2) as $row) {
$return[$row["Key_name"]]["type"] = ($row["Key_name"] == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ? "INDEX" : "UNIQUE"))); $name = $row["Key_name"];
$return[$row["Key_name"]]["columns"][] = $row["Column_name"]; $return[$name]["type"] = ($name == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ? ($row["Index_type"] == "SPATIAL" ? "SPATIAL" : "INDEX") : "UNIQUE")));
$return[$row["Key_name"]]["lengths"][] = $row["Sub_part"]; $return[$name]["columns"][] = $row["Column_name"];
$return[$row["Key_name"]]["descs"][] = null; $return[$name]["lengths"][] = ($row["Index_type"] == "SPATIAL" ? null : $row["Sub_part"]);
$return[$name]["descs"][] = null;
} }
return $return; return $return;
} }
@@ -568,9 +618,8 @@ if (!defined("DRIVER")) {
* @return bool * @return bool
*/ */
function information_schema($db) { function information_schema($db) {
global $connection; return (min_version(5) && $db == "information_schema")
return ($connection->server_info >= 5 && $db == "information_schema") || (min_version(5.5) && $db == "performance_schema");
|| ($connection->server_info >= 5.5 && $db == "performance_schema");
} }
/** Get escaped error message /** Get escaped error message
@@ -581,16 +630,6 @@ if (!defined("DRIVER")) {
return h(preg_replace('~^You have an error.*syntax to use~U', "Syntax error", $connection->error)); return h(preg_replace('~^You have an error.*syntax to use~U', "Syntax error", $connection->error));
} }
/** Get line of error
* @return int 0 for first line
*/
function error_line() {
global $connection;
if (preg_match('~ at line ([0-9]+)$~', $connection->error, $regs)) {
return $regs[1] - 1;
}
}
/** Create database /** Create database
* @param string * @param string
* @param string * @param string
@@ -818,8 +857,9 @@ if (!defined("DRIVER")) {
function routine($name, $type) { function routine($name, $type) {
global $connection, $enum_length, $inout, $types; global $connection, $enum_length, $inout, $types;
$aliases = array("bool", "boolean", "integer", "double precision", "real", "dec", "numeric", "fixed", "national char", "national varchar"); $aliases = array("bool", "boolean", "integer", "double precision", "real", "dec", "numeric", "fixed", "national char", "national varchar");
$space = "(?:\\s|/\\*[\s\S]*?\\*/|(?:#|-- )[^\n]*\n?|--\r?\n)";
$type_pattern = "((" . implode("|", array_merge(array_keys($types), $aliases)) . ")\\b(?:\\s*\\(((?:[^'\")]|$enum_length)++)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s,]+)['\"]?)?"; $type_pattern = "((" . implode("|", array_merge(array_keys($types), $aliases)) . ")\\b(?:\\s*\\(((?:[^'\")]|$enum_length)++)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s,]+)['\"]?)?";
$pattern = "\\s*(" . ($type == "FUNCTION" ? "" : $inout) . ")?\\s*(?:`((?:[^`]|``)*)`\\s*|\\b(\\S+)\\s+)$type_pattern"; $pattern = "$space*(" . ($type == "FUNCTION" ? "" : $inout) . ")?\\s*(?:`((?:[^`]|``)*)`\\s*|\\b(\\S+)\\s+)$type_pattern";
$create = $connection->result("SHOW CREATE $type " . idf_escape($name), 2); $create = $connection->result("SHOW CREATE $type " . idf_escape($name), 2);
preg_match("~\\(((?:$pattern\\s*,?)*)\\)\\s*" . ($type == "FUNCTION" ? "RETURNS\\s+$type_pattern\\s+" : "") . "(.*)~is", $create, $match); preg_match("~\\(((?:$pattern\\s*,?)*)\\)\\s*" . ($type == "FUNCTION" ? "RETURNS\\s+$type_pattern\\s+" : "") . "(.*)~is", $create, $match);
$fields = array(); $fields = array();
@@ -849,10 +889,10 @@ if (!defined("DRIVER")) {
} }
/** Get list of routines /** Get list of routines
* @return array ("ROUTINE_TYPE" => , "ROUTINE_NAME" => , "DTD_IDENTIFIER" => ) * @return array ("SPECIFIC_NAME" => , "ROUTINE_NAME" => , "ROUTINE_TYPE" => , "DTD_IDENTIFIER" => )
*/ */
function routines() { function routines() {
return get_rows("SELECT ROUTINE_NAME, ROUTINE_TYPE, DTD_IDENTIFIER FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = " . q(DB)); return get_rows("SELECT ROUTINE_NAME AS SPECIFIC_NAME, ROUTINE_NAME, ROUTINE_TYPE, DTD_IDENTIFIER FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = " . q(DB));
} }
/** Get list of available routine languages /** Get list of available routine languages
@@ -862,6 +902,15 @@ if (!defined("DRIVER")) {
return array(); // "SQL" not required return array(); // "SQL" not required
} }
/** Get routine signature
* @param string
* @param array result of routine()
* @return string
*/
function routine_id($name, $row) {
return idf_escape($name);
}
/** Get last auto increment ID /** Get last auto increment ID
* @return string * @return string
*/ */
@@ -876,7 +925,7 @@ if (!defined("DRIVER")) {
* @return Min_Result * @return Min_Result
*/ */
function explain($connection, $query) { function explain($connection, $query) {
return $connection->query("EXPLAIN " . ($connection->server_info >= 5.1 ? "PARTITIONS " : "") . $query); return $connection->query("EXPLAIN " . (min_version(5.1) ? "PARTITIONS " : "") . $query);
} }
/** Get approximate number of rows /** Get approximate number of rows
@@ -920,9 +969,10 @@ if (!defined("DRIVER")) {
/** Get SQL command to create table /** Get SQL command to create table
* @param string * @param string
* @param bool * @param bool
* @param string
* @return string * @return string
*/ */
function create_sql($table, $auto_increment) { function create_sql($table, $auto_increment, $style) {
global $connection; global $connection;
$return = $connection->result("SHOW CREATE TABLE " . table($table), 1); $return = $connection->result("SHOW CREATE TABLE " . table($table), 1);
if (!$auto_increment) { if (!$auto_increment) {
@@ -949,14 +999,12 @@ if (!defined("DRIVER")) {
/** Get SQL commands to create triggers /** Get SQL commands to create triggers
* @param string * @param string
* @param string
* @return string * @return string
*/ */
function trigger_sql($table, $style) { function trigger_sql($table) {
$return = ""; $return = "";
foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\")), null, "-- ") as $row) { foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\")), null, "-- ") as $row) {
$return .= "\n" . ($style == 'CREATE+ALTER' ? "DROP TRIGGER IF EXISTS " . idf_escape($row["Trigger"]) . ";;\n" : "") $return .= "\nCREATE TRIGGER " . idf_escape($row["Trigger"]) . " $row[Timing] $row[Event] ON " . table($row["Table"]) . " FOR EACH ROW\n$row[Statement];;\n";
. "CREATE TRIGGER " . idf_escape($row["Trigger"]) . " $row[Timing] $row[Event] ON " . table($row["Table"]) . " FOR EACH ROW\n$row[Statement];;\n";
} }
return $return; return $return;
} }
@@ -994,7 +1042,7 @@ if (!defined("DRIVER")) {
return "BIN(" . idf_escape($field["field"]) . " + 0)"; // + 0 is required outside MySQLnd return "BIN(" . idf_escape($field["field"]) . " + 0)"; // + 0 is required outside MySQLnd
} }
if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) { if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
return "AsWKT(" . idf_escape($field["field"]) . ")"; return (min_version(8) ? "ST_" : "") . "AsWKT(" . idf_escape($field["field"]) . ")";
} }
} }
@@ -1011,7 +1059,7 @@ if (!defined("DRIVER")) {
$return = "CONV($return, 2, 10) + 0"; $return = "CONV($return, 2, 10) + 0";
} }
if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) { if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
$return = "GeomFromText($return)"; $return = (min_version(8) ? "ST_" : "") . "GeomFromText($return)";
} }
return $return; return $return;
} }
@@ -1021,8 +1069,20 @@ if (!defined("DRIVER")) {
* @return bool * @return bool
*/ */
function support($feature) { function support($feature) {
return !preg_match("~scheme|sequence|type|view_trigger|materializedview" . (min_version(5.1) ? "" : "|event|partitioning" . (min_version(5) ? "" : "|routine|trigger|view")) . "~", $feature);
}
function kill_process($val) {
return queries("KILL " . number($val));
}
function connection_id(){
return "SELECT CONNECTION_ID()";
}
function max_connections() {
global $connection; global $connection;
return !preg_match("~scheme|sequence|type|view_trigger" . ($connection->server_info < 5.1 ? "|event|partitioning" . ($connection->server_info < 5 ? "|routine|trigger|view" : "") : "") . "~", $feature); return $connection->result("SELECT @@max_connections");
} }
$jush = "sql"; ///< @var string JUSH identifier $jush = "sql"; ///< @var string JUSH identifier
@@ -1040,8 +1100,8 @@ if (!defined("DRIVER")) {
$structured_types[$key] = array_keys($val); $structured_types[$key] = array_keys($val);
} }
$unsigned = array("unsigned", "zerofill", "unsigned zerofill"); ///< @var array number variants $unsigned = array("unsigned", "zerofill", "unsigned zerofill"); ///< @var array number variants
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL"); ///< @var array operators used in select $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "FIND_IN_SET", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL"); ///< @var array operators used in select
$functions = array("char_length", "date", "from_unixtime", "lower", "round", "sec_to_time", "time_to_sec", "upper"); ///< @var array functions used in select $functions = array("char_length", "date", "from_unixtime", "lower", "round", "floor", "ceil", "sec_to_time", "time_to_sec", "upper"); ///< @var array functions used in select
$grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum"); ///< @var array grouping functions used in select $grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum"); ///< @var array grouping functions used in select
$edit_functions = array( ///< @var array of array("$type|$type2" => "$function/$function2") functions used in editing, [0] - edit and insert, [1] - edit only $edit_functions = array( ///< @var array of array("$type|$type2" => "$function/$function2") functions used in editing, [0] - edit and insert, [1] - edit only
array( array(
@@ -1049,7 +1109,7 @@ if (!defined("DRIVER")) {
"binary" => "md5/sha1", "binary" => "md5/sha1",
"date|time" => "now", "date|time" => "now",
), array( ), array(
"(^|[^o])int|float|double|decimal" => "+/-", // not point number_type() => "+/-",
"date" => "+ interval/- interval", "date" => "+ interval/- interval",
"time" => "addtime/subtime", "time" => "addtime/subtime",
"char|text" => "concat", "char|text" => "concat",

View File

@@ -1,5 +1,5 @@
<?php <?php
$drivers["oracle"] = "Oracle"; $drivers["oracle"] = "Oracle (beta)";
if (isset($_GET["oracle"])) { if (isset($_GET["oracle"])) {
$possible_drivers = array("OCI8", "PDO_OCI"); $possible_drivers = array("OCI8", "PDO_OCI");
@@ -80,7 +80,7 @@ if (isset($_GET["oracle"])) {
class Min_Result { class Min_Result {
var $_result, $_offset = 1, $num_rows; var $_result, $_offset = 1, $num_rows;
function Min_Result($result) { function __construct($result) {
$this->_result = $result; $this->_result = $result;
} }
@@ -175,8 +175,8 @@ if (isset($_GET["oracle"])) {
)); ));
} }
function limit1($query, $where) { function limit1($table, $query, $where, $separator = "\n") {
return " $query$where"; return " $query$where"; //! limit
} }
function db_collation($db, $collations) { function db_collation($db, $collations) {

View File

@@ -37,7 +37,15 @@ if (isset($_GET["pgsql"])) {
} }
function quote($string) { function quote($string) {
return "'" . pg_escape_string($this->_link, $string) . "'"; //! bytea return "'" . pg_escape_string($this->_link, $string) . "'";
}
function value($val, $field) {
return ($field["type"] == "bytea" ? pg_unescape_bytea($val) : $val);
}
function quoteBinary($string) {
return "'" . pg_escape_bytea($this->_link, $string) . "'";
} }
function select_db($database) { function select_db($database) {
@@ -89,12 +97,16 @@ if (isset($_GET["pgsql"])) {
} }
return pg_fetch_result($result->_result, 0, $field); return pg_fetch_result($result->_result, 0, $field);
} }
function warnings() {
return h(pg_last_notice($this->_link)); // second parameter is available since PHP 7.1.0
}
} }
class Min_Result { class Min_Result {
var $_result, $_offset = 0, $num_rows; var $_result, $_offset = 0, $num_rows;
function Min_Result($result) { function __construct($result) {
$this->_result = $result; $this->_result = $result;
$this->num_rows = pg_num_rows($result); $this->num_rows = pg_num_rows($result);
} }
@@ -143,6 +155,18 @@ if (isset($_GET["pgsql"])) {
return ($adminer->database() == $database); return ($adminer->database() == $database);
} }
function value($val, $field) {
return $val;
}
function quoteBinary($s) {
return q($s);
}
function warnings() {
return ''; // not implemented in PDO_PgSQL as of PHP 7.2.1
}
function close() { function close() {
} }
} }
@@ -173,6 +197,36 @@ if (isset($_GET["pgsql"])) {
return true; return true;
} }
function convertSearch($idf, $val, $field) {
return (preg_match('~char|text' . (is_numeric($val["val"]) && !preg_match('~LIKE~', $val["op"]) ? '|' . number_type() : '') . '~', $field["type"])
? $idf
: "CAST($idf AS text)"
);
}
function value($val, $field) {
return $this->_conn->value($val, $field);
}
function quoteBinary($s) {
return $this->_conn->quoteBinary($s);
}
function warnings() {
return $this->_conn->warnings();
}
function tableHelp($name) {
$links = array(
"information_schema" => "infoschema",
"pg_catalog" => "catalog",
);
$link = $links[$_GET["ns"]];
if ($link) {
return "$link-" . str_replace("_", "-", $name) . ".html";
}
}
} }
@@ -186,12 +240,20 @@ if (isset($_GET["pgsql"])) {
} }
function connect() { function connect() {
global $adminer; global $adminer, $types, $structured_types;
$connection = new Min_DB; $connection = new Min_DB;
$credentials = $adminer->credentials(); $credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) { if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
if ($connection->server_info >= 9) { if (min_version(9, 0, $connection)) {
$connection->query("SET application_name = 'Adminer'"); $connection->query("SET application_name = 'Adminer'");
if (min_version(9.2, 0, $connection)) {
$structured_types[lang('Strings')][] = "json";
$types["json"] = 4294967295;
if (min_version(9.4, 0, $connection)) {
$structured_types[lang('Strings')][] = "jsonb";
$types["jsonb"] = 4294967295;
}
}
} }
return $connection; return $connection;
} }
@@ -199,15 +261,18 @@ if (isset($_GET["pgsql"])) {
} }
function get_databases() { function get_databases() {
return get_vals("SELECT datname FROM pg_database ORDER BY datname"); return get_vals("SELECT datname FROM pg_database WHERE has_database_privilege(datname, 'CONNECT') ORDER BY datname");
} }
function limit($query, $where, $limit, $offset = 0, $separator = " ") { function limit($query, $where, $limit, $offset = 0, $separator = " ") {
return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : ""); return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
} }
function limit1($query, $where) { function limit1($table, $query, $where, $separator = "\n") {
return " $query$where"; return (preg_match('~^INTO~', $query)
? limit($query, $where, 1, 0, $separator)
: " $query WHERE ctid = (SELECT ctid FROM " . table($table) . $where . $separator . "LIMIT 1)"
);
} }
function db_collation($db, $collations) { function db_collation($db, $collations) {
@@ -244,10 +309,10 @@ ORDER BY 1";
function table_status($name = "") { function table_status($name = "") {
$return = array(); $return = array();
foreach (get_rows("SELECT relname AS \"Name\", CASE relkind WHEN 'r' THEN 'table' WHEN 'mv' THEN 'materialized view' WHEN 'f' THEN 'foreign table' ELSE 'view' END AS \"Engine\", pg_relation_size(oid) AS \"Data_length\", pg_total_relation_size(oid) - pg_relation_size(oid) AS \"Index_length\", obj_description(oid, 'pg_class') AS \"Comment\", relhasoids::int AS \"Oid\", reltuples as \"Rows\" foreach (get_rows("SELECT c.relname AS \"Name\", CASE c.relkind WHEN 'r' THEN 'table' WHEN 'm' THEN 'materialized view' ELSE 'view' END AS \"Engine\", pg_relation_size(c.oid) AS \"Data_length\", pg_total_relation_size(c.oid) - pg_relation_size(c.oid) AS \"Index_length\", obj_description(c.oid, 'pg_class') AS \"Comment\", CASE WHEN c.relhasoids THEN 'oid' ELSE '' END AS \"Oid\", c.reltuples as \"Rows\", n.nspname
FROM pg_class FROM pg_class c
WHERE relkind IN ('r','v','mv','f') JOIN pg_namespace n ON(n.nspname = current_schema() AND n.oid = c.relnamespace)
AND relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema()) WHERE relkind IN ('r', 'm', 'v', 'f')
" . ($name != "" ? "AND relname = " . q($name) : "ORDER BY relname") " . ($name != "" ? "AND relname = " . q($name) : "ORDER BY relname")
) as $row) { //! Index_length, Auto_increment ) as $row) { //! Index_length, Auto_increment
$return[$row["Name"]] = $row; $return[$row["Name"]] = $row;
@@ -296,7 +361,7 @@ ORDER BY a.attnum"
$row["auto_increment"] = preg_match('~^nextval\\(~i', $row["default"]); $row["auto_increment"] = preg_match('~^nextval\\(~i', $row["default"]);
$row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1); $row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1);
if (preg_match('~(.+)::[^)]+(.*)~', $row["default"], $match)) { if (preg_match('~(.+)::[^)]+(.*)~', $row["default"], $match)) {
$row["default"] = ($match[1][0] == "'" ? idf_unescape($match[1]) : $match[1]) . $match[2]; $row["default"] = ($match[1] == "NULL" ? null : (($match[1][0] == "'" ? idf_unescape($match[1]) : $match[1]) . $match[2]));
} }
$return[$row["field"]] = $row; $return[$row["field"]] = $row;
} }
@@ -311,9 +376,9 @@ ORDER BY a.attnum"
$return = array(); $return = array();
$table_oid = $connection2->result("SELECT oid FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema()) AND relname = " . q($table)); $table_oid = $connection2->result("SELECT oid FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema()) AND relname = " . q($table));
$columns = get_key_vals("SELECT attnum, attname FROM pg_attribute WHERE attrelid = $table_oid AND attnum > 0", $connection2); $columns = get_key_vals("SELECT attnum, attname FROM pg_attribute WHERE attrelid = $table_oid AND attnum > 0", $connection2);
foreach (get_rows("SELECT relname, indisunique::int, indisprimary::int, indkey, indoption FROM pg_index i, pg_class ci WHERE i.indrelid = $table_oid AND ci.oid = i.indexrelid", $connection2) as $row) { foreach (get_rows("SELECT relname, indisunique::int, indisprimary::int, indkey, indoption , (indpred IS NOT NULL)::int as indispartial FROM pg_index i, pg_class ci WHERE i.indrelid = $table_oid AND ci.oid = i.indexrelid", $connection2) as $row) {
$relname = $row["relname"]; $relname = $row["relname"];
$return[$relname]["type"] = ($row["indisprimary"] ? "PRIMARY" : ($row["indisunique"] ? "UNIQUE" : "INDEX")); $return[$relname]["type"] = ($row["indispartial"] ? "INDEX" : ($row["indisprimary"] ? "PRIMARY" : ($row["indisunique"] ? "UNIQUE" : "INDEX")));
$return[$relname]["columns"] = array(); $return[$relname]["columns"] = array();
foreach (explode(" ", $row["indkey"]) as $indkey) { foreach (explode(" ", $row["indkey"]) as $indkey) {
$return[$relname]["columns"][] = $columns[$indkey]; $return[$relname]["columns"][] = $columns[$indkey];
@@ -330,7 +395,7 @@ ORDER BY a.attnum"
function foreign_keys($table) { function foreign_keys($table) {
global $on_actions; global $on_actions;
$return = array(); $return = array();
foreach (get_rows("SELECT conname, pg_get_constraintdef(oid) AS definition foreach (get_rows("SELECT conname, condeferrable::int AS deferrable, pg_get_constraintdef(oid) AS definition
FROM pg_constraint FROM pg_constraint
WHERE conrelid = (SELECT pc.oid FROM pg_class AS pc INNER JOIN pg_namespace AS pn ON (pn.oid = pc.relnamespace) WHERE pc.relname = " . q($table) . " AND pn.nspname = current_schema()) WHERE conrelid = (SELECT pc.oid FROM pg_class AS pc INNER JOIN pg_namespace AS pn ON (pn.oid = pc.relnamespace) WHERE pc.relname = " . q($table) . " AND pn.nspname = current_schema())
AND contype = 'f'::char AND contype = 'f'::char
@@ -352,7 +417,9 @@ ORDER BY conkey, conname") as $row) {
function view($name) { function view($name) {
global $connection; global $connection;
return array("select" => $connection->result("SELECT pg_get_viewdef(" . q($name) . ")")); return array("select" => trim($connection->result("SELECT view_definition
FROM information_schema.views
WHERE table_schema = current_schema() AND table_name = " . q($name))));
} }
function collations() { function collations() {
@@ -488,7 +555,7 @@ ORDER BY conkey, conname") as $row) {
function drop_tables($tables) { function drop_tables($tables) {
foreach ($tables as $table) { foreach ($tables as $table) {
$status = table_status($table); $status = table_status($table);
if (!queries("DROP " . strtoupper($status["Engine"]) . " " . table($table))) { if (!queries("DROP " . strtoupper($status["Engine"]) . " " . table($table))) {
return false; return false;
} }
@@ -506,18 +573,21 @@ ORDER BY conkey, conname") as $row) {
return true; return true;
} }
function trigger($name) { function trigger($name, $table = null) {
if ($name == "") { if ($name == "") {
return array("Statement" => "EXECUTE PROCEDURE ()"); return array("Statement" => "EXECUTE PROCEDURE ()");
} }
$rows = get_rows('SELECT trigger_name AS "Trigger", condition_timing AS "Timing", event_manipulation AS "Event", \'FOR EACH \' || action_orientation AS "Type", action_statement AS "Statement" FROM information_schema.triggers WHERE event_object_table = ' . q($_GET["trigger"]) . ' AND trigger_name = ' . q($name)); if ($table === null) {
$table = $_GET['trigger'];
}
$rows = get_rows('SELECT t.trigger_name AS "Trigger", t.action_timing AS "Timing", (SELECT STRING_AGG(event_manipulation, \' OR \') FROM information_schema.triggers WHERE event_object_table = t.event_object_table AND trigger_name = t.trigger_name ) AS "Events", t.event_manipulation AS "Event", \'FOR EACH \' || t.action_orientation AS "Type", t.action_statement AS "Statement" FROM information_schema.triggers t WHERE t.event_object_table = ' . q($table) . ' AND t.trigger_name = ' . q($name));
return reset($rows); return reset($rows);
} }
function triggers($table) { function triggers($table) {
$return = array(); $return = array();
foreach (get_rows("SELECT * FROM information_schema.triggers WHERE event_object_table = " . q($table)) as $row) { foreach (get_rows("SELECT * FROM information_schema.triggers WHERE event_object_table = " . q($table)) as $row) {
$return[$row["trigger_name"]] = array($row["condition_timing"], $row["event_manipulation"]); $return[$row["trigger_name"]] = array($row["action_timing"], $row["event_manipulation"]);
} }
return $return; return $return;
} }
@@ -530,30 +600,36 @@ ORDER BY conkey, conname") as $row) {
); );
} }
/*
function routine($name, $type) { function routine($name, $type) {
//! there can be more functions with the same name differing only in parameters, it must be also passed to DROP FUNCTION $rows = get_rows('SELECT routine_definition AS definition, LOWER(external_language) AS language, *
//! no procedures, only functions FROM information_schema.routines
//! different syntax of CREATE FUNCTION WHERE routine_schema = current_schema() AND specific_name = ' . q($name));
$rows = get_rows('SELECT pg_catalog.format_type(p.prorettype, NULL) AS "returns", p.prosrc AS "definition" $return = $rows[0];
FROM pg_catalog.pg_namespace n $return["returns"] = array("type" => $return["type_udt_name"]);
JOIN pg_catalog.pg_proc p ON p.pronamespace = n.oid $return["fields"] = get_rows('SELECT parameter_name AS field, data_type AS type, character_maximum_length AS length, parameter_mode AS inout
WHERE n.nspname = current_schema() AND p.proname = ' . q($name)); FROM information_schema.parameters
$rows[0]["fields"] = array(); //! WHERE specific_schema = current_schema() AND specific_name = ' . q($name) . '
return $rows[0]; ORDER BY ordinal_position');
return $return;
} }
*/
function routines() { function routines() {
return get_rows('SELECT p.proname AS "ROUTINE_NAME", p.proargtypes AS "ROUTINE_TYPE", pg_catalog.format_type(p.prorettype, NULL) AS "DTD_IDENTIFIER" return get_rows('SELECT specific_name AS "SPECIFIC_NAME", routine_type AS "ROUTINE_TYPE", routine_name AS "ROUTINE_NAME", type_udt_name AS "DTD_IDENTIFIER"
FROM pg_catalog.pg_namespace n FROM information_schema.routines
JOIN pg_catalog.pg_proc p ON p.pronamespace = n.oid WHERE routine_schema = current_schema()
WHERE n.nspname = current_schema() ORDER BY SPECIFIC_NAME');
ORDER BY p.proname');
} }
function routine_languages() { function routine_languages() {
return get_vals("SELECT langname FROM pg_catalog.pg_language"); return get_vals("SELECT LOWER(lanname) FROM pg_catalog.pg_language");
}
function routine_id($name, $row) {
$return = array();
foreach ($row["fields"] as $field) {
$return[] = $field["type"];
}
return idf_escape($name) . "(" . implode(", ", $return) . ")";
} }
function last_id() { function last_id() {
@@ -606,6 +682,100 @@ AND typelem = 0"
return $return; return $return;
} }
function create_sql($table, $auto_increment, $style) {
global $connection;
$return = '';
$return_parts = array();
$sequences = array();
$status = table_status($table);
$fields = fields($table);
$indexes = indexes($table);
ksort($indexes);
$fkeys = foreign_keys($table);
ksort($fkeys);
if (!$status || empty($fields)) {
return false;
}
$return = "CREATE TABLE " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " (\n ";
// fields' definitions
foreach ($fields as $field_name => $field) {
$part = idf_escape($field['field']) . ' ' . $field['full_type']
. default_value($field)
. ($field['attnotnull'] ? " NOT NULL" : "");
$return_parts[] = $part;
// sequences for fields
if (preg_match('~nextval\(\'([^\']+)\'\)~', $field['default'], $matches)) {
$sequence_name = $matches[1];
$sq = reset(get_rows(min_version(10)
? "SELECT *, cache_size AS cache_value FROM pg_sequences WHERE schemaname = current_schema() AND sequencename = " . q($sequence_name)
: "SELECT * FROM $sequence_name"
));
$sequences[] = ($style == "DROP+CREATE" ? "DROP SEQUENCE IF EXISTS $sequence_name;\n" : "")
. "CREATE SEQUENCE $sequence_name INCREMENT $sq[increment_by] MINVALUE $sq[min_value] MAXVALUE $sq[max_value] START " . ($auto_increment ? $sq['last_value'] : 1) . " CACHE $sq[cache_value];";
}
}
// adding sequences before table definition
if (!empty($sequences)) {
$return = implode("\n\n", $sequences) . "\n\n$return";
}
// primary + unique keys
foreach ($indexes as $index_name => $index) {
switch($index['type']) {
case 'UNIQUE': $return_parts[] = "CONSTRAINT " . idf_escape($index_name) . " UNIQUE (" . implode(', ', array_map('idf_escape', $index['columns'])) . ")"; break;
case 'PRIMARY': $return_parts[] = "CONSTRAINT " . idf_escape($index_name) . " PRIMARY KEY (" . implode(', ', array_map('idf_escape', $index['columns'])) . ")"; break;
}
}
// foreign keys
foreach ($fkeys as $fkey_name => $fkey) {
$return_parts[] = "CONSTRAINT " . idf_escape($fkey_name) . " $fkey[definition] " . ($fkey['deferrable'] ? 'DEFERRABLE' : 'NOT DEFERRABLE');
}
$return .= implode(",\n ", $return_parts) . "\n) WITH (oids = " . ($status['Oid'] ? 'true' : 'false') . ");";
// "basic" indexes after table definition
foreach ($indexes as $index_name => $index) {
if ($index['type'] == 'INDEX') {
$return .= "\n\nCREATE INDEX " . idf_escape($index_name) . " ON " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " USING btree (" . implode(', ', array_map('idf_escape', $index['columns'])) . ");";
}
}
// coments for table & fields
if ($status['Comment']) {
$return .= "\n\nCOMMENT ON TABLE " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " IS " . q($status['Comment']) . ";";
}
foreach ($fields as $field_name => $field) {
if ($field['comment']) {
$return .= "\n\nCOMMENT ON COLUMN " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . "." . idf_escape($field_name) . " IS " . q($field['comment']) . ";";
}
}
return rtrim($return, ';');
}
function truncate_sql($table) {
return "TRUNCATE " . table($table);
}
function trigger_sql($table) {
$status = table_status($table);
$return = "";
foreach (triggers($table) as $trg_id => $trg) {
$trigger = trigger($trg_id, $status['Name']);
$return .= "\nCREATE TRIGGER " . idf_escape($trigger['Trigger']) . " $trigger[Timing] $trigger[Events] ON " . idf_escape($status["nspname"]) . "." . idf_escape($status['Name']) . " $trigger[Type] $trigger[Statement];;\n";
}
return $return;
}
function use_sql($database) { function use_sql($database) {
return "\connect " . idf_escape($database); return "\connect " . idf_escape($database);
} }
@@ -615,8 +785,7 @@ AND typelem = 0"
} }
function process_list() { function process_list() {
global $connection; return get_rows("SELECT * FROM pg_stat_activity ORDER BY " . (min_version(9.2) ? "pid" : "procpid"));
return get_rows("SELECT * FROM pg_stat_activity ORDER BY " . ($connection->server_info < 9.2 ? "procpid" : "pid"));
} }
function show_status() { function show_status() {
@@ -630,8 +799,20 @@ AND typelem = 0"
} }
function support($feature) { function support($feature) {
return preg_match('~^(database|table|columns|sql|indexes|comment|view|' . (min_version(9.3) ? 'materializedview|' : '') . 'scheme|routine|processlist|sequence|trigger|type|variables|drop_col|kill|dump)$~', $feature);
}
function kill_process($val) {
return queries("SELECT pg_terminate_backend(" . number($val) . ")");
}
function connection_id(){
return "SELECT pg_backend_pid()";
}
function max_connections() {
global $connection; global $connection;
return preg_match('~^(database|table|columns|sql|indexes|comment|view|' . ($connection->server_info >= 9.3 ? 'materializedview|' : '') . 'scheme|processlist|sequence|trigger|type|variables|drop_col)$~', $feature); //! routine| return $connection->result("SHOW max_connections");
} }
$jush = "pgsql"; $jush = "pgsql";
@@ -657,7 +838,7 @@ AND typelem = 0"
"char" => "md5", "char" => "md5",
"date|time" => "now", "date|time" => "now",
), array( ), array(
"int|numeric|real|money" => "+/-", number_type() => "+/-",
"date|time" => "+ interval/- interval", //! escape "date|time" => "+ interval/- interval", //! escape
"char|text" => "||", "char|text" => "||",
) )

View File

@@ -2,10 +2,10 @@
$drivers["simpledb"] = "SimpleDB"; $drivers["simpledb"] = "SimpleDB";
if (isset($_GET["simpledb"])) { if (isset($_GET["simpledb"])) {
$possible_drivers = array("SimpleXML"); $possible_drivers = array("SimpleXML + allow_url_fopen");
define("DRIVER", "simpledb"); define("DRIVER", "simpledb");
if (class_exists('SimpleXMLElement')) { if (class_exists('SimpleXMLElement') && ini_bool('allow_url_fopen')) {
class Min_DB { class Min_DB {
var $extension = "SimpleXML", $server_info = '2009-04-15', $error, $timeout, $next, $affected_rows, $_result; var $extension = "SimpleXML", $server_info = '2009-04-15', $error, $timeout, $next, $affected_rows, $_result;
@@ -56,7 +56,7 @@ if (isset($_GET["simpledb"])) {
class Min_Result { class Min_Result {
var $num_rows, $_rows = array(), $_offset = 0; var $num_rows, $_rows = array(), $_offset = 0;
function Min_Result($result) { function __construct($result) {
foreach ($result as $item) { foreach ($result as $item) {
$row = array(); $row = array();
if ($item->Name != '') { // SELECT COUNT(*) if ($item->Name != '') { // SELECT COUNT(*)

View File

@@ -11,7 +11,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
class Min_SQLite { class Min_SQLite {
var $extension = "SQLite3", $server_info, $affected_rows, $errno, $error, $_link; var $extension = "SQLite3", $server_info, $affected_rows, $errno, $error, $_link;
function Min_SQLite($filename) { function __construct($filename) {
$this->_link = new SQLite3($filename); $this->_link = new SQLite3($filename);
$version = $this->_link->version(); $version = $this->_link->version();
$this->server_info = $version["versionString"]; $this->server_info = $version["versionString"];
@@ -55,7 +55,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
class Min_Result { class Min_Result {
var $_result, $_offset = 0, $num_rows; var $_result, $_offset = 0, $num_rows;
function Min_Result($result) { function __construct($result) {
$this->_result = $result; $this->_result = $result;
} }
@@ -87,7 +87,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
class Min_SQLite { class Min_SQLite {
var $extension = "SQLite", $server_info, $affected_rows, $error, $_link; var $extension = "SQLite", $server_info, $affected_rows, $error, $_link;
function Min_SQLite($filename) { function __construct($filename) {
$this->server_info = sqlite_libversion(); $this->server_info = sqlite_libversion();
$this->_link = new SQLiteDatabase($filename); $this->_link = new SQLiteDatabase($filename);
} }
@@ -127,7 +127,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
class Min_Result { class Min_Result {
var $_result, $_offset = 0, $num_rows; var $_result, $_offset = 0, $num_rows;
function Min_Result($result) { function __construct($result) {
$this->_result = $result; $this->_result = $result;
if (method_exists($result, 'numRows')) { // not available in unbuffered query if (method_exists($result, 'numRows')) { // not available in unbuffered query
$this->num_rows = $result->numRows(); $this->num_rows = $result->numRows();
@@ -172,7 +172,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
class Min_SQLite extends Min_PDO { class Min_SQLite extends Min_PDO {
var $extension = "PDO_SQLite"; var $extension = "PDO_SQLite";
function Min_SQLite($filename) { function __construct($filename) {
$this->dsn(DRIVER . ":$filename", "", ""); $this->dsn(DRIVER . ":$filename", "", "");
} }
} }
@@ -182,13 +182,15 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
if (class_exists("Min_SQLite")) { if (class_exists("Min_SQLite")) {
class Min_DB extends Min_SQLite { class Min_DB extends Min_SQLite {
function Min_DB() { function __construct() {
$this->Min_SQLite(":memory:"); parent::__construct(":memory:");
$this->query("PRAGMA foreign_keys = 1");
} }
function select_db($filename) { function select_db($filename) {
if (is_readable($filename) && $this->query("ATTACH " . $this->quote(preg_match("~(^[/\\\\]|:)~", $filename) ? $filename : dirname($_SERVER["SCRIPT_FILENAME"]) . "/$filename") . " AS a")) { // is_readable - SQLite 3 if (is_readable($filename) && $this->query("ATTACH " . $this->quote(preg_match("~(^[/\\\\]|:)~", $filename) ? $filename : dirname($_SERVER["SCRIPT_FILENAME"]) . "/$filename") . " AS a")) { // is_readable - SQLite 3
$this->Min_SQLite($filename); parent::__construct($filename);
$this->query("PRAGMA foreign_keys = 1");
return true; return true;
} }
return false; return false;
@@ -216,6 +218,15 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
return queries("REPLACE INTO " . table($table) . " (" . implode(", ", array_keys(reset($rows))) . ") VALUES\n" . implode(",\n", $values)); return queries("REPLACE INTO " . table($table) . " (" . implode(", ", array_keys(reset($rows))) . ") VALUES\n" . implode(",\n", $values));
} }
function tableHelp($name) {
if ($name == "sqlite_sequence") {
return "fileformat2.html#seqtab";
}
if ($name == "sqlite_master") {
return "fileformat2.html#$name";
}
}
} }
@@ -240,9 +251,12 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : ""); return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
} }
function limit1($query, $where) { function limit1($table, $query, $where, $separator = "\n") {
global $connection; global $connection;
return ($connection->result("SELECT sqlite_compileoption_used('ENABLE_UPDATE_DELETE_LIMIT')") ? limit($query, $where, 1) : " $query$where"); return (preg_match('~^INTO~', $query) || $connection->result("SELECT sqlite_compileoption_used('ENABLE_UPDATE_DELETE_LIMIT')")
? limit($query, $where, 1, 0, $separator)
: " $query WHERE rowid = (SELECT rowid FROM " . table($table) . $where . $separator . "LIMIT 1)" //! use primary key in tables with WITHOUT rowid
);
} }
function db_collation($db, $collations) { function db_collation($db, $collations) {
@@ -269,9 +283,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
function table_status($name = "") { function table_status($name = "") {
global $connection; global $connection;
$return = array(); $return = array();
foreach (get_rows("SELECT name AS Name, type AS Engine FROM sqlite_master WHERE type IN ('table', 'view') " . ($name != "" ? "AND name = " . q($name) : "ORDER BY name")) as $row) { foreach (get_rows("SELECT name AS Name, type AS Engine, 'rowid' AS Oid, '' AS Auto_increment FROM sqlite_master WHERE type IN ('table', 'view') " . ($name != "" ? "AND name = " . q($name) : "ORDER BY name")) as $row) {
$row["Oid"] = 1;
$row["Auto_increment"] = "";
$row["Rows"] = $connection->result("SELECT COUNT(*) FROM " . idf_escape($row["Name"])); $row["Rows"] = $connection->result("SELECT COUNT(*) FROM " . idf_escape($row["Name"]));
$return[$row["Name"]] = $row; $return[$row["Name"]] = $row;
} }
@@ -334,9 +346,9 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
} }
$return = array(); $return = array();
$sql = $connection2->result("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = " . q($table)); $sql = $connection2->result("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = " . q($table));
if (preg_match('~\bPRIMARY\s+KEY\s*\((([^)"]+|"[^"]*")++)~i', $sql, $match)) { if (preg_match('~\bPRIMARY\s+KEY\s*\((([^)"]+|"[^"]*"|`[^`]*`)++)~i', $sql, $match)) {
$return[""] = array("type" => "PRIMARY", "columns" => array(), "lengths" => array(), "descs" => array()); $return[""] = array("type" => "PRIMARY", "columns" => array(), "lengths" => array(), "descs" => array());
preg_match_all('~((("[^"]*+")+)|(\S+))(\s+(ASC|DESC))?(,\s*|$)~i', $match[1], $matches, PREG_SET_ORDER); preg_match_all('~((("[^"]*+")+|(?:`[^`]*+`)+)|(\S+))(\s+(ASC|DESC))?(,\s*|$)~i', $match[1], $matches, PREG_SET_ORDER);
foreach ($matches as $match) { foreach ($matches as $match) {
$return[""]["columns"][] = idf_unescape($match[2]) . $match[4]; $return[""]["columns"][] = idf_unescape($match[2]) . $match[4];
$return[""]["descs"][] = (preg_match('~DESC~i', $match[5]) ? '1' : null); $return[""]["descs"][] = (preg_match('~DESC~i', $match[5]) ? '1' : null);
@@ -440,7 +452,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
function drop_databases($databases) { function drop_databases($databases) {
global $connection; global $connection;
$connection->Min_SQLite(":memory:"); // to unlock file, doesn't work in PDO on Windows $connection->__construct(":memory:"); // to unlock file, doesn't work in PDO on Windows
foreach ($databases as $db) { foreach ($databases as $db) {
if (!@unlink($db)) { if (!@unlink($db)) {
$connection->error = lang('File exists.'); $connection->error = lang('File exists.');
@@ -455,7 +467,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
if (!check_sqlite_name($name)) { if (!check_sqlite_name($name)) {
return false; return false;
} }
$connection->Min_SQLite(":memory:"); $connection->__construct(":memory:");
$connection->error = lang('File exists.'); $connection->error = lang('File exists.');
return @rename(DB, $name); return @rename(DB, $name);
} }
@@ -504,6 +516,9 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
if ($table != "") { if ($table != "") {
if (!$fields) { if (!$fields) {
foreach (fields($table) as $key => $field) { foreach (fields($table) as $key => $field) {
if ($indexes) {
$field["auto_increment"] = 0;
}
$fields[] = process_field($field, $field); $fields[] = process_field($field, $field);
$originals[$key] = idf_escape($key); $originals[$key] = idf_escape($key);
} }
@@ -669,18 +684,6 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
); );
} }
function routine($name, $type) {
// not supported by SQLite
}
function routines() {
// not supported by SQLite
}
function routine_languages() {
// not supported by SQLite
}
function begin() { function begin() {
return queries("BEGIN"); return queries("BEGIN");
} }
@@ -713,7 +716,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
return true; return true;
} }
function create_sql($table, $auto_increment) { function create_sql($table, $auto_increment, $style) {
global $connection; global $connection;
$return = $connection->result("SELECT sql FROM sqlite_master WHERE type IN ('table', 'view') AND name = " . q($table)); $return = $connection->result("SELECT sql FROM sqlite_master WHERE type IN ('table', 'view') AND name = " . q($table));
foreach (indexes($table) as $name => $index) { foreach (indexes($table) as $name => $index) {
@@ -732,7 +735,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
function use_sql($database) { function use_sql($database) {
} }
function trigger_sql($table, $style) { function trigger_sql($table) {
return implode(get_vals("SELECT sql || ';;\n' FROM sqlite_master WHERE type = 'trigger' AND tbl_name = " . q($table))); return implode(get_vals("SELECT sql || ';;\n' FROM sqlite_master WHERE type = 'trigger' AND tbl_name = " . q($table)));
} }

View File

@@ -92,7 +92,7 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
$fields = fields($name); $fields = fields($name);
$adminer->dumpData($name, $_POST["data_style"], "SELECT *" . convert_fields($fields, $fields) . " FROM " . table($name)); $adminer->dumpData($name, $_POST["data_style"], "SELECT *" . convert_fields($fields, $fields) . " FROM " . table($name));
} }
if ($is_sql && $_POST["triggers"] && $table && ($triggers = trigger_sql($name, $_POST["table_style"]))) { if ($is_sql && $_POST["triggers"] && $table && ($triggers = trigger_sql($name))) {
echo "\nDELIMITER ;;\n$triggers\nDELIMITER ;\n"; echo "\nDELIMITER ;;\n$triggers\nDELIMITER ;\n";
} }
@@ -165,12 +165,13 @@ echo "<tr><th>" . lang('Data') . "<td>" . html_select('data_style', $data_style,
<table cellspacing="0"> <table cellspacing="0">
<?php <?php
echo script("qsl('table').onclick = dumpClick;");
$prefixes = array(); $prefixes = array();
if (DB != "") { if (DB != "") {
$checked = ($TABLE != "" ? "" : " checked"); $checked = ($TABLE != "" ? "" : " checked");
echo "<thead><tr>"; echo "<thead><tr>";
echo "<th style='text-align: left;'><label class='block'><input type='checkbox' id='check-tables'$checked onclick='formCheck(this, /^tables\\[/);'>" . lang('Tables') . "</label>"; echo "<th style='text-align: left;'><label class='block'><input type='checkbox' id='check-tables'$checked>" . lang('Tables') . "</label>" . script("qs('#check-tables').onclick = partial(formCheck, /^tables\\[/);", "");
echo "<th style='text-align: right;'><label class='block'>" . lang('Data') . "<input type='checkbox' id='check-data'$checked onclick='formCheck(this, /^data\\[/);'></label>"; echo "<th style='text-align: right;'><label class='block'>" . lang('Data') . "<input type='checkbox' id='check-data'$checked></label>" . script("qs('#check-data').onclick = partial(formCheck, /^data\\[/);", "");
echo "</thead>\n"; echo "</thead>\n";
$views = ""; $views = "";
@@ -178,28 +179,31 @@ if (DB != "") {
foreach ($tables_list as $name => $type) { foreach ($tables_list as $name => $type) {
$prefix = preg_replace('~_.*~', '', $name); $prefix = preg_replace('~_.*~', '', $name);
$checked = ($TABLE == "" || $TABLE == (substr($TABLE, -1) == "%" ? "$prefix%" : $name)); //! % may be part of table name $checked = ($TABLE == "" || $TABLE == (substr($TABLE, -1) == "%" ? "$prefix%" : $name)); //! % may be part of table name
$print = "<tr><td>" . checkbox("tables[]", $name, $checked, $name, "checkboxClick(event, this); formUncheck('check-tables');", "block"); $print = "<tr><td>" . checkbox("tables[]", $name, $checked, $name, "", "block");
if ($type !== null && !preg_match('~table~i', $type)) { if ($type !== null && !preg_match('~table~i', $type)) {
$views .= "$print\n"; $views .= "$print\n";
} else { } else {
echo "$print<td align='right'><label class='block'><span id='Rows-" . h($name) . "'></span>" . checkbox("data[]", $name, $checked, "", "checkboxClick(event, this); formUncheck('check-data');") . "</label>\n"; echo "$print<td align='right'><label class='block'><span id='Rows-" . h($name) . "'></span>" . checkbox("data[]", $name, $checked) . "</label>\n";
} }
$prefixes[$prefix]++; $prefixes[$prefix]++;
} }
echo $views; echo $views;
if ($tables_list) { if ($tables_list) {
echo "<script type='text/javascript'>ajaxSetHtml('" . js_escape(ME) . "script=db');</script>\n"; echo script("ajaxSetHtml('" . js_escape(ME) . "script=db');");
} }
} else { } else {
echo "<thead><tr><th style='text-align: left;'><label class='block'><input type='checkbox' id='check-databases'" . ($TABLE == "" ? " checked" : "") . " onclick='formCheck(this, /^databases\\[/);'>" . lang('Database') . "</label></thead>\n"; echo "<thead><tr><th style='text-align: left;'>";
echo "<label class='block'><input type='checkbox' id='check-databases'" . ($TABLE == "" ? " checked" : "") . ">" . lang('Database') . "</label>";
echo script("qs('#check-databases').onclick = partial(formCheck, /^databases\\[/);", "");
echo "</thead>\n";
$databases = $adminer->databases(); $databases = $adminer->databases();
if ($databases) { if ($databases) {
foreach ($databases as $db) { foreach ($databases as $db) {
if (!information_schema($db)) { if (!information_schema($db)) {
$prefix = preg_replace('~_.*~', '', $db); $prefix = preg_replace('~_.*~', '', $db);
echo "<tr><td>" . checkbox("databases[]", $db, $TABLE == "" || $TABLE == "$prefix%", $db, "formUncheck('check-databases');", "block") . "\n"; echo "<tr><td>" . checkbox("databases[]", $db, $TABLE == "" || $TABLE == "$prefix%", $db, "", "block") . "\n";
$prefixes[$prefix]++; $prefixes[$prefix]++;
} }
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
$TABLE = $_GET["edit"]; $TABLE = $_GET["edit"];
$fields = fields($TABLE); $fields = fields($TABLE);
$where = (isset($_GET["select"]) ? (count($_POST["check"]) == 1 ? where_check($_POST["check"][0], $fields) : "") : where($_GET, $fields)); $where = (isset($_GET["select"]) ? ($_POST["check"] && count($_POST["check"]) == 1 ? where_check($_POST["check"][0], $fields) : "") : where($_GET, $fields));
$update = (isset($_GET["select"]) ? $_POST["edit"] : $where); $update = (isset($_GET["select"]) ? $_POST["edit"] : $where);
foreach ($fields as $name => $field) { foreach ($fields as $name => $field) {
if (!isset($field["privileges"][$update ? "update" : "insert"]) || $adminer->fieldName($field) == "") { if (!isset($field["privileges"][$update ? "update" : "insert"]) || $adminer->fieldName($field) == "") {
@@ -82,9 +82,13 @@ if ($_POST["save"]) {
} }
if ($select) { if ($select) {
$result = $driver->select($TABLE, $select, array($where), $select, array(), (isset($_GET["select"]) ? 2 : 1)); $result = $driver->select($TABLE, $select, array($where), $select, array(), (isset($_GET["select"]) ? 2 : 1));
$row = $result->fetch_assoc(); if (!$result) {
if (!$row) { // MySQLi returns null $error = error();
$row = false; } else {
$row = $result->fetch_assoc();
if (!$row) { // MySQLi returns null
$row = false;
}
} }
if (isset($_GET["select"]) && (!$row || $result->fetch_assoc())) { // $result->num_rows != 1 isn't available in all drivers if (isset($_GET["select"]) && (!$row || $result->fetch_assoc())) { // $result->num_rows != 1 isn't available in all drivers
$row = null; $row = null;

View File

@@ -47,6 +47,6 @@ if (!$row && $EVENT != "") {
<p><?php textarea("EVENT_DEFINITION", $row["EVENT_DEFINITION"]); ?> <p><?php textarea("EVENT_DEFINITION", $row["EVENT_DEFINITION"]); ?>
<p> <p>
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<?php if ($EVENT != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?> <?php if ($EVENT != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $EVENT)); ?><?php } ?>
<input type="hidden" name="token" value="<?php echo $token; ?>"> <input type="hidden" name="token" value="<?php echo $token; ?>">
</form> </form>

View File

@@ -1,4 +1,5 @@
<?php <?php
//! rewrite in compile.php to cache moderately with -dev version
if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) { if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) {
header("HTTP/1.1 304 Not Modified"); header("HTTP/1.1 304 Not Modified");
exit; exit;
@@ -6,6 +7,7 @@ if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) {
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 365*24*60*60) . " GMT"); header("Expires: " . gmdate("D, d M Y H:i:s", time() + 365*24*60*60) . " GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: immutable");
if ($_GET["file"] == "favicon.ico") { if ($_GET["file"] == "favicon.ico") {
header("Content-Type: image/x-icon"); header("Content-Type: image/x-icon");
@@ -18,7 +20,7 @@ if ($_GET["file"] == "favicon.ico") {
echo lzw_decompress(compile_file('../adminer/static/functions.js;static/editing.js', 'minify_js')); echo lzw_decompress(compile_file('../adminer/static/functions.js;static/editing.js', 'minify_js'));
} elseif ($_GET["file"] == "jush.js") { } elseif ($_GET["file"] == "jush.js") {
header("Content-Type: text/javascript; charset=utf-8"); header("Content-Type: text/javascript; charset=utf-8");
echo lzw_decompress(compile_file('../externals/jush/modules/jush.js;../externals/jush/modules/jush-textarea.js;../externals/jush/modules/jush-txt.js;../externals/jush/modules/jush-sql.js;../externals/jush/modules/jush-pgsql.js;../externals/jush/modules/jush-sqlite.js;../externals/jush/modules/jush-mssql.js;../externals/jush/modules/jush-oracle.js;../externals/jush/modules/jush-simpledb.js', 'minify_js')); echo lzw_decompress(compile_file('../externals/jush/modules/jush.js;../externals/jush/modules/jush-textarea.js;../externals/jush/modules/jush-txt.js;../externals/jush/modules/jush-js.js;../externals/jush/modules/jush-sql.js;../externals/jush/modules/jush-pgsql.js;../externals/jush/modules/jush-sqlite.js;../externals/jush/modules/jush-mssql.js;../externals/jush/modules/jush-oracle.js;../externals/jush/modules/jush-simpledb.js', 'minify_js'));
} else { } else {
header("Content-Type: image/gif"); header("Content-Type: image/gif");
switch ($_GET["file"]) { switch ($_GET["file"]) {

View File

@@ -7,13 +7,15 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
$message = ($_POST["drop"] ? lang('Foreign key has been dropped.') : ($name != "" ? lang('Foreign key has been altered.') : lang('Foreign key has been created.'))); $message = ($_POST["drop"] ? lang('Foreign key has been dropped.') : ($name != "" ? lang('Foreign key has been altered.') : lang('Foreign key has been created.')));
$location = ME . "table=" . urlencode($TABLE); $location = ME . "table=" . urlencode($TABLE);
$row["source"] = array_filter($row["source"], 'strlen'); if (!$_POST["drop"]) {
ksort($row["source"]); // enforce input order $row["source"] = array_filter($row["source"], 'strlen');
$target = array(); ksort($row["source"]); // enforce input order
foreach ($row["source"] as $key => $val) { $target = array();
$target[$key] = $row["target"][$key]; foreach ($row["source"] as $key => $val) {
$target[$key] = $row["target"][$key];
}
$row["target"] = $target;
} }
$row["target"] = $target;
if ($jush == "sqlite") { if ($jush == "sqlite") {
queries_redirect($location, $message, recreate_table($TABLE, $TABLE, array(), array(), array(" $name" => ($_POST["drop"] ? "" : " " . format_foreign_key($row))))); queries_redirect($location, $message, recreate_table($TABLE, $TABLE, array(), array(), array(" $name" => ($_POST["drop"] ? "" : " " . format_foreign_key($row)))));
@@ -60,13 +62,13 @@ $referencable = array_keys(array_filter(table_status('', true), 'fk_support'));
<input type="hidden" name="change-js" value=""> <input type="hidden" name="change-js" value="">
<noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>"></noscript> <noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>"></noscript>
<table cellspacing="0"> <table cellspacing="0">
<thead><tr><th><?php echo lang('Source'); ?><th><?php echo lang('Target'); ?></thead> <thead><tr><th id="label-source"><?php echo lang('Source'); ?><th id="label-target"><?php echo lang('Target'); ?></thead>
<?php <?php
$j = 0; $j = 0;
foreach ($row["source"] as $key => $val) { foreach ($row["source"] as $key => $val) {
echo "<tr>"; echo "<tr>";
echo "<td>" . html_select("source[" . (+$key) . "]", array(-1 => "") + $source, $val, ($j == count($row["source"]) - 1 ? "foreignAddRow(this);" : 1)); echo "<td>" . html_select("source[" . (+$key) . "]", array(-1 => "") + $source, $val, ($j == count($row["source"]) - 1 ? "foreignAddRow.call(this);" : 1), "label-source");
echo "<td>" . html_select("target[" . (+$key) . "]", $target, $row["target"][$key]); echo "<td>" . html_select("target[" . (+$key) . "]", $target, $row["target"][$key], 1, "label-target");
$j++; $j++;
} }
?> ?>
@@ -76,6 +78,7 @@ foreach ($row["source"] as $key => $val) {
<?php echo lang('ON UPDATE'); ?>: <?php echo html_select("on_update", array(-1 => "") + explode("|", $on_actions), $row["on_update"]); ?> <?php echo lang('ON UPDATE'); ?>: <?php echo html_select("on_update", array(-1 => "") + explode("|", $on_actions), $row["on_update"]); ?>
<?php echo doc_link(array( <?php echo doc_link(array(
'sql' => "innodb-foreign-key-constraints.html", 'sql' => "innodb-foreign-key-constraints.html",
'mariadb' => "foreign-keys/",
'pgsql' => "sql-createtable.html#SQL-CREATETABLE-REFERENCES", 'pgsql' => "sql-createtable.html#SQL-CREATETABLE-REFERENCES",
'mssql' => "ms174979.aspx", 'mssql' => "ms174979.aspx",
'oracle' => "clauses002.htm#sthref2903", 'oracle' => "clauses002.htm#sthref2903",
@@ -84,6 +87,6 @@ foreach ($row["source"] as $key => $val) {
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<noscript><p><input type="submit" name="add" value="<?php echo lang('Add column'); ?>"></noscript> <noscript><p><input type="submit" name="add" value="<?php echo lang('Add column'); ?>"></noscript>
<?php } ?> <?php } ?>
<?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?> <?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?><?php } ?>
<input type="hidden" name="token" value="<?php echo $token; ?>"> <input type="hidden" name="token" value="<?php echo $token; ?>">
</form> </form>

View File

@@ -9,7 +9,7 @@ class Adminer {
* @return string HTML code * @return string HTML code
*/ */
function name() { function name() {
return "<a href='http://www.adminer.org/' target='_blank' id='h1'>Adminer</a>"; return "<a href='https://www.adminer.org/'" . target_blank() . " id='h1'>Adminer</a>";
} }
/** Connection parameters /** Connection parameters
@@ -19,6 +19,12 @@ class Adminer {
return array(SERVER, $_GET["username"], get_password()); return array(SERVER, $_GET["username"], get_password());
} }
/** Get SSL connection options
* @return array array("key" => filename, "cert" => filename, "ca" => filename) or null
*/
function connectSsl() {
}
/** Get key used for permanent login /** Get key used for permanent login
* @param bool * @param bool
* @return string cryptic string which gets combined with password or false in case of an error * @return string cryptic string which gets combined with password or false in case of an error
@@ -33,6 +39,14 @@ class Adminer {
function bruteForceKey() { function bruteForceKey() {
return $_SERVER["REMOTE_ADDR"]; return $_SERVER["REMOTE_ADDR"];
} }
/** Get server name displayed in breadcrumbs
* @param string
* @return string HTML code or null
*/
function serverName($server) {
return h($server);
}
/** Identifier of selected database /** Identifier of selected database
* @return string * @return string
@@ -65,14 +79,20 @@ class Adminer {
} }
/** Headers to send before HTML output /** Headers to send before HTML output
* @return bool true to send security headers * @return null
*/ */
function headers() { function headers() {
return true; }
/** Get Content Security Policy headers
* @return array of arrays with directive name in key, allowed sources in value
*/
function csp() {
return csp();
} }
/** Print HTML code inside <head> /** Print HTML code inside <head>
* @return bool true to link adminer.css if exists * @return bool true to link favicon.ico and adminer.css if exists
*/ */
function head() { function head() {
?> ?>
@@ -81,6 +101,18 @@ class Adminer {
return true; return true;
} }
/** Get URLs of the CSS files
* @return array of strings
*/
function css() {
$return = array();
$filename = "adminer.css";
if (file_exists($filename)) {
$return[] = $filename;
}
return $return;
}
/** Print login form /** Print login form
* @return null * @return null
*/ */
@@ -88,18 +120,14 @@ class Adminer {
global $drivers; global $drivers;
?> ?>
<table cellspacing="0"> <table cellspacing="0">
<tr><th><?php echo lang('System'); ?><td><?php echo html_select("auth[driver]", $drivers, DRIVER, "loginDriver(this);"); ?> <tr><th><?php echo lang('System'); ?><td><?php echo html_select("auth[driver]", $drivers, DRIVER) . "\n"; ?>
<tr><th><?php echo lang('Server'); ?><td><input name="auth[server]" value="<?php echo h(SERVER); ?>" title="hostname[:port]" placeholder="localhost" autocapitalize="off"> <tr><th><?php echo lang('Server'); ?><td><input name="auth[server]" value="<?php echo h(SERVER); ?>" title="hostname[:port]" placeholder="localhost" autocapitalize="off">
<tr><th><?php echo lang('Username'); ?><td><input name="auth[username]" id="username" value="<?php echo h($_GET["username"]); ?>" autocapitalize="off"> <tr><th><?php echo lang('Username'); ?><td><input name="auth[username]" id="username" value="<?php echo h($_GET["username"]); ?>" autocapitalize="off">
<tr><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]"> <tr><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]">
<tr><th><?php echo lang('Database'); ?><td><input name="auth[db]" value="<?php echo h($_GET["db"]); ?>" autocapitalize="off"> <tr><th><?php echo lang('Database'); ?><td><input name="auth[db]" value="<?php echo h($_GET["db"]); ?>" autocapitalize="off">
</table> </table>
<script type="text/javascript">
var username = document.getElementById('username');
focus(username);
username.form['auth[driver]'].onchange();
</script>
<?php <?php
echo script("focus(qs('#username'));");
echo "<p><input type='submit' value='" . lang('Login') . "'>\n"; echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n"; echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
} }
@@ -107,9 +135,13 @@ username.form['auth[driver]'].onchange();
/** Authorize the user /** Authorize the user
* @param string * @param string
* @param string * @param string
* @return bool * @return mixed true for success, string for error message, false for unknown error
*/ */
function login($login, $password) { function login($login, $password) {
global $jush;
if ($jush == "sqlite") {
return lang('<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.', target_blank(), '<code>login()</code>');
}
return true; return true;
} }
@@ -136,6 +168,7 @@ username.form['auth[driver]'].onchange();
* @return null * @return null
*/ */
function selectLinks($tableStatus, $set = "") { function selectLinks($tableStatus, $set = "") {
global $jush, $driver;
echo '<p class="links">'; echo '<p class="links">';
$links = array("select" => lang('Select data')); $links = array("select" => lang('Select data'));
if (support("table") || support("indexes")) { if (support("table") || support("indexes")) {
@@ -151,9 +184,11 @@ username.form['auth[driver]'].onchange();
if ($set !== null) { if ($set !== null) {
$links["edit"] = lang('New item'); $links["edit"] = lang('New item');
} }
$name = $tableStatus["Name"];
foreach ($links as $key => $val) { foreach ($links as $key => $val) {
echo " <a href='" . h(ME) . "$key=" . urlencode($tableStatus["Name"]) . ($key == "edit" ? $set : "") . "'" . bold(isset($_GET[$key])) . ">$val</a>"; echo " <a href='" . h(ME) . "$key=" . urlencode($name) . ($key == "edit" ? $set : "") . "'" . bold(isset($_GET[$key])) . ">$val</a>";
} }
echo doc_link(array($jush => $driver->tableHelp($name)), "?");
echo "\n"; echo "\n";
} }
@@ -184,17 +219,34 @@ username.form['auth[driver]'].onchange();
/** Query printed in select before execution /** Query printed in select before execution
* @param string query to be executed * @param string query to be executed
* @param string elapsed time * @param float start time of the query
* @param bool
* @return string * @return string
*/ */
function selectQuery($query, $time) { function selectQuery($query, $start, $failed = false) {
global $jush; global $jush, $driver;
return "<p><code class='jush-$jush'>" . h(str_replace("\n", " ", $query)) . "</code> <span class='time'>($time)</span>" $return = "</p>\n"; // required for IE9 inline edit
if (!$failed && ($warnings = $driver->warnings())) {
$id = "warnings";
$return = ", <a href='#$id'>" . lang('Warnings') . "</a>" . script("qsl('a').onclick = partial(toggle, '$id');", "")
. "$return<div id='$id' class='hidden'>\n$warnings</div>\n"
;
}
return "<p><code class='jush-$jush'>" . h(str_replace("\n", " ", $query)) . "</code> <span class='time'>(" . format_time($start) . ")</span>"
. (support("sql") ? " <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>" : "") . (support("sql") ? " <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>" : "")
. "</p>" // </p> - required for IE9 inline edit . $return
; ;
} }
/** Query printed in SQL command before execution
* @param string query to be executed
* @return string escaped query to be printed
*/
function sqlCommandQuery($query)
{
return shorten_utf8(trim($query), 1000);
}
/** Description of a row in a table /** Description of a row in a table
* @param string * @param string
* @return string SQL expression, empty string for no description * @return string SQL expression, empty string for no description
@@ -228,11 +280,14 @@ username.form['auth[driver]'].onchange();
* @return string * @return string
*/ */
function selectVal($val, $link, $field, $original) { function selectVal($val, $link, $field, $original) {
$return = ($val === null ? "<i>NULL</i>" : (preg_match("~char|binary~", $field["type"]) && !preg_match("~var~", $field["type"]) ? "<code>$val</code>" : $val)); $return = ($val === null ? "<i>NULL</i>" : (preg_match("~char|binary|boolean~", $field["type"]) && !preg_match("~var~", $field["type"]) ? "<code>$val</code>" : $val));
if (preg_match('~blob|bytea|raw|file~', $field["type"]) && !is_utf8($val)) { if (preg_match('~blob|bytea|raw|file~', $field["type"]) && !is_utf8($val)) {
$return = lang('%d byte(s)', strlen($original)); $return = "<i>" . lang('%d byte(s)', strlen($original)) . "</i>";
} }
return ($link ? "<a href='" . h($link) . "'" . (is_url($link) ? " rel='noreferrer'" : "") . ">$return</a>" : $return); if (preg_match('~json~', $field["type"])) {
$return = "<code class='jush-js'>$return</code>";
}
return ($link ? "<a href='" . h($link) . "'" . (is_url($link) ? target_blank() : "") . ">$return</a>" : $return);
} }
/** Value conversion used in select and edit /** Value conversion used in select and edit
@@ -244,6 +299,45 @@ username.form['auth[driver]'].onchange();
return $val; return $val;
} }
/** Print table structure in tabular format
* @param array data about individual fields
* @return null
*/
function tableStructurePrint($fields) {
echo "<table cellspacing='0' class='nowrap'>\n";
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
foreach ($fields as $field) {
echo "<tr" . odd() . "><th>" . h($field["field"]);
echo "<td><span title='" . h($field["collation"]) . "'>" . h($field["full_type"]) . "</span>";
echo ($field["null"] ? " <i>NULL</i>" : "");
echo ($field["auto_increment"] ? " <i>" . lang('Auto Increment') . "</i>" : "");
echo (isset($field["default"]) ? " <span title='" . lang('Default value') . "'>[<b>" . h($field["default"]) . "</b>]</span>" : "");
echo (support("comment") ? "<td>" . nbsp($field["comment"]) : "");
echo "\n";
}
echo "</table>\n";
}
/** Print list of indexes on table in tabular format
* @param array data about all indexes on a table
* @return null
*/
function tableIndexesPrint($indexes) {
echo "<table cellspacing='0'>\n";
foreach ($indexes as $name => $index) {
ksort($index["columns"]); // enforce correct columns order
$print = array();
foreach ($index["columns"] as $key => $val) {
$print[] = "<i>" . h($val) . "</i>"
. ($index["lengths"][$key] ? "(" . $index["lengths"][$key] . ")" : "")
. ($index["descs"][$key] ? " DESC" : "")
;
}
echo "<tr title='" . h($name) . "'><th>$index[type]<td>" . implode(", ", $print) . "\n";
}
echo "</table>\n";
}
/** Print columns box in select /** Print columns box in select
* @param array result of selectColumnsProcess()[0] * @param array result of selectColumnsProcess()[0]
* @param array selectable columns * @param array selectable columns
@@ -256,9 +350,16 @@ username.form['auth[driver]'].onchange();
$select[""] = array(); $select[""] = array();
foreach ($select as $key => $val) { foreach ($select as $key => $val) {
$val = $_GET["columns"][$key]; $val = $_GET["columns"][$key];
$column = select_input(" name='columns[$i][col]' onchange='" . ($key !== "" ? "selectFieldChange(this.form)" : "selectAddRow(this)") . ";'", $columns, $val["col"]); $column = select_input(
echo "<div>" . ($functions || $grouping ? "<select name='columns[$i][fun]' onchange='helpClose();" . ($key !== "" ? "" : " this.nextSibling.nextSibling.onchange();") . "'" " name='columns[$i][col]'",
. on_help("getTarget(event).value && getTarget(event).value.replace(/ |\$/, '(') + ')'", 1) . ">" . optionlist(array(-1 => "") + array_filter(array(lang('Functions') => $functions, lang('Aggregation') => $grouping)), $val["fun"]) . "</select>" $columns,
$val["col"],
($key !== "" ? "selectFieldChange" : "selectAddRow")
);
echo "<div>" . ($functions || $grouping ? "<select name='columns[$i][fun]'>"
. optionlist(array(-1 => "") + array_filter(array(lang('Functions') => $functions, lang('Aggregation') => $grouping)), $val["fun"]) . "</select>"
. on_help("getTarget(event).value && getTarget(event).value.replace(/ |\$/, '(') + ')'", 1)
. script("qsl('select').onchange = function () { helpClose();" . ($key !== "" ? "" : " qsl('select, input', this.parentNode).onchange();") . " };", "")
. "($column)" : $column) . "</div>\n"; . "($column)" : $column) . "</div>\n";
$i++; $i++;
} }
@@ -275,21 +376,27 @@ username.form['auth[driver]'].onchange();
print_fieldset("search", lang('Search'), $where); print_fieldset("search", lang('Search'), $where);
foreach ($indexes as $i => $index) { foreach ($indexes as $i => $index) {
if ($index["type"] == "FULLTEXT") { if ($index["type"] == "FULLTEXT") {
echo "(<i>" . implode("</i>, <i>", array_map('h', $index["columns"])) . "</i>) AGAINST"; echo "<div>(<i>" . implode("</i>, <i>", array_map('h', $index["columns"])) . "</i>) AGAINST";
echo " <input type='search' name='fulltext[$i]' value='" . h($_GET["fulltext"][$i]) . "' onchange='selectFieldChange(this.form);'>"; echo " <input type='search' name='fulltext[$i]' value='" . h($_GET["fulltext"][$i]) . "'>";
echo script("qsl('input').oninput = selectFieldChange;", "");
echo checkbox("boolean[$i]", 1, isset($_GET["boolean"][$i]), "BOOL"); echo checkbox("boolean[$i]", 1, isset($_GET["boolean"][$i]), "BOOL");
echo "<br>\n"; echo "</div>\n";
} }
} }
$_GET["where"] = (array) $_GET["where"]; $change_next = "this.parentNode.firstChild.onchange();";
reset($_GET["where"]); foreach (array_merge((array) $_GET["where"], array(array())) as $i => $val) {
$change_next = "this.nextSibling.onchange();";
for ($i = 0; $i <= count($_GET["where"]); $i++) {
list(, $val) = each($_GET["where"]);
if (!$val || ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators))) { if (!$val || ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators))) {
echo "<div>" . select_input(" name='where[$i][col]' onchange='$change_next'", $columns, $val["col"], "(" . lang('anywhere') . ")"); echo "<div>" . select_input(
" name='where[$i][col]'",
$columns,
$val["col"],
($val ? "selectFieldChange" : "selectAddRow"),
"(" . lang('anywhere') . ")"
);
echo html_select("where[$i][op]", $this->operators, $val["op"], $change_next); echo html_select("where[$i][op]", $this->operators, $val["op"], $change_next);
echo "<input type='search' name='where[$i][val]' value='" . h($val["val"]) . "' onchange='" . ($val ? "selectFieldChange(this.form)" : "selectAddRow(this)") . ";' onkeydown='selectSearchKeydown(this, event);' onsearch='selectSearchSearch(this);'></div>\n"; echo "<input type='search' name='where[$i][val]' value='" . h($val["val"]) . "'>";
echo script("mixin(qsl('input'), {oninput: function () { $change_next }, onkeydown: selectSearchKeydown, onsearch: selectSearchSearch});", "");
echo "</div>\n";
} }
} }
echo "</div></fieldset>\n"; echo "</div></fieldset>\n";
@@ -306,12 +413,12 @@ username.form['auth[driver]'].onchange();
$i = 0; $i = 0;
foreach ((array) $_GET["order"] as $key => $val) { foreach ((array) $_GET["order"] as $key => $val) {
if ($val != "") { if ($val != "") {
echo "<div>" . select_input(" name='order[$i]' onchange='selectFieldChange(this.form);'", $columns, $val); echo "<div>" . select_input(" name='order[$i]'", $columns, $val, "selectFieldChange");
echo checkbox("desc[$i]", 1, isset($_GET["desc"][$key]), lang('descending')) . "</div>\n"; echo checkbox("desc[$i]", 1, isset($_GET["desc"][$key]), lang('descending')) . "</div>\n";
$i++; $i++;
} }
} }
echo "<div>" . select_input(" name='order[$i]' onchange='selectAddRow(this);'", $columns); echo "<div>" . select_input(" name='order[$i]'", $columns, "", "selectAddRow");
echo checkbox("desc[$i]", 1, false, lang('descending')) . "</div>\n"; echo checkbox("desc[$i]", 1, false, lang('descending')) . "</div>\n";
echo "</div></fieldset>\n"; echo "</div></fieldset>\n";
} }
@@ -322,7 +429,8 @@ username.form['auth[driver]'].onchange();
*/ */
function selectLimitPrint($limit) { function selectLimitPrint($limit) {
echo "<fieldset><legend>" . lang('Limit') . "</legend><div>"; // <div> for easy styling echo "<fieldset><legend>" . lang('Limit') . "</legend><div>"; // <div> for easy styling
echo "<input type='number' name='limit' class='size' value='" . h($limit) . "' onchange='selectFieldChange(this.form);'>"; echo "<input type='number' name='limit' class='size' value='" . h($limit) . "'>";
echo script("qsl('input').oninput = selectFieldChange;", "");
echo "</div></fieldset>\n"; echo "</div></fieldset>\n";
} }
@@ -346,12 +454,13 @@ username.form['auth[driver]'].onchange();
echo "<fieldset><legend>" . lang('Action') . "</legend><div>"; echo "<fieldset><legend>" . lang('Action') . "</legend><div>";
echo "<input type='submit' value='" . lang('Select') . "'>"; echo "<input type='submit' value='" . lang('Select') . "'>";
echo " <span id='noindex' title='" . lang('Full table scan') . "'></span>"; echo " <span id='noindex' title='" . lang('Full table scan') . "'></span>";
echo "<script type='text/javascript'>\n"; echo "<script" . nonce() . ">\n";
echo "var indexColumns = "; echo "var indexColumns = ";
$columns = array(); $columns = array();
foreach ($indexes as $index) { foreach ($indexes as $index) {
if ($index["type"] != "FULLTEXT") { $current_key = reset($index["columns"]);
$columns[reset($index["columns"])] = 1; if ($index["type"] != "FULLTEXT" && $current_key) {
$columns[$current_key] = 1;
} }
} }
$columns[""] = 1; $columns[""] = 1;
@@ -359,7 +468,7 @@ username.form['auth[driver]'].onchange();
json_row($key); json_row($key);
} }
echo ";\n"; echo ";\n";
echo "selectFieldChange(document.getElementById('form'));\n"; echo "selectFieldChange.call(qs('#form')['select']);\n";
echo "</script>\n"; echo "</script>\n";
echo "</div></fieldset>\n"; echo "</div></fieldset>\n";
} }
@@ -412,15 +521,16 @@ username.form['auth[driver]'].onchange();
* @return array expressions to join by AND * @return array expressions to join by AND
*/ */
function selectSearchProcess($fields, $indexes) { function selectSearchProcess($fields, $indexes) {
global $connection, $jush; global $connection, $driver;
$return = array(); $return = array();
foreach ($indexes as $i => $index) { foreach ($indexes as $i => $index) {
if ($index["type"] == "FULLTEXT" && $_GET["fulltext"][$i] != "") { if ($index["type"] == "FULLTEXT" && $_GET["fulltext"][$i] != "") {
$return[] = "MATCH (" . implode(", ", array_map('idf_escape', $index["columns"])) . ") AGAINST (" . q($_GET["fulltext"][$i]) . (isset($_GET["boolean"][$i]) ? " IN BOOLEAN MODE" : "") . ")"; $return[] = "MATCH (" . implode(", ", array_map('idf_escape', $index["columns"])) . ") AGAINST (" . q($_GET["fulltext"][$i]) . (isset($_GET["boolean"][$i]) ? " IN BOOLEAN MODE" : "") . ")";
} }
} }
foreach ((array) $_GET["where"] as $val) { foreach ((array) $_GET["where"] as $key => $val) {
if ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators)) { if ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators)) {
$prefix = "";
$cond = " $val[op]"; $cond = " $val[op]";
if (preg_match('~IN$~', $val["op"])) { if (preg_match('~IN$~', $val["op"])) {
$in = process_length($val["val"]); $in = process_length($val["val"]);
@@ -431,24 +541,25 @@ username.form['auth[driver]'].onchange();
$cond = " LIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%"); $cond = " LIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%");
} elseif ($val["op"] == "ILIKE %%") { } elseif ($val["op"] == "ILIKE %%") {
$cond = " ILIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%"); $cond = " ILIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%");
} elseif ($val["op"] == "FIND_IN_SET") {
$prefix = "$val[op](" . q($val["val"]) . ", ";
$cond = ")";
} elseif (!preg_match('~NULL$~', $val["op"])) { } elseif (!preg_match('~NULL$~', $val["op"])) {
$cond .= " " . $this->processInput($fields[$val["col"]], $val["val"]); $cond .= " " . $this->processInput($fields[$val["col"]], $val["val"]);
} }
if ($val["col"] != "") { if ($val["col"] != "") {
$return[] = idf_escape($val["col"]) . $cond; $return[] = $prefix . $driver->convertSearch(idf_escape($val["col"]), $val, $fields[$val["col"]]) . $cond;
} else { } else {
// find anywhere // find anywhere
$cols = array(); $cols = array();
foreach ($fields as $name => $field) { foreach ($fields as $name => $field) {
$is_text = preg_match('~char|text|enum|set~', $field["type"]); if ((is_numeric($val["val"]) || !preg_match('~' . number_type() . '|bit~', $field["type"]))
if ((is_numeric($val["val"]) || !preg_match('~(^|[^o])int|float|double|decimal|bit~', $field["type"])) && (!preg_match("~[\x80-\xFF]~", $val["val"]) || preg_match('~char|text|enum|set~', $field["type"]))
&& (!preg_match("~[\x80-\xFF]~", $val["val"]) || $is_text)
) { ) {
$name = idf_escape($name); $cols[] = $prefix . $driver->convertSearch(idf_escape($name), $val, $field) . $cond;
$cols[] = ($jush == "sql" && $is_text && !preg_match("~^utf8_~", $field["collation"]) ? "CONVERT($name USING " . charset($connection) . ")" : $name);
} }
} }
$return[] = ($cols ? "(" . implode("$cond OR ", $cols) . "$cond)" : "0"); $return[] = ($cols ? "(" . implode(" OR ", $cols) . ")" : "1 = 0");
} }
} }
} }
@@ -511,19 +622,28 @@ username.form['auth[driver]'].onchange();
/** Query printed after execution in the message /** Query printed after execution in the message
* @param string executed query * @param string executed query
* @param string elapsed time * @param string elapsed time
* @param bool
* @return string * @return string
*/ */
function messageQuery($query, $time) { function messageQuery($query, $time, $failed = false) {
global $jush; global $jush, $driver;
restart_session(); restart_session();
$history = &get_session("queries"); $history = &get_session("queries");
$id = "sql-" . count($history[$_GET["db"]]); if (!$history[$_GET["db"]]) {
$history[$_GET["db"]] = array();
}
if (strlen($query) > 1e6) { if (strlen($query) > 1e6) {
$query = preg_replace('~[\x80-\xFF]+$~', '', substr($query, 0, 1e6)) . "\n..."; // [\x80-\xFF] - valid UTF-8, \n - can end by one-line comment $query = preg_replace('~[\x80-\xFF]+$~', '', substr($query, 0, 1e6)) . "\n..."; // [\x80-\xFF] - valid UTF-8, \n - can end by one-line comment
} }
$history[$_GET["db"]][] = array($query, time(), $time); // not DB - $_GET["db"] is changed in database.inc.php //! respect $_GET["ns"] $history[$_GET["db"]][] = array($query, time(), $time); // not DB - $_GET["db"] is changed in database.inc.php //! respect $_GET["ns"]
return " <span class='time'>" . @date("H:i:s") . "</span> <a href='#$id' onclick=\"return !toggle('$id');\">" . lang('SQL command') . "</a>" // @ - time zone may be not set $sql_id = "sql-" . count($history[$_GET["db"]]);
. "<div id='$id' class='hidden'><pre><code class='jush-$jush'>" . shorten_utf8($query, 1000) . '</code></pre>' $return = "<a href='#$sql_id' class='toggle'>" . lang('SQL command') . "</a>\n";
if (!$failed && ($warnings = $driver->warnings())) {
$id = "warnings-" . count($history[$_GET["db"]]);
$return = "<a href='#$id' class='toggle'>" . lang('Warnings') . "</a>, $return<div id='$id' class='hidden'>\n$warnings</div>\n";
}
return " <span class='time'>" . @date("H:i:s") . "</span>" // @ - time zone may be not set
. " $return<div id='$sql_id' class='hidden'><pre><code class='jush-$jush'>" . shorten_utf8($query, 1000) . "</code></pre>"
. ($time ? " <span class='time'>($time)</span>" : '') . ($time ? " <span class='time'>($time)</span>" : '')
. (support("sql") ? '<p><a href="' . h(str_replace("db=" . urlencode(DB), "db=" . urlencode($_GET["db"]), ME) . 'sql=&history=' . (count($history[$_GET["db"]]) - 1)) . '">' . lang('Edit') . '</a>' : '') . (support("sql") ? '<p><a href="' . h(str_replace("db=" . urlencode(DB), "db=" . urlencode($_GET["db"]), ME) . 'sql=&history=' . (count($history[$_GET["db"]]) - 1)) . '">' . lang('Edit') . '</a>' : '')
. '</div>' . '</div>'
@@ -572,6 +692,16 @@ username.form['auth[driver]'].onchange();
return ""; return "";
} }
/** Get hint for edit field
* @param string table name
* @param array single field from fields()
* @param string
* @return string
*/
function editHint($table, $field, $value) {
return "";
}
/** Process sent input /** Process sent input
* @param array single field from fields() * @param array single field from fields()
* @param string * @param string
@@ -591,7 +721,7 @@ username.form['auth[driver]'].onchange();
} elseif (preg_match('~^([+-]|\\|\\|)$~', $function)) { } elseif (preg_match('~^([+-]|\\|\\|)$~', $function)) {
$return = idf_escape($name) . " $function $return"; $return = idf_escape($name) . " $function $return";
} elseif (preg_match('~^[+-] interval$~', $function)) { } elseif (preg_match('~^[+-] interval$~', $function)) {
$return = idf_escape($name) . " $function " . (preg_match("~^(\\d+|'[0-9.: -]') [A-Z_]+$~i", $value) ? $value : $return); $return = idf_escape($name) . " $function " . (preg_match("~^(\\d+|'[0-9.: -]') [A-Z_]+\$~i", $value) ? $value : $return);
} elseif (preg_match('~^(addtime|subtime|concat)$~', $function)) { } elseif (preg_match('~^(addtime|subtime|concat)$~', $function)) {
$return = "$function(" . idf_escape($name) . ", $return)"; $return = "$function(" . idf_escape($name) . ", $return)";
} elseif (preg_match('~^(md5|sha1|password|encrypt)$~', $function)) { } elseif (preg_match('~^(md5|sha1|password|encrypt)$~', $function)) {
@@ -645,7 +775,7 @@ username.form['auth[driver]'].onchange();
} }
$create = "CREATE TABLE " . table($table) . " (" . implode(", ", $fields) . ")"; $create = "CREATE TABLE " . table($table) . " (" . implode(", ", $fields) . ")";
} else { } else {
$create = create_sql($table, $_POST["auto_increment"]); $create = create_sql($table, $_POST["auto_increment"], $style);
} }
set_utf8mb4($create); set_utf8mb4($create);
if ($style && $create) { if ($style && $create) {
@@ -707,7 +837,7 @@ username.form['auth[driver]'].onchange();
foreach ($row as $key => $val) { foreach ($row as $key => $val) {
$field = $fields[$key]; $field = $fields[$key];
$row[$key] = ($val !== null $row[$key] = ($val !== null
? unconvert_field($field, preg_match('~(^|[^o])int|float|double|decimal~', $field["type"]) && $val != '' ? $val : q($val)) ? unconvert_field($field, preg_match(number_type(), $field["type"]) && $val != '' ? $val : q($val))
: "NULL" : "NULL"
); );
} }
@@ -758,6 +888,13 @@ username.form['auth[driver]'].onchange();
return $ext; return $ext;
} }
/** Set the path of the file for webserver load
* @return string path of the sql dump file
*/
function importServerPath() {
return "adminer.sql";
}
/** Print homepage /** Print homepage
* @return bool whether to print default homepage * @return bool whether to print default homepage
*/ */
@@ -778,7 +915,7 @@ username.form['auth[driver]'].onchange();
?> ?>
<h1> <h1>
<?php echo $this->name(); ?> <span class="version"><?php echo $VERSION; ?></span> <?php echo $this->name(); ?> <span class="version"><?php echo $VERSION; ?></span>
<a href="http://www.adminer.org/#download" target="_blank" id="version"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?></a> <a href="https://www.adminer.org/#download"<?php echo target_blank(); ?> id="version"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?></a>
</h1> </h1>
<?php <?php
if ($missing == "auth") { if ($missing == "auth") {
@@ -788,12 +925,12 @@ username.form['auth[driver]'].onchange();
foreach ($usernames as $username => $password) { foreach ($usernames as $username => $password) {
if ($password !== null) { if ($password !== null) {
if ($first) { if ($first) {
echo "<p id='logins' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n"; echo "<p id='logins'>" . script("mixin(qs('#logins'), {onmouseover: menuOver, onmouseout: menuOut});");
$first = false; $first = false;
} }
$dbs = $_SESSION["db"][$vendor][$server][$username]; $dbs = $_SESSION["db"][$vendor][$server][$username];
foreach (($dbs ? array_keys($dbs) : array("")) as $db) { foreach (($dbs ? array_keys($dbs) : array("")) as $db) {
echo "<a href='" . h(auth_url($vendor, $server, $username, $db)) . "'>($drivers[$vendor]) " . h($username . ($server != "" ? "@$server" : "") . ($db != "" ? " - $db" : "")) . "</a><br>\n"; echo "<a href='" . h(auth_url($vendor, $server, $username, $db)) . "'>($drivers[$vendor]) " . h($username . ($server != "" ? "@" . $this->serverName($server) : "") . ($db != "" ? " - $db" : "")) . "</a><br>\n";
} }
} }
} }
@@ -804,13 +941,14 @@ username.form['auth[driver]'].onchange();
$connection->select_db(DB); $connection->select_db(DB);
$tables = table_status('', true); $tables = table_status('', true);
} }
echo script_src("../externals/jush/modules/jush.js");
echo script_src("../externals/jush/modules/jush-textarea.js");
echo script_src("../externals/jush/modules/jush-txt.js");
echo script_src("../externals/jush/modules/jush-js.js");
if (support("sql")) { if (support("sql")) {
echo script_src("../externals/jush/modules/jush-$jush.js");
?> ?>
<script type="text/javascript" src="../externals/jush/modules/jush.js"></script> <script<?php echo nonce(); ?>>
<script type="text/javascript" src="../externals/jush/modules/jush-textarea.js"></script>
<script type="text/javascript" src="../externals/jush/modules/jush-txt.js"></script>
<script type="text/javascript" src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>
<script type="text/javascript">
<?php <?php
if ($tables) { if ($tables) {
$links = array(); $links = array();
@@ -822,8 +960,9 @@ username.form['auth[driver]'].onchange();
echo "jushLinks.$val = jushLinks.$jush;\n"; echo "jushLinks.$val = jushLinks.$jush;\n";
} }
} }
$server_info = $connection->server_info;
?> ?>
bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>'); bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\\d\\.?\\d).*~s', '\\1', $server_info) : ""); ?>'<?php echo (preg_match('~MariaDB~', $server_info) ? ", true" : ""); ?>);
</script> </script>
<?php <?php
} }
@@ -857,15 +996,15 @@ bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info,
<p id="dbs"> <p id="dbs">
<?php <?php
hidden_fields_get(); hidden_fields_get();
$db_events = " onmousedown='dbMouseDown(event, this);' onchange='dbChange(this);'"; $db_events = script("mixin(qsl('select'), {onmousedown: dbMouseDown, onchange: dbChange});");
echo "<span title='" . lang('database') . "'>DB</span>: " . ($databases echo "<span title='" . lang('database') . "'>" . lang('DB') . "</span>: " . ($databases
? "<select name='db'$db_events>" . optionlist(array("" => "") + $databases, DB) . "</select>" ? "<select name='db'>" . optionlist(array("" => "") + $databases, DB) . "</select>$db_events"
: '<input name="db" value="' . h(DB) . '" autocapitalize="off">' : "<input name='db' value='" . h(DB) . "' autocapitalize='off'>\n"
); );
echo "<input type='submit' value='" . lang('Use') . "'" . ($databases ? " class='hidden'" : "") . ">\n"; echo "<input type='submit' value='" . lang('Use') . "'" . ($databases ? " class='hidden'" : "") . ">\n";
if ($missing != "db" && DB != "" && $connection->select_db(DB)) { if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
if (support("scheme")) { if (support("scheme")) {
echo "<br>" . lang('Schema') . ": <select name='ns'$db_events>" . optionlist(array("" => "") + $adminer->schemas(), $_GET["ns"]) . "</select>"; echo "<br>" . lang('Schema') . ": <select name='ns'>" . optionlist(array("" => "") + $adminer->schemas(), $_GET["ns"]) . "</select>$db_events";
if ($_GET["ns"] != "") { if ($_GET["ns"] != "") {
set_schema($_GET["ns"]); set_schema($_GET["ns"]);
} }
@@ -884,17 +1023,20 @@ bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info,
* @return null * @return null
*/ */
function tablesPrint($tables) { function tablesPrint($tables) {
echo "<p id='tables' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n"; echo "<ul id='tables'>" . script("mixin(qs('#tables'), {onmouseover: menuOver, onmouseout: menuOut});");
foreach ($tables as $table => $status) { foreach ($tables as $table => $status) {
echo '<a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table || $_GET["edit"] == $table, "select") . ">" . lang('select') . "</a> ";
$name = $this->tableName($status); $name = $this->tableName($status);
echo (support("table") || support("indexes") if ($name != "") {
? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"' echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table || $_GET["edit"] == $table, "select") . ">" . lang('select') . "</a> ";
. bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"])), (is_view($status) ? "view" : ""), "structure") echo (support("table") || support("indexes")
. " title='" . lang('Show structure') . "'>$name</a>" ? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"'
: "<span>$name</span>" . bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"])), (is_view($status) ? "view" : "structure"))
) . "<br>\n"; . " title='" . lang('Show structure') . "'>$name</a>"
: "<span>$name</span>"
) . "\n";
}
} }
echo "</ul>\n";
} }
} }

View File

@@ -17,15 +17,10 @@ if ($_COOKIE["adminer_permanent"]) {
function add_invalid_login() { function add_invalid_login() {
global $adminer; global $adminer;
$filename = get_temp_dir() . "/adminer.invalid"; $fp = file_open_lock(get_temp_dir() . "/adminer.invalid");
$fp = @fopen($filename, "r+"); // @ - may not exist if (!$fp) {
if (!$fp) { // c+ is available since PHP 5.2.6 return;
$fp = @fopen($filename, "w"); // @ - may not be writable
if (!$fp) {
return;
}
} }
flock($fp, LOCK_EX);
$invalids = unserialize(stream_get_contents($fp)); $invalids = unserialize(stream_get_contents($fp));
$time = time(); $time = time();
if ($invalids) { if ($invalids) {
@@ -40,22 +35,21 @@ function add_invalid_login() {
$invalid = array($time + 30*60, 0); // active for 30 minutes $invalid = array($time + 30*60, 0); // active for 30 minutes
} }
$invalid[1]++; $invalid[1]++;
$serialized = serialize($invalids); file_write_unlock($fp, serialize($invalids));
rewind($fp); }
fwrite($fp, $serialized);
ftruncate($fp, strlen($serialized)); function check_invalid_login() {
flock($fp, LOCK_UN); global $adminer;
fclose($fp); $invalids = unserialize(@file_get_contents(get_temp_dir() . "/adminer.invalid")); // @ - may not exist
$invalid = $invalids[$adminer->bruteForceKey()];
$next_attempt = ($invalid[1] > 29 ? $invalid[0] - time() : 0); // allow 30 invalid attempts
if ($next_attempt > 0) { //! do the same with permanent login
auth_error(lang('Too many unsuccessful logins, try again in %d minute(s).', ceil($next_attempt / 60)));
}
} }
$auth = $_POST["auth"]; $auth = $_POST["auth"];
if ($auth) { if ($auth) {
$invalids = unserialize(@file_get_contents(get_temp_dir() . "/adminer.invalid")); // @ - may not exist
$invalid = $invalids[$adminer->bruteForceKey()];
$next_attempt = ($invalid[1] > 30 ? $invalid[0] - time() : 0); // allow 30 invalid attempts
if ($next_attempt > 0) { //! do the same with permanent login
auth_error(lang('Too many unsuccessful logins, try again in %d minute(s).', ceil($next_attempt / 60)));
}
session_regenerate_id(); // defense against session fixation session_regenerate_id(); // defense against session fixation
$vendor = $auth["driver"]; $vendor = $auth["driver"];
$server = $auth["server"]; $server = $auth["server"];
@@ -89,7 +83,7 @@ if ($auth) {
set_session($key, null); set_session($key, null);
} }
unset_permanent(); unset_permanent();
redirect(substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1), lang('Logout successful.')); redirect(substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1), lang('Logout successful.') . ' ' . lang('Thanks for using Adminer, consider <a href="%s">donating</a>.', 'https://sourceforge.net/donate/index.php?group_id=264133'));
} }
} elseif ($permanent && !$_SESSION["pwds"]) { } elseif ($permanent && !$_SESSION["pwds"]) {
@@ -120,7 +114,6 @@ function unset_permanent() {
*/ */
function auth_error($error) { function auth_error($error) {
global $adminer, $has_token; global $adminer, $has_token;
$error = h($error);
$session_name = session_name(); $session_name = session_name();
if (isset($_GET["username"])) { if (isset($_GET["username"])) {
header("HTTP/1.1 403 Forbidden"); // 401 requires sending WWW-Authenticate header header("HTTP/1.1 403 Forbidden"); // 401 requires sending WWW-Authenticate header
@@ -131,7 +124,7 @@ function auth_error($error) {
$password = get_password(); $password = get_password();
if ($password !== null) { if ($password !== null) {
if ($password === false) { if ($password === false) {
$error .= '<br>' . lang('Master password expired. <a href="http://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.', '<code>permanentLogin()</code>'); $error .= '<br>' . lang('Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.', target_blank(), '<code>permanentLogin()</code>');
} }
set_password(DRIVER, SERVER, $_GET["username"], null); set_password(DRIVER, SERVER, $_GET["username"], null);
} }
@@ -145,10 +138,12 @@ function auth_error($error) {
cookie("adminer_key", ($_COOKIE["adminer_key"] ? $_COOKIE["adminer_key"] : rand_string()), $params["lifetime"]); cookie("adminer_key", ($_COOKIE["adminer_key"] ? $_COOKIE["adminer_key"] : rand_string()), $params["lifetime"]);
page_header(lang('Login'), $error, null); page_header(lang('Login'), $error, null);
echo "<form action='' method='post'>\n"; echo "<form action='' method='post'>\n";
$adminer->loginForm();
echo "<div>"; echo "<div>";
hidden_fields($_POST, array("auth")); // expired session if (hidden_fields($_POST, array("auth"))) { // expired session
echo "<p class='message'>" . lang('The action will be performed after successful login with the same credentials.') . "\n";
}
echo "</div>\n"; echo "</div>\n";
$adminer->loginForm();
echo "</form>\n"; echo "</form>\n";
page_footer("auth"); page_footer("auth");
exit; exit;
@@ -162,13 +157,18 @@ if (isset($_GET["username"])) {
page_footer("auth"); page_footer("auth");
exit; exit;
} }
list($host, $port) = explode(":", SERVER, 2);
if (is_numeric($port) && $port < 1024) {
auth_error(lang('Connecting to privileged ports is not allowed.'));
}
check_invalid_login();
$connection = connect(); $connection = connect();
$driver = new Min_Driver($connection);
} }
$driver = new Min_Driver($connection); $login = null;
if (!is_object($connection) || ($login = $adminer->login($_GET["username"], get_password())) !== true) {
if (!is_object($connection) || !$adminer->login($_GET["username"], get_password())) { auth_error((is_string($connection) ? h($connection) : (is_string($login) ? $login : lang('Invalid credentials.'))));
auth_error((is_string($connection) ? $connection : lang('Invalid credentials.')));
} }
if ($auth && $_POST["token"]) { if ($auth && $_POST["token"]) {

View File

@@ -18,12 +18,20 @@ if (function_exists("mb_internal_encoding")) {
mb_internal_encoding("8bit"); mb_internal_encoding("8bit");
} }
include "../adminer/include/functions.inc.php";
// used only in compiled file // used only in compiled file
if (isset($_GET["file"])) { if (isset($_GET["file"])) {
include "../adminer/file.inc.php"; include "../adminer/file.inc.php";
} }
include "../adminer/include/functions.inc.php"; if ($_GET["script"] == "version") {
$fp = file_open_lock(get_temp_dir() . "/adminer.version");
if ($fp) {
file_write_unlock($fp, serialize(array("signature" => $_POST["signature"], "version" => $_POST["version"])));
}
exit;
}
global $adminer, $connection, $drivers, $edit_functions, $enum_length, $error, $functions, $grouping, $HTTPS, $inout, $jush, $LANG, $langs, $on_actions, $permanent, $structured_types, $has_token, $token, $translations, $types, $unsigned, $VERSION; // allows including Adminer inside a function global $adminer, $connection, $drivers, $edit_functions, $enum_length, $error, $functions, $grouping, $HTTPS, $inout, $jush, $LANG, $langs, $on_actions, $permanent, $structured_types, $has_token, $token, $translations, $types, $unsigned, $VERSION; // allows including Adminer inside a function
@@ -33,11 +41,14 @@ if (!$_SERVER["REQUEST_URI"]) { // IIS 5 compatibility
if (!strpos($_SERVER["REQUEST_URI"], '?') && $_SERVER["QUERY_STRING"] != "") { // IIS 7 compatibility if (!strpos($_SERVER["REQUEST_URI"], '?') && $_SERVER["QUERY_STRING"] != "") { // IIS 7 compatibility
$_SERVER["REQUEST_URI"] .= "?$_SERVER[QUERY_STRING]"; $_SERVER["REQUEST_URI"] .= "?$_SERVER[QUERY_STRING]";
} }
if ($_SERVER["HTTP_X_FORWARDED_PREFIX"]) {
$_SERVER["REQUEST_URI"] = $_SERVER["HTTP_X_FORWARDED_PREFIX"] . $_SERVER["REQUEST_URI"];
}
$HTTPS = $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off"); $HTTPS = $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off");
@ini_set("session.use_trans_sid", false); // protect links in export, @ - may be disabled @ini_set("session.use_trans_sid", false); // protect links in export, @ - may be disabled
session_cache_limiter(""); // to allow restarting session and to not send Cache-Control: no-store
if (!defined("SID")) { if (!defined("SID")) {
session_cache_limiter(""); // to allow restarting session
session_name("adminer_sid"); // use specific session name to get own namespace session_name("adminer_sid"); // use specific session name to get own namespace
$params = array(0, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), "", $HTTPS); $params = array(0, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), "", $HTTPS);
if (version_compare(PHP_VERSION, '5.2.0') >= 0) { if (version_compare(PHP_VERSION, '5.2.0') >= 0) {
@@ -54,7 +65,7 @@ if (get_magic_quotes_runtime()) {
} }
@set_time_limit(0); // @ - can be disabled @set_time_limit(0); // @ - can be disabled
@ini_set("zend.ze1_compatibility_mode", false); // @ - deprecated @ini_set("zend.ze1_compatibility_mode", false); // @ - deprecated
@ini_set("precision", 20); // @ - can be disabled @ini_set("precision", 15); // @ - can be disabled, 15 - internal PHP precision
include "../adminer/include/lang.inc.php"; include "../adminer/include/lang.inc.php";
include "../adminer/lang/$LANG.inc.php"; include "../adminer/lang/$LANG.inc.php";

View File

@@ -12,7 +12,7 @@ function connect_error() {
page_header(lang('Select database'), $error, false); page_header(lang('Select database'), $error, false);
echo "<p class='links'>\n"; echo "<p class='links'>\n";
foreach (array( foreach (array(
'database' => lang('Create new database'), 'database' => lang('Create database'),
'privileges' => lang('Privileges'), 'privileges' => lang('Privileges'),
'processlist' => lang('Process list'), 'processlist' => lang('Process list'),
'variables' => lang('Variables'), 'variables' => lang('Variables'),
@@ -29,13 +29,14 @@ function connect_error() {
$scheme = support("scheme"); $scheme = support("scheme");
$collations = collations(); $collations = collations();
echo "<form action='' method='post'>\n"; echo "<form action='' method='post'>\n";
echo "<table cellspacing='0' class='checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n"; echo "<table cellspacing='0' class='checkable'>\n";
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
echo "<thead><tr>" echo "<thead><tr>"
. (support("database") ? "<td>&nbsp;" : "") . (support("database") ? "<td>&nbsp;" : "")
. "<th>" . lang('Database') . " - <a href='" . h(ME) . "refresh=1'>" . lang('Refresh') . "</a>" . "<th>" . lang('Database') . " - <a href='" . h(ME) . "refresh=1'>" . lang('Refresh') . "</a>"
. "<td>" . lang('Collation') . "<td>" . lang('Collation')
. "<td>" . lang('Tables') . "<td>" . lang('Tables')
. "<td>" . lang('Size') . " - <a href='" . h(ME) . "dbsize=1' onclick=\"return !ajaxSetHtml('" . js_escape(ME) . "script=connect');\">" . lang('Compute') . "</a>" . "<td>" . lang('Size') . " - <a href='" . h(ME) . "dbsize=1'>" . lang('Compute') . "</a>" . script("qsl('a').onclick = partial(ajaxSetHtml, '" . js_escape(ME) . "script=connect');", "")
. "</thead>\n" . "</thead>\n"
; ;
@@ -43,8 +44,9 @@ function connect_error() {
foreach ($databases as $db => $tables) { foreach ($databases as $db => $tables) {
$root = h(ME) . "db=" . urlencode($db); $root = h(ME) . "db=" . urlencode($db);
echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"])) : ""); $id = h("Db-" . $db);
echo "<th><a href='$root'>" . h($db) . "</a>"; echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]), "", "", "", $id) : "");
echo "<th><a href='$root' id='$id'>" . h($db) . "</a>";
$collation = nbsp(db_collation($db, $collations)); $collation = nbsp(db_collation($db, $collations));
echo "<td>" . (support("database") ? "<a href='$root" . ($scheme ? "&amp;ns=" : "") . "&amp;database=' title='" . lang('Alter database') . "'>$collation</a>" : $collation); echo "<td>" . (support("database") ? "<a href='$root" . ($scheme ? "&amp;ns=" : "") . "&amp;database=' title='" . lang('Alter database') . "'>$collation</a>" : $collation);
echo "<td align='right'><a href='$root&amp;schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>" . ($_GET["dbsize"] ? $tables : "?") . "</a>"; echo "<td align='right'><a href='$root&amp;schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>" . ($_GET["dbsize"] ? $tables : "?") . "</a>";
@@ -54,15 +56,17 @@ function connect_error() {
echo "</table>\n"; echo "</table>\n";
echo (support("database") echo (support("database")
? "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>\n" ? "<div class='footer'><div>\n"
. "<input type='hidden' name='all' value='' onclick=\"selectCount('selected', formChecked(this, /^db/));\">\n" // used by trCheck() . "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>\n"
. "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n" . "<input type='hidden' name='all' value=''>" . script("qsl('input').onclick = function () { selectCount('selected', formChecked(this, /^db/)); };") // used by trCheck()
. "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm() . "\n"
. "</div></fieldset>\n" . "</div></fieldset>\n"
. "</div></div>\n"
: "" : ""
); );
echo "<script type='text/javascript'>tableCheck();</script>\n";
echo "<input type='hidden' name='token' value='$token'>\n"; echo "<input type='hidden' name='token' value='$token'>\n";
echo "</form>\n"; echo "</form>\n";
echo script("tableCheck();");
} }
} }

View File

@@ -19,28 +19,50 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?php echo $LANG; ?>" dir="<?php echo lang('ltr'); ?>"> <html lang="<?php echo $LANG; ?>" dir="<?php echo lang('ltr'); ?>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="robots" content="noindex"> <meta name="robots" content="noindex">
<meta name="referrer" content="origin-when-crossorigin">
<title><?php echo $title_page; ?></title> <title><?php echo $title_page; ?></title>
<link rel="stylesheet" type="text/css" href="../adminer/static/default.css"> <link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
<script type="text/javascript" src="../adminer/static/functions.js"></script> <?php echo script_src("../adminer/static/functions.js"); ?>
<script type="text/javascript" src="static/editing.js"></script> <?php echo script_src("static/editing.js"); ?>
<?php if ($adminer->head()) { ?> <?php if ($adminer->head()) { ?>
<link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico"> <link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico">
<link rel="apple-touch-icon" href="../adminer/static/favicon.ico"> <link rel="apple-touch-icon" href="../adminer/static/favicon.ico">
<?php if (file_exists("adminer.css")) { ?> <?php foreach ($adminer->css() as $css) { ?>
<link rel="stylesheet" type="text/css" href="adminer.css"> <link rel="stylesheet" type="text/css" href="<?php echo h($css); ?>">
<?php } ?> <?php } ?>
<?php } ?> <?php } ?>
<body class="<?php echo lang('ltr'); ?> nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);"<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " onload=\"verifyVersion('$VERSION');\""); ?>> <body class="<?php echo lang('ltr'); ?> nojs">
<script type="text/javascript"> <?php
$filename = get_temp_dir() . "/adminer.version";
if (!$_COOKIE["adminer_version"] && function_exists('openssl_verify') && file_exists($filename) && filemtime($filename) + 86400 > time()) { // 86400 - 1 day in seconds
$version = unserialize(file_get_contents($filename));
$public = "-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwqWOVuF5uw7/+Z70djoK
RlHIZFZPO0uYRezq90+7Amk+FDNd7KkL5eDve+vHRJBLAszF/7XKXe11xwliIsFs
DFWQlsABVZB3oisKCBEuI71J4kPH8dKGEWR9jDHFw3cWmoH3PmqImX6FISWbG3B8
h7FIx3jEaw5ckVPVTeo5JRm/1DZzJxjyDenXvBQ/6o9DgZKeNDgxwKzH+sw9/YCO
jHnq1cFpOIISzARlrHMa/43YfeNRAm/tsBXjSxembBPo7aQZLAWHmaj5+K19H10B
nCpz9Y++cipkVEiKRGih4ZEvjoFysEOdRLj6WiD/uUNky4xGeA6LaJqh5XpkFkcQ
fQIDAQAB
-----END PUBLIC KEY-----
";
if (openssl_verify($version["version"], base64_decode($version["signature"]), $public) == 1) {
$_COOKIE["adminer_version"] = $version["version"]; // doesn't need to send to the browser
}
}
?>
<script<?php echo nonce(); ?>>
mixin(document.body, {onkeydown: bodyKeydown, onclick: bodyClick<?php
echo (isset($_COOKIE["adminer_version"]) ? "" : ", onload: partial(verifyVersion, '$VERSION', '" . js_escape(ME) . "', '" . get_token() . "')"); // $token may be empty in auth.inc.php
?>});
document.body.className = document.body.className.replace(/ nojs/, ' js'); document.body.className = document.body.className.replace(/ nojs/, ' js');
var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>'; var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
var thousandsSeparator = '<?php echo js_escape(lang(',')); ?>';
</script> </script>
<div id="help" class="jush-<?php echo $jush; ?> jsonly hidden" onmouseover="helpOpen = 1;" onmouseout="helpMouseout(this, event);"></div> <div id="help" class="jush-<?php echo $jush; ?> jsonly hidden"></div>
<?php echo script("mixin(qs('#help'), {onmouseover: function () { helpOpen = 1; }, onmouseout: helpMouseout});"); ?>
<div id="content"> <div id="content">
<?php <?php
@@ -48,7 +70,8 @@ var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
$link = substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1); $link = substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1);
echo '<p id="breadcrumb"><a href="' . h($link ? $link : ".") . '">' . $drivers[DRIVER] . '</a> &raquo; '; echo '<p id="breadcrumb"><a href="' . h($link ? $link : ".") . '">' . $drivers[DRIVER] . '</a> &raquo; ';
$link = substr(preg_replace('~\b(db|ns)=[^&]*&~', '', ME), 0, -1); $link = substr(preg_replace('~\b(db|ns)=[^&]*&~', '', ME), 0, -1);
$server = (SERVER != "" ? h(SERVER) : lang('Server')); $server = $adminer->serverName(SERVER);
$server = ($server != "" ? $server : lang('Server'));
if ($breadcrumb === false) { if ($breadcrumb === false) {
echo "$server\n"; echo "$server\n";
} else { } else {
@@ -89,10 +112,45 @@ function page_headers() {
global $adminer; global $adminer;
header("Content-Type: text/html; charset=utf-8"); header("Content-Type: text/html; charset=utf-8");
header("Cache-Control: no-cache"); header("Cache-Control: no-cache");
if ($adminer->headers()) { header("X-Frame-Options: deny"); // ClickJacking protection in IE8, Safari 4, Chrome 2, Firefox 3.6.9
header("X-Frame-Options: deny"); // ClickJacking protection in IE8, Safari 4, Chrome 2, Firefox 3.6.9 header("X-XSS-Protection: 0"); // prevents introducing XSS in IE8 by removing safe parts of the page
header("X-XSS-Protection: 0"); // prevents introducing XSS in IE8 by removing safe parts of the page header("X-Content-Type-Options: nosniff");
header("Referrer-Policy: origin-when-cross-origin");
foreach ($adminer->csp() as $csp) {
$header = array();
foreach ($csp as $key => $val) {
$header[] = "$key $val";
}
header("Content-Security-Policy: " . implode("; ", $header));
} }
$adminer->headers();
}
/** Get Content Security Policy headers
* @return array of arrays with directive name in key, allowed sources in value
*/
function csp() {
return array(
array(
"script-src" => "'self' 'unsafe-inline' 'nonce-" . get_nonce() . "' 'strict-dynamic'", // 'self' is a fallback for browsers not supporting 'strict-dynamic', 'unsafe-inline' is a fallback for browsers not supporting 'nonce-'
"connect-src" => "'self'",
"frame-src" => "https://www.adminer.org",
"object-src" => "'none'",
"base-uri" => "'none'",
"form-action" => "'self'",
),
);
}
/** Get a CSP nonce
* @return string Base64 value
*/
function get_nonce() {
static $nonce;
if (!$nonce) {
$nonce = base64_encode(rand_string());
}
return $nonce;
} }
/** Print flash and error messages /** Print flash and error messages
@@ -103,7 +161,7 @@ function page_messages($error) {
$uri = preg_replace('~^[^?]*~', '', $_SERVER["REQUEST_URI"]); $uri = preg_replace('~^[^?]*~', '', $_SERVER["REQUEST_URI"]);
$messages = $_SESSION["messages"][$uri]; $messages = $_SESSION["messages"][$uri];
if ($messages) { if ($messages) {
echo "<div class='message'>" . implode("</div>\n<div class='message'>", $messages) . "</div>\n"; echo "<div class='message'>" . implode("</div>\n<div class='message'>", $messages) . "</div>" . script("messagesPrint();");
unset($_SESSION["messages"][$uri]); unset($_SESSION["messages"][$uri]);
} }
if ($error) { if ($error) {
@@ -132,6 +190,6 @@ function page_footer($missing = "") {
<div id="menu"> <div id="menu">
<?php $adminer->navigation($missing); ?> <?php $adminer->navigation($missing); ?>
</div> </div>
<script type="text/javascript">setupSubmitHighlight(document);</script>
<?php <?php
echo script("setupSubmitHighlight(document);");
} }

View File

@@ -6,7 +6,7 @@
/** Create object for performing database operations /** Create object for performing database operations
* @param Min_DB * @param Min_DB
*/ */
function Min_SQL($connection) { function __construct($connection) {
$this->_conn = $connection; $this->_conn = $connection;
} }
@@ -27,7 +27,7 @@
$query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page); $query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page);
if (!$query) { if (!$query) {
$query = "SELECT" . limit( $query = "SELECT" . limit(
($_GET["page"] != "last" && +$limit && $group && $is_group && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . implode(", ", $select) . "\nFROM " . table($table), ($_GET["page"] != "last" && $limit != "" && $group && $is_group && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . implode(", ", $select) . "\nFROM " . table($table),
($where ? "\nWHERE " . implode(" AND ", $where) : "") . ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : ""), ($where ? "\nWHERE " . implode(" AND ", $where) : "") . ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : ""),
($limit != "" ? +$limit : null), ($limit != "" ? +$limit : null),
($page ? $limit * $page : 0), ($page ? $limit * $page : 0),
@@ -37,7 +37,7 @@
$start = microtime(true); $start = microtime(true);
$return = $this->_conn->query($query); $return = $this->_conn->query($query);
if ($print) { if ($print) {
echo $adminer->selectQuery($query, format_time($start)); echo $adminer->selectQuery($query, $start, !$return);
} }
return $return; return $return;
} }
@@ -50,7 +50,7 @@
*/ */
function delete($table, $queryWhere, $limit = 0) { function delete($table, $queryWhere, $limit = 0) {
$query = "FROM " . table($table); $query = "FROM " . table($table);
return queries("DELETE" . ($limit ? limit1($query, $queryWhere) : " $query$queryWhere")); return queries("DELETE" . ($limit ? limit1($table, $query, $queryWhere) : " $query$queryWhere"));
} }
/** Update data in table /** Update data in table
@@ -67,7 +67,7 @@
$values[] = "$key = $val"; $values[] = "$key = $val";
} }
$query = table($table) . " SET$separator" . implode(",$separator", $values); $query = table($table) . " SET$separator" . implode(",$separator", $values);
return queries("UPDATE" . ($limit ? limit1($query, $queryWhere) : " $query$queryWhere")); return queries("UPDATE" . ($limit ? limit1($table, $query, $queryWhere, $separator) : " $query$queryWhere"));
} }
/** Insert data into table /** Insert data into table
@@ -99,12 +99,59 @@
return queries("BEGIN"); return queries("BEGIN");
} }
/** Commit transaction
* @return bool
*/
function commit() { function commit() {
return queries("COMMIT"); return queries("COMMIT");
} }
/** Rollback transaction
* @return bool
*/
function rollback() { function rollback() {
return queries("ROLLBACK"); return queries("ROLLBACK");
} }
/** Convert column to be searchable
* @param string escaped column name
* @param array array("op" => , "val" => )
* @param array
* @return string
*/
function convertSearch($idf, $val, $field) {
return $idf;
}
/** Convert value returned by database to actual value
* @param string
* @param array
* @return string
*/
function value($val, $field) {
return $val;
}
/** Quote binary string
* @param string
* @return string
*/
function quoteBinary($s) {
return q($s);
}
/** Get warnings about the last command
* @return string HTML
*/
function warnings() {
return '';
}
/** Get help link for table
* @param string
* @return string relative URL or null
*/
function tableHelp($name) {
}
} }

View File

@@ -50,7 +50,10 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
} }
$types[$j] = $field->type; $types[$j] = $field->type;
echo "<th" . ($orgtable != "" || $field->name != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . h($name) echo "<th" . ($orgtable != "" || $field->name != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . h($name)
. ($orgtables ? doc_link(array('sql' => "explain-output.html#explain_" . strtolower($name))) : "") . ($orgtables ? doc_link(array(
'sql' => "explain-output.html#explain_" . strtolower($name),
'mariadb' => "explain/#the-columns-in-explain-select",
)) : "")
; ;
} }
echo "</thead>\n"; echo "</thead>\n";
@@ -135,26 +138,29 @@ function textarea($name, $value, $rows = 10, $cols = 80) {
* @param array * @param array
* @param array * @param array
* @param array returned by referencable_primary() * @param array returned by referencable_primary()
* @param array extra types to prepend
* @return null * @return null
*/ */
function edit_type($key, $field, $collations, $foreign_keys = array()) { function edit_type($key, $field, $collations, $foreign_keys = array(), $extra_types = array()) {
global $structured_types, $types, $unsigned, $on_actions; global $structured_types, $types, $unsigned, $on_actions;
$type = $field["type"]; $type = $field["type"];
?> ?>
<td><select name="<?php echo $key; ?>[type]" class="type" onfocus="lastType = selectValue(this);" onchange="editingTypeChange(this);"<?php echo on_help("getTarget(event).value", 1); ?>><?php <td><select name="<?php echo h($key); ?>[type]" class="type" aria-labelledby="label-type"><?php
if ($type && !isset($types[$type]) && !isset($foreign_keys[$type])) { if ($type && !isset($types[$type]) && !isset($foreign_keys[$type]) && !in_array($type, $extra_types)) {
array_unshift($structured_types, $type); $extra_types[] = $type;
} }
if ($foreign_keys) { if ($foreign_keys) {
$structured_types[lang('Foreign keys')] = $foreign_keys; $structured_types[lang('Foreign keys')] = $foreign_keys;
} }
echo optionlist($structured_types, $type); echo optionlist(array_merge($extra_types, $structured_types), $type);
?></select> ?></select>
<td><input name="<?php echo $key; ?>[length]" value="<?php echo h($field["length"]); ?>" size="3" onfocus="editingLengthFocus(this);"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); ?> onchange="editingLengthChange(this);" onkeyup="this.onchange();"><td class="options"><?php //! type="number" with enabled JavaScript <?php echo on_help("getTarget(event).value", 1); ?>
echo "<select name='$key" . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>'; <?php echo script("mixin(qsl('select'), {onfocus: function () { lastType = selectValue(this); }, onchange: editingTypeChange});", ""); ?>
echo ($unsigned ? "<select name='$key" . "[unsigned]'" . (!$type || preg_match('~((^|[^o])int|float|double|decimal)$~', $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : ''); <td><input name="<?php echo h($key); ?>[length]" value="<?php echo h($field["length"]); ?>" size="3"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); ?> aria-labelledby="label-length"><?php echo script("mixin(qsl('input'), {onfocus: editingLengthFocus, oninput: editingLengthChange});", ""); ?><td class="options"><?php //! type="number" with enabled JavaScript
echo (isset($field['on_update']) ? "<select name='$key" . "[on_update]'" . (preg_match('~timestamp|datetime~', $type) ? "" : " class='hidden'") . '>' . optionlist(array("" => "(" . lang('ON UPDATE') . ")", "CURRENT_TIMESTAMP"), $field["on_update"]) . '</select>' : ''); echo "<select name='" . h($key) . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>';
echo ($foreign_keys ? "<select name='$key" . "[on_delete]'" . (preg_match("~`~", $type) ? "" : " class='hidden'") . "><option value=''>(" . lang('ON DELETE') . ")" . optionlist(explode("|", $on_actions), $field["on_delete"]) . "</select> " : " "); // space for IE echo ($unsigned ? "<select name='" . h($key) . "[unsigned]'" . (!$type || preg_match(number_type(), $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : '');
echo (isset($field['on_update']) ? "<select name='" . h($key) . "[on_update]'" . (preg_match('~timestamp|datetime~', $type) ? "" : " class='hidden'") . '>' . optionlist(array("" => "(" . lang('ON UPDATE') . ")", "CURRENT_TIMESTAMP"), $field["on_update"]) . '</select>' : '');
echo ($foreign_keys ? "<select name='" . h($key) . "[on_delete]'" . (preg_match("~`~", $type) ? "" : " class='hidden'") . "><option value=''>(" . lang('ON DELETE') . ")" . optionlist(explode("|", $on_actions), $field["on_delete"]) . "</select> " : " "); // space for IE
} }
/** Filter length value including enums /** Filter length value including enums
@@ -178,7 +184,7 @@ function process_type($field, $collate = "COLLATE") {
global $unsigned; global $unsigned;
return " $field[type]" return " $field[type]"
. process_length($field["length"]) . process_length($field["length"])
. (preg_match('~(^|[^o])int|float|double|decimal~', $field["type"]) && in_array($field["unsigned"], $unsigned) ? " $field[unsigned]" : "") . (preg_match(number_type(), $field["type"]) && in_array($field["unsigned"], $unsigned) ? " $field[unsigned]" : "")
. (preg_match('~char|text|enum|set~', $field["type"]) && $field["collation"] ? " $collate " . q($field["collation"]) : "") . (preg_match('~char|text|enum|set~', $field["type"]) && $field["collation"] ? " $collate " . q($field["collation"]) : "")
; ;
} }
@@ -189,24 +195,26 @@ function process_type($field, $collate = "COLLATE") {
* @return array array("field", "type", "NULL", "DEFAULT", "ON UPDATE", "COMMENT", "AUTO_INCREMENT") * @return array array("field", "type", "NULL", "DEFAULT", "ON UPDATE", "COMMENT", "AUTO_INCREMENT")
*/ */
function process_field($field, $type_field) { function process_field($field, $type_field) {
global $jush;
$default = $field["default"];
return array( return array(
idf_escape(trim($field["field"])), idf_escape(trim($field["field"])),
process_type($type_field), process_type($type_field),
($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp ($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp
(isset($default) ? " DEFAULT " . ( default_value($field),
(preg_match('~time~', $field["type"]) && preg_match('~^CURRENT_TIMESTAMP$~i', $default))
|| ($jush == "sqlite" && preg_match('~^CURRENT_(TIME|TIMESTAMP|DATE)$~i', $default))
|| ($field["type"] == "bit" && preg_match("~^([0-9]+|b'[0-1]+')\$~", $default))
|| ($jush == "pgsql" && preg_match("~^[a-z]+\\(('[^']*')+\\)\$~", $default))
? $default : q($default)) : ""),
(preg_match('~timestamp|datetime~', $field["type"]) && $field["on_update"] ? " ON UPDATE $field[on_update]" : ""), (preg_match('~timestamp|datetime~', $field["type"]) && $field["on_update"] ? " ON UPDATE $field[on_update]" : ""),
(support("comment") && $field["comment"] != "" ? " COMMENT " . q($field["comment"]) : ""), (support("comment") && $field["comment"] != "" ? " COMMENT " . q($field["comment"]) : ""),
($field["auto_increment"] ? auto_increment() : null), ($field["auto_increment"] ? auto_increment() : null),
); );
} }
/** Get default value clause
* @param array
* @return string
*/
function default_value($field) {
$default = $field["default"];
return ($default === null ? "" : " DEFAULT " . (preg_match('~char|binary|text|enum|set~', $field["type"]) || preg_match('~^(?![a-z])~i', $default) ? q($default) : $default));
}
/** Get type class to use in CSS /** Get type class to use in CSS
* @param string * @param string
* @return string class='' * @return string class=''
@@ -233,30 +241,32 @@ function type_class($type) {
* @return null * @return null
*/ */
function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = array(), $comments = false) { function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = array(), $comments = false) {
global $connection, $inout; global $inout;
$fields = array_values($fields); $fields = array_values($fields);
?> ?>
<thead><tr class="wrap"> <thead><tr>
<?php if ($type == "PROCEDURE") { ?><td>&nbsp;<?php } ?> <?php if ($type == "PROCEDURE") { ?><td>&nbsp;<?php } ?>
<th><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?> <th id="label-name"><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?>
<td><?php echo lang('Type'); ?><textarea id="enum-edit" rows="4" cols="12" wrap="off" style="display: none;" onblur="editingLengthBlur(this);"></textarea> <td id="label-type"><?php echo lang('Type'); ?><textarea id="enum-edit" rows="4" cols="12" wrap="off" style="display: none;"></textarea><?php echo script("qs('#enum-edit').onblur = editingLengthBlur;"); ?>
<td><?php echo lang('Length'); ?> <td id="label-length"><?php echo lang('Length'); ?>
<td><?php echo lang('Options'); ?> <td><?php echo lang('Options'); /* no label required, options have their own label */ ?>
<?php if ($type == "TABLE") { ?> <?php if ($type == "TABLE") { ?>
<td>NULL <td id="label-null">NULL
<td><input type="radio" name="auto_increment_col" value=""><acronym title="<?php echo lang('Auto Increment'); ?>">AI</acronym><?php echo doc_link(array( <td><input type="radio" name="auto_increment_col" value=""><acronym id="label-ai" title="<?php echo lang('Auto Increment'); ?>">AI</acronym><?php echo doc_link(array(
'sql' => "example-auto-increment.html", 'sql' => "example-auto-increment.html",
'mariadb' => "auto_increment/",
'sqlite' => "autoinc.html", 'sqlite' => "autoinc.html",
'pgsql' => "datatype.html#DATATYPE-SERIAL", 'pgsql' => "datatype.html#DATATYPE-SERIAL",
'mssql' => "ms186775.aspx", 'mssql' => "ms186775.aspx",
)); ?> )); ?>
<td><?php echo lang('Default value'); ?> <td id="label-default"><?php echo lang('Default value'); ?>
<?php echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?> <?php echo (support("comment") ? "<td id='label-comment'" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?>
<?php } ?> <?php } ?>
<td><?php echo "<input type='image' class='icon' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>"; ?><script type="text/javascript">row_count = <?php echo count($fields); ?>;</script> <td><?php echo "<input type='image' class='icon' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>" . script("row_count = " . count($fields) . ";"); ?>
</thead> </thead>
<tbody onkeydown="return editingKeydown(event);"> <tbody>
<?php <?php
echo script("mixin(qsl('tbody'), {onclick: editingClick, onkeydown: editingKeydown, oninput: editingInput});");
foreach ($fields as $i => $field) { foreach ($fields as $i => $field) {
$i++; $i++;
$orig = $field[($_POST ? "orig" : "field")]; $orig = $field[($_POST ? "orig" : "field")];
@@ -264,24 +274,22 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
?> ?>
<tr<?php echo ($display ? "" : " style='display: none;'"); ?>> <tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
<?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?> <?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?>
<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" onchange="editingNameChange(this);<?php echo ($field["field"] != "" || count($fields) > 1 ? '' : ' editingAddRow(this);" onkeyup="if (this.value) editingAddRow(this);'); ?>" maxlength="64" autocapitalize="off"><?php } ?> <th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" maxlength="64" autocapitalize="off" aria-labelledby="label-name"><?php echo script("qsl('input').oninput = function () { editingNameChange.call(this);" . ($field["field"] != "" || count($fields) > 1 ? "" : " editingAddRow.call(this);") . " };", ""); ?><?php } ?>
<input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>"> <input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>">
<?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?> <?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
<?php if ($type == "TABLE") { ?> <?php if ($type == "TABLE") { ?>
<td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block"); ?> <td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block", "label-null"); ?>
<td><label class="block"><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?> onclick="var field = this.form['fields[' + this.value + '][field]']; if (!field.value) { field.value = 'id'; field.onchange(); }"></label><td><?php <td><label class="block"><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?> aria-labelledby="label-ai"></label><td><?php
echo checkbox("fields[$i][has_default]", 1, $field["has_default"]); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" onkeyup="keyupChange.call(this);" onchange="this.previousSibling.checked = true;"> echo checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "label-default"); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" aria-labelledby="label-default"><?php
<?php echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . "><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' maxlength='" . ($connection->server_info >= 5.5 ? 1024 : 255) . "'>" : ""); ?> echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . "><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' maxlength='" . (min_version(5.5) ? 1024 : 255) . "' aria-labelledby='label-comment'>" : "");
<?php } ?> }
<?php
echo "<td>"; echo "<td>";
echo (support("move_col") ? echo (support("move_col") ?
"<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, 1);'>&nbsp;" "<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>&nbsp;"
. "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'>&nbsp;" . "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='' title='" . lang('Move up') . "'>&nbsp;"
. "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'>&nbsp;" . "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='' title='" . lang('Move down') . "'>&nbsp;"
: ""); : "");
echo ($orig == "" || support("drop_col") ? "<input type='image' class='icon' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return !editingRemoveRow(this, 'fields\$1[field]');\">" : ""); echo ($orig == "" || support("drop_col") ? "<input type='image' class='icon' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "'>" : "");
echo "\n";
} }
} }
@@ -290,7 +298,6 @@ echo checkbox("fields[$i][has_default]", 1, $field["has_default"]); ?><input nam
* @return bool * @return bool
*/ */
function process_fields(&$fields) { function process_fields(&$fields) {
ksort($fields);
$offset = 0; $offset = 0;
if ($_POST["up"]) { if ($_POST["up"]) {
$last = 0; $last = 0;
@@ -412,7 +419,7 @@ function create_trigger($on, $row) {
* @return string * @return string
*/ */
function create_routine($routine, $row) { function create_routine($routine, $row) {
global $inout; global $inout, $jush;
$set = array(); $set = array();
$fields = (array) $row["fields"]; $fields = (array) $row["fields"];
ksort($fields); // enforce fields order ksort($fields); // enforce fields order
@@ -421,20 +428,20 @@ function create_routine($routine, $row) {
$set[] = (preg_match("~^($inout)\$~", $field["inout"]) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET"); $set[] = (preg_match("~^($inout)\$~", $field["inout"]) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
} }
} }
$definition = rtrim("\n$row[definition]", ";");
return "CREATE $routine " return "CREATE $routine "
. idf_escape(trim($row["name"])) . idf_escape(trim($row["name"]))
. " (" . implode(", ", $set) . ")" . " (" . implode(", ", $set) . ")"
. (isset($_GET["function"]) ? " RETURNS" . process_type($row["returns"], "CHARACTER SET") : "") . (isset($_GET["function"]) ? " RETURNS" . process_type($row["returns"], "CHARACTER SET") : "")
. ($row["language"] ? " LANGUAGE $row[language]" : "") . ($row["language"] ? " LANGUAGE $row[language]" : "")
. rtrim("\n$row[definition]", ";") . ($jush == "pgsql" ? " AS " . q($definition) : "$definition;")
. ";"
; ;
} }
/** Remove current user definer from SQL command /** Remove current user definer from SQL command
* @param string * @param string
* @return string * @return string
*/ */
function remove_definer($query) { function remove_definer($query) {
return preg_replace('~^([A-Z =]+) DEFINER=`' . preg_replace('~@(.*)~', '`@`(%|\\1)', logged_user()) . '`~', '\\1', $query); //! proper escaping of user return preg_replace('~^([A-Z =]+) DEFINER=`' . preg_replace('~@(.*)~', '`@`(%|\\1)', logged_user()) . '`~', '\\1', $query); //! proper escaping of user
} }
@@ -486,18 +493,25 @@ function ini_bytes($ini) {
/** Create link to database documentation /** Create link to database documentation
* @param array $jush => $path * @param array $jush => $path
* @param string HTML code
* @return string HTML code * @return string HTML code
*/ */
function doc_link($paths) { function doc_link($paths, $text = "<sup>?</sup>") {
global $jush, $connection; global $jush, $connection;
$server_info = $connection->server_info;
$version = preg_replace('~^(\\d\\.?\\d).*~s', '\\1', $server_info); // two most significant digits
$urls = array( $urls = array(
'sql' => "http://dev.mysql.com/doc/refman/" . substr($connection->server_info, 0, 3) . "/en/", 'sql' => "https://dev.mysql.com/doc/refman/$version/en/",
'sqlite' => "http://www.sqlite.org/", 'sqlite' => "https://www.sqlite.org/",
'pgsql' => "http://www.postgresql.org/docs/" . substr($connection->server_info, 0, 3) . "/static/", 'pgsql' => "https://www.postgresql.org/docs/$version/static/",
'mssql' => "http://msdn.microsoft.com/library/", 'mssql' => "https://msdn.microsoft.com/library/",
'oracle' => "http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/", 'oracle' => "https://download.oracle.com/docs/cd/B19306_01/server.102/b14200/",
); );
return ($paths[$jush] ? "<a href='$urls[$jush]$paths[$jush]' target='_blank' rel='noreferrer'><sup>?</sup></a>" : ""); if (preg_match('~MariaDB~', $server_info)) {
$urls['sql'] = "https://mariadb.com/kb/en/library/";
$paths['sql'] = (isset($paths['mariadb']) ? $paths['mariadb'] : str_replace(".html", "/", $paths['sql']));
}
return ($paths[$jush] ? "<a href='$urls[$jush]$paths[$jush]'" . target_blank() . ">$text</a>" : "");
} }
/** Wrap gzencode() for usage in ob_start() /** Wrap gzencode() for usage in ob_start()
@@ -530,7 +544,7 @@ function db_size($db) {
* @return null * @return null
*/ */
function set_utf8mb4($create) { function set_utf8mb4($create) {
global $connection; global $connection;
static $set = false; static $set = false;
if (!$set && preg_match('~\butf8mb4~i', $create)) { // possible false positive if (!$set && preg_match('~\butf8mb4~i', $create)) { // possible false positive
$set = true; $set = true;

View File

@@ -16,6 +16,14 @@ function adminer() {
return $adminer; return $adminer;
} }
/** Get Adminer version
* @return string
*/
function version() {
global $VERSION;
return $VERSION;
}
/** Unescape database identifier /** Unescape database identifier
* @param string text inside `` * @param string text inside ``
* @return string * @return string
@@ -38,7 +46,14 @@ function escape_string($val) {
* @return string * @return string
*/ */
function number($val) { function number($val) {
return preg_replace('~[^0-9]+~', '', $val); return preg_replace('~[^0-9]+~', '', $val);
}
/** Get regular expression to match numeric types
* @return string
*/
function number_type() {
return '((?<!o)int(?!er)|numeric|real|float|double|decimal|money)'; // not point, not interval
} }
/** Disable magic_quotes_gpc /** Disable magic_quotes_gpc
@@ -69,16 +84,66 @@ function remove_slashes($process, $filter = false) {
*/ */
function bracket_escape($idf, $back = false) { function bracket_escape($idf, $back = false) {
// escape brackets inside name="x[]" // escape brackets inside name="x[]"
static $trans = array(':' => ':1', ']' => ':2', '[' => ':3'); static $trans = array(':' => ':1', ']' => ':2', '[' => ':3', '"' => ':4');
return strtr($idf, ($back ? array_flip($trans) : $trans)); return strtr($idf, ($back ? array_flip($trans) : $trans));
} }
/** Check if connection has at least the given version
* @param string required version
* @param string required MariaDB version
* @param Min_DB defaults to $connection
* @return bool
*/
function min_version($version, $maria_db = "", $connection2 = null) {
global $connection;
if (!$connection2) {
$connection2 = $connection;
}
$server_info = $connection2->server_info;
if ($maria_db && preg_match('~([\d.]+)-MariaDB~', $server_info, $match)) {
$server_info = $match[1];
$version = $maria_db;
}
return (version_compare($server_info, $version) >= 0);
}
/** Get connection charset /** Get connection charset
* @param Min_DB * @param Min_DB
* @return string * @return string
*/ */
function charset($connection) { function charset($connection) {
return (version_compare($connection->server_info, "5.5.3") >= 0 ? "utf8mb4" : "utf8"); // SHOW CHARSET would require an extra query return (min_version("5.5.3", 0, $connection) ? "utf8mb4" : "utf8"); // SHOW CHARSET would require an extra query
}
/** Return <script> element
* @param string
* @param string
* @return string
*/
function script($source, $trailing = "\n") {
return "<script" . nonce() . ">$source</script>$trailing";
}
/** Return <script src> element
* @param string
* @return string
*/
function script_src($url) {
return "<script src='" . h($url) . "'" . nonce() . "></script>\n";
}
/** Get a nonce="" attribute with CSP nonce
* @return string
*/
function nonce() {
return ' nonce="' . get_nonce() . '"';
}
/** Get a target="_blank" attribute
* @return string
*/
function target_blank() {
return ' target="_blank" rel="noreferrer noopener"';
} }
/** Escape for HTML /** Escape for HTML
@@ -112,13 +177,15 @@ function nl_br($string) {
* @param string * @param string
* @param string * @param string
* @param string * @param string
* @param string
* @return string * @return string
*/ */
function checkbox($name, $value, $checked, $label = "", $onclick = "", $class = "") { function checkbox($name, $value, $checked, $label = "", $onclick = "", $class = "", $labelled_by = "") {
$return = "<input type='checkbox' name='$name' value='" . h($value) . "'" $return = "<input type='checkbox' name='$name' value='" . h($value) . "'"
. ($checked ? " checked" : "") . ($checked ? " checked" : "")
. ($onclick ? ' onclick="' . h($onclick) . '"' : '') . ($labelled_by ? " aria-labelledby='$labelled_by'" : "")
. ">" . ">"
. ($onclick ? script("qsl('input').onclick = function () { $onclick };", "") : "")
; ;
return ($label != "" || $class ? "<label" . ($class ? " class='$class'" : "") . ">$return" . h($label) . "</label>" : $return); return ($label != "" || $class ? "<label" . ($class ? " class='$class'" : "") . ">$return" . h($label) . "</label>" : $return);
} }
@@ -152,11 +219,16 @@ function optionlist($options, $selected = null, $use_keys = false) {
* @param array * @param array
* @param string * @param string
* @param string true for no onchange, false for radio * @param string true for no onchange, false for radio
* @param string
* @return string * @return string
*/ */
function html_select($name, $options, $value = "", $onchange = true) { function html_select($name, $options, $value = "", $onchange = true, $labelled_by = "") {
if ($onchange) { if ($onchange) {
return "<select name='" . h($name) . "'" . (is_string($onchange) ? ' onchange="' . h($onchange) . '"' : "") . ">" . optionlist($options, $value) . "</select>"; return "<select name='" . h($name) . "'"
. ($labelled_by ? " aria-labelledby='$labelled_by'" : "")
. ">" . optionlist($options, $value) . "</select>"
. (is_string($onchange) ? script("qsl('select').onchange = function () { $onchange };", "") : "")
;
} }
$return = ""; $return = "";
foreach ($options as $key => $val) { foreach ($options as $key => $val) {
@@ -166,35 +238,42 @@ function html_select($name, $options, $value = "", $onchange = true) {
} }
/** Generate HTML <select> or <input> if $options are empty /** Generate HTML <select> or <input> if $options are empty
* @param string * @param string
* @param array * @param array
* @param string * @param string
* @param string * @param string
* @return string * @param string
*/ * @return string
function select_input($attrs, $options, $value = "", $placeholder = "") { */
return ($options function select_input($attrs, $options, $value = "", $onchange = "", $placeholder = "") {
? "<select$attrs><option value=''>$placeholder" . optionlist($options, $value, true) . "</select>" $tag = ($options ? "select" : "input");
: "<input$attrs size='10' value='" . h($value) . "' placeholder='$placeholder'>" return "<$tag$attrs" . ($options
); ? "><option value=''>$placeholder" . optionlist($options, $value, true) . "</select>"
: " size='10' value='" . h($value) . "' placeholder='$placeholder'>"
) . ($onchange ? script("qsl('$tag').onchange = $onchange;", "") : ""); //! use oninput for input
} }
/** Get onclick confirmation /** Get onclick confirmation
* @param string
* @param string
* @return string * @return string
*/ */
function confirm() { function confirm($message = "", $selector = "qsl('input')") {
return " onclick=\"return confirm('" . lang('Are you sure?') . "');\""; return script("$selector.onclick = function () { return confirm('" . ($message ? js_escape($message) : lang('Are you sure?')) . "'); };", "");
} }
/** Print header for hidden fieldset (close by </div></fieldset>) /** Print header for hidden fieldset (close by </div></fieldset>)
* @param string * @param string
* @param string * @param string
* @param bool * @param bool
* @param string
* @return null * @return null
*/ */
function print_fieldset($id, $legend, $visible = false, $onclick = "") { function print_fieldset($id, $legend, $visible = false) {
echo "<fieldset><legend><a href='#fieldset-$id' onclick=\"" . h($onclick) . "return !toggle('fieldset-$id');\">$legend</a></legend><div id='fieldset-$id'" . ($visible ? "" : " class='hidden'") . ">\n"; echo "<fieldset><legend>";
echo "<a href='#fieldset-$id'>$legend</a>";
echo script("qsl('a').onclick = partial(toggle, 'fieldset-$id');", "");
echo "</legend>";
echo "<div id='fieldset-$id'" . ($visible ? "" : " class='hidden'") . ">\n";
} }
/** Return class='active' if $bold is true /** Return class='active' if $bold is true
@@ -237,7 +316,7 @@ function json_row($key, $val = null) {
echo "{"; echo "{";
} }
if ($key != "") { if ($key != "") {
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'undefined'); echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\t\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'null');
$first = false; $first = false;
} else { } else {
echo "\n}\n"; echo "\n}\n";
@@ -323,9 +402,10 @@ function get_vals($query, $column = 0) {
* @param string * @param string
* @param Min_DB * @param Min_DB
* @param float * @param float
* @param bool
* @return array * @return array
*/ */
function get_key_vals($query, $connection2 = null, $timeout = 0) { function get_key_vals($query, $connection2 = null, $timeout = 0, $set_keys = true) {
global $connection; global $connection;
if (!is_object($connection2)) { if (!is_object($connection2)) {
$connection2 = $connection; $connection2 = $connection;
@@ -336,7 +416,11 @@ function get_key_vals($query, $connection2 = null, $timeout = 0) {
$connection2->timeout = 0; $connection2->timeout = 0;
if (is_object($result)) { if (is_object($result)) {
while ($row = $result->fetch_row()) { while ($row = $result->fetch_row()) {
$return[$row[0]] = $row[1]; if ($set_keys) {
$return[$row[0]] = $row[1];
} else {
$return[] = $row[0];
}
} }
} }
return $return; return $return;
@@ -346,7 +430,7 @@ function get_key_vals($query, $connection2 = null, $timeout = 0) {
* @param string * @param string
* @param Min_DB * @param Min_DB
* @param string * @param string
* @return array associative * @return array of associative arrays
*/ */
function get_rows($query, $connection2 = null, $error = "<p class='error'>") { function get_rows($query, $connection2 = null, $error = "<p class='error'>") {
global $connection; global $connection;
@@ -406,10 +490,10 @@ function where($where, $fields = array()) {
$key = bracket_escape($key, 1); // 1 - back $key = bracket_escape($key, 1); // 1 - back
$column = escape_key($key); $column = escape_key($key);
$return[] = $column $return[] = $column
. (($jush == "sql" && preg_match('~^[0-9]*\\.[0-9]*$~', $val)) || $jush == "mssql" . ($jush == "sql" && preg_match('~^[0-9]*\\.[0-9]*$~', $val) ? " LIKE " . q(addcslashes($val, "%_\\"))
? " LIKE " . q(addcslashes($val, "%_\\")) : ($jush == "mssql" ? " LIKE " . q(preg_replace('~[_%[]~', '[\0]', $val))
: " = " . unconvert_field($fields[$key], q($val)) : " = " . unconvert_field($fields[$key], q($val))
) // LIKE because of floats but slow with ints, in MS SQL because of text )) // LIKE because of floats but slow with ints, in MS SQL because of text
; //! enum and set ; //! enum and set
if ($jush == "sql" && preg_match('~char|text~', $fields[$key]["type"]) && preg_match("~[^ -@]~", $val)) { // not just [a-z] to catch non-ASCII characters if ($jush == "sql" && preg_match('~char|text~', $fields[$key]["type"]) && preg_match("~[^ -@]~", $val)) { // not just [a-z] to catch non-ASCII characters
$return[] = "$column = " . q($val) . " COLLATE " . charset($connection) . "_bin"; $return[] = "$column = " . q($val) . " COLLATE " . charset($connection) . "_bin";
@@ -471,18 +555,12 @@ function convert_fields($columns, $fields, $select = array()) {
*/ */
function cookie($name, $value, $lifetime = 2592000) { // 2592000 - 30 days function cookie($name, $value, $lifetime = 2592000) { // 2592000 - 30 days
global $HTTPS; global $HTTPS;
$params = array( return header("Set-Cookie: $name=" . urlencode($value)
$name, . ($lifetime ? "; expires=" . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT" : "")
(preg_match("~\n~", $value) ? "" : $value), // HTTP Response Splitting protection in PHP < 5.1.2 . "; path=" . preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"])
($lifetime ? time() + $lifetime : 0), . ($HTTPS ? "; secure" : "")
preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), . "; HttpOnly; SameSite=lax",
"", false);
$HTTPS
);
if (version_compare(PHP_VERSION, '5.2.0') >= 0) {
$params[] = true; // HttpOnly
}
return call_user_func_array('setcookie', $params);
} }
/** Restart stopped session /** Restart stopped session
@@ -584,10 +662,10 @@ function query_redirect($query, $location, $message, $redirect = true, $execute
} }
$sql = ""; $sql = "";
if ($query) { if ($query) {
$sql = $adminer->messageQuery($query, $time); $sql = $adminer->messageQuery($query, $time, $failed);
} }
if ($failed) { if ($failed) {
$error = error() . $sql; $error = error() . $sql . script("messagesPrint();");
return false; return false;
} }
if ($redirect) { if ($redirect) {
@@ -744,7 +822,7 @@ function is_utf8($val) {
* @return string escaped string with appended ... * @return string escaped string with appended ...
*/ */
function shorten_utf8($string, $length = 80, $suffix = "") { function shorten_utf8($string, $length = 80, $suffix = "") {
if (!preg_match("(^(" . repeat_pattern("[\t\r\n -\x{FFFF}]", $length) . ")($)?)u", $string, $match)) { // ~s causes trash in $match[2] under some PHP versions, (.|\n) is slow if (!preg_match("(^(" . repeat_pattern("[\t\r\n -\x{10FFFF}]", $length) . ")($)?)u", $string, $match)) { // ~s causes trash in $match[2] under some PHP versions, (.|\n) is slow
preg_match("(^(" . repeat_pattern("[\t\r\n -~]", $length) . ")($)?)", $string, $match); preg_match("(^(" . repeat_pattern("[\t\r\n -~]", $length) . ")($)?)", $string, $match);
} }
return h($match[1]) . $suffix . (isset($match[2]) ? "" : "<i>...</i>"); return h($match[1]) . $suffix . (isset($match[2]) ? "" : "<i>...</i>");
@@ -755,7 +833,7 @@ function shorten_utf8($string, $length = 80, $suffix = "") {
* @return string * @return string
*/ */
function format_number($val) { function format_number($val) {
return strtr(number_format($val, 0, ".", lang(',')), preg_split('~~u', lang('0123456789'), -1, PREG_SPLIT_NO_EMPTY)); return strtr(number_format($val, 0, ".", lang(',')), preg_split('~~u', lang('0123456789'), -1, PREG_SPLIT_NO_EMPTY));
} }
/** Generate friendly URL /** Generate friendly URL
@@ -770,9 +848,10 @@ function friendly_url($val) {
/** Print hidden fields /** Print hidden fields
* @param array * @param array
* @param array * @param array
* @return null * @return bool
*/ */
function hidden_fields($process, $ignore = array()) { function hidden_fields($process, $ignore = array()) {
$return = false;
while (list($key, $val) = each($process)) { while (list($key, $val) = each($process)) {
if (!in_array($key, $ignore)) { if (!in_array($key, $ignore)) {
if (is_array($val)) { if (is_array($val)) {
@@ -780,10 +859,12 @@ function hidden_fields($process, $ignore = array()) {
$process[$key . "[$k]"] = $v; $process[$key . "[$k]"] = $v;
} }
} else { } else {
$return = true;
echo '<input type="hidden" name="' . h($key) . '" value="' . h($val) . '">'; echo '<input type="hidden" name="' . h($key) . '" value="' . h($val) . '">';
} }
} }
} }
return $return;
} }
/** Print hidden fields for GET forms /** Print hidden fields for GET forms
@@ -847,7 +928,7 @@ function enum_input($type, $attrs, $field, $value, $empty = null) {
* @return null * @return null
*/ */
function input($field, $value, $function) { function input($field, $value, $function) {
global $connection, $types, $adminer, $jush; global $types, $adminer, $jush;
$name = h(bracket_escape($field["field"])); $name = h(bracket_escape($field["field"]));
echo "<td class='function'>"; echo "<td class='function'>";
if (is_array($value) && !$function) { if (is_array($value) && !$function) {
@@ -867,32 +948,28 @@ function input($field, $value, $function) {
if ($field["type"] == "enum") { if ($field["type"] == "enum") {
echo nbsp($functions[""]) . "<td>" . $adminer->editInput($_GET["edit"], $field, $attrs, $value); echo nbsp($functions[""]) . "<td>" . $adminer->editInput($_GET["edit"], $field, $attrs, $value);
} else { } else {
$first = 0;
foreach ($functions as $key => $val) {
if ($key === "" || !$val) {
break;
}
$first++;
}
$onchange = ($first ? " onchange=\"var f = this.form['function[" . h(js_escape(bracket_escape($field["field"]))) . "]']; if ($first > f.selectedIndex) f.selectedIndex = $first;\" onkeyup='keyupChange.call(this);'" : "");
$attrs .= $onchange;
$has_function = (in_array($function, $functions) || isset($functions[$function])); $has_function = (in_array($function, $functions) || isset($functions[$function]));
echo (count($functions) > 1 echo (count($functions) > 1
? "<select name='function[$name]' onchange='functionChange(this);'" . on_help("getTarget(event).value.replace(/^SQL\$/, '')", 1) . ">" . optionlist($functions, $function === null || $has_function ? $function : "") . "</select>" ? "<select name='function[$name]'>" . optionlist($functions, $function === null || $has_function ? $function : "") . "</select>"
. on_help("getTarget(event).value.replace(/^SQL\$/, '')", 1)
. script("qsl('select').onchange = functionChange;", "")
: nbsp(reset($functions)) : nbsp(reset($functions))
) . '<td>'; ) . '<td>';
$input = $adminer->editInput($_GET["edit"], $field, $attrs, $value); // usage in call is without a table $input = $adminer->editInput($_GET["edit"], $field, $attrs, $value); // usage in call is without a table
if ($input != "") { if ($input != "") {
echo $input; echo $input;
} elseif (preg_match('~bool~', $field["type"])) {
echo "<input type='hidden'$attrs value='0'>" .
"<input type='checkbox'" . (preg_match('~^(1|t|true|y|yes|on)$~i', $value) ? " checked='checked'" : "") . "$attrs value='1'>";
} elseif ($field["type"] == "set") { //! 64 bits } elseif ($field["type"] == "set") { //! 64 bits
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches); preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
foreach ($matches[1] as $i => $val) { foreach ($matches[1] as $i => $val) {
$val = stripcslashes(str_replace("''", "'", $val)); $val = stripcslashes(str_replace("''", "'", $val));
$checked = (is_int($value) ? ($value >> $i) & 1 : in_array($val, explode(",", $value), true)); $checked = (is_int($value) ? ($value >> $i) & 1 : in_array($val, explode(",", $value), true));
echo " <label><input type='checkbox' name='fields[$name][$i]' value='" . (1 << $i) . "'" . ($checked ? ' checked' : '') . "$onchange>" . h($adminer->editVal($val, $field)) . '</label>'; echo " <label><input type='checkbox' name='fields[$name][$i]' value='" . (1 << $i) . "'" . ($checked ? ' checked' : '') . ">" . h($adminer->editVal($val, $field)) . '</label>';
} }
} elseif (preg_match('~blob|bytea|raw|file~', $field["type"]) && ini_bool("file_uploads")) { } elseif (preg_match('~blob|bytea|raw|file~', $field["type"]) && ini_bool("file_uploads")) {
echo "<input type='file' name='fields-$name'$onchange>"; echo "<input type='file' name='fields-$name'>";
} elseif (($text = preg_match('~text|lob~', $field["type"])) || preg_match("~\n~", $value)) { } elseif (($text = preg_match('~text|lob~', $field["type"])) || preg_match("~\n~", $value)) {
if ($text && $jush != "sqlite") { if ($text && $jush != "sqlite") {
$attrs .= " cols='50' rows='12'"; $attrs .= " cols='50' rows='12'";
@@ -901,22 +978,34 @@ function input($field, $value, $function) {
$attrs .= " cols='30' rows='$rows'" . ($rows == 1 ? " style='height: 1.2em;'" : ""); // 1.2em - line-height $attrs .= " cols='30' rows='$rows'" . ($rows == 1 ? " style='height: 1.2em;'" : ""); // 1.2em - line-height
} }
echo "<textarea$attrs>" . h($value) . '</textarea>'; echo "<textarea$attrs>" . h($value) . '</textarea>';
} elseif ($function == "json") { } elseif ($function == "json" || preg_match('~^jsonb?$~', $field["type"])) {
echo "<textarea$attrs cols='50' rows='12' class='jush-js'>" . h($value) . '</textarea>'; echo "<textarea$attrs cols='50' rows='12' class='jush-js'>" . h($value) . '</textarea>';
} else { } else {
// int(3) is only a display hint // int(3) is only a display hint
$maxlength = (!preg_match('~int~', $field["type"]) && preg_match('~^(\\d+)(,(\\d+))?$~', $field["length"], $match) ? ((preg_match("~binary~", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0)); $maxlength = (!preg_match('~int~', $field["type"]) && preg_match('~^(\\d+)(,(\\d+))?$~', $field["length"], $match) ? ((preg_match("~binary~", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
if ($jush == 'sql' && $connection->server_info >= 5.6 && preg_match('~time~', $field["type"])) { if ($jush == 'sql' && min_version(5.6) && preg_match('~time~', $field["type"])) {
$maxlength += 7; // microtime $maxlength += 7; // microtime
} }
// type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator // type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator
echo "<input" echo "<input"
. ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) ? " type='number'" : "") . ((!$has_function || $function === "") && preg_match('~(?<!o)int(?!er)~', $field["type"]) && !preg_match('~\[\]~', $field["full_type"]) ? " type='number'" : "")
. " value='" . h($value) . "'" . ($maxlength ? " maxlength='$maxlength'" : "") . " value='" . h($value) . "'" . ($maxlength ? " data-maxlength='$maxlength'" : "")
. (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "") . (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "")
. "$attrs>" . "$attrs>"
; ;
} }
echo $adminer->editHint($_GET["edit"], $field, $value);
// skip 'original'
$first = 0;
foreach ($functions as $key => $val) {
if ($key === "" || !$val) {
break;
}
$first++;
}
if ($first) {
echo script("mixin(qsl('td'), {onchange: partial(skipOriginal, $first), oninput: function () { this.onchange(); }});");
}
} }
} }
@@ -925,7 +1014,7 @@ function input($field, $value, $function) {
* @return string or false to leave the original value * @return string or false to leave the original value
*/ */
function process_input($field) { function process_input($field) {
global $adminer; global $adminer, $driver;
$idf = bracket_escape($field["field"]); $idf = bracket_escape($field["field"]);
$function = $_POST["function"][$idf]; $function = $_POST["function"][$idf];
$value = $_POST["fields"][$idf]; $value = $_POST["fields"][$idf];
@@ -963,7 +1052,7 @@ function process_input($field) {
if (!is_string($file)) { if (!is_string($file)) {
return false; //! report errors return false; //! report errors
} }
return q($file); return $driver->quoteBinary($file);
} }
return $adminer->processInput($field, $value, $function); return $adminer->processInput($field, $value, $function);
} }
@@ -1000,25 +1089,20 @@ function fields_from_edit() {
*/ */
function search_tables() { function search_tables() {
global $adminer, $connection; global $adminer, $connection;
$_GET["where"][0]["op"] = "LIKE %%";
$_GET["where"][0]["val"] = $_POST["query"]; $_GET["where"][0]["val"] = $_POST["query"];
$found = false; $sep = "<ul>\n";
foreach (table_status('', true) as $table => $table_status) { foreach (table_status('', true) as $table => $table_status) {
$name = $adminer->tableName($table_status); $name = $adminer->tableName($table_status);
if (isset($table_status["Engine"]) && $name != "" && (!$_POST["tables"] || in_array($table, $_POST["tables"]))) { if (isset($table_status["Engine"]) && $name != "" && (!$_POST["tables"] || in_array($table, $_POST["tables"]))) {
$result = $connection->query("SELECT" . limit("1 FROM " . table($table), " WHERE " . implode(" AND ", $adminer->selectSearchProcess(fields($table), array())), 1)); $result = $connection->query("SELECT" . limit("1 FROM " . table($table), " WHERE " . implode(" AND ", $adminer->selectSearchProcess(fields($table), array())), 1));
if (!$result || $result->fetch_row()) { if (!$result || $result->fetch_row()) {
if (!$found) { $print = "<a href='" . h(ME . "select=" . urlencode($table) . "&where[0][op]=" . urlencode($_GET["where"][0]["op"]) . "&where[0][val]=" . urlencode($_GET["where"][0]["val"])) . "'>$name</a>";
echo "<ul>\n"; echo "$sep<li>" . ($result ? $print : "<p class='error'>$print: " . error()) . "\n";
$found = true; $sep = "";
}
echo "<li>" . ($result
? "<a href='" . h(ME . "select=" . urlencode($table) . "&where[0][op]=" . urlencode($_GET["where"][0]["op"]) . "&where[0][val]=" . urlencode($_GET["where"][0]["val"])) . "'>$name</a>\n"
: "$name: <span class='error'>" . error() . "</span>\n");
} }
} }
} }
echo ($found ? "</ul>" : "<p class='message'>" . lang('No tables.')) . "\n"; echo ($sep ? "<p class='message'>" . lang('No tables.') : "</ul>") . "\n";
} }
/** Send headers for export /** Send headers for export
@@ -1081,6 +1165,35 @@ function get_temp_dir() {
return $return; return $return;
} }
/** Open and exclusively lock a file
* @param string
* @return resource or null for error
*/
function file_open_lock($filename) {
$fp = @fopen($filename, "r+"); // @ - may not exist
if (!$fp) { // c+ is available since PHP 5.2.6
$fp = @fopen($filename, "w"); // @ - may not be writable
if (!$fp) {
return;
}
chmod($filename, 0660);
}
flock($fp, LOCK_EX);
return $fp;
}
/** Write and unlock a file
* @param resource
* @param string
*/
function file_write_unlock($fp, $data) {
rewind($fp);
fwrite($fp, $data);
ftruncate($fp, strlen($data));
flock($fp, LOCK_UN);
fclose($fp);
}
/** Read password from file adminer.key in temporary directory or create one /** Read password from file adminer.key in temporary directory or create one
* @param bool * @param bool
* @return string or false if the file can not be created * @return string or false if the file can not be created
@@ -1116,7 +1229,7 @@ function rand_string() {
* @return string HTML * @return string HTML
*/ */
function select_value($val, $link, $field, $text_length) { function select_value($val, $link, $field, $text_length) {
global $adminer, $HTTPS; global $adminer;
if (is_array($val)) { if (is_array($val)) {
$return = ""; $return = "";
foreach ($val as $k => $v) { foreach ($val as $k => $v) {
@@ -1134,11 +1247,8 @@ function select_value($val, $link, $field, $text_length) {
if (is_mail($val)) { if (is_mail($val)) {
$link = "mailto:$val"; $link = "mailto:$val";
} }
if ($protocol = is_url($val)) { if (is_url($val)) {
$link = (($protocol == "http" && $HTTPS) || preg_match('~WebKit~i', $_SERVER["HTTP_USER_AGENT"]) // WebKit supports noreferrer since 2009 $link = $val; // IE 11 and all modern browsers hide referrer
? $val // HTTP links from HTTPS pages don't receive Referer automatically
: "$protocol://www.adminer.org/redirect/?url=" . urlencode($val) // intermediate page to hide Referer
);
} }
} }
$return = $adminer->editVal($val, $field); $return = $adminer->editVal($val, $field);
@@ -1169,11 +1279,11 @@ function is_mail($email) {
/** Check whether the string is URL address /** Check whether the string is URL address
* @param string * @param string
* @return string "http", "https" or "" * @return bool
*/ */
function is_url($string) { function is_url($string) {
$domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component //! IDN $domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component //! IDN
return (preg_match("~^(https?)://($domain?\\.)+$domain(:\\d+)?(/.*)?(\\?.*)?(#.*)?\$~i", $string, $match) ? strtolower($match[1]) : ""); //! restrict path, query and fragment characters return preg_match("~^(https?)://($domain?\\.)+$domain(:\\d+)?(/.*)?(\\?.*)?(#.*)?\$~i", $string); //! restrict path, query and fragment characters
} }
/** Check if field should be shortened /** Check if field should be shortened
@@ -1181,7 +1291,7 @@ function is_url($string) {
* @return bool * @return bool
*/ */
function is_shortable($field) { function is_shortable($field) {
return preg_match('~char|text|lob|geometry|point|linestring|polygon|string~', $field["type"]); return preg_match('~char|text|json|lob|geometry|point|linestring|polygon|string|bytea~', $field["type"]);
} }
/** Get query to compute number of found rows /** Get query to compute number of found rows
@@ -1196,7 +1306,7 @@ function count_rows($table, $where, $is_group, $group) {
$query = " FROM " . table($table) . ($where ? " WHERE " . implode(" AND ", $where) : ""); $query = " FROM " . table($table) . ($where ? " WHERE " . implode(" AND ", $where) : "");
return ($is_group && ($jush == "sql" || count($group) == 1) return ($is_group && ($jush == "sql" || count($group) == 1)
? "SELECT COUNT(DISTINCT " . implode(", ", $group) . ")$query" ? "SELECT COUNT(DISTINCT " . implode(", ", $group) . ")$query"
: "SELECT COUNT(*)" . ($is_group ? " FROM (SELECT 1$query$group_by) x" : $query) : "SELECT COUNT(*)" . ($is_group ? " FROM (SELECT 1$query GROUP BY " . implode(", ", $group) . ") x" : $query)
); );
} }
@@ -1209,12 +1319,12 @@ function slow_query($query) {
$db = $adminer->database(); $db = $adminer->database();
$timeout = $adminer->queryTimeout(); $timeout = $adminer->queryTimeout();
if (support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) { if (support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) {
$kill = $connection2->result("SELECT CONNECTION_ID()"); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL $kill = $connection2->result(connection_id()); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL
?> ?>
<script type="text/javascript"> <script<?php echo nonce(); ?>>
var timeout = setTimeout(function () { var timeout = setTimeout(function () {
ajax('<?php echo js_escape(ME); ?>script=kill', function () { ajax('<?php echo js_escape(ME); ?>script=kill', function () {
}, 'token=<?php echo $token; ?>&kill=<?php echo $kill; ?>'); }, 'kill=<?php echo $kill; ?>&token=<?php echo $token; ?>');
}, <?php echo 1000 * $timeout; ?>); }, <?php echo 1000 * $timeout; ?>);
</script> </script>
<?php <?php
@@ -1223,13 +1333,13 @@ var timeout = setTimeout(function () {
} }
ob_flush(); ob_flush();
flush(); flush();
$return = @get_key_vals($query, $connection2, $timeout); // @ - may be killed $return = @get_key_vals($query, $connection2, $timeout, false); // @ - may be killed
if ($connection2) { if ($connection2) {
echo "<script type='text/javascript'>clearTimeout(timeout);</script>\n"; echo script("clearTimeout(timeout);");
ob_flush(); ob_flush();
flush(); flush();
} }
return array_keys($return); return $return;
} }
/** Generate BREACH resistant CSRF token /** Generate BREACH resistant CSRF token
@@ -1292,7 +1402,7 @@ function lzw_decompress($binary) {
* @return string * @return string
*/ */
function on_help($command, $side = 0) { function on_help($command, $side = 0) {
return " onmouseover='helpMouseover(this, event, " . h($command) . ", $side);' onmouseout='helpMouseout(this, event);'"; return script("mixin(qsl('select, input'), {onmouseover: function (event) { helpMouseover.call(this, event, $command, $side) }, onmouseout: helpMouseout});", "");
} }
/** Print edit data form /** Print edit data form
@@ -1320,7 +1430,7 @@ function edit_form($TABLE, $fields, $row, $update) {
if (!$fields) { if (!$fields) {
echo "<p class='error'>" . lang('You have no privileges to update this table.') . "\n"; echo "<p class='error'>" . lang('You have no privileges to update this table.') . "\n";
} else { } else {
echo "<table cellspacing='0' onkeydown='return editingKeydown(event);'>\n"; echo "<table cellspacing='0'>" . script("qsl('table').onkeydown = editingKeydown;");
foreach ($fields as $name => $field) { foreach ($fields as $name => $field) {
echo "<tr><th>" . $adminer->fieldName($field); echo "<tr><th>" . $adminer->fieldName($field);
@@ -1360,7 +1470,8 @@ function edit_form($TABLE, $fields, $row, $update) {
} }
if (!support("table")) { if (!support("table")) {
echo "<tr>" echo "<tr>"
. "<th><input name='field_keys[]' onkeyup='keyupChange.call(this);' onchange='fieldChange(this);' value=''>" // needs empty value for keyupChange() . "<th><input name='field_keys[]'>"
. script("qsl('input').oninput = fieldChange;")
. "<td class='function'>" . html_select("field_funs[]", $adminer->editFunctions(array("null" => isset($_GET["select"])))) . "<td class='function'>" . html_select("field_funs[]", $adminer->editFunctions(array("null" => isset($_GET["select"]))))
. "<td><input name='field_vals[]'>" . "<td><input name='field_vals[]'>"
. "\n" . "\n"
@@ -1373,13 +1484,14 @@ function edit_form($TABLE, $fields, $row, $update) {
echo "<input type='submit' value='" . lang('Save') . "'>\n"; echo "<input type='submit' value='" . lang('Save') . "'>\n";
if (!isset($_GET["select"])) { if (!isset($_GET["select"])) {
echo "<input type='submit' name='insert' value='" . ($update echo "<input type='submit' name='insert' value='" . ($update
? lang('Save and continue edit') . "' onclick='return !ajaxForm(this.form, \"" . lang('Saving') . '...", this)' ? lang('Save and continue edit')
: lang('Save and insert next') : lang('Save and insert next')
) . "' title='Ctrl+Shift+Enter'>\n"; ) . "' title='Ctrl+Shift+Enter'>\n";
echo ($update ? script("qsl('input').onclick = function () { return !ajaxForm(this.form, '" . lang('Saving') . "...', this); };") : "");
} }
} }
echo ($update ? "<input type='submit' name='delete' value='" . lang('Delete') . "'" . confirm() . ">\n" echo ($update ? "<input type='submit' name='delete' value='" . lang('Delete') . "'>" . confirm() . "\n"
: ($_POST || !$fields ? "" : "<script type='text/javascript'>focus(document.getElementById('form').getElementsByTagName('td')[1].firstChild);</script>\n") : ($_POST || !$fields ? "" : script("focus(qsa('td', qs('#form'))[1].firstChild);"))
); );
if (isset($_GET["select"])) { if (isset($_GET["select"])) {
hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"])); hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"]));

View File

@@ -2,35 +2,42 @@
// not used in a single language version // not used in a single language version
$langs = array( $langs = array(
'en' => 'English', // Jakub Vrána - http://www.vrana.cz 'en' => 'English', // Jakub Vrána - https://www.vrana.cz
'ar' => 'العربية', // Y.M Amine - Algeria - nbr7@live.fr 'ar' => 'العربية', // Y.M Amine - Algeria - nbr7@live.fr
'bg' => 'Български', // Deyan Delchev
'bn' => 'বাংলা', // Dipak Kumar - dipak.ndc@gmail.com 'bn' => 'বাংলা', // Dipak Kumar - dipak.ndc@gmail.com
'bs' => 'Bosanski', // Emir Kurtovic
'ca' => 'Català', // Joan Llosas 'ca' => 'Català', // Joan Llosas
'cs' => 'Čeština', // Jakub Vrána - http://www.vrana.cz 'cs' => 'Čeština', // Jakub Vrána - https://www.vrana.cz
'da' => 'Dansk', // Jarne W. Beutnagel - jarne@beutnagel.dk 'da' => 'Dansk', // Jarne W. Beutnagel - jarne@beutnagel.dk
'de' => 'Deutsch', // Klemens Häckel - http://clickdimension.wordpress.com 'de' => 'Deutsch', // Klemens Häckel - http://clickdimension.wordpress.com
'el' => 'Ελληνικά', // Dimitrios T. Tanis - jtanis@tanisfood.gr
'es' => 'Español', // Klemens Häckel - http://clickdimension.wordpress.com 'es' => 'Español', // Klemens Häckel - http://clickdimension.wordpress.com
'et' => 'Eesti', // Priit Kallas 'et' => 'Eesti', // Priit Kallas
'fa' => 'فارسی', // mojtaba barghbani - Iran - mbarghbani@gmail.com, Nima Amini - http://nimlog.com 'fa' => 'فارسی', // mojtaba barghbani - Iran - mbarghbani@gmail.com, Nima Amini - http://nimlog.com
'fi' => 'Suomi', // Finnish - Kari Eveli - http://www.lexitec.fi/
'fr' => 'Français', // Francis Gagné, Aurélien Royer 'fr' => 'Français', // Francis Gagné, Aurélien Royer
'gl' => 'Galego', // Eduardo Penabad Ramos
'he' => 'עברית', // Binyamin Yawitz - https://stuff-group.com/
'hu' => 'Magyar', // Borsos Szilárd (Borsosfi) - http://www.borsosfi.hu, info@borsosfi.hu 'hu' => 'Magyar', // Borsos Szilárd (Borsosfi) - http://www.borsosfi.hu, info@borsosfi.hu
'id' => 'Bahasa Indonesia', // Ivan Lanin - http://ivan.lanin.org 'id' => 'Bahasa Indonesia', // Ivan Lanin - http://ivan.lanin.org
'it' => 'Italiano', // Alessandro Fiorotto, Paolo Asperti 'it' => 'Italiano', // Alessandro Fiorotto, Paolo Asperti
'ja' => '日本語', // Hitoshi Ozawa - http://sourceforge.jp/projects/oss-ja-jpn/releases/ 'ja' => '日本語', // Hitoshi Ozawa - http://sourceforge.jp/projects/oss-ja-jpn/releases/
'ko' => '한국어', // dalli - skcha67@gmail.com 'ko' => '한국어', // dalli - skcha67@gmail.com
'lt' => 'Lietuvių', // Paulius Leščinskas - http://www.lescinskas.lt 'lt' => 'Lietuvių', // Paulius Leščinskas - http://www.lescinskas.lt
'ms' => 'Bahasa Melayu', // Pisyek
'nl' => 'Nederlands', // Maarten Balliauw - http://blog.maartenballiauw.be 'nl' => 'Nederlands', // Maarten Balliauw - http://blog.maartenballiauw.be
'no' => 'Norsk', // Iver Odin Kvello, mupublishing.com 'no' => 'Norsk', // Iver Odin Kvello, mupublishing.com
'pl' => 'Polski', // Radosław Kowalewski - http://srsbiz.pl/ 'pl' => 'Polski', // Radosław Kowalewski - http://srsbiz.pl/
'pt' => 'Português', // André Dias 'pt' => 'Português', // André Dias
'pt-br' => 'Português (Brazil)', // Gian Live - gian@live.com, Davi Alexandre davi@davialexandre.com.br, RobertoPC - http://www.robertopc.com.br 'pt-br' => 'Português (Brazil)', // Gian Live - gian@live.com, Davi Alexandre davi@davialexandre.com.br, RobertoPC - http://www.robertopc.com.br
'ro' => 'Limba Română', // .nick .messing - dot.nick.dot.messing@gmail.com 'ro' => 'Limba Română', // .nick .messing - dot.nick.dot.messing@gmail.com
'ru' => 'Русский язык', // Maksim Izmaylov 'ru' => 'Русский', // Maksim Izmaylov; Andre Polykanine - https://github.com/Oire/
'sk' => 'Slovenčina', // Ivan Suchy - http://www.ivansuchy.com, Juraj Krivda - http://www.jstudio.cz 'sk' => 'Slovenčina', // Ivan Suchy - http://www.ivansuchy.com, Juraj Krivda - http://www.jstudio.cz
'sl' => 'Slovenski', // Matej Ferlan - www.itdinamik.com, matej.ferlan@itdinamik.com 'sl' => 'Slovenski', // Matej Ferlan - www.itdinamik.com, matej.ferlan@itdinamik.com
'sr' => 'Српски', // Nikola Radovanović - cobisimo@gmail.com 'sr' => 'Српски', // Nikola Radovanović - cobisimo@gmail.com
'ta' => 'த‌மிழ்', // G. Sampath Kumar, Chennai, India, sampathkumar11@gmail.com 'ta' => 'த‌மிழ்', // G. Sampath Kumar, Chennai, India, sampathkumar11@gmail.com
'th' => 'ภาษาไทย', // Panya Saraphi, elect.tu@gmail.com - http://www.opencart2u.com/ 'th' => 'ภาษาไทย', // Panya Saraphi, elect.tu@gmail.com - http://www.opencart2u.com/
'tr' => 'Türkçe', // Bilgehan Korkmaz - turktron.com 'tr' => 'Türkçe', // Bilgehan Korkmaz - turktron.com
'uk' => 'Українська', // Valerii Kryzhov 'uk' => 'Українська', // Valerii Kryzhov
'vi' => 'Tiếng Việt', // Giang Manh @ manhgd google mail 'vi' => 'Tiếng Việt', // Giang Manh @ manhgd google mail
@@ -58,11 +65,11 @@ function lang($idf, $number = null) {
$pos = ($number == 1 ? 0 $pos = ($number == 1 ? 0
: ($LANG == 'cs' || $LANG == 'sk' ? ($number && $number < 5 ? 1 : 2) // different forms for 1, 2-4, other : ($LANG == 'cs' || $LANG == 'sk' ? ($number && $number < 5 ? 1 : 2) // different forms for 1, 2-4, other
: ($LANG == 'fr' ? (!$number ? 0 : 1) // different forms for 0-1, other : ($LANG == 'fr' ? (!$number ? 0 : 1) // different forms for 0-1, other
: ($LANG == 'pl' ? ($number % 10 > 1 && $number % 10 < 5 && $number / 10 % 10 != 1 ? 1 : 2) // different forms for 1, 2-4, other : ($LANG == 'pl' ? ($number % 10 > 1 && $number % 10 < 5 && $number / 10 % 10 != 1 ? 1 : 2) // different forms for 1, 2-4 except 12-14, other
: ($LANG == 'sl' ? ($number % 100 == 1 ? 0 : ($number % 100 == 2 ? 1 : ($number % 100 == 3 || $number % 100 == 4 ? 2 : 3))) // different forms for 1, 2, 3-4, other : ($LANG == 'sl' ? ($number % 100 == 1 ? 0 : ($number % 100 == 2 ? 1 : ($number % 100 == 3 || $number % 100 == 4 ? 2 : 3))) // different forms for 1, 2, 3-4, other
: ($LANG == 'lt' ? ($number % 10 == 1 && $number % 100 != 11 ? 0 : ($number % 10 > 1 && $number / 10 % 10 != 1 ? 1 : 2)) // different forms for 1, 12-19, other : ($LANG == 'lt' ? ($number % 10 == 1 && $number % 100 != 11 ? 0 : ($number % 10 > 1 && $number / 10 % 10 != 1 ? 1 : 2)) // different forms for 1, 12-19, other
: ($LANG == 'ru' || $LANG == 'sr' || $LANG == 'uk' ? ($number % 10 == 1 && $number % 100 != 11 ? 0 : ($number % 10 > 1 && $number % 10 < 5 && $number / 10 % 10 != 1 ? 1 : 2)) // different forms for 1, 2-4, other : ($LANG == 'bs' || $LANG == 'ru' || $LANG == 'sr' || $LANG == 'uk' ? ($number % 10 == 1 && $number % 100 != 11 ? 0 : ($number % 10 > 1 && $number % 10 < 5 && $number / 10 % 10 != 1 ? 1 : 2)) // different forms for 1 except 11, 2-4 except 12-14, other
: 1 : 1 // different forms for 1, other
))))))); // http://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html ))))))); // http://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html
$translation = $translation[$pos]; $translation = $translation[$pos];
} }

View File

@@ -12,14 +12,14 @@ if (extension_loaded('pdo')) {
} }
} }
function dsn($dsn, $username, $password) { function dsn($dsn, $username, $password, $options = array()) {
try { try {
parent::__construct($dsn, $username, $password); parent::__construct($dsn, $username, $password, $options);
} catch (Exception $ex) { } catch (Exception $ex) {
auth_error($ex->getMessage()); auth_error(h($ex->getMessage()));
} }
$this->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS $this->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS
$this->server_info = $this->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION $this->server_info = @$this->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION
} }
/*abstract function select_db($database);*/ /*abstract function select_db($database);*/

View File

@@ -4,7 +4,7 @@ class TmpFile {
var $handler; var $handler;
var $size; var $size;
function TmpFile() { function __construct() {
$this->handler = tmpfile(); $this->handler = tmpfile();
} }

View File

@@ -1,2 +1,2 @@
<?php <?php
$VERSION = "4.2.2"; $VERSION = "4.6.2";

View File

@@ -1,10 +1,10 @@
<?php <?php
/** Adminer - Compact database management /** Adminer - Compact database management
* @link http://www.adminer.org/ * @link https://www.adminer.org/
* @author Jakub Vrana, http://www.vrana.cz/ * @author Jakub Vrana, https://www.vrana.cz/
* @copyright 2007 Jakub Vrana * @copyright 2007 Jakub Vrana
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/ */
include "./include/bootstrap.inc.php"; include "./include/bootstrap.inc.php";

View File

@@ -2,9 +2,12 @@
$TABLE = $_GET["indexes"]; $TABLE = $_GET["indexes"];
$index_types = array("PRIMARY", "UNIQUE", "INDEX"); $index_types = array("PRIMARY", "UNIQUE", "INDEX");
$table_status = table_status($TABLE, true); $table_status = table_status($TABLE, true);
if (preg_match('~MyISAM|M?aria' . ($connection->server_info >= 5.6 ? '|InnoDB' : '') . '~i', $table_status["Engine"])) { if (preg_match('~MyISAM|M?aria' . (min_version(5.6, '10.0.5') ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
$index_types[] = "FULLTEXT"; $index_types[] = "FULLTEXT";
} }
if (preg_match('~MyISAM|M?aria' . (min_version(5.7, '10.2.2') ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
$index_types[] = "SPATIAL";
}
$indexes = indexes($TABLE); $indexes = indexes($TABLE);
$primary = array(); $primary = array();
if ($jush == "mongo") { // doesn't support primary key if ($jush == "mongo") { // doesn't support primary key
@@ -93,9 +96,9 @@ if (!$row) {
<form action="" method="post"> <form action="" method="post">
<table cellspacing="0" class="nowrap"> <table cellspacing="0" class="nowrap">
<thead><tr> <thead><tr>
<th><?php echo lang('Index Type'); ?> <th id="label-type"><?php echo lang('Index Type'); ?>
<th><input type="submit" style="left: -1000px; position: absolute;"><?php echo lang('Column (length)'); ?> <th><input type="submit" class="wayoff"><?php echo lang('Column (length)'); ?>
<th><?php echo lang('Name'); ?> <th id="label-name"><?php echo lang('Name'); ?>
<th><noscript><input type='image' class='icon' name='add[0]' src='../adminer/static/plus.gif' alt='+' title='<?php echo lang('Add next'); ?>'></noscript>&nbsp; <th><noscript><input type='image' class='icon' name='add[0]' src='../adminer/static/plus.gif' alt='+' title='<?php echo lang('Add next'); ?>'></noscript>&nbsp;
</thead> </thead>
<?php <?php
@@ -110,25 +113,26 @@ if ($primary) {
$j = 1; $j = 1;
foreach ($row["indexes"] as $index) { foreach ($row["indexes"] as $index) {
if (!$_POST["drop_col"] || $j != key($_POST["drop_col"])) { if (!$_POST["drop_col"] || $j != key($_POST["drop_col"])) {
echo "<tr><td>" . html_select("indexes[$j][type]", array(-1 => "") + $index_types, $index["type"], ($j == count($row["indexes"]) ? "indexesAddRow(this);" : 1)); echo "<tr><td>" . html_select("indexes[$j][type]", array(-1 => "") + $index_types, $index["type"], ($j == count($row["indexes"]) ? "indexesAddRow.call(this);" : 1), "label-type");
echo "<td>"; echo "<td>";
ksort($index["columns"]); ksort($index["columns"]);
$i = 1; $i = 1;
foreach ($index["columns"] as $key => $column) { foreach ($index["columns"] as $key => $column) {
echo "<span>" . select_input( echo "<span>" . select_input(
" name='indexes[$j][columns][$i]' onchange=\"" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . "(this, '" . js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_") . "');\"", " name='indexes[$j][columns][$i]' title='" . lang('Column') . "'",
($fields ? array_combine($fields, $fields) : $fields), ($fields ? array_combine($fields, $fields) : $fields),
$column $column,
"partial(" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . ", '" . js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_") . "')"
); );
echo ($jush == "sql" || $jush == "mssql" ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "'>" : ""); echo ($jush == "sql" || $jush == "mssql" ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "' title='" . lang('Length') . "'>" : "");
echo ($jush != "sql" ? checkbox("indexes[$j][descs][$i]", 1, $index["descs"][$key], lang('descending')) : ""); echo ($jush != "sql" ? checkbox("indexes[$j][descs][$i]", 1, $index["descs"][$key], lang('descending')) : "");
echo " </span>"; echo " </span>";
$i++; $i++;
} }
echo "<td><input name='indexes[$j][name]' value='" . h($index["name"]) . "' autocapitalize='off'>\n"; echo "<td><input name='indexes[$j][name]' value='" . h($index["name"]) . "' autocapitalize='off' aria-labelledby='label-name'>\n";
echo "<td><input type='image' class='icon' name='drop_col[$j]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return !editingRemoveRow(this, 'indexes\$1[type]');\">\n"; echo "<td><input type='image' class='icon' name='drop_col[$j]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "'>" . script("qsl('input').onclick = partial(editingRemoveRow, 'indexes\$1[type]');");
} }
$j++; $j++;
} }

View File

@@ -1,23 +1,22 @@
<?php <?php
$translations = array( $translations = array(
'Login' => 'تسجيل الدخول', 'Login' => 'تسجيل الدخول',
'Logout successful.' => 'مع السلامة.', 'Logout successful.' => 'تم تسجيل الخروج بنجاح.',
'Invalid credentials.' => 'فشل في تسجيل الدخول.', 'Invalid credentials.' => 'بيانات الدخول غير صالحة.',
'Server' => 'الخادم', 'Server' => 'الخادم',
'Username' => 'المستعمل', 'Username' => 'اسم المستخدم',
'Password' => 'كلمة المرور', 'Password' => 'كلمة المرور',
'Select database' => 'إختر قاعدة البيانات', 'Select database' => 'اختر قاعدة البيانات',
'Invalid database.' => 'قاعدة بيانات خاطئة.', 'Invalid database.' => 'قاعدة البيانات غير صالحة.',
'Create new database' => 'أنشئ فاعدة بيانات',
'Table has been dropped.' => 'تم حذف الجدول.', 'Table has been dropped.' => 'تم حذف الجدول.',
'Table has been altered.' => 'تم تعديل الجدول.', 'Table has been altered.' => 'تم تعديل الجدول.',
'Table has been created.' => 'تم إنشاء الجدول.', 'Table has been created.' => 'تم إنشاء الجدول.',
'Alter table' => 'تعديل الجدول', 'Alter table' => 'تعديل الجدول',
'Create table' => 'إنشاء جدول', 'Create table' => 'إنشاء جدول',
'Table name' => 'إسم الجدول', 'Table name' => 'اسم الجدول',
'engine' => 'المحرك', 'engine' => 'المحرك',
'collation' => 'الترتيب', 'collation' => 'الترتيب',
'Column name' => 'إسم العمود', 'Column name' => 'اسم العمود',
'Type' => 'النوع', 'Type' => 'النوع',
'Length' => 'الطول', 'Length' => 'الطول',
'Auto Increment' => 'تزايد تلقائي', 'Auto Increment' => 'تزايد تلقائي',
@@ -29,10 +28,10 @@ $translations = array(
'Database has been altered.' => 'تم تعديل قاعدة البيانات.', 'Database has been altered.' => 'تم تعديل قاعدة البيانات.',
'Alter database' => 'تعديل قاعدة البيانات', 'Alter database' => 'تعديل قاعدة البيانات',
'Create database' => 'إنشاء قاعدة بيانات', 'Create database' => 'إنشاء قاعدة بيانات',
'SQL command' => 'إستعلام SQL', 'SQL command' => 'استعلام SQL',
'Logout' => 'تسجيل الخروج', 'Logout' => 'تسجيل الخروج',
'database' => 'قاعدة بيانات', 'database' => 'قاعدة بيانات',
'Use' => 'المستعمل', 'Use' => 'استعمال',
'No tables.' => 'لا توجد جداول.', 'No tables.' => 'لا توجد جداول.',
'select' => 'تحديد', 'select' => 'تحديد',
'Item has been deleted.' => 'تم حذف العنصر.', 'Item has been deleted.' => 'تم حذف العنصر.',
@@ -48,48 +47,48 @@ $translations = array(
'Alter indexes' => 'تعديل المؤشرات', 'Alter indexes' => 'تعديل المؤشرات',
'Add next' => 'إضافة التالي', 'Add next' => 'إضافة التالي',
'Language' => 'اللغة', 'Language' => 'اللغة',
'Select' => 'إختيار', 'Select' => 'اختيار',
'New item' => 'عنصر جديد', 'New item' => 'عنصر جديد',
'Search' => 'بحث', 'Search' => 'بحث',
'Sort' => 'ترتيب', 'Sort' => 'ترتيب',
'descending' => 'تنازلي', 'descending' => 'تنازلي',
'Limit' => 'حد', 'Limit' => 'حد',
'No rows.' => 'لا توجد نتائج.', 'No rows.' => 'لا توجد نتائج.',
'Action' => 'حركة', 'Action' => 'الإجراء',
'edit' => 'تعديل', 'edit' => 'تعديل',
'Page' => 'صفحة', 'Page' => 'صفحة',
'Query executed OK, %d row(s) affected.' => 'تم تنفسذ الإستعلام, %d عدد الأسطر المعدلة.', 'Query executed OK, %d row(s) affected.' => 'تم تنفسذ الاستعلام, %d عدد الأسطر المعدلة.',
'Error in query' => 'هناك خطأ في الإستعلام', 'Error in query' => 'هناك خطأ في الاستعلام',
'Execute' => 'تنفيذ', 'Execute' => 'تنفيذ',
'Table' => 'جدول', 'Table' => 'جدول',
'Foreign keys' => 'مفاتيح أجنبية', 'Foreign keys' => 'مفاتيح أجنبية',
'Triggers' => 'الزنادات', 'Triggers' => 'الزنادات',
'View' => 'عرض', 'View' => 'عرض',
'Unable to select the table' => 'من غير الممكن إختيار الجدول', 'Unable to select the table' => 'يتعذر اختيار الجدول',
'Invalid CSRF token. Send the form again.' => 'CSRF Token خاطئ. من فضلك أعد إرسال الإستمارة.', 'Invalid CSRF token. Send the form again.' => 'رمز CSRF غير صالح. المرجو إرسال الاستمارة مرة أخرى.',
'Comment' => 'تعليق', 'Comment' => 'تعليق',
'Default values' => 'القيمة الإفتراضية', 'Default values' => 'القيم الافتراضية',
'%d byte(s)' => '%d بايت', '%d byte(s)' => '%d بايت',
'No commands to execute.' => 'لا توجد أوامر للتنفيذ.', 'No commands to execute.' => 'لا توجد أوامر للتنفيذ.',
'Unable to upload a file.' => 'من غير الممكن رفع الملف.', 'Unable to upload a file.' => 'يتعذر رفع ملف ما.',
'File upload' => 'رفع ملف', 'File upload' => 'رفع ملف',
'File uploads are disabled.' => 'تم إلغاء رفع الملفات.', 'File uploads are disabled.' => 'رفع الملفات غير مشغل.',
'Routine has been called, %d row(s) affected.' => 'تم إستدعاء الروتين, عدد الأسطر المعدلة %d.', 'Routine has been called, %d row(s) affected.' => 'تم استدعاء الروتين, عدد الأسطر المعدلة %d.',
'Call' => 'إستدعاء', 'Call' => 'استدعاء',
'No extension' => 'إمتداد غير موجود', 'No extension' => 'امتداد غير موجود',
'None of the supported PHP extensions (%s) are available.' => 'إمتدادات php المدعومة غير موجودة.', 'None of the supported PHP extensions (%s) are available.' => 'إمتدادات php المدعومة غير موجودة.',
'Session support must be enabled.' => 'عليك تفعيل نظام الجلسات.', 'Session support must be enabled.' => 'عليك تفعيل نظام الجلسات.',
'Session expired, please login again.' => 'إنتهت الجلسة، من فضلك أعد تسجيل الدخول.', 'Session expired, please login again.' => 'إنتهت الجلسة، من فضلك أعد تسجيل الدخول.',
'Text length' => 'طول النص', 'Text length' => 'طول النص',
'Foreign key has been dropped.' => 'المفتاح الأجنبي تم مسحه.', 'Foreign key has been dropped.' => 'تم مسح المفتاح الأجنبي.',
'Foreign key has been altered.' => 'المفتاح الأجنبي تم تعديله.', 'Foreign key has been altered.' => 'تم تعديل المفتاح الأجنبي.',
'Foreign key has been created.' => 'المفتاح الأجنبي تم إنشاؤه.', 'Foreign key has been created.' => 'تم إنشاء المفتاح الأجنبي.',
'Foreign key' => 'مفتاح أجنبي', 'Foreign key' => 'مفتاح أجنبي',
'Target table' => 'الجدول المستهدف', 'Target table' => 'الجدول المستهدف',
'Change' => 'تعديل', 'Change' => 'تعديل',
'Source' => 'المصدر', 'Source' => 'المصدر',
'Target' => 'الهدف', 'Target' => 'الهدف',
'Add column' => 'أضف عمود', 'Add column' => 'إضافة عمودا',
'Alter' => 'تعديل', 'Alter' => 'تعديل',
'Add foreign key' => 'إضافة مفتاح أجنبي', 'Add foreign key' => 'إضافة مفتاح أجنبي',
'ON DELETE' => 'ON DELETE', 'ON DELETE' => 'ON DELETE',
@@ -101,11 +100,11 @@ $translations = array(
'View has been created.' => 'تم إنشاء العرض.', 'View has been created.' => 'تم إنشاء العرض.',
'Alter view' => 'تعديل عرض', 'Alter view' => 'تعديل عرض',
'Create view' => 'إنشاء عرض', 'Create view' => 'إنشاء عرض',
'Name' => 'الإسم', 'Name' => 'الاسم',
'Process list' => 'قائمة الإجراءات', 'Process list' => 'قائمة الإجراءات',
'%d process(es) have been killed.' => 'عدد الإجراءات التي تم إيقافها %d.', '%d process(es) have been killed.' => 'عدد الإجراءات التي تم إيقافها %d.',
'Kill' => 'إيقاف', 'Kill' => 'إيقاف',
'Parameter name' => 'إسم المتغير', 'Parameter name' => 'اسم المتغير',
'Database schema' => 'مخطط فاعدة البيانات', 'Database schema' => 'مخطط فاعدة البيانات',
'Create procedure' => 'إنشاء إجراء', 'Create procedure' => 'إنشاء إجراء',
'Create function' => 'إنشاء دالة', 'Create function' => 'إنشاء دالة',
@@ -137,7 +136,7 @@ $translations = array(
'Grant' => 'موافق', 'Grant' => 'موافق',
'Revoke' => 'إلغاء', 'Revoke' => 'إلغاء',
'%s version: %s through PHP extension %s' => 'النسخة %s : %s عن طريق إمتداد ال PHP %s', '%s version: %s through PHP extension %s' => 'النسخة %s : %s عن طريق إمتداد ال PHP %s',
'Logged as: %s' => 'تم تسجيل الدخول بإسم %s', 'Logged as: %s' => 'تم تسجيل الدخول باسم %s',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'معلومات POST كبيرة جدا. قم بتقليص حجم المعلومات أو قم بزيادة قيمة %s في خيارات ال PHP.', 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'معلومات POST كبيرة جدا. قم بتقليص حجم المعلومات أو قم بزيادة قيمة %s في خيارات ال PHP.',
'Move up' => 'نقل للأعلى', 'Move up' => 'نقل للأعلى',
'Move down' => 'نقل للأسفل', 'Move down' => 'نقل للأسفل',
@@ -176,7 +175,7 @@ $translations = array(
'Data Free' => 'المساحة الحرة', 'Data Free' => 'المساحة الحرة',
'Rows' => 'الأسطر', 'Rows' => 'الأسطر',
',' => ',', ',' => ',',
'0123456789' => '٠١٢٣٤٥٦٧٨٩', '0123456789' => '0123456789',
'Analyze' => 'تحليل', 'Analyze' => 'تحليل',
'Optimize' => 'تحسين', 'Optimize' => 'تحسين',
'Check' => 'فحص', 'Check' => 'فحص',
@@ -185,16 +184,16 @@ $translations = array(
'Move to other database' => 'نقل إلى قاعدة بيانات أخرى', 'Move to other database' => 'نقل إلى قاعدة بيانات أخرى',
'Move' => 'نقل', 'Move' => 'نقل',
'%d item(s) have been affected.' => 'عدد العناصر المعدلة هو %d.', '%d item(s) have been affected.' => 'عدد العناصر المعدلة هو %d.',
'whole result' => 'نتيجة كاملة', 'Whole result' => 'نتيجة كاملة',
'Clone' => 'نسخ', 'Clone' => 'نسخ',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'لقد تجاوزت العدد الأقصى للحقول. يرجى الرفع من %s.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'لقد تجاوزت العدد الأقصى للحقول. يرجى الرفع من %s.',
'Partition by' => 'مقسم بواسطة', 'Partition by' => 'مقسم بواسطة',
'Partitions' => 'التقسيمات', 'Partitions' => 'التقسيمات',
'Partition name' => 'إسم التقسيم', 'Partition name' => 'اسم التقسيم',
'Values' => 'القيم', 'Values' => 'القيم',
'%d row(s) have been imported.' => 'عدد الأسطر المستوردة هو %d.', '%d row(s) have been imported.' => 'تم استيراد %d سطرا',
'anywhere' => 'في اي مكان', 'anywhere' => 'في اي مكان',
'Import' => 'إستيراد', 'Import' => 'استيراد',
'Stop on error' => 'أوقف في حالة حدوث خطأ', 'Stop on error' => 'أوقف في حالة حدوث خطأ',
'%.3f s' => '%.3f s', '%.3f s' => '%.3f s',
'$1-$3-$5' => '$5/$3/$1', '$1-$3-$5' => '$5/$3/$1',
@@ -241,7 +240,7 @@ $translations = array(
'Alter type' => 'تعديل نوع', 'Alter type' => 'تعديل نوع',
'Type has been dropped.' => 'تم حذف النوع.', 'Type has been dropped.' => 'تم حذف النوع.',
'Type has been created.' => 'تم إنشاء النوع.', 'Type has been created.' => 'تم إنشاء النوع.',
'Use edit link to modify this value.' => 'إستعمل الرابط "تعديل" لتعديل هذه القيمة.', 'Use edit link to modify this value.' => 'استعمل الرابط "تعديل" لتعديل هذه القيمة.',
'last' => 'الأخيرة', 'last' => 'الأخيرة',
'From server' => 'من الخادم', 'From server' => 'من الخادم',
'System' => 'النظام', 'System' => 'النظام',
@@ -254,15 +253,15 @@ $translations = array(
'Attachments' => 'ملفات مرفقة.', 'Attachments' => 'ملفات مرفقة.',
'Item%s has been inserted.' => 'تم إدراج العنصر.', 'Item%s has been inserted.' => 'تم إدراج العنصر.',
'now' => 'الآن', 'now' => 'الآن',
'%d query(s) executed OK.' => array('تم تنفيذ الإستعلام %d بنجاح.', 'تم تنفيذ الإستعلامات %d بنجاح.'), '%d query(s) executed OK.' => array('تم تنفيذ الاستعلام %d بنجاح.', 'تم تنفيذ الاستعلامات %d بنجاح.'),
'Show only errors' => عرض الأخطاء فقط', 'Show only errors' => ظهار الأخطاء فقط',
'Refresh' => 'تحديث', 'Refresh' => 'تحديث',
'Invalid schema.' => 'مخطط خاطئ.', 'Invalid schema.' => 'مخطط غير صالح.',
'Please use one of the extensions %s.' => 'من فضلك إستعمل إحدى الإمتدادات: %s.', 'Please use one of the extensions %s.' => 'المرجو استخدام إحدى الامتدادات %s.',
'ltr' => 'rtl', 'ltr' => 'rtl',
'Tables have been copied.' => 'تم نسخ الجداول.', 'Tables have been copied.' => 'تم نسخ الجداول.',
'Copy' => 'نسخ', 'Copy' => 'نسخ',
'Permanent link' => 'وصلة دائمة', 'Permanent link' => 'رابط دائم',
'Edit all' => 'تعديل الكل', 'Edit all' => 'تعديل الكل',
'HH:MM:SS' => 'HH:MM:SS', 'HH:MM:SS' => 'HH:MM:SS',
); );

336
adminer/lang/bg.inc.php Normal file
View File

@@ -0,0 +1,336 @@
<?php
$translations = array(
// label for database system selection (MySQL, SQLite, ...)
'System' => 'Система',
'Server' => 'Сървър',
'Username' => 'Потребител',
'Password' => 'Парола',
'Permanent login' => 'Запаметяване',
'Login' => 'Вход',
'Logout' => 'Изход',
'Logged as: %s' => 'Текущ потребител: %s',
'Logout successful.' => 'Излизането е успешно.',
'Invalid credentials.' => 'Невалидни потребителски данни.',
'Too many unsuccessful logins, try again in %d minute(s).' => array('Прекалено много неуспешни опити за вход, опитайте пак след %d минута.', 'Прекалено много неуспешни опити за вход, опитайте пак след %d минути.'),
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Главната парола вече е невалидна. <a href="https://www.adminer.org/en/extension/"%s>Изберете</a> %s метод, за да я направите постоянна.',
'Language' => 'Език',
'Invalid CSRF token. Send the form again.' => 'Невалиден шифроващ ключ. Попълнете и изпратете формуляра отново.',
'If you did not send this request from Adminer then close this page.' => 'Ако не сте изпратили тази заявка през Adminer, затворете тази страница.',
'No extension' => 'Няма разширение',
'None of the supported PHP extensions (%s) are available.' => 'Никое от поддържаните PHP разширения (%s) не е налично.',
'Session support must be enabled.' => 'Поддръжката на сесии трябва да е разрешена.',
'Session expired, please login again.' => 'Сесията е изтекла; моля, влезте отново.',
'%s version: %s through PHP extension %s' => '%s версия: %s през PHP разширение %s',
'Refresh' => 'Обновяване',
// text direction - 'ltr' or 'rtl'
'ltr' => 'ltr',
'Privileges' => 'Права',
'Create user' => 'Създаване на потребител',
'User has been dropped.' => 'Потребителя беше премахнат.',
'User has been altered.' => 'Потребителя беше променен.',
'User has been created.' => 'Потребителя беше създаден.',
'Hashed' => 'Хеширан',
'Column' => 'Колона',
'Routine' => 'Процедура',
'Grant' => 'Осигуряване',
'Revoke' => 'Отнемане',
'Process list' => 'Списък с процеси',
'%d process(es) have been killed.' => array('%d процес беше прекъснат.', '%d процеса бяха прекъснати.'),
'Kill' => 'Прекъсване',
'Variables' => 'Променливи',
'Status' => 'Състояние',
'SQL command' => 'SQL команда',
'%d query(s) executed OK.' => array('%d заявка е изпълнена.', '%d заявки са изпълнени.'),
'Query executed OK, %d row(s) affected.' => array('Заявката е изпълнена, %d ред е засегнат.', 'Заявката е изпълнена, %d редове са засегнати.'),
'No commands to execute.' => 'Няма команди за изпълнение.',
'Error in query' => 'Грешка в заявката',
'Execute' => 'Изпълнение',
'Stop on error' => 'Спиране при грешка',
'Show only errors' => 'Показване само на грешките',
// sprintf() format for time of the command
'%.3f s' => '%.3f s',
'History' => 'Хронология',
'Clear' => 'Изчистване',
'Edit all' => 'Редактиране на всички',
'File upload' => 'Прикачване на файл',
'From server' => 'От сървър',
'Webserver file %s' => 'Сървърен файл %s',
'Run file' => 'Изпълнение на файл',
'File does not exist.' => 'Файлът не съществува.',
'File uploads are disabled.' => 'Прикачването на файлове е забранено.',
'Unable to upload a file.' => 'Неуспешно прикачване на файл.',
'Maximum allowed file size is %sB.' => 'Максимално разрешената големина на файл е %sB.',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Изпратени са прекалено много данни. Намалете обема на данните или увеличете %s управляващата директива.',
'You can upload a big SQL file via FTP and import it from server.' => 'Можете да прикачите голям SQL файл чрез FTP и да го импортирате от сървъра.',
'You are offline.' => 'Вие сте офлайн.',
'Export' => 'Експорт',
'Output' => 'Резултат',
'open' => 'показване',
'save' => 'запис',
'Format' => 'Формат',
'Data' => 'Данни',
'Database' => 'База данни',
'database' => 'база данни',
'Use' => 'Избор',
'Select database' => 'Избор на база данни',
'Invalid database.' => 'Невалидна база данни.',
'Database has been dropped.' => 'Базата данни беше премахната.',
'Databases have been dropped.' => 'Базите данни бяха премехнати.',
'Database has been created.' => 'Базата данни беше създадена.',
'Database has been renamed.' => 'Базата данни беше преименувана.',
'Database has been altered.' => 'Базата данни беше променена.',
'Alter database' => 'Промяна на база данни',
'Create database' => 'Създаване на база данни',
'Database schema' => 'Схема на базата данни',
// link to current database schema layout
'Permanent link' => 'Постоянна препратка',
// thousands separator - must contain single byte
',' => ',',
'0123456789' => '0123456789',
'Engine' => 'Система',
'Collation' => 'Кодировка',
'Data Length' => 'Големина на данните',
'Index Length' => 'Големина на индекса',
'Data Free' => 'Свободно място',
'Rows' => 'Редове',
'%d in total' => '%d всичко',
'Analyze' => 'Анализиране',
'Optimize' => 'Оптимизиране',
'Vacuum' => 'Консолидиране',
'Check' => 'Проверка',
'Repair' => 'Поправка',
'Truncate' => 'Изрязване',
'Tables have been truncated.' => 'Таблиците бяха изрязани.',
'Move to other database' => 'Преместване в друга база данни',
'Move' => 'Преместване',
'Tables have been moved.' => 'Таблиците бяха преместени.',
'Copy' => 'Копиране',
'Tables have been copied.' => 'Таблиците бяха копирани.',
'Routines' => 'Процедури',
'Routine has been called, %d row(s) affected.' => array('Беше приложена процедура, %d ред е засегнат.', 'Беше приложена процедура, %d редове са засегнати.'),
'Call' => 'Прилагане',
'Parameter name' => 'Име на параметъра',
'Create procedure' => 'Създаване на процедура',
'Create function' => 'Създаване на функция',
'Routine has been dropped.' => 'Процедурата беше премахната.',
'Routine has been altered.' => 'Процедурата беше променена.',
'Routine has been created.' => 'Процедурата беше създадена.',
'Alter function' => 'Промяна на функция',
'Alter procedure' => 'Промяна на процедура',
'Return type' => 'Резултат',
'Events' => 'Събития',
'Event has been dropped.' => 'Събитието беше премахнато.',
'Event has been altered.' => 'Събитието беше променено.',
'Event has been created.' => 'Събитието беше създадено.',
'Alter event' => 'Промяна на събитие',
'Create event' => 'Създаване на събитие',
'At given time' => 'В зададено време',
'Every' => 'Всеки',
'Schedule' => 'Насрочване',
'Start' => 'Начало',
'End' => 'Край',
'On completion preserve' => 'Запазване след завършване',
'Tables' => 'Таблици',
'Tables and views' => 'Таблици и изгледи',
'Table' => 'Таблица',
'No tables.' => 'Няма таблици.',
'Alter table' => 'Промяна на таблица',
'Create table' => 'Създаване на таблица',
'Table has been dropped.' => 'Таблицата беше премахната.',
'Tables have been dropped.' => 'Таблиците бяха премахнати.',
'Tables have been optimized.' => 'Таблиците бяха оптимизирани.',
'Table has been altered.' => 'Таблицата беше променена.',
'Table has been created.' => 'Таблицата беше създадена.',
'Table name' => 'Име на таблица',
'Show structure' => 'Структура',
'engine' => 'система',
'collation' => 'кодировка',
'Column name' => 'Име на колоната',
'Type' => 'Вид',
'Length' => 'Големина',
'Auto Increment' => 'Автоматично увеличаване',
'Options' => 'Опции',
'Comment' => 'Коментар',
'Default value' => 'Стойност по подразбиране',
'Default values' => 'Стойности по подразбиране',
'Drop' => 'Премахване',
'Are you sure?' => 'Сигурни ли сте?',
'Size' => 'Големина',
'Compute' => 'Изчисляване',
'Move up' => 'Преместване нагоре',
'Move down' => 'Преместване надолу',
'Remove' => 'Премахване',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Максималния брой полета е превишен. Моля, увеличете %s.',
'Partition by' => 'Разделяне на',
'Partitions' => 'Раздели',
'Partition name' => 'Име на раздела',
'Values' => 'Стойности',
'View' => 'Изглед',
'Materialized view' => 'Запаметен изглед',
'View has been dropped.' => 'Изгледа беше премахнат.',
'View has been altered.' => 'Изгледа беше променен.',
'View has been created.' => 'Изгледа беше създаден.',
'Alter view' => 'Промяна на изглед',
'Create view' => 'Създаване на изглед',
'Indexes' => 'Индекси',
'Indexes have been altered.' => 'Индексите бяха променени.',
'Alter indexes' => 'Промяна на индекси',
'Add next' => 'Добавяне на следващ',
'Index Type' => 'Вид на индекса',
'Column (length)' => 'Колона (дължина)',
'Foreign keys' => 'Препратки',
'Foreign key' => 'Препратка',
'Foreign key has been dropped.' => 'Препратката беше премахната.',
'Foreign key has been altered.' => 'Препратката беше променена.',
'Foreign key has been created.' => 'Препратката беше създадена.',
'Target table' => 'Таблица приемник',
'Change' => 'Промяна',
'Source' => 'Източник',
'Target' => 'Цел',
'Add column' => 'Добавяне на колона',
'Alter' => 'Промяна',
'Add foreign key' => 'Добавяне на препратка',
'ON DELETE' => 'При изтриване',
'ON UPDATE' => 'При промяна',
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Колоните източник и цел трябва да са от еднакъв вид, трябва да има индекс на колоните приемник и да има въведени данни.',
'Triggers' => 'Тригери',
'Add trigger' => 'Добавяне на тригер',
'Trigger has been dropped.' => 'Тригера беше премахнат.',
'Trigger has been altered.' => 'Тригера беше променен.',
'Trigger has been created.' => 'Тригера беше създаден.',
'Alter trigger' => 'Промяна на тригер',
'Create trigger' => 'Създаване на тригер',
'Time' => 'Време',
'Event' => 'Събитие',
'Name' => 'Име',
'select' => 'показване',
'Select' => 'Показване',
'Select data' => 'Показване на данни',
'Functions' => 'Функции',
'Aggregation' => 'Съвкупност',
'Search' => 'Търсене',
'anywhere' => 'навсякъде',
'Search data in tables' => 'Търсене на данни в таблиците',
'Sort' => 'Сортиране',
'descending' => 'низходящо',
'Limit' => 'Редове',
'Limit rows' => 'Лимит на редовете',
'Text length' => 'Текст',
'Action' => 'Действие',
'Full table scan' => 'Пълно сканиране на таблицата',
'Unable to select the table' => 'Неуспешно показване на таблицата',
'No rows.' => 'Няма редове.',
'%d / ' => '%d / ',
'%d row(s)' => array('%d ред', '%d реда'),
'Page' => 'Страница',
'last' => 'последен',
'Load more data' => 'Зареждане на повече данни',
'Loading' => 'Зареждане',
'Whole result' => 'Пълен резултат',
'%d byte(s)' => array('%d байт', '%d байта'),
'Import' => 'Импорт',
'%d row(s) have been imported.' => array('%d ред беше импортиран.', '%d реда бяха импортирани.'),
'File must be in UTF-8 encoding.' => 'Файла трябва да е с UTF-8 кодировка.',
// in-place editing in select
'Modify' => 'Промяна',
'Ctrl+click on a value to modify it.' => 'Ctrl+щракване в стойността, за да я промените.',
'Use edit link to modify this value.' => 'Използвайте "редакция" за промяна на данните.',
// %s can contain auto-increment value
'Item%s has been inserted.' => 'Елементи%s бяха вмъкнати.',
'Item has been deleted.' => 'Елемента беше изтрит.',
'Item has been updated.' => 'Елемента беше обновен.',
'%d item(s) have been affected.' => array('%d елемент беше засегнат.', '%d елемента бяха засегнати.'),
'New item' => 'Нов елемент',
'original' => 'оригинал',
// label for value '' in enum data type
'empty' => 'празно',
'edit' => 'редакция',
'Edit' => 'Редактиране',
'Insert' => 'Вмъкване',
'Save' => 'Запис',
'Saving' => 'Записване',
'Save and continue edit' => 'Запис и редакция',
'Save and insert next' => 'Запис и нов',
'Selected' => 'Избран',
'Clone' => 'Клониране',
'Delete' => 'Изтриване',
'You have no privileges to update this table.' => 'Нямате праве за обновяване на таблицата.',
'E-mail' => 'E-mail',
'From' => 'От',
'Subject' => 'Тема',
'Attachments' => 'Прикачени',
'Send' => 'Изпращане',
'%d e-mail(s) have been sent.' => array('%d писмо беше изпратено.', '%d писма бяха изпратени.'),
// data type descriptions
'Numbers' => 'Числа',
'Date and time' => 'Дата и час',
'Strings' => 'Низове',
'Binary' => 'Двоични',
'Lists' => 'Списъци',
'Network' => 'Мрежа',
'Geometry' => 'Геометрия',
'Relations' => 'Зависимости',
'Editor' => 'Редактор',
// date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
'$1-$3-$5' => '$1-$3-$5',
// hint for date format - use language equivalents for day, month and year shortcuts
'[yyyy]-mm-dd' => '[гггг]-мм-дд',
// hint for time format - use language equivalents for hour, minute and second shortcuts
'HH:MM:SS' => 'ЧЧ:ММ:СС',
'now' => 'сега',
'yes' => 'да',
'no' => 'не',
// general SQLite error in create, drop or rename database
'File exists.' => 'Файла вече съществува.',
'Please use one of the extensions %s.' => 'Моля, използвайте някое от разширенията %s.',
// PostgreSQL and MS SQL schema support
'Alter schema' => 'Промяна на схемата',
'Create schema' => 'Създаване на схема',
'Schema has been dropped.' => 'Схемата беше премахната.',
'Schema has been created.' => 'Схемата беше създадена.',
'Schema has been altered.' => 'Схемата беше променена.',
'Schema' => 'Схема',
'Invalid schema.' => 'Невалидна схема.',
// PostgreSQL sequences support
'Sequences' => 'Последователности',
'Create sequence' => 'Създаване на последователност',
'Sequence has been dropped.' => 'Последователността беше премахната.',
'Sequence has been created.' => 'Последователността беше създадена.',
'Sequence has been altered.' => 'Последователността беше променена.',
'Alter sequence' => 'Промяна на последователност',
// PostgreSQL user types support
'User types' => 'Видове потребители',
'Create type' => 'Създаване на вид',
'Type has been dropped.' => 'Вида беше пермахнат.',
'Type has been created.' => 'Вида беше създаден.',
'Alter type' => 'Промяна на вид',
);

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'পাসওয়ার্ড', 'Password' => 'পাসওয়ার্ড',
'Select database' => 'ডাটাবেজ নির্বাচন করো', 'Select database' => 'ডাটাবেজ নির্বাচন করো',
'Invalid database.' => 'ভুল ডাটাবেজ।', 'Invalid database.' => 'ভুল ডাটাবেজ।',
'Create new database' => 'নতুন ডাটাবেজ তৈরী করো',
'Table has been dropped.' => 'টেবিল মুছে ফেলা হয়েছে।', 'Table has been dropped.' => 'টেবিল মুছে ফেলা হয়েছে।',
'Table has been altered.' => 'টেবিল সম্পাদনা করা হয়েছে।', 'Table has been altered.' => 'টেবিল সম্পাদনা করা হয়েছে।',
'Table has been created.' => 'টেবিল তৈরী করা হয়েছে।', 'Table has been created.' => 'টেবিল তৈরী করা হয়েছে।',
@@ -187,7 +186,7 @@ $translations = array(
'original' => 'প্রকৃত', 'original' => 'প্রকৃত',
'Tables have been dropped.' => 'টেবিলসমূহ মুছে ফেলা হয়েছে।', 'Tables have been dropped.' => 'টেবিলসমূহ মুছে ফেলা হয়েছে।',
'%d item(s) have been affected.' => '%d টি বিষয়বস্তু প্রভাবিত হয়েছে', '%d item(s) have been affected.' => '%d টি বিষয়বস্তু প্রভাবিত হয়েছে',
'whole result' => 'সম্পূর্ণ ফলাফল', 'Whole result' => 'সম্পূর্ণ ফলাফল',
'Clone' => 'ক্লোন', 'Clone' => 'ক্লোন',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'অনুমোদিত ফিল্ড এর সর্বাধিক সংখ্যা অতিক্রম করে গেছে। অনুগ্রহপূর্বক %s বৃদ্ধি করুন।', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'অনুমোদিত ফিল্ড এর সর্বাধিক সংখ্যা অতিক্রম করে গেছে। অনুগ্রহপূর্বক %s বৃদ্ধি করুন।',
'Partition by' => 'পার্টিশন যার মাধ্যমে', 'Partition by' => 'পার্টিশন যার মাধ্যমে',

321
adminer/lang/bs.inc.php Normal file
View File

@@ -0,0 +1,321 @@
<?php
$translations = array(
// label for database system selection (MySQL, SQLite, ...)
'System' => 'Sistem',
'Server' => 'Server',
'Username' => 'Korisničko ime',
'Password' => 'Lozinka',
'Permanent login' => 'Trajna prijava',
'Login' => 'Prijava',
'Logout' => 'Odjava',
'Logged as: %s' => 'Prijavi se kao: %s',
'Logout successful.' => 'Uspešna odjava.',
'Invalid credentials.' => 'Nevažeće dozvole.',
'Language' => 'Jezik',
'Invalid CSRF token. Send the form again.' => 'Nevažeći CSRF kod. Proslijedite ponovo formu.',
'No extension' => 'Bez dodataka',
'None of the supported PHP extensions (%s) are available.' => 'Nijedan od podržanih PHP dodataka nije dostupan.',
'Session support must be enabled.' => 'Morate omogućiti podršku za sesije.',
'Session expired, please login again.' => 'Vaša sesija je istekla, prijavite se ponovo.',
'%s version: %s through PHP extension %s' => '%s verzija: %s pomoću PHP dodatka je %s',
'Refresh' => 'Osveži',
// text direction - 'ltr' or 'rtl'
'ltr' => 'ltr',
'Privileges' => 'Dozvole',
'Create user' => 'Novi korisnik',
'User has been dropped.' => 'Korisnik je izbrisan.',
'User has been altered.' => 'Korisnik je izmijenjen.',
'User has been created.' => 'korisnik je spašen.',
'Hashed' => 'Heširano',
'Column' => 'kolumna',
'Routine' => 'Rutina',
'Grant' => 'Dozvoli',
'Revoke' => 'Opozovi',
'Process list' => 'Spisak procesa',
'%d process(es) have been killed.' => array('%d proces je ukinut.', '%d procesa su ukinuta.', '%d procesa je ukinuto.'),
'Kill' => 'Ubij',
'Variables' => 'Promijenljive',
'Status' => 'Status',
'SQL command' => 'SQL komanda',
'%d query(s) executed OK.' => array('%d upit je uspiješno izvršen.', '%d upita su uspiješno izvršena.', '%d upita je uspiješno izvršeno.'),
'Query executed OK, %d row(s) affected.' => array('Upit je uspiješno izvršen, %d red je ažuriran.', 'Upit je uspiješno izvršen, %d reda su ažurirana.', 'Upit je uspiješno izvršen, %d redova je ažurirano.'),
'No commands to execute.' => 'Bez komandi za izvršavanje.',
'Error in query' => 'Greška u upitu',
'Execute' => 'Izvrši',
'Stop on error' => 'Zaustavi prilikom greške',
'Show only errors' => 'Prikazuj samo greške',
// sprintf() format for time of the command
'%.3f s' => '%.3f s',
'History' => 'Historijat',
'Clear' => 'Očisti',
'Edit all' => 'Izmijeni sve',
'File upload' => 'Slanje datoteka',
'From server' => 'Sa servera',
'Webserver file %s' => 'Datoteka %s sa veb servera',
'Run file' => 'Pokreni datoteku',
'File does not exist.' => 'Datoteka ne postoji.',
'File uploads are disabled.' => 'Onemogućeno je slanje datoteka.',
'Unable to upload a file.' => 'Slanje datoteke nije uspelo.',
'Maximum allowed file size is %sB.' => 'Najveća dozvoljena veličina datoteke je %sB.',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Preveliki POST podatak. Morate da smanjite podatak ili povećajte vrijednost konfiguracione direktive %s.',
'Export' => 'Izvoz',
'Output' => 'Ispis',
'open' => 'otvori',
'save' => 'spasi',
'Format' => 'Format',
'Data' => 'Podaci',
'Database' => 'Baza podataka',
'database' => 'baza podataka',
'Use' => 'Koristi',
'Select database' => 'Izaberite bazu',
'Invalid database.' => 'Neispravna baza podataka.',
'Database has been dropped.' => 'Baza podataka je izbrisana.',
'Databases have been dropped.' => 'Baze podataka su izbrisane.',
'Database has been created.' => 'Baza podataka je spašena.',
'Database has been renamed.' => 'Baza podataka je preimenovana.',
'Database has been altered.' => 'Baza podataka je izmijenjena.',
'Alter database' => 'Ažuriraj bazu podataka',
'Create database' => 'Formiraj bazu podataka',
'Database schema' => 'Šema baze podataka',
// link to current database schema layout
'Permanent link' => 'Trajna veza',
// thousands separator - must contain single byte
',' => ',',
'0123456789' => '0123456789',
'Engine' => 'Stroj',
'Collation' => 'Sravnjivanje',
'Data Length' => 'Dužina podataka',
'Index Length' => 'Dužina indeksa',
'Data Free' => 'Slobodno podataka',
'Rows' => 'Redova',
'%d in total' => 'ukupno %d',
'Analyze' => 'Analiziraj',
'Optimize' => 'Optimizuj',
'Check' => 'Provjeri',
'Repair' => 'Popravi',
'Truncate' => 'Isprazni',
'Tables have been truncated.' => 'Tabele su ispražnjene.',
'Move to other database' => 'Premijesti u drugu bazu podataka',
'Move' => 'Premijesti',
'Tables have been moved.' => 'Tabele su premješćene.',
'Copy' => 'Umnoži',
'Tables have been copied.' => 'Tabele su umnožene.',
'Routines' => 'Rutine',
'Routine has been called, %d row(s) affected.' => array('Pozvana je rutina, %d red je ažuriran.', 'Pozvana je rutina, %d reda su ažurirani.', 'Pozvana je rutina, %d redova je ažurirano.'),
'Call' => 'Pozovi',
'Parameter name' => 'Naziv parametra',
'Create procedure' => 'Formiraj proceduru',
'Create function' => 'Formiraj funkciju',
'Routine has been dropped.' => 'Rutina je izbrisana.',
'Routine has been altered.' => 'Rutina je izmijenjena.',
'Routine has been created.' => 'Rutina je spašena.',
'Alter function' => 'Ažuriraj funkciju',
'Alter procedure' => 'Ažuriraj proceduru',
'Return type' => 'Povratni tip',
'Events' => 'Događaji',
'Event has been dropped.' => 'Događaj je izbrisan.',
'Event has been altered.' => 'Događaj je izmijenjen.',
'Event has been created.' => 'Događaj je spašen.',
'Alter event' => 'Ažuriraj događaj',
'Create event' => 'Napravi događaj',
'At given time' => 'U zadato vrijeme',
'Every' => 'Svaki',
'Schedule' => 'Raspored',
'Start' => 'Početak',
'End' => 'Kraj',
'On completion preserve' => 'Zadrži po završetku',
'Tables' => 'Tabele',
'Tables and views' => 'Tabele i pogledi',
'Table' => 'Tabela',
'No tables.' => 'Bez tabela.',
'Alter table' => 'Ažuriraj tabelu',
'Create table' => 'Napravi tabelu',
'Table has been dropped.' => 'Tabela je izbrisana.',
'Tables have been dropped.' => 'Tabele su izbrisane.',
'Tables have been optimized.' => 'Tabele su optimizovane.',
'Table has been altered.' => 'Tabela je izmijenjena.',
'Table has been created.' => 'Tabela je spašena.',
'Table name' => 'Naziv tabele',
'Show structure' => 'Prikaži strukturu',
'engine' => 'stroj',
'collation' => 'Sravnjivanje',
'Column name' => 'Naziv kolumne',
'Type' => 'Tip',
'Length' => 'Dužina',
'Auto Increment' => 'Auto-priraštaj',
'Options' => 'Opcije',
'Comment' => 'Komentar',
'Default values' => 'Podrazumijevane vrijednosti',
'Drop' => 'Izbriši',
'Are you sure?' => 'Da li ste sigurni?',
'Move up' => 'Pomijeri na gore',
'Move down' => 'Pomijeri na dole',
'Remove' => 'Ukloni',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Premašen je maksimalni broj dozvoljenih polja. Molim uvećajte %s.',
'Partition by' => 'Podijeli po',
'Partitions' => 'Podijele',
'Partition name' => 'Ime podijele',
'Values' => 'Vrijednosti',
'View' => 'Pogled',
'View has been dropped.' => 'Pogled je izbrisan.',
'View has been altered.' => 'Pogled je izmijenjen.',
'View has been created.' => 'Pogled je spašen.',
'Alter view' => 'Ažuriraj pogled',
'Create view' => 'Napravi pogled',
'Indexes' => 'Indeksi',
'Indexes have been altered.' => 'Indeksi su izmijenjeni.',
'Alter indexes' => 'Ažuriraj indekse',
'Add next' => 'Dodaj slijedeći',
'Index Type' => 'Tip indeksa',
'Column (length)' => 'kolumna (dužina)',
'Foreign keys' => 'Strani ključevi',
'Foreign key' => 'Strani ključ',
'Foreign key has been dropped.' => 'Strani ključ je izbrisan.',
'Foreign key has been altered.' => 'Strani ključ je izmijenjen.',
'Foreign key has been created.' => 'Strani ključ je spašen.',
'Target table' => 'Ciljna tabela',
'Change' => 'izmijeni',
'Source' => 'Izvor',
'Target' => 'Cilj',
'Add column' => 'Dodaj kolumnu',
'Alter' => 'Ažuriraj',
'Add foreign key' => 'Dodaj strani ključ',
'ON DELETE' => 'ON DELETE (prilikom brisanja)',
'ON UPDATE' => 'ON UPDATE (prilikom osvežavanja)',
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Izvorne i ciljne kolumne moraju biti istog tipa, ciljna kolumna mora biti indeksirana i izvorna tabela mora sadržati podatke iz ciljne.',
'Triggers' => 'Okidači',
'Add trigger' => 'Dodaj okidač',
'Trigger has been dropped.' => 'Okidač je izbrisan.',
'Trigger has been altered.' => 'Okidač je izmijenjen.',
'Trigger has been created.' => 'Okidač je spašen.',
'Alter trigger' => 'Ažuriraj okidač',
'Create trigger' => 'Formiraj okidač',
'Time' => 'Vrijeme',
'Event' => 'Događaj',
'Name' => 'Ime',
'select' => 'izaberi',
'Select' => 'Izaberi',
'Selected' => 'Izabrano',
'Select data' => 'Izaberi podatke',
'Functions' => 'Funkcije',
'Aggregation' => 'Sakupljanje',
'Search' => 'Pretraga',
'anywhere' => 'bilo gdje',
'Search data in tables' => 'Pretraži podatke u tabelama',
'Sort' => 'Poređaj',
'descending' => 'opadajuće',
'Limit' => 'Granica',
'Text length' => 'Dužina teksta',
'Action' => 'Akcija',
'Full table scan' => 'Skreniranje kompletne tabele',
'Unable to select the table' => 'Ne mogu da izaberem tabelu',
'No rows.' => 'Bez redova.',
'%d row(s)' => array('%d red', '%d reda', '%d redova'),
'Page' => 'Strana',
'last' => 'poslijednja',
'Loading' => 'Učitavam',
'Load more data' => 'Učitavam još podataka',
'Whole result' => 'Ceo rezultat',
'%d byte(s)' => array('%d bajt', '%d bajta', '%d bajtova'),
'Import' => 'Uvoz',
'%d row(s) have been imported.' => array('%d red je uvežen.', '%d reda su uvežena.', '%d redova je uveženo.'),
// in-place editing in select
'Ctrl+click on a value to modify it.' => 'Ctrl+klik na vrijednost za izmijenu.',
'Use edit link to modify this value.' => 'Koristi vezu za izmijenu ove vrijednosti.',
// %s can contain auto-increment value
'Item%s has been inserted.' => 'Stavka %s je spašena.',
'Item has been deleted.' => 'Stavka je izbrisana.',
'Item has been updated.' => 'Stavka je izmijenjena.',
'%d item(s) have been affected.' => array('%d stavka je ažurirana.', '%d stavke su ažurirane.', '%d stavki je ažurirano.'),
'New item' => 'Nova stavka',
'original' => 'original',
// label for value '' in enum data type
'empty' => 'prazno',
'edit' => 'izmijeni',
'Edit' => 'Izmijeni',
'Insert' => 'Umetni',
'Save' => 'Sačuvaj',
'Save and continue edit' => 'Sačuvaj i nastavi uređenje',
'Save and insert next' => 'Sačuvaj i umijetni slijedeće',
'Clone' => 'Dupliraj',
'Delete' => 'Izbriši',
'Modify' => 'Izmjene',
'E-mail' => 'El. pošta',
'From' => 'Od',
'Subject' => 'Naslov',
'Attachments' => 'Prilozi',
'Send' => 'Pošalji',
'%d e-mail(s) have been sent.' => array('%d poruka el. pošte je poslata.', '%d poruke el. pošte su poslate.', '%d poruka el. pošte je poslato.'),
// data type descriptions
'Numbers' => 'Broj',
'Date and time' => 'Datum i vrijeme',
'Strings' => 'Tekst',
'Binary' => 'Binarno',
'Lists' => 'Liste',
'Network' => 'Mreža',
'Geometry' => 'Geometrija',
'Relations' => 'Odnosi',
'Editor' => 'Uređivač',
// date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
'$1-$3-$5' => '$5.$3.$1.',
// hint for date format - use language equivalents for day, month and year shortcuts
'[yyyy]-mm-dd' => 'dd.mm.[yyyy].',
// hint for time format - use language equivalents for hour, minute and second shortcuts
'HH:MM:SS' => 'HH:MM:SS',
'now' => 'sad',
'yes' => 'da',
'no' => 'ne',
// general SQLite error in create, drop or rename database
'File exists.' => 'Datoteka već postoji.',
'Please use one of the extensions %s.' => 'Molim koristite jedan od nastavaka %s.',
// PostgreSQL and MS SQL schema support
'Alter schema' => 'Ažuriraj šemu',
'Create schema' => 'Formiraj šemu',
'Schema has been dropped.' => 'Šema je izbrisana.',
'Schema has been created.' => 'Šema je spašena.',
'Schema has been altered.' => 'Šema je izmijenjena.',
'Schema' => 'Šema',
'Invalid schema.' => 'Šema nije ispravna.',
// PostgreSQL sequences support
'Sequences' => 'Nizovi',
'Create sequence' => 'Napravi niz',
'Sequence has been dropped.' => 'Niz je izbrisan.',
'Sequence has been created.' => 'Niz je formiran.',
'Sequence has been altered.' => 'Niz je izmijenjen.',
'Alter sequence' => 'Ažuriraj niz',
// PostgreSQL user types support
'User types' => 'Korisnički tipovi',
'Create type' => 'Definiši tip',
'Type has been dropped.' => 'Tip je izbrisan.',
'Type has been created.' => 'tip je spašen.',
'Alter type' => 'Ažuriraj tip',
);

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Contrasenya', 'Password' => 'Contrasenya',
'Select database' => 'Selecciona base de dades', 'Select database' => 'Selecciona base de dades',
'Invalid database.' => 'Base de dades invàlida.', 'Invalid database.' => 'Base de dades invàlida.',
'Create new database' => 'Crea una nova base de dades',
'Table has been dropped.' => 'S\'ha suprimit la taula.', 'Table has been dropped.' => 'S\'ha suprimit la taula.',
'Table has been altered.' => 'S\'ha modificat la taula.', 'Table has been altered.' => 'S\'ha modificat la taula.',
'Table has been created.' => 'S\'ha creat la taula.', 'Table has been created.' => 'S\'ha creat la taula.',
@@ -186,7 +185,7 @@ $translations = array(
'Save and continue edit' => 'Desa i segueix editant', 'Save and continue edit' => 'Desa i segueix editant',
'original' => 'original', 'original' => 'original',
'%d item(s) have been affected.' => array('S\'ha modificat %d element.', 'S\'han modificat %d elements.'), '%d item(s) have been affected.' => array('S\'ha modificat %d element.', 'S\'han modificat %d elements.'),
'whole result' => 'tots els resultats', 'Whole result' => 'Tots els resultats',
'Tables have been dropped.' => 'S\'han suprimit les taules.', 'Tables have been dropped.' => 'S\'han suprimit les taules.',
'Clone' => 'Clona', 'Clone' => 'Clona',
'Partition by' => 'Fes particions segons', 'Partition by' => 'Fes particions segons',

View File

@@ -10,16 +10,20 @@ $translations = array(
'Logout' => 'Odhlásit', 'Logout' => 'Odhlásit',
'Logged as: %s' => 'Přihlášen jako: %s', 'Logged as: %s' => 'Přihlášen jako: %s',
'Logout successful.' => 'Odhlášení proběhlo v pořádku.', 'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
'Thanks for using Adminer, consider <a href="%s">donating</a>.' => 'Díky za použití Admineru, zvažte <a href="%s">příspěvek</a>.',
'Invalid credentials.' => 'Neplatné přihlašovací údaje.', 'Invalid credentials.' => 'Neplatné přihlašovací údaje.',
'<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => 'Pro přihlášení k SQLite <a href="https://www.adminer.org/cs/extension/"%s>implementujte</a> metodu %s.',
'Too many unsuccessful logins, try again in %d minute(s).' => array('Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minutu.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minuty.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minut.'), 'Too many unsuccessful logins, try again in %d minute(s).' => array('Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minutu.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minuty.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minut.'),
'Master password expired. <a href="http://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Platnost hlavního hesla vypršela. <a href="http://www.adminer.org/cs/extension/" target="_blank">Implementujte</a> metodu %s, aby platilo stále.', 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Platnost hlavního hesla vypršela. <a href="https://www.adminer.org/cs/extension/"%s>Implementujte</a> metodu %s, aby platilo stále.',
'Language' => 'Jazyk', 'Language' => 'Jazyk',
'Invalid CSRF token. Send the form again.' => 'Neplatný token CSRF. Odešlete formulář znovu.', 'Invalid CSRF token. Send the form again.' => 'Neplatný token CSRF. Odešlete formulář znovu.',
'If you did not send this request from Adminer then close this page.' => 'Pokud jste tento požadavek neposlali z Adminera, tak tuto stránku zavřete.', 'If you did not send this request from Adminer then close this page.' => 'Pokud jste tento požadavek neposlali z Adminera, tak tuto stránku zavřete.',
'No extension' => 'Žádné rozšíření', 'No extension' => 'Žádné rozšíření',
'None of the supported PHP extensions (%s) are available.' => 'Není dostupné žádné z podporovaných PHP rozšíření (%s).', 'None of the supported PHP extensions (%s) are available.' => 'Není dostupné žádné z podporovaných PHP rozšíření (%s).',
'Connecting to privileged ports is not allowed.' => 'Připojování k privilegovaným portům není povoleno.',
'Session support must be enabled.' => 'Session proměnné musí být povolené.', 'Session support must be enabled.' => 'Session proměnné musí být povolené.',
'Session expired, please login again.' => 'Session vypršela, přihlašte se prosím znovu.', 'Session expired, please login again.' => 'Session vypršela, přihlašte se prosím znovu.',
'The action will be performed after successful login with the same credentials.' => 'Akce bude provedena po úspěšném přihlášení se stejnými přihlašovacími údaji.',
'%s version: %s through PHP extension %s' => 'Verze %s: %s přes PHP rozšíření %s', '%s version: %s through PHP extension %s' => 'Verze %s: %s přes PHP rozšíření %s',
'Refresh' => 'Obnovit', 'Refresh' => 'Obnovit',
@@ -49,6 +53,8 @@ $translations = array(
'Query executed OK, %d row(s) affected.' => array('Příkaz proběhl v pořádku, byl změněn %d záznam.', 'Příkaz proběhl v pořádku, byly změněny %d záznamy.', 'Příkaz proběhl v pořádku, bylo změněno %d záznamů.'), 'Query executed OK, %d row(s) affected.' => array('Příkaz proběhl v pořádku, byl změněn %d záznam.', 'Příkaz proběhl v pořádku, byly změněny %d záznamy.', 'Příkaz proběhl v pořádku, bylo změněno %d záznamů.'),
'No commands to execute.' => 'Žádné příkazy k vykonání.', 'No commands to execute.' => 'Žádné příkazy k vykonání.',
'Error in query' => 'Chyba v dotazu', 'Error in query' => 'Chyba v dotazu',
'Warnings' => 'Varování',
'ATTACH queries are not supported.' => 'Dotazy ATTACH nejsou podporované.',
'Execute' => 'Provést', 'Execute' => 'Provést',
'Stop on error' => 'Zastavit při chybě', 'Stop on error' => 'Zastavit při chybě',
'Show only errors' => 'Zobrazit pouze chyby', 'Show only errors' => 'Zobrazit pouze chyby',
@@ -79,10 +85,10 @@ $translations = array(
'Database' => 'Databáze', 'Database' => 'Databáze',
'database' => 'databáze', 'database' => 'databáze',
'DB' => 'DB',
'Use' => 'Vybrat', 'Use' => 'Vybrat',
'Select database' => 'Vybrat databázi', 'Select database' => 'Vybrat databázi',
'Invalid database.' => 'Nesprávná databáze.', 'Invalid database.' => 'Nesprávná databáze.',
'Create new database' => 'Vytvořit novou databázi',
'Database has been dropped.' => 'Databáze byla odstraněna.', 'Database has been dropped.' => 'Databáze byla odstraněna.',
'Databases have been dropped.' => 'Databáze byly odstraněny.', 'Databases have been dropped.' => 'Databáze byly odstraněny.',
'Database has been created.' => 'Databáze byla vytvořena.', 'Database has been created.' => 'Databáze byla vytvořena.',
@@ -168,6 +174,7 @@ $translations = array(
'Default value' => 'Výchozí hodnota', 'Default value' => 'Výchozí hodnota',
'Default values' => 'Výchozí hodnoty', 'Default values' => 'Výchozí hodnoty',
'Drop' => 'Odstranit', 'Drop' => 'Odstranit',
'Drop %s?' => 'Odstranit %s?',
'Are you sure?' => 'Opravdu?', 'Are you sure?' => 'Opravdu?',
'Size' => 'Velikost', 'Size' => 'Velikost',
'Compute' => 'Spočítat', 'Compute' => 'Spočítat',
@@ -182,13 +189,12 @@ $translations = array(
'Values' => 'Hodnoty', 'Values' => 'Hodnoty',
'View' => 'Pohled', 'View' => 'Pohled',
'Materialized View' => 'Materializovaný pohled', 'Materialized view' => 'Materializovaný pohled',
'View has been dropped.' => 'Pohled byl odstraněn.', 'View has been dropped.' => 'Pohled byl odstraněn.',
'View has been altered.' => 'Pohled byl změněn.', 'View has been altered.' => 'Pohled byl změněn.',
'View has been created.' => 'Pohled byl vytvořen.', 'View has been created.' => 'Pohled byl vytvořen.',
'Alter view' => 'Pozměnit pohled', 'Alter view' => 'Pozměnit pohled',
'Create view' => 'Vytvořit pohled', 'Create view' => 'Vytvořit pohled',
'Create materialized view' => 'Vytvořit materializovaný pohled',
'Indexes' => 'Indexy', 'Indexes' => 'Indexy',
'Indexes have been altered.' => 'Indexy byly změněny.', 'Indexes have been altered.' => 'Indexy byly změněny.',
@@ -247,7 +253,7 @@ $translations = array(
'last' => 'poslední', 'last' => 'poslední',
'Load more data' => 'Nahrát další data', 'Load more data' => 'Nahrát další data',
'Loading' => 'Nahrává se', 'Loading' => 'Nahrává se',
'whole result' => 'celý výsledek', 'Whole result' => 'Celý výsledek',
'%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtů'), '%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtů'),
'Import' => 'Import', 'Import' => 'Import',

View File

@@ -10,7 +10,7 @@ $translations = array(
'Logged as: %s' => 'Logget ind som: %s', 'Logged as: %s' => 'Logget ind som: %s',
'Logout successful.' => 'Log af vellykket.', 'Logout successful.' => 'Log af vellykket.',
'Invalid credentials.' => 'Ugyldige log ind oplysninger.', 'Invalid credentials.' => 'Ugyldige log ind oplysninger.',
'Master password expired. <a href="http://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Master-kodeordet er udløbet. <a href="http://www.adminer.org/en/extension/" target="_blank">Implementer</a> en metode for %s for at gøre det permanent.', 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-kodeordet er udløbet. <a href="https://www.adminer.org/en/extension/"%s>Implementer</a> en metode for %s for at gøre det permanent.',
'Language' => 'Sprog', 'Language' => 'Sprog',
'Invalid CSRF token. Send the form again.' => 'Ugyldigt CSRF-token - Genindsend formen.', 'Invalid CSRF token. Send the form again.' => 'Ugyldigt CSRF-token - Genindsend formen.',
'No extension' => 'Ingen udvidelse', 'No extension' => 'Ingen udvidelse',
@@ -68,7 +68,6 @@ $translations = array(
'Use' => 'Brug', 'Use' => 'Brug',
'Select database' => 'Vælg database', 'Select database' => 'Vælg database',
'Invalid database.' => 'Ugyldig database.', 'Invalid database.' => 'Ugyldig database.',
'Create new database' => 'Opret ny database',
'Database has been dropped.' => 'Databasen er blevet slettet.', 'Database has been dropped.' => 'Databasen er blevet slettet.',
'Databases have been dropped.' => 'Databasene er blevet slettet.', 'Databases have been dropped.' => 'Databasene er blevet slettet.',
'Database has been created.' => 'Databasen er oprettet.', 'Database has been created.' => 'Databasen er oprettet.',
@@ -213,7 +212,7 @@ $translations = array(
'last' => 'sidste', 'last' => 'sidste',
'Load more data' => 'Indlæs mere data', 'Load more data' => 'Indlæs mere data',
'Loading' => 'Indlæser', 'Loading' => 'Indlæser',
'whole result' => 'hele resultatet', 'Whole result' => 'Hele resultatet',
'%d byte(s)' => array('%d byte', '%d bytes'), '%d byte(s)' => array('%d byte', '%d bytes'),
'Import' => 'Importer', 'Import' => 'Importer',
'%d row(s) have been imported.' => array('%d række er importeret.', '%d rækker er importeret.'), '%d row(s) have been imported.' => array('%d række er importeret.', '%d rækker er importeret.'),

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Passwort', 'Password' => 'Passwort',
'Select database' => 'Datenbank auswählen', 'Select database' => 'Datenbank auswählen',
'Invalid database.' => 'Datenbank ungültig.', 'Invalid database.' => 'Datenbank ungültig.',
'Create new database' => 'Datenbank erstellen',
'Table has been dropped.' => 'Tabelle wurde entfernt.', 'Table has been dropped.' => 'Tabelle wurde entfernt.',
'Table has been altered.' => 'Tabelle wurde geändert.', 'Table has been altered.' => 'Tabelle wurde geändert.',
'Table has been created.' => 'Tabelle wurde erstellt.', 'Table has been created.' => 'Tabelle wurde erstellt.',
@@ -187,7 +186,7 @@ $translations = array(
'original' => 'Original', 'original' => 'Original',
'Tables have been dropped.' => 'Tabellen wurden entfernt (drop).', 'Tables have been dropped.' => 'Tabellen wurden entfernt (drop).',
'%d item(s) have been affected.' => '%d Artikel betroffen.', '%d item(s) have been affected.' => '%d Artikel betroffen.',
'whole result' => 'Gesamtergebnis', 'Whole result' => 'Gesamtergebnis',
'Clone' => 'Klonen', 'Clone' => 'Klonen',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Die maximal erlaubte Anzahl der Felder ist überschritten. Bitte %s erhöhen.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Die maximal erlaubte Anzahl der Felder ist überschritten. Bitte %s erhöhen.',
'Partition by' => 'Partitionieren um', 'Partition by' => 'Partitionieren um',
@@ -284,6 +283,6 @@ $translations = array(
'Saving' => 'Speichere', 'Saving' => 'Speichere',
'yes' => 'ja', 'yes' => 'ja',
'no' => 'nein', 'no' => 'nein',
'Master password expired. <a href="http://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Das Master-Passwort ist abgelaufen. <a href="http://www.adminer.org/de/extension/" target="_blank">Implementieren</a> Sie die %s Methode, um es permanent zu machen.', 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Das Master-Passwort ist abgelaufen. <a href="https://www.adminer.org/de/extension/"%s>Implementieren</a> Sie die %s Methode, um es permanent zu machen.',
'%d / ' => '%d / ', '%d / ' => '%d / ',
); );

336
adminer/lang/el.inc.php Normal file
View File

@@ -0,0 +1,336 @@
<?php
$translations = array(
// label for database system selection (MySQL, SQLite, ...)
'System' => 'Σύστημα',
'Server' => 'Διακομιστής',
'Username' => 'Όνομα Χρήστη',
'Password' => 'Κωδικός',
'Permanent login' => 'Μόνιμη Σύνδεση',
'Login' => 'Σύνδεση',
'Logout' => 'Αποσύνδεση',
'Logged as: %s' => 'Συνδεθήκατε ως %s',
'Logout successful.' => 'Αποσυνδεθήκατε με επιτυχία.',
'Invalid credentials.' => 'Εσφαλμένα Διαπιστευτήρια.',
'Too many unsuccessful logins, try again in %d minute(s).' => array('Επανηλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτό.', 'Επανηλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτά.'),
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Έλειξε ο Κύριος Κωδικός. <a href="https://www.adminer.org/en/extension/"%s>Ενεργοποιήστε</a> τη μέθοδο %s για να τον κάνετε μόνιμο.',
'Language' => 'Γλώσσα',
'Invalid CSRF token. Send the form again.' => 'Άκυρο κουπόνι CSRF. Στείλτε τη φόρμα ξανά.',
'If you did not send this request from Adminer then close this page.' => 'Αν δε στείλατε αυτό το αίτημα από το Adminer, τότε κλείστε αυτή τη σελίδα.',
'No extension' => 'Χωρίς Επεκτάσεις',
'None of the supported PHP extensions (%s) are available.' => 'Καμία από τις υποστηριζόμενες επεκτάσεις PHP (%s) δεν είναι διαθέσιμη.',
'Session support must be enabled.' => 'Πρέπει να είναι ενεργοποιημένη η υποστήριξη συνεδριών.',
'Session expired, please login again.' => 'Η συνεδρία έληξε, παρακαλώ συνδεθείτε ξανά.',
'%s version: %s through PHP extension %s' => '%s έκδοση: %s μέσω επέκτασης PHP %s',
'Refresh' => 'Ανανέωση',
// text direction - 'ltr' or 'rtl'
'ltr' => 'ltr',
'Privileges' => 'Προνόμια',
'Create user' => 'Δημιουργία Χρήστη',
'User has been dropped.' => 'Ο Χρήστης διαγράφηκε.',
'User has been altered.' => 'Ο Χρήστης τροποποιήθηκε.',
'User has been created.' => 'Ο Χρήστης δημιουργήθηκε.',
'Hashed' => 'Κωδικοποιήθηκε',
'Column' => 'Στήλη',
'Routine' => 'Ρουτίνα',
'Grant' => 'Παραχώρηση',
'Revoke' => 'Ανάκληση',
'Process list' => 'Λίστα διεργασιών',
'%d process(es) have been killed.' => array('Τερματίστηκαν %d διεργασία.', 'Τερματίστηκαν %d διεργασίες.'),
'Kill' => 'Τερματισμός',
'Variables' => 'Μεταβλητές',
'Status' => 'Κατάσταση',
'SQL command' => 'Εντολή SQL',
'%d query(s) executed OK.' => array('Το ερώτημα %d εκτελέστηκε ΟΚ.', 'Τα ερώτηματα %d εκτελέστηκαν ΟΚ.'),
'Query executed OK, %d row(s) affected.' => array('Το ερώτημα εκτελέστηκε ΟΚ, επιρρεάστηκε %d σειρά.', 'Το ερώτημα εκτελέστηκε ΟΚ, επιρρεάστηκαν %d σειρές.'),
'No commands to execute.' => 'Δεν υπάρχει εντολή να εκτελεστεί.',
'Error in query' => 'Σφάλμα στο ερώτημα',
'Execute' => 'Εκτέλεση',
'Stop on error' => 'Διακοπή όταν υπάρχει σφάλμα',
'Show only errors' => 'Να εμφανίζονται μόνο τα σφάλματα',
// sprintf() format for time of the command
'%.3f s' => '%.3f s',
'History' => 'Ιστορικό',
'Clear' => 'Καθαρισμός',
'Edit all' => 'Επεξεργασία όλων',
'File upload' => 'Ανέβασμα αρχείου',
'From server' => 'Από διακομιστή',
'Webserver file %s' => 'Αρχείο %s από διακομιστή web',
'Run file' => 'Εκτέλεση αρχείου',
'File does not exist.' => 'Το αρχείο δεν υπάρχει.',
'File uploads are disabled.' => 'Έχει απενεργοποιηθεί το ανέβασμα αρχείων.',
'Unable to upload a file.' => 'Δεν είναι δυνατόν να ανεβεί το αρχείο.',
'Maximum allowed file size is %sB.' => 'Το μέγιστο επιτρεπόμενο μέγεθος αρχείο για ανέβασμα είναι %sB.',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Πολλά δεδομένα POST. Μείωστε τα περιεχόμενα ή αυξήστε την σχετική ρύθμιση %s.',
'You can upload a big SQL file via FTP and import it from server.' => 'Μπορείτε να ανεβάσετε ένα μεγάλο αρχείο SQL μέσω FTP και να το εισάγετε από το διακομιστή.',
'You are offline.' => 'Βρίσκεστε εκτός σύνδεσης.',
'Export' => 'Εξαγωγή',
'Output' => 'Αποτέλεσμα',
'open' => 'άνοιγμα',
'save' => 'αποθήκευση',
'Saving' => 'Γίνεται Αποθήκευση',
'Format' => 'Μορφή',
'Data' => 'Δεδομένα',
'Database' => 'Β. Δεδομένων',
'database' => 'β. δεδομένων',
'Use' => 'χρήση',
'Select database' => 'Επιλέξτε Β.Δ.',
'Invalid database.' => 'Άκυρη Β.Δ.',
'Database has been dropped.' => 'Η Β.Δ. διαγράφηκε.',
'Databases have been dropped.' => 'Οι Β.Δ. διαγράφηκαν.',
'Database has been created.' => 'Η Β.Δ. δημιουργήθηκε.',
'Database has been renamed.' => 'Η. Β.Δ. μετονομάστηκε.',
'Database has been altered.' => 'Η Β.Δ. τροποποιήθηκε.',
'Alter database' => 'Τροποποίηση Β.Δ.',
'Create database' => 'Δημιουργία Β.Δ.',
'Database schema' => 'Σχήμα Β.Δ.',
// link to current database schema layout
'Permanent link' => 'Μόνιμος Σύνδεσμος',
// thousands separator - must contain single byte
',' => '.',
'0123456789' => '0123456789',
'Engine' => 'Μηχανή',
'Collation' => 'Collation',
'Data Length' => 'Μήκος Δεδομένων',
'Index Length' => 'Μήκος Δείκτη',
'Data Free' => 'Δεδομένα Ελεύθερα',
'Rows' => 'Σειρές',
'%d in total' => '%d συνολικά',
'Analyze' => 'Ανάλυση',
'Optimize' => 'Βελτιστοποίηση',
'Vacuum' => 'Καθαρισμός',
'Check' => 'Έλεγχος',
'Repair' => 'Επιδιόρθωση',
'Truncate' => 'Περικοπή',
'Tables have been truncated.' => 'Οι πίνακες περικόπτηκαν.',
'Move to other database' => 'Μεταφορά σε άλλη Β.Δ.',
'Move' => 'Μεταφορά',
'Tables have been moved.' => 'Οι πίνακες μεταφέρθηκαν.',
'Copy' => 'Αντιγραφή',
'Tables have been copied.' => 'Οι πίνακες αντιγράφηκαν.',
'Routines' => 'Ρουτίνες',
'Routine has been called, %d row(s) affected.' => array('Η ρουτίνα εκτελέστηκε, επιρρεάστηκε %d σειρά.', 'Η ρουτίνα εκτελέστηκε, επιρρεάστηκαν %d σειρές.'),
'Call' => 'Εκτέλεση',
'Parameter name' => 'Όνομα παραμέτρου',
'Create procedure' => 'Δημιουργία διαδικασίας',
'Create function' => 'Δημιουργία Λειτουργίας',
'Routine has been dropped.' => 'Η ρουτίνα διαγράφηκε.',
'Routine has been altered.' => 'Η ρουτίνα τροποποιήθηκε.',
'Routine has been created.' => 'Η ρουτίνα δημιουργήθηκε.',
'Alter function' => 'Τροποποίηση λειτουργίας',
'Alter procedure' => 'Τροποποίηση διαδικασίας',
'Return type' => 'Επιστρεφόμενος τύπος',
'Events' => 'Γεγονός',
'Event has been dropped.' => 'Το γεγονός διαγράφηκε.',
'Event has been altered.' => 'Το γεγονός τροποποιήθηκε.',
'Event has been created.' => 'Το γεγονός δημιουργήθηκε.',
'Alter event' => 'Τροποποίηση γεγονότος',
'Create event' => 'Δημιουργία γεγονότος',
'At given time' => 'Σε προκαθορισμένο χρόνο',
'Every' => 'Κάθε',
'Schedule' => 'Προγραμματισμός',
'Start' => 'Έναρξη',
'End' => 'Λήξη',
'On completion preserve' => 'Κατά την ολοκλήρωση διατήρησε',
'Tables' => 'Πίνακες',
'Tables and views' => 'Πίνακες και Προβολές',
'Table' => 'Πίνακας',
'No tables.' => 'Χωρίς πίνακες.',
'Alter table' => 'Τροποποίηση πίνακα',
'Create table' => 'Δημιουργία πίνακα',
'Table has been dropped.' => 'Ο πίνακας διαγράφηκε.',
'Tables have been dropped.' => 'Οι πινακες διαγράφηκαν.',
'Tables have been optimized.' => 'Οι πίνακες βελτιστοποιήθηκαν.',
'Table has been altered.' => 'Ο πίνακας τροποποιήθηκε.',
'Table has been created.' => 'Ο πίνακας δημιουργήθηκε.',
'Table name' => 'Όνομα πίνακα',
'Show structure' => 'Προβολή δομής',
'engine' => 'μηχανή',
'collation' => 'collation',
'Column name' => 'Όνομα στήλης',
'Type' => 'Τύπος',
'Length' => 'Μήκος',
'Auto Increment' => 'Αυτόματη αρίθμηση',
'Options' => 'Επιλογές',
'Comment' => 'Σχόλιο',
'Default value' => 'Προεπιλεγμένη τιμή',
'Default values' => 'Προεπιλεγμένες τιμές',
'Drop' => 'Διαγραφή',
'Are you sure?' => 'Είστε σίγουρος;',
'Size' => 'Μέγεθος',
'Compute' => 'Υπολογισμός',
'Move up' => 'Μετακίνηση προς τα επάνω',
'Move down' => 'Μετακίνηση προς τα κάτω',
'Remove' => 'Αφαίρεση',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Υπέρβαση μέγιστου επιτρεπόμενου αριθμού πεδίων. Παρακαλώ αυξήστε %s.',
'Partition by' => 'Τμηματοποίηση ανά',
'Partitions' => 'Τμήματα',
'Partition name' => 'Όνομα Τμήματος',
'Values' => 'Τιμές',
'View' => 'Προβολή',
'Materialized view' => 'Υλοποιημένη προβολή',
'View has been dropped.' => 'Η προβολή διαγράφηκε.',
'View has been altered.' => 'Η προβολή τροποποιήθηκε.',
'View has been created.' => 'Η προβολή δημιουργήθηκε.',
'Alter view' => 'Τροποποίηση προβολής',
'Create view' => 'Δημιουργία προβολής',
'Indexes' => 'Δείκτες',
'Indexes have been altered.' => 'Οι δείκτες τροποποιήθηκαν.',
'Alter indexes' => 'Τροποποίηση δεικτών',
'Add next' => 'Προσθήκη επόμενου',
'Index Type' => 'Τύπος δείκτη',
'Column (length)' => 'Στήλη (μήκος)',
'Foreign keys' => 'Εξαρτημένα κλειδιά',
'Foreign key' => 'Εξαρτημένο κλειδί',
'Foreign key has been dropped.' => 'Το εξαρτημένο κλειδί διαγράφηκε.',
'Foreign key has been altered.' => 'Το εξαρτημένο κλειδί τροποποιήθηκε.',
'Foreign key has been created.' => 'Το εξαρτημένο κλειδί δημιουργήθηκε.',
'Target table' => 'Πίνακας Στόχος',
'Change' => 'Αλλαγή',
'Source' => 'Πηγή',
'Target' => 'Στόχος',
'Add column' => 'Προσθήκη στήλης',
'Alter' => 'Τροποποίηση',
'Add foreign key' => 'Προσθήκη εξαρτημένου κλειδιού',
'ON DELETE' => 'ΚΑΤΑ ΤΗ ΔΙΑΓΡΑΦΗ',
'ON UPDATE' => 'ΚΑΤΑ ΤΗΝ ΑΛΛΑΓΗ',
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Οι στήλες στη πηγή και το στόχο πρέπει να έχουν τον ίδιο τύπο, πρέπει να υπάρχει δείκτης στη στήλη στόχο και να υπάρχουν εξαρτημένα δεδομένα.',
'Triggers' => 'Εναύσματα',
'Add trigger' => 'Προσθήκη εναύσματος',
'Trigger has been dropped.' => 'Το έναυσμα διαγράφηκε.',
'Trigger has been altered.' => 'Το έναυσμα τροποποιήθηκε.',
'Trigger has been created.' => 'Το έναυσμα δημιουργήθηκε.',
'Alter trigger' => 'Τροποποίηση εναύσματος',
'Create trigger' => 'Δημιουργία εναύσματος',
'Time' => 'Ώρα',
'Event' => 'Γεγονός',
'Name' => 'Όνομα',
'select' => 'επιλογή',
'Select' => 'Επιλογή',
'Select data' => 'Επιλέξτε δεδομένα',
'Functions' => 'Λειτουργίες',
'Aggregation' => 'Άθροισμα',
'Search' => 'Αναζήτηση',
'anywhere' => 'παντού',
'Search data in tables' => 'Αναζήτηση δεδομένων στους πίνακες',
'Sort' => 'Ταξινόμηση',
'descending' => 'Φθίνουσα',
'Limit' => 'Όριο',
'Limit rows' => 'Περιοριμός σειρών',
'Text length' => 'Μήκος κειμένου',
'Action' => 'Ενέργεια',
'Full table scan' => 'Πλήρης σάρωση πινάκων',
'Unable to select the table' => 'Δεν είναι δυνατή η επιλογή πίνακα',
'No rows.' => 'Χωρίς σειρές.',
'%d / ' => '%d / ',
'%d row(s)' => array('%d σειρά', '%d σειρές'),
'Page' => 'Σελίδα',
'last' => 'τελευταία',
'Load more data' => 'Φόρτωση κι άλλων δεδομένων',
'Loading' => 'Φορτώνει',
'Whole result' => 'Όλο το αποτέλεσμα',
'%d byte(s)' => array('%d byte', '%d bytes'),
'Import' => 'Εισαγωγή',
'%d row(s) have been imported.' => array('$d σειρά εισήχθη.', '%d σειρές εισήχθησαν.'),
'File must be in UTF-8 encoding.' => 'Το αρχείο πρέπει να έχει κωδικοποίηση UTF-8.',
// in-place editing in select
'Modify' => 'Τροποποίηση',
'Ctrl+click on a value to modify it.' => 'Πιέστε Ctrl+click σε μια τιμή για να την τροποποιήσετε.',
'Use edit link to modify this value.' => 'Χρησιμοποιήστε το σύνδεσμο επεξεργασία για να τροποποιήσετε την τιμή.',
// %s can contain auto-increment value
'Item%s has been inserted.' => 'Η εγγραφή%s εισήχθη.',
'Item has been deleted.' => 'Η εγγραφή διαγράφηκε.',
'Item has been updated.' => 'Η εγγραφή ενημερώθηκε.',
'%d item(s) have been affected.' => array('Επιρρεάστηκε %d εγγραφή.', 'Επιρρεάστηκαν %d εγγραφές.'),
'New item' => 'Νέα εγγραφή',
'original' => 'πρωτότυπο',
// label for value '' in enum data type
'empty' => 'κενό',
'edit' => 'επεξεργασία',
'Edit' => 'Επεξεργασία',
'Insert' => 'Εισαγωγή',
'Save' => 'Αποθήκευση',
'Save and continue edit' => 'Αποθήκευση και συνέχεια επεξεργασίας',
'Save and insert next' => 'Αποθήκευση και εισαγωγή επόμενου',
'Selected' => 'Επιλεγμένα',
'Clone' => 'Κλονοποίηση',
'Delete' => 'Διαγραφή',
'You have no privileges to update this table.' => 'Δεν έχετε δικαίωμα να τροποποιήσετε αυτό τον πίνακα.',
'E-mail' => 'E-mail',
'From' => 'Από',
'Subject' => 'Θέμα',
'Attachments' => 'Συνημμένα',
'Send' => 'Αποστολή',
'%d e-mail(s) have been sent.' => array('%d e-mail απεστάλλει.', '%d e-mail απεστάλλησαν.'),
// data type descriptions
'Numbers' => 'Αριθμοί',
'Date and time' => 'Ημερομηνία και ώρα',
'Strings' => 'Κείμενο',
'Binary' => 'Δυαδικό',
'Lists' => 'Λίστες',
'Network' => 'Δίκτυο',
'Geometry' => 'Γεωμετρία',
'Relations' => 'Συσχετήσεις',
'Editor' => 'Επεξεργαστής',
// date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
'$1-$3-$5' => '$5/$3/$1',
// hint for date format - use language equivalents for day, month and year shortcuts
'[yyyy]-mm-dd' => 'ηη/μμ/[εεεε]',
// hint for time format - use language equivalents for hour, minute and second shortcuts
'HH:MM:SS' => 'ΩΩ:ΛΛ:ΔΔ',
'now' => 'τώρα',
'yes' => 'ναι',
'no' => 'όχι',
// general SQLite error in create, drop or rename database
'File exists.' => 'Το αρχείο υπάρχει.',
'Please use one of the extensions %s.' => 'Παρακαλώ χρησιμοποιείστε μια από τις επεκτάσεις %s.',
// PostgreSQL and MS SQL schema support
'Alter schema' => 'Τροποποίηση σχήματος',
'Create schema' => 'Δημιουργία σχήματος',
'Schema has been dropped.' => 'Το σχήμα διαγράφηκε.',
'Schema has been created.' => 'Το σχήμα δημιουργήθηκε.',
'Schema has been altered.' => 'Το σχήμα τροποποιήθηκε.',
'Schema' => 'Σχήμα',
'Invalid schema.' => 'Άκυρο σχήμα.',
// PostgreSQL sequences support
'Sequences' => 'Αλληλουχία',
'Create sequence' => 'Δημιουργία αλληλουχίας',
'Sequence has been dropped.' => 'Η αλληλουχία διαγράφηκε.',
'Sequence has been created.' => 'Η αλληλουχία δημιουργήθηκε.',
'Sequence has been altered.' => 'Η αλληλουχία τροποποιήθηκε.',
'Alter sequence' => 'Τροποποίηση αλληλουχίας',
// PostgreSQL user types support
'User types' => 'Τύποι χρήστη',
'Create type' => 'Δημιουργία τύπου',
'Type has been dropped.' => 'Ο τύπος διαγράφηκε.',
'Type has been created.' => 'Ο τύπος δημιουργήθηκε.',
'Alter type' => 'Τροποποίηση τύπου',
);

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Contraseña', 'Password' => 'Contraseña',
'Select database' => 'Seleccionar Base de datos', 'Select database' => 'Seleccionar Base de datos',
'Invalid database.' => 'Base de datos incorrecta.', 'Invalid database.' => 'Base de datos incorrecta.',
'Create new database' => 'Crear nueva base de datos',
'Table has been dropped.' => 'Tabla eliminada.', 'Table has been dropped.' => 'Tabla eliminada.',
'Table has been altered.' => 'Tabla modificada.', 'Table has been altered.' => 'Tabla modificada.',
'Table has been created.' => 'Tabla creada.', 'Table has been created.' => 'Tabla creada.',
@@ -45,9 +44,9 @@ $translations = array(
'Delete' => 'Eliminar', 'Delete' => 'Eliminar',
'Database' => 'Base de datos', 'Database' => 'Base de datos',
'Routines' => 'Procedimientos', 'Routines' => 'Procedimientos',
'Indexes have been altered.' => 'Indices actualizados.', 'Indexes have been altered.' => 'Índices actualizados.',
'Indexes' => 'Indices', 'Indexes' => 'Índices',
'Alter indexes' => 'Modificar indices', 'Alter indexes' => 'Modificar índices',
'Add next' => 'Agregar', 'Add next' => 'Agregar',
'Language' => 'Idioma', 'Language' => 'Idioma',
'Select' => 'Mostrar', 'Select' => 'Mostrar',
@@ -78,7 +77,7 @@ $translations = array(
'File uploads are disabled.' => 'Importación de archivos deshablilitada.', 'File uploads are disabled.' => 'Importación de archivos deshablilitada.',
'Routine has been called, %d row(s) affected.' => array('Consulta ejecutada, %d registro afectado.', 'Consulta ejecutada, %d registros afectados.'), 'Routine has been called, %d row(s) affected.' => array('Consulta ejecutada, %d registro afectado.', 'Consulta ejecutada, %d registros afectados.'),
'Call' => 'Llamar', 'Call' => 'Llamar',
'No extension' => 'No hay extension', 'No extension' => 'No hay extensión',
'None of the supported PHP extensions (%s) are available.' => 'Ninguna de las extensiones PHP soportadas (%s) está disponible.', 'None of the supported PHP extensions (%s) are available.' => 'Ninguna de las extensiones PHP soportadas (%s) está disponible.',
'Session support must be enabled.' => 'Deben estar habilitadas las sesiones.', 'Session support must be enabled.' => 'Deben estar habilitadas las sesiones.',
'Session expired, please login again.' => 'Sesión caducada, por favor escriba su clave de nuevo.', 'Session expired, please login again.' => 'Sesión caducada, por favor escriba su clave de nuevo.',
@@ -114,7 +113,7 @@ $translations = array(
'Routine has been dropped.' => 'Procedimiento eliminado.', 'Routine has been dropped.' => 'Procedimiento eliminado.',
'Routine has been altered.' => 'Procedimiento modificado.', 'Routine has been altered.' => 'Procedimiento modificado.',
'Routine has been created.' => 'Procedimiento creado.', 'Routine has been created.' => 'Procedimiento creado.',
'Alter function' => 'Modificar Función', 'Alter function' => 'Modificar función',
'Alter procedure' => 'Modificar procedimiento', 'Alter procedure' => 'Modificar procedimiento',
'Return type' => 'Tipo de valor de vuelta', 'Return type' => 'Tipo de valor de vuelta',
'Add trigger' => 'Agregar disparador', 'Add trigger' => 'Agregar disparador',
@@ -128,7 +127,7 @@ $translations = array(
'%s version: %s through PHP extension %s' => 'Versión %s: %s a través de la extensión de PHP %s', '%s version: %s through PHP extension %s' => 'Versión %s: %s a través de la extensión de PHP %s',
'%d row(s)' => array('%d registro', '%d registros'), '%d row(s)' => array('%d registro', '%d registros'),
'Remove' => 'Eliminar', 'Remove' => 'Eliminar',
'Are you sure?' => 'Está seguro?', 'Are you sure?' => '¿Está seguro?',
'Privileges' => 'Privilegios', 'Privileges' => 'Privilegios',
'Create user' => 'Crear Usuario', 'Create user' => 'Crear Usuario',
'User has been dropped.' => 'Usuario eliminado.', 'User has been dropped.' => 'Usuario eliminado.',
@@ -140,7 +139,7 @@ $translations = array(
'Grant' => 'Conceder', 'Grant' => 'Conceder',
'Revoke' => 'Impedir', 'Revoke' => 'Impedir',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'POST data demasiado grande. Reduzca el tamaño o aumente la directiva de configuración %s.', 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'POST data demasiado grande. Reduzca el tamaño o aumente la directiva de configuración %s.',
'Logged as: %s' => 'Logeado como: %s', 'Logged as: %s' => 'Logueado como: %s',
'Move up' => 'Mover arriba', 'Move up' => 'Mover arriba',
'Move down' => 'Mover abajo', 'Move down' => 'Mover abajo',
'Functions' => 'Funciones', 'Functions' => 'Funciones',
@@ -187,12 +186,12 @@ $translations = array(
'original' => 'original', 'original' => 'original',
'Tables have been dropped.' => 'Tablas eliminadas.', 'Tables have been dropped.' => 'Tablas eliminadas.',
'%d item(s) have been affected.' => array('%d elemento afectado.', '%d elementos afectados.'), '%d item(s) have been affected.' => array('%d elemento afectado.', '%d elementos afectados.'),
'whole result' => 'resultado completo', 'Whole result' => 'Resultado completo',
'Clone' => 'Clonar', 'Clone' => 'Clonar',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Excedida la cantidad máxima de campos permitidos. Por favor aumente %s.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Excedida la cantidad máxima de campos permitidos. Por favor aumente %s.',
'Partition by' => 'Particionar por', 'Partition by' => 'Particionar por',
'Partitions' => 'Particiones', 'Partitions' => 'Particiones',
'Partition name' => 'Nombre de Partición', 'Partition name' => 'Nombre de partición',
'Values' => 'Valores', 'Values' => 'Valores',
'%d row(s) have been imported.' => array('%d registro importado.', '%d registros importados.'), '%d row(s) have been imported.' => array('%d registro importado.', '%d registros importados.'),
'anywhere' => 'donde sea', 'anywhere' => 'donde sea',
@@ -249,16 +248,16 @@ $translations = array(
'System' => 'Motor de base de datos', 'System' => 'Motor de base de datos',
'Select data' => 'Visualizar contenido', 'Select data' => 'Visualizar contenido',
'Show structure' => 'Mostrar estructura', 'Show structure' => 'Mostrar estructura',
'empty' => 'ningúno', 'empty' => 'ninguno',
'Network' => 'Red', 'Network' => 'Red',
'Geometry' => 'Geometría', 'Geometry' => 'Geometría',
'File exists.' => 'Ese archivo ya existe.', 'File exists.' => 'Ese archivo ya existe.',
'Attachments' => 'Adjuntos', 'Attachments' => 'Adjuntos',
'%d query(s) executed OK.' => array('%d sentencia sql ejecutada correctamente.', '%d sentencias sql ejecutadas correctamente.'), '%d query(s) executed OK.' => array('%d sentencia SQL ejecutada correctamente.', '%d sentencias SQL ejecutadas correctamente.'),
'Show only errors' => 'Mostrar solamente errores', 'Show only errors' => 'Mostrar solamente errores',
'Refresh' => 'Refrescar', 'Refresh' => 'Refrescar',
'Invalid schema.' => 'Esquema inválido.', 'Invalid schema.' => 'Esquema inválido.',
'Please use one of the extensions %s.' => 'Por favor use una de las extensiones %s.', 'Please use one of the extensions %s.' => 'Por favor, use una de las extensiones %s.',
'now' => 'ahora', 'now' => 'ahora',
'ltr' => 'ltr', 'ltr' => 'ltr',
'Tables have been copied.' => 'Tablas copiadas.', 'Tables have been copied.' => 'Tablas copiadas.',

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Parool', 'Password' => 'Parool',
'Select database' => 'Vali andmebaas', 'Select database' => 'Vali andmebaas',
'Invalid database.' => 'Tundmatu andmebaas.', 'Invalid database.' => 'Tundmatu andmebaas.',
'Create new database' => 'Loo uus andmebaas',
'Table has been dropped.' => 'Tabel on edukalt kustutatud.', 'Table has been dropped.' => 'Tabel on edukalt kustutatud.',
'Table has been altered.' => 'Tabeli andmed on edukalt muudetud.', 'Table has been altered.' => 'Tabeli andmed on edukalt muudetud.',
'Table has been created.' => 'Tabel on edukalt loodud.', 'Table has been created.' => 'Tabel on edukalt loodud.',
@@ -187,7 +186,7 @@ $translations = array(
'Move to other database' => 'Liiguta teise andmebaasi', 'Move to other database' => 'Liiguta teise andmebaasi',
'Move' => 'Liiguta', 'Move' => 'Liiguta',
'%d item(s) have been affected.' => 'Mõjutatud kirjeid: %d.', '%d item(s) have been affected.' => 'Mõjutatud kirjeid: %d.',
'whole result' => 'Täielikud tulemused', 'Whole result' => 'Täielikud tulemused',
'Clone' => 'Kloon', 'Clone' => 'Kloon',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maksimaalne väljade arv ületatud. Palun suurendage %s.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maksimaalne väljade arv ületatud. Palun suurendage %s.',
'Partition by' => 'Partitsiooni', 'Partition by' => 'Partitsiooni',

View File

@@ -12,7 +12,7 @@ $translations = array(
'Logout successful.' => 'با موفقیت خارج شدید.', 'Logout successful.' => 'با موفقیت خارج شدید.',
'Invalid credentials.' => 'اعتبار سنجی نامعتبر.', 'Invalid credentials.' => 'اعتبار سنجی نامعتبر.',
'Too many unsuccessful logins, try again in %d minute(s).' => array('ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.', 'ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.'), 'Too many unsuccessful logins, try again in %d minute(s).' => array('ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.', 'ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.'),
'Master password expired. <a href="http://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'رمز اصلی باطل شده است. روش %s را <a href="http://www.adminer.org/en/extension/" target="_blank">پیاده سازی</a> کرده تا آن را دائمی سازید.', 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'رمز اصلی باطل شده است. روش %s را <a href="https://www.adminer.org/en/extension/"%s>پیاده سازی</a> کرده تا آن را دائمی سازید.',
'Language' => 'زبان', 'Language' => 'زبان',
'Invalid CSRF token. Send the form again.' => 'CSRF token نامعتبر است. دوباره سعی کنید.', 'Invalid CSRF token. Send the form again.' => 'CSRF token نامعتبر است. دوباره سعی کنید.',
'No extension' => 'پسوند نامعتبر', 'No extension' => 'پسوند نامعتبر',
@@ -81,7 +81,6 @@ $translations = array(
'Use' => 'استفاده', 'Use' => 'استفاده',
'Select database' => 'انتخاب پایگاه داده', 'Select database' => 'انتخاب پایگاه داده',
'Invalid database.' => 'پایگاه داده نامعتبر.', 'Invalid database.' => 'پایگاه داده نامعتبر.',
'Create new database' => 'ایجاد پایگاه داده جدید',
'Database has been dropped.' => 'پایگاه داده حذف شد.', 'Database has been dropped.' => 'پایگاه داده حذف شد.',
'Databases have been dropped.' => 'پایگاه های داده حذف شدند.', 'Databases have been dropped.' => 'پایگاه های داده حذف شدند.',
'Database has been created.' => 'پایگاه داده ایجاد شد.', 'Database has been created.' => 'پایگاه داده ایجاد شد.',
@@ -181,13 +180,12 @@ $translations = array(
'Values' => 'مقادیر', 'Values' => 'مقادیر',
'View' => 'نمایش', 'View' => 'نمایش',
'Materialized View' => 'نمایه مادی', 'Materialized view' => 'نمایه مادی',
'View has been dropped.' => 'نمایش حذف شد.', 'View has been dropped.' => 'نمایش حذف شد.',
'View has been altered.' => 'نمایش ویرایش شد.', 'View has been altered.' => 'نمایش ویرایش شد.',
'View has been created.' => 'نمایش ایجاد شد.', 'View has been created.' => 'نمایش ایجاد شد.',
'Alter view' => 'حذف نمایش', 'Alter view' => 'حذف نمایش',
'Create view' => 'ایجاد نمایش', 'Create view' => 'ایجاد نمایش',
'Create materialized view' => 'ایجاد نمایه مادی',
'Indexes' => 'ایندکسها', 'Indexes' => 'ایندکسها',
'Indexes have been altered.' => 'ایندکسها ویرایش شدند.', 'Indexes have been altered.' => 'ایندکسها ویرایش شدند.',
@@ -246,7 +244,7 @@ $translations = array(
'last' => 'آخری', 'last' => 'آخری',
'Load more data' => 'بارگزاری اطلاعات بیشتر', 'Load more data' => 'بارگزاری اطلاعات بیشتر',
'Loading' => 'در حال بارگزاری', 'Loading' => 'در حال بارگزاری',
'whole result' => 'همه نتایج', 'Whole result' => 'همه نتایج',
'%d byte(s)' => array('%d بایت', '%d بایت'), '%d byte(s)' => array('%d بایت', '%d بایت'),
'Import' => 'وارد کردن', 'Import' => 'وارد کردن',

336
adminer/lang/fi.inc.php Normal file
View File

@@ -0,0 +1,336 @@
<?php
$translations = array(
// label for database system selection (MySQL, SQLite, ...)
'System' => 'Järjestelmä',
'Server' => 'Palvelin',
'Username' => 'Käyttäjänimi',
'Password' => 'Salasana',
'Permanent login' => 'Haluan pysyä kirjautuneena',
'Login' => 'Kirjaudu',
'Logout' => 'Kirjaudu ulos',
'Logged as: %s' => 'Olet kirjautunut käyttäjänä: %s',
'Logout successful.' => 'Uloskirjautuminen onnistui.',
'Invalid credentials.' => 'Virheelliset kirjautumistiedot.',
'Too many unsuccessful logins, try again in %d minute(s).' => array('Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.', 'Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.'),
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-salasana ei ole enää voimassa. <a href="https://www.adminer.org/en/extension/"%s>Toteuta</a> %s-metodi sen tekemiseksi pysyväksi.',
'Language' => 'Kieli',
'Invalid CSRF token. Send the form again.' => 'Virheellinen CSRF-vastamerkki. Lähetä lomake uudelleen.',
'If you did not send this request from Adminer then close this page.' => 'Jollet lähettänyt tämä pyyntö Adminerista, sulje tämä sivu.',
'No extension' => 'Ei laajennusta',
'None of the supported PHP extensions (%s) are available.' => 'Mitään tuetuista PHP-laajennuksista (%s) ei ole käytettävissä.',
'Session support must be enabled.' => 'Istuntotuki on oltava päällä.',
'Session expired, please login again.' => 'Istunto vanhentunut, kirjaudu uudelleen.',
'%s version: %s through PHP extension %s' => '%s versio: %s PHP-laajennuksella %s',
'Refresh' => 'Virkistä',
// text direction - 'ltr' or 'rtl'
'ltr' => 'ltr',
'Privileges' => 'Oikeudet',
'Create user' => 'Luo käyttäjä',
'User has been dropped.' => 'Käyttäjä poistettiin.',
'User has been altered.' => 'Käyttäjää muutettiin.',
'User has been created.' => 'Käyttäjä luotiin.',
'Hashed' => 'Hashed',
'Column' => 'Sarake',
'Routine' => 'Rutiini',
'Grant' => 'Myönnä',
'Revoke' => 'Kiellä',
'Process list' => 'Prosessilista',
'%d process(es) have been killed.' => array('%d prosessi lopetettu.', '%d prosessia lopetettu..'),
'Kill' => 'Lopeta',
'Variables' => 'Muuttujat',
'Status' => 'Tila',
'SQL command' => 'SQL-komento',
'%d query(s) executed OK.' => array('%d kysely onnistui.', '%d kyselyä onnistui.'),
'Query executed OK, %d row(s) affected.' => array('Kysely onnistui, kohdistui %d riviin.', 'Kysely onnistui, kohdistui %d riviin.'),
'No commands to execute.' => 'Ei komentoja suoritettavana.',
'Error in query' => 'Virhe kyselyssä',
'Execute' => 'Suorita',
'Stop on error' => 'Pysähdy virheeseen',
'Show only errors' => 'Näytä vain virheet',
// sprintf() format for time of the command
'%.3f s' => '%.3f s',
'History' => 'Historia',
'Clear' => 'Tyhjennä',
'Edit all' => 'Muokkaa kaikkia',
'File upload' => 'Tiedoston lataus palvelimelle',
'From server' => 'Verkkopalvelimella Adminer-kansiossa oleva tiedosto',
'Webserver file %s' => 'Verkkopalvelintiedosto %s',
'Run file' => 'Suorita tämä',
'File does not exist.' => 'Tiedostoa ei ole.',
'File uploads are disabled.' => 'Tiedostojen lataaminen palvelimelle on estetty.',
'Unable to upload a file.' => 'Tiedostoa ei voida ladata palvelimelle.',
'Maximum allowed file size is %sB.' => 'Suurin sallittu tiedostokoko on %sB.',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Liian suuri POST-datamäärä. Pienennä dataa tai kasvata arvoa %s konfigurointitiedostossa.',
'You can upload a big SQL file via FTP and import it from server.' => 'Voit ladata suuren SQL-tiedoston FTP:n kautta ja tuoda sen sitten palvelimelta.',
'You are offline.' => 'Olet offline-tilassa.',
'Export' => 'Vienti',
'Output' => 'Tulos',
'open' => 'avaa',
'save' => 'tallenna',
'Saving' => 'Tallennetaan',
'Format' => 'Muoto',
'Data' => 'Data',
'Database' => 'Tietokanta',
'database' => 'tietokanta',
'Use' => 'Käytä',
'Select database' => 'Valitse tietokanta',
'Invalid database.' => 'Tietokanta ei kelpaa.',
'Database has been dropped.' => 'Tietokanta on poistettu.',
'Databases have been dropped.' => 'Tietokannat on poistettu.',
'Database has been created.' => 'Tietokanta on luotu.',
'Database has been renamed.' => 'Tietokanta on nimetty uudelleen.',
'Database has been altered.' => 'Tietokantaa on muutettu.',
'Alter database' => 'Muuta tietokantaa',
'Create database' => 'Luo tietokanta',
'Database schema' => 'Tietokantakaava',
// link to current database schema layout
'Permanent link' => 'Pysyvä linkki',
// thousands separator - must contain single byte
',' => ',',
'0123456789' => '0123456789',
'Engine' => 'Moottori',
'Collation' => 'Kollaatio',
'Data Length' => 'Datan pituus',
'Index Length' => 'Indeksin pituus',
'Data Free' => 'Vapaa tila',
'Rows' => 'Riviä',
'%d in total' => '%d kaikkiaan',
'Analyze' => 'Analysoi',
'Optimize' => 'Optimoi',
'Vacuum' => 'Siivoa',
'Check' => 'Tarkista',
'Repair' => 'Korjaa',
'Truncate' => 'Tyhjennä',
'Tables have been truncated.' => 'Taulujen sisältö on tyhjennetty.',
'Move to other database' => 'Siirrä toiseen tietokantaan',
'Move' => 'Siirrä',
'Tables have been moved.' => 'Taulut on siirretty.',
'Copy' => 'Kopioi',
'Tables have been copied.' => 'Taulut on kopioitu.',
'Routines' => 'Rutiinit',
'Routine has been called, %d row(s) affected.' => array('Rutiini kutsuttu, kohdistui %d riviin.', 'Rutiini kutsuttu, kohdistui %d riviin.'),
'Call' => 'Kutsua',
'Parameter name' => 'Parametrin nimi',
'Create procedure' => 'Luo proseduuri',
'Create function' => 'Luo funktio',
'Routine has been dropped.' => 'Rutiini on poistettu.',
'Routine has been altered.' => 'Rutiinia on muutettu.',
'Routine has been created.' => 'Rutiini on luotu.',
'Alter function' => 'Muuta funktiota',
'Alter procedure' => 'Muuta proseduuria',
'Return type' => 'Palautustyyppi',
'Events' => 'Tapahtumat',
'Event has been dropped.' => 'Tapahtuma on poistettu.',
'Event has been altered.' => 'Tapahtumaa on muutettu.',
'Event has been created.' => 'Tapahtuma on luotu.',
'Alter event' => 'Muuta tapahtumaa',
'Create event' => 'Luo tapahtuma',
'At given time' => 'Tiettynä aikana',
'Every' => 'Joka',
'Schedule' => 'Aikataulu',
'Start' => 'Aloitus',
'End' => 'Lopetus',
'On completion preserve' => 'Säilytä, kun valmis',
'Tables' => 'Taulut',
'Tables and views' => 'Taulut ja näkymät',
'Table' => 'Taulu',
'No tables.' => 'Ei tauluja.',
'Alter table' => 'Muuta taulua',
'Create table' => 'Luo taulu',
'Table has been dropped.' => 'Taulu on poistettu.',
'Tables have been dropped.' => 'Tauluja on poistettu.',
'Tables have been optimized.' => 'Taulut on optimoitu.',
'Table has been altered.' => 'Taulua on muutettu.',
'Table has been created.' => 'Taulu on luotu.',
'Table name' => 'Taulun nimi',
'Show structure' => 'Näytä rakenne',
'engine' => 'moottori',
'collation' => 'kollaatio',
'Column name' => 'Sarakkeen nimi',
'Type' => 'Tyyppi',
'Length' => 'Pituus',
'Auto Increment' => 'Automaattinen lisäys',
'Options' => 'Asetukset',
'Comment' => 'Kommentit',
'Default value' => 'Oletusarvo',
'Default values' => 'Oletusarvot',
'Drop' => 'Poista',
'Are you sure?' => 'Oletko varma?',
'Size' => 'Koko',
'Compute' => 'Laske',
'Move up' => 'Siirrä ylös',
'Move down' => 'Siirrä alas',
'Remove' => 'Poista',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Kenttien sallittu enimmäismäärä ylitetty. Kasvata arvoa %s.',
'Partition by' => 'Osioi arvolla',
'Partitions' => 'Osiot',
'Partition name' => 'Osion nimi',
'Values' => 'Arvot',
'View' => 'Näkymä',
'Materialized view' => 'Materialisoitunut näkymä',
'View has been dropped.' => 'Näkymä on poistettu.',
'View has been altered.' => 'Näkymää on muutettu.',
'View has been created.' => 'Näkymä on luotu.',
'Alter view' => 'Muuta näkymää',
'Create view' => 'Luo näkymä',
'Indexes' => 'Indeksit',
'Indexes have been altered.' => 'Indeksejä on muutettu.',
'Alter indexes' => 'Muuta indeksejä',
'Add next' => 'Lisää seuraava',
'Index Type' => 'Indeksityyppi',
'Column (length)' => 'Sarake (pituus)',
'Foreign keys' => 'Vieraat avaimet',
'Foreign key' => 'Vieras avain',
'Foreign key has been dropped.' => 'Vieras avain on poistettu.',
'Foreign key has been altered.' => 'Vierasta avainta on muutettu.',
'Foreign key has been created.' => 'Vieras avain on luotu.',
'Target table' => 'Kohdetaulu',
'Change' => 'Muuta',
'Source' => 'Lähde',
'Target' => 'Kohde',
'Add column' => 'Lisää sarake',
'Alter' => 'Muuta',
'Add foreign key' => 'Lisää vieras avain',
'ON DELETE' => 'ON DELETE',
'ON UPDATE' => 'ON UPDATE',
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Lähde- ja kohdesarakkeiden tulee olla samaa tietotyyppiä, kohdesarakkeisiin tulee olla indeksi ja dataa, johon viitataan, täytyy olla.',
'Triggers' => 'Liipaisimet',
'Add trigger' => 'Lisää liipaisin',
'Trigger has been dropped.' => 'Liipaisin on poistettu.',
'Trigger has been altered.' => 'Liipaisinta on muutettu.',
'Trigger has been created.' => 'Liipaisin on luotu.',
'Alter trigger' => 'Muuta liipaisinta',
'Create trigger' => 'Luo liipaisin',
'Time' => 'Aika',
'Event' => 'Tapahtuma',
'Name' => 'Nimi',
'select' => 'valitse',
'Select' => 'Valitse',
'Select data' => 'Valitse data',
'Functions' => 'Funktiot',
'Aggregation' => 'Aggregaatiot',
'Search' => 'Hae',
'anywhere' => 'kaikkialta',
'Search data in tables' => 'Hae dataa tauluista',
'Sort' => 'Lajittele',
'descending' => 'alenevasti',
'Limit' => 'Raja',
'Limit rows' => 'Rajoita rivimäärää',
'Text length' => 'Tekstin pituus',
'Action' => 'Toimenpide',
'Full table scan' => 'Koko taulun läpikäynti',
'Unable to select the table' => 'Taulua ei voitu valita',
'No rows.' => 'Ei rivejä.',
'%d / ' => '%d / ',
'%d row(s)' => array('%d rivi', '%d riviä'),
'Page' => 'Sivu',
'last' => 'viimeinen',
'Load more data' => 'Lataa lisää dataa',
'Loading' => 'Ladataan',
'Whole result' => 'Koko tulos',
'%d byte(s)' => array('%d tavu', '%d tavua'),
'Import' => 'Tuonti',
'%d row(s) have been imported.' => array('%d rivi tuotiin.', '%d riviä tuotiin.'),
'File must be in UTF-8 encoding.' => 'Tiedoston täytyy olla UTF-8-muodossa.',
// in-place editing in select
'Modify' => 'Muuta',
'Ctrl+click on a value to modify it.' => 'Ctrl+napsauta arvoa muuttaaksesi.',
'Use edit link to modify this value.' => 'Käytä muokkaa-linkkiä muuttaaksesi tätä arvoa.',
// %s can contain auto-increment value
'Item%s has been inserted.' => 'Tietue%s lisättiin.',
'Item has been deleted.' => 'Tietue poistettiin.',
'Item has been updated.' => 'Tietue päivitettiin.',
'%d item(s) have been affected.' => array('Kohdistui %d tietueeseen.', 'Kohdistui %d tietueeseen.'),
'New item' => 'Uusi tietue',
'original' => 'alkuperäinen',
// label for value '' in enum data type
'empty' => 'tyhjä',
'edit' => 'muokkaa',
'Edit' => 'Muokkaa',
'Insert' => 'Lisää',
'Save' => 'Tallenna',
'Save and continue edit' => 'Tallenna ja jatka muokkaamista',
'Save and insert next' => 'Tallenna ja lisää seuraava',
'Selected' => 'Valitut',
'Clone' => 'Kloonaa',
'Delete' => 'Poista',
'You have no privileges to update this table.' => 'Sinulla ei ole oikeutta päivittää tätä taulua.',
'E-mail' => 'S-posti',
'From' => 'Lähettäjä',
'Subject' => 'Aihe',
'Attachments' => 'Liitteet',
'Send' => 'Lähetä',
'%d e-mail(s) have been sent.' => array('% sähköpostiviestiä lähetetty.', '% sähköpostiviestiä lähetetty.'),
// data type descriptions
'Numbers' => 'Numerot',
'Date and time' => 'Päiväys ja aika',
'Strings' => 'Merkkijonot',
'Binary' => 'Binäärinen',
'Lists' => 'Luettelot',
'Network' => 'Verkko',
'Geometry' => 'Geometria',
'Relations' => 'Suhteet',
'Editor' => 'Editori',
// date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
'$1-$3-$5' => '$5.$3.$1',
// hint for date format - use language equivalents for day, month and year shortcuts
'[yyyy]-mm-dd' => 'pp.kk.[vvvv]',
// hint for time format - use language equivalents for hour, minute and second shortcuts
'HH:MM:SS' => 'HH:MM:SS',
'now' => 'nyt',
'yes' => 'kyllä',
'no' => 'ei',
// general SQLite error in create, drop or rename database
'File exists.' => 'Tiedosto on olemassa.',
'Please use one of the extensions %s.' => 'Käytä jotain %s-laajennuksista.',
// PostgreSQL and MS SQL schema support
'Alter schema' => 'Muuta kaavaa',
'Create schema' => 'Luo kaava',
'Schema has been dropped.' => 'Kaava poistettiin.',
'Schema has been created.' => 'Kaava luotiin.',
'Schema has been altered.' => 'Kaavaa muutettiin.',
'Schema' => 'Kaava',
'Invalid schema.' => 'Kaava ei kelpaa.',
// PostgreSQL sequences support
'Sequences' => 'Sekvenssit',
'Create sequence' => 'Luo sekvenssi',
'Sequence has been dropped.' => 'Sekvenssi on poistettu.',
'Sequence has been created.' => 'Sekvenssi on luotu.',
'Sequence has been altered.' => 'Sekvenssiä on muutettu.',
'Alter sequence' => 'Muuta sekvenssiä',
// PostgreSQL user types support
'User types' => 'Käyttäjän tyypit',
'Create type' => 'Luo tyyppi',
'Type has been dropped.' => 'Tyyppi poistettiin.',
'Type has been created.' => 'Tyyppi luotiin.',
'Alter type' => 'Muuta tyyppiä',
);

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Mot de passe', 'Password' => 'Mot de passe',
'Select database' => 'Sélectionner la base de données', 'Select database' => 'Sélectionner la base de données',
'Invalid database.' => 'Base de données invalide.', 'Invalid database.' => 'Base de données invalide.',
'Create new database' => 'Créer une base de données',
'Table has been dropped.' => 'La table a été effacée.', 'Table has been dropped.' => 'La table a été effacée.',
'Table has been altered.' => 'La table a été modifiée.', 'Table has been altered.' => 'La table a été modifiée.',
'Table has been created.' => 'La table a été créée.', 'Table has been created.' => 'La table a été créée.',
@@ -185,7 +184,7 @@ $translations = array(
'Move to other database' => 'Déplacer vers une autre base de données', 'Move to other database' => 'Déplacer vers une autre base de données',
'Move' => 'Déplacer', 'Move' => 'Déplacer',
'%d item(s) have been affected.' => array('%d élément a été modifié.', '%d éléments ont été modifiés.'), '%d item(s) have been affected.' => array('%d élément a été modifié.', '%d éléments ont été modifiés.'),
'whole result' => 'résultat entier', 'Whole result' => 'Résultat entier',
'Clone' => 'Cloner', 'Clone' => 'Cloner',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Le nombre maximum de champs est dépassé. Veuillez augmenter %s.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Le nombre maximum de champs est dépassé. Veuillez augmenter %s.',
'Partition by' => 'Partitionner par', 'Partition by' => 'Partitionner par',
@@ -275,7 +274,7 @@ $translations = array(
'File must be in UTF-8 encoding.' => 'Les fichiers doivent être encodés en UTF-8.', 'File must be in UTF-8 encoding.' => 'Les fichiers doivent être encodés en UTF-8.',
'Full table scan' => 'Scan de toute la table', 'Full table scan' => 'Scan de toute la table',
'Too many unsuccessful logins, try again in %d minute(s).' => array('Trop de connexions échouées, essayez à nouveau dans %d minute.', 'Trop de connexions échouées, essayez à nouveau dans %d minutes.'), 'Too many unsuccessful logins, try again in %d minute(s).' => array('Trop de connexions échouées, essayez à nouveau dans %d minute.', 'Trop de connexions échouées, essayez à nouveau dans %d minutes.'),
'Master password expired. <a href="http://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Le mot de passe a expiré. <a href="http://www.adminer.org/en/extension/" target="_blank">Implémentez</a> la méthode %s afin de le rendre permanent.', 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Le mot de passe a expiré. <a href="https://www.adminer.org/en/extension/"%s>Implémentez</a> la méthode %s afin de le rendre permanent.',
'You can upload a big SQL file via FTP and import it from server.' => 'Vous pouvez uploader un gros fichier SQL par FTP et ensuite l\'importer depuis le serveur.', 'You can upload a big SQL file via FTP and import it from server.' => 'Vous pouvez uploader un gros fichier SQL par FTP et ensuite l\'importer depuis le serveur.',
'Size' => 'Taille', 'Size' => 'Taille',
'Compute' => 'Calcul', 'Compute' => 'Calcul',
@@ -283,8 +282,7 @@ $translations = array(
'Saving' => 'Enregistrement', 'Saving' => 'Enregistrement',
'yes' => 'oui', 'yes' => 'oui',
'no' => 'non', 'no' => 'non',
'Materialized View' => 'Vue matérialisée', 'Materialized view' => 'Vue matérialisée',
'Create materialized view' => 'Créer une vue matérialisée',
'%d / ' => '%d / ', '%d / ' => '%d / ',
'Limit rows' => 'Limiter les lignes', 'Limit rows' => 'Limiter les lignes',
'Default value' => 'Valeur par défaut', 'Default value' => 'Valeur par défaut',

291
adminer/lang/gl.inc.php Normal file
View File

@@ -0,0 +1,291 @@
<?php
$translations = array(
'Login' => 'Conectar',
'Logout successful.' => 'Pechouse a sesión con éxito.',
'Invalid credentials.' => 'Credenciais (usuario e/ou contrasinal) inválidos.',
'Server' => 'Servidor',
'Username' => 'Usuario',
'Password' => 'Contrasinal',
'Select database' => 'Seleccionar Base de datos',
'Invalid database.' => 'Base de datos incorrecta.',
'Table has been dropped.' => 'Eliminouse a táboa.',
'Table has been altered.' => 'Modificouse a táboa.',
'Table has been created.' => 'Creouse a táboa.',
'Alter table' => 'Modificar táboa',
'Create table' => 'Crear táboa',
'Table name' => 'Nome da táboa',
'engine' => 'motor',
'collation' => 'xogo de caracteres (collation)',
'Column name' => 'Nome da columna',
'Type' => 'Tipo',
'Length' => 'Lonxitude',
'Auto Increment' => 'Incremento automático',
'Options' => 'Opcións',
'Save' => 'Gardar',
'Drop' => 'Eliminar',
'Database has been dropped.' => 'Eliminouse a base de datos.',
'Database has been created.' => 'Creouse a base de datos.',
'Database has been renamed.' => 'Renomeouse a base de datos.',
'Database has been altered.' => 'Modificouse a base de datos.',
'Alter database' => 'Modificar Base de datos',
'Create database' => 'Crear Base de datos',
'SQL command' => 'Comando SQL',
'Logout' => 'Pechar sesión',
'database' => 'base de datos',
'Use' => 'Usar',
'No tables.' => 'Nengunha táboa.',
'select' => 'selecciona',
'Item has been deleted.' => 'Eliminouse o elemento.',
'Item has been updated.' => 'Modificouse o elemento.',
'Item%s has been inserted.' => 'Inseríuse o elemento%s.',
'Edit' => 'Editar',
'Insert' => 'Inserir',
'Save and insert next' => 'Guardar e inserir seguinte',
'Delete' => 'Borrar',
'Database' => 'Base de datos',
'Routines' => 'Rutinas',
'Indexes have been altered.' => 'Alteráronse os índices.',
'Indexes' => 'Índices',
'Alter indexes' => 'Modificar índices',
'Add next' => 'Engadir seguinte',
'Language' => 'Lingua',
'Select' => 'Seleccionar',
'New item' => 'Novo elemento',
'Search' => 'Buscar',
'Sort' => 'Ordenar',
'descending' => 'descendente',
'Limit' => 'Límite',
'No rows.' => 'Nengún resultado.',
'Action' => 'Acción',
'edit' => 'editar',
'Page' => 'Páxina',
'Query executed OK, %d row(s) affected.' => array('Consulta executada, %d fila afectada.', 'Consulta executada, %d filas afectadas.'),
'Error in query' => 'Erro na consulta',
'Execute' => 'Executar',
'Table' => 'Táboa',
'Foreign keys' => 'Chaves externas',
'Triggers' => 'Disparadores',
'View' => 'Vista',
'Unable to select the table' => 'No é posible seleccionar a táboa',
'Invalid CSRF token. Send the form again.' => 'Token CSRF inválido. Envíe de novo os datos do formulario.',
'Comment' => 'Comentario',
'Default values' => 'Valores predeterminados',
'%d byte(s)' => array('%d byte', '%d bytes'),
'No commands to execute.' => 'Non hai comandos para executar.',
'Unable to upload a file.' => 'Non é posible importar o ficheiro.',
'File upload' => 'Importar ficheiro',
'File uploads are disabled.' => 'Importación de ficheiros deshablilitada.',
'Routine has been called, %d row(s) affected.' => array('Chamouse á rutina, %d fila afectada.', 'Chamouse á rutina, %d filas afectadas.'),
'Call' => 'Chamar',
'No extension' => 'Non ten extensión',
'None of the supported PHP extensions (%s) are available.' => 'Ningunha das extensións PHP soportadas (%s) está dispoñible.',
'Session support must be enabled.' => 'As sesións deben estar habilitadas.',
'Session expired, please login again.' => 'Caducou a sesión, por favor acceda de novo.',
'Text length' => 'Lonxitud do texto',
'Foreign key has been dropped.' => 'Eliminouse a chave externa.',
'Foreign key has been altered.' => 'Modificouse a chave externa.',
'Foreign key has been created.' => 'Creouse a chave externa.',
'Foreign key' => 'Chave externa',
'Target table' => 'táboa de destino',
'Change' => 'Cambiar',
'Source' => 'Orixe',
'Target' => 'Destino',
'Add column' => 'Engadir columna',
'Alter' => 'Modificar',
'Add foreign key' => 'Engadir chave externa',
'ON DELETE' => 'AO BORRAR (ON DELETE)',
'ON UPDATE' => 'AO ACTUALIZAR (ON UPDATE)',
'Index Type' => 'Tipo de índice',
'Column (length)' => 'Columna (lonxitude)',
'View has been dropped.' => 'Eliminouse a vista.',
'View has been altered.' => 'Modificouse a vista.',
'View has been created.' => 'Creouse a vista.',
'Alter view' => 'Modificar vista',
'Create view' => 'Crear vista',
'Name' => 'Nome',
'Process list' => 'Lista de procesos',
'%d process(es) have been killed.' => array('%d proceso foi detido.', '%d procesos foron detidos.'),
'Kill' => 'Deter',
'Parameter name' => 'Nome de Parámetro',
'Database schema' => 'Esquema de base de datos',
'Create procedure' => 'Crear procedemento',
'Create function' => 'Crear función',
'Routine has been dropped.' => 'Eliminouse o procedemento.',
'Routine has been altered.' => 'Alterouse o procedemento.',
'Routine has been created.' => 'Creouse o procedemento.',
'Alter function' => 'Modificar Función',
'Alter procedure' => 'Modificar procedemento',
'Return type' => 'Tipo de valor devolto',
'Add trigger' => 'Engadir disparador',
'Trigger has been dropped.' => 'Eliminouse o disparador.',
'Trigger has been altered.' => 'Modificouse o disparador.',
'Trigger has been created.' => 'Creouse o disparador.',
'Alter trigger' => 'Modificar Disparador',
'Create trigger' => 'Crear Disparador',
'Time' => 'Tempo',
'Event' => 'Evento',
'%s version: %s through PHP extension %s' => 'Versión %s: %s a través da extensión de PHP %s',
'%d row(s)' => array('%d fila', '%d filas'),
'Remove' => 'Eliminar',
'Are you sure?' => 'Está seguro?',
'Privileges' => 'Privilexios',
'Create user' => 'Crear Usuario',
'User has been dropped.' => 'Eliminouse o usuario.',
'User has been altered.' => 'Modificouse o usuario.',
'User has been created.' => 'Creouse o usuario.',
'Hashed' => 'Hashed',
'Column' => 'Columna',
'Routine' => 'Rutina',
'Grant' => 'Conceder',
'Revoke' => 'Revocar',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Datos POST demasiado grandes. Reduza os datos ou aumente a directiva de configuración %s.',
'Logged as: %s' => 'Conectado como: %s',
'Move up' => 'Mover arriba',
'Move down' => 'Mover abaixo',
'Functions' => 'Funcións',
'Aggregation' => 'Agregados',
'Export' => 'Exportar',
'Output' => 'Salida',
'open' => 'abrir',
'save' => 'gardar',
'Format' => 'Formato',
'Tables' => 'Táboas',
'Data' => 'Datos',
'Event has been dropped.' => 'Eliminouse o evento.',
'Event has been altered.' => 'Modificouse o evento.',
'Event has been created.' => 'Creouse o evento.',
'Alter event' => 'Modificar Evento',
'Create event' => 'Crear Evento',
'At given time' => 'No tempo indicado',
'Every' => 'Cada',
'Events' => 'Eventos',
'Schedule' => 'Axenda',
'Start' => 'Inicio',
'End' => 'Fin',
'Status' => 'Estado',
'On completion preserve' => 'Ao completar manter',
'Tables and views' => 'táboas e vistas',
'Data Length' => 'Lonxitude de datos',
'Index Length' => 'Lonxitude de índice',
'Data Free' => 'Espazo dispoñible',
'Collation' => 'Xogo de caracteres (collation)',
'Analyze' => 'Analizar',
'Optimize' => 'Optimizar',
'Check' => 'Comprobar',
'Repair' => 'Reparar',
'Truncate' => 'Baleirar',
'Tables have been truncated.' => 'Baleiráronse as táboas.',
'Rows' => 'Filas',
',' => ' ',
'0123456789' => '0123456789',
'Tables have been moved.' => 'Movéronse as táboas.',
'Move to other database' => 'Mover a outra base de datos',
'Move' => 'Mover',
'Engine' => 'Motor',
'Save and continue edit' => 'Gardar se seguir editando',
'original' => 'orixinal',
'Tables have been dropped.' => 'Elimináronse as táboas.',
'%d item(s) have been affected.' => array('%d elemento afectado.', '%d elementos afectados.'),
'Whole result' => 'Resultado completo',
'Clone' => 'Clonar',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Excedida o número máximo de campos permitidos. Por favor aumente %s.',
'Partition by' => 'Particionar por',
'Partitions' => 'Particións',
'Partition name' => 'Nome da Partición',
'Values' => 'Valores',
'%d row(s) have been imported.' => array('%d fila importada.', '%d filas importadas.'),
'anywhere' => 'onde sexa',
'Import' => 'Importar',
'Stop on error' => 'Parar en caso de erro',
'%.3f s' => '%.3f s',
'$1-$3-$5' => '$5/$3/$1',
'[yyyy]-mm-dd' => 'dd/mm/[aaaa]',
'History' => 'Histórico',
'Variables' => 'Variables',
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'As columnas de orixe e destino deben ser do mesmo tipo, debe existir un índice nas columnas de destino e os datos referenciados deben existir.',
'Relations' => 'Relacins',
'Run file' => 'Executar ficheiro',
'Clear' => 'Baleirar',
'Maximum allowed file size is %sB.' => 'O tamaño máximo de ficheiro permitido é de %sB.',
'Numbers' => 'Números',
'Date and time' => 'Data e hora',
'Strings' => 'Cadea',
'Binary' => 'Binario',
'Lists' => 'Listas',
'Editor' => 'Editor',
'E-mail' => 'Email',
'From' => 'De',
'Subject' => 'Asunto',
'Send' => 'Enviar',
'%d e-mail(s) have been sent.' => array('%d email enviado.', '%d emails enviados.'),
'Webserver file %s' => 'Ficheiro de servidor web %s',
'File does not exist.' => 'O ficheiro non existe.',
'%d in total' => '%d en total',
'Permanent login' => 'Permanecer conectado',
'Databases have been dropped.' => 'Elimináronse as bases de datos.',
'Search data in tables' => 'Buscar datos en táboas',
'Schema' => 'Esquema',
'Alter schema' => 'Modificar esquema',
'Create schema' => 'Crear esquema',
'Schema has been dropped.' => 'Eliminouse o esquema.',
'Schema has been created.' => 'Creouse o esquema.',
'Schema has been altered.' => 'Modificouse o esquema.',
'Sequences' => 'Secuencias',
'Create sequence' => 'Crear secuencias',
'Alter sequence' => 'Modificar secuencia',
'Sequence has been dropped.' => 'Eliminouse a secuencia.',
'Sequence has been created.' => 'Creouse a secuencia.',
'Sequence has been altered.' => 'Modificaouse a secuencia.',
'User types' => 'Tipos definidos polo usuario',
'Create type' => 'Crear tipo',
'Alter type' => 'Modificar tipo',
'Type has been dropped.' => 'Eliminouse o tipo.',
'Type has been created.' => 'Creouse o tipo.',
'Ctrl+click on a value to modify it.' => 'Ctrl+clic sobre o valor para editalo.',
'Use edit link to modify this value.' => 'Use a ligazón de edición para modificar este valor.',
'last' => 'último',
'From server' => 'Desde o servidor',
'System' => 'Sistema',
'Select data' => 'Seleccionar datos',
'Show structure' => 'Amosar estructura',
'empty' => 'baleiro',
'Network' => 'Rede',
'Geometry' => 'Xeometría',
'File exists.' => 'O ficheiro xa existe.',
'Attachments' => 'Adxuntos',
'%d query(s) executed OK.' => array('%d consulta executada correctamente.', '%d consultas executadas correctamente.'),
'Show only errors' => 'Amosar só erros',
'Refresh' => 'Refrescar',
'Invalid schema.' => 'Esquema inválido.',
'Please use one of the extensions %s.' => 'Por favor use unha das extensións %s.',
'now' => 'agora',
'ltr' => 'ltr',
'Tables have been copied.' => 'Copiáronse as táboas.',
'Copy' => 'Copiar',
'Permanent link' => 'Ligazón permanente',
'Edit all' => 'Editar todo',
'HH:MM:SS' => 'HH:MM:SS',
'Tables have been optimized.' => 'Optimizáronse as táboas',
'Materialized view' => 'Vista materializada',
'Vacuum' => 'Baleirar',
'Selected' => 'Selección',
'File must be in UTF-8 encoding.' => 'O ficheiro ten que estar codificado con UTF-8',
'Modify' => 'Modificar',
'Loading' => 'Cargando',
'Load more data' => 'Cargar máis datos',
'%d / ' => array('%d / ','%d / '),
'Limit rows' => 'Limitar filas',
'Default value' => 'Valor por defecto',
'Full table scan' => 'Escaneo completo da táboa',
'Too many unsuccessful logins, try again in %d minute(s).' => array('Demasiados intentos de conexión, intentao de novo en %d minuto', 'Demasiados intentos de conexión, intentao de novo en %d minutos'),
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'O contrasinal principal caducou. <a href="https://www.adminer.org/en/extension/"%s>Implementa</a> o método %s para facelo permanente.',
'If you did not send this request from Adminer then close this page.' => 'Se non enviaches esta petición dende o Adminer entón pecha esta páxina',
'You can upload a big SQL file via FTP and import it from server.' => 'Podes subir un ficheiro SQL de gran tamaño vía FTP e importalo dende o servidor',
'Size' => 'Tamaño',
'Compute' => 'Calcular',
'You are offline.' => 'Non tes conexión',
'You have no privileges to update this table.' => 'Non tes privilexios para actualizar esta táboa',
'Saving' => 'Gardando',
'yes' => 'si',
'no' => 'non',
);

294
adminer/lang/he.inc.php Normal file
View File

@@ -0,0 +1,294 @@
<?php
$translations = array(
'Login' => 'התחברות',
'Logout successful.' => 'ההתחברות הצליחה',
'Invalid credentials.' => 'פרטי התחברות שגויים',
'Server' => 'שרת',
'Username' => 'שם משתמש',
'Password' => 'סיסמה',
'Select database' => 'בחר מסד נתונים',
'Invalid database.' => 'מסד נתונים שגוי',
'Table has been dropped.' => 'הטבלה הושלכה',
'Table has been altered.' => 'הטבלה שונתה',
'Table has been created.' => 'הטבלה נוצרה',
'Alter table' => 'שנה טבלה',
'Create table' => 'צור טבלה',
'Table name' => 'שם הטבלה',
'engine' => 'מנוע',
'collation' => 'קולקציה',
'Column name' => 'שם עמודה',
'Type' => 'סוג',
'Length' => 'אורך',
'Auto Increment' => 'הגדלה אוטומטית',
'Options' => 'אפשרויות',
'Save' => 'שמור',
'Drop' => 'השלך',
'Database has been created.' => 'מסד הנתונים נוצר',
'Database has been renamed.' => 'שם מסד הנתונים שונה',
'Database has been altered.' => 'מסד הנתונים שונה',
'Alter database' => 'שנה מסד נתונים',
'Create database' => 'צור מסד נתונים',
'SQL command' => 'שאילתת SQL',
'Logout' => 'התנתק',
'database' => 'מסד נתונים',
'Use' => 'השתמש',
'No tables.' => 'אין טבלאות',
'select' => 'בחר',
'Item has been deleted.' => 'הפריט נמחק',
'Item has been updated.' => 'הפריט עודכן',
'Edit' => 'ערוך',
'Insert' => 'הכנס',
'Save and insert next' => 'שמור והמשך להכניס',
'Delete' => 'מחק',
'Database' => 'מסד נתונים',
'Routines' => 'רוטינות',
'Indexes have been altered.' => 'האינדקסים שונו',
'Indexes' => 'אינדקסים',
'Alter indexes' => 'שנה אינדקסים',
'Add next' => 'הוסף הבא',
'Language' => 'שפה',
'Select' => 'בחר',
'New item' => 'פריט חדש',
'Search' => 'חפש',
'Sort' => 'מיין',
'descending' => 'סדר הפוך',
'Limit' => 'הגבל',
'No rows.' => 'אין שורות',
'Action' => 'פעולות',
'edit' => 'ערוך',
'Page' => 'עמוד',
'Query executed OK, %d row(s) affected.' => 'השאילתה בוצעה כהלכה, %d שורות הושפעו',
'Error in query' => 'שגיאה בשאילתה',
'Execute' => 'הרץ',
'Table' => 'טבלה',
'Foreign keys' => 'מפתחות זרים',
'Triggers' => 'מפעילים',
'View' => 'הצג',
'Unable to select the table' => 'בחירת הטבלה נכשלה',
'Invalid CSRF token. Send the form again.' => 'כשל באבטחת נתונים, שלח טופס שוב',
'Comment' => 'הערה',
'Default values' => 'ערכי ברירת מחדל',
'%d byte(s)' => '%d בתים',
'No commands to execute.' => 'לא נמצאו פקודות להרצה',
'Unable to upload a file.' => 'העלאת הקובץ נכשלה',
'File upload' => 'העלה קובץ',
'File uploads are disabled.' => 'העלאת קבצים מבוטלת',
'Routine has been called, %d row(s) affected.' => 'הרוטינה נקראה, %d שורות הושפעו',
'Call' => 'קרא',
'No extension' => 'אין תוסף',
'None of the supported PHP extensions (%s) are available.' => 'שום תוסף PHP (%s) זמין',
'Session support must be enabled.' => 'חובה להפעיל תמיכה בסשן',
'Session expired, please login again.' => 'תם זמן ההפעלה, אנא התחבר שוב',
'Text length' => 'אורך הטקסט',
'Foreign key has been dropped.' => 'המפתח הזר הושלך',
'Foreign key has been altered.' => 'המפתח הזר שונה',
'Foreign key has been created.' => 'המפתח הזר נוצר',
'Foreign key' => 'מפתח זר',
'Target table' => 'טבלת יעד',
'Change' => 'שנה',
'Source' => 'מקור',
'Target' => 'יעד',
'Add column' => 'הוסף עמודה',
'Alter' => 'שנה',
'Add foreign key' => 'הוסף מפתח זר',
'ON DELETE' => 'בעת מחיקה',
'ON UPDATE' => 'בעת עידכון',
'Index Type' => 'סוג אינדקס',
'Column (length)' => 'עמודה (אורך)',
'View has been dropped.' => 'התצוגה הושלכה',
'View has been altered.' => 'התצוגה שונתה',
'View has been created.' => 'התצוגה נוצרה',
'Alter view' => 'שנה תצוגה',
'Create view' => 'צור תצוגה',
'Name' => 'שם',
'Process list' => 'רשימת תהליכים',
'%d process(es) have been killed.' => '%d תהליכים חוסלו',
'Kill' => 'חסל',
'Parameter name' => 'שם הפרמטר',
'Database schema' => 'סכמת מסד נתונים',
'Create procedure' => 'צור פרוצדורה',
'Create function' => 'צור פונקציה',
'Routine has been dropped.' => 'הרוטינה הושלכה',
'Routine has been altered.' => 'הרוטינה שונתה',
'Routine has been created.' => 'הרוטינה נוצרה',
'Alter function' => 'שנה פונקציה',
'Alter procedure' => 'שנה פרוצדורה',
'Return type' => 'סוג ערך מוחזר',
'Add trigger' => 'הוסף טריגר',
'Trigger has been dropped.' => 'הטריגר הושלך',
'Trigger has been altered.' => 'הטריגר שונה',
'Trigger has been created.' => 'הטריגר נוצר',
'Alter trigger' => 'שנה טריגר',
'Create trigger' => 'צור טריגר',
'Time' => 'זמן',
'Event' => 'אירוע',
'%d row(s)' => '%d שורות',
'Remove' => 'הסר',
'Are you sure?' => 'האם אתה בטוח?',
'Privileges' => 'פריווילגיות',
'Create user' => 'צור משתמש',
'User has been dropped.' => 'המשתמש הושלך',
'User has been altered.' => 'המשתמש שונה',
'User has been created.' => 'המשתמש נוצר',
'Hashed' => 'הצפנה',
'Column' => 'עמודה',
'Routine' => 'רוטינה',
'Grant' => 'הענק',
'Revoke' => 'שלול',
'%s version: %s through PHP extension %s' => '%s גרסה: %s דרך תוסף PHP %s',
'Logged as: %s' => 'מחובר כ: %s',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'מידע גדול מידי נשלח ב-POST. הקטן את את המידע הוא הגדלת את הגדרות ה-%s',
'Move up' => 'הזז למעלה',
'Move down' => 'הזז למטה',
'Export' => 'יצא',
'Tables' => 'טבלאות',
'Data' => 'נתונים',
'Output' => 'פלט',
'open' => 'פתח',
'save' => 'שמור',
'Format' => 'פורמט',
'Functions' => 'פונקציות',
'Aggregation' => 'צבירה',
'Event has been dropped.' => 'האירוע הושלך',
'Event has been altered.' => 'האירוע שונה',
'Event has been created.' => 'האירוע נוצר',
'Alter event' => 'שנה אירוע',
'Create event' => 'צור אירוע',
'Start' => 'התחלה',
'End' => 'סיום',
'Every' => 'כל',
'Status' => 'סטטוס',
'On completion preserve' => 'בעת סיום שמור',
'Events' => 'אירועים',
'Schedule' => 'תזמן',
'At given time' => 'לפי זמן נתון',
'Save and continue edit' => 'שמור והמשך לערוך',
'original' => 'מקורי',
'Tables have been truncated.' => 'הטבלה קוצרה',
'Tables have been moved.' => 'הטבלה הועברה',
'Tables have been dropped.' => 'הטבלה הושלכה',
'Tables and views' => 'טבלאות ותצוגות',
'Engine' => 'מנוע',
'Collation' => 'קולקציה',
'Data Length' => 'אורך נתונים',
'Index Length' => 'אורך אינדקס',
'Data Free' => 'נתונים משוחררים',
'Rows' => 'שורות',
',' => ',',
'0123456789' => '0123456789',
'Analyze' => 'נתח',
'Optimize' => 'יעל',
'Check' => 'בדוק',
'Repair' => 'תקן',
'Truncate' => 'קצר',
'Move to other database' => 'העבר למסד נתונים אחר',
'Move' => 'העבר',
'%d item(s) have been affected.' => '%d פריטים הושפעו',
'Whole result' => 'כל התוצאות',
'Clone' => 'שכפל',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'הגעת למספר השדות המרבי. בבקשה הגדל את %s',
'Partition by' => 'מחיצות ע"י',
'Partitions' => 'מחיצות',
'Partition name' => 'שם מחיצה',
'Values' => 'ערכים',
'%d row(s) have been imported.' => '%d שורות יובאו',
'anywhere' => 'בכל מקום',
'Import' => 'יבא',
'Stop on error' => 'עצור בעת שגיאה',
'%.3f s' => '%.3f s',
'$1-$3-$5' => '$1-$3-$5',
'[yyyy]-mm-dd' => '[yyyy]-mm-dd',
'History' => 'היסטוריה',
'Variables' => 'משתנים',
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'על עמודות המקור והיעד להיות מאותו טיפוס נתונים, חובה שיהיה אינדקס בעמודת היעד ושהמידע המתאים יהיה קיים',
'Relations' => 'הקשרים',
'Run file' => 'הרץ קובץ',
'Clear' => 'נקה',
'Maximum allowed file size is %sB.' => 'גודל מקסימלאי להעלאה: %sB',
'Numbers' => 'מספרים',
'Date and time' => 'תאריך ושעה',
'Strings' => 'מחרוזות',
'Binary' => 'בינארי',
'Lists' => 'רשימות',
'Editor' => 'עורך',
'E-mail' => 'דוא"ל',
'From' => 'מ:',
'Subject' => 'נושא',
'Send' => 'שלח',
'%d e-mail(s) have been sent.' => '%d הודעות דוא"ל נשלחו',
'Webserver file %s' => 'קובץ השרת %s',
'File does not exist.' => 'הקובץ אינו קיים',
'%d in total' => '%d בסך הכל',
'Permanent login' => 'התחבר לצמיתות',
'Databases have been dropped.' => 'מסד הנתונים הושלך',
'Database has been dropped.' => 'מסד הנתונים הושלך',
'Search data in tables' => 'חפש מידע בטבלאות',
'Schema' => 'סכמה',
'Alter schema' => 'שנה סכמה',
'Create schema' => 'צור סכמה',
'Schema has been dropped.' => 'הסכמה הושלכה',
'Schema has been created.' => 'הסכמה נוצרה',
'Schema has been altered.' => 'הסכמה שונתה',
'Sequences' => 'סדרות',
'Create sequence' => 'צור סדרה',
'Alter sequence' => 'שנה סדרה',
'Sequence has been dropped.' => 'הסדרה הושלכה',
'Sequence has been created.' => 'הסדרה נוצרה',
'Sequence has been altered.' => 'הסדרה שונתה',
'User types' => 'סוגי משתמשים',
'Create type' => 'צור סוג',
'Alter type' => 'שנה סוג',
'Type has been dropped.' => 'הסוג הושלך',
'Type has been created.' => 'הסוג נוצר',
'Use edit link to modify this value.' => 'השתמש בקישור העריכה בשביל לשנות את הערך',
'last' => 'אחרון',
'From server' => 'משרת',
'System' => 'מערכת',
'Select data' => 'בחר נתונים',
'Show structure' => 'הראה מבנה',
'empty' => 'ריק',
'Network' => 'רשת',
'Geometry' => 'גיאומטריה',
'File exists.' => 'קובץ קיים',
'Attachments' => 'קבצים מצורפים',
'Item%s has been inserted.' => 'הפריט %s הוזן בהצלחה',
'now' => 'כעת',
'%d query(s) executed OK.' => '%d שאילתות בוצעו בהצלחה',
'Show only errors' => 'הראה שגיאות בלבד',
'Refresh' => 'רענן',
'Invalid schema.' => 'סכמה שגויה',
'Please use one of the extensions %s.' => 'בבקשה השתמש באחד מהתוספים %s',
'ltr' => 'rtl',
'Tables have been copied.' => 'הטבלה הועתקה',
'Copy' => 'העתק',
'Permanent link' => 'קישור סופי',
'Edit all' => 'ערוך הכל',
'HH:MM:SS' => 'HH:MM:SS',
'Tables have been optimized.' => 'הטבלאות עברו אופטימיזציה',
'Materialized view' => 'תצוגת מימוש ',
'Vacuum' => 'וואקום',
'Selected' => 'נבחרים',
'Ctrl+click on a value to modify it.' => 'לחץ ctrl + לחיצת עכבר לערוך ערך זה',
'File must be in UTF-8 encoding.' => 'על הקובץ להיות בקידוד utf-8',
'Modify' => 'ערוך',
'Loading' => 'טוען',
'Load more data' => 'טען נתונים נוספים',
'ATTACH queries are not supported.' => 'שאילתת ATTACH אינה נתמכת',
'%d / ' => '%d / ',
'Limit rows' => 'הגבל שורות',
'<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => '<a href="https://www.adminer.org/en/extension/"%s>התקן</a> את תוסף SQLite בשביל להתחבר',
'Default value' => 'ערך ברירת מחדל',
'Full table scan' => 'סריקה טבלה מלאה',
'Too many unsuccessful logins, try again in %d minute(s).' => 'יותר מידי נסיונות כניסה נכשלו, אנא נסה עוד %d דקות',
'Thanks for using Adminer, consider <a href="%s">donating</a>.' => 'תודה שהשתמש ב-adminer אנא שקול <a href="%s">לתרום</a>.',
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'סיסמת המאסטר פגה <a href="https://www.adminer.org/en/extension/"%s>התקן תוסף</a> על מנת להפוך את זה לתמידי',
'If you did not send this request from Adminer then close this page.' => 'אם לא אתה שלחת בקשה ל-Adminer הינך יכול לסגור חלון זה',
'You can upload a big SQL file via FTP and import it from server.' => 'ניתן לעלות קבצים ב-FTP ואז למשוך אותם מהשרת',
'Size' => 'גודל',
'Compute' => 'חישוב',
'You are offline.' => 'הינך לא מקוון',
'You have no privileges to update this table.' => 'אין לך ההרשאות המתאימות לעדכן טבלה זו',
'Saving' => 'שומר',
'yes' => 'כן',
'no' => 'לא',
);

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Jelszó', 'Password' => 'Jelszó',
'Select database' => 'Adatbázis kiválasztása', 'Select database' => 'Adatbázis kiválasztása',
'Invalid database.' => 'Érvénytelen adatbázis.', 'Invalid database.' => 'Érvénytelen adatbázis.',
'Create new database' => 'Új adatbázis',
'Table has been dropped.' => 'A tábla eldobva.', 'Table has been dropped.' => 'A tábla eldobva.',
'Table has been altered.' => 'A tábla módosult.', 'Table has been altered.' => 'A tábla módosult.',
'Table has been created.' => 'A tábla létrejött.', 'Table has been created.' => 'A tábla létrejött.',
@@ -186,7 +185,7 @@ $translations = array(
'Save and continue edit' => 'Mentés és szerkesztés folytatása', 'Save and continue edit' => 'Mentés és szerkesztés folytatása',
'original' => 'eredeti', 'original' => 'eredeti',
'%d item(s) have been affected.' => array('%d tétel érintett.', '%d tétel érintett.', '%d tétel érintett.'), '%d item(s) have been affected.' => array('%d tétel érintett.', '%d tétel érintett.', '%d tétel érintett.'),
'whole result' => 'összes eredményt mutatása', 'Whole result' => 'Összes eredményt mutatása',
'Tables have been dropped.' => 'Táblák eldobva.', 'Tables have been dropped.' => 'Táblák eldobva.',
'Clone' => 'Klónoz', 'Clone' => 'Klónoz',
'Partition by' => 'Particionálás ezzel', 'Partition by' => 'Particionálás ezzel',

View File

@@ -10,11 +10,11 @@ $translations = array(
'Logout' => 'Keluar', 'Logout' => 'Keluar',
'Logged as: %s' => 'Masuk sebagai: %s', 'Logged as: %s' => 'Masuk sebagai: %s',
'Logout successful.' => 'Berhasil keluar.', 'Logout successful.' => 'Berhasil keluar.',
'Invalid credentials.' => 'Akses invalid.', 'Invalid credentials.' => 'Akses tidak sah.',
'Language' => 'Bahasa', 'Language' => 'Bahasa',
'Invalid CSRF token. Send the form again.' => 'Token CSRF invalid. Kirim ulang formulir.', 'Invalid CSRF token. Send the form again.' => 'Token CSRF tidak sah. Kirim ulang formulir.',
'No extension' => 'Ekstensi tidak tersedia', 'No extension' => 'Ekstensi tidak ada',
'None of the supported PHP extensions (%s) are available.' => 'Ekstensi PHP yang didukung (%s) tidak tersedia.', 'None of the supported PHP extensions (%s) are available.' => 'Ekstensi PHP yang didukung (%s) tidak ada.',
'Session support must be enabled.' => 'Dukungan sesi harus aktif.', 'Session support must be enabled.' => 'Dukungan sesi harus aktif.',
'Session expired, please login again.' => 'Sesi habis, silakan masuk lagi.', 'Session expired, please login again.' => 'Sesi habis, silakan masuk lagi.',
'%s version: %s through PHP extension %s' => 'Versi %s: %s dengan ekstensi PHP %s', '%s version: %s through PHP extension %s' => 'Versi %s: %s dengan ekstensi PHP %s',
@@ -44,26 +44,26 @@ $translations = array(
'SQL command' => 'Perintah SQL', 'SQL command' => 'Perintah SQL',
'%d query(s) executed OK.' => '%d kueri berhasil dijalankan.', '%d query(s) executed OK.' => '%d kueri berhasil dijalankan.',
'Query executed OK, %d row(s) affected.' => 'Kueri berhasil, %d baris terpengaruh.', 'Query executed OK, %d row(s) affected.' => 'Kueri berhasil, %d baris terpengaruh.',
'No commands to execute.' => 'Tiada perintah untuk dijalankan.', 'No commands to execute.' => 'Tidak ada perintah untuk dijalankan.',
'Error in query' => 'Kesalahan dalam kueri', 'Error in query' => 'Galat dalam kueri',
'Execute' => 'Jalankan', 'Execute' => 'Jalankan',
'Stop on error' => 'Hentikan pada kesalahan', 'Stop on error' => 'Hentikan jika galat',
'Show only errors' => 'Hanya tampilkan kesalahan', 'Show only errors' => 'Hanya tampilkan galat',
// sprintf() format for time of the command // sprintf() format for time of the command
'%.3f s' => '%.3f s', '%.3f s' => '%.3f s',
'History' => 'Riwayat', 'History' => 'Riwayat',
'Clear' => 'Bersihkan', 'Clear' => 'Bersihkan',
'Edit all' => 'Edit semua',
'Edit all' => 'Sunting semua',
'File upload' => 'Unggah berkas', 'File upload' => 'Unggah berkas',
'From server' => 'Dari server', 'From server' => 'Dari server',
'Webserver file %s' => 'Berkas server web %s', 'Webserver file %s' => 'Berkas server web %s',
'Run file' => 'Jalankan berkas', 'Run file' => 'Jalankan berkas',
'File does not exist.' => 'Berkas tidak ditemukan.', 'File does not exist.' => 'Berkas tidak ada.',
'File uploads are disabled.' => 'Pengunggahan berkas dimatikan.', 'File uploads are disabled.' => 'Pengunggahan berkas dimatikan.',
'Unable to upload a file.' => 'Tidak dapat mengunggah berkas.', 'Unable to upload a file.' => 'Tidak dapat mengunggah berkas.',
'Maximum allowed file size is %sB.' => 'Besar berkas yang diizinkan adalah %s bita.', 'Maximum allowed file size is %sB.' => 'Besar berkas yang diizinkan adalah %sB.',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Data POST terlalu besar. Kurangi data atau perbesar pengarah konfigurasi %s.', 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Data POST terlalu besar. Kurangi data atau perbesar direktif konfigurasi %s.',
'Export' => 'Ekspor', 'Export' => 'Ekspor',
'Output' => 'Hasil', 'Output' => 'Hasil',
@@ -76,19 +76,18 @@ $translations = array(
'database' => 'basis data', 'database' => 'basis data',
'Use' => 'Gunakan', 'Use' => 'Gunakan',
'Select database' => 'Pilih basis data', 'Select database' => 'Pilih basis data',
'Invalid database.' => 'Basis data invalid.', 'Invalid database.' => 'Basis data tidak sah.',
'Create new database' => 'Buat basis data baru',
'Database has been dropped.' => 'Basis data berhasil dihapus.', 'Database has been dropped.' => 'Basis data berhasil dihapus.',
'Databases have been dropped.' => 'Basis data berhasil dihapus.', 'Databases have been dropped.' => 'Basis data berhasil dihapus.',
'Database has been created.' => 'Basis data berhasil dibuat.', 'Database has been created.' => 'Basis data berhasil dibuat.',
'Database has been renamed.' => 'Basis data berhasil diganti nama.', 'Database has been renamed.' => 'Basis data berhasil diganti namanya.',
'Database has been altered.' => 'Basis data berhasil diubah.', 'Database has been altered.' => 'Basis data berhasil diubah.',
'Alter database' => 'Ubah basis data', 'Alter database' => 'Ubah basis data',
'Create database' => 'Buat basis data', 'Create database' => 'Buat basis data',
'Database schema' => 'Skema basis data', 'Database schema' => 'Skema basis data',
// link to current database schema layout // link to current database schema layout
'Permanent link' => 'Tautan permanen', 'Permanent link' => 'Pranala permanen',
// thousands separator - must contain single byte // thousands separator - must contain single byte
',' => '.', ',' => '.',
@@ -113,9 +112,9 @@ $translations = array(
'Tables have been copied.' => 'Tabel berhasil disalin.', 'Tables have been copied.' => 'Tabel berhasil disalin.',
'Routines' => 'Rutin', 'Routines' => 'Rutin',
'Routine has been called, %d row(s) affected.' => array('Rutin telah dipanggil, %d baris terpengaruh.', 'Rutin telah dipanggil, %d baris terpengaruh'), 'Routine has been called, %d row(s) affected.' => 'Rutin telah dipanggil, %d baris terpengaruh.',
'Call' => 'Panggilan', 'Call' => 'Panggilan',
'Parameter name' => 'Nama paramater', 'Parameter name' => 'Nama parameter',
'Create procedure' => 'Buat prosedur', 'Create procedure' => 'Buat prosedur',
'Create function' => 'Buat fungsi', 'Create function' => 'Buat fungsi',
'Routine has been dropped.' => 'Rutin berhasil dihapus.', 'Routine has been dropped.' => 'Rutin berhasil dihapus.',
@@ -123,14 +122,14 @@ $translations = array(
'Routine has been created.' => 'Rutin berhasil dibuat.', 'Routine has been created.' => 'Rutin berhasil dibuat.',
'Alter function' => 'Ubah fungsi', 'Alter function' => 'Ubah fungsi',
'Alter procedure' => 'Ubah prosedur', 'Alter procedure' => 'Ubah prosedur',
'Return type' => 'Jenis balikan', 'Return type' => 'Jenis pengembalian',
'Events' => 'Peristiwa', 'Events' => 'Even',
'Event has been dropped.' => 'Peristiwa berhasil dihapus.', 'Event has been dropped.' => 'Even berhasil dihapus.',
'Event has been altered.' => 'Peristiwa berhasil diubah.', 'Event has been altered.' => 'Even berhasil diubah.',
'Event has been created.' => 'Peristiwa berhasil dibuat.', 'Event has been created.' => 'Even berhasil dibuat.',
'Alter event' => 'Ubah peristiwa', 'Alter event' => 'Ubah even',
'Create event' => 'Buat peristiwa', 'Create event' => 'Buat even',
'At given time' => 'Pada waktu tertentu', 'At given time' => 'Pada waktu tertentu',
'Every' => 'Setiap', 'Every' => 'Setiap',
'Schedule' => 'Jadwal', 'Schedule' => 'Jadwal',
@@ -141,7 +140,7 @@ $translations = array(
'Tables' => 'Tabel', 'Tables' => 'Tabel',
'Tables and views' => 'Tabel dan tampilan', 'Tables and views' => 'Tabel dan tampilan',
'Table' => 'Tabel', 'Table' => 'Tabel',
'No tables.' => 'Tiada tabel.', 'No tables.' => 'Tidak ada tabel.',
'Alter table' => 'Ubah tabel', 'Alter table' => 'Ubah tabel',
'Create table' => 'Buat tabel', 'Create table' => 'Buat tabel',
'Table has been dropped.' => 'Tabel berhasil dihapus.', 'Table has been dropped.' => 'Tabel berhasil dihapus.',
@@ -156,16 +155,16 @@ $translations = array(
'Column name' => 'Nama kolom', 'Column name' => 'Nama kolom',
'Type' => 'Jenis', 'Type' => 'Jenis',
'Length' => 'Panjang', 'Length' => 'Panjang',
'Auto Increment' => 'Kenaikan Otomatis', 'Auto Increment' => 'Inkrementasi Otomatis',
'Options' => 'Opsi', 'Options' => 'Opsi',
'Comment' => 'Komentar', 'Comment' => 'Komentar',
'Default values' => 'Nilai bawaan', 'Default values' => 'Nilai bawaan',
'Drop' => 'Hapus', 'Drop' => 'Hapus',
'Are you sure?' => 'Anda yakin', 'Are you sure?' => 'Anda yakin?',
'Move up' => 'Naik', 'Move up' => 'Naik',
'Move down' => 'Turun', 'Move down' => 'Turun',
'Remove' => 'Hapus', 'Remove' => 'Hapus',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Jumlah ruas maksimum yang diizinkan dilewati. Harap naikkan %s.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Sudah lebih dumlah ruas maksimum yang diizinkan. Harap naikkan %s.',
'Partition by' => 'Partisi menurut', 'Partition by' => 'Partisi menurut',
'Partitions' => 'Partisi', 'Partitions' => 'Partisi',
@@ -202,15 +201,15 @@ $translations = array(
'ON UPDATE' => 'ON UPDATE', 'ON UPDATE' => 'ON UPDATE',
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Kolom sumber dan sasaran harus memiliki jenis data yang sama. Kolom sasaran harus memiliki indeks dan data rujukan harus ada.', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Kolom sumber dan sasaran harus memiliki jenis data yang sama. Kolom sasaran harus memiliki indeks dan data rujukan harus ada.',
'Triggers' => 'Picu', 'Triggers' => 'Pemicu',
'Add trigger' => 'Tambah picu', 'Add trigger' => 'Tambah pemicu',
'Trigger has been dropped.' => 'Picu berhasil dihapus.', 'Trigger has been dropped.' => 'Pemicu berhasil dihapus.',
'Trigger has been altered.' => 'Picu berhasil diubah.', 'Trigger has been altered.' => 'Pemicu berhasil diubah.',
'Trigger has been created.' => 'Picu berhasil dibuat.', 'Trigger has been created.' => 'Pemicu berhasil dibuat.',
'Alter trigger' => 'Ubah picu', 'Alter trigger' => 'Ubah pemicu',
'Create trigger' => 'Buat picu', 'Create trigger' => 'Buat pemicu',
'Time' => 'Waktu', 'Time' => 'Waktu',
'Event' => 'Peristiwa', 'Event' => 'Even',
'Name' => 'Nama', 'Name' => 'Nama',
'select' => 'pilih', 'select' => 'pilih',
@@ -221,25 +220,25 @@ $translations = array(
'Search' => 'Cari', 'Search' => 'Cari',
'anywhere' => 'di mana pun', 'anywhere' => 'di mana pun',
'Search data in tables' => 'Cari data dalam tabel', 'Search data in tables' => 'Cari data dalam tabel',
'Sort' => 'Urutan', 'Sort' => 'Urutkan',
'descending' => 'menurun', 'descending' => 'menurun',
'Limit' => 'Limit', 'Limit' => 'Batas',
'Text length' => 'Panjang teks', 'Text length' => 'Panjang teks',
'Action' => 'Tindakan', 'Action' => 'Tindakan',
'Full table scan' => 'Pindai tabel lengkap', 'Full table scan' => 'Pindai tabel lengkap',
'Unable to select the table' => 'Gagal memilih tabel', 'Unable to select the table' => 'Gagal memilih tabel',
'No rows.' => 'Tiada baris.', 'No rows.' => 'Tidak ada baris.',
'%d row(s)' => '%d baris', '%d row(s)' => '%d baris',
'Page' => 'Halaman', 'Page' => 'Halaman',
'last' => 'terakhir', 'last' => 'terakhir',
'whole result' => 'Seluruh hasil', 'Whole result' => 'Seluruh hasil',
'%d byte(s)' => '%d bita', '%d byte(s)' => '%d bita',
'Import' => 'Impor', 'Import' => 'Impor',
'%d row(s) have been imported.' => '%d baris berhasil diimpor.', '%d row(s) have been imported.' => '%d baris berhasil diimpor.',
// in-place editing in select // in-place editing in select
'Use edit link to modify this value.' => 'Gunakan tautan edit untuk mengubah nilai ini.', 'Use edit link to modify this value.' => 'Gunakan pranala suntingan untuk mengubah nilai ini.',
// %s can contain auto-increment value // %s can contain auto-increment value
'Item%s has been inserted.' => 'Entri%s berhasil disisipkan.', 'Item%s has been inserted.' => 'Entri%s berhasil disisipkan.',
@@ -247,30 +246,30 @@ $translations = array(
'Item has been updated.' => 'Entri berhasil diperbarui.', 'Item has been updated.' => 'Entri berhasil diperbarui.',
'%d item(s) have been affected.' => '%d entri terpengaruh.', '%d item(s) have been affected.' => '%d entri terpengaruh.',
'New item' => 'Entri baru', 'New item' => 'Entri baru',
'original' => 'orisinal', 'original' => 'asli',
// label for value '' in enum data type // label for value '' in enum data type
'empty' => 'kosong', 'empty' => 'kosong',
'edit' => 'edit', 'edit' => 'sunting',
'Edit' => 'Edit', 'Edit' => 'Sunting',
'Insert' => 'Sisipkan', 'Insert' => 'Sisipkan',
'Save' => 'Simpan', 'Save' => 'Simpan',
'Save and continue edit' => 'Simpan dan terus mengedit', 'Save and continue edit' => 'Simpan dan lanjut menyunting',
'Save and insert next' => 'Simpan dan sisipkan yang lain', 'Save and insert next' => 'Simpan dan sisipkan berikutnya',
'Clone' => 'Gandakan', 'Clone' => 'Gandakan',
'Delete' => 'Hapus', 'Delete' => 'Hapus',
'E-mail' => 'Surel', 'E-mail' => 'Surel',
'From' => 'Dari', 'From' => 'Dari',
'Subject' => 'Subjek', 'Subject' => 'Judul',
'Attachments' => 'Lampiran', 'Attachments' => 'Lampiran',
'Send' => 'Kirim', 'Send' => 'Kirim',
'%d e-mail(s) have been sent.' => array('%d surel berhasil dikirim.', '%d surel berhasil dikirim'), '%d e-mail(s) have been sent.' => '%d surel berhasil dikirim.',
// data type descriptions // data type descriptions
'Numbers' => 'Angka', 'Numbers' => 'Angka',
'Date and time' => 'Tanggal dan waktu', 'Date and time' => 'Tanggal dan waktu',
'Strings' => 'String', 'Strings' => 'String',
'Binary' => 'Biner', 'Binary' => 'Binari',
'Lists' => 'Daftar', 'Lists' => 'Daftar',
'Network' => 'Jaringan', 'Network' => 'Jaringan',
'Geometry' => 'Geometri', 'Geometry' => 'Geometri',
@@ -298,7 +297,7 @@ $translations = array(
'Schema has been created.' => 'Skema berhasil dibuat.', 'Schema has been created.' => 'Skema berhasil dibuat.',
'Schema has been altered.' => 'Skema berhasil diubah.', 'Schema has been altered.' => 'Skema berhasil diubah.',
'Schema' => 'Skema', 'Schema' => 'Skema',
'Invalid schema.' => 'Skema invalid.', 'Invalid schema.' => 'Skema tidak sah.',
// PostgreSQL sequences support // PostgreSQL sequences support
'Sequences' => 'Deret', 'Sequences' => 'Deret',

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Password', 'Password' => 'Password',
'Select database' => 'Seleziona database', 'Select database' => 'Seleziona database',
'Invalid database.' => 'Database non valido.', 'Invalid database.' => 'Database non valido.',
'Create new database' => 'Crea nuovo database',
'Table has been dropped.' => 'Tabella eliminata.', 'Table has been dropped.' => 'Tabella eliminata.',
'Table has been altered.' => 'Tabella modificata.', 'Table has been altered.' => 'Tabella modificata.',
'Table has been created.' => 'Tabella creata.', 'Table has been created.' => 'Tabella creata.',
@@ -187,7 +186,7 @@ $translations = array(
'Move to other database' => 'Sposta in altro database', 'Move to other database' => 'Sposta in altro database',
'Move' => 'Sposta', 'Move' => 'Sposta',
'%d item(s) have been affected.' => array('Il risultato consiste in %d elemento.', 'Il risultato consiste in %d elementi.'), '%d item(s) have been affected.' => array('Il risultato consiste in %d elemento.', 'Il risultato consiste in %d elementi.'),
'whole result' => 'intero risultato', 'Whole result' => 'Intero risultato',
'Clone' => 'Clona', 'Clone' => 'Clona',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Troppi campi. Per favore aumentare %s.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Troppi campi. Per favore aumentare %s.',
'Partition by' => 'Partiziona per', 'Partition by' => 'Partiziona per',

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'パスワード', 'Password' => 'パスワード',
'Select database' => 'データベースを選択してください', 'Select database' => 'データベースを選択してください',
'Invalid database.' => '不正なデータベース', 'Invalid database.' => '不正なデータベース',
'Create new database' => '新規にデータベースを作成',
'Table has been dropped.' => 'テーブルを削除しました', 'Table has been dropped.' => 'テーブルを削除しました',
'Table has been altered.' => 'テーブルを変更しました', 'Table has been altered.' => 'テーブルを変更しました',
'Table has been created.' => 'テーブルを作成しました', 'Table has been created.' => 'テーブルを作成しました',
@@ -185,7 +184,7 @@ $translations = array(
'Save and continue edit' => '保存して継続', 'Save and continue edit' => '保存して継続',
'original' => '元', 'original' => '元',
'%d item(s) have been affected.' => '%d を更新しました', '%d item(s) have been affected.' => '%d を更新しました',
'whole result' => '全結果', 'Whole result' => '全結果',
'Tables have been dropped.' => 'テーブルを削除しました', 'Tables have been dropped.' => 'テーブルを削除しました',
'Clone' => 'クローン', 'Clone' => 'クローン',
'Maximum number of allowed fields exceeded. Please increase %s.' => '定義可能な最大フィールド数を越えました。%s を増やしてください。', 'Maximum number of allowed fields exceeded. Please increase %s.' => '定義可能な最大フィールド数を越えました。%s を増やしてください。',

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => '비밀번호', 'Password' => '비밀번호',
'Select database' => '데이터베이스를 선택하십시오.', 'Select database' => '데이터베이스를 선택하십시오.',
'Invalid database.' => '잘못된 데이터베이스입니다.', 'Invalid database.' => '잘못된 데이터베이스입니다.',
'Create new database' => '새 데이터베이스 만들기',
'Table has been dropped.' => '테이블을 삭제했습니다.', 'Table has been dropped.' => '테이블을 삭제했습니다.',
'Table has been altered.' => '테이블을 변경했습니다.', 'Table has been altered.' => '테이블을 변경했습니다.',
'Table has been created.' => '테이블을 만들었습니다.', 'Table has been created.' => '테이블을 만들었습니다.',
@@ -185,7 +184,7 @@ $translations = array(
'Save and continue edit' => '저장하고 계속', 'Save and continue edit' => '저장하고 계속',
'original' => '원래', 'original' => '원래',
'%d item(s) have been affected.' => '%d를 갱신했습니다.', '%d item(s) have been affected.' => '%d를 갱신했습니다.',
'whole result' => '모든 결과', 'Whole result' => '모든 결과',
'Tables have been dropped.' => '테이블을 삭제했습니다.', 'Tables have been dropped.' => '테이블을 삭제했습니다.',
'Clone' => '복제', 'Clone' => '복제',
'Maximum number of allowed fields exceeded. Please increase %s.' => '정의 가능한 최대 필드 수를 초과했습니다. %s를 늘리십시오.', 'Maximum number of allowed fields exceeded. Please increase %s.' => '정의 가능한 최대 필드 수를 초과했습니다. %s를 늘리십시오.',

View File

@@ -77,7 +77,6 @@ $translations = array(
'Use' => 'Naudoti', 'Use' => 'Naudoti',
'Select database' => 'Pasirinkti duomenų bazę', 'Select database' => 'Pasirinkti duomenų bazę',
'Invalid database.' => 'Neteisinga duomenų bazė.', 'Invalid database.' => 'Neteisinga duomenų bazė.',
'Create new database' => 'Sukurti naują duomenų bazę',
'Database has been dropped.' => 'Duomenų bazė panaikinta.', 'Database has been dropped.' => 'Duomenų bazė panaikinta.',
'Databases have been dropped.' => 'Duomenų bazės panaikintos.', 'Databases have been dropped.' => 'Duomenų bazės panaikintos.',
'Database has been created.' => 'Duomenų bazė sukurta.', 'Database has been created.' => 'Duomenų bazė sukurta.',
@@ -230,7 +229,7 @@ $translations = array(
'%d row(s)' => array('%d įrašas', '%d įrašai', '%d įrašų'), '%d row(s)' => array('%d įrašas', '%d įrašai', '%d įrašų'),
'Page' => 'Puslapis', 'Page' => 'Puslapis',
'last' => 'paskutinis', 'last' => 'paskutinis',
'whole result' => 'visas rezultatas', 'Whole result' => 'Visas rezultatas',
'%d byte(s)' => array('%d baitas', '%d baigai', '%d baitų'), '%d byte(s)' => array('%d baitas', '%d baigai', '%d baitų'),
'Import' => 'Importas', 'Import' => 'Importas',

341
adminer/lang/ms.inc.php Normal file
View File

@@ -0,0 +1,341 @@
<?php
$translations = array(
// label for database system selection (MySQL, SQLite, ...)
'System' => 'Sistem',
'Server' => 'Pelayan',
'Username' => 'Nama pengguna',
'Password' => 'Kata laluan',
'Permanent login' => 'Log masuk kekal',
'Login' => 'Log masuk',
'Logout' => 'Log keluar',
'Logged as: %s' => 'Log masuk sebagai: %s',
'Logout successful.' => 'Log keluar berjaya.',
'Thanks for using Adminer, consider <a href="%s">donating</a>.' => 'Terima kasih kerana menggunakan Adminer, pertimbangkan untuk <a href="%s">menderma</a>.',
'Invalid credentials.' => 'Akses tidak sah.',
'<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => '<a href="https://www.adminer.org/en/extension/"%s>Gunakan</a> cara %s untuk menggunakan SQLite.',
'Too many unsuccessful logins, try again in %d minute(s).' => 'Terlalu banyak percubaan log masuk yang gagal, sila cuba lagi dalam masa %d minit.',
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Kata laluan utama telah luput. <a href="https://www.adminer.org/en/extension/"%s>Gunakan</a> cara %s untuk mengekalkannya.',
'Language' => 'Bahasa',
'Invalid CSRF token. Send the form again.' => 'Token CSRF tidak sah. Sila hantar borang sekali lagi.',
'If you did not send this request from Adminer then close this page.' => 'Jika anda tidak menghantar permintaan ini dari Adminer sila tutup halaman ini.',
'No extension' => 'Tiada sambungan',
'None of the supported PHP extensions (%s) are available.' => 'Sambungan PHP yang (%s) disokong tidak wujud.',
'Connecting to privileged ports is not allowed.' => 'Penyambungan ke port yang istimewa tidak dibenarkan.',
'Session support must be enabled.' => 'Sokongan sesi perlu diaktifkan.',
'Session expired, please login again.' => 'Sesi telah luput, sila log masuk kembali.',
'%s version: %s through PHP extension %s' => 'Versi %s: %s melalui sambungan PHP %s',
'Refresh' => 'Segar kembali',
// text direction - 'ltr' or 'rtl'
'ltr' => 'ltr',
'Privileges' => 'Keistimewaan',
'Create user' => 'Bina pengguna',
'User has been dropped.' => 'Pengguna telah dijatuhkan.',
'User has been altered.' => 'Pengguna telah diubah.',
'User has been created.' => 'Pengguna telah dibuat.',
'Hashed' => 'Hashed',
'Column' => 'Kolum',
'Routine' => 'Rutin',
'Grant' => 'Beri',
'Revoke' => 'Batal',
'Process list' => 'Senarai proses',
'%d process(es) have been killed.' => '%d proses telah dihentikan.',
'Kill' => 'Henti',
'Variables' => 'Pembolehubah',
'Status' => 'Status',
'SQL command' => 'Arahan SQL',
'%d query(s) executed OK.' => '%d query berjaya dilaksanakan.',
'Query executed OK, %d row(s) affected.' => 'Query berjaya dilaksanakan, %d baris terjejas.',
'No commands to execute.' => 'Tiada arahan untuk dilaksanakan.',
'Error in query' => 'Ralat pada query',
'ATTACH queries are not supported.' => 'Query berikut tidak disokong.',
'Execute' => 'Laksana',
'Stop on error' => 'Berhenti jika ralat',
'Show only errors' => 'Paparkan jika ralat',
// sprintf() format for time of the command
'%.3f s' => '%.3f s',
'History' => 'Sejarah',
'Clear' => 'Bersih',
'Edit all' => 'Ubah semua',
'File upload' => 'Muat naik fail',
'From server' => 'Dari pelayan',
'Webserver file %s' => 'Fail pelayan sesawang %s',
'Run file' => 'Jalankan fail',
'File does not exist.' => 'Fail tidak wujud.',
'File uploads are disabled.' => 'Muat naik fail dihalang.',
'Unable to upload a file.' => 'Muat naik fail gagal.',
'Maximum allowed file size is %sB.' => 'Saiz fail maksimum yang dibenarkan adalah %sB.',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Data POST terlalu besar. Kecilkan data atau tingkatkan tetapan %s.',
'You can upload a big SQL file via FTP and import it from server.' => 'Anda boleh muat naik fail SQL yang besar melalui FTP dan import melalui pelayan.',
'You are offline.' => 'Anda sedang offline.',
'Export' => 'Eksport',
'Output' => 'Pengeluaran',
'open' => 'buka',
'save' => 'simpan',
'Saving' => 'Menyimpan',
'Format' => 'Format',
'Data' => 'Data',
'Database' => 'Pangkalan data',
'database' => 'pangkalan data',
'Use' => 'Guna',
'Select database' => 'Pilih pangkalan data',
'Invalid database.' => 'Pangkalan data tidak sah.',
'Database has been dropped.' => 'Pangkalan data telah dijatuhkan.',
'Databases have been dropped.' => 'Pangkalan data telah dijatuhkan.',
'Database has been created.' => 'Pangkalan data telah dibuat.',
'Database has been renamed.' => 'Pangkalan data telah ditukar nama.',
'Database has been altered.' => 'Pangkalan data telah diubah.',
'Alter database' => 'Ubah pangkalan data',
'Create database' => 'Bina pangkalan data',
'Database schema' => 'Skema pangkalan data',
// link to current database schema layout
'Permanent link' => 'Pautan kekal',
// thousands separator - must contain single byte
',' => ',',
'0123456789' => '0123456789',
'Engine' => 'Enjin',
'Collation' => 'Collation',
'Data Length' => 'Panjang Data',
'Index Length' => 'Panjang Indeks',
'Data Free' => 'Data Free',
'Rows' => 'Baris',
'%d in total' => '%d secara keseluruhan',
'Analyze' => 'Menganalisis',
'Optimize' => 'Mengoptimum',
'Vacuum' => 'Vacuum',
'Check' => 'Periksa',
'Repair' => 'Baiki',
'Truncate' => 'Memangkas',
'Tables have been truncated.' => 'Jadual telah dimangkaskan.',
'Move to other database' => 'Pindahkan ke pangkalan data yang lain',
'Move' => 'Pindah',
'Tables have been moved.' => 'Jadual telah dipindahkan.',
'Copy' => 'Salin',
'Tables have been copied.' => 'Jadual telah disalin.',
'Routines' => 'Rutin',
'Routine has been called, %d row(s) affected.' => 'Rutin telah dipanggil, %d baris terjejas.',
'Call' => 'Panggil',
'Parameter name' => 'Nama pembolehubah',
'Create procedure' => 'Bina prosedur',
'Create function' => 'Bina fungsi',
'Routine has been dropped.' => 'Rutin telah dijatuhkan.',
'Routine has been altered.' => 'Rutin telah diubah.',
'Routine has been created.' => 'Rutin telah dibuat.',
'Alter function' => 'Ubah fungsi',
'Alter procedure' => 'Ubah prosedur',
'Return type' => 'Jenis Return',
'Events' => 'Peristiwa',
'Event has been dropped.' => 'Peristiwa telah dijatuhkan.',
'Event has been altered.' => 'Peristiwa telah diubah.',
'Event has been created.' => 'Peristiwa telah dibuat.',
'Alter event' => 'Ubah peristiwa',
'Create event' => 'Bina peristiwa',
'At given time' => 'Pada masa tersebut',
'Every' => 'Setiap',
'Schedule' => 'Jadual',
'Start' => 'Mula',
'End' => 'Habis',
'On completion preserve' => 'Dalam melestarikan penyelesaian',
'Tables' => 'Jadual',
'Tables and views' => 'Jadual dan pandangan',
'Table' => 'Jadual',
'No tables.' => 'Tiada jadual.',
'Alter table' => 'Ubah jadual',
'Create table' => 'Bina jadual',
'Table has been dropped.' => 'Jadual telah dijatuhkan.',
'Tables have been dropped.' => 'Jadual telah dijatuhkan.',
'Tables have been optimized.' => 'Jadual telah dioptimumkan.',
'Table has been altered.' => 'Jadual telah diubah.',
'Table has been created.' => 'Jadual telah dibuat.',
'Table name' => 'Nama jadual',
'Show structure' => 'Paparkan struktur',
'engine' => 'enjin',
'collation' => 'collation',
'Column name' => 'Nama kolum',
'Type' => 'Jenis',
'Length' => 'Kepanjangan',
'Auto Increment' => 'Kenaikan Auto',
'Options' => 'Pilihan',
'Comment' => 'Komen',
'Default value' => 'Nilai lalai',
'Default values' => 'Nilai lalai',
'Drop' => 'Jatuh',
'Drop %s?' => 'Jatuhkan %s?',
'Are you sure?' => 'Anda pasti?',
'Size' => 'Saiz',
'Compute' => 'Kira',
'Move up' => 'Gerak ke atas',
'Move down' => 'Gerak ke bawah',
'Remove' => 'Buang',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Bilangan medan telah melebihi had yang dibenarkan. Sila tingkatkan %s.',
'Partition by' => 'Partition mengikut',
'Partitions' => 'Partition',
'Partition name' => 'Nama partition',
'Values' => 'Nilai',
'View' => 'Papar',
'Materialized view' => 'Paparan yang menjadi kenyataan',
'View has been dropped.' => 'Paparan telah dijatuhkan.',
'View has been altered.' => 'Paparan telah diubah.',
'View has been created.' => 'Paparan telah dibuat.',
'Alter view' => 'Ubah paparan',
'Create view' => 'Bina paparan',
'Indexes' => 'Indeks',
'Indexes have been altered.' => 'Indeks telah diubah.',
'Alter indexes' => 'Ubah indeks',
'Add next' => 'Tambah yang seterusnya',
'Index Type' => 'Jenis Indeks',
'Column (length)' => 'Kolum (kepanjangan)',
'Foreign keys' => 'Kunci asing',
'Foreign key' => 'Kunci asing',
'Foreign key has been dropped.' => 'Kunci asing telah dijatuhkan.',
'Foreign key has been altered.' => 'Kunci asing telah diubah.',
'Foreign key has been created.' => 'Kunci asing telah dibuat.',
'Target table' => 'Jadual sasaran',
'Change' => 'Tukar',
'Source' => 'Sumber',
'Target' => 'Sasaran',
'Add column' => 'Tambah kolum',
'Alter' => 'Ubah',
'Add foreign key' => 'Tambah kunci asing',
'ON DELETE' => 'ON DELETE',
'ON UPDATE' => 'ON UPDATE',
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Kolum sumber dan sasaran perlu mempunyai jenis data yang sama, indeks diperlukan pada kolum sasaran dan data yang dirujuk wujud.',
'Triggers' => ' Pencetus',
'Add trigger' => 'Tambah pencetus',
'Trigger has been dropped.' => 'Pencetus telah dijatuhkan.',
'Trigger has been altered.' => 'Pencetus telah diubah.',
'Trigger has been created.' => 'Pencetus telah dibuat.',
'Alter trigger' => 'Ubah pencetus',
'Create trigger' => 'Buat pencetus',
'Time' => 'Masa',
'Event' => 'Peristiwa',
'Name' => 'Nama',
'select' => 'pilih',
'Select' => 'Pilih',
'Select data' => 'Pilih data',
'Functions' => 'Fungsi',
'Aggregation' => 'Pengagregatan',
'Search' => 'Cari',
'anywhere' => 'di mana-mana',
'Search data in tables' => 'Cari data dalam jadual',
'Sort' => 'Susun',
'descending' => 'menurun',
'Limit' => 'Had',
'Limit rows' => 'Had baris',
'Text length' => 'Kepanjangan teks',
'Action' => 'Aksi',
'Full table scan' => 'Imbasan penuh jadual',
'Unable to select the table' => 'Pemilihan jadual tidak berjaya',
'No rows.' => 'Tiada baris.',
'%d / ' => '%d / ',
'%d row(s)' => '%d baris',
'Page' => 'Halaman',
'last' => 'akhir',
'Load more data' => 'Load lebih data',
'Loading' => 'Loading',
'Whole result' => 'Keputusan keseluruhan',
'%d byte(s)' => array('%d byte', '%d bytes'),
'Import' => 'Import',
'%d row(s) have been imported.' => '%d baris telah diimport.',
'File must be in UTF-8 encoding.' => 'Fail mesti dalam pengekodan UTF-8.',
// in-place editing in select
'Modify' => 'Pinda',
'Ctrl+click on a value to modify it.' => 'Ctrl+click pada nilai untuk meminda.',
'Use edit link to modify this value.' => 'Guna pautan ubah untuk meminda nilai ini.',
// %s can contain auto-increment value
'Item%s has been inserted.' => 'Item%s telah dimasukkan.',
'Item has been deleted.' => 'Item telah dipadamkan.',
'Item has been updated.' => 'Item telah dikemaskini.',
'%d item(s) have been affected.' => '%d item telah terjejas.',
'New item' => 'Item baru',
'original' => 'asli',
// label for value '' in enum data type
'empty' => 'kosong',
'edit' => 'ubah',
'Edit' => 'Ubah',
'Insert' => 'Masukkan',
'Save' => 'Simpan',
'Save and continue edit' => 'Simpan dan sambung ubah',
'Save and insert next' => 'Simpan dan masukkan seterusnya',
'Selected' => 'Terpilih',
'Clone' => 'Klon',
'Delete' => 'Padam',
'You have no privileges to update this table.' => 'Anda tidak mempunyai keistimewaan untuk mengemaskini jadual ini.',
'E-mail' => 'Emel',
'From' => 'Dari',
'Subject' => 'Subjek',
'Attachments' => 'Lampiran',
'Send' => 'Hantar',
'%d e-mail(s) have been sent.' => '%d emel telah dihantar.',
// data type descriptions
'Numbers' => 'Nombor',
'Date and time' => 'Tarikh dan masa',
'Strings' => 'String',
'Binary' => 'Binari',
'Lists' => 'Senarai',
'Network' => 'Rangkaian',
'Geometry' => 'Geometri',
'Relations' => 'Hubungan',
'Editor' => 'Editor',
// date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
'$1-$3-$5' => '$1-$3-$5',
// hint for date format - use language equivalents for day, month and year shortcuts
'[yyyy]-mm-dd' => '[yyyy]-mm-dd',
// hint for time format - use language equivalents for hour, minute and second shortcuts
'HH:MM:SS' => 'HH:MM:SS',
'now' => 'sekarang',
'yes' => 'ya',
'no' => 'tidak',
// general SQLite error in create, drop or rename database
'File exists.' => 'Fail wujud.',
'Please use one of the extensions %s.' => 'Sila guna salah satu sambungan %s.',
// PostgreSQL and MS SQL schema support
'Alter schema' => 'Ubah skema',
'Create schema' => 'Buat skema',
'Schema has been dropped.' => 'Skema telah dijatuhkan.',
'Schema has been created.' => 'Skema telah dibuat.',
'Schema has been altered.' => 'Skema telah diubah.',
'Schema' => 'Skema',
'Invalid schema.' => 'Skema tidak sah.',
// PostgreSQL sequences support
'Sequences' => 'Turutan',
'Create sequence' => 'Buat turutan',
'Sequence has been dropped.' => 'Turutan telah dijatuhkan.',
'Sequence has been created.' => 'Turutan telah dibuat.',
'Sequence has been altered.' => 'Turutan telah diubah.',
'Alter sequence' => 'Ubah turutan',
// PostgreSQL user types support
'User types' => 'Jenis pengguna',
'Create type' => 'Buat jenis',
'Type has been dropped.' => 'Jenis telah dijatuhkan.',
'Type has been created.' => 'Jenis telah dibuat.',
'Alter type' => 'Ubah jenis',
);

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Wachtwoord', 'Password' => 'Wachtwoord',
'Select database' => 'Database selecteren', 'Select database' => 'Database selecteren',
'Invalid database.' => 'Ongeldige database.', 'Invalid database.' => 'Ongeldige database.',
'Create new database' => 'Nieuwe database',
'Table has been dropped.' => 'Tabel verwijderd.', 'Table has been dropped.' => 'Tabel verwijderd.',
'Table has been altered.' => 'Tabel aangepast.', 'Table has been altered.' => 'Tabel aangepast.',
'Table has been created.' => 'Tabel aangemaakt.', 'Table has been created.' => 'Tabel aangemaakt.',
@@ -61,7 +60,7 @@ $translations = array(
'Action' => 'Acties', 'Action' => 'Acties',
'edit' => 'bewerk', 'edit' => 'bewerk',
'Page' => 'Pagina', 'Page' => 'Pagina',
'Query executed OK, %d row(s) affected.' => array('Query uitgevoerd, %d rij geraakt.', 'Query uitgevoerd, %d rijen geraakt.'), 'Query executed OK, %d row(s) affected.' => array('Query uitgevoerd, %d rij geraakt.', 'Query uitgevoerd, %d rijen beïnvloed.'),
'Error in query' => 'Fout in query', 'Error in query' => 'Fout in query',
'Execute' => 'Uitvoeren', 'Execute' => 'Uitvoeren',
'Table' => 'Tabel', 'Table' => 'Tabel',
@@ -188,7 +187,7 @@ $translations = array(
'Move to other database' => 'Verplaats naar andere database', 'Move to other database' => 'Verplaats naar andere database',
'Move' => 'Verplaats', 'Move' => 'Verplaats',
'%d item(s) have been affected.' => array('%d item aangepast.', '%d items aangepast.'), '%d item(s) have been affected.' => array('%d item aangepast.', '%d items aangepast.'),
'whole result' => 'volledig resultaat', 'Whole result' => 'Volledig resultaat',
'Clone' => 'Dupliceer', 'Clone' => 'Dupliceer',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maximum aantal velden bereikt. Verhoog %s.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maximum aantal velden bereikt. Verhoog %s.',
'Partition by' => 'Partitioneren op', 'Partition by' => 'Partitioneren op',

View File

@@ -10,7 +10,7 @@ $translations = array(
'Logged as: %s' => 'Logget inn som: %s', 'Logged as: %s' => 'Logget inn som: %s',
'Logout successful.' => 'Utlogging vellykket.', 'Logout successful.' => 'Utlogging vellykket.',
'Invalid credentials.' => 'Ugylding innloggingsinformasjon.', 'Invalid credentials.' => 'Ugylding innloggingsinformasjon.',
'Master password expired. <a href="http://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Master-passord er utløpt. <a href="http://www.adminer.org/en/extension/" target="_blank">Implementer</a> en metode for %s for å gjøre det permanent.', 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-passord er utløpt. <a href="https://www.adminer.org/en/extension/"%s>Implementer</a> en metode for %s for å gjøre det permanent.',
'Language' => 'Språk', 'Language' => 'Språk',
'Invalid CSRF token. Send the form again.' => 'Ugylding CSRF-token - Send inn skjemaet igjen.', 'Invalid CSRF token. Send the form again.' => 'Ugylding CSRF-token - Send inn skjemaet igjen.',
'No extension' => 'Ingen utvidelse', 'No extension' => 'Ingen utvidelse',
@@ -68,7 +68,6 @@ $translations = array(
'Use' => 'Bruk', 'Use' => 'Bruk',
'Select database' => 'Velg database', 'Select database' => 'Velg database',
'Invalid database.' => 'Ugyldig database.', 'Invalid database.' => 'Ugyldig database.',
'Create new database' => 'Lag ny database',
'Database has been dropped.' => 'Databasen har blitt slettet.', 'Database has been dropped.' => 'Databasen har blitt slettet.',
'Databases have been dropped.' => 'Databasene har blitt slettet.', 'Databases have been dropped.' => 'Databasene har blitt slettet.',
'Database has been created.' => 'Databasen er opprettet.', 'Database has been created.' => 'Databasen er opprettet.',
@@ -213,7 +212,7 @@ $translations = array(
'last' => 'siste', 'last' => 'siste',
'Load more data' => 'Last mer data', 'Load more data' => 'Last mer data',
'Loading' => 'Laster', 'Loading' => 'Laster',
'whole result' => 'hele resultatet', 'Whole result' => 'Hele resultatet',
'%d byte(s)' => array('%d byte', '%d bytes'), '%d byte(s)' => array('%d byte', '%d bytes'),
'Import' => 'Importer', 'Import' => 'Importer',
'%d row(s) have been imported.' => array('%d rad er importert.', '%d rader er importert.'), '%d row(s) have been imported.' => array('%d rad er importert.', '%d rader er importert.'),

View File

@@ -10,14 +10,17 @@ $translations = array(
'Logout' => 'Wyloguj', 'Logout' => 'Wyloguj',
'Logged as: %s' => 'Zalogowany jako: %s', 'Logged as: %s' => 'Zalogowany jako: %s',
'Logout successful.' => 'Wylogowano pomyślnie.', 'Logout successful.' => 'Wylogowano pomyślnie.',
'Thanks for using Adminer, consider <a href="%s">donating</a>.' => 'Dziękujemy za używanie Adminera, rozważ proszę <a href="%s">dotację</a>.',
'Invalid credentials.' => 'Nieprawidłowe dane logowania.', 'Invalid credentials.' => 'Nieprawidłowe dane logowania.',
'<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => '<a href="https://www.adminer.org/pl/extension/"%s>Zaimplementuj</a> metodę %s aby użyć SQLite.',
'Too many unsuccessful logins, try again in %d minute(s).' => array('Za dużo nieudanych prób logowania, spróbuj ponownie za %d minutę.', 'Za dużo nieudanych prób logowania, spróbuj ponownie za %d minuty.', 'Za dużo nieudanych prób logowania, spróbuj ponownie za %d minut.'), 'Too many unsuccessful logins, try again in %d minute(s).' => array('Za dużo nieudanych prób logowania, spróbuj ponownie za %d minutę.', 'Za dużo nieudanych prób logowania, spróbuj ponownie za %d minuty.', 'Za dużo nieudanych prób logowania, spróbuj ponownie za %d minut.'),
'Master password expired. <a href="http://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Ważność hasła głównego wygasła. <a href="http://www.adminer.org/pl/extension/" target="_blank">Zaimplementuj</a> własną metodę %s, aby ustawić je na stałe.', 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Ważność hasła głównego wygasła. <a href="https://www.adminer.org/pl/extension/"%s>Zaimplementuj</a> własną metodę %s, aby ustawić je na stałe.',
'Language' => 'Język', 'Language' => 'Język',
'Invalid CSRF token. Send the form again.' => 'Nieprawidłowy token CSRF. Spróbuj wysłać formularz ponownie.', 'Invalid CSRF token. Send the form again.' => 'Nieprawidłowy token CSRF. Spróbuj wysłać formularz ponownie.',
'If you did not send this request from Adminer then close this page.' => 'Jeżeli nie wywołałeś tej strony z Adminera, zamknij to okno.', 'If you did not send this request from Adminer then close this page.' => 'Jeżeli nie wywołałeś tej strony z Adminera, zamknij to okno.',
'No extension' => 'Brak rozszerzenia', 'No extension' => 'Brak rozszerzenia',
'None of the supported PHP extensions (%s) are available.' => 'Żadne z rozszerzeń PHP umożliwiających połączenie się z bazą danych (%s) nie jest dostępne.', 'None of the supported PHP extensions (%s) are available.' => 'Żadne z rozszerzeń PHP umożliwiających połączenie się z bazą danych (%s) nie jest dostępne.',
'Connecting to privileged ports is not allowed.' => 'Łączenie do portów uprzywilejowanych jest niedozwolone.',
'Session support must be enabled.' => 'Wymagana jest obsługa sesji w PHP.', 'Session support must be enabled.' => 'Wymagana jest obsługa sesji w PHP.',
'Session expired, please login again.' => 'Sesja wygasła, zaloguj się ponownie.', 'Session expired, please login again.' => 'Sesja wygasła, zaloguj się ponownie.',
'%s version: %s through PHP extension %s' => 'Wersja %s: %s za pomocą %s', '%s version: %s through PHP extension %s' => 'Wersja %s: %s za pomocą %s',
@@ -49,6 +52,7 @@ $translations = array(
'Query executed OK, %d row(s) affected.' => array('Zapytanie wykonane pomyślnie, zmieniono %d rekord.', 'Zapytanie wykonane pomyślnie, zmieniono %d rekordy.', 'Zapytanie wykonane pomyślnie, zmieniono %d rekordów.'), 'Query executed OK, %d row(s) affected.' => array('Zapytanie wykonane pomyślnie, zmieniono %d rekord.', 'Zapytanie wykonane pomyślnie, zmieniono %d rekordy.', 'Zapytanie wykonane pomyślnie, zmieniono %d rekordów.'),
'No commands to execute.' => 'Nic do wykonania.', 'No commands to execute.' => 'Nic do wykonania.',
'Error in query' => 'Błąd w zapytaniu', 'Error in query' => 'Błąd w zapytaniu',
'ATTACH queries are not supported.' => 'Zapytania ATTACH są niewspierane.',
'Execute' => 'Wykonaj', 'Execute' => 'Wykonaj',
'Stop on error' => 'Zatrzymaj w przypadku błędu', 'Stop on error' => 'Zatrzymaj w przypadku błędu',
'Show only errors' => 'Pokaż tylko błędy', 'Show only errors' => 'Pokaż tylko błędy',
@@ -82,7 +86,6 @@ $translations = array(
'Use' => 'Wybierz', 'Use' => 'Wybierz',
'Select database' => 'Wybierz bazę danych', 'Select database' => 'Wybierz bazę danych',
'Invalid database.' => 'Nie znaleziono bazy danych.', 'Invalid database.' => 'Nie znaleziono bazy danych.',
'Create new database' => 'Utwórz nową bazę danych',
'Database has been dropped.' => 'Baza danych została usunięta.', 'Database has been dropped.' => 'Baza danych została usunięta.',
'Databases have been dropped.' => 'Bazy danych zostały usunięte.', 'Databases have been dropped.' => 'Bazy danych zostały usunięte.',
'Database has been created.' => 'Baza danych została utworzona.', 'Database has been created.' => 'Baza danych została utworzona.',
@@ -168,6 +171,7 @@ $translations = array(
'Default value' => 'Wartość domyślna', 'Default value' => 'Wartość domyślna',
'Default values' => 'Wartości domyślne', 'Default values' => 'Wartości domyślne',
'Drop' => 'Usuń', 'Drop' => 'Usuń',
'Drop %s?' => 'Usunąć %s?',
'Are you sure?' => 'Czy jesteś pewien?', 'Are you sure?' => 'Czy jesteś pewien?',
'Size' => 'Wielkość', 'Size' => 'Wielkość',
'Compute' => 'Oblicz', 'Compute' => 'Oblicz',
@@ -182,13 +186,12 @@ $translations = array(
'Values' => 'Wartości', 'Values' => 'Wartości',
'View' => 'Perspektywa', 'View' => 'Perspektywa',
'Materialized View' => 'Zmaterializowana perspektywa', 'Materialized view' => 'Zmaterializowana perspektywa',
'View has been dropped.' => 'Perspektywa została usunięta.', 'View has been dropped.' => 'Perspektywa została usunięta.',
'View has been altered.' => 'Perspektywa została zmieniona.', 'View has been altered.' => 'Perspektywa została zmieniona.',
'View has been created.' => 'Perspektywa została utworzona.', 'View has been created.' => 'Perspektywa została utworzona.',
'Alter view' => 'Zmień perspektywę', 'Alter view' => 'Zmień perspektywę',
'Create view' => 'Utwórz perspektywę', 'Create view' => 'Utwórz perspektywę',
'Create materialized view' => 'Utwórz zmaterializowaną perspektywę',
'Indexes' => 'Indeksy', 'Indexes' => 'Indeksy',
'Indexes have been altered.' => 'Indeksy zostały zmienione.', 'Indexes have been altered.' => 'Indeksy zostały zmienione.',
@@ -235,17 +238,19 @@ $translations = array(
'Sort' => 'Sortuj', 'Sort' => 'Sortuj',
'descending' => 'malejąco', 'descending' => 'malejąco',
'Limit' => 'Limit', 'Limit' => 'Limit',
'Limit rows' => 'Limit rekordów',
'Text length' => 'Długość tekstu', 'Text length' => 'Długość tekstu',
'Action' => 'Czynność', 'Action' => 'Czynność',
'Full table scan' => 'Wymaga pełnego przeskanowania tabeli', 'Full table scan' => 'Wymaga pełnego przeskanowania tabeli',
'Unable to select the table' => 'Nie udało się pobrać danych z tabeli', 'Unable to select the table' => 'Nie udało się pobrać danych z tabeli',
'No rows.' => 'Brak rekordów.', 'No rows.' => 'Brak rekordów.',
'%d / ' => '%d / ',
'%d row(s)' => array('%d rekord', '%d rekordy', '%d rekordów'), '%d row(s)' => array('%d rekord', '%d rekordy', '%d rekordów'),
'Page' => 'Strona', 'Page' => 'Strona',
'last' => 'ostatni', 'last' => 'ostatni',
'Load more data' => 'Wczytaj więcej danych', 'Load more data' => 'Wczytaj więcej danych',
'Loading' => 'Wczytywanie', 'Loading' => 'Wczytywanie',
'whole result' => 'wybierz wszystkie', 'Whole result' => 'Wybierz wszystkie',
'%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtów'), '%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtów'),
'Import' => 'Import', 'Import' => 'Import',

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Senha', 'Password' => 'Senha',
'Select database' => 'Selecionar Base de dados', 'Select database' => 'Selecionar Base de dados',
'Invalid database.' => 'Base de dados inválida.', 'Invalid database.' => 'Base de dados inválida.',
'Create new database' => 'Criar nova base de dados',
'Table has been dropped.' => 'A Tabela foi eliminada.', 'Table has been dropped.' => 'A Tabela foi eliminada.',
'Table has been altered.' => 'A Tabela foi alterada.', 'Table has been altered.' => 'A Tabela foi alterada.',
'Table has been created.' => 'A Tabela foi criada.', 'Table has been created.' => 'A Tabela foi criada.',
@@ -187,7 +186,7 @@ $translations = array(
'original' => 'original', 'original' => 'original',
'Tables have been dropped.' => 'As Tabelas foram eliminadas.', 'Tables have been dropped.' => 'As Tabelas foram eliminadas.',
'%d item(s) have been affected.' => array('%d item foi afetado.', '%d itens foram afetados.'), '%d item(s) have been affected.' => array('%d item foi afetado.', '%d itens foram afetados.'),
'whole result' => 'resultado completo', 'Whole result' => 'Resultado completo',
'Clone' => 'Clonar', 'Clone' => 'Clonar',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s.',
'Partition by' => 'Particionar por', 'Partition by' => 'Particionar por',

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Senha', 'Password' => 'Senha',
'Select database' => 'Selecionar Base de dados', 'Select database' => 'Selecionar Base de dados',
'Invalid database.' => 'Base de dados inválida.', 'Invalid database.' => 'Base de dados inválida.',
'Create new database' => 'Criar nova base de dados',
'Table has been dropped.' => 'Tabela eliminada.', 'Table has been dropped.' => 'Tabela eliminada.',
'Table has been altered.' => 'Tabela modificada.', 'Table has been altered.' => 'Tabela modificada.',
'Table has been created.' => 'Tabela criada.', 'Table has been created.' => 'Tabela criada.',
@@ -187,7 +186,7 @@ $translations = array(
'original' => 'original', 'original' => 'original',
'Tables have been dropped.' => 'As tabelas foram eliminadas.', 'Tables have been dropped.' => 'As tabelas foram eliminadas.',
'%d item(s) have been affected.' => array('%d item afetado.', '%d itens afetados.'), '%d item(s) have been affected.' => array('%d item afetado.', '%d itens afetados.'),
'whole result' => 'resultado completo', 'Whole result' => 'Resultado completo',
'Clone' => 'Clonar', 'Clone' => 'Clonar',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s.',
'Partition by' => 'Particionar por', 'Partition by' => 'Particionar por',

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Parola', 'Password' => 'Parola',
'Select database' => 'Alege baza de date', 'Select database' => 'Alege baza de date',
'Invalid database.' => 'Bază de deate invalidă.', 'Invalid database.' => 'Bază de deate invalidă.',
'Create new database' => 'Crează o bază de date nouă',
'Table has been dropped.' => 'Tabelul a fost șters.', 'Table has been dropped.' => 'Tabelul a fost șters.',
'Table has been altered.' => 'Tabelul a fost modificat.', 'Table has been altered.' => 'Tabelul a fost modificat.',
'Table has been created.' => 'Tabelul a fost creat.', 'Table has been created.' => 'Tabelul a fost creat.',
@@ -186,7 +185,7 @@ $translations = array(
'Save and continue edit' => 'Salvează și continuă editarea', 'Save and continue edit' => 'Salvează și continuă editarea',
'original' => 'original', 'original' => 'original',
'%d item(s) have been affected.' => array('A fost modificată %d înscriere.', 'Au fost modificate %d înscrieri.'), '%d item(s) have been affected.' => array('A fost modificată %d înscriere.', 'Au fost modificate %d înscrieri.'),
'whole result' => 'tot rezultatul', 'Whole result' => 'Tot rezultatul',
'Tables have been dropped.' => 'Tabelele au fost șterse.', 'Tables have been dropped.' => 'Tabelele au fost șterse.',
'Clone' => 'Clonează', 'Clone' => 'Clonează',
'Partition by' => 'Împarte', 'Partition by' => 'Împarte',

View File

@@ -7,15 +7,14 @@ $translations = array(
'Username' => 'Имя пользователя', 'Username' => 'Имя пользователя',
'Password' => 'Пароль', 'Password' => 'Пароль',
'Select database' => 'Выбрать базу данных', 'Select database' => 'Выбрать базу данных',
'Invalid database.' => 'Плохая база данных.', 'Invalid database.' => 'Неверная база данных.',
'Create new database' => 'Создать новую базу данных',
'Table has been dropped.' => 'Таблица была удалена.', 'Table has been dropped.' => 'Таблица была удалена.',
'Table has been altered.' => 'Таблица была изменена.', 'Table has been altered.' => 'Таблица была изменена.',
'Table has been created.' => 'Таблица была создана.', 'Table has been created.' => 'Таблица была создана.',
'Alter table' => 'Изменить таблицу', 'Alter table' => 'Изменить таблицу',
'Create table' => 'Создать таблицу', 'Create table' => 'Создать таблицу',
'Table name' => 'Название таблицы', 'Table name' => 'Название таблицы',
'engine' => 'тип', 'engine' => 'Тип таблицы',
'collation' => 'режим сопоставления', 'collation' => 'режим сопоставления',
'Column name' => 'Название поля', 'Column name' => 'Название поля',
'Type' => 'Тип', 'Type' => 'Тип',
@@ -30,7 +29,7 @@ $translations = array(
'Database has been altered.' => 'База данных была изменена.', 'Database has been altered.' => 'База данных была изменена.',
'Alter database' => 'Изменить базу данных', 'Alter database' => 'Изменить базу данных',
'Create database' => 'Создать базу данных', 'Create database' => 'Создать базу данных',
'SQL command' => 'SQL запрос', 'SQL command' => 'SQL-запрос',
'Logout' => 'Выйти', 'Logout' => 'Выйти',
'database' => 'база данных', 'database' => 'база данных',
'Use' => 'Выбрать', 'Use' => 'Выбрать',
@@ -68,7 +67,7 @@ $translations = array(
'Triggers' => 'Триггеры', 'Triggers' => 'Триггеры',
'View' => 'Представление', 'View' => 'Представление',
'Unable to select the table' => 'Не удалось получить данные из таблицы', 'Unable to select the table' => 'Не удалось получить данные из таблицы',
'Invalid CSRF token. Send the form again.' => 'Недействительный CSRF токен. Отправите форму ещё раз.', 'Invalid CSRF token. Send the form again.' => 'Недействительный CSRF-токен. Отправите форму ещё раз.',
'Comment' => 'Комментарий', 'Comment' => 'Комментарий',
'Default values' => 'Значения по умолчанию', 'Default values' => 'Значения по умолчанию',
'%d byte(s)' => array('%d байт', '%d байта', '%d байтов'), '%d byte(s)' => array('%d байт', '%d байта', '%d байтов'),
@@ -91,13 +90,13 @@ $translations = array(
'Change' => 'Изменить', 'Change' => 'Изменить',
'Source' => 'Источник', 'Source' => 'Источник',
'Target' => 'Цель', 'Target' => 'Цель',
'Add column' => 'Добавить колонку', 'Add column' => 'Добавить поле',
'Alter' => 'Изменить', 'Alter' => 'Изменить',
'Add foreign key' => 'Добавить внешний ключ', 'Add foreign key' => 'Добавить внешний ключ',
'ON DELETE' => 'При стирании', 'ON DELETE' => 'При стирании',
'ON UPDATE' => 'При обновлении', 'ON UPDATE' => 'При обновлении',
'Index Type' => 'Тип индекса', 'Index Type' => 'Тип индекса',
'Column (length)' => 'Колонка (длина)', 'Column (length)' => 'Поле (длина)',
'View has been dropped.' => 'Представление было удалено.', 'View has been dropped.' => 'Представление было удалено.',
'View has been altered.' => 'Представление было изменено.', 'View has been altered.' => 'Представление было изменено.',
'View has been created.' => 'Представление было создано.', 'View has been created.' => 'Представление было создано.',
@@ -135,11 +134,11 @@ $translations = array(
'User has been altered.' => 'Пользователь был изменён.', 'User has been altered.' => 'Пользователь был изменён.',
'User has been created.' => 'Пользователь был создан.', 'User has been created.' => 'Пользователь был создан.',
'Hashed' => 'Хешировано', 'Hashed' => 'Хешировано',
'Column' => 'Колонка', 'Column' => 'поле',
'Routine' => 'Процедура', 'Routine' => 'Процедура',
'Grant' => 'Позволить', 'Grant' => 'Позволить',
'Revoke' => 'Запретить', 'Revoke' => 'Запретить',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Слишком большой объем POST-данных. Пошлите меньший объем данных или увеличьте параметр конфигурационной директивы %s.', 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Слишком большой объем POST-данных. Пошлите меньший объём данных или увеличьте параметр конфигурационной директивы %s.',
'Logged as: %s' => 'Вы вошли как: %s', 'Logged as: %s' => 'Вы вошли как: %s',
'Move up' => 'Переместить вверх', 'Move up' => 'Переместить вверх',
'Move down' => 'Переместить вниз', 'Move down' => 'Переместить вниз',
@@ -182,11 +181,11 @@ $translations = array(
'Tables have been moved.' => 'Таблицы были перемещены.', 'Tables have been moved.' => 'Таблицы были перемещены.',
'Move to other database' => 'Переместить в другую базу данных', 'Move to other database' => 'Переместить в другую базу данных',
'Move' => 'Переместить', 'Move' => 'Переместить',
'Engine' => 'Тип', 'Engine' => 'Тип таблиц',
'Save and continue edit' => 'Сохранить и продолжить редактирование', 'Save and continue edit' => 'Сохранить и продолжить редактирование',
'original' => 'исходный', 'original' => 'исходный',
'%d item(s) have been affected.' => array('Была изменена %d запись.', 'Были изменены %d записи.', 'Было изменено %d записей.'), '%d item(s) have been affected.' => array('Была изменена %d запись.', 'Были изменены %d записи.', 'Было изменено %d записей.'),
'whole result' => 'весь результат', 'Whole result' => 'Весь результат',
'Tables have been dropped.' => 'Таблицы были удалены.', 'Tables have been dropped.' => 'Таблицы были удалены.',
'Clone' => 'Клонировать', 'Clone' => 'Клонировать',
'Partition by' => 'Разделить по', 'Partition by' => 'Разделить по',
@@ -203,20 +202,20 @@ $translations = array(
'[yyyy]-mm-dd' => 'дд.мм.[гггг]', '[yyyy]-mm-dd' => 'дд.мм.[гггг]',
'History' => 'История', 'History' => 'История',
'Variables' => 'Переменные', 'Variables' => 'Переменные',
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Колонки должны иметь одинаковые типы данных, в результирующей колонке должен быть индекс, данные для импорта должны существовать.', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Поля должны иметь одинаковые типы данных, в результирующем поле должен быть индекс, данные для импорта должны существовать.',
'Relations' => 'Реляции', 'Relations' => 'Отношения',
'Run file' => 'Запустить файл', 'Run file' => 'Запустить файл',
'Clear' => 'Очистить', 'Clear' => 'Очистить',
'Maximum allowed file size is %sB.' => 'Максимальный разрешённый размер файла - %sB.', 'Maximum allowed file size is %sB.' => 'Максимальный разрешённый размер файла %sB.',
'Numbers' => 'Число', 'Numbers' => 'Числа',
'Date and time' => 'Дата и время', 'Date and time' => 'Дата и время',
'Strings' => 'Строки', 'Strings' => 'Строки',
'Binary' => 'Двоичный тип', 'Binary' => 'Двоичный тип',
'Lists' => 'Списки', 'Lists' => 'Списки',
'Editor' => 'Редактор', 'Editor' => 'Редактор',
'E-mail' => 'Электропочта', 'E-mail' => 'Эл. почта',
'From' => 'От', 'From' => 'От',
'Subject' => 'Кому', 'Subject' => 'Тема',
'Send' => 'Послать', 'Send' => 'Послать',
'%d e-mail(s) have been sent.' => array('Было отправлено %d письмо.', 'Было отправлено %d письма.', 'Было отправлено %d писем.'), '%d e-mail(s) have been sent.' => array('Было отправлено %d письмо.', 'Было отправлено %d письма.', 'Было отправлено %d писем.'),
'Webserver file %s' => 'Файл %s на вебсервере', 'Webserver file %s' => 'Файл %s на вебсервере',
@@ -242,7 +241,7 @@ $translations = array(
'Alter type' => 'Изменить тип', 'Alter type' => 'Изменить тип',
'Type has been dropped.' => 'Тип удален.', 'Type has been dropped.' => 'Тип удален.',
'Type has been created.' => 'Создан новый тип.', 'Type has been created.' => 'Создан новый тип.',
'Ctrl+click on a value to modify it.' => 'Ctrl+кликни по значению, чтобы его изменить.', 'Ctrl+click on a value to modify it.' => 'Выполните Ctrl+Щелчок мышью по значению, чтобы его изменить.',
'Use edit link to modify this value.' => 'Изменить это значение можно с помощью ссылки «изменить».', 'Use edit link to modify this value.' => 'Изменить это значение можно с помощью ссылки «изменить».',
'last' => 'последняя', 'last' => 'последняя',
'From server' => 'С сервера', 'From server' => 'С сервера',
@@ -266,4 +265,29 @@ $translations = array(
'Permanent link' => 'Постоянная ссылка', 'Permanent link' => 'Постоянная ссылка',
'Edit all' => 'Редактировать всё', 'Edit all' => 'Редактировать всё',
'HH:MM:SS' => 'ЧЧ:ММ:СС', 'HH:MM:SS' => 'ЧЧ:ММ:СС',
'Tables have been optimized.' => 'Таблицы оптимизированы.',
'Materialized view' => 'Материализованное представление',
'Vacuum' => 'Вакуум',
'Selected' => 'Выбранные',
'File must be in UTF-8 encoding.' => 'Файл должен быть в кодировке UTF-8.',
'Modify' => 'Изменить',
'Loading' => 'Загрузка',
'Load more data' => 'Загрузить ещё данные',
'ATTACH queries are not supported.' => 'ATTACH-запросы не поддерживаются.',
'%d / ' => '%d / ',
'Limit rows' => 'Лимит строк',
'<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => '<a href="https://www.adminer.org/en/extension/"%s>Реализуйте</a> метод %s, чтобы использовать SQLite.',
'Default value' => 'Значение по умолчанию',
'Full table scan' => 'Анализ полной таблицы',
'Too many unsuccessful logins, try again in %d minute(s).' => array('Слишком много неудачных попыток входа. Попробуйте снова через %d минуту.', 'Слишком много неудачных попыток входа. Попробуйте снова через %d минуты.', 'Слишком много неудачных попыток входа. Попробуйте снова через %d минут.'),
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Мастер-пароль истёк. <a href="https://www.adminer.org/en/extension/"%s>Реализуйте</a> метод %s, чтобы сделать его постоянным.',
'If you did not send this request from Adminer then close this page.' => 'Если вы не посылали этот запрос из Adminer, закройте эту страницу.',
'You can upload a big SQL file via FTP and import it from server.' => 'Вы можете закачать большой SQL-файл по FTP и затем импортировать его с сервера.',
'Size' => 'Размер',
'Compute' => 'Вычислить',
'You are offline.' => 'Вы не выполнили вход.',
'You have no privileges to update this table.' => 'У вас нет прав на обновление этой таблицы.',
'Saving' => 'Сохранение',
'yes' => 'Да',
'no' => 'Нет',
); );

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Heslo', 'Password' => 'Heslo',
'Select database' => 'Vybrať databázu', 'Select database' => 'Vybrať databázu',
'Invalid database.' => 'Nesprávna databáza.', 'Invalid database.' => 'Nesprávna databáza.',
'Create new database' => 'Vytvoriť novú databázu',
'Table has been dropped.' => 'Tabuľka bola odstránená.', 'Table has been dropped.' => 'Tabuľka bola odstránená.',
'Table has been altered.' => 'Tabuľka bola zmenená.', 'Table has been altered.' => 'Tabuľka bola zmenená.',
'Table has been created.' => 'Tabuľka bola vytvorená.', 'Table has been created.' => 'Tabuľka bola vytvorená.',
@@ -188,7 +187,7 @@ $translations = array(
'Move to other database' => 'Presunúť do inej databázy', 'Move to other database' => 'Presunúť do inej databázy',
'Move' => 'Presunúť', 'Move' => 'Presunúť',
'%d item(s) have been affected.' => '%d položiek bolo ovplyvnených.', '%d item(s) have been affected.' => '%d položiek bolo ovplyvnených.',
'whole result' => 'celý výsledok', 'Whole result' => 'Celý výsledok',
'Clone' => 'Klonovať', 'Clone' => 'Klonovať',
'Partition by' => 'Rozdeliť podľa', 'Partition by' => 'Rozdeliť podľa',
'Partitions' => 'Oddiely', 'Partitions' => 'Oddiely',

View File

@@ -76,7 +76,6 @@ $translations = array(
'Use' => 'Uporabi', 'Use' => 'Uporabi',
'Select database' => 'Izberi bazo', 'Select database' => 'Izberi bazo',
'Invalid database.' => 'Neveljavna baza.', 'Invalid database.' => 'Neveljavna baza.',
'Create new database' => 'Ustvari novo bazo',
'Database has been dropped.' => 'Baza je zavržena.', 'Database has been dropped.' => 'Baza je zavržena.',
'Databases have been dropped.' => 'Baze so zavržene.', 'Databases have been dropped.' => 'Baze so zavržene.',
'Database has been created.' => 'Baza je ustvarjena.', 'Database has been created.' => 'Baza je ustvarjena.',
@@ -226,7 +225,7 @@ $translations = array(
'%d row(s)' => array('%d vrstica', '%d vrstici', '%d vrstice', '%d vrstic'), '%d row(s)' => array('%d vrstica', '%d vrstici', '%d vrstice', '%d vrstic'),
'Page' => 'Stran', 'Page' => 'Stran',
'last' => 'Zadnja', 'last' => 'Zadnja',
'whole result' => 'cel razultat', 'Whole result' => 'Cel razultat',
'%d byte(s)' => array('%d bajt', '%d bajta', '%d bajti', '%d bajtov'), '%d byte(s)' => array('%d bajt', '%d bajta', '%d bajti', '%d bajtov'),
'Import' => 'Uvozi', 'Import' => 'Uvozi',

View File

@@ -77,7 +77,6 @@ $translations = array(
'Use' => 'Користи', 'Use' => 'Користи',
'Select database' => 'Изаберите базу', 'Select database' => 'Изаберите базу',
'Invalid database.' => 'Неисправна база података.', 'Invalid database.' => 'Неисправна база података.',
'Create new database' => 'Направи нову базу података',
'Database has been dropped.' => 'База података је избрисана.', 'Database has been dropped.' => 'База података је избрисана.',
'Databases have been dropped.' => 'Базњ података су избрисане.', 'Databases have been dropped.' => 'Базњ података су избрисане.',
'Database has been created.' => 'База података је креирана.', 'Database has been created.' => 'База података је креирана.',
@@ -232,9 +231,9 @@ $translations = array(
'%d row(s)' => array('%d ред', '%d реда', '%d редова'), '%d row(s)' => array('%d ред', '%d реда', '%d редова'),
'Page' => 'Страна', 'Page' => 'Страна',
'last' => 'последња', 'last' => 'последња',
'Loading' => 'Учитавам', 'Loading' => 'Учитавам',
'Load more data' => 'Учитавам још података', 'Load more data' => 'Учитавам још података',
'whole result' => 'цео резултат', 'Whole result' => 'Цео резултат',
'%d byte(s)' => array('%d бајт', '%d бајта', '%d бајтова'), '%d byte(s)' => array('%d бајт', '%d бајта', '%d бајтова'),
'Import' => 'Увоз', 'Import' => 'Увоз',

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'க‌ட‌வுச்சொல்', 'Password' => 'க‌ட‌வுச்சொல்',
'Select database' => 'த‌க‌வ‌ல்த‌ள‌த்தை தேர்வு செய்', 'Select database' => 'த‌க‌வ‌ல்த‌ள‌த்தை தேர்வு செய்',
'Invalid database.' => 'த‌க‌வ‌ல்த‌ள‌ம் ச‌ரியானதல்ல‌.', 'Invalid database.' => 'த‌க‌வ‌ல்த‌ள‌ம் ச‌ரியானதல்ல‌.',
'Create new database' => 'புதிய‌ த‌க‌வ‌ல்த‌ள‌த்தை உருவாக்கு',
'Table has been dropped.' => 'அட்ட‌வ‌ணை நீக்க‌ப்ப‌ட்ட‌து.', 'Table has been dropped.' => 'அட்ட‌வ‌ணை நீக்க‌ப்ப‌ட்ட‌து.',
'Table has been altered.' => 'அட்ட‌வணை மாற்ற‌ப்ப‌ட்ட‌து.', 'Table has been altered.' => 'அட்ட‌வணை மாற்ற‌ப்ப‌ட்ட‌து.',
'Table has been created.' => 'அட்ட‌வ‌ணை உருவாக்க‌ப்ப‌ட்ட‌து.', 'Table has been created.' => 'அட்ட‌வ‌ணை உருவாக்க‌ப்ப‌ட்ட‌து.',
@@ -184,7 +183,7 @@ $translations = array(
'original' => 'அச‌ல்', 'original' => 'அச‌ல்',
'Tables have been dropped.' => 'அட்ட‌வ‌ணை நீக்க‌ப்ப‌ட்ட‌து.', 'Tables have been dropped.' => 'அட்ட‌வ‌ணை நீக்க‌ப்ப‌ட்ட‌து.',
'%d item(s) have been affected.' => array('%d உருப்ப‌டி மாற்ற‌ம‌டைந்தது.', '%d உருப்ப‌டிக‌ள் மாற்ற‌ம‌டைந்த‌ன‌.'), '%d item(s) have been affected.' => array('%d உருப்ப‌டி மாற்ற‌ம‌டைந்தது.', '%d உருப்ப‌டிக‌ள் மாற்ற‌ம‌டைந்த‌ன‌.'),
'whole result' => 'முழுமையான‌ முடிவு', 'Whole result' => 'முழுமையான‌ முடிவு',
'Clone' => 'ந‌க‌லி (Clone)', 'Clone' => 'ந‌க‌லி (Clone)',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'அனும‌திக்க‌ப்ப‌ட்ட‌ அதிக‌ப‌ட்ச‌ கோப்புக‌ளின் எண்ணிக்கை மீற‌ப்ப‌ட்ட‌து. த‌ய‌வு செய்து %s ம‌ற்றும் %s யை அதிக‌ரிக்க‌வும்.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'அனும‌திக்க‌ப்ப‌ட்ட‌ அதிக‌ப‌ட்ச‌ கோப்புக‌ளின் எண்ணிக்கை மீற‌ப்ப‌ட்ட‌து. த‌ய‌வு செய்து %s ம‌ற்றும் %s யை அதிக‌ரிக்க‌வும்.',
'Partition by' => 'பிரித்த‌து', 'Partition by' => 'பிரித்த‌து',

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => 'รหัสผ่าน', 'Password' => 'รหัสผ่าน',
'Select database' => 'เลือกฐานข้อมูล', 'Select database' => 'เลือกฐานข้อมูล',
'Invalid database.' => 'ฐานข้อมูลไม่ถูกต้อง.', 'Invalid database.' => 'ฐานข้อมูลไม่ถูกต้อง.',
'Create new database' => 'สร้างฐานข้อมูลใหม่',
'Table has been dropped.' => 'ลบตารางแล้ว.', 'Table has been dropped.' => 'ลบตารางแล้ว.',
'Table has been altered.' => 'แก้ไขตารางแล้ว.', 'Table has been altered.' => 'แก้ไขตารางแล้ว.',
'Table has been created.' => 'สร้างตารางใหม่แล้ว.', 'Table has been created.' => 'สร้างตารางใหม่แล้ว.',
@@ -187,7 +186,7 @@ $translations = array(
'original' => 'ต้นฉบับ', 'original' => 'ต้นฉบับ',
'Tables have been dropped.' => 'ตารางถูกลบแล้ว.', 'Tables have been dropped.' => 'ตารางถูกลบแล้ว.',
'%d item(s) have been affected.' => 'มี %d รายการถูกดำเนินการแล้ว.', '%d item(s) have been affected.' => 'มี %d รายการถูกดำเนินการแล้ว.',
'whole result' => 'รวมผล', 'Whole result' => 'รวมผล',
'Clone' => 'ทำซ้ำ', 'Clone' => 'ทำซ้ำ',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'จำนวนสูงสุดของฟิลด์อนุญาตให้เกิน กรุณาเพิ่มอีก %s.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'จำนวนสูงสุดของฟิลด์อนุญาตให้เกิน กรุณาเพิ่มอีก %s.',
'Partition by' => 'พาร์ทิชันโดย', 'Partition by' => 'พาร์ทิชันโดย',

View File

@@ -9,14 +9,21 @@ $translations = array(
'Login' => 'Giriş', 'Login' => 'Giriş',
'Logout' => ıkış', 'Logout' => ıkış',
'Logged as: %s' => '%s olarak giriş yapıldı.', 'Logged as: %s' => '%s olarak giriş yapıldı.',
'Logout successful.' => 'Başarıyla çıkış yapıldı.', 'Logout successful.' => 'Oturum başarıyla sonlandı.',
'Invalid credentials.' => 'Geçersiz kimlik.', 'Thanks for using Adminer, consider <a href="%s">donating</a>.' => 'Adminer kullandığınız için teşekkür ederiz <a href="%s">bağış yapmayı düşünün</a>.',
'Invalid credentials.' => 'Geçersiz kimlik bilgileri.',
'<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => 'SQLite kullanmak için <a href="https://www.adminer.org/en/extension/"%s>%s metodunu</a> kullanın.',
'Too many unsuccessful logins, try again in %d minute(s).' => array('Çok fazla oturum açma denemesi yapıldı.', '%d Dakika sonra tekrar deneyiniz.'),
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Ana şifrenin süresi doldu. Kalıcı olması için <a href="https://www.adminer.org/en/extension/"%s>%s medodunu</a> kullanın.',
'Language' => 'Dil', 'Language' => 'Dil',
'Invalid CSRF token. Send the form again.' => 'Geçersiz (CSRF) jetonu. Formu tekrar yolla.', 'Invalid CSRF token. Send the form again.' => 'Geçersiz (CSRF) jetonu. Formu tekrar yolla.',
'If you did not send this request from Adminer then close this page.' => 'Bu isteği Adminer\'den göndermediyseniz bu sayfayı kapatın.',
'No extension' => 'Uzantı yok', 'No extension' => 'Uzantı yok',
'None of the supported PHP extensions (%s) are available.' => 'Desteklenen PHP eklentilerinden (%s) hiçbiri mevcut değil.', 'None of the supported PHP extensions (%s) are available.' => 'Desteklenen PHP eklentilerinden (%s) hiçbiri mevcut değil.',
'Connecting to privileged ports is not allowed.' => 'Ayrıcalıklı bağlantı noktalarına bağlanmaya izin verilmiyor.',
'Session support must be enabled.' => 'Oturum desteği etkin olmalıdır.', 'Session support must be enabled.' => 'Oturum desteği etkin olmalıdır.',
'Session expired, please login again.' => 'Oturum süresi doldu, lütfen tekrar giriş yapın.', 'Session expired, please login again.' => 'Oturum süresi doldu, lütfen tekrar giriş yapın.',
'The action will be performed after successful login with the same credentials.' => 'İşlem, aynı kimlik bilgileriyle başarıyla oturum açıldıktan sonra gerçekleştirilecektir.',
'%s version: %s through PHP extension %s' => '%s sürüm: %s, %s PHP eklentisi ile', '%s version: %s through PHP extension %s' => '%s sürüm: %s, %s PHP eklentisi ile',
'Refresh' => 'Tazele', 'Refresh' => 'Tazele',
@@ -46,6 +53,8 @@ $translations = array(
'Query executed OK, %d row(s) affected.' => array('Sorgu başarıyla çalıştırıldı, %d adet kayıt etkilendi.', 'Sorgu başarıyla çalıştırıldı, %d adet kayıt etkilendi.'), 'Query executed OK, %d row(s) affected.' => array('Sorgu başarıyla çalıştırıldı, %d adet kayıt etkilendi.', 'Sorgu başarıyla çalıştırıldı, %d adet kayıt etkilendi.'),
'No commands to execute.' => 'Çalıştırılacak komut yok.', 'No commands to execute.' => 'Çalıştırılacak komut yok.',
'Error in query' => 'Sorguda hata', 'Error in query' => 'Sorguda hata',
'Warnings' => 'Uyarılar',
'ATTACH queries are not supported.' => 'ATTACH sorguları desteklenmiyor.',
'Execute' => 'Çalıştır', 'Execute' => 'Çalıştır',
'Stop on error' => 'Hata oluşursa dur', 'Stop on error' => 'Hata oluşursa dur',
'Show only errors' => 'Sadece hataları göster.', 'Show only errors' => 'Sadece hataları göster.',
@@ -64,20 +73,23 @@ $translations = array(
'Unable to upload a file.' => 'Dosya gönderilemiyor.', 'Unable to upload a file.' => 'Dosya gönderilemiyor.',
'Maximum allowed file size is %sB.' => 'İzin verilen dosya boyutu sınırı %sB.', 'Maximum allowed file size is %sB.' => 'İzin verilen dosya boyutu sınırı %sB.',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Çok büyük POST verisi, veriyi azaltın ya da %s ayar yönergesini uygun olarak yapılandırın.', 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Çok büyük POST verisi, veriyi azaltın ya da %s ayar yönergesini uygun olarak yapılandırın.',
'You can upload a big SQL file via FTP and import it from server.' => 'FTP yoluyla büyük bir SQL dosyası yükleyebilir ve sunucudan içe aktarabilirsiniz.',
'You are offline.' => 'Çevrimdışısınız.',
'Export' => 'Dışarı Aktar', 'Export' => 'Dışarı Aktar',
'Output' => ıktı', 'Output' => ıktı',
'open' => 'aç', 'open' => 'aç',
'save' => 'kaydet', 'save' => 'kaydet',
'Saving' => 'Saydediliyor',
'Format' => 'Biçim', 'Format' => 'Biçim',
'Data' => 'Veri', 'Data' => 'Veri',
'Database' => 'Veri Tabanı', 'Database' => 'Veri Tabanı',
'database' => 'veri tabanı', 'database' => 'veri tabanı',
'DB' => 'DB',
'Use' => 'Kullan', 'Use' => 'Kullan',
'Select database' => 'Veri tabanı seç', 'Select database' => 'Veri tabanı seç',
'Invalid database.' => 'Geçersiz veri tabanı.', 'Invalid database.' => 'Geçersiz veri tabanı.',
'Create new database' => 'Yeni veri tabanı oluştur',
'Database has been dropped.' => 'Veri tabanı silindi.', 'Database has been dropped.' => 'Veri tabanı silindi.',
'Databases have been dropped.' => 'Veritabanları silindi.', 'Databases have been dropped.' => 'Veritabanları silindi.',
'Database has been created.' => 'Veri tabanı oluşturuldu.', 'Database has been created.' => 'Veri tabanı oluşturuldu.',
@@ -96,12 +108,13 @@ $translations = array(
'Engine' => 'Motor', 'Engine' => 'Motor',
'Collation' => 'Karşılaştırma', 'Collation' => 'Karşılaştırma',
'Data Length' => 'Veri Uzunluğu', 'Data Length' => 'Veri Uzunluğu',
'Index Length' => 'Dizin Uzunluğu', 'Index Length' => 'İndex Uzunluğu',
'Data Free' => 'Boş Veri', 'Data Free' => 'Boş Veri',
'Rows' => 'Kayıtlar', 'Rows' => 'Kayıtlar',
'%d in total' => 'toplam %d', '%d in total' => 'toplam %d',
'Analyze' => 'Çözümle', 'Analyze' => 'Çözümle',
'Optimize' => 'En uygun hale getir', 'Optimize' => 'Optimize Et',
'Vacuum' => 'Vakumla',
'Check' => 'Denetle', 'Check' => 'Denetle',
'Repair' => 'Tamir Et', 'Repair' => 'Tamir Et',
'Truncate' => 'Boşalt', 'Truncate' => 'Boşalt',
@@ -159,9 +172,13 @@ $translations = array(
'Auto Increment' => 'Otomatik Artır', 'Auto Increment' => 'Otomatik Artır',
'Options' => 'Seçenekler', 'Options' => 'Seçenekler',
'Comment' => 'Yorum', 'Comment' => 'Yorum',
'Default value' => 'Varsayılan değer',
'Default values' => 'Varsayılan değerler', 'Default values' => 'Varsayılan değerler',
'Drop' => 'Sil', 'Drop' => 'Sil',
'Drop %s?' => 'Sil %s?',
'Are you sure?' => 'Emin misiniz?', 'Are you sure?' => 'Emin misiniz?',
'Size' => 'Boyut',
'Compute' => 'Hesapla',
'Move up' => 'Yukarı taşı', 'Move up' => 'Yukarı taşı',
'Move down' => 'Aşağı taşı', 'Move down' => 'Aşağı taşı',
'Remove' => 'Sil', 'Remove' => 'Sil',
@@ -173,17 +190,18 @@ $translations = array(
'Values' => 'Değerler', 'Values' => 'Değerler',
'View' => 'Görünüm', 'View' => 'Görünüm',
'Materialized view' => 'Materialized Görünüm',
'View has been dropped.' => 'Görünüm silindi.', 'View has been dropped.' => 'Görünüm silindi.',
'View has been altered.' => 'Görünüm değiştirildi.', 'View has been altered.' => 'Görünüm değiştirildi.',
'View has been created.' => 'Görünüm oluşturuldu.', 'View has been created.' => 'Görünüm oluşturuldu.',
'Alter view' => 'Görünümü değiştir', 'Alter view' => 'Görünümü değiştir',
'Create view' => 'Görünüm oluştur', 'Create view' => 'Görünüm oluştur',
'Indexes' => 'Dizinler', 'Indexes' => 'İndeksler',
'Indexes have been altered.' => 'Dizinler değiştirildi.', 'Indexes have been altered.' => 'İndeksler değiştirildi.',
'Alter indexes' => 'Dizinleri değiştir', 'Alter indexes' => 'İndeksleri değiştir',
'Add next' => 'Bundan sonra ekle', 'Add next' => 'Bundan sonra ekle',
'Index Type' => 'Dizin Türü', 'Index Type' => 'İndex Türü',
'Column (length)' => 'Kolon (uzunluğu)', 'Column (length)' => 'Kolon (uzunluğu)',
'Foreign keys' => 'Dış anahtarlar', 'Foreign keys' => 'Dış anahtarlar',
@@ -222,25 +240,29 @@ $translations = array(
'anywhere' => 'hiçbir yerde', 'anywhere' => 'hiçbir yerde',
'Search data in tables' => 'Tablolarda veri ara', 'Search data in tables' => 'Tablolarda veri ara',
'Sort' => 'Sırala', 'Sort' => 'Sırala',
'descending' => 'azalan', 'descending' => 'Azalan',
'Limit' => 'sınır', 'Limit' => 'Limit',
'Text length' => 'Yazı uzunluğu', 'Limit rows' => 'Satır Limiti',
'Action' => 'Eylem', 'Text length' => 'Metin Boyutu',
'Full table scan' => 'Tam tablo tarama', 'Action' => 'İşlem',
'Full table scan' => 'Tam tablo taraması',
'Unable to select the table' => 'Tablo seçilemedi', 'Unable to select the table' => 'Tablo seçilemedi',
'No rows.' => 'Kayıt yok.', 'No rows.' => 'Kayıt yok.',
'%d / ' => '%d / ',
'%d row(s)' => array('%d kayıt', '%d adet kayıt'), '%d row(s)' => array('%d kayıt', '%d adet kayıt'),
'Page' => 'Sayfa', 'Page' => 'Sayfa',
'last' => 'son', 'last' => 'son',
'Load more data' => 'Daha fazla veri yükle', 'Load more data' => 'Daha fazla veri yükle',
'Loading' => 'Yükleniyor', 'Loading' => 'Yükleniyor',
'whole result' => 'tüm sonuç', 'Whole result' => 'Tüm sonuç',
'%d byte(s)' => array('%d bayt', '%d bayt'), '%d byte(s)' => array('%d bayt', '%d bayt'),
'Import' => 'İçeri Aktar', 'Import' => 'İçeri Aktar',
'%d row(s) have been imported.' => array('%d kayıt içeri aktarıldı.', '%d adet kayıt içeri aktarıldı.'), '%d row(s) have been imported.' => array('%d kayıt içeri aktarıldı.', '%d adet kayıt içeri aktarıldı.'),
'File must be in UTF-8 encoding.' => 'Dosya UTF-8 kodlamasında olmalıdır.',
// in-place editing in select // in-place editing in select
'Modify' => 'Düzenle',
'Ctrl+click on a value to modify it.' => 'Bir değeri değiştirmek için üzerine Ctrl+tıklayın.', 'Ctrl+click on a value to modify it.' => 'Bir değeri değiştirmek için üzerine Ctrl+tıklayın.',
'Use edit link to modify this value.' => 'Değeri değiştirmek için düzenleme bağlantısını kullanın.', 'Use edit link to modify this value.' => 'Değeri değiştirmek için düzenleme bağlantısını kullanın.',
@@ -259,8 +281,10 @@ $translations = array(
'Save' => 'Kaydet', 'Save' => 'Kaydet',
'Save and continue edit' => 'Kaydet ve düzenlemeye devam et', 'Save and continue edit' => 'Kaydet ve düzenlemeye devam et',
'Save and insert next' => 'Kaydet ve sonrakini ekle', 'Save and insert next' => 'Kaydet ve sonrakini ekle',
'Selected' => 'Seçildi',
'Clone' => 'Kopyala', 'Clone' => 'Kopyala',
'Delete' => 'Sil', 'Delete' => 'Sil',
'You have no privileges to update this table.' => 'Bu tabloyu güncellemek için yetkiniz yok.',
'E-mail' => 'E-posta', 'E-mail' => 'E-posta',
'From' => 'Gönderen', 'From' => 'Gönderen',

View File

@@ -77,7 +77,6 @@ $translations = array(
'Use' => 'Обрати', 'Use' => 'Обрати',
'Select database' => 'Обрати базу даних', 'Select database' => 'Обрати базу даних',
'Invalid database.' => 'Погана база даних.', 'Invalid database.' => 'Погана база даних.',
'Create new database' => 'Створити нову базу даних',
'Database has been dropped.' => 'Базу даних було видалено.', 'Database has been dropped.' => 'Базу даних було видалено.',
'Databases have been dropped.' => 'Бази даних були видалені.', 'Databases have been dropped.' => 'Бази даних були видалені.',
'Database has been created.' => 'Базу даних було створено.', 'Database has been created.' => 'Базу даних було створено.',
@@ -231,7 +230,7 @@ $translations = array(
'%d row(s)' => array('%d рядок', '%d рядки', '%d рядків'), '%d row(s)' => array('%d рядок', '%d рядки', '%d рядків'),
'Page' => 'Сторінка', 'Page' => 'Сторінка',
'last' => 'остання', 'last' => 'остання',
'whole result' => 'весь результат', 'Whole result' => 'Весь результат',
'%d byte(s)' => array('%d байт', '%d байта', '%d байтів'), '%d byte(s)' => array('%d байт', '%d байта', '%d байтів'),
'Import' => 'Імпортувати', 'Import' => 'Імпортувати',

View File

@@ -12,7 +12,7 @@ $translations = array(
'Logout successful.' => 'Đã thoát xong.', 'Logout successful.' => 'Đã thoát xong.',
'Invalid credentials.' => 'Tài khoản sai.', 'Invalid credentials.' => 'Tài khoản sai.',
'Too many unsuccessful logins, try again in %d minute(s).' => 'Bạn gõ sai tài khoản quá nhiều lần, hãy thử lại sau %d phút nữa.', 'Too many unsuccessful logins, try again in %d minute(s).' => 'Bạn gõ sai tài khoản quá nhiều lần, hãy thử lại sau %d phút nữa.',
'Master password expired. <a href="http://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Mật khẩu đã hết hạn. <a href="http://www.adminer.org/en/extension/" target="_blank">Thử cách làm</a> để giữ cố định.', 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Mật khẩu đã hết hạn. <a href="https://www.adminer.org/en/extension/"%s>Thử cách làm</a> để giữ cố định.',
'Language' => 'Ngôn ngữ', 'Language' => 'Ngôn ngữ',
'Invalid CSRF token. Send the form again.' => 'Mã kiểm tra CSRF sai, hãy nhập lại biểu mẫu.', 'Invalid CSRF token. Send the form again.' => 'Mã kiểm tra CSRF sai, hãy nhập lại biểu mẫu.',
'No extension' => 'Không có phần mở rộng', 'No extension' => 'Không có phần mở rộng',
@@ -80,7 +80,6 @@ $translations = array(
'Use' => 'Sử dụng', 'Use' => 'Sử dụng',
'Select database' => 'Chọn CSDL', 'Select database' => 'Chọn CSDL',
'Invalid database.' => 'CSDL sai.', 'Invalid database.' => 'CSDL sai.',
'Create new database' => 'Tạo CSDL',
'Database has been dropped.' => 'CSDL đã bị xoá.', 'Database has been dropped.' => 'CSDL đã bị xoá.',
'Databases have been dropped.' => 'Các CSDL đã bị xoá.', 'Databases have been dropped.' => 'Các CSDL đã bị xoá.',
'Database has been created.' => 'Đã tạo CSDL.', 'Database has been created.' => 'Đã tạo CSDL.',
@@ -239,7 +238,7 @@ $translations = array(
'last' => 'cuối', 'last' => 'cuối',
'Load more data' => 'Xem thêm dữ liệu', 'Load more data' => 'Xem thêm dữ liệu',
'Loading' => 'Đang nạp', 'Loading' => 'Đang nạp',
'whole result' => 'toàn bộ kết quả', 'Whole result' => 'Toàn bộ kết quả',
'%d byte(s)' => '%d byte(s)', '%d byte(s)' => '%d byte(s)',
'Import' => 'Nhập khẩu', 'Import' => 'Nhập khẩu',

View File

@@ -1,336 +1,344 @@
<?php <?php
$translations = array( $translations = array(
// label for database system selection (MySQL, SQLite, ...) // label for database system selection (MySQL, SQLite, ...)
'System' => 'xx', 'System' => 'Xx',
'Server' => 'xx', 'Server' => 'Xx',
'Username' => 'xx', 'Username' => 'Xx',
'Password' => 'xx', 'Password' => 'Xx',
'Permanent login' => 'xx', 'Permanent login' => 'Xx',
'Login' => 'xx', 'Login' => 'Xx',
'Logout' => 'xx', 'Logout' => 'Xx',
'Logged as: %s' => 'xx', 'Logged as: %s' => 'Xx: %s',
'Logout successful.' => 'xx', 'Logout successful.' => 'Xx.',
'Invalid credentials.' => 'xx', 'Thanks for using Adminer, consider <a href="%s">donating</a>.' => 'Xx <a href="%s">xx</a>.',
'Too many unsuccessful logins, try again in %d minute(s).' => array('xx', 'xx'), 'Invalid credentials.' => 'Xx.',
'Master password expired. <a href="http://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'xx', '<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => '<a href="https://www.adminer.org/en/extension/"%s>Xx</a> %s xx.',
'Language' => 'xx', 'Too many unsuccessful logins, try again in %d minute(s).' => array('Xx %d.', 'Xx %d.'),
'Invalid CSRF token. Send the form again.' => 'xx', 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => '<a href="https://www.adminer.org/en/extension/"%s>Xx</a> %s xx.',
'No extension' => 'xx', 'Language' => 'Xx',
'None of the supported PHP extensions (%s) are available.' => 'xx', 'Invalid CSRF token. Send the form again.' => 'Xx.',
'Session support must be enabled.' => 'xx', 'If you did not send this request from Adminer then close this page.' => 'Xx.',
'Session expired, please login again.' => 'xx', 'No extension' => 'Xx',
'%s version: %s through PHP extension %s' => 'xx', 'None of the supported PHP extensions (%s) are available.' => 'Xx (%s).',
'Refresh' => 'xx', 'Connecting to privileged ports is not allowed.' => 'Xx.',
'Session support must be enabled.' => 'Xx.',
'Session expired, please login again.' => 'Xx.',
'The action will be performed after successful login with the same credentials.' => 'Xx.',
'%s version: %s through PHP extension %s' => '%s xx: %s xx %s',
'Refresh' => 'Xx',
// text direction - 'ltr' or 'rtl' // text direction - 'ltr' or 'rtl'
'ltr' => 'xx', 'ltr' => 'xx',
'Privileges' => 'xx', 'Privileges' => 'Xx',
'Create user' => 'xx', 'Create user' => 'Xx',
'User has been dropped.' => 'xx', 'User has been dropped.' => 'Xx.',
'User has been altered.' => 'xx', 'User has been altered.' => 'Xx.',
'User has been created.' => 'xx', 'User has been created.' => 'Xx.',
'Hashed' => 'xx', 'Hashed' => 'Xx',
'Column' => 'xx', 'Column' => 'Xx',
'Routine' => 'xx', 'Routine' => 'Xx',
'Grant' => 'xx', 'Grant' => 'Xx',
'Revoke' => 'xx', 'Revoke' => 'Xx',
'Process list' => 'xx', 'Process list' => 'Xx',
'%d process(es) have been killed.' => array('xx', 'xx'), '%d process(es) have been killed.' => array('%d xx.', '%d xx.'),
'Kill' => 'xx', 'Kill' => 'Xx',
'Variables' => 'xx', 'Variables' => 'Xx',
'Status' => 'xx', 'Status' => 'Xx',
'SQL command' => 'xx', 'SQL command' => 'Xx',
'%d query(s) executed OK.' => array('xx', 'xx'), '%d query(s) executed OK.' => array('%d xx.', '%d xx.'),
'Query executed OK, %d row(s) affected.' => array('xx', 'xx'), 'Query executed OK, %d row(s) affected.' => array('Xx, %d.', 'Xx, %d.'),
'No commands to execute.' => 'xx', 'No commands to execute.' => 'Xx.',
'Error in query' => 'xx', 'Error in query' => 'Xx',
'Execute' => 'xx', 'Warnings' => 'Xx',
'Stop on error' => 'xx', 'ATTACH queries are not supported.' => 'Xx.',
'Show only errors' => 'xx', 'Execute' => 'Xx',
'Stop on error' => 'Xx',
'Show only errors' => 'Xx',
// sprintf() format for time of the command // sprintf() format for time of the command
'%.3f s' => 'xx', '%.3f s' => '%.3f xx',
'History' => 'xx', 'History' => 'Xx',
'Clear' => 'xx', 'Clear' => 'Xx',
'Edit all' => 'xx', 'Edit all' => 'Xx',
'File upload' => 'xx', 'File upload' => 'Xx',
'From server' => 'xx', 'From server' => 'Xx',
'Webserver file %s' => 'xx', 'Webserver file %s' => 'Xx %s',
'Run file' => 'xx', 'Run file' => 'Xx',
'File does not exist.' => 'xx', 'File does not exist.' => 'Xx.',
'File uploads are disabled.' => 'xx', 'File uploads are disabled.' => 'Xx.',
'Unable to upload a file.' => 'xx', 'Unable to upload a file.' => 'Xx.',
'Maximum allowed file size is %sB.' => 'xx', 'Maximum allowed file size is %sB.' => 'Xx %sB.',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'xx', 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Xx %s.',
'You can upload a big SQL file via FTP and import it from server.' => 'xx', 'You can upload a big SQL file via FTP and import it from server.' => 'Xx.',
'You are offline.' => 'xx', 'You are offline.' => 'Xx.',
'Export' => 'xx', 'Export' => 'Xx',
'Output' => 'xx', 'Output' => 'Xx',
'open' => 'xx', 'open' => 'xx',
'save' => 'xx', 'save' => 'xx',
'Format' => 'xx', 'Saving' => 'Xx',
'Data' => 'xx', 'Format' => 'Xx',
'Data' => 'Xx',
'Database' => 'xx', 'Database' => 'Xx',
'database' => 'xx', 'database' => 'xx',
'Use' => 'xx', 'DB' => 'XX',
'Select database' => 'xx', 'Use' => 'Xx',
'Invalid database.' => 'xx', 'Select database' => 'Xx',
'Create new database' => 'xx', 'Invalid database.' => 'Xx.',
'Database has been dropped.' => 'xx', 'Database has been dropped.' => 'Xx.',
'Databases have been dropped.' => 'xx', 'Databases have been dropped.' => 'Xx.',
'Database has been created.' => 'xx', 'Database has been created.' => 'Xx.',
'Database has been renamed.' => 'xx', 'Database has been renamed.' => 'Xx.',
'Database has been altered.' => 'xx', 'Database has been altered.' => 'Xx.',
'Alter database' => 'xx', 'Alter database' => 'Xx',
'Create database' => 'xx', 'Create database' => 'Xx',
'Database schema' => 'xx', 'Database schema' => 'Xx',
// link to current database schema layout // link to current database schema layout
'Permanent link' => 'xx', 'Permanent link' => 'Xx',
// thousands separator - must contain single byte // thousands separator - must contain single byte
',' => 'x', ',' => 'x',
'0123456789' => 'xxxxxxxxxx', '0123456789' => 'xxxxxxxxxx',
'Engine' => 'xx', 'Engine' => 'Xx',
'Collation' => 'xx', 'Collation' => 'Xx',
'Data Length' => 'xx', 'Data Length' => 'Xx',
'Index Length' => 'xx', 'Index Length' => 'Xx',
'Data Free' => 'xx', 'Data Free' => 'Xx',
'Rows' => 'xx', 'Rows' => 'Xx',
'%d in total' => 'xx', '%d in total' => '%d xx',
'Analyze' => 'xx', 'Analyze' => 'Xx',
'Optimize' => 'xx', 'Optimize' => 'Xx',
'Vacuum' => 'xx', 'Vacuum' => 'Xx',
'Check' => 'xx', 'Check' => 'Xx',
'Repair' => 'xx', 'Repair' => 'Xx',
'Truncate' => 'xx', 'Truncate' => 'Xx',
'Tables have been truncated.' => 'xx', 'Tables have been truncated.' => 'Xx.',
'Move to other database' => 'xx', 'Move to other database' => 'Xx',
'Move' => 'xx', 'Move' => 'Xx',
'Tables have been moved.' => 'xx', 'Tables have been moved.' => 'Xx.',
'Copy' => 'xx', 'Copy' => 'Xx',
'Tables have been copied.' => 'xx', 'Tables have been copied.' => 'Xx.',
'Routines' => 'xx', 'Routines' => 'Xx',
'Routine has been called, %d row(s) affected.' => array('xx', 'xx'), 'Routine has been called, %d row(s) affected.' => array('Xx, %d.', 'Xx, %d.'),
'Call' => 'xx', 'Call' => 'Xx',
'Parameter name' => 'xx', 'Parameter name' => 'Xx',
'Create procedure' => 'xx', 'Create procedure' => 'Xx',
'Create function' => 'xx', 'Create function' => 'Xx',
'Routine has been dropped.' => 'xx', 'Routine has been dropped.' => 'Xx.',
'Routine has been altered.' => 'xx', 'Routine has been altered.' => 'Xx.',
'Routine has been created.' => 'xx', 'Routine has been created.' => 'Xx.',
'Alter function' => 'xx', 'Alter function' => 'Xx',
'Alter procedure' => 'xx', 'Alter procedure' => 'Xx',
'Return type' => 'xx', 'Return type' => 'Xx',
'Events' => 'xx', 'Events' => 'Xx',
'Event has been dropped.' => 'xx', 'Event has been dropped.' => 'Xx.',
'Event has been altered.' => 'xx', 'Event has been altered.' => 'Xx.',
'Event has been created.' => 'xx', 'Event has been created.' => 'Xx.',
'Alter event' => 'xx', 'Alter event' => 'Xx',
'Create event' => 'xx', 'Create event' => 'Xx',
'At given time' => 'xx', 'At given time' => 'Xx',
'Every' => 'xx', 'Every' => 'Xx',
'Schedule' => 'xx', 'Schedule' => 'Xx',
'Start' => 'xx', 'Start' => 'Xx',
'End' => 'xx', 'End' => 'Xx',
'On completion preserve' => 'xx', 'On completion preserve' => 'Xx',
'Tables' => 'xx', 'Tables' => 'Xx',
'Tables and views' => 'xx', 'Tables and views' => 'Xx',
'Table' => 'xx', 'Table' => 'Xx',
'No tables.' => 'xx', 'No tables.' => 'Xx.',
'Alter table' => 'xx', 'Alter table' => 'Xx',
'Create table' => 'xx', 'Create table' => 'Xx',
'Table has been dropped.' => 'xx', 'Table has been dropped.' => 'Xx.',
'Tables have been dropped.' => 'xx', 'Tables have been dropped.' => 'Xx.',
'Tables have been optimized.' => 'xx', 'Tables have been optimized.' => 'Xx.',
'Table has been altered.' => 'xx', 'Table has been altered.' => 'Xx.',
'Table has been created.' => 'xx', 'Table has been created.' => 'Xx.',
'Table name' => 'xx', 'Table name' => 'Xx',
'Show structure' => 'xx', 'Show structure' => 'Xx',
'engine' => 'xx', 'engine' => 'xx',
'collation' => 'xx', 'collation' => 'xx',
'Column name' => 'xx', 'Column name' => 'Xx',
'Type' => 'xx', 'Type' => 'Xx',
'Length' => 'xx', 'Length' => 'Xx',
'Auto Increment' => 'xx', 'Auto Increment' => 'Xx',
'Options' => 'xx', 'Options' => 'Xx',
'Comment' => 'xx', 'Comment' => 'Xx',
'Default value' => 'xx', 'Default value' => 'Xx',
'Default values' => 'xx', 'Default values' => 'Xx',
'Drop' => 'xx', 'Drop' => 'Xx',
'Are you sure?' => 'xx', 'Drop %s?' => 'Xx %s?',
'Size' => 'xx', 'Are you sure?' => 'Xx?',
'Compute' => 'xx', 'Size' => 'Xx',
'Move up' => 'xx', 'Compute' => 'Xx',
'Move down' => 'xx', 'Move up' => 'Xx',
'Remove' => 'xx', 'Move down' => 'Xx',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'xx', 'Remove' => 'Xx',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Xx %s.',
'Partition by' => 'xx', 'Partition by' => 'Xx',
'Partitions' => 'xx', 'Partitions' => 'Xx',
'Partition name' => 'xx', 'Partition name' => 'Xx',
'Values' => 'xx', 'Values' => 'Xx',
'View' => 'xx', 'View' => 'Xx',
'Materialized View' => 'xx', 'Materialized view' => 'Xx',
'View has been dropped.' => 'xx', 'View has been dropped.' => 'Xx.',
'View has been altered.' => 'xx', 'View has been altered.' => 'Xx.',
'View has been created.' => 'xx', 'View has been created.' => 'Xx.',
'Alter view' => 'xx', 'Alter view' => 'Xx',
'Create view' => 'xx', 'Create view' => 'Xx',
'Create materialized view' => 'xx',
'Indexes' => 'xx', 'Indexes' => 'Xx',
'Indexes have been altered.' => 'xx', 'Indexes have been altered.' => 'Xx.',
'Alter indexes' => 'xx', 'Alter indexes' => 'Xx',
'Add next' => 'xx', 'Add next' => 'Xx',
'Index Type' => 'xx', 'Index Type' => 'Xx',
'Column (length)' => 'xx', 'Column (length)' => 'Xx',
'Foreign keys' => 'xx', 'Foreign keys' => 'Xx',
'Foreign key' => 'xx', 'Foreign key' => 'Xx',
'Foreign key has been dropped.' => 'xx', 'Foreign key has been dropped.' => 'Xx.',
'Foreign key has been altered.' => 'xx', 'Foreign key has been altered.' => 'Xx.',
'Foreign key has been created.' => 'xx', 'Foreign key has been created.' => 'Xx.',
'Target table' => 'xx', 'Target table' => 'Xx',
'Change' => 'xx', 'Change' => 'Xx',
'Source' => 'xx', 'Source' => 'Xx',
'Target' => 'xx', 'Target' => 'Xx',
'Add column' => 'xx', 'Add column' => 'Xx',
'Alter' => 'xx', 'Alter' => 'Xx',
'Add foreign key' => 'xx', 'Add foreign key' => 'Xx',
'ON DELETE' => 'xx', 'ON DELETE' => 'Xx',
'ON UPDATE' => 'xx', 'ON UPDATE' => 'Xx',
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'xx', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Xx.',
'Triggers' => 'xx', 'Triggers' => 'Xx',
'Add trigger' => 'xx', 'Add trigger' => 'Xx',
'Trigger has been dropped.' => 'xx', 'Trigger has been dropped.' => 'Xx.',
'Trigger has been altered.' => 'xx', 'Trigger has been altered.' => 'Xx.',
'Trigger has been created.' => 'xx', 'Trigger has been created.' => 'Xx.',
'Alter trigger' => 'xx', 'Alter trigger' => 'Xx',
'Create trigger' => 'xx', 'Create trigger' => 'Xx',
'Time' => 'xx', 'Time' => 'Xx',
'Event' => 'xx', 'Event' => 'Xx',
'Name' => 'xx', 'Name' => 'Xx',
'select' => 'xx', 'select' => 'xx',
'Select' => 'xx', 'Select' => 'Xx',
'Select data' => 'xx', 'Select data' => 'Xx',
'Functions' => 'xx', 'Functions' => 'Xx',
'Aggregation' => 'xx', 'Aggregation' => 'Xx',
'Search' => 'xx', 'Search' => 'Xx',
'anywhere' => 'xx', 'anywhere' => 'xx',
'Search data in tables' => 'xx', 'Search data in tables' => 'Xx',
'Sort' => 'xx', 'Sort' => 'Xx',
'descending' => 'xx', 'descending' => 'xx',
'Limit' => 'xx', 'Limit' => 'Xx',
'Limit rows' => 'xx', 'Limit rows' => 'Xx',
'Text length' => 'xx', 'Text length' => 'Xx',
'Action' => 'xx', 'Action' => 'Xx',
'Full table scan' => 'xx', 'Full table scan' => 'Xx',
'Unable to select the table' => 'xx', 'Unable to select the table' => 'Xx',
'No rows.' => 'xx', 'No rows.' => 'Xx.',
'%d / ' => 'xx', '%d / ' => '%d / ',
'%d row(s)' => array('xx', 'xx'), '%d row(s)' => array('%d xx', '%d xx'),
'Page' => 'xx', 'Page' => 'Xx',
'last' => 'xx', 'last' => 'xx',
'Load more data' => 'xx', 'Load more data' => 'Xx',
'Loading' => 'xx', 'Loading' => 'Xx',
'whole result' => 'xx', 'Whole result' => 'Xx',
'%d byte(s)' => array('xx', 'xx'), '%d byte(s)' => array('%d xx', '%d xx'),
'Import' => 'xx', 'Import' => 'Xx',
'%d row(s) have been imported.' => array('xx', 'xx'), '%d row(s) have been imported.' => array('%d xx.', '%d xx.'),
'File must be in UTF-8 encoding.' => 'xx', 'File must be in UTF-8 encoding.' => 'Xx.',
// in-place editing in select // in-place editing in select
'Modify' => 'xx', 'Modify' => 'Xx',
'Ctrl+click on a value to modify it.' => 'xx', 'Ctrl+click on a value to modify it.' => 'Xx.',
'Use edit link to modify this value.' => 'xx', 'Use edit link to modify this value.' => 'Xx.',
// %s can contain auto-increment value // %s can contain auto-increment value
'Item%s has been inserted.' => 'xx', 'Item%s has been inserted.' => 'Xx%s.',
'Item has been deleted.' => 'xx', 'Item has been deleted.' => 'Xx.',
'Item has been updated.' => 'xx', 'Item has been updated.' => 'Xx.',
'%d item(s) have been affected.' => array('xx', 'xx'), '%d item(s) have been affected.' => array('%d xx.', '%d xx.'),
'New item' => 'xx', 'New item' => 'Xx',
'original' => 'xx', 'original' => 'xx',
// label for value '' in enum data type // label for value '' in enum data type
'empty' => 'xx', 'empty' => 'xx',
'edit' => 'xx', 'edit' => 'xx',
'Edit' => 'xx', 'Edit' => 'Xx',
'Insert' => 'xx', 'Insert' => 'Xx',
'Save' => 'xx', 'Save' => 'Xx',
'Save and continue edit' => 'xx', 'Save and continue edit' => 'Xx',
'Save and insert next' => 'xx', 'Save and insert next' => 'Xx',
'Selected' => 'xx', 'Selected' => 'Xx',
'Clone' => 'xx', 'Clone' => 'Xx',
'Delete' => 'xx', 'Delete' => 'Xx',
'You have no privileges to update this table.' => 'xx', 'You have no privileges to update this table.' => 'Xx.',
'E-mail' => 'xx', 'E-mail' => 'Xx',
'From' => 'xx', 'From' => 'Xx',
'Subject' => 'xx', 'Subject' => 'Xx',
'Attachments' => 'xx', 'Attachments' => 'Xx',
'Send' => 'xx', 'Send' => 'Xx',
'%d e-mail(s) have been sent.' => array('xx', 'xx'), '%d e-mail(s) have been sent.' => array('%d xx.', '%d xx.'),
// data type descriptions // data type descriptions
'Numbers' => 'xx', 'Numbers' => 'Xx',
'Date and time' => 'xx', 'Date and time' => 'Xx',
'Strings' => 'xx', 'Strings' => 'Xx',
'Binary' => 'xx', 'Binary' => 'Xx',
'Lists' => 'xx', 'Lists' => 'Xx',
'Network' => 'xx', 'Network' => 'Xx',
'Geometry' => 'xx', 'Geometry' => 'Xx',
'Relations' => 'xx', 'Relations' => 'Xx',
'Editor' => 'xx', 'Editor' => 'Xx',
// date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d // date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
'$1-$3-$5' => 'xx', '$1-$3-$5' => 'xx',
// hint for date format - use language equivalents for day, month and year shortcuts // hint for date format - use language equivalents for day, month and year shortcuts
'[yyyy]-mm-dd' => 'xx', '[yyyy]-mm-dd' => 'xx',
// hint for time format - use language equivalents for hour, minute and second shortcuts // hint for time format - use language equivalents for hour, minute and second shortcuts
'HH:MM:SS' => 'xx', 'HH:MM:SS' => 'Xx',
'now' => 'xx', 'now' => 'xx',
'yes' => 'xx', 'yes' => 'xx',
'no' => 'xx', 'no' => 'xx',
// general SQLite error in create, drop or rename database // general SQLite error in create, drop or rename database
'File exists.' => 'xx', 'File exists.' => 'Xx.',
'Please use one of the extensions %s.' => 'xx', 'Please use one of the extensions %s.' => 'Xx %s.',
// PostgreSQL and MS SQL schema support // PostgreSQL and MS SQL schema support
'Alter schema' => 'xx', 'Alter schema' => 'Xx',
'Create schema' => 'xx', 'Create schema' => 'Xx',
'Schema has been dropped.' => 'xx', 'Schema has been dropped.' => 'Xx.',
'Schema has been created.' => 'xx', 'Schema has been created.' => 'Xx.',
'Schema has been altered.' => 'xx', 'Schema has been altered.' => 'Xx.',
'Schema' => 'xx', 'Schema' => 'Xx',
'Invalid schema.' => 'xx', 'Invalid schema.' => 'Xx.',
// PostgreSQL sequences support // PostgreSQL sequences support
'Sequences' => 'xx', 'Sequences' => 'Xx',
'Create sequence' => 'xx', 'Create sequence' => 'Xx',
'Sequence has been dropped.' => 'xx', 'Sequence has been dropped.' => 'Xx.',
'Sequence has been created.' => 'xx', 'Sequence has been created.' => 'Xx.',
'Sequence has been altered.' => 'xx', 'Sequence has been altered.' => 'Xx.',
'Alter sequence' => 'xx', 'Alter sequence' => 'Xx',
// PostgreSQL user types support // PostgreSQL user types support
'User types' => 'xx', 'User types' => 'Xx',
'Create type' => 'xx', 'Create type' => 'Xx',
'Type has been dropped.' => 'xx', 'Type has been dropped.' => 'Xx.',
'Type has been created.' => 'xx', 'Type has been created.' => 'Xx.',
'Alter type' => 'xx', 'Alter type' => 'Xx',
); );

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => '密碼', 'Password' => '密碼',
'Select database' => '選擇資料庫', 'Select database' => '選擇資料庫',
'Invalid database.' => '無效的資料庫。', 'Invalid database.' => '無效的資料庫。',
'Create new database' => '建立新資料庫',
'Table has been altered.' => '資料表已修改。', 'Table has been altered.' => '資料表已修改。',
'Table has been created.' => '資料表已修改。', 'Table has been created.' => '資料表已修改。',
'Alter table' => '修改資料表', 'Alter table' => '修改資料表',
@@ -184,7 +183,7 @@ $translations = array(
'Save and continue edit' => '儲存並繼續編輯', 'Save and continue edit' => '儲存並繼續編輯',
'original' => '原始', 'original' => '原始',
'%d item(s) have been affected.' => '%d個項目受到影響。', '%d item(s) have been affected.' => '%d個項目受到影響。',
'whole result' => '所有結果', 'Whole result' => '所有結果',
'Tables have been dropped.' => '已經將資料表刪除。', 'Tables have been dropped.' => '已經將資料表刪除。',
'Clone' => '複製', 'Clone' => '複製',
'Maximum number of allowed fields exceeded. Please increase %s.' => '超過允許的字段數量的最大值。請增加%s。', 'Maximum number of allowed fields exceeded. Please increase %s.' => '超過允許的字段數量的最大值。請增加%s。',

View File

@@ -8,7 +8,6 @@ $translations = array(
'Password' => '密码', 'Password' => '密码',
'Select database' => '选择数据库', 'Select database' => '选择数据库',
'Invalid database.' => '无效数据库。', 'Invalid database.' => '无效数据库。',
'Create new database' => '创建新数据库',
'Table has been dropped.' => '已删除表。', 'Table has been dropped.' => '已删除表。',
'Table has been altered.' => '已修改表。', 'Table has been altered.' => '已修改表。',
'Table has been created.' => '已创建表。', 'Table has been created.' => '已创建表。',
@@ -186,7 +185,7 @@ $translations = array(
'Save and continue edit' => '保存并继续编辑', 'Save and continue edit' => '保存并继续编辑',
'original' => '原始', 'original' => '原始',
'%d item(s) have been affected.' => '%d 个项目受到影响。', '%d item(s) have been affected.' => '%d 个项目受到影响。',
'whole result' => '所有结果', 'Whole result' => '所有结果',
'Tables have been dropped.' => '已删除表。', 'Tables have been dropped.' => '已删除表。',
'Clone' => '复制', 'Clone' => '复制',
'Maximum number of allowed fields exceeded. Please increase %s.' => '超过最多允许的字段数量。请增加 %s。', 'Maximum number of allowed fields exceeded. Please increase %s.' => '超过最多允许的字段数量。请增加 %s。',

View File

@@ -17,7 +17,7 @@ function adminer_object() {
new AdminerDumpXml, new AdminerDumpXml,
new AdminerDumpAlter, new AdminerDumpAlter,
//~ new AdminerSqlLog("past-" . rtrim(`git describe --tags --abbrev=0`) . ".sql"), //~ new AdminerSqlLog("past-" . rtrim(`git describe --tags --abbrev=0`) . ".sql"),
//~ new AdminerEditCalendar("<script type='text/javascript' src='../externals/jquery-ui/jquery-1.4.4.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.core.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.widget.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.datepicker.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.mouse.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.slider.js'></script>\n<script type='text/javascript' src='../externals/jquery-timepicker/jquery-ui-timepicker-addon.js'></script>\n<link rel='stylesheet' href='../externals/jquery-ui/themes/base/jquery.ui.all.css'>\n<style type='text/css'>\n.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }\n.ui-timepicker-div dl { text-align: left; }\n.ui-timepicker-div dl dt { height: 25px; }\n.ui-timepicker-div dl dd { margin: -25px 0 10px 65px; }\n.ui-timepicker-div td { font-size: 90%; }\n</style>\n", "../externals/jquery-ui/ui/i18n/jquery.ui.datepicker-%s.js"), //~ new AdminerEditCalendar(script_src("../externals/jquery-ui/jquery-1.4.4.js") . script_src("../externals/jquery-ui/ui/jquery.ui.core.js") . script_src("../externals/jquery-ui/ui/jquery.ui.widget.js") . script_src("../externals/jquery-ui/ui/jquery.ui.datepicker.js") . script_src("../externals/jquery-ui/ui/jquery.ui.mouse.js") . script_src("../externals/jquery-ui/ui/jquery.ui.slider.js") . script_src("../externals/jquery-timepicker/jquery-ui-timepicker-addon.js") . "<link rel='stylesheet' href='../externals/jquery-ui/themes/base/jquery.ui.all.css'>\n<style>\n.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }\n.ui-timepicker-div dl { text-align: left; }\n.ui-timepicker-div dl dt { height: 25px; }\n.ui-timepicker-div dl dd { margin: -25px 0 10px 65px; }\n.ui-timepicker-div td { font-size: 90%; }\n</style>\n", "../externals/jquery-ui/ui/i18n/jquery.ui.datepicker-%s.js"),
//~ new AdminerTinymce("../externals/tinymce/jscripts/tiny_mce/tiny_mce_dev.js"), //~ new AdminerTinymce("../externals/tinymce/jscripts/tiny_mce/tiny_mce_dev.js"),
//~ new AdminerWymeditor(array("../externals/wymeditor/src/jquery/jquery.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.explorer.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.mozilla.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.opera.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.safari.js")), //~ new AdminerWymeditor(array("../externals/wymeditor/src/jquery/jquery.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.explorer.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.mozilla.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.opera.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.safari.js")),
new AdminerFileUpload(""), new AdminerFileUpload(""),

View File

@@ -1,6 +1,8 @@
<?php <?php
page_header(lang('Privileges')); page_header(lang('Privileges'));
echo '<p class="links"><a href="' . h(ME) . 'user=">' . lang('Create user') . "</a>";
$result = $connection->query("SELECT User, Host FROM mysql." . (DB == "" ? "user" : "db WHERE " . q(DB) . " LIKE Db") . " ORDER BY Host, User"); $result = $connection->query("SELECT User, Host FROM mysql." . (DB == "" ? "user" : "db WHERE " . q(DB) . " LIKE Db") . " ORDER BY Host, User");
$grant = $result; $grant = $result;
if (!$result) { if (!$result) {
@@ -25,5 +27,3 @@ if (!$grant || DB != "") {
echo "</table>\n"; echo "</table>\n";
echo "</form>\n"; echo "</form>\n";
echo '<p class="links"><a href="' . h(ME) . 'user=">' . lang('Create user') . "</a>";

View File

@@ -1,17 +1,18 @@
<?php <?php
$PROCEDURE = $_GET["procedure"]; $PROCEDURE = ($_GET["name"] ? $_GET["name"] : $_GET["procedure"]);
$routine = (isset($_GET["function"]) ? "FUNCTION" : "PROCEDURE"); $routine = (isset($_GET["function"]) ? "FUNCTION" : "PROCEDURE");
$row = $_POST; $row = $_POST;
$row["fields"] = (array) $row["fields"]; $row["fields"] = (array) $row["fields"];
if ($_POST && !process_fields($row["fields"]) && !$error) { if ($_POST && !process_fields($row["fields"]) && !$error) {
$orig = routine($_GET["procedure"], $routine);
$temp_name = "$row[name]_adminer_" . uniqid(); $temp_name = "$row[name]_adminer_" . uniqid();
drop_create( drop_create(
"DROP $routine " . idf_escape($PROCEDURE), "DROP $routine " . routine_id($PROCEDURE, $orig),
create_routine($routine, $row), create_routine($routine, $row),
"DROP $routine " . idf_escape($row["name"]), "DROP $routine " . routine_id($row["name"], $row),
create_routine($routine, array("name" => $temp_name) + $row), create_routine($routine, array("name" => $temp_name) + $row),
"DROP $routine " . idf_escape($temp_name), "DROP $routine " . routine_id($temp_name, $row),
substr(ME, 0, -1), substr(ME, 0, -1),
lang('Routine has been dropped.'), lang('Routine has been dropped.'),
lang('Routine has been altered.'), lang('Routine has been altered.'),
@@ -24,7 +25,7 @@ if ($_POST && !process_fields($row["fields"]) && !$error) {
page_header(($PROCEDURE != "" ? (isset($_GET["function"]) ? lang('Alter function') : lang('Alter procedure')) . ": " . h($PROCEDURE) : (isset($_GET["function"]) ? lang('Create function') : lang('Create procedure'))), $error); page_header(($PROCEDURE != "" ? (isset($_GET["function"]) ? lang('Alter function') : lang('Alter procedure')) . ": " . h($PROCEDURE) : (isset($_GET["function"]) ? lang('Create function') : lang('Create procedure'))), $error);
if (!$_POST && $PROCEDURE != "") { if (!$_POST && $PROCEDURE != "") {
$row = routine($PROCEDURE, $routine); $row = routine($_GET["procedure"], $routine);
$row["name"] = $PROCEDURE; $row["name"] = $PROCEDURE;
} }
@@ -35,20 +36,20 @@ $routine_languages = routine_languages();
<form action="" method="post" id="form"> <form action="" method="post" id="form">
<p><?php echo lang('Name'); ?>: <input name="name" value="<?php echo h($row["name"]); ?>" maxlength="64" autocapitalize="off"> <p><?php echo lang('Name'); ?>: <input name="name" value="<?php echo h($row["name"]); ?>" maxlength="64" autocapitalize="off">
<?php echo ($routine_languages ? lang('Language') . ": " . html_select("language", $routine_languages, $row["language"]) : ""); ?> <?php echo ($routine_languages ? lang('Language') . ": " . html_select("language", $routine_languages, $row["language"]) . "\n" : ""); ?>
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<table cellspacing="0" class="nowrap"> <table cellspacing="0" class="nowrap">
<?php <?php
edit_fields($row["fields"], $collations, $routine); edit_fields($row["fields"], $collations, $routine);
if (isset($_GET["function"])) { if (isset($_GET["function"])) {
echo "<tr><td>" . lang('Return type'); echo "<tr><td>" . lang('Return type');
edit_type("returns", $row["returns"], $collations); edit_type("returns", $row["returns"], $collations, array(), ($jush == "pgsql" ? array("void", "trigger") : array()));
} }
?> ?>
</table> </table>
<p><?php textarea("definition", $row["definition"]); ?> <p><?php textarea("definition", $row["definition"]); ?>
<p> <p>
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<?php if ($PROCEDURE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?> <?php if ($PROCEDURE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $PROCEDURE)); ?><?php } ?>
<input type="hidden" name="token" value="<?php echo $token; ?>"> <input type="hidden" name="token" value="<?php echo $token; ?>">
</form> </form>

View File

@@ -2,7 +2,7 @@
if (support("kill") && $_POST && !$error) { if (support("kill") && $_POST && !$error) {
$killed = 0; $killed = 0;
foreach ((array) $_POST["kill"] as $val) { foreach ((array) $_POST["kill"] as $val) {
if (queries("KILL " . number($val))) { if (kill_process($val)) {
$killed++; $killed++;
} }
} }
@@ -13,8 +13,9 @@ page_header(lang('Process list'), $error);
?> ?>
<form action="" method="post"> <form action="" method="post">
<table cellspacing="0" onclick="tableClick(event);" ondblclick="tableClick(event, true);" class="nowrap checkable"> <table cellspacing="0" class="nowrap checkable">
<?php <?php
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
// HTML valid because there is always at least one process // HTML valid because there is always at least one process
$i = -1; $i = -1;
foreach (process_list() as $i => $row) { foreach (process_list() as $i => $row) {
@@ -30,8 +31,7 @@ foreach (process_list() as $i => $row) {
} }
echo "</thead>\n"; echo "</thead>\n";
} }
echo "<tr" . odd() . ">" . (support("kill") ? "<td>" . checkbox("kill[]", $row[$jush == "sql" ? "Id" : "pid"], 0) : "");
echo "<tr" . odd() . ">" . (support("kill") ? "<td>" . checkbox("kill[]", $row["Id"], 0) : "");
foreach ($row as $key => $val) { foreach ($row as $key => $val) {
echo "<td>" . ( echo "<td>" . (
($jush == "sql" && $key == "Info" && preg_match("~Query|Killed~", $row["Command"]) && $val != "") || ($jush == "sql" && $key == "Info" && preg_match("~Query|Killed~", $row["Command"]) && $val != "") ||
@@ -45,13 +45,13 @@ foreach (process_list() as $i => $row) {
} }
?> ?>
</table> </table>
<script type='text/javascript'>tableCheck();</script>
<p> <p>
<?php <?php
if (support("kill")) { if (support("kill")) {
echo ($i + 1) . "/" . lang('%d in total', $connection->result("SELECT @@max_connections")); echo ($i + 1) . "/" . lang('%d in total', max_connections());
echo "<p><input type='submit' value='" . lang('Kill') . "'>\n"; echo "<p><input type='submit' value='" . lang('Kill') . "'>\n";
} }
?> ?>
<input type="hidden" name="token" value="<?php echo $token; ?>"> <input type="hidden" name="token" value="<?php echo $token; ?>">
</form> </form>
<?php echo script("tableCheck();"); ?>

View File

@@ -48,19 +48,19 @@ foreach (table_status('', true) as $table => $table_status) {
} }
?> ?>
<div id="schema" style="height: <?php echo $top; ?>em;" onselectstart="return false;"> <div id="schema" style="height: <?php echo $top; ?>em;">
<script type="text/javascript"> <script<?php echo nonce(); ?>>
qs('#schema').onselectstart = function () { return false; };
var tablePos = {<?php echo implode(",", $table_pos_js) . "\n"; ?>}; var tablePos = {<?php echo implode(",", $table_pos_js) . "\n"; ?>};
var em = document.getElementById('schema').offsetHeight / <?php echo $top; ?>; var em = qs('#schema').offsetHeight / <?php echo $top; ?>;
document.onmousemove = schemaMousemove; document.onmousemove = schemaMousemove;
document.onmouseup = function (ev) { document.onmouseup = partialArg(schemaMouseup, '<?php echo js_escape(DB); ?>');
schemaMouseup(ev, '<?php echo js_escape(DB); ?>');
};
</script> </script>
<?php <?php
foreach ($schema as $name => $table) { foreach ($schema as $name => $table) {
echo "<div class='table' style='top: " . $table["pos"][0] . "em; left: " . $table["pos"][1] . "em;' onmousedown='schemaMousedown(this, event);'>"; echo "<div class='table' style='top: " . $table["pos"][0] . "em; left: " . $table["pos"][1] . "em;'>";
echo '<a href="' . h(ME) . 'table=' . urlencode($name) . '"><b>' . h($name) . "</b></a>"; echo '<a href="' . h(ME) . 'table=' . urlencode($name) . '"><b>' . h($name) . "</b></a>";
echo script("qsl('div').onmousedown = schemaMousedown;");
foreach ($table["fields"] as $field) { foreach ($table["fields"] as $field) {
$val = '<span' . type_class($field["type"]) . ' title="' . h($field["full_type"] . ($field["null"] ? " NULL" : '')) . '">' . h($field["field"]) . '</span>'; $val = '<span' . type_class($field["type"]) . ' title="' . h($field["full_type"] . ($field["null"] ? " NULL" : '')) . '">' . h($field["field"]) . '</span>';

View File

@@ -27,11 +27,11 @@ if (!$row) {
<form action="" method="post"> <form action="" method="post">
<p><input name="name" id="name" value="<?php echo h($row["name"]); ?>" autocapitalize="off"> <p><input name="name" id="name" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
<script type='text/javascript'>focus(document.getElementById('name'));</script> <?php echo script("focus(qs('#name'));"); ?>
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<?php <?php
if ($_GET["ns"] != "") { if ($_GET["ns"] != "") {
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n"; echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', $_GET["ns"])) . "\n";
} }
?> ?>
<input type="hidden" name="token" value="<?php echo $token; ?>"> <input type="hidden" name="token" value="<?php echo $token; ?>">

View File

@@ -4,11 +4,7 @@ $table_status = table_status1($TABLE);
$indexes = indexes($TABLE); $indexes = indexes($TABLE);
$fields = fields($TABLE); $fields = fields($TABLE);
$foreign_keys = column_foreign_keys($TABLE); $foreign_keys = column_foreign_keys($TABLE);
$oid = ""; $oid = $table_status["Oid"];
if ($table_status["Oid"]) {
$oid = ($jush == "sqlite" ? "rowid" : "oid");
$indexes[] = array("type" => "PRIMARY", "columns" => array($oid));
}
parse_str($_COOKIE["adminer_import"], $adminer_import); parse_str($_COOKIE["adminer_import"], $adminer_import);
$rights = array(); // privilege => 0 $rights = array(); // privilege => 0
@@ -30,10 +26,6 @@ $is_group = count($group) < count($select);
$where = $adminer->selectSearchProcess($fields, $indexes); $where = $adminer->selectSearchProcess($fields, $indexes);
$order = $adminer->selectOrderProcess($fields, $indexes); $order = $adminer->selectOrderProcess($fields, $indexes);
$limit = $adminer->selectLimitProcess(); $limit = $adminer->selectLimitProcess();
$from = ($select ? implode(", ", $select) : "*" . ($oid ? ", $oid" : ""))
. convert_fields($columns, $fields, $select)
. "\nFROM " . table($TABLE);
$group_by = ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : "");
if ($_GET["val"] && is_ajax()) { if ($_GET["val"] && is_ajax()) {
header("Content-Type: text/plain; charset=utf-8"); header("Content-Type: text/plain; charset=utf-8");
@@ -49,6 +41,24 @@ if ($_GET["val"] && is_ajax()) {
exit; exit;
} }
$primary = $unselected = null;
foreach ($indexes as $index) {
if ($index["type"] == "PRIMARY") {
$primary = array_flip($index["columns"]);
$unselected = ($select ? $primary : array());
foreach ($unselected as $key => $val) {
if (in_array(idf_escape($key), $select)) {
unset($unselected[$key]);
}
}
break;
}
}
if ($oid && !$primary) {
$primary = $unselected = array($oid => 0);
$indexes[] = array("type" => "PRIMARY", "columns" => array($oid));
}
if ($_POST && !$error) { if ($_POST && !$error) {
$where_check = $where; $where_check = $where;
if (!$_POST["all"] && is_array($_POST["check"])) { if (!$_POST["all"] && is_array($_POST["check"])) {
@@ -59,25 +69,15 @@ if ($_POST && !$error) {
$where_check[] = "((" . implode(") OR (", $checks) . "))"; $where_check[] = "((" . implode(") OR (", $checks) . "))";
} }
$where_check = ($where_check ? "\nWHERE " . implode(" AND ", $where_check) : ""); $where_check = ($where_check ? "\nWHERE " . implode(" AND ", $where_check) : "");
$primary = $unselected = null;
foreach ($indexes as $index) {
if ($index["type"] == "PRIMARY") {
$primary = array_flip($index["columns"]);
$unselected = ($select ? $primary : array());
break;
}
}
foreach ((array) $unselected as $key => $val) {
if (in_array(idf_escape($key), $select)) {
unset($unselected[$key]);
}
}
if ($_POST["export"]) { if ($_POST["export"]) {
cookie("adminer_import", "output=" . urlencode($_POST["output"]) . "&format=" . urlencode($_POST["format"])); cookie("adminer_import", "output=" . urlencode($_POST["output"]) . "&format=" . urlencode($_POST["format"]));
dump_headers($TABLE); dump_headers($TABLE);
$adminer->dumpTable($TABLE, ""); $adminer->dumpTable($TABLE, "");
if (!is_array($_POST["check"]) || $unselected === array()) { $from = ($select ? implode(", ", $select) : "*")
. convert_fields($columns, $fields, $select)
. "\nFROM " . table($TABLE);
$group_by = ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : "");
if (!is_array($_POST["check"]) || $primary) {
$query = "SELECT $from$where_check$group_by"; $query = "SELECT $from$where_check$group_by";
} else { } else {
$union = array(); $union = array();
@@ -108,7 +108,7 @@ if ($_POST && !$error) {
if ($_POST["clone"]) { if ($_POST["clone"]) {
$query = "INTO " . table($TABLE) . " (" . implode(", ", array_keys($set)) . ")\nSELECT " . implode(", ", $set) . "\nFROM " . table($TABLE); $query = "INTO " . table($TABLE) . " (" . implode(", ", array_keys($set)) . ")\nSELECT " . implode(", ", $set) . "\nFROM " . table($TABLE);
} }
if ($_POST["all"] || ($unselected === array() && is_array($_POST["check"])) || $is_group) { if ($_POST["all"] || ($primary && is_array($_POST["check"])) || $is_group) {
$result = ($_POST["delete"] $result = ($_POST["delete"]
? $driver->delete($TABLE, $where_check) ? $driver->delete($TABLE, $where_check)
: ($_POST["clone"] : ($_POST["clone"]
@@ -124,8 +124,8 @@ if ($_POST && !$error) {
$result = ($_POST["delete"] $result = ($_POST["delete"]
? $driver->delete($TABLE, $where2, 1) ? $driver->delete($TABLE, $where2, 1)
: ($_POST["clone"] : ($_POST["clone"]
? queries("INSERT" . limit1($query, $where2)) ? queries("INSERT" . limit1($TABLE, $query, $where2))
: $driver->update($TABLE, $set, $where2) : $driver->update($TABLE, $set, $where2, 1)
) )
); );
if (!$result) { if (!$result) {
@@ -165,7 +165,7 @@ if ($_POST && !$error) {
$TABLE, $TABLE,
$set, $set,
" WHERE " . ($where ? implode(" AND ", $where) . " AND " : "") . where_check($unique_idf, $fields), " WHERE " . ($where ? implode(" AND ", $where) . " AND " : "") . where_check($unique_idf, $fields),
!($is_group || $unselected === array()), !$is_group && !$primary,
" " " "
); );
if (!$result) { if (!$result) {
@@ -205,7 +205,7 @@ if ($_POST && !$error) {
} }
$result = (!$rows || $driver->insertUpdate($TABLE, $rows, $primary)); $result = (!$rows || $driver->insertUpdate($TABLE, $rows, $primary));
if ($result) { if ($result) {
$driver->commit(); $result = $driver->commit();
} }
queries_redirect(remove_from_uri("page"), lang('%d row(s) have been imported.', $affected), $result); queries_redirect(remove_from_uri("page"), lang('%d row(s) have been imported.', $affected), $result);
$driver->rollback(); // after queries_redirect() to not overwrite error $driver->rollback(); // after queries_redirect() to not overwrite error
@@ -226,7 +226,7 @@ $set = null;
if (isset($rights["insert"]) || !support("table")) { if (isset($rights["insert"]) || !support("table")) {
$set = ""; $set = "";
foreach ((array) $_GET["where"] as $val) { foreach ((array) $_GET["where"] as $val) {
if (count($foreign_keys[$val["col"]]) == 1 && ($val["op"] == "=" if ($foreign_keys[$val["col"]] && count($foreign_keys[$val["col"]]) == 1 && ($val["op"] == "="
|| (!$val["op"] && !preg_match('~[_%]~', $val["val"])) // LIKE in Editor || (!$val["op"] && !preg_match('~[_%]~', $val["val"])) // LIKE in Editor
)) { )) {
$set .= "&set" . urlencode("[" . bracket_escape($val["col"]) . "]") . "=" . urlencode($val["val"]); $set .= "&set" . urlencode("[" . bracket_escape($val["col"]) . "]") . "=" . urlencode($val["val"]);
@@ -259,17 +259,29 @@ if (!$columns && support("table")) {
} }
$select2 = $select; $select2 = $select;
$group2 = $group;
if (!$select2) { if (!$select2) {
$select2[] = "*"; $select2[] = "*";
if ($oid) { $convert_fields = convert_fields($columns, $fields, $select);
$select2[] = $oid; if ($convert_fields) {
$select2[] = substr($convert_fields, 2);
} }
} }
$convert_fields = convert_fields($columns, $fields, $select); foreach ($select as $key => $val) {
if ($convert_fields) { $field = $fields[idf_unescape($val)];
$select2[] = substr($convert_fields, 2); if ($field && ($as = convert_field($field))) {
$select2[$key] = "$as AS $val";
}
} }
$result = $driver->select($TABLE, $select2, $where, $group, $order, $limit, $page, true); if (!$is_group && $unselected) {
foreach ($unselected as $key => $val) {
$select2[] = idf_escape($key);
if ($group2) {
$group2[] = idf_escape($key);
}
}
}
$result = $driver->select($TABLE, $select2, $where, $group2, $order, $limit, $page, true);
if (!$result) { if (!$result) {
echo "<p class='error'>" . error() . "\n"; echo "<p class='error'>" . error() . "\n";
@@ -288,7 +300,7 @@ if (!$columns && support("table")) {
} }
// use count($rows) without LIMIT, COUNT(*) without grouping, FOUND_ROWS otherwise (slowest) // use count($rows) without LIMIT, COUNT(*) without grouping, FOUND_ROWS otherwise (slowest)
if ($_GET["page"] != "last" && +$limit && $group && $is_group && $jush == "sql") { if ($_GET["page"] != "last" && $limit != "" && $group && $is_group && $jush == "sql") {
$found_rows = $connection->result(" SELECT FOUND_ROWS()"); // space to allow mysql.trace_mode $found_rows = $connection->result(" SELECT FOUND_ROWS()"); // space to allow mysql.trace_mode
} }
@@ -297,14 +309,18 @@ if (!$columns && support("table")) {
} else { } else {
$backward_keys = $adminer->backwardKeys($TABLE, $table_name); $backward_keys = $adminer->backwardKeys($TABLE, $table_name);
echo "<table id='table' cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);' onkeydown='return editingKeydown(event);'>\n"; echo "<table id='table' cellspacing='0' class='nowrap checkable'>";
echo "<thead><tr>" . (!$group && $select ? "" : "<td><input type='checkbox' id='all-page' onclick='formCheck(this, /check/);'> <a href='" . h($_GET["modify"] ? remove_from_uri("modify") : $_SERVER["REQUEST_URI"] . "&modify=1") . "'>" . lang('Modify') . "</a>"); echo script("mixin(qs('#table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true), onkeydown: editingKeydown});");
echo "<thead><tr>" . (!$group && $select
? ""
: "<td><input type='checkbox' id='all-page' class='jsonly'>" . script("qs('#all-page').onclick = partial(formCheck, /check/);", "")
. " <a href='" . h($_GET["modify"] ? remove_from_uri("modify") : $_SERVER["REQUEST_URI"] . "&modify=1") . "'>" . lang('Modify') . "</a>");
$names = array(); $names = array();
$functions = array(); $functions = array();
reset($select); reset($select);
$rank = 1; $rank = 1;
foreach ($rows[0] as $key => $val) { foreach ($rows[0] as $key => $val) {
if ($key != $oid) { if (!isset($unselected[$key])) {
$val = $_GET["columns"][key($select)]; $val = $_GET["columns"][key($select)];
$field = $fields[$select ? ($val ? $val["col"] : current($select)) : $key]; $field = $fields[$select ? ($val ? $val["col"] : current($select)) : $key];
$name = ($field ? $adminer->fieldName($field, $rank) : ($val["fun"] ? "*" : $key)); $name = ($field ? $adminer->fieldName($field, $rank) : ($val["fun"] ? "*" : $key));
@@ -314,13 +330,14 @@ if (!$columns && support("table")) {
$column = idf_escape($key); $column = idf_escape($key);
$href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key); $href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
$desc = "&desc%5B0%5D=1"; $desc = "&desc%5B0%5D=1";
echo '<th onmouseover="columnMouse(this);" onmouseout="columnMouse(this, \' hidden\');">'; echo "<th>" . script("mixin(qsl('th'), {onmouseover: partial(columnMouse), onmouseout: partial(columnMouse, ' hidden')});", "");
echo '<a href="' . h($href . ($order[0] == $column || $order[0] == $key || (!$order && $is_group && $group[0] == $column) ? $desc : '')) . '">'; // $order[0] == $key - COUNT(*) echo '<a href="' . h($href . ($order[0] == $column || $order[0] == $key || (!$order && $is_group && $group[0] == $column) ? $desc : '')) . '">'; // $order[0] == $key - COUNT(*)
echo apply_sql_function($val["fun"], $name) . "</a>"; //! columns looking like functions echo apply_sql_function($val["fun"], $name) . "</a>"; //! columns looking like functions
echo "<span class='column hidden'>"; echo "<span class='column hidden'>";
echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>"; echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";
if (!$val["fun"]) { if (!$val["fun"]) {
echo '<a href="#fieldset-search" onclick="selectSearch(\'' . h(js_escape($key)) . '\'); return false;" title="' . lang('Search') . '" class="text jsonly"> =</a>'; echo '<a href="#fieldset-search" title="' . lang('Search') . '" class="text jsonly"> =</a>';
echo script("qsl('a').onclick = partial(selectSearch, '" . js_escape($key) . "');");
} }
echo "</span>"; echo "</span>";
} }
@@ -359,18 +376,22 @@ if (!$columns && support("table")) {
} }
$unique_idf = ""; $unique_idf = "";
foreach ($unique_array as $key => $val) { foreach ($unique_array as $key => $val) {
if (($jush == "sql" || $jush == "pgsql") && strlen($val) > 64) { if (($jush == "sql" || $jush == "pgsql") && preg_match('~char|text|enum|set~', $fields[$key]["type"]) && strlen($val) > 64) {
$key = (strpos($key, '(') ? $key : idf_escape($key)); //! columns looking like functions $key = (strpos($key, '(') ? $key : idf_escape($key)); //! columns looking like functions
$key = "MD5(" . ($jush == 'sql' && preg_match("~^utf8_~", $fields[$key]["collation"]) ? $key : "CONVERT($key USING " . charset($connection) . ")") . ")"; $key = "MD5(" . ($jush != 'sql' || preg_match("~^utf8~", $fields[$key]["collation"]) ? $key : "CONVERT($key USING " . charset($connection) . ")") . ")";
$val = md5($val); $val = md5($val);
} }
$unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key)); $unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key));
} }
echo "<tr" . odd() . ">" . (!$group && $select ? "" : "<td>" . checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]), "", "this.form['all'].checked = false; formUncheck('all-page');") . ($is_group || information_schema(DB) ? "" : " <a href='" . h(ME . "edit=" . urlencode($TABLE) . $unique_idf) . "'>" . lang('edit') . "</a>")); echo "<tr" . odd() . ">" . (!$group && $select ? "" : "<td>"
. checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]))
. ($is_group || information_schema(DB) ? "" : " <a href='" . h(ME . "edit=" . urlencode($TABLE) . $unique_idf) . "' class='edit'>" . lang('edit') . "</a>")
);
foreach ($row as $key => $val) { foreach ($row as $key => $val) {
if (isset($names[$key])) { if (isset($names[$key])) {
$field = $fields[$key]; $field = $fields[$key];
$val = $driver->value($val, $field);
if ($val != "" && (!isset($email_fields[$key]) || $email_fields[$key] != "")) { if ($val != "" && (!isset($email_fields[$key]) || $email_fields[$key] != "")) {
$email_fields[$key] = (is_mail($val) ? $names[$key] : ""); //! filled e-mails can be contained on other pages $email_fields[$key] = (is_mail($val) ? $names[$key] : ""); //! filled e-mails can be contained on other pages
} }
@@ -387,6 +408,9 @@ if (!$columns && support("table")) {
$link .= where_link($i, $foreign_key["target"][$i], $rows[$n][$source]); $link .= where_link($i, $foreign_key["target"][$i], $rows[$n][$source]);
} }
$link = ($foreign_key["db"] != "" ? preg_replace('~([?&]db=)[^&]+~', '\\1' . urlencode($foreign_key["db"]), ME) : ME) . 'select=' . urlencode($foreign_key["table"]) . $link; // InnoDB supports non-UNIQUE keys $link = ($foreign_key["db"] != "" ? preg_replace('~([?&]db=)[^&]+~', '\\1' . urlencode($foreign_key["db"]), ME) : ME) . 'select=' . urlencode($foreign_key["table"]) . $link; // InnoDB supports non-UNIQUE keys
if ($foreign_key["ns"]) {
$link = preg_replace('~([?&]ns=)[^&]+~', '\\1' . urlencode($foreign_key["ns"]), $link);
}
if (count($foreign_key["source"]) == 1) { if (count($foreign_key["source"]) == 1) {
break; break;
} }
@@ -416,7 +440,10 @@ if (!$columns && support("table")) {
echo "<td>" . ($text ? "<textarea name='$id' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>$h_value</textarea>" : "<input name='$id' value='$h_value' size='$lengths[$key]'>"); echo "<td>" . ($text ? "<textarea name='$id' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>$h_value</textarea>" : "<input name='$id' value='$h_value' size='$lengths[$key]'>");
} else { } else {
$long = strpos($val, "<i>...</i>"); $long = strpos($val, "<i>...</i>");
echo "<td id='$id' onclick=\"selectClick(this, event, " . ($long ? 2 : ($text ? 1 : 0)) . ($editable ? "" : ", '" . h(lang('Use edit link to modify this value.')) . "'") . ");\">$val"; echo "<td id='$id' data-text='" . ($long ? 2 : ($text ? 1 : 0)) . "'"
. ($editable ? "" : " data-warning='" . h(lang('Use edit link to modify this value.')) . "'")
. ">$val</td>"
;
} }
} }
} }
@@ -434,103 +461,122 @@ if (!$columns && support("table")) {
echo "</table>\n"; echo "</table>\n";
} }
if (($rows || $page) && !is_ajax()) { if (!is_ajax()) {
$exact_count = true; if ($rows || $page) {
if ($_GET["page"] != "last") { $exact_count = true;
if (!+$limit) { if ($_GET["page"] != "last") {
$found_rows = count($rows); if ($limit == "" || (count($rows) < $limit && ($rows || !$page))) {
} elseif ($jush != "sql" || !$is_group) { $found_rows = ($page ? $page * $limit : 0) + count($rows);
$found_rows = ($is_group ? false : found_rows($table_status, $where)); } elseif ($jush != "sql" || !$is_group) {
if ($found_rows < max(1e4, 2 * ($page + 1) * $limit)) { $found_rows = ($is_group ? false : found_rows($table_status, $where));
// slow with big tables if ($found_rows < max(1e4, 2 * ($page + 1) * $limit)) {
$found_rows = reset(slow_query(count_rows($TABLE, $where, $is_group, $group))); // slow with big tables
} else { $found_rows = reset(slow_query(count_rows($TABLE, $where, $is_group, $group)));
$exact_count = false; } else {
$exact_count = false;
}
} }
} }
}
if (+$limit && ($found_rows === false || $found_rows > $limit || $page)) { $pagination = ($limit != "" && ($found_rows === false || $found_rows > $limit || $page));
echo "<p class='pages'>"; if ($pagination) {
// display first, previous 4, next 4 and last page
$max_page = ($found_rows === false
? $page + (count($rows) >= $limit ? 2 : 1)
: floor(($found_rows - 1) / $limit)
);
if ($jush != "simpledb") {
echo '<a href="' . h(remove_from_uri("page")) . "\" onclick=\"pageClick(this.href, +prompt('" . lang('Page') . "', '" . ($page + 1) . "'), event); return false;\">" . lang('Page') . "</a>:";
echo pagination(0, $page) . ($page > 5 ? " ..." : "");
for ($i = max(1, $page - 4); $i < min($max_page, $page + 5); $i++) {
echo pagination($i, $page);
}
if ($max_page > 0) {
echo ($page + 5 < $max_page ? " ..." : "");
echo ($exact_count && $found_rows !== false
? pagination($max_page, $page)
: " <a href='" . h(remove_from_uri("page") . "&page=last") . "' title='~$max_page'>" . lang('last') . "</a>"
);
}
echo (($found_rows === false ? count($rows) + 1 : $found_rows - $page * $limit) > $limit echo (($found_rows === false ? count($rows) + 1 : $found_rows - $page * $limit) > $limit
? ' <a href="' . h(remove_from_uri("page") . "&page=" . ($page + 1)) . '" onclick="return !selectLoadMore(this, ' . (+$limit) . ', \'' . lang('Loading') . '...\');" class="loadmore">' . lang('Load more data') . '</a>' ? '<p><a href="' . h(remove_from_uri("page") . "&page=" . ($page + 1)) . '" class="loadmore">' . lang('Load more data') . '</a>'
. script("qsl('a').onclick = partial(selectLoadMore, " . (+$limit) . ", '" . lang('Loading') . "...');", "")
: '' : ''
); );
} else { echo "\n";
echo lang('Page') . ":";
echo pagination(0, $page) . ($page > 1 ? " ..." : "");
echo ($page ? pagination($page, $page) : "");
echo ($max_page > $page ? pagination($page + 1, $page) . ($max_page > $page + 1 ? " ..." : "") : "");
} }
} }
echo "<div class='footer'><div>\n";
if ($rows || $page) {
if ($pagination) {
// display first, previous 4, next 4 and last page
$max_page = ($found_rows === false
? $page + (count($rows) >= $limit ? 2 : 1)
: floor(($found_rows - 1) / $limit)
);
echo "<fieldset>";
if ($jush != "simpledb") {
echo "<legend><a href='" . h(remove_from_uri("page")) . "'>" . lang('Page') . "</a></legend>";
echo script("qsl('a').onclick = function () { pageClick(this.href, +prompt('" . lang('Page') . "', '" . ($page + 1) . "')); return false; };");
echo pagination(0, $page) . ($page > 5 ? " ..." : "");
for ($i = max(1, $page - 4); $i < min($max_page, $page + 5); $i++) {
echo pagination($i, $page);
}
if ($max_page > 0) {
echo ($page + 5 < $max_page ? " ..." : "");
echo ($exact_count && $found_rows !== false
? pagination($max_page, $page)
: " <a href='" . h(remove_from_uri("page") . "&page=last") . "' title='~$max_page'>" . lang('last') . "</a>"
);
}
} else {
echo "<legend>" . lang('Page') . "</legend>";
echo pagination(0, $page) . ($page > 1 ? " ..." : "");
echo ($page ? pagination($page, $page) : "");
echo ($max_page > $page ? pagination($page + 1, $page) . ($max_page > $page + 1 ? " ..." : "") : "");
}
echo "</fieldset>\n";
}
echo "<fieldset>";
echo "<legend>" . lang('Whole result') . "</legend>";
$display_rows = ($exact_count ? "" : "~ ") . $found_rows;
echo checkbox("all", 1, 0, ($found_rows !== false ? ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) : ""), "var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$display_rows' : checked); selectCount('selected2', this.checked || !checked ? '$display_rows' : checked);") . "\n";
echo "</fieldset>\n";
echo "<p class='count'>\n"; if ($adminer->selectCommandPrint()) {
echo ($found_rows !== false ? "(" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ") " : ""); ?>
$display_rows = ($exact_count ? "" : "~ ") . $found_rows;
echo checkbox("all", 1, 0, lang('whole result'), "var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$display_rows' : checked); selectCount('selected2', this.checked || !checked ? '$display_rows' : checked);") . "\n";
if ($adminer->selectCommandPrint()) {
?>
<fieldset<?php echo ($_GET["modify"] ? '' : ' class="jsonly"'); ?>><legend><?php echo lang('Modify'); ?></legend><div> <fieldset<?php echo ($_GET["modify"] ? '' : ' class="jsonly"'); ?>><legend><?php echo lang('Modify'); ?></legend><div>
<input type="submit" value="<?php echo lang('Save'); ?>"<?php echo ($_GET["modify"] ? '' : ' title="' . lang('Ctrl+click on a value to modify it.') . '"'); ?>> <input type="submit" value="<?php echo lang('Save'); ?>"<?php echo ($_GET["modify"] ? '' : ' title="' . lang('Ctrl+click on a value to modify it.') . '"'); ?>>
</div></fieldset> </div></fieldset>
<fieldset><legend><?php echo lang('Selected'); ?> <span id="selected"></span></legend><div> <fieldset><legend><?php echo lang('Selected'); ?> <span id="selected"></span></legend><div>
<input type="submit" name="edit" value="<?php echo lang('Edit'); ?>"> <input type="submit" name="edit" value="<?php echo lang('Edit'); ?>">
<input type="submit" name="clone" value="<?php echo lang('Clone'); ?>"> <input type="submit" name="clone" value="<?php echo lang('Clone'); ?>">
<input type="submit" name="delete" value="<?php echo lang('Delete'); ?>"<?php echo confirm(); ?>> <input type="submit" name="delete" value="<?php echo lang('Delete'); ?>"><?php echo confirm(); ?>
</div></fieldset> </div></fieldset>
<?php <?php
}
$format = $adminer->dumpFormat();
foreach ((array) $_GET["columns"] as $column) {
if ($column["fun"]) {
unset($format['sql']);
break;
} }
}
if ($format) { $format = $adminer->dumpFormat();
print_fieldset("export", lang('Export') . " <span id='selected2'></span>"); foreach ((array) $_GET["columns"] as $column) {
$output = $adminer->dumpOutput(); if ($column["fun"]) {
echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : ""); unset($format['sql']);
echo html_select("format", $format, $adminer_import["format"]); break;
echo " <input type='submit' name='export' value='" . lang('Export') . "'>\n"; }
echo "</div></fieldset>\n"; }
if ($format) {
print_fieldset("export", lang('Export') . " <span id='selected2'></span>");
$output = $adminer->dumpOutput();
echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : "");
echo html_select("format", $format, $adminer_import["format"]);
echo " <input type='submit' name='export' value='" . lang('Export') . "'>\n";
echo "</div></fieldset>\n";
}
$adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns);
} }
echo (!$group && $select ? "" : "<script type='text/javascript'>tableCheck();</script>\n"); echo "</div></div>\n";
if ($adminer->selectImportPrint()) {
echo "<div>";
echo "<a href='#import'>" . lang('Import') . "</a>";
echo script("qsl('a').onclick = partial(toggle, 'import');", "");
echo "<span id='import' class='hidden'>: ";
echo "<input type='file' name='csv_file'> ";
echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_import["format"], 1); // 1 - select
echo " <input type='submit' name='import' value='" . lang('Import') . "'>";
echo "</span>";
echo "</div>";
}
echo "<input type='hidden' name='token' value='$token'>\n";
echo "</form>\n";
echo (!$group && $select ? "" : script("tableCheck();"));
} }
if ($adminer->selectImportPrint()) {
print_fieldset("import", lang('Import'), !$rows);
echo "<input type='file' name='csv_file'> ";
echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_import["format"], 1); // 1 - select
echo " <input type='submit' name='import' value='" . lang('Import') . "'>";
echo "</div></fieldset>\n";
}
$adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns);
echo "<p><input type='hidden' name='token' value='$token'></p>\n";
echo "</form>\n";
} }
} }

View File

@@ -28,7 +28,7 @@ if (!$row) {
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<?php <?php
if ($SEQUENCE != "") { if ($SEQUENCE != "") {
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n"; echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', $SEQUENCE)) . "\n";
} }
?> ?>
<input type="hidden" name="token" value="<?php echo $token; ?>"> <input type="hidden" name="token" value="<?php echo $token; ?>">

View File

@@ -21,9 +21,10 @@ if (!$error && $_POST) {
if (!isset($_GET["import"])) { if (!isset($_GET["import"])) {
$query = $_POST["query"]; $query = $_POST["query"];
} elseif ($_POST["webfile"]) { } elseif ($_POST["webfile"]) {
$fp = @fopen((file_exists("adminer.sql") $sql_file_path = $adminer->importServerPath();
? "adminer.sql" $fp = @fopen((file_exists($sql_file_path)
: "compress.zlib://adminer.sql.gz" ? $sql_file_path
: "compress.zlib://$sql_file_path.gz"
), "rb"); ), "rb");
$query = ($fp ? fread($fp, 1e6) : false); $query = ($fp ? fread($fp, 1e6) : false);
} else { } else {
@@ -45,7 +46,7 @@ if (!$error && $_POST) {
} }
} }
$space = "(?:\\s|/\\*.*\\*/|(?:#|-- )[^\n]*\n|--\r?\n)"; $space = "(?:\\s|/\\*[\s\S]*?\\*/|(?:#|-- )[^\n]*\n?|--\r?\n)";
$delimiter = ";"; $delimiter = ";";
$offset = 0; $offset = 0;
$empty = true; $empty = true;
@@ -55,7 +56,6 @@ if (!$error && $_POST) {
} }
$commands = 0; $commands = 0;
$errors = array(); $errors = array();
$line = 0;
$parse = '[\'"' . ($jush == "sql" ? '`#' : ($jush == "sqlite" ? '`[' : ($jush == "mssql" ? '[' : ''))) . ']|/\\*|-- |$' . ($jush == "pgsql" ? '|\\$[^$]*\\$' : ''); $parse = '[\'"' . ($jush == "sql" ? '`#' : ($jush == "sqlite" ? '`[' : ($jush == "mssql" ? '[' : ''))) . ']|/\\*|-- |$' . ($jush == "pgsql" ? '|\\$[^$]*\\$' : '');
$total_start = microtime(true); $total_start = microtime(true);
parse_str($_COOKIE["adminer_export"], $adminer_export); parse_str($_COOKIE["adminer_export"], $adminer_export);
@@ -63,7 +63,7 @@ if (!$error && $_POST) {
unset($dump_format["sql"]); unset($dump_format["sql"]);
while ($query != "") { while ($query != "") {
if (!$offset && preg_match("~^$space*DELIMITER\\s+(\\S+)~i", $query, $match)) { if (!$offset && preg_match("~^$space*+DELIMITER\\s+(\\S+)~i", $query, $match)) {
$delimiter = $match[1]; $delimiter = $match[1];
$query = substr($query, strlen($match[0])); $query = substr($query, strlen($match[0]));
} else { } else {
@@ -94,74 +94,93 @@ if (!$error && $_POST) {
$empty = false; $empty = false;
$q = substr($query, 0, $pos); $q = substr($query, 0, $pos);
$commands++; $commands++;
$print = "<pre id='sql-$commands'><code class='jush-$jush'>" . shorten_utf8(trim($q), 1000) . "</code></pre>\n"; $print = "<pre id='sql-$commands'><code class='jush-$jush'>" . $adminer->sqlCommandQuery($q) . "</code></pre>\n";
if (!$_POST["only_errors"]) { if ($jush == "sqlite" && preg_match("~^$space*+ATTACH\\b~i", $q, $match)) {
// PHP doesn't support setting SQLITE_LIMIT_ATTACHED
echo $print; echo $print;
ob_flush(); echo "<p class='error'>" . lang('ATTACH queries are not supported.') . "\n";
flush(); // can take a long time - show the running query $errors[] = " <a href='#sql-$commands'>$commands</a>";
} if ($_POST["error_stops"]) {
$start = microtime(true); break;
//! don't allow changing of character_set_results, convert encoding of displayed query }
if ($connection->multi_query($q) && is_object($connection2) && preg_match("~^$space*USE\\b~isU", $q)) { } else {
$connection2->query($q); if (!$_POST["only_errors"]) {
} echo $print;
ob_flush();
do { flush(); // can take a long time - show the running query
$result = $connection->store_result(); }
$time = " <span class='time'>(" . format_time($start) . ")</span>" $start = microtime(true);
. (strlen($q) < 1000 ? " <a href='" . h(ME) . "sql=" . urlencode(trim($q)) . "'>" . lang('Edit') . "</a>" : "") // 1000 - maximum length of encoded URL in IE is 2083 characters //! don't allow changing of character_set_results, convert encoding of displayed query
; if ($connection->multi_query($q) && is_object($connection2) && preg_match("~^$space*+USE\\b~i", $q)) {
$connection2->query($q);
if ($connection->error) {
echo ($_POST["only_errors"] ? $print : "");
echo "<p class='error'>" . lang('Error in query') . ($connection->errno ? " ($connection->errno)" : "") . ": " . error() . "\n";
$errors[] = " <a href='#sql-$commands'>$commands</a>";
if ($_POST["error_stops"]) {
break 2;
}
} elseif (is_object($result)) {
$limit = $_POST["limit"];
$orgtables = select($result, $connection2, array(), $limit);
if (!$_POST["only_errors"]) {
echo "<form action='' method='post'>\n";
$num_rows = $result->num_rows;
echo "<p>" . ($num_rows ? ($limit && $num_rows > $limit ? lang('%d / ', $limit) : "") . lang('%d row(s)', $num_rows) : "");
echo $time;
$id = "export-$commands";
$export = ", <a href='#$id' onclick=\"return !toggle('$id');\">" . lang('Export') . "</a><span id='$id' class='hidden'>: "
. html_select("output", $adminer->dumpOutput(), $adminer_export["output"]) . " "
. html_select("format", $dump_format, $adminer_export["format"])
. "<input type='hidden' name='query' value='" . h($q) . "'>"
. " <input type='submit' name='export' value='" . lang('Export') . "'><input type='hidden' name='token' value='$token'></span>\n"
;
if ($connection2 && preg_match("~^($space|\\()*SELECT\\b~isU", $q) && ($explain = explain($connection2, $q))) {
$id = "explain-$commands";
echo ", <a href='#$id' onclick=\"return !toggle('$id');\">EXPLAIN</a>$export";
echo "<div id='$id' class='hidden'>\n";
select($explain, $connection2, $orgtables);
echo "</div>\n";
} else {
echo $export;
}
echo "</form>\n";
}
} else {
if (preg_match("~^$space*(CREATE|DROP|ALTER)$space+(DATABASE|SCHEMA)\\b~isU", $q)) {
restart_session();
set_session("dbs", null); // clear cache
stop_session();
}
if (!$_POST["only_errors"]) {
echo "<p class='message' title='" . h($connection->info) . "'>" . lang('Query executed OK, %d row(s) affected.', $connection->affected_rows) . "$time\n";
}
} }
$start = microtime(true); do {
} while ($connection->next_result()); $result = $connection->store_result();
if ($connection->error) {
echo ($_POST["only_errors"] ? $print : "");
echo "<p class='error'>" . lang('Error in query') . ($connection->errno ? " ($connection->errno)" : "") . ": " . error() . "\n";
$errors[] = " <a href='#sql-$commands'>$commands</a>";
if ($_POST["error_stops"]) {
break 2;
}
} else {
$time = " <span class='time'>(" . format_time($start) . ")</span>"
. (strlen($q) < 1000 ? " <a href='" . h(ME) . "sql=" . urlencode(trim($q)) . "'>" . lang('Edit') . "</a>" : "") // 1000 - maximum length of encoded URL in IE is 2083 characters
;
$affected = $connection->affected_rows; // getting warnigns overwrites this
$warnings = ($_POST["only_errors"] ? "" : $driver->warnings());
$warnings_id = "warnings-$commands";
if ($warnings) {
$time .= ", <a href='#$warnings_id'>" . lang('Warnings') . "</a>" . script("qsl('a').onclick = partial(toggle, '$warnings_id');", "");
}
$explain = null;
$explain_id = "explain-$commands";
if (is_object($result)) {
$limit = $_POST["limit"];
$orgtables = select($result, $connection2, array(), $limit);
if (!$_POST["only_errors"]) {
echo "<form action='' method='post'>\n";
$num_rows = $result->num_rows;
echo "<p>" . ($num_rows ? ($limit && $num_rows > $limit ? lang('%d / ', $limit) : "") . lang('%d row(s)', $num_rows) : "");
echo $time;
if ($connection2 && preg_match("~^($space|\\()*+SELECT\\b~i", $q) && ($explain = explain($connection2, $q))) {
echo ", <a href='#$explain_id'>Explain</a>" . script("qsl('a').onclick = partial(toggle, '$explain_id');", "");
}
$id = "export-$commands";
echo ", <a href='#$id'>" . lang('Export') . "</a>" . script("qsl('a').onclick = partial(toggle, '$id');", "") . "<span id='$id' class='hidden'>: "
. html_select("output", $adminer->dumpOutput(), $adminer_export["output"]) . " "
. html_select("format", $dump_format, $adminer_export["format"])
. "<input type='hidden' name='query' value='" . h($q) . "'>"
. " <input type='submit' name='export' value='" . lang('Export') . "'><input type='hidden' name='token' value='$token'></span>\n"
. "</form>\n"
;
}
} else {
if (preg_match("~^$space*+(CREATE|DROP|ALTER)$space++(DATABASE|SCHEMA)\\b~i", $q)) {
restart_session();
set_session("dbs", null); // clear cache
stop_session();
}
if (!$_POST["only_errors"]) {
echo "<p class='message' title='" . h($connection->info) . "'>" . lang('Query executed OK, %d row(s) affected.', $affected) . "$time\n";
}
}
echo ($warnings ? "<div id='$warnings_id' class='hidden'>\n$warnings</div>\n" : "");
if ($explain) {
echo "<div id='$explain_id' class='hidden'>\n";
select($explain, $connection2, $orgtables);
echo "</div>\n";
}
}
$start = microtime(true);
} while ($connection->next_result());
}
$line += substr_count($q.$found, "\n");
$query = substr($query, $offset); $query = substr($query, $offset);
$offset = 0; $offset = 0;
} }
@@ -200,7 +219,7 @@ if (!isset($_GET["import"])) {
} }
echo "<p>"; echo "<p>";
textarea("query", $q, 20); textarea("query", $q, 20);
echo ($_POST ? "" : "<script type='text/javascript'>focus(document.getElementsByTagName('textarea')[0]);</script>\n"); echo ($_POST ? "" : script("qs('textarea').focus();"));
echo "<p>$execute\n"; echo "<p>$execute\n";
echo lang('Limit rows') . ": <input type='number' name='limit' class='size' value='" . h($_POST ? $_POST["limit"] : $_GET["limit"]) . "'>\n"; echo lang('Limit rows') . ": <input type='number' name='limit' class='size' value='" . h($_POST ? $_POST["limit"] : $_GET["limit"]) . "'>\n";
@@ -212,7 +231,7 @@ if (!isset($_GET["import"])) {
); );
echo "</div></fieldset>\n"; echo "</div></fieldset>\n";
echo "<fieldset><legend>" . lang('From server') . "</legend><div>"; echo "<fieldset><legend>" . lang('From server') . "</legend><div>";
echo lang('Webserver file %s', "<code>adminer.sql" . (extension_loaded("zlib") ? "[.gz]" : "") . "</code>"); echo lang('Webserver file %s', "<code>" . h($adminer->importServerPath()) . (extension_loaded("zlib") ? "[.gz]" : "") . "</code>");
echo ' <input type="submit" name="webfile" value="' . lang('Run file') . '">'; echo ' <input type="submit" name="webfile" value="' . lang('Run file') . '">';
echo "</div></fieldset>\n"; echo "</div></fieldset>\n";
echo "<p>"; echo "<p>";

8
adminer/sqlite.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
function adminer_object() {
include_once "../plugins/plugin.php";
include_once "../plugins/login-sqlite.php";
return new AdminerPlugin(array(new AdminerLoginSqlite("admin", password_hash("", PASSWORD_DEFAULT))));
}
include "./index.php";

View File

@@ -10,11 +10,11 @@ h2 { font-size: 150%; margin: 0 0 20px -18px; padding: .8em 1em; border-bottom:
h3 { font-weight: normal; font-size: 130%; margin: 1em 0 0; } h3 { font-weight: normal; font-size: 130%; margin: 1em 0 0; }
form { margin: 0; } form { margin: 0; }
td table { width: 100%; margin: 0; } td table { width: 100%; margin: 0; }
table { margin: 1em 20px 0 0; border: 0; border-top: 1px solid #999; border-left: 1px solid #999; font-size: 90%; } table { margin: 1em 20px 0 0; border-collapse: collapse; font-size: 90%; }
td, th { border: 0; border-right: 1px solid #999; border-bottom: 1px solid #999; padding: .2em .3em; } td, th { border: 1px solid #999; padding: .2em .3em; }
th { background: #eee; text-align: left; } th { background: #eee; text-align: left; }
thead th { text-align: center; padding: .2em .5em; } thead th { text-align: center; padding: .2em .5em; }
thead td, thead th { background: #ddf; } thead td, thead th { background: #ddf; } /* position: sticky; causes Firefox to lose borders */
fieldset { display: inline; vertical-align: top; padding: .5em .8em; margin: .8em .5em 0 0; border: 1px solid #999; } fieldset { display: inline; vertical-align: top; padding: .5em .8em; margin: .8em .5em 0 0; border: 1px solid #999; }
p { margin: .8em 20px 0 0; } p { margin: .8em 20px 0 0; }
img { vertical-align: middle; border: 0; } img { vertical-align: middle; border: 0; }
@@ -23,18 +23,21 @@ code { background: #eee; }
tbody tr:hover td, tbody tr:hover th { background: #eee; } tbody tr:hover td, tbody tr:hover th { background: #eee; }
pre { margin: 1em 0 0; } pre { margin: 1em 0 0; }
pre, textarea { font: 100%/1.25 monospace; } pre, textarea { font: 100%/1.25 monospace; }
input[type=image] { vertical-align: middle; } input { vertical-align: middle; }
input.default { box-shadow: 1px 1px 1px #777; } input.default { box-shadow: 1px 1px 1px #777; }
input.required { box-shadow: 1px 1px 1px red; } input.required { box-shadow: 1px 1px 1px red; }
input.maxlength { box-shadow: 1px 1px 1px red; }
input.wayoff { left: -1000px; position: absolute; }
.block { display: block; } .block { display: block; }
.version { color: #777; font-size: 67%; } .version { color: #777; font-size: 67%; }
.js .hidden, .nojs .jsonly { display: none; } .js .hidden, .nojs .jsonly { display: none; }
.js .column { position: absolute; background: #ddf; padding: .27em 1ex .3em 0; margin-top: -.27em; } .js .column { position: absolute; background: #ddf; padding: .27em 1ex .3em 0; margin-top: -.27em; }
.nowrap td, .nowrap th, td.nowrap { white-space: pre; } .nowrap td, .nowrap th, td.nowrap, p.nowrap { white-space: pre; }
.wrap td { white-space: normal; } .wrap td { white-space: normal; }
.error { color: red; background: #fee; } .error { color: red; background: #fee; }
.error b { background: #fff; font-weight: normal; } .error b { background: #fff; font-weight: normal; }
.message { color: green; background: #efe; } .message { color: green; background: #efe; }
.message table { color: #000; background: #fff; }
.error, .message { padding: .5em .8em; margin: 1em 20px 0 0; } .error, .message { padding: .5em .8em; margin: 1em 20px 0 0; }
.char { color: #007F00; } .char { color: #007F00; }
.date { color: #7F007F; } .date { color: #7F007F; }
@@ -55,12 +58,16 @@ input.required { box-shadow: 1px 1px 1px red; }
.icon:hover { background-color: red; } .icon:hover { background-color: red; }
.size { width: 6ex; } .size { width: 6ex; }
.help { cursor: help; } .help { cursor: help; }
.pages { position: fixed; bottom: 0; left: 21em; padding: 5px; background: #ddf; border: 1px solid #999; } .footer { position: sticky; bottom: 0; margin-right: -20px; border-top: 20px solid rgba(255, 255, 255, .7); border-image: linear-gradient(rgba(255, 255, 255, .2), #fff) 100% 0; }
.footer > div { background: #fff; padding: 0 0 .5em; }
.footer fieldset { margin-top: 0; }
.links a { white-space: nowrap; margin-right: 20px; } .links a { white-space: nowrap; margin-right: 20px; }
.logout { margin-top: .5em; position: absolute; top: 0; right: 0; } .logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
.loadmore { margin-left: 1ex; } .loadmore { margin-left: 1ex; }
/* .edit used in designs */
#menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; } #menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; }
#menu p { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; } #menu p, #tables { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; }
#tables li{ list-style: none; }
#dbs { overflow: hidden; } #dbs { overflow: hidden; }
#logins, #tables { white-space: nowrap; overflow: auto; } #logins, #tables { white-space: nowrap; overflow: auto; }
#logins a, #tables a, #tables span { background: #fff; } #logins a, #tables a, #tables span { background: #fff; }
@@ -79,6 +86,8 @@ input.required { box-shadow: 1px 1px 1px red; }
.rtl .logout { left: 0; right: auto; } .rtl .logout { left: 0; right: auto; }
.rtl #content { margin: 2em 21em 0 0; padding: 10px 0 20px 20px; } .rtl #content { margin: 2em 21em 0 0; padding: 10px 0 20px 20px; }
.rtl #breadcrumb { left: auto; right: 21em; margin: 0 -18px 0 0; } .rtl #breadcrumb { left: auto; right: 21em; margin: 0 -18px 0 0; }
.rtl .pages { left: auto; right: 21em; }
.rtl input.wayoff { left: auto; right: -1000px; }
.rtl #lang, .rtl #menu { left: auto; right: 0; } .rtl #lang, .rtl #menu { left: auto; right: 0; }
@media all and (max-device-width: 880px) { @media all and (max-device-width: 880px) {
@@ -87,6 +96,7 @@ input.required { box-shadow: 1px 1px 1px red; }
#content { margin-left: 10px; } #content { margin-left: 10px; }
#lang { position: static; border-top: 1px solid #999; } #lang { position: static; border-top: 1px solid #999; }
#breadcrumb { left: auto; } #breadcrumb { left: auto; }
.rtl .pages { right: auto; }
.rtl #content { margin-right: 10px; } .rtl #content { margin-right: 10px; }
.rtl #breadcrumb { right: auto; } .rtl #breadcrumb { right: auto; }
} }

View File

@@ -2,18 +2,25 @@
/** Load syntax highlighting /** Load syntax highlighting
* @param string first three characters of database system version * @param string first three characters of database system version
* @param [boolean]
*/ */
function bodyLoad(version) { function bodyLoad(version, maria) {
if (window.jush) { if (window.jush) {
jush.create_links = ' target="_blank" rel="noreferrer"'; jush.create_links = ' target="_blank" rel="noreferrer noopener"';
if (version) { if (version) {
for (var key in jush.urls) { for (var key in jush.urls) {
var obj = jush.urls; var obj = jush.urls;
if (typeof obj[key] != 'string') { if (typeof obj[key] != 'string') {
obj = obj[key]; obj = obj[key];
key = 0; key = 0;
if (maria) {
for (var i = 1; i < obj.length; i++) {
obj[i] = obj[i].replace(/\.html/, '/');
}
}
} }
obj[key] = obj[key] obj[key] = obj[key]
.replace(/dev\.mysql\.com\/doc\/mysql\/en\//, (maria ? 'mariadb.com/kb/en/library/' : '$&')) // MariaDB
.replace(/\/doc\/mysql/, '/doc/refman/' + version) // MySQL .replace(/\/doc\/mysql/, '/doc/refman/' + version) // MySQL
.replace(/\/docs\/current/, '/docs/' + version) // PostgreSQL .replace(/\/docs\/current/, '/docs/' + version) // PostgreSQL
; ;
@@ -23,7 +30,7 @@ function bodyLoad(version) {
jush.custom_links = jushLinks; jush.custom_links = jushLinks;
} }
jush.highlight_tag('code', 0); jush.highlight_tag('code', 0);
var tags = document.getElementsByTagName('textarea'); var tags = qsa('textarea', document);
for (var i = 0; i < tags.length; i++) { for (var i = 0; i < tags.length; i++) {
if (/(^|\s)jush-/.test(tags[i].className)) { if (/(^|\s)jush-/.test(tags[i].className)) {
var pre = jush.textarea(tags[i]); var pre = jush.textarea(tags[i]);
@@ -60,15 +67,12 @@ function typePassword(el, disable) {
} }
} }
/** Hide or show some login rows for selected driver /** Install toggle handler
* @param HTMLSelectElement
*/ */
function loginDriver(driver) { function messagesPrint() {
var trs = parentTag(driver, 'table').rows; var els = qsa('.toggle', document);
for (var i=1; i < trs.length - 1; i++) { for (var i = 0; i < els.length; i++) {
var disabled = /sqlite/.test(driver.value); els[i].onclick = partial(toggle, els[i].getAttribute('href').substr(1));
alterClass(trs[i], 'hidden', disabled);
trs[i].getElementsByTagName('input')[0].disabled = disabled;
} }
} }
@@ -79,45 +83,46 @@ var dbPrevious = {};
/** Check if database should be opened to a new window /** Check if database should be opened to a new window
* @param MouseEvent * @param MouseEvent
* @param HTMLSelectElement * @this HTMLSelectElement
*/ */
function dbMouseDown(event, el) { function dbMouseDown(event) {
dbCtrl = isCtrl(event); dbCtrl = isCtrl(event);
if (dbPrevious[el.name] == undefined) { if (dbPrevious[this.name] == undefined) {
dbPrevious[el.name] = el.value; dbPrevious[this.name] = this.value;
} }
} }
/** Load database after selecting it /** Load database after selecting it
* @param HTMLSelectElement * @this HTMLSelectElement
*/ */
function dbChange(el) { function dbChange() {
if (dbCtrl) { if (dbCtrl) {
el.form.target = '_blank'; this.form.target = '_blank';
} }
el.form.submit(); this.form.submit();
el.form.target = ''; this.form.target = '';
if (dbCtrl && dbPrevious[el.name] != undefined) { if (dbCtrl && dbPrevious[this.name] != undefined) {
el.value = dbPrevious[el.name]; this.value = dbPrevious[this.name];
dbPrevious[el.name] = undefined; dbPrevious[this.name] = undefined;
} }
} }
/** Check whether the query will be executed with index /** Check whether the query will be executed with index
* @param HTMLFormElement * @this HTMLElement
*/ */
function selectFieldChange(form) { function selectFieldChange() {
var form = this.form;
var ok = (function () { var ok = (function () {
var inputs = form.getElementsByTagName('input'); var inputs = qsa('input', form);
for (var i=0; i < inputs.length; i++) { for (var i=0; i < inputs.length; i++) {
if (inputs[i].value && /^fulltext/.test(inputs[i].name)) { if (inputs[i].value && /^fulltext/.test(inputs[i].name)) {
return true; return true;
} }
} }
var ok = form.limit.value; var ok = form.limit.value;
var selects = form.getElementsByTagName('select'); var selects = qsa('select', form);
var group = false; var group = false;
var columns = {}; var columns = {};
for (var i=0; i < selects.length; i++) { for (var i=0; i < selects.length; i++) {
@@ -183,15 +188,61 @@ function idfEscape(s) {
return s.replace(/`/, '``'); return s.replace(/`/, '``');
} }
/** Detect foreign key
* @param HTMLInputElement
/** Handle clicks on fields editing
* @param MouseEvent
* @return boolean false to cancel action
*/ */
function editingNameChange(field) { function editingClick(event) {
var name = field.name.substr(0, field.name.length - 7); var el = getTarget(event);
var type = formField(field.form, name + '[type]'); if (!isTag(el, 'input')) {
el = parentTag(target, 'label');
el = el && qs('input', el);
}
if (el) {
var name = el.name;
if (/^add\[/.test(name)) {
editingAddRow.call(el, 1);
} else if (/^up\[/.test(name)) {
editingMoveRow.call(el, 1);
} else if (/^down\[/.test(name)) {
editingMoveRow.call(el);
} else if (/^drop_col\[/.test(name)) {
editingRemoveRow.call(el, 'fields\$1[field]');
} else {
if (name == 'auto_increment_col') {
var field = el.form['fields[' + el.value + '][field]'];
if (!field.value) {
field.value = 'id';
field.oninput();
}
}
return;
}
return false;
}
}
/** Handle input on fields editing
* @param InputEvent
*/
function editingInput(event) {
var el = getTarget(event);
if (/\[default\]$/.test(el.name)) {
el.previousSibling.checked = true;
}
}
/** Detect foreign key
* @this HTMLInputElement
*/
function editingNameChange() {
var name = this.name.substr(0, this.name.length - 7);
var type = formField(this.form, name + '[type]');
var opts = type.options; var opts = type.options;
var candidate; // don't select anything with ambiguous match (like column `id`) var candidate; // don't select anything with ambiguous match (like column `id`)
var val = field.value; var val = this.value;
for (var i = opts.length; i--; ) { for (var i = opts.length; i--; ) {
var match = /(.+)`(.+)/.exec(opts[i].value); var match = /(.+)`(.+)/.exec(opts[i].value);
if (!match) { // common type if (!match) { // common type
@@ -221,23 +272,23 @@ function editingNameChange(field) {
} }
/** Add table row for next field /** Add table row for next field
* @param HTMLInputElement
* @param boolean * @param boolean
* @return boolean * @return boolean false
* @this HTMLInputElement
*/ */
function editingAddRow(button, focus) { function editingAddRow(focus) {
var match = /(\d+)(\.\d+)?/.exec(button.name); var match = /(\d+)(\.\d+)?/.exec(this.name);
var x = match[0] + (match[2] ? added.substr(match[2].length) : added) + '1'; var x = match[0] + (match[2] ? added.substr(match[2].length) : added) + '1';
var row = parentTag(button, 'tr'); var row = parentTag(this, 'tr');
var row2 = cloneNode(row); var row2 = cloneNode(row);
var tags = row.getElementsByTagName('select'); var tags = qsa('select', row);
var tags2 = row2.getElementsByTagName('select'); var tags2 = qsa('select', row2);
for (var i=0; i < tags.length; i++) { for (var i=0; i < tags.length; i++) {
tags2[i].name = tags[i].name.replace(/[0-9.]+/, x); tags2[i].name = tags[i].name.replace(/[0-9.]+/, x);
tags2[i].selectedIndex = tags[i].selectedIndex; tags2[i].selectedIndex = tags[i].selectedIndex;
} }
tags = row.getElementsByTagName('input'); tags = qsa('input', row);
tags2 = row2.getElementsByTagName('input'); tags2 = qsa('input', row2);
var input = tags2[0]; // IE loose tags2 after insertBefore() var input = tags2[0]; // IE loose tags2 after insertBefore()
for (var i=0; i < tags.length; i++) { for (var i=0; i < tags.length; i++) {
if (tags[i].name == 'auto_increment_col') { if (tags[i].name == 'auto_increment_col') {
@@ -252,43 +303,52 @@ function editingAddRow(button, focus) {
tags2[i].checked = false; tags2[i].checked = false;
} }
} }
tags[0].onchange = function () { tags[0].oninput = editingNameChange;
editingNameChange(tags[0]);
};
tags[0].onkeyup = function () {
};
row.parentNode.insertBefore(row2, row.nextSibling); row.parentNode.insertBefore(row2, row.nextSibling);
if (focus) { if (focus) {
input.onchange = function () { input.oninput = editingNameChange;
editingNameChange(input);
};
input.onkeyup = function () {
};
input.focus(); input.focus();
} }
added += '0'; added += '0';
rowCount++; rowCount++;
return true; return false;
} }
/** Remove table row for field /** Remove table row for field
* @param HTMLInputElement * @param string regular expression replacement
* @param string * @return boolean false
* @return boolean * @this HTMLInputElement
*/ */
function editingRemoveRow(button, name) { function editingRemoveRow(name) {
var field = formField(button.form, button.name.replace(/[^\[]+(.+)/, name)); var field = formField(this.form, this.name.replace(/[^\[]+(.+)/, name));
field.parentNode.removeChild(field); field.parentNode.removeChild(field);
parentTag(button, 'tr').style.display = 'none'; parentTag(this, 'tr').style.display = 'none';
return true; return false;
}
/** Move table row for field
* @param [boolean]
* @return boolean false for success
* @this HTMLInputElement
*/
function editingMoveRow(up){
var row = parentTag(this, 'tr');
if (!('nextElementSibling' in row)) {
return true;
}
row.parentNode.insertBefore(row, up
? row.previousElementSibling
: row.nextElementSibling ? row.nextElementSibling.nextElementSibling : row.parentNode.firstChild);
return false;
} }
var lastType = ''; var lastType = '';
/** Clear length and hide collation or unsigned /** Clear length and hide collation or unsigned
* @param HTMLSelectElement * @this HTMLSelectElement
*/ */
function editingTypeChange(type) { function editingTypeChange() {
var type = this;
var name = type.name.substr(0, type.name.length - 6); var name = type.name.substr(0, type.name.length - 6);
var text = selectValue(type); var text = selectValue(type);
for (var i=0; i < type.form.elements.length; i++) { for (var i=0; i < type.form.elements.length; i++) {
@@ -300,7 +360,7 @@ function editingTypeChange(type) {
)) { )) {
el.value = ''; el.value = '';
} }
el.onchange.apply(el); el.oninput.apply(el);
} }
if (lastType == 'timestamp' && el.name == name + '[has_default]' && /timestamp/i.test(formField(type.form, name + '[default]').value)) { if (lastType == 'timestamp' && el.name == name + '[has_default]' && /timestamp/i.test(formField(type.form, name + '[default]').value)) {
el.checked = false; el.checked = false;
@@ -309,7 +369,7 @@ function editingTypeChange(type) {
alterClass(el, 'hidden', !/(char|text|enum|set)$/.test(text)); alterClass(el, 'hidden', !/(char|text|enum|set)$/.test(text));
} }
if (el.name == name + '[unsigned]') { if (el.name == name + '[unsigned]') {
alterClass(el, 'hidden', !/((^|[^o])int|float|double|decimal)$/.test(text)); alterClass(el, 'hidden', !/(^|[^o])int(?!er)|numeric|real|float|double|decimal|money/.test(text));
} }
if (el.name == name + '[on_update]') { if (el.name == name + '[on_update]') {
alterClass(el, 'hidden', !/timestamp|datetime/.test(text)); // MySQL supports datetime since 5.6.5 alterClass(el, 'hidden', !/timestamp|datetime/.test(text)); // MySQL supports datetime since 5.6.5
@@ -322,37 +382,37 @@ function editingTypeChange(type) {
} }
/** Mark length as required /** Mark length as required
* @param HTMLInputElement * @this HTMLInputElement
*/ */
function editingLengthChange(el) { function editingLengthChange() {
alterClass(el, 'required', !el.value.length && /var(char|binary)$/.test(selectValue(el.parentNode.previousSibling.firstChild))); alterClass(this, 'required', !this.value.length && /var(char|binary)$/.test(selectValue(this.parentNode.previousSibling.firstChild)));
} }
/** Edit enum or set /** Edit enum or set
* @param HTMLInputElement * @this HTMLInputElement
*/ */
function editingLengthFocus(field) { function editingLengthFocus() {
var td = field.parentNode; var td = this.parentNode;
if (/(enum|set)$/.test(selectValue(td.previousSibling.firstChild))) { if (/(enum|set)$/.test(selectValue(td.previousSibling.firstChild))) {
var edit = document.getElementById('enum-edit'); var edit = qs('#enum-edit');
var val = field.value; var val = this.value;
edit.value = (/^'.+'$/.test(val) ? val.substr(1, val.length - 2).replace(/','/g, "\n").replace(/''/g, "'") : val); //! doesn't handle 'a'',''b' correctly edit.value = (/^'.+'$/.test(val) ? val.substr(1, val.length - 2).replace(/','/g, "\n").replace(/''/g, "'") : val); //! doesn't handle 'a'',''b' correctly
td.appendChild(edit); td.appendChild(edit);
field.style.display = 'none'; this.style.display = 'none';
edit.style.display = 'inline'; edit.style.display = 'inline';
edit.focus(); edit.focus();
} }
} }
/** Finish editing of enum or set /** Finish editing of enum or set
* @param HTMLTextAreaElement * @this HTMLTextAreaElement
*/ */
function editingLengthBlur(edit) { function editingLengthBlur() {
var field = edit.parentNode.firstChild; var field = this.parentNode.firstChild;
var val = edit.value; var val = this.value;
field.value = (/^'[^\n]+'$/.test(val) ? val : "'" + val.replace(/\n+$/, '').replace(/'/g, "''").replace(/\n/g, "','") + "'"); field.value = (/^'[^\n]+'$/.test(val) ? val : val && "'" + val.replace(/\n+$/, '').replace(/'/g, "''").replace(/\n/g, "','") + "'");
field.style.display = 'inline'; field.style.display = 'inline';
edit.style.display = 'none'; this.style.display = 'none';
} }
/** Show or hide selected table column /** Show or hide selected table column
@@ -360,9 +420,9 @@ function editingLengthBlur(edit) {
* @param number * @param number
*/ */
function columnShow(checked, column) { function columnShow(checked, column) {
var trs = document.getElementById('edit-fields').getElementsByTagName('tr'); var trs = qsa('tr', qs('#edit-fields'));
for (var i=0; i < trs.length; i++) { for (var i=0; i < trs.length; i++) {
alterClass(trs[i].getElementsByTagName('td')[column], 'hidden', !checked); alterClass(qsa('td', trs[i])[column], 'hidden', !checked);
} }
} }
@@ -370,76 +430,106 @@ function columnShow(checked, column) {
*/ */
function editingHideDefaults() { function editingHideDefaults() {
if (innerWidth < document.documentElement.scrollWidth) { if (innerWidth < document.documentElement.scrollWidth) {
document.getElementById('form')['defaults'].checked = false; qs('#form')['defaults'].checked = false;
columnShow(false, 5);
} }
} }
/** Display partition options /** Display partition options
* @param HTMLSelectElement * @this HTMLSelectElement
*/ */
function partitionByChange(el) { function partitionByChange() {
var partitionTable = /RANGE|LIST/.test(selectValue(el)); var partitionTable = /RANGE|LIST/.test(selectValue(this));
alterClass(el.form['partitions'], 'hidden', partitionTable || !el.selectedIndex); alterClass(this.form['partitions'], 'hidden', partitionTable || !this.selectedIndex);
alterClass(document.getElementById('partition-table'), 'hidden', !partitionTable); alterClass(qs('#partition-table'), 'hidden', !partitionTable);
helpClose(); helpClose();
} }
/** Add next partition row /** Add next partition row
* @param HTMLInputElement * @this HTMLInputElement
*/ */
function partitionNameChange(el) { function partitionNameChange() {
var row = cloneNode(parentTag(el, 'tr')); var row = cloneNode(parentTag(this, 'tr'));
row.firstChild.firstChild.value = ''; row.firstChild.firstChild.value = '';
parentTag(el, 'table').appendChild(row); parentTag(this, 'table').appendChild(row);
el.onchange = function () {}; this.oninput = function () {};
}
/** Show or hide comment fields
* @param [boolean] whether to focus Comment if checked
* @this HTMLInputElement
*/
function editingCommentsClick(focus) {
var comment = this.form['Comment'];
columnShow(this.checked, 6);
alterClass(comment, 'hidden', !this.checked);
if (focus && this.checked) {
comment.focus();
}
}
/** Uncheck 'all' checkbox
* @param MouseEvent
* @this HTMLTableElement
*/
function dumpClick(event) {
var el = parentTag(getTarget(event), 'label');
if (el) {
el = qs('input', el);
var match = /(.+)\[\]$/.exec(el.name);
if (match) {
checkboxClick.call(el, event);
formUncheck('check-' + match[1]);
}
}
} }
/** Add row for foreign key /** Add row for foreign key
* @param HTMLSelectElement * @this HTMLSelectElement
*/ */
function foreignAddRow(field) { function foreignAddRow() {
field.onchange = function () { }; this.onchange = function () { };
var row = cloneNode(parentTag(field, 'tr')); var row = cloneNode(parentTag(this, 'tr'));
var selects = row.getElementsByTagName('select'); var selects = qsa('select', row);
for (var i=0; i < selects.length; i++) { for (var i=0; i < selects.length; i++) {
selects[i].name = selects[i].name.replace(/\]/, '1$&'); selects[i].name = selects[i].name.replace(/\]/, '1$&');
selects[i].selectedIndex = 0; selects[i].selectedIndex = 0;
} }
parentTag(field, 'table').appendChild(row); parentTag(this, 'table').appendChild(row);
} }
/** Add row for indexes /** Add row for indexes
* @param HTMLSelectElement * @this HTMLSelectElement
*/ */
function indexesAddRow(field) { function indexesAddRow() {
field.onchange = function () { }; this.onchange = function () { };
var row = cloneNode(parentTag(field, 'tr')); var row = cloneNode(parentTag(this, 'tr'));
var selects = row.getElementsByTagName('select'); var selects = qsa('select', row);
for (var i=0; i < selects.length; i++) { for (var i=0; i < selects.length; i++) {
selects[i].name = selects[i].name.replace(/indexes\[\d+/, '$&1'); selects[i].name = selects[i].name.replace(/indexes\[\d+/, '$&1');
selects[i].selectedIndex = 0; selects[i].selectedIndex = 0;
} }
var inputs = row.getElementsByTagName('input'); var inputs = qsa('input', row);
for (var i=0; i < inputs.length; i++) { for (var i=0; i < inputs.length; i++) {
inputs[i].name = inputs[i].name.replace(/indexes\[\d+/, '$&1'); inputs[i].name = inputs[i].name.replace(/indexes\[\d+/, '$&1');
inputs[i].value = ''; inputs[i].value = '';
} }
parentTag(field, 'table').appendChild(row); parentTag(this, 'table').appendChild(row);
} }
/** Change column in index /** Change column in index
* @param HTMLSelectElement
* @param string name prefix * @param string name prefix
* @this HTMLSelectElement
*/ */
function indexesChangeColumn(field, prefix) { function indexesChangeColumn(prefix) {
var names = []; var names = [];
for (var tag in { 'select': 1, 'input': 1 }) { for (var tag in { 'select': 1, 'input': 1 }) {
var columns = parentTag(field, 'td').getElementsByTagName(tag); var columns = qsa(tag, parentTag(this, 'td'));
for (var i=0; i < columns.length; i++) { for (var i=0; i < columns.length; i++) {
if (/\[columns\]/.test(columns[i].name)) { if (/\[columns\]/.test(columns[i].name)) {
var value = selectValue(columns[i]); var value = selectValue(columns[i]);
@@ -449,17 +539,15 @@ function indexesChangeColumn(field, prefix) {
} }
} }
} }
field.form[field.name.replace(/\].*/, '][name]')].value = prefix + names.join('_'); this.form[this.name.replace(/\].*/, '][name]')].value = prefix + names.join('_');
} }
/** Add column for index /** Add column for index
* @param HTMLSelectElement
* @param string name prefix * @param string name prefix
* @this HTMLSelectElement
*/ */
function indexesAddColumn(field, prefix) { function indexesAddColumn(prefix) {
field.onchange = function () { var field = this;
indexesChangeColumn(field, prefix);
};
var select = field.form[field.name.replace(/\].*/, '][type]')]; var select = field.form[field.name.replace(/\].*/, '][type]')];
if (!select.selectedIndex) { if (!select.selectedIndex) {
while (selectValue(select) != "INDEX" && select.selectedIndex < select.options.length) { while (selectValue(select) != "INDEX" && select.selectedIndex < select.options.length) {
@@ -468,13 +556,14 @@ function indexesAddColumn(field, prefix) {
select.onchange(); select.onchange();
} }
var column = cloneNode(field.parentNode); var column = cloneNode(field.parentNode);
var selects = column.getElementsByTagName('select'); var selects = qsa('select', column);
for (var i = 0; i < selects.length; i++) { for (var i = 0; i < selects.length; i++) {
select = selects[i]; select = selects[i];
select.name = select.name.replace(/\]\[\d+/, '$&1'); select.name = select.name.replace(/\]\[\d+/, '$&1');
select.selectedIndex = 0; select.selectedIndex = 0;
} }
var inputs = column.getElementsByTagName('input'); field.onchange = partial(indexesChangeColumn, prefix);
var inputs = qsa('input', column);
for (var i = 0; i < inputs.length; i++) { for (var i = 0; i < inputs.length; i++) {
var input = inputs[i]; var input = inputs[i];
input.name = input.name.replace(/\]\[\d+/, '$&1'); input.name = input.name.replace(/\]\[\d+/, '$&1');
@@ -506,48 +595,47 @@ function triggerChange(tableRe, table, form) {
var that, x, y; // em and tablePos defined in schema.inc.php var that, x, y; // em and tablePos defined in schema.inc.php
/** Get mouse position /** Get mouse position
* @param HTMLElement
* @param MouseEvent * @param MouseEvent
* @this HTMLElement
*/ */
function schemaMousedown(el, event) { function schemaMousedown(event) {
if ((event.which ? event.which : event.button) == 1) { if ((event.which ? event.which : event.button) == 1) {
that = el; that = this;
x = event.clientX - el.offsetLeft; x = event.clientX - this.offsetLeft;
y = event.clientY - el.offsetTop; y = event.clientY - this.offsetTop;
} }
} }
/** Move object /** Move object
* @param MouseEvent * @param MouseEvent
*/ */
function schemaMousemove(ev) { function schemaMousemove(event) {
if (that !== undefined) { if (that !== undefined) {
ev = ev || event; var left = (event.clientX - x) / em;
var left = (ev.clientX - x) / em; var top = (event.clientY - y) / em;
var top = (ev.clientY - y) / em; var divs = qsa('div', that);
var divs = that.getElementsByTagName('div');
var lineSet = { }; var lineSet = { };
for (var i=0; i < divs.length; i++) { for (var i=0; i < divs.length; i++) {
if (divs[i].className == 'references') { if (divs[i].className == 'references') {
var div2 = document.getElementById((/^refs/.test(divs[i].id) ? 'refd' : 'refs') + divs[i].id.substr(4)); var div2 = qs('[id="' + (/^refs/.test(divs[i].id) ? 'refd' : 'refs') + divs[i].id.substr(4) + '"]');
var ref = (tablePos[divs[i].title] ? tablePos[divs[i].title] : [ div2.parentNode.offsetTop / em, 0 ]); var ref = (tablePos[divs[i].title] ? tablePos[divs[i].title] : [ div2.parentNode.offsetTop / em, 0 ]);
var left1 = -1; var left1 = -1;
var id = divs[i].id.replace(/^ref.(.+)-.+/, '$1'); var id = divs[i].id.replace(/^ref.(.+)-.+/, '$1');
if (divs[i].parentNode != div2.parentNode) { if (divs[i].parentNode != div2.parentNode) {
left1 = Math.min(0, ref[1] - left) - 1; left1 = Math.min(0, ref[1] - left) - 1;
divs[i].style.left = left1 + 'em'; divs[i].style.left = left1 + 'em';
divs[i].getElementsByTagName('div')[0].style.width = -left1 + 'em'; divs[i].querySelector('div').style.width = -left1 + 'em';
var left2 = Math.min(0, left - ref[1]) - 1; var left2 = Math.min(0, left - ref[1]) - 1;
div2.style.left = left2 + 'em'; div2.style.left = left2 + 'em';
div2.getElementsByTagName('div')[0].style.width = -left2 + 'em'; div2.querySelector('div').style.width = -left2 + 'em';
} }
if (!lineSet[id]) { if (!lineSet[id]) {
var line = document.getElementById(divs[i].id.replace(/^....(.+)-.+$/, 'refl$1')); var line = qs('[id="' + divs[i].id.replace(/^....(.+)-.+$/, 'refl$1') + '"]');
var top1 = top + divs[i].offsetTop / em; var top1 = top + divs[i].offsetTop / em;
var top2 = top + div2.offsetTop / em; var top2 = top + div2.offsetTop / em;
if (divs[i].parentNode != div2.parentNode) { if (divs[i].parentNode != div2.parentNode) {
top2 += ref[0] - top; top2 += ref[0] - top;
line.getElementsByTagName('div')[0].style.height = Math.abs(top1 - top2) + 'em'; line.querySelector('div').style.height = Math.abs(top1 - top2) + 'em';
} }
line.style.left = (left + left1) + 'em'; line.style.left = (left + left1) + 'em';
line.style.top = Math.min(top1, top2) + 'em'; line.style.top = Math.min(top1, top2) + 'em';
@@ -564,17 +652,16 @@ function schemaMousemove(ev) {
* @param MouseEvent * @param MouseEvent
* @param string * @param string
*/ */
function schemaMouseup(ev, db) { function schemaMouseup(event, db) {
if (that !== undefined) { if (that !== undefined) {
ev = ev || event; tablePos[that.firstChild.firstChild.firstChild.data] = [ (event.clientY - y) / em, (event.clientX - x) / em ];
tablePos[that.firstChild.firstChild.firstChild.data] = [ (ev.clientY - y) / em, (ev.clientX - x) / em ];
that = undefined; that = undefined;
var s = ''; var s = '';
for (var key in tablePos) { for (var key in tablePos) {
s += '_' + key + ':' + Math.round(tablePos[key][0] * 10000) / 10000 + 'x' + Math.round(tablePos[key][1] * 10000) / 10000; s += '_' + key + ':' + Math.round(tablePos[key][0] * 10000) / 10000 + 'x' + Math.round(tablePos[key][1] * 10000) / 10000;
} }
s = encodeURIComponent(s.substr(1)); s = encodeURIComponent(s.substr(1));
var link = document.getElementById('schema-link'); var link = qs('#schema-link');
link.href = link.href.replace(/[^=]+$/, '') + s; link.href = link.href.replace(/[^=]+$/, '') + s;
cookie('adminer_schema-' + db + '=' + s, 30); //! special chars in db cookie('adminer_schema-' + db + '=' + s, 30); //! special chars in db
} }
@@ -585,18 +672,18 @@ function schemaMouseup(ev, db) {
var helpOpen, helpIgnore; // when mouse outs <option> then it mouse overs border of <select> - ignore it var helpOpen, helpIgnore; // when mouse outs <option> then it mouse overs border of <select> - ignore it
/** Display help /** Display help
* @param HTMLElement
* @param MouseEvent * @param MouseEvent
* @param string * @param string
* @param bool display on left side (otherwise on top) * @param bool display on left side (otherwise on top)
* @this HTMLElement
*/ */
function helpMouseover(el, event, text, side) { function helpMouseover(event, text, side) {
var target = getTarget(event); var target = getTarget(event);
if (!text) { if (!text) {
helpClose(); helpClose();
} else if (window.jush && (!helpIgnore || el != target)) { } else if (window.jush && (!helpIgnore || this != target)) {
helpOpen = 1; helpOpen = 1;
var help = document.getElementById('help'); var help = qs('#help');
help.innerHTML = text; help.innerHTML = text;
jush.highlight_tag([ help ]); jush.highlight_tag([ help ]);
alterClass(help, 'hidden'); alterClass(help, 'hidden');
@@ -608,12 +695,12 @@ function helpMouseover(el, event, text, side) {
} }
/** Close help after timeout /** Close help after timeout
* @param HTMLElement
* @param MouseEvent * @param MouseEvent
* @this HTMLElement
*/ */
function helpMouseout(el, event) { function helpMouseout(event) {
helpOpen = 0; helpOpen = 0;
helpIgnore = (el != getTarget(event)); helpIgnore = (this != getTarget(event));
setTimeout(function () { setTimeout(function () {
if (!helpOpen) { if (!helpOpen) {
helpClose(); helpClose();
@@ -624,5 +711,5 @@ function helpMouseout(el, event) {
/** Close help /** Close help
*/ */
function helpClose() { function helpClose() {
alterClass(document.getElementById('help'), 'hidden', true); alterClass(qs('#help'), 'hidden', true);
} }

View File

@@ -1,4 +1,67 @@
/** Get first element by selector
* @param string
* @param [HTMLElement] defaults to document
* @return HTMLElement
*/
function qs(selector, context) {
return (context || document).querySelector(selector);
}
/** Get last element by selector
* @param string
* @param [HTMLElement] defaults to document
* @return HTMLElement
*/
function qsl(selector, context) {
var els = qsa(selector, context || document);
return els[els.length - 1];
}
/** Get all elements by selector
* @param string
* @param HTMLElement
* @return NodeList
*/
function qsa(selector, context) {
return context.querySelectorAll(selector);
}
/** Return a function calling fn with the next arguments
* @param function
* @param ...
* @return function with preserved this
*/
function partial(fn) {
var args = Array.apply(null, arguments).slice(1);
return function () {
return fn.apply(this, args);
};
}
/** Return a function calling fn with the first parameter and then the next arguments
* @param function
* @param ...
* @return function with preserved this
*/
function partialArg(fn) {
var args = Array.apply(null, arguments);
return function (arg) {
args[0] = arg;
return fn.apply(this, args);
};
}
/** Assign values from source to target
* @param Object
* @param Object
*/
function mixin(target, source) {
for (var key in source) {
target[key] = source[key];
}
}
/** Add or remove CSS class /** Add or remove CSS class
* @param HTMLElement * @param HTMLElement
* @param string * @param string
@@ -12,12 +75,12 @@ function alterClass(el, className, enable) {
/** Toggle visibility /** Toggle visibility
* @param string * @param string
* @return boolean * @return boolean false
*/ */
function toggle(id) { function toggle(id) {
var el = document.getElementById(id); var el = qs('#' + id);
el.className = (el.className == 'hidden' ? '' : 'hidden'); el.className = (el.className == 'hidden' ? '' : 'hidden');
return true; return false;
} }
/** Set permanent cookie /** Set permanent cookie
@@ -33,11 +96,13 @@ function cookie(assign, days) {
/** Verify current Adminer version /** Verify current Adminer version
* @param string * @param string
* @param string own URL base
* @param string
*/ */
function verifyVersion(current) { function verifyVersion(current, url, token) {
cookie('adminer_version=0', 1); cookie('adminer_version=0', 1);
var iframe = document.createElement('iframe'); var iframe = document.createElement('iframe');
iframe.src = location.protocol + '//www.adminer.org/version/?current=' + current; iframe.src = 'https://www.adminer.org/version/?current=' + current;
iframe.frameBorder = 0; iframe.frameBorder = 0;
iframe.marginHeight = 0; iframe.marginHeight = 0;
iframe.scrolling = 'no'; iframe.scrolling = 'no';
@@ -46,15 +111,17 @@ function verifyVersion(current) {
if (window.postMessage && window.addEventListener) { if (window.postMessage && window.addEventListener) {
iframe.style.display = 'none'; iframe.style.display = 'none';
addEventListener('message', function (event) { addEventListener('message', function (event) {
if (event.origin == location.protocol + '//www.adminer.org') { if (event.origin == 'https://www.adminer.org') {
var match = /version=(.+)/.exec(event.data); var match = /version=(.+)/.exec(event.data);
if (match) { if (match) {
cookie('adminer_version=' + match[1], 1); cookie('adminer_version=' + match[1], 1);
ajax(url + 'script=version', function () {
}, event.data + '&token=' + token);
} }
} }
}, false); }, false);
} }
document.getElementById('version').appendChild(iframe); qs('#version').appendChild(iframe);
} }
/** Get value of select /** Get value of select
@@ -70,20 +137,20 @@ function selectValue(select) {
} }
/** Verify if element has a specified tag name /** Verify if element has a specified tag name
* @param HTMLElement * @param HTMLElement
* @param string regular expression * @param string regular expression
* @return bool * @return bool
*/ */
function isTag(el, tag) { function isTag(el, tag) {
var re = new RegExp('^(' + tag + ')$', 'i'); var re = new RegExp('^(' + tag + ')$', 'i');
return re.test(el.tagName); return re.test(el.tagName);
} }
/** Get parent node with specified tag name /** Get parent node with specified tag name
* @param HTMLElement * @param HTMLElement
* @param string regular expression * @param string regular expression
* @return HTMLElement * @return HTMLElement
*/ */
function parentTag(el, tag) { function parentTag(el, tag) {
while (el && !isTag(el, tag)) { while (el && !isTag(el, tag)) {
el = el.parentNode; el = el.parentNode;
@@ -105,27 +172,31 @@ function trCheck(el) {
/** Fill number of selected items /** Fill number of selected items
* @param string * @param string
* @param string * @param string
* @uses thousandsSeparator
*/ */
function selectCount(id, count) { function selectCount(id, count) {
setHtml(id, (count === '' ? '' : '(' + (count + '').replace(/\B(?=(\d{3})+$)/g, ' ') + ')')); setHtml(id, (count === '' ? '' : '(' + (count + '').replace(/\B(?=(\d{3})+$)/g, thousandsSeparator) + ')'));
var inputs = document.getElementById(id).parentNode.parentNode.getElementsByTagName('input'); var el = qs('#' + id);
for (var i = 0; i < inputs.length; i++) { if (el) {
var input = inputs[i]; var inputs = qsa('input', el.parentNode.parentNode);
if (input.type == 'submit') { for (var i = 0; i < inputs.length; i++) {
input.disabled = (count == '0'); var input = inputs[i];
if (input.type == 'submit') {
input.disabled = (count == '0');
}
} }
} }
} }
/** Check all elements matching given name /** Check all elements matching given name
* @param HTMLInputElement
* @param RegExp * @param RegExp
* @this HTMLInputElement
*/ */
function formCheck(el, name) { function formCheck(name) {
var elems = el.form.elements; var elems = this.form.elements;
for (var i=0; i < elems.length; i++) { for (var i=0; i < elems.length; i++) {
if (name.test(elems[i].name)) { if (name.test(elems[i].name)) {
elems[i].checked = el.checked; elems[i].checked = this.checked;
trCheck(elems[i]); trCheck(elems[i]);
} }
} }
@@ -134,10 +205,10 @@ function formCheck(el, name) {
/** Check all rows in <table class="checkable"> /** Check all rows in <table class="checkable">
*/ */
function tableCheck() { function tableCheck() {
var tables = document.getElementsByTagName('table'); var tables = qsa('table', document);
for (var i=0; i < tables.length; i++) { for (var i=0; i < tables.length; i++) {
if (/(^|\s)checkable(\s|$)/.test(tables[i].className)) { if (/(^|\s)checkable(\s|$)/.test(tables[i].className)) {
var trs = tables[i].getElementsByTagName('tr'); var trs = qsa('tr', tables[i]);
for (var j=0; j < trs.length; j++) { for (var j=0; j < trs.length; j++) {
trCheck(trs[j].firstChild.firstChild); trCheck(trs[j].firstChild.firstChild);
} }
@@ -149,7 +220,7 @@ function tableCheck() {
* @param string * @param string
*/ */
function formUncheck(id) { function formUncheck(id) {
var el = document.getElementById(id); var el = qs('#' + id);
el.checked = false; el.checked = false;
trCheck(el); trCheck(el);
} }
@@ -175,6 +246,13 @@ function formChecked(el, name) {
* @param [boolean] force click * @param [boolean] force click
*/ */
function tableClick(event, click) { function tableClick(event, click) {
var td = parentTag(getTarget(event), 'td');
var text;
if (td && (text = td.getAttribute('data-text'))) {
if (selectClick.call(td, event, +text, td.getAttribute('data-warning'))) {
return;
}
}
click = (click || !window.getSelection || getSelection().isCollapsed); click = (click || !window.getSelection || getSelection().isCollapsed);
var el = getTarget(event); var el = getTarget(event);
while (!isTag(el, 'tr')) { while (!isTag(el, 'tr')) {
@@ -182,7 +260,7 @@ function tableClick(event, click) {
if (el.type != 'checkbox') { if (el.type != 'checkbox') {
return; return;
} }
checkboxClick(event, el); checkboxClick.call(el, event);
click = false; click = false;
} }
el = el.parentNode; el = el.parentNode;
@@ -195,31 +273,38 @@ function tableClick(event, click) {
el.checked = !el.checked; el.checked = !el.checked;
el.onclick && el.onclick(); el.onclick && el.onclick();
} }
if (el.name == 'check[]') {
el.form['all'].checked = false;
formUncheck('all-page');
}
if (/^(tables|views)\[\]$/.test(el.name)) {
formUncheck('check-all');
}
trCheck(el); trCheck(el);
} }
var lastChecked; var lastChecked;
/** Shift-click on checkbox for multiple selection. /** Shift-click on checkbox for multiple selection.
* @param MouseEvent * @param MouseEvent
* @param HTMLInputElement * @this HTMLInputElement
*/ */
function checkboxClick(event, el) { function checkboxClick(event) {
if (!el.name) { if (!this.name) {
return; return;
} }
if (event.shiftKey && (!lastChecked || lastChecked.name == el.name)) { if (event.shiftKey && (!lastChecked || lastChecked.name == this.name)) {
var checked = (lastChecked ? lastChecked.checked : true); var checked = (lastChecked ? lastChecked.checked : true);
var inputs = parentTag(el, 'table').getElementsByTagName('input'); var inputs = qsa('input', parentTag(this, 'table'));
var checking = !lastChecked; var checking = !lastChecked;
for (var i=0; i < inputs.length; i++) { for (var i=0; i < inputs.length; i++) {
var input = inputs[i]; var input = inputs[i];
if (input.name === el.name) { if (input.name === this.name) {
if (checking) { if (checking) {
input.checked = checked; input.checked = checked;
trCheck(input); trCheck(input);
} }
if (input === el || input === lastChecked) { if (input === this || input === lastChecked) {
if (checking) { if (checking) {
break; break;
} }
@@ -228,7 +313,7 @@ function checkboxClick(event, el) {
} }
} }
} else { } else {
lastChecked = el; lastChecked = this;
} }
} }
@@ -237,9 +322,9 @@ function checkboxClick(event, el) {
* @param string undefined to set parentNode to &nbsp; * @param string undefined to set parentNode to &nbsp;
*/ */
function setHtml(id, html) { function setHtml(id, html) {
var el = document.getElementById(id); var el = qs('#' + id);
if (el) { if (el) {
if (html == undefined) { if (html == null) {
el.parentNode.innerHTML = '&nbsp;'; el.parentNode.innerHTML = '&nbsp;';
} else { } else {
el.innerHTML = html; el.innerHTML = html;
@@ -262,88 +347,89 @@ function nodePosition(el) {
/** Go to the specified page /** Go to the specified page
* @param string * @param string
* @param string * @param string
* @param [MouseEvent]
*/ */
function pageClick(href, page, event) { function pageClick(href, page) {
if (!isNaN(page) && page) { if (!isNaN(page) && page) {
href += (page != 1 ? '&page=' + (page - 1) : ''); location.href = href + (page != 1 ? '&page=' + (page - 1) : '');
location.href = href;
} }
} }
/** Display items in menu /** Display items in menu
* @param HTMLElement
* @param MouseEvent * @param MouseEvent
* @this HTMLElement
*/ */
function menuOver(el, event) { function menuOver(event) {
var a = getTarget(event); var a = getTarget(event);
if (isTag(a, 'a|span') && a.offsetLeft + a.offsetWidth > a.parentNode.offsetWidth - 15) { // 15 - ellipsis if (isTag(a, 'a|span') && a.offsetLeft + a.offsetWidth > a.parentNode.offsetWidth - 15) { // 15 - ellipsis
el.style.overflow = 'visible'; this.style.overflow = 'visible';
} }
} }
/** Hide items in menu /** Hide items in menu
* @param HTMLElement * @this HTMLElement
*/ */
function menuOut(el) { function menuOut() {
el.style.overflow = 'auto'; this.style.overflow = 'auto';
} }
/** Add row in select fieldset /** Add row in select fieldset
* @param HTMLSelectElement * @this HTMLSelectElement
*/ */
function selectAddRow(field) { function selectAddRow() {
field.onchange = function () { var field = this;
selectFieldChange(field.form);
};
field.onchange();
var row = cloneNode(field.parentNode); var row = cloneNode(field.parentNode);
var selects = row.getElementsByTagName('select'); field.onchange = selectFieldChange;
field.onchange();
var selects = qsa('select', row);
for (var i=0; i < selects.length; i++) { for (var i=0; i < selects.length; i++) {
selects[i].name = selects[i].name.replace(/[a-z]\[\d+/, '$&1'); selects[i].name = selects[i].name.replace(/[a-z]\[\d+/, '$&1');
selects[i].selectedIndex = 0; selects[i].selectedIndex = 0;
} }
var inputs = row.getElementsByTagName('input'); var inputs = qsa('input', row);
for (var i=0; i < inputs.length; i++) { for (var i=0; i < inputs.length; i++) {
inputs[i].name = inputs[i].name.replace(/[a-z]\[\d+/, '$&1'); inputs[i].name = inputs[i].name.replace(/[a-z]\[\d+/, '$&1');
inputs[i].value = '';
inputs[i].className = ''; inputs[i].className = '';
if (inputs[i].type == 'checkbox') {
inputs[i].checked = false;
} else {
inputs[i].value = '';
}
} }
field.parentNode.parentNode.appendChild(row); field.parentNode.parentNode.appendChild(row);
} }
/** Prevent onsearch handler on Enter /** Prevent onsearch handler on Enter
* @param HTMLInputElement
* @param KeyboardEvent * @param KeyboardEvent
* @this HTMLInputElement
*/ */
function selectSearchKeydown(el, event) { function selectSearchKeydown(event) {
if (event.keyCode == 13 || event.keyCode == 10) { if (event.keyCode == 13 || event.keyCode == 10) {
el.onsearch = function () { this.onsearch = function () {
}; };
} }
} }
/** Clear column name after resetting search /** Clear column name after resetting search
* @param HTMLInputElement * @this HTMLInputElement
*/ */
function selectSearchSearch(el) { function selectSearchSearch() {
if (!el.value) { if (!this.value) {
el.parentNode.firstChild.selectedIndex = 0; this.parentNode.firstChild.selectedIndex = 0;
} }
} }
/** Toggles column context menu /** Toggles column context menu
* @param HTMLElement * @param [string] extra class name
* @param [string] extra class name * @this HTMLElement
*/ */
function columnMouse(el, className) { function columnMouse(className) {
var spans = el.getElementsByTagName('span'); var spans = qsa('span', this);
for (var i=0; i < spans.length; i++) { for (var i=0; i < spans.length; i++) {
if (/column/.test(spans[i].className)) { if (/column/.test(spans[i].className)) {
spans[i].className = 'column' + (className || ''); spans[i].className = 'column' + (className || '');
@@ -354,12 +440,13 @@ function columnMouse(el, className) {
/** Fill column in search field /** Fill column in search field
* @param string * @param string
*/ * @return boolean false
*/
function selectSearch(name) { function selectSearch(name) {
var el = document.getElementById('fieldset-search'); var el = qs('#fieldset-search');
el.className = ''; el.className = '';
var divs = el.getElementsByTagName('div'); var divs = qsa('div', el);
for (var i=0; i < divs.length; i++) { for (var i=0; i < divs.length; i++) {
var div = divs[i]; var div = divs[i];
if (isTag(div.firstChild, 'select') && selectValue(div.firstChild) == name) { if (isTag(div.firstChild, 'select') && selectValue(div.firstChild) == name) {
@@ -370,7 +457,8 @@ function selectSearch(name) {
div.firstChild.value = name; div.firstChild.value = name;
div.firstChild.onchange(); div.firstChild.onchange();
} }
div.lastChild.focus(); qs('[name$="[val]"]', div).focus();
return false;
} }
@@ -398,6 +486,7 @@ function getTarget(event) {
* @return boolean * @return boolean
*/ */
function bodyKeydown(event, button) { function bodyKeydown(event, button) {
eventStop(event);
var target = getTarget(event); var target = getTarget(event);
if (target.jushTextarea) { if (target.jushTextarea) {
target = target.jushTextarea; target = target.jushTextarea;
@@ -446,55 +535,56 @@ function editingKeydown(event) {
return false; return false;
} }
if (event.shiftKey && !bodyKeydown(event, 'insert')) { if (event.shiftKey && !bodyKeydown(event, 'insert')) {
eventStop(event);
return false; return false;
} }
return true; return true;
} }
/** Disable maxlength for functions /** Disable maxlength for functions
* @param HTMLSelectElement * @this HTMLSelectElement
*/ */
function functionChange(select) { function functionChange() {
var input = select.form[select.name.replace(/^function/, 'fields')]; var input = this.form[this.name.replace(/^function/, 'fields')];
if (selectValue(select)) { if (selectValue(this)) {
if (input.origType === undefined) { if (input.origType === undefined) {
input.origType = input.type; input.origType = input.type;
input.origMaxLength = input.maxLength; input.origMaxLength = input.getAttribute('data-maxlength');
} }
input.removeAttribute('maxlength'); input.removeAttribute('data-maxlength');
input.type = 'text'; input.type = 'text';
} else if (input.origType) { } else if (input.origType) {
input.type = input.origType; input.type = input.origType;
if (input.origMaxLength >= 0) { if (input.origMaxLength >= 0) {
input.maxLength = input.origMaxLength; input.setAttribute('data-maxlength', input.origMaxLength);
} }
} }
oninput({target: input});
helpClose(); helpClose();
} }
/** Call this.onchange() if value changes /** Skip 'original' when typing
* @this HTMLInputElement * @param number
* @this HTMLTableCellElement
*/ */
function keyupChange() { function skipOriginal(first) {
if (this.value != this.getAttribute('value')) { var fnSelect = this.previousSibling.firstChild;
this.onchange(); if (fnSelect.selectedIndex < first) {
this.setAttribute('value', this.value); fnSelect.selectedIndex = first;
} }
} }
/** Add new field in schema-less edit /** Add new field in schema-less edit
* @param HTMLInputElement * @this HTMLInputElement
*/ */
function fieldChange(field) { function fieldChange() {
var row = cloneNode(parentTag(field, 'tr')); var row = cloneNode(parentTag(this, 'tr'));
var inputs = row.getElementsByTagName('input'); var inputs = qsa('input', row);
for (var i = 0; i < inputs.length; i++) { for (var i = 0; i < inputs.length; i++) {
inputs[i].value = ''; inputs[i].value = '';
} }
// keep value in <select> (function) // keep value in <select> (function)
parentTag(field, 'table').appendChild(row); parentTag(this, 'table').appendChild(row);
field.onchange = function () { }; this.oninput = function () { };
} }
@@ -505,11 +595,12 @@ function fieldChange(field) {
* @param [string] * @param [string]
* @param [string] * @param [string]
* @return XMLHttpRequest or false in case of an error * @return XMLHttpRequest or false in case of an error
* @uses offlineMessage
*/ */
function ajax(url, callback, data, message) { function ajax(url, callback, data, message) {
var request = (window.XMLHttpRequest ? new XMLHttpRequest() : (window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : false)); var request = (window.XMLHttpRequest ? new XMLHttpRequest() : (window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : false));
if (request) { if (request) {
var ajaxStatus = document.getElementById('ajaxstatus'); var ajaxStatus = qs('#ajaxstatus');
if (message) { if (message) {
ajaxStatus.innerHTML = '<div class="message">' + message + '</div>'; ajaxStatus.innerHTML = '<div class="message">' + message + '</div>';
ajaxStatus.className = ajaxStatus.className.replace(/ hidden/g, ''); ajaxStatus.className = ajaxStatus.className.replace(/ hidden/g, '');
@@ -538,11 +629,11 @@ function ajax(url, callback, data, message) {
/** Use setHtml(key, value) for JSON response /** Use setHtml(key, value) for JSON response
* @param string * @param string
* @return XMLHttpRequest or false in case of an error * @return boolean false for success
*/ */
function ajaxSetHtml(url) { function ajaxSetHtml(url) {
return ajax(url, function (request) { return !ajax(url, function (request) {
var data = eval('(' + request.responseText + ')'); var data = window.JSON ? JSON.parse(request.responseText) : eval('(' + request.responseText + ')');
for (var key in data) { for (var key in data) {
setHtml(key, data[key]); setHtml(key, data[key]);
} }
@@ -579,7 +670,7 @@ function ajaxForm(form, message, button) {
return ajax(url, function (request) { return ajax(url, function (request) {
setHtml('ajaxstatus', request.responseText); setHtml('ajaxstatus', request.responseText);
if (window.jush) { if (window.jush) {
jush.highlight_tag(document.getElementById('ajaxstatus').getElementsByTagName('code'), 0); jush.highlight_tag(qsa('code', qs('#ajaxstatus')), 0);
} }
}, data, message); }, data, message);
} }
@@ -587,18 +678,21 @@ function ajaxForm(form, message, button) {
/** Display edit field /** Display edit field
* @param HTMLElement
* @param MouseEvent * @param MouseEvent
* @param number display textarea instead of input, 2 - load long text * @param number display textarea instead of input, 2 - load long text
* @param string warning to display * @param [string] warning to display
* @return boolean
* @this HTMLElement
*/ */
function selectClick(td, event, text, warning) { function selectClick(event, text, warning) {
var td = this;
var target = getTarget(event); var target = getTarget(event);
if (!isCtrl(event) || isTag(td.firstChild, 'input|textarea') || isTag(target, 'a')) { if (!isCtrl(event) || isTag(td.firstChild, 'input|textarea') || isTag(target, 'a')) {
return; return;
} }
if (warning) { if (warning) {
return alert(warning); alert(warning);
return true;
} }
var original = td.innerHTML; var original = td.innerHTML;
text = text || /\n/.test(original); text = text || /\n/.test(original);
@@ -622,7 +716,7 @@ function selectClick(td, event, text, warning) {
}); });
input.rows = rows; input.rows = rows;
} }
if (value == '\u00A0' || td.getElementsByTagName('i').length) { // &nbsp; or i - NULL if (value == '\u00A0' || qsa('i', td).length) { // &nbsp; or i - NULL
value = ''; value = '';
} }
if (document.selection) { if (document.selection) {
@@ -654,26 +748,28 @@ function selectClick(td, event, text, warning) {
range.moveEnd('character', -input.value.length + pos); range.moveEnd('character', -input.value.length + pos);
range.select(); range.select();
} }
return true;
} }
/** Load and display next page in select /** Load and display next page in select
* @param HTMLLinkElement
* @param number * @param number
* @param string * @param string
* @return boolean * @return boolean false for success
* @this HTMLLinkElement
*/ */
function selectLoadMore(a, limit, loading) { function selectLoadMore(limit, loading) {
var a = this;
var title = a.innerHTML; var title = a.innerHTML;
var href = a.href; var href = a.href;
a.innerHTML = loading; a.innerHTML = loading;
if (href) { if (href) {
a.removeAttribute('href'); a.removeAttribute('href');
return ajax(href, function (request) { return !ajax(href, function (request) {
var tbody = document.createElement('tbody'); var tbody = document.createElement('tbody');
tbody.innerHTML = request.responseText; tbody.innerHTML = request.responseText;
document.getElementById('table').appendChild(tbody); qs('#table').appendChild(tbody);
if (tbody.children.length < limit) { if (tbody.children.length < limit) {
a.parentNode.removeChild(a); a.parentNode.removeChild(a);
} else { } else {
@@ -706,7 +802,7 @@ function eventStop(event) {
*/ */
function setupSubmitHighlight(parent) { function setupSubmitHighlight(parent) {
for (var key in { input: 1, select: 1, textarea: 1 }) { for (var key in { input: 1, select: 1, textarea: 1 }) {
var inputs = parent.getElementsByTagName(key); var inputs = qsa(key, parent);
for (var i = 0; i < inputs.length; i++) { for (var i = 0; i < inputs.length; i++) {
setupSubmitHighlightInput(inputs[i]) setupSubmitHighlightInput(inputs[i])
} }
@@ -751,7 +847,10 @@ function findDefaultSubmit(el) {
if (el.jushTextarea) { if (el.jushTextarea) {
el = el.jushTextarea; el = el.jushTextarea;
} }
var inputs = el.form.getElementsByTagName('input'); if (!el.form) {
return null;
}
var inputs = qsa('input', el.form);
for (var i = 0; i < inputs.length; i++) { for (var i = 0; i < inputs.length; i++) {
var input = inputs[i]; var input = inputs[i];
if (input.type == 'submit' && !input.style.zIndex) { if (input.type == 'submit' && !input.style.zIndex) {
@@ -790,6 +889,23 @@ function focus(el) {
*/ */
function cloneNode(el) { function cloneNode(el) {
var el2 = el.cloneNode(true); var el2 = el.cloneNode(true);
var selector = 'input, select';
var origEls = qsa(selector, el);
var cloneEls = qsa(selector, el2);
for (var i=0; i < origEls.length; i++) {
var origEl = origEls[i];
for (var key in origEl) {
if (/^on/.test(key) && origEl[key]) {
cloneEls[i][key] = origEl[key];
}
}
}
setupSubmitHighlight(el2); setupSubmitHighlight(el2);
return el2; return el2;
} }
oninput = function (event) {
var target = event.target;
var maxLength = target.getAttribute('data-maxlength');
alterClass(target, 'maxlength', target.value && maxLength != null && target.value.length > maxLength); // maxLength could be 0
};

View File

@@ -5,28 +5,18 @@ if (!$fields) {
$error = error(); $error = error();
} }
$table_status = table_status1($TABLE, true); $table_status = table_status1($TABLE, true);
$name = $adminer->tableName($table_status);
page_header(($fields && is_view($table_status) ? lang('View') : lang('Table')) . ": " . h($TABLE), $error); page_header(($fields && is_view($table_status) ? $table_status['Engine'] == 'materialized view' ? lang('Materialized view') : lang('View') : lang('Table')) . ": " . ($name != "" ? $name : h($TABLE)), $error);
$adminer->selectLinks($table_status); $adminer->selectLinks($table_status);
$comment = $table_status["Comment"]; $comment = $table_status["Comment"];
if ($comment != "") { if ($comment != "") {
echo "<p>" . lang('Comment') . ": " . h($comment) . "\n"; echo "<p class='nowrap'>" . lang('Comment') . ": " . h($comment) . "\n";
} }
if ($fields) { if ($fields) {
echo "<table cellspacing='0'>\n"; $adminer->tableStructurePrint($fields);
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
foreach ($fields as $field) {
echo "<tr" . odd() . "><th>" . h($field["field"]);
echo "<td><span title='" . h($field["collation"]) . "'>" . h($field["full_type"]) . "</span>";
echo ($field["null"] ? " <i>NULL</i>" : "");
echo ($field["auto_increment"] ? " <i>" . lang('Auto Increment') . "</i>" : "");
echo (isset($field["default"]) ? " <span title='" . lang('Default value') . "'>[<b>" . h($field["default"]) . "</b>]</span>" : "");
echo (support("comment") ? "<td>" . nbsp($field["comment"]) : "");
echo "\n";
}
echo "</table>\n";
} }
if (!is_view($table_status)) { if (!is_view($table_status)) {
@@ -34,19 +24,7 @@ if (!is_view($table_status)) {
echo "<h3 id='indexes'>" . lang('Indexes') . "</h3>\n"; echo "<h3 id='indexes'>" . lang('Indexes') . "</h3>\n";
$indexes = indexes($TABLE); $indexes = indexes($TABLE);
if ($indexes) { if ($indexes) {
echo "<table cellspacing='0'>\n"; $adminer->tableIndexesPrint($indexes);
foreach ($indexes as $name => $index) {
ksort($index["columns"]); // enforce correct columns order
$print = array();
foreach ($index["columns"] as $key => $val) {
$print[] = "<i>" . h($val) . "</i>"
. ($index["lengths"][$key] ? "(" . $index["lengths"][$key] . ")" : "")
. ($index["descs"][$key] ? " DESC" : "")
;
}
echo "<tr title='" . h($name) . "'><th>$index[type]<td>" . implode(", ", $print) . "\n";
}
echo "</table>\n";
} }
echo '<p class="links"><a href="' . h(ME) . 'indexes=' . urlencode($TABLE) . '">' . lang('Alter indexes') . "</a>\n"; echo '<p class="links"><a href="' . h(ME) . 'indexes=' . urlencode($TABLE) . '">' . lang('Alter indexes') . "</a>\n";
} }

View File

@@ -40,10 +40,10 @@ page_header(($name != "" ? lang('Alter trigger') . ": " . h($name) : lang('Creat
<tr><th><?php echo lang('Type'); ?><td><?php echo html_select("Type", $trigger_options["Type"], $row["Type"]); ?> <tr><th><?php echo lang('Type'); ?><td><?php echo html_select("Type", $trigger_options["Type"], $row["Type"]); ?>
</table> </table>
<p><?php echo lang('Name'); ?>: <input name="Trigger" value="<?php echo h($row["Trigger"]); ?>" maxlength="64" autocapitalize="off"> <p><?php echo lang('Name'); ?>: <input name="Trigger" value="<?php echo h($row["Trigger"]); ?>" maxlength="64" autocapitalize="off">
<script type="text/javascript">document.getElementById('form')['Timing'].onchange();</script> <?php echo script("qs('#form')['Timing'].onchange();"); ?>
<p><?php textarea("Statement", $row["Statement"]); ?> <p><?php textarea("Statement", $row["Statement"]); ?>
<p> <p>
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?> <?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?><?php } ?>
<input type="hidden" name="token" value="<?php echo $token; ?>"> <input type="hidden" name="token" value="<?php echo $token; ?>">
</form> </form>

View File

@@ -22,7 +22,7 @@ if (!$row) {
<p> <p>
<?php <?php
if ($TYPE != "") { if ($TYPE != "") {
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n"; echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', $TYPE)) . "\n";
} else { } else {
echo "<input name='name' value='" . h($row['name']) . "' autocapitalize='off'>\n"; echo "<input name='name' value='" . h($row['name']) . "' autocapitalize='off'>\n";
textarea("as", $row["as"]); textarea("as", $row["as"]);

View File

@@ -61,7 +61,7 @@ if ($_POST && !$error) {
$created = false; $created = false;
if (!$error) { if (!$error) {
if ($old_user != $new_user) { if ($old_user != $new_user) {
$created = queries(($connection->server_info < 5 ? "GRANT USAGE ON *.* TO" : "CREATE USER") . " $new_user IDENTIFIED BY PASSWORD " . q($pass)); $created = queries((min_version(5) ? "CREATE USER" : "GRANT USAGE ON *.* TO") . " $new_user IDENTIFIED BY PASSWORD " . q($pass));
$error = !$created; $error = !$created;
} elseif ($pass != $old_pass) { } elseif ($pass != $old_pass) {
queries("SET PASSWORD FOR $new_user = " . q($pass)); queries("SET PASSWORD FOR $new_user = " . q($pass));
@@ -134,8 +134,8 @@ if ($_POST) {
<table cellspacing="0"> <table cellspacing="0">
<tr><th><?php echo lang('Server'); ?><td><input name="host" maxlength="60" value="<?php echo h($row["host"]); ?>" autocapitalize="off"> <tr><th><?php echo lang('Server'); ?><td><input name="host" maxlength="60" value="<?php echo h($row["host"]); ?>" autocapitalize="off">
<tr><th><?php echo lang('Username'); ?><td><input name="user" maxlength="16" value="<?php echo h($row["user"]); ?>" autocapitalize="off"> <tr><th><?php echo lang('Username'); ?><td><input name="user" maxlength="16" value="<?php echo h($row["user"]); ?>" autocapitalize="off">
<tr><th><?php echo lang('Password'); ?><td><input name="pass" id="pass" value="<?php echo h($row["pass"]); ?>"> <tr><th><?php echo lang('Password'); ?><td><input name="pass" id="pass" value="<?php echo h($row["pass"]); ?>" autocomplete="new-password">
<?php if (!$row["hashed"]) { ?><script type="text/javascript">typePassword(document.getElementById('pass'));</script><?php } ?> <?php if (!$row["hashed"]) { echo script("typePassword(qs('#pass'));"); } ?>
<?php echo checkbox("hashed", 1, $row["hashed"], lang('Hashed'), "typePassword(this.form['pass'], this.checked);"); ?> <?php echo checkbox("hashed", 1, $row["hashed"], lang('Hashed'), "typePassword(this.form['pass'], this.checked);"); ?>
</table> </table>
@@ -169,7 +169,11 @@ foreach (array(
} elseif (isset($_GET["grant"])) { } elseif (isset($_GET["grant"])) {
echo "<td><select name=$name><option><option value='1'" . ($value ? " selected" : "") . ">" . lang('Grant') . "<option value='0'" . ($value == "0" ? " selected" : "") . ">" . lang('Revoke') . "</select>"; echo "<td><select name=$name><option><option value='1'" . ($value ? " selected" : "") . ">" . lang('Grant') . "<option value='0'" . ($value == "0" ? " selected" : "") . ">" . lang('Revoke') . "</select>";
} else { } else {
echo "<td align='center'><label class='block'><input type='checkbox' name=$name value='1'" . ($value ? " checked" : "") . ($privilege == "All privileges" ? " id='grants-$i-all'" : ($privilege == "Grant option" ? "" : " onclick=\"if (this.checked) formUncheck('grants-$i-all');\"")) . "></label>"; //! uncheck all except grant if all is checked echo "<td align='center'><label class='block'>";
echo "<input type='checkbox' name=$name value='1'" . ($value ? " checked" : "") . ($privilege == "All privileges"
? " id='grants-$i-all'>" //! uncheck all except grant if all is checked
: ">" . ($privilege == "Grant option" ? "" : script("qsl('input').onclick = function () { if (this.checked) formUncheck('grants-$i-all'); };")));
echo "</label>";
} }
$i++; $i++;
} }
@@ -180,6 +184,6 @@ echo "</table>\n";
?> ?>
<p> <p>
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<?php if (isset($_GET["host"])) { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?> <?php if (isset($_GET["host"])) { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', "$USER@$_GET[host]")); ?><?php } ?>
<input type="hidden" name="token" value="<?php echo $token; ?>"> <input type="hidden" name="token" value="<?php echo $token; ?>">
</form> </form>

View File

@@ -1,6 +1,11 @@
<?php <?php
$TABLE = $_GET["view"]; $TABLE = $_GET["view"];
$row = $_POST; $row = $_POST;
$orig_type = "VIEW";
if ($jush == "pgsql" && $TABLE != "") {
$status = table_status($TABLE);
$orig_type = strtoupper($status["Engine"]);
}
if ($_POST && !$error) { if ($_POST && !$error) {
$name = trim($row["name"]); $name = trim($row["name"]);
@@ -8,22 +13,14 @@ if ($_POST && !$error) {
$location = ME . "table=" . urlencode($name); $location = ME . "table=" . urlencode($name);
$message = lang('View has been altered.'); $message = lang('View has been altered.');
if ($_GET["materialized"]) { $type = ($_POST["materialized"] ? "MATERIALIZED VIEW" : "VIEW");
$type = "MATERIALIZED VIEW";
} else {
$type = "VIEW";
if ($jush == "pgsql") {
$status = table_status($name);
$type = ($status ? strtoupper($status["Engine"]) : $type);
}
}
if (!$_POST["drop"] && $TABLE == $name && $jush != "sqlite" && $type != "MATERIALIZED VIEW") { if (!$_POST["drop"] && $TABLE == $name && $jush != "sqlite" && $type == "VIEW" && $orig_type == "VIEW") {
query_redirect(($jush == "mssql" ? "ALTER" : "CREATE OR REPLACE") . " VIEW " . table($name) . $as, $location, $message); query_redirect(($jush == "mssql" ? "ALTER" : "CREATE OR REPLACE") . " VIEW " . table($name) . $as, $location, $message);
} else { } else {
$temp_name = $name . "_adminer_" . uniqid(); $temp_name = $name . "_adminer_" . uniqid();
drop_create( drop_create(
"DROP $type " . table($TABLE), "DROP $orig_type " . table($TABLE),
"CREATE $type " . table($name) . $as, "CREATE $type " . table($name) . $as,
"DROP $type " . table($name), "DROP $type " . table($name),
"CREATE $type " . table($temp_name) . $as, "CREATE $type " . table($temp_name) . $as,
@@ -41,6 +38,7 @@ if ($_POST && !$error) {
if (!$_POST && $TABLE != "") { if (!$_POST && $TABLE != "") {
$row = view($TABLE); $row = view($TABLE);
$row["name"] = $TABLE; $row["name"] = $TABLE;
$row["materialized"] = ($orig_type != "VIEW");
if (!$error) { if (!$error) {
$error = error(); $error = error();
} }
@@ -51,9 +49,10 @@ page_header(($TABLE != "" ? lang('Alter view') : lang('Create view')), $error, a
<form action="" method="post"> <form action="" method="post">
<p><?php echo lang('Name'); ?>: <input name="name" value="<?php echo h($row["name"]); ?>" maxlength="64" autocapitalize="off"> <p><?php echo lang('Name'); ?>: <input name="name" value="<?php echo h($row["name"]); ?>" maxlength="64" autocapitalize="off">
<?php echo (support("materializedview") ? " " . checkbox("materialized", 1, $row["materialized"], lang('Materialized view')) : ""); ?>
<p><?php textarea("select", $row["select"]); ?> <p><?php textarea("select", $row["select"]); ?>
<p> <p>
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<?php if ($_GET["view"] != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?> <?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $TABLE)); ?><?php } ?>
<input type="hidden" name="token" value="<?php echo $token; ?>"> <input type="hidden" name="token" value="<?php echo $token; ?>">
</form> </form>

View File

@@ -1,4 +1,130 @@
Adminer 4.2.2 (released ): Adminer 4.6.2 (released 2018-02-20):
Semi-transparent border on table actions
Shorten JSON values in select (bug #594)
Speed up alter table (regression from 4.4.0)
Store current version without authentication and in Editor
PostgreSQL: Fix exporting string default values
PostgreSQL: Fix exporting sequences in PostgreSQL 10
PostgreSQL: Add IF EXISTS to DROP SEQUENCE in export (bug #595)
Editor: Fix displaying of true boolean values (regression from 4.5.0)
Adminer 4.6.1 (released 2018-02-09):
Sticky position of table actions
Speed up rendering of long tables (regression from 4.4.0)
Display notification about performing action after relogin
Add system tables help links
MySQL: Support non-utf8 charset in search in column
MySQL: Support geometry in MySQL 8 (bug #574)
MariaDB: Links to documentation
SQLite: Allow deleting PRIMARY KEY from tables with auto increment
PostgreSQL: Support binary files in bytea fields
PostgreSQL: Don't treat interval type as number (bug #474)
PostgreSQL: Cast to string when searching using LIKE (bug #325)
PostgreSQL: Fix condition for selecting no rows
PostgreSQL: Support TRUNCATE+INSERT export
Customization: Support connecting to MySQL via SSL
Customization: Allow specifying server name displayed in breadcrumbs
Adminer 4.6.0 (released 2018-02-05):
Fix counting selected rows after going back to select page
PHP <5.3 compatibility even with Elasticsearch enabled
Fully support functions in default values
Stop redirecting links via adminer.org
Support X-Forwarded-Prefix
Display options for timestamp columns when creating a new table
Disable autocompleting password on create user page
Use primary key to edit rows even if not selected
MySQL, PostgreSQL: Display warnings
MySQL: Add floor and ceil select functions
MySQL: Add FIND_IN_SET search operator
MariaDB: Support JSON since MariaDB 10.2
SQLite, PostgreSQL: Limit rows in data manipulation without unique key
PostgreSQL: Support routines
PostgreSQL: Allow editing views with uppercase letters (bug #467)
PostgreSQL: Allow now() as default value (bug #525)
SimpleDB: Document that allow_url_fopen is required
Malay translation
Adminer 4.5.0 (released 2018-01-24):
Display name of the object in confirmation when dropping it
Display newlines in column comments (bug #573)
Support current_timestamp() as default of time fields (bug #572)
Hide window.opener from pages opened in a new window (bug #561)
Display error when getting row to edit
Store current Adminer version server-side to avoid excessive requests
Adminer: Fix Search data in tables (regression from 4.4.0)
CSP: Allow any styles, images, media and fonts, disallow base-uri
MySQL: Support geometry in MySQL 8 (bug #574)
MySQL: Support routines with comments in parameters (bug #460)
MariaDB: Support fulltext and spatial indexes in InnoDB (bug #583)
SQLite: Enable foreign key checks
PostgreSQL: Respect NULL default value
PostgreSQL: Display foreign tables (bug #576)
PostgreSQL: Do not export triggers if not requested
PostgreSQL: Export DROP SEQUENCE if dropping table
PostgreSQL: Display boolean values as code (bug #562)
MS SQL: Support freetds
non-MySQL: Avoid CONVERT() (bug #509)
Elasticsearch: Insert, update, delete
MongoDB: Support mongodb PHP extension
Editor: Fix displaying of false values in PostgreSQL (bug #568)
Adminer 4.4.0 (released 2018-01-17):
Add Content Security Policy
Disallow scripts without nonce
Rate limit password-less login attempts from the same IP address
Disallow connecting to privileged ports
Add nosniff header
PHP 7.1: Prevent warning when using empty limit
PHP 7.2: Prevent warning when searching in select
MySQL: Remove dedicated view for replication status (added in 4.3.0)
PostgreSQL: Sort table names (regression from 4.3.1)
Editor: Don't set time zone from PHP, fixes DST
Editor: Display field comment's text inside [] only in edit form
Editor: Fix doubleclick on database page
Editor: Fix Search data in tables
Customization: Always send security headers
Hebrew translation
Adminer 4.3.1 (released 2017-04-14):
Fix permanent login after logout (bug #539)
Fix SQL command autofocus (regression from 4.0.0)
PostgreSQL: Support JSON and JSONB data types
PostgreSQL: Fix index size computation in PostgreSQL < 9.0 (regression from 4.3.0)
PostgreSQL: Fix nullable fields in export
Adminer 4.3.0 (released 2017-03-15):
Make maxlength in edit fields a soft limit
Add accessibility labels
Add Cache-Control: immutable to static files
MySQL: Support MySQL 8
MySQL: Support JSON data type
MySQL: Add dedicated view for replication status
MySQL: Support spatial indexes
PostgreSQL: Export
PostgreSQL: Don't treat partial indexes as unique
MS SQL: Support pdo_dblib
Elasticsearch: Support HTTPS by inputting https://server
Adminer 4.2.5 (released 2016-06-01):
Fix remote execution in SQLite query
SQLite: Require credentials to use
PostgreSQL: Support KILL
Adminer 4.2.4 (released 2016-02-06):
Fix remote execution in SQLite query
MySQL: Support PHP 7
Bosnian translation
Finnish translation
Adminer 4.2.3 (released 2015-11-15):
Fix XSS in indexes (non-MySQL only)
Support PHP 7
Greek translation
Galician translation
Bulgarian translation
Adminer 4.2.2 (released 2015-08-05):
Fix XSS in alter table (found by HP Fortify) Fix XSS in alter table (found by HP Fortify)
Adminer 4.2.1 (released 2015-03-10): Adminer 4.2.1 (released 2015-03-10):

View File

@@ -21,7 +21,7 @@ function remove_lang($match) {
$idf = strtr($match[2], array("\\'" => "'", "\\\\" => "\\")); $idf = strtr($match[2], array("\\'" => "'", "\\\\" => "\\"));
$s = ($translations[$idf] ? $translations[$idf] : $idf); $s = ($translations[$idf] ? $translations[$idf] : $idf);
if ($match[3] == ",") { // lang() has parameters if ($match[3] == ",") { // lang() has parameters
return "$match[1]" . (is_array($s) ? "lang(array('" . implode("', '", array_map('add_apo_slashes', $s)) . "')," : "sprintf('" . add_apo_slashes($s) . "',"); return $match[1] . (is_array($s) ? "lang(array('" . implode("', '", array_map('add_apo_slashes', $s)) . "')," : "sprintf('" . add_apo_slashes($s) . "',");
} }
return ($match[1] && $match[4] ? $s : "$match[1]'" . add_apo_slashes($s) . "'$match[4]"); return ($match[1] && $match[4] ? $s : "$match[1]'" . add_apo_slashes($s) . "'$match[4]");
} }
@@ -134,7 +134,7 @@ function put_file_lang($match) {
case "' . $lang . '": $compressed = "' . add_quo_slashes(lzw_compress(implode("\n", $translation_ids))) . '"; break;'; case "' . $lang . '": $compressed = "' . add_quo_slashes(lzw_compress(implode("\n", $translation_ids))) . '"; break;';
} }
$translations_version = crc32($return); $translations_version = crc32($return);
return '$translations = &$_SESSION["translations"]; return '$translations = $_SESSION["translations"];
if ($_SESSION["translations_version"] != ' . $translations_version . ') { if ($_SESSION["translations_version"] != ' . $translations_version . ') {
$translations = array(); $translations = array();
$_SESSION["translations_version"] = ' . $translations_version . '; $_SESSION["translations_version"] = ' . $translations_version . ';
@@ -152,6 +152,7 @@ function get_translations($lang) {
if (!$translations) { if (!$translations) {
$translations = get_translations($LANG); $translations = get_translations($LANG);
$_SESSION["translations"] = $translations;
} }
'; ';
} }
@@ -299,6 +300,14 @@ function compile_file($match) {
return '"' . add_quo_slashes($file) . '"'; return '"' . add_quo_slashes($file) . '"';
} }
function min_version() {
return true;
}
function number_type() {
return '';
}
$project = "adminer"; $project = "adminer";
if ($_SERVER["argv"][1] == "editor") { if ($_SERVER["argv"][1] == "editor") {
$project = "editor"; $project = "editor";
@@ -326,10 +335,12 @@ if ($_SERVER["argv"][1]) {
} }
// check function definition in drivers // check function definition in drivers
$filename = dirname(__FILE__) . "/adminer/drivers/mysql.inc.php"; $file = file_get_contents(dirname(__FILE__) . "/adminer/drivers/mysql.inc.php");
preg_match_all('~\\bfunction ([^(]+)~', file_get_contents($filename), $matches); //! respect context (extension, class) $file = preg_replace('~class Min_Driver.*\n\t}~sU', '', $file);
preg_match_all('~\\bfunction ([^(]+)~', $file, $matches); //! respect context (extension, class)
$functions = array_combine($matches[1], $matches[0]); $functions = array_combine($matches[1], $matches[0]);
unset($functions["__destruct"], $functions["Min_DB"], $functions["Min_Result"], $functions["Min_Driver"]); //! do not warn about functions without declared support()
unset($functions["__construct"], $functions["__destruct"], $functions["set_charset"]);
foreach (glob(dirname(__FILE__) . "/adminer/drivers/" . ($driver ? $driver : "*") . ".inc.php") as $filename) { foreach (glob(dirname(__FILE__) . "/adminer/drivers/" . ($driver ? $driver : "*") . ".inc.php") as $filename) {
if ($filename != "mysql.inc.php") { if ($filename != "mysql.inc.php") {
$file = file_get_contents($filename); $file = file_get_contents($filename);
@@ -347,7 +358,6 @@ $features = array("call" => "routine", "dump", "event", "privileges", "procedure
$lang_ids = array(); // global variable simplifies usage in a callback function $lang_ids = array(); // global variable simplifies usage in a callback function
$file = file_get_contents(dirname(__FILE__) . "/$project/index.php"); $file = file_get_contents(dirname(__FILE__) . "/$project/index.php");
if ($driver) { if ($driver) {
$connection = (object) array("server_info" => 5.1); // MySQL support is version specific
$_GET[$driver] = true; // to load the driver $_GET[$driver] = true; // to load the driver
include_once dirname(__FILE__) . "/adminer/drivers/$driver.inc.php"; include_once dirname(__FILE__) . "/adminer/drivers/$driver.inc.php";
foreach ($features as $key => $feature) { foreach ($features as $key => $feature) {
@@ -375,9 +385,9 @@ if ($driver) {
} }
} }
if (count($drivers) == 1) { if (count($drivers) == 1) {
$file = str_replace('<?php echo html_select("driver", $drivers, DRIVER); ?>', "<input type='hidden' name='driver' value='" . ($driver == "mysql" ? "server" : $driver) . "'>" . reset($drivers), $file); $file = str_replace('<?php echo html_select("auth[driver]", $drivers, DRIVER) . "\n"; ?>', "<input type='hidden' name='auth[driver]' value='" . ($driver == "mysql" ? "server" : $driver) . "'>" . reset($drivers), $file);
} }
$file = preg_replace('(;../externals/jush/modules/jush-(?!textarea\.|txt\.|' . preg_quote($driver == "mysql" ? "sql" : $driver) . '\.)[^.]+.js)', '', $file); $file = preg_replace('(;../externals/jush/modules/jush-(?!textarea\.|txt\.|js\.|' . preg_quote($driver == "mysql" ? "sql" : $driver) . '\.)[^.]+.js)', '', $file);
} }
if ($project == "editor") { if ($project == "editor") {
$file = preg_replace('~;../externals/jush/jush.css~', '', $file); $file = preg_replace('~;../externals/jush/jush.css~', '', $file);
@@ -392,16 +402,15 @@ if ($_SESSION["lang"]) {
$file = str_replace("<?php switch_lang(); ?>\n", "", $file); $file = str_replace("<?php switch_lang(); ?>\n", "", $file);
$file = str_replace('<?php echo $LANG; ?>', $_SESSION["lang"], $file); $file = str_replace('<?php echo $LANG; ?>', $_SESSION["lang"], $file);
} }
$file = str_replace('<script type="text/javascript" src="static/editing.js"></script>' . "\n", "", $file); $file = str_replace('<?php echo script_src("static/editing.js"); ?>' . "\n", "", $file);
$file = str_replace('<script type="text/javascript" src="../externals/jush/modules/jush-textarea.js"></script>' . "\n", "", $file); $file = preg_replace('~\\s+echo script_src\\("\\.\\./externals/jush/modules/jush-(textarea|txt|js|\\$jush)\\.js"\\);~', '', $file);
$file = str_replace('<script type="text/javascript" src="../externals/jush/modules/jush-txt.js"></script>' . "\n", "", $file);
$file = str_replace('<script type="text/javascript" src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>' . "\n", "", $file);
$file = str_replace('<link rel="stylesheet" type="text/css" href="../externals/jush/jush.css">' . "\n", "", $file); $file = str_replace('<link rel="stylesheet" type="text/css" href="../externals/jush/jush.css">' . "\n", "", $file);
$file = preg_replace_callback("~compile_file\\('([^']+)'(?:, '([^']*)')?\\)~", 'compile_file', $file); // integrate static files $file = preg_replace_callback("~compile_file\\('([^']+)'(?:, '([^']*)')?\\)~", 'compile_file', $file); // integrate static files
$replace = 'h(preg_replace("~\\\\\\\\?.*~", "", ME)) . "?file=\\1&amp;version=' . $VERSION . ($driver ? '&amp;driver=' . $driver : ''); $replace = 'preg_replace("~\\\\\\\\?.*~", "", ME) . "?file=\\1&version=' . $VERSION . ($driver ? '&driver=' . $driver : '') . '"';
$file = preg_replace('~\\.\\./adminer/static/(default\\.css|functions\\.js|favicon\\.ico)~', '<?php echo ' . $replace . '"; ?>', $file); $file = preg_replace('~\\.\\./adminer/static/(default\\.css|favicon\\.ico)~', '<?php echo h(' . $replace . '); ?>', $file);
$file = preg_replace('~\\.\\./adminer/static/([^\'"]*)~', '" . ' . $replace, $file); $file = preg_replace('~"\\.\\./adminer/static/(functions\\.js)"~', $replace, $file);
$file = preg_replace('~\\.\\./externals/jush/modules/(jush\\.js)~', '<?php echo ' . $replace . '"; ?>', $file); $file = preg_replace('~\\.\\./adminer/static/([^\'"]*)~', '" . h(' . $replace . ') . "', $file);
$file = preg_replace('~"\\.\\./externals/jush/modules/(jush\\.js)"~', $replace, $file);
$file = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $file); $file = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $file);
$file = php_shrink($file); $file = php_shrink($file);

View File

@@ -1,19 +1,19 @@
{ {
"name": "vrana/adminer", "name": "vrana/adminer",
"description": "Database management in a single PHP file.", "description": "Database management in a single PHP file.",
"homepage": "http://www.adminer.org/", "homepage": "https://www.adminer.org/",
"keywords": [ "keywords": [
"database" "database"
], ],
"support": { "support": {
"issues": "http://sourceforge.net/p/adminer/bugs-and-features/", "issues": "https://sourceforge.net/p/adminer/bugs-and-features/",
"forum": "http://sourceforge.net/p/adminer/discussion/", "forum": "https://sourceforge.net/p/adminer/discussion/",
"source": "https://github.com/vrana/adminer/" "source": "https://github.com/vrana/adminer/"
}, },
"authors": [ "authors": [
{ {
"name": "Jakub Vrána", "name": "Jakub Vrána",
"homepage": "http://www.vrana.cz/" "homepage": "https://www.vrana.cz/"
} }
], ],
"autoload": { "autoload": {
@@ -23,7 +23,7 @@
}, },
"license": [ "license": [
"Apache-2.0", "Apache-2.0",
"GPL-2.0" "GPL-2.0-only"
], ],
"scripts": { "scripts": {
"compile": "php compile.php" "compile": "php compile.php"

View File

@@ -45,8 +45,8 @@ border:5px solid #ccc;margin:0}
#menu a{color:#333;margin-right:4px} #menu a{color:#333;margin-right:4px}
#menu a:hover{background:#333;color:#fff;border-color:#333} #menu a:hover{background:#333;color:#fff;border-color:#333}
#menu a.h1,#menu a.h1:hover{display:block;height:0;width:175px;padding:40px 0 0 0;overflow:hidden;float:left;border:0;margin:0; #menu a.h1,#menu a.h1:hover{display:block;height:0;width:175px;padding:40px 0 0 0;overflow:hidden;float:left;border:0;margin:0;
outline:0;background:url(http://www.bradezone.com/random/adminer_logo.gif) no-repeat;line-height:32px} outline:0;background:url(//www.bradezone.com/random/adminer_logo.gif) no-repeat;line-height:32px}
#menu p{white-space:nowrap;border:0;padding:0 0 4px 0;margin:0 0 4px 0} #menu p,#tables{white-space:nowrap;border:0;padding:0 0 4px 0;margin:0 0 4px 0}
#breadcrumb{background:#333;color:#fff;position:fixed;top:0;left:320px;width:100%;line-height:40px;padding:0;z-index:1;margin:0} #breadcrumb{background:#333;color:#fff;position:fixed;top:0;left:320px;width:100%;line-height:40px;padding:0;z-index:1;margin:0}
#breadcrumb a{color:#ff9} #breadcrumb a{color:#ff9}
#breadcrumb a:hover{background:transparent;color:#ff9;border-color:#ff9} #breadcrumb a:hover{background:transparent;color:#ff9;border-color:#ff9}

View File

@@ -339,7 +339,7 @@ border: 1px solid #E3E3E3;
#menu form { #menu form {
margin: 0; margin: 0;
} }
#menu p { #menu p, #tables {
padding-left: 8px; padding-left: 8px;
border-bottom: none; border-bottom: none;
} }

View File

@@ -173,13 +173,14 @@ h3{
margin:0;} margin:0;}
#menu form{ #menu form{
margin:0;} margin:0;}
#menu p{ #menu p,#tables{
padding-left:8px; padding-left:8px;
border-bottom:none;} border-bottom:none;}
#menu form p{ #menu form p{
padding-left:0; padding-left:0;
text-align:center;} text-align:center;}
#tables a,#tables a b{ #logins a,#tables a,#tables a b{
background: transparent none repeat scroll 0 0;
color:#c00; color:#c00;
padding:0 0.3ex;} padding:0 0.3ex;}
/*#tables a b{background-color:#ff7400;color:black;}*/ /*#tables a b{background-color:#ff7400;color:black;}*/

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