Compare commits
854 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
596f8df373 | ||
|
|
ea0c9d9b5e | ||
|
|
c5ae82ab5b | ||
|
|
0025f2188a | ||
|
|
ea04a7e2c6 | ||
|
|
fc6efa0e12 | ||
|
|
26dafd9320 | ||
|
|
c7f302ca0b | ||
|
|
b6c7708f32 | ||
|
|
ced05d8a44 | ||
|
|
8dde91b2a1 | ||
|
|
8aa420d160 | ||
|
|
6bbc8bc3ea | ||
|
|
c990de3b3e | ||
|
|
411d198d0d | ||
|
|
060c006875 | ||
|
|
42fd6dea8b | ||
|
|
5b38a5b6f1 | ||
|
|
65f8a87629 | ||
|
|
2e4b8c1d36 | ||
|
|
2a5aca0038 | ||
|
|
8cb8a75658 | ||
|
|
647e8d5cc1 | ||
|
|
25329cebf3 | ||
|
|
f839d5ac25 | ||
|
|
406889d7c3 | ||
|
|
8bd53120df | ||
|
|
4a4e58179f | ||
|
|
0b0c0c7e89 | ||
|
|
594c626665 | ||
|
|
001bf042b4 | ||
|
|
fe5a81fd08 | ||
|
|
fe76c6b887 | ||
|
|
3ff5930d18 | ||
|
|
f782af67e2 | ||
|
|
536e9a58ad | ||
|
|
5dc5bfe7ff | ||
|
|
8fc70327fb | ||
|
|
0fb7260fd4 | ||
|
|
0ed7b6b058 | ||
|
|
00eb35b4f5 | ||
|
|
4f7ff182b1 | ||
|
|
9c534a0a80 | ||
|
|
8871fffb7c | ||
|
|
d029cadd60 | ||
|
|
45bc098262 | ||
|
|
3052952733 | ||
|
|
f9d76cea9a | ||
|
|
da61118303 | ||
|
|
37c8a3a123 | ||
|
|
a987a2a4de | ||
|
|
1c56b3b206 | ||
|
|
594085c6f5 | ||
|
|
7a370e7885 | ||
|
|
933f041f4d | ||
|
|
abc8be3317 | ||
|
|
51986426b7 | ||
|
|
a3e1cd7bb6 | ||
|
|
3e769815bf | ||
|
|
9e28e9f7ae | ||
|
|
0e78996fdb | ||
|
|
8d432beb3d | ||
|
|
02e574c8e9 | ||
|
|
c38f25b5d6 | ||
|
|
024d73934f | ||
|
|
9315954f3e | ||
|
|
fe57642b6c | ||
|
|
7066325e41 | ||
|
|
b08631dab3 | ||
|
|
767af152f9 | ||
|
|
4ee84efa3e | ||
|
|
04356ca0b0 | ||
|
|
f80b296a1a | ||
|
|
52eee61247 | ||
|
|
7e3f2d9b1d | ||
|
|
8bd3dca2f7 | ||
|
|
b87d43fdcd | ||
|
|
06a2d87e55 | ||
|
|
50b33db7e2 | ||
|
|
3e4c6d67e5 | ||
|
|
4fe6bad829 | ||
|
|
13f08f7255 | ||
|
|
8c985124f2 | ||
|
|
1127082dd2 | ||
|
|
9b34f7906f | ||
|
|
b9bc67d331 | ||
|
|
033b967505 | ||
|
|
5308e7171b | ||
|
|
cbce3f1395 | ||
|
|
e62fc3a07b | ||
|
|
03e31ed154 | ||
|
|
ad96c516ac | ||
|
|
0c8cd8e5f7 | ||
|
|
6aed2f510a | ||
|
|
c7f444049d | ||
|
|
2e9ac3ba75 | ||
|
|
bc466f7f85 | ||
|
|
15ea9bba81 | ||
|
|
c2ae381aaf | ||
|
|
96c8e6fb71 | ||
|
|
ba7af8e31c | ||
|
|
794ba74be4 | ||
|
|
3ac662c755 | ||
|
|
ee124dadb1 | ||
|
|
06f4346cfe | ||
|
|
619b49c3d4 | ||
|
|
cd64b707bd | ||
|
|
6980d1a1d2 | ||
|
|
00da70626d | ||
|
|
4d491d704e | ||
|
|
73629178d8 | ||
|
|
8670cfc31b | ||
|
|
bbcc8f141d | ||
|
|
2f881b2674 | ||
|
|
46bb56cab9 | ||
|
|
fc668ea326 | ||
|
|
95b0237061 | ||
|
|
fa01efa059 | ||
|
|
6a3ede75f6 | ||
|
|
d9fe03e1b4 | ||
|
|
67a29ff495 | ||
|
|
828a54deba | ||
|
|
fd4344c866 | ||
|
|
c369236333 | ||
|
|
a710c28d38 | ||
|
|
8ea900534f | ||
|
|
4c5667b93f | ||
|
|
7da82a12a6 | ||
|
|
9567e5cb1a | ||
|
|
052b019210 | ||
|
|
4d8667db7b | ||
|
|
0fdedcbaa5 | ||
|
|
7639ff8b95 | ||
|
|
990b3b8ccc | ||
|
|
2b78d06646 | ||
|
|
1088cc5dca | ||
|
|
8e4882b801 | ||
|
|
d53ffc2158 | ||
|
|
ef81b5c1b2 | ||
|
|
849f9259b8 | ||
|
|
1602db304a | ||
|
|
822f3f2498 | ||
|
|
150301ed5f | ||
|
|
3e2288eee5 | ||
|
|
f4592e3603 | ||
|
|
cbb612aaaa | ||
|
|
38f4735758 | ||
|
|
6acf188c2f | ||
|
|
125b519937 | ||
|
|
d5a2afeef7 | ||
|
|
147957cef7 | ||
|
|
adae922f36 | ||
|
|
81037ca4fb | ||
|
|
7e9725782d | ||
|
|
32d542b633 | ||
|
|
bb7331e6a0 | ||
|
|
60c8ec61e3 | ||
|
|
e9b5616657 | ||
|
|
24eb008794 | ||
|
|
9edfe6d1ff | ||
|
|
91bb94eda6 | ||
|
|
63a04ff753 | ||
|
|
c106cf2a34 | ||
|
|
5136b62e84 | ||
|
|
ed13006512 | ||
|
|
9824540ed8 | ||
|
|
48848de529 | ||
|
|
2a9a50553b | ||
|
|
4bab88a1a0 | ||
|
|
f301fc2dcd | ||
|
|
b99148daeb | ||
|
|
34384b8256 | ||
|
|
6ff96b3ec2 | ||
|
|
df0564862e | ||
|
|
691f319f26 | ||
|
|
55ad89b309 | ||
|
|
740843446f | ||
|
|
44ad4e174d | ||
|
|
2ecff21280 | ||
|
|
dbf5eede9d | ||
|
|
4183f73548 | ||
|
|
0830f5ce89 | ||
|
|
99c70e9ef6 | ||
|
|
09836534ef | ||
|
|
e5b5e98a7d | ||
|
|
72fa9ff0b5 | ||
|
|
ad00e5e965 | ||
|
|
17a7865153 | ||
|
|
1d52a4c1d5 | ||
|
|
a8b7951a11 | ||
|
|
b40bfb94f5 | ||
|
|
1bb436080b | ||
|
|
9ac04aa5b9 | ||
|
|
be0c1e1b49 | ||
|
|
cb4eb8a467 | ||
|
|
6103758e68 | ||
|
|
4b6d02cdf8 | ||
|
|
1c0c335d38 | ||
|
|
4f7e5f25a0 | ||
|
|
b90a12bfb4 | ||
|
|
cff70ad1df | ||
|
|
a7d475e3e7 | ||
|
|
39a68b9b14 | ||
|
|
c8305c4cf5 | ||
|
|
5f3f208bc4 | ||
|
|
dc4485f0a9 | ||
|
|
7d83d0ecb9 | ||
|
|
683f6eefc7 | ||
|
|
5444647f61 | ||
|
|
184273750a | ||
|
|
1fdfc407d1 | ||
|
|
2faeccc3ff | ||
|
|
47fc034746 | ||
|
|
8829a8e808 | ||
|
|
b9d9f3c7bc | ||
|
|
9995e35659 | ||
|
|
f44c8fedf7 | ||
|
|
2867a3f10d | ||
|
|
49f4ef5c52 | ||
|
|
8f79244220 | ||
|
|
1de6fed32a | ||
|
|
e72495e4de | ||
|
|
8c8f659028 | ||
|
|
df8fce2bf9 | ||
|
|
650f61cac1 | ||
|
|
64af68a30b | ||
|
|
7d330a2d4b | ||
|
|
f4d2794c9c | ||
|
|
8cd4f6e225 | ||
|
|
0c710f65d4 | ||
|
|
3d0605a8e7 | ||
|
|
17c8dea525 | ||
|
|
3aca451f26 | ||
|
|
da21494a52 | ||
|
|
7aa1428d71 | ||
|
|
45540fdae9 | ||
|
|
a41ee665e9 | ||
|
|
abbacd4377 | ||
|
|
e71e4ccb4c | ||
|
|
2c8d81c1ae | ||
|
|
f41ffd9ee1 | ||
|
|
61cdde0797 | ||
|
|
372a0e22a7 | ||
|
|
9d2f3c8703 | ||
|
|
f503d8130b | ||
|
|
8d9ef7afd2 | ||
|
|
bcbec6871f | ||
|
|
cfe76ffaf0 | ||
|
|
a564bba261 | ||
|
|
31abc08df8 | ||
|
|
dd885e1d3a | ||
|
|
f757128dd9 | ||
|
|
f3e7bf849a | ||
|
|
b021664203 | ||
|
|
3736f2229f | ||
|
|
c1b9a9a46c | ||
|
|
994fa4f1ea | ||
|
|
6160604023 | ||
|
|
1bdb65c4dc | ||
|
|
c0fe3a6ff7 | ||
|
|
37c97a18ca | ||
|
|
4f7bffd771 | ||
|
|
fb886bda4c | ||
|
|
657191eed8 | ||
|
|
3f47f63c61 | ||
|
|
6317c7737d | ||
|
|
8a1b8910c1 | ||
|
|
62e582456e | ||
|
|
1dcde25561 | ||
|
|
804fb36faa | ||
|
|
390d10284d | ||
|
|
145a8c62ff | ||
|
|
f6e24b1646 | ||
|
|
bc725959e6 | ||
|
|
7aca91a808 | ||
|
|
28856804a4 | ||
|
|
85d212c226 | ||
|
|
961ec0b857 | ||
|
|
facd49a195 | ||
|
|
faabb9ef38 | ||
|
|
9fdcff3c1c | ||
|
|
e411291537 | ||
|
|
21cc6ceb59 | ||
|
|
6664b0fb7e | ||
|
|
4e22af6de0 | ||
|
|
646fb067ca | ||
|
|
e85aff166f | ||
|
|
114aaec91e | ||
|
|
33236f7a83 | ||
|
|
2e245412dc | ||
|
|
9ffca2f6e6 | ||
|
|
076a0a2634 | ||
|
|
74f965df88 | ||
|
|
e7e5559df5 | ||
|
|
3cf3560a20 | ||
|
|
21dc4d939c | ||
|
|
d92531c7fb | ||
|
|
376384d98d | ||
|
|
58bbea56cd | ||
|
|
507b224c95 | ||
|
|
5e2afaba9f | ||
|
|
9043c4b219 | ||
|
|
e8c6ef04d2 | ||
|
|
34349f1482 | ||
|
|
cbd690dd71 | ||
|
|
5a0d56e910 | ||
|
|
e2ef558e5f | ||
|
|
07ba250939 | ||
|
|
0d074077bb | ||
|
|
e0ef072bd0 | ||
|
|
877f9cf360 | ||
|
|
8f96e15296 | ||
|
|
90b09fc60f | ||
|
|
aef38b0530 | ||
|
|
19b4148a37 | ||
|
|
9a7805c318 | ||
|
|
e8e3c5789b | ||
|
|
39b5bd5fc4 | ||
|
|
c95be3adae | ||
|
|
837e6b6b31 | ||
|
|
6e839eddbb | ||
|
|
9e2592f35f | ||
|
|
32ff363ee3 | ||
|
|
0be7532b70 | ||
|
|
3b3d169c72 | ||
|
|
f8453fe65c | ||
|
|
a338f9bf58 | ||
|
|
b8ece2fb5d | ||
|
|
6f6f69a891 | ||
|
|
ddd5c7586b | ||
|
|
dec121d455 | ||
|
|
10c7c4eb93 | ||
|
|
feeda916f7 | ||
|
|
ffb2b5e80c | ||
|
|
9b32d638bb | ||
|
|
be6b7c6cac | ||
|
|
352f29804e | ||
|
|
127b3f6154 | ||
|
|
75439423d9 | ||
|
|
af4269f26d | ||
|
|
e1ad0e4f39 | ||
|
|
5328619593 | ||
|
|
36d839cf28 | ||
|
|
166a2f67f8 | ||
|
|
999215a7e9 | ||
|
|
0ec2fbb4d4 | ||
|
|
4d7c675cab | ||
|
|
bbc2c6a9da | ||
|
|
73225975d7 | ||
|
|
491cdefc84 | ||
|
|
9ab32bdb3c | ||
|
|
20285c4550 | ||
|
|
07db5e0bfb | ||
|
|
b788a9e69b | ||
|
|
fc427f4f3a | ||
|
|
e80754a191 | ||
|
|
89b366bc1b | ||
|
|
7a1133a2fd | ||
|
|
56b0917acd | ||
|
|
9de402aaf0 | ||
|
|
e5dad4ade2 | ||
|
|
c1b0ecda3e | ||
|
|
c6b4f2e1d3 | ||
|
|
1060a3f9eb | ||
|
|
d17b17e515 | ||
|
|
b7739dc0bd | ||
|
|
1f7fa44923 | ||
|
|
5557adf289 | ||
|
|
ab80a40269 | ||
|
|
c3b3572d83 | ||
|
|
406bc96cec | ||
|
|
340a1c2c2f | ||
|
|
ffc1fa000f | ||
|
|
c2a3bec036 | ||
|
|
10f500dfea | ||
|
|
19c4890018 | ||
|
|
219a3c51c8 | ||
|
|
4285d73bbc | ||
|
|
5f9069cc1b | ||
|
|
22b0a85acf | ||
|
|
7c109ba274 | ||
|
|
1a0ba88f8d | ||
|
|
2f1b337d9e | ||
|
|
e7c79f8725 | ||
|
|
04a36e9af9 | ||
|
|
6a551c2d73 | ||
|
|
48356d8d4f | ||
|
|
f4addc5259 | ||
|
|
679e818fca | ||
|
|
063ddcced5 | ||
|
|
4a6b289c8e | ||
|
|
bc2001a939 | ||
|
|
273712ad72 | ||
|
|
6948350552 | ||
|
|
1aa3144d05 | ||
|
|
9bfc2a311c | ||
|
|
877d9ba5ce | ||
|
|
749f51afe6 | ||
|
|
ba1bb263b3 | ||
|
|
82a63f335b | ||
|
|
50d2054e36 | ||
|
|
13f34d1ea9 | ||
|
|
2cf2021995 | ||
|
|
5f370927f1 | ||
|
|
c8248bb19c | ||
|
|
3a8191b7ac | ||
|
|
7dd454f0b4 | ||
|
|
e51640eb98 | ||
|
|
2e32bf1f97 | ||
|
|
27c7a218bd | ||
|
|
2e4a7121a9 | ||
|
|
81e134f872 | ||
|
|
e680d22023 | ||
|
|
aae2289095 | ||
|
|
4660ff852c | ||
|
|
f29a7cb140 | ||
|
|
64297aea60 | ||
|
|
41cde565d5 | ||
|
|
e80eb058e9 | ||
|
|
7dd90f56f1 | ||
|
|
8e0ead4678 | ||
|
|
c05e332ca3 | ||
|
|
717f4535a9 | ||
|
|
d100a1ed9a | ||
|
|
21756c492a | ||
|
|
26ad18bab2 | ||
|
|
e04be3a996 | ||
|
|
0869ff02c6 | ||
|
|
1dc9044ff4 | ||
|
|
5eb3eaa06e | ||
|
|
55c494b767 | ||
|
|
005c963e2d | ||
|
|
2c381345b4 | ||
|
|
15e698d302 | ||
|
|
7be9d5c7ca | ||
|
|
2dfe2640db | ||
|
|
68aba96c72 | ||
|
|
bf94b88503 | ||
|
|
b51d4ab105 | ||
|
|
fabfb8a0bc | ||
|
|
5a4d1b3704 | ||
|
|
982974fe27 | ||
|
|
3ed0ce926c | ||
|
|
65fae98558 | ||
|
|
af30f59737 | ||
|
|
2f996ba014 | ||
|
|
b7e0f1d81c | ||
|
|
20915b1764 | ||
|
|
516416e72b | ||
|
|
c38655418b | ||
|
|
046da00eb6 | ||
|
|
22f0a5ded8 | ||
|
|
6a41240c42 | ||
|
|
a09916737e | ||
|
|
e99463b295 | ||
|
|
b7021c9c7f | ||
|
|
94a0cc8de8 | ||
|
|
9c78b3bb34 | ||
|
|
0e6003e833 | ||
|
|
601cdd43c1 | ||
|
|
17a8495c2e | ||
|
|
40c61f6cfc | ||
|
|
63c400f95d | ||
|
|
34adf46293 | ||
|
|
1ecdde0500 | ||
|
|
7f05141b89 | ||
|
|
d513de4d71 | ||
|
|
18d51c6b6e | ||
|
|
5eda7e547f | ||
|
|
f7e671448c | ||
|
|
d97ae22fb4 | ||
|
|
49c1484722 | ||
|
|
7541ceb1ca | ||
|
|
2afd915f00 | ||
|
|
5a0be7e7fe | ||
|
|
de2c3968d4 | ||
|
|
e24d1fcb02 | ||
|
|
3cae3e2f7f | ||
|
|
fd5e6ef343 | ||
|
|
8ae8507972 | ||
|
|
b0b4cb1576 | ||
|
|
ada8917e43 | ||
|
|
e287642e26 | ||
|
|
4858f332c8 | ||
|
|
91dbaca3c4 | ||
|
|
741cd5b4b6 | ||
|
|
0f47ae8e0f | ||
|
|
01a2722c94 | ||
|
|
3bc5c17d03 | ||
|
|
a199998f54 | ||
|
|
c4040f03d9 | ||
|
|
db7d05b3ec | ||
|
|
3d07d8bbd8 | ||
|
|
bcd1e059f5 | ||
|
|
0eadfc2b3f | ||
|
|
c270a06fb1 | ||
|
|
2b58ebe327 | ||
|
|
a72347f3c7 | ||
|
|
6f58f5af44 | ||
|
|
6bdfec0a1a | ||
|
|
93f581175f | ||
|
|
971c51783f | ||
|
|
ba5e7a1b53 | ||
|
|
46a7e7eea0 | ||
|
|
7af362554a | ||
|
|
a8947b62b8 | ||
|
|
37adf537c9 | ||
|
|
e8e95e5fd7 | ||
|
|
285afc202a | ||
|
|
8cce005b70 | ||
|
|
433357f824 | ||
|
|
d97300dd5a | ||
|
|
99221f3265 | ||
|
|
fee31e73c1 | ||
|
|
2c626c7fc7 | ||
|
|
3093f58157 | ||
|
|
1a1b800b40 | ||
|
|
e4d5835dab | ||
|
|
aba9d23ba2 | ||
|
|
190812456f | ||
|
|
58a8df7c86 | ||
|
|
cb57afd0e5 | ||
|
|
b14a2a5330 | ||
|
|
0cd85c1ce9 | ||
|
|
c69d9fcfdf | ||
|
|
5739e03e97 | ||
|
|
79b61855e5 | ||
|
|
7769cab32c | ||
|
|
f3920f381d | ||
|
|
f697486884 | ||
|
|
5d68a29b3e | ||
|
|
e531d6ef41 | ||
|
|
a38ea926f2 | ||
|
|
5b36472a45 | ||
|
|
e139f94561 | ||
|
|
50528be5cb | ||
|
|
2323f433c4 | ||
|
|
f43ef7b083 | ||
|
|
e1545065f0 | ||
|
|
9a4b30a646 | ||
|
|
2b2d6987ef | ||
|
|
356cadf2b2 | ||
|
|
8caa889635 | ||
|
|
dd9167a101 | ||
|
|
34633a4e60 | ||
|
|
3d2b869f2e | ||
|
|
737c2bdc0e | ||
|
|
1e310977b6 | ||
|
|
79fd0238b5 | ||
|
|
f86cb5f837 | ||
|
|
de0d3aca84 | ||
|
|
51b7104342 | ||
|
|
15e83e9396 | ||
|
|
0448bd118c | ||
|
|
632cc7c014 | ||
|
|
7a62838510 | ||
|
|
da2a0190a4 | ||
|
|
8eaad7475c | ||
|
|
f6e1c589f9 | ||
|
|
61dc40a512 | ||
|
|
35b6491a3c | ||
|
|
0cd81fddb0 | ||
|
|
a9262d8752 | ||
|
|
588cb7c0c3 | ||
|
|
b5ad37ff2b | ||
|
|
8bf02f2ce1 | ||
|
|
00b9e2c010 | ||
|
|
cdec2c9292 | ||
|
|
ce83605174 | ||
|
|
0069d9f13e | ||
|
|
ab20c18c2e | ||
|
|
0ac5a666b4 | ||
|
|
ed71d4a1f5 | ||
|
|
2703eb960a | ||
|
|
8c91fd5966 | ||
|
|
f7f553a947 | ||
|
|
2fb1ebc7f1 | ||
|
|
ef723fb348 | ||
|
|
ebdecd288b | ||
|
|
998ef45b08 | ||
|
|
d5d8a6c8bc | ||
|
|
ee8ffa575f | ||
|
|
d2ee9d85b1 | ||
|
|
a5548ce823 | ||
|
|
697034f329 | ||
|
|
cb1d7d459b | ||
|
|
fa4026bdbd | ||
|
|
0408c21d07 | ||
|
|
7015fd9706 | ||
|
|
7865695a86 | ||
|
|
dad8996c01 | ||
|
|
0614260544 | ||
|
|
da08af5eb9 | ||
|
|
75c430a986 | ||
|
|
7ce485bc78 | ||
|
|
8ec3e5fcda | ||
|
|
6705fb2993 | ||
|
|
29e65523d3 | ||
|
|
b684569f7c | ||
|
|
996bfc396b | ||
|
|
f3c59bb3a5 | ||
|
|
906345ad81 | ||
|
|
4024f34d79 | ||
|
|
2264e09021 | ||
|
|
9a30f14797 | ||
|
|
189895ad0f | ||
|
|
86b0fbf529 | ||
|
|
a89ab34a8e | ||
|
|
534f4ee5cc | ||
|
|
55c757a59a | ||
|
|
63872de0f9 | ||
|
|
360218be0c | ||
|
|
57d0c4c6f5 | ||
|
|
ebbb35a0c3 | ||
|
|
9bfab6a3e3 | ||
|
|
312075d01f | ||
|
|
66d537c150 | ||
|
|
944f141bf4 | ||
|
|
d5400234f0 | ||
|
|
31a608e398 | ||
|
|
aff4d7de91 | ||
|
|
dd49dfb4cd | ||
|
|
d2d104b3b9 | ||
|
|
a0d00cf732 | ||
|
|
741c073c95 | ||
|
|
de451010b1 | ||
|
|
8d3afc0eb5 | ||
|
|
63c9873c30 | ||
|
|
dd86e1892d | ||
|
|
e767663f65 | ||
|
|
caa9f490af | ||
|
|
415f500f10 | ||
|
|
0317638e80 | ||
|
|
ccd1246666 | ||
|
|
85d985a319 | ||
|
|
5d257861e1 | ||
|
|
09d81ffee9 | ||
|
|
b7f1d56fe0 | ||
|
|
195a811466 | ||
|
|
4cb14deac1 | ||
|
|
541561be4d | ||
|
|
8db73ad7ea | ||
|
|
d8006df483 | ||
|
|
b9eb811e66 | ||
|
|
eb9bd30621 | ||
|
|
47e52b6761 | ||
|
|
700a78b377 | ||
|
|
5d337fe04c | ||
|
|
beafccb8c3 | ||
|
|
364dcfe632 | ||
|
|
68211ac42b | ||
|
|
ef0cb38aa1 | ||
|
|
ea6d6e0d44 | ||
|
|
72b801513b | ||
|
|
fc689f5953 | ||
|
|
6a7021db28 | ||
|
|
1f53cd3386 | ||
|
|
5e0038b62d | ||
|
|
c9da3ccb51 | ||
|
|
37013522a1 | ||
|
|
b7af79e745 | ||
|
|
0da02c5505 | ||
|
|
7674576dcb | ||
|
|
2a97e02cdd | ||
|
|
bcf7e7e04b | ||
|
|
65a8c7dde4 | ||
|
|
3a381564e5 | ||
|
|
f9cbf50bd7 | ||
|
|
f0d97a7c7f | ||
|
|
98bc4fc4d2 | ||
|
|
2d18afaf7f | ||
|
|
9a3b3db4f6 | ||
|
|
a4e38a266d | ||
|
|
ca32e71e42 | ||
|
|
4b4fa16a37 | ||
|
|
69d49e30c5 | ||
|
|
7fcfb0d16a | ||
|
|
1501d60f14 | ||
|
|
e5b1c99d87 | ||
|
|
b49061b863 | ||
|
|
5fd21e122a | ||
|
|
b783b9487d | ||
|
|
99343701ab | ||
|
|
c09a147b2e | ||
|
|
a0af3eec5c | ||
|
|
1dd6dbcce2 | ||
|
|
95f0a5f0f0 | ||
|
|
335ab7eab2 | ||
|
|
6a486181dd | ||
|
|
57e5896b55 | ||
|
|
ac668d1331 | ||
|
|
55831095b6 | ||
|
|
07e2c3b2a4 | ||
|
|
e2dbb9c7bd | ||
|
|
e8b95f127f | ||
|
|
f1153aa35a | ||
|
|
5e4b815893 | ||
|
|
a227ec1c97 | ||
|
|
98483e101d | ||
|
|
c2f95e0054 | ||
|
|
5fb2368b66 | ||
|
|
385fdd45b8 | ||
|
|
56cd77f0d1 | ||
|
|
7291ae608d | ||
|
|
6a3cf71db5 | ||
|
|
514ff41c7c | ||
|
|
dafd2deef2 | ||
|
|
6a96c14948 | ||
|
|
091a4d04f4 | ||
|
|
a71b99096c | ||
|
|
a833468c0a | ||
|
|
54f464a893 | ||
|
|
7de0b21e16 | ||
|
|
b78b0cd109 | ||
|
|
f158d5e392 | ||
|
|
5b57706890 | ||
|
|
0d5543c9ac | ||
|
|
7363429b52 | ||
|
|
6ca4082e6c | ||
|
|
8daf581c21 | ||
|
|
eb05475337 | ||
|
|
b2f5f5689d | ||
|
|
a1e4e87b82 | ||
|
|
97566acd75 | ||
|
|
4a6c72cd1c | ||
|
|
7f1fcc2286 | ||
|
|
a2378af008 | ||
|
|
56ac3d1817 | ||
|
|
739bcb0979 | ||
|
|
b0666e537d | ||
|
|
8339b14da3 | ||
|
|
5dc90731eb | ||
|
|
f498219f29 | ||
|
|
2db14e4bc2 | ||
|
|
8be29afb9b | ||
|
|
f595f9313e | ||
|
|
6591d485e9 | ||
|
|
40ad846d20 | ||
|
|
c4a57246ac | ||
|
|
20cf6d29c5 | ||
|
|
17ef1f0dfc | ||
|
|
5ac72dd739 | ||
|
|
06595f90e4 | ||
|
|
4f3fddc870 | ||
|
|
336a32c144 | ||
|
|
0e31b09543 | ||
|
|
20e11be093 | ||
|
|
d6c5f85a24 | ||
|
|
a280179bd5 | ||
|
|
7f1afde592 | ||
|
|
70fb696fbd | ||
|
|
b16bb54219 | ||
|
|
9188d21ea3 | ||
|
|
3ada73d5ed | ||
|
|
047ce184f5 | ||
|
|
4815c7d020 | ||
|
|
bf54c13dfe | ||
|
|
48df7aa1c9 | ||
|
|
77ec05d50b | ||
|
|
4dc3ec6a0d | ||
|
|
24c51fe11f | ||
|
|
b254503fb2 | ||
|
|
ea0a6a5a01 | ||
|
|
e36afcc127 | ||
|
|
bf4f0a1f9e | ||
|
|
a6f10787bb | ||
|
|
cc1398e5a4 | ||
|
|
00b3bc3f2c | ||
|
|
a186460648 | ||
|
|
2d942e692d | ||
|
|
2dcfb70d08 | ||
|
|
405ad5f07e | ||
|
|
b959ba41c6 | ||
|
|
22125790b3 | ||
|
|
f539836fd5 | ||
|
|
2ca26386c2 | ||
|
|
4cc29e0137 | ||
|
|
a25fa67e06 | ||
|
|
99a75c3c44 | ||
|
|
83113cbe67 | ||
|
|
d35f83fb8d | ||
|
|
7f2e97f0d2 | ||
|
|
c6c48553b8 | ||
|
|
27c046f753 | ||
|
|
9e7fcdf32c | ||
|
|
c7f1a6322e | ||
|
|
640afc74d7 | ||
|
|
6bcbb0f1d8 | ||
|
|
41e197ac06 | ||
|
|
9fd2880968 | ||
|
|
70994abcbd | ||
|
|
7e97fcd0b9 | ||
|
|
bbbf4eeb79 | ||
|
|
3c5c08e793 | ||
|
|
27b5e46a45 | ||
|
|
af3b762067 | ||
|
|
1e70b74f4c | ||
|
|
543e172513 | ||
|
|
841cbbb7d2 | ||
|
|
fd7e8cbaae | ||
|
|
468644e2d8 | ||
|
|
319abbaf2f | ||
|
|
b848764299 | ||
|
|
ed25431f3c | ||
|
|
6b3e3c2532 | ||
|
|
0e0b79b815 | ||
|
|
998e2f5027 | ||
|
|
ef867e6bd1 | ||
|
|
bed3856f2d | ||
|
|
3ed7f453bc | ||
|
|
dd85aa5d6a | ||
|
|
c456f52d9f | ||
|
|
9d34071eb9 | ||
|
|
db3ae281bb | ||
|
|
de056d41c2 | ||
|
|
0f1c2c217b | ||
|
|
ce0d001e8b | ||
|
|
3a333e92ff | ||
|
|
9d944c8fc1 | ||
|
|
2348c4cd4c | ||
|
|
e6843dfbc1 | ||
|
|
2dd39c6df5 | ||
|
|
a4c2b4a7cb | ||
|
|
daf60b29f8 | ||
|
|
a88dccb961 | ||
|
|
43e646eb54 | ||
|
|
8a06b35c44 | ||
|
|
2b472a5c10 | ||
|
|
112c9b3d87 | ||
|
|
5d1a84d390 | ||
|
|
2830ecd2e1 | ||
|
|
e854a04117 | ||
|
|
75783421f1 | ||
|
|
5a58d35405 | ||
|
|
023b62a39c | ||
|
|
bf8b620560 | ||
|
|
1370d29d27 | ||
|
|
93e835aea8 | ||
|
|
9c6a5cd542 | ||
|
|
afa70c94e5 | ||
|
|
74e199e488 | ||
|
|
71e0db4106 | ||
|
|
db2ac19b80 | ||
|
|
b92fe58553 | ||
|
|
b358a2dd62 | ||
|
|
c75ee44387 | ||
|
|
734f0881f0 | ||
|
|
0ced6d33ce | ||
|
|
b7e1cb09c1 | ||
|
|
1a30f25311 | ||
|
|
5275ed870b | ||
|
|
a30f149376 | ||
|
|
b96facf0af | ||
|
|
e011b87670 |
2
.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
/adminer/adminer.css
|
||||
/adminer*.php
|
||||
/editor*.php
|
||||
/vendor/
|
||||
|
||||
17
.gitmodules
vendored
@@ -1,18 +1,9 @@
|
||||
[submodule "jush"]
|
||||
path = externals/jush
|
||||
url = git://jush.git.sourceforge.net/gitroot/jush/jush
|
||||
[submodule "jsmin-php"]
|
||||
path = externals/jsmin-php
|
||||
url = git://github.com/rgrove/jsmin-php.git
|
||||
[submodule "tinymce"]
|
||||
path = externals/tinymce
|
||||
url = git://github.com/tinymce/tinymce.git
|
||||
[submodule "jquery-ui"]
|
||||
path = externals/jquery-ui
|
||||
url = git://github.com/jquery/jquery-ui.git
|
||||
[submodule "jquery-timepicker"]
|
||||
path = externals/jquery-timepicker
|
||||
url = git://github.com/trentrichardson/jQuery-Timepicker-Addon.git
|
||||
url = git://git.code.sf.net/p/jush/git
|
||||
[submodule "wymeditor"]
|
||||
path = externals/wymeditor
|
||||
url = git://github.com/wymeditor/wymeditor.git
|
||||
[submodule "JsShrink"]
|
||||
path = externals/JsShrink
|
||||
url = git://github.com/vrana/JsShrink.git
|
||||
|
||||
@@ -28,8 +28,10 @@ if (!$error && $_POST) {
|
||||
}
|
||||
$call[] = (isset($out[$key]) ? "@" . idf_escape($field["field"]) : $val);
|
||||
}
|
||||
|
||||
$query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . idf_escape($PROCEDURE) . "(" . implode(", ", $call) . ")";
|
||||
echo "<p><code class='jush-$jush'>" . h($query) . "</code> <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>\n";
|
||||
|
||||
if (!$connection->multi_query($query)) {
|
||||
echo "<p class='error'>" . error() . "\n";
|
||||
} else {
|
||||
@@ -37,6 +39,7 @@ if (!$error && $_POST) {
|
||||
if (is_object($connection2)) {
|
||||
$connection2->select_db(DB);
|
||||
}
|
||||
|
||||
do {
|
||||
$result = $connection->store_result();
|
||||
if (is_object($result)) {
|
||||
@@ -45,6 +48,7 @@ if (!$error && $_POST) {
|
||||
echo "<p class='message'>" . lang('Routine has been called, %d row(s) affected.', $connection->affected_rows) . "\n";
|
||||
}
|
||||
} while ($connection->next_result());
|
||||
|
||||
if ($out) {
|
||||
select($connection->query("SELECT " . implode(", ", $out)));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<?php
|
||||
$TABLE = $_GET["create"];
|
||||
$partition_by = array('HASH', 'LINEAR HASH', 'KEY', 'LINEAR KEY', 'RANGE', 'LIST');
|
||||
$partition_by = array();
|
||||
foreach (array('HASH', 'LINEAR HASH', 'KEY', 'LINEAR KEY', 'RANGE', 'LIST') as $key) {
|
||||
$partition_by[$key] = $key;
|
||||
}
|
||||
|
||||
$referencable_primary = referencable_primary($TABLE);
|
||||
$foreign_keys = array();
|
||||
@@ -9,136 +12,144 @@ foreach ($referencable_primary as $table_name => $field) {
|
||||
}
|
||||
|
||||
$orig_fields = array();
|
||||
$orig_status = array();
|
||||
$table_status = array();
|
||||
if ($TABLE != "") {
|
||||
$orig_fields = fields($TABLE);
|
||||
$orig_status = table_status($TABLE);
|
||||
}
|
||||
if ($_POST && !$_POST["fields"]) {
|
||||
$_POST["fields"] = array();
|
||||
$table_status = table_status($TABLE);
|
||||
if (!$table_status) {
|
||||
$error = lang('No tables.');
|
||||
}
|
||||
}
|
||||
|
||||
if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"] && !$_POST["down"]) {
|
||||
$row = $_POST;
|
||||
$row["fields"] = (array) $row["fields"];
|
||||
if ($row["auto_increment_col"]) {
|
||||
$row["fields"][$row["auto_increment_col"]]["auto_increment"] = true;
|
||||
}
|
||||
|
||||
if ($_POST && !process_fields($row["fields"]) && !$error) {
|
||||
if ($_POST["drop"]) {
|
||||
query_redirect("DROP TABLE " . table($TABLE), substr(ME, 0, -1), lang('Table has been dropped.'));
|
||||
queries_redirect(substr(ME, 0, -1), lang('Table has been dropped.'), drop_tables(array($TABLE)));
|
||||
} else {
|
||||
$fields = array();
|
||||
$all_fields = array();
|
||||
$use_all_fields = false;
|
||||
$foreign = array();
|
||||
ksort($_POST["fields"]);
|
||||
ksort($row["fields"]);
|
||||
$orig_field = reset($orig_fields);
|
||||
$after = "FIRST";
|
||||
foreach ($_POST["fields"] as $key => $field) {
|
||||
$after = " FIRST";
|
||||
|
||||
foreach ($row["fields"] as $key => $field) {
|
||||
$foreign_key = $foreign_keys[$field["type"]];
|
||||
$type_field = (isset($foreign_key) ? $referencable_primary[$foreign_key] : $field); //! can collide with user defined type
|
||||
$type_field = ($foreign_key !== null ? $referencable_primary[$foreign_key] : $field); //! can collide with user defined type
|
||||
if ($field["field"] != "") {
|
||||
if (!$field["has_default"]) {
|
||||
$field["default"] = null;
|
||||
}
|
||||
$default = eregi_replace(" *on update CURRENT_TIMESTAMP", "", $field["default"]);
|
||||
if ($default != $field["default"]) { // preg_replace $count is available since PHP 5.1.0
|
||||
$field["on_update"] = "CURRENT_TIMESTAMP";
|
||||
$field["default"] = $default;
|
||||
}
|
||||
if ($key == $_POST["auto_increment_col"]) {
|
||||
if ($key == $row["auto_increment_col"]) {
|
||||
$field["auto_increment"] = true;
|
||||
}
|
||||
$process_field = process_field($field, $type_field);
|
||||
$all_fields[] = array($field["orig"], $process_field, $after);
|
||||
if ($process_field != process_field($orig_field, $orig_field)) {
|
||||
$fields[] = array($field["orig"], $process_field, $after);
|
||||
if ($field["orig"] != "" || $after) {
|
||||
$use_all_fields = true;
|
||||
}
|
||||
}
|
||||
if (isset($foreign_key)) {
|
||||
$foreign[idf_escape($field["field"])] = ($TABLE != "" ? "ADD" : " ") . " FOREIGN KEY (" . idf_escape($field["field"]) . ") REFERENCES " . table($foreign_keys[$field["type"]]) . " (" . idf_escape($type_field["field"]) . ")" . (ereg("^($on_actions)\$", $field["on_delete"]) ? " ON DELETE $field[on_delete]" : "");
|
||||
if ($foreign_key !== null) {
|
||||
$foreign[idf_escape($field["field"])] = ($TABLE != "" && $jush != "sqlite" ? "ADD" : " ") . format_foreign_key(array(
|
||||
'table' => $foreign_keys[$field["type"]],
|
||||
'source' => array($field["field"]),
|
||||
'target' => array($type_field["field"]),
|
||||
'on_delete' => $field["on_delete"],
|
||||
));
|
||||
}
|
||||
$after = "AFTER " . idf_escape($field["field"]);
|
||||
$after = " AFTER " . idf_escape($field["field"]);
|
||||
} elseif ($field["orig"] != "") {
|
||||
$use_all_fields = true;
|
||||
$fields[] = array($field["orig"]);
|
||||
}
|
||||
if ($field["orig"] != "") {
|
||||
$orig_field = next($orig_fields);
|
||||
}
|
||||
}
|
||||
$partitioning = "";
|
||||
if (in_array($_POST["partition_by"], $partition_by)) {
|
||||
$partitions = array();
|
||||
if ($_POST["partition_by"] == 'RANGE' || $_POST["partition_by"] == 'LIST') {
|
||||
foreach (array_filter($_POST["partition_names"]) as $key => $val) {
|
||||
$value = $_POST["partition_values"][$key];
|
||||
$partitions[] = "\nPARTITION " . idf_escape($val) . " VALUES " . ($_POST["partition_by"] == 'RANGE' ? "LESS THAN" : "IN") . ($value != "" ? " ($value)" : " MAXVALUE"); //! SQL injection
|
||||
if (!$orig_field) {
|
||||
$after = "";
|
||||
}
|
||||
}
|
||||
$partitioning .= "\nPARTITION BY $_POST[partition_by]($_POST[partition])" . ($partitions // $_POST["partition"] can be expression, not only column
|
||||
}
|
||||
|
||||
$partitioning = "";
|
||||
if ($partition_by[$row["partition_by"]]) {
|
||||
$partitions = array();
|
||||
if ($row["partition_by"] == 'RANGE' || $row["partition_by"] == 'LIST') {
|
||||
foreach (array_filter($row["partition_names"]) as $key => $val) {
|
||||
$value = $row["partition_values"][$key];
|
||||
$partitions[] = "\n PARTITION " . idf_escape($val) . " VALUES " . ($row["partition_by"] == 'RANGE' ? "LESS THAN" : "IN") . ($value != "" ? " ($value)" : " MAXVALUE"); //! SQL injection
|
||||
}
|
||||
}
|
||||
$partitioning .= "\nPARTITION BY $row[partition_by]($row[partition])" . ($partitions // $row["partition"] can be expression, not only column
|
||||
? " (" . implode(",", $partitions) . "\n)"
|
||||
: ($_POST["partitions"] ? " PARTITIONS " . (+$_POST["partitions"]) : "")
|
||||
: ($row["partitions"] ? " PARTITIONS " . (+$row["partitions"]) : "")
|
||||
);
|
||||
} elseif ($TABLE != "" && support("partitioning")) {
|
||||
} elseif (support("partitioning") && preg_match("~partitioned~", $table_status["Create_options"])) {
|
||||
$partitioning .= "\nREMOVE PARTITIONING";
|
||||
}
|
||||
|
||||
$message = lang('Table has been altered.');
|
||||
if ($TABLE == "") {
|
||||
cookie("adminer_engine", $_POST["Engine"]);
|
||||
cookie("adminer_engine", $row["Engine"]);
|
||||
$message = lang('Table has been created.');
|
||||
}
|
||||
queries_redirect(ME . "table=" . urlencode($_POST["name"]), $message, alter_table(
|
||||
$name = trim($row["name"]);
|
||||
|
||||
queries_redirect(ME . (support("table") ? "table=" : "select=") . urlencode($name), $message, alter_table(
|
||||
$TABLE,
|
||||
$_POST["name"],
|
||||
$fields,
|
||||
$name,
|
||||
($jush == "sqlite" && ($use_all_fields || $foreign) ? $all_fields : $fields),
|
||||
$foreign,
|
||||
$_POST["Comment"],
|
||||
($_POST["Engine"] && $_POST["Engine"] != $orig_status["Engine"] ? $_POST["Engine"] : ""),
|
||||
($_POST["Collation"] && $_POST["Collation"] != $orig_status["Collation"] ? $_POST["Collation"] : ""),
|
||||
($_POST["Auto_increment"] != "" ? +$_POST["Auto_increment"] : ""),
|
||||
($row["Comment"] != $table_status["Comment"] ? $row["Comment"] : null),
|
||||
($row["Engine"] && $row["Engine"] != $table_status["Engine"] ? $row["Engine"] : ""),
|
||||
($row["Collation"] && $row["Collation"] != $table_status["Collation"] ? $row["Collation"] : ""),
|
||||
($row["Auto_increment"] != "" ? number($row["Auto_increment"]) : ""),
|
||||
$partitioning
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
page_header(($TABLE != "" ? lang('Alter table') : lang('Create table')), $error, array("table" => $TABLE), $TABLE);
|
||||
page_header(($TABLE != "" ? lang('Alter table') : lang('Create table')), $error, array("table" => $TABLE), h($TABLE));
|
||||
|
||||
$row = array(
|
||||
"Engine" => $_COOKIE["adminer_engine"],
|
||||
"fields" => array(array("field" => "", "type" => (isset($types["int"]) ? "int" : (isset($types["integer"]) ? "integer" : "")))),
|
||||
"partition_names" => array(""),
|
||||
);
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
if ($row["auto_increment_col"]) {
|
||||
$row["fields"][$row["auto_increment_col"]]["auto_increment"] = true;
|
||||
}
|
||||
process_fields($row["fields"]);
|
||||
} elseif ($TABLE != "") {
|
||||
$row = $orig_status;
|
||||
$row["name"] = $TABLE;
|
||||
$row["fields"] = array();
|
||||
if (!$_GET["auto_increment"]) { // don't prefill by original Auto_increment for the sake of performance and not reusing deleted ids
|
||||
$row["Auto_increment"] = "";
|
||||
}
|
||||
foreach ($orig_fields as $field) {
|
||||
$field["has_default"] = isset($field["default"]);
|
||||
if ($field["on_update"]) {
|
||||
$field["default"] .= " ON UPDATE $field[on_update]"; // CURRENT_TIMESTAMP
|
||||
if (!$_POST) {
|
||||
$row = array(
|
||||
"Engine" => $_COOKIE["adminer_engine"],
|
||||
"fields" => array(array("field" => "", "type" => (isset($types["int"]) ? "int" : (isset($types["integer"]) ? "integer" : "")))),
|
||||
"partition_names" => array(""),
|
||||
);
|
||||
|
||||
if ($TABLE != "") {
|
||||
$row = $table_status;
|
||||
$row["name"] = $TABLE;
|
||||
$row["fields"] = array();
|
||||
if (!$_GET["auto_increment"]) { // don't prefill by original Auto_increment for the sake of performance and not reusing deleted ids
|
||||
$row["Auto_increment"] = "";
|
||||
}
|
||||
$row["fields"][] = $field;
|
||||
}
|
||||
if (support("partitioning")) {
|
||||
$from = "FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA = " . q(DB) . " AND TABLE_NAME = " . q($TABLE);
|
||||
$result = $connection->query("SELECT PARTITION_METHOD, PARTITION_ORDINAL_POSITION, PARTITION_EXPRESSION $from ORDER BY PARTITION_ORDINAL_POSITION DESC LIMIT 1");
|
||||
list($row["partition_by"], $row["partitions"], $row["partition"]) = $result->fetch_row();
|
||||
$row["partition_names"] = array();
|
||||
$row["partition_values"] = array();
|
||||
foreach (get_rows("SELECT PARTITION_NAME, PARTITION_DESCRIPTION $from AND PARTITION_NAME != '' ORDER BY PARTITION_ORDINAL_POSITION") as $row1) {
|
||||
$row["partition_names"][] = $row1["PARTITION_NAME"];
|
||||
$row["partition_values"][] = $row1["PARTITION_DESCRIPTION"];
|
||||
foreach ($orig_fields as $field) {
|
||||
$field["has_default"] = isset($field["default"]);
|
||||
$row["fields"][] = $field;
|
||||
}
|
||||
|
||||
if (support("partitioning")) {
|
||||
$from = "FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA = " . q(DB) . " AND TABLE_NAME = " . q($TABLE);
|
||||
$result = $connection->query("SELECT PARTITION_METHOD, PARTITION_ORDINAL_POSITION, PARTITION_EXPRESSION $from ORDER BY PARTITION_ORDINAL_POSITION DESC LIMIT 1");
|
||||
list($row["partition_by"], $row["partitions"], $row["partition"]) = $result->fetch_row();
|
||||
$partitions = get_key_vals("SELECT PARTITION_NAME, PARTITION_DESCRIPTION $from AND PARTITION_NAME != '' ORDER BY PARTITION_ORDINAL_POSITION");
|
||||
$partitions[""] = "";
|
||||
$row["partition_names"] = array_keys($partitions);
|
||||
$row["partition_values"] = array_values($partitions);
|
||||
}
|
||||
$row["partition_names"][] = "";
|
||||
}
|
||||
}
|
||||
|
||||
$collations = collations();
|
||||
|
||||
$suhosin = floor(extension_loaded("suhosin") ? (min(ini_get("suhosin.request.max_vars"), ini_get("suhosin.post.max_vars")) - 13) / 10 : 0); // 10 - number of fields per row, 13 - number of other fields
|
||||
if ($suhosin && count($row["fields"]) > $suhosin) {
|
||||
echo "<p class='error'>" . h(lang('Maximum number of allowed fields exceeded. Please increase %s and %s.', 'suhosin.post.max_vars', 'suhosin.request.max_vars')) . "\n";
|
||||
}
|
||||
|
||||
$engines = engines();
|
||||
// case of engine may differ
|
||||
foreach ($engines as $engine) {
|
||||
@@ -151,11 +162,15 @@ foreach ($engines as $engine) {
|
||||
|
||||
<form action="" method="post" id="form">
|
||||
<p>
|
||||
<?php echo lang('Table name'); ?>: <input name="name" maxlength="64" value="<?php echo h($row["name"]); ?>">
|
||||
<?php if ($TABLE == "" && !$_POST) { ?><script type='text/javascript'>document.getElementById('form')['name'].focus();</script><?php } ?>
|
||||
<?php echo ($engines ? html_select("Engine", array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) : ""); ?>
|
||||
<?php echo ($collations && !ereg("sqlite|mssql", $jush) ? html_select("Collation", array("" => "(" . lang('collation') . ")") + $collations, $row["Collation"]) : ""); ?>
|
||||
<?php if (support("columns") || $TABLE == "") { ?>
|
||||
<?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 echo ($engines ? "<select name='Engine' onchange='helpClose();'" . on_help("getTarget(event).value", 1) . ">" . optionlist(array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) . "</select>" : ""); ?>
|
||||
<?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'); ?>">
|
||||
<?php } ?>
|
||||
|
||||
<?php if (support("columns")) { ?>
|
||||
<table cellspacing="0" id="edit-fields" class="nowrap">
|
||||
<?php
|
||||
$comments = ($_POST ? $_POST["comments"] : $row["Comment"] != "");
|
||||
@@ -167,32 +182,38 @@ if (!$_POST && !$comments) {
|
||||
}
|
||||
}
|
||||
}
|
||||
edit_fields($row["fields"], $collations, "TABLE", $suhosin, $foreign_keys, $comments);
|
||||
edit_fields($row["fields"], $collations, "TABLE", $foreign_keys, $comments);
|
||||
?>
|
||||
</table>
|
||||
<p>
|
||||
<?php echo lang('Auto Increment'); ?>: <input name="Auto_increment" size="6" value="<?php echo h($row["Auto_increment"]); ?>">
|
||||
<label class="jsonly"><input type="checkbox" name="defaults" value="1"<?php echo ($_POST["defaults"] ? " checked" : ""); ?> onclick="columnShow(this.checked, 5);"><?php echo lang('Default values'); ?></label>
|
||||
<?php echo (support("comment") ? checkbox("comments", 1, $comments, lang('Comment'), "columnShow(this.checked, 6); toggle('Comment'); if (this.checked) this.form['Comment'].focus();", true) . ' <input id="Comment" name="Comment" value="' . h($row["Comment"]) . '" maxlength="60"' . ($comments ? '' : ' class="hidden"') . '>' : ''); ?>
|
||||
<?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 if (!$_POST["defaults"]) { ?><script type="text/javascript">editingHideDefaults()</script><?php } ?>
|
||||
<?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>"
|
||||
. ' <input name="Comment" id="Comment" value="' . h($row["Comment"]) . '" maxlength="' . ($connection->server_info >= 5.5 ? 2048 : 60) . '"' . ($comments ? '' : ' class="hidden"') . '>'
|
||||
: '')
|
||||
; ?>
|
||||
<p>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<?php if ($_GET["create"] != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?>
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?>
|
||||
<?php
|
||||
if (support("partitioning")) {
|
||||
$partition_table = ereg('RANGE|LIST', $row["partition_by"]);
|
||||
$partition_table = preg_match('~RANGE|LIST~', $row["partition_by"]);
|
||||
print_fieldset("partition", lang('Partition by'), $row["partition_by"]);
|
||||
?>
|
||||
<p>
|
||||
<?php echo html_select("partition_by", array(-1 => "") + $partition_by, $row["partition_by"], "partitionByChange(this);"); ?>
|
||||
<?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>"; ?>
|
||||
(<input name="partition" value="<?php echo h($row["partition"]); ?>">)
|
||||
<?php echo lang('Partitions'); ?>: <input name="partitions" size="2" value="<?php echo h($row["partitions"]); ?>"<?php echo ($partition_table || !$row["partition_by"] ? " class='hidden'" : ""); ?>>
|
||||
<?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'"); ?>>
|
||||
<thead><tr><th><?php echo lang('Partition name'); ?><th><?php echo lang('Values'); ?></thead>
|
||||
<?php
|
||||
foreach ($row["partition_names"] as $key => $val) {
|
||||
echo '<tr>';
|
||||
echo '<td><input name="partition_names[]" value="' . h($val) . '"' . ($key == count($row["partition_names"]) - 1 ? ' onchange="partitionNameChange(this);"' : '') . '>';
|
||||
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_values[]" value="' . h($row["partition_values"][$key]) . '">';
|
||||
}
|
||||
?>
|
||||
@@ -201,4 +222,5 @@ foreach ($row["partition_names"] as $key => $val) {
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
</form>
|
||||
|
||||
@@ -1,47 +1,49 @@
|
||||
<?php
|
||||
$row = $_POST;
|
||||
|
||||
if ($_POST && !$error && !isset($_POST["add_x"])) { // add is an image and PHP changes add.x to add_x
|
||||
restart_session();
|
||||
$name = trim($row["name"]);
|
||||
if ($_POST["drop"]) {
|
||||
$_GET["db"] = ""; // to save in global history
|
||||
queries_redirect(remove_from_uri("db|database"), lang('Database has been dropped.'), drop_databases(array(DB)));
|
||||
} elseif (DB !== $_POST["name"]) {
|
||||
} elseif (DB !== $name) {
|
||||
// create or rename database
|
||||
if (DB != "") {
|
||||
$_GET["db"] = $_POST["name"];
|
||||
queries_redirect(preg_replace('~db=[^&]*&~', '', ME) . "db=" . urlencode($_POST["name"]), lang('Database has been renamed.'), rename_database($_POST["name"], $_POST["collation"]));
|
||||
$_GET["db"] = $name;
|
||||
queries_redirect(preg_replace('~\bdb=[^&]*&~', '', ME) . "db=" . urlencode($name), lang('Database has been renamed.'), rename_database($name, $row["collation"]));
|
||||
} else {
|
||||
$databases = explode("\n", str_replace("\r", "", $_POST["name"]));
|
||||
$databases = explode("\n", str_replace("\r", "", $name));
|
||||
$success = true;
|
||||
$last = "";
|
||||
foreach ($databases as $db) {
|
||||
if (count($databases) == 1 || $db != "") { // ignore empty lines but always try to create single database
|
||||
if (!create_database($db, $_POST["collation"])) {
|
||||
if (!create_database($db, $row["collation"])) {
|
||||
$success = false;
|
||||
}
|
||||
$last = $db;
|
||||
}
|
||||
}
|
||||
restart_session();
|
||||
set_session("dbs", null);
|
||||
queries_redirect(ME . "db=" . urlencode($last), lang('Database has been created.'), $success);
|
||||
}
|
||||
} else {
|
||||
// alter database
|
||||
if (!$_POST["collation"]) {
|
||||
if (!$row["collation"]) {
|
||||
redirect(substr(ME, 0, -1));
|
||||
}
|
||||
query_redirect("ALTER DATABASE " . idf_escape($_POST["name"]) . (eregi('^[a-z0-9_]+$', $_POST["collation"]) ? " COLLATE $_POST[collation]" : ""), substr(ME, 0, -1), lang('Database has been altered.'));
|
||||
query_redirect("ALTER DATABASE " . idf_escape($name) . (preg_match('~^[a-z0-9_]+$~i', $row["collation"]) ? " COLLATE $row[collation]" : ""), substr(ME, 0, -1), lang('Database has been altered.'));
|
||||
}
|
||||
}
|
||||
|
||||
page_header(DB != "" ? lang('Alter database') : lang('Create database'), $error, array(), DB);
|
||||
page_header(DB != "" ? lang('Alter database') : lang('Create database'), $error, array(), h(DB));
|
||||
|
||||
$collations = collations();
|
||||
$name = DB;
|
||||
$collate = null;
|
||||
if ($_POST) {
|
||||
$name = $_POST["name"];
|
||||
$collate = $_POST["collation"];
|
||||
$name = $row["name"];
|
||||
} elseif (DB != "") {
|
||||
$collate = db_collation(DB, $collations);
|
||||
$row["collation"] = db_collation(DB, $collations);
|
||||
} elseif ($jush == "sql") {
|
||||
// propose database name with limited privileges
|
||||
foreach (get_vals("SHOW GRANTS") as $grant) {
|
||||
@@ -58,16 +60,19 @@ if ($_POST) {
|
||||
<?php
|
||||
echo ($_POST["add_x"] || strpos($name, "\n")
|
||||
? '<textarea id="name" name="name" rows="10" cols="40">' . h($name) . '</textarea><br>'
|
||||
: '<input id="name" name="name" value="' . h($name) . '" maxlength="64">'
|
||||
) . "\n" . ($collations ? html_select("collation", array("" => "(" . lang('collation') . ")") + $collations, $collate) : "");
|
||||
: '<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(
|
||||
'sql' => "charset-charsets.html",
|
||||
'mssql' => "ms187963.aspx",
|
||||
)) : "");
|
||||
?>
|
||||
<script type='text/javascript'>document.getElementById('name').focus();</script>
|
||||
<script type='text/javascript'>focus(document.getElementById('name'));</script>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<?php
|
||||
if (DB != "") {
|
||||
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n";
|
||||
} elseif (!$_POST["add_x"] && $_GET["db"] == "") {
|
||||
echo "<input type='image' 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";
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
|
||||
@@ -7,6 +7,7 @@ if ($tables_views && !$error && !$_POST["search"]) {
|
||||
if ($jush == "sql" && 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
|
||||
}
|
||||
|
||||
if ($_POST["truncate"]) {
|
||||
if ($_POST["tables"]) {
|
||||
$result = truncate_tables($_POST["tables"]);
|
||||
@@ -26,11 +27,20 @@ if ($tables_views && !$error && !$_POST["search"]) {
|
||||
$result = drop_tables($_POST["tables"]);
|
||||
}
|
||||
$message = lang('Tables have been dropped.');
|
||||
} elseif ($_POST["tables"] && ($result = queries(($_POST["optimize"] ? "OPTIMIZE" : ($_POST["check"] ? "CHECK" : ($_POST["repair"] ? "REPAIR" : "ANALYZE"))) . " TABLE " . implode(", ", array_map('idf_escape', $_POST["tables"]))))) {
|
||||
} elseif ($jush != "sql") {
|
||||
$result = ($jush == "sqlite"
|
||||
? queries("VACUUM")
|
||||
: apply_queries("VACUUM" . ($_POST["optimize"] ? "" : " ANALYZE"), $_POST["tables"])
|
||||
);
|
||||
$message = lang('Tables have been optimized.');
|
||||
} elseif (!$_POST["tables"]) {
|
||||
$message = lang('No tables.');
|
||||
} elseif ($result = queries(($_POST["optimize"] ? "OPTIMIZE" : ($_POST["check"] ? "CHECK" : ($_POST["repair"] ? "REPAIR" : "ANALYZE"))) . " TABLE " . implode(", ", array_map('idf_escape', $_POST["tables"])))) {
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$message .= "<b>" . h($row["Table"]) . "</b>: " . h($row["Msg_text"]) . "<br>";
|
||||
}
|
||||
}
|
||||
|
||||
queries_redirect(substr(ME, 0, -1), $message, $result);
|
||||
}
|
||||
|
||||
@@ -38,62 +48,107 @@ page_header(($_GET["ns"] == "" ? lang('Database') . ": " . h(DB) : lang('Schema'
|
||||
|
||||
if ($adminer->homepage()) {
|
||||
if ($_GET["ns"] !== "") {
|
||||
echo "<h3>" . lang('Tables and views') . "</h3>\n";
|
||||
echo "<h3 id='tables-views'>" . lang('Tables and views') . "</h3>\n";
|
||||
$tables_list = tables_list();
|
||||
if (!$tables_list) {
|
||||
echo "<p class='message'>" . lang('No tables.') . "\n";
|
||||
} else {
|
||||
echo "<form action='' method='post'>\n";
|
||||
echo "<p>" . lang('Search data in tables') . ": <input name='query' value='" . h($_POST["query"]) . "'> <input type='submit' name='search' value='" . lang('Search') . "'>\n";
|
||||
if ($_POST["search"] && $_POST["query"] != "") {
|
||||
search_tables();
|
||||
if (support("table")) {
|
||||
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 "</div></fieldset>\n";
|
||||
if ($_POST["search"] && $_POST["query"] != "") {
|
||||
search_tables();
|
||||
}
|
||||
}
|
||||
echo "<table cellspacing='0' class='nowrap' onclick='tableClick(event);'>\n";
|
||||
echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^(tables|views)\[/);"><th>' . lang('Table') . '<td>' . lang('Engine') . '<td>' . lang('Collation') . '<td>' . lang('Data Length') . '<td>' . lang('Index Length') . '<td>' . lang('Data Free') . '<td>' . lang('Auto Increment') . '<td>' . lang('Rows') . (support("comment") ? '<td>' . lang('Comment') : '') . "</thead>\n";
|
||||
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'));
|
||||
echo '<th>' . lang('Table');
|
||||
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('Data Length') . $doc_link;
|
||||
echo '<td>' . lang('Index Length') . $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('Rows') . $doc_link;
|
||||
echo (support("comment") ? '<td>' . lang('Comment') . $doc_link : '');
|
||||
echo "</thead>\n";
|
||||
|
||||
$tables = 0;
|
||||
foreach ($tables_list as $name => $type) {
|
||||
$view = (isset($type) && !eregi("table", $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');");
|
||||
echo '<th><a href="' . h(ME) . 'table=' . urlencode($name) . '">' . h($name) . '</a>';
|
||||
echo '<th>' . (support("table") || support("indexes") ? '<a href="' . h(ME) . 'table=' . urlencode($name) . '" title="' . lang('Show structure') . '">' . h($name) . '</a>' : h($name));
|
||||
if ($view) {
|
||||
echo '<td colspan="6"><a href="' . h(ME) . "view=" . urlencode($name) . '">' . lang('View') . '</a>';
|
||||
echo '<td align="right"><a href="' . h(ME) . "select=" . urlencode($name) . '">?</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>';
|
||||
} else {
|
||||
foreach (array("Engine" => "", "Collation" => "", "Data_length" => "create", "Index_length" => "indexes", "Data_free" => "edit", "Auto_increment" => "auto_increment=1&create", "Rows" => "select") as $key => $link) {
|
||||
echo ($link ? "<td align='right'><a href='" . h(ME . "$link=") . urlencode($name) . "' id='$key-" . h($name) . "'>?</a>" : "<td id='$key-" . h($name) . "'> ");
|
||||
foreach (array(
|
||||
"Engine" => array(),
|
||||
"Collation" => array(),
|
||||
"Data_length" => array("create", lang('Alter table')),
|
||||
"Index_length" => array("indexes", lang('Alter indexes')),
|
||||
"Data_free" => array("edit", lang('New item')),
|
||||
"Auto_increment" => array("auto_increment=1&create", lang('Alter table')),
|
||||
"Rows" => array("select", lang('Select data')),
|
||||
) as $key => $link) {
|
||||
$id = " id='$key-" . h($name) . "'";
|
||||
echo ($link ? "<td align='right'>" . (support("table") || $key == "Rows" || (support("indexes") && $key != "Data_length")
|
||||
? "<a href='" . h(ME . "$link[0]=") . urlencode($name) . "'$id title='$link[1]'>?</a>"
|
||||
: "<span$id>?</span>"
|
||||
) : "<td id='$key-" . h($name) . "'> ");
|
||||
}
|
||||
$tables++;
|
||||
}
|
||||
echo (support("comment") ? "<td id='Comment-" . h($name) . "'> " : "");
|
||||
}
|
||||
|
||||
echo "<tr><td> <th>" . lang('%d in total', count($tables_list));
|
||||
echo "<td>" . nbsp($jush == "sql" ? $connection->result("SELECT @@storage_engine") : "");
|
||||
echo "<td>" . nbsp(db_collation(DB, collations()));
|
||||
foreach (array("Data_length", "Index_length", "Data_free") as $key) {
|
||||
echo "<td align='right' id='sum-$key'> ";
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
if (!information_schema(DB)) {
|
||||
echo "<p>" . ($jush == "sql" ? "<input type='submit' value='" . lang('Analyze') . "'> <input type='submit' name='optimize' value='" . lang('Optimize') . "'> <input type='submit' name='check' value='" . lang('Check') . "'> <input type='submit' name='repair' value='" . lang('Repair') . "'> " : "") . "<input type='submit' name='truncate' value='" . lang('Truncate') . "'" . confirm("formChecked(this, /tables/)") . "> <input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm("formChecked(this, /tables|views/)", 1) . ">\n"; // 1 - eventStop
|
||||
$databases = (support("scheme") ? schemas() : get_databases());
|
||||
$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>"
|
||||
. ($jush == "sqlite" ? $vacuum
|
||||
: ($jush == "pgsql" ? $vacuum . $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='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='drop' value='" . lang('Drop') . "'" . confirm() . on_help("'DROP TABLE'") . ">\n";
|
||||
$databases = (support("scheme") ? $adminer->schemas() : $adminer->databases());
|
||||
if (count($databases) != 1 && $jush != "sqlite") {
|
||||
$db = (isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB));
|
||||
echo "<p>" . lang('Move to other database') . ": ";
|
||||
echo ($databases ? html_select("target", $databases, $db) : '<input name="target" value="' . h($db) . '">');
|
||||
echo " <input type='submit' name='move' value='" . lang('Move') . "' onclick='eventStop(event);'>";
|
||||
echo (support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "' onclick='eventStop(event);'>" : "");
|
||||
echo ($databases ? html_select("target", $databases, $db) : '<input name="target" value="' . h($db) . '" autocapitalize="off">');
|
||||
echo " <input type='submit' name='move' value='" . lang('Move') . "'>";
|
||||
echo (support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "'>" : "");
|
||||
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='token' value='$token'>\n";
|
||||
echo "</div></fieldset>\n";
|
||||
}
|
||||
echo "</form>\n";
|
||||
echo "<script type='text/javascript'>tableCheck();</script>\n";
|
||||
}
|
||||
|
||||
echo '<p><a href="' . h(ME) . 'create=">' . lang('Create table') . "</a>\n";
|
||||
if (support("view")) {
|
||||
echo '<a href="' . h(ME) . 'view=">' . lang('Create view') . "</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("materializedview") ? '<a href="' . h(ME) . 'view=&materialized=1">' . lang('Create materialized view') . "</a>\n" : "");
|
||||
|
||||
if (support("routine")) {
|
||||
echo "<h3>" . lang('Routines') . "</h3>\n";
|
||||
echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n";
|
||||
$routines = routines();
|
||||
if ($routines) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
@@ -108,12 +163,15 @@ if ($adminer->homepage()) {
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
echo '<p>' . (support("procedure") ? '<a href="' . h(ME) . 'procedure=">' . lang('Create procedure') . '</a> ' : '') . '<a href="' . h(ME) . 'function=">' . lang('Create function') . "</a>\n";
|
||||
echo '<p class="links">'
|
||||
. (support("procedure") ? '<a href="' . h(ME) . 'procedure=">' . lang('Create procedure') . '</a>' : '')
|
||||
. '<a href="' . h(ME) . 'function=">' . lang('Create function') . "</a>\n"
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
if (support("sequence")) {
|
||||
echo "<h3>" . lang('Sequences') . "</h3>\n";
|
||||
$sequences = get_vals("SELECT sequence_name FROM information_schema.sequences WHERE sequence_schema = current_schema()");
|
||||
echo "<h3 id='sequences'>" . lang('Sequences') . "</h3>\n";
|
||||
$sequences = get_vals("SELECT sequence_name FROM information_schema.sequences WHERE sequence_schema = current_schema() ORDER BY sequence_name");
|
||||
if ($sequences) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<thead><tr><th>" . lang('Name') . "</thead>\n";
|
||||
@@ -123,41 +181,46 @@ if ($adminer->homepage()) {
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
echo "<p><a href='" . h(ME) . "sequence='>" . lang('Create sequence') . "</a>\n";
|
||||
echo "<p class='links'><a href='" . h(ME) . "sequence='>" . lang('Create sequence') . "</a>\n";
|
||||
}
|
||||
|
||||
|
||||
if (support("type")) {
|
||||
echo "<h3>" . lang('User types') . "</h3>\n";
|
||||
$types = types();
|
||||
if ($types) {
|
||||
echo "<h3 id='user-types'>" . lang('User types') . "</h3>\n";
|
||||
$user_types = types();
|
||||
if ($user_types) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<thead><tr><th>" . lang('Name') . "</thead>\n";
|
||||
odd('');
|
||||
foreach ($types as $val) {
|
||||
foreach ($user_types as $val) {
|
||||
echo "<tr" . odd() . "><th><a href='" . h(ME) . "type=" . urlencode($val) . "'>" . h($val) . "</a>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
echo "<p><a href='" . h(ME) . "type='>" . lang('Create type') . "</a>\n";
|
||||
echo "<p class='links'><a href='" . h(ME) . "type='>" . lang('Create type') . "</a>\n";
|
||||
}
|
||||
|
||||
|
||||
if (support("event")) {
|
||||
echo "<h3>" . lang('Events') . "</h3>\n";
|
||||
echo "<h3 id='events'>" . lang('Events') . "</h3>\n";
|
||||
$rows = get_rows("SHOW EVENTS");
|
||||
if ($rows) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<thead><tr><th>" . lang('Name') . "<td>" . lang('Schedule') . "<td>" . lang('Start') . "<td>" . lang('End') . "</thead>\n";
|
||||
echo "<thead><tr><th>" . lang('Name') . "<td>" . lang('Schedule') . "<td>" . lang('Start') . "<td>" . lang('End') . "<td></thead>\n";
|
||||
foreach ($rows as $row) {
|
||||
echo "<tr>";
|
||||
echo '<th><a href="' . h(ME) . 'event=' . urlencode($row["Name"]) . '">' . h($row["Name"]) . "</a>";
|
||||
echo "<th>" . h($row["Name"]);
|
||||
echo "<td>" . ($row["Execute at"] ? lang('At given time') . "<td>" . $row["Execute at"] : lang('Every') . " " . $row["Interval value"] . " " . $row["Interval field"] . "<td>$row[Starts]");
|
||||
echo "<td>$row[Ends]";
|
||||
echo '<td><a href="' . h(ME) . 'event=' . urlencode($row["Name"]) . '">' . lang('Alter') . '</a>';
|
||||
}
|
||||
echo "</table>\n";
|
||||
$event_scheduler = $connection->result("SELECT @@event_scheduler");
|
||||
if ($event_scheduler && $event_scheduler != "ON") {
|
||||
echo "<p class='error'><code class='jush-sqlset'>event_scheduler</code>: " . h($event_scheduler) . "\n";
|
||||
}
|
||||
}
|
||||
echo '<p><a href="' . h(ME) . 'event=">' . lang('Create event') . "</a>\n";
|
||||
echo '<p class="links"><a href="' . h(ME) . 'event=">' . lang('Create event') . "</a>\n";
|
||||
}
|
||||
|
||||
|
||||
if ($tables_list) {
|
||||
echo "<script type='text/javascript'>ajaxSetHtml('" . js_escape(ME) . "script=db');</script>\n";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<?php
|
||||
$TABLE = $_GET["download"];
|
||||
$fields = fields($TABLE);
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Disposition: attachment; filename=" . friendly_url("$TABLE-" . implode("_", $_GET["where"])) . "." . friendly_url($_GET["field"]));
|
||||
echo $connection->result("SELECT" . limit(idf_escape($_GET["field"]) . " FROM " . table($TABLE), " WHERE " . where($_GET), 1));
|
||||
$select = array(idf_escape($_GET["field"]));
|
||||
$result = $driver->select($TABLE, $select, array(where($_GET, $fields)), $select);
|
||||
$row = ($result ? $result->fetch_row() : array());
|
||||
echo $row[0];
|
||||
exit; // don't output footer
|
||||
|
||||
374
adminer/drivers/elastic.inc.php
Normal file
@@ -0,0 +1,374 @@
|
||||
<?php
|
||||
$drivers["elastic"] = "Elasticsearch (beta)";
|
||||
|
||||
if (isset($_GET["elastic"])) {
|
||||
$possible_drivers = array("json");
|
||||
define("DRIVER", "elastic");
|
||||
|
||||
if (function_exists('json_decode')) {
|
||||
class Min_DB {
|
||||
var $extension = "JSON", $server_info, $errno, $error, $_url;
|
||||
|
||||
/** Performs query
|
||||
* @param string
|
||||
* @param array
|
||||
* @param string
|
||||
* @return mixed
|
||||
*/
|
||||
function rootQuery($path, $content = array(), $method = 'GET') {
|
||||
@ini_set('track_errors', 1); // @ - may be disabled
|
||||
$file = @file_get_contents($this->_url . '/' . ltrim($path, '/'), false, stream_context_create(array('http' => array(
|
||||
'method' => $method,
|
||||
'content' => json_encode($content),
|
||||
'ignore_errors' => 1, // available since PHP 5.2.10
|
||||
))));
|
||||
if (!$file) {
|
||||
$this->error = $php_errormsg;
|
||||
return $file;
|
||||
}
|
||||
if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) {
|
||||
$this->error = $file;
|
||||
return false;
|
||||
}
|
||||
$return = json_decode($file, true);
|
||||
if ($return === null) {
|
||||
$this->errno = json_last_error();
|
||||
if (function_exists('json_last_error_msg')) {
|
||||
$this->error = json_last_error_msg();
|
||||
} else {
|
||||
$constants = get_defined_constants(true);
|
||||
foreach ($constants['json'] as $name => $value) {
|
||||
if ($value == $this->errno && preg_match('~^JSON_ERROR_~', $name)) {
|
||||
$this->error = $name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/** Performs query relative to actual selected DB
|
||||
* @param string
|
||||
* @param array
|
||||
* @param string
|
||||
* @return mixed
|
||||
*/
|
||||
function query($path, $content = array(), $method = 'GET') {
|
||||
return $this->rootQuery(($this->_db != "" ? "$this->_db/" : "/") . ltrim($path, '/'), $content, $method);
|
||||
}
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
$this->_url = "http://$username:$password@$server/";
|
||||
$return = $this->query('');
|
||||
if ($return) {
|
||||
$this->server_info = $return['version']['number'];
|
||||
}
|
||||
return (bool) $return;
|
||||
}
|
||||
|
||||
function select_db($database) {
|
||||
$this->_db = $database;
|
||||
return true;
|
||||
}
|
||||
|
||||
function quote($string) {
|
||||
return $string;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Min_Result {
|
||||
var $num_rows, $_rows;
|
||||
|
||||
function Min_Result($rows) {
|
||||
$this->num_rows = count($this->_rows);
|
||||
$this->_rows = $rows;
|
||||
reset($this->_rows);
|
||||
}
|
||||
|
||||
function fetch_assoc() {
|
||||
$return = current($this->_rows);
|
||||
next($this->_rows);
|
||||
return $return;
|
||||
}
|
||||
|
||||
function fetch_row() {
|
||||
return array_values($this->fetch_assoc());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
|
||||
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
|
||||
global $adminer;
|
||||
$data = array();
|
||||
$query = "$table/_search";
|
||||
if ($select != array("*")) {
|
||||
$data["fields"] = $select;
|
||||
}
|
||||
if ($order) {
|
||||
$sort = array();
|
||||
foreach ($order as $col) {
|
||||
$col = preg_replace('~ DESC$~', '', $col, 1, $count);
|
||||
$sort[] = ($count ? array($col => "desc") : $col);
|
||||
}
|
||||
$data["sort"] = $sort;
|
||||
}
|
||||
if ($limit) {
|
||||
$data["size"] = +$limit;
|
||||
if ($page) {
|
||||
$data["from"] = ($page * $limit);
|
||||
}
|
||||
}
|
||||
foreach ($where as $val) {
|
||||
list($col,$op,$val) = explode(" ",$val,3);
|
||||
if ($col == "_id") {
|
||||
$data["query"]["ids"]["values"][] = $val;
|
||||
}
|
||||
elseif ($col . $val != "") {
|
||||
$term = array("term" => array(($col != "" ? $col : "_all") => $val));
|
||||
if ($op == "=") {
|
||||
$data["query"]["filtered"]["filter"]["and"][] = $term;
|
||||
} else {
|
||||
$data["query"]["filtered"]["query"]["bool"]["must"][] = $term;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($data["query"] && !$data["query"]["filtered"]["query"] && !$data["query"]["ids"]) {
|
||||
$data["query"]["filtered"]["query"] = array("match_all" => array());
|
||||
}
|
||||
$start = microtime(true);
|
||||
$search = $this->_conn->query($query, $data);
|
||||
if ($print) {
|
||||
echo $adminer->selectQuery("$query: " . print_r($data, true), format_time($start));
|
||||
}
|
||||
if (!$search) {
|
||||
return false;
|
||||
}
|
||||
$return = array();
|
||||
foreach ($search['hits']['hits'] as $hit) {
|
||||
$row = array();
|
||||
if ($select == array("*")) {
|
||||
$row["_id"] = $hit["_id"];
|
||||
}
|
||||
$fields = $hit['_source'];
|
||||
if ($select != array("*")) {
|
||||
$fields = array();
|
||||
foreach ($select as $key) {
|
||||
$fields[$key] = $hit['fields'][$key];
|
||||
}
|
||||
}
|
||||
foreach ($fields as $key => $val) {
|
||||
if ($data["fields"]) {
|
||||
$val = $val[0];
|
||||
}
|
||||
$row[$key] = (is_array($val) ? json_encode($val) : $val); //! display JSON and others differently
|
||||
}
|
||||
$return[] = $row;
|
||||
}
|
||||
return new Min_Result($return);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
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 support($feature) {
|
||||
return preg_match("~database|table|columns~", $feature);
|
||||
}
|
||||
|
||||
function logged_user() {
|
||||
global $adminer;
|
||||
$credentials = $adminer->credentials();
|
||||
return $credentials[1];
|
||||
}
|
||||
|
||||
function get_databases() {
|
||||
global $connection;
|
||||
$return = $connection->rootQuery('_aliases');
|
||||
if ($return) {
|
||||
$return = array_keys($return);
|
||||
sort($return, SORT_STRING);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function collations() {
|
||||
return array();
|
||||
}
|
||||
|
||||
function db_collation($db, $collations) {
|
||||
}
|
||||
|
||||
function engines() {
|
||||
return array();
|
||||
}
|
||||
|
||||
function count_tables($databases) {
|
||||
global $connection;
|
||||
$return = $connection->query('_mapping');
|
||||
if ($return) {
|
||||
$return = array_map('count', $return);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function tables_list() {
|
||||
global $connection;
|
||||
$return = $connection->query('_mapping');
|
||||
if ($return) {
|
||||
$return = array_fill_keys(array_keys($return[$connection->_db]["mappings"]), 'table');
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function table_status($name = "", $fast = false) {
|
||||
global $connection;
|
||||
$search = $connection->query("_search?search_type=count", array(
|
||||
"facets" => array(
|
||||
"count_by_type" => array(
|
||||
"terms" => array(
|
||||
"field" => "_type",
|
||||
)
|
||||
)
|
||||
)
|
||||
), "POST");
|
||||
$return = array();
|
||||
if ($search) {
|
||||
foreach ($search["facets"]["count_by_type"]["terms"] as $table) {
|
||||
$return[$table["term"]] = array(
|
||||
"Name" => $table["term"],
|
||||
"Engine" => "table",
|
||||
"Rows" => $table["count"],
|
||||
);
|
||||
}
|
||||
if ($name != "" && $name == $table["term"]) {
|
||||
return $return[$name];
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function error() {
|
||||
global $connection;
|
||||
return h($connection->error);
|
||||
}
|
||||
|
||||
function information_schema() {
|
||||
}
|
||||
|
||||
function is_view($table_status) {
|
||||
}
|
||||
|
||||
function indexes($table, $connection2 = null) {
|
||||
return array(
|
||||
array("type" => "PRIMARY", "columns" => array("_id")),
|
||||
);
|
||||
}
|
||||
|
||||
function fields($table) {
|
||||
global $connection;
|
||||
$result = $connection->query("$table/_mapping");
|
||||
$return = array();
|
||||
if ($result) {
|
||||
$mappings = $result[$table]['properties'];
|
||||
if (!$mappings) {
|
||||
$mappings = $result[$connection->_db]['mappings'][$table]['properties'];
|
||||
}
|
||||
if ($mappings) {
|
||||
foreach ($mappings as $name => $field) {
|
||||
$return[$name] = array(
|
||||
"field" => $name,
|
||||
"full_type" => $field["type"],
|
||||
"type" => $field["type"],
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1),
|
||||
);
|
||||
if ($field["properties"]) { // only leaf fields can be edited
|
||||
unset($return[$name]["privileges"]["insert"]);
|
||||
unset($return[$name]["privileges"]["update"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function foreign_keys($table) {
|
||||
return array();
|
||||
}
|
||||
|
||||
function table($idf) {
|
||||
return $idf;
|
||||
}
|
||||
|
||||
function idf_escape($idf) {
|
||||
return $idf;
|
||||
}
|
||||
|
||||
function convert_field($field) {
|
||||
}
|
||||
|
||||
function unconvert_field($field, $return) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
function fk_support($table_status) {
|
||||
}
|
||||
|
||||
function found_rows($table_status, $where) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Create database
|
||||
* @param string
|
||||
* @return mixed
|
||||
*/
|
||||
function create_database($db) {
|
||||
global $connection;
|
||||
return $connection->rootQuery(urlencode($db), array(), 'PUT');
|
||||
}
|
||||
|
||||
/** Drop databases
|
||||
* @param array
|
||||
* @return mixed
|
||||
*/
|
||||
function drop_databases($databases) {
|
||||
global $connection;
|
||||
return $connection->rootQuery(urlencode(implode(',', $databases)), array(), 'DELETE');
|
||||
}
|
||||
|
||||
/** Drop tables
|
||||
* @param array
|
||||
* @return bool
|
||||
*/
|
||||
function drop_tables($tables) {
|
||||
global $connection;
|
||||
$return = true;
|
||||
foreach ($tables as $table) { //! convert to bulk api
|
||||
$return = $return && $connection->query(urlencode($table), array(), 'DELETE');
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
$jush = "elastic";
|
||||
$operators = array("=", "query");
|
||||
$functions = array();
|
||||
$grouping = array();
|
||||
$edit_functions = array(array("json"));
|
||||
}
|
||||
320
adminer/drivers/firebird.inc.php
Normal file
@@ -0,0 +1,320 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Steve Krämer
|
||||
*/
|
||||
|
||||
$drivers['firebird'] = 'Firebird (alpha)';
|
||||
|
||||
if (isset($_GET["firebird"])) {
|
||||
$possible_drivers = array("interbase");
|
||||
define("DRIVER", "firebird");
|
||||
|
||||
if (extension_loaded("interbase") ) {
|
||||
class Min_DB {
|
||||
var
|
||||
$extension = "Firebird",
|
||||
$server_info,
|
||||
$affected_rows,
|
||||
$errno,
|
||||
$error,
|
||||
$_link, $_result
|
||||
;
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
$this->_link = ibase_connect($server, $username, $password);
|
||||
if ($this->_link) {
|
||||
$url_parts = explode(':', $server);
|
||||
$this->service_link = ibase_service_attach($url_parts[0], $username, $password);
|
||||
$this->server_info = ibase_server_info($this->service_link, IBASE_SVC_SERVER_VERSION);
|
||||
} else {
|
||||
$this->errno = ibase_errcode();
|
||||
$this->error = ibase_errmsg();
|
||||
}
|
||||
return (bool) $this->_link;
|
||||
}
|
||||
|
||||
function quote($string) {
|
||||
return "'" . str_replace("'", "''", $string) . "'";
|
||||
}
|
||||
|
||||
function select_db($database) {
|
||||
return ($database == "domain");
|
||||
}
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
$result = ibase_query($query, $this->_link);
|
||||
if (!$result) {
|
||||
$this->errno = ibase_errcode();
|
||||
$this->error = ibase_errmsg();
|
||||
return false;
|
||||
}
|
||||
$this->error = "";
|
||||
if ($result === true) {
|
||||
$this->affected_rows = ibase_affected_rows($this->_link);
|
||||
return true;
|
||||
}
|
||||
return new Min_Result($result);
|
||||
}
|
||||
|
||||
function multi_query($query) {
|
||||
return $this->_result = $this->query($query);
|
||||
}
|
||||
|
||||
function store_result() {
|
||||
return $this->_result;
|
||||
}
|
||||
|
||||
function next_result() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function result($query, $field = 0) {
|
||||
$result = $this->query($query);
|
||||
if (!$result || !$result->num_rows) {
|
||||
return false;
|
||||
}
|
||||
$row = $result->fetch_row();
|
||||
return $row[$field];
|
||||
}
|
||||
}
|
||||
|
||||
class Min_Result {
|
||||
var $num_rows, $_result, $_offset = 0;
|
||||
|
||||
function Min_Result($result) {
|
||||
$this->_result = $result;
|
||||
// $this->num_rows = ibase_num_rows($result);
|
||||
}
|
||||
|
||||
function fetch_assoc() {
|
||||
return ibase_fetch_assoc($this->_result);
|
||||
}
|
||||
|
||||
function fetch_row() {
|
||||
return ibase_fetch_row($this->_result);
|
||||
}
|
||||
|
||||
function fetch_field() {
|
||||
$field = ibase_field_info($this->_result, $this->_offset++);
|
||||
return (object) array(
|
||||
'name' => $field['name'],
|
||||
'orgname' => $field['name'],
|
||||
'type' => $field['type'],
|
||||
'charsetnr' => $field['length'],
|
||||
);
|
||||
}
|
||||
|
||||
function __destruct() {
|
||||
ibase_free_result($this->_result);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
}
|
||||
|
||||
|
||||
|
||||
function idf_escape($idf) {
|
||||
return '"' . str_replace('"', '""', $idf) . '"';
|
||||
}
|
||||
|
||||
function table($idf) {
|
||||
return idf_escape($idf);
|
||||
}
|
||||
|
||||
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 get_databases($flush) {
|
||||
return array("domain");
|
||||
}
|
||||
|
||||
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
||||
$return = '';
|
||||
$return .= ($limit !== null ? $separator . "FIRST $limit" . ($offset ? " SKIP $offset" : "") : "");
|
||||
$return .= " $query$where";
|
||||
return $return;
|
||||
}
|
||||
|
||||
function limit1($query, $where) {
|
||||
return limit($query, $where, 1);
|
||||
}
|
||||
|
||||
function db_collation($db, $collations) {
|
||||
}
|
||||
|
||||
function engines() {
|
||||
return array();
|
||||
}
|
||||
|
||||
function logged_user() {
|
||||
global $adminer;
|
||||
$credentials = $adminer->credentials();
|
||||
return $credentials[1];
|
||||
}
|
||||
|
||||
function tables_list() {
|
||||
global $connection;
|
||||
$query = 'SELECT RDB$RELATION_NAME FROM rdb$relations WHERE rdb$system_flag = 0';
|
||||
$result = ibase_query($connection->_link, $query);
|
||||
$return = array();
|
||||
while ($row = ibase_fetch_assoc($result)) {
|
||||
$return[$row['RDB$RELATION_NAME']] = 'table';
|
||||
}
|
||||
ksort($return);
|
||||
return $return;
|
||||
}
|
||||
|
||||
function count_tables($databases) {
|
||||
return array();
|
||||
}
|
||||
|
||||
function table_status($name = "", $fast = false) {
|
||||
global $connection;
|
||||
$return = array();
|
||||
$data = tables_list();
|
||||
foreach ($data as $index => $val) {
|
||||
$index = trim($index);
|
||||
$return[$index] = array(
|
||||
'Name' => $index,
|
||||
'Engine' => 'standard',
|
||||
);
|
||||
if ($name == $index) {
|
||||
return $return[$index];
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function is_view($table_status) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function fk_support($table_status) {
|
||||
return preg_match('~InnoDB|IBMDB2I~i', $table_status["Engine"]);
|
||||
}
|
||||
|
||||
function fields($table) {
|
||||
global $connection;
|
||||
$return = array();
|
||||
$query = 'SELECT r.RDB$FIELD_NAME AS field_name,
|
||||
r.RDB$DESCRIPTION AS field_description,
|
||||
r.RDB$DEFAULT_VALUE AS field_default_value,
|
||||
r.RDB$NULL_FLAG AS field_not_null_constraint,
|
||||
f.RDB$FIELD_LENGTH AS field_length,
|
||||
f.RDB$FIELD_PRECISION AS field_precision,
|
||||
f.RDB$FIELD_SCALE AS field_scale,
|
||||
CASE f.RDB$FIELD_TYPE
|
||||
WHEN 261 THEN \'BLOB\'
|
||||
WHEN 14 THEN \'CHAR\'
|
||||
WHEN 40 THEN \'CSTRING\'
|
||||
WHEN 11 THEN \'D_FLOAT\'
|
||||
WHEN 27 THEN \'DOUBLE\'
|
||||
WHEN 10 THEN \'FLOAT\'
|
||||
WHEN 16 THEN \'INT64\'
|
||||
WHEN 8 THEN \'INTEGER\'
|
||||
WHEN 9 THEN \'QUAD\'
|
||||
WHEN 7 THEN \'SMALLINT\'
|
||||
WHEN 12 THEN \'DATE\'
|
||||
WHEN 13 THEN \'TIME\'
|
||||
WHEN 35 THEN \'TIMESTAMP\'
|
||||
WHEN 37 THEN \'VARCHAR\'
|
||||
ELSE \'UNKNOWN\'
|
||||
END AS field_type,
|
||||
f.RDB$FIELD_SUB_TYPE AS field_subtype,
|
||||
coll.RDB$COLLATION_NAME AS field_collation,
|
||||
cset.RDB$CHARACTER_SET_NAME AS field_charset
|
||||
FROM RDB$RELATION_FIELDS r
|
||||
LEFT JOIN RDB$FIELDS f ON r.RDB$FIELD_SOURCE = f.RDB$FIELD_NAME
|
||||
LEFT JOIN RDB$COLLATIONS coll ON f.RDB$COLLATION_ID = coll.RDB$COLLATION_ID
|
||||
LEFT JOIN RDB$CHARACTER_SETS cset ON f.RDB$CHARACTER_SET_ID = cset.RDB$CHARACTER_SET_ID
|
||||
WHERE r.RDB$RELATION_NAME = ' . q($table) . '
|
||||
ORDER BY r.RDB$FIELD_POSITION';
|
||||
$result = ibase_query($connection->_link, $query);
|
||||
while ($row = ibase_fetch_assoc($result)) {
|
||||
$return[trim($row['FIELD_NAME'])] = array(
|
||||
"field" => trim($row["FIELD_NAME"]),
|
||||
"full_type" => trim($row["FIELD_TYPE"]),
|
||||
"type" => trim($row["FIELD_SUB_TYPE"]),
|
||||
"default" => trim($row['FIELD_DEFAULT_VALUE']),
|
||||
"null" => (trim($row["FIELD_NOT_NULL_CONSTRAINT"]) == "YES"),
|
||||
"auto_increment" => '0',
|
||||
"collation" => trim($row["FIELD_COLLATION"]),
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1),
|
||||
"comment" => trim($row["FIELD_DESCRIPTION"]),
|
||||
);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function indexes($table, $connection2 = null) {
|
||||
$return = array();
|
||||
/*
|
||||
$query = 'SELECT RDB$INDEX_SEGMENTS.RDB$FIELD_NAME AS field_name,
|
||||
RDB$INDICES.RDB$DESCRIPTION AS description,
|
||||
(RDB$INDEX_SEGMENTS.RDB$FIELD_POSITION + 1) AS field_position
|
||||
FROM RDB$INDEX_SEGMENTS
|
||||
LEFT JOIN RDB$INDICES ON RDB$INDICES.RDB$INDEX_NAME = RDB$INDEX_SEGMENTS.RDB$INDEX_NAME
|
||||
LEFT JOIN RDB$RELATION_CONSTRAINTS ON RDB$RELATION_CONSTRAINTS.RDB$INDEX_NAME = RDB$INDEX_SEGMENTS.RDB$INDEX_NAME
|
||||
WHERE UPPER(RDB$INDICES.RDB$RELATION_NAME) = ' . q($table) . '
|
||||
// AND UPPER(RDB$INDICES.RDB$INDEX_NAME) = \'TEST2_FIELD5_IDX\'
|
||||
AND RDB$RELATION_CONSTRAINTS.RDB$CONSTRAINT_TYPE IS NULL
|
||||
ORDER BY RDB$INDEX_SEGMENTS.RDB$FIELD_POSITION';
|
||||
*/
|
||||
return $return;
|
||||
}
|
||||
|
||||
function foreign_keys($table) {
|
||||
return array();
|
||||
}
|
||||
|
||||
function collations() {
|
||||
return array();
|
||||
}
|
||||
|
||||
function information_schema($db) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function error() {
|
||||
global $connection;
|
||||
return h($connection->error);
|
||||
}
|
||||
|
||||
function types() {
|
||||
return array();
|
||||
}
|
||||
|
||||
function schemas() {
|
||||
return array();
|
||||
}
|
||||
|
||||
function get_schema() {
|
||||
return "";
|
||||
}
|
||||
|
||||
function set_schema($schema) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
return preg_match("~^(columns|sql|status|table)$~", $feature);
|
||||
}
|
||||
|
||||
$jush = "firebird";
|
||||
$operators = array("=");
|
||||
$functions = array();
|
||||
$grouping = array();
|
||||
$edit_functions = array();
|
||||
}
|
||||
357
adminer/drivers/mongo.inc.php
Normal file
@@ -0,0 +1,357 @@
|
||||
<?php
|
||||
$drivers["mongo"] = "MongoDB (beta)";
|
||||
|
||||
if (isset($_GET["mongo"])) {
|
||||
$possible_drivers = array("mongo");
|
||||
define("DRIVER", "mongo");
|
||||
|
||||
if (class_exists('MongoDB')) {
|
||||
class Min_DB {
|
||||
var $extension = "Mongo", $error, $last_id, $_link, $_db;
|
||||
|
||||
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 {
|
||||
$this->_link = @new MongoClient("mongodb://$server", $options);
|
||||
return true;
|
||||
} catch (Exception $ex) {
|
||||
$this->error = $ex->getMessage();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function query($query) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function select_db($database) {
|
||||
try {
|
||||
$this->_db = $this->_link->selectDB($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 Min_Result($result) {
|
||||
foreach ($result as $item) {
|
||||
$row = array();
|
||||
foreach ($item as $key => $val) {
|
||||
if (is_a($val, 'MongoBinData')) {
|
||||
$this->_charset[$key] = 63;
|
||||
}
|
||||
$row[$key] =
|
||||
(is_a($val, 'MongoId') ? 'ObjectId("' . strval($val) . '")' :
|
||||
(is_a($val, 'MongoDate') ? gmdate("Y-m-d H:i:s", $val->sec) . " GMT" :
|
||||
(is_a($val, 'MongoBinData') ? $val->bin : //! allow downloading
|
||||
(is_a($val, 'MongoRegex') ? strval($val) :
|
||||
(is_object($val) ? get_class($val) : // MongoMinKey, MongoMaxKey
|
||||
$val
|
||||
)))));
|
||||
}
|
||||
$this->_rows[] = $row;
|
||||
foreach ($row as $key => $val) {
|
||||
if (!isset($this->_rows[0][$key])) {
|
||||
$this->_rows[0][$key] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->num_rows = count($this->_rows);
|
||||
}
|
||||
|
||||
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],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
public $primary = "_id";
|
||||
|
||||
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
|
||||
$select = ($select == array("*")
|
||||
? array()
|
||||
: array_fill_keys($select, true)
|
||||
);
|
||||
$sort = array();
|
||||
foreach ($order as $val) {
|
||||
$val = preg_replace('~ DESC$~', '', $val, 1, $count);
|
||||
$sort[$val] = ($count ? -1 : 1);
|
||||
}
|
||||
return new Min_Result($this->_conn->_db->selectCollection($table)
|
||||
->find(array(), $select)
|
||||
->sort($sort)
|
||||
->limit(+$limit)
|
||||
->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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
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() {
|
||||
global $adminer;
|
||||
$credentials = $adminer->credentials();
|
||||
return $credentials[1];
|
||||
}
|
||||
|
||||
function get_databases($flush) {
|
||||
global $connection;
|
||||
$return = array();
|
||||
$dbs = $connection->_link->listDBs();
|
||||
foreach ($dbs['databases'] as $db) {
|
||||
$return[] = $db['name'];
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function collations() {
|
||||
return array();
|
||||
}
|
||||
|
||||
function db_collation($db, $collations) {
|
||||
}
|
||||
|
||||
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 table_status($name = "", $fast = false) {
|
||||
$return = array();
|
||||
foreach (tables_list() as $table => $type) {
|
||||
$return[$table] = array("Name" => $table);
|
||||
if ($name == $table) {
|
||||
return $return[$table];
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function information_schema() {
|
||||
}
|
||||
|
||||
function is_view($table_status) {
|
||||
}
|
||||
|
||||
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 convert_field($field) {
|
||||
}
|
||||
|
||||
function unconvert_field($field, $return) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
function foreign_keys($table) {
|
||||
return array();
|
||||
}
|
||||
|
||||
function fk_support($table_status) {
|
||||
}
|
||||
|
||||
function engines() {
|
||||
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) {
|
||||
global $connection;
|
||||
if ($table == "") {
|
||||
$connection->_db->createCollection($name);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function drop_tables($tables) {
|
||||
global $connection;
|
||||
foreach ($tables as $table) {
|
||||
$response = $connection->_db->selectCollection($table)->drop();
|
||||
if (!$response['ok']) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function truncate_tables($tables) {
|
||||
global $connection;
|
||||
foreach ($tables as $table) {
|
||||
$response = $connection->_db->selectCollection($table)->remove();
|
||||
if (!$response['ok']) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
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";
|
||||
$operators = array("=");
|
||||
$functions = array();
|
||||
$grouping = array();
|
||||
$edit_functions = array(array("json"));
|
||||
}
|
||||
@@ -12,18 +12,19 @@ if (isset($_GET["mssql"])) {
|
||||
define("DRIVER", "mssql");
|
||||
if (extension_loaded("sqlsrv")) {
|
||||
class Min_DB {
|
||||
var $extension = "sqlsrv", $_link, $_result, $server_info, $affected_rows, $error;
|
||||
var $extension = "sqlsrv", $_link, $_result, $server_info, $affected_rows, $errno, $error;
|
||||
|
||||
function _get_error() {
|
||||
$this->error = "";
|
||||
foreach (sqlsrv_errors() as $error) {
|
||||
$this->errno = $error["code"];
|
||||
$this->error .= "$error[message]\n";
|
||||
}
|
||||
$this->error = rtrim($this->error);
|
||||
}
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
$this->_link = @sqlsrv_connect($server, array("UID" => $username, "PWD" => $password));
|
||||
$this->_link = @sqlsrv_connect($server, array("UID" => $username, "PWD" => $password, "CharacterSet" => "UTF-8"));
|
||||
if ($this->_link) {
|
||||
$info = sqlsrv_server_info($this->_link);
|
||||
$this->server_info = $info['SQLServerVersion'];
|
||||
@@ -38,11 +39,12 @@ if (isset($_GET["mssql"])) {
|
||||
}
|
||||
|
||||
function select_db($database) {
|
||||
return $this->query("USE $database");
|
||||
return $this->query("USE " . idf_escape($database));
|
||||
}
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
$result = sqlsrv_query($this->_link, $query); //! , array(), ($unbuffered ? array() : array("Scrollable" => "keyset"))
|
||||
$this->error = "";
|
||||
if (!$result) {
|
||||
$this->_get_error();
|
||||
return false;
|
||||
@@ -52,6 +54,7 @@ if (isset($_GET["mssql"])) {
|
||||
|
||||
function multi_query($query) {
|
||||
$this->_result = sqlsrv_query($this->_link, $query);
|
||||
$this->error = "";
|
||||
if (!$this->_result) {
|
||||
$this->_get_error();
|
||||
return false;
|
||||
@@ -63,6 +66,9 @@ if (isset($_GET["mssql"])) {
|
||||
if (!$result) {
|
||||
$result = $this->_result;
|
||||
}
|
||||
if (!$result) {
|
||||
return false;
|
||||
}
|
||||
if (sqlsrv_field_metadata($result)) {
|
||||
return new Min_Result($result);
|
||||
}
|
||||
@@ -71,7 +77,7 @@ if (isset($_GET["mssql"])) {
|
||||
}
|
||||
|
||||
function next_result() {
|
||||
return sqlsrv_next_result($this->_result);
|
||||
return $this->_result ? sqlsrv_next_result($this->_result) : null;
|
||||
}
|
||||
|
||||
function result($query, $field = 0) {
|
||||
@@ -101,7 +107,7 @@ if (isset($_GET["mssql"])) {
|
||||
}
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
function fetch_assoc() {
|
||||
return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_ASSOC, SQLSRV_SCROLL_NEXT));
|
||||
}
|
||||
@@ -121,7 +127,7 @@ if (isset($_GET["mssql"])) {
|
||||
$return->type = ($field["Type"] == 1 ? 254 : 0);
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function seek($offset) {
|
||||
for ($i=0; $i < $offset; $i++) {
|
||||
sqlsrv_fetch($this->_result); // SQLSRV_SCROLL_ABSOLUTE added in sqlsrv 1.1
|
||||
@@ -132,7 +138,7 @@ if (isset($_GET["mssql"])) {
|
||||
sqlsrv_free_stmt($this->_result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} elseif (extension_loaded("mssql")) {
|
||||
class Min_DB {
|
||||
var $extension = "MSSQL", $_link, $_result, $server_info, $affected_rows, $error;
|
||||
@@ -159,6 +165,7 @@ if (isset($_GET["mssql"])) {
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
$result = mssql_query($query, $this->_link); //! $unbuffered
|
||||
$this->error = "";
|
||||
if (!$result) {
|
||||
$this->error = mssql_get_last_message();
|
||||
return false;
|
||||
@@ -221,14 +228,47 @@ if (isset($_GET["mssql"])) {
|
||||
function seek($offset) {
|
||||
mssql_data_seek($this->_result, $offset);
|
||||
}
|
||||
|
||||
|
||||
function __destruct() {
|
||||
mssql_free_result($this->_result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
|
||||
function insertUpdate($table, $rows, $primary) {
|
||||
foreach ($rows as $set) {
|
||||
$update = array();
|
||||
$where = array();
|
||||
foreach ($set as $key => $val) {
|
||||
$update[] = "$key = $val";
|
||||
if (isset($primary[idf_unescape($key)])) {
|
||||
$where[] = "$key = $val";
|
||||
}
|
||||
}
|
||||
//! can use only one query for all rows
|
||||
if (!queries("MERGE " . table($table) . " USING (VALUES(" . implode(", ", $set) . ")) AS source (c" . implode(", c", range(1, count($set))) . ") ON " . implode(" AND ", $where) //! source, c1 - possible conflict
|
||||
. " WHEN MATCHED THEN UPDATE SET " . implode(", ", $update)
|
||||
. " WHEN NOT MATCHED THEN INSERT (" . implode(", ", array_keys($set)) . ") VALUES (" . implode(", ", $set) . ");" // ; is mandatory
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function begin() {
|
||||
return queries("BEGIN TRANSACTION");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function idf_escape($idf) {
|
||||
return "[" . str_replace("]", "]]", $idf) . "]";
|
||||
}
|
||||
@@ -252,7 +292,7 @@ if (isset($_GET["mssql"])) {
|
||||
}
|
||||
|
||||
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
||||
return (isset($limit) ? " TOP (" . ($limit + $offset) . ")" : "") . " $query$where"; // seek later
|
||||
return ($limit !== null ? " TOP (" . ($limit + $offset) . ")" : "") . " $query$where"; // seek later
|
||||
}
|
||||
|
||||
function limit1($query, $where) {
|
||||
@@ -286,10 +326,10 @@ if (isset($_GET["mssql"])) {
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function table_status($name = "") {
|
||||
$return = array();
|
||||
foreach (get_rows("SELECT name AS Name, type_desc AS Engine FROM sys.all_objects WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V')" . ($name != "" ? " AND name = " . q($name) : "")) as $row) {
|
||||
foreach (get_rows("SELECT name AS Name, type_desc AS Engine FROM sys.all_objects WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V') " . ($name != "" ? "AND name = " . q($name) : "ORDER BY name")) as $row) {
|
||||
if ($name != "") {
|
||||
return $row;
|
||||
}
|
||||
@@ -301,7 +341,7 @@ if (isset($_GET["mssql"])) {
|
||||
function is_view($table_status) {
|
||||
return $table_status["Engine"] == "VIEW";
|
||||
}
|
||||
|
||||
|
||||
function fk_support($table_status) {
|
||||
return true;
|
||||
}
|
||||
@@ -316,7 +356,7 @@ LEFT JOIN sys.default_constraints d ON c.default_object_id = d.parent_column_id
|
||||
WHERE o.schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND o.type IN ('S', 'U', 'V') AND o.name = " . q($table)
|
||||
) as $row) {
|
||||
$type = $row["type"];
|
||||
$length = (ereg("char|binary", $type) ? $row["max_length"] : ($type == "decimal" ? "$row[precision],$row[scale]" : ""));
|
||||
$length = (preg_match("~char|binary~", $type) ? $row["max_length"] : ($type == "decimal" ? "$row[precision],$row[scale]" : ""));
|
||||
$return[$row["name"]] = array(
|
||||
"field" => $row["name"],
|
||||
"full_type" => $type . ($length ? "($length)" : ""),
|
||||
@@ -336,15 +376,17 @@ WHERE o.schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND o.type IN ('S', 'U',
|
||||
function indexes($table, $connection2 = null) {
|
||||
$return = array();
|
||||
// sp_statistics doesn't return information about primary key
|
||||
foreach (get_rows("SELECT i.name, key_ordinal, is_unique, is_primary_key, c.name AS column_name
|
||||
foreach (get_rows("SELECT i.name, key_ordinal, is_unique, is_primary_key, c.name AS column_name, is_descending_key
|
||||
FROM sys.indexes i
|
||||
INNER JOIN sys.index_columns ic ON i.object_id = ic.object_id AND i.index_id = ic.index_id
|
||||
INNER JOIN sys.columns c ON ic.object_id = c.object_id AND ic.column_id = c.column_id
|
||||
WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
, $connection2) as $row) {
|
||||
$return[$row["name"]]["type"] = ($row["is_primary_key"] ? "PRIMARY" : ($row["is_unique"] ? "UNIQUE" : "INDEX"));
|
||||
$return[$row["name"]]["lengths"] = array();
|
||||
$return[$row["name"]]["columns"][$row["key_ordinal"]] = $row["column_name"];
|
||||
$name = $row["name"];
|
||||
$return[$name]["type"] = ($row["is_primary_key"] ? "PRIMARY" : ($row["is_unique"] ? "UNIQUE" : "INDEX"));
|
||||
$return[$name]["lengths"] = array();
|
||||
$return[$name]["columns"][$row["key_ordinal"]] = $row["column_name"];
|
||||
$return[$name]["descs"][$row["key_ordinal"]] = ($row["is_descending_key"] ? '1' : null);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
@@ -353,11 +395,11 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
global $connection;
|
||||
return array("select" => preg_replace('~^(?:[^[]|\\[[^]]*])*\\s+AS\\s+~isU', '', $connection->result("SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_SCHEMA = SCHEMA_NAME() AND TABLE_NAME = " . q($name))));
|
||||
}
|
||||
|
||||
|
||||
function collations() {
|
||||
$return = array();
|
||||
foreach (get_vals("SELECT name FROM fn_helpcollations()") as $collation) {
|
||||
$return[ereg_replace("_.*", "", $collation)][] = $collation;
|
||||
$return[preg_replace('~_.*~', '', $collation)][] = $collation;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
@@ -370,21 +412,17 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
global $connection;
|
||||
return nl_br(h(preg_replace('~^(\\[[^]]*])+~m', '', $connection->error)));
|
||||
}
|
||||
|
||||
function exact_value($val) {
|
||||
return q($val);
|
||||
}
|
||||
|
||||
function create_database($db, $collation) {
|
||||
return queries("CREATE DATABASE " . idf_escape($db) . (eregi('^[a-z0-9_]+$', $collation) ? " COLLATE $collation" : ""));
|
||||
return queries("CREATE DATABASE " . idf_escape($db) . (preg_match('~^[a-z0-9_]+$~i', $collation) ? " COLLATE $collation" : ""));
|
||||
}
|
||||
|
||||
|
||||
function drop_databases($databases) {
|
||||
return queries("DROP DATABASE " . implode(", ", array_map('idf_escape', $databases)));
|
||||
}
|
||||
|
||||
|
||||
function rename_database($name, $collation) {
|
||||
if (eregi('^[a-z0-9_]+$', $collation)) {
|
||||
if (preg_match('~^[a-z0-9_]+$~i', $collation)) {
|
||||
queries("ALTER DATABASE " . idf_escape(DB) . " COLLATE $collation");
|
||||
}
|
||||
queries("ALTER DATABASE " . idf_escape(DB) . " MODIFY NAME = " . idf_escape($name));
|
||||
@@ -392,9 +430,9 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
}
|
||||
|
||||
function auto_increment() {
|
||||
return " IDENTITY" . ($_POST["Auto_increment"] != "" ? "(" . (+$_POST["Auto_increment"]) . ",1)" : "") . " PRIMARY KEY";
|
||||
return " IDENTITY" . ($_POST["Auto_increment"] != "" ? "(" . number($_POST["Auto_increment"]) . ",1)" : "") . " PRIMARY KEY";
|
||||
}
|
||||
|
||||
|
||||
function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
|
||||
$alter = array();
|
||||
foreach ($fields as $field) {
|
||||
@@ -431,7 +469,7 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function alter_indexes($table, $alter) {
|
||||
$index = array();
|
||||
$drop = array();
|
||||
@@ -445,7 +483,7 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
} elseif (!queries(($val[0] != "PRIMARY"
|
||||
? "CREATE $val[0] " . ($val[0] != "INDEX" ? "INDEX " : "") . idf_escape($val[1] != "" ? $val[1] : uniqid($table . "_")) . " ON " . table($table)
|
||||
: "ALTER TABLE " . table($table) . " ADD PRIMARY KEY"
|
||||
) . " $val[2]")) {
|
||||
) . " (" . implode(", ", $val[2]) . ")")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -453,46 +491,22 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
&& (!$drop || queries("ALTER TABLE " . table($table) . " DROP " . implode(", ", $drop)))
|
||||
;
|
||||
}
|
||||
|
||||
function begin() {
|
||||
return queries("BEGIN TRANSACTION");
|
||||
}
|
||||
|
||||
function insert_into($table, $set) {
|
||||
return queries("INSERT INTO " . table($table) . ($set ? " (" . implode(", ", array_keys($set)) . ")\nVALUES (" . implode(", ", $set) . ")" : "DEFAULT VALUES"));
|
||||
}
|
||||
|
||||
function insert_update($table, $set, $primary) {
|
||||
$update = array();
|
||||
$where = array();
|
||||
foreach ($set as $key => $val) {
|
||||
$update[] = "$key = $val";
|
||||
if (isset($primary[idf_unescape($key)])) {
|
||||
$where[] = "$key = $val";
|
||||
}
|
||||
}
|
||||
// can use only one query for all rows with different API
|
||||
return queries("MERGE " . table($table) . " USING (VALUES(" . implode(", ", $set) . ")) AS source (c" . implode(", c", range(1, count($set))) . ") ON " . implode(" AND ", $where) //! source, c1 - possible conflict
|
||||
. " WHEN MATCHED THEN UPDATE SET " . implode(", ", $update)
|
||||
. " WHEN NOT MATCHED THEN INSERT (" . implode(", ", array_keys($set)) . ") VALUES (" . implode(", ", $set) . ");" // ; is mandatory
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function last_id() {
|
||||
global $connection;
|
||||
return $connection->result("SELECT SCOPE_IDENTITY()"); // @@IDENTITY can return trigger INSERT
|
||||
}
|
||||
|
||||
|
||||
function explain($connection, $query) {
|
||||
$connection->query("SET SHOWPLAN_ALL ON");
|
||||
$return = $connection->query($query);
|
||||
$connection->query("SET SHOWPLAN_ALL OFF"); // connection is used also for indexes
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function found_rows($table_status, $where) {
|
||||
}
|
||||
|
||||
|
||||
function foreign_keys($table) {
|
||||
$return = array();
|
||||
foreach (get_rows("EXEC sp_fkeys @fktable_name = " . q($table)) as $row) {
|
||||
@@ -519,8 +533,11 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
function move_tables($tables, $views, $target) {
|
||||
return apply_queries("ALTER SCHEMA " . idf_escape($target) . " TRANSFER", array_merge($tables, $views));
|
||||
}
|
||||
|
||||
|
||||
function trigger($name) {
|
||||
if ($name == "") {
|
||||
return array();
|
||||
}
|
||||
$rows = get_rows("SELECT s.name [Trigger],
|
||||
CASE WHEN OBJECTPROPERTY(s.id, 'ExecIsInsertTrigger') = 1 THEN 'INSERT' WHEN OBJECTPROPERTY(s.id, 'ExecIsUpdateTrigger') = 1 THEN 'UPDATE' WHEN OBJECTPROPERTY(s.id, 'ExecIsDeleteTrigger') = 1 THEN 'DELETE' END [Event],
|
||||
CASE WHEN OBJECTPROPERTY(s.id, 'ExecIsInsteadOfTrigger') = 1 THEN 'INSTEAD OF' ELSE 'AFTER' END [Timing],
|
||||
@@ -535,7 +552,7 @@ WHERE s.xtype = 'TR' AND s.name = " . q($name)
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function triggers($table) {
|
||||
$return = array();
|
||||
foreach (get_rows("SELECT sys1.name,
|
||||
@@ -549,18 +566,19 @@ WHERE sys1.xtype = 'TR' AND sys2.name = " . q($table)
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function trigger_options() {
|
||||
return array(
|
||||
"Timing" => array("AFTER", "INSTEAD OF"),
|
||||
"Event" => array("INSERT", "UPDATE", "DELETE"),
|
||||
"Type" => array("AS"),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function schemas() {
|
||||
return get_vals("SELECT name FROM sys.schemas");
|
||||
}
|
||||
|
||||
|
||||
function get_schema() {
|
||||
global $connection;
|
||||
if ($_GET["ns"] != "") {
|
||||
@@ -568,27 +586,34 @@ WHERE sys1.xtype = 'TR' AND sys2.name = " . q($table)
|
||||
}
|
||||
return $connection->result("SELECT SCHEMA_NAME()");
|
||||
}
|
||||
|
||||
|
||||
function set_schema($schema) {
|
||||
return true; // ALTER USER is permanent
|
||||
}
|
||||
|
||||
|
||||
function use_sql($database) {
|
||||
return "USE " . idf_escape($database);
|
||||
}
|
||||
|
||||
|
||||
function show_variables() {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
function show_status() {
|
||||
return array();
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
return ereg('^(scheme|trigger|view|drop_col)$', $feature); //! routine|
|
||||
function convert_field($field) {
|
||||
}
|
||||
|
||||
|
||||
function unconvert_field($field, $return) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
return preg_match('~^(columns|database|drop_col|indexes|scheme|sql|table|trigger|view|view_trigger)$~', $feature); //! routine|
|
||||
}
|
||||
|
||||
$jush = "mssql";
|
||||
$types = array();
|
||||
$structured_types = array();
|
||||
@@ -602,7 +627,7 @@ WHERE sys1.xtype = 'TR' AND sys2.name = " . q($table)
|
||||
$structured_types[$key] = array_keys($val);
|
||||
}
|
||||
$unsigned = array();
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "");
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL");
|
||||
$functions = array("len", "lower", "round", "upper");
|
||||
$grouping = array("avg", "count", "count distinct", "max", "min", "sum");
|
||||
$edit_functions = array(
|
||||
|
||||
@@ -8,11 +8,11 @@ if (!defined("DRIVER")) {
|
||||
if (extension_loaded("mysqli")) {
|
||||
class Min_DB extends MySQLi {
|
||||
var $extension = "MySQLi";
|
||||
|
||||
|
||||
function Min_DB() {
|
||||
parent::init();
|
||||
}
|
||||
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
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
|
||||
@@ -24,16 +24,18 @@ if (!defined("DRIVER")) {
|
||||
(is_numeric($port) ? $port : ini_get("mysqli.default_port")),
|
||||
(!is_numeric($port) ? $port : null)
|
||||
);
|
||||
if ($return) {
|
||||
if (method_exists($this, 'set_charset')) {
|
||||
$this->set_charset("utf8");
|
||||
} else {
|
||||
$this->query("SET NAMES utf8");
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function set_charset($charset) {
|
||||
if (parent::set_charset($charset)) {
|
||||
return true;
|
||||
}
|
||||
// the client library may not support utf8mb4
|
||||
parent::set_charset('utf8');
|
||||
return $this->query("SET NAMES $charset");
|
||||
}
|
||||
|
||||
function result($query, $field = 0) {
|
||||
$result = $this->query($query);
|
||||
if (!$result) {
|
||||
@@ -47,17 +49,18 @@ if (!defined("DRIVER")) {
|
||||
return "'" . $this->escape_string($string) . "'";
|
||||
}
|
||||
}
|
||||
|
||||
} elseif (extension_loaded("mysql")) {
|
||||
|
||||
} elseif (extension_loaded("mysql") && !(ini_get("sql.safe_mode") && extension_loaded("pdo_mysql"))) {
|
||||
class Min_DB {
|
||||
var
|
||||
$extension = "MySQL", ///< @var string extension name
|
||||
$server_info, ///< @var string server version
|
||||
$affected_rows, ///< @var int number of affected rows
|
||||
$errno, ///< @var int last error code
|
||||
$error, ///< @var string last error message
|
||||
$_link, $_result ///< @access private
|
||||
;
|
||||
|
||||
|
||||
/** Connect to server
|
||||
* @param string
|
||||
* @param string
|
||||
@@ -74,17 +77,27 @@ if (!defined("DRIVER")) {
|
||||
);
|
||||
if ($this->_link) {
|
||||
$this->server_info = mysql_get_server_info($this->_link);
|
||||
if (function_exists('mysql_set_charset')) {
|
||||
mysql_set_charset("utf8", $this->_link);
|
||||
} else {
|
||||
$this->query("SET NAMES utf8");
|
||||
}
|
||||
} else {
|
||||
$this->error = mysql_error();
|
||||
}
|
||||
return (bool) $this->_link;
|
||||
}
|
||||
|
||||
|
||||
/** Sets the client character set
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
function set_charset($charset) {
|
||||
if (function_exists('mysql_set_charset')) {
|
||||
if (mysql_set_charset($charset, $this->_link)) {
|
||||
return true;
|
||||
}
|
||||
// the client library may not support utf8mb4
|
||||
mysql_set_charset('utf8', $this->_link);
|
||||
}
|
||||
return $this->query("SET NAMES $charset");
|
||||
}
|
||||
|
||||
/** Quote string to use in SQL
|
||||
* @param string
|
||||
* @return string escaped string enclosed in '
|
||||
@@ -92,7 +105,7 @@ if (!defined("DRIVER")) {
|
||||
function quote($string) {
|
||||
return "'" . mysql_real_escape_string($string, $this->_link) . "'";
|
||||
}
|
||||
|
||||
|
||||
/** Select database
|
||||
* @param string
|
||||
* @return bool
|
||||
@@ -100,7 +113,7 @@ if (!defined("DRIVER")) {
|
||||
function select_db($database) {
|
||||
return mysql_select_db($database, $this->_link);
|
||||
}
|
||||
|
||||
|
||||
/** Send query
|
||||
* @param string
|
||||
* @param bool
|
||||
@@ -108,7 +121,9 @@ if (!defined("DRIVER")) {
|
||||
*/
|
||||
function query($query, $unbuffered = false) {
|
||||
$result = @($unbuffered ? mysql_unbuffered_query($query, $this->_link) : mysql_query($query, $this->_link)); // @ - mute mysql.trace_mode
|
||||
$this->error = "";
|
||||
if (!$result) {
|
||||
$this->errno = mysql_errno($this->_link);
|
||||
$this->error = mysql_error($this->_link);
|
||||
return false;
|
||||
}
|
||||
@@ -119,7 +134,7 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
return new Min_Result($result);
|
||||
}
|
||||
|
||||
|
||||
/** Send query with more resultsets
|
||||
* @param string
|
||||
* @return bool
|
||||
@@ -127,14 +142,14 @@ if (!defined("DRIVER")) {
|
||||
function multi_query($query) {
|
||||
return $this->_result = $this->query($query);
|
||||
}
|
||||
|
||||
|
||||
/** Get current resultset
|
||||
* @return Min_Result
|
||||
*/
|
||||
function store_result() {
|
||||
return $this->_result;
|
||||
}
|
||||
|
||||
|
||||
/** Fetch next resultset
|
||||
* @return bool
|
||||
*/
|
||||
@@ -142,7 +157,7 @@ if (!defined("DRIVER")) {
|
||||
// MySQL extension doesn't support multiple results
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/** Get single field from result
|
||||
* @param string
|
||||
* @param int
|
||||
@@ -156,13 +171,13 @@ if (!defined("DRIVER")) {
|
||||
return mysql_result($result->_result, 0, $field);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Min_Result {
|
||||
var
|
||||
$num_rows, ///< @var int number of rows in the result
|
||||
$_result, $_offset = 0 ///< @access private
|
||||
;
|
||||
|
||||
|
||||
/** Constructor
|
||||
* @param resource
|
||||
*/
|
||||
@@ -170,21 +185,21 @@ if (!defined("DRIVER")) {
|
||||
$this->_result = $result;
|
||||
$this->num_rows = mysql_num_rows($result);
|
||||
}
|
||||
|
||||
|
||||
/** Fetch next row as associative array
|
||||
* @return array
|
||||
*/
|
||||
function fetch_assoc() {
|
||||
return mysql_fetch_assoc($this->_result);
|
||||
}
|
||||
|
||||
|
||||
/** Fetch next row as numbered array
|
||||
* @return array
|
||||
*/
|
||||
function fetch_row() {
|
||||
return mysql_fetch_row($this->_result);
|
||||
}
|
||||
|
||||
|
||||
/** Fetch next field
|
||||
* @return object properties: name, type, orgtable, orgname, charsetnr
|
||||
*/
|
||||
@@ -195,37 +210,77 @@ if (!defined("DRIVER")) {
|
||||
$return->charsetnr = ($return->blob ? 63 : 0);
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
/** Free result set
|
||||
*/
|
||||
function __destruct() {
|
||||
mysql_free_result($this->_result); //! not called in PHP 4 which is a problem with mysql.trace_mode
|
||||
mysql_free_result($this->_result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} elseif (extension_loaded("pdo_mysql")) {
|
||||
class Min_DB extends Min_PDO {
|
||||
var $extension = "PDO_MySQL";
|
||||
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
$this->dsn("mysql:host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\\d)~', ';port=\\1', $server)), $username, $password);
|
||||
$this->query("SET NAMES utf8"); // charset in DSN is ignored
|
||||
$this->dsn("mysql:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\\d)~', ';port=\\1', $server)), $username, $password);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function set_charset($charset) {
|
||||
$this->query("SET NAMES $charset"); // charset in DSN is ignored before PHP 5.3.6
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
$this->setAttribute(1000, !$unbuffered); // 1000 - PDO::MYSQL_ATTR_USE_BUFFERED_QUERY
|
||||
return parent::query($query, $unbuffered);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
|
||||
function insert($table, $set) {
|
||||
return ($set ? parent::insert($table, $set) : queries("INSERT INTO " . table($table) . " ()\nVALUES ()"));
|
||||
}
|
||||
|
||||
function insertUpdate($table, $rows, $primary) {
|
||||
$columns = array_keys(reset($rows));
|
||||
$prefix = "INSERT INTO " . table($table) . " (" . implode(", ", $columns) . ") VALUES\n";
|
||||
$values = array();
|
||||
foreach ($columns as $key) {
|
||||
$values[$key] = "$key = VALUES($key)";
|
||||
}
|
||||
$suffix = "\nON DUPLICATE KEY UPDATE " . implode(", ", $values);
|
||||
$values = array();
|
||||
$length = 0;
|
||||
foreach ($rows as $set) {
|
||||
$value = "(" . implode(", ", $set) . ")";
|
||||
if ($values && (strlen($prefix) + $length + strlen($value) + strlen($suffix) > 1e6)) { // 1e6 - default max_allowed_packet
|
||||
if (!queries($prefix . implode(",\n", $values) . $suffix)) {
|
||||
return false;
|
||||
}
|
||||
$values = array();
|
||||
$length = 0;
|
||||
}
|
||||
$values[] = $value;
|
||||
$length += strlen($value) + 2; // 2 - strlen(",\n")
|
||||
}
|
||||
return queries($prefix . implode(",\n", $values) . $suffix);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Escape database identifier
|
||||
* @param string
|
||||
* @return string
|
||||
@@ -250,27 +305,34 @@ if (!defined("DRIVER")) {
|
||||
$connection = new Min_DB;
|
||||
$credentials = $adminer->credentials();
|
||||
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
|
||||
$connection->query("SET sql_quote_show_create = 1");
|
||||
$connection->set_charset(charset($connection)); // available in MySQLi since PHP 5.0.5
|
||||
$connection->query("SET sql_quote_show_create = 1, autocommit = 1");
|
||||
return $connection;
|
||||
}
|
||||
return $connection->error;
|
||||
$return = $connection->error;
|
||||
if (function_exists('iconv') && !is_utf8($return) && strlen($s = iconv("windows-1250", "utf-8", $return)) > strlen($return)) { // windows-1250 - most common Windows encoding
|
||||
$return = $s;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/** Get cached list of databases
|
||||
* @param bool
|
||||
* @return array
|
||||
*/
|
||||
function get_databases($flush = true) {
|
||||
function get_databases($flush) {
|
||||
global $connection;
|
||||
// SHOW DATABASES can take a very long time so it is cached
|
||||
$return = &get_session("dbs");
|
||||
if (!isset($return)) {
|
||||
if ($flush) {
|
||||
restart_session();
|
||||
ob_flush();
|
||||
flush();
|
||||
}
|
||||
$return = get_vals($connection->server_info >= 5 ? "SELECT SCHEMA_NAME FROM information_schema.SCHEMATA" : "SHOW DATABASES"); // SHOW DATABASES can be disabled by skip_show_database
|
||||
$return = get_session("dbs");
|
||||
if ($return === null) {
|
||||
$query = ($connection->server_info >= 5
|
||||
? "SELECT SCHEMA_NAME FROM information_schema.SCHEMATA"
|
||||
: "SHOW DATABASES"
|
||||
); // SHOW DATABASES can be disabled by skip_show_database
|
||||
$return = ($flush ? slow_query($query) : get_vals($query));
|
||||
restart_session();
|
||||
set_session("dbs", $return);
|
||||
stop_session();
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
@@ -284,11 +346,12 @@ if (!defined("DRIVER")) {
|
||||
* @return string
|
||||
*/
|
||||
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
||||
return " $query$where" . (isset($limit) ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
|
||||
return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
|
||||
}
|
||||
|
||||
/** Formulate SQL modification query with limit 1
|
||||
* @param string everything after UPDATE or DELETE
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function limit1($query, $where) {
|
||||
@@ -319,7 +382,7 @@ if (!defined("DRIVER")) {
|
||||
function engines() {
|
||||
$return = array();
|
||||
foreach (get_rows("SHOW ENGINES") as $row) {
|
||||
if (ereg("YES|DEFAULT", $row["Support"])) {
|
||||
if (preg_match("~YES|DEFAULT~", $row["Support"])) {
|
||||
$return[] = $row["Engine"];
|
||||
}
|
||||
}
|
||||
@@ -339,7 +402,10 @@ if (!defined("DRIVER")) {
|
||||
*/
|
||||
function tables_list() {
|
||||
global $connection;
|
||||
return get_key_vals("SHOW" . ($connection->server_info >= 5 ? " FULL" : "") . " TABLES");
|
||||
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"
|
||||
: "SHOW TABLES"
|
||||
);
|
||||
}
|
||||
|
||||
/** Count tables in all databases
|
||||
@@ -356,16 +422,21 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Get table status
|
||||
* @param string
|
||||
* @param bool return only "Name", "Engine" and "Comment" fields
|
||||
* @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 = "") {
|
||||
function table_status($name = "", $fast = false) {
|
||||
global $connection;
|
||||
$return = array();
|
||||
foreach (get_rows("SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_")) : "")) as $row) {
|
||||
foreach (get_rows($fast && $connection->server_info >= 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")
|
||||
: "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "")
|
||||
) as $row) {
|
||||
if ($row["Engine"] == "InnoDB") {
|
||||
// ignore internal comment, unnecessary since MySQL 5.1.21
|
||||
$row["Comment"] = preg_replace('~(?:(.+); )?InnoDB free: .*~', '\\1', $row["Comment"]);
|
||||
}
|
||||
if (!isset($row["Rows"])) {
|
||||
if (!isset($row["Engine"])) {
|
||||
$row["Comment"] = "";
|
||||
}
|
||||
if ($name != "") {
|
||||
@@ -381,7 +452,7 @@ if (!defined("DRIVER")) {
|
||||
* @return bool
|
||||
*/
|
||||
function is_view($table_status) {
|
||||
return !isset($table_status["Rows"]);
|
||||
return $table_status["Engine"] === null;
|
||||
}
|
||||
|
||||
/** Check if table supports foreign keys
|
||||
@@ -389,7 +460,9 @@ if (!defined("DRIVER")) {
|
||||
* @return bool
|
||||
*/
|
||||
function fk_support($table_status) {
|
||||
return eregi("InnoDB|IBMDB2I", $table_status["Engine"]);
|
||||
global $connection;
|
||||
return preg_match('~InnoDB|IBMDB2I~i', $table_status["Engine"])
|
||||
|| (preg_match('~NDB~i', $table_status["Engine"]) && version_compare($connection->server_info, '5.6') >= 0);
|
||||
}
|
||||
|
||||
/** Get information about fields
|
||||
@@ -406,12 +479,12 @@ if (!defined("DRIVER")) {
|
||||
"type" => $match[1],
|
||||
"length" => $match[2],
|
||||
"unsigned" => ltrim($match[3] . $match[4]),
|
||||
"default" => ($row["Default"] != "" || ereg("char", $match[1]) ? $row["Default"] : null),
|
||||
"default" => ($row["Default"] != "" || preg_match("~char|set~", $match[1]) ? $row["Default"] : null),
|
||||
"null" => ($row["Null"] == "YES"),
|
||||
"auto_increment" => ($row["Extra"] == "auto_increment"),
|
||||
"on_update" => (eregi('^on update (.+)', $row["Extra"], $match) ? $match[1] : ""), //! available since MySQL 5.1.23
|
||||
"on_update" => (preg_match('~^on update (.+)~i', $row["Extra"], $match) ? $match[1] : ""), //! available since MySQL 5.1.23
|
||||
"collation" => $row["Collation"],
|
||||
"privileges" => array_flip(explode(",", $row["Privileges"])),
|
||||
"privileges" => array_flip(preg_split('~, *~', $row["Privileges"])),
|
||||
"comment" => $row["Comment"],
|
||||
"primary" => ($row["Key"] == "PRI"),
|
||||
);
|
||||
@@ -422,7 +495,7 @@ if (!defined("DRIVER")) {
|
||||
/** Get table indexes
|
||||
* @param string
|
||||
* @param string Min_DB to use
|
||||
* @return array array($key_name => array("type" => , "columns" => array(), "lengths" => array()))
|
||||
* @return array array($key_name => array("type" => , "columns" => array(), "lengths" => array(), "descs" => array()))
|
||||
*/
|
||||
function indexes($table, $connection2 = null) {
|
||||
$return = array();
|
||||
@@ -430,6 +503,7 @@ if (!defined("DRIVER")) {
|
||||
$return[$row["Key_name"]]["type"] = ($row["Key_name"] == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ? "INDEX" : "UNIQUE")));
|
||||
$return[$row["Key_name"]]["columns"][] = $row["Column_name"];
|
||||
$return[$row["Key_name"]]["lengths"][] = $row["Sub_part"];
|
||||
$return[$row["Key_name"]]["descs"][] = null;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
@@ -444,7 +518,7 @@ if (!defined("DRIVER")) {
|
||||
$return = array();
|
||||
$create_table = $connection->result("SHOW CREATE TABLE " . table($table), 1);
|
||||
if ($create_table) {
|
||||
preg_match_all("~CONSTRAINT ($pattern) FOREIGN KEY \\(((?:$pattern,? ?)+)\\) REFERENCES ($pattern)(?:\\.($pattern))? \\(((?:$pattern,? ?)+)\\)(?: ON DELETE ($on_actions))?(?: ON UPDATE ($on_actions))?~", $create_table, $matches, PREG_SET_ORDER);
|
||||
preg_match_all("~CONSTRAINT ($pattern) FOREIGN KEY ?\\(((?:$pattern,? ?)+)\\) REFERENCES ($pattern)(?:\\.($pattern))? \\(((?:$pattern,? ?)+)\\)(?: ON DELETE ($on_actions))?(?: ON UPDATE ($on_actions))?~", $create_table, $matches, PREG_SET_ORDER);
|
||||
foreach ($matches as $match) {
|
||||
preg_match_all("~$pattern~", $match[2], $source);
|
||||
preg_match_all("~$pattern~", $match[5], $target);
|
||||
@@ -453,8 +527,8 @@ if (!defined("DRIVER")) {
|
||||
"table" => idf_unescape($match[4] != "" ? $match[4] : $match[3]),
|
||||
"source" => array_map('idf_unescape', $source[0]),
|
||||
"target" => array_map('idf_unescape', $target[0]),
|
||||
"on_delete" => $match[6],
|
||||
"on_update" => $match[7],
|
||||
"on_delete" => ($match[6] ? $match[6] : "RESTRICT"),
|
||||
"on_update" => ($match[7] ? $match[7] : "RESTRICT"),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -495,7 +569,8 @@ if (!defined("DRIVER")) {
|
||||
*/
|
||||
function information_schema($db) {
|
||||
global $connection;
|
||||
return ($connection->server_info >= 5 && $db == "information_schema");
|
||||
return ($connection->server_info >= 5 && $db == "information_schema")
|
||||
|| ($connection->server_info >= 5.5 && $db == "performance_schema");
|
||||
}
|
||||
|
||||
/** Get escaped error message
|
||||
@@ -506,52 +581,59 @@ if (!defined("DRIVER")) {
|
||||
return h(preg_replace('~^You have an error.*syntax to use~U', "Syntax error", $connection->error));
|
||||
}
|
||||
|
||||
/** Return expression for binary comparison
|
||||
* @param string
|
||||
* @return string
|
||||
/** Get line of error
|
||||
* @return int 0 for first line
|
||||
*/
|
||||
function exact_value($val) {
|
||||
return q($val) . " COLLATE utf8_bin";
|
||||
function error_line() {
|
||||
global $connection;
|
||||
if (preg_match('~ at line ([0-9]+)$~', $connection->error, $regs)) {
|
||||
return $regs[1] - 1;
|
||||
}
|
||||
}
|
||||
|
||||
/** Create database
|
||||
* @param string
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function create_database($db, $collation) {
|
||||
set_session("dbs", null);
|
||||
return queries("CREATE DATABASE " . idf_escape($db) . ($collation ? " COLLATE " . q($collation) : ""));
|
||||
}
|
||||
|
||||
|
||||
/** Drop databases
|
||||
* @param array
|
||||
* @return bool
|
||||
*/
|
||||
function drop_databases($databases) {
|
||||
$return = apply_queries("DROP DATABASE", $databases, 'idf_escape');
|
||||
restart_session();
|
||||
set_session("dbs", null);
|
||||
return apply_queries("DROP DATABASE", $databases, 'idf_escape');
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
/** Rename database from DB
|
||||
* @param string new name
|
||||
* @return string
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
function rename_database($name, $collation) {
|
||||
$return = false;
|
||||
if (create_database($name, $collation)) {
|
||||
//! move triggers
|
||||
$rename = array();
|
||||
foreach (tables_list() as $table => $type) {
|
||||
$rename[] = table($table) . " TO " . idf_escape($name) . "." . table($table);
|
||||
}
|
||||
if (!$rename || queries("RENAME TABLE " . implode(", ", $rename))) {
|
||||
$return = (!$rename || queries("RENAME TABLE " . implode(", ", $rename)));
|
||||
if ($return) {
|
||||
queries("DROP DATABASE " . idf_escape(DB));
|
||||
return true;
|
||||
}
|
||||
restart_session();
|
||||
set_session("dbs", null);
|
||||
}
|
||||
return false;
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
/** Generate modifier for auto increment column
|
||||
* @return string
|
||||
*/
|
||||
@@ -571,7 +653,7 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
return " AUTO_INCREMENT$auto_increment_index";
|
||||
}
|
||||
|
||||
|
||||
/** Run commands to create or alter table
|
||||
* @param string "" to create
|
||||
* @param string new name
|
||||
@@ -580,7 +662,7 @@ if (!defined("DRIVER")) {
|
||||
* @param string
|
||||
* @param string
|
||||
* @param string
|
||||
* @param int
|
||||
* @param string number
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
@@ -588,42 +670,43 @@ if (!defined("DRIVER")) {
|
||||
$alter = array();
|
||||
foreach ($fields as $field) {
|
||||
$alter[] = ($field[1]
|
||||
? ($table != "" ? ($field[0] != "" ? "CHANGE " . idf_escape($field[0]) : "ADD") : " ") . " " . implode($field[1]) . ($table != "" ? " $field[2]" : "")
|
||||
? ($table != "" ? ($field[0] != "" ? "CHANGE " . idf_escape($field[0]) : "ADD") : " ") . " " . implode($field[1]) . ($table != "" ? $field[2] : "")
|
||||
: "DROP " . idf_escape($field[0])
|
||||
);
|
||||
}
|
||||
$alter = array_merge($alter, $foreign);
|
||||
$status = "COMMENT=" . q($comment)
|
||||
$status = ($comment !== null ? " COMMENT=" . q($comment) : "")
|
||||
. ($engine ? " ENGINE=" . q($engine) : "")
|
||||
. ($collation ? " COLLATE " . q($collation) : "")
|
||||
. ($auto_increment != "" ? " AUTO_INCREMENT=$auto_increment" : "")
|
||||
. $partitioning
|
||||
;
|
||||
if ($table == "") {
|
||||
return queries("CREATE TABLE " . table($name) . " (\n" . implode(",\n", $alter) . "\n) $status");
|
||||
return queries("CREATE TABLE " . table($name) . " (\n" . implode(",\n", $alter) . "\n)$status$partitioning");
|
||||
}
|
||||
if ($table != $name) {
|
||||
$alter[] = "RENAME TO " . table($name);
|
||||
}
|
||||
$alter[] = $status;
|
||||
return queries("ALTER TABLE " . table($table) . "\n" . implode(",\n", $alter));
|
||||
if ($status) {
|
||||
$alter[] = ltrim($status);
|
||||
}
|
||||
return ($alter || $partitioning ? queries("ALTER TABLE " . table($table) . "\n" . implode(",\n", $alter) . $partitioning) : true);
|
||||
}
|
||||
|
||||
|
||||
/** Run commands to alter indexes
|
||||
* @param string escaped table name
|
||||
* @param array of array("index type", "name", "(columns definition)") or array("index type", "name", "DROP")
|
||||
* @param array of array("index type", "name", array("column definition", ...)) or array("index type", "name", "DROP")
|
||||
* @return bool
|
||||
*/
|
||||
function alter_indexes($table, $alter) {
|
||||
foreach ($alter as $key => $val) {
|
||||
$alter[$key] = ($val[2] == "DROP"
|
||||
? "\nDROP INDEX " . idf_escape($val[1])
|
||||
: "\nADD $val[0] " . ($val[0] == "PRIMARY" ? "KEY " : "") . ($val[1] != "" ? idf_escape($val[1]) . " " : "") . $val[2]
|
||||
: "\nADD $val[0] " . ($val[0] == "PRIMARY" ? "KEY " : "") . ($val[1] != "" ? idf_escape($val[1]) . " " : "") . "(" . implode(", ", $val[2]) . ")"
|
||||
);
|
||||
}
|
||||
return queries("ALTER TABLE " . table($table) . implode(",", $alter));
|
||||
}
|
||||
|
||||
|
||||
/** Run commands to truncate tables
|
||||
* @param array
|
||||
* @return bool
|
||||
@@ -631,7 +714,7 @@ if (!defined("DRIVER")) {
|
||||
function truncate_tables($tables) {
|
||||
return apply_queries("TRUNCATE TABLE", $tables);
|
||||
}
|
||||
|
||||
|
||||
/** Drop views
|
||||
* @param array
|
||||
* @return bool
|
||||
@@ -639,7 +722,7 @@ if (!defined("DRIVER")) {
|
||||
function drop_views($views) {
|
||||
return queries("DROP VIEW " . implode(", ", array_map('table', $views)));
|
||||
}
|
||||
|
||||
|
||||
/** Drop tables
|
||||
* @param array
|
||||
* @return bool
|
||||
@@ -647,7 +730,7 @@ if (!defined("DRIVER")) {
|
||||
function drop_tables($tables) {
|
||||
return queries("DROP TABLE " . implode(", ", array_map('table', $tables)));
|
||||
}
|
||||
|
||||
|
||||
/** Move tables to other schema
|
||||
* @param array
|
||||
* @param array
|
||||
@@ -662,7 +745,7 @@ if (!defined("DRIVER")) {
|
||||
return queries("RENAME TABLE " . implode(", ", $rename));
|
||||
//! move triggers
|
||||
}
|
||||
|
||||
|
||||
/** Copy tables to other schema
|
||||
* @param array
|
||||
* @param array
|
||||
@@ -673,7 +756,7 @@ if (!defined("DRIVER")) {
|
||||
queries("SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'");
|
||||
foreach ($tables as $table) {
|
||||
$name = ($target == DB ? table("copy_$table") : idf_escape($target) . "." . table($table));
|
||||
if (!queries("DROP TABLE IF EXISTS $name")
|
||||
if (!queries("\nDROP TABLE IF EXISTS $name")
|
||||
|| !queries("CREATE TABLE $name LIKE " . table($table))
|
||||
|| !queries("INSERT INTO $name SELECT * FROM " . table($table))
|
||||
) {
|
||||
@@ -691,39 +774,42 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/** Get information about trigger
|
||||
* @param string trigger name
|
||||
* @return array array("Trigger" => , "Timing" => , "Event" => , "Statement" => )
|
||||
* @return array array("Trigger" => , "Timing" => , "Event" => , "Of" => , "Type" => , "Statement" => )
|
||||
*/
|
||||
function trigger($name) {
|
||||
if ($name == "") {
|
||||
return array();
|
||||
}
|
||||
$rows = get_rows("SHOW TRIGGERS WHERE `Trigger` = " . q($name));
|
||||
return reset($rows);
|
||||
}
|
||||
|
||||
|
||||
/** Get defined triggers
|
||||
* @param string
|
||||
* @return array array($name => array($timing, $event))
|
||||
*/
|
||||
function triggers($table) {
|
||||
$return = array();
|
||||
foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_"))) as $row) {
|
||||
foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\"))) as $row) {
|
||||
$return[$row["Trigger"]] = array($row["Timing"], $row["Event"]);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
/** Get trigger options
|
||||
* @return array ("Timing" => array(), "Type" => array())
|
||||
* @return array ("Timing" => array(), "Event" => array(), "Type" => array())
|
||||
*/
|
||||
function trigger_options() {
|
||||
return array(
|
||||
"Timing" => array("BEFORE", "AFTER"),
|
||||
// Event is always INSERT, UPDATE, DELETE
|
||||
"Event" => array("INSERT", "UPDATE", "DELETE"),
|
||||
"Type" => array("FOR EACH ROW"),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/** Get information about stored routine
|
||||
* @param string
|
||||
* @param string "FUNCTION" or "PROCEDURE"
|
||||
@@ -732,10 +818,10 @@ if (!defined("DRIVER")) {
|
||||
function routine($name, $type) {
|
||||
global $connection, $enum_length, $inout, $types;
|
||||
$aliases = array("bool", "boolean", "integer", "double precision", "real", "dec", "numeric", "fixed", "national char", "national varchar");
|
||||
$type_pattern = "((" . implode("|", array_merge(array_keys($types), $aliases)) . ")(?:\\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";
|
||||
$create = $connection->result("SHOW CREATE $type " . idf_escape($name), 2);
|
||||
preg_match("~\\(((?:$pattern\\s*,?)*)\\)" . ($type == "FUNCTION" ? "\\s*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();
|
||||
preg_match_all("~$pattern\\s*,?~is", $match[1], $matches, PREG_SET_ORDER);
|
||||
foreach ($matches as $param) {
|
||||
@@ -745,6 +831,7 @@ if (!defined("DRIVER")) {
|
||||
"type" => strtolower($param[5]),
|
||||
"length" => preg_replace_callback("~$enum_length~s", 'normalize_enum', $param[6]),
|
||||
"unsigned" => strtolower(preg_replace('~\\s+~', ' ', trim("$param[8] $param[7]"))),
|
||||
"null" => 1,
|
||||
"full_type" => $param[4],
|
||||
"inout" => strtoupper($param[1]),
|
||||
"collation" => strtolower($param[9]),
|
||||
@@ -760,51 +847,21 @@ if (!defined("DRIVER")) {
|
||||
"language" => "SQL", // available in information_schema.ROUTINES.PARAMETER_STYLE
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/** Get list of routines
|
||||
* @return array ("ROUTINE_TYPE" => , "ROUTINE_NAME" => , "DTD_IDENTIFIER" => )
|
||||
*/
|
||||
function routines() {
|
||||
return get_rows("SELECT * FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = " . q(DB));
|
||||
return get_rows("SELECT ROUTINE_NAME, ROUTINE_TYPE, DTD_IDENTIFIER FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = " . q(DB));
|
||||
}
|
||||
|
||||
|
||||
/** Get list of available routine languages
|
||||
* @return array
|
||||
*/
|
||||
function routine_languages() {
|
||||
return array(); // "SQL" not required
|
||||
}
|
||||
|
||||
/** Begin transaction
|
||||
* @return bool
|
||||
*/
|
||||
function begin() {
|
||||
return queries("BEGIN");
|
||||
}
|
||||
|
||||
/** Insert data into table
|
||||
* @param string
|
||||
* @param array
|
||||
* @return bool
|
||||
*/
|
||||
function insert_into($table, $set) {
|
||||
return queries("INSERT INTO " . table($table) . " (" . implode(", ", array_keys($set)) . ")\nVALUES (" . implode(", ", $set) . ")");
|
||||
}
|
||||
|
||||
/** Insert or update data in the table
|
||||
* @param string
|
||||
* @param array
|
||||
* @param array columns in keys
|
||||
* @return bool
|
||||
*/
|
||||
function insert_update($table, $set, $primary) {
|
||||
foreach ($set as $key => $val) {
|
||||
$set[$key] = "$key = $val";
|
||||
}
|
||||
$update = implode(", ", $set);
|
||||
return queries("INSERT INTO " . table($table) . " SET $update ON DUPLICATE KEY UPDATE $update");
|
||||
}
|
||||
|
||||
|
||||
/** Get last auto increment ID
|
||||
* @return string
|
||||
*/
|
||||
@@ -812,16 +869,16 @@ if (!defined("DRIVER")) {
|
||||
global $connection;
|
||||
return $connection->result("SELECT LAST_INSERT_ID()"); // mysql_insert_id() truncates bigint
|
||||
}
|
||||
|
||||
|
||||
/** Explain select
|
||||
* @param Min_DB
|
||||
* @param string
|
||||
* @return Min_Result
|
||||
*/
|
||||
function explain($connection, $query) {
|
||||
return $connection->query("EXPLAIN $query");
|
||||
return $connection->query("EXPLAIN " . ($connection->server_info >= 5.1 ? "PARTITIONS " : "") . $query);
|
||||
}
|
||||
|
||||
|
||||
/** Get approximate number of rows
|
||||
* @param array
|
||||
* @param array
|
||||
@@ -830,28 +887,28 @@ if (!defined("DRIVER")) {
|
||||
function found_rows($table_status, $where) {
|
||||
return ($where || $table_status["Engine"] != "InnoDB" ? null : $table_status["Rows"]);
|
||||
}
|
||||
|
||||
|
||||
/** Get user defined types
|
||||
* @return array
|
||||
*/
|
||||
function types() {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
/** Get existing schemas
|
||||
* @return array
|
||||
*/
|
||||
function schemas() {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
/** Get current schema
|
||||
* @return string
|
||||
*/
|
||||
function get_schema() {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
/** Set current schema
|
||||
* @param string
|
||||
* @return bool
|
||||
@@ -859,7 +916,7 @@ if (!defined("DRIVER")) {
|
||||
function set_schema($schema) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/** Get SQL command to create table
|
||||
* @param string
|
||||
* @param bool
|
||||
@@ -873,7 +930,7 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
/** Get SQL command to truncate table
|
||||
* @param string
|
||||
* @return string
|
||||
@@ -881,7 +938,7 @@ if (!defined("DRIVER")) {
|
||||
function truncate_sql($table) {
|
||||
return "TRUNCATE " . table($table);
|
||||
}
|
||||
|
||||
|
||||
/** Get SQL command to change database
|
||||
* @param string
|
||||
* @return string
|
||||
@@ -889,7 +946,7 @@ if (!defined("DRIVER")) {
|
||||
function use_sql($database) {
|
||||
return "USE " . idf_escape($database);
|
||||
}
|
||||
|
||||
|
||||
/** Get SQL commands to create triggers
|
||||
* @param string
|
||||
* @param string
|
||||
@@ -897,41 +954,75 @@ if (!defined("DRIVER")) {
|
||||
*/
|
||||
function trigger_sql($table, $style) {
|
||||
$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" : "")
|
||||
. "CREATE TRIGGER " . idf_escape($row["Trigger"]) . " $row[Timing] $row[Event] ON " . table($row["Table"]) . " FOR EACH ROW\n$row[Statement];;\n";
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
/** Get server variables
|
||||
* @return array ($name => $value)
|
||||
*/
|
||||
function show_variables() {
|
||||
return get_key_vals("SHOW VARIABLES");
|
||||
}
|
||||
|
||||
|
||||
/** Get process list
|
||||
* @return array ($row)
|
||||
*/
|
||||
function process_list() {
|
||||
return get_rows("SHOW FULL PROCESSLIST");
|
||||
}
|
||||
|
||||
|
||||
/** Get status variables
|
||||
* @return array ($name => $value)
|
||||
*/
|
||||
function show_status() {
|
||||
return get_key_vals("SHOW STATUS");
|
||||
}
|
||||
|
||||
|
||||
/** Convert field in select and edit
|
||||
* @param array one element from fields()
|
||||
* @return string
|
||||
*/
|
||||
function convert_field($field) {
|
||||
if (preg_match("~binary~", $field["type"])) {
|
||||
return "HEX(" . idf_escape($field["field"]) . ")";
|
||||
}
|
||||
if ($field["type"] == "bit") {
|
||||
return "BIN(" . idf_escape($field["field"]) . " + 0)"; // + 0 is required outside MySQLnd
|
||||
}
|
||||
if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
|
||||
return "AsWKT(" . idf_escape($field["field"]) . ")";
|
||||
}
|
||||
}
|
||||
|
||||
/** Convert value in edit after applying functions back
|
||||
* @param array one element from fields()
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function unconvert_field($field, $return) {
|
||||
if (preg_match("~binary~", $field["type"])) {
|
||||
$return = "UNHEX($return)";
|
||||
}
|
||||
if ($field["type"] == "bit") {
|
||||
$return = "CONV($return, 2, 10) + 0";
|
||||
}
|
||||
if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
|
||||
$return = "GeomFromText($return)";
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/** Check whether a feature is supported
|
||||
* @param string "comment", "copy", "drop_col", "dump", "event", "kill", "partitioning", "privileges", "procedure", "processlist", "routine", "scheme", "sequence", "status", "trigger", "type", "variables", "view"
|
||||
* @param string "comment", "copy", "database", "drop_col", "dump", "event", "kill", "materializedview", "partitioning", "privileges", "procedure", "processlist", "routine", "scheme", "sequence", "status", "table", "trigger", "type", "variables", "view", "view_trigger"
|
||||
* @return bool
|
||||
*/
|
||||
function support($feature) {
|
||||
global $connection;
|
||||
return !ereg("scheme|sequence|type" . ($connection->server_info < 5.1 ? "|event|partitioning" . ($connection->server_info < 5 ? "|view|routine|trigger" : "") : ""), $feature);
|
||||
return !preg_match("~scheme|sequence|type|view_trigger" . ($connection->server_info < 5.1 ? "|event|partitioning" . ($connection->server_info < 5 ? "|routine|trigger|view" : "") : "") . "~", $feature);
|
||||
}
|
||||
|
||||
$jush = "sql"; ///< @var string JUSH identifier
|
||||
@@ -941,23 +1032,24 @@ if (!defined("DRIVER")) {
|
||||
lang('Numbers') => array("tinyint" => 3, "smallint" => 5, "mediumint" => 8, "int" => 10, "bigint" => 20, "decimal" => 66, "float" => 12, "double" => 21),
|
||||
lang('Date and time') => array("date" => 10, "datetime" => 19, "timestamp" => 19, "time" => 10, "year" => 4),
|
||||
lang('Strings') => array("char" => 255, "varchar" => 65535, "tinytext" => 255, "text" => 65535, "mediumtext" => 16777215, "longtext" => 4294967295),
|
||||
lang('Binary') => array("bit" => 20, "binary" => 255, "varbinary" => 65535, "tinyblob" => 255, "blob" => 65535, "mediumblob" => 16777215, "longblob" => 4294967295),
|
||||
lang('Lists') => array("enum" => 65535, "set" => 64),
|
||||
lang('Binary') => array("bit" => 20, "binary" => 255, "varbinary" => 65535, "tinyblob" => 255, "blob" => 65535, "mediumblob" => 16777215, "longblob" => 4294967295),
|
||||
lang('Geometry') => array("geometry" => 0, "point" => 0, "linestring" => 0, "polygon" => 0, "multipoint" => 0, "multilinestring" => 0, "multipolygon" => 0, "geometrycollection" => 0),
|
||||
) as $key => $val) {
|
||||
$types += $val;
|
||||
$structured_types[$key] = array_keys($val);
|
||||
}
|
||||
$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", ""); ///< @var array operators used in select
|
||||
$functions = array("char_length", "date", "from_unixtime", "hex", "lower", "round", "sec_to_time", "time_to_sec", "upper"); ///< @var array functions used in select
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "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
|
||||
$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
|
||||
array(
|
||||
"char" => "md5/sha1/password/encrypt/uuid", //! JavaScript for disabling maxlength
|
||||
"binary" => "md5/sha1/hex",
|
||||
"binary" => "md5/sha1",
|
||||
"date|time" => "now",
|
||||
), array(
|
||||
"int|float|double|decimal" => "+/-",
|
||||
"(^|[^o])int|float|double|decimal" => "+/-", // not point
|
||||
"date" => "+ interval/- interval",
|
||||
"time" => "addtime/subtime",
|
||||
"char|text" => "concat",
|
||||
|
||||
@@ -6,16 +6,16 @@ if (isset($_GET["oracle"])) {
|
||||
define("DRIVER", "oracle");
|
||||
if (extension_loaded("oci8")) {
|
||||
class Min_DB {
|
||||
var $extension = "oci8", $_link, $_result, $server_info, $affected_rows, $error;
|
||||
var $extension = "oci8", $_link, $_result, $server_info, $affected_rows, $errno, $error;
|
||||
|
||||
function _error($errno, $error) {
|
||||
if (ini_bool("html_errors")) {
|
||||
$error = html_entity_decode(strip_tags($error));
|
||||
}
|
||||
$error = ereg_replace('^[^:]*: ', '', $error);
|
||||
$error = preg_replace('~^[^:]*: ~', '', $error);
|
||||
$this->error = $error;
|
||||
}
|
||||
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
$this->_link = @oci_new_connect($username, $password, $server, "AL32UTF8");
|
||||
if ($this->_link) {
|
||||
@@ -37,8 +37,10 @@ if (isset($_GET["oracle"])) {
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
$result = oci_parse($this->_link, $query);
|
||||
$this->error = "";
|
||||
if (!$result) {
|
||||
$error = oci_error($this->_link);
|
||||
$this->errno = $error["code"];
|
||||
$this->error = $error["message"];
|
||||
return false;
|
||||
}
|
||||
@@ -57,15 +59,15 @@ if (isset($_GET["oracle"])) {
|
||||
function multi_query($query) {
|
||||
return $this->_result = $this->query($query);
|
||||
}
|
||||
|
||||
|
||||
function store_result() {
|
||||
return $this->_result;
|
||||
}
|
||||
|
||||
|
||||
function next_result() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function result($query, $field = 1) {
|
||||
$result = $this->query($query);
|
||||
if (!is_object($result) || !oci_fetch($result->_result)) {
|
||||
@@ -90,7 +92,7 @@ if (isset($_GET["oracle"])) {
|
||||
}
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
function fetch_assoc() {
|
||||
return $this->_convert(oci_fetch_assoc($this->_result));
|
||||
}
|
||||
@@ -105,31 +107,45 @@ if (isset($_GET["oracle"])) {
|
||||
$return->name = oci_field_name($this->_result, $column);
|
||||
$return->orgname = $return->name;
|
||||
$return->type = oci_field_type($this->_result, $column);
|
||||
$return->charsetnr = (ereg("raw|blob|bfile", $return->type) ? 63 : 0); // 63 - binary
|
||||
$return->charsetnr = (preg_match("~raw|blob|bfile~", $return->type) ? 63 : 0); // 63 - binary
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function __destruct() {
|
||||
oci_free_statement($this->_result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} elseif (extension_loaded("pdo_oci")) {
|
||||
class Min_DB extends Min_PDO {
|
||||
var $extension = "PDO_OCI";
|
||||
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
$this->dsn("oci:dbname=//$server;charset=AL32UTF8", $username, $password);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function select_db($database) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
|
||||
//! support empty $set in insert()
|
||||
|
||||
function begin() {
|
||||
return true; // automatic start
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function idf_escape($idf) {
|
||||
return '"' . str_replace('"', '""', $idf) . '"';
|
||||
}
|
||||
@@ -154,7 +170,7 @@ if (isset($_GET["oracle"])) {
|
||||
|
||||
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
||||
return ($offset ? " * FROM (SELECT t.*, rownum AS rnum FROM (SELECT $query$where) t WHERE rownum <= " . ($limit + $offset) . ") WHERE rnum > $offset"
|
||||
: (isset($limit) ? " * FROM (SELECT $query$where) WHERE rownum <= " . ($limit + $offset)
|
||||
: ($limit !== null ? " * FROM (SELECT $query$where) WHERE rownum <= " . ($limit + $offset)
|
||||
: " $query$where"
|
||||
));
|
||||
}
|
||||
@@ -179,19 +195,21 @@ if (isset($_GET["oracle"])) {
|
||||
|
||||
function tables_list() {
|
||||
return get_key_vals("SELECT table_name, 'table' FROM all_tables WHERE tablespace_name = " . q(DB) . "
|
||||
UNION SELECT view_name, 'view' FROM user_views"
|
||||
UNION SELECT view_name, 'view' FROM user_views
|
||||
ORDER BY 1"
|
||||
); //! views don't have schema
|
||||
}
|
||||
|
||||
function count_tables($databases) {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
function table_status($name = "") {
|
||||
$return = array();
|
||||
$search = q($name);
|
||||
foreach (get_rows('SELECT table_name "Name", \'table\' "Engine" FROM all_tables WHERE tablespace_name = ' . q(DB) . ($name != "" ? " AND table_name = $search" : "") . "
|
||||
UNION SELECT view_name, 'view' FROM user_views" . ($name != "" ? " WHERE view_name = $search" : "")
|
||||
foreach (get_rows('SELECT table_name "Name", \'table\' "Engine", avg_row_len * num_rows "Data_length", num_rows "Rows" FROM all_tables WHERE tablespace_name = ' . q(DB) . ($name != "" ? " AND table_name = $search" : "") . "
|
||||
UNION SELECT view_name, 'view', 0, 0 FROM user_views" . ($name != "" ? " WHERE view_name = $search" : "") . "
|
||||
ORDER BY 1"
|
||||
) as $row) {
|
||||
if ($name != "") {
|
||||
return $row;
|
||||
@@ -204,7 +222,7 @@ UNION SELECT view_name, 'view' FROM user_views" . ($name != "" ? " WHERE view_na
|
||||
function is_view($table_status) {
|
||||
return $table_status["Engine"] == "view";
|
||||
}
|
||||
|
||||
|
||||
function fk_support($table_status) {
|
||||
return true;
|
||||
}
|
||||
@@ -241,9 +259,11 @@ FROM user_ind_columns uic
|
||||
LEFT JOIN user_constraints uc ON uic.index_name = uc.constraint_name AND uic.table_name = uc.table_name
|
||||
WHERE uic.table_name = " . q($table) . "
|
||||
ORDER BY uc.constraint_type, uic.column_position", $connection2) as $row) {
|
||||
$return[$row["INDEX_NAME"]]["type"] = ($row["CONSTRAINT_TYPE"] == "P" ? "PRIMARY" : ($row["CONSTRAINT_TYPE"] == "U" ? "UNIQUE" : "INDEX"));
|
||||
$return[$row["INDEX_NAME"]]["columns"][] = $row["COLUMN_NAME"];
|
||||
$return[$row["INDEX_NAME"]]["lengths"][] = ($row["CHAR_LENGTH"] && $row["CHAR_LENGTH"] != $row["COLUMN_LENGTH"] ? $row["CHAR_LENGTH"] : null);
|
||||
$index_name = $row["INDEX_NAME"];
|
||||
$return[$index_name]["type"] = ($row["CONSTRAINT_TYPE"] == "P" ? "PRIMARY" : ($row["CONSTRAINT_TYPE"] == "U" ? "UNIQUE" : "INDEX"));
|
||||
$return[$index_name]["columns"][] = $row["COLUMN_NAME"];
|
||||
$return[$index_name]["lengths"][] = ($row["CHAR_LENGTH"] && $row["CHAR_LENGTH"] != $row["COLUMN_LENGTH"] ? $row["CHAR_LENGTH"] : null);
|
||||
$return[$index_name]["descs"][] = ($row["DESCEND"] ? '1' : null);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
@@ -252,7 +272,7 @@ ORDER BY uc.constraint_type, uic.column_position", $connection2) as $row) {
|
||||
$rows = get_rows('SELECT text "select" FROM user_views WHERE view_name = ' . q($name));
|
||||
return reset($rows);
|
||||
}
|
||||
|
||||
|
||||
function collations() {
|
||||
return array(); //!
|
||||
}
|
||||
@@ -265,19 +285,15 @@ ORDER BY uc.constraint_type, uic.column_position", $connection2) as $row) {
|
||||
global $connection;
|
||||
return h($connection->error); //! highlight sqltext from offset
|
||||
}
|
||||
|
||||
function exact_value($val) {
|
||||
return q($val);
|
||||
}
|
||||
|
||||
|
||||
function explain($connection, $query) {
|
||||
$connection->query("EXPLAIN PLAN FOR $query");
|
||||
return $connection->query("SELECT * FROM plan_table");
|
||||
}
|
||||
|
||||
|
||||
function found_rows($table_status, $where) {
|
||||
}
|
||||
|
||||
|
||||
function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
|
||||
$alter = $drop = array();
|
||||
foreach ($fields as $field) {
|
||||
@@ -299,11 +315,33 @@ ORDER BY uc.constraint_type, uic.column_position", $connection2) as $row) {
|
||||
&& ($table == $name || queries("ALTER TABLE " . table($table) . " RENAME TO " . table($name)))
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
function foreign_keys($table) {
|
||||
return array(); //!
|
||||
$return = array();
|
||||
$query = "SELECT c_list.CONSTRAINT_NAME as NAME,
|
||||
c_src.COLUMN_NAME as SRC_COLUMN,
|
||||
c_dest.OWNER as DEST_DB,
|
||||
c_dest.TABLE_NAME as DEST_TABLE,
|
||||
c_dest.COLUMN_NAME as DEST_COLUMN,
|
||||
c_list.DELETE_RULE as ON_DELETE
|
||||
FROM ALL_CONSTRAINTS c_list, ALL_CONS_COLUMNS c_src, ALL_CONS_COLUMNS c_dest
|
||||
WHERE c_list.CONSTRAINT_NAME = c_src.CONSTRAINT_NAME
|
||||
AND c_list.R_CONSTRAINT_NAME = c_dest.CONSTRAINT_NAME
|
||||
AND c_list.CONSTRAINT_TYPE = 'R'
|
||||
AND c_src.TABLE_NAME = " . q($table);
|
||||
foreach (get_rows($query) as $row) {
|
||||
$return[$row['NAME']] = array(
|
||||
"db" => $row['DEST_DB'],
|
||||
"table" => $row['DEST_TABLE'],
|
||||
"source" => array($row['SRC_COLUMN']),
|
||||
"target" => array($row['DEST_COLUMN']),
|
||||
"on_delete" => $row['ON_DELETE'],
|
||||
"on_update" => null,
|
||||
);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function truncate_tables($tables) {
|
||||
return apply_queries("TRUNCATE TABLE", $tables);
|
||||
}
|
||||
@@ -316,43 +354,53 @@ ORDER BY uc.constraint_type, uic.column_position", $connection2) as $row) {
|
||||
return apply_queries("DROP TABLE", $tables);
|
||||
}
|
||||
|
||||
function begin() {
|
||||
return true; // automatic start
|
||||
}
|
||||
|
||||
function insert_into($table, $set) {
|
||||
return queries("INSERT INTO " . table($table) . " (" . implode(", ", array_keys($set)) . ")\nVALUES (" . implode(", ", $set) . ")"); //! no columns
|
||||
}
|
||||
|
||||
function last_id() {
|
||||
return 0; //!
|
||||
}
|
||||
|
||||
|
||||
function schemas() {
|
||||
return array();
|
||||
return get_vals("SELECT DISTINCT owner FROM dba_segments WHERE owner IN (SELECT username FROM dba_users WHERE default_tablespace NOT IN ('SYSTEM','SYSAUX'))");
|
||||
}
|
||||
|
||||
|
||||
function get_schema() {
|
||||
return "";
|
||||
global $connection;
|
||||
return $connection->result("SELECT sys_context('USERENV', 'SESSION_USER') FROM dual");
|
||||
}
|
||||
|
||||
|
||||
function set_schema($scheme) {
|
||||
return true;
|
||||
global $connection;
|
||||
return $connection->query("ALTER SESSION SET CURRENT_SCHEMA = " . idf_escape($scheme));
|
||||
}
|
||||
|
||||
|
||||
function show_variables() {
|
||||
return get_key_vals('SELECT name, display_value FROM v$parameter');
|
||||
}
|
||||
|
||||
|
||||
function process_list() {
|
||||
return get_rows('SELECT sess.process AS "process", sess.username AS "user", sess.schemaname AS "schema", sess.status AS "status", sess.wait_class AS "wait_class", sess.seconds_in_wait AS "seconds_in_wait", sql.sql_text AS "sql_text", sess.machine AS "machine", sess.port AS "port"
|
||||
FROM v$session sess LEFT OUTER JOIN v$sql sql
|
||||
ON sql.sql_id = sess.sql_id
|
||||
WHERE sess.type = \'USER\'
|
||||
ORDER BY PROCESS
|
||||
');
|
||||
}
|
||||
|
||||
function show_status() {
|
||||
$rows = get_rows('SELECT * FROM v$instance');
|
||||
return reset($rows);
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
return ereg("view|drop_col|variables|status", $feature); //!
|
||||
|
||||
function convert_field($field) {
|
||||
}
|
||||
|
||||
|
||||
function unconvert_field($field, $return) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
return preg_match('~^(columns|database|drop_col|indexes|processlist|scheme|sql|status|table|variables|view|view_trigger)$~', $feature); //!
|
||||
}
|
||||
|
||||
$jush = "oracle";
|
||||
$types = array();
|
||||
$structured_types = array();
|
||||
@@ -366,7 +414,7 @@ ORDER BY uc.constraint_type, uic.column_position", $connection2) as $row) {
|
||||
$structured_types[$key] = array_keys($val);
|
||||
}
|
||||
$unsigned = array();
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "");
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL");
|
||||
$functions = array("length", "lower", "round", "upper");
|
||||
$grouping = array("avg", "count", "count distinct", "max", "min", "sum");
|
||||
$edit_functions = array(
|
||||
|
||||
@@ -7,25 +7,25 @@ if (isset($_GET["pgsql"])) {
|
||||
if (extension_loaded("pgsql")) {
|
||||
class Min_DB {
|
||||
var $extension = "PgSQL", $_link, $_result, $_string, $_database = true, $server_info, $affected_rows, $error;
|
||||
|
||||
|
||||
function _error($errno, $error) {
|
||||
if (ini_bool("html_errors")) {
|
||||
$error = html_entity_decode(strip_tags($error));
|
||||
}
|
||||
$error = ereg_replace('^[^:]*: ', '', $error);
|
||||
$error = preg_replace('~^[^:]*: ~', '', $error);
|
||||
$this->error = $error;
|
||||
}
|
||||
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
global $adminer;
|
||||
$db = $adminer->database();
|
||||
set_error_handler(array($this, '_error'));
|
||||
$this->_string = "host='" . str_replace(":", "' port='", addcslashes($server, "'\\")) . "' user='" . addcslashes($username, "'\\") . "' password='" . addcslashes($password, "'\\") . "'";
|
||||
$this->_link = @pg_connect($this->_string . ($db != "" ? " dbname='" . addcslashes($db, "'\\") . "'" : " dbname='template1'"), PGSQL_CONNECT_FORCE_NEW);
|
||||
$this->_link = @pg_connect("$this->_string dbname='" . ($db != "" ? addcslashes($db, "'\\") : "postgres") . "'", PGSQL_CONNECT_FORCE_NEW);
|
||||
if (!$this->_link && $db != "") {
|
||||
// try to connect directly with database for performance
|
||||
$this->_database = false;
|
||||
$this->_link = @pg_connect("$this->_string dbname='template1'", PGSQL_CONNECT_FORCE_NEW);
|
||||
$this->_link = @pg_connect("$this->_string dbname='postgres'", PGSQL_CONNECT_FORCE_NEW);
|
||||
}
|
||||
restore_error_handler();
|
||||
if ($this->_link) {
|
||||
@@ -35,11 +35,11 @@ if (isset($_GET["pgsql"])) {
|
||||
}
|
||||
return (bool) $this->_link;
|
||||
}
|
||||
|
||||
|
||||
function quote($string) {
|
||||
return "'" . pg_escape_string($this->_link, $string) . "'"; //! bytea
|
||||
}
|
||||
|
||||
|
||||
function select_db($database) {
|
||||
global $adminer;
|
||||
if ($database == $adminer->database()) {
|
||||
@@ -51,13 +51,14 @@ if (isset($_GET["pgsql"])) {
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function close() {
|
||||
$this->_link = @pg_connect("$this->_string dbname='template1'");
|
||||
$this->_link = @pg_connect("$this->_string dbname='postgres'");
|
||||
}
|
||||
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
$result = @pg_query($this->_link, $query);
|
||||
$this->error = "";
|
||||
if (!$result) {
|
||||
$this->error = pg_last_error($this->_link);
|
||||
return false;
|
||||
@@ -67,20 +68,20 @@ if (isset($_GET["pgsql"])) {
|
||||
}
|
||||
return new Min_Result($result);
|
||||
}
|
||||
|
||||
|
||||
function multi_query($query) {
|
||||
return $this->_result = $this->query($query);
|
||||
}
|
||||
|
||||
|
||||
function store_result() {
|
||||
return $this->_result;
|
||||
}
|
||||
|
||||
|
||||
function next_result() {
|
||||
// PgSQL extension doesn't support multiple results
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function result($query, $field = 0) {
|
||||
$result = $this->query($query);
|
||||
if (!$result || !$result->num_rows) {
|
||||
@@ -89,23 +90,23 @@ if (isset($_GET["pgsql"])) {
|
||||
return pg_fetch_result($result->_result, 0, $field);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Min_Result {
|
||||
var $_result, $_offset = 0, $num_rows;
|
||||
|
||||
|
||||
function Min_Result($result) {
|
||||
$this->_result = $result;
|
||||
$this->num_rows = pg_num_rows($result);
|
||||
}
|
||||
|
||||
|
||||
function fetch_assoc() {
|
||||
return pg_fetch_assoc($this->_result);
|
||||
}
|
||||
|
||||
|
||||
function fetch_row() {
|
||||
return pg_fetch_row($this->_result);
|
||||
}
|
||||
|
||||
|
||||
function fetch_field() {
|
||||
$column = $this->_offset++;
|
||||
$return = new stdClass;
|
||||
@@ -118,36 +119,64 @@ if (isset($_GET["pgsql"])) {
|
||||
$return->charsetnr = ($return->type == "bytea" ? 63 : 0); // 63 - binary
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function __destruct() {
|
||||
pg_free_result($this->_result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} elseif (extension_loaded("pdo_pgsql")) {
|
||||
class Min_DB extends Min_PDO {
|
||||
var $extension = "PDO_PgSQL";
|
||||
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
global $adminer;
|
||||
$db = $adminer->database();
|
||||
$string = "pgsql:host='" . str_replace(":", "' port='", addcslashes($server, "'\\")) . "' options='-c client_encoding=utf8'";
|
||||
$this->dsn($string . ($db != "" ? " dbname='" . addcslashes($db, "'\\") . "'" : ""), $username, $password);
|
||||
$this->dsn("$string dbname='" . ($db != "" ? addcslashes($db, "'\\") : "postgres") . "'", $username, $password);
|
||||
//! connect without DB in case of an error
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function select_db($database) {
|
||||
global $adminer;
|
||||
return ($adminer->database() == $database);
|
||||
}
|
||||
|
||||
|
||||
function close() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
|
||||
function insertUpdate($table, $rows, $primary) {
|
||||
global $connection;
|
||||
foreach ($rows as $set) {
|
||||
$update = array();
|
||||
$where = array();
|
||||
foreach ($set as $key => $val) {
|
||||
$update[] = "$key = $val";
|
||||
if (isset($primary[idf_unescape($key)])) {
|
||||
$where[] = "$key = $val";
|
||||
}
|
||||
}
|
||||
if (!(($where && queries("UPDATE " . table($table) . " SET " . implode(", ", $update) . " WHERE " . implode(" AND ", $where)) && $connection->affected_rows)
|
||||
|| queries("INSERT INTO " . table($table) . " (" . implode(", ", array_keys($set)) . ") VALUES (" . implode(", ", $set) . ")")
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function idf_escape($idf) {
|
||||
return '"' . str_replace('"', '""', $idf) . '"';
|
||||
}
|
||||
@@ -161,23 +190,26 @@ if (isset($_GET["pgsql"])) {
|
||||
$connection = new Min_DB;
|
||||
$credentials = $adminer->credentials();
|
||||
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
|
||||
if ($connection->server_info >= 9) {
|
||||
$connection->query("SET application_name = 'Adminer'");
|
||||
}
|
||||
return $connection;
|
||||
}
|
||||
return $connection->error;
|
||||
}
|
||||
|
||||
|
||||
function get_databases() {
|
||||
return get_vals("SELECT datname FROM pg_database ORDER BY datname");
|
||||
}
|
||||
|
||||
|
||||
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
||||
return " $query$where" . (isset($limit) ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
|
||||
return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
|
||||
}
|
||||
|
||||
function limit1($query, $where) {
|
||||
return " $query$where";
|
||||
}
|
||||
|
||||
|
||||
function db_collation($db, $collations) {
|
||||
global $connection;
|
||||
return $connection->result("SHOW LC_COLLATE"); //! respect $db
|
||||
@@ -186,44 +218,58 @@ if (isset($_GET["pgsql"])) {
|
||||
function engines() {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
function logged_user() {
|
||||
global $connection;
|
||||
return $connection->result("SELECT user");
|
||||
}
|
||||
|
||||
|
||||
function tables_list() {
|
||||
return get_key_vals("SELECT table_name, table_type FROM information_schema.tables WHERE table_schema = current_schema() ORDER BY table_name");
|
||||
$query = "SELECT table_name, table_type FROM information_schema.tables WHERE table_schema = current_schema()";
|
||||
if (support('materializedview')) {
|
||||
$query .= "
|
||||
UNION ALL
|
||||
SELECT matviewname, 'MATERIALIZED VIEW'
|
||||
FROM pg_matviews
|
||||
WHERE schemaname = current_schema()";
|
||||
}
|
||||
$query .= "
|
||||
ORDER BY 1";
|
||||
return get_key_vals($query);
|
||||
}
|
||||
|
||||
|
||||
function count_tables($databases) {
|
||||
return array(); // would require reconnect
|
||||
}
|
||||
|
||||
function table_status($name = "") {
|
||||
$return = array();
|
||||
foreach (get_rows("SELECT relname AS \"Name\", CASE relkind WHEN 'r' THEN '' 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 AS \"Oid\"
|
||||
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\"
|
||||
FROM pg_class
|
||||
WHERE relkind IN ('r','v')
|
||||
AND relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema())"
|
||||
. ($name != "" ? " AND relname = " . q($name) : "")
|
||||
WHERE relkind IN ('r','v','mv','f')
|
||||
AND relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema())
|
||||
" . ($name != "" ? "AND relname = " . q($name) : "ORDER BY relname")
|
||||
) as $row) { //! Index_length, Auto_increment
|
||||
$return[$row["Name"]] = $row;
|
||||
}
|
||||
return ($name != "" ? $return[$name] : $return);
|
||||
}
|
||||
|
||||
|
||||
function is_view($table_status) {
|
||||
return $table_status["Engine"] == "view";
|
||||
return in_array($table_status["Engine"], array("view", "materialized view"));
|
||||
}
|
||||
|
||||
|
||||
function fk_support($table_status) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function fields($table) {
|
||||
$return = array();
|
||||
foreach (get_rows("SELECT a.attname AS field, format_type(a.atttypid, a.atttypmod) AS full_type, d.adsrc AS default, a.attnotnull, col_description(c.oid, a.attnum) AS comment
|
||||
$aliases = array(
|
||||
'timestamp without time zone' => 'timestamp',
|
||||
'timestamp with time zone' => 'timestamptz',
|
||||
);
|
||||
foreach (get_rows("SELECT a.attname AS field, format_type(a.atttypid, a.atttypmod) AS full_type, d.adsrc AS default, a.attnotnull::int, col_description(c.oid, a.attnum) AS comment
|
||||
FROM pg_class c
|
||||
JOIN pg_namespace n ON c.relnamespace = n.oid
|
||||
JOIN pg_attribute a ON c.oid = a.attrelid
|
||||
@@ -235,77 +281,89 @@ AND a.attnum > 0
|
||||
ORDER BY a.attnum"
|
||||
) as $row) {
|
||||
//! collation, primary
|
||||
ereg('(.*)(\\((.*)\\))?', $row["full_type"], $match);
|
||||
list(, $row["type"], , $row["length"]) = $match;
|
||||
$row["full_type"] = $row["type"] . ($row["length"] ? "($row[length])" : "");
|
||||
$row["null"] = ($row["attnotnull"] == "f");
|
||||
$row["auto_increment"] = eregi("^nextval\\(", $row["default"]);
|
||||
preg_match('~([^([]+)(\((.*)\))?([a-z ]+)?((\[[0-9]*])*)$~', $row["full_type"], $match);
|
||||
list(, $type, $length, $row["length"], $addon, $array) = $match;
|
||||
$row["length"] .= $array;
|
||||
$check_type = $type . $addon;
|
||||
if (isset($aliases[$check_type])) {
|
||||
$row["type"] = $aliases[$check_type];
|
||||
$row["full_type"] = $row["type"] . $length . $array;
|
||||
} else {
|
||||
$row["type"] = $type;
|
||||
$row["full_type"] = $row["type"] . $length . $addon . $array;
|
||||
}
|
||||
$row["null"] = !$row["attnotnull"];
|
||||
$row["auto_increment"] = preg_match('~^nextval\\(~i', $row["default"]);
|
||||
$row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1);
|
||||
if (preg_match('~^(.*)::.+$~', $row["default"], $match)) {
|
||||
$row["default"] = ($match[1][0] == "'" ? idf_unescape($match[1]) : $match[1]);
|
||||
if (preg_match('~(.+)::[^)]+(.*)~', $row["default"], $match)) {
|
||||
$row["default"] = ($match[1][0] == "'" ? idf_unescape($match[1]) : $match[1]) . $match[2];
|
||||
}
|
||||
$return[$row["field"]] = $row;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function indexes($table, $connection2 = null) {
|
||||
global $connection;
|
||||
if (!is_object($connection2)) {
|
||||
$connection2 = $connection;
|
||||
}
|
||||
$return = array();
|
||||
$table_oid = $connection2->result("SELECT oid FROM pg_class WHERE 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);
|
||||
foreach (get_rows("SELECT relname, indisunique, indisprimary, indkey FROM pg_index i, pg_class ci WHERE i.indrelid = $table_oid AND ci.oid = i.indexrelid", $connection2) as $row) {
|
||||
$return[$row["relname"]]["type"] = ($row["indisprimary"] == "t" ? "PRIMARY" : ($row["indisunique"] == "t" ? "UNIQUE" : "INDEX"));
|
||||
$return[$row["relname"]]["columns"] = array();
|
||||
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) {
|
||||
$relname = $row["relname"];
|
||||
$return[$relname]["type"] = ($row["indisprimary"] ? "PRIMARY" : ($row["indisunique"] ? "UNIQUE" : "INDEX"));
|
||||
$return[$relname]["columns"] = array();
|
||||
foreach (explode(" ", $row["indkey"]) as $indkey) {
|
||||
$return[$row["relname"]]["columns"][] = $columns[$indkey];
|
||||
$return[$relname]["columns"][] = $columns[$indkey];
|
||||
}
|
||||
$return[$row["relname"]]["lengths"] = array();
|
||||
$return[$relname]["descs"] = array();
|
||||
foreach (explode(" ", $row["indoption"]) as $indoption) {
|
||||
$return[$relname]["descs"][] = ($indoption & 1 ? '1' : null); // 1 - INDOPTION_DESC
|
||||
}
|
||||
$return[$relname]["lengths"] = array();
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function foreign_keys($table) {
|
||||
global $on_actions;
|
||||
$return = array();
|
||||
foreach (get_rows("SELECT conname, pg_get_constraintdef(oid) AS definition
|
||||
FROM pg_constraint
|
||||
WHERE conrelid = (SELECT oid FROM pg_class WHERE relname = " . q($table) . ")
|
||||
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
|
||||
ORDER BY conkey, conname") as $row) {
|
||||
if (preg_match('~FOREIGN KEY\s*\((.+)\)\s*REFERENCES (.+)\((.+)\)(.*)$~iA', $row['definition'], $match)) {
|
||||
$row['source'] = array_map('trim', explode(',', $match[1]));
|
||||
$row['table'] = $match[2];
|
||||
if (preg_match('~(.+)\.(.+)~', $match[2], $match2)) {
|
||||
$row['ns'] = $match2[1];
|
||||
$row['table'] = $match2[2];
|
||||
if (preg_match('~^(("([^"]|"")+"|[^"]+)\.)?"?("([^"]|"")+"|[^"]+)$~', $match[2], $match2)) {
|
||||
$row['ns'] = str_replace('""', '"', preg_replace('~^"(.+)"$~', '\1', $match2[2]));
|
||||
$row['table'] = str_replace('""', '"', preg_replace('~^"(.+)"$~', '\1', $match2[4]));
|
||||
}
|
||||
$row['target'] = array_map('trim', explode(',', $match[3]));
|
||||
$row['on_delete'] = (preg_match("~ON DELETE ($on_actions)~", $match[4], $match2) ? $match2[1] : '');
|
||||
$row['on_update'] = (preg_match("~ON UPDATE ($on_actions)~", $match[4], $match2) ? $match2[1] : '');
|
||||
$row['on_delete'] = (preg_match("~ON DELETE ($on_actions)~", $match[4], $match2) ? $match2[1] : 'NO ACTION');
|
||||
$row['on_update'] = (preg_match("~ON UPDATE ($on_actions)~", $match[4], $match2) ? $match2[1] : 'NO ACTION');
|
||||
$return[$row['conname']] = $row;
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function view($name) {
|
||||
global $connection;
|
||||
return array("select" => $connection->result("SELECT pg_get_viewdef(" . q($name) . ")"));
|
||||
}
|
||||
|
||||
|
||||
function collations() {
|
||||
//! supported in CREATE DATABASE
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
function information_schema($db) {
|
||||
return ($db == "information_schema");
|
||||
}
|
||||
|
||||
|
||||
function error() {
|
||||
global $connection;
|
||||
$return = h($connection->error);
|
||||
@@ -314,30 +372,26 @@ ORDER BY conkey, conname") as $row) {
|
||||
}
|
||||
return nl_br($return);
|
||||
}
|
||||
|
||||
function exact_value($val) {
|
||||
return q($val);
|
||||
}
|
||||
|
||||
|
||||
function create_database($db, $collation) {
|
||||
return queries("CREATE DATABASE " . idf_escape($db) . ($collation ? " ENCODING " . idf_escape($collation) : ""));
|
||||
}
|
||||
|
||||
|
||||
function drop_databases($databases) {
|
||||
global $connection;
|
||||
$connection->close();
|
||||
return apply_queries("DROP DATABASE", $databases, 'idf_escape');
|
||||
}
|
||||
|
||||
|
||||
function rename_database($name, $collation) {
|
||||
//! current database cannot be renamed
|
||||
return queries("ALTER DATABASE " . idf_escape(DB) . " RENAME TO " . idf_escape($name));
|
||||
}
|
||||
|
||||
|
||||
function auto_increment() {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
|
||||
$alter = array();
|
||||
$queries = array();
|
||||
@@ -360,7 +414,7 @@ ORDER BY conkey, conname") as $row) {
|
||||
}
|
||||
$alter[] = "ALTER $column TYPE$val[1]";
|
||||
if (!$val[6]) {
|
||||
$alter[] = "ALTER $column " . ($val[3] ? "SET$val[3]" : "DROP DEFAULT"); //! quoting
|
||||
$alter[] = "ALTER $column " . ($val[3] ? "SET$val[3]" : "DROP DEFAULT");
|
||||
$alter[] = "ALTER $column " . ($val[2] == " NULL" ? "DROP NOT" : "SET") . $val[2];
|
||||
}
|
||||
}
|
||||
@@ -391,59 +445,75 @@ ORDER BY conkey, conname") as $row) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function alter_indexes($table, $alter) {
|
||||
$create = array();
|
||||
$drop = array();
|
||||
$queries = array();
|
||||
foreach ($alter as $val) {
|
||||
if ($val[0] != "INDEX") {
|
||||
//! descending UNIQUE indexes results in syntax error
|
||||
$create[] = ($val[2] == "DROP"
|
||||
? "\nDROP CONSTRAINT " . idf_escape($val[1])
|
||||
: "\nADD $val[0] " . ($val[0] == "PRIMARY" ? "KEY " : "") . $val[2]
|
||||
: "\nADD" . ($val[1] != "" ? " CONSTRAINT " . idf_escape($val[1]) : "") . " $val[0] " . ($val[0] == "PRIMARY" ? "KEY " : "") . "(" . implode(", ", $val[2]) . ")"
|
||||
);
|
||||
} elseif ($val[2] == "DROP") {
|
||||
$drop[] = idf_escape($val[1]);
|
||||
} elseif (!queries("CREATE INDEX " . idf_escape($val[1] != "" ? $val[1] : uniqid($table . "_")) . " ON " . table($table) . " $val[2]")) {
|
||||
} else {
|
||||
$queries[] = "CREATE INDEX " . idf_escape($val[1] != "" ? $val[1] : uniqid($table . "_")) . " ON " . table($table) . " (" . implode(", ", $val[2]) . ")";
|
||||
}
|
||||
}
|
||||
if ($create) {
|
||||
array_unshift($queries, "ALTER TABLE " . table($table) . implode(",", $create));
|
||||
}
|
||||
if ($drop) {
|
||||
array_unshift($queries, "DROP INDEX " . implode(", ", $drop));
|
||||
}
|
||||
foreach ($queries as $query) {
|
||||
if (!queries($query)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return ((!$create || queries("ALTER TABLE " . table($table) . implode(",", $create)))
|
||||
&& (!$drop || queries("DROP INDEX " . implode(", ", $drop)))
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function truncate_tables($tables) {
|
||||
return queries("TRUNCATE " . implode(", ", array_map('table', $tables)));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function drop_views($views) {
|
||||
return queries("DROP VIEW " . implode(", ", array_map('table', $views)));
|
||||
return drop_tables($views);
|
||||
}
|
||||
|
||||
|
||||
function drop_tables($tables) {
|
||||
return queries("DROP TABLE " . implode(", ", array_map('table', $tables)));
|
||||
}
|
||||
|
||||
function move_tables($tables, $views, $target) {
|
||||
foreach ($tables as $table) {
|
||||
if (!queries("ALTER TABLE " . table($table) . " SET SCHEMA " . idf_escape($target))) {
|
||||
return false;
|
||||
}
|
||||
$status = table_status($table);
|
||||
if (!queries("DROP " . strtoupper($status["Engine"]) . " " . table($table))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
foreach ($views as $table) {
|
||||
if (!queries("ALTER VIEW " . table($table) . " SET SCHEMA " . idf_escape($target))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function move_tables($tables, $views, $target) {
|
||||
foreach (array_merge($tables, $views) as $table) {
|
||||
$status = table_status($table);
|
||||
if (!queries("ALTER " . strtoupper($status["Engine"]) . " " . table($table) . " SET SCHEMA " . idf_escape($target))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function trigger($name) {
|
||||
if ($name == "") {
|
||||
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));
|
||||
return reset($rows);
|
||||
}
|
||||
|
||||
|
||||
function triggers($table) {
|
||||
$return = array();
|
||||
foreach (get_rows("SELECT * FROM information_schema.triggers WHERE event_object_table = " . q($table)) as $row) {
|
||||
@@ -451,14 +521,15 @@ ORDER BY conkey, conname") as $row) {
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function trigger_options() {
|
||||
return array(
|
||||
"Timing" => array("BEFORE", "AFTER"),
|
||||
"Event" => array("INSERT", "UPDATE", "DELETE"),
|
||||
"Type" => array("FOR EACH ROW", "FOR EACH STATEMENT"),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
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
|
||||
@@ -472,7 +543,7 @@ WHERE n.nspname = current_schema() AND p.proname = ' . q($name));
|
||||
return $rows[0];
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
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"
|
||||
FROM pg_catalog.pg_namespace n
|
||||
@@ -480,46 +551,23 @@ JOIN pg_catalog.pg_proc p ON p.pronamespace = n.oid
|
||||
WHERE n.nspname = current_schema()
|
||||
ORDER BY p.proname');
|
||||
}
|
||||
|
||||
|
||||
function routine_languages() {
|
||||
return get_vals("SELECT langname FROM pg_catalog.pg_language");
|
||||
}
|
||||
|
||||
function begin() {
|
||||
return queries("BEGIN");
|
||||
}
|
||||
|
||||
function insert_into($table, $set) {
|
||||
return queries("INSERT INTO " . table($table) . ($set ? " (" . implode(", ", array_keys($set)) . ")\nVALUES (" . implode(", ", $set) . ")" : "DEFAULT VALUES"));
|
||||
}
|
||||
|
||||
function insert_update($table, $set, $primary) {
|
||||
global $connection;
|
||||
$update = array();
|
||||
$where = array();
|
||||
foreach ($set as $key => $val) {
|
||||
$update[] = "$key = $val";
|
||||
if (isset($primary[idf_unescape($key)])) {
|
||||
$where[] = "$key = $val";
|
||||
}
|
||||
}
|
||||
return ($where && queries("UPDATE " . table($table) . " SET " . implode(", ", $update) . " WHERE " . implode(" AND ", $where)) && $connection->affected_rows)
|
||||
|| queries("INSERT INTO " . table($table) . " (" . implode(", ", array_keys($set)) . ") VALUES (" . implode(", ", $set) . ")")
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
function last_id() {
|
||||
return 0; // there can be several sequences
|
||||
}
|
||||
|
||||
|
||||
function explain($connection, $query) {
|
||||
return $connection->query("EXPLAIN $query");
|
||||
}
|
||||
|
||||
|
||||
function found_rows($table_status, $where) {
|
||||
global $connection;
|
||||
if (ereg(
|
||||
" rows=([0-9]+)",
|
||||
if (preg_match(
|
||||
"~ rows=([0-9]+)~",
|
||||
$connection->result("EXPLAIN SELECT * FROM " . idf_escape($table_status["Name"]) . ($where ? " WHERE " . implode(" AND ", $where) : "")),
|
||||
$regs
|
||||
)) {
|
||||
@@ -527,7 +575,7 @@ ORDER BY p.proname');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function types() {
|
||||
return get_vals("SELECT typname
|
||||
FROM pg_type
|
||||
@@ -536,16 +584,16 @@ AND typtype IN ('b','d','e')
|
||||
AND typelem = 0"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function schemas() {
|
||||
return get_vals("SELECT nspname FROM pg_namespace ORDER BY nspname");
|
||||
}
|
||||
|
||||
|
||||
function get_schema() {
|
||||
global $connection;
|
||||
return $connection->result("SELECT current_schema()");
|
||||
}
|
||||
|
||||
|
||||
function set_schema($schema) {
|
||||
global $connection, $types, $structured_types;
|
||||
$return = $connection->query("SET search_path TO " . idf_escape($schema));
|
||||
@@ -557,32 +605,41 @@ AND typelem = 0"
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function use_sql($database) {
|
||||
return "\connect " . idf_escape($database);
|
||||
}
|
||||
|
||||
|
||||
function show_variables() {
|
||||
return get_key_vals("SHOW ALL");
|
||||
}
|
||||
|
||||
function process_list() {
|
||||
return get_rows("SELECT * FROM pg_stat_activity ORDER BY procpid");
|
||||
global $connection;
|
||||
return get_rows("SELECT * FROM pg_stat_activity ORDER BY " . ($connection->server_info < 9.2 ? "procpid" : "pid"));
|
||||
}
|
||||
|
||||
|
||||
function show_status() {
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
return ereg('^(comment|view|scheme|processlist|sequence|trigger|type|variables|drop_col)$', $feature); //! routine|
|
||||
|
||||
function convert_field($field) {
|
||||
}
|
||||
|
||||
|
||||
function unconvert_field($field, $return) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
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|
|
||||
}
|
||||
|
||||
$jush = "pgsql";
|
||||
$types = array();
|
||||
$structured_types = array();
|
||||
foreach (array( //! arrays
|
||||
lang('Numbers') => array("smallint" => 5, "integer" => 10, "bigint" => 19, "boolean" => 1, "numeric" => 0, "real" => 7, "double precision" => 16, "money" => 20),
|
||||
lang('Date and time') => array("date" => 13, "time" => 17, "timestamp" => 20, "interval" => 0),
|
||||
lang('Date and time') => array("date" => 13, "time" => 17, "timestamp" => 20, "timestamptz" => 21, "interval" => 0),
|
||||
lang('Strings') => array("character" => 0, "character varying" => 0, "text" => 0, "tsquery" => 0, "tsvector" => 0, "uuid" => 0, "xml" => 0),
|
||||
lang('Binary') => array("bit" => 0, "bit varying" => 0, "bytea" => 0),
|
||||
lang('Network') => array("cidr" => 43, "inet" => 43, "macaddr" => 17, "txid_snapshot" => 0),
|
||||
@@ -592,7 +649,7 @@ AND typelem = 0"
|
||||
$structured_types[$key] = array_keys($val);
|
||||
}
|
||||
$unsigned = array();
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "");
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "ILIKE", "ILIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"); // no "SQL" to avoid SQL injection
|
||||
$functions = array("char_length", "lower", "round", "to_hex", "to_timestamp", "upper");
|
||||
$grouping = array("avg", "count", "count distinct", "max", "min", "sum");
|
||||
$edit_functions = array(
|
||||
|
||||
473
adminer/drivers/simpledb.inc.php
Normal file
@@ -0,0 +1,473 @@
|
||||
<?php
|
||||
$drivers["simpledb"] = "SimpleDB";
|
||||
|
||||
if (isset($_GET["simpledb"])) {
|
||||
$possible_drivers = array("SimpleXML");
|
||||
define("DRIVER", "simpledb");
|
||||
|
||||
if (class_exists('SimpleXMLElement')) {
|
||||
class Min_DB {
|
||||
var $extension = "SimpleXML", $server_info = '2009-04-15', $error, $timeout, $next, $affected_rows, $_result;
|
||||
|
||||
function select_db($database) {
|
||||
return ($database == "domain");
|
||||
}
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
$params = array('SelectExpression' => $query, 'ConsistentRead' => 'true');
|
||||
if ($this->next) {
|
||||
$params['NextToken'] = $this->next;
|
||||
}
|
||||
$result = sdb_request_all('Select', 'Item', $params, $this->timeout); //! respect $unbuffered
|
||||
if ($result === false) {
|
||||
return $result;
|
||||
}
|
||||
if (preg_match('~^\s*SELECT\s+COUNT\(~i', $query)) {
|
||||
$sum = 0;
|
||||
foreach ($result as $item) {
|
||||
$sum += $item->Attribute->Value;
|
||||
}
|
||||
$result = array((object) array('Attribute' => array((object) array(
|
||||
'Name' => 'Count',
|
||||
'Value' => $sum,
|
||||
))));
|
||||
}
|
||||
return new Min_Result($result);
|
||||
}
|
||||
|
||||
function multi_query($query) {
|
||||
return $this->_result = $this->query($query);
|
||||
}
|
||||
|
||||
function store_result() {
|
||||
return $this->_result;
|
||||
}
|
||||
|
||||
function next_result() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function quote($string) {
|
||||
return "'" . str_replace("'", "''", $string) . "'";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Min_Result {
|
||||
var $num_rows, $_rows = array(), $_offset = 0;
|
||||
|
||||
function Min_Result($result) {
|
||||
foreach ($result as $item) {
|
||||
$row = array();
|
||||
if ($item->Name != '') { // SELECT COUNT(*)
|
||||
$row['itemName()'] = (string) $item->Name;
|
||||
}
|
||||
foreach ($item->Attribute as $attribute) {
|
||||
$name = $this->_processValue($attribute->Name);
|
||||
$value = $this->_processValue($attribute->Value);
|
||||
if (isset($row[$name])) {
|
||||
$row[$name] = (array) $row[$name];
|
||||
$row[$name][] = $value;
|
||||
} else {
|
||||
$row[$name] = $value;
|
||||
}
|
||||
}
|
||||
$this->_rows[] = $row;
|
||||
foreach ($row as $key => $val) {
|
||||
if (!isset($this->_rows[0][$key])) {
|
||||
$this->_rows[0][$key] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->num_rows = count($this->_rows);
|
||||
}
|
||||
|
||||
function _processValue($element) {
|
||||
return (is_object($element) && $element['encoding'] == 'base64' ? base64_decode($element) : (string) $element);
|
||||
}
|
||||
|
||||
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]);
|
||||
return (object) array('name' => $keys[$this->_offset++]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
public $primary = "itemName()";
|
||||
|
||||
function _chunkRequest($ids, $action, $params, $expand = array()) {
|
||||
global $connection;
|
||||
foreach (array_chunk($ids, 25) as $chunk) {
|
||||
$params2 = $params;
|
||||
foreach ($chunk as $i => $id) {
|
||||
$params2["Item.$i.ItemName"] = $id;
|
||||
foreach ($expand as $key => $val) {
|
||||
$params2["Item.$i.$key"] = $val;
|
||||
}
|
||||
}
|
||||
if (!sdb_request($action, $params2)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$connection->affected_rows = count($ids);
|
||||
return true;
|
||||
}
|
||||
|
||||
function _extractIds($table, $queryWhere, $limit) {
|
||||
$return = array();
|
||||
if (preg_match_all("~itemName\(\) = (('[^']*+')+)~", $queryWhere, $matches)) {
|
||||
$return = array_map('idf_unescape', $matches[1]);
|
||||
} else {
|
||||
foreach (sdb_request_all('Select', 'Item', array('SelectExpression' => 'SELECT itemName() FROM ' . table($table) . $queryWhere . ($limit ? " LIMIT 1" : ""))) as $item) {
|
||||
$return[] = $item->Name;
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
|
||||
global $connection;
|
||||
$connection->next = $_GET["next"];
|
||||
$return = parent::select($table, $select, $where, $group, $order, $limit, $page, $print);
|
||||
$connection->next = 0;
|
||||
return $return;
|
||||
}
|
||||
|
||||
function delete($table, $queryWhere, $limit = 0) {
|
||||
return $this->_chunkRequest(
|
||||
$this->_extractIds($table, $queryWhere, $limit),
|
||||
'BatchDeleteAttributes',
|
||||
array('DomainName' => $table)
|
||||
);
|
||||
}
|
||||
|
||||
function update($table, $set, $queryWhere, $limit = 0, $separator = "\n") {
|
||||
$delete = array();
|
||||
$insert = array();
|
||||
$i = 0;
|
||||
$ids = $this->_extractIds($table, $queryWhere, $limit);
|
||||
$id = idf_unescape($set["`itemName()`"]);
|
||||
unset($set["`itemName()`"]);
|
||||
foreach ($set as $key => $val) {
|
||||
$key = idf_unescape($key);
|
||||
if ($val == "NULL" || ($id != "" && array($id) != $ids)) {
|
||||
$delete["Attribute." . count($delete) . ".Name"] = $key;
|
||||
}
|
||||
if ($val != "NULL") {
|
||||
foreach ((array) $val as $k => $v) {
|
||||
$insert["Attribute.$i.Name"] = $key;
|
||||
$insert["Attribute.$i.Value"] = (is_array($val) ? $v : idf_unescape($v));
|
||||
if (!$k) {
|
||||
$insert["Attribute.$i.Replace"] = "true";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
$params = array('DomainName' => $table);
|
||||
return (!$insert || $this->_chunkRequest(($id != "" ? array($id) : $ids), 'BatchPutAttributes', $params, $insert))
|
||||
&& (!$delete || $this->_chunkRequest($ids, 'BatchDeleteAttributes', $params, $delete))
|
||||
;
|
||||
}
|
||||
|
||||
function insert($table, $set) {
|
||||
$params = array("DomainName" => $table);
|
||||
$i = 0;
|
||||
foreach ($set as $name => $value) {
|
||||
if ($value != "NULL") {
|
||||
$name = idf_unescape($name);
|
||||
if ($name == "itemName()") {
|
||||
$params["ItemName"] = idf_unescape($value);
|
||||
} else {
|
||||
foreach ((array) $value as $val) {
|
||||
$params["Attribute.$i.Name"] = $name;
|
||||
$params["Attribute.$i.Value"] = (is_array($value) ? $val : idf_unescape($value));
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return sdb_request('PutAttributes', $params);
|
||||
}
|
||||
|
||||
function insertUpdate($table, $rows, $primary) {
|
||||
//! use one batch request
|
||||
foreach ($rows as $set) {
|
||||
if (!$this->update($table, $set, "WHERE `itemName()` = " . q($set["`itemName()`"]))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function begin() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function commit() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function rollback() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function connect() {
|
||||
return new Min_DB;
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
return preg_match('~sql~', $feature);
|
||||
}
|
||||
|
||||
function logged_user() {
|
||||
global $adminer;
|
||||
$credentials = $adminer->credentials();
|
||||
return $credentials[1];
|
||||
}
|
||||
|
||||
function get_databases() {
|
||||
return array("domain");
|
||||
}
|
||||
|
||||
function collations() {
|
||||
return array();
|
||||
}
|
||||
|
||||
function db_collation($db, $collations) {
|
||||
}
|
||||
|
||||
function tables_list() {
|
||||
global $connection;
|
||||
$return = array();
|
||||
foreach (sdb_request_all('ListDomains', 'DomainName') as $table) {
|
||||
$return[(string) $table] = 'table';
|
||||
}
|
||||
if ($connection->error && defined("PAGE_HEADER")) {
|
||||
echo "<p class='error'>" . error() . "\n";
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function table_status($name = "", $fast = false) {
|
||||
$return = array();
|
||||
foreach (($name != "" ? array($name => true) : tables_list()) as $table => $type) {
|
||||
$row = array("Name" => $table, "Auto_increment" => "");
|
||||
if (!$fast) {
|
||||
$meta = sdb_request('DomainMetadata', array('DomainName' => $table));
|
||||
if ($meta) {
|
||||
foreach (array(
|
||||
"Rows" => "ItemCount",
|
||||
"Data_length" => "ItemNamesSizeBytes",
|
||||
"Index_length" => "AttributeValuesSizeBytes",
|
||||
"Data_free" => "AttributeNamesSizeBytes",
|
||||
) as $key => $val) {
|
||||
$row[$key] = (string) $meta->$val;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($name != "") {
|
||||
return $row;
|
||||
}
|
||||
$return[$table] = $row;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function explain($connection, $query) {
|
||||
}
|
||||
|
||||
function error() {
|
||||
global $connection;
|
||||
return h($connection->error);
|
||||
}
|
||||
|
||||
function information_schema() {
|
||||
}
|
||||
|
||||
function is_view($table_status) {
|
||||
}
|
||||
|
||||
function indexes($table, $connection2 = null) {
|
||||
return array(
|
||||
array("type" => "PRIMARY", "columns" => array("itemName()")),
|
||||
);
|
||||
}
|
||||
|
||||
function fields($table) {
|
||||
return fields_from_edit();
|
||||
}
|
||||
|
||||
function foreign_keys($table) {
|
||||
return array();
|
||||
}
|
||||
|
||||
function table($idf) {
|
||||
return idf_escape($idf);
|
||||
}
|
||||
|
||||
function idf_escape($idf) {
|
||||
return "`" . str_replace("`", "``", $idf) . "`";
|
||||
}
|
||||
|
||||
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
||||
return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" : "");
|
||||
}
|
||||
|
||||
function unconvert_field($field, $return) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
function fk_support($table_status) {
|
||||
}
|
||||
|
||||
function engines() {
|
||||
return array();
|
||||
}
|
||||
|
||||
function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
|
||||
return ($table == "" && sdb_request('CreateDomain', array('DomainName' => $name)));
|
||||
}
|
||||
|
||||
function drop_tables($tables) {
|
||||
foreach ($tables as $table) {
|
||||
if (!sdb_request('DeleteDomain', array('DomainName' => $table))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function count_tables($databases) {
|
||||
foreach ($databases as $db) {
|
||||
return array($db => count(tables_list()));
|
||||
}
|
||||
}
|
||||
|
||||
function found_rows($table_status, $where) {
|
||||
return ($where ? null : $table_status["Rows"]);
|
||||
}
|
||||
|
||||
function last_id() {
|
||||
}
|
||||
|
||||
function hmac($algo, $data, $key, $raw_output = false) {
|
||||
// can use hash_hmac() since PHP 5.1.2
|
||||
$blocksize = 64;
|
||||
if (strlen($key) > $blocksize) {
|
||||
$key = pack("H*", $algo($key));
|
||||
}
|
||||
$key = str_pad($key, $blocksize, "\0");
|
||||
$k_ipad = $key ^ str_repeat("\x36", $blocksize);
|
||||
$k_opad = $key ^ str_repeat("\x5C", $blocksize);
|
||||
$return = $algo($k_opad . pack("H*", $algo($k_ipad . $data)));
|
||||
if ($raw_output) {
|
||||
$return = pack("H*", $return);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function sdb_request($action, $params = array()) {
|
||||
global $adminer, $connection;
|
||||
list($host, $params['AWSAccessKeyId'], $secret) = $adminer->credentials();
|
||||
$params['Action'] = $action;
|
||||
$params['Timestamp'] = gmdate('Y-m-d\TH:i:s+00:00');
|
||||
$params['Version'] = '2009-04-15';
|
||||
$params['SignatureVersion'] = 2;
|
||||
$params['SignatureMethod'] = 'HmacSHA1';
|
||||
ksort($params);
|
||||
$query = '';
|
||||
foreach ($params as $key => $val) {
|
||||
$query .= '&' . rawurlencode($key) . '=' . rawurlencode($val);
|
||||
}
|
||||
$query = str_replace('%7E', '~', substr($query, 1));
|
||||
$query .= "&Signature=" . urlencode(base64_encode(hmac('sha1', "POST\n" . preg_replace('~^https?://~', '', $host) . "\n/\n$query", $secret, true)));
|
||||
@ini_set('track_errors', 1); // @ - may be disabled
|
||||
$file = @file_get_contents((preg_match('~^https?://~', $host) ? $host : "http://$host"), false, stream_context_create(array('http' => array(
|
||||
'method' => 'POST', // may not fit in URL with GET
|
||||
'content' => $query,
|
||||
'ignore_errors' => 1, // available since PHP 5.2.10
|
||||
))));
|
||||
if (!$file) {
|
||||
$connection->error = $php_errormsg;
|
||||
return false;
|
||||
}
|
||||
libxml_use_internal_errors(true);
|
||||
$xml = simplexml_load_string($file);
|
||||
if (!$xml) {
|
||||
$error = libxml_get_last_error();
|
||||
$connection->error = $error->message;
|
||||
return false;
|
||||
}
|
||||
if ($xml->Errors) {
|
||||
$error = $xml->Errors->Error;
|
||||
$connection->error = "$error->Message ($error->Code)";
|
||||
return false;
|
||||
}
|
||||
$connection->error = '';
|
||||
$tag = $action . "Result";
|
||||
return ($xml->$tag ? $xml->$tag : true);
|
||||
}
|
||||
|
||||
function sdb_request_all($action, $tag, $params = array(), $timeout = 0) {
|
||||
$return = array();
|
||||
$start = ($timeout ? microtime(true) : 0);
|
||||
$limit = (preg_match('~LIMIT\s+(\d+)\s*$~i', $params['SelectExpression'], $match) ? $match[1] : 0);
|
||||
do {
|
||||
$xml = sdb_request($action, $params);
|
||||
if (!$xml) {
|
||||
break;
|
||||
}
|
||||
foreach ($xml->$tag as $element) {
|
||||
$return[] = $element;
|
||||
}
|
||||
if ($limit && count($return) >= $limit) {
|
||||
$_GET["next"] = $xml->NextToken;
|
||||
break;
|
||||
}
|
||||
if ($timeout && microtime(true) - $start > $timeout) {
|
||||
return false;
|
||||
}
|
||||
$params['NextToken'] = $xml->NextToken;
|
||||
if ($limit) {
|
||||
$params['SelectExpression'] = preg_replace('~\d+\s*$~', $limit - count($return), $params['SelectExpression']);
|
||||
}
|
||||
} while ($xml->NextToken);
|
||||
return $return;
|
||||
}
|
||||
|
||||
$jush = "simpledb";
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "IS NOT NULL");
|
||||
$functions = array();
|
||||
$grouping = array("count");
|
||||
$edit_functions = array(array("json"));
|
||||
}
|
||||
@@ -5,21 +5,23 @@ $drivers["sqlite2"] = "SQLite 2";
|
||||
if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
$possible_drivers = array((isset($_GET["sqlite"]) ? "SQLite3" : "SQLite"), "PDO_SQLite");
|
||||
define("DRIVER", (isset($_GET["sqlite"]) ? "sqlite" : "sqlite2"));
|
||||
if (extension_loaded(isset($_GET["sqlite"]) ? "sqlite3" : "sqlite")) {
|
||||
if (class_exists(isset($_GET["sqlite"]) ? "SQLite3" : "SQLiteDatabase")) {
|
||||
if (isset($_GET["sqlite"])) {
|
||||
|
||||
|
||||
class Min_SQLite {
|
||||
var $extension = "SQLite3", $server_info, $affected_rows, $error, $_link;
|
||||
|
||||
var $extension = "SQLite3", $server_info, $affected_rows, $errno, $error, $_link;
|
||||
|
||||
function Min_SQLite($filename) {
|
||||
$this->_link = new SQLite3($filename);
|
||||
$version = $this->_link->version();
|
||||
$this->server_info = $version["versionString"];
|
||||
}
|
||||
|
||||
|
||||
function query($query) {
|
||||
$result = @$this->_link->query($query);
|
||||
$this->error = "";
|
||||
if (!$result) {
|
||||
$this->errno = $this->_link->lastErrorCode();
|
||||
$this->error = $this->_link->lastErrorMsg();
|
||||
return false;
|
||||
} elseif ($result->numColumns()) {
|
||||
@@ -28,15 +30,18 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
$this->affected_rows = $this->_link->changes();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function quote($string) {
|
||||
return "'" . $this->_link->escapeString($string) . "'";
|
||||
return (is_utf8($string)
|
||||
? "'" . $this->_link->escapeString($string) . "'"
|
||||
: "x'" . reset(unpack('H*', $string)) . "'"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function store_result() {
|
||||
return $this->_result;
|
||||
}
|
||||
|
||||
|
||||
function result($query, $field = 0) {
|
||||
$result = $this->query($query);
|
||||
if (!is_object($result)) {
|
||||
@@ -46,22 +51,22 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
return $row[$field];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Min_Result {
|
||||
var $_result, $_offset = 0, $num_rows;
|
||||
|
||||
|
||||
function Min_Result($result) {
|
||||
$this->_result = $result;
|
||||
}
|
||||
|
||||
|
||||
function fetch_assoc() {
|
||||
return $this->_result->fetchArray(SQLITE3_ASSOC);
|
||||
}
|
||||
|
||||
|
||||
function fetch_row() {
|
||||
return $this->_result->fetchArray(SQLITE3_NUM);
|
||||
}
|
||||
|
||||
|
||||
function fetch_field() {
|
||||
$column = $this->_offset++;
|
||||
$type = $this->_result->columnType($column);
|
||||
@@ -71,25 +76,26 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
"charsetnr" => ($type == SQLITE3_BLOB ? 63 : 0), // 63 - binary
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function __desctruct() {
|
||||
return $this->_result->finalize();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
class Min_SQLite {
|
||||
var $extension = "SQLite", $server_info, $affected_rows, $error, $_link;
|
||||
|
||||
|
||||
function Min_SQLite($filename) {
|
||||
$this->server_info = sqlite_libversion();
|
||||
$this->_link = new SQLiteDatabase($filename);
|
||||
}
|
||||
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
$method = ($unbuffered ? "unbufferedQuery" : "query");
|
||||
$result = @$this->_link->$method($query, SQLITE_BOTH, $error);
|
||||
$this->error = "";
|
||||
if (!$result) {
|
||||
$this->error = $error;
|
||||
return false;
|
||||
@@ -99,15 +105,15 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
}
|
||||
return new Min_Result($result);
|
||||
}
|
||||
|
||||
|
||||
function quote($string) {
|
||||
return "'" . sqlite_escape_string($string) . "'";
|
||||
}
|
||||
|
||||
|
||||
function store_result() {
|
||||
return $this->_result;
|
||||
}
|
||||
|
||||
|
||||
function result($query, $field = 0) {
|
||||
$result = $this->query($query);
|
||||
if (!is_object($result)) {
|
||||
@@ -117,17 +123,17 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
return $row[$field];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Min_Result {
|
||||
var $_result, $_offset = 0, $num_rows;
|
||||
|
||||
|
||||
function Min_Result($result) {
|
||||
$this->_result = $result;
|
||||
if (method_exists($result, 'numRows')) { // not available in unbuffered query
|
||||
$this->num_rows = $result->numRows();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function fetch_assoc() {
|
||||
$row = $this->_result->fetch(SQLITE_ASSOC);
|
||||
if (!$row) {
|
||||
@@ -139,11 +145,11 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function fetch_row() {
|
||||
return $this->_result->fetch(SQLITE_NUM);
|
||||
}
|
||||
|
||||
|
||||
function fetch_field() {
|
||||
$name = $this->_result->fieldName($this->_offset++);
|
||||
$pattern = '(\\[.*]|"(?:[^"]|"")*"|(.+))';
|
||||
@@ -157,47 +163,63 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
"orgtable" => $table,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
} elseif (extension_loaded("pdo_sqlite")) {
|
||||
class Min_SQLite extends Min_PDO {
|
||||
var $extension = "PDO_SQLite";
|
||||
|
||||
|
||||
function Min_SQLite($filename) {
|
||||
$this->dsn(DRIVER . ":$filename", "", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (class_exists("Min_SQLite")) {
|
||||
class Min_DB extends Min_SQLite {
|
||||
|
||||
|
||||
function Min_DB() {
|
||||
$this->Min_SQLite(":memory:");
|
||||
}
|
||||
|
||||
|
||||
function select_db($filename) {
|
||||
if (is_readable($filename) && $this->query("ATTACH " . $this->quote(ereg("(^[/\\]|:)", $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);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function multi_query($query) {
|
||||
return $this->_result = $this->query($query);
|
||||
}
|
||||
|
||||
|
||||
function next_result() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
|
||||
function insertUpdate($table, $rows, $primary) {
|
||||
$values = array();
|
||||
foreach ($rows as $set) {
|
||||
$values[] = "(" . implode(", ", $set) . ")";
|
||||
}
|
||||
return queries("REPLACE INTO " . table($table) . " (" . implode(", ", array_keys(reset($rows))) . ") VALUES\n" . implode(",\n", $values));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function idf_escape($idf) {
|
||||
return '"' . str_replace('"', '""', $idf) . '"';
|
||||
}
|
||||
@@ -215,7 +237,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
}
|
||||
|
||||
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
||||
return " $query$where" . (isset($limit) ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
|
||||
return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
|
||||
}
|
||||
|
||||
function limit1($query, $where) {
|
||||
@@ -245,9 +267,12 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
}
|
||||
|
||||
function table_status($name = "") {
|
||||
global $connection;
|
||||
$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) : "")) as $row) {
|
||||
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) {
|
||||
$row["Oid"] = 1;
|
||||
$row["Auto_increment"] = "";
|
||||
$row["Rows"] = $connection->result("SELECT COUNT(*) FROM " . idf_escape($row["Name"]));
|
||||
$return[$row["Name"]] = $row;
|
||||
}
|
||||
foreach (get_rows("SELECT * FROM sqlite_sequence", null, "") as $row) {
|
||||
@@ -259,47 +284,91 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
function is_view($table_status) {
|
||||
return $table_status["Engine"] == "view";
|
||||
}
|
||||
|
||||
|
||||
function fk_support($table_status) {
|
||||
global $connection;
|
||||
return !$connection->result("SELECT sqlite_compileoption_used('OMIT_FOREIGN_KEY')");
|
||||
}
|
||||
|
||||
function fields($table) {
|
||||
global $connection;
|
||||
$return = array();
|
||||
$primary = "";
|
||||
foreach (get_rows("PRAGMA table_info(" . table($table) . ")") as $row) {
|
||||
$name = $row["name"];
|
||||
$type = strtolower($row["type"]);
|
||||
$default = $row["dflt_value"];
|
||||
$return[$row["name"]] = array(
|
||||
"field" => $row["name"],
|
||||
"type" => (eregi("int", $type) ? "integer" : (eregi("char|clob|text", $type) ? "text" : (eregi("blob", $type) ? "blob" : (eregi("real|floa|doub", $type) ? "real" : "numeric")))),
|
||||
$return[$name] = array(
|
||||
"field" => $name,
|
||||
"type" => (preg_match('~int~i', $type) ? "integer" : (preg_match('~char|clob|text~i', $type) ? "text" : (preg_match('~blob~i', $type) ? "blob" : (preg_match('~real|floa|doub~i', $type) ? "real" : "numeric")))),
|
||||
"full_type" => $type,
|
||||
"default" => (ereg("'(.*)'", $default, $match) ? str_replace("''", "'", $match[1]) : ($default == "NULL" ? null : $default)),
|
||||
"default" => (preg_match("~'(.*)'~", $default, $match) ? str_replace("''", "'", $match[1]) : ($default == "NULL" ? null : $default)),
|
||||
"null" => !$row["notnull"],
|
||||
"auto_increment" => eregi('^integer$', $type) && $row["pk"], //! possible false positive
|
||||
"privileges" => array("select" => 1, "insert" => 1, "update" => 1),
|
||||
"primary" => $row["pk"],
|
||||
);
|
||||
if ($row["pk"]) {
|
||||
if ($primary != "") {
|
||||
$return[$primary]["auto_increment"] = false;
|
||||
} elseif (preg_match('~^integer$~i', $type)) {
|
||||
$return[$name]["auto_increment"] = true;
|
||||
}
|
||||
$primary = $name;
|
||||
}
|
||||
}
|
||||
$sql = $connection->result("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = " . q($table));
|
||||
preg_match_all('~(("[^"]*+")+|[a-z0-9_]+)\s+text\s+COLLATE\s+(\'[^\']+\'|\S+)~i', $sql, $matches, PREG_SET_ORDER);
|
||||
foreach ($matches as $match) {
|
||||
$name = str_replace('""', '"', preg_replace('~^"|"$~', '', $match[1]));
|
||||
if ($return[$name]) {
|
||||
$return[$name]["collation"] = trim($match[3], "'");
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function indexes($table, $connection2 = null) {
|
||||
global $connection;
|
||||
if (!is_object($connection2)) {
|
||||
$connection2 = $connection;
|
||||
}
|
||||
$return = array();
|
||||
$primary = array();
|
||||
foreach (fields($table) as $field) {
|
||||
if ($field["primary"]) {
|
||||
$primary[] = $field["field"];
|
||||
$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)) {
|
||||
$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);
|
||||
foreach ($matches as $match) {
|
||||
$return[""]["columns"][] = idf_unescape($match[2]) . $match[4];
|
||||
$return[""]["descs"][] = (preg_match('~DESC~i', $match[5]) ? '1' : null);
|
||||
}
|
||||
}
|
||||
if ($primary) {
|
||||
$return[""] = array("type" => "PRIMARY", "columns" => $primary, "lengths" => array());
|
||||
if (!$return) {
|
||||
foreach (fields($table) as $name => $field) {
|
||||
if ($field["primary"]) {
|
||||
$return[""] = array("type" => "PRIMARY", "columns" => array($name), "lengths" => array(), "descs" => array(null));
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (get_rows("PRAGMA index_list(" . table($table) . ")") as $row) {
|
||||
$return[$row["name"]]["type"] = ($row["unique"] ? "UNIQUE" : "INDEX");
|
||||
$return[$row["name"]]["lengths"] = array();
|
||||
foreach (get_rows("PRAGMA index_info(" . idf_escape($row["name"]) . ")") as $row1) {
|
||||
$return[$row["name"]]["columns"][] = $row1["name"];
|
||||
$sqls = get_key_vals("SELECT name, sql FROM sqlite_master WHERE type = 'index' AND tbl_name = " . q($table), $connection2);
|
||||
foreach (get_rows("PRAGMA index_list(" . table($table) . ")", $connection2) as $row) {
|
||||
$name = $row["name"];
|
||||
$index = array("type" => ($row["unique"] ? "UNIQUE" : "INDEX"));
|
||||
$index["lengths"] = array();
|
||||
$index["descs"] = array();
|
||||
foreach (get_rows("PRAGMA index_info(" . idf_escape($name) . ")", $connection2) as $row1) {
|
||||
$index["columns"][] = $row1["name"];
|
||||
$index["descs"][] = null;
|
||||
}
|
||||
if (preg_match('~^CREATE( UNIQUE)? INDEX ' . preg_quote(idf_escape($name) . ' ON ' . idf_escape($table), '~') . ' \((.*)\)$~i', $sqls[$name], $regs)) {
|
||||
preg_match_all('/("[^"]*+")+( DESC)?/', $regs[2], $matches);
|
||||
foreach ($matches[2] as $key => $val) {
|
||||
if ($val) {
|
||||
$index["descs"][$key] = '1';
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$return[""] || $index["type"] != "UNIQUE" || $index["columns"] != $return[""]["columns"] || $index["descs"] != $return[""]["descs"] || !preg_match("~^sqlite_~", $name)) {
|
||||
$return[$name] = $index;
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
@@ -336,11 +405,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
global $connection;
|
||||
return h($connection->error);
|
||||
}
|
||||
|
||||
function exact_value($val) {
|
||||
return q($val);
|
||||
}
|
||||
|
||||
|
||||
function check_sqlite_name($name) {
|
||||
// avoid creating PHP files on unsecured servers
|
||||
global $connection;
|
||||
@@ -351,7 +416,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function create_database($db, $collation) {
|
||||
global $connection;
|
||||
if (file_exists($db)) {
|
||||
@@ -361,13 +426,18 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
if (!check_sqlite_name($db)) {
|
||||
return false;
|
||||
}
|
||||
$link = new Min_SQLite($db); //! exception handler
|
||||
try {
|
||||
$link = new Min_SQLite($db);
|
||||
} catch (Exception $ex) {
|
||||
$connection->error = $ex->getMessage();
|
||||
return false;
|
||||
}
|
||||
$link->query('PRAGMA encoding = "UTF-8"');
|
||||
$link->query('CREATE TABLE adminer (i)'); // otherwise creates empty file
|
||||
$link->query('DROP TABLE adminer');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function drop_databases($databases) {
|
||||
global $connection;
|
||||
$connection->Min_SQLite(":memory:"); // to unlock file, doesn't work in PDO on Windows
|
||||
@@ -379,7 +449,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function rename_database($name, $collation) {
|
||||
global $connection;
|
||||
if (!check_sqlite_name($name)) {
|
||||
@@ -389,20 +459,30 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
$connection->error = lang('File exists.');
|
||||
return @rename(DB, $name);
|
||||
}
|
||||
|
||||
|
||||
function auto_increment() {
|
||||
return " PRIMARY KEY" . (DRIVER == "sqlite" ? " AUTOINCREMENT" : "");
|
||||
}
|
||||
|
||||
|
||||
function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
|
||||
$alter = array();
|
||||
$use_all_fields = ($table == "" || $foreign);
|
||||
foreach ($fields as $field) {
|
||||
if ($field[1]) {
|
||||
$alter[] = ($table != "" && $field[0] == "" ? "ADD " : " ") . implode($field[1]);
|
||||
if ($field[0] != "" || !$field[1] || $field[2]) {
|
||||
$use_all_fields = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$alter = array_merge($alter, $foreign);
|
||||
if ($table != "") {
|
||||
$alter = array();
|
||||
$originals = array();
|
||||
foreach ($fields as $field) {
|
||||
if ($field[1]) {
|
||||
$alter[] = ($use_all_fields ? $field[1] : "ADD " . implode($field[1]));
|
||||
if ($field[0] != "") {
|
||||
$originals[$field[0]] = $field[1][0];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$use_all_fields) {
|
||||
foreach ($alter as $val) {
|
||||
if (!queries("ALTER TABLE " . table($table) . " $val")) {
|
||||
return false;
|
||||
@@ -411,7 +491,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
if ($table != $name && !queries("ALTER TABLE " . table($table) . " RENAME TO " . table($name))) {
|
||||
return false;
|
||||
}
|
||||
} elseif (!queries("CREATE TABLE " . table($name) . " (\n" . implode(",\n", $alter) . "\n)")) {
|
||||
} elseif (!recreate_table($table, $name, $alter, $originals, $foreign)) {
|
||||
return false;
|
||||
}
|
||||
if ($auto_increment) {
|
||||
@@ -419,125 +499,243 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function recreate_table($table, $name, $fields, $originals, $foreign, $indexes = array()) {
|
||||
if ($table != "") {
|
||||
if (!$fields) {
|
||||
foreach (fields($table) as $key => $field) {
|
||||
$fields[] = process_field($field, $field);
|
||||
$originals[$key] = idf_escape($key);
|
||||
}
|
||||
}
|
||||
$primary_key = false;
|
||||
foreach ($fields as $field) {
|
||||
if ($field[6]) {
|
||||
$primary_key = true;
|
||||
}
|
||||
}
|
||||
$drop_indexes = array();
|
||||
foreach ($indexes as $key => $val) {
|
||||
if ($val[2] == "DROP") {
|
||||
$drop_indexes[$val[1]] = true;
|
||||
unset($indexes[$key]);
|
||||
}
|
||||
}
|
||||
foreach (indexes($table) as $key_name => $index) {
|
||||
$columns = array();
|
||||
foreach ($index["columns"] as $key => $column) {
|
||||
if (!$originals[$column]) {
|
||||
continue 2;
|
||||
}
|
||||
$columns[] = $originals[$column] . ($index["descs"][$key] ? " DESC" : "");
|
||||
}
|
||||
if (!$drop_indexes[$key_name]) {
|
||||
if ($index["type"] != "PRIMARY" || !$primary_key) {
|
||||
$indexes[] = array($index["type"], $key_name, $columns);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($indexes as $key => $val) {
|
||||
if ($val[0] == "PRIMARY") {
|
||||
unset($indexes[$key]);
|
||||
$foreign[] = " PRIMARY KEY (" . implode(", ", $val[2]) . ")";
|
||||
}
|
||||
}
|
||||
foreach (foreign_keys($table) as $key_name => $foreign_key) {
|
||||
foreach ($foreign_key["source"] as $key => $column) {
|
||||
if (!$originals[$column]) {
|
||||
continue 2;
|
||||
}
|
||||
$foreign_key["source"][$key] = idf_unescape($originals[$column]);
|
||||
}
|
||||
if (!isset($foreign[" $key_name"])) {
|
||||
$foreign[] = " " . format_foreign_key($foreign_key);
|
||||
}
|
||||
}
|
||||
queries("BEGIN");
|
||||
}
|
||||
foreach ($fields as $key => $field) {
|
||||
$fields[$key] = " " . implode($field);
|
||||
}
|
||||
$fields = array_merge($fields, array_filter($foreign));
|
||||
if (!queries("CREATE TABLE " . table($table != "" ? "adminer_$name" : $name) . " (\n" . implode(",\n", $fields) . "\n)")) {
|
||||
// implicit ROLLBACK to not overwrite $connection->error
|
||||
return false;
|
||||
}
|
||||
if ($table != "") {
|
||||
if ($originals && !queries("INSERT INTO " . table("adminer_$name") . " (" . implode(", ", $originals) . ") SELECT " . implode(", ", array_map('idf_escape', array_keys($originals))) . " FROM " . table($table))) {
|
||||
return false;
|
||||
}
|
||||
$triggers = array();
|
||||
foreach (triggers($table) as $trigger_name => $timing_event) {
|
||||
$trigger = trigger($trigger_name);
|
||||
$triggers[] = "CREATE TRIGGER " . idf_escape($trigger_name) . " " . implode(" ", $timing_event) . " ON " . table($name) . "\n$trigger[Statement]";
|
||||
}
|
||||
if (!queries("DROP TABLE " . table($table))) { // drop before creating indexes and triggers to allow using old names
|
||||
return false;
|
||||
}
|
||||
queries("ALTER TABLE " . table("adminer_$name") . " RENAME TO " . table($name));
|
||||
if (!alter_indexes($name, $indexes)) {
|
||||
return false;
|
||||
}
|
||||
foreach ($triggers as $trigger) {
|
||||
if (!queries($trigger)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
queries("COMMIT");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function index_sql($table, $type, $name, $columns) {
|
||||
return "CREATE $type " . ($type != "INDEX" ? "INDEX " : "")
|
||||
. idf_escape($name != "" ? $name : uniqid($table . "_"))
|
||||
. " ON " . table($table)
|
||||
. " $columns"
|
||||
;
|
||||
}
|
||||
|
||||
function alter_indexes($table, $alter) {
|
||||
foreach ($alter as $val) {
|
||||
foreach ($alter as $primary) {
|
||||
if ($primary[0] == "PRIMARY") {
|
||||
return recreate_table($table, $table, array(), array(), array(), $alter);
|
||||
}
|
||||
}
|
||||
foreach (array_reverse($alter) as $val) {
|
||||
if (!queries($val[2] == "DROP"
|
||||
? "DROP INDEX " . idf_escape($val[1])
|
||||
: "CREATE $val[0] " . ($val[0] != "INDEX" ? "INDEX " : "") . idf_escape($val[1] != "" ? $val[1] : uniqid($table . "_")) . " ON " . table($table) . " $val[2]"
|
||||
: index_sql($table, $val[0], $val[1], "(" . implode(", ", $val[2]) . ")")
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function truncate_tables($tables) {
|
||||
return apply_queries("DELETE FROM", $tables);
|
||||
}
|
||||
|
||||
|
||||
function drop_views($views) {
|
||||
return apply_queries("DROP VIEW", $views);
|
||||
}
|
||||
|
||||
|
||||
function drop_tables($tables) {
|
||||
return apply_queries("DROP TABLE", $tables);
|
||||
}
|
||||
|
||||
|
||||
function move_tables($tables, $views, $target) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function trigger($name) {
|
||||
global $connection;
|
||||
preg_match('~^CREATE\\s+TRIGGER\\s*(?:[^`"\\s]+|`[^`]*`|"[^"]*")+\\s*([a-z]+)\\s+([a-z]+)\\s+ON\\s*(?:[^`"\\s]+|`[^`]*`|"[^"]*")+\\s*(?:FOR\\s*EACH\\s*ROW\\s)?(.*)~is', $connection->result("SELECT sql FROM sqlite_master WHERE name = " . q($name)), $match);
|
||||
return array("Timing" => strtoupper($match[1]), "Event" => strtoupper($match[2]), "Trigger" => $name, "Statement" => $match[3]);
|
||||
if ($name == "") {
|
||||
return array("Statement" => "BEGIN\n\t;\nEND");
|
||||
}
|
||||
$idf = '(?:[^`"\\s]+|`[^`]*`|"[^"]*")+';
|
||||
$trigger_options = trigger_options();
|
||||
preg_match(
|
||||
"~^CREATE\\s+TRIGGER\\s*$idf\\s*(" . implode("|", $trigger_options["Timing"]) . ")\\s+([a-z]+)(?:\\s+OF\\s+($idf))?\\s+ON\\s*$idf\\s*(?:FOR\\s+EACH\\s+ROW\\s)?(.*)~is",
|
||||
$connection->result("SELECT sql FROM sqlite_master WHERE type = 'trigger' AND name = " . q($name)),
|
||||
$match
|
||||
);
|
||||
$of = $match[3];
|
||||
return array(
|
||||
"Timing" => strtoupper($match[1]),
|
||||
"Event" => strtoupper($match[2]) . ($of ? " OF" : ""),
|
||||
"Of" => ($of[0] == '`' || $of[0] == '"' ? idf_unescape($of) : $of),
|
||||
"Trigger" => $name,
|
||||
"Statement" => $match[4],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function triggers($table) {
|
||||
$return = array();
|
||||
$trigger_options = trigger_options();
|
||||
foreach (get_rows("SELECT * FROM sqlite_master WHERE type = 'trigger' AND tbl_name = " . q($table)) as $row) {
|
||||
preg_match('~^CREATE\\s+TRIGGER\\s*(?:[^`"\\s]+|`[^`]*`|"[^"]*")+\\s*([a-z]+)\\s*([a-z]+)~i', $row["sql"], $match);
|
||||
preg_match('~^CREATE\\s+TRIGGER\\s*(?:[^`"\\s]+|`[^`]*`|"[^"]*")+\\s*(' . implode("|", $trigger_options["Timing"]) . ')\\s*(.*)\\s+ON\\b~iU', $row["sql"], $match);
|
||||
$return[$row["name"]] = array($match[1], $match[2]);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function trigger_options() {
|
||||
return array(
|
||||
"Timing" => array("BEFORE", "AFTER", "INSTEAD OF"),
|
||||
"Event" => array("INSERT", "UPDATE", "UPDATE OF", "DELETE"),
|
||||
"Type" => array("FOR EACH ROW"),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function routine($name, $type) {
|
||||
// not supported by SQLite
|
||||
}
|
||||
|
||||
|
||||
function routines() {
|
||||
// not supported by SQLite
|
||||
}
|
||||
|
||||
|
||||
function routine_languages() {
|
||||
// not supported by SQLite
|
||||
}
|
||||
|
||||
|
||||
function begin() {
|
||||
return queries("BEGIN");
|
||||
}
|
||||
|
||||
function insert_into($table, $set) {
|
||||
return queries("INSERT INTO " . table($table) . ($set ? " (" . implode(", ", array_keys($set)) . ")\nVALUES (" . implode(", ", $set) . ")" : "DEFAULT VALUES"));
|
||||
}
|
||||
|
||||
function insert_update($table, $set, $primary) {
|
||||
return queries("REPLACE INTO " . table($table) . " (" . implode(", ", array_keys($set)) . ") VALUES (" . implode(", ", $set) . ")");
|
||||
}
|
||||
|
||||
|
||||
function last_id() {
|
||||
global $connection;
|
||||
return $connection->result("SELECT LAST_INSERT_ROWID()");
|
||||
}
|
||||
|
||||
|
||||
function explain($connection, $query) {
|
||||
return $connection->query("EXPLAIN $query");
|
||||
return $connection->query("EXPLAIN QUERY PLAN $query");
|
||||
}
|
||||
|
||||
|
||||
function found_rows($table_status, $where) {
|
||||
}
|
||||
|
||||
|
||||
function types() {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
function schemas() {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
function get_schema() {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
function set_schema($scheme) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function create_sql($table, $auto_increment) {
|
||||
global $connection;
|
||||
return $connection->result("SELECT sql FROM sqlite_master WHERE type = 'table' 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) {
|
||||
if ($name == '') {
|
||||
continue;
|
||||
}
|
||||
$return .= ";\n\n" . index_sql($table, $index['type'], $name, "(" . implode(", ", array_map('idf_escape', $index['columns'])) . ")");
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function truncate_sql($table) {
|
||||
return "DELETE FROM " . table($table);
|
||||
}
|
||||
|
||||
|
||||
function use_sql($database) {
|
||||
}
|
||||
|
||||
|
||||
function trigger_sql($table, $style) {
|
||||
return implode(get_vals("SELECT sql || ';;\n' FROM sqlite_master WHERE type = 'trigger' AND name = " . q($table)));
|
||||
return implode(get_vals("SELECT sql || ';;\n' FROM sqlite_master WHERE type = 'trigger' AND tbl_name = " . q($table)));
|
||||
}
|
||||
|
||||
|
||||
function show_variables() {
|
||||
global $connection;
|
||||
$return = array();
|
||||
@@ -546,7 +744,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
function show_status() {
|
||||
$return = array();
|
||||
foreach (get_vals("PRAGMA compile_options") as $option) {
|
||||
@@ -555,16 +753,23 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
return ereg('^(view|trigger|variables|status|dump)$', $feature);
|
||||
|
||||
function convert_field($field) {
|
||||
}
|
||||
|
||||
|
||||
function unconvert_field($field, $return) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
return preg_match('~^(columns|database|drop_col|dump|indexes|move_col|sql|status|table|trigger|variables|view|view_trigger)$~', $feature);
|
||||
}
|
||||
|
||||
$jush = "sqlite";
|
||||
$types = array("integer" => 0, "real" => 0, "numeric" => 0, "text" => 0, "blob" => 0);
|
||||
$structured_types = array_keys($types);
|
||||
$unsigned = array();
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", ""); // REGEXP can be user defined function
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL"); // REGEXP can be user defined function
|
||||
$functions = array("hex", "length", "lower", "round", "unixepoch", "upper");
|
||||
$grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum");
|
||||
$edit_functions = array(
|
||||
|
||||
@@ -1,25 +1,31 @@
|
||||
<?php
|
||||
$TABLE = $_GET["dump"];
|
||||
|
||||
if ($_POST) {
|
||||
if ($_POST && !$error) {
|
||||
$cookie = "";
|
||||
foreach (array("output", "format", "db_style", "routines", "events", "table_style", "auto_increment", "triggers", "data_style") as $key) {
|
||||
$cookie .= "&$key=" . urlencode($_POST[$key]);
|
||||
}
|
||||
cookie("adminer_export", substr($cookie, 1));
|
||||
$ext = dump_headers(($TABLE != "" ? $TABLE : DB), (DB == "" || count((array) $_POST["tables"] + (array) $_POST["data"]) > 1));
|
||||
$is_sql = ($_POST["format"] == "sql");
|
||||
$tables = array_flip((array) $_POST["tables"]) + array_flip((array) $_POST["data"]);
|
||||
$ext = dump_headers(
|
||||
(count($tables) == 1 ? key($tables) : DB),
|
||||
(DB == "" || count($tables) > 1));
|
||||
$is_sql = preg_match('~sql~', $_POST["format"]);
|
||||
|
||||
if ($is_sql) {
|
||||
echo "-- Adminer $VERSION " . $drivers[DRIVER] . " dump
|
||||
|
||||
" . ($jush != "sql" ? "" : "SET NAMES utf8;
|
||||
SET foreign_key_checks = 0;
|
||||
SET time_zone = " . q($connection->result("SELECT @@time_zone")) . ";
|
||||
echo "-- Adminer $VERSION " . $drivers[DRIVER] . " dump\n\n";
|
||||
if ($jush == "sql") {
|
||||
echo "SET NAMES utf8;
|
||||
SET time_zone = '+00:00';
|
||||
" . ($_POST["data_style"] ? "SET foreign_key_checks = 0;
|
||||
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
|
||||
|
||||
");
|
||||
" : "") . "
|
||||
";
|
||||
$connection->query("SET time_zone = '+00:00';");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$style = $_POST["db_style"];
|
||||
$databases = array(DB);
|
||||
if (DB == "") {
|
||||
@@ -28,124 +34,95 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
|
||||
$databases = explode("\n", rtrim(str_replace("\r", "", $databases), "\n"));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ((array) $databases as $db) {
|
||||
$adminer->dumpDatabase($db);
|
||||
if ($connection->select_db($db)) {
|
||||
if ($is_sql && ereg('CREATE', $style) && ($create = $connection->result("SHOW CREATE DATABASE " . idf_escape($db), 1))) {
|
||||
if ($is_sql && preg_match('~CREATE~', $style) && ($create = $connection->result("SHOW CREATE DATABASE " . idf_escape($db), 1))) {
|
||||
set_utf8mb4($create);
|
||||
if ($style == "DROP+CREATE") {
|
||||
echo "DROP DATABASE IF EXISTS " . idf_escape($db) . ";\n";
|
||||
}
|
||||
echo ($style == "CREATE+ALTER" ? preg_replace('~^CREATE DATABASE ~', '\\0IF NOT EXISTS ', $create) : $create) . ";\n";
|
||||
echo "$create;\n";
|
||||
}
|
||||
if ($is_sql) {
|
||||
if ($style) {
|
||||
echo use_sql($db) . ";\n\n";
|
||||
}
|
||||
if (in_array("CREATE+ALTER", array($style, $_POST["table_style"]))) {
|
||||
echo "SET @adminer_alter = '';\n\n";
|
||||
}
|
||||
$out = "";
|
||||
|
||||
if ($_POST["routines"]) {
|
||||
foreach (array("FUNCTION", "PROCEDURE") as $routine) {
|
||||
foreach (get_rows("SHOW $routine STATUS WHERE Db = " . q($db), null, "-- ") as $row) {
|
||||
$out .= ($style != 'DROP+CREATE' ? "DROP $routine IF EXISTS " . idf_escape($row["Name"]) . ";;\n" : "")
|
||||
. $connection->result("SHOW CREATE $routine " . idf_escape($row["Name"]), 2) . ";;\n\n";
|
||||
$create = remove_definer($connection->result("SHOW CREATE $routine " . idf_escape($row["Name"]), 2));
|
||||
set_utf8mb4($create);
|
||||
$out .= ($style != 'DROP+CREATE' ? "DROP $routine IF EXISTS " . idf_escape($row["Name"]) . ";;\n" : "") . "$create;;\n\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($_POST["events"]) {
|
||||
foreach (get_rows("SHOW EVENTS", null, "-- ") as $row) {
|
||||
$out .= ($style != 'DROP+CREATE' ? "DROP EVENT IF EXISTS " . idf_escape($row["Name"]) . ";;\n" : "")
|
||||
. $connection->result("SHOW CREATE EVENT " . idf_escape($row["Name"]), 3) . ";;\n\n";
|
||||
$create = remove_definer($connection->result("SHOW CREATE EVENT " . idf_escape($row["Name"]), 3));
|
||||
set_utf8mb4($create);
|
||||
$out .= ($style != 'DROP+CREATE' ? "DROP EVENT IF EXISTS " . idf_escape($row["Name"]) . ";;\n" : "") . "$create;;\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($out) {
|
||||
echo "DELIMITER ;;\n\n$out" . "DELIMITER ;\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($_POST["table_style"] || $_POST["data_style"]) {
|
||||
$views = array();
|
||||
foreach (table_status() as $row) {
|
||||
$table = (DB == "" || in_array($row["Name"], (array) $_POST["tables"]));
|
||||
$data = (DB == "" || in_array($row["Name"], (array) $_POST["data"]));
|
||||
foreach (table_status('', true) as $name => $table_status) {
|
||||
$table = (DB == "" || in_array($name, (array) $_POST["tables"]));
|
||||
$data = (DB == "" || in_array($name, (array) $_POST["data"]));
|
||||
if ($table || $data) {
|
||||
if (!is_view($row)) {
|
||||
if ($ext == "tar") {
|
||||
ob_start();
|
||||
}
|
||||
$adminer->dumpTable($row["Name"], ($table ? $_POST["table_style"] : ""));
|
||||
if ($data) {
|
||||
$adminer->dumpData($row["Name"], $_POST["data_style"], "SELECT * FROM " . table($row["Name"]));
|
||||
}
|
||||
if ($is_sql && $_POST["triggers"] && $table && ($triggers = trigger_sql($row["Name"], $_POST["table_style"]))) {
|
||||
echo "\nDELIMITER ;;\n$triggers\nDELIMITER ;\n";
|
||||
}
|
||||
if ($ext == "tar") {
|
||||
echo tar_file((DB != "" ? "" : "$db/") . "$row[Name].csv", ob_get_clean());
|
||||
} elseif ($is_sql) {
|
||||
echo "\n";
|
||||
}
|
||||
if ($ext == "tar") {
|
||||
$tmp_file = new TmpFile;
|
||||
ob_start(array($tmp_file, 'write'), 1e5);
|
||||
}
|
||||
|
||||
$adminer->dumpTable($name, ($table ? $_POST["table_style"] : ""), (is_view($table_status) ? 2 : 0));
|
||||
if (is_view($table_status)) {
|
||||
$views[] = $name;
|
||||
} elseif ($data) {
|
||||
$fields = fields($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"]))) {
|
||||
echo "\nDELIMITER ;;\n$triggers\nDELIMITER ;\n";
|
||||
}
|
||||
|
||||
if ($ext == "tar") {
|
||||
ob_end_flush();
|
||||
tar_file((DB != "" ? "" : "$db/") . "$name.csv", $tmp_file);
|
||||
} elseif ($is_sql) {
|
||||
$views[] = $row["Name"];
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($views as $view) {
|
||||
$adminer->dumpTable($view, $_POST["table_style"], true);
|
||||
$adminer->dumpTable($view, $_POST["table_style"], 1);
|
||||
}
|
||||
|
||||
if ($ext == "tar") {
|
||||
echo pack("x512");
|
||||
}
|
||||
}
|
||||
|
||||
if ($style == "CREATE+ALTER" && $is_sql) {
|
||||
// drop old tables
|
||||
$query = "SELECT TABLE_NAME, ENGINE, TABLE_COLLATION, TABLE_COMMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE()";
|
||||
echo "DELIMITER ;;
|
||||
CREATE PROCEDURE adminer_alter (INOUT alter_command text) BEGIN
|
||||
DECLARE _table_name, _engine, _table_collation varchar(64);
|
||||
DECLARE _table_comment varchar(64);
|
||||
DECLARE done bool DEFAULT 0;
|
||||
DECLARE tables CURSOR FOR $query;
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
|
||||
OPEN tables;
|
||||
REPEAT
|
||||
FETCH tables INTO _table_name, _engine, _table_collation, _table_comment;
|
||||
IF NOT done THEN
|
||||
CASE _table_name";
|
||||
foreach (get_rows($query) as $row) {
|
||||
$comment = q($row["ENGINE"] == "InnoDB" ? preg_replace('~(?:(.+); )?InnoDB free: .*~', '\\1', $row["TABLE_COMMENT"]) : $row["TABLE_COMMENT"]);
|
||||
echo "
|
||||
WHEN " . q($row["TABLE_NAME"]) . " THEN
|
||||
" . (isset($row["ENGINE"]) ? "IF _engine != '$row[ENGINE]' OR _table_collation != '$row[TABLE_COLLATION]' OR _table_comment != $comment THEN
|
||||
ALTER TABLE " . idf_escape($row["TABLE_NAME"]) . " ENGINE=$row[ENGINE] COLLATE=$row[TABLE_COLLATION] COMMENT=$comment;
|
||||
END IF" : "BEGIN END") . ";";
|
||||
}
|
||||
echo "
|
||||
ELSE
|
||||
SET alter_command = CONCAT(alter_command, 'DROP TABLE `', REPLACE(_table_name, '`', '``'), '`;\\n');
|
||||
END CASE;
|
||||
END IF;
|
||||
UNTIL done END REPEAT;
|
||||
CLOSE tables;
|
||||
END;;
|
||||
DELIMITER ;
|
||||
CALL adminer_alter(@adminer_alter);
|
||||
DROP PROCEDURE adminer_alter;
|
||||
";
|
||||
}
|
||||
if (in_array("CREATE+ALTER", array($style, $_POST["table_style"])) && $is_sql) {
|
||||
echo "SELECT @adminer_alter;\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_sql) {
|
||||
echo "-- " . $connection->result("SELECT NOW()") . "\n";
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
page_header(lang('Export'), "", ($_GET["export"] != "" ? array("table" => $_GET["export"]) : array()), DB);
|
||||
page_header(lang('Export'), $error, ($_GET["export"] != "" ? array("table" => $_GET["export"]) : array()), h(DB));
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
@@ -154,9 +131,7 @@ page_header(lang('Export'), "", ($_GET["export"] != "" ? array("table" => $_GET[
|
||||
$db_style = array('', 'USE', 'DROP+CREATE', 'CREATE');
|
||||
$table_style = array('', 'DROP+CREATE', 'CREATE');
|
||||
$data_style = array('', 'TRUNCATE+INSERT', 'INSERT');
|
||||
if ($jush == "sql") {
|
||||
$db_style[] = 'CREATE+ALTER';
|
||||
$table_style[] = 'CREATE+ALTER';
|
||||
if ($jush == "sql") { //! use insertUpdate() in all drivers
|
||||
$data_style[] = 'INSERT+UPDATE';
|
||||
}
|
||||
parse_str($_COOKIE["adminer_export"], $row);
|
||||
@@ -167,20 +142,26 @@ if (!isset($row["events"])) { // backwards compatibility
|
||||
$row["routines"] = $row["events"] = ($_GET["dump"] == "");
|
||||
$row["triggers"] = $row["table_style"];
|
||||
}
|
||||
|
||||
echo "<tr><th>" . lang('Output') . "<td>" . html_select("output", $adminer->dumpOutput(), $row["output"], 0) . "\n"; // 0 - radio
|
||||
|
||||
echo "<tr><th>" . lang('Format') . "<td>" . html_select("format", $adminer->dumpFormat(), $row["format"], 0) . "\n"; // 0 - radio
|
||||
|
||||
echo ($jush == "sqlite" ? "" : "<tr><th>" . lang('Database') . "<td>" . html_select('db_style', $db_style, $row["db_style"])
|
||||
. (support("routine") ? checkbox("routines", 1, $row["routines"], lang('Routines')) : "")
|
||||
. (support("event") ? checkbox("events", 1, $row["events"], lang('Events')) : "")
|
||||
);
|
||||
|
||||
echo "<tr><th>" . lang('Tables') . "<td>" . html_select('table_style', $table_style, $row["table_style"])
|
||||
. checkbox("auto_increment", 1, $row["auto_increment"], lang('Auto Increment'))
|
||||
. (support("trigger") ? checkbox("triggers", 1, $row["triggers"], lang('Triggers')) : "")
|
||||
;
|
||||
|
||||
echo "<tr><th>" . lang('Data') . "<td>" . html_select('data_style', $data_style, $row["data_style"]);
|
||||
?>
|
||||
</table>
|
||||
<p><input type="submit" value="<?php echo lang('Export'); ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
|
||||
<table cellspacing="0">
|
||||
<?php
|
||||
@@ -188,32 +169,37 @@ $prefixes = array();
|
||||
if (DB != "") {
|
||||
$checked = ($TABLE != "" ? "" : " checked");
|
||||
echo "<thead><tr>";
|
||||
echo "<th style='text-align: left;'><label><input type='checkbox' id='check-tables'$checked onclick='formCheck(this, /^tables\\[/);'>" . lang('Tables') . "</label>";
|
||||
echo "<th style='text-align: right;'><label>" . lang('Data') . "<input type='checkbox' id='check-data'$checked onclick='formCheck(this, /^data\\[/);'></label>";
|
||||
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: right;'><label class='block'>" . lang('Data') . "<input type='checkbox' id='check-data'$checked onclick='formCheck(this, /^data\\[/);'></label>";
|
||||
echo "</thead>\n";
|
||||
|
||||
$views = "";
|
||||
//! defer number of rows to JavaScript
|
||||
foreach (table_status() as $row) {
|
||||
$name = $row["Name"];
|
||||
$prefix = ereg_replace("_.*", "", $name);
|
||||
$tables_list = tables_list();
|
||||
foreach ($tables_list as $name => $type) {
|
||||
$prefix = preg_replace('~_.*~', '', $name);
|
||||
$checked = ($TABLE == "" || $TABLE == (substr($TABLE, -1) == "%" ? "$prefix%" : $name)); //! % may be part of table name
|
||||
$print = "<tr><td>" . checkbox("tables[]", $name, $checked, $name, "formUncheck('check-tables');");
|
||||
if (is_view($row)) {
|
||||
$print = "<tr><td>" . checkbox("tables[]", $name, $checked, $name, "checkboxClick(event, this); formUncheck('check-tables');", "block");
|
||||
if ($type !== null && !preg_match('~table~i', $type)) {
|
||||
$views .= "$print\n";
|
||||
} else {
|
||||
echo "$print<td align='right'><label>" . ($row["Engine"] == "InnoDB" && $row["Rows"] ? "~ " : "") . $row["Rows"] . checkbox("data[]", $name, $checked, "", "formUncheck('check-data');") . "</label>\n";
|
||||
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";
|
||||
}
|
||||
$prefixes[$prefix]++;
|
||||
}
|
||||
echo $views;
|
||||
|
||||
if ($tables_list) {
|
||||
echo "<script type='text/javascript'>ajaxSetHtml('" . js_escape(ME) . "script=db');</script>\n";
|
||||
}
|
||||
|
||||
} else {
|
||||
echo "<thead><tr><th style='text-align: left;'><label><input type='checkbox' id='check-databases'" . ($TABLE == "" ? " checked" : "") . " onclick='formCheck(this, /^databases\\[/);'>" . lang('Database') . "</label></thead>\n";
|
||||
$databases = get_databases();
|
||||
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";
|
||||
$databases = $adminer->databases();
|
||||
if ($databases) {
|
||||
foreach ($databases as $db) {
|
||||
if (!information_schema($db)) {
|
||||
$prefix = ereg_replace("_.*", "", $db);
|
||||
echo "<tr><td>" . checkbox("databases[]", $db, $TABLE == "" || $TABLE == "$prefix%", $db, "formUncheck('check-databases');") . "</label>\n";
|
||||
$prefix = preg_replace('~_.*~', '', $db);
|
||||
echo "<tr><td>" . checkbox("databases[]", $db, $TABLE == "" || $TABLE == "$prefix%", $db, "formUncheck('check-databases');", "block") . "\n";
|
||||
$prefixes[$prefix]++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,51 +1,64 @@
|
||||
<?php
|
||||
$TABLE = $_GET["edit"];
|
||||
$where = (isset($_GET["select"]) ? (count($_POST["check"]) == 1 ? where_check($_POST["check"][0]) : "") : where($_GET));
|
||||
$update = (isset($_GET["select"]) ? $_POST["edit"] : $where);
|
||||
$fields = fields($TABLE);
|
||||
$where = (isset($_GET["select"]) ? (count($_POST["check"]) == 1 ? where_check($_POST["check"][0], $fields) : "") : where($_GET, $fields));
|
||||
$update = (isset($_GET["select"]) ? $_POST["edit"] : $where);
|
||||
foreach ($fields as $name => $field) {
|
||||
if (!isset($field["privileges"][$update ? "update" : "insert"]) || $adminer->fieldName($field) == "") {
|
||||
unset($fields[$name]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($_POST && !$error && !isset($_GET["select"])) {
|
||||
$location = $_POST["referer"];
|
||||
if ($_POST["insert"]) { // continue edit or insert
|
||||
$location = ($update ? null : $_SERVER["REQUEST_URI"]);
|
||||
} elseif (!ereg('^.+&select=.+$', $location)) {
|
||||
} elseif (!preg_match('~^.+&select=.+$~', $location)) {
|
||||
$location = ME . "select=" . urlencode($TABLE);
|
||||
}
|
||||
|
||||
$indexes = indexes($TABLE);
|
||||
$unique_array = unique_array($_GET["where"], $indexes);
|
||||
$query_where = "\nWHERE $where";
|
||||
|
||||
if (isset($_POST["delete"])) {
|
||||
query_redirect("DELETE" . limit1("FROM " . table($TABLE), " WHERE $where"), $location, lang('Item has been deleted.'));
|
||||
queries_redirect(
|
||||
$location,
|
||||
lang('Item has been deleted.'),
|
||||
$driver->delete($TABLE, $query_where, !$unique_array)
|
||||
);
|
||||
|
||||
} else {
|
||||
$set = array();
|
||||
foreach ($fields as $name => $field) {
|
||||
$val = process_input($field);
|
||||
if ($val !== false && $val !== null) {
|
||||
$set[idf_escape($name)] = ($update ? "\n" . idf_escape($name) . " = $val" : $val);
|
||||
$set[idf_escape($name)] = $val;
|
||||
}
|
||||
}
|
||||
|
||||
if ($update) {
|
||||
if (!$set) {
|
||||
redirect($location);
|
||||
}
|
||||
query_redirect("UPDATE" . limit1(table($TABLE) . " SET" . implode(",", $set), "\nWHERE $where"), $location, lang('Item has been updated.'));
|
||||
queries_redirect(
|
||||
$location,
|
||||
lang('Item has been updated.'),
|
||||
$driver->update($TABLE, $set, $query_where, !$unique_array)
|
||||
);
|
||||
if (is_ajax()) {
|
||||
page_headers();
|
||||
page_messages($error);
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
$result = insert_into($TABLE, $set);
|
||||
$result = $driver->insert($TABLE, $set);
|
||||
$last_id = ($result ? last_id() : 0);
|
||||
queries_redirect($location, lang('Item%s has been inserted.', ($last_id ? " $last_id" : "")), $result); //! link
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$table_name = $adminer->tableName(table_status($TABLE));
|
||||
page_header(
|
||||
($update ? lang('Edit') : lang('Insert')),
|
||||
$error,
|
||||
array("select" => array($TABLE, $table_name)),
|
||||
$table_name //! two calls of h()
|
||||
);
|
||||
|
||||
$row = null;
|
||||
if ($_POST["save"]) {
|
||||
$row = (array) $_POST["fields"];
|
||||
@@ -53,62 +66,48 @@ if ($_POST["save"]) {
|
||||
$select = array();
|
||||
foreach ($fields as $name => $field) {
|
||||
if (isset($field["privileges"]["select"])) {
|
||||
$select[] = ($_POST["clone"] && $field["auto_increment"] ? "'' AS " : (ereg("enum|set", $field["type"]) ? "1*" . idf_escape($name) . " AS " : "")) . idf_escape($name);
|
||||
$as = convert_field($field);
|
||||
if ($_POST["clone"] && $field["auto_increment"]) {
|
||||
$as = "''";
|
||||
}
|
||||
if ($jush == "sql" && preg_match("~enum|set~", $field["type"])) {
|
||||
$as = "1*" . idf_escape($name);
|
||||
}
|
||||
$select[] = ($as ? "$as AS " : "") . idf_escape($name);
|
||||
}
|
||||
}
|
||||
$row = array();
|
||||
if (!support("table")) {
|
||||
$select = array("*");
|
||||
}
|
||||
if ($select) {
|
||||
$rows = get_rows("SELECT" . limit(implode(", ", $select) . " FROM " . table($TABLE), " WHERE $where", (isset($_GET["select"]) ? 2 : 1)));
|
||||
$row = (isset($_GET["select"]) && count($rows) != 1 ? null : reset($rows));
|
||||
$result = $driver->select($TABLE, $select, array($where), $select, array(), (isset($_GET["select"]) ? 2 : 1));
|
||||
$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
|
||||
$row = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($row === false) {
|
||||
echo "<p class='error'>" . lang('No rows.') . "\n";
|
||||
if (!support("table") && !$fields) {
|
||||
if (!$where) { // insert
|
||||
$result = $driver->select($TABLE, array("*"), $where, array("*"));
|
||||
$row = ($result ? $result->fetch_assoc() : false);
|
||||
if (!$row) {
|
||||
$row = array($driver->primary => "");
|
||||
}
|
||||
}
|
||||
if ($row) {
|
||||
foreach ($row as $key => $val) {
|
||||
if (!$where) {
|
||||
$row[$key] = null;
|
||||
}
|
||||
$fields[$key] = array("field" => $key, "null" => ($key != $driver->primary), "auto_increment" => ($key == $driver->primary));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<form action="" method="post" enctype="multipart/form-data" id="form">
|
||||
<?php
|
||||
if ($fields) {
|
||||
echo "<table cellspacing='0' onkeydown='return editingKeydown(event);'>\n";
|
||||
foreach ($fields as $name => $field) {
|
||||
echo "<tr><th>" . $adminer->fieldName($field);
|
||||
$default = $_GET["set"][bracket_escape($name)];
|
||||
$value = (isset($row)
|
||||
? ($row[$name] != "" && ereg("enum|set", $field["type"]) ? (is_array($row[$name]) ? array_sum($row[$name]) : +$row[$name]) : $row[$name])
|
||||
: (!$update && $field["auto_increment"] ? "" : (isset($_GET["select"]) ? false : (isset($default) ? $default : $field["default"])))
|
||||
);
|
||||
if (!$_POST["save"] && is_string($value)) {
|
||||
$value = $adminer->editVal($value, $field);
|
||||
}
|
||||
$function = ($_POST["save"] ? (string) $_POST["function"][$name] : ($update && $field["on_update"] == "CURRENT_TIMESTAMP" ? "now" : ($value === false ? null : (isset($value) ? '' : 'NULL'))));
|
||||
if ($field["type"] == "timestamp" && $value == "CURRENT_TIMESTAMP") {
|
||||
$value = "";
|
||||
$function = "now";
|
||||
}
|
||||
input($field, $value, $function);
|
||||
echo "\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
?>
|
||||
<p>
|
||||
<?php
|
||||
if ($fields) {
|
||||
echo "<input type='submit' value='" . lang('Save') . "'>\n";
|
||||
if (!isset($_GET["select"])) {
|
||||
echo "<input type='submit' name='insert' value='" . ($update ? lang('Save and continue edit') : lang('Save and insert next')) . "' title='Ctrl+Shift+Enter'>\n";
|
||||
}
|
||||
}
|
||||
echo ($update ? "<input type='submit' name='delete' value='" . lang('Delete') . "' onclick=\"return confirm('" . lang('Are you sure?') . "');\">\n"
|
||||
: ($_POST || !$fields ? "" : "<script type='text/javascript'>document.getElementById('form').getElementsByTagName('td')[1].firstChild.focus();</script>\n")
|
||||
);
|
||||
if (isset($_GET["select"])) {
|
||||
hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"]));
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="referer" value="<?php echo h(isset($_POST["referer"]) ? $_POST["referer"] : $_SERVER["HTTP_REFERER"]); ?>">
|
||||
<input type="hidden" name="save" value="1">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
</form>
|
||||
edit_form($TABLE, $fields, $row, $update);
|
||||
|
||||
@@ -2,34 +2,33 @@
|
||||
$EVENT = $_GET["event"];
|
||||
$intervals = array("YEAR", "QUARTER", "MONTH", "DAY", "HOUR", "MINUTE", "WEEK", "SECOND", "YEAR_MONTH", "DAY_HOUR", "DAY_MINUTE", "DAY_SECOND", "HOUR_MINUTE", "HOUR_SECOND", "MINUTE_SECOND");
|
||||
$statuses = array("ENABLED" => "ENABLE", "DISABLED" => "DISABLE", "SLAVESIDE_DISABLED" => "DISABLE ON SLAVE");
|
||||
$row = $_POST;
|
||||
|
||||
if ($_POST && !$error) {
|
||||
if ($_POST["drop"]) {
|
||||
query_redirect("DROP EVENT " . idf_escape($EVENT), substr(ME, 0, -1), lang('Event has been dropped.'));
|
||||
} elseif (in_array($_POST["INTERVAL_FIELD"], $intervals) && isset($statuses[$_POST["STATUS"]])) {
|
||||
$schedule = "\nON SCHEDULE " . ($_POST["INTERVAL_VALUE"]
|
||||
? "EVERY " . q($_POST["INTERVAL_VALUE"]) . " $_POST[INTERVAL_FIELD]"
|
||||
. ($_POST["STARTS"] ? " STARTS " . q($_POST["STARTS"]) : "")
|
||||
. ($_POST["ENDS"] ? " ENDS " . q($_POST["ENDS"]) : "") //! ALTER EVENT doesn't drop ENDS - MySQL bug #39173
|
||||
: "AT " . q($_POST["STARTS"])
|
||||
) . " ON COMPLETION" . ($_POST["ON_COMPLETION"] ? "" : " NOT") . " PRESERVE"
|
||||
} elseif (in_array($row["INTERVAL_FIELD"], $intervals) && isset($statuses[$row["STATUS"]])) {
|
||||
$schedule = "\nON SCHEDULE " . ($row["INTERVAL_VALUE"]
|
||||
? "EVERY " . q($row["INTERVAL_VALUE"]) . " $row[INTERVAL_FIELD]"
|
||||
. ($row["STARTS"] ? " STARTS " . q($row["STARTS"]) : "")
|
||||
. ($row["ENDS"] ? " ENDS " . q($row["ENDS"]) : "") //! ALTER EVENT doesn't drop ENDS - MySQL bug #39173
|
||||
: "AT " . q($row["STARTS"])
|
||||
) . " ON COMPLETION" . ($row["ON_COMPLETION"] ? "" : " NOT") . " PRESERVE"
|
||||
;
|
||||
|
||||
queries_redirect(substr(ME, 0, -1), ($EVENT != "" ? lang('Event has been altered.') : lang('Event has been created.')), queries(($EVENT != ""
|
||||
? "ALTER EVENT " . idf_escape($EVENT) . $schedule
|
||||
. ($EVENT != $_POST["EVENT_NAME"] ? "\nRENAME TO " . idf_escape($_POST["EVENT_NAME"]) : "")
|
||||
: "CREATE EVENT " . idf_escape($_POST["EVENT_NAME"]) . $schedule
|
||||
) . "\n" . $statuses[$_POST["STATUS"]] . " COMMENT " . q($_POST["EVENT_COMMENT"])
|
||||
. rtrim(" DO\n$_POST[EVENT_DEFINITION]", ";") . ";"
|
||||
. ($EVENT != $row["EVENT_NAME"] ? "\nRENAME TO " . idf_escape($row["EVENT_NAME"]) : "")
|
||||
: "CREATE EVENT " . idf_escape($row["EVENT_NAME"]) . $schedule
|
||||
) . "\n" . $statuses[$row["STATUS"]] . " COMMENT " . q($row["EVENT_COMMENT"])
|
||||
. rtrim(" DO\n$row[EVENT_DEFINITION]", ";") . ";"
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
page_header(($EVENT != "" ? lang('Alter event') . ": " . h($EVENT) : lang('Create event')), $error);
|
||||
|
||||
$row = array();
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
} elseif ($EVENT != "") {
|
||||
if (!$row && $EVENT != "") {
|
||||
$rows = get_rows("SELECT * FROM information_schema.EVENTS WHERE EVENT_SCHEMA = " . q(DB) . " AND EVENT_NAME = " . q($EVENT));
|
||||
$row = reset($rows);
|
||||
}
|
||||
@@ -37,10 +36,10 @@ if ($_POST) {
|
||||
|
||||
<form action="" method="post">
|
||||
<table cellspacing="0">
|
||||
<tr><th><?php echo lang('Name'); ?><td><input name="EVENT_NAME" value="<?php echo h($row["EVENT_NAME"]); ?>" maxlength="64">
|
||||
<tr><th><?php echo lang('Start'); ?><td><input name="STARTS" value="<?php echo h("$row[EXECUTE_AT]$row[STARTS]"); ?>">
|
||||
<tr><th><?php echo lang('End'); ?><td><input name="ENDS" value="<?php echo h($row["ENDS"]); ?>">
|
||||
<tr><th><?php echo lang('Every'); ?><td><input name="INTERVAL_VALUE" value="<?php echo h($row["INTERVAL_VALUE"]); ?>" size="6"> <?php echo html_select("INTERVAL_FIELD", $intervals, $row["INTERVAL_FIELD"]); ?>
|
||||
<tr><th><?php echo lang('Name'); ?><td><input name="EVENT_NAME" value="<?php echo h($row["EVENT_NAME"]); ?>" maxlength="64" autocapitalize="off">
|
||||
<tr><th title="datetime"><?php echo lang('Start'); ?><td><input name="STARTS" value="<?php echo h("$row[EXECUTE_AT]$row[STARTS]"); ?>">
|
||||
<tr><th title="datetime"><?php echo lang('End'); ?><td><input name="ENDS" value="<?php echo h($row["ENDS"]); ?>">
|
||||
<tr><th><?php echo lang('Every'); ?><td><input type="number" name="INTERVAL_VALUE" value="<?php echo h($row["INTERVAL_VALUE"]); ?>" class="size"> <?php echo html_select("INTERVAL_FIELD", $intervals, $row["INTERVAL_FIELD"]); ?>
|
||||
<tr><th><?php echo lang('Status'); ?><td><?php echo html_select("STATUS", $statuses, $row["STATUS"]); ?>
|
||||
<tr><th><?php echo lang('Comment'); ?><td><input name="EVENT_COMMENT" value="<?php echo h($row["EVENT_COMMENT"]); ?>" maxlength="64">
|
||||
<tr><th> <td><?php echo checkbox("ON_COMPLETION", "PRESERVE", $row["ON_COMPLETION"] == "PRESERVE", lang('On completion preserve')); ?>
|
||||
|
||||
@@ -1,24 +1,32 @@
|
||||
<?php
|
||||
if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) {
|
||||
header("HTTP/1.1 304 Not Modified");
|
||||
exit;
|
||||
}
|
||||
|
||||
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");
|
||||
|
||||
if ($_GET["file"] == "favicon.ico") {
|
||||
header("Content-Type: image/x-icon");
|
||||
echo base64_decode("compile_file('../adminer/static/favicon.ico', 'base64_encode');");
|
||||
echo lzw_decompress(compile_file('../adminer/static/favicon.ico', 'lzw_compress'));
|
||||
} elseif ($_GET["file"] == "default.css") {
|
||||
header("Content-Type: text/css; charset=utf-8");
|
||||
?>compile_file('../adminer/static/default.css', 'minify_css');<?php
|
||||
echo lzw_decompress(compile_file('../adminer/static/default.css;../externals/jush/jush.css', 'minify_css'));
|
||||
} elseif ($_GET["file"] == "functions.js") {
|
||||
header("Content-Type: text/javascript; charset=utf-8");
|
||||
?>compile_file('../adminer/static/functions.js', 'JSMin::minify');compile_file('static/editing.js', 'JSMin::minify');<?php
|
||||
echo lzw_decompress(compile_file('../adminer/static/functions.js;static/editing.js', 'minify_js'));
|
||||
} elseif ($_GET["file"] == "jush.js") {
|
||||
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'));
|
||||
} else {
|
||||
header("Content-Type: image/gif");
|
||||
switch ($_GET["file"]) {
|
||||
case "plus.gif": echo base64_decode("compile_file('../adminer/static/plus.gif', 'base64_encode');"); break;
|
||||
case "cross.gif": echo base64_decode("compile_file('../adminer/static/cross.gif', 'base64_encode');"); break;
|
||||
case "up.gif": echo base64_decode("compile_file('../adminer/static/up.gif', 'base64_encode');"); break;
|
||||
case "down.gif": echo base64_decode("compile_file('../adminer/static/down.gif', 'base64_encode');"); break;
|
||||
case "arrow.gif": echo base64_decode("compile_file('../adminer/static/arrow.gif', 'base64_encode');"); break;
|
||||
case "loader.gif": echo base64_decode("compile_file('../adminer/static/loader.gif', 'base64_encode');"); break;
|
||||
case "plus.gif": echo compile_file('../adminer/static/plus.gif'); break;
|
||||
case "cross.gif": echo compile_file('../adminer/static/cross.gif'); break;
|
||||
case "up.gif": echo compile_file('../adminer/static/up.gif'); break;
|
||||
case "down.gif": echo compile_file('../adminer/static/down.gif'); break;
|
||||
case "arrow.gif": echo compile_file('../adminer/static/arrow.gif'); break;
|
||||
}
|
||||
}
|
||||
exit;
|
||||
|
||||
@@ -1,57 +1,62 @@
|
||||
<?php
|
||||
$TABLE = $_GET["foreign"];
|
||||
$name = $_GET["name"];
|
||||
$row = $_POST;
|
||||
|
||||
if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-js"]) {
|
||||
if ($_POST["drop"]) {
|
||||
query_redirect("ALTER TABLE " . table($TABLE) . "\nDROP " . ($jush == "sql" ? "FOREIGN KEY " : "CONSTRAINT ") . idf_escape($_GET["name"]), ME . "table=" . urlencode($TABLE), lang('Foreign key has been dropped.'));
|
||||
$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);
|
||||
|
||||
$row["source"] = array_filter($row["source"], 'strlen');
|
||||
ksort($row["source"]); // enforce input order
|
||||
$target = array();
|
||||
foreach ($row["source"] as $key => $val) {
|
||||
$target[$key] = $row["target"][$key];
|
||||
}
|
||||
$row["target"] = $target;
|
||||
|
||||
if ($jush == "sqlite") {
|
||||
queries_redirect($location, $message, recreate_table($TABLE, $TABLE, array(), array(), array(" $name" => ($_POST["drop"] ? "" : " " . format_foreign_key($row)))));
|
||||
} else {
|
||||
$source = array_filter($_POST["source"], 'strlen');
|
||||
ksort($source); // enforce input order
|
||||
$target = array();
|
||||
foreach ($source as $key => $val) {
|
||||
$target[$key] = $_POST["target"][$key];
|
||||
$alter = "ALTER TABLE " . table($TABLE);
|
||||
$drop = "\nDROP " . ($jush == "sql" ? "FOREIGN KEY " : "CONSTRAINT ") . idf_escape($name);
|
||||
if ($_POST["drop"]) {
|
||||
query_redirect($alter . $drop, $location, $message);
|
||||
} else {
|
||||
query_redirect($alter . ($name != "" ? "$drop," : "") . "\nADD" . format_foreign_key($row), $location, $message);
|
||||
$error = lang('Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.') . "<br>$error"; //! no partitioning
|
||||
}
|
||||
query_redirect("ALTER TABLE " . table($TABLE)
|
||||
. ($_GET["name"] != "" ? "\nDROP FOREIGN KEY " . idf_escape($_GET["name"]) . "," : "")
|
||||
. "\nADD FOREIGN KEY (" . implode(", ", array_map('idf_escape', $source)) . ") REFERENCES " . table($_POST["table"]) . " (" . implode(", ", array_map('idf_escape', $target)) . ")" //! reuse $_GET["name"] - check in older MySQL versions
|
||||
. (ereg("^($on_actions)\$", $_POST["on_delete"]) ? " ON DELETE $_POST[on_delete]" : "")
|
||||
. (ereg("^($on_actions)\$", $_POST["on_update"]) ? " ON UPDATE $_POST[on_update]" : "")
|
||||
, ME . "table=" . urlencode($TABLE), ($_GET["name"] != "" ? lang('Foreign key has been altered.') : lang('Foreign key has been created.')));
|
||||
$error = lang('Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.') . "<br>$error"; //! no partitioning
|
||||
}
|
||||
}
|
||||
|
||||
page_header(lang('Foreign key'), $error, array("table" => $TABLE), $TABLE);
|
||||
page_header(lang('Foreign key'), $error, array("table" => $TABLE), h($TABLE));
|
||||
|
||||
$row = array("table" => $TABLE, "source" => array(""));
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
ksort($row["source"]);
|
||||
if ($_POST["add"]) {
|
||||
$row["source"][] = "";
|
||||
} elseif ($_POST["change"] || $_POST["change-js"]) {
|
||||
$row["target"] = array();
|
||||
}
|
||||
} elseif ($_GET["name"] != "") {
|
||||
} elseif ($name != "") {
|
||||
$foreign_keys = foreign_keys($TABLE);
|
||||
$row = $foreign_keys[$_GET["name"]];
|
||||
$row = $foreign_keys[$name];
|
||||
$row["source"][] = "";
|
||||
} else {
|
||||
$row["table"] = $TABLE;
|
||||
$row["source"] = array("");
|
||||
}
|
||||
|
||||
$source = array_keys(fields($TABLE)); //! no text and blob
|
||||
$target = ($TABLE === $row["table"] ? $source : array_keys(fields($row["table"])));
|
||||
$referencable = array();
|
||||
foreach (table_status() as $name => $table_status) {
|
||||
if (fk_support($table_status)) {
|
||||
$referencable[] = $name;
|
||||
}
|
||||
}
|
||||
$referencable = array_keys(array_filter(table_status('', true), 'fk_support'));
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<p>
|
||||
<?php if ($row["db"] == "" && $row["ns"] == "") { ?>
|
||||
<?php echo lang('Target table'); ?>:
|
||||
<?php echo html_select("table", $referencable, $row["table"], "this.form['change-js'].value = '1'; if (!ajaxForm(this.form)) this.form.submit();"); ?>
|
||||
<?php echo html_select("table", $referencable, $row["table"], "this.form['change-js'].value = '1'; this.form.submit();"); ?>
|
||||
<input type="hidden" name="change-js" value="">
|
||||
<noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>"></noscript>
|
||||
<table cellspacing="0">
|
||||
@@ -69,10 +74,16 @@ foreach ($row["source"] as $key => $val) {
|
||||
<p>
|
||||
<?php echo lang('ON DELETE'); ?>: <?php echo html_select("on_delete", array(-1 => "") + explode("|", $on_actions), $row["on_delete"]); ?>
|
||||
<?php echo lang('ON UPDATE'); ?>: <?php echo html_select("on_update", array(-1 => "") + explode("|", $on_actions), $row["on_update"]); ?>
|
||||
<?php echo doc_link(array(
|
||||
'sql' => "innodb-foreign-key-constraints.html",
|
||||
'pgsql' => "sql-createtable.html#SQL-CREATETABLE-REFERENCES",
|
||||
'mssql' => "ms174979.aspx",
|
||||
'oracle' => "clauses002.htm#sthref2903",
|
||||
)); ?>
|
||||
<p>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<noscript><p><input type="submit" name="add" value="<?php echo lang('Add column'); ?>"></noscript>
|
||||
<?php } ?>
|
||||
<?php if ($_GET["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(); ?>><?php } ?>
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
</form>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?php
|
||||
$connection = '';
|
||||
|
||||
$token = $_SESSION["token"];
|
||||
if (!$_SESSION["token"]) {
|
||||
$has_token = $_SESSION["token"];
|
||||
if (!$has_token) {
|
||||
$_SESSION["token"] = rand(1, 1e6); // defense against cross-site request forgery
|
||||
}
|
||||
$token = get_token(); ///< @var string CSRF protection
|
||||
|
||||
$permanent = array();
|
||||
if ($_COOKIE["adminer_permanent"]) {
|
||||
@@ -14,94 +15,190 @@ if ($_COOKIE["adminer_permanent"]) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST["server"])) {
|
||||
function add_invalid_login() {
|
||||
global $adminer;
|
||||
$filename = get_temp_dir() . "/adminer.invalid";
|
||||
$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;
|
||||
}
|
||||
}
|
||||
flock($fp, LOCK_EX);
|
||||
$invalids = unserialize(stream_get_contents($fp));
|
||||
$time = time();
|
||||
if ($invalids) {
|
||||
foreach ($invalids as $ip => $val) {
|
||||
if ($val[0] < $time) {
|
||||
unset($invalids[$ip]);
|
||||
}
|
||||
}
|
||||
}
|
||||
$invalid = &$invalids[$adminer->bruteForceKey()];
|
||||
if (!$invalid) {
|
||||
$invalid = array($time + 30*60, 0); // active for 30 minutes
|
||||
}
|
||||
$invalid[1]++;
|
||||
$serialized = serialize($invalids);
|
||||
rewind($fp);
|
||||
fwrite($fp, $serialized);
|
||||
ftruncate($fp, strlen($serialized));
|
||||
flock($fp, LOCK_UN);
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
$auth = $_POST["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["pwds"][$_POST["driver"]][$_POST["server"]][$_POST["username"]] = $_POST["password"];
|
||||
if ($_POST["permanent"]) {
|
||||
$key = base64_encode($_POST["driver"]) . "-" . base64_encode($_POST["server"]) . "-" . base64_encode($_POST["username"]);
|
||||
$private = $adminer->permanentLogin();
|
||||
$permanent[$key] = "$key:" . base64_encode($private ? encrypt_string($_POST["password"], $private) : "");
|
||||
$vendor = $auth["driver"];
|
||||
$server = $auth["server"];
|
||||
$username = $auth["username"];
|
||||
$password = (string) $auth["password"];
|
||||
$db = $auth["db"];
|
||||
set_password($vendor, $server, $username, $password);
|
||||
$_SESSION["db"][$vendor][$server][$username][$db] = true;
|
||||
if ($auth["permanent"]) {
|
||||
$key = base64_encode($vendor) . "-" . base64_encode($server) . "-" . base64_encode($username) . "-" . base64_encode($db);
|
||||
$private = $adminer->permanentLogin(true);
|
||||
$permanent[$key] = "$key:" . base64_encode($private ? encrypt_string($password, $private) : "");
|
||||
cookie("adminer_permanent", implode(" ", $permanent));
|
||||
}
|
||||
if (count($_POST) == ($_POST["permanent"] ? 5 : 4) // 4 - driver, server, username, password
|
||||
|| DRIVER != $_POST["driver"]
|
||||
|| SERVER != $_POST["server"]
|
||||
|| $_GET["username"] !== $_POST["username"] // "0" == "00"
|
||||
if (count($_POST) == 1 // 1 - auth
|
||||
|| DRIVER != $vendor
|
||||
|| SERVER != $server
|
||||
|| $_GET["username"] !== $username // "0" == "00"
|
||||
|| DB != $db
|
||||
) {
|
||||
redirect(auth_url($_POST["driver"], $_POST["server"], $_POST["username"]));
|
||||
redirect(auth_url($vendor, $server, $username, $db));
|
||||
}
|
||||
|
||||
} elseif ($_POST["logout"]) {
|
||||
if ($token && $_POST["token"] != $token) {
|
||||
if ($has_token && !verify_token()) {
|
||||
page_header(lang('Logout'), lang('Invalid CSRF token. Send the form again.'));
|
||||
page_footer("db");
|
||||
exit;
|
||||
} else {
|
||||
foreach (array("pwds", "dbs", "queries") as $key) {
|
||||
foreach (array("pwds", "db", "dbs", "queries") as $key) {
|
||||
set_session($key, null);
|
||||
}
|
||||
$key = base64_encode(DRIVER) . "-" . base64_encode(SERVER) . "-" . base64_encode($_GET["username"]);
|
||||
if ($permanent[$key]) {
|
||||
unset($permanent[$key]);
|
||||
cookie("adminer_permanent", implode(" ", $permanent));
|
||||
}
|
||||
redirect(substr(preg_replace('~(username|db|ns)=[^&]*&~', '', ME), 0, -1), lang('Logout successful.'));
|
||||
unset_permanent();
|
||||
redirect(substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1), lang('Logout successful.'));
|
||||
}
|
||||
|
||||
} elseif ($permanent && !$_SESSION["pwds"]) {
|
||||
session_regenerate_id();
|
||||
$private = $adminer->permanentLogin(); // try to decode even if not set
|
||||
$private = $adminer->permanentLogin();
|
||||
foreach ($permanent as $key => $val) {
|
||||
list(, $cipher) = explode(":", $val);
|
||||
list($driver, $server, $username) = array_map('base64_decode', explode("-", $key));
|
||||
$_SESSION["pwds"][$driver][$server][$username] = decrypt_string(base64_decode($cipher), $private);
|
||||
list($vendor, $server, $username, $db) = array_map('base64_decode', explode("-", $key));
|
||||
set_password($vendor, $server, $username, decrypt_string(base64_decode($cipher), $private));
|
||||
$_SESSION["db"][$vendor][$server][$username][$db] = true;
|
||||
}
|
||||
}
|
||||
|
||||
function auth_error($exception = null) {
|
||||
global $connection, $adminer, $token;
|
||||
$session_name = session_name();
|
||||
$error = "";
|
||||
if (!$_COOKIE[$session_name] && $_GET[$session_name] && ini_bool("session.use_only_cookies")) {
|
||||
$error = lang('Session support must be enabled.');
|
||||
} elseif (isset($_GET["username"])) {
|
||||
if (($_COOKIE[$session_name] || $_GET[$session_name]) && !$token) {
|
||||
$error = lang('Session expired, please login again.');
|
||||
} else {
|
||||
$password = &get_session("pwds");
|
||||
if (isset($password)) {
|
||||
$error = h($exception ? $exception->getMessage() : (is_string($connection) ? $connection : lang('Invalid credentials.')));
|
||||
$password = null;
|
||||
}
|
||||
function unset_permanent() {
|
||||
global $permanent;
|
||||
foreach ($permanent as $key => $val) {
|
||||
list($vendor, $server, $username, $db) = array_map('base64_decode', explode("-", $key));
|
||||
if ($vendor == DRIVER && $server == SERVER && $username == $_GET["username"] && $db == DB) {
|
||||
unset($permanent[$key]);
|
||||
}
|
||||
}
|
||||
cookie("adminer_permanent", implode(" ", $permanent));
|
||||
}
|
||||
|
||||
/** Renders an error message and a login form
|
||||
* @param string plain text
|
||||
* @return null exits
|
||||
*/
|
||||
function auth_error($error) {
|
||||
global $adminer, $has_token;
|
||||
$error = h($error);
|
||||
$session_name = session_name();
|
||||
if (isset($_GET["username"])) {
|
||||
header("HTTP/1.1 403 Forbidden"); // 401 requires sending WWW-Authenticate header
|
||||
if (($_COOKIE[$session_name] || $_GET[$session_name]) && !$has_token) {
|
||||
$error = lang('Session expired, please login again.');
|
||||
} else {
|
||||
add_invalid_login();
|
||||
$password = get_password();
|
||||
if ($password !== null) {
|
||||
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>');
|
||||
}
|
||||
set_password(DRIVER, SERVER, $_GET["username"], null);
|
||||
}
|
||||
unset_permanent();
|
||||
}
|
||||
}
|
||||
if (!$_COOKIE[$session_name] && $_GET[$session_name] && ini_bool("session.use_only_cookies")) {
|
||||
$error = lang('Session support must be enabled.');
|
||||
}
|
||||
$params = session_get_cookie_params();
|
||||
cookie("adminer_key", ($_COOKIE["adminer_key"] ? $_COOKIE["adminer_key"] : rand_string()), $params["lifetime"]);
|
||||
page_header(lang('Login'), $error, null);
|
||||
echo "<form action='' method='post' onclick='eventStop(event);'>\n";
|
||||
echo "<form action='' method='post'>\n";
|
||||
$adminer->loginForm();
|
||||
echo "<div>";
|
||||
hidden_fields($_POST, array("driver", "server", "username", "password", "permanent")); // expired session
|
||||
hidden_fields($_POST, array("auth")); // expired session
|
||||
echo "</div>\n";
|
||||
echo "</form>\n";
|
||||
page_footer("auth");
|
||||
exit;
|
||||
}
|
||||
|
||||
if (isset($_GET["username"])) {
|
||||
if (!class_exists("Min_DB")) {
|
||||
unset($_SESSION["pwds"][DRIVER]); //! remove also from adminer_permanent
|
||||
unset($_SESSION["pwds"][DRIVER]);
|
||||
unset_permanent();
|
||||
page_header(lang('No extension'), lang('None of the supported PHP extensions (%s) are available.', implode(", ", $possible_drivers)), false);
|
||||
page_footer("auth");
|
||||
exit;
|
||||
}
|
||||
$connection = connect();
|
||||
}
|
||||
if (is_string($connection) || !$adminer->login($_GET["username"], get_session("pwds"))) {
|
||||
auth_error();
|
||||
exit;
|
||||
|
||||
$driver = new Min_Driver($connection);
|
||||
|
||||
if (!is_object($connection) || !$adminer->login($_GET["username"], get_password())) {
|
||||
auth_error((is_string($connection) ? $connection : lang('Invalid credentials.')));
|
||||
}
|
||||
|
||||
$token = $_SESSION["token"]; ///< @var string CSRF protection
|
||||
if (isset($_POST["server"]) && $_POST["token"]) {
|
||||
if ($auth && $_POST["token"]) {
|
||||
$_POST["token"] = $token; // reset token after explicit login
|
||||
}
|
||||
$error = ($_POST ///< @var string
|
||||
? ($_POST["token"] == $token ? "" : lang('Invalid CSRF token. Send the form again.'))
|
||||
: ($_SERVER["REQUEST_METHOD"] != "POST" ? "" : lang('Too big POST data. Reduce the data or increase the %s configuration directive.', '"post_max_size"')) // posted form with no data means that post_max_size exceeded because Adminer always sends token at least
|
||||
);
|
||||
|
||||
$error = ''; ///< @var string
|
||||
if ($_POST) {
|
||||
if (!verify_token()) {
|
||||
$ini = "max_input_vars";
|
||||
$max_vars = ini_get($ini);
|
||||
if (extension_loaded("suhosin")) {
|
||||
foreach (array("suhosin.request.max_vars", "suhosin.post.max_vars") as $key) {
|
||||
$val = ini_get($key);
|
||||
if ($val && (!$max_vars || $val < $max_vars)) {
|
||||
$ini = $key;
|
||||
$max_vars = $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
$error = (!$_POST["token"] && $max_vars
|
||||
? lang('Maximum number of allowed fields exceeded. Please increase %s.', "'$ini'")
|
||||
: lang('Invalid CSRF token. Send the form again.') . ' ' . lang('If you did not send this request from Adminer then close this page.')
|
||||
);
|
||||
}
|
||||
|
||||
} elseif ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
// posted form with no data means that post_max_size exceeded because Adminer always sends token at least
|
||||
$error = lang('Too big POST data. Reduce the data or increase the %s configuration directive.', "'post_max_size'");
|
||||
if (isset($_GET["sql"])) {
|
||||
$error .= ' ' . lang('You can upload a big SQL file via FTP and import it from server.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ error_reporting(6135); // errors and warnings
|
||||
include "../adminer/include/coverage.inc.php";
|
||||
|
||||
// disable filter.default
|
||||
$filter = (!ereg('^(unsafe_raw)?$', ini_get("filter.default")));
|
||||
$filter = !preg_match('~^(unsafe_raw)?$~', ini_get("filter.default"));
|
||||
if ($filter || ini_get("filter.default_flags")) {
|
||||
foreach (array('_GET', '_POST', '_COOKIE', '_SERVER') as $val) {
|
||||
$unsafe = filter_input_array(constant("INPUT$val"), FILTER_UNSAFE_RAW);
|
||||
@@ -14,6 +14,10 @@ if ($filter || ini_get("filter.default_flags")) {
|
||||
}
|
||||
}
|
||||
|
||||
if (function_exists("mb_internal_encoding")) {
|
||||
mb_internal_encoding("8bit");
|
||||
}
|
||||
|
||||
// used only in compiled file
|
||||
if (isset($_GET["file"])) {
|
||||
include "../adminer/file.inc.php";
|
||||
@@ -21,13 +25,18 @@ if (isset($_GET["file"])) {
|
||||
|
||||
include "../adminer/include/functions.inc.php";
|
||||
|
||||
global $adminer, $connection, $drivers, $edit_functions, $enum_length, $error, $functions, $grouping, $HTTPS, $inout, $jush, $LANG, $langs, $on_actions, $structured_types, $token, $translations, $types, $unsigned, $VERSION; // allows including Adminer inside a function
|
||||
if (!isset($_SERVER["REQUEST_URI"])) {
|
||||
$_SERVER["REQUEST_URI"] = $_SERVER["ORIG_PATH_INFO"] . ($_SERVER["QUERY_STRING"] != "" ? "?$_SERVER[QUERY_STRING]" : ""); // IIS 5 compatibility
|
||||
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
|
||||
|
||||
if (!$_SERVER["REQUEST_URI"]) { // IIS 5 compatibility
|
||||
$_SERVER["REQUEST_URI"] = $_SERVER["ORIG_PATH_INFO"];
|
||||
}
|
||||
if (!strpos($_SERVER["REQUEST_URI"], '?') && $_SERVER["QUERY_STRING"] != "") { // IIS 7 compatibility
|
||||
$_SERVER["REQUEST_URI"] .= "?$_SERVER[QUERY_STRING]";
|
||||
}
|
||||
$HTTPS = $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off");
|
||||
|
||||
@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")) {
|
||||
session_name("adminer_sid"); // use specific session name to get own namespace
|
||||
$params = array(0, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), "", $HTTPS);
|
||||
@@ -40,7 +49,7 @@ if (!defined("SID")) {
|
||||
|
||||
// disable magic quotes to be able to use database escaping function
|
||||
remove_slashes(array(&$_GET, &$_POST, &$_COOKIE), $filter);
|
||||
if (function_exists("set_magic_quotes_runtime")) { // removed in PHP 6
|
||||
if (get_magic_quotes_runtime()) {
|
||||
set_magic_quotes_runtime(false);
|
||||
}
|
||||
@set_time_limit(0); // @ - can be disabled
|
||||
@@ -50,10 +59,15 @@ if (function_exists("set_magic_quotes_runtime")) { // removed in PHP 6
|
||||
include "../adminer/include/lang.inc.php";
|
||||
include "../adminer/lang/$LANG.inc.php";
|
||||
include "../adminer/include/pdo.inc.php";
|
||||
include "../adminer/include/driver.inc.php";
|
||||
include "../adminer/drivers/sqlite.inc.php";
|
||||
include "../adminer/drivers/pgsql.inc.php";
|
||||
include "../adminer/drivers/oracle.inc.php";
|
||||
include "../adminer/drivers/mssql.inc.php";
|
||||
include "../adminer/drivers/firebird.inc.php";
|
||||
include "../adminer/drivers/simpledb.inc.php";
|
||||
include "../adminer/drivers/mongo.inc.php";
|
||||
include "../adminer/drivers/elastic.inc.php";
|
||||
include "../adminer/drivers/mysql.inc.php"; // must be included as last driver
|
||||
|
||||
define("SERVER", $_GET[DRIVER]); // read from pgsql=localhost
|
||||
@@ -70,12 +84,12 @@ include "./include/adminer.inc.php";
|
||||
include "../adminer/include/design.inc.php";
|
||||
include "../adminer/include/xxtea.inc.php";
|
||||
include "../adminer/include/auth.inc.php";
|
||||
include "./include/connect.inc.php";
|
||||
include "./include/editing.inc.php";
|
||||
|
||||
session_cache_limiter(""); // to allow restarting session
|
||||
if (!ini_bool("session.use_cookies") || @ini_set("session.use_cookies", false) !== false) { // @ - may be disabled
|
||||
session_write_close(); // improves concurrency if a user opens several pages at once, may be restarted later
|
||||
}
|
||||
|
||||
$on_actions = "RESTRICT|CASCADE|SET NULL|NO ACTION"; ///< @var string used in foreign_keys()
|
||||
include "./include/editing.inc.php";
|
||||
include "./include/connect.inc.php";
|
||||
|
||||
$on_actions = "RESTRICT|NO ACTION|CASCADE|SET NULL|SET DEFAULT"; ///< @var string used in foreign_keys()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
function connect_error() {
|
||||
global $connection, $token, $error, $drivers;
|
||||
$databases = array();
|
||||
global $adminer, $connection, $token, $error, $drivers;
|
||||
if (DB != "") {
|
||||
header("HTTP/1.1 404 Not Found");
|
||||
page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), true);
|
||||
} else {
|
||||
if ($_POST["db"] && !$error) {
|
||||
@@ -10,8 +10,9 @@ function connect_error() {
|
||||
}
|
||||
|
||||
page_header(lang('Select database'), $error, false);
|
||||
echo "<p><a href='" . h(ME) . "database='>" . lang('Create new database') . "</a>\n";
|
||||
echo "<p class='links'>\n";
|
||||
foreach (array(
|
||||
'database' => lang('Create new database'),
|
||||
'privileges' => lang('Privileges'),
|
||||
'processlist' => lang('Process list'),
|
||||
'variables' => lang('Variables'),
|
||||
@@ -21,44 +22,63 @@ function connect_error() {
|
||||
echo "<a href='" . h(ME) . "$key='>$val</a>\n";
|
||||
}
|
||||
}
|
||||
echo "<p>" . lang('%s version: %s through PHP extension %s', $drivers[DRIVER], "<b>$connection->server_info</b>", "<b>$connection->extension</b>") . "\n";
|
||||
echo "<p>" . lang('%s version: %s through PHP extension %s', $drivers[DRIVER], "<b>" . h($connection->server_info) . "</b>", "<b>$connection->extension</b>") . "\n";
|
||||
echo "<p>" . lang('Logged as: %s', "<b>" . h(logged_user()) . "</b>") . "\n";
|
||||
if ($_GET["refresh"]) {
|
||||
set_session("dbs", null);
|
||||
}
|
||||
$databases = get_databases();
|
||||
$databases = $adminer->databases();
|
||||
if ($databases) {
|
||||
$scheme = support("scheme");
|
||||
$collations = collations();
|
||||
echo "<form action='' method='post'>\n";
|
||||
echo "<table cellspacing='0' onclick='tableClick(event);'>\n";
|
||||
echo "<thead><tr><td> <th>" . lang('Database') . "<td>" . lang('Collation') . "<td>" . lang('Tables') . "</thead>\n";
|
||||
foreach ($databases as $db) {
|
||||
echo "<table cellspacing='0' class='checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n";
|
||||
echo "<thead><tr>"
|
||||
. (support("database") ? "<td> " : "")
|
||||
. "<th>" . lang('Database') . " - <a href='" . h(ME) . "refresh=1'>" . lang('Refresh') . "</a>"
|
||||
. "<td>" . lang('Collation')
|
||||
. "<td>" . lang('Tables')
|
||||
. "<td>" . lang('Size') . " - <a href='" . h(ME) . "dbsize=1' onclick=\"return !ajaxSetHtml('" . js_escape(ME) . "script=connect');\">" . lang('Compute') . "</a>"
|
||||
. "</thead>\n"
|
||||
;
|
||||
|
||||
$databases = ($_GET["dbsize"] ? count_tables($databases) : array_flip($databases));
|
||||
|
||||
foreach ($databases as $db => $tables) {
|
||||
$root = h(ME) . "db=" . urlencode($db);
|
||||
echo "<tr" . odd() . "><td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]));
|
||||
echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"])) : "");
|
||||
echo "<th><a href='$root'>" . h($db) . "</a>";
|
||||
echo "<td><a href='$root" . ($scheme ? "&ns=" : "") . "&database='>" . nbsp(db_collation($db, $collations)) . "</a>";
|
||||
echo "<td align='right'><a href='$root&schema=' id='tables-" . h($db) . "'>?</a>";
|
||||
$collation = nbsp(db_collation($db, $collations));
|
||||
echo "<td>" . (support("database") ? "<a href='$root" . ($scheme ? "&ns=" : "") . "&database=' title='" . lang('Alter database') . "'>$collation</a>" : $collation);
|
||||
echo "<td align='right'><a href='$root&schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>" . ($_GET["dbsize"] ? $tables : "?") . "</a>";
|
||||
echo "<td align='right' id='size-" . h($db) . "'>" . ($_GET["dbsize"] ? db_size($db) : "?");
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<p><input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm("formChecked(this, /db/)", 1) . ">\n"; // 1 - eventStop
|
||||
echo (support("database")
|
||||
? "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>\n"
|
||||
. "<input type='hidden' name='all' value='' onclick=\"selectCount('selected', formChecked(this, /^db/));\">\n" // used by trCheck()
|
||||
. "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n"
|
||||
. "</div></fieldset>\n"
|
||||
: ""
|
||||
);
|
||||
echo "<script type='text/javascript'>tableCheck();</script>\n";
|
||||
echo "<input type='hidden' name='token' value='$token'>\n";
|
||||
echo "<a href='" . h(ME) . "refresh=1' onclick='eventStop(event);'>" . lang('Refresh') . "</a>\n";
|
||||
echo "</form>\n";
|
||||
}
|
||||
}
|
||||
|
||||
page_footer("db");
|
||||
if ($databases) {
|
||||
echo "<script type='text/javascript'>ajaxSetHtml('" . js_escape(ME) . "script=connect');</script>\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET["status"])) {
|
||||
$_GET["variables"] = $_GET["status"];
|
||||
}
|
||||
if (!(DB != "" ? $connection->select_db(DB) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]) || isset($_GET["variables"]) || $_GET["script"] == "connect")) {
|
||||
if (DB != "") {
|
||||
if (isset($_GET["import"])) {
|
||||
$_GET["sql"] = $_GET["import"];
|
||||
}
|
||||
|
||||
if (!(DB != "" ? $connection->select_db(DB) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]) || isset($_GET["variables"]) || $_GET["script"] == "connect" || $_GET["script"] == "kill")) {
|
||||
if (DB != "" || $_GET["refresh"]) {
|
||||
restart_session();
|
||||
set_session("dbs", null);
|
||||
}
|
||||
connect_error(); // separate function to catch SQLite error
|
||||
@@ -70,6 +90,7 @@ if (support("scheme") && DB != "" && $_GET["ns"] !== "") {
|
||||
redirect(preg_replace('~ns=[^&]*&~', '', ME) . "ns=" . get_schema());
|
||||
}
|
||||
if (!set_schema($_GET["ns"])) {
|
||||
header("HTTP/1.1 404 Not Found");
|
||||
page_header(lang('Schema') . ": " . h($_GET["ns"]), lang('Invalid schema.'), true);
|
||||
page_footer("ns");
|
||||
exit;
|
||||
|
||||
@@ -2,54 +2,52 @@
|
||||
/** Print HTML header
|
||||
* @param string used in title, breadcrumb and heading, should be HTML escaped
|
||||
* @param string
|
||||
* @param mixed array("key" => "link=desc", "key2" => array("link", "desc")), null for nothing, false for driver only, true for driver and server
|
||||
* @param string used after colon in title and heading, will be HTML escaped
|
||||
* @param mixed array("key" => "link", "key2" => array("link", "desc")), null for nothing, false for driver only, true for driver and server
|
||||
* @param string used after colon in title and heading, should be HTML escaped
|
||||
* @return null
|
||||
*/
|
||||
function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||
global $LANG, $adminer, $connection, $drivers;
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
if ($adminer->headers()) {
|
||||
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
|
||||
global $LANG, $VERSION, $adminer, $drivers, $jush;
|
||||
page_headers();
|
||||
if (is_ajax() && $error) {
|
||||
page_messages($error);
|
||||
exit;
|
||||
}
|
||||
$title_all = $title . ($title2 != "" ? ": " . h($title2) : "");
|
||||
$title_all = $title . ($title2 != "" ? ": $title2" : "");
|
||||
$title_page = strip_tags($title_all . (SERVER != "" && SERVER != "localhost" ? h(" - " . SERVER) : "") . " - " . $adminer->name());
|
||||
if (is_ajax()) {
|
||||
header("X-AJAX-Title: " . rawurlencode($title_page));
|
||||
} else {
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<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-Script-Type" content="text/javascript">
|
||||
<meta name="robots" content="noindex">
|
||||
<meta name="referrer" content="origin-when-crossorigin">
|
||||
<title><?php echo $title_page; ?></title>
|
||||
<link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
|
||||
<script type="text/javascript">
|
||||
var areYouSure = '<?php echo lang('Resend POST data?'); ?>';
|
||||
</script>
|
||||
<script type="text/javascript" src="../adminer/static/functions.js"></script>
|
||||
<script type="text/javascript" src="static/editing.js"></script>
|
||||
<?php if ($adminer->head()) { ?>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico" id="favicon">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico">
|
||||
<link rel="apple-touch-icon" href="../adminer/static/favicon.ico">
|
||||
<?php if (file_exists("adminer.css")) { ?>
|
||||
<link rel="stylesheet" type="text/css" href="adminer.css">
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<body class="<?php echo lang('ltr'); ?> nojs"<?php echo ($_POST ? "" : " onclick=\"return bodyClick(event, '" . h(js_escape(DB) . "', '" . js_escape($_GET["ns"])) . "');\""); // avoid re-post confirmation after refreshing the next page in Google Chrome ?> onkeydown="bodyKeydown(event);" onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion();"); ?>">
|
||||
<body class="<?php echo lang('ltr'); ?> nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);"<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " onload=\"verifyVersion('$VERSION');\""); ?>>
|
||||
<script type="text/javascript">
|
||||
document.body.className = document.body.className.replace(/(^|\s)nojs(\s|$)/, '$1js$2');
|
||||
document.body.className = document.body.className.replace(/ nojs/, ' js');
|
||||
var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
|
||||
</script>
|
||||
|
||||
<div id="help" class="jush-<?php echo $jush; ?> jsonly hidden" onmouseover="helpOpen = 1;" onmouseout="helpMouseout(this, event);"></div>
|
||||
|
||||
<div id="content">
|
||||
<?php
|
||||
}
|
||||
if (isset($breadcrumb)) {
|
||||
$link = substr(preg_replace('~(username|db|ns)=[^&]*&~', '', ME), 0, -1);
|
||||
if ($breadcrumb !== null) {
|
||||
$link = substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1);
|
||||
echo '<p id="breadcrumb"><a href="' . h($link ? $link : ".") . '">' . $drivers[DRIVER] . '</a> » ';
|
||||
$link = substr(preg_replace('~(db|ns)=[^&]*&~', '', ME), 0, -1);
|
||||
$link = substr(preg_replace('~\b(db|ns)=[^&]*&~', '', ME), 0, -1);
|
||||
$server = (SERVER != "" ? h(SERVER) : lang('Server'));
|
||||
if ($breadcrumb === false) {
|
||||
echo "$server\n";
|
||||
@@ -63,32 +61,54 @@ document.body.className = document.body.className.replace(/(^|\s)nojs(\s|$)/, '$
|
||||
echo '<a href="' . h(substr(ME, 0, -1)) . '">' . h($_GET["ns"]) . '</a> » ';
|
||||
}
|
||||
foreach ($breadcrumb as $key => $val) {
|
||||
$desc = (is_array($val) ? $val[1] : $val);
|
||||
$desc = (is_array($val) ? $val[1] : h($val));
|
||||
if ($desc != "") {
|
||||
echo '<a href="' . h(ME . "$key=") . urlencode(is_array($val) ? $val[0] : $val) . '">' . h($desc) . '</a> » ';
|
||||
echo "<a href='" . h(ME . "$key=") . urlencode(is_array($val) ? $val[0] : $val) . "'>$desc</a> » ";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "$title\n";
|
||||
}
|
||||
}
|
||||
echo "<span id='loader'></span>\n";
|
||||
echo "<h2>$title_all</h2>\n";
|
||||
echo "<div id='ajaxstatus' class='jsonly hidden'></div>\n";
|
||||
restart_session();
|
||||
page_messages($error);
|
||||
$databases = &get_session("dbs");
|
||||
if (DB != "" && $databases && !in_array(DB, $databases, true)) {
|
||||
$databases = null;
|
||||
}
|
||||
stop_session();
|
||||
define("PAGE_HEADER", 1);
|
||||
}
|
||||
|
||||
/** Send HTTP headers
|
||||
* @return null
|
||||
*/
|
||||
function page_headers() {
|
||||
global $adminer;
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
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-XSS-Protection: 0"); // prevents introducing XSS in IE8 by removing safe parts of the page
|
||||
}
|
||||
}
|
||||
|
||||
/** Print flash and error messages
|
||||
* @param string
|
||||
* @return null
|
||||
*/
|
||||
function page_messages($error) {
|
||||
$uri = preg_replace('~^[^?]*~', '', $_SERVER["REQUEST_URI"]);
|
||||
$messages = $_SESSION["messages"][$uri];
|
||||
if ($messages) {
|
||||
echo "<div class='message'>" . implode("</div>\n<div class='message'>", $messages) . "</div>\n";
|
||||
unset($_SESSION["messages"][$uri]);
|
||||
}
|
||||
$databases = &get_session("dbs");
|
||||
if (DB != "" && $databases && !in_array(DB, $databases, true)) {
|
||||
$databases = null;
|
||||
}
|
||||
if ($error) {
|
||||
echo "<div class='error'>$error</div>\n";
|
||||
}
|
||||
define("PAGE_HEADER", 1);
|
||||
}
|
||||
|
||||
/** Print HTML footer
|
||||
@@ -96,15 +116,22 @@ document.body.className = document.body.className.replace(/(^|\s)nojs(\s|$)/, '$
|
||||
* @return null
|
||||
*/
|
||||
function page_footer($missing = "") {
|
||||
global $adminer;
|
||||
if (!is_ajax()) {
|
||||
?>
|
||||
global $adminer, $token;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php switch_lang(); ?>
|
||||
<?php if ($missing != "auth") { ?>
|
||||
<form action="" method="post">
|
||||
<p class="logout">
|
||||
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" id="logout">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
</p>
|
||||
</form>
|
||||
<?php } ?>
|
||||
<div id="menu">
|
||||
<?php $adminer->navigation($missing); ?>
|
||||
</div>
|
||||
<script type="text/javascript">setupSubmitHighlight(document);</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
110
adminer/include/driver.inc.php
Normal file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
|
||||
/*abstract*/ class Min_SQL {
|
||||
var $_conn;
|
||||
|
||||
/** Create object for performing database operations
|
||||
* @param Min_DB
|
||||
*/
|
||||
function Min_SQL($connection) {
|
||||
$this->_conn = $connection;
|
||||
}
|
||||
|
||||
/** Select data from table
|
||||
* @param string
|
||||
* @param array result of $adminer->selectColumnsProcess()[0]
|
||||
* @param array result of $adminer->selectSearchProcess()
|
||||
* @param array result of $adminer->selectColumnsProcess()[1]
|
||||
* @param array result of $adminer->selectOrderProcess()
|
||||
* @param int result of $adminer->selectLimitProcess()
|
||||
* @param int index of page starting at zero
|
||||
* @param bool whether to print the query
|
||||
* @return Min_Result
|
||||
*/
|
||||
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
|
||||
global $adminer, $jush;
|
||||
$is_group = (count($group) < count($select));
|
||||
$query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page);
|
||||
if (!$query) {
|
||||
$query = "SELECT" . limit(
|
||||
($_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) : ""),
|
||||
($limit != "" ? +$limit : null),
|
||||
($page ? $limit * $page : 0),
|
||||
"\n"
|
||||
);
|
||||
}
|
||||
$start = microtime(true);
|
||||
$return = $this->_conn->query($query);
|
||||
if ($print) {
|
||||
echo $adminer->selectQuery($query, format_time($start));
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/** Delete data from table
|
||||
* @param string
|
||||
* @param string " WHERE ..."
|
||||
* @param int 0 or 1
|
||||
* @return bool
|
||||
*/
|
||||
function delete($table, $queryWhere, $limit = 0) {
|
||||
$query = "FROM " . table($table);
|
||||
return queries("DELETE" . ($limit ? limit1($query, $queryWhere) : " $query$queryWhere"));
|
||||
}
|
||||
|
||||
/** Update data in table
|
||||
* @param string
|
||||
* @param array escaped columns in keys, quoted data in values
|
||||
* @param string " WHERE ..."
|
||||
* @param int 0 or 1
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
function update($table, $set, $queryWhere, $limit = 0, $separator = "\n") {
|
||||
$values = array();
|
||||
foreach ($set as $key => $val) {
|
||||
$values[] = "$key = $val";
|
||||
}
|
||||
$query = table($table) . " SET$separator" . implode(",$separator", $values);
|
||||
return queries("UPDATE" . ($limit ? limit1($query, $queryWhere) : " $query$queryWhere"));
|
||||
}
|
||||
|
||||
/** Insert data into table
|
||||
* @param string
|
||||
* @param array escaped columns in keys, quoted data in values
|
||||
* @return bool
|
||||
*/
|
||||
function insert($table, $set) {
|
||||
return queries("INSERT INTO " . table($table) . ($set
|
||||
? " (" . implode(", ", array_keys($set)) . ")\nVALUES (" . implode(", ", $set) . ")"
|
||||
: " DEFAULT VALUES"
|
||||
));
|
||||
}
|
||||
|
||||
/** Insert or update data in table
|
||||
* @param string
|
||||
* @param array
|
||||
* @param array of arrays with escaped columns in keys and quoted data in values
|
||||
* @return bool
|
||||
*/
|
||||
/*abstract*/ function insertUpdate($table, $rows, $primary) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Begin transaction
|
||||
* @return bool
|
||||
*/
|
||||
function begin() {
|
||||
return queries("BEGIN");
|
||||
}
|
||||
|
||||
function commit() {
|
||||
return queries("COMMIT");
|
||||
}
|
||||
|
||||
function rollback() {
|
||||
return queries("ROLLBACK");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,17 +2,20 @@
|
||||
/** Print select result
|
||||
* @param Min_Result
|
||||
* @param Min_DB connection to examine indexes
|
||||
* @param string base link for <th> fields
|
||||
* @return null
|
||||
* @param array
|
||||
* @param int
|
||||
* @return array $orgtables
|
||||
*/
|
||||
function select($result, $connection2 = null, $href = "") {
|
||||
function select($result, $connection2 = null, $orgtables = array(), $limit = 0) {
|
||||
global $jush;
|
||||
$links = array(); // colno => orgtable - create links from these columns
|
||||
$indexes = array(); // orgtable => array(column => colno) - primary keys
|
||||
$columns = array(); // orgtable => array(column => ) - not selected columns in primary key
|
||||
$blobs = array(); // colno => bool - display bytes for blobs
|
||||
$types = array(); // colno => type - display char in <code>
|
||||
$return = array(); // table => orgtable - mapping to use in EXPLAIN
|
||||
odd(''); // reset odd for each result
|
||||
for ($i=0; $row = $result->fetch_row(); $i++) {
|
||||
for ($i=0; (!$limit || $i < $limit) && ($row = $result->fetch_row()); $i++) {
|
||||
if (!$i) {
|
||||
echo "<table cellspacing='0' class='nowrap'>\n";
|
||||
echo "<thead><tr>";
|
||||
@@ -21,7 +24,8 @@ function select($result, $connection2 = null, $href = "") {
|
||||
$name = $field->name;
|
||||
$orgtable = $field->orgtable;
|
||||
$orgname = $field->orgname;
|
||||
if ($href) { // MySQL EXPLAIN
|
||||
$return[$field->table] = $orgtable;
|
||||
if ($orgtables && $jush == "sql") { // MySQL EXPLAIN
|
||||
$links[$j] = ($name == "table" ? "table=" : ($name == "possible_keys" ? "indexes=" : null));
|
||||
} elseif ($orgtable != "") {
|
||||
if (!isset($indexes[$orgtable])) {
|
||||
@@ -45,14 +49,15 @@ function select($result, $connection2 = null, $href = "") {
|
||||
$blobs[$j] = true;
|
||||
}
|
||||
$types[$j] = $field->type;
|
||||
$name = h($name);
|
||||
echo "<th" . ($orgtable != "" || $field->name != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . ($href ? "<a href='$href" . strtolower($name) . "' target='_blank' rel='noreferrer'>$name</a>" : $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))) : "")
|
||||
;
|
||||
}
|
||||
echo "</thead>\n";
|
||||
}
|
||||
echo "<tr" . odd() . ">";
|
||||
foreach ($row as $key => $val) {
|
||||
if (!isset($val)) {
|
||||
if ($val === null) {
|
||||
$val = "<i>NULL</i>";
|
||||
} elseif ($blobs[$key] && !is_utf8($val)) {
|
||||
$val = "<i>" . lang('%d byte(s)', strlen($val)) . "</i>"; //! link to download
|
||||
@@ -65,8 +70,9 @@ function select($result, $connection2 = null, $href = "") {
|
||||
}
|
||||
}
|
||||
if (isset($links[$key]) && !$columns[$links[$key]]) {
|
||||
if ($href) { // MySQL EXPLAIN
|
||||
$link = $links[$key] . urlencode($row[array_search("table=", $links)]);
|
||||
if ($orgtables && $jush == "sql") { // MySQL EXPLAIN
|
||||
$table = $row[array_search("table=", $links)];
|
||||
$link = $links[$key] . urlencode($orgtables[$table] != "" ? $orgtables[$table] : $table);
|
||||
} else {
|
||||
$link = "edit=" . urlencode($links[$key]);
|
||||
foreach ($indexes[$links[$key]] as $col => $j) {
|
||||
@@ -79,6 +85,7 @@ function select($result, $connection2 = null, $href = "") {
|
||||
}
|
||||
}
|
||||
echo ($i ? "</table>" : "<p class='message'>" . lang('No rows.')) . "\n";
|
||||
return $return;
|
||||
}
|
||||
|
||||
/** Get referencable tables with single column primary key except self
|
||||
@@ -87,7 +94,7 @@ function select($result, $connection2 = null, $href = "") {
|
||||
*/
|
||||
function referencable_primary($self) {
|
||||
$return = array(); // table_name => field
|
||||
foreach (table_status() as $table_name => $table) {
|
||||
foreach (table_status('', true) as $table_name => $table) {
|
||||
if ($table_name != $self && fk_support($table)) {
|
||||
foreach (fields($table_name) as $field) {
|
||||
if ($field["primary"]) {
|
||||
@@ -105,16 +112,17 @@ function referencable_primary($self) {
|
||||
|
||||
/** Print SQL <textarea> tag
|
||||
* @param string
|
||||
* @param string or array in which case [0] of every element is used
|
||||
* @param int
|
||||
* @param int
|
||||
* @param string
|
||||
* @return null
|
||||
*/
|
||||
function textarea($name, $value, $rows = 10, $cols = 80) {
|
||||
echo "<textarea name='$name' rows='$rows' cols='$cols' class='sqlarea' spellcheck='false' wrap='off' onkeydown='return textareaKeydown(this, event);'>"; // spellcheck, wrap - not valid before HTML5
|
||||
global $jush;
|
||||
echo "<textarea name='$name' rows='$rows' cols='$cols' class='sqlarea jush-$jush' spellcheck='false' wrap='off'>";
|
||||
if (is_array($value)) {
|
||||
foreach ($value as $val) { // not implode() to save memory
|
||||
echo h($val) . "\n\n\n";
|
||||
echo h($val[0]) . "\n\n\n"; // $val == array($query, $time, $elapsed)
|
||||
}
|
||||
} else {
|
||||
echo h($value);
|
||||
@@ -122,15 +130,6 @@ function textarea($name, $value, $rows = 10, $cols = 80) {
|
||||
echo "</textarea>";
|
||||
}
|
||||
|
||||
/** Format time difference
|
||||
* @param string output of microtime()
|
||||
* @param string output of microtime()
|
||||
* @return string HTML code
|
||||
*/
|
||||
function format_time($start, $end) {
|
||||
return " <span class='time'>(" . lang('%.3f s', max(0, array_sum(explode(" ", $end)) - array_sum(explode(" ", $start)))) . ")</span>";
|
||||
}
|
||||
|
||||
/** Print table columns for type edit
|
||||
* @param string
|
||||
* @param array
|
||||
@@ -140,12 +139,22 @@ function format_time($start, $end) {
|
||||
*/
|
||||
function edit_type($key, $field, $collations, $foreign_keys = array()) {
|
||||
global $structured_types, $types, $unsigned, $on_actions;
|
||||
$type = $field["type"];
|
||||
?>
|
||||
<td><select name="<?php echo $key; ?>[type]" class="type" onfocus="lastType = selectValue(this);" onchange="editingTypeChange(this);"><?php echo optionlist((!$field["type"] || isset($types[$field["type"]]) ? array() : array($field["type"])) + $structured_types + ($foreign_keys ? array(lang('Foreign keys') => $foreign_keys) : array()), $field["type"]); ?></select>
|
||||
<td><input name="<?php echo $key; ?>[length]" value="<?php echo h($field["length"]); ?>" size="3" onfocus="editingLengthFocus(this);"><td class="options"><?php
|
||||
echo "<select name='$key" . "[collation]'" . (ereg('(char|text|enum|set)$', $field["type"]) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>';
|
||||
echo ($unsigned ? "<select name='$key" . "[unsigned]'" . (!$field["type"] || ereg('(int|float|double|decimal)$', $field["type"]) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : '');
|
||||
echo ($foreign_keys ? "<select name='$key" . "[on_delete]'" . (ereg("`", $field["type"]) ? "" : " class='hidden'") . "><option value=''>(" . lang('ON DELETE') . ")" . optionlist(explode("|", $on_actions), $field["on_delete"]) . "</select> " : " "); // space for IE
|
||||
<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
|
||||
if ($type && !isset($types[$type]) && !isset($foreign_keys[$type])) {
|
||||
array_unshift($structured_types, $type);
|
||||
}
|
||||
if ($foreign_keys) {
|
||||
$structured_types[lang('Foreign keys')] = $foreign_keys;
|
||||
}
|
||||
echo optionlist($structured_types, $type);
|
||||
?></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
|
||||
echo "<select name='$key" . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>';
|
||||
echo ($unsigned ? "<select name='$key" . "[unsigned]'" . (!$type || preg_match('~((^|[^o])int|float|double|decimal)$~', $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : '');
|
||||
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 ($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
|
||||
}
|
||||
|
||||
/** Filter length value including enums
|
||||
@@ -154,7 +163,10 @@ function edit_type($key, $field, $collations, $foreign_keys = array()) {
|
||||
*/
|
||||
function process_length($length) {
|
||||
global $enum_length;
|
||||
return (preg_match("~^\\s*(?:$enum_length)(?:\\s*,\\s*(?:$enum_length))*\\s*\$~", $length) && preg_match_all("~$enum_length~", $length, $matches) ? implode(",", $matches[0]) : preg_replace('~[^0-9,+-]~', '', $length));
|
||||
return (preg_match("~^\\s*\\(?\\s*$enum_length(?:\\s*,\\s*$enum_length)*+\\s*\\)?\\s*\$~", $length) && preg_match_all("~$enum_length~", $length, $matches)
|
||||
? "(" . implode(",", $matches[0]) . ")"
|
||||
: preg_replace('~^[0-9].*~', '(\0)', preg_replace('~[^-0-9,+()[\]]~', '', $length))
|
||||
);
|
||||
}
|
||||
|
||||
/** Create SQL string from field type
|
||||
@@ -165,9 +177,9 @@ function process_length($length) {
|
||||
function process_type($field, $collate = "COLLATE") {
|
||||
global $unsigned;
|
||||
return " $field[type]"
|
||||
. ($field["length"] != "" ? "(" . process_length($field["length"]) . ")" : "")
|
||||
. (ereg('int|float|double|decimal', $field["type"]) && in_array($field["unsigned"], $unsigned) ? " $field[unsigned]" : "")
|
||||
. (ereg('char|text|enum|set', $field["type"]) && $field["collation"] ? " $collate " . q($field["collation"]) : "")
|
||||
. process_length($field["length"])
|
||||
. (preg_match('~(^|[^o])int|float|double|decimal~', $field["type"]) && in_array($field["unsigned"], $unsigned) ? " $field[unsigned]" : "")
|
||||
. (preg_match('~char|text|enum|set~', $field["type"]) && $field["collation"] ? " $collate " . q($field["collation"]) : "")
|
||||
;
|
||||
}
|
||||
|
||||
@@ -177,12 +189,19 @@ function process_type($field, $collate = "COLLATE") {
|
||||
* @return array array("field", "type", "NULL", "DEFAULT", "ON UPDATE", "COMMENT", "AUTO_INCREMENT")
|
||||
*/
|
||||
function process_field($field, $type_field) {
|
||||
global $jush;
|
||||
$default = $field["default"];
|
||||
return array(
|
||||
idf_escape($field["field"]),
|
||||
idf_escape(trim($field["field"])),
|
||||
process_type($type_field),
|
||||
($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp
|
||||
(isset($field["default"]) ? " DEFAULT " . (($field["type"] == "timestamp" && eregi('^CURRENT_TIMESTAMP$', $field["default"])) || ($field["type"] == "bit" && ereg("^([0-9]+|b'[0-1]+')\$", $field["default"])) ? $field["default"] : q($field["default"])) : ""),
|
||||
($field["on_update"] ? " ON UPDATE $field[on_update]" : ""),
|
||||
(isset($default) ? " DEFAULT " . (
|
||||
(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]" : ""),
|
||||
(support("comment") && $field["comment"] != "" ? " COMMENT " . q($field["comment"]) : ""),
|
||||
($field["auto_increment"] ? auto_increment() : null),
|
||||
);
|
||||
@@ -199,7 +218,7 @@ function type_class($type) {
|
||||
'binary' => 'blob',
|
||||
'enum' => 'set',
|
||||
) as $key => $val) {
|
||||
if (ereg("$key|$val", $type)) {
|
||||
if (preg_match("~$key|$val~", $type)) {
|
||||
return " class='$key'";
|
||||
}
|
||||
}
|
||||
@@ -209,13 +228,13 @@ function type_class($type) {
|
||||
* @param array
|
||||
* @param array
|
||||
* @param string TABLE or PROCEDURE
|
||||
* @param int number of fields allowed by Suhosin
|
||||
* @param array returned by referencable_primary()
|
||||
* @param bool display comments column
|
||||
* @return null
|
||||
*/
|
||||
function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $foreign_keys = array(), $comments = false) {
|
||||
global $inout;
|
||||
function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = array(), $comments = false) {
|
||||
global $connection, $inout;
|
||||
$fields = array_values($fields);
|
||||
?>
|
||||
<thead><tr class="wrap">
|
||||
<?php if ($type == "PROCEDURE") { ?><td> <?php } ?>
|
||||
@@ -225,11 +244,16 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
|
||||
<td><?php echo lang('Options'); ?>
|
||||
<?php if ($type == "TABLE") { ?>
|
||||
<td>NULL
|
||||
<td><input type="radio" name="auto_increment_col" value=""><acronym title="<?php echo lang('Auto Increment'); ?>">AI</acronym>
|
||||
<td<?php echo ($_POST["defaults"] ? "" : " class='hidden'"); ?>><?php echo lang('Default values'); ?>
|
||||
<td><input type="radio" name="auto_increment_col" value=""><acronym title="<?php echo lang('Auto Increment'); ?>">AI</acronym><?php echo doc_link(array(
|
||||
'sql' => "example-auto-increment.html",
|
||||
'sqlite' => "autoinc.html",
|
||||
'pgsql' => "datatype.html#DATATYPE-SERIAL",
|
||||
'mssql' => "ms186775.aspx",
|
||||
)); ?>
|
||||
<td><?php echo lang('Default value'); ?>
|
||||
<?php echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?>
|
||||
<?php } ?>
|
||||
<td><?php echo "<input type='image' 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 type="text/javascript">row_count = <?php echo count($fields); ?>;</script>
|
||||
</thead>
|
||||
<tbody onkeydown="return editingKeydown(event);">
|
||||
<?php
|
||||
@@ -240,29 +264,30 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
|
||||
?>
|
||||
<tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
|
||||
<?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="<?php echo ($field["field"] != "" || count($fields) > 1 ? "" : "editingAddRow(this, $allowed); "); ?>editingNameChange(this);" maxlength="64"><?php } ?><input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>">
|
||||
<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 } ?>
|
||||
<input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>">
|
||||
<?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
|
||||
<?php if ($type == "TABLE") { ?>
|
||||
<td><?php echo checkbox("fields[$i][null]", 1, $field["null"]); ?>
|
||||
<td><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(); }">
|
||||
<td<?php echo ($_POST["defaults"] ? "" : " class='hidden'"); ?>><?php echo checkbox("fields[$i][has_default]", 1, $field["has_default"]); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" onchange="this.previousSibling.checked = true;">
|
||||
<?php echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . "><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' maxlength='255'>" : ""); ?>
|
||||
<td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block"); ?>
|
||||
<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
|
||||
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;">
|
||||
<?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) . "'>" : ""); ?>
|
||||
<?php } ?>
|
||||
<?php
|
||||
echo "<td>";
|
||||
echo (support("move_col") ?
|
||||
"<input type='image' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, $allowed, 1);'> "
|
||||
. "<input type='image' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'> "
|
||||
. "<input type='image' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'> "
|
||||
"<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, 1);'> "
|
||||
. "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'> "
|
||||
. "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'> "
|
||||
: "");
|
||||
echo ($orig == "" || support("drop_col") ? "<input type='image' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick='return !editingRemoveRow(this);'>" : "");
|
||||
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 "\n";
|
||||
}
|
||||
}
|
||||
|
||||
/** Move fields up and down or add field
|
||||
* @param array
|
||||
* @return null
|
||||
* @return bool
|
||||
*/
|
||||
function process_fields(&$fields) {
|
||||
ksort($fields);
|
||||
@@ -280,8 +305,7 @@ function process_fields(&$fields) {
|
||||
}
|
||||
$offset++;
|
||||
}
|
||||
}
|
||||
if ($_POST["down"]) {
|
||||
} elseif ($_POST["down"]) {
|
||||
$found = false;
|
||||
foreach ($fields as $key => $field) {
|
||||
if (isset($field["field"]) && $found) {
|
||||
@@ -294,11 +318,13 @@ function process_fields(&$fields) {
|
||||
}
|
||||
$offset++;
|
||||
}
|
||||
}
|
||||
$fields = array_values($fields);
|
||||
if ($_POST["add"]) {
|
||||
} elseif ($_POST["add"]) {
|
||||
$fields = array_values($fields);
|
||||
array_splice($fields, key($_POST["add"]), 0, array(array()));
|
||||
} elseif (!$_POST["drop_col"]) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Callback used in routine()
|
||||
@@ -331,38 +357,183 @@ function grant($grant, $privileges, $columns, $on) {
|
||||
}
|
||||
|
||||
/** Drop old object and create a new one
|
||||
* @param string drop query
|
||||
* @param string create query
|
||||
* @param string drop old object query
|
||||
* @param string create new object query
|
||||
* @param string drop new object query
|
||||
* @param string create test object query
|
||||
* @param string drop test object query
|
||||
* @param string
|
||||
* @param string
|
||||
* @param string
|
||||
* @param string
|
||||
* @param string
|
||||
* @return bool dropped
|
||||
* @param string
|
||||
* @return null redirect in success
|
||||
*/
|
||||
function drop_create($drop, $create, $location, $message_drop, $message_alter, $message_create, $name) {
|
||||
function drop_create($drop, $create, $drop_created, $test, $drop_test, $location, $message_drop, $message_alter, $message_create, $old_name, $new_name) {
|
||||
if ($_POST["drop"]) {
|
||||
return query_redirect($drop, $location, $message_drop, true, !$_POST["dropped"]);
|
||||
query_redirect($drop, $location, $message_drop);
|
||||
} elseif ($old_name == "") {
|
||||
query_redirect($create, $location, $message_create);
|
||||
} elseif ($old_name != $new_name) {
|
||||
$created = queries($create);
|
||||
queries_redirect($location, $message_alter, $created && queries($drop));
|
||||
if ($created) {
|
||||
queries($drop_created);
|
||||
}
|
||||
} else {
|
||||
queries_redirect(
|
||||
$location,
|
||||
$message_alter,
|
||||
queries($test) && queries($drop_test) && queries($drop) && queries($create)
|
||||
);
|
||||
}
|
||||
$dropped = $name != "" && ($_POST["dropped"] || queries($drop));
|
||||
$created = queries($create);
|
||||
if (!queries_redirect($location, ($name != "" ? $message_alter : $message_create), $created) && $dropped) {
|
||||
redirect(null, $message_drop);
|
||||
}
|
||||
return $dropped;
|
||||
}
|
||||
|
||||
/** Get string to add a file in TAR
|
||||
/** Generate SQL query for creating trigger
|
||||
* @param string
|
||||
* @param array result of trigger()
|
||||
* @return string
|
||||
*/
|
||||
function create_trigger($on, $row) {
|
||||
global $jush;
|
||||
$timing_event = " $row[Timing] $row[Event]" . ($row["Event"] == "UPDATE OF" ? " " . idf_escape($row["Of"]) : "");
|
||||
return "CREATE TRIGGER "
|
||||
. idf_escape($row["Trigger"])
|
||||
. ($jush == "mssql" ? $on . $timing_event : $timing_event . $on)
|
||||
. rtrim(" $row[Type]\n$row[Statement]", ";")
|
||||
. ";"
|
||||
;
|
||||
}
|
||||
|
||||
/** Generate SQL query for creating routine
|
||||
* @param string "PROCEDURE" or "FUNCTION"
|
||||
* @param array result of routine()
|
||||
* @return string
|
||||
*/
|
||||
function create_routine($routine, $row) {
|
||||
global $inout;
|
||||
$set = array();
|
||||
$fields = (array) $row["fields"];
|
||||
ksort($fields); // enforce fields order
|
||||
foreach ($fields as $field) {
|
||||
if ($field["field"] != "") {
|
||||
$set[] = (preg_match("~^($inout)\$~", $field["inout"]) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
|
||||
}
|
||||
}
|
||||
return "CREATE $routine "
|
||||
. idf_escape(trim($row["name"]))
|
||||
. " (" . implode(", ", $set) . ")"
|
||||
. (isset($_GET["function"]) ? " RETURNS" . process_type($row["returns"], "CHARACTER SET") : "")
|
||||
. ($row["language"] ? " LANGUAGE $row[language]" : "")
|
||||
. rtrim("\n$row[definition]", ";")
|
||||
. ";"
|
||||
;
|
||||
}
|
||||
|
||||
/** Remove current user definer from SQL command
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function remove_definer($query) {
|
||||
return preg_replace('~^([A-Z =]+) DEFINER=`' . preg_replace('~@(.*)~', '`@`(%|\\1)', logged_user()) . '`~', '\\1', $query); //! proper escaping of user
|
||||
}
|
||||
|
||||
/** Format foreign key to use in SQL query
|
||||
* @param array ("table" => string, "source" => array, "target" => array, "on_delete" => one of $on_actions, "on_update" => one of $on_actions)
|
||||
* @return string
|
||||
*/
|
||||
function format_foreign_key($foreign_key) {
|
||||
global $on_actions;
|
||||
return " FOREIGN KEY (" . implode(", ", array_map('idf_escape', $foreign_key["source"])) . ") REFERENCES " . table($foreign_key["table"])
|
||||
. " (" . implode(", ", array_map('idf_escape', $foreign_key["target"])) . ")" //! reuse $name - check in older MySQL versions
|
||||
. (preg_match("~^($on_actions)\$~", $foreign_key["on_delete"]) ? " ON DELETE $foreign_key[on_delete]" : "")
|
||||
. (preg_match("~^($on_actions)\$~", $foreign_key["on_update"]) ? " ON UPDATE $foreign_key[on_update]" : "")
|
||||
;
|
||||
}
|
||||
|
||||
/** Add a file to TAR
|
||||
* @param string
|
||||
* @param TmpFile
|
||||
* @return null prints the output
|
||||
*/
|
||||
function tar_file($filename, $tmp_file) {
|
||||
$return = pack("a100a8a8a8a12a12", $filename, 644, 0, 0, decoct($tmp_file->size), decoct(time()));
|
||||
$checksum = 8*32; // space for checksum itself
|
||||
for ($i=0; $i < strlen($return); $i++) {
|
||||
$checksum += ord($return[$i]);
|
||||
}
|
||||
$return .= sprintf("%06o", $checksum) . "\0 ";
|
||||
echo $return;
|
||||
echo str_repeat("\0", 512 - strlen($return));
|
||||
$tmp_file->send();
|
||||
echo str_repeat("\0", 511 - ($tmp_file->size + 511) % 512);
|
||||
}
|
||||
|
||||
/** Get INI bytes value
|
||||
* @param string
|
||||
* @return int
|
||||
*/
|
||||
function ini_bytes($ini) {
|
||||
$val = ini_get($ini);
|
||||
switch (strtolower(substr($val, -1))) {
|
||||
case 'g': $val *= 1024; // no break
|
||||
case 'm': $val *= 1024; // no break
|
||||
case 'k': $val *= 1024;
|
||||
}
|
||||
return $val;
|
||||
}
|
||||
|
||||
/** Create link to database documentation
|
||||
* @param array $jush => $path
|
||||
* @return string HTML code
|
||||
*/
|
||||
function doc_link($paths) {
|
||||
global $jush, $connection;
|
||||
$urls = array(
|
||||
'sql' => "http://dev.mysql.com/doc/refman/" . substr($connection->server_info, 0, 3) . "/en/",
|
||||
'sqlite' => "http://www.sqlite.org/",
|
||||
'pgsql' => "http://www.postgresql.org/docs/" . substr($connection->server_info, 0, 3) . "/static/",
|
||||
'mssql' => "http://msdn.microsoft.com/library/",
|
||||
'oracle' => "http://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>" : "");
|
||||
}
|
||||
|
||||
/** Wrap gzencode() for usage in ob_start()
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function tar_file($filename, $contents) {
|
||||
$return = pack("a100a8a8a8a12a12", $filename, 644, 0, 0, decoct(strlen($contents)), decoct(time()));
|
||||
$checksum = 8*32; // space for checksum itself
|
||||
for ($i=0; $i < strlen($return); $i++) {
|
||||
$checksum += ord($return{$i});
|
||||
}
|
||||
$return .= sprintf("%06o", $checksum) . "\0 ";
|
||||
return $return . str_repeat("\0", 512 - strlen($return)) . $contents . str_repeat("\0", 511 - (strlen($contents) + 511) % 512);
|
||||
function ob_gzencode($string) {
|
||||
// ob_start() callback recieves an optional parameter $phase but gzencode() accepts optional parameter $level
|
||||
return gzencode($string);
|
||||
}
|
||||
|
||||
/** Compute size of database
|
||||
* @param string
|
||||
* @return string formatted
|
||||
*/
|
||||
function db_size($db) {
|
||||
global $connection;
|
||||
if (!$connection->select_db($db)) {
|
||||
return "?";
|
||||
}
|
||||
$return = 0;
|
||||
foreach (table_status() as $table_status) {
|
||||
$return += $table_status["Data_length"] + $table_status["Index_length"];
|
||||
}
|
||||
return format_number($return);
|
||||
}
|
||||
|
||||
/** Print SET NAMES if utf8mb4 might be needed
|
||||
* @param string
|
||||
* @return null
|
||||
*/
|
||||
function set_utf8mb4($create) {
|
||||
global $connection;
|
||||
static $set = false;
|
||||
if (!$set && preg_match('~\butf8mb4~i', $create)) { // possible false positive
|
||||
$set = true;
|
||||
echo "SET NAMES " . charset($connection) . ";\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,28 +3,39 @@
|
||||
|
||||
$langs = array(
|
||||
'en' => 'English', // Jakub Vrána - http://www.vrana.cz
|
||||
'cs' => 'Čeština', // Jakub Vrána - http://www.vrana.cz
|
||||
'sk' => 'Slovenčina', // Ivan Suchy - http://www.ivansuchy.com, Juraj Krivda - http://www.jstudio.cz
|
||||
'nl' => 'Nederlands', // Maarten Balliauw - http://blog.maartenballiauw.be
|
||||
'es' => 'Español', // Klemens Häckel - http://clickdimension.wordpress.com
|
||||
'de' => 'Deutsch', // Klemens Häckel - http://clickdimension.wordpress.com
|
||||
'fr' => 'Français', // Francis Gagné, Aurélien Royer
|
||||
'it' => 'Italiano', // Alessandro Fiorotto, Paolo Asperti
|
||||
'et' => 'Eesti', // Priit Kallas
|
||||
'hu' => 'Magyar', // Borsos Szilárd (Borsosfi) - http://www.borsosfi.hu, info@borsosfi.hu
|
||||
'pl' => 'Polski', // Radosław Kowalewski - http://srsbiz.pl/
|
||||
'ar' => 'العربية', // Y.M Amine - Algeria - nbr7@live.fr
|
||||
'bn' => 'বাংলা', // Dipak Kumar - dipak.ndc@gmail.com
|
||||
'ca' => 'Català', // Joan Llosas
|
||||
'pt' => 'Português', // Gian Live - gian@live.com
|
||||
'sl' => 'Slovenski', // Matej Ferlan - www.itdinamik.com, matej.ferlan@itdinamik.com
|
||||
'cs' => 'Čeština', // Jakub Vrána - http://www.vrana.cz
|
||||
'da' => 'Dansk', // Jarne W. Beutnagel - jarne@beutnagel.dk
|
||||
'de' => 'Deutsch', // Klemens Häckel - http://clickdimension.wordpress.com
|
||||
'es' => 'Español', // Klemens Häckel - http://clickdimension.wordpress.com
|
||||
'et' => 'Eesti', // Priit Kallas
|
||||
'fa' => 'فارسی', // mojtaba barghbani - Iran - mbarghbani@gmail.com, Nima Amini - http://nimlog.com
|
||||
'fr' => 'Français', // Francis Gagné, Aurélien Royer
|
||||
'hu' => 'Magyar', // Borsos Szilárd (Borsosfi) - http://www.borsosfi.hu, info@borsosfi.hu
|
||||
'id' => 'Bahasa Indonesia', // Ivan Lanin - http://ivan.lanin.org
|
||||
'it' => 'Italiano', // Alessandro Fiorotto, Paolo Asperti
|
||||
'ja' => '日本語', // Hitoshi Ozawa - http://sourceforge.jp/projects/oss-ja-jpn/releases/
|
||||
'ko' => '한국어', // dalli - skcha67@gmail.com
|
||||
'lt' => 'Lietuvių', // Paulius Leščinskas - http://www.lescinskas.lt
|
||||
'tr' => 'Türkçe', // Bilgehan Korkmaz - turktron.com
|
||||
'nl' => 'Nederlands', // Maarten Balliauw - http://blog.maartenballiauw.be
|
||||
'no' => 'Norsk', // Iver Odin Kvello, mupublishing.com
|
||||
'pl' => 'Polski', // Radosław Kowalewski - http://srsbiz.pl/
|
||||
'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
|
||||
'ro' => 'Limba Română', // .nick .messing - dot.nick.dot.messing@gmail.com
|
||||
'ru' => 'Русский язык', // Maksim Izmaylov
|
||||
'zh' => '简体中文', // Mr. Lodar
|
||||
'zh-tw' => '繁體中文', // http://tzangms.com
|
||||
'ja' => '日本語', // Hitoshi Ozawa - http://sourceforge.jp/projects/oss-ja-jpn/releases/
|
||||
'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
|
||||
'sr' => 'Српски', // Nikola Radovanović - cobisimo@gmail.com
|
||||
'ta' => 'தமிழ்', // G. Sampath Kumar, Chennai, India, sampathkumar11@gmail.com
|
||||
'ar' => 'العربية', // Y.M Amine - Algeria - nbr7@live.fr
|
||||
'th' => 'ภาษาไทย', // Panya Saraphi, elect.tu@gmail.com - http://www.opencart2u.com/
|
||||
'tr' => 'Türkçe', // Bilgehan Korkmaz - turktron.com
|
||||
'uk' => 'Українська', // Valerii Kryzhov
|
||||
'vi' => 'Tiếng Việt', // Giang Manh @ manhgd google mail
|
||||
'zh' => '简体中文', // Mr. Lodar, vea - urn2.net - vea.urn2@gmail.com
|
||||
'zh-tw' => '繁體中文', // http://tzangms.com
|
||||
);
|
||||
|
||||
/** Get current language
|
||||
@@ -42,7 +53,7 @@ function get_lang() {
|
||||
*/
|
||||
function lang($idf, $number = null) {
|
||||
global $LANG, $translations;
|
||||
$translation = $translations[$idf];
|
||||
$translation = ($translations[$idf] ? $translations[$idf] : $idf);
|
||||
if (is_array($translation)) {
|
||||
$pos = ($number == 1 ? 0
|
||||
: ($LANG == 'cs' || $LANG == 'sk' ? ($number && $number < 5 ? 1 : 2) // different forms for 1, 2-4, other
|
||||
@@ -50,28 +61,34 @@ function lang($idf, $number = null) {
|
||||
: ($LANG == 'pl' ? ($number % 10 > 1 && $number % 10 < 5 && $number / 10 % 10 != 1 ? 1 : 2) // different forms for 1, 2-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 == 'ru' ? ($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 == '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
|
||||
: 1
|
||||
))))))); // http://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html
|
||||
$translation = $translation[$pos];
|
||||
}
|
||||
$args = func_get_args();
|
||||
array_shift($args);
|
||||
return vsprintf((isset($translation) ? $translation : $idf), $args);
|
||||
$format = str_replace("%d", "%s", $translation);
|
||||
if ($format != $translation) {
|
||||
$args[0] = format_number($number);
|
||||
}
|
||||
return vsprintf($format, $args);
|
||||
}
|
||||
|
||||
function switch_lang() {
|
||||
global $LANG, $langs;
|
||||
echo "<form action=''>\n<div id='lang'>";
|
||||
hidden_fields($_GET, array('lang'));
|
||||
echo lang('Language') . ": " . html_select("lang", $langs, $LANG, "var loc = location.search.replace(/[?&]lang=[^&]*/, ''); location.search = loc + (loc ? '&' : '') + 'lang=' + this.value;");
|
||||
echo "<form action='' method='post'>\n<div id='lang'>";
|
||||
echo lang('Language') . ": " . html_select("lang", $langs, $LANG, "this.form.submit();");
|
||||
echo " <input type='submit' value='" . lang('Use') . "' class='hidden'>\n";
|
||||
echo "<input type='hidden' name='token' value='" . get_token() . "'>\n"; // $token may be empty in auth.inc.php
|
||||
echo "</div>\n</form>\n";
|
||||
}
|
||||
|
||||
if (isset($_GET["lang"])) {
|
||||
$_COOKIE["adminer_lang"] = $_GET["lang"];
|
||||
$_SESSION["lang"] = $_GET["lang"]; // cookies may be disabled
|
||||
if (isset($_POST["lang"]) && verify_token()) { // $error not yet available
|
||||
cookie("adminer_lang", $_POST["lang"]);
|
||||
$_SESSION["lang"] = $_POST["lang"]; // cookies may be disabled
|
||||
$_SESSION["translations"] = array(); // used in compiled version
|
||||
redirect(remove_from_uri());
|
||||
}
|
||||
|
||||
$LANG = "en";
|
||||
|
||||
@@ -2,15 +2,22 @@
|
||||
// PDO can be used in several database drivers
|
||||
if (extension_loaded('pdo')) {
|
||||
/*abstract*/ class Min_PDO extends PDO {
|
||||
var $_result, $server_info, $affected_rows, $error;
|
||||
var $_result, $server_info, $affected_rows, $errno, $error;
|
||||
|
||||
function __construct() {
|
||||
global $adminer;
|
||||
$pos = array_search("SQL", $adminer->operators);
|
||||
if ($pos !== false) {
|
||||
unset($adminer->operators[$pos]);
|
||||
}
|
||||
}
|
||||
|
||||
function dsn($dsn, $username, $password, $exception_handler = 'auth_error') {
|
||||
set_exception_handler($exception_handler); // try/catch is not compatible with PHP 4
|
||||
parent::__construct($dsn, $username, $password);
|
||||
restore_exception_handler();
|
||||
function dsn($dsn, $username, $password) {
|
||||
try {
|
||||
parent::__construct($dsn, $username, $password);
|
||||
} catch (Exception $ex) {
|
||||
auth_error($ex->getMessage());
|
||||
}
|
||||
$this->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS
|
||||
$this->server_info = $this->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION
|
||||
}
|
||||
@@ -19,9 +26,9 @@ if (extension_loaded('pdo')) {
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
$result = parent::query($query);
|
||||
$this->error = "";
|
||||
if (!$result) {
|
||||
$errorInfo = $this->errorInfo();
|
||||
$this->error = $errorInfo[2];
|
||||
list(, $this->errno, $this->error) = $this->errorInfo();
|
||||
return false;
|
||||
}
|
||||
$this->store_result($result);
|
||||
@@ -35,6 +42,9 @@ if (extension_loaded('pdo')) {
|
||||
function store_result($result = null) {
|
||||
if (!$result) {
|
||||
$result = $this->_result;
|
||||
if (!$result) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ($result->columnCount()) {
|
||||
$result->num_rows = $result->rowCount(); // is not guaranteed to work with all drivers
|
||||
@@ -45,7 +55,11 @@ if (extension_loaded('pdo')) {
|
||||
}
|
||||
|
||||
function next_result() {
|
||||
return $this->_result->nextRowset();
|
||||
if (!$this->_result) {
|
||||
return false;
|
||||
}
|
||||
$this->_result->_offset = 0;
|
||||
return @$this->_result->nextRowset(); // @ - PDO_PgSQL doesn't support it
|
||||
}
|
||||
|
||||
function result($query, $field = 0) {
|
||||
@@ -73,7 +87,7 @@ if (extension_loaded('pdo')) {
|
||||
$row = (object) $this->getColumnMeta($this->_offset++);
|
||||
$row->orgtable = $row->table;
|
||||
$row->orgname = $row->name;
|
||||
$row->charsetnr = (in_array("blob", $row->flags) ? 63 : 0);
|
||||
$row->charsetnr = (in_array("blob", (array) $row->flags) ? 63 : 0);
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
|
||||
22
adminer/include/tmpfile.inc.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
class TmpFile {
|
||||
var $handler;
|
||||
var $size;
|
||||
|
||||
function TmpFile() {
|
||||
$this->handler = tmpfile();
|
||||
}
|
||||
|
||||
function write($contents) {
|
||||
$this->size += strlen($contents);
|
||||
fwrite($this->handler, $contents);
|
||||
}
|
||||
|
||||
function send() {
|
||||
fseek($this->handler, 0);
|
||||
fpassthru($this->handler);
|
||||
fclose($this->handler);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
<?php
|
||||
$VERSION = "3.3.2";
|
||||
$VERSION = "4.2.2";
|
||||
|
||||
@@ -79,6 +79,9 @@ function decrypt_string($str, $key) {
|
||||
if ($str == "") {
|
||||
return "";
|
||||
}
|
||||
if (!$key) {
|
||||
return false;
|
||||
}
|
||||
$key = array_values(unpack("V*", pack("H*", md5($key))));
|
||||
$v = str2long($str, false);
|
||||
$n = count($v) - 1;
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
*/
|
||||
|
||||
include "./include/bootstrap.inc.php";
|
||||
include "./include/tmpfile.inc.php";
|
||||
|
||||
$enum_length = "'(?:''|[^'\\\\]|\\\\.)*+'";
|
||||
$enum_length = "'(?:''|[^'\\\\]|\\\\.)*'";
|
||||
$inout = "IN|OUT|INOUT";
|
||||
|
||||
if (isset($_GET["select"]) && ($_POST["edit"] || $_POST["clone"]) && !$_POST["save"]) {
|
||||
@@ -21,6 +22,7 @@ if (isset($_GET["callf"])) {
|
||||
if (isset($_GET["function"])) {
|
||||
$_GET["procedure"] = $_GET["function"];
|
||||
}
|
||||
|
||||
if (isset($_GET["download"])) {
|
||||
include "./download.inc.php";
|
||||
} elseif (isset($_GET["table"])) {
|
||||
|
||||
@@ -1,47 +1,61 @@
|
||||
<?php
|
||||
$TABLE = $_GET["indexes"];
|
||||
$index_types = array("PRIMARY", "UNIQUE", "INDEX");
|
||||
$table_status = table_status($TABLE);
|
||||
if (eregi("MyISAM|M?aria", $table_status["Engine"])) {
|
||||
$table_status = table_status($TABLE, true);
|
||||
if (preg_match('~MyISAM|M?aria' . ($connection->server_info >= 5.6 ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
|
||||
$index_types[] = "FULLTEXT";
|
||||
}
|
||||
$indexes = indexes($TABLE);
|
||||
if ($jush == "sqlite") { // doesn't support primary key
|
||||
$primary = array();
|
||||
if ($jush == "mongo") { // doesn't support primary key
|
||||
$primary = $indexes["_id_"];
|
||||
unset($index_types[0]);
|
||||
unset($indexes[""]);
|
||||
unset($indexes["_id_"]);
|
||||
}
|
||||
if ($_POST && !$error && !$_POST["add"]) {
|
||||
$row = $_POST;
|
||||
|
||||
if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"]) {
|
||||
$alter = array();
|
||||
foreach ($_POST["indexes"] as $index) {
|
||||
foreach ($row["indexes"] as $index) {
|
||||
$name = $index["name"];
|
||||
if (in_array($index["type"], $index_types)) {
|
||||
$columns = array();
|
||||
$lengths = array();
|
||||
$descs = array();
|
||||
$set = array();
|
||||
ksort($index["columns"]);
|
||||
foreach ($index["columns"] as $key => $column) {
|
||||
if ($column != "") {
|
||||
$length = $index["lengths"][$key];
|
||||
$set[] = idf_escape($column) . ($length ? "(" . (+$length) . ")" : "");
|
||||
$desc = $index["descs"][$key];
|
||||
$set[] = idf_escape($column) . ($length ? "(" . (+$length) . ")" : "") . ($desc ? " DESC" : "");
|
||||
$columns[] = $column;
|
||||
$lengths[] = ($length ? $length : null);
|
||||
$descs[] = $desc;
|
||||
}
|
||||
}
|
||||
|
||||
if ($columns) {
|
||||
$existing = $indexes[$name];
|
||||
if ($existing) {
|
||||
ksort($existing["columns"]);
|
||||
ksort($existing["lengths"]);
|
||||
if ($index["type"] == $existing["type"] && array_values($existing["columns"]) === $columns && (!$existing["lengths"] || array_values($existing["lengths"]) === $lengths)) {
|
||||
ksort($existing["descs"]);
|
||||
if ($index["type"] == $existing["type"]
|
||||
&& array_values($existing["columns"]) === $columns
|
||||
&& (!$existing["lengths"] || array_values($existing["lengths"]) === $lengths)
|
||||
&& array_values($existing["descs"]) === $descs
|
||||
) {
|
||||
// skip existing index
|
||||
unset($indexes[$name]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$alter[] = array($index["type"], $name, "(" . implode(", ", $set) . ")");
|
||||
$alter[] = array($index["type"], $name, $set);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// drop removed indexes
|
||||
foreach ($indexes as $name => $existing) {
|
||||
$alter[] = array($existing["type"], $name, "DROP");
|
||||
@@ -52,53 +66,75 @@ if ($_POST && !$error && !$_POST["add"]) {
|
||||
queries_redirect(ME . "table=" . urlencode($TABLE), lang('Indexes have been altered.'), alter_indexes($TABLE, $alter));
|
||||
}
|
||||
|
||||
page_header(lang('Indexes'), $error, array("table" => $TABLE), $TABLE);
|
||||
page_header(lang('Indexes'), $error, array("table" => $TABLE), h($TABLE));
|
||||
|
||||
$fields = array_keys(fields($TABLE));
|
||||
$row = array("indexes" => $indexes);
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
if ($_POST["add"]) {
|
||||
foreach ($row["indexes"] as $key => $index) {
|
||||
if ($index["columns"][count($index["columns"])] != "") {
|
||||
$row["indexes"][$key]["columns"][] = "";
|
||||
}
|
||||
}
|
||||
$index = end($row["indexes"]);
|
||||
if ($index["type"] || array_filter($index["columns"], 'strlen') || array_filter($index["lengths"], 'strlen')) {
|
||||
$row["indexes"][] = array("columns" => array(1 => ""));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($_POST["add"]) {
|
||||
foreach ($row["indexes"] as $key => $index) {
|
||||
$row["indexes"][$key]["name"] = $key;
|
||||
$row["indexes"][$key]["columns"][] = "";
|
||||
if ($index["columns"][count($index["columns"])] != "") {
|
||||
$row["indexes"][$key]["columns"][] = "";
|
||||
}
|
||||
}
|
||||
$row["indexes"][] = array("columns" => array(1 => ""));
|
||||
$index = end($row["indexes"]);
|
||||
if ($index["type"] || array_filter($index["columns"], 'strlen')) {
|
||||
$row["indexes"][] = array("columns" => array(1 => ""));
|
||||
}
|
||||
}
|
||||
if (!$row) {
|
||||
foreach ($indexes as $key => $index) {
|
||||
$indexes[$key]["name"] = $key;
|
||||
$indexes[$key]["columns"][] = "";
|
||||
}
|
||||
$indexes[] = array("columns" => array(1 => ""));
|
||||
$row["indexes"] = $indexes;
|
||||
}
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<table cellspacing="0" class="nowrap">
|
||||
<thead><tr><th><?php echo lang('Index Type'); ?><th><?php echo lang('Column (length)'); ?><th><?php echo lang('Name'); ?></thead>
|
||||
<thead><tr>
|
||||
<th><?php echo lang('Index Type'); ?>
|
||||
<th><input type="submit" style="left: -1000px; position: absolute;"><?php echo lang('Column (length)'); ?>
|
||||
<th><?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>
|
||||
</thead>
|
||||
<?php
|
||||
if ($primary) {
|
||||
echo "<tr><td>PRIMARY<td>";
|
||||
foreach ($primary["columns"] as $key => $column) {
|
||||
echo select_input(" disabled", $fields, $column);
|
||||
echo "<label><input disabled type='checkbox'>" . lang('descending') . "</label> ";
|
||||
}
|
||||
echo "<td><td>\n";
|
||||
}
|
||||
$j = 1;
|
||||
foreach ($row["indexes"] as $index) {
|
||||
echo "<tr><td>" . html_select("indexes[$j][type]", array(-1 => "") + $index_types, $index["type"], ($j == count($row["indexes"]) ? "indexesAddRow(this);" : 1)) . "<td>";
|
||||
ksort($index["columns"]);
|
||||
$i = 1;
|
||||
foreach ($index["columns"] as $key => $column) {
|
||||
echo "<span>" . html_select("indexes[$j][columns][$i]", array(-1 => "") + $fields, $column, ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . "(this, '" . js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_") . "');");
|
||||
echo "<input name='indexes[$j][lengths][$i]' size='2' value='" . h($index["lengths"][$key]) . "'> </span>"; //! hide for non-MySQL drivers, add ASC|DESC
|
||||
$i++;
|
||||
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 "<td>";
|
||||
ksort($index["columns"]);
|
||||
$i = 1;
|
||||
foreach ($index["columns"] as $key => $column) {
|
||||
echo "<span>" . select_input(
|
||||
" name='indexes[$j][columns][$i]' onchange=\"" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . "(this, '" . js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_") . "');\"",
|
||||
($fields ? array_combine($fields, $fields) : $fields),
|
||||
$column
|
||||
);
|
||||
echo ($jush == "sql" || $jush == "mssql" ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "'>" : "");
|
||||
echo ($jush != "sql" ? checkbox("indexes[$j][descs][$i]", 1, $index["descs"][$key], lang('descending')) : "");
|
||||
echo " </span>";
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "<td><input name='indexes[$j][name]' value='" . h($index["name"]) . "' autocapitalize='off'>\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 name='indexes[$j][name]' value='" . h($index["name"]) . "'>\n";
|
||||
$j++;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<p>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<noscript><p><input type="submit" name="add" value="<?php echo lang('Add next'); ?>"></noscript>
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
</form>
|
||||
|
||||
@@ -30,13 +30,11 @@ $translations = array(
|
||||
'Alter database' => 'تعديل قاعدة البيانات',
|
||||
'Create database' => 'إنشاء قاعدة بيانات',
|
||||
'SQL command' => 'إستعلام SQL',
|
||||
'Dump' => 'تصدير',
|
||||
'Logout' => 'تسجيل الخروج',
|
||||
'database' => 'قاعدة بيانات',
|
||||
'Use' => 'المستعمل',
|
||||
'No tables.' => 'لا توجد جداول.',
|
||||
'select' => 'تحديد',
|
||||
'Create new table' => 'أنشئ جدول جديد',
|
||||
'Item has been deleted.' => 'تم حذف العنصر.',
|
||||
'Item has been updated.' => 'تم تعديل العنصر.',
|
||||
'Edit' => 'تعديل',
|
||||
@@ -178,6 +176,7 @@ $translations = array(
|
||||
'Data Free' => 'المساحة الحرة',
|
||||
'Rows' => 'الأسطر',
|
||||
',' => ',',
|
||||
'0123456789' => '٠١٢٣٤٥٦٧٨٩',
|
||||
'Analyze' => 'تحليل',
|
||||
'Optimize' => 'تحسين',
|
||||
'Check' => 'فحص',
|
||||
@@ -188,7 +187,7 @@ $translations = array(
|
||||
'%d item(s) have been affected.' => 'عدد العناصر المعدلة هو %d.',
|
||||
'whole result' => 'نتيجة كاملة',
|
||||
'Clone' => 'نسخ',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'لقد تجاوزت العدد الأقصى للحقول. يرجى الرفع من %s و %s.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'لقد تجاوزت العدد الأقصى للحقول. يرجى الرفع من %s.',
|
||||
'Partition by' => 'مقسم بواسطة',
|
||||
'Partitions' => 'التقسيمات',
|
||||
'Partition name' => 'إسم التقسيم',
|
||||
@@ -225,7 +224,6 @@ $translations = array(
|
||||
'Databases have been dropped.' => 'تم حذف قواعد البيانات.',
|
||||
'Database has been dropped.' => 'تم حذف قاعدة البيانات.',
|
||||
'Search data in tables' => 'بحث في الجداول',
|
||||
'schema' => 'المخطط',
|
||||
'Schema' => 'المخطط',
|
||||
'Alter schema' => 'تعديل المخطط',
|
||||
'Create schema' => 'إنشاء مخطط',
|
||||
@@ -243,7 +241,6 @@ $translations = array(
|
||||
'Alter type' => 'تعديل نوع',
|
||||
'Type has been dropped.' => 'تم حذف النوع.',
|
||||
'Type has been created.' => 'تم إنشاء النوع.',
|
||||
'Double click on a value to modify it.' => 'أنقر نقرا مزدوجا على قيمة لتعديلها.',
|
||||
'Use edit link to modify this value.' => 'إستعمل الرابط "تعديل" لتعديل هذه القيمة.',
|
||||
'last' => 'الأخيرة',
|
||||
'From server' => 'من الخادم',
|
||||
@@ -259,7 +256,6 @@ $translations = array(
|
||||
'now' => 'الآن',
|
||||
'%d query(s) executed OK.' => array('تم تنفيذ الإستعلام %d بنجاح.', 'تم تنفيذ الإستعلامات %d بنجاح.'),
|
||||
'Show only errors' => 'إعرض الأخطاء فقط',
|
||||
'Last page' => 'الصفحة السابقة',
|
||||
'Refresh' => 'تحديث',
|
||||
'Invalid schema.' => 'مخطط خاطئ.',
|
||||
'Please use one of the extensions %s.' => 'من فضلك إستعمل إحدى الإمتدادات: %s.',
|
||||
@@ -268,6 +264,5 @@ $translations = array(
|
||||
'Copy' => 'نسخ',
|
||||
'Permanent link' => 'وصلة دائمة',
|
||||
'Edit all' => 'تعديل الكل',
|
||||
'Resend POST data?' => 'هل تود إعادة إرسال بيانات POST ؟',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
|
||||
268
adminer/lang/bn.inc.php
Normal file
@@ -0,0 +1,268 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Login' => 'লগইন',
|
||||
'Logout successful.' => 'লগআউট সম্পন্ন হয়েছে।',
|
||||
'Invalid credentials.' => 'ভুল পাসওয়ার্ড।',
|
||||
'Server' => 'সার্ভার',
|
||||
'Username' => 'ইউজারের নাম',
|
||||
'Password' => 'পাসওয়ার্ড',
|
||||
'Select database' => 'ডাটাবেজ নির্বাচন করো',
|
||||
'Invalid database.' => 'ভুল ডাটাবেজ।',
|
||||
'Create new 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 dropped.' => 'ডাটাবেজ মুছে ফেলা হয়েছে।',
|
||||
'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.' => 'বিষয়বস্তু আপডেট করা হয়েছে।',
|
||||
'Item%s has been inserted.' => 'বিষয়বস্তুসমূহ সংযোজন করা হয়েছে।',
|
||||
'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.' => array('কোয়্যারী সম্পাদন হয়েছে, %d সারি প্রভাবিত হয়েছে।', 'কোয়্যারী সম্পাদন হয়েছে, %d সারি প্রভাবিত হয়েছে।'),
|
||||
'Error in query' => 'কোয়্যারীতে ভুল আছে।',
|
||||
'Execute' => 'সম্পাদন করো',
|
||||
'Table' => 'টেবিল',
|
||||
'Foreign keys' => 'ফরেন কী',
|
||||
'Triggers' => 'ট্রিগার',
|
||||
'View' => 'ভিউ',
|
||||
'Unable to select the table' => 'টেবিল নির্বাচন করতে অক্ষম',
|
||||
'Invalid CSRF token. Send the form again.' => 'অবৈধ CSRF টোকেন। ফর্ম আবার পাঠাও।',
|
||||
'Comment' => 'মন্তব্য',
|
||||
'Default values' => 'ডিফল্ট মান',
|
||||
'%d byte(s)' => array('%d বাইট', '%d বাইটসমূহ'),
|
||||
'No commands to execute.' => 'সম্পাদন করার মত কোন নির্দেশ নাই।',
|
||||
'Unable to upload a file.' => 'ফাইল আপলোড করা সম্ভব হচ্ছে না।',
|
||||
'File upload' => 'ফাইল আপলোড',
|
||||
'File uploads are disabled.' => 'ফাইল আপলোড নিষ্ক্রিয় করা আছে।',
|
||||
'Routine has been called, %d row(s) affected.' => array('রুটিন কল করা হয়েছে, %d টি সারি (সমূহ) প্রভাবিত হয়েছে।', 'রুটিন কল করা হয়েছে, %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.' => array('%d টি প্রসেস (সমূহ) বিনষ্ট করা হয়েছে।', '%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' => 'ইভেন্ট',
|
||||
'%s version: %s through PHP extension %s' => 'ভার্সন %s: %s, %s PHP এক্সটেনশনের মধ্য দিয়ে',
|
||||
'%d row(s)' => array('%d সারি', '%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' => 'রিভোক',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'খুব বড় POST ডাটা। ডাটা সংক্ষিপ্ত করো অথবা %s কনফিগারেশন নির্দেশ বৃদ্ধি করো',
|
||||
'Logged as: %s' => '%s হিসাবে লগড',
|
||||
'Move up' => 'উপরে স্থানান্তর',
|
||||
'Move down' => 'নীচে স্থানান্তর',
|
||||
'Functions' => 'ফাংশন সমূহ',
|
||||
'Aggregation' => 'মোট পরিমাণ',
|
||||
'Export' => 'এক্সপোর্ট',
|
||||
'Output' => 'আউটপুট',
|
||||
'open' => 'খোলা',
|
||||
'save' => 'সংরক্ষণ',
|
||||
'Format' => 'বিন্যাস',
|
||||
'Tables' => 'টেবিলসমূহ',
|
||||
'Data' => 'ডাটা',
|
||||
'Event has been dropped.' => 'ইভেন্ট মুছে ফেলা হয়েছে।',
|
||||
'Event has been altered.' => 'ইভেন্ট সম্পাদনা করা হয়েছে।',
|
||||
'Event has been created.' => 'ইভেন্ট তৈরী করা হয়েছে।',
|
||||
'Alter event' => 'ইভেন্ট সম্পাদনা করো',
|
||||
'Create event' => 'ইভেন্ট তৈরী করো',
|
||||
'At given time' => 'প্রদত্ত সময়ে',
|
||||
'Every' => 'প্রত্যেক',
|
||||
'Events' => 'ইভেন্টসমূহ',
|
||||
'Schedule' => 'সময়সূচি',
|
||||
'Start' => 'শুরু',
|
||||
'End' => 'সমাপ্তি',
|
||||
'Status' => 'স্ট্যাটাস',
|
||||
'On completion preserve' => 'সমাপ্ত হওয়ার পর সংরক্ষন করো',
|
||||
'Tables and views' => 'টেবিল এবং ভিউ সমূহ',
|
||||
'Data Length' => 'ডাটার দৈর্ঘ্য',
|
||||
'Index Length' => 'ইনডেক্স এর দৈর্ঘ্য',
|
||||
'Data Free' => 'তথ্য মুক্ত',
|
||||
'Collation' => 'কলোকেশন',
|
||||
'Analyze' => 'বিশ্লেষণ',
|
||||
'Optimize' => 'অপটিমাইজ',
|
||||
'Check' => 'পরীক্ষা',
|
||||
'Repair' => 'মেরামত',
|
||||
'Truncate' => 'ছাঁটাই',
|
||||
'Tables have been truncated.' => 'টেবিল ছাঁটাই করা হয়েছে',
|
||||
'Rows' => 'সারি',
|
||||
',' => ',',
|
||||
'0123456789' => '০১২৩৪৫৬৭৮৯',
|
||||
'Tables have been moved.' => 'টেবিল স্থানান্তর করা হয়েছে।',
|
||||
'Move to other database' => 'অন্য ডাটাবেজে স্থানান্তর করো',
|
||||
'Move' => 'স্থানান্তর করো',
|
||||
'Engine' => 'ইঞ্জিন',
|
||||
'Save and continue edit' => 'সংরক্ষণ করো এবং সম্পাদনা চালিয়ে যাও',
|
||||
'original' => 'প্রকৃত',
|
||||
'Tables have been dropped.' => 'টেবিলসমূহ মুছে ফেলা হয়েছে।',
|
||||
'%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.' => array('%d টি সারি (সমূহ) ইমপোর্ট করা হয়েছে।', '%d টি সারি (সমূহ) ইমপোর্ট করা হয়েছে।'),
|
||||
'anywhere' => 'যে কোন স্থানে',
|
||||
'Import' => 'ইমপোর্ট',
|
||||
'Stop on error' => 'ত্রুটি পেলে থেমে যাও',
|
||||
'%.3f s' => '%.3f s',
|
||||
'$1-$3-$5' => '$6.$4.$1',
|
||||
'[yyyy]-mm-dd' => 't.m.[jjjj]',
|
||||
'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.' => array('%d ইমেইল (গুলি) পাঠানো হয়েছে।', '%d ইমেইল (গুলি) পাঠানো হয়েছে।'),
|
||||
'Webserver file %s' => 'ওয়েবসার্ভার ফাইল %s',
|
||||
'File does not exist.' => 'ফাইলের কোন অস্তিত্ব নেই।',
|
||||
'%d in total' => 'সর্বমোটঃ %d টি',
|
||||
'Permanent login' => 'স্থায়ী লগইন',
|
||||
'Databases have 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' => 'সংযুক্তি',
|
||||
'%d query(s) executed OK.' => array('SQL-কোয়্যারী সফলভাবে সম্পন্ন হয়েছে', '%d SQL-কোয়্যারীসমূহ সফলভাবে সম্পন্ন হয়েছে'),
|
||||
'Show only errors' => 'শুধুমাত্র ত্রুটি দেখাও',
|
||||
'Refresh' => 'রিফ্রেশ',
|
||||
'Invalid schema.' => 'অবৈধ স্কিমা।',
|
||||
'Please use one of the extensions %s.' => 'কোন একটা এক্সটেনশন %s ব্যবহার করো।',
|
||||
'now' => 'এখন',
|
||||
'ltr' => 'ltr',
|
||||
'Tables have been copied.' => 'টেবিল কপি করা হয়েছে।',
|
||||
'Copy' => 'কপি',
|
||||
'Permanent link' => 'স্থায়ী লিংক',
|
||||
'Edit all' => 'সকল সম্পাদনা করো',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
@@ -31,13 +31,11 @@ $translations = array(
|
||||
'Alter database' => 'Modifica la base de dades',
|
||||
'Create database' => 'Crea una base de dades',
|
||||
'SQL command' => 'Ordre SQL',
|
||||
'Dump' => 'Exporta',
|
||||
'Logout' => 'Desconnecta',
|
||||
'database' => 'base de dades',
|
||||
'Use' => 'Utilitza',
|
||||
'No tables.' => 'No hi ha cap taula.',
|
||||
'select' => 'registres',
|
||||
'Create new table' => 'Crea una nova taula',
|
||||
'Item has been deleted.' => 'S\'ha suprmit l\'element.',
|
||||
'Item has been updated.' => 'S\'ha actualitzat l\'element.',
|
||||
'Item%s has been inserted.' => 'S\'ha insertat l\'element%s.',
|
||||
@@ -180,6 +178,7 @@ $translations = array(
|
||||
'Tables have been truncated.' => 'S\'han escapçat les taules.',
|
||||
'Rows' => 'Files',
|
||||
',' => ',',
|
||||
'0123456789' => '0123456789',
|
||||
'Tables have been moved.' => 'S\'han desplaçat les taules.',
|
||||
'Move to other database' => 'Desplaça a una altra base de dades',
|
||||
'Move' => 'Desplaça',
|
||||
@@ -199,7 +198,7 @@ $translations = array(
|
||||
'Show structure' => 'Mostra l\'estructura',
|
||||
'Select data' => 'Selecciona dades',
|
||||
'Stop on error' => 'Atura en trobar un error',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'S\'ha assolit el nombre màxim de camps. Incrementa %s i %s.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'S\'ha assolit el nombre màxim de camps. Incrementa %s.',
|
||||
'anywhere' => 'a qualsevol lloc',
|
||||
'%.3f s' => '%.3f s',
|
||||
'$1-$3-$5' => '$5/$3/$1',
|
||||
@@ -233,14 +232,13 @@ $translations = array(
|
||||
'Geometry' => 'Geometria',
|
||||
'Databases have been dropped.' => 'S\'han suprimit les bases de dades.',
|
||||
'File exists.' => 'El fitxer ja existeix.',
|
||||
'Double click on a value to modify it.' => 'Fes un doble clic a un valor per modificar-lo.',
|
||||
'Ctrl+click on a value to modify it.' => 'Fes un Ctrl+clic a un valor per modificar-lo.',
|
||||
'Use edit link to modify this value.' => 'Utilitza l\'enllaç d\'edició per modificar aquest valor.',
|
||||
'Alter schema' => 'Modifica l\'esquema',
|
||||
'Create schema' => 'Crea un esquema',
|
||||
'Schema has been dropped.' => 'S\'ha suprimit l\'esquema.',
|
||||
'Schema has been created.' => 'S\'ha creat l\'esquema.',
|
||||
'Schema has been altered.' => 'S\'ha modificat l\'esquema.',
|
||||
'schema' => 'esquema',
|
||||
'Schema' => 'Esquema',
|
||||
'Sequences' => 'Seqüències',
|
||||
'Create sequence' => 'Crea una seqüència',
|
||||
@@ -259,7 +257,6 @@ $translations = array(
|
||||
'now' => 'ara',
|
||||
'%d query(s) executed OK.' => array('%d consulta executada correctament.', '%d consultes executades correctament.'),
|
||||
'Show only errors' => 'Mostra només els errors',
|
||||
'Last page' => 'Darrera plana',
|
||||
'Refresh' => 'Refresca',
|
||||
'Invalid schema.' => 'Esquema invàlid.',
|
||||
'Please use one of the extensions %s.' => 'Si us plau, utilitza una de les extensions %s.',
|
||||
@@ -268,6 +265,5 @@ $translations = array(
|
||||
'Copy' => 'Còpia',
|
||||
'Permanent link' => 'Enllaç permanent',
|
||||
'Edit all' => 'Edita-ho tot',
|
||||
'Resend POST data?' => 'Torna a enviar les dades POST?',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
|
||||
@@ -11,13 +11,16 @@ $translations = array(
|
||||
'Logged as: %s' => 'Přihlášen jako: %s',
|
||||
'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
|
||||
'Invalid credentials.' => 'Neplatné přihlašovací údaje.',
|
||||
'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.',
|
||||
'Language' => 'Jazyk',
|
||||
'Invalid CSRF token. Send the form again.' => 'Neplatný token CSRF. Odešlete formulář znovu.',
|
||||
'No extension' => 'Žádná extenze',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Není dostupná žádná z podporovaných PHP extenzí (%s).',
|
||||
'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í',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Není dostupné žádné z podporovaných PHP rozšíření (%s).',
|
||||
'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.',
|
||||
'%s version: %s through PHP extension %s' => 'Verze %s: %s přes PHP extenzi %s',
|
||||
'%s version: %s through PHP extension %s' => 'Verze %s: %s přes PHP rozšíření %s',
|
||||
'Refresh' => 'Obnovit',
|
||||
|
||||
// text direction - 'ltr' or 'rtl'
|
||||
@@ -64,9 +67,10 @@ $translations = array(
|
||||
'Unable to upload a file.' => 'Nepodařilo se nahrát soubor.',
|
||||
'Maximum allowed file size is %sB.' => 'Maximální povolená velikost souboru je %sB.',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Příliš velká POST data. Zmenšete data nebo zvyšte hodnotu konfigurační direktivy %s.',
|
||||
'You can upload a big SQL file via FTP and import it from server.' => 'Velký SQL soubor můžete nahrát pomocí FTP a importovat ho ze serveru.',
|
||||
'You are offline.' => 'Jste offline.',
|
||||
|
||||
'Export' => 'Export',
|
||||
'Dump' => 'Export',
|
||||
'Output' => 'Výstup',
|
||||
'open' => 'otevřít',
|
||||
'save' => 'uložit',
|
||||
@@ -93,6 +97,7 @@ $translations = array(
|
||||
|
||||
// thousands separator - must contain single byte
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Engine' => 'Úložiště',
|
||||
'Collation' => 'Porovnávání',
|
||||
'Data Length' => 'Velikost dat',
|
||||
@@ -102,6 +107,7 @@ $translations = array(
|
||||
'%d in total' => '%d celkem',
|
||||
'Analyze' => 'Analyzovat',
|
||||
'Optimize' => 'Optimalizovat',
|
||||
'Vacuum' => 'Vyčistit',
|
||||
'Check' => 'Zkontrolovat',
|
||||
'Repair' => 'Opravit',
|
||||
'Truncate' => 'Vyprázdnit',
|
||||
@@ -144,9 +150,9 @@ $translations = array(
|
||||
'No tables.' => 'Žádné tabulky.',
|
||||
'Alter table' => 'Pozměnit tabulku',
|
||||
'Create table' => 'Vytvořit tabulku',
|
||||
'Create new table' => 'Vytvořit novou tabulku',
|
||||
'Table has been dropped.' => 'Tabulka byla odstraněna.',
|
||||
'Tables have been dropped.' => 'Tabulky byly odstraněny.',
|
||||
'Tables have been optimized.' => 'Tabulky byly optimalizovány.',
|
||||
'Table has been altered.' => 'Tabulka byla změněna.',
|
||||
'Table has been created.' => 'Tabulka byla vytvořena.',
|
||||
'Table name' => 'Název tabulky',
|
||||
@@ -159,13 +165,16 @@ $translations = array(
|
||||
'Auto Increment' => 'Auto Increment',
|
||||
'Options' => 'Volby',
|
||||
'Comment' => 'Komentář',
|
||||
'Default value' => 'Výchozí hodnota',
|
||||
'Default values' => 'Výchozí hodnoty',
|
||||
'Drop' => 'Odstranit',
|
||||
'Are you sure?' => 'Opravdu?',
|
||||
'Size' => 'Velikost',
|
||||
'Compute' => 'Spočítat',
|
||||
'Move up' => 'Přesunout nahoru',
|
||||
'Move down' => 'Přesunout dolů',
|
||||
'Remove' => 'Odebrat',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Byl překročen maximální povolený počet polí. Zvyšte prosím %s a %s.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Byl překročen maximální povolený počet polí. Zvyšte prosím %s.',
|
||||
|
||||
'Partition by' => 'Rozdělit podle',
|
||||
'Partitions' => 'Oddíly',
|
||||
@@ -173,11 +182,13 @@ $translations = array(
|
||||
'Values' => 'Hodnoty',
|
||||
|
||||
'View' => 'Pohled',
|
||||
'Materialized View' => 'Materializovaný pohled',
|
||||
'View has been dropped.' => 'Pohled byl odstraněn.',
|
||||
'View has been altered.' => 'Pohled byl změněn.',
|
||||
'View has been created.' => 'Pohled byl vytvořen.',
|
||||
'Alter view' => 'Pozměnit pohled',
|
||||
'Create view' => 'Vytvořit pohled',
|
||||
'Create materialized view' => 'Vytvořit materializovaný pohled',
|
||||
|
||||
'Indexes' => 'Indexy',
|
||||
'Indexes have been altered.' => 'Indexy byly změněny.',
|
||||
@@ -224,22 +235,28 @@ $translations = array(
|
||||
'Sort' => 'Seřadit',
|
||||
'descending' => 'sestupně',
|
||||
'Limit' => 'Limit',
|
||||
'Limit rows' => 'Limit řádek',
|
||||
'Text length' => 'Délka textů',
|
||||
'Action' => 'Akce',
|
||||
'Full table scan' => 'Průchod celé tabulky',
|
||||
'Unable to select the table' => 'Nepodařilo se vypsat tabulku',
|
||||
'No rows.' => 'Žádné řádky.',
|
||||
'%d / ' => '%d / ',
|
||||
'%d row(s)' => array('%d řádek', '%d řádky', '%d řádků'),
|
||||
'Page' => 'Stránka',
|
||||
'last' => 'poslední',
|
||||
'Last page' => 'Poslední stránka',
|
||||
'Load more data' => 'Nahrát další data',
|
||||
'Loading' => 'Nahrává se',
|
||||
'whole result' => 'celý výsledek',
|
||||
'%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtů'),
|
||||
|
||||
'Import' => 'Import',
|
||||
'%d row(s) have been imported.' => array('Byl importován %d záznam.', 'Byly importovány %d záznamy.', 'Bylo importováno %d záznamů.'),
|
||||
'File must be in UTF-8 encoding.' => 'Soubor musí být v kódování UTF-8.',
|
||||
|
||||
// in-place editing in select
|
||||
'Double click on a value to modify it.' => 'Dvojklikněte na políčko, které chcete změnit.',
|
||||
'Modify' => 'Změnit',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+klikněte na políčko, které chcete změnit.',
|
||||
'Use edit link to modify this value.' => 'Ke změně této hodnoty použijte odkaz upravit.',
|
||||
|
||||
// %s can contain auto-increment value
|
||||
@@ -255,10 +272,13 @@ $translations = array(
|
||||
'Edit' => 'Upravit',
|
||||
'Insert' => 'Vložit',
|
||||
'Save' => 'Uložit',
|
||||
'Saving' => 'Ukládá se',
|
||||
'Save and continue edit' => 'Uložit a pokračovat v editaci',
|
||||
'Save and insert next' => 'Uložit a vložit další',
|
||||
'Selected' => 'Označené',
|
||||
'Clone' => 'Klonovat',
|
||||
'Delete' => 'Smazat',
|
||||
'You have no privileges to update this table.' => 'Nemáte oprávnění editovat tuto tabulku.',
|
||||
|
||||
'E-mail' => 'E-mail',
|
||||
'From' => 'Odesílatel',
|
||||
@@ -277,9 +297,6 @@ $translations = array(
|
||||
'Geometry' => 'Geometrie',
|
||||
'Relations' => 'Vztahy',
|
||||
|
||||
// reload confirmation in AJAX
|
||||
'Resend POST data?' => 'Znovu odeslat POST data?',
|
||||
|
||||
'Editor' => 'Editor',
|
||||
// date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
|
||||
'$1-$3-$5' => '$6.$4.$1',
|
||||
@@ -288,6 +305,8 @@ $translations = array(
|
||||
// hint for time format - use language equivalents for hour, minute and second shortcuts
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
'now' => 'teď',
|
||||
'yes' => 'ano',
|
||||
'no' => 'ne',
|
||||
|
||||
// general SQLite error in create, drop or rename database
|
||||
'File exists.' => 'Soubor existuje.',
|
||||
@@ -299,7 +318,6 @@ $translations = array(
|
||||
'Schema has been dropped.' => 'Schéma bylo odstraněno.',
|
||||
'Schema has been created.' => 'Schéma bylo vytvořeno.',
|
||||
'Schema has been altered.' => 'Schéma bylo změněno.',
|
||||
'schema' => 'schéma',
|
||||
'Schema' => 'Schéma',
|
||||
'Invalid schema.' => 'Nesprávné schéma.',
|
||||
|
||||
|
||||
283
adminer/lang/da.inc.php
Normal file
@@ -0,0 +1,283 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'System' => 'System',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Brugernavn',
|
||||
'Password' => 'Kodeord',
|
||||
'Permanent login' => 'Permanent login',
|
||||
'Login' => 'Log ind',
|
||||
'Logout' => 'Log ud',
|
||||
'Logged as: %s' => 'Logget ind som: %s',
|
||||
'Logout successful.' => 'Log af vellykket.',
|
||||
'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.',
|
||||
'Language' => 'Sprog',
|
||||
'Invalid CSRF token. Send the form again.' => 'Ugyldigt CSRF-token - Genindsend formen.',
|
||||
'No extension' => 'Ingen udvidelse',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Ingen af de understøttede PHP-udvidelser (%s) er tilgængelige.',
|
||||
'Session support must be enabled.' => 'Session support skal være slået til.',
|
||||
'Session expired, please login again.' => 'Sessionen er udløbet - Log venligst ind igen.',
|
||||
'%s version: %s through PHP extension %s' => '%s version: %s via PHP-udvidelse %s',
|
||||
'Refresh' => 'Genindlæs',
|
||||
'ltr' => 'ltr',
|
||||
'Privileges' => 'Privilegier',
|
||||
'Create user' => 'Opret bruger',
|
||||
'User has been dropped.' => 'Brugeren slettet.',
|
||||
'User has been altered.' => 'Brugeren ændret.',
|
||||
'User has been created.' => 'Brugeren oprettet.',
|
||||
'Hashed' => 'Hashet',
|
||||
'Column' => 'Kolonne',
|
||||
'Routine' => 'Rutine',
|
||||
'Grant' => 'Giv privilegier',
|
||||
'Revoke' => 'Træk tilbage',
|
||||
'Process list' => 'Procesliste',
|
||||
'%d process(es) have been killed.' => array('%d proces afsluttet.', '%d processer afsluttet.'),
|
||||
'Kill' => 'Afslut',
|
||||
'Variables' => 'Variabler',
|
||||
'Status' => 'Status',
|
||||
'SQL command' => 'SQL-kommando',
|
||||
'%d query(s) executed OK.' => array('%d kald udført OK.', '%d kald udført OK.'),
|
||||
'Query executed OK, %d row(s) affected.' => array('Kald udført OK, %d række påvirket.', 'Kald udført OK, %d rækker påvirket.'),
|
||||
'No commands to execute.' => 'Ingen kommandoer at udføre.',
|
||||
'Error in query' => 'Fejl i forespørgelse',
|
||||
'Execute' => 'Kør',
|
||||
'Stop on error' => 'Stop ved fejl',
|
||||
'Show only errors' => 'Vis kun fejl',
|
||||
'%.3f s' => '%.3f s',
|
||||
'History' => 'Historik',
|
||||
'Clear' => 'Tøm',
|
||||
'Edit all' => 'Rediger alle',
|
||||
'File upload' => 'Fil upload',
|
||||
'From server' => 'Fra server',
|
||||
'Webserver file %s' => 'Webserver-fil %s',
|
||||
'Run file' => 'Kør fil',
|
||||
'File does not exist.' => 'Filen eksisterer ikke.',
|
||||
'File uploads are disabled.' => 'Fil upload er slået fra.',
|
||||
'Unable to upload a file.' => 'Kunne ikke uploade fil.',
|
||||
'Maximum allowed file size is %sB.' => 'Maksimum tilladte filstørrelse er %sB.',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Maks POST data er overskredet. Reducer mængden af data eller øg størrelsen i %s-konfigurationen.',
|
||||
'You can upload a big SQL file via FTP and import it from server.' => 'Du kan uploade en stor SQL-fil via FTP og importere den fra serveren.',
|
||||
'Export' => 'Eksport',
|
||||
'Output' => 'Resultat',
|
||||
'open' => 'Åben',
|
||||
'save' => 'Gem',
|
||||
'Format' => 'Format',
|
||||
'Data' => 'Data',
|
||||
'Database' => 'Database',
|
||||
'database' => 'database',
|
||||
'Use' => 'Brug',
|
||||
'Select database' => 'Vælg database',
|
||||
'Invalid database.' => 'Ugyldig database.',
|
||||
'Create new database' => 'Opret ny database',
|
||||
'Database has been dropped.' => 'Databasen er blevet slettet.',
|
||||
'Databases have been dropped.' => 'Databasene er blevet slettet.',
|
||||
'Database has been created.' => 'Databasen er oprettet.',
|
||||
'Database has been renamed.' => 'Databasen har fået nyt navn.',
|
||||
'Database has been altered.' => 'Databasen er ændret.',
|
||||
'Alter database' => 'Ændre database',
|
||||
'Create database' => 'Opret database',
|
||||
'Database schema' => 'Databaseskema',
|
||||
'Permanent link' => 'Permanent link',
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Engine' => 'Motor',
|
||||
'Collation' => 'Tekstsortering',
|
||||
'Data Length' => 'Datalængde',
|
||||
'Index Length' => 'Indekslængde',
|
||||
'Data Free' => 'Fri data',
|
||||
'Rows' => 'Rader',
|
||||
'%d in total' => '%d total',
|
||||
'Analyze' => 'Analyser',
|
||||
'Optimize' => 'Optimaliser',
|
||||
'Vacuum' => 'Støvsug',
|
||||
'Check' => 'Tjek',
|
||||
'Repair' => 'Reparer',
|
||||
'Truncate' => 'Afkort',
|
||||
'Tables have been truncated.' => 'Tabellerne er blevet afkortet.',
|
||||
'Move to other database' => 'Flyt til anden database',
|
||||
'Move' => 'Flyt',
|
||||
'Tables have been moved.' => 'Tabellerne er blevet flyttet.',
|
||||
'Copy' => 'Kopier',
|
||||
'Tables have been copied.' => 'Tabellerne er blevet kopiert.',
|
||||
'Routines' => 'Rutiner',
|
||||
'Routine has been called, %d row(s) affected.' => array('Rutinen er udført, %d række påvirket.', 'Rutinen er udført, %d rækker påvirket.'),
|
||||
'Call' => 'Kald',
|
||||
'Parameter name' => 'Parameternavn',
|
||||
'Create procedure' => 'Opret procedure',
|
||||
'Create function' => 'Opret funktion',
|
||||
'Routine has been dropped.' => 'Rutinen er slettet.',
|
||||
'Routine has been altered.' => 'Rutinen er ændret.',
|
||||
'Routine has been created.' => 'Rutinen er oprettet.',
|
||||
'Alter function' => 'Ændre funktion',
|
||||
'Alter procedure' => 'Ændre procedure',
|
||||
'Return type' => 'Returtype',
|
||||
'Events' => 'Hændelser',
|
||||
'Event has been dropped.' => 'Hændelsen er slettet.',
|
||||
'Event has been altered.' => 'Hændelsen er ændret.',
|
||||
'Event has been created.' => 'Hændelsen er oprettet.',
|
||||
'Alter event' => 'Ændre hændelse',
|
||||
'Create event' => 'Opret hændelse',
|
||||
'At given time' => 'På givne tid',
|
||||
'Every' => 'Hver',
|
||||
'Schedule' => 'Tidsplan',
|
||||
'Start' => 'Start',
|
||||
'End' => 'Slut',
|
||||
'On completion preserve' => 'Ved fuldførelse bevar',
|
||||
'Tables' => 'Tabeller',
|
||||
'Tables and views' => 'Tabeller og views',
|
||||
'Table' => 'Tabel',
|
||||
'No tables.' => 'Ingen tabeller.',
|
||||
'Alter table' => 'Ændre tabel',
|
||||
'Create table' => 'Opret tabel',
|
||||
'Table has been dropped.' => 'Tabellen er slettet.',
|
||||
'Tables have been dropped.' => 'Tabellerne er slettet.',
|
||||
'Tables have been optimized.' => 'Tabellerne er blevet optimaliseret.',
|
||||
'Table has been altered.' => 'Tabellen er ændret.',
|
||||
'Table has been created.' => 'Tabellen er oprettet.',
|
||||
'Table name' => 'Tabelnavn',
|
||||
'Show structure' => 'Vis struktur',
|
||||
'engine' => 'motor',
|
||||
'collation' => 'sortering',
|
||||
'Column name' => 'Kolonnenavn',
|
||||
'Type' => 'Type',
|
||||
'Length' => 'Længde',
|
||||
'Auto Increment' => 'Auto Increment',
|
||||
'Options' => 'Valg',
|
||||
'Comment' => 'Kommentarer',
|
||||
'Default values' => 'Standardværdier',
|
||||
'Drop' => 'Drop',
|
||||
'Are you sure?' => 'Er du sikker?',
|
||||
'Move up' => 'Flyt op',
|
||||
'Move down' => 'Flyt ned',
|
||||
'Remove' => 'Fjern',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maksimum antal feltnavne overskredet - øg venligst %s.',
|
||||
'Partition by' => 'Partition ved',
|
||||
'Partitions' => 'Partitioner',
|
||||
'Partition name' => 'Partitionsnavn',
|
||||
'Values' => 'Værdier',
|
||||
'View' => 'View',
|
||||
'View has been dropped.' => 'Viewet er slettet.',
|
||||
'View has been altered.' => 'Viewet er ændret.',
|
||||
'View has been created.' => 'Viewet er oprettet.',
|
||||
'Alter view' => 'Ændre view',
|
||||
'Create view' => 'Nyt view',
|
||||
'Indexes' => 'Indekser',
|
||||
'Indexes have been altered.' => 'Indekserne er ændret.',
|
||||
'Alter indexes' => 'Ændre indekser',
|
||||
'Add next' => 'Læg til næste',
|
||||
'Index Type' => 'Indekstype',
|
||||
'Column (length)' => 'Kolonne (længde)',
|
||||
'Foreign keys' => 'Fremmednøgler',
|
||||
'Foreign key' => 'Fremmednøgle',
|
||||
'Foreign key has been dropped.' => 'Fremmednøglen er slettet.',
|
||||
'Foreign key has been altered.' => 'Fremmednøglen er ændret.',
|
||||
'Foreign key has been created.' => 'Fremmednøglen er oprettet.',
|
||||
'Target table' => 'Måltabel',
|
||||
'Change' => 'Ændre',
|
||||
'Source' => 'Kilde',
|
||||
'Target' => 'Mål',
|
||||
'Add column' => 'Tilføj kolonne',
|
||||
'Alter' => 'Ændre',
|
||||
'Add foreign key' => 'Tilføj fremmednøgle',
|
||||
'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.' => 'Kilde- og målkolonner skal have samme datatype, der skal være en indeks på mål-kolonnen, og data som refereres til skal eksistere.',
|
||||
'Triggers' => 'Triggere',
|
||||
'Add trigger' => 'Tilføj trigger',
|
||||
'Trigger has been dropped.' => 'Triggeren er slettet.',
|
||||
'Trigger has been altered.' => 'Triggeren er ændret.',
|
||||
'Trigger has been created.' => 'Triggeren er oprettet.',
|
||||
'Alter trigger' => 'Ændre trigger',
|
||||
'Create trigger' => 'Opret trigger',
|
||||
'Time' => 'Tid',
|
||||
'Event' => 'Hændelse',
|
||||
'Name' => 'Navn',
|
||||
'select' => 'Vis',
|
||||
'Select' => 'Vælg',
|
||||
'Select data' => 'Vælg data',
|
||||
'Functions' => 'Funktioner',
|
||||
'Aggregation' => 'Sammenfatning',
|
||||
'Search' => 'Søg',
|
||||
'anywhere' => 'hvorsomhelst',
|
||||
'Search data in tables' => 'Søg data i tabeller',
|
||||
'Sort' => 'Sorter',
|
||||
'descending' => 'faldende',
|
||||
'Limit' => 'Limit',
|
||||
'Text length' => 'Tekstlængde',
|
||||
'Action' => 'Handling',
|
||||
'Full table scan' => 'Fuld tabel-scan',
|
||||
'Unable to select the table' => 'Kan ikke vælge tabellen',
|
||||
'No rows.' => 'Ingen rækker.',
|
||||
'%d row(s)' => array('%d række', '%d rækker'),
|
||||
'Page' => 'Side',
|
||||
'last' => 'sidste',
|
||||
'Load more data' => 'Indlæs mere data',
|
||||
'Loading' => 'Indlæser',
|
||||
'whole result' => 'hele resultatet',
|
||||
'%d byte(s)' => array('%d byte', '%d bytes'),
|
||||
'Import' => 'Importer',
|
||||
'%d row(s) have been imported.' => array('%d række er importeret.', '%d rækker er importeret.'),
|
||||
'File must be in UTF-8 encoding.' => 'Filen skal være i UTF8-tegnkoding.',
|
||||
'Modify' => 'Ændre',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+klik på en værdi for at ændre den.',
|
||||
'Use edit link to modify this value.' => 'Brug rediger-link for at ændre dennne værdi.',
|
||||
'Item%s has been inserted.' => 'Emne%s er sat ind.',
|
||||
'Item has been deleted.' => 'Emnet er slettet.',
|
||||
'Item has been updated.' => 'Emnet er opdateret.',
|
||||
'%d item(s) have been affected.' => array('%d emne påvirket.', '%d emner påvirket.'),
|
||||
'New item' => 'Nyt emne',
|
||||
'original' => 'original',
|
||||
'empty' => 'tom',
|
||||
'edit' => 'rediger',
|
||||
'Edit' => 'Rediger',
|
||||
'Insert' => 'Indsæt',
|
||||
'Save' => 'Gem',
|
||||
'Save and continue edit' => 'Gem og fortsæt redigering',
|
||||
'Save and insert next' => 'Gem og indsæt næste',
|
||||
'Selected' => 'Valgt',
|
||||
'Clone' => 'Klon',
|
||||
'Delete' => 'Slet',
|
||||
'You have no privileges to update this table.' => 'Du mangler rettigheder til at ændre denne tabellen.',
|
||||
'E-mail' => 'E-mail',
|
||||
'From' => 'Fra',
|
||||
'Subject' => 'Titel',
|
||||
'Attachments' => 'Vedhæft',
|
||||
'Send' => 'Send',
|
||||
'%d e-mail(s) have been sent.' => array('%d email sendt.', '%d emails sendt.'),
|
||||
'Numbers' => 'Nummer',
|
||||
'Date and time' => 'Dato og tid',
|
||||
'Strings' => 'Strenge',
|
||||
'Binary' => 'Binær',
|
||||
'Lists' => 'Lister',
|
||||
'Network' => 'Netværk',
|
||||
'Geometry' => 'Geometri',
|
||||
'Relations' => 'Relationer',
|
||||
'Editor' => 'Redigering',
|
||||
'$1-$3-$5' => '$6/$4 $1',
|
||||
'[yyyy]-mm-dd' => 'd/m [åååå]',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
'now' => 'nu',
|
||||
'yes' => 'ja',
|
||||
'no' => 'nej',
|
||||
'File exists.' => 'Filen findes.',
|
||||
'Please use one of the extensions %s.' => 'Brug venligst en af filendelserne %s.',
|
||||
'Alter schema' => 'Ændre skema',
|
||||
'Create schema' => 'Opret skema',
|
||||
'Schema has been dropped.' => 'Skemaet er slettet.',
|
||||
'Schema has been created.' => 'Skemaet er oprettet.',
|
||||
'Schema has been altered.' => 'Skemaet er ændret.',
|
||||
'Schema' => 'Skema',
|
||||
'Invalid schema.' => 'Ugyldigt skema.',
|
||||
'Sequences' => 'Sekvenser',
|
||||
'Create sequence' => 'Opret sekvens',
|
||||
'Sequence has been dropped.' => 'Sekvensen er slettet.',
|
||||
'Sequence has been created.' => 'Sekvensen er oprettet.',
|
||||
'Sequence has been altered.' => 'Sekvensen er ændret.',
|
||||
'Alter sequence' => 'Ændre sekvens',
|
||||
'User types' => 'Brugertyper',
|
||||
'Create type' => 'Opret type',
|
||||
'Type has been dropped.' => 'Typen er slettet.',
|
||||
'Type has been created.' => 'Typen er oprettet.',
|
||||
'Alter type' => 'Ændre type',
|
||||
'Saving' => 'Gemmer',
|
||||
);
|
||||
@@ -8,14 +8,14 @@ $translations = array(
|
||||
'Password' => 'Passwort',
|
||||
'Select database' => 'Datenbank auswählen',
|
||||
'Invalid database.' => 'Datenbank ungültig.',
|
||||
'Create new database' => 'Neue Datenbank',
|
||||
'Table has been dropped.' => 'Tabelle entfernt.',
|
||||
'Table has been altered.' => 'Tabelle geändert.',
|
||||
'Table has been created.' => 'Tabelle erstellt.',
|
||||
'Create new database' => 'Datenbank erstellen',
|
||||
'Table has been dropped.' => 'Tabelle wurde entfernt.',
|
||||
'Table has been altered.' => 'Tabelle wurde geändert.',
|
||||
'Table has been created.' => 'Tabelle wurde erstellt.',
|
||||
'Alter table' => 'Tabelle ändern',
|
||||
'Create table' => 'Neue Tabelle erstellen',
|
||||
'Create table' => 'Tabelle erstellen',
|
||||
'Table name' => 'Name der Tabelle',
|
||||
'engine' => 'Motor',
|
||||
'engine' => 'Speicher-Engine',
|
||||
'collation' => 'Kollation',
|
||||
'Column name' => 'Spaltenname',
|
||||
'Type' => 'Typ',
|
||||
@@ -24,29 +24,27 @@ $translations = array(
|
||||
'Options' => 'Optionen',
|
||||
'Save' => 'Speichern',
|
||||
'Drop' => 'Entfernen',
|
||||
'Database has been dropped.' => 'Datenbank entfernt.',
|
||||
'Database has been created.' => 'Datenbank erstellt.',
|
||||
'Database has been renamed.' => 'Datenbank umbenannt.',
|
||||
'Database has been altered.' => 'Datenbank geändert.',
|
||||
'Database has been dropped.' => 'Datenbank wurde entfernt.',
|
||||
'Database has been created.' => 'Datenbank wurde erstellt.',
|
||||
'Database has been renamed.' => 'Datenbank wurde umbenannt.',
|
||||
'Database has been altered.' => 'Datenbank wurde geändert.',
|
||||
'Alter database' => 'Datenbank ändern',
|
||||
'Create database' => 'Neue Datenbank',
|
||||
'SQL command' => 'SQL-Query',
|
||||
'Dump' => 'Export',
|
||||
'Create database' => 'Datenbank erstellen',
|
||||
'SQL command' => 'SQL-Kommando',
|
||||
'Logout' => 'Abmelden',
|
||||
'database' => 'Datenbank',
|
||||
'Use' => 'Benutzung',
|
||||
'No tables.' => 'Keine Tabellen.',
|
||||
'select' => 'zeigen',
|
||||
'Create new table' => 'Neue Tabelle',
|
||||
'Item has been deleted.' => 'Datensatz gelöscht.',
|
||||
'Item has been updated.' => 'Datensatz geändert.',
|
||||
'Item%s has been inserted.' => 'Datensatz%s hinzugefügt.',
|
||||
'Edit' => 'Ändern',
|
||||
'Insert' => 'Hinzufügen',
|
||||
'Save and insert next' => 'Speichern und nächsten hinzufügen',
|
||||
'Item has been deleted.' => 'Datensatz wurde gelöscht.',
|
||||
'Item has been updated.' => 'Datensatz wurde geändert.',
|
||||
'Item%s has been inserted.' => 'Datensatz%s wurde eingefügt.',
|
||||
'Edit' => 'Bearbeiten',
|
||||
'Insert' => 'Einfügen',
|
||||
'Save and insert next' => 'Speichern und nächsten einfügen',
|
||||
'Delete' => 'Entfernen',
|
||||
'Database' => 'Datenbank',
|
||||
'Routines' => 'Prozeduren',
|
||||
'Routines' => 'Routinen',
|
||||
'Indexes have been altered.' => 'Indizes geändert.',
|
||||
'Indexes' => 'Indizes',
|
||||
'Alter indexes' => 'Indizes ändern',
|
||||
@@ -58,9 +56,9 @@ $translations = array(
|
||||
'Sort' => 'Ordnen',
|
||||
'descending' => 'absteigend',
|
||||
'Limit' => 'Begrenzung',
|
||||
'No rows.' => 'Keine Daten.',
|
||||
'No rows.' => 'Keine Datensätze.',
|
||||
'Action' => 'Aktion',
|
||||
'edit' => 'ändern',
|
||||
'edit' => 'bearbeiten',
|
||||
'Page' => 'Seite',
|
||||
'Query executed OK, %d row(s) affected.' => array('Abfrage ausgeführt, %d Datensatz betroffen.', 'Abfrage ausgeführt, %d Datensätze betroffen.'),
|
||||
'Error in query' => 'Fehler in der SQL-Abfrage',
|
||||
@@ -78,16 +76,16 @@ $translations = array(
|
||||
'Unable to upload a file.' => 'Hochladen von Datei fehlgeschlagen.',
|
||||
'File upload' => 'Datei importieren',
|
||||
'File uploads are disabled.' => 'Importieren von Dateien abgeschaltet.',
|
||||
'Routine has been called, %d row(s) affected.' => array('Kommando SQL ausgeführt, %d Datensatz betroffen.', 'Kommando SQL ausgeführt, %d Datensätze betroffen.'),
|
||||
'Routine has been called, %d row(s) affected.' => array('Routine wurde ausgeführt, %d Datensatz betroffen.', 'Routine wurde ausgeführt, %d Datensätze betroffen.'),
|
||||
'Call' => 'Aufrufen',
|
||||
'No extension' => 'Keine Erweiterungen installiert',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Keine der unterstützten PHP-Erweiterungen (%s) ist vorhanden.',
|
||||
'Session support must be enabled.' => 'Sitzungen müssen aktiviert sein.',
|
||||
'Session support must be enabled.' => 'Unterstüzung für PHP-Sessions muss aktiviert sein.',
|
||||
'Session expired, please login again.' => 'Sitzungsdauer abgelaufen, bitte erneut anmelden.',
|
||||
'Text length' => 'Textlänge',
|
||||
'Foreign key has been dropped.' => 'Fremdschlüssel entfernt.',
|
||||
'Foreign key has been altered.' => 'Fremdschlüssel geändert.',
|
||||
'Foreign key has been created.' => 'Fremdschlüssel erstellt.',
|
||||
'Foreign key has been dropped.' => 'Fremdschlüssel wurde entfernt.',
|
||||
'Foreign key has been altered.' => 'Fremdschlüssel wurde geändert.',
|
||||
'Foreign key has been created.' => 'Fremdschlüssel wurde erstellt.',
|
||||
'Foreign key' => 'Fremdschlüssel',
|
||||
'Target table' => 'Zieltabelle',
|
||||
'Change' => 'Ändern',
|
||||
@@ -100,53 +98,53 @@ $translations = array(
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Index-Typ',
|
||||
'Column (length)' => 'Spalte (Länge)',
|
||||
'View has been dropped.' => 'View entfernt.',
|
||||
'View has been altered.' => 'View geändert.',
|
||||
'View has been created.' => 'View erstellt.',
|
||||
'View has been dropped.' => 'View wurde entfernt.',
|
||||
'View has been altered.' => 'View wurde geändert.',
|
||||
'View has been created.' => 'View wurde erstellt.',
|
||||
'Alter view' => 'View ändern',
|
||||
'Create view' => 'Neue View erstellen',
|
||||
'Create view' => 'View erstellen',
|
||||
'Name' => 'Name',
|
||||
'Process list' => 'Prozessliste',
|
||||
'%d process(es) have been killed.' => array('%d Prozess gestoppt.', '%d Prozesse gestoppt.'),
|
||||
'Kill' => 'Anhalten',
|
||||
'Parameter name' => 'Name des Parameters',
|
||||
'Database schema' => 'Datenbankschema',
|
||||
'Create procedure' => 'Neue Prozedur',
|
||||
'Create function' => 'Neue Funktion',
|
||||
'Routine has been dropped.' => 'Prozedur entfernt.',
|
||||
'Routine has been altered.' => 'Prozedur geändert.',
|
||||
'Routine has been created.' => 'Prozedur erstellt.',
|
||||
'Create procedure' => 'Prozedur erstellen',
|
||||
'Create function' => 'Funktion erstellen',
|
||||
'Routine has been dropped.' => 'Routine wurde entfernt.',
|
||||
'Routine has been altered.' => 'Routine wurde geändert.',
|
||||
'Routine has been created.' => 'Routine wurde erstellt.',
|
||||
'Alter function' => 'Funktion ändern',
|
||||
'Alter procedure' => 'Prozedur ändern',
|
||||
'Return type' => 'Typ des Rückgabewertes',
|
||||
'Add trigger' => 'Trigger hinzufügen',
|
||||
'Trigger has been dropped.' => 'Trigger entfernt.',
|
||||
'Trigger has been altered.' => 'Trigger geändert.',
|
||||
'Trigger has been created.' => 'Trigger erstellt.',
|
||||
'Trigger has been dropped.' => 'Trigger wurde entfernt.',
|
||||
'Trigger has been altered.' => 'Trigger wurde geändert.',
|
||||
'Trigger has been created.' => 'Trigger wurde erstellt.',
|
||||
'Alter trigger' => 'Trigger ändern',
|
||||
'Create trigger' => 'Trigger hinzufügen',
|
||||
'Create trigger' => 'Trigger erstellen',
|
||||
'Time' => 'Zeitpunkt',
|
||||
'Event' => 'Ereignis',
|
||||
'%s version: %s through PHP extension %s' => 'Version %s: %s, mit PHP-Erweiterung %s',
|
||||
'%s version: %s through PHP extension %s' => 'Version %s: %s mit PHP-Erweiterung %s',
|
||||
'%d row(s)' => array('%d Datensatz', '%d Datensätze'),
|
||||
'Remove' => 'Entfernen',
|
||||
'Are you sure?' => 'Sind Sie sicher ?',
|
||||
'Are you sure?' => 'Sind Sie sicher?',
|
||||
'Privileges' => 'Rechte',
|
||||
'Create user' => 'Neuer Benutzer',
|
||||
'User has been dropped.' => 'Benutzer entfernt.',
|
||||
'User has been altered.' => 'Benutzer geändert.',
|
||||
'User has been created.' => 'Benutzer erstellt.',
|
||||
'Create user' => 'Benutzer erstellen',
|
||||
'User has been dropped.' => 'Benutzer wurde entfernt.',
|
||||
'User has been altered.' => 'Benutzer wurde geändert.',
|
||||
'User has been created.' => 'Benutzer wurde erstellt.',
|
||||
'Hashed' => 'Hashed',
|
||||
'Column' => 'Spalte',
|
||||
'Routine' => 'Rutine',
|
||||
'Routine' => 'Routine',
|
||||
'Grant' => 'Erlauben',
|
||||
'Revoke' => 'Verbieten',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'POST data zu gross. Reduzieren Sie die Grösse oder vergrössern Sie den Wert %s in der Konfiguration.',
|
||||
'Revoke' => 'Widerrufen',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'POST-Daten sind zu groß. Reduzieren Sie die Größe oder vergrößern Sie den Wert %s in der Konfiguration.',
|
||||
'Logged as: %s' => 'Angemeldet als: %s',
|
||||
'Move up' => 'Nach oben',
|
||||
'Move down' => 'Nach unten',
|
||||
'Functions' => 'Funktionen',
|
||||
'Aggregation' => 'Agregationen',
|
||||
'Aggregation' => 'Aggregationen',
|
||||
'Export' => 'Exportieren',
|
||||
'Output' => 'Ergebnis',
|
||||
'open' => 'anzeigen',
|
||||
@@ -154,9 +152,9 @@ $translations = array(
|
||||
'Format' => 'Format',
|
||||
'Tables' => 'Tabellen',
|
||||
'Data' => 'Daten',
|
||||
'Event has been dropped.' => 'Ereignis entfernt.',
|
||||
'Event has been altered.' => 'Ereignis geändert.',
|
||||
'Event has been created.' => 'Ereignis erstellt.',
|
||||
'Event has been dropped.' => 'Ereignis wurde entfernt.',
|
||||
'Event has been altered.' => 'Ereignis wurde geändert.',
|
||||
'Event has been created.' => 'Ereignis wurde erstellt.',
|
||||
'Alter event' => 'Ereignis ändern',
|
||||
'Create event' => 'Ereignis erstellen',
|
||||
'At given time' => 'Zur angegebenen Zeit',
|
||||
@@ -168,34 +166,35 @@ $translations = array(
|
||||
'Status' => 'Status',
|
||||
'On completion preserve' => 'Nach der Ausführung erhalten',
|
||||
'Tables and views' => 'Tabellen und Views',
|
||||
'Data Length' => 'Datengrösse',
|
||||
'Index Length' => 'Indexgrösse',
|
||||
'Data Length' => 'Datengröße',
|
||||
'Index Length' => 'Indexgröße',
|
||||
'Data Free' => 'Freier Bereich',
|
||||
'Collation' => 'Collation',
|
||||
'Collation' => 'Kollation',
|
||||
'Analyze' => 'Analysieren',
|
||||
'Optimize' => 'Optimieren',
|
||||
'Check' => 'Prüfen',
|
||||
'Repair' => 'Reparieren',
|
||||
'Truncate' => 'Entleeren (truncate)',
|
||||
'Tables have been truncated.' => 'Tabellen sind entleert worden (truncate).',
|
||||
'Truncate' => 'Leeren (truncate)',
|
||||
'Tables have been truncated.' => 'Tabellen wurden geleert (truncate).',
|
||||
'Rows' => 'Datensätze',
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Tables have been moved.' => 'Tabellen verschoben.',
|
||||
'Move to other database' => 'In andere Datenbank verschieben',
|
||||
'Move' => 'Verschieben',
|
||||
'Engine' => 'Motor',
|
||||
'Engine' => 'Speicher-Engine',
|
||||
'Save and continue edit' => 'Speichern und weiter bearbeiten',
|
||||
'original' => 'Original',
|
||||
'Tables have been dropped.' => 'Tabellen wurden entfernt (drop).',
|
||||
'%d item(s) have been affected.' => '%d Artikel betroffen.',
|
||||
'whole result' => 'Gesamtergebnis',
|
||||
'Clone' => 'Klonen',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Die maximal erlaubte Anzahl der Felder ist überschritten. Bitte %s und %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',
|
||||
'Partitions' => 'Partitionen',
|
||||
'Partition name' => 'Name der Partition',
|
||||
'Values' => 'Werte',
|
||||
'%d row(s) have been imported.' => array('%d Datensatz importiert.', '%d Datensätze wurden importiert.'),
|
||||
'%d row(s) have been imported.' => array('%d Datensatz wurde importiert.', '%d Datensätze wurden importiert.'),
|
||||
'anywhere' => 'beliebig',
|
||||
'Import' => 'Importieren',
|
||||
'Stop on error' => 'Bei Fehler anhalten',
|
||||
@@ -204,50 +203,49 @@ $translations = array(
|
||||
'[yyyy]-mm-dd' => 't.m.[jjjj]',
|
||||
'History' => 'History',
|
||||
'Variables' => 'Variablen',
|
||||
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Spalten des Ursprungs und des Zieles müssen vom gleichen Datentyp sein, es muss unter den Zielspalten ein Index existieren und die referenzierten Daten müssen existieren.',
|
||||
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Quell- und Zielspalten müssen vom gleichen Datentyp sein, es muss unter den Zielspalten ein Index existieren und die referenzierten Daten müssen existieren.',
|
||||
'Relations' => 'Relationen',
|
||||
'Run file' => 'Datei ausführen',
|
||||
'Clear' => 'Entleeren',
|
||||
'Maximum allowed file size is %sB.' => 'Maximal erlaubte Dateigrösse ist %sB.',
|
||||
'Clear' => 'Löschen',
|
||||
'Maximum allowed file size is %sB.' => 'Maximal erlaubte Dateigröße ist %sB.',
|
||||
'Numbers' => 'Zahlen',
|
||||
'Date and time' => 'Datum oder Zeit',
|
||||
'Date and time' => 'Datum und Zeit',
|
||||
'Strings' => 'Zeichenketten',
|
||||
'Binary' => 'Binär',
|
||||
'Lists' => 'Listen',
|
||||
'Editor' => 'Editor',
|
||||
'E-mail' => 'E-mail',
|
||||
'E-mail' => 'E-Mail',
|
||||
'From' => 'Von',
|
||||
'Subject' => 'Betreff',
|
||||
'Send' => 'Abschicken',
|
||||
'%d e-mail(s) have been sent.' => array('%d e-mail abgeschickt.', '%d e-mails abgeschickt.'),
|
||||
'%d e-mail(s) have been sent.' => array('%d E-Mail abgeschickt.', '%d E-Mails abgeschickt.'),
|
||||
'Webserver file %s' => 'Webserver Datei %s',
|
||||
'File does not exist.' => 'Datei existiert nicht.',
|
||||
'%d in total' => '%d insgesamt',
|
||||
'Permanent login' => 'Passwort speichern',
|
||||
'Databases have been dropped.' => 'Datenbanken entfernt.',
|
||||
'Databases have been dropped.' => 'Datenbanken wurden entfernt.',
|
||||
'Search data in tables' => 'Suche in Tabellen',
|
||||
'schema' => 'Schema',
|
||||
'Schema' => 'Schema',
|
||||
'Alter schema' => 'Schema ändern',
|
||||
'Create schema' => 'Neues Schema',
|
||||
'Create schema' => 'Schema erstellen',
|
||||
'Schema has been dropped.' => 'Schema wurde gelöscht.',
|
||||
'Schema has been created.' => 'Neues Schema erstellt.',
|
||||
'Schema has been altered.' => 'Schema geändert.',
|
||||
'Sequences' => 'Sequenz',
|
||||
'Create sequence' => 'Neue Sequenz',
|
||||
'Schema has been created.' => 'Schema wurde erstellt.',
|
||||
'Schema has been altered.' => 'Schema wurde geändert.',
|
||||
'Sequences' => 'Sequenzen',
|
||||
'Create sequence' => 'Sequenz erstellen',
|
||||
'Alter sequence' => 'Sequenz ändern',
|
||||
'Sequence has been dropped.' => 'Sequenz gelöscht.',
|
||||
'Sequence has been created.' => 'Neue Sequenz erstellt.',
|
||||
'Sequence has been altered.' => 'Sequenz geändert.',
|
||||
'User types' => 'Benutzer-definierte Typen',
|
||||
'Sequence has been dropped.' => 'Sequenz wurde gelöscht.',
|
||||
'Sequence has been created.' => 'Sequenz wurde erstellt.',
|
||||
'Sequence has been altered.' => 'Sequenz wurde geändert.',
|
||||
'User types' => 'Benutzerdefinierte Typen',
|
||||
'Create type' => 'Typ erstellen',
|
||||
'Alter type' => 'Typ ändern',
|
||||
'Type has been dropped.' => 'Typ gelöscht.',
|
||||
'Type has been created.' => 'Typ erstellt.',
|
||||
'Double click on a value to modify it.' => 'Doppelklick zum Bearbeiten des Wertes.',
|
||||
'Use edit link to modify this value.' => 'Benutzen Sie den Link zum editieren dieses Wertes.',
|
||||
'Type has been dropped.' => 'Typ wurde gelöscht.',
|
||||
'Type has been created.' => 'Typ wurde erstellt.',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+Klick zum Bearbeiten des Wertes.',
|
||||
'Use edit link to modify this value.' => 'Benutzen Sie den Link zum Bearbeiten dieses Wertes.',
|
||||
'last' => 'letzte',
|
||||
'From server' => 'Im Server',
|
||||
'From server' => 'Vom Server',
|
||||
'System' => 'Datenbank System',
|
||||
'Select data' => 'Daten auswählen',
|
||||
'Show structure' => 'Struktur anzeigen',
|
||||
@@ -256,9 +254,8 @@ $translations = array(
|
||||
'Geometry' => 'Geometrie',
|
||||
'File exists.' => 'Datei existiert schon.',
|
||||
'Attachments' => 'Anhänge',
|
||||
'%d query(s) executed OK.' => array('SQL-Query erfolgreich ausgeführt.', '%d SQL-Queries erfolgreich ausgeführt.'),
|
||||
'%d query(s) executed OK.' => array('SQL-Abfrage erfolgreich ausgeführt.', '%d SQL-Abfragen erfolgreich ausgeführt.'),
|
||||
'Show only errors' => 'Nur Fehler anzeigen',
|
||||
'Last page' => 'Letzte Seite',
|
||||
'Refresh' => 'Aktualisieren',
|
||||
'Invalid schema.' => 'Schema nicht gültig.',
|
||||
'Please use one of the extensions %s.' => 'Bitte einen der Dateitypen %s benutzen.',
|
||||
@@ -267,7 +264,26 @@ $translations = array(
|
||||
'Tables have been copied.' => 'Tabellen wurden kopiert.',
|
||||
'Copy' => 'Kopieren',
|
||||
'Permanent link' => 'Dauerhafter Link',
|
||||
'Edit all' => 'Alle ändern',
|
||||
'Resend POST data?' => 'POST data noch einmal senden ?',
|
||||
'Edit all' => 'Alle bearbeiten',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
'Compute' => 'kalkulieren',
|
||||
'Size' => 'Größe',
|
||||
'Modify' => 'Ändern',
|
||||
'Selected' => 'Ausgewählte',
|
||||
'Default value' => 'Vorgabewert festlegen',
|
||||
'Limit rows' => 'Datensätze begrenzen',
|
||||
'Tables have been optimized.' => 'Tabellen wurden optimiert.',
|
||||
'File must be in UTF-8 encoding.' => 'Die Datei muss UTF-8 kodiert sein.',
|
||||
'Loading' => 'Lade',
|
||||
'Load more data' => 'Mehr Daten laden',
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Zu viele erfolglose Login-Versuche. Bitte probieren Sie es in %d Minute noch einmal.', 'Zu viele erfolglose Login-Versuche. Bitte probieren Sie es in %d Minuten noch einmal.'),
|
||||
'If you did not send this request from Adminer then close this page.' => 'Wenn Sie diese Anfrage nicht von Adminer gesendet haben, schließen Sie diese Seite.',
|
||||
'You can upload a big SQL file via FTP and import it from server.' => 'Sie können eine große SQL-Datei per FTP hochladen und dann vom Server importieren.',
|
||||
'You are offline.' => 'Sie sind offline.',
|
||||
'You have no privileges to update this table.' => 'Sie haben keine Rechte, um diese Tabelle zu aktualisieren.' ,
|
||||
'Saving' => 'Speichere',
|
||||
'yes' => 'ja',
|
||||
'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.',
|
||||
'%d / ' => '%d / ',
|
||||
);
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Too many unsuccessful logins, try again in %d minute.', 'Too many unsuccessful logins, try again in %d minutes.'),
|
||||
'Query executed OK, %d row(s) affected.' => array('Query executed OK, %d row affected.', 'Query executed OK, %d rows affected.'),
|
||||
'%d byte(s)' => array('%d byte', '%d bytes'),
|
||||
'Routine has been called, %d row(s) affected.' => array('Routine has been called, %d row affected.', 'Routine has been called, %d rows affected.'),
|
||||
'%d process(es) have been killed.' => array('%d process has been killed.', '%d processes have been killed.'),
|
||||
'%d / ' => '%d / ',
|
||||
'%d row(s)' => array('%d row', '%d rows'),
|
||||
'%d item(s) have been affected.' => array('%d item has been affected.', '%d items have been affected.'),
|
||||
'%d row(s) have been imported.' => array('%d row has been imported.', '%d rows have been imported.'),
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Login' => 'Login',
|
||||
'Logout successful.' => 'Salida exitosa.',
|
||||
'Invalid credentials.' => 'Identificacion inválida.',
|
||||
'Logout successful.' => 'Sesión finalizada con éxito.',
|
||||
'Invalid credentials.' => 'Usuario y/o clave de acceso incorrecta.',
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Usuario',
|
||||
'Password' => 'Contraseña',
|
||||
'Select database' => 'Seleccionar Base de datos',
|
||||
'Invalid database.' => 'Base de datos inválida.',
|
||||
'Create new database' => 'Ingrese nueva base de datos',
|
||||
'Invalid database.' => 'Base de datos incorrecta.',
|
||||
'Create new database' => 'Crear nueva base de datos',
|
||||
'Table has been dropped.' => 'Tabla eliminada.',
|
||||
'Table has been altered.' => 'Tabla modificada.',
|
||||
'Table has been created.' => 'Tabla creada.',
|
||||
'Alter table' => 'Modifique estructura',
|
||||
'Create table' => 'Cree tabla',
|
||||
'Alter table' => 'Modificar tabla',
|
||||
'Create table' => 'Crear tabla',
|
||||
'Table name' => 'Nombre de la tabla',
|
||||
'engine' => 'motor',
|
||||
'collation' => 'colación',
|
||||
@@ -31,23 +31,21 @@ $translations = array(
|
||||
'Alter database' => 'Modificar Base de datos',
|
||||
'Create database' => 'Crear Base de datos',
|
||||
'SQL command' => 'Comando SQL',
|
||||
'Dump' => 'Export',
|
||||
'Logout' => 'Logout',
|
||||
'Logout' => 'Cerrar sesión',
|
||||
'database' => 'base de datos',
|
||||
'Use' => 'Usar',
|
||||
'No tables.' => 'No existen tablas.',
|
||||
'select' => 'registros',
|
||||
'Create new table' => 'Nueva tabla',
|
||||
'Item has been deleted.' => 'Registro eliminado.',
|
||||
'Item has been updated.' => 'Registro modificado.',
|
||||
'Item%s has been inserted.' => 'Registro%s insertado.',
|
||||
'Edit' => 'Modificar',
|
||||
'Insert' => 'Agregar',
|
||||
'Save and insert next' => 'Guardar e insertar otro',
|
||||
'Save and insert next' => 'Guardar e insertar siguiente',
|
||||
'Delete' => 'Eliminar',
|
||||
'Database' => 'Base de datos',
|
||||
'Routines' => 'Procedimientos',
|
||||
'Indexes have been altered.' => 'Indices modificados.',
|
||||
'Indexes have been altered.' => 'Indices actualizados.',
|
||||
'Indexes' => 'Indices',
|
||||
'Alter indexes' => 'Modificar indices',
|
||||
'Add next' => 'Agregar',
|
||||
@@ -57,33 +55,33 @@ $translations = array(
|
||||
'Search' => 'Condición',
|
||||
'Sort' => 'Ordenar',
|
||||
'descending' => 'descendiente',
|
||||
'Limit' => 'Limit',
|
||||
'Limit' => 'Limite',
|
||||
'No rows.' => 'No existen registros.',
|
||||
'Action' => 'Acción',
|
||||
'edit' => 'modificar',
|
||||
'Page' => 'Página',
|
||||
'Query executed OK, %d row(s) affected.' => array('Consulta ejecutada, %d registro afectado.', 'Consulta ejecutada, %d registros afectados.'),
|
||||
'Error in query' => 'Error en consulta',
|
||||
'Error in query' => 'Error al ejecutar consulta',
|
||||
'Execute' => 'Ejecutar',
|
||||
'Table' => 'Tabla',
|
||||
'Foreign keys' => 'Claves foráneas',
|
||||
'Triggers' => 'Triggers',
|
||||
'View' => 'Vistas',
|
||||
'Foreign keys' => 'Claves externas',
|
||||
'Triggers' => 'Disparadores',
|
||||
'View' => 'Vista',
|
||||
'Unable to select the table' => 'No es posible seleccionar la tabla',
|
||||
'Invalid CSRF token. Send the form again.' => 'Token CSRF inválido. Vuelva a enviar los datos del formulario.',
|
||||
'Comment' => 'Comentario',
|
||||
'Default values' => 'Valores predeterminados',
|
||||
'%d byte(s)' => array('%d byte', '%d bytes'),
|
||||
'No commands to execute.' => 'No hay comando para ejecutar.',
|
||||
'Unable to upload a file.' => 'No es posible importar archivo.',
|
||||
'No commands to execute.' => 'No es posible ejecutar ningún comando.',
|
||||
'Unable to upload a file.' => 'No es posible importar el archivo.',
|
||||
'File upload' => 'Importar archivo',
|
||||
'File uploads are disabled.' => 'Importación de archivos deshablilitado.',
|
||||
'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.'),
|
||||
'Call' => 'Llamar',
|
||||
'No extension' => 'No hay extension',
|
||||
'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 expired, please login again.' => 'Sesión expirada, por favor ingrese su clave de nuevo.',
|
||||
'Session expired, please login again.' => 'Sesión caducada, por favor escriba su clave de nuevo.',
|
||||
'Text length' => 'Longitud de texto',
|
||||
'Foreign key has been dropped.' => 'Clave externa eliminada.',
|
||||
'Foreign key has been altered.' => 'Clave externa modificada.',
|
||||
@@ -95,16 +93,16 @@ $translations = array(
|
||||
'Target' => 'Destino',
|
||||
'Add column' => 'Agregar columna',
|
||||
'Alter' => 'Modificar',
|
||||
'Add foreign key' => 'Agregar clave foránea',
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Add foreign key' => 'Agregar clave externa',
|
||||
'ON DELETE' => 'AL BORRAR',
|
||||
'ON UPDATE' => 'AL ACTUALIZAR',
|
||||
'Index Type' => 'Tipo de índice',
|
||||
'Column (length)' => 'Columna (longitud)',
|
||||
'View has been dropped.' => 'Vista eliminada.',
|
||||
'View has been altered.' => 'Vista modificada.',
|
||||
'View has been created.' => 'Vista creada.',
|
||||
'Alter view' => 'Modificar vista',
|
||||
'Create view' => 'Cear vista',
|
||||
'Create view' => 'Crear vista',
|
||||
'Name' => 'Nombre',
|
||||
'Process list' => 'Lista de procesos',
|
||||
'%d process(es) have been killed.' => array('%d proceso detenido.', '%d procesos detenidos.'),
|
||||
@@ -118,16 +116,16 @@ $translations = array(
|
||||
'Routine has been created.' => 'Procedimiento creado.',
|
||||
'Alter function' => 'Modificar Función',
|
||||
'Alter procedure' => 'Modificar procedimiento',
|
||||
'Return type' => 'Tipo de valor de regreso',
|
||||
'Add trigger' => 'Agregar trigger',
|
||||
'Trigger has been dropped.' => 'Trigger eliminado.',
|
||||
'Trigger has been altered.' => 'Trigger modificado.',
|
||||
'Trigger has been created.' => 'Trigger creado.',
|
||||
'Alter trigger' => 'Modificar Trigger',
|
||||
'Create trigger' => 'Agregar Trigger',
|
||||
'Return type' => 'Tipo de valor de vuelta',
|
||||
'Add trigger' => 'Agregar disparador',
|
||||
'Trigger has been dropped.' => 'Disparador eliminado.',
|
||||
'Trigger has been altered.' => 'Disparador modificado.',
|
||||
'Trigger has been created.' => 'Disparador creado.',
|
||||
'Alter trigger' => 'Modificar Disparador',
|
||||
'Create trigger' => 'Agregar Disparador',
|
||||
'Time' => 'Tiempo',
|
||||
'Event' => 'Evento',
|
||||
'%s version: %s through PHP extension %s' => 'Versión %s: %s a través de extensión 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'),
|
||||
'Remove' => 'Eliminar',
|
||||
'Are you sure?' => 'Está seguro?',
|
||||
@@ -146,7 +144,7 @@ $translations = array(
|
||||
'Move up' => 'Mover arriba',
|
||||
'Move down' => 'Mover abajo',
|
||||
'Functions' => 'Funciones',
|
||||
'Aggregation' => 'Agregaciones',
|
||||
'Aggregation' => 'Agregados',
|
||||
'Export' => 'Exportar',
|
||||
'Output' => 'Salida',
|
||||
'open' => 'mostrar',
|
||||
@@ -159,14 +157,14 @@ $translations = array(
|
||||
'Event has been created.' => 'Evento creado.',
|
||||
'Alter event' => 'Modificar Evento',
|
||||
'Create event' => 'Crear Evento',
|
||||
'At given time' => 'A hora determinada',
|
||||
'At given time' => 'En el momento indicado',
|
||||
'Every' => 'Cada',
|
||||
'Events' => 'Eventos',
|
||||
'Schedule' => 'Agenda',
|
||||
'Start' => 'Inicio',
|
||||
'End' => 'Fin',
|
||||
'Status' => 'Estado',
|
||||
'On completion preserve' => 'Al completar preservar',
|
||||
'On completion preserve' => 'Al completar mantener',
|
||||
'Tables and views' => 'Tablas y vistas',
|
||||
'Data Length' => 'Longitud de datos',
|
||||
'Index Length' => 'Longitud de índice',
|
||||
@@ -177,9 +175,10 @@ $translations = array(
|
||||
'Check' => 'Comprobar',
|
||||
'Repair' => 'Reparar',
|
||||
'Truncate' => 'Vaciar',
|
||||
'Tables have been truncated.' => 'Tablas vaciadas (truncate).',
|
||||
'Tables have been truncated.' => 'Las tablas han sido vaciadas.',
|
||||
'Rows' => 'Registros',
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Tables have been moved.' => 'Se movieron las tablas.',
|
||||
'Move to other database' => 'Mover a otra base de datos',
|
||||
'Move' => 'Mover',
|
||||
@@ -187,10 +186,10 @@ $translations = array(
|
||||
'Save and continue edit' => 'Guardar y continuar editando',
|
||||
'original' => 'original',
|
||||
'Tables have been dropped.' => 'Tablas eliminadas.',
|
||||
'%d item(s) have been affected.' => array('%d ítem afectado.', '%d itemes afectados.'),
|
||||
'%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 and %s.' => 'Cantida máxima de campos permitidos excedidos. Por favor aumente %s y %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',
|
||||
'Partitions' => 'Particiones',
|
||||
'Partition name' => 'Nombre de Partición',
|
||||
@@ -202,13 +201,13 @@ $translations = array(
|
||||
'%.3f s' => '%.3f s',
|
||||
'$1-$3-$5' => '$5/$3/$1',
|
||||
'[yyyy]-mm-dd' => 'dd/mm/[aaaa]',
|
||||
'History' => 'History',
|
||||
'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.' => 'Las columnas de origen y destino deben ser del mismo tipo, debe existir un índice entre las columnas del destino y el registro referenciado debe existir.',
|
||||
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Las columnas de origen y destino deben ser del mismo tipo, debe existir un índice entre las columnas del destino y el registro referenciado debe existir también.',
|
||||
'Relations' => 'Relaciones',
|
||||
'Run file' => 'Ejecutar Archivo',
|
||||
'Clear' => 'Vaciar',
|
||||
'Maximum allowed file size is %sB.' => 'Tamaño máximo de archivo es %sB.',
|
||||
'Maximum allowed file size is %sB.' => 'El tamaño máximo de archivo es %sB.',
|
||||
'Numbers' => 'Números',
|
||||
'Date and time' => 'Fecha y hora',
|
||||
'Strings' => 'Cadena',
|
||||
@@ -221,12 +220,11 @@ $translations = array(
|
||||
'Send' => 'Enviar',
|
||||
'%d e-mail(s) have been sent.' => array('%d email enviado.', '%d emails enviados.'),
|
||||
'Webserver file %s' => 'Archivo de servidor web %s',
|
||||
'File does not exist.' => 'Archivo no existe.',
|
||||
'File does not exist.' => 'Ese archivo no existe.',
|
||||
'%d in total' => '%d en total',
|
||||
'Permanent login' => 'Guardar contraseña',
|
||||
'Databases have been dropped.' => 'Bases de datos eliminadas.',
|
||||
'Search data in tables' => 'Buscar datos en tablas',
|
||||
'schema' => 'esquema',
|
||||
'Schema' => 'Esquema',
|
||||
'Alter schema' => 'Modificar esquema',
|
||||
'Create schema' => 'Crear esquema',
|
||||
@@ -239,13 +237,13 @@ $translations = array(
|
||||
'Sequence has been dropped.' => 'Secuencia eliminada.',
|
||||
'Sequence has been created.' => 'Secuencia creada.',
|
||||
'Sequence has been altered.' => 'Secuencia modificada.',
|
||||
'User types' => 'Tipos definido por el usuario',
|
||||
'User types' => 'Tipos definidos por el usuario',
|
||||
'Create type' => 'Crear tipo',
|
||||
'Alter type' => 'Modificar tipo',
|
||||
'Type has been dropped.' => 'Tipo eliminado.',
|
||||
'Type has been created.' => 'Tipo creado.',
|
||||
'Double click on a value to modify it.' => 'Doble-clic sobre el valor para editarlo.',
|
||||
'Use edit link to modify this value.' => 'Utilice el enlace de modificar para realizar los cambios.',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+clic sobre el valor para editarlo.',
|
||||
'Use edit link to modify this value.' => 'Utilice el enlace de edición para realizar cambios.',
|
||||
'last' => 'último',
|
||||
'From server' => 'Desde servidor',
|
||||
'System' => 'Motor de base de datos',
|
||||
@@ -254,11 +252,10 @@ $translations = array(
|
||||
'empty' => 'ningúno',
|
||||
'Network' => 'Red',
|
||||
'Geometry' => 'Geometría',
|
||||
'File exists.' => 'Archivo ya existe.',
|
||||
'File exists.' => 'Ese archivo ya existe.',
|
||||
'Attachments' => 'Adjuntos',
|
||||
'%d query(s) executed OK.' => array('%d sentencia sql ejecutada correctamente.', '%d sentencias sql ejecutadas correctamente.'),
|
||||
'Show only errors' => 'Mostrar solamente errores',
|
||||
'Last page' => 'Ultima página',
|
||||
'Refresh' => 'Refrescar',
|
||||
'Invalid schema.' => 'Esquema inválido.',
|
||||
'Please use one of the extensions %s.' => 'Por favor use una de las extensiones %s.',
|
||||
@@ -268,6 +265,5 @@ $translations = array(
|
||||
'Copy' => 'Copiar',
|
||||
'Permanent link' => 'Enlace permanente',
|
||||
'Edit all' => 'Editar todos',
|
||||
'Resend POST data?' => 'Volver a enviar POST data?',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
|
||||
@@ -31,13 +31,11 @@ $translations = array(
|
||||
'Alter database' => 'Muuda andmebaasi',
|
||||
'Create database' => 'Loo uus andmebaas',
|
||||
'SQL command' => 'SQL-Päring',
|
||||
'Dump' => 'Ekspordi',
|
||||
'Logout' => 'Logi välja',
|
||||
'database' => 'andmebaas',
|
||||
'Use' => 'Kasuta',
|
||||
'No tables.' => 'Tabeleid ei leitud.',
|
||||
'select' => 'kuva',
|
||||
'Create new table' => 'Loo uus tabel',
|
||||
'Item has been deleted.' => 'Kustutamine õnnestus.',
|
||||
'Item has been updated.' => 'Uuendamine õnnestus.',
|
||||
'Item%s has been inserted.' => 'Kirje%s on edukalt lisatud.',
|
||||
@@ -180,6 +178,7 @@ $translations = array(
|
||||
'Data Free' => 'Vaba ruumi',
|
||||
'Rows' => 'Ridu',
|
||||
',' => ',',
|
||||
'0123456789' => '0123456789',
|
||||
'Analyze' => 'Analüüsi',
|
||||
'Optimize' => 'Optimeeri',
|
||||
'Check' => 'Kontrolli',
|
||||
@@ -190,7 +189,7 @@ $translations = array(
|
||||
'%d item(s) have been affected.' => 'Mõjutatud kirjeid: %d.',
|
||||
'whole result' => 'Täielikud tulemused',
|
||||
'Clone' => 'Kloon',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Maksimaalne väljade arv ületatud. Palun suurendage %s ja %s.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maksimaalne väljade arv ületatud. Palun suurendage %s.',
|
||||
'Partition by' => 'Partitsiooni',
|
||||
'Partitions' => 'Partitsioonid',
|
||||
'Partition name' => 'Partitsiooni nimi',
|
||||
@@ -226,7 +225,6 @@ $translations = array(
|
||||
'Permanent login' => 'Jäta mind meelde',
|
||||
'Databases have been dropped.' => 'Andmebaasid on edukalt kustutatud.',
|
||||
'Search data in tables' => 'Otsi kogu andmebaasist',
|
||||
'schema' => 'struktuur',
|
||||
'Schema' => 'Struktuur',
|
||||
'Alter schema' => 'Muuda struktuuri',
|
||||
'Create schema' => 'Loo struktuur',
|
||||
@@ -244,7 +242,7 @@ $translations = array(
|
||||
'Alter type' => 'Muuda tüüpi',
|
||||
'Type has been dropped.' => 'Tüüp on edukalt kustutatud.',
|
||||
'Type has been created.' => 'Tüüp on edukalt loodud.',
|
||||
'Double click on a value to modify it.' => 'Väärtuse muutmiseks topelt-kliki sellel.',
|
||||
'Ctrl+click on a value to modify it.' => 'Väärtuse muutmiseks Ctrl+kliki sellel.',
|
||||
'Use edit link to modify this value.' => 'Väärtuse muutmiseks kasuta muutmislinki.',
|
||||
'last' => 'viimane',
|
||||
'From server' => 'Serverist',
|
||||
@@ -258,7 +256,6 @@ $translations = array(
|
||||
'Attachments' => 'Manused',
|
||||
'%d query(s) executed OK.' => array('%d päring edukalt käivitatud.', '%d päringut edukalt käivitatud.'),
|
||||
'Show only errors' => 'Kuva vaid veateateid',
|
||||
'Last page' => 'Viimane lehekülg',
|
||||
'Refresh' => 'Uuenda',
|
||||
'Invalid schema.' => 'Sobimatu skeema.',
|
||||
'Please use one of the extensions %s.' => 'Palun kasuta üht laiendustest %s.',
|
||||
@@ -268,6 +265,5 @@ $translations = array(
|
||||
'Copy' => 'Kopeeri',
|
||||
'Permanent link' => 'Püsilink',
|
||||
'Edit all' => 'Muuda kõiki',
|
||||
'Resend POST data?' => 'Saada POST andmed uuesti?',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
|
||||
336
adminer/lang/fa.inc.php
Normal 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="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> کرده تا آن را دائمی سازید.',
|
||||
'Language' => 'زبان',
|
||||
'Invalid CSRF token. Send the form again.' => 'CSRF token نامعتبر است. دوباره سعی کنید.',
|
||||
'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 توسعه پی اچ پی %s',
|
||||
'Refresh' => 'بازیابی',
|
||||
|
||||
// text direction - 'ltr' or 'rtl'
|
||||
'ltr' => 'rtl',
|
||||
|
||||
'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.' => '%d فرآیند متوقف شد.',
|
||||
'Kill' => 'حذف فرآیند',
|
||||
|
||||
'Variables' => 'متغیرها',
|
||||
'Status' => 'وضعیت',
|
||||
|
||||
'SQL command' => 'دستور SQL',
|
||||
'%d query(s) executed OK.' => '%d کوئری اجرا شد.',
|
||||
'Query executed OK, %d row(s) affected.' => 'کوئری اجرا شد. %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.' => 'پایگاه داده نامعتبر.',
|
||||
'Create new 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' => '۰۱۲۳۴۵۶۷۸۹',
|
||||
'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' => 'ایجاد نمایش',
|
||||
'Create materialized 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 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.' => 'داده مبدا و مقصد ستونها بایستی شبیه هم باشند.',
|
||||
|
||||
'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+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' => 'پست الکترونیک',
|
||||
'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' => '[yyyy]-mm-dd',
|
||||
// hint for time format - use language equivalents for hour, minute and second shortcuts
|
||||
'HH:MM:SS' => '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' => 'ویرایش نوع',
|
||||
);
|
||||
@@ -20,9 +20,9 @@ $translations = array(
|
||||
'Column name' => 'Nom de la colonne',
|
||||
'Type' => 'Type',
|
||||
'Length' => 'Longueur',
|
||||
'Auto Increment' => 'Auto increment',
|
||||
'Auto Increment' => 'Incrément automatique',
|
||||
'Options' => 'Options',
|
||||
'Save' => 'Sauvegarder',
|
||||
'Save' => 'Enregistrer',
|
||||
'Drop' => 'Supprimer',
|
||||
'Database has been created.' => 'La base de données a été créée.',
|
||||
'Database has been renamed.' => 'La base de données a été renommée.',
|
||||
@@ -30,18 +30,16 @@ $translations = array(
|
||||
'Alter database' => 'Modifier la base de données',
|
||||
'Create database' => 'Créer une base de données',
|
||||
'SQL command' => 'Requête SQL',
|
||||
'Dump' => 'Exporter',
|
||||
'Logout' => 'Déconnexion',
|
||||
'database' => 'base de données',
|
||||
'Use' => 'Utiliser',
|
||||
'No tables.' => 'Aucune table.',
|
||||
'select' => 'select',
|
||||
'Create new table' => 'Créer une nouvelle table',
|
||||
'Item has been deleted.' => 'L\'élément a été supprimé.',
|
||||
'Item has been updated.' => 'L\'élément a été modifié.',
|
||||
'Edit' => 'Modifier',
|
||||
'Insert' => 'Insérer',
|
||||
'Save and insert next' => 'Sauvegarder et insérer le prochain',
|
||||
'Save and insert next' => 'Enr. et insérer prochain',
|
||||
'Delete' => 'Effacer',
|
||||
'Database' => 'Base de données',
|
||||
'Routines' => 'Routines',
|
||||
@@ -50,7 +48,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Modifier les index',
|
||||
'Add next' => 'Ajouter le prochain',
|
||||
'Language' => 'Langue',
|
||||
'Select' => 'Select',
|
||||
'Select' => 'Sélectionner',
|
||||
'New item' => 'Nouvel élément',
|
||||
'Search' => 'Rechercher',
|
||||
'Sort' => 'Trier',
|
||||
@@ -65,10 +63,10 @@ $translations = array(
|
||||
'Execute' => 'Exécuter',
|
||||
'Table' => 'Table',
|
||||
'Foreign keys' => 'Clés étrangères',
|
||||
'Triggers' => 'Triggers',
|
||||
'Triggers' => 'Déclencheurs',
|
||||
'View' => 'Vue',
|
||||
'Unable to select the table' => 'Impossible de sélectionner la table',
|
||||
'Invalid CSRF token. Send the form again.' => 'Token CSRF invalide. Veuillez réenvoyer le formulaire.',
|
||||
'Invalid CSRF token. Send the form again.' => 'Token CSRF invalide. Veuillez renvoyer le formulaire.',
|
||||
'Comment' => 'Commentaire',
|
||||
'Default values' => 'Valeurs par défaut',
|
||||
'%d byte(s)' => array('%d octet', '%d octets'),
|
||||
@@ -117,17 +115,17 @@ $translations = array(
|
||||
'Alter function' => 'Modifier la fonction',
|
||||
'Alter procedure' => 'Modifier la procédure',
|
||||
'Return type' => 'Type de retour',
|
||||
'Add trigger' => 'Ajouter un trigger',
|
||||
'Trigger has been dropped.' => 'Le trigger a été supprimé.',
|
||||
'Trigger has been altered.' => 'Le trigger a été modifié.',
|
||||
'Trigger has been created.' => 'Le trigger a été créé.',
|
||||
'Alter trigger' => 'Modifier un trigger',
|
||||
'Create trigger' => 'Ajouter un trigger',
|
||||
'Add trigger' => 'Ajouter un déclencheur',
|
||||
'Trigger has been dropped.' => 'Le déclencheur a été supprimé.',
|
||||
'Trigger has been altered.' => 'Le déclencheur a été modifié.',
|
||||
'Trigger has been created.' => 'Le déclencheur a été créé.',
|
||||
'Alter trigger' => 'Modifier un déclencheur',
|
||||
'Create trigger' => 'Ajouter un déclencheur',
|
||||
'Time' => 'Temps',
|
||||
'Event' => 'Évènement',
|
||||
'%d row(s)' => array('%d ligne', '%d lignes'),
|
||||
'Remove' => 'Effacer',
|
||||
'Are you sure?' => 'Êtes-vous certain ?',
|
||||
'Are you sure?' => 'Êtes-vous certain(e) ?',
|
||||
'Privileges' => 'Privilèges',
|
||||
'Create user' => 'Créer un utilisateur',
|
||||
'User has been dropped.' => 'L\'utilisateur a été effacé.',
|
||||
@@ -148,7 +146,7 @@ $translations = array(
|
||||
'Data' => 'Données',
|
||||
'Output' => 'Sortie',
|
||||
'open' => 'ouvrir',
|
||||
'save' => 'sauvegarder',
|
||||
'save' => 'enregistrer',
|
||||
'Format' => 'Format',
|
||||
'Functions' => 'Fonctions',
|
||||
'Aggregation' => 'Agrégation',
|
||||
@@ -165,7 +163,7 @@ $translations = array(
|
||||
'Events' => 'Évènements',
|
||||
'Schedule' => 'Horaire',
|
||||
'At given time' => 'À un moment précis',
|
||||
'Save and continue edit' => 'Sauvegarder et continuer l\'édition',
|
||||
'Save and continue edit' => 'Enr. et continuer édition',
|
||||
'original' => 'original',
|
||||
'Tables have been truncated.' => 'Les tables ont été tronquées.',
|
||||
'Tables have been moved.' => 'Les tables ont été déplacées.',
|
||||
@@ -178,6 +176,7 @@ $translations = array(
|
||||
'Data Free' => 'Espace inutilisé',
|
||||
'Rows' => 'Lignes',
|
||||
',' => ',',
|
||||
'0123456789' => '0123456789',
|
||||
'Analyze' => 'Analyser',
|
||||
'Optimize' => 'Optimiser',
|
||||
'Check' => 'Vérifier',
|
||||
@@ -188,12 +187,12 @@ $translations = array(
|
||||
'%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',
|
||||
'Clone' => 'Cloner',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Le nombre maximum de champs est dépassé. Veuillez augmenter %s et %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',
|
||||
'Partitions' => 'Partitions',
|
||||
'Partition name' => 'Nom de la partition',
|
||||
'Values' => 'Valeurs',
|
||||
'%d row(s) have been imported.' => array('%d ligne a été importée.','%d lignes ont été importées.'),
|
||||
'%d row(s) have been imported.' => array('%d ligne a été importée.', '%d lignes ont été importées.'),
|
||||
'anywhere' => 'n\'importe où',
|
||||
'Import' => 'Importer',
|
||||
'Stop on error' => 'Arrêter en cas d\'erreur',
|
||||
@@ -225,7 +224,6 @@ $translations = array(
|
||||
'Databases have been dropped.' => 'Les bases de données ont été supprimées.',
|
||||
'Database has been dropped.' => 'La base de données a été supprimée.',
|
||||
'Search data in tables' => 'Rechercher dans les tables',
|
||||
'schema' => 'schéma',
|
||||
'Schema' => 'Schéma',
|
||||
'Alter schema' => 'Modifier le schéma',
|
||||
'Create schema' => 'Créer un schéma',
|
||||
@@ -243,7 +241,7 @@ $translations = array(
|
||||
'Alter type' => 'Modifier le type',
|
||||
'Type has been dropped.' => 'Le type a été supprimé.',
|
||||
'Type has been created.' => 'Le type a été créé.',
|
||||
'Double click on a value to modify it.' => 'Double-cliquez sur une valeur pour la modifier.',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+cliquez sur une valeur pour la modifier.',
|
||||
'Use edit link to modify this value.' => 'Utilisez le lien "modifier" pour modifier cette valeur.',
|
||||
'last' => 'dernière',
|
||||
'From server' => 'Depuis le serveur',
|
||||
@@ -259,7 +257,6 @@ $translations = array(
|
||||
'now' => 'maintenant',
|
||||
'%d query(s) executed OK.' => array('%d requête exécutée avec succès.', '%d requêtes exécutées avec succès.'),
|
||||
'Show only errors' => 'Montrer seulement les erreurs',
|
||||
'Last page' => 'Dernière page',
|
||||
'Refresh' => 'Rafraîchir',
|
||||
'Invalid schema.' => 'Schéma invalide.',
|
||||
'Please use one of the extensions %s.' => 'Veuillez utiliser l\'une des extensions %s.',
|
||||
@@ -268,6 +265,29 @@ $translations = array(
|
||||
'Copy' => 'Copier',
|
||||
'Permanent link' => 'Lien permanent',
|
||||
'Edit all' => 'Tout modifier',
|
||||
'Resend POST data?' => 'Renvoyer les données POST ?',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
'Selected' => 'Sélectionnée(s)',
|
||||
'Modify' => 'Modification',
|
||||
'Load more data' => 'Charger plus de données',
|
||||
'Loading' => 'Chargement',
|
||||
'Tables have been optimized.' => 'Les tables ont bien été optimisées.',
|
||||
'Vacuum' => 'Vide',
|
||||
'File must be in UTF-8 encoding.' => 'Les fichiers doivent être encodés en UTF-8.',
|
||||
'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.'),
|
||||
'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.',
|
||||
'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',
|
||||
'Compute' => 'Calcul',
|
||||
'You have no privileges to update this table.' => 'Vous n\'avez pas les droits pour mettre à jour cette table.',
|
||||
'Saving' => 'Enregistrement',
|
||||
'yes' => 'oui',
|
||||
'no' => 'non',
|
||||
'Materialized View' => 'Vue matérialisée',
|
||||
'Create materialized view' => 'Créer une vue matérialisée',
|
||||
'%d / ' => '%d / ',
|
||||
'Limit rows' => 'Limiter les lignes',
|
||||
'Default value' => 'Valeur par défaut',
|
||||
'If you did not send this request from Adminer then close this page.' => 'Si vous n\'avez pas envoyé cette requête depuis Adminer, alors fermez cette page.',
|
||||
'You are offline.' => 'Vous êtes hors ligne.',
|
||||
);
|
||||
|
||||
@@ -31,13 +31,11 @@ $translations = array(
|
||||
'Alter database' => 'Adatbázis módosítása',
|
||||
'Create database' => 'Adatbázis létrehozása',
|
||||
'SQL command' => 'SQL parancs',
|
||||
'Dump' => 'Exportálás',
|
||||
'Logout' => 'Kilépés',
|
||||
'database' => 'adatbázis',
|
||||
'Use' => 'Használ',
|
||||
'No tables.' => 'Nincs tábla.',
|
||||
'select' => 'kiválasztás',
|
||||
'Create new table' => 'Új tábla',
|
||||
'Item has been deleted.' => 'A tétel törölve.',
|
||||
'Item has been updated.' => 'A tétel frissítve.',
|
||||
'Item%s has been inserted.' => '%s tétel beszúrva.',
|
||||
@@ -180,6 +178,7 @@ $translations = array(
|
||||
'Tables have been truncated.' => 'A tábla felszabadítva.',
|
||||
'Rows' => 'Oszlop',
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Tables have been moved.' => 'Táblák áthelyezve.',
|
||||
'Move to other database' => 'Áthelyezés másik adatbázisba',
|
||||
'Move' => 'Áthelyez',
|
||||
@@ -199,7 +198,7 @@ $translations = array(
|
||||
'Show structure' => 'Struktúra',
|
||||
'Select data' => 'Tartalom',
|
||||
'Stop on error' => 'Hiba esetén megáll',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'A maximális mezőszámot elérted. Növeld meg ezeket: %s, %s.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'A maximális mezőszámot elérted. Növeld meg ezeket: %s.',
|
||||
'anywhere' => 'bárhol',
|
||||
'%.3f s' => '%.3f másodperc',
|
||||
'$1-$3-$5' => '$6.$4.$1',
|
||||
@@ -233,14 +232,12 @@ $translations = array(
|
||||
'Geometry' => 'Geometria',
|
||||
'Databases have been dropped.' => 'Adatbázis eldobva.',
|
||||
'File exists.' => 'A fájl létezik.',
|
||||
'Double click on a value to modify it.' => 'Kattints kétszer az értékre a szerkesztéshez.',
|
||||
'Use edit link to modify this value.' => 'Használd a szerkesztés hivatkozást ezen érték módosításához.',
|
||||
'Alter schema' => 'Séma módosítása',
|
||||
'Create schema' => 'Séma létrehozása',
|
||||
'Schema has been dropped.' => 'Séma eldobva.',
|
||||
'Schema has been created.' => 'Séma létrejött.',
|
||||
'Schema has been altered.' => 'Séma módosult.',
|
||||
'schema' => 'séma',
|
||||
'Schema' => 'Séma',
|
||||
'Sequences' => 'Sorozatok',
|
||||
'Create sequence' => 'Sorozat létrehozása',
|
||||
@@ -259,7 +256,6 @@ $translations = array(
|
||||
'now' => 'most',
|
||||
'%d query(s) executed OK.' => '%d sikeres lekérdezés.',
|
||||
'Show only errors' => 'Csak a hibák mutatása',
|
||||
'Last page' => 'Utolsó oldal',
|
||||
'Refresh' => 'Frissítés',
|
||||
'Invalid schema.' => 'Érvénytelen séma.',
|
||||
'Please use one of the extensions %s.' => 'Használja a(z) %s kiterjesztést.',
|
||||
@@ -268,6 +264,5 @@ $translations = array(
|
||||
'Copy' => 'Másolás',
|
||||
'Permanent link' => 'Hivatkozás',
|
||||
'Edit all' => 'Összes szerkesztése',
|
||||
'Resend POST data?' => 'Újraküldi a POST adatokat?',
|
||||
'HH:MM:SS' => 'óó:pp:mm',
|
||||
);
|
||||
|
||||
317
adminer/lang/id.inc.php
Normal file
@@ -0,0 +1,317 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'System' => 'Sistem',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Pengguna',
|
||||
'Password' => 'Sandi',
|
||||
'Permanent login' => 'Masuk permanen',
|
||||
'Login' => 'Masuk',
|
||||
'Logout' => 'Keluar',
|
||||
'Logged as: %s' => 'Masuk sebagai: %s',
|
||||
'Logout successful.' => 'Berhasil keluar.',
|
||||
'Invalid credentials.' => 'Akses invalid.',
|
||||
'Language' => 'Bahasa',
|
||||
'Invalid CSRF token. Send the form again.' => 'Token CSRF invalid. Kirim ulang formulir.',
|
||||
'No extension' => 'Ekstensi tidak tersedia',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Ekstensi PHP yang didukung (%s) tidak tersedia.',
|
||||
'Session support must be enabled.' => 'Dukungan sesi harus aktif.',
|
||||
'Session expired, please login again.' => 'Sesi habis, silakan masuk lagi.',
|
||||
'%s version: %s through PHP extension %s' => 'Versi %s: %s dengan ekstensi PHP %s',
|
||||
'Refresh' => 'Segarkan',
|
||||
|
||||
// text direction - 'ltr' or 'rtl'
|
||||
'ltr' => 'ltr',
|
||||
|
||||
'Privileges' => 'Privilese',
|
||||
'Create user' => 'Buat pengguna',
|
||||
'User has been dropped.' => 'Pengguna berhasil dihapus.',
|
||||
'User has been altered.' => 'Pengguna berhasil diubah.',
|
||||
'User has been created.' => 'Pengguna berhasil dibuat.',
|
||||
'Hashed' => 'Hashed*',
|
||||
'Column' => 'Kolom',
|
||||
'Routine' => 'Rutin',
|
||||
'Grant' => 'Beri',
|
||||
'Revoke' => 'Tarik',
|
||||
|
||||
'Process list' => 'Daftar proses',
|
||||
'%d process(es) have been killed.' => '%d proses berhasil dihentikan.',
|
||||
'Kill' => 'Hentikan',
|
||||
|
||||
'Variables' => 'Variabel',
|
||||
'Status' => 'Status',
|
||||
|
||||
'SQL command' => 'Perintah SQL',
|
||||
'%d query(s) executed OK.' => '%d kueri berhasil dijalankan.',
|
||||
'Query executed OK, %d row(s) affected.' => 'Kueri berhasil, %d baris terpengaruh.',
|
||||
'No commands to execute.' => 'Tiada perintah untuk dijalankan.',
|
||||
'Error in query' => 'Kesalahan dalam kueri',
|
||||
'Execute' => 'Jalankan',
|
||||
'Stop on error' => 'Hentikan pada kesalahan',
|
||||
'Show only errors' => 'Hanya tampilkan kesalahan',
|
||||
// sprintf() format for time of the command
|
||||
'%.3f s' => '%.3f s',
|
||||
'History' => 'Riwayat',
|
||||
'Clear' => 'Bersihkan',
|
||||
'Edit all' => 'Edit semua',
|
||||
|
||||
'File upload' => 'Unggah berkas',
|
||||
'From server' => 'Dari server',
|
||||
'Webserver file %s' => 'Berkas server web %s',
|
||||
'Run file' => 'Jalankan berkas',
|
||||
'File does not exist.' => 'Berkas tidak ditemukan.',
|
||||
'File uploads are disabled.' => 'Pengunggahan berkas dimatikan.',
|
||||
'Unable to upload a file.' => 'Tidak dapat mengunggah berkas.',
|
||||
'Maximum allowed file size is %sB.' => 'Besar berkas yang diizinkan adalah %s bita.',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Data POST terlalu besar. Kurangi data atau perbesar pengarah konfigurasi %s.',
|
||||
|
||||
'Export' => 'Ekspor',
|
||||
'Output' => 'Hasil',
|
||||
'open' => 'buka',
|
||||
'save' => 'simpan',
|
||||
'Format' => 'Format',
|
||||
'Data' => 'Data',
|
||||
|
||||
'Database' => 'Basis data',
|
||||
'database' => 'basis data',
|
||||
'Use' => 'Gunakan',
|
||||
'Select database' => 'Pilih basis data',
|
||||
'Invalid database.' => 'Basis data invalid.',
|
||||
'Create new database' => 'Buat basis data baru',
|
||||
'Database has 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 renamed.' => 'Basis data berhasil diganti nama.',
|
||||
'Database has been altered.' => 'Basis data berhasil diubah.',
|
||||
'Alter database' => 'Ubah basis data',
|
||||
'Create database' => 'Buat basis data',
|
||||
'Database schema' => 'Skema basis data',
|
||||
|
||||
// link to current database schema layout
|
||||
'Permanent link' => 'Tautan permanen',
|
||||
|
||||
// thousands separator - must contain single byte
|
||||
',' => '.',
|
||||
'0123456789' => '0123456789',
|
||||
'Engine' => 'Mesin',
|
||||
'Collation' => 'Kolasi',
|
||||
'Data Length' => 'Panjang Data',
|
||||
'Index Length' => 'Panjang Indeks',
|
||||
'Data Free' => 'Data Bebas',
|
||||
'Rows' => 'Baris',
|
||||
'%d in total' => '%d total',
|
||||
'Analyze' => 'Analisis',
|
||||
'Optimize' => 'Optimalkan',
|
||||
'Check' => 'Periksa',
|
||||
'Repair' => 'Perbaiki',
|
||||
'Truncate' => 'Kosongkan',
|
||||
'Tables have been truncated.' => 'Tabel berhasil dikosongkan.',
|
||||
'Move to other database' => 'Pindahkan ke basis data lain',
|
||||
'Move' => 'Pindahkan',
|
||||
'Tables have been moved.' => 'Tabel berhasil dipindahkan.',
|
||||
'Copy' => 'Salin',
|
||||
'Tables have been copied.' => 'Tabel berhasil disalin.',
|
||||
|
||||
'Routines' => 'Rutin',
|
||||
'Routine has been called, %d row(s) affected.' => array('Rutin telah dipanggil, %d baris terpengaruh.', 'Rutin telah dipanggil, %d baris terpengaruh'),
|
||||
'Call' => 'Panggilan',
|
||||
'Parameter name' => 'Nama paramater',
|
||||
'Create procedure' => 'Buat prosedur',
|
||||
'Create function' => 'Buat fungsi',
|
||||
'Routine has been dropped.' => 'Rutin berhasil dihapus.',
|
||||
'Routine has been altered.' => 'Rutin berhasil diubah.',
|
||||
'Routine has been created.' => 'Rutin berhasil dibuat.',
|
||||
'Alter function' => 'Ubah fungsi',
|
||||
'Alter procedure' => 'Ubah prosedur',
|
||||
'Return type' => 'Jenis balikan',
|
||||
|
||||
'Events' => 'Peristiwa',
|
||||
'Event has been dropped.' => 'Peristiwa berhasil dihapus.',
|
||||
'Event has been altered.' => 'Peristiwa berhasil diubah.',
|
||||
'Event has been created.' => 'Peristiwa berhasil dibuat.',
|
||||
'Alter event' => 'Ubah peristiwa',
|
||||
'Create event' => 'Buat peristiwa',
|
||||
'At given time' => 'Pada waktu tertentu',
|
||||
'Every' => 'Setiap',
|
||||
'Schedule' => 'Jadwal',
|
||||
'Start' => 'Mulai',
|
||||
'End' => 'Selesai',
|
||||
'On completion preserve' => 'Pertahankan saat selesai',
|
||||
|
||||
'Tables' => 'Tabel',
|
||||
'Tables and views' => 'Tabel dan tampilan',
|
||||
'Table' => 'Tabel',
|
||||
'No tables.' => 'Tiada tabel.',
|
||||
'Alter table' => 'Ubah tabel',
|
||||
'Create table' => 'Buat tabel',
|
||||
'Table has been dropped.' => 'Tabel berhasil dihapus.',
|
||||
'Tables have been dropped.' => 'Tabel berhasil dihapus.',
|
||||
'Tables have been optimized.' => 'Tabel berhasil dioptimalkan.',
|
||||
'Table has been altered.' => 'Tabel berhasil diubah.',
|
||||
'Table has been created.' => 'Tabel berhasil dibuat.',
|
||||
'Table name' => 'Nama tabel',
|
||||
'Show structure' => 'Lihat struktur',
|
||||
'engine' => 'mesin',
|
||||
'collation' => 'kolasi',
|
||||
'Column name' => 'Nama kolom',
|
||||
'Type' => 'Jenis',
|
||||
'Length' => 'Panjang',
|
||||
'Auto Increment' => 'Kenaikan Otomatis',
|
||||
'Options' => 'Opsi',
|
||||
'Comment' => 'Komentar',
|
||||
'Default values' => 'Nilai bawaan',
|
||||
'Drop' => 'Hapus',
|
||||
'Are you sure?' => 'Anda yakin',
|
||||
'Move up' => 'Naik',
|
||||
'Move down' => 'Turun',
|
||||
'Remove' => 'Hapus',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Jumlah ruas maksimum yang diizinkan dilewati. Harap naikkan %s.',
|
||||
|
||||
'Partition by' => 'Partisi menurut',
|
||||
'Partitions' => 'Partisi',
|
||||
'Partition name' => 'Nama partisi',
|
||||
'Values' => 'Nilai',
|
||||
|
||||
'View' => 'Tampilan',
|
||||
'View has been dropped.' => 'Tampilan berhasil dihapus.',
|
||||
'View has been altered.' => 'Tampilan berhasil diubah.',
|
||||
'View has been created.' => 'Tampilan berhasil dibuat.',
|
||||
'Alter view' => 'Ubah tampilan',
|
||||
'Create view' => 'Buat tampilan',
|
||||
|
||||
'Indexes' => 'Indeks',
|
||||
'Indexes have been altered.' => 'Indeks berhasil diubah.',
|
||||
'Alter indexes' => 'Ubah indeks',
|
||||
'Add next' => 'Tambah setelahnya',
|
||||
'Index Type' => 'Jenis Indeks',
|
||||
'Column (length)' => 'Kolom (panjang)',
|
||||
|
||||
'Foreign keys' => 'Kunci asing',
|
||||
'Foreign key' => 'Kunci asing',
|
||||
'Foreign key has been dropped.' => 'Kunci asing berhasil dihapus.',
|
||||
'Foreign key has been altered.' => 'Kunci asing berhasil diubah.',
|
||||
'Foreign key has been created.' => 'Kunci asing berhasil dibuat.',
|
||||
'Target table' => 'Tabel sasaran',
|
||||
'Change' => 'Ubah',
|
||||
'Source' => 'Sumber',
|
||||
'Target' => 'Sasaran',
|
||||
'Add column' => 'Tambah kolom',
|
||||
'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.' => 'Kolom sumber dan sasaran harus memiliki jenis data yang sama. Kolom sasaran harus memiliki indeks dan data rujukan harus ada.',
|
||||
|
||||
'Triggers' => 'Picu',
|
||||
'Add trigger' => 'Tambah picu',
|
||||
'Trigger has been dropped.' => 'Picu berhasil dihapus.',
|
||||
'Trigger has been altered.' => 'Picu berhasil diubah.',
|
||||
'Trigger has been created.' => 'Picu berhasil dibuat.',
|
||||
'Alter trigger' => 'Ubah picu',
|
||||
'Create trigger' => 'Buat picu',
|
||||
'Time' => 'Waktu',
|
||||
'Event' => 'Peristiwa',
|
||||
'Name' => 'Nama',
|
||||
|
||||
'select' => 'pilih',
|
||||
'Select' => 'Pilih',
|
||||
'Select data' => 'Pilih data',
|
||||
'Functions' => 'Fungsi',
|
||||
'Aggregation' => 'Agregasi',
|
||||
'Search' => 'Cari',
|
||||
'anywhere' => 'di mana pun',
|
||||
'Search data in tables' => 'Cari data dalam tabel',
|
||||
'Sort' => 'Urutan',
|
||||
'descending' => 'menurun',
|
||||
'Limit' => 'Limit',
|
||||
'Text length' => 'Panjang teks',
|
||||
'Action' => 'Tindakan',
|
||||
'Full table scan' => 'Pindai tabel lengkap',
|
||||
'Unable to select the table' => 'Gagal memilih tabel',
|
||||
'No rows.' => 'Tiada baris.',
|
||||
'%d row(s)' => '%d baris',
|
||||
'Page' => 'Halaman',
|
||||
'last' => 'terakhir',
|
||||
'whole result' => 'Seluruh hasil',
|
||||
'%d byte(s)' => '%d bita',
|
||||
|
||||
'Import' => 'Impor',
|
||||
'%d row(s) have been imported.' => '%d baris berhasil diimpor.',
|
||||
|
||||
// in-place editing in select
|
||||
'Use edit link to modify this value.' => 'Gunakan tautan edit untuk mengubah nilai ini.',
|
||||
|
||||
// %s can contain auto-increment value
|
||||
'Item%s has been inserted.' => 'Entri%s berhasil disisipkan.',
|
||||
'Item has been deleted.' => 'Entri berhasil dihapus.',
|
||||
'Item has been updated.' => 'Entri berhasil diperbarui.',
|
||||
'%d item(s) have been affected.' => '%d entri terpengaruh.',
|
||||
'New item' => 'Entri baru',
|
||||
'original' => 'orisinal',
|
||||
// label for value '' in enum data type
|
||||
'empty' => 'kosong',
|
||||
'edit' => 'edit',
|
||||
'Edit' => 'Edit',
|
||||
'Insert' => 'Sisipkan',
|
||||
'Save' => 'Simpan',
|
||||
'Save and continue edit' => 'Simpan dan terus mengedit',
|
||||
'Save and insert next' => 'Simpan dan sisipkan yang lain',
|
||||
'Clone' => 'Gandakan',
|
||||
'Delete' => 'Hapus',
|
||||
|
||||
'E-mail' => 'Surel',
|
||||
'From' => 'Dari',
|
||||
'Subject' => 'Subjek',
|
||||
'Attachments' => 'Lampiran',
|
||||
'Send' => 'Kirim',
|
||||
'%d e-mail(s) have been sent.' => array('%d surel berhasil dikirim.', '%d surel berhasil dikirim'),
|
||||
|
||||
// data type descriptions
|
||||
'Numbers' => 'Angka',
|
||||
'Date and time' => 'Tanggal dan waktu',
|
||||
'Strings' => 'String',
|
||||
'Binary' => 'Biner',
|
||||
'Lists' => 'Daftar',
|
||||
'Network' => 'Jaringan',
|
||||
'Geometry' => 'Geometri',
|
||||
'Relations' => 'Relasi',
|
||||
|
||||
'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' => 'now',
|
||||
'yes' => 'yes',
|
||||
'no' => 'no',
|
||||
|
||||
// general SQLite error in create, drop or rename database
|
||||
'File exists.' => 'Berkas sudah ada.',
|
||||
'Please use one of the extensions %s.' => 'Harap gunakan salah satu ekstensi %s.',
|
||||
|
||||
// PostgreSQL and MS SQL schema support
|
||||
'Alter schema' => 'Ubah skema',
|
||||
'Create schema' => 'Buat skema',
|
||||
'Schema has been dropped.' => 'Skema berhasil dihapus.',
|
||||
'Schema has been created.' => 'Skema berhasil dibuat.',
|
||||
'Schema has been altered.' => 'Skema berhasil diubah.',
|
||||
'Schema' => 'Skema',
|
||||
'Invalid schema.' => 'Skema invalid.',
|
||||
|
||||
// PostgreSQL sequences support
|
||||
'Sequences' => 'Deret',
|
||||
'Create sequence' => 'Buat deret',
|
||||
'Sequence has been dropped.' => 'Deret berhasil dihapus.',
|
||||
'Sequence has been created.' => 'Deret berhasil dibuat.',
|
||||
'Sequence has been altered.' => 'Deret berhasil diubah.',
|
||||
'Alter sequence' => 'Ubah deret',
|
||||
|
||||
// PostgreSQL user types support
|
||||
'User types' => 'Jenis pengguna',
|
||||
'Create type' => 'Buat jenis',
|
||||
'Type has been dropped.' => 'Jenis berhasil dihapus.',
|
||||
'Type has been created.' => 'Jenis berhasil dibuat.',
|
||||
'Alter type' => 'Ubah jenis',
|
||||
);
|
||||
@@ -31,13 +31,11 @@ $translations = array(
|
||||
'Alter database' => 'Modifica database',
|
||||
'Create database' => 'Crea database',
|
||||
'SQL command' => 'Comando SQL',
|
||||
'Dump' => 'Dump',
|
||||
'Logout' => 'Esci',
|
||||
'database' => 'database',
|
||||
'Use' => 'Usa',
|
||||
'No tables.' => 'No tabelle.',
|
||||
'select' => 'seleziona',
|
||||
'Create new table' => 'Crea nuova tabella',
|
||||
'Item has been deleted.' => 'Elemento eliminato.',
|
||||
'Item has been updated.' => 'Elemento aggiornato.',
|
||||
'Item%s has been inserted.' => 'Elemento%s inserito.',
|
||||
@@ -180,6 +178,7 @@ $translations = array(
|
||||
'Data Free' => 'Dati liberi',
|
||||
'Rows' => 'Righe',
|
||||
',' => '.',
|
||||
'0123456789' => '0123456789',
|
||||
'Analyze' => 'Analizza',
|
||||
'Optimize' => 'Ottimizza',
|
||||
'Check' => 'Controlla',
|
||||
@@ -190,7 +189,7 @@ $translations = array(
|
||||
'%d item(s) have been affected.' => array('Il risultato consiste in %d elemento.', 'Il risultato consiste in %d elementi.'),
|
||||
'whole result' => 'intero risultato',
|
||||
'Clone' => 'Clona',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Troppi campi. Per favore aumentare %s e %s.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Troppi campi. Per favore aumentare %s.',
|
||||
'Partition by' => 'Partiziona per',
|
||||
'Partitions' => 'Partizioni',
|
||||
'Partition name' => 'Nome partizione',
|
||||
@@ -226,7 +225,6 @@ $translations = array(
|
||||
'Permanent login' => 'Login permanente',
|
||||
'Databases have been dropped.' => 'Database eliminati.',
|
||||
'Search data in tables' => 'Cerca nelle tabelle',
|
||||
'schema' => 'schema',
|
||||
'Schema' => 'Schema',
|
||||
'Alter schema' => 'Modifica schema',
|
||||
'Create schema' => 'Crea schema',
|
||||
@@ -244,7 +242,7 @@ $translations = array(
|
||||
'Alter type' => 'Modifica tipo definito dall\'utente',
|
||||
'Type has been dropped.' => 'Tipo definito dall\'utente eliminato.',
|
||||
'Type has been created.' => 'Tipo definito dall\'utente creato.',
|
||||
'Double click on a value to modify it.' => 'Fai doppio click su un valore per modificarlo.',
|
||||
'Ctrl+click on a value to modify it.' => 'Fai Ctrl+click su un valore per modificarlo.',
|
||||
'Use edit link to modify this value.' => 'Usa il link modifica per modificare questo valore.',
|
||||
'last' => 'ultima',
|
||||
'From server' => 'Dal server',
|
||||
@@ -258,7 +256,6 @@ $translations = array(
|
||||
'Attachments' => 'Allegati',
|
||||
'%d query(s) executed OK.' => array('%d query eseguita con successo.', '%d query eseguite con successo.'),
|
||||
'Show only errors' => 'Mostra solo gli errori',
|
||||
'Last page' => 'Ultima pagina',
|
||||
'Refresh' => 'Aggiorna',
|
||||
'Invalid schema.' => 'Schema non valido.',
|
||||
'Please use one of the extensions %s.' => 'Usa una delle estensioni %s.',
|
||||
@@ -268,6 +265,5 @@ $translations = array(
|
||||
'Copy' => 'Copia',
|
||||
'Permanent link' => 'Link permanente',
|
||||
'Edit all' => 'Modifica tutto',
|
||||
'Resend POST data?' => 'Reinvio i dati POST?',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
|
||||
@@ -31,13 +31,11 @@ $translations = array(
|
||||
'Alter database' => 'データベースを変更',
|
||||
'Create database' => 'データベースを作成',
|
||||
'SQL command' => 'SQLコマンド',
|
||||
'Dump' => 'ダンプ',
|
||||
'Logout' => 'ログアウト',
|
||||
'database' => 'データベース',
|
||||
'Use' => '使用',
|
||||
'No tables.' => 'テーブルがありません。',
|
||||
'select' => '選択',
|
||||
'Create new table' => 'テーブルを作成',
|
||||
'Item has been deleted.' => '項目を削除しました',
|
||||
'Item has been updated.' => '項目を更新しました',
|
||||
'Edit' => '編集',
|
||||
@@ -176,6 +174,7 @@ $translations = array(
|
||||
'Data Free' => '空き',
|
||||
'Rows' => '行数',
|
||||
',' => ',',
|
||||
'0123456789' => '0123456789',
|
||||
'Analyze' => '分析',
|
||||
'Optimize' => '最適化',
|
||||
'Check' => 'チェック',
|
||||
@@ -189,7 +188,7 @@ $translations = array(
|
||||
'whole result' => '全結果',
|
||||
'Tables have been dropped.' => 'テーブルを削除しました',
|
||||
'Clone' => 'クローン',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => '定義可能な最大フィールド数を越えました。%s と %s を増やしてください。',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => '定義可能な最大フィールド数を越えました。%s を増やしてください。',
|
||||
'Partition by' => 'パーティション',
|
||||
'Partitions' => 'パーティション',
|
||||
'Partition name' => 'パーティション名',
|
||||
@@ -227,7 +226,6 @@ $translations = array(
|
||||
'Permanent login' => '永続的にログイン',
|
||||
'Databases have been dropped.' => 'データベースを削除しました',
|
||||
'Search data in tables' => 'データを検索する',
|
||||
'schema' => 'スキーマ',
|
||||
'Schema' => 'スキーマ',
|
||||
'Alter schema' => 'スキーマ変更',
|
||||
'Create schema' => 'スキーマ追加',
|
||||
@@ -245,7 +243,6 @@ $translations = array(
|
||||
'Alter type' => 'ユーザー定義型変更',
|
||||
'Type has been dropped.' => 'ユーザー定義型を削除しました',
|
||||
'Type has been created.' => 'ユーザー定義型を追加しました',
|
||||
'Double click on a value to modify it.' => 'ダブルクリックして編集',
|
||||
'Use edit link to modify this value.' => 'リンクを編集する',
|
||||
'last' => '最終',
|
||||
'From server' => 'サーバーから実行',
|
||||
@@ -259,7 +256,6 @@ $translations = array(
|
||||
'now' => '現在の日時',
|
||||
'%d query(s) executed OK.' => '%d クエリーを実行しました',
|
||||
'Show only errors' => 'エラーのみ表示',
|
||||
'Last page' => '最後のページ',
|
||||
'Refresh' => 'リフレッシュ',
|
||||
'Invalid schema.' => '無効なスキーマ',
|
||||
'Please use one of the extensions %s.' => 'いずれかの拡張機能を使ってください %s',
|
||||
@@ -268,6 +264,5 @@ $translations = array(
|
||||
'Copy' => 'コピー',
|
||||
'Permanent link' => 'パーマネントリンク',
|
||||
'Edit all' => 'すべて編集',
|
||||
'Resend POST data?' => '再送信しますか?',
|
||||
'HH:MM:SS' => '時:分:秒',
|
||||
);
|
||||
|
||||
268
adminer/lang/ko.inc.php
Normal file
@@ -0,0 +1,268 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Login' => '로그인',
|
||||
'Logout successful.' => '로그아웃',
|
||||
'Invalid credentials.' => '잘못된 로그인',
|
||||
'Server' => '서버',
|
||||
'Username' => '사용자이름',
|
||||
'Password' => '비밀번호',
|
||||
'Select database' => '데이터베이스를 선택하십시오.',
|
||||
'Invalid database.' => '잘못된 데이터베이스입니다.',
|
||||
'Create new 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 dropped.' => '데이터베이스를 삭제했습니다.',
|
||||
'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.' => '잘못된 CSRF 토큰. 다시 보내주십시오.',
|
||||
'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 DELETE',
|
||||
'ON UPDATE' => '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' => '이벤트',
|
||||
'%s version: %s through PHP extension %s' => '%s 버전 %s, PHP 확장 %s',
|
||||
'%d row(s)' => '%d 행',
|
||||
'Remove' => '제외',
|
||||
'Are you sure?' => '실행 하시겠습니까?',
|
||||
'Privileges' => '권한',
|
||||
'Create user' => '사용자 만들기',
|
||||
'User has been dropped.' => '사용자 삭제',
|
||||
'User has been altered.' => '사용자 변경',
|
||||
'User has been created.' => '사용자 만들기',
|
||||
'Hashed' => 'Hashed',
|
||||
'Column' => '열',
|
||||
'Routine' => '루틴',
|
||||
'Grant' => '권한 부여',
|
||||
'Revoke' => '권한 취소',
|
||||
'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' => '지정 시간',
|
||||
'Tables have been truncated.' => '테이블을 truncate했습니다.',
|
||||
'Tables have been moved.' => '테이블을 옮겼습니다.',
|
||||
'Tables and views' => '테이블과 뷰',
|
||||
'Engine' => '엔진',
|
||||
'Collation' => '정렬',
|
||||
'Data Length' => '데이터 길이',
|
||||
'Index Length' => '인덱스 길이',
|
||||
'Data Free' => '여유',
|
||||
'Rows' => '행',
|
||||
',' => ',',
|
||||
'0123456789' => '0123456789',
|
||||
'Analyze' => '분석',
|
||||
'Optimize' => '최적화',
|
||||
'Check' => '확인',
|
||||
'Repair' => '복구',
|
||||
'Truncate' => 'Truncate',
|
||||
'Move to other database' => '다른 데이터베이스로 이동',
|
||||
'Move' => '이동',
|
||||
'Save and continue edit' => '저장하고 계속',
|
||||
'original' => '원래',
|
||||
'%d item(s) have been affected.' => '%d를 갱신했습니다.',
|
||||
'whole result' => '모든 결과',
|
||||
'Tables have been dropped.' => '테이블을 삭제했습니다.',
|
||||
'Clone' => '복제',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => '정의 가능한 최대 필드 수를 초과했습니다. %s를 늘리십시오.',
|
||||
'Partition by' => '파티션',
|
||||
'Partitions' => '파티션',
|
||||
'Partition name' => '파티션 이름',
|
||||
'Values' => '값',
|
||||
'%d row(s) have been imported.' => '%d 행을 가져 왔습니다.',
|
||||
'Show structure' => '구조',
|
||||
'anywhere' => '모든',
|
||||
'Import' => '가져 오기',
|
||||
'Stop on error' => '오류의 경우 중지',
|
||||
'Select data' => '데이터',
|
||||
'%.3f s' => '%.3f 초',
|
||||
'$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' => 'Web 서버 파일 %s',
|
||||
'File does not exist.' => '파일이 존재하지 않습니다.',
|
||||
'%d in total' => '총 %d',
|
||||
'Permanent login' => '영구적으로 로그인',
|
||||
'Databases have 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' => '데이터베이스 형식',
|
||||
'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' => 'ltr',
|
||||
'Tables have been copied.' => '테이블을 복사했습니다',
|
||||
'Copy' => '복사',
|
||||
'Permanent link' => '영구 링크',
|
||||
'Edit all' => '모든 편집',
|
||||
'HH:MM:SS' => '시:분:초',
|
||||
);
|
||||
@@ -66,7 +66,6 @@ $translations = array(
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Per daug POST duomenų. Sumažinkite duomenų kiekį arba padidinkite konfigūracijos nustatymą %s.',
|
||||
|
||||
'Export' => 'Eksportas',
|
||||
'Dump' => 'Eksportuoti',
|
||||
'Output' => 'Išvestis',
|
||||
'open' => 'atidaryti',
|
||||
'save' => 'išsaugoti',
|
||||
@@ -93,6 +92,7 @@ $translations = array(
|
||||
|
||||
// thousands separator - must contain single byte
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Engine' => 'Variklis',
|
||||
'Collation' => 'Lyginimas',
|
||||
'Data Length' => 'Duomenų ilgis',
|
||||
@@ -144,7 +144,6 @@ $translations = array(
|
||||
'No tables.' => 'Nėra lentelių.',
|
||||
'Alter table' => 'Redaguoti lentelę',
|
||||
'Create table' => 'Sukurti lentelę',
|
||||
'Create new table' => 'Sukurti naują lentelę',
|
||||
'Table has been dropped.' => 'Lentelė pašalinta.',
|
||||
'Tables have been dropped.' => 'Lentelės pašalintos.',
|
||||
'Table has been altered.' => 'Lentelė pakeista.',
|
||||
@@ -165,7 +164,7 @@ $translations = array(
|
||||
'Move up' => 'Perkelti į viršų',
|
||||
'Move down' => 'Perkelti žemyn',
|
||||
'Remove' => 'Pašalinti',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Viršytas maksimalus leidžiamų stulpelių kiekis. Padidinkite %s ir %s.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Viršytas maksimalus leidžiamų stulpelių kiekis. Padidinkite %s.',
|
||||
|
||||
'Partition by' => 'Skirstyti pagal',
|
||||
'Partitions' => 'Skirsniai',
|
||||
@@ -231,7 +230,6 @@ $translations = array(
|
||||
'%d row(s)' => array('%d įrašas', '%d įrašai', '%d įrašų'),
|
||||
'Page' => 'Puslapis',
|
||||
'last' => 'paskutinis',
|
||||
'Last page' => 'Paskutinis puslapis',
|
||||
'whole result' => 'visas rezultatas',
|
||||
'%d byte(s)' => array('%d baitas', '%d baigai', '%d baitų'),
|
||||
|
||||
@@ -239,7 +237,6 @@ $translations = array(
|
||||
'%d row(s) have been imported.' => array('%d įrašas įkelta.', '%d įrašai įkelti.', '%d įrašų įkelta.'),
|
||||
|
||||
// in-place editing in select
|
||||
'Double click on a value to modify it.' => 'Du kartus spragtelėkite pelyte norėdami redaguoti.',
|
||||
'Use edit link to modify this value.' => 'Norėdami redaguoti reikšmę naudokite redagavimo nuorodą.',
|
||||
|
||||
// %s can contain auto-increment value
|
||||
@@ -277,9 +274,6 @@ $translations = array(
|
||||
'Geometry' => 'Geometrija',
|
||||
'Relations' => 'Ryšiai',
|
||||
|
||||
// reload confirmation in AJAX
|
||||
'Resend POST data?' => 'Persiųsti POST duomenis?',
|
||||
|
||||
'Editor' => 'Redaktorius',
|
||||
// date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
|
||||
'$1-$3-$5' => '$1-$3-$5',
|
||||
@@ -299,7 +293,6 @@ $translations = array(
|
||||
'Schema has been dropped.' => 'Schema pašalinta.',
|
||||
'Schema has been created.' => 'Schema sukurta.',
|
||||
'Schema has been altered.' => 'Schema pakeista.',
|
||||
'schema' => 'schema',
|
||||
'Schema' => 'Schema',
|
||||
'Invalid schema.' => 'Neteisinga schema.',
|
||||
|
||||
|
||||
@@ -32,13 +32,11 @@ $translations = array(
|
||||
'Alter database' => 'Database aanpassen',
|
||||
'Create database' => 'Database aanmaken',
|
||||
'SQL command' => 'SQL opdracht',
|
||||
'Dump' => 'Exporteer',
|
||||
'Logout' => 'Uitloggen',
|
||||
'database' => 'database',
|
||||
'Use' => 'Gebruik',
|
||||
'No tables.' => 'Geen tabellen.',
|
||||
'select' => 'kies',
|
||||
'Create new table' => 'Nieuwe tabel',
|
||||
'Item has been deleted.' => 'Item verwijderd.',
|
||||
'Item has been updated.' => 'Item aangepast.',
|
||||
'Item%s has been inserted.' => 'Item%s toegevoegd.',
|
||||
@@ -181,6 +179,7 @@ $translations = array(
|
||||
'Data Free' => 'Data Vrij',
|
||||
'Rows' => 'Rijen',
|
||||
',' => '.',
|
||||
'0123456789' => '0123456789',
|
||||
'Analyze' => 'Analyseer',
|
||||
'Optimize' => 'Optimaliseer',
|
||||
'Check' => 'Controleer',
|
||||
@@ -191,7 +190,7 @@ $translations = array(
|
||||
'%d item(s) have been affected.' => array('%d item aangepast.', '%d items aangepast.'),
|
||||
'whole result' => 'volledig resultaat',
|
||||
'Clone' => 'Dupliceer',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Maximum aantal velden bereikt. Verhoog %s en %s.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maximum aantal velden bereikt. Verhoog %s.',
|
||||
'Partition by' => 'Partitioneren op',
|
||||
'Partitions' => 'Partities',
|
||||
'Partition name' => 'Partitie naam',
|
||||
@@ -226,7 +225,6 @@ $translations = array(
|
||||
'%d in total' => '%d in totaal',
|
||||
'Permanent login' => 'Blijf aangemeld',
|
||||
'Search data in tables' => 'Zoeken in database',
|
||||
'schema' => 'schema',
|
||||
'Schema' => 'Schema',
|
||||
'Alter schema' => 'Schema wijzigen',
|
||||
'Create schema' => 'Schema maken',
|
||||
@@ -244,7 +242,7 @@ $translations = array(
|
||||
'Alter type' => 'Type wijzigen',
|
||||
'Type has been dropped.' => 'Type verwijderd.',
|
||||
'Type has been created.' => 'Type aangemaakt.',
|
||||
'Double click on a value to modify it.' => 'Dubbelklik op een waarde om deze te bewerken.',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+klik op een waarde om deze te bewerken.',
|
||||
'Use edit link to modify this value.' => 'Gebruik de link "bewerk" om deze waarde te wijzigen.',
|
||||
'last' => 'laatste',
|
||||
'From server' => 'Van server',
|
||||
@@ -258,7 +256,6 @@ $translations = array(
|
||||
'Attachments' => 'Bijlagen',
|
||||
'%d query(s) executed OK.' => array('%d query succesvol uitgevoerd.', '%d querys succesvol uitgevoerd'),
|
||||
'Show only errors' => 'Enkel fouten tonen',
|
||||
'Last page' => 'Laatste pagina',
|
||||
'Refresh' => 'Vernieuwen',
|
||||
'Invalid schema.' => 'Ongeldig schema.',
|
||||
'Please use one of the extensions %s.' => 'Gebruik 1 van volgende extensies: %s.',
|
||||
@@ -268,6 +265,5 @@ $translations = array(
|
||||
'Copy' => 'Kopieren',
|
||||
'Permanent link' => 'Permanente link',
|
||||
'Edit all' => 'Alles bewerken',
|
||||
'Resend POST data?' => 'POST data opnieuw verzenden',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
|
||||
283
adminer/lang/no.inc.php
Normal file
@@ -0,0 +1,283 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'System' => 'System',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Brukernavn',
|
||||
'Password' => 'Passord',
|
||||
'Permanent login' => 'Permanent login',
|
||||
'Login' => 'Logg inn',
|
||||
'Logout' => 'Logg ut',
|
||||
'Logged as: %s' => 'Logget inn som: %s',
|
||||
'Logout successful.' => 'Utlogging vellykket.',
|
||||
'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.',
|
||||
'Language' => 'Språk',
|
||||
'Invalid CSRF token. Send the form again.' => 'Ugylding CSRF-token - Send inn skjemaet igjen.',
|
||||
'No extension' => 'Ingen utvidelse',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Ingen av de støttede PHP-utvidelsene (%s) er tilgjengelige.',
|
||||
'Session support must be enabled.' => 'Økt-støtte må være skrudd på.',
|
||||
'Session expired, please login again.' => 'Økt utløpt - vennligst logg inn på nytt.',
|
||||
'%s version: %s through PHP extension %s' => '%s versjon: %s via PHP-utvidelse %s',
|
||||
'Refresh' => 'Gjenoppfrisk',
|
||||
'ltr' => 'venstre-til-høyre',
|
||||
'Privileges' => 'Privilegier',
|
||||
'Create user' => 'Lag bruker',
|
||||
'User has been dropped.' => 'Bruker slettet.',
|
||||
'User has been altered.' => 'Bruker endret.',
|
||||
'User has been created.' => 'Bruker opprettet.',
|
||||
'Hashed' => 'Hashet',
|
||||
'Column' => 'Kolonne',
|
||||
'Routine' => 'Rutine',
|
||||
'Grant' => 'Gi privilegier',
|
||||
'Revoke' => 'Trekk tilbake',
|
||||
'Process list' => 'Prosessliste',
|
||||
'%d process(es) have been killed.' => array('%d prosess avsluttet.', '%d prosesser avsluttet.'),
|
||||
'Kill' => 'Avslutt',
|
||||
'Variables' => 'Variabler',
|
||||
'Status' => 'Status',
|
||||
'SQL command' => 'SQL-kommando',
|
||||
'%d query(s) executed OK.' => array('%d kall utført OK.', '%d kall utført OK.'),
|
||||
'Query executed OK, %d row(s) affected.' => array('Kall utført OK, %d rad påvirket.', 'Kall utført OK, %d rader påvirket.'),
|
||||
'No commands to execute.' => 'Ingen kommandoer å utføre.',
|
||||
'Error in query' => 'Feil i forespørsel',
|
||||
'Execute' => 'Kjør',
|
||||
'Stop on error' => 'Stopp ved feil',
|
||||
'Show only errors' => 'Vis bare feil',
|
||||
'%.3f s' => '%.3f s',
|
||||
'History' => 'Historie',
|
||||
'Clear' => 'Tøm skjema',
|
||||
'Edit all' => 'Rediger alle',
|
||||
'File upload' => 'Filopplasting',
|
||||
'From server' => 'Fra server',
|
||||
'Webserver file %s' => 'Webserver-fil %s',
|
||||
'Run file' => 'Kjør fil',
|
||||
'File does not exist.' => 'Filen eksisterer ikke.',
|
||||
'File uploads are disabled.' => 'Filopplastinger ikke tillatt.',
|
||||
'Unable to upload a file.' => 'Kunne ikke laste opp fil.',
|
||||
'Maximum allowed file size is %sB.' => 'Maksimum tillatte filstørrelse er %sB.',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'For stor datamengde i skjemaet. Reduser datamengden, eller øk størrelsen på %s-konfigurasjonsdirektivet.',
|
||||
'You can upload a big SQL file via FTP and import it from server.' => 'Du kan laste opp en stor SQL-fil via FTP og importere den fra serveren.',
|
||||
'Export' => 'Eksport',
|
||||
'Output' => 'Resultat',
|
||||
'open' => 'åpne',
|
||||
'save' => 'lagre',
|
||||
'Format' => 'Format',
|
||||
'Data' => 'Data',
|
||||
'Database' => 'Database',
|
||||
'database' => 'database',
|
||||
'Use' => 'Bruk',
|
||||
'Select database' => 'Velg database',
|
||||
'Invalid database.' => 'Ugyldig database.',
|
||||
'Create new database' => 'Lag ny database',
|
||||
'Database has been dropped.' => 'Databasen har blitt slettet.',
|
||||
'Databases have been dropped.' => 'Databasene har blitt slettet.',
|
||||
'Database has been created.' => 'Databasen er opprettet.',
|
||||
'Database has been renamed.' => 'Databasen har fått nytt navn.',
|
||||
'Database has been altered.' => 'Databasen er endret.',
|
||||
'Alter database' => 'Endre database',
|
||||
'Create database' => 'Opprett database',
|
||||
'Database schema' => 'Databaseskjema',
|
||||
'Permanent link' => 'Permanent lenke',
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Engine' => 'Motor',
|
||||
'Collation' => 'Tekstsortering',
|
||||
'Data Length' => 'Datalengde',
|
||||
'Index Length' => 'Indekslengde',
|
||||
'Data Free' => 'Frie data',
|
||||
'Rows' => 'Rader',
|
||||
'%d in total' => '%d totalt',
|
||||
'Analyze' => 'Analyser',
|
||||
'Optimize' => 'Optimaliser',
|
||||
'Vacuum' => 'Støvsug',
|
||||
'Check' => 'Sjekk',
|
||||
'Repair' => 'Reparer',
|
||||
'Truncate' => 'Avkort',
|
||||
'Tables have been truncated.' => 'Tabellene har blitt avkortet.',
|
||||
'Move to other database' => 'Flytt til annen database',
|
||||
'Move' => 'Flytt',
|
||||
'Tables have been moved.' => 'Tabellene har blitt flyttet.',
|
||||
'Copy' => 'Kopier',
|
||||
'Tables have been copied.' => 'Tabellene har blitt kopiert.',
|
||||
'Routines' => 'Rutiner',
|
||||
'Routine has been called, %d row(s) affected.' => array('Rutinen er utført, %d rad påvirket.', 'Rutinen er utført, %d rader påvirket.'),
|
||||
'Call' => 'Kall',
|
||||
'Parameter name' => 'Parameternavn',
|
||||
'Create procedure' => 'Opprett prosedyre',
|
||||
'Create function' => 'Opprett funksjon',
|
||||
'Routine has been dropped.' => 'Rutinen er slettet.',
|
||||
'Routine has been altered.' => 'Rutinen er endret.',
|
||||
'Routine has been created.' => 'Rutinen er opprettet.',
|
||||
'Alter function' => 'Endre funksjon',
|
||||
'Alter procedure' => 'Endre prosedyre',
|
||||
'Return type' => 'Returtype',
|
||||
'Events' => 'Eventer',
|
||||
'Event has been dropped.' => 'Eventen er slettet.',
|
||||
'Event has been altered.' => 'Eventen er endret.',
|
||||
'Event has been created.' => 'Eventen er opprettet.',
|
||||
'Alter event' => 'Endre event',
|
||||
'Create event' => 'Opprett event',
|
||||
'At given time' => 'På gitte tid',
|
||||
'Every' => 'Hver',
|
||||
'Schedule' => 'Tidsplan',
|
||||
'Start' => 'Start',
|
||||
'End' => 'Slutt',
|
||||
'On completion preserve' => 'Ved fullførelse bevar',
|
||||
'Tables' => 'Tabeller',
|
||||
'Tables and views' => 'Tabeller og views',
|
||||
'Table' => 'Tabell',
|
||||
'No tables.' => 'Ingen tabeller.',
|
||||
'Alter table' => 'Endre tabell',
|
||||
'Create table' => 'Opprett tabell',
|
||||
'Table has been dropped.' => 'Tabellen er slettet.',
|
||||
'Tables have been dropped.' => 'Tabellene er slettet.',
|
||||
'Tables have been optimized.' => 'Tabellene er blitt optimalisert.',
|
||||
'Table has been altered.' => 'Tabellen er endret.',
|
||||
'Table has been created.' => 'Tabellen er opprettet.',
|
||||
'Table name' => 'Tabellnavn',
|
||||
'Show structure' => 'Vis struktur',
|
||||
'engine' => 'mottor',
|
||||
'collation' => 'sortering',
|
||||
'Column name' => 'Kolonnenavn',
|
||||
'Type' => 'Type',
|
||||
'Length' => 'Lengde',
|
||||
'Auto Increment' => 'Autoinkrement',
|
||||
'Options' => 'Valg',
|
||||
'Comment' => 'Kommentarer',
|
||||
'Default values' => 'Standardverdier',
|
||||
'Drop' => 'Dropp',
|
||||
'Are you sure?' => 'Er du sikker?',
|
||||
'Move up' => 'Flytt opp',
|
||||
'Move down' => 'Flytt ned',
|
||||
'Remove' => 'Fjern',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maksimum antall feltnavn overskredet - venligst øk %s.',
|
||||
'Partition by' => 'Partisjoner ved',
|
||||
'Partitions' => 'Partisjoner',
|
||||
'Partition name' => 'Partisjonsnavn',
|
||||
'Values' => 'Verdier',
|
||||
'View' => 'View',
|
||||
'View has been dropped.' => 'Viewet er slettet.',
|
||||
'View has been altered.' => 'Viewet er endret.',
|
||||
'View has been created.' => 'Viewet er opprettet.',
|
||||
'Alter view' => 'Endre view',
|
||||
'Create view' => 'Lag nytt view',
|
||||
'Indexes' => 'Indekser',
|
||||
'Indexes have been altered.' => 'Indeksene er endret.',
|
||||
'Alter indexes' => 'Endre indekser',
|
||||
'Add next' => 'Legg til neste',
|
||||
'Index Type' => 'Indekstype',
|
||||
'Column (length)' => 'Kolonne (lengde)',
|
||||
'Foreign keys' => 'Fremmednøkler',
|
||||
'Foreign key' => 'Fremmednøkkel',
|
||||
'Foreign key has been dropped.' => 'Fremmednøkkelen er slettet.',
|
||||
'Foreign key has been altered.' => 'Fremmednøkkelen er endret.',
|
||||
'Foreign key has been created.' => 'Fremmednøkkelen er opprettet.',
|
||||
'Target table' => 'Måltabell',
|
||||
'Change' => 'Endre',
|
||||
'Source' => 'Kilde',
|
||||
'Target' => 'Mål',
|
||||
'Add column' => 'Legg til kolonne',
|
||||
'Alter' => 'Endre',
|
||||
'Add foreign key' => 'Legg til fremmednøkkel',
|
||||
'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.' => 'Kilde- og mål-kolonner må ha samme datatype, det må være en indeks på mål-kolonnen, og dataene som refereres til må eksistere.',
|
||||
'Triggers' => 'Triggere',
|
||||
'Add trigger' => 'Legg til trigger',
|
||||
'Trigger has been dropped.' => 'Triggeren er slettet.',
|
||||
'Trigger has been altered.' => 'Triggeren er endret.',
|
||||
'Trigger has been created.' => 'Triggeren er opprettet.',
|
||||
'Alter trigger' => 'Endre trigger',
|
||||
'Create trigger' => 'Opprett trigger',
|
||||
'Time' => 'Tid',
|
||||
'Event' => 'Hendelse',
|
||||
'Name' => 'Navn',
|
||||
'select' => 'Vis',
|
||||
'Select' => 'Velg',
|
||||
'Select data' => 'Velg data',
|
||||
'Functions' => 'Funksjoner',
|
||||
'Aggregation' => 'Sammenfatning',
|
||||
'Search' => 'Søk',
|
||||
'anywhere' => 'hvorsomhelst',
|
||||
'Search data in tables' => 'Søk data i tabeller',
|
||||
'Sort' => 'Sorter',
|
||||
'descending' => 'minkende',
|
||||
'Limit' => 'Skranke',
|
||||
'Text length' => 'Tekstlengde',
|
||||
'Action' => 'Handling',
|
||||
'Full table scan' => 'Full tabell-scan',
|
||||
'Unable to select the table' => 'Kan ikke velge tabellen',
|
||||
'No rows.' => 'Ingen rader.',
|
||||
'%d row(s)' => array('%d rad', '%d rader'),
|
||||
'Page' => 'Side',
|
||||
'last' => 'siste',
|
||||
'Load more data' => 'Last mer data',
|
||||
'Loading' => 'Laster',
|
||||
'whole result' => 'hele resultatet',
|
||||
'%d byte(s)' => array('%d byte', '%d bytes'),
|
||||
'Import' => 'Importer',
|
||||
'%d row(s) have been imported.' => array('%d rad er importert.', '%d rader er importert.'),
|
||||
'File must be in UTF-8 encoding.' => 'Filen må være i UTF8-tegnkoding.',
|
||||
'Modify' => 'Endre',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+klikk på en verdi for å endre den.',
|
||||
'Use edit link to modify this value.' => 'Bruk rediger-lengde for å endre dennne verdien.',
|
||||
'Item%s has been inserted.' => 'Rad%s er satt inn.',
|
||||
'Item has been deleted.' => 'Raden er slettet.',
|
||||
'Item has been updated.' => 'Raden er oppdatert.',
|
||||
'%d item(s) have been affected.' => array('%d rad påvirket.', '%d rader påvirket.'),
|
||||
'New item' => 'Ny rad',
|
||||
'original' => 'original',
|
||||
'empty' => 'tom',
|
||||
'edit' => 'rediger',
|
||||
'Edit' => 'Rediger',
|
||||
'Insert' => 'Sett inn',
|
||||
'Save' => 'Lagre',
|
||||
'Save and continue edit' => 'Lagre og fortsett å redigere',
|
||||
'Save and insert next' => 'Lagre og sett inn neste',
|
||||
'Selected' => 'Valgt',
|
||||
'Clone' => 'Klon',
|
||||
'Delete' => 'Slett',
|
||||
'You have no privileges to update this table.' => 'Du mangler rettighetene som trengs for å endre denne tabellen.',
|
||||
'E-mail' => 'E-post',
|
||||
'From' => 'Fra',
|
||||
'Subject' => 'Tittel',
|
||||
'Attachments' => 'Vedlegg',
|
||||
'Send' => 'Send',
|
||||
'%d e-mail(s) have been sent.' => array('%d epost sendt.', '%d eposter sendt.'),
|
||||
'Numbers' => 'Nummer',
|
||||
'Date and time' => 'Dato og tid',
|
||||
'Strings' => 'Strenger',
|
||||
'Binary' => 'Binære',
|
||||
'Lists' => 'Lister',
|
||||
'Network' => 'Nettverk',
|
||||
'Geometry' => 'Geometri',
|
||||
'Relations' => 'Relasjoner',
|
||||
'Editor' => 'Redigering',
|
||||
'$1-$3-$5' => '$6/$4 $1',
|
||||
'[yyyy]-mm-dd' => 'd/m [åååå]',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
'now' => 'nå',
|
||||
'yes' => 'ja',
|
||||
'no' => 'nei',
|
||||
'File exists.' => 'Filen finnes.',
|
||||
'Please use one of the extensions %s.' => 'Vennligst bruk en av filendelsene %s.',
|
||||
'Alter schema' => 'Endre skjema',
|
||||
'Create schema' => 'Opprett skjema',
|
||||
'Schema has been dropped.' => 'Skjemaet er slettet.',
|
||||
'Schema has been created.' => 'Skjemaet er opprettet.',
|
||||
'Schema has been altered.' => 'Skjemaet er endret.',
|
||||
'Schema' => 'Skjema',
|
||||
'Invalid schema.' => 'Ugylding skjema.',
|
||||
'Sequences' => 'Sekvenser',
|
||||
'Create sequence' => 'Opprett sekvens',
|
||||
'Sequence has been dropped.' => 'Sekvensen er slettet.',
|
||||
'Sequence has been created.' => 'Sekvensen er opprettet.',
|
||||
'Sequence has been altered.' => 'Sekvensen er endret.',
|
||||
'Alter sequence' => 'Endre sekvens',
|
||||
'User types' => 'Brukertyper',
|
||||
'Create type' => 'Opprett type',
|
||||
'Type has been dropped.' => 'Type er slettet.',
|
||||
'Type has been created.' => 'Type er opprettet.',
|
||||
'Alter type' => 'Endre type',
|
||||
'Saving' => 'Lagrer',
|
||||
);
|
||||
@@ -11,8 +11,11 @@ $translations = array(
|
||||
'Logged as: %s' => 'Zalogowany jako: %s',
|
||||
'Logout successful.' => 'Wylogowano pomyślnie.',
|
||||
'Invalid credentials.' => 'Nieprawidłowe dane logowania.',
|
||||
'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.',
|
||||
'Language' => 'Język',
|
||||
'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.',
|
||||
'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.',
|
||||
'Session support must be enabled.' => 'Wymagana jest obsługa sesji w PHP.',
|
||||
@@ -20,7 +23,7 @@ $translations = array(
|
||||
'%s version: %s through PHP extension %s' => 'Wersja %s: %s za pomocą %s',
|
||||
'Refresh' => 'Odśwież',
|
||||
|
||||
// text direction
|
||||
// text direction - 'ltr' or 'rtl'
|
||||
'ltr' => 'ltr',
|
||||
|
||||
'Privileges' => 'Uprawnienia użytkowników',
|
||||
@@ -64,9 +67,10 @@ $translations = array(
|
||||
'Unable to upload a file.' => 'Wgranie pliku było niemożliwe.',
|
||||
'Maximum allowed file size is %sB.' => 'Maksymalna wielkość pliku to %sB.',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Przesłano zbyt dużo danych. Zmniejsz objętość danych lub zwiększ zmienną konfiguracyjną %s.',
|
||||
'You can upload a big SQL file via FTP and import it from server.' => 'Większe pliki SQL możesz wgrać na serwer poprzez FTP przed zaimportowaniem.',
|
||||
'You are offline.' => 'Jesteś offline.',
|
||||
|
||||
'Export' => 'Eksport',
|
||||
'Dump' => 'Eksport',
|
||||
'Output' => 'Rezultat',
|
||||
'open' => 'otwórz',
|
||||
'save' => 'zapisz',
|
||||
@@ -93,6 +97,7 @@ $translations = array(
|
||||
|
||||
// thousands separator - must contain single byte
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Engine' => 'Składowanie',
|
||||
'Collation' => 'Porównywanie znaków',
|
||||
'Data Length' => 'Rozmiar danych',
|
||||
@@ -102,6 +107,7 @@ $translations = array(
|
||||
'%d in total' => '%d w sumie',
|
||||
'Analyze' => 'Analizuj',
|
||||
'Optimize' => 'Optymalizuj',
|
||||
'Vacuum' => 'Wyczyść',
|
||||
'Check' => 'Sprawdź',
|
||||
'Repair' => 'Napraw',
|
||||
'Truncate' => 'Opróżnij',
|
||||
@@ -144,9 +150,9 @@ $translations = array(
|
||||
'No tables.' => 'Brak tabel.',
|
||||
'Alter table' => 'Zmień tabelę',
|
||||
'Create table' => 'Utwórz tabelę',
|
||||
'Create new table' => 'Utwórz nową tabelę',
|
||||
'Table has been dropped.' => 'Tabela została usunięta.',
|
||||
'Tables have been dropped.' => 'Tabele zostały usunięte.',
|
||||
'Tables have been optimized.' => 'Tabele zostały zoptymalizowane.',
|
||||
'Table has been altered.' => 'Tabela została zmieniona.',
|
||||
'Table has been created.' => 'Tabela została utworzona.',
|
||||
'Table name' => 'Nazwa tabeli',
|
||||
@@ -159,13 +165,16 @@ $translations = array(
|
||||
'Auto Increment' => 'Auto Increment',
|
||||
'Options' => 'Opcje',
|
||||
'Comment' => 'Komentarz',
|
||||
'Default value' => 'Wartość domyślna',
|
||||
'Default values' => 'Wartości domyślne',
|
||||
'Drop' => 'Usuń',
|
||||
'Are you sure?' => 'Czy jesteś pewien?',
|
||||
'Size' => 'Wielkość',
|
||||
'Compute' => 'Oblicz',
|
||||
'Move up' => 'Przesuń w górę',
|
||||
'Move down' => 'Przesuń w dół',
|
||||
'Remove' => 'Usuń',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Przekroczono maksymalną liczbę pól. Zwiększ %s i %s.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Przekroczono maksymalną liczbę pól. Zwiększ %s.',
|
||||
|
||||
'Partition by' => 'Partycjonowanie',
|
||||
'Partitions' => 'Partycje',
|
||||
@@ -173,11 +182,13 @@ $translations = array(
|
||||
'Values' => 'Wartości',
|
||||
|
||||
'View' => 'Perspektywa',
|
||||
'Materialized View' => 'Zmaterializowana perspektywa',
|
||||
'View has been dropped.' => 'Perspektywa została usunięta.',
|
||||
'View has been altered.' => 'Perspektywa została zmieniona.',
|
||||
'View has been created.' => 'Perspektywa została utworzona.',
|
||||
'Alter view' => 'Zmień perspektywę',
|
||||
'Create view' => 'Utwórz perspektywę',
|
||||
'Create materialized view' => 'Utwórz zmaterializowaną perspektywę',
|
||||
|
||||
'Indexes' => 'Indeksy',
|
||||
'Indexes have been altered.' => 'Indeksy zostały zmienione.',
|
||||
@@ -226,20 +237,24 @@ $translations = array(
|
||||
'Limit' => 'Limit',
|
||||
'Text length' => 'Długość tekstu',
|
||||
'Action' => 'Czynność',
|
||||
'Full table scan' => 'Wymaga pełnego przeskanowania tabeli',
|
||||
'Unable to select the table' => 'Nie udało się pobrać danych z tabeli',
|
||||
'No rows.' => 'Brak rekordów.',
|
||||
'%d row(s)' => array('%d rekord', '%d rekordy', '%d rekordów'),
|
||||
'Page' => 'Strona',
|
||||
'last' => 'ostatni',
|
||||
'Last page' => 'Ostatnia strona',
|
||||
'Load more data' => 'Wczytaj więcej danych',
|
||||
'Loading' => 'Wczytywanie',
|
||||
'whole result' => 'wybierz wszystkie',
|
||||
'%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtów'),
|
||||
|
||||
'Import' => 'Import',
|
||||
'%d row(s) have been imported.' => array('%d rekord został zaimportowany.', '%d rekordy zostały zaimportowane.', '%d rekordów zostało zaimportowanych.'),
|
||||
'File must be in UTF-8 encoding.' => 'Kodowanie pliku musi być ustawione na UTF-8.',
|
||||
|
||||
// in-place editing in select
|
||||
'Double click on a value to modify it.' => 'Kliknij podwójnie wartość, aby ją edytować.',
|
||||
'Modify' => 'Zmień',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+kliknij wartość, aby ją edytować.',
|
||||
'Use edit link to modify this value.' => 'Użyj linku edycji aby zmienić tę wartość.',
|
||||
|
||||
// %s can contain auto-increment value
|
||||
@@ -255,10 +270,13 @@ $translations = array(
|
||||
'Edit' => 'Edytuj',
|
||||
'Insert' => 'Dodaj',
|
||||
'Save' => 'Zapisz zmiany',
|
||||
'Saving' => 'Zapisywanie',
|
||||
'Save and continue edit' => 'Zapisz i kontynuuj edycję',
|
||||
'Save and insert next' => 'Zapisz i dodaj następny',
|
||||
'Selected' => 'Zaznaczone',
|
||||
'Clone' => 'Duplikuj',
|
||||
'Delete' => 'Usuń',
|
||||
'You have no privileges to update this table.' => 'Brak uprawnień do edycji tej tabeli',
|
||||
|
||||
'E-mail' => 'E-mail',
|
||||
'From' => 'Nadawca',
|
||||
@@ -277,9 +295,6 @@ $translations = array(
|
||||
'Geometry' => 'Geometria',
|
||||
'Relations' => 'Relacje',
|
||||
|
||||
// reload confirmation in AJAX
|
||||
'Resend POST data?' => 'Wysłać dane ponownie?',
|
||||
|
||||
'Editor' => 'Edytor',
|
||||
// date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
|
||||
'$1-$3-$5' => '$6.$4.$1',
|
||||
@@ -288,6 +303,8 @@ $translations = array(
|
||||
// hint for time format - use language equivalents for hour, minute and second shortcuts
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
'now' => 'teraz',
|
||||
'yes' => 'tak',
|
||||
'no' => 'nie',
|
||||
|
||||
// general SQLite error in create, drop or rename database
|
||||
'File exists.' => 'Plik już istnieje.',
|
||||
@@ -299,7 +316,6 @@ $translations = array(
|
||||
'Schema has been dropped.' => 'Schemat został usunięty.',
|
||||
'Schema has been created.' => 'Schemat został utworzony.',
|
||||
'Schema has been altered.' => 'Schemat został zmieniony.',
|
||||
'schema' => 'schemat',
|
||||
'Schema' => 'Schemat',
|
||||
'Invalid schema.' => 'Nieprawidłowy schemat.',
|
||||
|
||||
|
||||
264
adminer/lang/pt-br.inc.php
Normal file
@@ -0,0 +1,264 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Login' => 'Entrar',
|
||||
'Logout successful.' => 'Saída bem sucedida.',
|
||||
'Invalid credentials.' => 'Identificação inválida.',
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Usuário',
|
||||
'Password' => 'Senha',
|
||||
'Select database' => 'Selecionar Base de dados',
|
||||
'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 altered.' => 'A Tabela foi alterada.',
|
||||
'Table has been created.' => 'A Tabela foi criada.',
|
||||
'Alter table' => 'Alterar estrutura',
|
||||
'Create table' => 'Criar tabela',
|
||||
'Table name' => 'Nome da tabela',
|
||||
'engine' => 'motor',
|
||||
'collation' => 'collation',
|
||||
'Column name' => 'Nome da coluna',
|
||||
'Type' => 'Tipo',
|
||||
'Length' => 'Tamanho',
|
||||
'Auto Increment' => 'Incremento Automático',
|
||||
'Options' => 'Opções',
|
||||
'Save' => 'Salvar',
|
||||
'Drop' => 'Apagar',
|
||||
'Database has been dropped.' => 'A Base de dados foi apagada.',
|
||||
'Database has been created.' => 'A Base de dados foi criada.',
|
||||
'Database has been renamed.' => 'A Base de dados foi renomeada.',
|
||||
'Database has been altered.' => 'A Base de dados foi alterada.',
|
||||
'Alter database' => 'Alterar Base de dados',
|
||||
'Create database' => 'Criar Base de dados',
|
||||
'SQL command' => 'Comando SQL',
|
||||
'Logout' => 'Sair',
|
||||
'database' => 'base de dados',
|
||||
'Use' => 'Usar',
|
||||
'No tables.' => 'Não existem tabelas.',
|
||||
'select' => 'selecionar',
|
||||
'Item has been deleted.' => 'O Registro foi deletado.',
|
||||
'Item has been updated.' => 'O Registro foi atualizado.',
|
||||
'Item%s has been inserted.' => 'O Registro%s foi inserido.',
|
||||
'Edit' => 'Editar',
|
||||
'Insert' => 'Inserir',
|
||||
'Save and insert next' => 'Salvar e inserir outro',
|
||||
'Delete' => 'Deletar',
|
||||
'Database' => 'Base de dados',
|
||||
'Routines' => 'Rotinas',
|
||||
'Indexes have been altered.' => 'Os Índices foram alterados.',
|
||||
'Indexes' => 'Índices',
|
||||
'Alter indexes' => 'Alterar índices',
|
||||
'Add next' => 'Adicionar proximo',
|
||||
'Language' => 'Idioma',
|
||||
'Select' => 'Selecionar',
|
||||
'New item' => 'Novo Registro',
|
||||
'Search' => 'Procurar',
|
||||
'Sort' => 'Ordenar',
|
||||
'descending' => 'decrescente',
|
||||
'Limit' => 'Limite',
|
||||
'No rows.' => 'Não existem registros.',
|
||||
'Action' => 'Ação',
|
||||
'edit' => 'editar',
|
||||
'Page' => 'Página',
|
||||
'Query executed OK, %d row(s) affected.' => array('Consulta executada, %d registro afetado.', 'Consulta executada, %d registros afetados.'),
|
||||
'Error in query' => 'Erro na consulta',
|
||||
'Execute' => 'Executar',
|
||||
'Table' => 'Tabela',
|
||||
'Foreign keys' => 'Chaves estrangeiras',
|
||||
'Triggers' => 'Triggers',
|
||||
'View' => 'Visão',
|
||||
'Unable to select the table' => 'Não é possivel selecionar a Tabela',
|
||||
'Invalid CSRF token. Send the form again.' => 'Token CSRF inválido. Enviar o formulario novamente.',
|
||||
'Comment' => 'Comentário',
|
||||
'Default values' => 'Valores padrões',
|
||||
'%d byte(s)' => array('%d byte', '%d bytes'),
|
||||
'No commands to execute.' => 'Nenhum comando para executar.',
|
||||
'Unable to upload a file.' => 'Não é possível enviar o arquivo.',
|
||||
'File upload' => 'Importar arquivo',
|
||||
'File uploads are disabled.' => 'Importação de arquivos desablilitada.',
|
||||
'Routine has been called, %d row(s) affected.' => array('Rotina executada, %d registro afetado.', 'Rotina executada, %d registros afetados.'),
|
||||
'Call' => 'Chamar',
|
||||
'No extension' => 'Não há extension',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Nenhuma das extensões PHP suportadas (%s) está disponivel.',
|
||||
'Session support must be enabled.' => 'Suporte a sessões deve estar habilitado.',
|
||||
'Session expired, please login again.' => 'Sessão expirada, por favor logue-se novamente.',
|
||||
'Text length' => 'Tamanho de texto',
|
||||
'Foreign key has been dropped.' => 'A Chave Estrangeira foi apagada.',
|
||||
'Foreign key has been altered.' => 'A Chave Estrangeira foi alterada.',
|
||||
'Foreign key has been created.' => 'A Chave Estrangeira foi criada.',
|
||||
'Foreign key' => 'Chave Estrangeira',
|
||||
'Target table' => 'Tabela de destino',
|
||||
'Change' => 'Modificar',
|
||||
'Source' => 'Origem',
|
||||
'Target' => 'Destino',
|
||||
'Add column' => 'Adicionar coluna',
|
||||
'Alter' => 'Alterar',
|
||||
'Add foreign key' => 'Adicionar Chave Estrangeira',
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Tipo de índice',
|
||||
'Column (length)' => 'Coluna (tamanho)',
|
||||
'View has been dropped.' => 'A Visão foi apagada.',
|
||||
'View has been altered.' => 'A Visão foi alterada.',
|
||||
'View has been created.' => 'A Visão foi criada.',
|
||||
'Alter view' => 'Alterar visão',
|
||||
'Create view' => 'Criar visão',
|
||||
'Name' => 'Nome',
|
||||
'Process list' => 'Lista de processos',
|
||||
'%d process(es) have been killed.' => array('%d processo foi terminado.', '%d processos foram terminados.'),
|
||||
'Kill' => 'Parar',
|
||||
'Parameter name' => 'Nome de Parâmetro',
|
||||
'Database schema' => 'Esquema de Base de dados',
|
||||
'Create procedure' => 'Criar procedimento',
|
||||
'Create function' => 'Criar função',
|
||||
'Routine has been dropped.' => 'A Rotina foi apagada.',
|
||||
'Routine has been altered.' => 'A Rotina foi alterada.',
|
||||
'Routine has been created.' => 'A Rotina foi criada.',
|
||||
'Alter function' => 'Alterar função',
|
||||
'Alter procedure' => 'Alterar procedimento',
|
||||
'Return type' => 'Tipo de valor de retorno',
|
||||
'Add trigger' => 'Adicionar trigger',
|
||||
'Trigger has been dropped.' => 'O Trigger foi apagado.',
|
||||
'Trigger has been altered.' => 'O Trigger foi alterado.',
|
||||
'Trigger has been created.' => 'O Trigger foi criado.',
|
||||
'Alter trigger' => 'Alterar Trigger',
|
||||
'Create trigger' => 'Adicionar Trigger',
|
||||
'Time' => 'Tempo',
|
||||
'Event' => 'Evento',
|
||||
'%s version: %s through PHP extension %s' => 'Versão %s: %s através da extensão PHP %s',
|
||||
'%d row(s)' => array('%d registro', '%d registros'),
|
||||
'Remove' => 'Remover',
|
||||
'Are you sure?' => 'Você tem certeza?',
|
||||
'Privileges' => 'Privilégios',
|
||||
'Create user' => 'Criar Usuário',
|
||||
'User has been dropped.' => 'O Usuário foi apagado.',
|
||||
'User has been altered.' => 'O Usuário foi alterado.',
|
||||
'User has been created.' => 'O Usuário foi criado.',
|
||||
'Hashed' => 'Hash',
|
||||
'Column' => 'Coluna',
|
||||
'Routine' => 'Rotina',
|
||||
'Grant' => 'Conceder',
|
||||
'Revoke' => 'Impedir',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'POST data demasiado grande. Reduza o tamanho ou aumente a diretiva de configuração %s.',
|
||||
'Logged as: %s' => 'Logado como: %s',
|
||||
'Move up' => 'Mover acima',
|
||||
'Move down' => 'Mover abaixo',
|
||||
'Functions' => 'Funções',
|
||||
'Aggregation' => 'Adições',
|
||||
'Export' => 'Exportar',
|
||||
'Output' => 'Saída',
|
||||
'open' => 'abrir',
|
||||
'save' => 'salvar',
|
||||
'Format' => 'Formato',
|
||||
'Tables' => 'Tabelas',
|
||||
'Data' => 'Dados',
|
||||
'Event has been dropped.' => 'O Evento foi apagado.',
|
||||
'Event has been altered.' => 'O Evento foi alterado.',
|
||||
'Event has been created.' => 'O Evento foi criado.',
|
||||
'Alter event' => 'Modificar Evento',
|
||||
'Create event' => 'Criar Evento',
|
||||
'At given time' => 'A hora determinada',
|
||||
'Every' => 'Cada',
|
||||
'Events' => 'Eventos',
|
||||
'Schedule' => 'Agenda',
|
||||
'Start' => 'Início',
|
||||
'End' => 'Fim',
|
||||
'Status' => 'Estado',
|
||||
'On completion preserve' => 'Ao completar preservar',
|
||||
'Tables and views' => 'Tabelas e Visões',
|
||||
'Data Length' => 'Tamanho de dados',
|
||||
'Index Length' => 'Tamanho de índice',
|
||||
'Data Free' => 'Espaço Livre',
|
||||
'Collation' => 'Colação',
|
||||
'Analyze' => 'Analizar',
|
||||
'Optimize' => 'Otimizar',
|
||||
'Check' => 'Verificar',
|
||||
'Repair' => 'Reparar',
|
||||
'Truncate' => 'Truncar',
|
||||
'Tables have been truncated.' => 'As Tabelas foram truncadas.',
|
||||
'Rows' => 'Registros',
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Tables have been moved.' => 'As Tabelas foram movidas.',
|
||||
'Move to other database' => 'Mover para outra Base de dados',
|
||||
'Move' => 'Mover',
|
||||
'Engine' => 'Motor',
|
||||
'Save and continue edit' => 'Salvar e continuar editando',
|
||||
'original' => 'original',
|
||||
'Tables have been dropped.' => 'As Tabelas foram eliminadas.',
|
||||
'%d item(s) have been affected.' => array('%d item foi afetado.', '%d itens foram afetados.'),
|
||||
'whole result' => 'resultado completo',
|
||||
'Clone' => 'Clonar',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s.',
|
||||
'Partition by' => 'Particionar por',
|
||||
'Partitions' => 'Partições',
|
||||
'Partition name' => 'Nome da Partição',
|
||||
'Values' => 'Valores',
|
||||
'%d row(s) have been imported.' => array('%d registro foi importado.', '%d registros foram importados.'),
|
||||
'anywhere' => 'qualquer local',
|
||||
'Import' => 'Importar',
|
||||
'Stop on error' => 'Parar em caso de erro',
|
||||
'%.3f s' => '%.3f s',
|
||||
'$1-$3-$5' => '$5/$3/$1',
|
||||
'[yyyy]-mm-dd' => 'dd/mm/[aaaa]',
|
||||
'History' => 'Histórico',
|
||||
'Variables' => 'Variáveis',
|
||||
'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 colunas de origen e destino devem ser do mesmo tipo, deve existir um índice entre as colunas de destino e o registro referenciado deve existir.',
|
||||
'Relations' => 'Relações',
|
||||
'Run file' => 'Executar Arquivo',
|
||||
'Clear' => 'Limpar',
|
||||
'Maximum allowed file size is %sB.' => 'Tamanho máximo do arquivo permitido é %sB.',
|
||||
'Numbers' => 'Números',
|
||||
'Date and time' => 'Data e hora',
|
||||
'Strings' => 'Cadena',
|
||||
'Binary' => 'Binário',
|
||||
'Lists' => 'Listas',
|
||||
'Editor' => 'Editor',
|
||||
'E-mail' => 'E-mail',
|
||||
'From' => 'De',
|
||||
'Subject' => 'Assunto',
|
||||
'Send' => 'Enviar',
|
||||
'%d e-mail(s) have been sent.' => array('%d email foi enviado.', '%d emails foram enviados.'),
|
||||
'Webserver file %s' => 'Arquivo do servidor web %s',
|
||||
'File does not exist.' => 'Arquivo não existe.',
|
||||
'%d in total' => '%d no total',
|
||||
'Permanent login' => 'Login permanente',
|
||||
'Databases have been dropped.' => 'A Base de dados foi apagada.',
|
||||
'Search data in tables' => 'Buscar dados nas Tabelas',
|
||||
'Schema' => 'Esquema',
|
||||
'Alter schema' => 'Alterar esquema',
|
||||
'Create schema' => 'Criar esquema',
|
||||
'Schema has been dropped.' => 'O Esquema foi apagado.',
|
||||
'Schema has been created.' => 'O Esquema foi criado.',
|
||||
'Schema has been altered.' => 'O Esquema foi alterado.',
|
||||
'Sequences' => 'Sequências',
|
||||
'Create sequence' => 'Criar sequência',
|
||||
'Alter sequence' => 'Alterar sequência',
|
||||
'Sequence has been dropped.' => 'A Sequência foi apagada.',
|
||||
'Sequence has been created.' => 'A Sequência foi criada.',
|
||||
'Sequence has been altered.' => 'A Sequência foi alterada.',
|
||||
'User types' => 'Tipos definidos pelo usuário',
|
||||
'Create type' => 'Criar tipo',
|
||||
'Alter type' => 'Alterar tipo',
|
||||
'Type has been dropped.' => 'O Tipo foi apagado.',
|
||||
'Type has been created.' => 'O Tipo foi criado.',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+clique sobre o valor para edita-lo.',
|
||||
'Use edit link to modify this value.' => 'Utilize o link editar para modificar este valor.',
|
||||
'last' => 'último',
|
||||
'From server' => 'A partir do servidor',
|
||||
'System' => 'Sistema',
|
||||
'Select data' => 'Selecionar dados',
|
||||
'Show structure' => 'Mostrar estrutura',
|
||||
'empty' => 'vazio',
|
||||
'Network' => 'Rede',
|
||||
'Geometry' => 'Geometria',
|
||||
'File exists.' => 'Arquivo já existe.',
|
||||
'Attachments' => 'Anexos',
|
||||
'%d query(s) executed OK.' => array('%d consulta sql executada corretamente.', '%d consultas sql executadas corretamente.'),
|
||||
'Show only errors' => 'Mostrar somente erros',
|
||||
'Refresh' => 'Atualizar',
|
||||
'Invalid schema.' => 'Esquema inválido.',
|
||||
'Please use one of the extensions %s.' => 'Por favor use uma das extensões %s.',
|
||||
'now' => 'agora',
|
||||
'ltr' => 'ltr',
|
||||
);
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Login' => 'Entrar',
|
||||
'Logout successful.' => 'Saida bem sucedida.',
|
||||
'Logout successful.' => 'Sessão terminada com sucesso.',
|
||||
'Invalid credentials.' => 'Identificação inválida.',
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Usuario',
|
||||
'Username' => 'Nome de utilizador',
|
||||
'Password' => 'Senha',
|
||||
'Select database' => 'Selecionar Base de dados',
|
||||
'Invalid database.' => 'Base de dados inválida.',
|
||||
@@ -22,7 +22,7 @@ $translations = array(
|
||||
'Length' => 'Tamanho',
|
||||
'Auto Increment' => 'Incremento Automático',
|
||||
'Options' => 'Opções',
|
||||
'Save' => 'Salvar',
|
||||
'Save' => 'Guardar',
|
||||
'Drop' => 'Remover',
|
||||
'Database has been dropped.' => 'Base de dados eliminada.',
|
||||
'Database has been created.' => 'Base de dados criada.',
|
||||
@@ -31,71 +31,69 @@ $translations = array(
|
||||
'Alter database' => 'Modificar Base de dados',
|
||||
'Create database' => 'Criar Base de dados',
|
||||
'SQL command' => 'Comando SQL',
|
||||
'Dump' => 'Exportar',
|
||||
'Logout' => 'Sair',
|
||||
'Logout' => 'Terminar sessão',
|
||||
'database' => 'base de dados',
|
||||
'Use' => 'Usar',
|
||||
'No tables.' => 'Não existem tabelas.',
|
||||
'select' => 'registros',
|
||||
'Create new table' => 'Nova tabela',
|
||||
'Item has been deleted.' => 'Registro eliminado.',
|
||||
'Item has been updated.' => 'Registro modificado.',
|
||||
'Item%s has been inserted.' => 'Registro%s inserido.',
|
||||
'select' => 'registos',
|
||||
'Item has been deleted.' => 'Registo eliminado.',
|
||||
'Item has been updated.' => 'Registo modificado.',
|
||||
'Item%s has been inserted.' => 'Registo%s inserido.',
|
||||
'Edit' => 'Modificar',
|
||||
'Insert' => 'Inserir',
|
||||
'Save and insert next' => 'Salvar e inserir outro',
|
||||
'Delete' => 'Apagar',
|
||||
'Save and insert next' => 'Guardar e inserir outro',
|
||||
'Delete' => 'Eliminar',
|
||||
'Database' => 'Base de dados',
|
||||
'Routines' => 'Procedimentos',
|
||||
'Indexes have been altered.' => 'Indices modificados.',
|
||||
'Indexes' => 'Indices',
|
||||
'Alter indexes' => 'Modificar indices',
|
||||
'Add next' => 'Adicionar proximo',
|
||||
'Indexes have been altered.' => 'Índices modificados.',
|
||||
'Indexes' => 'Índices',
|
||||
'Alter indexes' => 'Modificar índices',
|
||||
'Add next' => 'Adicionar próximo',
|
||||
'Language' => 'Idioma',
|
||||
'Select' => 'Selecionar',
|
||||
'New item' => 'Novo Registro',
|
||||
'New item' => 'Novo Registo',
|
||||
'Search' => 'Procurar',
|
||||
'Sort' => 'Ordenar',
|
||||
'descending' => 'decrescente',
|
||||
'Limit' => 'Limite',
|
||||
'No rows.' => 'Não existem registros.',
|
||||
'No rows.' => 'Não existem registos.',
|
||||
'Action' => 'Ação',
|
||||
'edit' => 'modificar',
|
||||
'Page' => 'Página',
|
||||
'Query executed OK, %d row(s) affected.' => array('Consulta executada, %d registro afetados.', 'Consulta executada, %d registros afetados.'),
|
||||
'Query executed OK, %d row(s) affected.' => array('Consulta executada, %d registo afetado.', 'Consulta executada, %d registos afetados.'),
|
||||
'Error in query' => 'Erro na consulta',
|
||||
'Execute' => 'Executar',
|
||||
'Table' => 'Tabela',
|
||||
'Foreign keys' => 'Chaves foráneas',
|
||||
'Foreign keys' => 'Chaves estrangeiras',
|
||||
'Triggers' => 'Triggers',
|
||||
'View' => 'Visualizar',
|
||||
'Unable to select the table' => 'Não é possivel selecionar a Tabela',
|
||||
'Invalid CSRF token. Send the form again.' => 'Token CSRF inválido. Enviar o formulario novamente.',
|
||||
'Comment' => 'Comentario',
|
||||
'Comment' => 'Comentário',
|
||||
'Default values' => 'Valores predeterminados',
|
||||
'%d byte(s)' => array('%d byte', '%d bytes'),
|
||||
'No commands to execute.' => 'Nenhum comando para executar.',
|
||||
'Unable to upload a file.' => 'Não é possivel enviar o arquivo.',
|
||||
'File upload' => 'Importar arquivo',
|
||||
'File uploads are disabled.' => 'Importação de arquivos desablilitado.',
|
||||
'Routine has been called, %d row(s) affected.' => array('Consulta executada, %d registro afetado.', 'Consulta executada, %d registros afetados.'),
|
||||
'Unable to upload a file.' => 'Não é possível enviar o ficheiro.',
|
||||
'File upload' => 'Importar ficheiro',
|
||||
'File uploads are disabled.' => 'Importação de ficheiros desativada.',
|
||||
'Routine has been called, %d row(s) affected.' => array('Consulta executada, %d registo afetado.', 'Consulta executada, %d registos afetados.'),
|
||||
'Call' => 'Chamar',
|
||||
'No extension' => 'Não ha extension',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Nenhuma das extensões PHP soportadas (%s) está disponivel.',
|
||||
'Session support must be enabled.' => 'Devem estar habilitadas as sessões.',
|
||||
'Session expired, please login again.' => 'Sessão expirada, por favor entre sua Chave de novo.',
|
||||
'Text length' => 'Tamanho de texto',
|
||||
'Foreign key has been dropped.' => 'Chave externa eliminada.',
|
||||
'Foreign key has been altered.' => 'Chave externa modificada.',
|
||||
'Foreign key has been created.' => 'Chave externa criada.',
|
||||
'Foreign key' => 'Chave externa',
|
||||
'No extension' => 'Não há extensão',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Nenhuma das extensões PHP suportadas (%s) está disponivel.',
|
||||
'Session support must be enabled.' => 'As sessões devem estar ativas.',
|
||||
'Session expired, please login again.' => 'Sessão expirada, por favor entre de novo.',
|
||||
'Text length' => 'Tamanho do texto',
|
||||
'Foreign key has been dropped.' => 'Chave estrangeira eliminada.',
|
||||
'Foreign key has been altered.' => 'Chave estrangeira modificada.',
|
||||
'Foreign key has been created.' => 'Chave estrangeira criada.',
|
||||
'Foreign key' => 'Chave estrangeira',
|
||||
'Target table' => 'Tabela de destino',
|
||||
'Change' => 'Modificar',
|
||||
'Source' => 'Origem',
|
||||
'Target' => 'Destino',
|
||||
'Add column' => 'Adicionar coluna',
|
||||
'Alter' => 'Modificar',
|
||||
'Add foreign key' => 'Adicionar Chave foránea',
|
||||
'Add foreign key' => 'Adicionar Chave estrangeira',
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Tipo de índice',
|
||||
@@ -109,7 +107,7 @@ $translations = array(
|
||||
'Process list' => 'Lista de processos',
|
||||
'%d process(es) have been killed.' => array('%d processo terminado.', '%d processos terminados.'),
|
||||
'Kill' => 'Parar',
|
||||
'Parameter name' => 'Nome de Parametro',
|
||||
'Parameter name' => 'Nome de Parâmetro',
|
||||
'Database schema' => 'Esquema de Base de dados',
|
||||
'Create procedure' => 'Criar procedimento',
|
||||
'Create function' => 'Criar função',
|
||||
@@ -117,8 +115,8 @@ $translations = array(
|
||||
'Routine has been altered.' => 'Procedimento modificado.',
|
||||
'Routine has been created.' => 'Procedimento criado.',
|
||||
'Alter function' => 'Modificar Função',
|
||||
'Alter procedure' => 'Modificar procedimiento',
|
||||
'Return type' => 'Tipo de valor de regreso',
|
||||
'Alter procedure' => 'Modificar procedimento',
|
||||
'Return type' => 'Tipo de valor de regresso',
|
||||
'Add trigger' => 'Adicionar trigger',
|
||||
'Trigger has been dropped.' => 'Trigger eliminado.',
|
||||
'Trigger has been altered.' => 'Trigger modificado.',
|
||||
@@ -128,29 +126,29 @@ $translations = array(
|
||||
'Time' => 'Tempo',
|
||||
'Event' => 'Evento',
|
||||
'%s version: %s through PHP extension %s' => 'Versão %s: %s através da extensão PHP %s',
|
||||
'%d row(s)' => array('%d registro', '%d registros'),
|
||||
'%d row(s)' => array('%d registo', '%d registos'),
|
||||
'Remove' => 'Remover',
|
||||
'Are you sure?' => 'Está seguro?',
|
||||
'Privileges' => 'Privilegios',
|
||||
'Create user' => 'Criar Usuario',
|
||||
'User has been dropped.' => 'Usuario eliminado.',
|
||||
'User has been altered.' => 'Usuario modificado.',
|
||||
'User has been created.' => 'Usuario criado.',
|
||||
'Are you sure?' => 'Tem a certeza?',
|
||||
'Privileges' => 'Privilégios',
|
||||
'Create user' => 'Criar utilizador',
|
||||
'User has been dropped.' => 'Utilizador eliminado.',
|
||||
'User has been altered.' => 'Utilizador modificado.',
|
||||
'User has been created.' => 'Utilizador criado.',
|
||||
'Hashed' => 'Hash',
|
||||
'Column' => 'Coluna',
|
||||
'Routine' => 'Rotina',
|
||||
'Grant' => 'Conceder',
|
||||
'Revoke' => 'Impedir',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'POST data demasiado grande. Reduza o tamanho ou aumente a diretiva de configuração %s.',
|
||||
'Logged as: %s' => 'Logado como: %s',
|
||||
'Move up' => 'Mover acima',
|
||||
'Move down' => 'Mover abaixo',
|
||||
'Logged as: %s' => 'Ligado como: %s',
|
||||
'Move up' => 'Mover para cima',
|
||||
'Move down' => 'Mover para baixo',
|
||||
'Functions' => 'Funções',
|
||||
'Aggregation' => 'Adições',
|
||||
'Export' => 'Exportar',
|
||||
'Output' => 'Saida',
|
||||
'open' => 'mostrar',
|
||||
'save' => 'salvas',
|
||||
'Output' => 'Saída',
|
||||
'open' => 'abrir',
|
||||
'save' => 'guardar',
|
||||
'Format' => 'Formato',
|
||||
'Tables' => 'Tabelas',
|
||||
'Data' => 'Dados',
|
||||
@@ -159,14 +157,14 @@ $translations = array(
|
||||
'Event has been created.' => 'Evento criado.',
|
||||
'Alter event' => 'Modificar Evento',
|
||||
'Create event' => 'Criar Evento',
|
||||
'At given time' => 'A hora determinada',
|
||||
'At given time' => 'À hora determinada',
|
||||
'Every' => 'Cada',
|
||||
'Events' => 'Eventos',
|
||||
'Schedule' => 'Agenda',
|
||||
'Start' => 'Inicio',
|
||||
'Start' => 'Início',
|
||||
'End' => 'Fim',
|
||||
'Status' => 'Estado',
|
||||
'On completion preserve' => 'Ao completar preservar',
|
||||
'On completion preserve' => 'Preservar ao completar',
|
||||
'Tables and views' => 'Tabelas e vistas',
|
||||
'Data Length' => 'Tamanho de dados',
|
||||
'Index Length' => 'Tamanho de índice',
|
||||
@@ -178,41 +176,42 @@ $translations = array(
|
||||
'Repair' => 'Reparar',
|
||||
'Truncate' => 'Truncar',
|
||||
'Tables have been truncated.' => 'Tabelas truncadas (truncate).',
|
||||
'Rows' => 'Registros',
|
||||
'Rows' => 'Registos',
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Tables have been moved.' => 'As Tabelas foram movidas.',
|
||||
'Move to other database' => 'Mover outra Base de dados',
|
||||
'Move' => 'Mover',
|
||||
'Engine' => 'Motor',
|
||||
'Save and continue edit' => 'Salvar e continuar editando',
|
||||
'Save and continue edit' => 'Guardar e continuar a edição',
|
||||
'original' => 'original',
|
||||
'Tables have been dropped.' => 'Tabelas eliminadas.',
|
||||
'%d item(s) have been affected.' => array('%d ítem afetado.', '%d itens afetados.'),
|
||||
'Tables have been dropped.' => 'As tabelas foram eliminadas.',
|
||||
'%d item(s) have been affected.' => array('%d item afetado.', '%d itens afetados.'),
|
||||
'whole result' => 'resultado completo',
|
||||
'Clone' => 'Clonar',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Cantida máxima de campos permitidos excedidos. Por favor aumente %s y %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',
|
||||
'Partitions' => 'Partições',
|
||||
'Partition name' => 'Nome da Partição',
|
||||
'Values' => 'Valores',
|
||||
'%d row(s) have been imported.' => array('%d registro importado.', '%d registros importados.'),
|
||||
'%d row(s) have been imported.' => array('%d registo importado.', '%d registos importados.'),
|
||||
'anywhere' => 'qualquer local',
|
||||
'Import' => 'Importar',
|
||||
'Stop on error' => 'Parar em caso de erro',
|
||||
'%.3f s' => '%.3f s',
|
||||
'$1-$3-$5' => '$5/$3/$1',
|
||||
'[yyyy]-mm-dd' => 'dd/mm/[aaaa]',
|
||||
'History' => 'Historico',
|
||||
'Variables' => 'Variaveis',
|
||||
'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 colunas de origen e destino devem ser do mesmo tipo, deve existir um índice entre as colunas de destino e o registro referenciado deve existir.',
|
||||
'History' => 'Histórico',
|
||||
'Variables' => 'Variáveis',
|
||||
'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 colunas de origen e destino devem ser do mesmo tipo, deve existir um índice entre as colunas de destino e o registo referenciado deve existir.',
|
||||
'Relations' => 'Relações',
|
||||
'Run file' => 'Executar Arquivo',
|
||||
'Run file' => 'Executar ficheiro',
|
||||
'Clear' => 'Limpar',
|
||||
'Maximum allowed file size is %sB.' => 'Tamanho máximo do arquivo é %sB.',
|
||||
'Maximum allowed file size is %sB.' => 'Tamanho máximo do ficheiro é %sB.',
|
||||
'Numbers' => 'Números',
|
||||
'Date and time' => 'Data e hora',
|
||||
'Strings' => 'Cadena',
|
||||
'Binary' => 'Binario',
|
||||
'Strings' => 'Cadeia',
|
||||
'Binary' => 'Binário',
|
||||
'Lists' => 'Listas',
|
||||
'Editor' => 'Editor',
|
||||
'E-mail' => 'E-mail',
|
||||
@@ -220,45 +219,43 @@ $translations = array(
|
||||
'Subject' => 'Assunto',
|
||||
'Send' => 'Enviar',
|
||||
'%d e-mail(s) have been sent.' => array('%d email enviado.', '%d emails enviados.'),
|
||||
'Webserver file %s' => 'Arquivo do servidor web %s',
|
||||
'File does not exist.' => 'Arquivo não existe.',
|
||||
'Webserver file %s' => 'Ficheiro do servidor web %s',
|
||||
'File does not exist.' => 'Ficheiro não existe.',
|
||||
'%d in total' => '%d no total',
|
||||
'Permanent login' => 'Salvar Senha',
|
||||
'Permanent login' => 'Memorizar a senha',
|
||||
'Databases have been dropped.' => 'Bases de dados eliminadas.',
|
||||
'Search data in tables' => 'Buscar dados nas Tabelas',
|
||||
'schema' => 'esquema',
|
||||
'Search data in tables' => 'Pesquisar dados nas Tabelas',
|
||||
'Schema' => 'Esquema',
|
||||
'Alter schema' => 'Modificar esquema',
|
||||
'Create schema' => 'Criar esquema',
|
||||
'Schema has been dropped.' => 'Esquema eliminado.',
|
||||
'Schema has been created.' => 'Esquema criado.',
|
||||
'Schema has been altered.' => 'Esquema modificado.',
|
||||
'Sequences' => 'Sequencias',
|
||||
'Create sequence' => 'Criar sequencias',
|
||||
'Alter sequence' => 'Modificar sequencia',
|
||||
'Sequence has been dropped.' => 'Sequencia eliminada.',
|
||||
'Sequence has been created.' => 'Sequencia criada.',
|
||||
'Sequence has been altered.' => 'Sequencia modificada.',
|
||||
'User types' => 'Tipos definido pelo usuario',
|
||||
'Sequences' => 'Sequências',
|
||||
'Create sequence' => 'Criar sequências',
|
||||
'Alter sequence' => 'Modificar sequência',
|
||||
'Sequence has been dropped.' => 'Sequência eliminada.',
|
||||
'Sequence has been created.' => 'Sequência criada.',
|
||||
'Sequence has been altered.' => 'Sequência modificada.',
|
||||
'User types' => 'Tipos definidos pelo utilizador',
|
||||
'Create type' => 'Criar tipo',
|
||||
'Alter type' => 'Modificar tipo',
|
||||
'Type has been dropped.' => 'Tipo eliminado.',
|
||||
'Type has been created.' => 'Tipo criado.',
|
||||
'Double click on a value to modify it.' => 'Doble-clic sobre o valor para edita-lo.',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+clique vezes sobre o valor para edita-lo.',
|
||||
'Use edit link to modify this value.' => 'Utilize o link modificar para alterar.',
|
||||
'last' => 'último',
|
||||
'From server' => 'Desde servidor',
|
||||
'From server' => 'Do servidor',
|
||||
'System' => 'Motor de Base de dados',
|
||||
'Select data' => 'Selecionar dados',
|
||||
'Show structure' => 'Mostrar estrutura',
|
||||
'empty' => 'vazio',
|
||||
'Network' => 'Rede',
|
||||
'Geometry' => 'Geometría',
|
||||
'File exists.' => 'Arquivo ja existe.',
|
||||
'Geometry' => 'Geometria',
|
||||
'File exists.' => 'Ficheiro já existe.',
|
||||
'Attachments' => 'Anexos',
|
||||
'%d query(s) executed OK.' => array('%d consulta sql executada corretamente.', '%d consulta sql executadas corretamente.'),
|
||||
'%d query(s) executed OK.' => array('%d consulta sql executada corretamente.', '%d consultas sql executadas corretamente.'),
|
||||
'Show only errors' => 'Mostrar somente erros',
|
||||
'Last page' => 'Ultima página',
|
||||
'Refresh' => 'Atualizar',
|
||||
'Invalid schema.' => 'Esquema inválido.',
|
||||
'Please use one of the extensions %s.' => 'Por favor use uma das extensões %s.',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Login' => 'Intră',
|
||||
'Logout successful.' => 'Ați eșit cu succes.',
|
||||
'Logout successful.' => 'Ați ieșit cu succes.',
|
||||
'Invalid credentials.' => 'Numele de utilizator sau parola este greșită.',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Nume de utilizator',
|
||||
@@ -31,13 +31,11 @@ $translations = array(
|
||||
'Alter database' => 'Modifică baza de date',
|
||||
'Create database' => 'Crează baza de date',
|
||||
'SQL command' => 'SQL query',
|
||||
'Dump' => 'Dump',
|
||||
'Logout' => 'Eșire',
|
||||
'Logout' => 'Ieșire',
|
||||
'database' => 'baza de date',
|
||||
'Use' => 'Alege',
|
||||
'No tables.' => 'În baza de date nu sunt tabele.',
|
||||
'select' => 'selectează',
|
||||
'Create new table' => 'Crează tabel nou',
|
||||
'Item has been deleted.' => 'Înregistrare a fost ștearsă.',
|
||||
'Item has been updated.' => 'Înregistrare a fost înnoită.',
|
||||
'Item%s has been inserted.' => 'Înregistrarea%s a fost inserată.',
|
||||
@@ -47,9 +45,9 @@ $translations = array(
|
||||
'Delete' => 'Șterge',
|
||||
'Database' => 'Baza de date',
|
||||
'Routines' => 'Proceduri și funcții salvate',
|
||||
'Indexes have been altered.' => 'Indexele au fost modificate.',
|
||||
'Indexes' => 'Indexe',
|
||||
'Alter indexes' => 'Modifică indexe',
|
||||
'Indexes have been altered.' => 'Indexurile au fost modificate.',
|
||||
'Indexes' => 'Indexuri',
|
||||
'Alter indexes' => 'Modifică indexuri',
|
||||
'Add next' => 'Adaugă încă',
|
||||
'Language' => 'Limba',
|
||||
'Select' => 'Selectează',
|
||||
@@ -63,11 +61,11 @@ $translations = array(
|
||||
'edit' => 'editare',
|
||||
'Page' => 'Pagina',
|
||||
'Query executed OK, %d row(s) affected.' => array('Query executat, %d înscriere modificată.', 'Query executat, %d înscrieri modificate.'),
|
||||
'Error in query' => 'Eroare în query',
|
||||
'Error in query' => 'Greșeală în query',
|
||||
'Execute' => 'Execută',
|
||||
'Table' => 'Tabel',
|
||||
'Foreign keys' => 'Cheiuri externe',
|
||||
'Triggers' => 'Triggere',
|
||||
'Foreign keys' => 'Chei externe',
|
||||
'Triggers' => 'Declanșatoare',
|
||||
'View' => 'Reprezentare',
|
||||
'Unable to select the table' => 'Nu am putut selecta date din tabel',
|
||||
'Invalid CSRF token. Send the form again.' => 'CSRF token imposibil. Retrimite forma.',
|
||||
@@ -78,24 +76,24 @@ $translations = array(
|
||||
'Unable to upload a file.' => 'Nu am putut încărca fișierul pe server.',
|
||||
'File upload' => 'Încarcă fișierul',
|
||||
'File uploads are disabled.' => 'Încărcarea fișierelor este interzisă.',
|
||||
'Routine has been called, %d row(s) affected.' => array('A fost executată procedură, %d înscriere a fost modificată.', 'A fost executată procedură, %d înscrieri au fost modificate.'),
|
||||
'Routine has been called, %d row(s) affected.' => array('A fost executată procedura, %d înscriere a fost modificată.', 'A fost executată procedura, %d înscrieri au fost modificate.'),
|
||||
'Call' => 'Apelează',
|
||||
'No extension' => 'Nu este extensie',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Nu este aviabilă nici o extensie suportată (%s).',
|
||||
'Session support must be enabled.' => 'Sesiunile trebuie să fie pornite.',
|
||||
'Session expired, please login again.' => 'Timpul sesiunii a expirat, rog să te loghezi din nou.',
|
||||
'Session expired, please login again.' => 'Timpul sesiunii a expirat, rog să vă conectați din nou.',
|
||||
'Text length' => 'Lungimea textului',
|
||||
'Foreign key has been dropped.' => 'Chei extern a fost șters.',
|
||||
'Foreign key has been altered.' => 'Chei extern a fost modificat.',
|
||||
'Foreign key has been created.' => 'Chei extern a fost creat.',
|
||||
'Foreign key' => 'Chei extern',
|
||||
'Foreign key has been dropped.' => 'Cheia externă a fost ștearsă.',
|
||||
'Foreign key has been altered.' => 'Cheia externă a fost modificată.',
|
||||
'Foreign key has been created.' => 'Cheia externă a fost creată.',
|
||||
'Foreign key' => 'Cheie externă',
|
||||
'Target table' => 'Tabela scop',
|
||||
'Change' => 'Modifică',
|
||||
'Source' => 'Sursă',
|
||||
'Target' => 'Scop',
|
||||
'Add column' => 'Adaugă coloană',
|
||||
'Alter' => 'Modifică',
|
||||
'Add foreign key' => 'Adaugă chei extern',
|
||||
'Add foreign key' => 'Adaugă cheie externă',
|
||||
'ON DELETE' => 'La ștergere',
|
||||
'ON UPDATE' => 'La modificare',
|
||||
'Index Type' => 'Tipul indexului',
|
||||
@@ -103,11 +101,11 @@ $translations = array(
|
||||
'View has been dropped.' => 'Reprezentarea a fost ștearsă.',
|
||||
'View has been altered.' => 'Reprezentarea a fost modificată.',
|
||||
'View has been created.' => 'Reprezentarea a fost creată.',
|
||||
'Alter view' => 'Modifică reprezentare',
|
||||
'Alter view' => 'Modifică reprezentarea',
|
||||
'Create view' => 'Crează reprezentare',
|
||||
'Name' => 'Titlu',
|
||||
'Process list' => 'Lista proceselor',
|
||||
'%d process(es) have been killed.' => array('A fost finisat %d proces.', 'Au fost finisate %d procese.'),
|
||||
'%d process(es) have been killed.' => array('A fost terminat %d proces.', 'Au fost terminate %d procese.'),
|
||||
'Kill' => 'Termină',
|
||||
'Parameter name' => 'Numele parametrului',
|
||||
'Database schema' => 'Schema bazei de date',
|
||||
@@ -119,7 +117,7 @@ $translations = array(
|
||||
'Alter function' => 'Modifică funcția',
|
||||
'Alter procedure' => 'Modifică procedura',
|
||||
'Return type' => 'Tipul returnării',
|
||||
'Add trigger' => 'Adaugă trigger',
|
||||
'Add trigger' => 'Adaugă trigger (declanșator)',
|
||||
'Trigger has been dropped.' => 'Triggerul a fost șters.',
|
||||
'Trigger has been altered.' => 'Triggerul a fost modificat.',
|
||||
'Trigger has been created.' => 'Triggerul a fost creat.',
|
||||
@@ -130,8 +128,8 @@ $translations = array(
|
||||
'%s version: %s through PHP extension %s' => 'Versiunea %s: %s cu extensia PHP %s',
|
||||
'%d row(s)' => array('%d înscriere', '%d înscrieri'),
|
||||
'Remove' => 'Șterge',
|
||||
'Are you sure?' => 'Ești precis?',
|
||||
'Privileges' => 'Privelegii',
|
||||
'Are you sure?' => 'Sunteți sigur(ă)?',
|
||||
'Privileges' => 'Privilegii',
|
||||
'Create user' => 'Crează utilizator',
|
||||
'User has been dropped.' => 'Utilizatorul a fost șters.',
|
||||
'User has been altered.' => 'Utilizatorul a fost modificat.',
|
||||
@@ -148,7 +146,7 @@ $translations = array(
|
||||
'Functions' => 'Funcții',
|
||||
'Aggregation' => 'Agregare',
|
||||
'Export' => 'Export',
|
||||
'Output' => 'Date de eșire',
|
||||
'Output' => 'Date de ieșire',
|
||||
'open' => 'deschide',
|
||||
'save' => 'salvează',
|
||||
'Format' => 'Format',
|
||||
@@ -164,12 +162,12 @@ $translations = array(
|
||||
'Events' => 'Evenimente',
|
||||
'Schedule' => 'Program',
|
||||
'Start' => 'Început',
|
||||
'End' => 'Svârșit',
|
||||
'End' => 'Sfârșit',
|
||||
'Status' => 'Stare',
|
||||
'On completion preserve' => 'Salvează după finisare',
|
||||
'Tables and views' => 'Tabele și reprezentări',
|
||||
'Data Length' => 'Cantitatea de date',
|
||||
'Index Length' => 'Cantitatea de indexe',
|
||||
'Index Length' => 'Cantitatea de indecși',
|
||||
'Data Free' => 'Spațiu liber',
|
||||
'Collation' => 'Colaționare',
|
||||
'Analyze' => 'Analizează',
|
||||
@@ -180,6 +178,7 @@ $translations = array(
|
||||
'Tables have been truncated.' => 'Tabelele au fost curățate.',
|
||||
'Rows' => 'Înscrieri',
|
||||
',' => ',',
|
||||
'0123456789' => '0123456789',
|
||||
'Tables have been moved.' => 'Tabelele au fost mutate.',
|
||||
'Move to other database' => 'Mută în altă bază de date',
|
||||
'Move' => 'Mută',
|
||||
@@ -196,8 +195,8 @@ $translations = array(
|
||||
'Values' => 'Parametru',
|
||||
'%d row(s) have been imported.' => array('%d rînd importat.', '%d rînduri importate.'),
|
||||
'Import' => 'Importă',
|
||||
'Stop on error' => 'Opreștete la eroare',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Numărul maxim de înscrieri disponibile a fost atins. Majorați %s și %s.',
|
||||
'Stop on error' => 'Se oprește la greșeală',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Numărul maxim de înscrieri disponibile a fost atins. Majorați %s.',
|
||||
'anywhere' => 'oriunde',
|
||||
'%.3f s' => '%.3f s',
|
||||
'$1-$3-$5' => '$5.$3.$1',
|
||||
@@ -207,11 +206,11 @@ $translations = array(
|
||||
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Coloanele ar trebui să aibă aceleaşi tipuri de date, trebuie să existe date de referinţă și un index pe coloanela-ţintă.',
|
||||
'Relations' => 'Relații',
|
||||
'Run file' => 'Execută fișier',
|
||||
'Clear' => 'Curățp',
|
||||
'Clear' => 'Curăță',
|
||||
'Maximum allowed file size is %sB.' => 'Fișierul maxim admis - %sO.',
|
||||
'Numbers' => 'Număr',
|
||||
'Date and time' => 'Data și timpul',
|
||||
'Strings' => 'Șire de caractere',
|
||||
'Strings' => 'Șiruri de caractere',
|
||||
'Binary' => 'Tip binar',
|
||||
'Lists' => 'Liste',
|
||||
'Editor' => 'Editor',
|
||||
@@ -219,14 +218,13 @@ $translations = array(
|
||||
'From' => 'De la',
|
||||
'Subject' => 'Pentru',
|
||||
'Send' => 'Trimite',
|
||||
'%d e-mail(s) have been sent.' => array('A fost trimisă %d scrisoare.', 'Au fost trimise %d scrisori.'),
|
||||
'%d e-mail(s) have been sent.' => array('A fost trimis %d mail.', 'Au fost trimise %d mail-uri.'),
|
||||
'Webserver file %s' => 'Fișierul %s pe server',
|
||||
'File does not exist.' => 'Așa fișier nu există.',
|
||||
'File does not exist.' => 'Acest fișier nu există.',
|
||||
'%d in total' => 'În total %d',
|
||||
'Permanent login' => 'Logare permanentă',
|
||||
'Databases have been dropped.' => 'Baze de date au fost șterse.',
|
||||
'Databases have been dropped.' => 'Bazele de date au fost șterse.',
|
||||
'Search data in tables' => 'Caută în tabele',
|
||||
'schema' => 'schema',
|
||||
'Schema' => 'Schema',
|
||||
'Alter schema' => 'Modifică schema',
|
||||
'Create schema' => 'Crează o schemă',
|
||||
@@ -244,21 +242,20 @@ $translations = array(
|
||||
'Alter type' => 'Modifică tip',
|
||||
'Type has been dropped.' => 'Tiipul a fost șters.',
|
||||
'Type has been created.' => 'Crează tip nou.',
|
||||
'Double click on a value to modify it.' => 'Dublu click pe o valoare pentru a o modifica.',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+click pe o valoare pentru a o modifica.',
|
||||
'Use edit link to modify this value.' => 'Valoare poate fi modificată cu ajutorul butonului «modifică».',
|
||||
'last' => 'ultima',
|
||||
'From server' => 'De pe server',
|
||||
'System' => 'Sistema',
|
||||
'System' => 'Sistem',
|
||||
'Select data' => 'Selectează',
|
||||
'Show structure' => 'Arată structura',
|
||||
'empty' => 'gol',
|
||||
'Network' => 'Rețea',
|
||||
'Geometry' => 'Geometrie',
|
||||
'File exists.' => 'Fișierul deja există.',
|
||||
'File exists.' => 'Fișierul există deja.',
|
||||
'Attachments' => 'Fișiere atașate',
|
||||
'%d query(s) executed OK.' => array('%d query executat.', '%d query-uri executate cu succes.'),
|
||||
'Show only errors' => 'Arată doar greșeli',
|
||||
'Last page' => 'Ultima pagină',
|
||||
'Refresh' => 'Împrospătează',
|
||||
'Invalid schema.' => 'Schemă incorectă.',
|
||||
'Please use one of the extensions %s.' => 'Folosiți una din următoarele extensii %s.',
|
||||
@@ -268,6 +265,5 @@ $translations = array(
|
||||
'Copy' => 'Copiază',
|
||||
'Permanent link' => 'Adresă permanentă',
|
||||
'Edit all' => 'Editează tot',
|
||||
'Resend POST data?' => 'Retrimite datele POST?',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
|
||||
@@ -31,26 +31,24 @@ $translations = array(
|
||||
'Alter database' => 'Изменить базу данных',
|
||||
'Create database' => 'Создать базу данных',
|
||||
'SQL command' => 'SQL запрос',
|
||||
'Dump' => 'Дамп',
|
||||
'Logout' => 'Выйти',
|
||||
'database' => 'база данных',
|
||||
'Use' => 'Выбрать',
|
||||
'No tables.' => 'В базе данных нет таблиц.',
|
||||
'select' => 'выбрать',
|
||||
'Create new table' => 'Создать новую таблицу',
|
||||
'Item has been deleted.' => 'Запись удалена.',
|
||||
'Item has been updated.' => 'Запись обновлена.',
|
||||
'Item%s has been inserted.' => 'Запись%s была вставлена.',
|
||||
'Edit' => 'Редактировать',
|
||||
'Insert' => 'Вставить',
|
||||
'Save and insert next' => 'Сохранить и вставить еще',
|
||||
'Save and insert next' => 'Сохранить и вставить ещё',
|
||||
'Delete' => 'Стереть',
|
||||
'Database' => 'База данных',
|
||||
'Routines' => 'Хранимые процедуры и функции',
|
||||
'Indexes have been altered.' => 'Индексы изменены.',
|
||||
'Indexes' => 'Индексы',
|
||||
'Alter indexes' => 'Изменить индексы',
|
||||
'Add next' => 'Добавить еще',
|
||||
'Add next' => 'Добавить ещё',
|
||||
'Language' => 'Язык',
|
||||
'Select' => 'Выбрать',
|
||||
'New item' => 'Новая запись',
|
||||
@@ -62,7 +60,7 @@ $translations = array(
|
||||
'Action' => 'Действие',
|
||||
'edit' => 'редактировать',
|
||||
'Page' => 'Страница',
|
||||
'Query executed OK, %d row(s) affected.' => array('Запрос завершен, изменена %d запись.', 'Запрос завершен, изменены %d записи.', 'Запрос завершен, изменено %d записей.'),
|
||||
'Query executed OK, %d row(s) affected.' => array('Запрос завершён, изменена %d запись.', 'Запрос завершён, изменены %d записи.', 'Запрос завершён, изменено %d записей.'),
|
||||
'Error in query' => 'Ошибка в запросe',
|
||||
'Execute' => 'Выполнить',
|
||||
'Table' => 'Таблица',
|
||||
@@ -81,12 +79,12 @@ $translations = array(
|
||||
'Routine has been called, %d row(s) affected.' => array('Была вызвана процедура, %d запись была изменена.', 'Была вызвана процедура, %d записи было изменено.', 'Была вызвана процедура, %d записей было изменено.'),
|
||||
'Call' => 'Вызвать',
|
||||
'No extension' => 'Нет расширений',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Не доступно ни одного расширения из поддерживаемых (%s).',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Недоступно ни одного расширения из поддерживаемых (%s).',
|
||||
'Session support must be enabled.' => 'Сессии должны быть включены.',
|
||||
'Session expired, please login again.' => 'Срок действия сесси истек, нужно снова войти в систему.',
|
||||
'Session expired, please login again.' => 'Срок действия сессии истёк, нужно снова войти в систему.',
|
||||
'Text length' => 'Длина текста',
|
||||
'Foreign key has been dropped.' => 'Внешний ключ был удален.',
|
||||
'Foreign key has been altered.' => 'Внешний ключ был изменен.',
|
||||
'Foreign key has been dropped.' => 'Внешний ключ был удалён.',
|
||||
'Foreign key has been altered.' => 'Внешний ключ был изменён.',
|
||||
'Foreign key has been created.' => 'Внешний ключ был создан.',
|
||||
'Foreign key' => 'Внешний ключ',
|
||||
'Target table' => 'Результирующая таблица',
|
||||
@@ -107,7 +105,7 @@ $translations = array(
|
||||
'Create view' => 'Создать представление',
|
||||
'Name' => 'Название',
|
||||
'Process list' => 'Список процессов',
|
||||
'%d process(es) have been killed.' => array('Был завершен %d процесс.', 'Было завершено %d процесса.', 'Было завершёно %d процессов.'),
|
||||
'%d process(es) have been killed.' => array('Был завершён %d процесс.', 'Было завершено %d процесса.', 'Было завершено %d процессов.'),
|
||||
'Kill' => 'Завершить',
|
||||
'Parameter name' => 'Название параметра',
|
||||
'Database schema' => 'Схема базы данных',
|
||||
@@ -120,8 +118,8 @@ $translations = array(
|
||||
'Alter procedure' => 'Изменить процедуру',
|
||||
'Return type' => 'Возвращаемый тип',
|
||||
'Add trigger' => 'Добавить триггер',
|
||||
'Trigger has been dropped.' => 'Триггер был удален.',
|
||||
'Trigger has been altered.' => 'Триггер был изменен.',
|
||||
'Trigger has been dropped.' => 'Триггер был удалён.',
|
||||
'Trigger has been altered.' => 'Триггер был изменён.',
|
||||
'Trigger has been created.' => 'Триггер был создан.',
|
||||
'Alter trigger' => 'Изменить триггер',
|
||||
'Create trigger' => 'Создать триггер',
|
||||
@@ -133,8 +131,8 @@ $translations = array(
|
||||
'Are you sure?' => 'Вы уверены?',
|
||||
'Privileges' => 'Полномочия',
|
||||
'Create user' => 'Создать пользователя',
|
||||
'User has been dropped.' => 'Пользователь был удален.',
|
||||
'User has been altered.' => 'Пользователь был изменен.',
|
||||
'User has been dropped.' => 'Пользователь был удалён.',
|
||||
'User has been altered.' => 'Пользователь был изменён.',
|
||||
'User has been created.' => 'Пользователь был создан.',
|
||||
'Hashed' => 'Хешировано',
|
||||
'Column' => 'Колонка',
|
||||
@@ -180,8 +178,9 @@ $translations = array(
|
||||
'Tables have been truncated.' => 'Таблицы были очищены.',
|
||||
'Rows' => 'Строк',
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Tables have been moved.' => 'Таблицы были перемещены.',
|
||||
'Move to other database' => 'Переместить в другою базу данных',
|
||||
'Move to other database' => 'Переместить в другую базу данных',
|
||||
'Move' => 'Переместить',
|
||||
'Engine' => 'Тип',
|
||||
'Save and continue edit' => 'Сохранить и продолжить редактирование',
|
||||
@@ -197,7 +196,7 @@ $translations = array(
|
||||
'%d row(s) have been imported.' => array('Импортирована %d строка.', 'Импортировано %d строки.', 'Импортировано %d строк.'),
|
||||
'Import' => 'Импорт',
|
||||
'Stop on error' => 'Остановить при ошибке',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Достигнуто максимальное значение количества доступных полей. Увеличьте %s и %s.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Достигнуто максимальное значение количества доступных полей. Увеличьте %s.',
|
||||
'anywhere' => 'в любом месте',
|
||||
'%.3f s' => '%.3f s',
|
||||
'$1-$3-$5' => '$5.$3.$1',
|
||||
@@ -208,7 +207,7 @@ $translations = array(
|
||||
'Relations' => 'Реляции',
|
||||
'Run file' => 'Запустить файл',
|
||||
'Clear' => 'Очистить',
|
||||
'Maximum allowed file size is %sB.' => 'Максимальный разрешенный размер файла - %sB.',
|
||||
'Maximum allowed file size is %sB.' => 'Максимальный разрешённый размер файла - %sB.',
|
||||
'Numbers' => 'Число',
|
||||
'Date and time' => 'Дата и время',
|
||||
'Strings' => 'Строки',
|
||||
@@ -226,7 +225,6 @@ $translations = array(
|
||||
'Permanent login' => 'Оставаться в системе',
|
||||
'Databases have been dropped.' => 'Базы данных удалены.',
|
||||
'Search data in tables' => 'Поиск в таблицах',
|
||||
'schema' => 'схема',
|
||||
'Schema' => 'Схема',
|
||||
'Alter schema' => 'Изменить схему',
|
||||
'Create schema' => 'Новая схема',
|
||||
@@ -244,7 +242,7 @@ $translations = array(
|
||||
'Alter type' => 'Изменить тип',
|
||||
'Type has been dropped.' => 'Тип удален.',
|
||||
'Type has been created.' => 'Создан новый тип.',
|
||||
'Double click on a value to modify it.' => 'Кликни два раза по значению, чтобы его изменить.',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+кликни по значению, чтобы его изменить.',
|
||||
'Use edit link to modify this value.' => 'Изменить это значение можно с помощью ссылки «изменить».',
|
||||
'last' => 'последняя',
|
||||
'From server' => 'С сервера',
|
||||
@@ -255,10 +253,9 @@ $translations = array(
|
||||
'Network' => 'Сеть',
|
||||
'Geometry' => 'Геометрия',
|
||||
'File exists.' => 'Файл уже существует.',
|
||||
'Attachments' => 'Прикрепленные файлы',
|
||||
'Attachments' => 'Прикреплённые файлы',
|
||||
'%d query(s) executed OK.' => array('%d запрос выполнен успешно.', '%d запроса выполнено успешно.', '%d запросов выполнено успешно.'),
|
||||
'Show only errors' => 'Только ошибки',
|
||||
'Last page' => 'Последняя страница',
|
||||
'Refresh' => 'Обновить',
|
||||
'Invalid schema.' => 'Неправильная схема.',
|
||||
'Please use one of the extensions %s.' => 'Используйте одно из этих расширений %s.',
|
||||
@@ -268,6 +265,5 @@ $translations = array(
|
||||
'Copy' => 'Копировать',
|
||||
'Permanent link' => 'Постоянная ссылка',
|
||||
'Edit all' => 'Редактировать всё',
|
||||
'Resend POST data?' => 'Еще раз послать данные POST запроса?',
|
||||
'HH:MM:SS' => 'ЧЧ:ММ:СС',
|
||||
);
|
||||
|
||||
@@ -32,13 +32,11 @@ $translations = array(
|
||||
'Alter database' => 'Zmeniť databázu',
|
||||
'Create database' => 'Vytvoriť databázu',
|
||||
'SQL command' => 'SQL príkaz',
|
||||
'Dump' => 'Export',
|
||||
'Logout' => 'Odhlásiť',
|
||||
'database' => 'databáza',
|
||||
'Use' => 'Vybrať',
|
||||
'No tables.' => 'Žiadne tabuľky.',
|
||||
'select' => 'vypísať',
|
||||
'Create new table' => 'Vytvoriť novú tabuľku',
|
||||
'Item has been deleted.' => 'Položka bola vymazaná.',
|
||||
'Item has been updated.' => 'Položka bola aktualizovaná.',
|
||||
'Item%s has been inserted.' => 'Položka%s bola vložená.',
|
||||
@@ -181,6 +179,7 @@ $translations = array(
|
||||
'Data Free' => 'Voľné miesto',
|
||||
'Rows' => 'Riadky',
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Analyze' => 'Analyzovať',
|
||||
'Optimize' => 'Optimalizovať',
|
||||
'Check' => 'Skontrolovať',
|
||||
@@ -198,7 +197,7 @@ $translations = array(
|
||||
'%d row(s) have been imported.' => array('Bol importovaný %d záznam.', 'Boli importované %d záznamy.', 'Bolo importovaných %d záznamov.'),
|
||||
'Import' => 'Import',
|
||||
'Stop on error' => 'Zastaviť pri chybe',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Bol prekročený maximálny počet povolených polí. Zvýšte prosím %s a %s.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Bol prekročený maximálny počet povolených polí. Zvýšte prosím %s.',
|
||||
'anywhere' => 'kdekoľvek',
|
||||
'%.3f s' => '%.3f s',
|
||||
'$1-$3-$5' => '$6.$4.$1',
|
||||
@@ -231,7 +230,6 @@ $translations = array(
|
||||
'Schema has been dropped.' => 'Schéma bola odstránená.',
|
||||
'Schema has been created.' => 'Schéma bola vytvorená.',
|
||||
'Schema has been altered.' => 'Schéma bola zmenená.',
|
||||
'schema' => 'schéma',
|
||||
'Schema' => 'Schéma',
|
||||
'Sequences' => 'Sekvencia',
|
||||
'Create sequence' => 'Vytvoriť sekvenciu',
|
||||
@@ -244,7 +242,7 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Typ bol odstránený.',
|
||||
'Type has been created.' => 'Typ bol vytvorený.',
|
||||
'Alter type' => 'Pozmeniť typ',
|
||||
'Double click on a value to modify it.' => 'Dvojkliknite na políčko, ktoré chcete zmeniť.',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+kliknite na políčko, ktoré chcete zmeniť.',
|
||||
'Use edit link to modify this value.' => 'Pre zmenu tejto hodnoty použite odkaz upraviť.',
|
||||
'last' => 'posledný',
|
||||
'From server' => 'Zo serveru',
|
||||
@@ -258,7 +256,6 @@ $translations = array(
|
||||
'Attachments' => 'Prílohy',
|
||||
'%d query(s) executed OK.' => array('Bol vykonaný %d dotaz.', 'Boli vykonané %d dotazy.', 'Bolo vykonaných %d dotazov.'),
|
||||
'Show only errors' => 'Zobraziť iba chyby',
|
||||
'Last page' => 'Posledná stránka',
|
||||
'Refresh' => 'Obnoviť',
|
||||
'Invalid schema.' => 'Neplatné schéma.',
|
||||
'Please use one of the extensions %s.' => 'Prosím vyberte jednu z koncoviek %s.',
|
||||
@@ -268,6 +265,5 @@ $translations = array(
|
||||
'Copy' => 'Kopírovať',
|
||||
'Permanent link' => 'Permanentný odkaz',
|
||||
'Edit all' => 'Upraviť všetko',
|
||||
'Resend POST data?' => 'Znovu poslať POST data?',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
|
||||
@@ -65,7 +65,6 @@ $translations = array(
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Preveliko podatkov za POST. Zmanjšajte število podatkov ali povečajte nastavitev za %s.',
|
||||
|
||||
'Export' => 'Izvozi',
|
||||
'Dump' => 'Izvozi',
|
||||
'Output' => 'Izhod rezultata',
|
||||
'open' => 'odpri',
|
||||
'save' => 'shrani',
|
||||
@@ -89,6 +88,7 @@ $translations = array(
|
||||
|
||||
// thousands separator - must contain single byte
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Engine' => 'Pogon',
|
||||
'Collation' => 'Zbiranje',
|
||||
'Data Length' => 'Velikost podatkov',
|
||||
@@ -140,7 +140,6 @@ $translations = array(
|
||||
'No tables.' => 'Ni tabel.',
|
||||
'Alter table' => 'Spremeni tabelo',
|
||||
'Create table' => 'Ustvari tabelo',
|
||||
'Create new table' => 'Ustvari novo tabelo',
|
||||
'Table has been dropped.' => 'Tabela je zavržena.',
|
||||
'Tables have been dropped.' => 'Tabele so zavržene.',
|
||||
'Table has been altered.' => 'Tabela je spremenjena.',
|
||||
@@ -161,7 +160,7 @@ $translations = array(
|
||||
'Move up' => 'Premakni gor',
|
||||
'Move down' => 'Premakni dol',
|
||||
'Remove' => 'Odstrani',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Največje število dovoljenih polje je preseženo. Prosimo, povečajte %s in %s.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Največje število dovoljenih polje je preseženo. Prosimo, povečajte %s.',
|
||||
|
||||
'Partition by' => 'Porazdeli po',
|
||||
'Partitions' => 'Porazdelitve',
|
||||
@@ -227,7 +226,6 @@ $translations = array(
|
||||
'%d row(s)' => array('%d vrstica', '%d vrstici', '%d vrstice', '%d vrstic'),
|
||||
'Page' => 'Stran',
|
||||
'last' => 'Zadnja',
|
||||
'Last page' => 'Zadnja stran',
|
||||
'whole result' => 'cel razultat',
|
||||
'%d byte(s)' => array('%d bajt', '%d bajta', '%d bajti', '%d bajtov'),
|
||||
|
||||
@@ -235,7 +233,7 @@ $translations = array(
|
||||
'%d row(s) have been imported.' => array('Uvožena je %d vrstica.', 'Uvoženi sta %d vrstici.', 'Uvožene so %d vrstice.', 'Uvoženih je %d vrstic.'),
|
||||
|
||||
// in-place editing in select
|
||||
'Double click on a value to modify it.' => 'Dvojni klik na vrednost za urejanje.',
|
||||
'Ctrl+click on a value to modify it.' => 'Ctrl+klik na vrednost za urejanje.',
|
||||
'Use edit link to modify this value.' => 'Uporabite urejanje povezave za spreminjanje te vrednosti.',
|
||||
|
||||
// %s can contain auto-increment value
|
||||
@@ -290,7 +288,6 @@ $translations = array(
|
||||
'Schema has been dropped.' => 'Shema je zavržena.',
|
||||
'Schema has been created.' => 'Shema je ustvarjena.',
|
||||
'Schema has been altered.' => 'Shema je spremenjena.',
|
||||
'schema' => 'shema',
|
||||
'Schema' => 'Shema',
|
||||
'Invalid schema.' => 'Neveljavna shema.',
|
||||
|
||||
|
||||
320
adminer/lang/sr.inc.php
Normal file
@@ -0,0 +1,320 @@
|
||||
<?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.' => 'Неважеће дозволе.',
|
||||
'Language' => 'Језик',
|
||||
'Invalid CSRF token. Send the form again.' => 'Неважећи CSRF код. Проследите поново форму.',
|
||||
'No extension' => 'Без додатака',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Ниједан од подржаних PHP додатака није доступан.',
|
||||
'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 процеса су убијена.', '%d процеса је убијено.'),
|
||||
'Kill' => 'Убиј',
|
||||
|
||||
'Variables' => 'Променљиве',
|
||||
'Status' => 'Статус',
|
||||
|
||||
'SQL command' => 'SQL команда',
|
||||
'%d query(s) executed OK.' => array('%d упит је успешно извршен.', '%d упита су успешно извршена.', '%d упита је успешно извршено.'),
|
||||
'Query executed OK, %d row(s) affected.' => array('Упит је успешно извршен, %d ред је погођен.', 'Упит је успешно извршен, %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.' => 'Превелики POST податак. Морате да смањите податак или повећајте вредност конфигурационе директиве %s.',
|
||||
|
||||
'Export' => 'Извоз',
|
||||
'Output' => 'Испис',
|
||||
'open' => 'отвори',
|
||||
'save' => 'сачувај',
|
||||
'Format' => 'Формат',
|
||||
'Data' => 'Податци',
|
||||
|
||||
'Database' => 'База података',
|
||||
'database' => 'база података',
|
||||
'Use' => 'Користи',
|
||||
'Select database' => 'Изаберите базу',
|
||||
'Invalid database.' => 'Неисправна база података.',
|
||||
'Create new 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' => 'Оптимизуј',
|
||||
'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 реда су погођена.', 'Позвана је рутина, %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 values' => 'Подразумеване вредности',
|
||||
'Drop' => 'Избриши',
|
||||
'Are you sure?' => 'Да ли сте сигурни?',
|
||||
'Move up' => 'Помери на горе',
|
||||
'Move down' => 'Помери на доле',
|
||||
'Remove' => 'Уклони',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Премашен је максимални број дозвољених поља. Молим увећајте %s.',
|
||||
|
||||
'Partition by' => 'Подели по',
|
||||
'Partitions' => 'Поделе',
|
||||
'Partition name' => 'Име поделе',
|
||||
'Values' => 'Вредности',
|
||||
|
||||
'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 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.' => 'Изворне и циљне колоне морају бити истог типа, циљна колона мора бити индексирана и изворна табела мора садржати податке из циљне.',
|
||||
|
||||
'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' => 'Граница',
|
||||
'Text length' => 'Дужина текста',
|
||||
'Action' => 'Акција',
|
||||
'Full table scan' => 'Скренирање комплетне табеле',
|
||||
'Unable to select the table' => 'Не могу да изаберем табелу',
|
||||
'No rows.' => 'Без редова.',
|
||||
'%d row(s)' => array('%d ред', '%d реда', '%d редова'),
|
||||
'Page' => 'Страна',
|
||||
'last' => 'последња',
|
||||
'Loading' => 'Учитавам',
|
||||
'Load more data' => 'Учитавам још података',
|
||||
'whole result' => 'цео резултат',
|
||||
'%d byte(s)' => array('%d бајт', '%d бајта', '%d бајтова'),
|
||||
|
||||
'Import' => 'Увоз',
|
||||
'%d row(s) have been imported.' => array('%d ред је увежен.', '%d реда су увежена.', '%d редова је увежено.'),
|
||||
|
||||
// in-place editing in select
|
||||
'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 ставке су погођене.', '%d ставки је погођено.'),
|
||||
'New item' => 'Нова ставка',
|
||||
'original' => 'оригинал',
|
||||
// label for value '' in enum data type
|
||||
'empty' => 'празно',
|
||||
'edit' => 'измени',
|
||||
'Edit' => 'Измени',
|
||||
'Insert' => 'Уметни',
|
||||
'Save' => 'Сачувај',
|
||||
'Save and continue edit' => 'Сачувај и настави уређење',
|
||||
'Save and insert next' => 'Сачувај и уметни следеће',
|
||||
'Clone' => 'Дуплирај',
|
||||
'Delete' => 'Избриши',
|
||||
|
||||
'E-mail' => 'Ел. пошта',
|
||||
'From' => 'Од',
|
||||
'Subject' => 'Наслов',
|
||||
'Attachments' => 'Прилози',
|
||||
'Send' => 'Пошаљи',
|
||||
'%d e-mail(s) have been sent.' => array('%d порука ел. поште је послата.', '%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' => '$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' => 'сад',
|
||||
'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' => 'Уреди тип',
|
||||
);
|
||||
@@ -31,13 +31,11 @@ $translations = array(
|
||||
'Alter database' => 'தகவல்தளத்தை மாற்று',
|
||||
'Create database' => 'தகவல்தளத்தை உருவாக்கு',
|
||||
'SQL command' => 'SQL கட்டளை',
|
||||
'Dump' => 'Dump',
|
||||
'Logout' => 'வெளியேறு',
|
||||
'database' => 'தகவல்தளம்',
|
||||
'Use' => 'உபயோகி',
|
||||
'No tables.' => 'அட்டவணை இல்லை.',
|
||||
'select' => 'தேர்வு செய்',
|
||||
'Create new table' => 'புதிய அட்டவணையை உருவாக்கு',
|
||||
'Item has been deleted.' => 'உருப்படி நீக்கப்பட்டது.',
|
||||
'Item has been updated.' => 'உருப்படி புதுப்பிக்கப்பட்டது.',
|
||||
'Edit' => 'தொகு',
|
||||
@@ -138,7 +136,7 @@ $translations = array(
|
||||
'Routine' => 'ரொட்டீன்',
|
||||
'Grant' => 'அனுமதியளி',
|
||||
'Revoke' => 'இரத்துச்செய்',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'மிக அதிகமான POST தகவல். தகவலை குறைக்கவும் அல்லது %s வடிவமைப்பை (configuration directive) மாற்றவும்.',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'மிக அதிகமான POST தகவல். தகவலை குறைக்கவும் அல்லது %s வடிவமைப்பை (configuration directive) மாற்றவும்.',
|
||||
'Logged as: %s' => 'பயனாளர்: %s',
|
||||
'Move up' => 'மேலே நகர்த்து',
|
||||
'Move down' => 'கீழே நகர்த்து',
|
||||
@@ -177,6 +175,7 @@ $translations = array(
|
||||
'Tables have been truncated.' => 'அட்டவணை குறைக்கப்பட்டது (truncated).',
|
||||
'Rows' => 'வரிசைகள்',
|
||||
',' => ',',
|
||||
'0123456789' => '0123456789',
|
||||
'Tables have been moved.' => 'அட்டவணை நகர்த்தப்பட்டது.',
|
||||
'Move to other database' => 'மற்ற தகவல் தளத்திற்க்கு நகர்த்து',
|
||||
'Move' => 'நகர்த்து',
|
||||
@@ -187,7 +186,7 @@ $translations = array(
|
||||
'%d item(s) have been affected.' => array('%d உருப்படி மாற்றமடைந்தது.', '%d உருப்படிகள் மாற்றமடைந்தன.'),
|
||||
'whole result' => 'முழுமையான முடிவு',
|
||||
'Clone' => 'நகலி (Clone)',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'அனுமதிக்கப்பட்ட அதிகபட்ச கோப்புகளின் எண்ணிக்கை மீறப்பட்டது. தயவு செய்து %s மற்றும் %s யை அதிகரிக்கவும்.',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'அனுமதிக்கப்பட்ட அதிகபட்ச கோப்புகளின் எண்ணிக்கை மீறப்பட்டது. தயவு செய்து %s மற்றும் %s யை அதிகரிக்கவும்.',
|
||||
'Partition by' => 'பிரித்தது',
|
||||
'Partitions' => 'பிரிவுகள்',
|
||||
'Partition name' => 'பிரிவின் பெயர்',
|
||||
@@ -234,7 +233,6 @@ $translations = array(
|
||||
'Schema has been dropped.' => 'அமைப்புமுறை நீக்கப்பட்டது.',
|
||||
'Schema has been created.' => 'அமைப்புமுறை உருவாக்கப்பட்டது.',
|
||||
'Schema has been altered.' => 'அமைப்புமுறை மாற்றப்பட்டது.',
|
||||
'Double click on a value to modify it.' => 'மதிப்பினை மாற்ற அதன் மீது இருமுறை சொடுக்கவும் (Double click).',
|
||||
'Use edit link to modify this value.' => 'இந்த மதிப்பினை மாற்ற, தொகுப்பு இணைப்பினை உபயோகிக்கவும்.',
|
||||
'last' => 'கடைசி',
|
||||
'Sequence has been dropped.' => 'வரிசைமுறை நீக்கப்பட்டது.',
|
||||
@@ -248,7 +246,6 @@ $translations = array(
|
||||
'System' => 'சிஸ்டம் (System)',
|
||||
'anywhere' => 'எங்காயினும்',
|
||||
'empty' => 'வெறுமை (empty)',
|
||||
'schema' => 'அமைப்புமுறை',
|
||||
'No extension' => 'விரிவு (extensஇஒன்) இல்லை ',
|
||||
'Databases have been dropped.' => 'தகவல் தளங்கள் நீக்கப்பட்டன.',
|
||||
'%s version: %s through PHP extension %s' => '%s பதிப்பு: %s through PHP extension %s',
|
||||
@@ -259,7 +256,6 @@ $translations = array(
|
||||
'now' => 'இப்பொழுது',
|
||||
'%d query(s) executed OK.' => array('%d வினவல் செயல்படுத்தப்பட்டது.', '%d வினவல்கள் செயல்படுத்தப்பட்டன.'),
|
||||
'Show only errors' => 'பிழைகளை மட்டும் காண்பிக்கவும்',
|
||||
'Last page' => 'கடைசி பக்கம்',
|
||||
'Refresh' => 'புதுப்பி (Refresh)',
|
||||
'Invalid schema.' => 'அமைப்புமுறை சரியானதல்ல (Invalid Schema).',
|
||||
'Please use one of the extensions %s.' => 'தயவு செய்து ஒரு விரிவினை %s (extension) உபயோகிக்கவும்.',
|
||||
@@ -268,6 +264,5 @@ $translations = array(
|
||||
'Copy' => 'நகல்',
|
||||
'Permanent link' => 'நிரந்தர இணைப்பு',
|
||||
'Edit all' => 'அனைத்தையும் தொகு',
|
||||
'Resend POST data?' => 'POST data வை மீண்டும் அனுப்பவா?',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
|
||||
269
adminer/lang/th.inc.php
Normal file
@@ -0,0 +1,269 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Login' => 'เข้าสู่ระบบ',
|
||||
'Logout successful.' => 'ออกจากระบบเรียบร้อยแล้ว.',
|
||||
'Invalid credentials.' => 'ข้อมูลไม่ถูกต้อง.',
|
||||
'Server' => 'เซอเวอร์',
|
||||
'Username' => 'ชื่อผู้ใช้งาน',
|
||||
'Password' => 'รหัสผ่าน',
|
||||
'Select database' => 'เลือกฐานข้อมูล',
|
||||
'Invalid database.' => 'ฐานข้อมูลไม่ถูกต้อง.',
|
||||
'Create new 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 dropped.' => 'ฐานข้อมูลถูกลบแล้ว.',
|
||||
'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.' => 'ปรับปรุงรายการแล้ว.',
|
||||
'Item%s has been inserted.' => 'มี%s รายการ ถูกเพิ่มแล้ว.',
|
||||
'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.' => 'เครื่องหมาย CSRF ไม่ถูกต้อง ส่งข้อมูลใหม่อีกครั้ง.',
|
||||
'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.',
|
||||
'Session expired, please login again.' => 'Session หมดอายุแล้ว กรุณาเข้าสู่ระบบใหม่อีกครั้ง.',
|
||||
'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 DELETE',
|
||||
'ON UPDATE' => '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' => 'Schema ของฐานข้อมูล',
|
||||
'Create procedure' => 'สร้าง procedure',
|
||||
'Create function' => 'สร้าง Function',
|
||||
'Routine has been dropped.' => 'Routine ถูกลบแล้ว.',
|
||||
'Routine has been altered.' => 'Routine ถูกเปลี่ยนแปลงแล้ว.',
|
||||
'Routine has been created.' => 'Routine ถูกสร้างแล้ว.',
|
||||
'Alter function' => 'เปลี่ยนแปลง Function',
|
||||
'Alter procedure' => 'เปลี่ยนแปลง procedure',
|
||||
'Return type' => 'ประเภทของค่าที่คืนกลับ',
|
||||
'Add trigger' => 'เพิ่ม trigger',
|
||||
'Trigger has been dropped.' => 'Trigger ถูกลบแล้ว.',
|
||||
'Trigger has been altered.' => 'Trigger ถูกเปลี่ยนแปลงแล้ว.',
|
||||
'Trigger has been created.' => 'Trigger ถูกสร้างแล้ว.',
|
||||
'Alter trigger' => 'เปลี่ยนแปลง Trigger',
|
||||
'Create trigger' => 'สร้าง Trigger',
|
||||
'Time' => 'เวลา',
|
||||
'Event' => 'เหตุการณ์',
|
||||
'%s version: %s through PHP extension %s' => '%s รุ่น: %s ผ่านส่วนขยาย PHP %s',
|
||||
'%d row(s)' => '%d แถว',
|
||||
'Remove' => 'ลบ',
|
||||
'Are you sure?' => 'คุณแน่ใจแล้วหรือ',
|
||||
'Privileges' => 'สิทธิ์',
|
||||
'Create user' => 'สร้างผู้ใช้งาน',
|
||||
'User has been dropped.' => 'ลบผู้ใช้งานแล้ว.',
|
||||
'User has been altered.' => 'เปลี่ยนแปลงผู้ใช้งานแล้ว.',
|
||||
'User has been created.' => 'สร้างผู้ใช้งานแล้ว.',
|
||||
'Hashed' => 'Hash',
|
||||
'Column' => 'คอลัมน์',
|
||||
'Routine' => 'รูทีน',
|
||||
'Grant' => 'การอนุญาต',
|
||||
'Revoke' => 'ยกเลิก',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'ข้อมูลที่ส่งเข้ามีขนาดใหญ่เกิน คุณสามารถ เพิ่ม-ลดขนาดได้ที่ %s คำสั่งการตั้งค่า.',
|
||||
'Logged as: %s' => 'สวัสดีคุณ: %s',
|
||||
'Move up' => 'ย้ายไปข้างบน',
|
||||
'Move down' => 'ย้ายลงล่าง',
|
||||
'Functions' => 'ฟังก์ชั่น',
|
||||
'Aggregation' => 'รวบรวม',
|
||||
'Export' => 'ส่งออก',
|
||||
'Output' => 'ข้อมูลที่ส่งออก',
|
||||
'open' => 'เปิด',
|
||||
'save' => 'บันทึก',
|
||||
'Format' => 'รูปแบบ',
|
||||
'Tables' => 'ตาราง',
|
||||
'Data' => 'ข้อมูล',
|
||||
'Event has been dropped.' => 'เหตุการณ์ถูกลบแล้ว.',
|
||||
'Event has been altered.' => 'เหตุการณ์ถูกเปลี่ยนแปลงแล้ว.',
|
||||
'Event has been created.' => 'เหตุการณ์ถูกสร้างแล้ว.',
|
||||
'Alter event' => 'เปลี่ยนแปลงเหตุการณ์',
|
||||
'Create event' => 'สร้างเหตุการณ์',
|
||||
'At given time' => 'ในเวลาที่กำหนด',
|
||||
'Every' => 'ทุกๆ',
|
||||
'Events' => 'เหตุการณ์',
|
||||
'Schedule' => 'กำหนดการณ์',
|
||||
'Start' => 'เริ่มต้น',
|
||||
'End' => 'สิ้นสุด',
|
||||
'Status' => 'สถานะ',
|
||||
'On completion preserve' => 'เมื่อเสร็จสิ้นการสงวน',
|
||||
'Tables and views' => 'ตารางและวิว',
|
||||
'Data Length' => 'ความยาวของข้อมูล',
|
||||
'Index Length' => 'ความยาวของดัชนี',
|
||||
'Data Free' => 'พื้นที่ว่าง',
|
||||
'Collation' => 'การตรวจทาน',
|
||||
'Analyze' => 'วิเคราะห์',
|
||||
'Optimize' => 'เพิ่มประสิทธิภาพ',
|
||||
'Check' => 'ตรวจสอบ',
|
||||
'Repair' => 'ซ่อมแซม',
|
||||
'Truncate' => 'ตัดทิ้ง',
|
||||
'Tables have been truncated.' => 'เคลียร์ตารางแล้ว (truncate).',
|
||||
'Rows' => 'แถว',
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Tables have been moved.' => 'ตารางถูกย้ายแล้ว.',
|
||||
'Move to other database' => 'ย้ายไปยังฐานข้อมูลอื่น',
|
||||
'Move' => 'ย้าย',
|
||||
'Engine' => 'ชนิดของฐานข้อมูล',
|
||||
'Save and continue edit' => 'บันทึกและแก้ไขข้อมูลอื่นๆต่อ',
|
||||
'original' => 'ต้นฉบับ',
|
||||
'Tables have been dropped.' => 'ตารางถูกลบแล้ว.',
|
||||
'%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 วินาที',
|
||||
'$1-$3-$5' => '$5/$3/$1',
|
||||
'[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' => 'Webserver file %s',
|
||||
'File does not exist.' => 'ไม่มีไฟล์.',
|
||||
'%d in total' => '%d ของทั้งหมด',
|
||||
'Permanent login' => 'จดจำการเข้าสู่ระบบตลอดไป',
|
||||
'Databases have been dropped.' => 'ฐานข้อมูลถูกลบแล้ว.',
|
||||
'Search data in tables' => 'ค้นหาในตาราง',
|
||||
'Schema' => 'Schema',
|
||||
'Alter schema' => 'เปลี่ยนแปลง schema',
|
||||
'Create schema' => 'สร้าง schema',
|
||||
'Schema has been dropped.' => 'Schema ถูกลบแล้ว.',
|
||||
'Schema has been created.' => 'Schema ถูกสร้างแล้ว.',
|
||||
'Schema has been altered.' => 'Schema ถูกเปลี่ยนแปลงแล้ว.',
|
||||
'Sequences' => 'Sequences',
|
||||
'Create sequence' => 'Sequence ถูกสร้างแล้ว',
|
||||
'Alter sequence' => 'Sequence ถูกเปลี่ยนแปลงแล้ว',
|
||||
'Sequence has been dropped.' => 'Sequence ถูกลบแล้ว.',
|
||||
'Sequence has been created.' => 'Sequence ถูกสร้างแล้ว.',
|
||||
'Sequence has been altered.' => 'Sequence ถูกเปลี่ยนแปลงแล้ว.',
|
||||
'User types' => 'ประเภทผู้ใช้งาน',
|
||||
'Create type' => 'สร้างประเภทผู้ใช้งาน',
|
||||
'Alter type' => 'แก้ไขประเภท',
|
||||
'Type has been dropped.' => 'ประเภทถูกลบแล้ว.',
|
||||
'Type has been created.' => 'ประเภทถูกสร้างแล้ว.',
|
||||
'Ctrl+click on a value to modify it.' => 'กด Ctrl+click เพื่อแก้ไขค่า.',
|
||||
'Use edit link to modify this value.' => 'ใช้ลิงค์ แก้ไข เพื่อปรับเปลี่ยนค่านี้.',
|
||||
'last' => 'ล่าสุด',
|
||||
'From server' => 'จากเซเวอร์',
|
||||
'System' => 'ระบบ',
|
||||
'Select data' => 'เลือกข้อมูล',
|
||||
'Show structure' => 'แสดงโครงสร้าง',
|
||||
'empty' => 'ว่างเปล่า',
|
||||
'Network' => 'เครื่องข่าย',
|
||||
'Geometry' => 'เรขาคณิต',
|
||||
'File exists.' => 'มีไฟล์นี้อยู่แล้ว.',
|
||||
'Attachments' => 'ไฟล์แนบ',
|
||||
'%d query(s) executed OK.' => '%d คำสั่งถูกดำเนินการแล้ว.',
|
||||
'Show only errors' => 'แสดงเฉพาะเออเรอ',
|
||||
'Refresh' => 'โหลดใหม่',
|
||||
'Invalid schema.' => 'schema ไม่ถูกต้อง.',
|
||||
'Please use one of the extensions %s.' => 'กรุณาใช้ส่วนเสริมอย่างน้อย 1 ส่วนเสริมจากทั้งหมด %s.',
|
||||
'now' => 'ตอนนี้',
|
||||
'ltr' => 'ltr',
|
||||
'Tables have been copied.' => 'ทำซ้ำตารางฐานข้อมูลแล้ว.',
|
||||
'Copy' => 'ทำซ้ำ',
|
||||
'Permanent link' => 'ลิงค์ถาวร',
|
||||
'Edit all' => 'แก้ไขทั้งหมด',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
@@ -5,146 +5,150 @@ $translations = array(
|
||||
'Server' => 'Sunucu',
|
||||
'Username' => 'Kullanıcı',
|
||||
'Password' => 'Parola',
|
||||
'Permanent login' => 'Kalıcı giriş',
|
||||
'Permanent login' => 'Beni hatırla',
|
||||
'Login' => 'Giriş',
|
||||
'Logout' => 'Çıkış',
|
||||
'Logged as: %s' => '%s olarak giriş yapıldı.',
|
||||
'Logout successful.' => 'Başarıyla çıkıldı.',
|
||||
'Logout successful.' => 'Başarıyla çıkış yapıldı.',
|
||||
'Invalid credentials.' => 'Geçersiz kimlik.',
|
||||
'Language' => 'Dil',
|
||||
'Invalid CSRF token. Send the form again.' => 'Geçersiz Cross-site request forgery (CSRF) jetonu. Forumu tekrar yolla.',
|
||||
'Invalid CSRF token. Send the form again.' => 'Geçersiz (CSRF) jetonu. Formu tekrar yolla.',
|
||||
'No extension' => 'Uzantı yok',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Desteklenen PHP uzantılarından (%s) hiçbiri mevcut değil.',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Desteklenen PHP eklentilerinden (%s) hiçbiri mevcut değil.',
|
||||
'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.',
|
||||
'%s version: %s through PHP extension %s' => '%s sürüm: %s PHP uzantısı ile %s',
|
||||
'%s version: %s through PHP extension %s' => '%s sürüm: %s, %s PHP eklentisi ile',
|
||||
'Refresh' => 'Tazele',
|
||||
|
||||
|
||||
// text direction
|
||||
'ltr' => 'ltr',
|
||||
|
||||
|
||||
'Privileges' => 'İzinler',
|
||||
'Create user' => 'Kullanıcı yarat',
|
||||
'User has been dropped.' => 'Kullanıcı düşürüldü.',
|
||||
'Create user' => 'Kullanıcı oluştur',
|
||||
'User has been dropped.' => 'Kullanıcı silindi.',
|
||||
'User has been altered.' => 'Kullanıcı değiştirildi.',
|
||||
'User has been created.' => 'Kullanıcı yaratıldı.',
|
||||
'Hashed' => 'Harmanlandı.',
|
||||
'User has been created.' => 'Kullanıcı oluşturuldu.',
|
||||
'Hashed' => 'Harmanlandı',
|
||||
'Column' => 'Kolon',
|
||||
'Routine' => 'Yordam',
|
||||
'Grant' => 'İmtiyaz',
|
||||
'Revoke' => 'Geri al',
|
||||
|
||||
'Grant' => 'Yetki Ver',
|
||||
'Revoke' => 'Yetki Kaldır',
|
||||
|
||||
'Process list' => 'İşlem listesi',
|
||||
'%d process(es) have been killed.' => array('%d süreç öldürüldü.', '%d adet süreç öldürüldü.'),
|
||||
'Kill' => 'Öldür',
|
||||
|
||||
'%d process(es) have been killed.' => array('%d işlem sonlandırıldı.', '%d adet işlem sonlandırıldı.'),
|
||||
'Kill' => 'Sonlandır',
|
||||
|
||||
'Variables' => 'Değişkenler',
|
||||
'Status' => 'Durum',
|
||||
|
||||
|
||||
'SQL command' => 'SQL komutu',
|
||||
'%d query(s) executed OK.' => array('%d sorgunun işletilmesi tamamlandı.', '%d kadar sorgunun işletilmesi tamamlandı.'),
|
||||
'Query executed OK, %d row(s) affected.' => array('Sorgu işletilmesi tamamlandı. %d sıra(row) etkilendi.', 'Sorgu işletilmesi tamamlandı. Bundan %d kadar sıra etkilendi.'),
|
||||
'No commands to execute.' => 'İşletilmek için komut yok.',
|
||||
'%d query(s) executed OK.' => array('%d sorgu başarıyla çalıştırıldı.', '%d adet sorgu başarıyla çalıştırıldı.'),
|
||||
'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.',
|
||||
'Error in query' => 'Sorguda hata',
|
||||
'Execute' => 'İşlet',
|
||||
'Stop on error' => 'Dur hata',
|
||||
'Execute' => 'Çalıştır',
|
||||
'Stop on error' => 'Hata oluşursa dur',
|
||||
'Show only errors' => 'Sadece hataları göster.',
|
||||
// sprintf() format for time of the command
|
||||
'%.3f s' => '%.3f s',
|
||||
'History' => 'Tarih',
|
||||
'Clear' => 'Boşluk',
|
||||
|
||||
'History' => 'Geçmiş',
|
||||
'Clear' => 'Temizle',
|
||||
'Edit all' => 'Tümünü düzenle',
|
||||
|
||||
'File upload' => 'Dosya gönder',
|
||||
'From server' => 'Sunucudan',
|
||||
'Webserver file %s' => '%s web sunucusu dosyası',
|
||||
'Run file' => 'Dosya çalıştır',
|
||||
'Run file' => 'Dosyayı çalıştır',
|
||||
'File does not exist.' => 'Dosya mevcut değil.',
|
||||
'File uploads are disabled.' => 'Dosya gönderimi etkin değil.',
|
||||
'Unable to upload a file.' => 'Dosya gönderilemiyor.',
|
||||
'Maximum allowed file size is %sB.' => 'Bir dosya için izin verilen dosya 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 ayar yönergesini uygun olarak yapılandırın.',
|
||||
|
||||
'Export' => 'İhraç',
|
||||
'Dump' => 'Döküm',
|
||||
'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.',
|
||||
|
||||
'Export' => 'Dışarı Aktar',
|
||||
'Output' => 'Çıktı',
|
||||
'open' => 'aç',
|
||||
'save' => 'kaydet',
|
||||
'Format' => 'Biçim',
|
||||
'Data' => 'Veri',
|
||||
|
||||
'Database' => 'Veritabanı',
|
||||
'database' => 'veritabanı',
|
||||
|
||||
'Database' => 'Veri Tabanı',
|
||||
'database' => 'veri tabanı',
|
||||
'Use' => 'Kullan',
|
||||
'Select database' => 'Veritabanı seç',
|
||||
'Invalid database.' => 'Geçersiz veritabanı.',
|
||||
'Create new database' => 'Yeni veritabanı yarat',
|
||||
'Database has been dropped.' => 'Veritabanı düşürüldü.',
|
||||
'Databases have been dropped.' => 'Veritabanları düşüüldü.',
|
||||
'Database has been created.' => 'Veritabanı yaratıldı.',
|
||||
'Database has been renamed.' => 'Veritabanının ismi değiştirildi.',
|
||||
'Database has been altered.' => 'Veritabanı değiştirildi.',
|
||||
'Alter database' => 'Veritabanı değiştir',
|
||||
'Create database' => 'Veritabanı yarat',
|
||||
'Database schema' => 'Veritabanı şeması',
|
||||
|
||||
'Select database' => 'Veri tabanı seç',
|
||||
'Invalid database.' => 'Geçersiz veri tabanı.',
|
||||
'Create new database' => 'Yeni veri tabanı oluştur',
|
||||
'Database has been dropped.' => 'Veri tabanı silindi.',
|
||||
'Databases have been dropped.' => 'Veritabanları silindi.',
|
||||
'Database has been created.' => 'Veri tabanı oluşturuldu.',
|
||||
'Database has been renamed.' => 'Veri tabanının ismi değiştirildi.',
|
||||
'Database has been altered.' => 'Veri tabanı değiştirildi.',
|
||||
'Alter database' => 'Veri tabanını değiştir',
|
||||
'Create database' => 'Veri tabanı oluştur',
|
||||
'Database schema' => 'Veri tabanı şeması',
|
||||
|
||||
// link to current database schema layout
|
||||
'Permanent link' => 'Kalıcı bağlantı',
|
||||
|
||||
// thousands separator - must contain single byte
|
||||
',' => ' ',
|
||||
'0123456789' => '0123456789',
|
||||
'Engine' => 'Motor',
|
||||
'Collation' => 'Karşılaştırma',
|
||||
'Data Length' => 'Veri uzunluğu',
|
||||
'Index Length' => 'Dizin uzunluğu',
|
||||
'Data Free' => 'Serbest veri',
|
||||
'Rows' => 'Sıralar (Rows)',
|
||||
'%d in total' => '%d toplamda',
|
||||
'Analyze' => 'Çözümleme',
|
||||
'Optimize' => 'En uygun hale getirme',
|
||||
'Check' => 'Denetleme',
|
||||
'Repair' => 'Tamir',
|
||||
'Truncate' => 'Buda',
|
||||
'Tables have been truncated.' => 'Tablolar budandı.',
|
||||
'Move to other database' => 'Diğer veritabanına taşı',
|
||||
'Data Length' => 'Veri Uzunluğu',
|
||||
'Index Length' => 'Dizin Uzunluğu',
|
||||
'Data Free' => 'Boş Veri',
|
||||
'Rows' => 'Kayıtlar',
|
||||
'%d in total' => 'toplam %d',
|
||||
'Analyze' => 'Çözümle',
|
||||
'Optimize' => 'En uygun hale getir',
|
||||
'Check' => 'Denetle',
|
||||
'Repair' => 'Tamir Et',
|
||||
'Truncate' => 'Boşalt',
|
||||
'Tables have been truncated.' => 'Tablolar boşaltıldı.',
|
||||
'Move to other database' => 'Başka veri tabanına taşı',
|
||||
'Move' => 'Taşı',
|
||||
'Tables have been moved.' => 'Tablolar taşındı.',
|
||||
'Copy' => 'Kopyala',
|
||||
'Tables have been copied.' => 'Tablolar kopyalandı.',
|
||||
|
||||
|
||||
'Routines' => 'Yordamlar',
|
||||
'Routine has been called, %d row(s) affected.' => array('Yordam çağrıldı, %d sıra(row) etkilendi.', 'Yordam çağrıldı, %d sıralar(rows) etkilendi.'),
|
||||
'Call' => 'Çağrı',
|
||||
'Routine has been called, %d row(s) affected.' => array('Yordam çağrıldı, %d adet kayıt etkilendi.', 'Yordam çağrıldı, %d kayıt etkilendi.'),
|
||||
'Call' => 'Çağır',
|
||||
'Parameter name' => 'Parametre adı',
|
||||
'Create procedure' => 'Yöntem yarat',
|
||||
'Create function' => 'Fonksiyon yarat',
|
||||
'Routine has been dropped.' => 'Yordam düşürüldü.',
|
||||
'Create procedure' => 'Yöntem oluştur',
|
||||
'Create function' => 'Fonksiyon oluştur',
|
||||
'Routine has been dropped.' => 'Yordam silindi.',
|
||||
'Routine has been altered.' => 'Yordam değiştirildi.',
|
||||
'Routine has been created.' => 'Yordam yaratıldı.',
|
||||
'Alter function' => 'Değiştirme fonksyionu',
|
||||
'Alter procedure' => 'Değiştirme yöntemi',
|
||||
'Routine has been created.' => 'Yordam oluşturuldu.',
|
||||
'Alter function' => 'Fonksyionu değiştir',
|
||||
'Alter procedure' => 'Yöntemi değiştir',
|
||||
'Return type' => 'Geri dönüş türü',
|
||||
|
||||
|
||||
'Events' => 'Olaylar',
|
||||
'Event has been dropped.' => 'Olay düşüdüldü.',
|
||||
'Event has been dropped.' => 'Olay silindi.',
|
||||
'Event has been altered.' => 'Olay değiştirildi.',
|
||||
'Event has been created.' => 'Olay yaratıldı.',
|
||||
'Alter event' => 'Değiştirme olayı',
|
||||
'Create event' => 'Yaratma olayı',
|
||||
'At given time' => 'Bir anda',
|
||||
'Every' => 'Herzaman',
|
||||
'Event has been created.' => 'Olay oluşturuldu.',
|
||||
'Alter event' => 'Olayı değiştir',
|
||||
'Create event' => 'Olay oluştur',
|
||||
'At given time' => 'Verilen zamanda',
|
||||
'Every' => 'Her zaman',
|
||||
'Schedule' => 'Takvimli',
|
||||
'Start' => 'Başla',
|
||||
'End' => 'Son',
|
||||
'On completion preserve' => 'Tamamlama koruması AÇIK',
|
||||
|
||||
'On completion preserve' => 'Tamamlama koruması',
|
||||
|
||||
'Tables' => 'Tablolar',
|
||||
'Tables and views' => 'Tablolar ve görünümler',
|
||||
'Table' => 'Tablo',
|
||||
'No tables.' => 'Tablo yok.',
|
||||
'Alter table' => 'Tablo değiştir',
|
||||
'Create table' => 'Tablo yarat',
|
||||
'Create new table' => 'Yeni tablo yarat',
|
||||
'Table has been dropped.' => 'Tablo düşürüldü.',
|
||||
'Tables have been dropped.' => 'Tablolar düşürüldü.',
|
||||
'Alter table' => 'Tabloyu değiştir',
|
||||
'Create table' => 'Tablo oluştur',
|
||||
'Table has been dropped.' => 'Tablo silindi.',
|
||||
'Tables have been dropped.' => 'Tablolar silindi.',
|
||||
'Tables have been optimized.' => 'Tablolar en uygun hale getirildi.',
|
||||
'Table has been altered.' => 'Tablo değiştirildi.',
|
||||
'Table has been created.' => 'Tablo yaratıldı.',
|
||||
'Table has been created.' => 'Tablo oluşturuldu.',
|
||||
'Table name' => 'Tablo adı',
|
||||
'Show structure' => 'Yapıyı göster',
|
||||
'engine' => 'motor',
|
||||
@@ -152,160 +156,165 @@ $translations = array(
|
||||
'Column name' => 'Kolon adı',
|
||||
'Type' => 'Tür',
|
||||
'Length' => 'Uzunluk',
|
||||
'Auto Increment' => 'Otomatik yükselt',
|
||||
'Auto Increment' => 'Otomatik Artır',
|
||||
'Options' => 'Seçenekler',
|
||||
'Comment' => 'Yorum',
|
||||
'Default values' => 'Varsayılan değerler',
|
||||
'Drop' => 'Düşür',
|
||||
'Are you sure?' => 'Emin misin?',
|
||||
'Drop' => 'Sil',
|
||||
'Are you sure?' => 'Emin misiniz?',
|
||||
'Move up' => 'Yukarı taşı',
|
||||
'Move down' => 'AŞağı taş',
|
||||
'Remove' => 'Kaldır',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'kabul edilebilir alan sayısı aşıldı. Lütfen %s ve %s düşürün.',
|
||||
|
||||
'Partition by' => 'Bölümü tarafından',
|
||||
'Move down' => 'Aşağı taşı',
|
||||
'Remove' => 'Sil',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'İzin verilen en fazla alan sayısı aşıldı. Lütfen %s değerlerini artırın.',
|
||||
|
||||
'Partition by' => 'Bununla bölümle',
|
||||
'Partitions' => 'Bölümler',
|
||||
'Partition name' => 'BÖlüm adı',
|
||||
'Partition name' => 'Bölüm adı',
|
||||
'Values' => 'Değerler',
|
||||
|
||||
|
||||
'View' => 'Görünüm',
|
||||
'View has been dropped.' => 'Görünüm düşürüldü.',
|
||||
'View has been dropped.' => 'Görünüm silindi.',
|
||||
'View has been altered.' => 'Görünüm değiştirildi.',
|
||||
'View has been created.' => 'Görünüm yaratıldı.',
|
||||
'Alter view' => 'Değişim görünüm',
|
||||
'Create view' => 'Görünüm yarat',
|
||||
|
||||
'View has been created.' => 'Görünüm oluşturuldu.',
|
||||
'Alter view' => 'Görünümü değiştir',
|
||||
'Create view' => 'Görünüm oluştur',
|
||||
|
||||
'Indexes' => 'Dizinler',
|
||||
'Indexes have been altered.' => 'Dizinler değiştirilidi.',
|
||||
'Indexes have been altered.' => 'Dizinler değiştirildi.',
|
||||
'Alter indexes' => 'Dizinleri değiştir',
|
||||
'Add next' => 'Sonraya ekle',
|
||||
'Add next' => 'Bundan sonra ekle',
|
||||
'Index Type' => 'Dizin Türü',
|
||||
'Column (length)' => 'Kolon (uzunluğu)',
|
||||
|
||||
|
||||
'Foreign keys' => 'Dış anahtarlar',
|
||||
'Foreign key' => 'Dış anahtar',
|
||||
'Foreign key has been dropped.' => 'Dış anahtar düşürüldü.',
|
||||
'Foreign key has been altered.' => 'Dış anahtar değiştir.',
|
||||
'Foreign key has been created.' => 'Dış anahtar yarat.',
|
||||
'Foreign key has been dropped.' => 'Dış anahtar silindi.',
|
||||
'Foreign key has been altered.' => 'Dış anahtar değiştirildi.',
|
||||
'Foreign key has been created.' => 'Dış anahtar oluşturuldu.',
|
||||
'Target table' => 'Hedef tablo',
|
||||
'Change' => 'Değiş',
|
||||
'Change' => 'Değiştir',
|
||||
'Source' => 'Kaynak',
|
||||
'Target' => 'Hedef',
|
||||
'Add column' => 'Kolon eklde',
|
||||
'Add column' => 'Kolon ekle',
|
||||
'Alter' => 'Değiştir',
|
||||
'Add foreign key' => 'Dış anahtar ekle',
|
||||
'ON DELETE' => 'Silinmek üzere',
|
||||
'ON UPDATE' => 'Yükseltilmek üzere',
|
||||
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Kaynak ve hedef kolonlar aynı veri türü olmak zorunda, hedef kolonda bir dizin ve başvurulan veri bulunmalı.',
|
||||
|
||||
'ON DELETE' => 'ON DELETE (Hedefteki Kayıt Silinirse)',
|
||||
'ON UPDATE' => 'ON UPDATE (Hedefteki Kayıt Değiştirilirse)',
|
||||
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Kaynak ve hedef kolonlar aynı veri türünde olmalı, hedef kolonlarda dizin bulunmalı ve başvurulan veri mevcut olmalı.',
|
||||
|
||||
'Triggers' => 'Tetikler',
|
||||
'Add trigger' => 'Tetik ekle',
|
||||
'Trigger has been dropped.' => 'Tetik düşürüldü.',
|
||||
'Trigger has been dropped.' => 'Tetik silindi.',
|
||||
'Trigger has been altered.' => 'Tetik değiştirildi.',
|
||||
'Trigger has been created.' => 'Tetik yaratıldı.',
|
||||
'Alter trigger' => 'Tetik değiştir.',
|
||||
'Create trigger' => 'Tetik yarat',
|
||||
'Trigger has been created.' => 'Tetik oluşturuldu.',
|
||||
'Alter trigger' => 'Tetiği değiştir.',
|
||||
'Create trigger' => 'Tetik oluştur',
|
||||
'Time' => 'Zaman',
|
||||
'Event' => 'Olay',
|
||||
'Name' => 'Ad',
|
||||
|
||||
|
||||
'select' => 'seç',
|
||||
'Select' => 'Seç',
|
||||
'Select data' => 'Veri seç',
|
||||
'Functions' => 'Fonksiyonlar',
|
||||
'Aggregation' => 'Kümeleme',
|
||||
'Search' => 'Arama',
|
||||
'anywhere' => 'herhangi bir yer',
|
||||
'Search data in tables' => 'Tablolarda veri ara.',
|
||||
'Search' => 'Ara',
|
||||
'anywhere' => 'hiçbir yerde',
|
||||
'Search data in tables' => 'Tablolarda veri ara',
|
||||
'Sort' => 'Sırala',
|
||||
'descending' => 'azalan',
|
||||
'Limit' => 'sınır',
|
||||
'Text length' => 'Yazı uzunluğu',
|
||||
'Action' => 'Eylem',
|
||||
'Full table scan' => 'Tam tablo tarama',
|
||||
'Unable to select the table' => 'Tablo seçilemedi',
|
||||
'No rows.' => 'Sıra yok.',
|
||||
'%d row(s)' => array('%d sıra)', '%d kadar sıra'),
|
||||
'No rows.' => 'Kayıt yok.',
|
||||
'%d row(s)' => array('%d kayıt', '%d adet kayıt'),
|
||||
'Page' => 'Sayfa',
|
||||
'last' => 'son',
|
||||
'Last page' => 'Son sayfa',
|
||||
'Load more data' => 'Daha fazla veri yükle',
|
||||
'Loading' => 'Yükleniyor',
|
||||
'whole result' => 'tüm sonuç',
|
||||
'%d byte(s)' => array('%d bayt', '%d kadar bayt'),
|
||||
|
||||
'Import' => 'İthal',
|
||||
'%d row(s) have been imported.' => array('%d sıra ithal edildi.', '%d kadar sıra ithal edildi.'),
|
||||
|
||||
'%d byte(s)' => array('%d bayt', '%d bayt'),
|
||||
|
||||
'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ı.'),
|
||||
|
||||
// in-place editing in select
|
||||
'Double click on a value to modify it.' => 'Değerin üzerine çift tıklayın ve değiştirin.',
|
||||
'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.',
|
||||
|
||||
|
||||
// %s can contain auto-increment value
|
||||
'Item%s has been inserted.' => 'Öğeler eklendi.',
|
||||
'Item has been deleted.' => 'Öğe silindi.',
|
||||
'Item has been updated.' => 'Öğe güncellendi.',
|
||||
'%d item(s) have been affected.' => array('%d öğe etkilendi.', '%d kadar öğe etkilendi.'),
|
||||
'New item' => 'Yeni öğe',
|
||||
'Item%s has been inserted.' => 'Kayıt%s eklendi.',
|
||||
'Item has been deleted.' => 'Kayıt silindi.',
|
||||
'Item has been updated.' => 'Kayıt güncellendi.',
|
||||
'%d item(s) have been affected.' => array('%d kayıt etkilendi.', '%d adet kayıt etkilendi.'),
|
||||
'New item' => 'Yeni kayıt',
|
||||
'original' => 'orijinal',
|
||||
// label for value '' in enum data type
|
||||
'empty' => 'boş',
|
||||
'edit' => 'düzen',
|
||||
'Edit' => 'Düzen',
|
||||
'edit' => 'düzenle',
|
||||
'Edit' => 'Düzenle',
|
||||
'Insert' => 'Ekle',
|
||||
'Save' => 'Kaydet',
|
||||
'Save and continue edit' => 'Kaydet ve düzenlemeye devam et',
|
||||
'Save and insert next' => 'Kaydet ve sonrakin ekle',
|
||||
'Clone' => 'Klonla',
|
||||
'Save and insert next' => 'Kaydet ve sonrakini ekle',
|
||||
'Clone' => 'Kopyala',
|
||||
'Delete' => 'Sil',
|
||||
|
||||
|
||||
'E-mail' => 'E-posta',
|
||||
'From' => 'Gönderen',
|
||||
'Subject' => 'Konu',
|
||||
'Attachments' => 'Ekler',
|
||||
'Send' => 'Gönder',
|
||||
'%d e-mail(s) have been sent.' => array('%d e-posta dönderildi.', '%d kadar e-posta gönderildi.'),
|
||||
|
||||
'%d e-mail(s) have been sent.' => array('%d e-posta gönderildi.', '%d adet e-posta gönderildi.'),
|
||||
|
||||
// data type descriptions
|
||||
'Numbers' => 'Sayılar',
|
||||
'Date and time' => 'Tarih ve zaman',
|
||||
'Strings' => 'Sözcükler',
|
||||
'Strings' => 'Dizge',
|
||||
'Binary' => 'İkili',
|
||||
'Lists' => 'Listeler',
|
||||
'Network' => 'Ağ',
|
||||
'Geometry' => 'Geometri',
|
||||
'Relations' => 'İlişkiler',
|
||||
|
||||
|
||||
'Editor' => 'Düzenleyici',
|
||||
// date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
|
||||
'$1-$3-$5' => '$6.$4.$1',
|
||||
// hint for date format - use language equivalents for day, month and year shortcuts
|
||||
'[yyyy]-mm-dd' => 'd.m.[rrrr]',
|
||||
'[yyyy]-mm-dd' => '[yyyy]-aa-gg',
|
||||
// hint for time format - use language equivalents for hour, minute and second shortcuts
|
||||
'HH:MM:SS' => 'SS:DD:ss',
|
||||
'now' => 'şimdi',
|
||||
|
||||
'yes' => 'evet',
|
||||
'no' => 'hayır',
|
||||
|
||||
// general SQLite error in create, drop or rename database
|
||||
'File exists.' => 'Dosya mevcut.',
|
||||
'File exists.' => 'Dosya zaten mevcut.',
|
||||
'Please use one of the extensions %s.' => '%s uzantılarından birini kullanın.',
|
||||
|
||||
|
||||
// PostgreSQL and MS SQL schema support
|
||||
'Alter schema' => 'Değişim şeması',
|
||||
'Create schema' => 'Yaratım şeması',
|
||||
'Schema has been dropped.' => 'Şema düşürüldü.',
|
||||
'Schema has been created.' => 'Şema yaratıldı.',
|
||||
'Alter schema' => 'Şemayı değiştir',
|
||||
'Create schema' => 'Şema oluştur',
|
||||
'Schema has been dropped.' => 'Şema silindi.',
|
||||
'Schema has been created.' => 'Şema oluşturuldu.',
|
||||
'Schema has been altered.' => 'Şema değiştirildi.',
|
||||
'schema' => 'şema',
|
||||
'Schema' => 'Şema',
|
||||
'Invalid schema.' => 'Geçersiz şema.',
|
||||
|
||||
|
||||
// PostgreSQL sequences support
|
||||
'Sequences' => 'Diziler',
|
||||
'Create sequence' => 'Dizi yarat',
|
||||
'Sequence has been dropped.' => 'Dizi düşürüldü.',
|
||||
'Sequence has been created.' => 'Dizi yaratıldı.',
|
||||
'Create sequence' => 'Dizi oluştur',
|
||||
'Sequence has been dropped.' => 'Dizi silindi.',
|
||||
'Sequence has been created.' => 'Dizi oluşturuldu.',
|
||||
'Sequence has been altered.' => 'Dizi değiştirildi.',
|
||||
'Alter sequence' => 'Dizi değiştir',
|
||||
|
||||
'Alter sequence' => 'Diziyi değiştir',
|
||||
|
||||
// PostgreSQL user types support
|
||||
'User types' => 'Kullanıcı türleri',
|
||||
'Create type' => 'Tür yarat',
|
||||
'Type has been dropped.' => 'Tür düşürüldü.',
|
||||
'Type has been created.' => 'Tür yaratıldı.',
|
||||
'Alter type' => 'Tür değiştir',
|
||||
'Create type' => 'Tür oluştur',
|
||||
'Type has been dropped.' => 'Tür silindi.',
|
||||
'Type has been created.' => 'Tür oluşturuldu.',
|
||||
'Alter type' => 'Türü değiştir',
|
||||
);
|
||||
|
||||
317
adminer/lang/uk.inc.php
Normal file
@@ -0,0 +1,317 @@
|
||||
<?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.' => 'Неправильні дані входу.',
|
||||
'Language' => 'Мова',
|
||||
'Invalid CSRF token. Send the form again.' => 'Недійсний CSRF токен. Надішліть форму ще раз.',
|
||||
'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 процеси.', 'Було завершёно %d процесів.'),
|
||||
'Kill' => 'Завершити процес',
|
||||
|
||||
'Variables' => 'Змінні',
|
||||
'Status' => 'Статус',
|
||||
|
||||
'SQL command' => 'SQL запит',
|
||||
'%d query(s) executed OK.' => array('%d запит виконано успішно.', '%d запити виконано успішно.', '%d запитів виконано успішно.'),
|
||||
'Query executed OK, %d row(s) affected.' => array('Запит виконано успішно, змінено %d рядок.', 'Запит виконано успішно, змінено %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.' => 'Максимально допустимий розмір файлу %sБ.',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Занадто великий об\'єм POST-даних. Зменшіть об\'єм або збільшіть параметр директиви %s конфигурації.',
|
||||
|
||||
'Export' => 'Експорт',
|
||||
'Output' => 'Вихідні дані',
|
||||
'open' => 'відкрити',
|
||||
'save' => 'зберегти',
|
||||
'Format' => 'Формат',
|
||||
'Data' => 'Дані',
|
||||
|
||||
'Database' => 'База даних',
|
||||
'database' => 'база даних',
|
||||
'Use' => 'Обрати',
|
||||
'Select database' => 'Обрати базу даних',
|
||||
'Invalid database.' => 'Погана база даних.',
|
||||
'Create new 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' => 'Оптимізувати',
|
||||
'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 записи було змінено.', 'Була викликана процедура, %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 values' => 'Значення за замовчуванням',
|
||||
'Drop' => 'Видалити',
|
||||
'Are you sure?' => 'Ви впевнені?',
|
||||
'Move up' => 'Пересунути вгору',
|
||||
'Move down' => 'Пересунути вниз',
|
||||
'Remove' => 'Видалити',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Досягнута максимальна кількість доступних полів. Будь ласка, збільшіть %s.',
|
||||
|
||||
'Partition by' => 'Розділити по',
|
||||
'Partitions' => 'Розділи',
|
||||
'Partition name' => 'Назва розділу',
|
||||
'Values' => 'Значення',
|
||||
|
||||
'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' => 'Обмеження',
|
||||
'Text length' => 'Довжина тексту',
|
||||
'Action' => 'Дія',
|
||||
'Unable to select the table' => 'Неможливо вибрати таблицю',
|
||||
'No rows.' => 'Нема рядків.',
|
||||
'%d row(s)' => array('%d рядок', '%d рядки', '%d рядків'),
|
||||
'Page' => 'Сторінка',
|
||||
'last' => 'остання',
|
||||
'whole result' => 'весь результат',
|
||||
'%d byte(s)' => array('%d байт', '%d байта', '%d байтів'),
|
||||
|
||||
'Import' => 'Імпортувати',
|
||||
'%d row(s) have been imported.' => array('%d рядок було імпортовано.', '%d рядки було імпортовано.', '%d рядків було імпортовано.'),
|
||||
|
||||
// in-place editing in select
|
||||
'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 записи.', 'Було змінено %d записів.'),
|
||||
'New item' => 'Новий запис',
|
||||
'original' => 'початковий',
|
||||
// label for value '' in enum data type
|
||||
'empty' => 'порожньо',
|
||||
'edit' => 'редагувати',
|
||||
'Edit' => 'Редагувати',
|
||||
'Insert' => 'Вставити',
|
||||
'Save' => 'Зберегти',
|
||||
'Save and continue edit' => 'Зберегти і продовжити редагування',
|
||||
'Save and insert next' => 'Зберегти і вставити знову',
|
||||
'Clone' => 'Клонувати',
|
||||
'Delete' => 'Видалити',
|
||||
|
||||
'E-mail' => 'E-mail',
|
||||
'From' => 'Від',
|
||||
'Subject' => 'Заголовок',
|
||||
'Attachments' => 'Додатки',
|
||||
'Send' => 'Надіслати',
|
||||
'%d e-mail(s) have been sent.' => array('Було надіслано %d повідомлення.', 'Було надіслано %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' => '$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' => 'Змінити тип',
|
||||
);
|
||||
329
adminer/lang/vi.inc.php
Normal file
@@ -0,0 +1,329 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'System' => 'Hệ thống',
|
||||
'Server' => 'Máy chủ',
|
||||
'Username' => 'Tên người dùng',
|
||||
'Password' => 'Mật khẩu',
|
||||
'Permanent login' => 'Giữ đăng nhập một thời gian',
|
||||
'Login' => 'Đăng nhập',
|
||||
'Logout' => 'Thoát',
|
||||
'Logged as: %s' => 'Vào dưới tên: %s',
|
||||
'Logout successful.' => 'Đã thoát xong.',
|
||||
'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.',
|
||||
'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.',
|
||||
'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.',
|
||||
'No extension' => 'Không có phần mở rộng',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'Bản cài đặt PHP thiếu hỗ trợ cho %s.',
|
||||
'Session support must be enabled.' => 'Cần phải bật session.',
|
||||
'Session expired, please login again.' => 'Phiên làm việc đã hết, hãy đăng nhập lại.',
|
||||
'%s version: %s through PHP extension %s' => 'Phiên bản %s: %s (PHP extension: %s)',
|
||||
'Refresh' => 'Làm mới',
|
||||
|
||||
// text direction - 'ltr' or 'rtl'
|
||||
'ltr' => 'ltr',
|
||||
|
||||
'Privileges' => 'Quyền truy cập',
|
||||
'Create user' => 'Tạo người dùng',
|
||||
'User has been dropped.' => 'Đã xoá người dùng.',
|
||||
'User has been altered.' => 'Đã sửa người dùng.',
|
||||
'User has been created.' => 'Đã tạo người dùng.',
|
||||
'Hashed' => 'Mã hoá',
|
||||
'Column' => 'Cột',
|
||||
'Routine' => 'Hàm tích hợp',
|
||||
'Grant' => 'Cấp quyền',
|
||||
'Revoke' => 'Tước quyền',
|
||||
|
||||
'Process list' => 'Danh sách tiến trình',
|
||||
'%d process(es) have been killed.' => '%d tiến trình đã dừng.',
|
||||
'Kill' => 'Dừng',
|
||||
|
||||
'Variables' => 'Biến',
|
||||
'Status' => 'Trạng thái',
|
||||
|
||||
'SQL command' => 'Câu lệnh SQL',
|
||||
'%d query(s) executed OK.' => '%d câu lệnh đã chạy thành công.',
|
||||
'Query executed OK, %d row(s) affected.' => 'Đã thực hiện xong, ảnh hưởng đến %d dòng.',
|
||||
'No commands to execute.' => 'Chẳng có gì để thực hiện!.',
|
||||
'Error in query' => 'Có lỗi trong câu lệnh',
|
||||
'Execute' => 'Thực hiện',
|
||||
'Stop on error' => 'Dừng khi có lỗi',
|
||||
'Show only errors' => 'Chỉ hiện lỗi',
|
||||
// sprintf() format for time of the command
|
||||
'%.3f s' => '%.3f s',
|
||||
'History' => 'Lịch sử',
|
||||
'Clear' => 'Xoá',
|
||||
'Edit all' => 'Sửa tất cả',
|
||||
|
||||
'File upload' => 'Tải tệp lên',
|
||||
'From server' => 'Dùng tệp trên máy chủ',
|
||||
'Webserver file %s' => 'Tệp trên máy chủ',
|
||||
'Run file' => 'Chạy tệp',
|
||||
'File does not exist.' => 'Tệp không tồn tại.',
|
||||
'File uploads are disabled.' => 'Chức năng tải tệp lên đã bị cấm.',
|
||||
'Unable to upload a file.' => 'Không thể tải tệp lên.',
|
||||
'Maximum allowed file size is %sB.' => 'Kích thước tệp tối đa là %sB.',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Dữ liệu tải lên/POST quá lớn. Hãy giảm kích thước tệp hoặc tăng cấu hình (hiện tại %s).',
|
||||
'You can upload a big SQL file via FTP and import it from server.' => 'Bạn có thể tải tệp lên dùng FTP và nhập vào cơ sở dữ liệu.',
|
||||
|
||||
'Export' => 'Xuất',
|
||||
'Output' => 'Kết quả',
|
||||
'open' => 'xem',
|
||||
'save' => 'lưu',
|
||||
'Format' => 'Định dạng',
|
||||
'Data' => 'Dữ liệu',
|
||||
|
||||
'Database' => 'Cơ sở dữ liệu',
|
||||
'database' => 'cơ sở dữ liệu',
|
||||
'Use' => 'Sử dụng',
|
||||
'Select database' => 'Chọn CSDL',
|
||||
'Invalid database.' => 'CSDL sai.',
|
||||
'Create new database' => 'Tạo CSDL',
|
||||
'Database has been dropped.' => 'CSDL đã bị xoá.',
|
||||
'Databases have been dropped.' => 'Các CSDL đã bị xoá.',
|
||||
'Database has been created.' => 'Đã tạo CSDL.',
|
||||
'Database has been renamed.' => 'Đã đổi tên CSDL.',
|
||||
'Database has been altered.' => 'Đã thay đổi CSDL.',
|
||||
'Alter database' => 'Thay đổi CSDL',
|
||||
'Create database' => 'Tạo CSDL',
|
||||
'Database schema' => 'Cấu trúc CSDL',
|
||||
|
||||
// link to current database schema layout
|
||||
'Permanent link' => 'Liên kết cố định',
|
||||
|
||||
// thousands separator - must contain single byte
|
||||
',' => ',',
|
||||
'0123456789' => '0123456789',
|
||||
'Engine' => 'Cơ chế lưu trữ',
|
||||
'Collation' => 'Bộ mã',
|
||||
'Data Length' => 'Kích thước dữ liệu',
|
||||
'Index Length' => 'Kích thước chỉ mục',
|
||||
'Data Free' => 'Dữ liệu trống',
|
||||
'Rows' => 'Số dòng',
|
||||
'%d in total' => '%s',
|
||||
'Analyze' => 'Phân tích',
|
||||
'Optimize' => 'Tối ưu',
|
||||
'Vacuum' => 'Dọn dẹp',
|
||||
'Check' => 'Kiểm tra',
|
||||
'Repair' => 'Sửa chữa',
|
||||
'Truncate' => 'Làm rỗng',
|
||||
'Tables have been truncated.' => 'Bảng đã bị làm rỗng.',
|
||||
'Move to other database' => 'Chuyển tới cơ sở dữ liệu khác',
|
||||
'Move' => 'Chuyển đi',
|
||||
'Tables have been moved.' => 'Bảng.',
|
||||
'Copy' => 'Sao chép',
|
||||
'Tables have been copied.' => 'Bảng đã được sao chép.',
|
||||
|
||||
'Routines' => 'Routines',
|
||||
'Routine has been called, %d row(s) affected.' => 'Đã chạy routine, thay đổi %d dòng.',
|
||||
'Call' => 'Gọi',
|
||||
'Parameter name' => 'Tham số',
|
||||
'Create procedure' => 'Tạo lệnh',
|
||||
'Create function' => 'Tạo hàm',
|
||||
'Routine has been dropped.' => 'Đã xoá routine.',
|
||||
'Routine has been altered.' => 'Đã thay đổi routine.',
|
||||
'Routine has been created.' => 'Đã tạo routine.',
|
||||
'Alter function' => 'Thay đổi hàm',
|
||||
'Alter procedure' => 'Thay đổi thủ tục',
|
||||
'Return type' => 'Giá trị trả về',
|
||||
'Events' => 'Sự kiện',
|
||||
'Event has been dropped.' => 'Đã xoá sự kiện.',
|
||||
'Event has been altered.' => 'Đã thay đổi sự kiện.',
|
||||
'Event has been created.' => 'Đã tạo sự kiện.',
|
||||
'Alter event' => 'Sửa sự kiện',
|
||||
'Create event' => 'Tạo sự kiện',
|
||||
'At given time' => 'Vào thời gian xác định',
|
||||
'Every' => 'Mỗi',
|
||||
'Schedule' => 'Đặt lịch',
|
||||
'Start' => 'Bắt đầu',
|
||||
'End' => 'Kết thúc',
|
||||
'On completion preserve' => 'Khi kết thúc, duy trì',
|
||||
|
||||
'Tables' => 'Các bảng',
|
||||
'Tables and views' => 'Bảng và khung nhìn',
|
||||
'Table' => 'Bảng',
|
||||
'No tables.' => 'Không có bảng nào.',
|
||||
'Alter table' => 'Sửa bảng',
|
||||
'Create table' => 'Tạo bảng',
|
||||
'Table has been dropped.' => 'Bảng đã bị xoá.',
|
||||
'Tables have been dropped.' => 'Các bảng đã bị xoá.',
|
||||
'Tables have been optimized.' => 'Bảng đã được tối ưu.',
|
||||
'Table has been altered.' => 'Bảng đã thay đổi.',
|
||||
'Table has been created.' => 'Bảng đã được tạo.',
|
||||
'Table name' => 'Tên bảng',
|
||||
'Show structure' => 'Hiện cấu trúc',
|
||||
'engine' => 'cơ chế lưu trữ',
|
||||
'collation' => 'bảng mã',
|
||||
'Column name' => 'Tên cột',
|
||||
'Type' => 'Loại',
|
||||
'Length' => 'Độ dài',
|
||||
'Auto Increment' => 'Tăng tự động',
|
||||
'Options' => 'Tuỳ chọn',
|
||||
'Comment' => 'Chú thích',
|
||||
'Default values' => 'Giá trị mặc định',
|
||||
'Drop' => 'Xoá',
|
||||
'Are you sure?' => 'Bạn có chắc',
|
||||
'Size' => 'Kích thước',
|
||||
'Compute' => 'Tính',
|
||||
'Move up' => 'Chuyển lên trên',
|
||||
'Move down' => 'Chuyển xuống dưới',
|
||||
'Remove' => 'Xoá',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Thiết lập %s cần tăng thêm. (Đã vượt giới hạnố trường tối đa cho phép trong một biểu mẫu).',
|
||||
|
||||
'Partition by' => 'Phân chia bằng',
|
||||
'Partitions' => 'Phân hoạch',
|
||||
'Partition name' => 'Tên phân hoạch',
|
||||
'Values' => 'Giá trị',
|
||||
|
||||
'View' => 'Khung nhìn',
|
||||
'View has been dropped.' => 'Khung nhìn đã bị xoá.',
|
||||
'View has been altered.' => 'Khung nhìn đã được sửa.',
|
||||
'View has been created.' => 'Khung nhìn đã được tạo.',
|
||||
'Alter view' => 'Sửa khung nhìn',
|
||||
'Create view' => 'Tạo khung nhìn',
|
||||
|
||||
'Indexes' => 'Chỉ mục',
|
||||
'Indexes have been altered.' => 'Chỉ mục đã được sửa.',
|
||||
'Alter indexes' => 'Sửa chỉ mục',
|
||||
'Add next' => 'Thêm tiếp',
|
||||
'Index Type' => 'Loại chỉ mục',
|
||||
'Column (length)' => 'Cột (độ dài)',
|
||||
|
||||
'Foreign keys' => 'Các khoá ngoại',
|
||||
'Foreign key' => 'Khoá ngoại',
|
||||
'Foreign key has been dropped.' => 'Khoá ngoại đã bị xoá.',
|
||||
'Foreign key has been altered.' => 'Khoá ngoại đã được sửa.',
|
||||
'Foreign key has been created.' => 'Khoá ngoại đã được tạo.',
|
||||
'Target table' => 'Bảng đích',
|
||||
'Change' => 'Thay đổi',
|
||||
'Source' => 'Nguồn',
|
||||
'Target' => 'Đích',
|
||||
'Add column' => 'Thêm cột',
|
||||
'Alter' => 'Sửa',
|
||||
'Add foreign key' => 'Thêm khoá ngoại',
|
||||
'ON DELETE' => 'Khi xoá',
|
||||
'ON UPDATE' => 'Khi cập nhật',
|
||||
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Cột gốc và cột đích phải cùng kiểu, phải đặt chỉ mục trong cột đích và dữ liệu tham chiếu phải tồn tại.',
|
||||
|
||||
'Triggers' => 'xx',
|
||||
'Add trigger' => 'xx',
|
||||
'Trigger has been dropped.' => 'Đã xoá phản xạ.',
|
||||
'Trigger has been altered.' => 'Đã sửa phản xạ.',
|
||||
'Trigger has been created.' => 'Đã tạo phản xạ.',
|
||||
'Alter trigger' => 'Sửa phản xạ',
|
||||
'Create trigger' => 'Tạo phản xạ',
|
||||
'Time' => 'Thời gian',
|
||||
'Event' => 'Sự kiện',
|
||||
'Name' => 'Tên',
|
||||
|
||||
'select' => 'xem',
|
||||
'Select' => 'Xem',
|
||||
'Select data' => 'Xem dữ liệu',
|
||||
'Functions' => 'Các chức năng',
|
||||
'Aggregation' => 'Tổng hợp',
|
||||
'Search' => 'Tìm kiếm',
|
||||
'anywhere' => 'bất cứ đâu',
|
||||
'Search data in tables' => 'Tìm kiếm dữ liệu trong các bảng',
|
||||
'Sort' => 'Sắp xếp',
|
||||
'descending' => 'giảm dần',
|
||||
'Limit' => 'Giới hạn',
|
||||
'Text length' => 'Chiều dài văn bản',
|
||||
'Action' => 'Hành động',
|
||||
'Full table scan' => 'Quét toàn bộ bảng',
|
||||
'Unable to select the table' => 'Không thể xem dữ liệu',
|
||||
'No rows.' => 'Không có dòng dữ liệu nào.',
|
||||
'%d row(s)' => '%s dòng',
|
||||
'Page' => 'trang',
|
||||
'last' => 'cuối',
|
||||
'Load more data' => 'Xem thêm dữ liệu',
|
||||
'Loading' => 'Đang nạp',
|
||||
'whole result' => 'toàn bộ kết quả',
|
||||
'%d byte(s)' => '%d byte(s)',
|
||||
|
||||
'Import' => 'Nhập khẩu',
|
||||
'%d row(s) have been imported.' => 'Đã nhập % dòng dữ liệu.',
|
||||
'File must be in UTF-8 encoding.' => 'Tệp phải mã hoá bằng chuẩn UTF-8.',
|
||||
|
||||
// in-place editing in select
|
||||
'Modify' => 'Sửa',
|
||||
'Ctrl+click on a value to modify it.' => 'Nhấn Ctrl và bấm vào giá trị để sửa.',
|
||||
'Use edit link to modify this value.' => 'Dùng nút sửa để thay đổi giá trị này.',
|
||||
|
||||
// %s can contain auto-increment value
|
||||
'Item%s has been inserted.' => 'Đã thêm%s.',
|
||||
'Item has been deleted.' => 'Đã xoá.',
|
||||
'Item has been updated.' => 'Đã cập nhật.',
|
||||
'%d item(s) have been affected.' => '%d phần đã thay đổi.',
|
||||
'New item' => 'Thêm',
|
||||
'original' => 'bản gốc',
|
||||
// label for value '' in enum data type
|
||||
'empty' => 'trống',
|
||||
'edit' => 'sửa',
|
||||
'Edit' => 'Sửa',
|
||||
'Insert' => 'Thêm',
|
||||
'Save' => 'Lưu',
|
||||
'Save and continue edit' => 'Lưu và tiếp tục sửa',
|
||||
'Save and insert next' => 'Lưu và thêm tiếp',
|
||||
'Selected' => 'Chọn',
|
||||
'Clone' => 'Sao chép',
|
||||
'Delete' => 'Xoá',
|
||||
'You have no privileges to update this table.' => 'Bạn không có quyền sửa bảng này.',
|
||||
|
||||
'E-mail' => 'Địa chỉ email',
|
||||
'From' => 'Người gửi',
|
||||
'Subject' => 'Chủ đề',
|
||||
'Attachments' => 'Đính kèm',
|
||||
'Send' => 'Gửi',
|
||||
'%d e-mail(s) have been sent.' => '%d thư đã gửi.',
|
||||
|
||||
// data type descriptions
|
||||
'Numbers' => 'Số',
|
||||
'Date and time' => 'Ngày giờ',
|
||||
'Strings' => 'Chuỗi',
|
||||
'Binary' => 'Mã máy',
|
||||
'Lists' => 'Danh sách',
|
||||
'Network' => 'Mạng',
|
||||
'Geometry' => 'Toạ độ',
|
||||
'Relations' => 'Quan hệ',
|
||||
|
||||
'Editor' => 'Biên tập',
|
||||
// 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' => 'hiện tại',
|
||||
'yes' => 'có',
|
||||
'no' => 'không',
|
||||
|
||||
// general SQLite error in create, drop or rename database
|
||||
'File exists.' => 'Tệp đã có rồi.',
|
||||
'Please use one of the extensions %s.' => 'Cần phải dùng một trong các phần mở rộng sau: %s.',
|
||||
|
||||
// PostgreSQL and MS SQL schema support
|
||||
'Alter schema' => 'Thay đổi schema',
|
||||
'Create schema' => 'Tạo schema',
|
||||
'Schema has been dropped.' => 'Đã xoá schema.',
|
||||
'Schema has been created.' => 'Đã tạo schema.',
|
||||
'Schema has been altered.' => 'Đã thay đổi schema.',
|
||||
'Schema' => 'schema',
|
||||
'Invalid schema.' => 'Schema khong hợp lệ.',
|
||||
|
||||
// PostgreSQL sequences support
|
||||
'Sequences' => 'Dãy số',
|
||||
'Create sequence' => 'Tạo đãy số',
|
||||
'Sequence has been dropped.' => 'Dãy số đã bị xoá.',
|
||||
'Sequence has been created.' => 'Đã tạo dãy số.',
|
||||
'Sequence has been altered.' => 'Đã sửa dãy số.',
|
||||
'Alter sequence' => 'Thay đổi dãy số',
|
||||
|
||||
// PostgreSQL user types support
|
||||
'User types' => 'Kiểu tự định nghĩa',
|
||||
'Create type' => 'Tạo kiểu',
|
||||
'Type has been dropped.' => 'Đã xoá kiểu.',
|
||||
'Type has been created.' => 'Đã tạo kiểu.',
|
||||
'Alter type' => 'Sửa kiểu dữ liệu',
|
||||
);
|
||||
336
adminer/lang/xx.inc.php
Normal file
@@ -0,0 +1,336 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'System' => 'xx',
|
||||
'Server' => 'xx',
|
||||
'Username' => 'xx',
|
||||
'Password' => 'xx',
|
||||
'Permanent login' => 'xx',
|
||||
'Login' => 'xx',
|
||||
'Logout' => 'xx',
|
||||
'Logged as: %s' => 'xx',
|
||||
'Logout successful.' => 'xx',
|
||||
'Invalid credentials.' => 'xx',
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('xx', 'xx'),
|
||||
'Master password expired. <a href="http://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'xx',
|
||||
'Language' => 'xx',
|
||||
'Invalid CSRF token. Send the form again.' => 'xx',
|
||||
'No extension' => 'xx',
|
||||
'None of the supported PHP extensions (%s) are available.' => 'xx',
|
||||
'Session support must be enabled.' => 'xx',
|
||||
'Session expired, please login again.' => 'xx',
|
||||
'%s version: %s through PHP extension %s' => 'xx',
|
||||
'Refresh' => 'xx',
|
||||
|
||||
// text direction - 'ltr' or 'rtl'
|
||||
'ltr' => 'xx',
|
||||
|
||||
'Privileges' => 'xx',
|
||||
'Create user' => 'xx',
|
||||
'User has been dropped.' => 'xx',
|
||||
'User has been altered.' => 'xx',
|
||||
'User has been created.' => 'xx',
|
||||
'Hashed' => 'xx',
|
||||
'Column' => 'xx',
|
||||
'Routine' => 'xx',
|
||||
'Grant' => 'xx',
|
||||
'Revoke' => 'xx',
|
||||
|
||||
'Process list' => 'xx',
|
||||
'%d process(es) have been killed.' => array('xx', 'xx'),
|
||||
'Kill' => 'xx',
|
||||
|
||||
'Variables' => 'xx',
|
||||
'Status' => 'xx',
|
||||
|
||||
'SQL command' => 'xx',
|
||||
'%d query(s) executed OK.' => array('xx', 'xx'),
|
||||
'Query executed OK, %d row(s) affected.' => array('xx', 'xx'),
|
||||
'No commands to execute.' => 'xx',
|
||||
'Error in query' => 'xx',
|
||||
'Execute' => 'xx',
|
||||
'Stop on error' => 'xx',
|
||||
'Show only errors' => 'xx',
|
||||
// sprintf() format for time of the command
|
||||
'%.3f s' => 'xx',
|
||||
'History' => 'xx',
|
||||
'Clear' => 'xx',
|
||||
'Edit all' => 'xx',
|
||||
|
||||
'File upload' => 'xx',
|
||||
'From server' => 'xx',
|
||||
'Webserver file %s' => 'xx',
|
||||
'Run file' => 'xx',
|
||||
'File does not exist.' => 'xx',
|
||||
'File uploads are disabled.' => 'xx',
|
||||
'Unable to upload a file.' => 'xx',
|
||||
'Maximum allowed file size is %sB.' => 'xx',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'xx',
|
||||
'You can upload a big SQL file via FTP and import it from server.' => 'xx',
|
||||
'You are offline.' => 'xx',
|
||||
|
||||
'Export' => 'xx',
|
||||
'Output' => 'xx',
|
||||
'open' => 'xx',
|
||||
'save' => 'xx',
|
||||
'Format' => 'xx',
|
||||
'Data' => 'xx',
|
||||
|
||||
'Database' => 'xx',
|
||||
'database' => 'xx',
|
||||
'Use' => 'xx',
|
||||
'Select database' => 'xx',
|
||||
'Invalid database.' => 'xx',
|
||||
'Create new database' => 'xx',
|
||||
'Database has been dropped.' => 'xx',
|
||||
'Databases have been dropped.' => 'xx',
|
||||
'Database has been created.' => 'xx',
|
||||
'Database has been renamed.' => 'xx',
|
||||
'Database has been altered.' => 'xx',
|
||||
'Alter database' => 'xx',
|
||||
'Create database' => 'xx',
|
||||
'Database schema' => 'xx',
|
||||
|
||||
// link to current database schema layout
|
||||
'Permanent link' => 'xx',
|
||||
|
||||
// thousands separator - must contain single byte
|
||||
',' => 'x',
|
||||
'0123456789' => 'xxxxxxxxxx',
|
||||
'Engine' => 'xx',
|
||||
'Collation' => 'xx',
|
||||
'Data Length' => 'xx',
|
||||
'Index Length' => 'xx',
|
||||
'Data Free' => 'xx',
|
||||
'Rows' => 'xx',
|
||||
'%d in total' => 'xx',
|
||||
'Analyze' => 'xx',
|
||||
'Optimize' => 'xx',
|
||||
'Vacuum' => 'xx',
|
||||
'Check' => 'xx',
|
||||
'Repair' => 'xx',
|
||||
'Truncate' => 'xx',
|
||||
'Tables have been truncated.' => 'xx',
|
||||
'Move to other database' => 'xx',
|
||||
'Move' => 'xx',
|
||||
'Tables have been moved.' => 'xx',
|
||||
'Copy' => 'xx',
|
||||
'Tables have been copied.' => 'xx',
|
||||
|
||||
'Routines' => 'xx',
|
||||
'Routine has been called, %d row(s) affected.' => array('xx', 'xx'),
|
||||
'Call' => 'xx',
|
||||
'Parameter name' => 'xx',
|
||||
'Create procedure' => 'xx',
|
||||
'Create function' => 'xx',
|
||||
'Routine has been dropped.' => 'xx',
|
||||
'Routine has been altered.' => 'xx',
|
||||
'Routine has been created.' => 'xx',
|
||||
'Alter function' => 'xx',
|
||||
'Alter procedure' => 'xx',
|
||||
'Return type' => 'xx',
|
||||
|
||||
'Events' => 'xx',
|
||||
'Event has been dropped.' => 'xx',
|
||||
'Event has been altered.' => 'xx',
|
||||
'Event has been created.' => 'xx',
|
||||
'Alter event' => 'xx',
|
||||
'Create event' => 'xx',
|
||||
'At given time' => 'xx',
|
||||
'Every' => 'xx',
|
||||
'Schedule' => 'xx',
|
||||
'Start' => 'xx',
|
||||
'End' => 'xx',
|
||||
'On completion preserve' => 'xx',
|
||||
|
||||
'Tables' => 'xx',
|
||||
'Tables and views' => 'xx',
|
||||
'Table' => 'xx',
|
||||
'No tables.' => 'xx',
|
||||
'Alter table' => 'xx',
|
||||
'Create table' => 'xx',
|
||||
'Table has been dropped.' => 'xx',
|
||||
'Tables have been dropped.' => 'xx',
|
||||
'Tables have been optimized.' => 'xx',
|
||||
'Table has been altered.' => 'xx',
|
||||
'Table has been created.' => 'xx',
|
||||
'Table name' => 'xx',
|
||||
'Show structure' => 'xx',
|
||||
'engine' => 'xx',
|
||||
'collation' => 'xx',
|
||||
'Column name' => 'xx',
|
||||
'Type' => 'xx',
|
||||
'Length' => 'xx',
|
||||
'Auto Increment' => 'xx',
|
||||
'Options' => 'xx',
|
||||
'Comment' => 'xx',
|
||||
'Default value' => 'xx',
|
||||
'Default values' => 'xx',
|
||||
'Drop' => 'xx',
|
||||
'Are you sure?' => 'xx',
|
||||
'Size' => 'xx',
|
||||
'Compute' => 'xx',
|
||||
'Move up' => 'xx',
|
||||
'Move down' => 'xx',
|
||||
'Remove' => 'xx',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'xx',
|
||||
|
||||
'Partition by' => 'xx',
|
||||
'Partitions' => 'xx',
|
||||
'Partition name' => 'xx',
|
||||
'Values' => 'xx',
|
||||
|
||||
'View' => 'xx',
|
||||
'Materialized View' => 'xx',
|
||||
'View has been dropped.' => 'xx',
|
||||
'View has been altered.' => 'xx',
|
||||
'View has been created.' => 'xx',
|
||||
'Alter view' => 'xx',
|
||||
'Create view' => 'xx',
|
||||
'Create materialized view' => 'xx',
|
||||
|
||||
'Indexes' => 'xx',
|
||||
'Indexes have been altered.' => 'xx',
|
||||
'Alter indexes' => 'xx',
|
||||
'Add next' => 'xx',
|
||||
'Index Type' => 'xx',
|
||||
'Column (length)' => 'xx',
|
||||
|
||||
'Foreign keys' => 'xx',
|
||||
'Foreign key' => 'xx',
|
||||
'Foreign key has been dropped.' => 'xx',
|
||||
'Foreign key has been altered.' => 'xx',
|
||||
'Foreign key has been created.' => 'xx',
|
||||
'Target table' => 'xx',
|
||||
'Change' => 'xx',
|
||||
'Source' => 'xx',
|
||||
'Target' => 'xx',
|
||||
'Add column' => 'xx',
|
||||
'Alter' => 'xx',
|
||||
'Add foreign key' => 'xx',
|
||||
'ON DELETE' => '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',
|
||||
|
||||
'Triggers' => 'xx',
|
||||
'Add trigger' => 'xx',
|
||||
'Trigger has been dropped.' => 'xx',
|
||||
'Trigger has been altered.' => 'xx',
|
||||
'Trigger has been created.' => 'xx',
|
||||
'Alter trigger' => 'xx',
|
||||
'Create trigger' => 'xx',
|
||||
'Time' => 'xx',
|
||||
'Event' => 'xx',
|
||||
'Name' => 'xx',
|
||||
|
||||
'select' => 'xx',
|
||||
'Select' => 'xx',
|
||||
'Select data' => 'xx',
|
||||
'Functions' => 'xx',
|
||||
'Aggregation' => 'xx',
|
||||
'Search' => 'xx',
|
||||
'anywhere' => 'xx',
|
||||
'Search data in tables' => 'xx',
|
||||
'Sort' => 'xx',
|
||||
'descending' => 'xx',
|
||||
'Limit' => 'xx',
|
||||
'Limit rows' => 'xx',
|
||||
'Text length' => 'xx',
|
||||
'Action' => 'xx',
|
||||
'Full table scan' => 'xx',
|
||||
'Unable to select the table' => 'xx',
|
||||
'No rows.' => 'xx',
|
||||
'%d / ' => 'xx',
|
||||
'%d row(s)' => array('xx', 'xx'),
|
||||
'Page' => 'xx',
|
||||
'last' => 'xx',
|
||||
'Load more data' => 'xx',
|
||||
'Loading' => 'xx',
|
||||
'whole result' => 'xx',
|
||||
'%d byte(s)' => array('xx', 'xx'),
|
||||
|
||||
'Import' => 'xx',
|
||||
'%d row(s) have been imported.' => array('xx', 'xx'),
|
||||
'File must be in UTF-8 encoding.' => 'xx',
|
||||
|
||||
// in-place editing in select
|
||||
'Modify' => 'xx',
|
||||
'Ctrl+click on a value to modify it.' => 'xx',
|
||||
'Use edit link to modify this value.' => 'xx',
|
||||
|
||||
// %s can contain auto-increment value
|
||||
'Item%s has been inserted.' => 'xx',
|
||||
'Item has been deleted.' => 'xx',
|
||||
'Item has been updated.' => 'xx',
|
||||
'%d item(s) have been affected.' => array('xx', 'xx'),
|
||||
'New item' => 'xx',
|
||||
'original' => 'xx',
|
||||
// label for value '' in enum data type
|
||||
'empty' => 'xx',
|
||||
'edit' => 'xx',
|
||||
'Edit' => 'xx',
|
||||
'Insert' => 'xx',
|
||||
'Save' => 'xx',
|
||||
'Save and continue edit' => 'xx',
|
||||
'Save and insert next' => 'xx',
|
||||
'Selected' => 'xx',
|
||||
'Clone' => 'xx',
|
||||
'Delete' => 'xx',
|
||||
'You have no privileges to update this table.' => 'xx',
|
||||
|
||||
'E-mail' => 'xx',
|
||||
'From' => 'xx',
|
||||
'Subject' => 'xx',
|
||||
'Attachments' => 'xx',
|
||||
'Send' => 'xx',
|
||||
'%d e-mail(s) have been sent.' => array('xx', 'xx'),
|
||||
|
||||
// data type descriptions
|
||||
'Numbers' => 'xx',
|
||||
'Date and time' => 'xx',
|
||||
'Strings' => 'xx',
|
||||
'Binary' => 'xx',
|
||||
'Lists' => 'xx',
|
||||
'Network' => 'xx',
|
||||
'Geometry' => 'xx',
|
||||
'Relations' => 'xx',
|
||||
|
||||
'Editor' => 'xx',
|
||||
// date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
|
||||
'$1-$3-$5' => 'xx',
|
||||
// hint for date format - use language equivalents for day, month and year shortcuts
|
||||
'[yyyy]-mm-dd' => 'xx',
|
||||
// hint for time format - use language equivalents for hour, minute and second shortcuts
|
||||
'HH:MM:SS' => 'xx',
|
||||
'now' => 'xx',
|
||||
'yes' => 'xx',
|
||||
'no' => 'xx',
|
||||
|
||||
// general SQLite error in create, drop or rename database
|
||||
'File exists.' => 'xx',
|
||||
'Please use one of the extensions %s.' => 'xx',
|
||||
|
||||
// PostgreSQL and MS SQL schema support
|
||||
'Alter schema' => 'xx',
|
||||
'Create schema' => 'xx',
|
||||
'Schema has been dropped.' => 'xx',
|
||||
'Schema has been created.' => 'xx',
|
||||
'Schema has been altered.' => 'xx',
|
||||
'Schema' => 'xx',
|
||||
'Invalid schema.' => 'xx',
|
||||
|
||||
// PostgreSQL sequences support
|
||||
'Sequences' => 'xx',
|
||||
'Create sequence' => 'xx',
|
||||
'Sequence has been dropped.' => 'xx',
|
||||
'Sequence has been created.' => 'xx',
|
||||
'Sequence has been altered.' => 'xx',
|
||||
'Alter sequence' => 'xx',
|
||||
|
||||
// PostgreSQL user types support
|
||||
'User types' => 'xx',
|
||||
'Create type' => 'xx',
|
||||
'Type has been dropped.' => 'xx',
|
||||
'Type has been created.' => 'xx',
|
||||
'Alter type' => 'xx',
|
||||
);
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Login' => '登入',
|
||||
'Logout successful.' => '登出成功。',
|
||||
'Logout successful.' => '成功登出。',
|
||||
'Invalid credentials.' => '無效的憑證。',
|
||||
'Server' => '伺服器',
|
||||
'Username' => '帳號',
|
||||
@@ -9,62 +9,60 @@ $translations = array(
|
||||
'Select database' => '選擇資料庫',
|
||||
'Invalid database.' => '無效的資料庫。',
|
||||
'Create new database' => '建立新資料庫',
|
||||
'Table has been altered.' => '資料表已更改。',
|
||||
'Table has been created.' => '資料表已更改。',
|
||||
'Alter table' => '更改資料表',
|
||||
'Create table' => '建立資料表表',
|
||||
'Table has been altered.' => '資料表已修改。',
|
||||
'Table has been created.' => '資料表已修改。',
|
||||
'Alter table' => '修改資料表',
|
||||
'Create table' => '建立資料表',
|
||||
'Table name' => '資料表名稱',
|
||||
'engine' => '引擎',
|
||||
'collation' => '校對',
|
||||
'Column name' => '列名',
|
||||
'Type' => '類型',
|
||||
'Length' => '長度',
|
||||
'Auto Increment' => '自動增加',
|
||||
'Auto Increment' => '自動遞增',
|
||||
'Options' => '選項',
|
||||
'Save' => '儲存',
|
||||
'Drop' => '丟棄',
|
||||
'Drop' => '刪除',
|
||||
'Database has been dropped.' => '資料庫已刪除。',
|
||||
'Database has been created.' => '已建立資料庫。',
|
||||
'Database has been renamed.' => '已重新命名資料庫。',
|
||||
'Database has been altered.' => '已更改資料庫。',
|
||||
'Alter database' => '更改資料庫',
|
||||
'Database has been altered.' => '已修改資料庫。',
|
||||
'Alter database' => '修改資料庫',
|
||||
'Create database' => '建立資料庫',
|
||||
'SQL command' => 'SQL命令',
|
||||
'Dump' => '導入/導出',
|
||||
'Logout' => '登出',
|
||||
'database' => '資料庫',
|
||||
'Use' => '使用',
|
||||
'No tables.' => '沒有資料表。',
|
||||
'select' => '選擇',
|
||||
'Create new table' => '建立新資料表',
|
||||
'Item has been updated.' => '已更新項目。',
|
||||
'Item%s has been inserted.' => '已插入項目%s。',
|
||||
'Item%s has been inserted.' => '已新增項目%s。',
|
||||
'Edit' => '編輯',
|
||||
'Insert' => '插入',
|
||||
'Save and insert next' => '儲存並插入下一個',
|
||||
'Insert' => '新增',
|
||||
'Save and insert next' => '儲存並新增下一筆',
|
||||
'Delete' => '刪除',
|
||||
'Database' => '資料庫',
|
||||
'Routines' => '程序',
|
||||
'Indexes have been altered.' => '已更改索引。',
|
||||
'Indexes have been altered.' => '已修改索引。',
|
||||
'Indexes' => '索引',
|
||||
'Alter indexes' => '更改索引',
|
||||
'Add next' => '新增下一個',
|
||||
'Alter indexes' => '修改索引',
|
||||
'Add next' => '新增下一筆',
|
||||
'Language' => '語言',
|
||||
'Select' => '選擇',
|
||||
'New item' => '新建項',
|
||||
'New item' => '新增項目',
|
||||
'Search' => '搜尋',
|
||||
'Sort' => '排序',
|
||||
'descending' => '降冪',
|
||||
'descending' => '降冪(遞減)',
|
||||
'Limit' => '限定',
|
||||
'No rows.' => '沒有行。',
|
||||
'Action' => '動作',
|
||||
'edit' => '編輯',
|
||||
'Page' => '頁',
|
||||
'Query executed OK, %d row(s) affected.' => '執行查詢OK,%d行受影響',
|
||||
'Error in query' => '查詢出錯',
|
||||
'Error in query' => '查詢發生錯誤',
|
||||
'Execute' => '執行',
|
||||
'Table' => '資料表',
|
||||
'Foreign keys' => '外鍵',
|
||||
'Foreign keys' => '外來鍵',
|
||||
'Triggers' => '觸發器',
|
||||
'View' => '檢視表',
|
||||
'Unable to select the table' => '無法選擇該資料表',
|
||||
@@ -75,53 +73,53 @@ $translations = array(
|
||||
'No commands to execute.' => '沒有命令可執行。',
|
||||
'Unable to upload a file.' => '無法上傳檔案。',
|
||||
'File upload' => '檔案上傳',
|
||||
'File uploads are disabled.' => '檔案上傳被禁用。',
|
||||
'File uploads are disabled.' => '檔案上傳已經被停用。',
|
||||
'Routine has been called, %d row(s) affected.' => '程序已被執行,%d行被影響',
|
||||
'Call' => '呼叫',
|
||||
'No extension' => '沒有 擴充模組',
|
||||
'No extension' => '無擴充模組',
|
||||
'None of the supported PHP extensions (%s) are available.' => '沒有任何支援的PHP擴充模組(%s)。',
|
||||
'Session support must be enabled.' => 'Session 必須被啟用。',
|
||||
'Session expired, please login again.' => 'Session 已過期,請重新登入。',
|
||||
'Text length' => 'Text 長度',
|
||||
'Foreign key has been dropped.' => '已刪除外鍵。',
|
||||
'Foreign key has been altered.' => '已更改外鍵。',
|
||||
'Foreign key has been created.' => '已建立外鍵。',
|
||||
'Foreign key' => '外鍵',
|
||||
'Foreign key has been dropped.' => '已刪除外來鍵。',
|
||||
'Foreign key has been altered.' => '已修改外來鍵。',
|
||||
'Foreign key has been created.' => '已建立外來鍵。',
|
||||
'Foreign key' => '外來鍵',
|
||||
'Target table' => '目標資料表',
|
||||
'Change' => '更改',
|
||||
'Change' => '修改',
|
||||
'Source' => '來源',
|
||||
'Target' => '目標',
|
||||
'Add column' => '新增資料列',
|
||||
'Alter' => '更改',
|
||||
'Add foreign key' => '新增外鍵',
|
||||
'Alter' => '修改',
|
||||
'Add foreign key' => '新增外來鍵',
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => '索引類型',
|
||||
'Column (length)' => '列(長度)',
|
||||
'View has been dropped.' => '已丟棄檢視表。',
|
||||
'View has been altered.' => '已更改檢視表。',
|
||||
'View has been dropped.' => '已刪除檢視表。',
|
||||
'View has been altered.' => '已修改檢視表。',
|
||||
'View has been created.' => '已建立檢視表。',
|
||||
'Alter view' => '更改檢視表',
|
||||
'Alter view' => '修改檢視表',
|
||||
'Create view' => '建立檢視表',
|
||||
'Name' => '名稱',
|
||||
'Process list' => '進程列表',
|
||||
'Process list' => '處理程序列表',
|
||||
'%d process(es) have been killed.' => '%d 個 Process(es) 被終止',
|
||||
'Kill' => '終止',
|
||||
'Parameter name' => '參數名稱',
|
||||
'Database schema' => '資料庫架構',
|
||||
'Create procedure' => '建立預存程序',
|
||||
'Create function' => '建立函數',
|
||||
'Routine has been dropped.' => '已丟棄程序。',
|
||||
'Routine has been altered.' => '已更改子程序。',
|
||||
'Routine has been dropped.' => '已刪除程序。',
|
||||
'Routine has been altered.' => '已修改子程序。',
|
||||
'Routine has been created.' => '已建立子程序。',
|
||||
'Alter function' => '更改函數',
|
||||
'Alter procedure' => '更改過程',
|
||||
'Return type' => '返回類型',
|
||||
'Alter function' => '修改函數',
|
||||
'Alter procedure' => '修改過程',
|
||||
'Return type' => '回傳類型',
|
||||
'Add trigger' => '建立觸發器',
|
||||
'Trigger has been dropped.' => '已丟棄觸發器。',
|
||||
'Trigger has been altered.' => '已更改觸發器。',
|
||||
'Trigger has been dropped.' => '已刪除觸發器。',
|
||||
'Trigger has been altered.' => '已修改觸發器。',
|
||||
'Trigger has been created.' => '已建立觸發器。',
|
||||
'Alter trigger' => '更改觸發器',
|
||||
'Alter trigger' => '修改觸發器',
|
||||
'Create trigger' => '建立觸發器',
|
||||
'Time' => '時間',
|
||||
'Event' => '事件',
|
||||
@@ -131,8 +129,8 @@ $translations = array(
|
||||
'Are you sure?' => '你確定嗎?',
|
||||
'Privileges' => '權限',
|
||||
'Create user' => '建立使用者',
|
||||
'User has been dropped.' => '已丟棄使用者。',
|
||||
'User has been altered.' => '已更改使用者。',
|
||||
'User has been dropped.' => '已刪除使用者。',
|
||||
'User has been altered.' => '已修改使用者。',
|
||||
'User has been created.' => '已建立使用者。',
|
||||
'Hashed' => 'Hashed',
|
||||
'Column' => '列',
|
||||
@@ -152,18 +150,18 @@ $translations = array(
|
||||
'Format' => '格式',
|
||||
'Functions' => '函數',
|
||||
'Aggregation' => '集合',
|
||||
'Event has been dropped.' => '已丟棄事件。',
|
||||
'Event has been altered.' => '已更改事件。',
|
||||
'Event has been dropped.' => '已刪除事件。',
|
||||
'Event has been altered.' => '已修改事件。',
|
||||
'Event has been created.' => '已建立事件。',
|
||||
'Alter event' => '更改事件',
|
||||
'Alter event' => '修改事件',
|
||||
'Create event' => '建立事件',
|
||||
'Start' => '開始',
|
||||
'End' => '結束',
|
||||
'Every' => '每',
|
||||
'Status' => '狀態',
|
||||
'On completion preserve' => '在完成後保存',
|
||||
'On completion preserve' => '在完成後儲存',
|
||||
'Events' => '事件',
|
||||
'Schedule' => '調度',
|
||||
'Schedule' => '排程',
|
||||
'At given time' => '在指定時間',
|
||||
'Tables have been truncated.' => '已清空資料表。',
|
||||
'Tables have been moved.' => '已轉移資料表。',
|
||||
@@ -175,49 +173,50 @@ $translations = array(
|
||||
'Data Free' => '資料空閒',
|
||||
'Rows' => '行數',
|
||||
',' => ',',
|
||||
'0123456789' => '0123456789',
|
||||
'Analyze' => '分析',
|
||||
'Optimize' => '優化',
|
||||
'Optimize' => '最佳化',
|
||||
'Check' => '檢查',
|
||||
'Repair' => '修復',
|
||||
'Truncate' => '清空',
|
||||
'Move to other database' => '轉移到其它資料庫',
|
||||
'Move' => '轉移',
|
||||
'Save and continue edit' => '保存並繼續編輯',
|
||||
'Save and continue edit' => '儲存並繼續編輯',
|
||||
'original' => '原始',
|
||||
'%d item(s) have been affected.' => '%d個項目受到影響。',
|
||||
'whole result' => '所有結果',
|
||||
'Tables have been dropped.' => '已丟棄表。',
|
||||
'Tables have been dropped.' => '已經將資料表刪除。',
|
||||
'Clone' => '複製',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => '超過最多允許的字段數量。請增加%s和%s 。',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => '超過允許的字段數量的最大值。請增加%s。',
|
||||
'Partition by' => '分區類型',
|
||||
'Partitions' => '分區',
|
||||
'Partition name' => '分區名',
|
||||
'Partition name' => '分區名稱',
|
||||
'Values' => '值',
|
||||
'%d row(s) have been imported.' => '%d行已導入。',
|
||||
'%d row(s) have been imported.' => '已匯入%d行。',
|
||||
'anywhere' => '任意位置',
|
||||
'Import' => '匯入',
|
||||
'Stop on error' => '出錯時停止',
|
||||
'%.3f s' => '%.3f秒',
|
||||
'$1-$3-$5' => '$1.$3.$5',
|
||||
'[yyyy]-mm-dd' => '[yyyy].mm.dd',
|
||||
'History' => '歷史',
|
||||
'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.' => '源列和目標列必須具有相同的數據類型,在目標列上必須有一個索引並且引用的數據必須存在。',
|
||||
'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' => '二進制',
|
||||
'Strings' => '字串',
|
||||
'Binary' => '二進位',
|
||||
'Lists' => '列表',
|
||||
'Editor' => '編輯器',
|
||||
'E-mail' => '電子郵件',
|
||||
'From' => '來自',
|
||||
'Subject' => '主題',
|
||||
'Send' => '發送',
|
||||
'%d e-mail(s) have been sent.' => '已發送 %d 封郵件。',
|
||||
'Subject' => '主旨',
|
||||
'Send' => '寄出',
|
||||
'%d e-mail(s) have been sent.' => '已寄出 %d 封郵件。',
|
||||
'Webserver file %s' => '網頁伺服器檔案 %s',
|
||||
'File does not exist.' => '檔案不存在',
|
||||
'Item has been deleted.' => '該項目已被刪除',
|
||||
@@ -226,31 +225,29 @@ $translations = array(
|
||||
'Table has been dropped.' => '已經刪除資料表。',
|
||||
'Databases have been dropped.' => '資料庫已刪除。',
|
||||
'Search data in tables' => '在資料庫搜尋',
|
||||
'schema' => '資料表結構',
|
||||
'Schema' => '資料表結構',
|
||||
'Alter schema' => '更改資料表結構',
|
||||
'Alter schema' => '修改資料表結構',
|
||||
'Create schema' => '建立資料表結構',
|
||||
'Schema has been dropped.' => '已刪除資料表結構。',
|
||||
'Schema has been created.' => '已建立資料表結構。',
|
||||
'Schema has been altered.' => '已更改資料表結構。',
|
||||
'Sequences' => 'Sequences',
|
||||
'Create sequence' => '建立 sequence',
|
||||
'Alter sequence' => '更改 sequence',
|
||||
'Sequence has been dropped.' => '已刪除 sequence。',
|
||||
'Sequence has been created.' => '已建立 sequence。',
|
||||
'Sequence has been altered.' => '已更改 sequence。',
|
||||
'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' => '更改類型',
|
||||
'Alter type' => '修改類型',
|
||||
'Type has been dropped.' => '已刪除類型。',
|
||||
'Type has been created.' => '已建立類型。',
|
||||
'Double click on a value to modify it.' => '雙擊以進行修改。',
|
||||
'Use edit link to modify this value.' => '使用編輯連結來修改。',
|
||||
'last' => '最後一頁',
|
||||
'From server' => '從伺服器',
|
||||
'System' => '資料庫系統',
|
||||
'Select data' => '選擇資料',
|
||||
'Show structure' => '秀出結構',
|
||||
'Show structure' => '顯示結構',
|
||||
'empty' => '空值',
|
||||
'Network' => '網路',
|
||||
'Geometry' => '幾何',
|
||||
@@ -258,16 +255,14 @@ $translations = array(
|
||||
'Attachments' => '附件',
|
||||
'%d query(s) executed OK.' => '已順利執行 %d 個查詢。',
|
||||
'Show only errors' => '僅顯示錯誤訊息',
|
||||
'Last page' => '最後一頁',
|
||||
'Refresh' => '重新載入',
|
||||
'Invalid schema.' => '無效的資料表結構。',
|
||||
'Please use one of the extensions %s.' => '請使用下列其中一個 extension %s。',
|
||||
'Please use one of the extensions %s.' => '請使用下列其中一個擴充模組 %s。',
|
||||
'now' => '現在',
|
||||
'ltr' => 'ltr',
|
||||
'Tables have been copied.' => '表格已經複製',
|
||||
'Tables have been copied.' => '資料表已經複製',
|
||||
'Copy' => '複製',
|
||||
'Permanent link' => '永久鏈接',
|
||||
'Permanent link' => '永久連結',
|
||||
'Edit all' => '編輯全部',
|
||||
'Resend POST data?' => '重新發送表單資料?',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
|
||||
@@ -9,35 +9,33 @@ $translations = array(
|
||||
'Select database' => '选择数据库',
|
||||
'Invalid database.' => '无效数据库。',
|
||||
'Create new database' => '创建新数据库',
|
||||
'Table has been dropped.' => '已丢弃表。',
|
||||
'Table has been altered.' => '已更改表。',
|
||||
'Table has been dropped.' => '已删除表。',
|
||||
'Table has been altered.' => '已修改表。',
|
||||
'Table has been created.' => '已创建表。',
|
||||
'Alter table' => '更改表',
|
||||
'Alter table' => '修改表',
|
||||
'Create table' => '创建表',
|
||||
'Table name' => '表名',
|
||||
'engine' => '引擎',
|
||||
'collation' => '校对',
|
||||
'Column name' => '列名',
|
||||
'Column name' => '字段名',
|
||||
'Type' => '类型',
|
||||
'Length' => '长度',
|
||||
'Auto Increment' => '自动增量',
|
||||
'Options' => '选项',
|
||||
'Save' => '保存',
|
||||
'Drop' => '丢弃',
|
||||
'Database has been dropped.' => '已丢弃数据库。',
|
||||
'Drop' => '删除',
|
||||
'Database has been dropped.' => '已删除数据库。',
|
||||
'Database has been created.' => '已创建数据库。',
|
||||
'Database has been renamed.' => '已重命名数据库。',
|
||||
'Database has been altered.' => '已更改数据库。',
|
||||
'Alter database' => '更改数据库',
|
||||
'Database has been altered.' => '已修改数据库。',
|
||||
'Alter database' => '修改数据库',
|
||||
'Create database' => '创建数据库',
|
||||
'SQL command' => 'SQL命令',
|
||||
'Dump' => '导出',
|
||||
'Logout' => '注销',
|
||||
'database' => '数据库',
|
||||
'Use' => '使用',
|
||||
'No tables.' => '没有表。',
|
||||
'select' => '选择',
|
||||
'Create new table' => '创建新表',
|
||||
'Item has been deleted.' => '已删除项目。',
|
||||
'Item has been updated.' => '已更新项目。',
|
||||
'Item%s has been inserted.' => '已插入项目%s。',
|
||||
@@ -47,22 +45,22 @@ $translations = array(
|
||||
'Delete' => '删除',
|
||||
'Database' => '数据库',
|
||||
'Routines' => '子程序',
|
||||
'Indexes have been altered.' => '已更改索引。',
|
||||
'Indexes have been altered.' => '已修改索引。',
|
||||
'Indexes' => '索引',
|
||||
'Alter indexes' => '更改索引',
|
||||
'Add next' => '添加下一个',
|
||||
'Alter indexes' => '修改索引',
|
||||
'Add next' => '下一行插入',
|
||||
'Language' => '语言',
|
||||
'Select' => '选择',
|
||||
'New item' => '新建项',
|
||||
'New item' => '新建数据',
|
||||
'Search' => '搜索',
|
||||
'Sort' => '排序',
|
||||
'descending' => '降序',
|
||||
'Limit' => '限定',
|
||||
'No rows.' => '没有行。',
|
||||
'Limit' => '范围',
|
||||
'No rows.' => '无数据。',
|
||||
'Action' => '动作',
|
||||
'edit' => '编辑',
|
||||
'Page' => '页面',
|
||||
'Query executed OK, %d row(s) affected.' => '执行查询OK,%d 行受影响。',
|
||||
'Query executed OK, %d row(s) affected.' => '查询执行完毕,%d 行受影响。',
|
||||
'Error in query' => '查询出错',
|
||||
'Execute' => '执行',
|
||||
'Table' => '表',
|
||||
@@ -74,7 +72,7 @@ $translations = array(
|
||||
'Comment' => '注释',
|
||||
'Default values' => '默认值',
|
||||
'%d byte(s)' => '%d 字节',
|
||||
'No commands to execute.' => '没有命令执行。',
|
||||
'No commands to execute.' => '没有命令被执行。',
|
||||
'Unable to upload a file.' => '不能上传文件。',
|
||||
'File upload' => '文件上传',
|
||||
'File uploads are disabled.' => '文件上传被禁用。',
|
||||
@@ -82,28 +80,28 @@ $translations = array(
|
||||
'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' => '文本长度',
|
||||
'Session support must be enabled.' => 'Session 必须被启用。',
|
||||
'Session expired, please login again.' => 'Session 已过期,请重新登录。',
|
||||
'Text length' => '文本显示限制',
|
||||
'Foreign key has been dropped.' => '已删除外键。',
|
||||
'Foreign key has been altered.' => '已更改外键。',
|
||||
'Foreign key has been altered.' => '已修改外键。',
|
||||
'Foreign key has been created.' => '已创建外键。',
|
||||
'Foreign key' => '外键',
|
||||
'Target table' => '目标表',
|
||||
'Change' => '更改',
|
||||
'Change' => '修改',
|
||||
'Source' => '源',
|
||||
'Target' => '目标',
|
||||
'Add column' => '增加列',
|
||||
'Alter' => '更改',
|
||||
'Alter' => '修改',
|
||||
'Add foreign key' => '添加外键',
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => '索引类型',
|
||||
'Column (length)' => '列(长度)',
|
||||
'View has been dropped.' => '已丢弃视图。',
|
||||
'View has been altered.' => '已更改视图。',
|
||||
'View has been dropped.' => '已删除视图。',
|
||||
'View has been altered.' => '已修改视图。',
|
||||
'View has been created.' => '已创建视图。',
|
||||
'Alter view' => '更改视图',
|
||||
'Alter view' => '修改视图',
|
||||
'Create view' => '创建视图',
|
||||
'Name' => '名称',
|
||||
'Process list' => '进程列表',
|
||||
@@ -113,35 +111,35 @@ $translations = array(
|
||||
'Database schema' => '数据库概要',
|
||||
'Create procedure' => '创建过程',
|
||||
'Create function' => '创建函数',
|
||||
'Routine has been dropped.' => '已丢弃子程序。',
|
||||
'Routine has been altered.' => '已更改子程序。',
|
||||
'Routine has been dropped.' => '已删除子程序。',
|
||||
'Routine has been altered.' => '已修改子程序。',
|
||||
'Routine has been created.' => '已创建子程序。',
|
||||
'Alter function' => '更改函数',
|
||||
'Alter procedure' => '更改过程',
|
||||
'Alter function' => '修改函数',
|
||||
'Alter procedure' => '修改过程',
|
||||
'Return type' => '返回类型',
|
||||
'Add trigger' => '创建触发器',
|
||||
'Trigger has been dropped.' => '已丢弃触发器。',
|
||||
'Trigger has been altered.' => '已更改触发器。',
|
||||
'Trigger has been dropped.' => '已删除触发器。',
|
||||
'Trigger has been altered.' => '已修改触发器。',
|
||||
'Trigger has been created.' => '已创建触发器。',
|
||||
'Alter trigger' => '更改触发器',
|
||||
'Alter trigger' => '修改触发器',
|
||||
'Create trigger' => '创建触发器',
|
||||
'Time' => '时间',
|
||||
'Event' => '事件',
|
||||
'%s version: %s through PHP extension %s' => '%s 版本:%s 通过 PHP 扩展 %s',
|
||||
'%s version: %s through PHP extension %s' => '%s 版本:%s, 使用PHP扩展 %s',
|
||||
'%d row(s)' => '%d 行',
|
||||
'Remove' => '移除',
|
||||
'Are you sure?' => '你确定吗?',
|
||||
'Privileges' => '权限',
|
||||
'Create user' => '创建用户',
|
||||
'User has been dropped.' => '已丢弃用户。',
|
||||
'User has been altered.' => '已更改用户。',
|
||||
'User has been dropped.' => '已删除用户。',
|
||||
'User has been altered.' => '已修改用户。',
|
||||
'User has been created.' => '已创建用户。',
|
||||
'Hashed' => 'Hashed',
|
||||
'Column' => '列',
|
||||
'Routine' => '子程序',
|
||||
'Grant' => '授权',
|
||||
'Revoke' => '废除',
|
||||
'Logged as: %s' => '登录为:%s',
|
||||
'Logged as: %s' => '登录用户:%s',
|
||||
'Too big POST data. Reduce the data or increase the %s configuration directive.' => '太大的 POST 数据。减少数据或者增加 %s 配置命令。',
|
||||
'Move up' => '上移',
|
||||
'Move down' => '下移',
|
||||
@@ -154,10 +152,10 @@ $translations = array(
|
||||
'Format' => '格式',
|
||||
'Functions' => '函数',
|
||||
'Aggregation' => '集合',
|
||||
'Event has been dropped.' => '已丢弃事件。',
|
||||
'Event has been altered.' => '已更改事件。',
|
||||
'Event has been dropped.' => '已删除事件。',
|
||||
'Event has been altered.' => '已修改事件。',
|
||||
'Event has been created.' => '已创建事件。',
|
||||
'Alter event' => '更改事件',
|
||||
'Alter event' => '修改事件',
|
||||
'Create event' => '创建事件',
|
||||
'Start' => '开始',
|
||||
'End' => '结束',
|
||||
@@ -177,6 +175,7 @@ $translations = array(
|
||||
'Data Free' => '数据空闲',
|
||||
'Rows' => '行数',
|
||||
',' => ',',
|
||||
'0123456789' => '0123456789',
|
||||
'Analyze' => '分析',
|
||||
'Optimize' => '优化',
|
||||
'Check' => '检查',
|
||||
@@ -188,9 +187,9 @@ $translations = array(
|
||||
'original' => '原始',
|
||||
'%d item(s) have been affected.' => '%d 个项目受到影响。',
|
||||
'whole result' => '所有结果',
|
||||
'Tables have been dropped.' => '已丢弃表。',
|
||||
'Clone' => '克隆',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s and %s.' => '超过最多允许的字段数量。请增加 %s 和 %s 。',
|
||||
'Tables have been dropped.' => '已删除表。',
|
||||
'Clone' => '复制',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => '超过最多允许的字段数量。请增加 %s。',
|
||||
'Partition by' => '分区类型',
|
||||
'Partitions' => '分区',
|
||||
'Partition name' => '分区名',
|
||||
@@ -224,27 +223,25 @@ $translations = array(
|
||||
'File does not exist.' => '文件不存在。',
|
||||
'%d in total' => '共计 %d',
|
||||
'Permanent login' => '保持登录',
|
||||
'Databases have been dropped.' => '已丢弃数据库。',
|
||||
'Databases have been dropped.' => '已删除数据库。',
|
||||
'Search data in tables' => '在表中搜索数据',
|
||||
'schema' => '模式',
|
||||
'Schema' => '模式',
|
||||
'Alter schema' => '更改模式',
|
||||
'Alter schema' => '修改模式',
|
||||
'Create schema' => '创建模式',
|
||||
'Schema has been dropped.' => '已丢弃模式。',
|
||||
'Schema has been dropped.' => '已删除模式。',
|
||||
'Schema has been created.' => '已创建模式。',
|
||||
'Schema has been altered.' => '已更改模式。',
|
||||
'Schema has been altered.' => '已修改模式。',
|
||||
'Sequences' => '序列',
|
||||
'Create sequence' => '创建序列',
|
||||
'Alter sequence' => '更改序列',
|
||||
'Sequence has been dropped.' => '已丢弃序列。',
|
||||
'Alter sequence' => '修改序列',
|
||||
'Sequence has been dropped.' => '已删除序列。',
|
||||
'Sequence has been created.' => '已创建序列。',
|
||||
'Sequence has been altered.' => '已更改序列。',
|
||||
'Sequence has been altered.' => '已修改序列。',
|
||||
'User types' => '用户类型',
|
||||
'Create type' => '创建类型',
|
||||
'Alter type' => '更改类型',
|
||||
'Type has been dropped.' => '已丢弃类型。',
|
||||
'Alter type' => '修改类型',
|
||||
'Type has been dropped.' => '已删除类型。',
|
||||
'Type has been created.' => '已创建类型。',
|
||||
'Double click on a value to modify it.' => '在值上双击类修改它。',
|
||||
'Use edit link to modify this value.' => '使用编辑链接来修改该值。',
|
||||
'last' => '最后',
|
||||
'From server' => '来自服务器',
|
||||
@@ -258,7 +255,6 @@ $translations = array(
|
||||
'Attachments' => '附件',
|
||||
'%d query(s) executed OK.' => '%d 条查询已成功执行。',
|
||||
'Show only errors' => '仅显示错误',
|
||||
'Last page' => '末页',
|
||||
'Refresh' => '刷新',
|
||||
'Invalid schema.' => '非法模式。',
|
||||
'Please use one of the extensions %s.' => '请使用这些扩展中的一个:%s。',
|
||||
@@ -268,6 +264,5 @@ $translations = array(
|
||||
'Copy' => '复制',
|
||||
'Permanent link' => '固定链接',
|
||||
'Edit all' => '编辑全部',
|
||||
'Resend POST data?' => '重新发送 POST 数据?',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
);
|
||||
|
||||
@@ -10,12 +10,18 @@ function adminer_object() {
|
||||
|
||||
$plugins = array(
|
||||
// specify enabled plugins here
|
||||
new AdminerDatabaseHide(array('information_schema')),
|
||||
new AdminerDumpJson,
|
||||
new AdminerDumpBz2,
|
||||
new AdminerDumpZip,
|
||||
new AdminerDumpXml,
|
||||
new AdminerDumpAlter,
|
||||
//~ 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 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 AdminerFileUpload(""),
|
||||
new AdminerJsonColumn,
|
||||
new AdminerSlugify,
|
||||
new AdminerTranslation,
|
||||
new AdminerForeignSystem,
|
||||
|
||||
@@ -1,25 +1,29 @@
|
||||
<?php
|
||||
page_header(lang('Privileges'));
|
||||
|
||||
$result = $connection->query("SELECT User, Host FROM mysql." . (DB == "" ? "user" : "db WHERE " . q($_GET["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;
|
||||
if (!$result) {
|
||||
?>
|
||||
<form action=""><p>
|
||||
<?php hidden_fields_get(); ?>
|
||||
<?php echo lang('Username'); ?>: <input name="user">
|
||||
<?php echo lang('Server'); ?>: <input name="host" value="localhost">
|
||||
<input type="hidden" name="grant" value="">
|
||||
<input type="submit" value="<?php echo lang('Edit'); ?>">
|
||||
</form>
|
||||
<?php
|
||||
// list logged user, information_schema.USER_PRIVILEGES lists just the current user too
|
||||
$result = $connection->query("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', 1) AS User, SUBSTRING_INDEX(CURRENT_USER, '@', -1) AS Host");
|
||||
}
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<thead><tr><th> <th>" . lang('Username') . "<th>" . lang('Server') . "</thead>\n";
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
echo '<tr' . odd() . '><td><a href="' . h(ME . 'user=' . urlencode($row["User"]) . '&host=' . urlencode($row["Host"])) . '">' . lang('edit') . '</a><td>' . h($row["User"]) . "<td>" . h($row["Host"]) . "\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
|
||||
echo '<p><a href="' . h(ME) . 'user=">' . lang('Create user') . "</a>";
|
||||
echo "<form action=''><p>\n";
|
||||
hidden_fields_get();
|
||||
echo "<input type='hidden' name='db' value='" . h(DB) . "'>\n";
|
||||
echo ($grant ? "" : "<input type='hidden' name='grant' value=''>\n");
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<thead><tr><th>" . lang('Username') . "<th>" . lang('Server') . "<th> </thead>\n";
|
||||
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
echo '<tr' . odd() . '><td>' . h($row["User"]) . "<td>" . h($row["Host"]) . '<td><a href="' . h(ME . 'user=' . urlencode($row["User"]) . '&host=' . urlencode($row["Host"])) . '">' . lang('Edit') . "</a>\n";
|
||||
}
|
||||
|
||||
if (!$grant || DB != "") {
|
||||
echo "<tr" . odd() . "><td><input name='user' autocapitalize='off'><td><input name='host' value='localhost' autocapitalize='off'><td><input type='submit' value='" . lang('Edit') . "'>\n";
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
echo '<p class="links"><a href="' . h(ME) . 'user=">' . lang('Create user') . "</a>";
|
||||
|
||||
@@ -1,47 +1,42 @@
|
||||
<?php
|
||||
$PROCEDURE = $_GET["procedure"];
|
||||
$routine = (isset($_GET["function"]) ? "FUNCTION" : "PROCEDURE");
|
||||
$routine_languages = routine_languages();
|
||||
$row = $_POST;
|
||||
$row["fields"] = (array) $row["fields"];
|
||||
|
||||
$dropped = false;
|
||||
if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"] && !$_POST["down"]) {
|
||||
$set = array();
|
||||
$fields = (array) $_POST["fields"];
|
||||
ksort($fields); // enforce fields order
|
||||
foreach ($fields as $field) {
|
||||
if ($field["field"] != "") {
|
||||
$set[] = (ereg("^($inout)\$", $field["inout"]) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
|
||||
}
|
||||
}
|
||||
$dropped = drop_create(
|
||||
if ($_POST && !process_fields($row["fields"]) && !$error) {
|
||||
$temp_name = "$row[name]_adminer_" . uniqid();
|
||||
drop_create(
|
||||
"DROP $routine " . idf_escape($PROCEDURE),
|
||||
"CREATE $routine " . idf_escape($_POST["name"]) . " (" . implode(", ", $set) . ")" . (isset($_GET["function"]) ? " RETURNS" . process_type($_POST["returns"], "CHARACTER SET") : "") . (in_array($_POST["language"], $routine_languages) ? " LANGUAGE $_POST[language]" : "") . rtrim("\n$_POST[definition]", ";") . ";",
|
||||
create_routine($routine, $row),
|
||||
"DROP $routine " . idf_escape($row["name"]),
|
||||
create_routine($routine, array("name" => $temp_name) + $row),
|
||||
"DROP $routine " . idf_escape($temp_name),
|
||||
substr(ME, 0, -1),
|
||||
lang('Routine has been dropped.'),
|
||||
lang('Routine has been altered.'),
|
||||
lang('Routine has been created.'),
|
||||
$PROCEDURE
|
||||
$PROCEDURE,
|
||||
$row["name"]
|
||||
);
|
||||
}
|
||||
|
||||
page_header(($PROCEDURE != "" ? (isset($_GET["function"]) ? lang('Alter function') : lang('Alter procedure')) . ": " . h($PROCEDURE) : (isset($_GET["function"]) ? lang('Create function') : lang('Create procedure'))), $error);
|
||||
|
||||
$collations = get_vals("SHOW CHARACTER SET");
|
||||
sort($collations);
|
||||
$row = array("fields" => array());
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
$row["fields"] = (array) $row["fields"];
|
||||
process_fields($row["fields"]);
|
||||
} elseif ($PROCEDURE != "") {
|
||||
if (!$_POST && $PROCEDURE != "") {
|
||||
$row = routine($PROCEDURE, $routine);
|
||||
$row["name"] = $PROCEDURE;
|
||||
}
|
||||
|
||||
$collations = get_vals("SHOW CHARACTER SET");
|
||||
sort($collations);
|
||||
$routine_languages = routine_languages();
|
||||
?>
|
||||
|
||||
<form action="" method="post" id="form">
|
||||
<p><?php echo lang('Name'); ?>: <input name="name" value="<?php echo h($row["name"]); ?>" maxlength="64">
|
||||
<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"]) : ""); ?>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<table cellspacing="0" class="nowrap">
|
||||
<?php
|
||||
edit_fields($row["fields"], $collations, $routine);
|
||||
@@ -55,6 +50,5 @@ if (isset($_GET["function"])) {
|
||||
<p>
|
||||
<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 ($dropped) { ?><input type="hidden" name="dropped" value="1"><?php } ?>
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
</form>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
if (support("kill") && $_POST && !$error) {
|
||||
$killed = 0;
|
||||
foreach ((array) $_POST["kill"] as $val) {
|
||||
if (queries("KILL " . (+$val))) {
|
||||
if (queries("KILL " . number($val))) {
|
||||
$killed++;
|
||||
}
|
||||
}
|
||||
@@ -13,21 +13,39 @@ page_header(lang('Process list'), $error);
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<table cellspacing="0" onclick="tableClick(event);" class="nowrap">
|
||||
<table cellspacing="0" onclick="tableClick(event);" ondblclick="tableClick(event, true);" class="nowrap checkable">
|
||||
<?php
|
||||
// HTML valid because there is always at least one process
|
||||
$i = -1;
|
||||
foreach (process_list() as $i => $row) {
|
||||
|
||||
if (!$i) {
|
||||
echo "<thead><tr lang='en'>" . (support("kill") ? "<th> " : "") . "<th>" . implode("<th>", array_keys($row)) . "</thead>\n";
|
||||
echo "<thead><tr lang='en'>" . (support("kill") ? "<th> " : "");
|
||||
foreach ($row as $key => $val) {
|
||||
echo "<th>$key" . doc_link(array(
|
||||
'sql' => "show-processlist.html#processlist_" . strtolower($key),
|
||||
'pgsql' => "monitoring-stats.html#PG-STAT-ACTIVITY-VIEW",
|
||||
'oracle' => "../b14237/dynviews_2088.htm",
|
||||
));
|
||||
}
|
||||
echo "</thead>\n";
|
||||
}
|
||||
|
||||
echo "<tr" . odd() . ">" . (support("kill") ? "<td>" . checkbox("kill[]", $row["Id"], 0) : "");
|
||||
foreach ($row as $key => $val) {
|
||||
echo "<td>" . (($jush == "sql" ? $key == "Info" && $val != "" : $key == "current_query" && $val != "<IDLE>") ? "<code class='jush-$jush'>" . shorten_utf8($val, 100, "</code>") . ' <a href="' . h(ME . ($row["db"] != "" ? "db=" . urlencode($row["db"]) . "&" : "") . "sql=" . urlencode($val)) . '">' . lang('Edit') . '</a>' : nbsp($val));
|
||||
echo "<td>" . (
|
||||
($jush == "sql" && $key == "Info" && preg_match("~Query|Killed~", $row["Command"]) && $val != "") ||
|
||||
($jush == "pgsql" && $key == "current_query" && $val != "<IDLE>") ||
|
||||
($jush == "oracle" && $key == "sql_text" && $val != "")
|
||||
? "<code class='jush-$jush'>" . shorten_utf8($val, 100, "</code>") . ' <a href="' . h(ME . ($row["db"] != "" ? "db=" . urlencode($row["db"]) . "&" : "") . "sql=" . urlencode($val)) . '">' . lang('Clone') . '</a>'
|
||||
: nbsp($val)
|
||||
);
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<script type='text/javascript'>tableCheck();</script>
|
||||
<p>
|
||||
<?php
|
||||
if (support("kill")) {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
page_header(lang('Database schema'), "", array(), DB . ($_GET["ns"] ? ".$_GET[ns]" : ""));
|
||||
page_header(lang('Database schema'), "", array(), h(DB . ($_GET["ns"] ? ".$_GET[ns]" : "")));
|
||||
|
||||
$table_pos = array();
|
||||
$table_pos_js = array();
|
||||
$name = "adminer_schema";
|
||||
$SCHEMA = ($_GET["schema"] ? $_GET["schema"] : $_COOKIE[($_COOKIE["$name-" . DB] ? "$name-" . DB : $name)]); // $_COOKIE["adminer_schema"] was used before 3.2.0 //! ':' in table name
|
||||
$SCHEMA = ($_GET["schema"] ? $_GET["schema"] : $_COOKIE["adminer_schema-" . str_replace(".", "_", DB)]); // $_COOKIE["adminer_schema"] was used before 3.2.0 //! ':' in table name
|
||||
preg_match_all('~([^:]+):([-0-9.]+)x([-0-9.]+)(_|$)~', $SCHEMA, $matches, PREG_SET_ORDER);
|
||||
foreach ($matches as $i => $match) {
|
||||
$table_pos[$match[1]] = array($match[2], $match[3]);
|
||||
@@ -16,23 +15,23 @@ $base_left = -1;
|
||||
$schema = array(); // table => array("fields" => array(name => field), "pos" => array(top, left), "references" => array(table => array(left => array(source, target))))
|
||||
$referenced = array(); // target_table => array(table => array(left => target_column))
|
||||
$lefts = array(); // float => bool
|
||||
foreach (table_status() as $row) {
|
||||
if (!isset($row["Engine"])) { // view
|
||||
foreach (table_status('', true) as $table => $table_status) {
|
||||
if (is_view($table_status)) {
|
||||
continue;
|
||||
}
|
||||
$pos = 0;
|
||||
$schema[$row["Name"]]["fields"] = array();
|
||||
foreach (fields($row["Name"]) as $name => $field) {
|
||||
$schema[$table]["fields"] = array();
|
||||
foreach (fields($table) as $name => $field) {
|
||||
$pos += 1.25;
|
||||
$field["pos"] = $pos;
|
||||
$schema[$row["Name"]]["fields"][$name] = $field;
|
||||
$schema[$table]["fields"][$name] = $field;
|
||||
}
|
||||
$schema[$row["Name"]]["pos"] = ($table_pos[$row["Name"]] ? $table_pos[$row["Name"]] : array($top, 0));
|
||||
foreach ($adminer->foreignKeys($row["Name"]) as $val) {
|
||||
$schema[$table]["pos"] = ($table_pos[$table] ? $table_pos[$table] : array($top, 0));
|
||||
foreach ($adminer->foreignKeys($table) as $val) {
|
||||
if (!$val["db"]) {
|
||||
$left = $base_left;
|
||||
if ($table_pos[$row["Name"]][1] || $table_pos[$val["table"]][1]) {
|
||||
$left = min(floatval($table_pos[$row["Name"]][1]), floatval($table_pos[$val["table"]][1])) - 1;
|
||||
if ($table_pos[$table][1] || $table_pos[$val["table"]][1]) {
|
||||
$left = min(floatval($table_pos[$table][1]), floatval($table_pos[$val["table"]][1])) - 1;
|
||||
} else {
|
||||
$base_left -= .1;
|
||||
}
|
||||
@@ -40,19 +39,19 @@ foreach (table_status() as $row) {
|
||||
// find free $left
|
||||
$left -= .0001;
|
||||
}
|
||||
$schema[$row["Name"]]["references"][$val["table"]][(string) $left] = array($val["source"], $val["target"]);
|
||||
$referenced[$val["table"]][$row["Name"]][(string) $left] = $val["target"];
|
||||
$schema[$table]["references"][$val["table"]][(string) $left] = array($val["source"], $val["target"]);
|
||||
$referenced[$val["table"]][$table][(string) $left] = $val["target"];
|
||||
$lefts[(string) $left] = true;
|
||||
}
|
||||
}
|
||||
$top = max($top, $schema[$row["Name"]]["pos"][0] + 2.5 + $pos);
|
||||
$top = max($top, $schema[$table]["pos"][0] + 2.5 + $pos);
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="schema" style="height: <?php echo $top; ?>em;">
|
||||
<div id="schema" style="height: <?php echo $top; ?>em;" onselectstart="return false;">
|
||||
<script type="text/javascript">
|
||||
tablePos = {<?php echo implode(",", $table_pos_js) . "\n"; ?>};
|
||||
em = document.getElementById('schema').offsetHeight / <?php echo $top; ?>;
|
||||
var tablePos = {<?php echo implode(",", $table_pos_js) . "\n"; ?>};
|
||||
var em = document.getElementById('schema').offsetHeight / <?php echo $top; ?>;
|
||||
document.onmousemove = schemaMousemove;
|
||||
document.onmouseup = function (ev) {
|
||||
schemaMouseup(ev, '<?php echo js_escape(DB); ?>');
|
||||
@@ -61,31 +60,36 @@ document.onmouseup = function (ev) {
|
||||
<?php
|
||||
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 '<a href="' . h(ME) . 'table=' . urlencode($name) . '"><b>' . h($name) . "</b></a><br>\n";
|
||||
echo '<a href="' . h(ME) . 'table=' . urlencode($name) . '"><b>' . h($name) . "</b></a>";
|
||||
|
||||
foreach ($table["fields"] as $field) {
|
||||
$val = '<span' . type_class($field["type"]) . ' title="' . h($field["full_type"] . ($field["null"] ? " NULL" : '')) . '">' . h($field["field"]) . '</span>';
|
||||
echo ($field["primary"] ? "<i>$val</i>" : $val) . "<br>\n";
|
||||
echo "<br>" . ($field["primary"] ? "<i>$val</i>" : $val);
|
||||
}
|
||||
|
||||
foreach ((array) $table["references"] as $target_name => $refs) {
|
||||
foreach ($refs as $left => $ref) {
|
||||
$left1 = $left - $table_pos[$name][1];
|
||||
$i = 0;
|
||||
foreach ($ref[0] as $source) {
|
||||
echo "<div class='references' title='" . h($target_name) . "' id='refs$left-" . ($i++) . "' style='left: $left1" . "em; top: " . $table["fields"][$source]["pos"] . "em; padding-top: .5em;'><div style='border-top: 1px solid Gray; width: " . (-$left1) . "em;'></div></div>\n";
|
||||
echo "\n<div class='references' title='" . h($target_name) . "' id='refs$left-" . ($i++) . "' style='left: $left1" . "em; top: " . $table["fields"][$source]["pos"] . "em; padding-top: .5em;'><div style='border-top: 1px solid Gray; width: " . (-$left1) . "em;'></div></div>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ((array) $referenced[$name] as $target_name => $refs) {
|
||||
foreach ($refs as $left => $columns) {
|
||||
$left1 = $left - $table_pos[$name][1];
|
||||
$i = 0;
|
||||
foreach ($columns as $target) {
|
||||
echo "<div class='references' title='" . h($target_name) . "' id='refd$left-" . ($i++) . "' style='left: $left1" . "em; top: " . $table["fields"][$target]["pos"] . "em; height: 1.25em; background: url(../adminer/static/arrow.gif) no-repeat right center;'><div style='height: .5em; border-bottom: 1px solid Gray; width: " . (-$left1) . "em;'></div></div>\n";
|
||||
echo "\n<div class='references' title='" . h($target_name) . "' id='refd$left-" . ($i++) . "' style='left: $left1" . "em; top: " . $table["fields"][$target]["pos"] . "em; height: 1.25em; background: url(../adminer/static/arrow.gif) no-repeat right center;'><div style='height: .5em; border-bottom: 1px solid Gray; width: " . (-$left1) . "em;'></div></div>";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
echo "\n</div>\n";
|
||||
}
|
||||
|
||||
foreach ($schema as $name => $table) {
|
||||
foreach ((array) $table["references"] as $target_name => $refs) {
|
||||
foreach ($refs as $left => $ref) {
|
||||
@@ -103,4 +107,4 @@ foreach ($schema as $name => $table) {
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<p><a href="<?php echo h(ME . "schema=" . urlencode($SCHEMA)); ?>" id="schema-link"><?php echo lang('Permanent link'); ?></a>
|
||||
<p class="links"><a href="<?php echo h(ME . "schema=" . urlencode($SCHEMA)); ?>" id="schema-link"><?php echo lang('Permanent link'); ?></a>
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
<?php
|
||||
$row = $_POST;
|
||||
|
||||
if ($_POST && !$error) {
|
||||
$link = preg_replace('~ns=[^&]*&~', '', ME) . "ns=";
|
||||
if ($_POST["drop"]) {
|
||||
query_redirect("DROP SCHEMA " . idf_escape($_GET["ns"]), $link, lang('Schema has been dropped.'));
|
||||
} else {
|
||||
$link .= urlencode($_POST["name"]);
|
||||
$name = trim($row["name"]);
|
||||
$link .= urlencode($name);
|
||||
if ($_GET["ns"] == "") {
|
||||
query_redirect("CREATE SCHEMA " . idf_escape($_POST["name"]), $link, lang('Schema has been created.'));
|
||||
} elseif ($_GET["ns"] != $_POST["name"]) {
|
||||
query_redirect("ALTER SCHEMA " . idf_escape($_GET["ns"]) . " RENAME TO " . idf_escape($_POST["name"]), $link, lang('Schema has been altered.')); //! sp_rename in MS SQL
|
||||
query_redirect("CREATE SCHEMA " . idf_escape($name), $link, lang('Schema has been created.'));
|
||||
} elseif ($_GET["ns"] != $name) {
|
||||
query_redirect("ALTER SCHEMA " . idf_escape($_GET["ns"]) . " RENAME TO " . idf_escape($name), $link, lang('Schema has been altered.')); //! sp_rename in MS SQL
|
||||
} else {
|
||||
redirect($link);
|
||||
}
|
||||
@@ -17,14 +20,14 @@ if ($_POST && !$error) {
|
||||
|
||||
page_header($_GET["ns"] != "" ? lang('Alter schema') : lang('Create schema'), $error);
|
||||
|
||||
$row = array("name" => $_GET["ns"]);
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
if (!$row) {
|
||||
$row["name"] = $_GET["ns"];
|
||||
}
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<p><input name="name" value="<?php echo h($row["name"]); ?>">
|
||||
<p><input name="name" id="name" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
|
||||
<script type='text/javascript'>focus(document.getElementById('name'));</script>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<?php
|
||||
if ($_GET["ns"] != "") {
|
||||
|
||||
@@ -3,33 +3,41 @@ header("Content-Type: text/javascript; charset=utf-8");
|
||||
|
||||
if ($_GET["script"] == "db") {
|
||||
$sums = array("Data_length" => 0, "Index_length" => 0, "Data_free" => 0);
|
||||
foreach (table_status() as $table_status) {
|
||||
$id = js_escape($table_status["Name"]);
|
||||
json_row("Comment-$id", nbsp($table_status["Comment"]));
|
||||
foreach (table_status() as $name => $table_status) {
|
||||
json_row("Comment-$name", nbsp($table_status["Comment"]));
|
||||
if (!is_view($table_status)) {
|
||||
foreach (array("Engine", "Collation") as $key) {
|
||||
json_row("$key-$id", nbsp($table_status[$key]));
|
||||
json_row("$key-$name", nbsp($table_status[$key]));
|
||||
}
|
||||
foreach ($sums + array("Auto_increment" => 0, "Rows" => 0) as $key => $val) {
|
||||
if ($table_status[$key] != "") {
|
||||
$val = number_format($table_status[$key], 0, '.', lang(','));
|
||||
json_row("$key-$id", ($key == "Rows" && $table_status["Engine"] == "InnoDB" && $val ? "~ $val" : $val));
|
||||
$val = format_number($table_status[$key]);
|
||||
json_row("$key-$name", ($key == "Rows" && $val && $table_status["Engine"] == ($sql == "pgsql" ? "table" : "InnoDB")
|
||||
? "~ $val"
|
||||
: $val
|
||||
));
|
||||
if (isset($sums[$key])) {
|
||||
// ignore innodb_file_per_table because it is not active for tables created before it was enabled
|
||||
$sums[$key] += ($table_status["Engine"] != "InnoDB" || $key != "Data_free" ? $table_status[$key] : 0);
|
||||
}
|
||||
} elseif (array_key_exists($key, $table_status)) {
|
||||
json_row("$key-$id");
|
||||
json_row("$key-$name");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($sums as $key => $val) {
|
||||
json_row("sum-$key", number_format($val, 0, '.', lang(',')));
|
||||
json_row("sum-$key", format_number($val));
|
||||
}
|
||||
json_row("");
|
||||
|
||||
} elseif ($_GET["script"] == "kill") {
|
||||
$connection->query("KILL " . number($_POST["kill"]));
|
||||
|
||||
} else { // connect
|
||||
foreach (count_tables(get_databases()) as $db => $val) {
|
||||
json_row("tables-" . js_escape($db), $val);
|
||||
foreach (count_tables($adminer->databases()) as $db => $val) {
|
||||
json_row("tables-$db", $val);
|
||||
json_row("size-$db", db_size($db));
|
||||
}
|
||||
json_row("");
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<?php
|
||||
$TABLE = $_GET["select"];
|
||||
$table_status = table_status($TABLE);
|
||||
$table_status = table_status1($TABLE);
|
||||
$indexes = indexes($TABLE);
|
||||
$fields = fields($TABLE);
|
||||
$foreign_keys = column_foreign_keys($TABLE);
|
||||
if ($table_status["Oid"] == "t") {
|
||||
$indexes[] = array("type" => "PRIMARY", "columns" => array("oid"));
|
||||
$oid = "";
|
||||
if ($table_status["Oid"]) {
|
||||
$oid = ($jush == "sqlite" ? "rowid" : "oid");
|
||||
$indexes[] = array("type" => "PRIMARY", "columns" => array($oid));
|
||||
}
|
||||
parse_str($_COOKIE["adminer_import"], $adminer_import);
|
||||
|
||||
@@ -15,8 +17,8 @@ $text_length = null;
|
||||
foreach ($fields as $key => $field) {
|
||||
$name = $adminer->fieldName($field);
|
||||
if (isset($field["privileges"]["select"]) && $name != "") {
|
||||
$columns[$key] = html_entity_decode(strip_tags($name));
|
||||
if (ereg('text|lob', $field["type"])) {
|
||||
$columns[$key] = html_entity_decode(strip_tags($name), ENT_QUOTES);
|
||||
if (is_shortable($field)) {
|
||||
$text_length = $adminer->selectLengthProcess();
|
||||
}
|
||||
}
|
||||
@@ -24,22 +26,39 @@ foreach ($fields as $key => $field) {
|
||||
}
|
||||
|
||||
list($select, $group) = $adminer->selectColumnsProcess($columns, $indexes);
|
||||
$is_group = count($group) < count($select);
|
||||
$where = $adminer->selectSearchProcess($fields, $indexes);
|
||||
$order = $adminer->selectOrderProcess($fields, $indexes);
|
||||
$limit = $adminer->selectLimitProcess();
|
||||
$from = ($select ? implode(", ", $select) : ($table_status["Oid"] == "t" ? "oid, " : "") . "*") . "\nFROM " . table($TABLE);
|
||||
$group_by = ($group && count($group) < count($select) ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : "");
|
||||
$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()) {
|
||||
header("Content-Type: text/plain; charset=utf-8");
|
||||
foreach ($_GET["val"] as $unique_idf => $row) {
|
||||
echo $connection->result("SELECT" . limit(idf_escape(key($row)) . " FROM " . table($TABLE), " WHERE " . where_check($unique_idf) . ($where ? " AND " . implode(" AND ", $where) : "") . ($order ? " ORDER BY " . implode(", ", $order) : ""), 1));
|
||||
$as = convert_field($fields[key($row)]);
|
||||
$select = array($as ? $as : idf_escape(key($row)));
|
||||
$where[] = where_check($unique_idf, $fields);
|
||||
$return = $driver->select($TABLE, $select, $where, $select);
|
||||
if ($return) {
|
||||
echo reset($return->fetch_row());
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_POST && !$error) {
|
||||
$where_check = "(" . implode(") OR (", array_map('where_check', (array) $_POST["check"])) . ")";
|
||||
$where_check = $where;
|
||||
if (!$_POST["all"] && is_array($_POST["check"])) {
|
||||
$checks = array();
|
||||
foreach ($_POST["check"] as $check) {
|
||||
$checks[] = where_check($check, $fields);
|
||||
}
|
||||
$where_check[] = "((" . implode(") OR (", $checks) . "))";
|
||||
}
|
||||
$where_check = ($where_check ? "\nWHERE " . implode(" AND ", $where_check) : "");
|
||||
$primary = $unselected = null;
|
||||
foreach ($indexes as $index) {
|
||||
if ($index["type"] == "PRIMARY") {
|
||||
@@ -53,63 +72,62 @@ if ($_POST && !$error) {
|
||||
unset($unselected[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($_POST["export"]) {
|
||||
cookie("adminer_import", "output=" . urlencode($_POST["output"]) . "&format=" . urlencode($_POST["format"]));
|
||||
dump_headers($TABLE);
|
||||
$adminer->dumpTable($TABLE, "");
|
||||
if (!is_array($_POST["check"]) || $unselected === array()) {
|
||||
$where2 = $where;
|
||||
if (is_array($_POST["check"])) {
|
||||
$where2[] = "($where_check)";
|
||||
}
|
||||
$query = "SELECT $from" . ($where2 ? "\nWHERE " . implode(" AND ", $where2) : "") . $group_by;
|
||||
$query = "SELECT $from$where_check$group_by";
|
||||
} else {
|
||||
$union = array();
|
||||
foreach ($_POST["check"] as $val) {
|
||||
// where is not unique so OR can't be used
|
||||
$union[] = "(SELECT" . limit($from, "\nWHERE " . ($where ? implode(" AND ", $where) . " AND " : "") . where_check($val) . $group_by, 1) . ")";
|
||||
$union[] = "(SELECT" . limit($from, "\nWHERE " . ($where ? implode(" AND ", $where) . " AND " : "") . where_check($val, $fields) . $group_by, 1) . ")";
|
||||
}
|
||||
$query = implode(" UNION ALL ", $union);
|
||||
}
|
||||
$adminer->dumpData($TABLE, "table", $query);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!$adminer->selectEmailProcess($where, $foreign_keys)) {
|
||||
if ($_POST["save"] || $_POST["delete"]) { // edit
|
||||
$result = true;
|
||||
$affected = 0;
|
||||
$query = table($TABLE);
|
||||
$set = array();
|
||||
if (!$_POST["delete"]) {
|
||||
foreach ($columns as $name => $val) { //! should check also for edit or insert privileges
|
||||
$val = process_input($fields[$name]);
|
||||
if ($val !== null) {
|
||||
if ($_POST["clone"]) {
|
||||
$set[idf_escape($name)] = ($val !== false ? $val : idf_escape($name));
|
||||
} elseif ($val !== false) {
|
||||
$set[] = idf_escape($name) . " = $val";
|
||||
}
|
||||
if ($val !== null && ($_POST["clone"] || $val !== false)) {
|
||||
$set[idf_escape($name)] = ($val !== false ? $val : idf_escape($name));
|
||||
}
|
||||
}
|
||||
$query .= ($_POST["clone"] ? " (" . implode(", ", array_keys($set)) . ")\nSELECT " . implode(", ", $set) . "\nFROM " . table($TABLE) : " SET\n" . implode(",\n", $set));
|
||||
}
|
||||
if ($_POST["delete"] || $set) {
|
||||
$command = "UPDATE";
|
||||
if ($_POST["delete"]) {
|
||||
$command = "DELETE";
|
||||
$query = "FROM $query";
|
||||
}
|
||||
if ($_POST["clone"]) {
|
||||
$command = "INSERT";
|
||||
$query = "INTO $query";
|
||||
$query = "INTO " . table($TABLE) . " (" . implode(", ", array_keys($set)) . ")\nSELECT " . implode(", ", $set) . "\nFROM " . table($TABLE);
|
||||
}
|
||||
if ($_POST["all"] || ($unselected === array() && $_POST["check"]) || count($group) < count($select)) {
|
||||
$result = queries($command . " $query" . ($_POST["all"] ? ($where ? "\nWHERE " . implode(" AND ", $where) : "") : "\nWHERE $where_check"));
|
||||
if ($_POST["all"] || ($unselected === array() && is_array($_POST["check"])) || $is_group) {
|
||||
$result = ($_POST["delete"]
|
||||
? $driver->delete($TABLE, $where_check)
|
||||
: ($_POST["clone"]
|
||||
? queries("INSERT $query$where_check")
|
||||
: $driver->update($TABLE, $set, $where_check)
|
||||
)
|
||||
);
|
||||
$affected = $connection->affected_rows;
|
||||
} else {
|
||||
foreach ((array) $_POST["check"] as $val) {
|
||||
// where is not unique so OR can't be used
|
||||
$result = queries($command . limit1($query, "\nWHERE " . where_check($val)));
|
||||
$where2 = "\nWHERE " . ($where ? implode(" AND ", $where) . " AND " : "") . where_check($val, $fields);
|
||||
$result = ($_POST["delete"]
|
||||
? $driver->delete($TABLE, $where2, 1)
|
||||
: ($_POST["clone"]
|
||||
? queries("INSERT" . limit1($query, $where2))
|
||||
: $driver->update($TABLE, $set, $where2)
|
||||
)
|
||||
);
|
||||
if (!$result) {
|
||||
break;
|
||||
}
|
||||
@@ -117,11 +135,23 @@ if ($_POST && !$error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
queries_redirect(remove_from_uri("page"), lang('%d item(s) have been affected.', $affected), $result);
|
||||
//! display edit page in case of an error
|
||||
$message = lang('%d item(s) have been affected.', $affected);
|
||||
if ($_POST["clone"] && $result && $affected == 1) {
|
||||
$last_id = last_id();
|
||||
if ($last_id) {
|
||||
$message = lang('Item%s has been inserted.', " $last_id");
|
||||
}
|
||||
}
|
||||
queries_redirect(remove_from_uri($_POST["all"] && $_POST["delete"] ? "page" : ""), $message, $result);
|
||||
if (!$_POST["delete"]) {
|
||||
edit_form($TABLE, $fields, (array) $_POST["fields"], !$_POST["clone"]);
|
||||
page_footer();
|
||||
exit;
|
||||
}
|
||||
|
||||
} elseif (!$_POST["import"]) { // modify
|
||||
if (!$_POST["val"]) {
|
||||
$error = lang('Double click on a value to modify it.');
|
||||
$error = lang('Ctrl+click on a value to modify it.');
|
||||
} else {
|
||||
$result = true;
|
||||
$affected = 0;
|
||||
@@ -129,11 +159,15 @@ if ($_POST && !$error) {
|
||||
$set = array();
|
||||
foreach ($row as $key => $val) {
|
||||
$key = bracket_escape($key, 1); // 1 - back
|
||||
$set[] = idf_escape($key) . " = " . (ereg('char|text', $fields[$key]["type"]) || $val != "" ? $adminer->processInput($fields[$key], $val) : "NULL");
|
||||
$set[idf_escape($key)] = (preg_match('~char|text~', $fields[$key]["type"]) || $val != "" ? $adminer->processInput($fields[$key], $val) : "NULL");
|
||||
}
|
||||
$query = table($TABLE) . " SET " . implode(", ", $set);
|
||||
$where2 = " WHERE " . where_check($unique_idf) . ($where ? " AND " . implode(" AND ", $where) : "");
|
||||
$result = queries("UPDATE" . (count($group) < count($select) ? " $query$where2" : limit1($query, $where2))); // can change row on a different page without unique key
|
||||
$result = $driver->update(
|
||||
$TABLE,
|
||||
$set,
|
||||
" WHERE " . ($where ? implode(" AND ", $where) . " AND " : "") . where_check($unique_idf, $fields),
|
||||
!($is_group || $unselected === array()),
|
||||
" "
|
||||
);
|
||||
if (!$result) {
|
||||
break;
|
||||
}
|
||||
@@ -141,17 +175,22 @@ if ($_POST && !$error) {
|
||||
}
|
||||
queries_redirect(remove_from_uri(), lang('%d item(s) have been affected.', $affected), $result);
|
||||
}
|
||||
} elseif (is_string($file = get_file("csv_file", true))) {
|
||||
//! character set
|
||||
|
||||
} elseif (!is_string($file = get_file("csv_file", true))) {
|
||||
$error = upload_error($file);
|
||||
} elseif (!preg_match('~~u', $file)) {
|
||||
$error = lang('File must be in UTF-8 encoding.');
|
||||
} else {
|
||||
cookie("adminer_import", "output=" . urlencode($adminer_import["output"]) . "&format=" . urlencode($_POST["separator"]));
|
||||
$result = true;
|
||||
$cols = array_keys($fields);
|
||||
preg_match_all('~(?>"[^"]*"|[^"\\r\\n]+)+~', $file, $matches);
|
||||
$affected = count($matches[0]);
|
||||
begin();
|
||||
$driver->begin();
|
||||
$separator = ($_POST["separator"] == "csv" ? "," : ($_POST["separator"] == "tsv" ? "\t" : ";"));
|
||||
$rows = array();
|
||||
foreach ($matches[0] as $key => $val) {
|
||||
preg_match_all("~((\"[^\"]*\")+|[^$separator]*)$separator~", $val . $separator, $matches2);
|
||||
preg_match_all("~((?>\"[^\"]*\")+|[^$separator]*)$separator~", $val . $separator, $matches2);
|
||||
if (!$key && !array_diff($matches2[1], $cols)) { //! doesn't work with column names containing ",\n
|
||||
// first row corresponds to column names - use it for table structure
|
||||
$cols = $matches2[1];
|
||||
@@ -161,33 +200,34 @@ if ($_POST && !$error) {
|
||||
foreach ($matches2[1] as $i => $col) {
|
||||
$set[idf_escape($cols[$i])] = ($col == "" && $fields[$cols[$i]]["null"] ? "NULL" : q(str_replace('""', '"', preg_replace('~^"|"$~', '', $col))));
|
||||
}
|
||||
$result = insert_update($TABLE, $set, $primary);
|
||||
if (!$result) {
|
||||
break;
|
||||
}
|
||||
$rows[] = $set;
|
||||
}
|
||||
}
|
||||
$result = (!$rows || $driver->insertUpdate($TABLE, $rows, $primary));
|
||||
if ($result) {
|
||||
queries("COMMIT");
|
||||
$driver->commit();
|
||||
}
|
||||
queries_redirect(remove_from_uri("page"), lang('%d row(s) have been imported.', $affected), $result);
|
||||
queries("ROLLBACK"); // after queries_redirect() to not overwrite error
|
||||
} else {
|
||||
$error = upload_error($file);
|
||||
$driver->rollback(); // after queries_redirect() to not overwrite error
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$table_name = $adminer->tableName($table_status);
|
||||
page_header(lang('Select') . ": $table_name", $error);
|
||||
session_write_close();
|
||||
if (is_ajax()) {
|
||||
page_headers();
|
||||
ob_start();
|
||||
} else {
|
||||
page_header(lang('Select') . ": $table_name", $error);
|
||||
}
|
||||
|
||||
$set = null;
|
||||
if (isset($rights["insert"])) {
|
||||
if (isset($rights["insert"]) || !support("table")) {
|
||||
$set = "";
|
||||
foreach ((array) $_GET["where"] as $val) {
|
||||
if (count($foreign_keys[$val["col"]]) == 1 && ($val["op"] == "="
|
||||
|| (!$val["op"] && !ereg('[_%]', $val["val"])) // LIKE in Editor
|
||||
|| (!$val["op"] && !preg_match('~[_%]~', $val["val"])) // LIKE in Editor
|
||||
)) {
|
||||
$set .= "&set" . urlencode("[" . bracket_escape($val["col"]) . "]") . "=" . urlencode($val["val"]);
|
||||
}
|
||||
@@ -195,7 +235,7 @@ if (isset($rights["insert"])) {
|
||||
}
|
||||
$adminer->selectLinks($table_status, $set);
|
||||
|
||||
if (!$columns) {
|
||||
if (!$columns && support("table")) {
|
||||
echo "<p class='error'>" . lang('Unable to select the table') . ($fields ? "." : ": " . error()) . "\n";
|
||||
} else {
|
||||
echo "<form action='' id='form'>\n";
|
||||
@@ -209,23 +249,32 @@ if (!$columns) {
|
||||
$adminer->selectOrderPrint($order, $columns, $indexes);
|
||||
$adminer->selectLimitPrint($limit);
|
||||
$adminer->selectLengthPrint($text_length);
|
||||
$adminer->selectActionPrint();
|
||||
$adminer->selectActionPrint($indexes);
|
||||
echo "</form>\n";
|
||||
|
||||
|
||||
$page = $_GET["page"];
|
||||
if ($page == "last") {
|
||||
$found_rows = $connection->result("SELECT COUNT(*) FROM " . table($TABLE) . ($where ? " WHERE " . implode(" AND ", $where) : ""));
|
||||
$found_rows = $connection->result(count_rows($TABLE, $where, $is_group, $group));
|
||||
$page = floor(max(0, $found_rows - 1) / $limit);
|
||||
}
|
||||
|
||||
$query = "SELECT" . limit((+$limit && $group && count($group) < count($select) && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . $from, ($where ? "\nWHERE " . implode(" AND ", $where) : "") . $group_by, ($limit != "" ? +$limit : null), ($page ? $limit * $page : 0), "\n");
|
||||
echo $adminer->selectQuery($query);
|
||||
|
||||
$result = $connection->query($query);
|
||||
$select2 = $select;
|
||||
if (!$select2) {
|
||||
$select2[] = "*";
|
||||
if ($oid) {
|
||||
$select2[] = $oid;
|
||||
}
|
||||
}
|
||||
$convert_fields = convert_fields($columns, $fields, $select);
|
||||
if ($convert_fields) {
|
||||
$select2[] = substr($convert_fields, 2);
|
||||
}
|
||||
$result = $driver->select($TABLE, $select2, $where, $group, $order, $limit, $page, true);
|
||||
|
||||
if (!$result) {
|
||||
echo "<p class='error'>" . error() . "\n";
|
||||
} else {
|
||||
if ($jush == "mssql") {
|
||||
if ($jush == "mssql" && $page) {
|
||||
$result->seek($limit * $page);
|
||||
}
|
||||
$email_fields = array();
|
||||
@@ -237,42 +286,49 @@ if (!$columns) {
|
||||
}
|
||||
$rows[] = $row;
|
||||
}
|
||||
|
||||
// use count($rows) without LIMIT, COUNT(*) without grouping, FOUND_ROWS otherwise (slowest)
|
||||
if ($_GET["page"] != "last") {
|
||||
$found_rows = (+$limit && $group && count($group) < count($select)
|
||||
? ($jush == "sql" ? $connection->result(" SELECT FOUND_ROWS()") : $connection->result("SELECT COUNT(*) FROM ($query) x")) // space to allow mysql.trace_mode
|
||||
: count($rows)
|
||||
);
|
||||
if ($_GET["page"] != "last" && +$limit && $group && $is_group && $jush == "sql") {
|
||||
$found_rows = $connection->result(" SELECT FOUND_ROWS()"); // space to allow mysql.trace_mode
|
||||
}
|
||||
|
||||
|
||||
if (!$rows) {
|
||||
echo "<p class='message'>" . lang('No rows.') . "\n";
|
||||
} else {
|
||||
$backward_keys = $adminer->backwardKeys($TABLE, $table_name);
|
||||
|
||||
echo "<table cellspacing='0' class='nowrap' onclick='tableClick(event);' onkeydown='return editingKeydown(event);'>\n";
|
||||
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('edit') . "</a>");
|
||||
|
||||
echo "<table id='table' cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);' onkeydown='return editingKeydown(event);'>\n";
|
||||
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>");
|
||||
$names = array();
|
||||
$functions = array();
|
||||
reset($select);
|
||||
$rank = 1;
|
||||
foreach ($rows[0] as $key => $val) {
|
||||
if ($table_status["Oid"] != "t" || $key != "oid") {
|
||||
if ($key != $oid) {
|
||||
$val = $_GET["columns"][key($select)];
|
||||
$field = $fields[$select ? ($val ? $val["col"] : current($select)) : $key];
|
||||
$name = ($field ? $adminer->fieldName($field, $rank) : "*");
|
||||
$name = ($field ? $adminer->fieldName($field, $rank) : ($val["fun"] ? "*" : $key));
|
||||
if ($name != "") {
|
||||
$rank++;
|
||||
$names[$key] = $name;
|
||||
$column = idf_escape($key);
|
||||
echo '<th><a href="' . h(remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key)
|
||||
. ($order[0] == $column || $order[0] == $key || (!$order && count($group) < count($select) && $group[0] == $column) ? '&desc%5B0%5D=1' : '') // $order[0] == $key - COUNT(*)
|
||||
) . '">' . (!$select || $val ? apply_sql_function($val["fun"], $name) : h(current($select))) . "</a>"; //! columns looking like functions
|
||||
$href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
|
||||
$desc = "&desc%5B0%5D=1";
|
||||
echo '<th onmouseover="columnMouse(this);" onmouseout="columnMouse(this, \' hidden\');">';
|
||||
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 "<span class='column hidden'>";
|
||||
echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";
|
||||
if (!$val["fun"]) {
|
||||
echo '<a href="#fieldset-search" onclick="selectSearch(\'' . h(js_escape($key)) . '\'); return false;" title="' . lang('Search') . '" class="text jsonly"> =</a>';
|
||||
}
|
||||
echo "</span>";
|
||||
}
|
||||
$functions[$key] = $val["fun"];
|
||||
next($select);
|
||||
}
|
||||
}
|
||||
|
||||
$lengths = array();
|
||||
if ($_GET["modify"]) {
|
||||
foreach ($rows as $row) {
|
||||
@@ -281,149 +337,204 @@ if (!$columns) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo ($backward_keys ? "<th>" . lang('Relations') : "") . "</thead>\n";
|
||||
|
||||
if (is_ajax()) {
|
||||
if ($limit % 2 == 1 && $page % 2 == 1) {
|
||||
odd();
|
||||
}
|
||||
ob_end_clean();
|
||||
}
|
||||
|
||||
foreach ($adminer->rowDescriptions($rows, $foreign_keys) as $n => $row) {
|
||||
$unique_array = unique_array($rows[$n], $indexes);
|
||||
if (!$unique_array) {
|
||||
$unique_array = array();
|
||||
foreach ($rows[$n] as $key => $val) {
|
||||
if (!preg_match('~^(COUNT\\((\\*|(DISTINCT )?`(?:[^`]|``)+`)\\)|(AVG|GROUP_CONCAT|MAX|MIN|SUM)\\(`(?:[^`]|``)+`\\))$~', $key)) { //! columns looking like functions
|
||||
$unique_array[$key] = $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
$unique_idf = "";
|
||||
foreach ($unique_array as $key => $val) {
|
||||
$unique_idf .= "&" . (isset($val) ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key));
|
||||
if (($jush == "sql" || $jush == "pgsql") && strlen($val) > 64) {
|
||||
$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) . ")") . ")";
|
||||
$val = md5($val);
|
||||
}
|
||||
$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');") . (count($group) < count($select) || 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"]), "", "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>"));
|
||||
|
||||
foreach ($row as $key => $val) {
|
||||
if (isset($names[$key])) {
|
||||
$field = $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
|
||||
}
|
||||
|
||||
$link = "";
|
||||
$val = $adminer->editVal($val, $field);
|
||||
if (!isset($val)) {
|
||||
$val = "<i>NULL</i>";
|
||||
} else {
|
||||
if (ereg('blob|bytea|raw|file', $field["type"]) && $val != "") {
|
||||
$link = h(ME . 'download=' . urlencode($TABLE) . '&field=' . urlencode($key) . $unique_idf);
|
||||
}
|
||||
if ($val === "") { // === - may be int
|
||||
$val = " ";
|
||||
} elseif ($text_length != "" && ereg('text|blob', $field["type"]) && is_utf8($val)) {
|
||||
$val = shorten_utf8($val, max(0, +$text_length)); // usage of LEFT() would reduce traffic but complicate query - expected average speedup: .001 s VS .01 s on local network
|
||||
} else {
|
||||
$val = h($val);
|
||||
}
|
||||
|
||||
if (!$link) { // link related items
|
||||
foreach ((array) $foreign_keys[$key] as $foreign_key) {
|
||||
if (count($foreign_keys[$key]) == 1 || end($foreign_key["source"]) == $key) {
|
||||
$link = "";
|
||||
foreach ($foreign_key["source"] as $i => $source) {
|
||||
$link .= where_link($i, $foreign_key["target"][$i], $rows[$n][$source]);
|
||||
}
|
||||
$link = h(($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 (count($foreign_key["source"]) == 1) {
|
||||
break;
|
||||
}
|
||||
if (preg_match('~blob|bytea|raw|file~', $field["type"]) && $val != "") {
|
||||
$link = ME . 'download=' . urlencode($TABLE) . '&field=' . urlencode($key) . $unique_idf;
|
||||
}
|
||||
if (!$link && $val !== null) { // link related items
|
||||
foreach ((array) $foreign_keys[$key] as $foreign_key) {
|
||||
if (count($foreign_keys[$key]) == 1 || end($foreign_key["source"]) == $key) {
|
||||
$link = "";
|
||||
foreach ($foreign_key["source"] as $i => $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
|
||||
if (count($foreign_key["source"]) == 1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($key == "COUNT(*)") { //! columns looking like functions
|
||||
$link = h(ME . "select=" . urlencode($TABLE));
|
||||
$i = 0;
|
||||
foreach ((array) $_GET["where"] as $v) {
|
||||
if (!array_key_exists($v["col"], $unique_array)) {
|
||||
$link .= h(where_link($i++, $v["col"], $v["val"], $v["op"]));
|
||||
}
|
||||
}
|
||||
foreach ($unique_array as $k => $v) {
|
||||
$link .= h(where_link($i++, $k, $v));
|
||||
}
|
||||
if ($key == "COUNT(*)") { //! columns looking like functions
|
||||
$link = ME . "select=" . urlencode($TABLE);
|
||||
$i = 0;
|
||||
foreach ((array) $_GET["where"] as $v) {
|
||||
if (!array_key_exists($v["col"], $unique_array)) {
|
||||
$link .= where_link($i++, $v["col"], $v["val"], $v["op"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$link) {
|
||||
if (is_mail($val)) {
|
||||
$link = "mailto:$val";
|
||||
}
|
||||
if ($protocol = is_url($row[$key])) {
|
||||
$link = ($protocol == "http" && $HTTPS
|
||||
? $row[$key] // HTTP links from HTTPS pages don't receive Referer automatically
|
||||
: "$protocol://www.adminer.org/redirect/?url=" . urlencode($row[$key]) // intermediate page to hide Referer, may be changed to rel="noreferrer" in HTML5
|
||||
);
|
||||
foreach ($unique_array as $k => $v) {
|
||||
$link .= where_link($i++, $k, $v);
|
||||
}
|
||||
}
|
||||
|
||||
$val = select_value($val, $link, $field, $text_length);
|
||||
$id = h("val[$unique_idf][" . bracket_escape($key) . "]");
|
||||
$value = $_POST["val"][$unique_idf][bracket_escape($key)];
|
||||
$h_value = h(isset($value) ? $value : $row[$key]);
|
||||
$long = strpos($val, "<i>...</i>");
|
||||
$editable = is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key];
|
||||
$text = ereg('text|lob', $field["type"]);
|
||||
echo (($_GET["modify"] && $editable) || isset($value)
|
||||
? "<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]'>")
|
||||
: "<td id='$id' ondblclick=\"" . ($editable ? "selectDblClick(this, event" . ($long ? ", 2" : ($text ? ", 1" : "")) . ")" : "alert('" . h(lang('Use edit link to modify this value.')) . "')") . ";\">" . $adminer->selectVal($val, $link, $field)
|
||||
);
|
||||
$editable = !is_array($row[$key]) && is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key];
|
||||
$text = preg_match('~text|lob~', $field["type"]);
|
||||
if (($_GET["modify"] && $editable) || $value !== null) {
|
||||
$h_value = h($value !== null ? $value : $row[$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 {
|
||||
$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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($backward_keys) {
|
||||
echo "<td>";
|
||||
}
|
||||
$adminer->backwardKeysPrint($backward_keys, $rows[$n]);
|
||||
echo "</tr>\n"; // close to allow white-space: pre
|
||||
}
|
||||
|
||||
if (is_ajax()) {
|
||||
exit;
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
|
||||
if ($rows || $page) {
|
||||
|
||||
if (($rows || $page) && !is_ajax()) {
|
||||
$exact_count = true;
|
||||
if ($_GET["page"] != "last" && +$limit && count($group) >= count($select) && ($found_rows >= $limit || $page)) {
|
||||
$found_rows = found_rows($table_status, $where);
|
||||
if ($found_rows < max(1e4, 2 * ($page + 1) * $limit)) {
|
||||
// slow with big tables
|
||||
ob_flush(); //! doesn't work with AJAX
|
||||
flush();
|
||||
$found_rows = $connection->result("SELECT COUNT(*) FROM " . table($TABLE) . ($where ? " WHERE " . implode(" AND ", $where) : ""));
|
||||
} else {
|
||||
$exact_count = false;
|
||||
if ($_GET["page"] != "last") {
|
||||
if (!+$limit) {
|
||||
$found_rows = count($rows);
|
||||
} elseif ($jush != "sql" || !$is_group) {
|
||||
$found_rows = ($is_group ? false : found_rows($table_status, $where));
|
||||
if ($found_rows < max(1e4, 2 * ($page + 1) * $limit)) {
|
||||
// slow with big tables
|
||||
$found_rows = reset(slow_query(count_rows($TABLE, $where, $is_group, $group)));
|
||||
} else {
|
||||
$exact_count = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "<p class='pages'>";
|
||||
if (+$limit && $found_rows > $limit) {
|
||||
|
||||
if (+$limit && ($found_rows === false || $found_rows > $limit || $page)) {
|
||||
echo "<p class='pages'>";
|
||||
// display first, previous 4, next 4 and last page
|
||||
$max_page = floor(($found_rows - 1) / $limit);
|
||||
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);
|
||||
$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
|
||||
? ' <a href="' . h(remove_from_uri("page") . "&page=" . ($page + 1)) . '" onclick="return !selectLoadMore(this, ' . (+$limit) . ', \'' . lang('Loading') . '...\');" class="loadmore">' . lang('Load more data') . '</a>'
|
||||
: ''
|
||||
);
|
||||
} else {
|
||||
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 ($page + 5 < $max_page ? " ..." : "") . ($exact_count ? pagination($max_page, $page) : ' <a href="' . h(remove_from_uri() . "&page=last") . '">' . lang('last') . "</a>");
|
||||
}
|
||||
echo " (" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ") " . checkbox("all", 1, 0, lang('whole result')) . "\n";
|
||||
|
||||
|
||||
echo "<p class='count'>\n";
|
||||
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><legend><?php echo lang('Edit'); ?></legend><div>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>" title="<?php echo lang('Double click on a value to modify it.'); ?>" class="jsonly">
|
||||
<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.') . '"'); ?>>
|
||||
</div></fieldset>
|
||||
<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="clone" value="<?php echo lang('Clone'); ?>">
|
||||
<input type="submit" name="delete" value="<?php echo lang('Delete'); ?>" onclick="return confirm('<?php echo lang('Are you sure?'); ?> (' + (this.form['all'].checked ? <?php echo $found_rows; ?> : formChecked(this, /check/)) + ')');">
|
||||
<input type="submit" name="delete" value="<?php echo lang('Delete'); ?>"<?php echo confirm(); ?>>
|
||||
</div></fieldset>
|
||||
<?php
|
||||
}
|
||||
print_fieldset("export", lang('Export'));
|
||||
$output = $adminer->dumpOutput();
|
||||
echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : "");
|
||||
echo html_select("format", $adminer->dumpFormat(), $adminer_import["format"]);
|
||||
echo " <input type='submit' name='export' value='" . lang('Export') . "' onclick='eventStop(event);'>\n";
|
||||
echo "</div></fieldset>\n";
|
||||
|
||||
$format = $adminer->dumpFormat();
|
||||
foreach ((array) $_GET["columns"] as $column) {
|
||||
if ($column["fun"]) {
|
||||
unset($format['sql']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
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";
|
||||
}
|
||||
|
||||
echo (!$group && $select ? "" : "<script type='text/javascript'>tableCheck();</script>\n");
|
||||
}
|
||||
|
||||
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 "<input type='hidden' name='token' value='$token'>\n";
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
||||
if (is_ajax()) {
|
||||
ob_end_clean();
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<?php
|
||||
$SEQUENCE = $_GET["sequence"];
|
||||
$row = $_POST;
|
||||
|
||||
if ($_POST && !$error) {
|
||||
$link = substr(ME, 0, -1);
|
||||
$name = trim($row["name"]);
|
||||
if ($_POST["drop"]) {
|
||||
query_redirect("DROP SEQUENCE " . idf_escape($SEQUENCE), $link, lang('Sequence has been dropped.'));
|
||||
} elseif ($SEQUENCE == "") {
|
||||
query_redirect("CREATE SEQUENCE " . idf_escape($_POST["name"]), $link, lang('Sequence has been created.'));
|
||||
} elseif ($SEQUENCE != $_POST["name"]) {
|
||||
query_redirect("ALTER SEQUENCE " . idf_escape($SEQUENCE) . " RENAME TO " . idf_escape($_POST["name"]), $link, lang('Sequence has been altered.'));
|
||||
query_redirect("CREATE SEQUENCE " . idf_escape($name), $link, lang('Sequence has been created.'));
|
||||
} elseif ($SEQUENCE != $name) {
|
||||
query_redirect("ALTER SEQUENCE " . idf_escape($SEQUENCE) . " RENAME TO " . idf_escape($name), $link, lang('Sequence has been altered.'));
|
||||
} else {
|
||||
redirect($link);
|
||||
}
|
||||
@@ -16,14 +18,13 @@ if ($_POST && !$error) {
|
||||
|
||||
page_header($SEQUENCE != "" ? lang('Alter sequence') . ": " . h($SEQUENCE) : lang('Create sequence'), $error);
|
||||
|
||||
$row = array("name" => $SEQUENCE);
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
if (!$row) {
|
||||
$row["name"] = $SEQUENCE;
|
||||
}
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<p><input name="name" value="<?php echo h($row["name"]); ?>">
|
||||
<p><input name="name" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<?php
|
||||
if ($SEQUENCE != "") {
|
||||
|
||||
@@ -14,34 +14,38 @@ if (!$error && $_POST["clear"]) {
|
||||
redirect(remove_from_uri("history"));
|
||||
}
|
||||
|
||||
page_header(lang('SQL command'), $error);
|
||||
page_header((isset($_GET["import"]) ? lang('Import') : lang('SQL command')), $error);
|
||||
|
||||
if (!$error && $_POST) {
|
||||
$fp = false;
|
||||
$query = $_POST["query"];
|
||||
if ($_POST["webfile"]) {
|
||||
$fp = @fopen((file_exists("adminer.sql") ? "adminer.sql"
|
||||
: (file_exists("adminer.sql.gz") ? "compress.zlib://adminer.sql.gz"
|
||||
: "compress.bzip2://adminer.sql.bz2"
|
||||
)), "rb");
|
||||
if (!isset($_GET["import"])) {
|
||||
$query = $_POST["query"];
|
||||
} elseif ($_POST["webfile"]) {
|
||||
$fp = @fopen((file_exists("adminer.sql")
|
||||
? "adminer.sql"
|
||||
: "compress.zlib://adminer.sql.gz"
|
||||
), "rb");
|
||||
$query = ($fp ? fread($fp, 1e6) : false);
|
||||
} elseif ($_FILES && $_FILES["sql_file"]["error"] != 4) { // 4 - UPLOAD_ERR_NO_FILE
|
||||
} else {
|
||||
$query = get_file("sql_file", true);
|
||||
}
|
||||
|
||||
if (is_string($query)) { // get_file() returns error as number, fread() as false
|
||||
if (function_exists('memory_get_usage')) {
|
||||
@ini_set("memory_limit", max(ini_get("memory_limit"), 2 * strlen($query) + memory_get_usage() + 8e6)); // @ - may be disabled, 2 - substr and trim, 8e6 - other variables
|
||||
@ini_set("memory_limit", max(ini_bytes("memory_limit"), 2 * strlen($query) + memory_get_usage() + 8e6)); // @ - may be disabled, 2 - substr and trim, 8e6 - other variables
|
||||
}
|
||||
|
||||
if ($query != "" && strlen($query) < 1e6) { // don't add big queries
|
||||
$q = $query . (ereg(';$', $query) ? "" : ";"); //! doesn't work with DELIMITER |
|
||||
if (!$history || end($history) != $q) { // no repeated queries
|
||||
$history[] = $q;
|
||||
$q = $query . (preg_match("~;[ \t\r\n]*\$~", $query) ? "" : ";"); //! doesn't work with DELIMITER |
|
||||
if (!$history || reset(end($history)) != $q) { // no repeated queries
|
||||
restart_session();
|
||||
$history[] = array($q, time()); //! add elapsed time
|
||||
set_session("queries", $history_all); // required because reference is unlinked by stop_session()
|
||||
stop_session();
|
||||
}
|
||||
}
|
||||
$space = "(?:\\s|/\\*.*\\*/|(?:#|-- )[^\n]*\n|--\n)";
|
||||
if (!ini_bool("session.use_cookies")) {
|
||||
session_write_close();
|
||||
}
|
||||
|
||||
$space = "(?:\\s|/\\*.*\\*/|(?:#|-- )[^\n]*\n|--\r?\n)";
|
||||
$delimiter = ";";
|
||||
$offset = 0;
|
||||
$empty = true;
|
||||
@@ -51,39 +55,44 @@ if (!$error && $_POST) {
|
||||
}
|
||||
$commands = 0;
|
||||
$errors = array();
|
||||
$line = 0;
|
||||
$parse = '[\'"' . ($jush == "sql" ? '`#' : ($jush == "sqlite" ? '`[' : ($jush == "mssql" ? '[' : ''))) . ']|/\\*|-- |$' . ($jush == "pgsql" ? '|\\$[^$]*\\$' : '');
|
||||
$total_start = microtime();
|
||||
$total_start = microtime(true);
|
||||
parse_str($_COOKIE["adminer_export"], $adminer_export);
|
||||
$dump_format = $adminer->dumpFormat();
|
||||
unset($dump_format["sql"]);
|
||||
|
||||
while ($query != "") {
|
||||
if (!$offset && $jush == "sql" && preg_match("~^$space*DELIMITER\\s+(.+)~i", $query, $match)) {
|
||||
if (!$offset && preg_match("~^$space*DELIMITER\\s+(\\S+)~i", $query, $match)) {
|
||||
$delimiter = $match[1];
|
||||
$query = substr($query, strlen($match[0]));
|
||||
} else {
|
||||
preg_match('(' . preg_quote($delimiter) . "|$parse)", $query, $match, PREG_OFFSET_CAPTURE, $offset); // should always match
|
||||
$found = $match[0][0];
|
||||
preg_match('(' . preg_quote($delimiter) . "\\s*|$parse)", $query, $match, PREG_OFFSET_CAPTURE, $offset); // should always match
|
||||
list($found, $pos) = $match[0];
|
||||
if (!$found && $fp && !feof($fp)) {
|
||||
$query .= fread($fp, 1e5);
|
||||
} else {
|
||||
$offset = $match[0][1] + strlen($found);
|
||||
if (!$found && rtrim($query) == "") {
|
||||
break;
|
||||
}
|
||||
if ($found && $found != $delimiter) { // find matching quote or comment end
|
||||
while (preg_match('(' . ($found == '/*' ? '\\*/' : ($found == '[' ? ']' : (ereg('^-- |^#', $found) ? "\n" : preg_quote($found) . "|\\\\."))) . '|$)s', $query, $match, PREG_OFFSET_CAPTURE, $offset)) { //! respect sql_mode NO_BACKSLASH_ESCAPES
|
||||
$offset = $pos + strlen($found);
|
||||
|
||||
if ($found && rtrim($found) != $delimiter) { // find matching quote or comment end
|
||||
while (preg_match('(' . ($found == '/*' ? '\\*/' : ($found == '[' ? ']' : (preg_match('~^-- |^#~', $found) ? "\n" : preg_quote($found) . "|\\\\."))) . '|$)s', $query, $match, PREG_OFFSET_CAPTURE, $offset)) { //! respect sql_mode NO_BACKSLASH_ESCAPES
|
||||
$s = $match[0][0];
|
||||
$offset = $match[0][1] + strlen($s);
|
||||
if (!$s && $fp && !feof($fp)) {
|
||||
$offset -= strlen($found); // strlen($found) >= strlen("\\.") - 1
|
||||
$query .= fread($fp, 1e5);
|
||||
} elseif ($s[0] != "\\") {
|
||||
break;
|
||||
} else {
|
||||
$offset = $match[0][1] + strlen($s);
|
||||
if ($s[0] != "\\") {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else { // end of a query
|
||||
$empty = false;
|
||||
$q = substr($query, 0, $match[0][1]);
|
||||
$q = substr($query, 0, $pos);
|
||||
$commands++;
|
||||
$print = "<pre id='sql-$commands'><code class='jush-$jush'>" . shorten_utf8(trim($q), 1000) . "</code></pre>\n";
|
||||
if (!$_POST["only_errors"]) {
|
||||
@@ -91,71 +100,86 @@ if (!$error && $_POST) {
|
||||
ob_flush();
|
||||
flush(); // can take a long time - show the running query
|
||||
}
|
||||
$start = microtime(); // microtime(true) is available since PHP 5
|
||||
$start = microtime(true);
|
||||
//! 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)) {
|
||||
$connection2->query($q);
|
||||
}
|
||||
|
||||
do {
|
||||
$result = $connection->store_result();
|
||||
$end = microtime();
|
||||
$time = format_time($start, $end) . (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
|
||||
$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
|
||||
;
|
||||
|
||||
if ($connection->error) {
|
||||
echo ($_POST["only_errors"] ? $print : "");
|
||||
echo "<p class='error'>" . lang('Error in query') . ": " . error() . "\n";
|
||||
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)) {
|
||||
select($result, $connection2);
|
||||
$limit = $_POST["limit"];
|
||||
$orgtables = select($result, $connection2, array(), $limit);
|
||||
if (!$_POST["only_errors"]) {
|
||||
echo "<form action='' method='post'>\n";
|
||||
echo "<p>" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) : "") . $time;
|
||||
$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') . "' onclick='eventStop(event);'><input type='hidden' name='token' value='$token'></span>\n"
|
||||
. " <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, ($jush == "sql" ? "http://dev.mysql.com/doc/refman/" . substr($connection->server_info, 0, 3) . "/en/explain-output.html#explain_" : ""));
|
||||
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
|
||||
session_write_close();
|
||||
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 = $end;
|
||||
|
||||
$start = microtime(true);
|
||||
} while ($connection->next_result());
|
||||
|
||||
$line += substr_count($q.$found, "\n");
|
||||
$query = substr($query, $offset);
|
||||
$offset = 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($empty) {
|
||||
echo "<p class='message'>" . lang('No commands to execute.') . "\n";
|
||||
} elseif ($_POST["only_errors"]) {
|
||||
echo "<p class='message'>" . lang('%d query(s) executed OK.', $commands - count($errors)) . format_time($total_start, microtime()) . "\n";
|
||||
echo "<p class='message'>" . lang('%d query(s) executed OK.', $commands - count($errors));
|
||||
echo " <span class='time'>(" . format_time($total_start) . ")</span>\n";
|
||||
} elseif ($errors && $commands > 1) {
|
||||
echo "<p class='error'>" . lang('Error in query') . ": " . implode("", $errors) . "\n";
|
||||
}
|
||||
//! MS SQL - SET SHOWPLAN_ALL OFF
|
||||
|
||||
} else {
|
||||
echo "<p class='error'>" . upload_error($query) . "\n";
|
||||
}
|
||||
@@ -163,51 +187,56 @@ if (!$error && $_POST) {
|
||||
?>
|
||||
|
||||
<form action="" method="post" enctype="multipart/form-data" id="form">
|
||||
<p><?php
|
||||
$q = $_GET["sql"]; // overwrite $q from if ($_POST) to save memory
|
||||
if ($_POST) {
|
||||
$q = $_POST["query"];
|
||||
} elseif ($_GET["history"] == "all") {
|
||||
$q = $history;
|
||||
} elseif ($_GET["history"] != "") {
|
||||
$q = $history[$_GET["history"]];
|
||||
}
|
||||
textarea("query", $q, 20);
|
||||
echo ($_POST ? "" : "<script type='text/javascript'>document.getElementsByTagName('textarea')[0].focus();</script>\n");
|
||||
echo "<p>" . (ini_bool("file_uploads")
|
||||
? lang('File upload') . ': <input type="file" name="sql_file"' . ($_FILES && $_FILES["sql_file"]["error"] != 4 ? '' : ' onchange="this.form[\'only_errors\'].checked = true;"') . '> (< ' . ini_get("upload_max_filesize") . 'B)' // ignore post_max_size because it is for all form fields together and bytes computing would be necessary
|
||||
: lang('File uploads are disabled.')
|
||||
);
|
||||
|
||||
?>
|
||||
<p>
|
||||
<input type="submit" value="<?php echo lang('Execute'); ?>" title="Ctrl+Enter">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
<?php
|
||||
echo checkbox("error_stops", 1, $_POST["error_stops"], lang('Stop on error')) . "\n";
|
||||
echo checkbox("only_errors", 1, $_POST["only_errors"], lang('Show only errors')) . "\n";
|
||||
|
||||
print_fieldset("webfile", lang('From server'), $_POST["webfile"], "document.getElementById('form')['only_errors'].checked = true; ");
|
||||
$compress = array();
|
||||
foreach (array("gz" => "zlib", "bz2" => "bz2") as $key => $val) {
|
||||
if (extension_loaded($val)) {
|
||||
$compress[] = ".$key";
|
||||
$execute = "<input type='submit' value='" . lang('Execute') . "' title='Ctrl+Enter'>";
|
||||
if (!isset($_GET["import"])) {
|
||||
$q = $_GET["sql"]; // overwrite $q from if ($_POST) to save memory
|
||||
if ($_POST) {
|
||||
$q = $_POST["query"];
|
||||
} elseif ($_GET["history"] == "all") {
|
||||
$q = $history;
|
||||
} elseif ($_GET["history"] != "") {
|
||||
$q = $history[$_GET["history"]][0];
|
||||
}
|
||||
echo "<p>";
|
||||
textarea("query", $q, 20);
|
||||
echo ($_POST ? "" : "<script type='text/javascript'>focus(document.getElementsByTagName('textarea')[0]);</script>\n");
|
||||
echo "<p>$execute\n";
|
||||
echo lang('Limit rows') . ": <input type='number' name='limit' class='size' value='" . h($_POST ? $_POST["limit"] : $_GET["limit"]) . "'>\n";
|
||||
|
||||
} else {
|
||||
echo "<fieldset><legend>" . lang('File upload') . "</legend><div>";
|
||||
echo (ini_bool("file_uploads")
|
||||
? "SQL (< " . ini_get("upload_max_filesize") . "B): <input type='file' name='sql_file[]' multiple>\n$execute" // ignore post_max_size because it is for all form fields together and bytes computing would be necessary
|
||||
: lang('File uploads are disabled.')
|
||||
);
|
||||
echo "</div></fieldset>\n";
|
||||
echo "<fieldset><legend>" . lang('From server') . "</legend><div>";
|
||||
echo lang('Webserver file %s', "<code>adminer.sql" . (extension_loaded("zlib") ? "[.gz]" : "") . "</code>");
|
||||
echo ' <input type="submit" name="webfile" value="' . lang('Run file') . '">';
|
||||
echo "</div></fieldset>\n";
|
||||
echo "<p>";
|
||||
}
|
||||
echo lang('Webserver file %s', "<code>adminer.sql" . ($compress ? "[" . implode("|", $compress) . "]" : "") . "</code>");
|
||||
echo ' <input type="submit" name="webfile" value="' . lang('Run file') . '">';
|
||||
echo "</div></fieldset>\n";
|
||||
|
||||
if ($history) {
|
||||
echo checkbox("error_stops", 1, ($_POST ? $_POST["error_stops"] : isset($_GET["import"])), lang('Stop on error')) . "\n";
|
||||
echo checkbox("only_errors", 1, ($_POST ? $_POST["only_errors"] : isset($_GET["import"])), lang('Show only errors')) . "\n";
|
||||
echo "<input type='hidden' name='token' value='$token'>\n";
|
||||
|
||||
if (!isset($_GET["import"]) && $history) {
|
||||
print_fieldset("history", lang('History'), $_GET["history"] != "");
|
||||
foreach ($history as $key => $val) {
|
||||
//! save and display timestamp
|
||||
echo '<a href="' . h(ME . "sql=&history=$key") . '">' . lang('Edit') . "</a> <code class='jush-$jush'>" . shorten_utf8(ltrim(str_replace("\n", " ", str_replace("\r", "", preg_replace('~^(#|-- ).*~m', '', $val)))), 80, "</code>") . "<br>\n";
|
||||
for ($val = end($history); $val; $val = prev($history)) { // not array_reverse() to save memory
|
||||
$key = key($history);
|
||||
list($q, $time, $elapsed) = $val;
|
||||
echo '<a href="' . h(ME . "sql=&history=$key") . '">' . lang('Edit') . "</a>"
|
||||
. " <span class='time' title='" . @date('Y-m-d', $time) . "'>" . @date("H:i:s", $time) . "</span>" // @ - time zone may be not set
|
||||
. " <code class='jush-$jush'>" . shorten_utf8(ltrim(str_replace("\n", " ", str_replace("\r", "", preg_replace('~^(#|-- ).*~m', '', $q)))), 80, "</code>")
|
||||
. ($elapsed ? " <span class='time'>($elapsed)</span>" : "")
|
||||
. "<br>\n"
|
||||
;
|
||||
}
|
||||
echo "<input type='submit' name='clear' value='" . lang('Clear') . "'>\n";
|
||||
echo "<a href='" . h(ME . "sql=&history=all") . "'>" . lang('Edit all') . "</a>\n";
|
||||
echo "</div></fieldset>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
</form>
|
||||
|
||||
|
Before Width: | Height: | Size: 74 B After Width: | Height: | Size: 82 B |
@@ -1,27 +1,35 @@
|
||||
/** @author Ondrej Valka, http://valka.info */
|
||||
body { color: #000; background: #fff; font: 90%/1.25 Verdana, Arial, Helvetica, sans-serif; margin: 0; }
|
||||
a { color: blue; }
|
||||
a { color: blue; text-decoration: none; }
|
||||
a:visited { color: navy; }
|
||||
a:hover { color: red; }
|
||||
a:link:hover, a:visited:hover { color: red; text-decoration: underline; }
|
||||
a.text:hover { text-decoration: none; }
|
||||
a.jush-help:hover { color: inherit; }
|
||||
h1 { font-size: 150%; margin: 0; padding: .8em 1em; border-bottom: 1px solid #999; font-weight: normal; color: #777; background: #eee; }
|
||||
h2 { font-size: 150%; margin: 0 0 20px -18px; padding: .8em 1em; border-bottom: 1px solid #000; color: #000; font-weight: normal; background: #ddf; }
|
||||
h3 { font-weight: normal; font-size: 130%; margin: 1em 0 0; }
|
||||
form { 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%; }
|
||||
td, th { border: 0; border-right: 1px solid #999; border-bottom: 1px solid #999; padding: .2em .3em; }
|
||||
th { background: #eee; text-align: left; }
|
||||
thead th { text-align: center; }
|
||||
thead th { text-align: center; padding: .2em .5em; }
|
||||
thead td, thead th { background: #ddf; }
|
||||
fieldset { display: inline; vertical-align: top; padding: .5em .8em; margin: .8em .5em 0 0; border: 1px solid #999; }
|
||||
p { margin: .8em 20px 0 0; }
|
||||
img { vertical-align: middle; border: 0; }
|
||||
td img { max-width: 200px; max-height: 200px; }
|
||||
code { background: #eee; }
|
||||
tr:hover td, tr:hover th { background: #ddf; }
|
||||
tbody tr:hover td, tbody tr:hover th { background: #eee; }
|
||||
pre { margin: 1em 0 0; }
|
||||
pre, textarea { font: 100%/1.25 monospace; }
|
||||
input[type=image] { vertical-align: middle; }
|
||||
input.default { box-shadow: 1px 1px 1px #777; }
|
||||
input.required { box-shadow: 1px 1px 1px red; }
|
||||
.block { display: block; }
|
||||
.version { color: #777; font-size: 67%; }
|
||||
.js .hidden, .nojs .jsonly { display: none; }
|
||||
.js .column { position: absolute; background: #ddf; padding: .27em 1ex .3em 0; margin-top: -.27em; }
|
||||
.nowrap td, .nowrap th, td.nowrap { white-space: pre; }
|
||||
.wrap td { white-space: normal; }
|
||||
.error { color: red; background: #fee; }
|
||||
@@ -33,32 +41,56 @@ input[type=image] { vertical-align: middle; }
|
||||
.enum { color: #007F7F; }
|
||||
.binary { color: red; }
|
||||
.odd td { background: #F5F5F5; }
|
||||
.js .checkable .checked td, .js .checkable .checked th { background: #ddf; }
|
||||
.time { color: silver; font-size: 70%; }
|
||||
.function { text-align: right; }
|
||||
.number { text-align: right; }
|
||||
.datetime { text-align: right; }
|
||||
.type { width: 15ex; width: auto\9; }
|
||||
.options select { width: 20ex; width: auto\9; }
|
||||
.view { font-style: italic; }
|
||||
.active { font-weight: bold; }
|
||||
.sqlarea { width: 98%; }
|
||||
#menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; overflow: auto; overflow-y: hidden; white-space: nowrap; }
|
||||
.icon { width: 18px; height: 18px; background-color: navy; }
|
||||
.icon:hover { background-color: red; }
|
||||
.size { width: 6ex; }
|
||||
.help { cursor: help; }
|
||||
.pages { position: fixed; bottom: 0; left: 21em; padding: 5px; background: #ddf; border: 1px solid #999; }
|
||||
.links a { white-space: nowrap; margin-right: 20px; }
|
||||
.logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
|
||||
.loadmore { margin-left: 1ex; }
|
||||
#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; }
|
||||
#dbs { overflow: hidden; }
|
||||
#logins, #tables { white-space: nowrap; overflow: auto; }
|
||||
#logins a, #tables a, #tables span { background: #fff; }
|
||||
#content { margin: 2em 0 0 21em; padding: 10px 20px 20px 0; }
|
||||
#lang { position: absolute; top: 0; left: 0; line-height: 1.8em; padding: .3em 1em; }
|
||||
#breadcrumb { white-space: nowrap; position: absolute; top: 0; left: 21em; background: #eee; height: 2em; line-height: 1.8em; padding: 0 1em; margin: 0 0 0 -18px; }
|
||||
#loader { position: fixed; top: 0; left: 18em; z-index: 1; }
|
||||
#h1 { color: #777; text-decoration: none; font-style: italic; }
|
||||
#version { font-size: 67%; color: red; }
|
||||
#schema { margin-left: 60px; position: relative; }
|
||||
#schema { margin-left: 60px; position: relative; -moz-user-select: none; -webkit-user-select: none; }
|
||||
#schema .table { border: 1px solid silver; padding: 0 2px; cursor: move; position: absolute; }
|
||||
#schema .references { position: absolute; }
|
||||
#help { position: absolute; border: 1px solid #999; background: #eee; padding: 5px; font-family: monospace; z-index: 1; }
|
||||
|
||||
.rtl h2 { margin: 0 -18px 20px 0; }
|
||||
.rtl p, .rtl table, .rtl .error, .rtl .message { margin: 1em 0 0 20px; }
|
||||
.rtl .logout { left: 0; right: auto; }
|
||||
.rtl #content { margin: 2em 21em 0 0; padding: 10px 0 20px 20px; }
|
||||
.rtl #breadcrumb { left: auto; right: 21em; margin: 0 -18px 0 0; }
|
||||
.rtl #lang, .rtl #menu { left: auto; right: 0; }
|
||||
|
||||
@media all and (max-device-width: 880px) {
|
||||
.pages { left: auto; }
|
||||
#menu { position: static; width: auto; }
|
||||
#content { margin-left: 10px; }
|
||||
#lang { position: static; border-top: 1px solid #999; }
|
||||
#breadcrumb { left: auto; }
|
||||
.rtl #content { margin-right: 10px; }
|
||||
.rtl #breadcrumb { right: auto; }
|
||||
}
|
||||
|
||||
@media print {
|
||||
#lang, #menu { display: none; }
|
||||
#content { margin-left: 1em; }
|
||||
|
||||
|
Before Width: | Height: | Size: 71 B After Width: | Height: | Size: 79 B |
@@ -1,37 +1,37 @@
|
||||
// Adminer specific functions
|
||||
|
||||
var jushRoot = '../externals/jush/'; // global variable to allow simple customization
|
||||
|
||||
/** Load syntax highlighting
|
||||
* @param string first three characters of database system version
|
||||
*/
|
||||
function bodyLoad(version) {
|
||||
if (history.state !== undefined) { // copied from editor/static/editing.js
|
||||
onpopstate(history);
|
||||
}
|
||||
if (jushRoot) {
|
||||
var script = document.createElement('script');
|
||||
script.src = jushRoot + 'jush.js';
|
||||
script.onload = function () {
|
||||
if (window.jush) { // IE runs in case of an error too
|
||||
jush.create_links = ' target="_blank" rel="noreferrer"';
|
||||
jush.urls.sql_sqlset = jush.urls.sql[0] = jush.urls.sqlset[0] = jush.urls.sqlstatus[0] = 'http://dev.mysql.com/doc/refman/' + version + '/en/$key';
|
||||
var pgsql = 'http://www.postgresql.org/docs/' + version + '/static/';
|
||||
jush.urls.pgsql_pgsqlset = jush.urls.pgsql[0] = pgsql + '$key';
|
||||
jush.urls.pgsqlset[0] = pgsql + 'runtime-config-$key.html#GUC-$1';
|
||||
jush.style(jushRoot + 'jush.css');
|
||||
if (window.jushLinks) {
|
||||
jush.custom_links = jushLinks;
|
||||
if (window.jush) {
|
||||
jush.create_links = ' target="_blank" rel="noreferrer"';
|
||||
if (version) {
|
||||
for (var key in jush.urls) {
|
||||
var obj = jush.urls;
|
||||
if (typeof obj[key] != 'string') {
|
||||
obj = obj[key];
|
||||
key = 0;
|
||||
}
|
||||
jush.highlight_tag('code', 0);
|
||||
obj[key] = obj[key]
|
||||
.replace(/\/doc\/mysql/, '/doc/refman/' + version) // MySQL
|
||||
.replace(/\/docs\/current/, '/docs/' + version) // PostgreSQL
|
||||
;
|
||||
}
|
||||
};
|
||||
script.onreadystatechange = function () {
|
||||
if (/^(loaded|complete)$/.test(script.readyState)) {
|
||||
script.onload();
|
||||
}
|
||||
if (window.jushLinks) {
|
||||
jush.custom_links = jushLinks;
|
||||
}
|
||||
jush.highlight_tag('code', 0);
|
||||
var tags = document.getElementsByTagName('textarea');
|
||||
for (var i = 0; i < tags.length; i++) {
|
||||
if (/(^|\s)jush-/.test(tags[i].className)) {
|
||||
var pre = jush.textarea(tags[i]);
|
||||
if (pre) {
|
||||
setupSubmitHighlightInput(pre);
|
||||
}
|
||||
}
|
||||
};
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,48 +60,105 @@ function typePassword(el, disable) {
|
||||
}
|
||||
}
|
||||
|
||||
/** Hide or show some login rows for selected driver
|
||||
* @param HTMLSelectElement
|
||||
*/
|
||||
function loginDriver(driver) {
|
||||
var trs = driver.parentNode.parentNode.parentNode.rows;
|
||||
for (var i=1; i < trs.length; i++) {
|
||||
trs[i].className = (/sqlite/.test(driver.value) ? 'hidden' : '');
|
||||
var trs = parentTag(driver, 'table').rows;
|
||||
for (var i=1; i < trs.length - 1; i++) {
|
||||
var disabled = /sqlite/.test(driver.value);
|
||||
alterClass(trs[i], 'hidden', disabled);
|
||||
trs[i].getElementsByTagName('input')[0].disabled = disabled;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Handle Tab and Esc in textarea
|
||||
* @param HTMLTextAreaElement
|
||||
* @param KeyboardEvent
|
||||
* @return boolean
|
||||
var dbCtrl;
|
||||
var dbPrevious = {};
|
||||
|
||||
/** Check if database should be opened to a new window
|
||||
* @param MouseEvent
|
||||
* @param HTMLSelectElement
|
||||
*/
|
||||
function textareaKeydown(target, event) {
|
||||
if (!event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey) {
|
||||
if (event.keyCode == 9) { // 9 - Tab
|
||||
// inspired by http://pallieter.org/Projects/insertTab/
|
||||
if (target.setSelectionRange) {
|
||||
var start = target.selectionStart;
|
||||
var scrolled = target.scrollTop;
|
||||
target.value = target.value.substr(0, start) + '\t' + target.value.substr(target.selectionEnd);
|
||||
target.setSelectionRange(start + 1, start + 1);
|
||||
target.scrollTop = scrolled;
|
||||
return false; //! still loses focus in Opera, can be solved by handling onblur
|
||||
} else if (target.createTextRange) {
|
||||
document.selection.createRange().text = '\t';
|
||||
return false;
|
||||
function dbMouseDown(event, el) {
|
||||
dbCtrl = isCtrl(event);
|
||||
if (dbPrevious[el.name] == undefined) {
|
||||
dbPrevious[el.name] = el.value;
|
||||
}
|
||||
}
|
||||
|
||||
/** Load database after selecting it
|
||||
* @param HTMLSelectElement
|
||||
*/
|
||||
function dbChange(el) {
|
||||
if (dbCtrl) {
|
||||
el.form.target = '_blank';
|
||||
}
|
||||
el.form.submit();
|
||||
el.form.target = '';
|
||||
if (dbCtrl && dbPrevious[el.name] != undefined) {
|
||||
el.value = dbPrevious[el.name];
|
||||
dbPrevious[el.name] = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Check whether the query will be executed with index
|
||||
* @param HTMLFormElement
|
||||
*/
|
||||
function selectFieldChange(form) {
|
||||
var ok = (function () {
|
||||
var inputs = form.getElementsByTagName('input');
|
||||
for (var i=0; i < inputs.length; i++) {
|
||||
if (inputs[i].value && /^fulltext/.test(inputs[i].name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (event.keyCode == 27) { // 27 - Esc
|
||||
var els = target.form.elements;
|
||||
for (var i=1; i < els.length; i++) {
|
||||
if (els[i-1] == target) {
|
||||
els[i].focus();
|
||||
break;
|
||||
var ok = form.limit.value;
|
||||
var selects = form.getElementsByTagName('select');
|
||||
var group = false;
|
||||
var columns = {};
|
||||
for (var i=0; i < selects.length; i++) {
|
||||
var select = selects[i];
|
||||
var col = selectValue(select);
|
||||
var match = /^(where.+)col\]/.exec(select.name);
|
||||
if (match) {
|
||||
var op = selectValue(form[match[1] + 'op]']);
|
||||
var val = form[match[1] + 'val]'].value;
|
||||
if (col in indexColumns && (!/LIKE|REGEXP/.test(op) || (op == 'LIKE' && val.charAt(0) != '%'))) {
|
||||
return true;
|
||||
} else if (col || val) {
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
if ((match = /^(columns.+)fun\]/.exec(select.name))) {
|
||||
if (/^(avg|count|count distinct|group_concat|max|min|sum)$/.test(col)) {
|
||||
group = true;
|
||||
}
|
||||
var val = selectValue(form[match[1] + 'col]']);
|
||||
if (val) {
|
||||
columns[col && col != 'count' ? '' : val] = 1;
|
||||
}
|
||||
}
|
||||
if (col && /^order/.test(select.name)) {
|
||||
if (!(col in indexColumns)) {
|
||||
ok = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
if (group) {
|
||||
for (var col in columns) {
|
||||
if (!(col in indexColumns)) {
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
})();
|
||||
setHtml('noindex', (ok ? '' : '!'));
|
||||
}
|
||||
|
||||
|
||||
@@ -166,21 +223,17 @@ function editingNameChange(field) {
|
||||
/** Add table row for next field
|
||||
* @param HTMLInputElement
|
||||
* @param boolean
|
||||
* @param boolean
|
||||
* @return boolean
|
||||
*/
|
||||
function editingAddRow(button, allowed, focus) {
|
||||
if (allowed && rowCount >= allowed) {
|
||||
return false;
|
||||
}
|
||||
function editingAddRow(button, focus) {
|
||||
var match = /(\d+)(\.\d+)?/.exec(button.name);
|
||||
var x = match[0] + (match[2] ? added.substr(match[2].length) : added) + '1';
|
||||
var row = button.parentNode.parentNode;
|
||||
var row2 = row.cloneNode(true);
|
||||
var row = parentTag(button, 'tr');
|
||||
var row2 = cloneNode(row);
|
||||
var tags = row.getElementsByTagName('select');
|
||||
var tags2 = row2.getElementsByTagName('select');
|
||||
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;
|
||||
}
|
||||
tags = row.getElementsByTagName('input');
|
||||
@@ -202,11 +255,15 @@ function editingAddRow(button, allowed, focus) {
|
||||
tags[0].onchange = function () {
|
||||
editingNameChange(tags[0]);
|
||||
};
|
||||
tags[0].onkeyup = function () {
|
||||
};
|
||||
row.parentNode.insertBefore(row2, row.nextSibling);
|
||||
if (focus) {
|
||||
input.onchange = function () {
|
||||
editingNameChange(input);
|
||||
};
|
||||
input.onkeyup = function () {
|
||||
};
|
||||
input.focus();
|
||||
}
|
||||
added += '0';
|
||||
@@ -216,12 +273,13 @@ function editingAddRow(button, allowed, focus) {
|
||||
|
||||
/** Remove table row for field
|
||||
* @param HTMLInputElement
|
||||
* @param string
|
||||
* @return boolean
|
||||
*/
|
||||
function editingRemoveRow(button) {
|
||||
var field = formField(button.form, button.name.replace(/drop_col(.+)/, 'fields$1[field]'));
|
||||
function editingRemoveRow(button, name) {
|
||||
var field = formField(button.form, button.name.replace(/[^\[]+(.+)/, name));
|
||||
field.parentNode.removeChild(field);
|
||||
button.parentNode.parentNode.style.display = 'none';
|
||||
parentTag(button, 'tr').style.display = 'none';
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -235,25 +293,39 @@ function editingTypeChange(type) {
|
||||
var text = selectValue(type);
|
||||
for (var i=0; i < type.form.elements.length; i++) {
|
||||
var el = type.form.elements[i];
|
||||
if (el.name == name + '[length]' && !(
|
||||
(/(char|binary)$/.test(lastType) && /(char|binary)$/.test(text))
|
||||
|| (/(enum|set)$/.test(lastType) && /(enum|set)$/.test(text))
|
||||
)) {
|
||||
el.value = '';
|
||||
if (el.name == name + '[length]') {
|
||||
if (!(
|
||||
(/(char|binary)$/.test(lastType) && /(char|binary)$/.test(text))
|
||||
|| (/(enum|set)$/.test(lastType) && /(enum|set)$/.test(text))
|
||||
)) {
|
||||
el.value = '';
|
||||
}
|
||||
el.onchange.apply(el);
|
||||
}
|
||||
if (lastType == 'timestamp' && el.name == name + '[has_default]' && /timestamp/i.test(formField(type.form, name + '[default]').value)) {
|
||||
el.checked = false;
|
||||
}
|
||||
if (el.name == name + '[collation]') {
|
||||
el.className = (/(char|text|enum|set)$/.test(text) ? '' : 'hidden');
|
||||
alterClass(el, 'hidden', !/(char|text|enum|set)$/.test(text));
|
||||
}
|
||||
if (el.name == name + '[unsigned]') {
|
||||
el.className = (/(int|float|double|decimal)$/.test(text) ? '' : 'hidden');
|
||||
alterClass(el, 'hidden', !/((^|[^o])int|float|double|decimal)$/.test(text));
|
||||
}
|
||||
if (el.name == name + '[on_update]') {
|
||||
alterClass(el, 'hidden', !/timestamp|datetime/.test(text)); // MySQL supports datetime since 5.6.5
|
||||
}
|
||||
if (el.name == name + '[on_delete]') {
|
||||
el.className = (/`/.test(text) ? '' : 'hidden');
|
||||
alterClass(el, 'hidden', !/`/.test(text));
|
||||
}
|
||||
}
|
||||
helpClose();
|
||||
}
|
||||
|
||||
/** Mark length as required
|
||||
* @param HTMLInputElement
|
||||
*/
|
||||
function editingLengthChange(el) {
|
||||
alterClass(el, 'required', !el.value.length && /var(char|binary)$/.test(selectValue(el.parentNode.previousSibling.firstChild)));
|
||||
}
|
||||
|
||||
/** Edit enum or set
|
||||
@@ -264,7 +336,7 @@ function editingLengthFocus(field) {
|
||||
if (/(enum|set)$/.test(selectValue(td.previousSibling.firstChild))) {
|
||||
var edit = document.getElementById('enum-edit');
|
||||
var val = field.value;
|
||||
edit.value = (/^'.+','.+'$/.test(val) ? val.substr(1, val.length - 2).replace(/','/g, "\n").replace(/''/g, "'") : val);
|
||||
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);
|
||||
field.style.display = 'none';
|
||||
edit.style.display = 'inline';
|
||||
@@ -278,7 +350,7 @@ function editingLengthFocus(field) {
|
||||
function editingLengthBlur(edit) {
|
||||
var field = edit.parentNode.firstChild;
|
||||
var val = edit.value;
|
||||
field.value = (/\n/.test(val) ? "'" + val.replace(/\n+$/, '').replace(/'/g, "''").replace(/\n/g, "','") + "'" : val);
|
||||
field.value = (/^'[^\n]+'$/.test(val) ? val : "'" + val.replace(/\n+$/, '').replace(/'/g, "''").replace(/\n/g, "','") + "'");
|
||||
field.style.display = 'inline';
|
||||
edit.style.display = 'none';
|
||||
}
|
||||
@@ -290,7 +362,16 @@ function editingLengthBlur(edit) {
|
||||
function columnShow(checked, column) {
|
||||
var trs = document.getElementById('edit-fields').getElementsByTagName('tr');
|
||||
for (var i=0; i < trs.length; i++) {
|
||||
trs[i].getElementsByTagName('td')[column].className = (checked ? '' : 'hidden');
|
||||
alterClass(trs[i].getElementsByTagName('td')[column], 'hidden', !checked);
|
||||
}
|
||||
}
|
||||
|
||||
/** Hide column with default values in narrow window
|
||||
*/
|
||||
function editingHideDefaults() {
|
||||
if (innerWidth < document.documentElement.scrollWidth) {
|
||||
document.getElementById('form')['defaults'].checked = false;
|
||||
columnShow(false, 5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,17 +380,18 @@ function columnShow(checked, column) {
|
||||
*/
|
||||
function partitionByChange(el) {
|
||||
var partitionTable = /RANGE|LIST/.test(selectValue(el));
|
||||
el.form['partitions'].className = (partitionTable || !el.selectedIndex ? 'hidden' : '');
|
||||
document.getElementById('partition-table').className = (partitionTable ? '' : 'hidden');
|
||||
alterClass(el.form['partitions'], 'hidden', partitionTable || !el.selectedIndex);
|
||||
alterClass(document.getElementById('partition-table'), 'hidden', !partitionTable);
|
||||
helpClose();
|
||||
}
|
||||
|
||||
/** Add next partition row
|
||||
* @param HTMLInputElement
|
||||
*/
|
||||
function partitionNameChange(el) {
|
||||
var row = el.parentNode.parentNode.cloneNode(true);
|
||||
var row = cloneNode(parentTag(el, 'tr'));
|
||||
row.firstChild.firstChild.value = '';
|
||||
el.parentNode.parentNode.parentNode.appendChild(row);
|
||||
parentTag(el, 'table').appendChild(row);
|
||||
el.onchange = function () {};
|
||||
}
|
||||
|
||||
@@ -320,13 +402,13 @@ function partitionNameChange(el) {
|
||||
*/
|
||||
function foreignAddRow(field) {
|
||||
field.onchange = function () { };
|
||||
var row = field.parentNode.parentNode.cloneNode(true);
|
||||
var row = cloneNode(parentTag(field, 'tr'));
|
||||
var selects = row.getElementsByTagName('select');
|
||||
for (var i=0; i < selects.length; i++) {
|
||||
selects[i].name = selects[i].name.replace(/\]/, '1$&');
|
||||
selects[i].selectedIndex = 0;
|
||||
}
|
||||
field.parentNode.parentNode.parentNode.appendChild(row);
|
||||
parentTag(field, 'table').appendChild(row);
|
||||
}
|
||||
|
||||
|
||||
@@ -336,8 +418,7 @@ function foreignAddRow(field) {
|
||||
*/
|
||||
function indexesAddRow(field) {
|
||||
field.onchange = function () { };
|
||||
var parent = field.parentNode.parentNode;
|
||||
var row = parent.cloneNode(true);
|
||||
var row = cloneNode(parentTag(field, 'tr'));
|
||||
var selects = row.getElementsByTagName('select');
|
||||
for (var i=0; i < selects.length; i++) {
|
||||
selects[i].name = selects[i].name.replace(/indexes\[\d+/, '$&1');
|
||||
@@ -348,7 +429,7 @@ function indexesAddRow(field) {
|
||||
inputs[i].name = inputs[i].name.replace(/indexes\[\d+/, '$&1');
|
||||
inputs[i].value = '';
|
||||
}
|
||||
parent.parentNode.appendChild(row);
|
||||
parentTag(field, 'table').appendChild(row);
|
||||
}
|
||||
|
||||
/** Change column in index
|
||||
@@ -356,12 +437,16 @@ function indexesAddRow(field) {
|
||||
* @param string name prefix
|
||||
*/
|
||||
function indexesChangeColumn(field, prefix) {
|
||||
var columns = field.parentNode.parentNode.getElementsByTagName('select');
|
||||
var names = [];
|
||||
for (var i=0; i < columns.length; i++) {
|
||||
var value = selectValue(columns[i]);
|
||||
if (value) {
|
||||
names.push(value);
|
||||
for (var tag in { 'select': 1, 'input': 1 }) {
|
||||
var columns = parentTag(field, 'td').getElementsByTagName(tag);
|
||||
for (var i=0; i < columns.length; i++) {
|
||||
if (/\[columns\]/.test(columns[i].name)) {
|
||||
var value = selectValue(columns[i]);
|
||||
if (value) {
|
||||
names.push(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
field.form[field.name.replace(/\].*/, '][name]')].value = prefix + names.join('_');
|
||||
@@ -377,32 +462,59 @@ function indexesAddColumn(field, prefix) {
|
||||
};
|
||||
var select = field.form[field.name.replace(/\].*/, '][type]')];
|
||||
if (!select.selectedIndex) {
|
||||
select.selectedIndex = 3;
|
||||
while (selectValue(select) != "INDEX" && select.selectedIndex < select.options.length) {
|
||||
select.selectedIndex++;
|
||||
}
|
||||
select.onchange();
|
||||
}
|
||||
var column = field.parentNode.cloneNode(true);
|
||||
select = column.getElementsByTagName('select')[0];
|
||||
select.name = select.name.replace(/\]\[\d+/, '$&1');
|
||||
select.selectedIndex = 0;
|
||||
var input = column.getElementsByTagName('input')[0];
|
||||
input.name = input.name.replace(/\]\[\d+/, '$&1');
|
||||
input.value = '';
|
||||
field.parentNode.parentNode.appendChild(column);
|
||||
var column = cloneNode(field.parentNode);
|
||||
var selects = column.getElementsByTagName('select');
|
||||
for (var i = 0; i < selects.length; i++) {
|
||||
select = selects[i];
|
||||
select.name = select.name.replace(/\]\[\d+/, '$&1');
|
||||
select.selectedIndex = 0;
|
||||
}
|
||||
var inputs = column.getElementsByTagName('input');
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
var input = inputs[i];
|
||||
input.name = input.name.replace(/\]\[\d+/, '$&1');
|
||||
if (input.type != 'checkbox') {
|
||||
input.value = '';
|
||||
}
|
||||
}
|
||||
parentTag(field, 'td').appendChild(column);
|
||||
field.onchange();
|
||||
}
|
||||
|
||||
|
||||
|
||||
var that, x, y, em, tablePos;
|
||||
/** Handle changing trigger time or event
|
||||
* @param RegExp
|
||||
* @param string
|
||||
* @param HTMLFormElement
|
||||
*/
|
||||
function triggerChange(tableRe, table, form) {
|
||||
var formEvent = selectValue(form['Event']);
|
||||
if (tableRe.test(form['Trigger'].value)) {
|
||||
form['Trigger'].value = table + '_' + (selectValue(form['Timing']).charAt(0) + formEvent.charAt(0)).toLowerCase();
|
||||
}
|
||||
alterClass(form['Of'], 'hidden', formEvent != 'UPDATE OF');
|
||||
}
|
||||
|
||||
|
||||
|
||||
var that, x, y; // em and tablePos defined in schema.inc.php
|
||||
|
||||
/** Get mouse position
|
||||
* @param HTMLElement
|
||||
* @param MouseEvent
|
||||
*/
|
||||
function schemaMousedown(el, event) {
|
||||
that = el;
|
||||
x = event.clientX - el.offsetLeft;
|
||||
y = event.clientY - el.offsetTop;
|
||||
if ((event.which ? event.which : event.button) == 1) {
|
||||
that = el;
|
||||
x = event.clientX - el.offsetLeft;
|
||||
y = event.clientY - el.offsetTop;
|
||||
}
|
||||
}
|
||||
|
||||
/** Move object
|
||||
@@ -417,10 +529,9 @@ function schemaMousemove(ev) {
|
||||
var lineSet = { };
|
||||
for (var i=0; i < divs.length; i++) {
|
||||
if (divs[i].className == 'references') {
|
||||
var div2 = document.getElementById((divs[i].id.substr(0, 4) == 'refs' ? 'refd' : 'refs') + divs[i].id.substr(4));
|
||||
var div2 = document.getElementById((/^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 left1 = -1;
|
||||
var isTop = true;
|
||||
var id = divs[i].id.replace(/^ref.(.+)-.+/, '$1');
|
||||
if (divs[i].parentNode != div2.parentNode) {
|
||||
left1 = Math.min(0, ref[1] - left) - 1;
|
||||
@@ -429,19 +540,17 @@ function schemaMousemove(ev) {
|
||||
var left2 = Math.min(0, left - ref[1]) - 1;
|
||||
div2.style.left = left2 + 'em';
|
||||
div2.getElementsByTagName('div')[0].style.width = -left2 + 'em';
|
||||
isTop = (div2.offsetTop + ref[0] * em > divs[i].offsetTop + top * em);
|
||||
}
|
||||
if (!lineSet[id]) {
|
||||
var line = document.getElementById(divs[i].id.replace(/^....(.+)-\d+$/, 'refl$1'));
|
||||
var shift = ev.clientY - y - that.offsetTop;
|
||||
line.style.left = (left + left1) + 'em';
|
||||
if (isTop) {
|
||||
line.style.top = (line.offsetTop + shift) / em + 'em';
|
||||
}
|
||||
var line = document.getElementById(divs[i].id.replace(/^....(.+)-.+$/, 'refl$1'));
|
||||
var top1 = top + divs[i].offsetTop / em;
|
||||
var top2 = top + div2.offsetTop / em;
|
||||
if (divs[i].parentNode != div2.parentNode) {
|
||||
line = line.getElementsByTagName('div')[0];
|
||||
line.style.height = (line.offsetHeight + (isTop ? -1 : 1) * shift) / em + 'em';
|
||||
top2 += ref[0] - top;
|
||||
line.getElementsByTagName('div')[0].style.height = Math.abs(top1 - top2) + 'em';
|
||||
}
|
||||
line.style.left = (left + left1) + 'em';
|
||||
line.style.top = Math.min(top1, top2) + 'em';
|
||||
lineSet[id] = true;
|
||||
}
|
||||
}
|
||||
@@ -470,3 +579,50 @@ function schemaMouseup(ev, db) {
|
||||
cookie('adminer_schema-' + db + '=' + s, 30); //! special chars in db
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var helpOpen, helpIgnore; // when mouse outs <option> then it mouse overs border of <select> - ignore it
|
||||
|
||||
/** Display help
|
||||
* @param HTMLElement
|
||||
* @param MouseEvent
|
||||
* @param string
|
||||
* @param bool display on left side (otherwise on top)
|
||||
*/
|
||||
function helpMouseover(el, event, text, side) {
|
||||
var target = getTarget(event);
|
||||
if (!text) {
|
||||
helpClose();
|
||||
} else if (window.jush && (!helpIgnore || el != target)) {
|
||||
helpOpen = 1;
|
||||
var help = document.getElementById('help');
|
||||
help.innerHTML = text;
|
||||
jush.highlight_tag([ help ]);
|
||||
alterClass(help, 'hidden');
|
||||
var rect = target.getBoundingClientRect();
|
||||
var body = document.documentElement;
|
||||
help.style.top = (body.scrollTop + rect.top - (side ? (help.offsetHeight - target.offsetHeight) / 2 : help.offsetHeight)) + 'px';
|
||||
help.style.left = (body.scrollLeft + rect.left - (side ? help.offsetWidth : (help.offsetWidth - target.offsetWidth) / 2)) + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
/** Close help after timeout
|
||||
* @param HTMLElement
|
||||
* @param MouseEvent
|
||||
*/
|
||||
function helpMouseout(el, event) {
|
||||
helpOpen = 0;
|
||||
helpIgnore = (el != getTarget(event));
|
||||
setTimeout(function () {
|
||||
if (!helpOpen) {
|
||||
helpClose();
|
||||
}
|
||||
}, 200);
|
||||
}
|
||||
|
||||
/** Close help
|
||||
*/
|
||||
function helpClose() {
|
||||
alterClass(document.getElementById('help'), 'hidden', true);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
|
||||
/** Add or remove CSS class
|
||||
* @param HTMLElement
|
||||
* @param string
|
||||
* @param [bool]
|
||||
*/
|
||||
function alterClass(el, className, enable) {
|
||||
if (el) {
|
||||
el.className = el.className.replace(RegExp('(^|\\s)' + className + '(\\s|$)'), '$2') + (enable ? ' ' + className : '');
|
||||
}
|
||||
}
|
||||
|
||||
/** Toggle visibility
|
||||
* @param string
|
||||
* @return boolean
|
||||
@@ -21,23 +32,91 @@ function cookie(assign, days) {
|
||||
}
|
||||
|
||||
/** Verify current Adminer version
|
||||
* @param string
|
||||
*/
|
||||
function verifyVersion() {
|
||||
function verifyVersion(current) {
|
||||
cookie('adminer_version=0', 1);
|
||||
var script = document.createElement('script');
|
||||
script.src = location.protocol + '//www.adminer.org/version.php';
|
||||
document.body.appendChild(script);
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.src = location.protocol + '//www.adminer.org/version/?current=' + current;
|
||||
iframe.frameBorder = 0;
|
||||
iframe.marginHeight = 0;
|
||||
iframe.scrolling = 'no';
|
||||
iframe.style.width = '7ex';
|
||||
iframe.style.height = '1.25em';
|
||||
if (window.postMessage && window.addEventListener) {
|
||||
iframe.style.display = 'none';
|
||||
addEventListener('message', function (event) {
|
||||
if (event.origin == location.protocol + '//www.adminer.org') {
|
||||
var match = /version=(.+)/.exec(event.data);
|
||||
if (match) {
|
||||
cookie('adminer_version=' + match[1], 1);
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
document.getElementById('version').appendChild(iframe);
|
||||
}
|
||||
|
||||
/** Get value of select
|
||||
* @param HTMLSelectElement
|
||||
* @param HTMLElement <select> or <input>
|
||||
* @return string
|
||||
*/
|
||||
function selectValue(select) {
|
||||
if (!select.selectedIndex) {
|
||||
return select.value;
|
||||
}
|
||||
var selected = select.options[select.selectedIndex];
|
||||
return ((selected.attributes.value || {}).specified ? selected.value : selected.text);
|
||||
}
|
||||
|
||||
/** Verify if element has a specified tag name
|
||||
* @param HTMLElement
|
||||
* @param string regular expression
|
||||
* @return bool
|
||||
*/
|
||||
function isTag(el, tag) {
|
||||
var re = new RegExp('^(' + tag + ')$', 'i');
|
||||
return re.test(el.tagName);
|
||||
}
|
||||
|
||||
/** Get parent node with specified tag name
|
||||
* @param HTMLElement
|
||||
* @param string regular expression
|
||||
* @return HTMLElement
|
||||
*/
|
||||
function parentTag(el, tag) {
|
||||
while (el && !isTag(el, tag)) {
|
||||
el = el.parentNode;
|
||||
}
|
||||
return el;
|
||||
}
|
||||
|
||||
/** Set checked class
|
||||
* @param HTMLInputElement
|
||||
*/
|
||||
function trCheck(el) {
|
||||
var tr = parentTag(el, 'tr');
|
||||
alterClass(tr, 'checked', el.checked);
|
||||
if (el.form && el.form['all'] && el.form['all'].onclick) { // Opera treats form.all as document.all
|
||||
el.form['all'].onclick();
|
||||
}
|
||||
}
|
||||
|
||||
/** Fill number of selected items
|
||||
* @param string
|
||||
* @param string
|
||||
*/
|
||||
function selectCount(id, count) {
|
||||
setHtml(id, (count === '' ? '' : '(' + (count + '').replace(/\B(?=(\d{3})+$)/g, ' ') + ')'));
|
||||
var inputs = document.getElementById(id).parentNode.parentNode.getElementsByTagName('input');
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
var input = inputs[i];
|
||||
if (input.type == 'submit') {
|
||||
input.disabled = (count == '0');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Check all elements matching given name
|
||||
* @param HTMLInputElement
|
||||
* @param RegExp
|
||||
@@ -47,6 +126,21 @@ function formCheck(el, name) {
|
||||
for (var i=0; i < elems.length; i++) {
|
||||
if (name.test(elems[i].name)) {
|
||||
elems[i].checked = el.checked;
|
||||
trCheck(elems[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Check all rows in <table class="checkable">
|
||||
*/
|
||||
function tableCheck() {
|
||||
var tables = document.getElementsByTagName('table');
|
||||
for (var i=0; i < tables.length; i++) {
|
||||
if (/(^|\s)checkable(\s|$)/.test(tables[i].className)) {
|
||||
var trs = tables[i].getElementsByTagName('tr');
|
||||
for (var j=0; j < trs.length; j++) {
|
||||
trCheck(trs[j].firstChild.firstChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,7 +149,9 @@ function formCheck(el, name) {
|
||||
* @param string
|
||||
*/
|
||||
function formUncheck(id) {
|
||||
document.getElementById(id).checked = false;
|
||||
var el = document.getElementById(id);
|
||||
el.checked = false;
|
||||
trCheck(el);
|
||||
}
|
||||
|
||||
/** Get number of checked elements matching given name
|
||||
@@ -76,18 +172,64 @@ function formChecked(el, name) {
|
||||
|
||||
/** Select clicked row
|
||||
* @param MouseEvent
|
||||
* @param [boolean] force click
|
||||
*/
|
||||
function tableClick(event) {
|
||||
var el = event.target || event.srcElement;
|
||||
while (!/^tr$/i.test(el.tagName)) {
|
||||
if (/^(table|a|input|textarea)$/i.test(el.tagName)) {
|
||||
return;
|
||||
function tableClick(event, click) {
|
||||
click = (click || !window.getSelection || getSelection().isCollapsed);
|
||||
var el = getTarget(event);
|
||||
while (!isTag(el, 'tr')) {
|
||||
if (isTag(el, 'table|a|input|textarea')) {
|
||||
if (el.type != 'checkbox') {
|
||||
return;
|
||||
}
|
||||
checkboxClick(event, el);
|
||||
click = false;
|
||||
}
|
||||
el = el.parentNode;
|
||||
if (!el) { // Ctrl+click on text fields hides the element
|
||||
return;
|
||||
}
|
||||
}
|
||||
el = el.firstChild.firstChild;
|
||||
el.click && el.click();
|
||||
el.onclick && el.onclick();
|
||||
if (click) {
|
||||
el.checked = !el.checked;
|
||||
el.onclick && el.onclick();
|
||||
}
|
||||
trCheck(el);
|
||||
}
|
||||
|
||||
var lastChecked;
|
||||
|
||||
/** Shift-click on checkbox for multiple selection.
|
||||
* @param MouseEvent
|
||||
* @param HTMLInputElement
|
||||
*/
|
||||
function checkboxClick(event, el) {
|
||||
if (!el.name) {
|
||||
return;
|
||||
}
|
||||
if (event.shiftKey && (!lastChecked || lastChecked.name == el.name)) {
|
||||
var checked = (lastChecked ? lastChecked.checked : true);
|
||||
var inputs = parentTag(el, 'table').getElementsByTagName('input');
|
||||
var checking = !lastChecked;
|
||||
for (var i=0; i < inputs.length; i++) {
|
||||
var input = inputs[i];
|
||||
if (input.name === el.name) {
|
||||
if (checking) {
|
||||
input.checked = checked;
|
||||
trCheck(input);
|
||||
}
|
||||
if (input === el || input === lastChecked) {
|
||||
if (checking) {
|
||||
break;
|
||||
}
|
||||
checking = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
lastChecked = el;
|
||||
}
|
||||
}
|
||||
|
||||
/** Set HTML code of an element
|
||||
@@ -125,34 +267,129 @@ function nodePosition(el) {
|
||||
function pageClick(href, page, event) {
|
||||
if (!isNaN(page) && page) {
|
||||
href += (page != 1 ? '&page=' + (page - 1) : '');
|
||||
if (!ajaxSend(href)) {
|
||||
location.href = href;
|
||||
}
|
||||
location.href = href;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Display items in menu
|
||||
* @param HTMLElement
|
||||
* @param MouseEvent
|
||||
*/
|
||||
function menuOver(el, event) {
|
||||
var a = getTarget(event);
|
||||
if (isTag(a, 'a|span') && a.offsetLeft + a.offsetWidth > a.parentNode.offsetWidth - 15) { // 15 - ellipsis
|
||||
el.style.overflow = 'visible';
|
||||
}
|
||||
}
|
||||
|
||||
/** Hide items in menu
|
||||
* @param HTMLElement
|
||||
*/
|
||||
function menuOut(el) {
|
||||
el.style.overflow = 'auto';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Add row in select fieldset
|
||||
* @param HTMLSelectElement
|
||||
*/
|
||||
function selectAddRow(field) {
|
||||
field.onchange = function () { };
|
||||
var row = field.parentNode.cloneNode(true);
|
||||
field.onchange = function () {
|
||||
selectFieldChange(field.form);
|
||||
};
|
||||
field.onchange();
|
||||
var row = cloneNode(field.parentNode);
|
||||
var selects = row.getElementsByTagName('select');
|
||||
for (var i=0; i < selects.length; i++) {
|
||||
selects[i].name = selects[i].name.replace(/[a-z]\[\d+/, '$&1');
|
||||
selects[i].selectedIndex = 0;
|
||||
}
|
||||
var inputs = row.getElementsByTagName('input');
|
||||
if (inputs.length) {
|
||||
inputs[0].name = inputs[0].name.replace(/[a-z]\[\d+/, '$&1');
|
||||
inputs[0].value = '';
|
||||
inputs[0].className = '';
|
||||
for (var i=0; i < inputs.length; i++) {
|
||||
inputs[i].name = inputs[i].name.replace(/[a-z]\[\d+/, '$&1');
|
||||
inputs[i].value = '';
|
||||
inputs[i].className = '';
|
||||
}
|
||||
field.parentNode.parentNode.appendChild(row);
|
||||
}
|
||||
|
||||
/** Prevent onsearch handler on Enter
|
||||
* @param HTMLInputElement
|
||||
* @param KeyboardEvent
|
||||
*/
|
||||
function selectSearchKeydown(el, event) {
|
||||
if (event.keyCode == 13 || event.keyCode == 10) {
|
||||
el.onsearch = function () {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/** Clear column name after resetting search
|
||||
* @param HTMLInputElement
|
||||
*/
|
||||
function selectSearchSearch(el) {
|
||||
if (!el.value) {
|
||||
el.parentNode.firstChild.selectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Toggles column context menu
|
||||
* @param HTMLElement
|
||||
* @param [string] extra class name
|
||||
*/
|
||||
function columnMouse(el, className) {
|
||||
var spans = el.getElementsByTagName('span');
|
||||
for (var i=0; i < spans.length; i++) {
|
||||
if (/column/.test(spans[i].className)) {
|
||||
spans[i].className = 'column' + (className || '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Fill column in search field
|
||||
* @param string
|
||||
*/
|
||||
function selectSearch(name) {
|
||||
var el = document.getElementById('fieldset-search');
|
||||
el.className = '';
|
||||
var divs = el.getElementsByTagName('div');
|
||||
for (var i=0; i < divs.length; i++) {
|
||||
var div = divs[i];
|
||||
if (isTag(div.firstChild, 'select') && selectValue(div.firstChild) == name) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == divs.length) {
|
||||
div.firstChild.value = name;
|
||||
div.firstChild.onchange();
|
||||
}
|
||||
div.lastChild.focus();
|
||||
}
|
||||
|
||||
|
||||
/** Check if Ctrl key (Command key on Mac) was pressed
|
||||
* @param KeyboardEvent|MouseEvent
|
||||
* @return boolean
|
||||
*/
|
||||
function isCtrl(event) {
|
||||
return (event.ctrlKey || event.metaKey) && !event.altKey; // shiftKey allowed
|
||||
}
|
||||
|
||||
/** Return event target
|
||||
* @param Event
|
||||
* @return HTMLElement
|
||||
*/
|
||||
function getTarget(event) {
|
||||
return event.target || event.srcElement;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Send form by Ctrl+Enter on <select> and <textarea>
|
||||
@@ -161,21 +398,37 @@ function selectAddRow(field) {
|
||||
* @return boolean
|
||||
*/
|
||||
function bodyKeydown(event, button) {
|
||||
var target = event.target || event.srcElement;
|
||||
if (event.ctrlKey && (event.keyCode == 13 || event.keyCode == 10) && !event.altKey && !event.metaKey && /select|textarea|input/i.test(target.tagName)) { // 13|10 - Enter, shiftKey allowed
|
||||
var target = getTarget(event);
|
||||
if (target.jushTextarea) {
|
||||
target = target.jushTextarea;
|
||||
}
|
||||
if (isCtrl(event) && (event.keyCode == 13 || event.keyCode == 10) && isTag(target, 'select|textarea|input')) { // 13|10 - Enter
|
||||
target.blur();
|
||||
if (!ajaxForm(target.form, (button ? button + '=1' : ''))) {
|
||||
if (button) {
|
||||
target.form[button].click();
|
||||
} else {
|
||||
target.form.submit();
|
||||
}
|
||||
if (button) {
|
||||
target.form[button].click();
|
||||
} else {
|
||||
target.form.submit();
|
||||
}
|
||||
target.focus();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Open form to a new window on Ctrl+click or Shift+click
|
||||
* @param MouseEvent
|
||||
*/
|
||||
function bodyClick(event) {
|
||||
var target = getTarget(event);
|
||||
if ((isCtrl(event) || event.shiftKey) && target.type == 'submit' && isTag(target, 'input')) {
|
||||
target.form.target = '_blank';
|
||||
setTimeout(function () {
|
||||
// if (isCtrl(event)) { focus(); } doesn't work
|
||||
target.form.target = '';
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Change focus by Ctrl+Up or Ctrl+Down
|
||||
@@ -183,11 +436,11 @@ function bodyKeydown(event, button) {
|
||||
* @return boolean
|
||||
*/
|
||||
function editingKeydown(event) {
|
||||
if ((event.keyCode == 40 || event.keyCode == 38) && event.ctrlKey && !event.altKey && !event.metaKey) { // 40 - Down, 38 - Up, shiftKey allowed
|
||||
var target = event.target || event.srcElement;
|
||||
if ((event.keyCode == 40 || event.keyCode == 38) && isCtrl(event)) { // 40 - Down, 38 - Up
|
||||
var target = getTarget(event);
|
||||
var sibling = (event.keyCode == 40 ? 'nextSibling' : 'previousSibling');
|
||||
var el = target.parentNode.parentNode[sibling];
|
||||
if (el && (/^tr$/i.test(el.tagName) || (el = el[sibling])) && /^tr$/i.test(el.tagName) && (el = el.childNodes[nodePosition(target.parentNode)]) && (el = el.childNodes[nodePosition(target)])) {
|
||||
if (el && (isTag(el, 'tr') || (el = el[sibling])) && isTag(el, 'tr') && (el = el.childNodes[nodePosition(target.parentNode)]) && (el = el.childNodes[nodePosition(target)])) {
|
||||
el.focus();
|
||||
}
|
||||
return false;
|
||||
@@ -205,13 +458,43 @@ function editingKeydown(event) {
|
||||
function functionChange(select) {
|
||||
var input = select.form[select.name.replace(/^function/, 'fields')];
|
||||
if (selectValue(select)) {
|
||||
if (input.origMaxLength === undefined) {
|
||||
if (input.origType === undefined) {
|
||||
input.origType = input.type;
|
||||
input.origMaxLength = input.maxLength;
|
||||
}
|
||||
input.removeAttribute('maxlength');
|
||||
} else if (input.origMaxLength >= 0) {
|
||||
input.maxLength = input.origMaxLength;
|
||||
input.type = 'text';
|
||||
} else if (input.origType) {
|
||||
input.type = input.origType;
|
||||
if (input.origMaxLength >= 0) {
|
||||
input.maxLength = input.origMaxLength;
|
||||
}
|
||||
}
|
||||
helpClose();
|
||||
}
|
||||
|
||||
/** Call this.onchange() if value changes
|
||||
* @this HTMLInputElement
|
||||
*/
|
||||
function keyupChange() {
|
||||
if (this.value != this.getAttribute('value')) {
|
||||
this.onchange();
|
||||
this.setAttribute('value', this.value);
|
||||
}
|
||||
}
|
||||
|
||||
/** Add new field in schema-less edit
|
||||
* @param HTMLInputElement
|
||||
*/
|
||||
function fieldChange(field) {
|
||||
var row = cloneNode(parentTag(field, 'tr'));
|
||||
var inputs = row.getElementsByTagName('input');
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
inputs[i].value = '';
|
||||
}
|
||||
// keep value in <select> (function)
|
||||
parentTag(field, 'table').appendChild(row);
|
||||
field.onchange = function () { };
|
||||
}
|
||||
|
||||
|
||||
@@ -220,24 +503,37 @@ function functionChange(select) {
|
||||
* @param string
|
||||
* @param function (XMLHttpRequest)
|
||||
* @param [string]
|
||||
* @param [string]
|
||||
* @return XMLHttpRequest or false in case of an error
|
||||
*/
|
||||
function ajax(url, callback, data) {
|
||||
var xmlhttp = (window.XMLHttpRequest ? new XMLHttpRequest() : (window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : false));
|
||||
if (xmlhttp) {
|
||||
xmlhttp.open((data ? 'POST' : 'GET'), url);
|
||||
if (data) {
|
||||
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
function ajax(url, callback, data, message) {
|
||||
var request = (window.XMLHttpRequest ? new XMLHttpRequest() : (window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : false));
|
||||
if (request) {
|
||||
var ajaxStatus = document.getElementById('ajaxstatus');
|
||||
if (message) {
|
||||
ajaxStatus.innerHTML = '<div class="message">' + message + '</div>';
|
||||
ajaxStatus.className = ajaxStatus.className.replace(/ hidden/g, '');
|
||||
} else {
|
||||
ajaxStatus.className += ' hidden';
|
||||
}
|
||||
xmlhttp.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||||
xmlhttp.onreadystatechange = function () {
|
||||
if (xmlhttp.readyState == 4) {
|
||||
callback(xmlhttp);
|
||||
request.open((data ? 'POST' : 'GET'), url);
|
||||
if (data) {
|
||||
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
}
|
||||
request.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||||
request.onreadystatechange = function () {
|
||||
if (request.readyState == 4) {
|
||||
if (/^2/.test(request.status)) {
|
||||
callback(request);
|
||||
} else {
|
||||
ajaxStatus.innerHTML = (request.status ? request.responseText : '<div class="error">' + offlineMessage + '</div>');
|
||||
ajaxStatus.className = ajaxStatus.className.replace(/ hidden/g, '');
|
||||
}
|
||||
}
|
||||
};
|
||||
xmlhttp.send(data);
|
||||
request.send(data);
|
||||
}
|
||||
return xmlhttp;
|
||||
return request;
|
||||
}
|
||||
|
||||
/** Use setHtml(key, value) for JSON response
|
||||
@@ -245,140 +541,47 @@ function ajax(url, callback, data) {
|
||||
* @return XMLHttpRequest or false in case of an error
|
||||
*/
|
||||
function ajaxSetHtml(url) {
|
||||
return ajax(url, function (xmlhttp) {
|
||||
if (xmlhttp.status) {
|
||||
var data = eval('(' + xmlhttp.responseText + ')');
|
||||
for (var key in data) {
|
||||
setHtml(key, data[key]);
|
||||
}
|
||||
return ajax(url, function (request) {
|
||||
var data = eval('(' + request.responseText + ')');
|
||||
for (var key in data) {
|
||||
setHtml(key, data[key]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var originalFavicon;
|
||||
|
||||
/** Replace favicon
|
||||
* @param string
|
||||
*/
|
||||
function replaceFavicon(href) {
|
||||
var favicon = document.getElementById('favicon');
|
||||
if (favicon) {
|
||||
favicon.href = href;
|
||||
favicon.parentNode.appendChild(favicon); // to replace the icon in Firefox
|
||||
}
|
||||
}
|
||||
|
||||
var ajaxState = 0;
|
||||
|
||||
/** Safely load content to #content
|
||||
* @param string
|
||||
* @param [string]
|
||||
* @param [boolean]
|
||||
* @param [boolean]
|
||||
* @return XMLHttpRequest or false in case of an error
|
||||
*/
|
||||
function ajaxSend(url, data, popState, noscroll) {
|
||||
if (!history.pushState) {
|
||||
return false;
|
||||
}
|
||||
var currentState = ++ajaxState;
|
||||
onblur = function () {
|
||||
if (!originalFavicon) {
|
||||
originalFavicon = (document.getElementById('favicon') || {}).href;
|
||||
}
|
||||
replaceFavicon('../adminer/static/loader.gif');
|
||||
};
|
||||
setHtml('loader', '<img src="../adminer/static/loader.gif" alt="">');
|
||||
return ajax(url, function (xmlhttp) {
|
||||
if (currentState == ajaxState) {
|
||||
var title = xmlhttp.getResponseHeader('X-AJAX-Title');
|
||||
if (title) {
|
||||
document.title = decodeURIComponent(title);
|
||||
}
|
||||
var redirect = xmlhttp.getResponseHeader('X-AJAX-Redirect');
|
||||
if (redirect) {
|
||||
return ajaxSend(redirect, '', popState);
|
||||
}
|
||||
onblur = function () { };
|
||||
replaceFavicon(originalFavicon);
|
||||
if (!xmlhttp.status) {
|
||||
setHtml('loader', '');
|
||||
} else {
|
||||
if (!popState) {
|
||||
if (data || url != location.href) {
|
||||
history.pushState(data, '', url); //! remember window position
|
||||
}
|
||||
}
|
||||
if (!noscroll && !/&order/.test(url)) {
|
||||
scrollTo(0, 0);
|
||||
}
|
||||
setHtml('content', xmlhttp.responseText);
|
||||
var content = document.getElementById('content');
|
||||
var scripts = content.getElementsByTagName('script');
|
||||
var length = scripts.length; // required to avoid infinite loop
|
||||
for (var i=0; i < length; i++) {
|
||||
var script = document.createElement('script');
|
||||
script.text = scripts[i].text;
|
||||
content.appendChild(script);
|
||||
}
|
||||
|
||||
var as = document.getElementById('menu').getElementsByTagName('a');
|
||||
var href = location.href.replace(/(&(sql=|dump=|(select|table)=[^&]*)).*/, '$1');
|
||||
for (var i=0; i < as.length; i++) {
|
||||
as[i].className = (href == as[i].href ? 'active' : '');
|
||||
}
|
||||
var dump = document.getElementById('dump');
|
||||
if (dump) {
|
||||
var match = /&(select|table)=([^&]+)/.exec(href);
|
||||
dump.href = dump.href.replace(/[^=]+$/, '') + (match ? match[2] : '');
|
||||
}
|
||||
//! modify Change database hidden fields
|
||||
|
||||
if (window.jush) {
|
||||
jush.highlight_tag('code', 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, data);
|
||||
}
|
||||
|
||||
/** Revive page from history
|
||||
* @param PopStateEvent|history
|
||||
*/
|
||||
onpopstate = function (event) {
|
||||
if ((ajaxState || event.state) && !/#/.test(location.href)) {
|
||||
ajaxSend(location.href, (event.state && confirm(areYouSure) ? event.state : ''), 1); // 1 - disable pushState
|
||||
} else {
|
||||
ajaxState++;
|
||||
}
|
||||
};
|
||||
|
||||
/** Send form by AJAX GET
|
||||
/** Save form contents through AJAX
|
||||
* @param HTMLFormElement
|
||||
* @param [string]
|
||||
* @param [boolean]
|
||||
* @return XMLHttpRequest or false in case of an error
|
||||
* @param string
|
||||
* @param [HTMLInputElement]
|
||||
* @return boolean
|
||||
*/
|
||||
function ajaxForm(form, data, noscroll) {
|
||||
if ((/&(database|scheme|create|view|sql|user|dump|call)=/.test(location.href) && !/\./.test(data)) || (form.onsubmit && form.onsubmit() === false)) { // . - type="image"
|
||||
return false;
|
||||
}
|
||||
var params = [ ];
|
||||
for (var i=0; i < form.elements.length; i++) {
|
||||
var el = form.elements[i];
|
||||
if (/file/i.test(el.type) && el.value) {
|
||||
return false;
|
||||
} else if (el.name && (!/checkbox|radio|submit|file/i.test(el.type) || el.checked)) {
|
||||
params.push(encodeURIComponent(el.name) + '=' + encodeURIComponent(/select/i.test(el.tagName) ? selectValue(el) : el.value));
|
||||
function ajaxForm(form, message, button) {
|
||||
var data = [];
|
||||
var els = form.elements;
|
||||
for (var i = 0; i < els.length; i++) {
|
||||
var el = els[i];
|
||||
if (el.name && !el.disabled) {
|
||||
if (/^file$/i.test(el.type) && el.value) {
|
||||
return false;
|
||||
}
|
||||
if (!/^(checkbox|radio|submit|file)$/i.test(el.type) || el.checked || el == button) {
|
||||
data.push(encodeURIComponent(el.name) + '=' + encodeURIComponent(isTag(el, 'select') ? selectValue(el) : el.value));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (data) {
|
||||
params.push(data);
|
||||
data = data.join('&');
|
||||
|
||||
var url = form.action;
|
||||
if (!/post/i.test(form.method)) {
|
||||
url = url.replace(/\?.*/, '') + '?' + data;
|
||||
data = '';
|
||||
}
|
||||
if (form.method == 'post') {
|
||||
return ajaxSend((/\?/.test(form.action) ? form.action : location.href), params.join('&'), false, noscroll); // ? - always part of Adminer URL
|
||||
}
|
||||
return ajaxSend((form.action || location.href).replace(/\?.*/, '') + '?' + params.join('&'), '', false, noscroll);
|
||||
return ajax(url, function (request) {
|
||||
setHtml('ajaxstatus', request.responseText);
|
||||
if (window.jush) {
|
||||
jush.highlight_tag(document.getElementById('ajaxstatus').getElementsByTagName('code'), 0);
|
||||
}
|
||||
}, data, message);
|
||||
}
|
||||
|
||||
|
||||
@@ -387,18 +590,25 @@ function ajaxForm(form, data, noscroll) {
|
||||
* @param HTMLElement
|
||||
* @param MouseEvent
|
||||
* @param number display textarea instead of input, 2 - load long text
|
||||
* @param string warning to display
|
||||
*/
|
||||
function selectDblClick(td, event, text) {
|
||||
if (/input|textarea/i.test(td.firstChild.tagName)) {
|
||||
function selectClick(td, event, text, warning) {
|
||||
var target = getTarget(event);
|
||||
if (!isCtrl(event) || isTag(td.firstChild, 'input|textarea') || isTag(target, 'a')) {
|
||||
return;
|
||||
}
|
||||
if (warning) {
|
||||
return alert(warning);
|
||||
}
|
||||
var original = td.innerHTML;
|
||||
text = text || /\n/.test(original);
|
||||
var input = document.createElement(text ? 'textarea' : 'input');
|
||||
input.onkeydown = function (event) {
|
||||
if (!event) {
|
||||
event = window.event;
|
||||
}
|
||||
if (event.keyCode == 27 && !(event.ctrlKey || event.shiftKey || event.altKey || event.metaKey)) { // 27 - Esc
|
||||
if (event.keyCode == 27 && !event.shiftKey && !event.altKey && !isCtrl(event)) { // 27 - Esc
|
||||
inputBlur.apply(input);
|
||||
td.innerHTML = original;
|
||||
}
|
||||
};
|
||||
@@ -425,11 +635,12 @@ function selectDblClick(td, event, text) {
|
||||
}
|
||||
td.innerHTML = '';
|
||||
td.appendChild(input);
|
||||
setupSubmitHighlight(td);
|
||||
input.focus();
|
||||
if (text == 2) { // long text
|
||||
return ajax(location.href + '&' + encodeURIComponent(td.id) + '=', function (xmlhttp) {
|
||||
if (xmlhttp.status) {
|
||||
input.value = xmlhttp.responseText;
|
||||
return ajax(location.href + '&' + encodeURIComponent(td.id) + '=', function (request) {
|
||||
if (request.responseText) {
|
||||
input.value = request.responseText;
|
||||
input.name = td.id;
|
||||
}
|
||||
});
|
||||
@@ -447,34 +658,36 @@ function selectDblClick(td, event, text) {
|
||||
|
||||
|
||||
|
||||
/** Load link by AJAX
|
||||
* @param MouseEvent
|
||||
/** Load and display next page in select
|
||||
* @param HTMLLinkElement
|
||||
* @param number
|
||||
* @param string
|
||||
* @param string
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
function bodyClick(event, db, ns) {
|
||||
if (event.button || event.ctrlKey || event.shiftKey || event.altKey || event.metaKey) {
|
||||
return;
|
||||
function selectLoadMore(a, limit, loading) {
|
||||
var title = a.innerHTML;
|
||||
var href = a.href;
|
||||
a.innerHTML = loading;
|
||||
if (href) {
|
||||
a.removeAttribute('href');
|
||||
return ajax(href, function (request) {
|
||||
var tbody = document.createElement('tbody');
|
||||
tbody.innerHTML = request.responseText;
|
||||
document.getElementById('table').appendChild(tbody);
|
||||
if (tbody.children.length < limit) {
|
||||
a.parentNode.removeChild(a);
|
||||
} else {
|
||||
a.href = href.replace(/\d+$/, function (page) {
|
||||
return +page + 1;
|
||||
});
|
||||
a.innerHTML = title;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (event.getPreventDefault ? event.getPreventDefault() : event.returnValue === false || event.defaultPrevented) {
|
||||
return false;
|
||||
}
|
||||
var el = event.target || event.srcElement;
|
||||
if (/^a$/i.test(el.parentNode.tagName)) {
|
||||
el = el.parentNode;
|
||||
}
|
||||
if (/^a$/i.test(el.tagName) && !/:|#|&download=/i.test(el.getAttribute('href')) && /[&?]username=/.test(el.href)) {
|
||||
var match = /&db=([^&]*)/.exec(el.href);
|
||||
var match2 = /&ns=([^&]*)/.exec(el.href);
|
||||
return !(db == (match ? match[1] : '') && ns == (match2 ? match2[1] : '') && ajaxSend(el.href));
|
||||
}
|
||||
if (/^input$/i.test(el.tagName) && /image|submit/.test(el.type)) {
|
||||
return !ajaxForm(el.form, (el.name ? encodeURIComponent(el.name) + (el.type == 'image' ? '.x' : '') + '=1' : ''), el.type == 'image');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Stop event propagation
|
||||
* @param Event
|
||||
*/
|
||||
@@ -485,3 +698,98 @@ function eventStop(event) {
|
||||
event.cancelBubble = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Setup highlighting of default submit button on form field focus
|
||||
* @param HTMLElement
|
||||
*/
|
||||
function setupSubmitHighlight(parent) {
|
||||
for (var key in { input: 1, select: 1, textarea: 1 }) {
|
||||
var inputs = parent.getElementsByTagName(key);
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
setupSubmitHighlightInput(inputs[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Setup submit highlighting for single element
|
||||
* @param HTMLElement
|
||||
*/
|
||||
function setupSubmitHighlightInput(input) {
|
||||
if (!/submit|image|file/.test(input.type)) {
|
||||
addEvent(input, 'focus', inputFocus);
|
||||
addEvent(input, 'blur', inputBlur);
|
||||
}
|
||||
}
|
||||
|
||||
/** Highlight default submit button
|
||||
* @this HTMLInputElement
|
||||
*/
|
||||
function inputFocus() {
|
||||
var submit = findDefaultSubmit(this);
|
||||
if (submit) {
|
||||
alterClass(submit, 'default', true);
|
||||
}
|
||||
}
|
||||
|
||||
/** Unhighlight default submit button
|
||||
* @this HTMLInputElement
|
||||
*/
|
||||
function inputBlur() {
|
||||
var submit = findDefaultSubmit(this);
|
||||
if (submit) {
|
||||
alterClass(submit, 'default');
|
||||
}
|
||||
}
|
||||
|
||||
/** Find submit button used by Enter
|
||||
* @param HTMLElement
|
||||
* @return HTMLInputElement
|
||||
*/
|
||||
function findDefaultSubmit(el) {
|
||||
if (el.jushTextarea) {
|
||||
el = el.jushTextarea;
|
||||
}
|
||||
var inputs = el.form.getElementsByTagName('input');
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
var input = inputs[i];
|
||||
if (input.type == 'submit' && !input.style.zIndex) {
|
||||
return input;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Add event listener
|
||||
* @param HTMLElement
|
||||
* @param string without 'on'
|
||||
* @param function
|
||||
*/
|
||||
function addEvent(el, action, handler) {
|
||||
if (el.addEventListener) {
|
||||
el.addEventListener(action, handler, false);
|
||||
} else {
|
||||
el.attachEvent('on' + action, handler);
|
||||
}
|
||||
}
|
||||
|
||||
/** Defer focusing element
|
||||
* @param HTMLElement
|
||||
*/
|
||||
function focus(el) {
|
||||
setTimeout(function () { // this has to be an anonymous function because Firefox passes some arguments to setTimeout callback
|
||||
el.focus();
|
||||
}, 0);
|
||||
}
|
||||
|
||||
/** Clone node and setup submit highlighting
|
||||
* @param HTMLElement
|
||||
* @return HTMLElement
|
||||
*/
|
||||
function cloneNode(el) {
|
||||
var el2 = el.cloneNode(true);
|
||||
setupSubmitHighlight(el2);
|
||||
return el2;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 673 B |
|
Before Width: | Height: | Size: 72 B After Width: | Height: | Size: 80 B |
|
Before Width: | Height: | Size: 71 B After Width: | Height: | Size: 79 B |
@@ -4,9 +4,10 @@ $fields = fields($TABLE);
|
||||
if (!$fields) {
|
||||
$error = error();
|
||||
}
|
||||
$table_status = ($fields ? table_status($TABLE) : array());
|
||||
$table_status = table_status1($TABLE, true);
|
||||
|
||||
page_header(($fields && is_view($table_status) ? lang('View') : lang('Table')) . ": " . h($TABLE), $error);
|
||||
|
||||
$adminer->selectLinks($table_status);
|
||||
$comment = $table_status["Comment"];
|
||||
if ($comment != "") {
|
||||
@@ -18,15 +19,19 @@ if ($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 title='" . h($field["collation"]) . "'>" . h($field["full_type"]) . ($field["null"] ? " <i>NULL</i>" : "") . ($field["auto_increment"] ? " <i>" . lang('Auto Increment') . "</i>" : "");
|
||||
echo (isset($field["default"]) ? " [<b>" . h($field["default"]) . "</b>]" : "");
|
||||
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)) {
|
||||
echo "<h3>" . lang('Indexes') . "</h3>\n";
|
||||
}
|
||||
|
||||
if (!is_view($table_status)) {
|
||||
if (support("indexes")) {
|
||||
echo "<h3 id='indexes'>" . lang('Indexes') . "</h3>\n";
|
||||
$indexes = indexes($TABLE);
|
||||
if ($indexes) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
@@ -34,52 +39,51 @@ if ($fields) {
|
||||
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] . ")" : "");
|
||||
$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><a href="' . h(ME) . 'indexes=' . urlencode($TABLE) . '">' . lang('Alter indexes') . "</a>\n";
|
||||
|
||||
if (fk_support($table_status)) {
|
||||
echo "<h3>" . lang('Foreign keys') . "</h3>\n";
|
||||
$foreign_keys = foreign_keys($TABLE);
|
||||
if ($foreign_keys) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<thead><tr><th>" . lang('Source') . "<td>" . lang('Target') . "<td>" . lang('ON DELETE') . "<td>" . lang('ON UPDATE') . ($jush != "sqlite" ? "<td> " : "") . "</thead>\n";
|
||||
foreach ($foreign_keys as $name => $foreign_key) {
|
||||
echo "<tr title='" . h($name) . "'>";
|
||||
echo "<th><i>" . implode("</i>, <i>", array_map('h', $foreign_key["source"])) . "</i>";
|
||||
echo "<td><a href='" . h($foreign_key["db"] != "" ? preg_replace('~db=[^&]*~', "db=" . urlencode($foreign_key["db"]), ME) : ($foreign_key["ns"] != "" ? preg_replace('~ns=[^&]*~', "ns=" . urlencode($foreign_key["ns"]), ME) : ME)) . "table=" . urlencode($foreign_key["table"]) . "'>"
|
||||
. ($foreign_key["db"] != "" ? "<b>" . h($foreign_key["db"]) . "</b>." : "") . ($foreign_key["ns"] != "" ? "<b>" . h($foreign_key["ns"]) . "</b>." : "") . h($foreign_key["table"])
|
||||
. "</a>"
|
||||
;
|
||||
echo "(<i>" . implode("</i>, <i>", array_map('h', $foreign_key["target"])) . "</i>)";
|
||||
echo "<td>" . nbsp($foreign_key["on_delete"]) . "\n";
|
||||
echo "<td>" . nbsp($foreign_key["on_update"]) . "\n";
|
||||
if ($jush != "sqlite") {
|
||||
echo '<td><a href="' . h(ME . 'foreign=' . urlencode($TABLE) . '&name=' . urlencode($name)) . '">' . lang('Alter') . '</a>';
|
||||
}
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
if ($jush != "sqlite") {
|
||||
echo '<p><a href="' . h(ME) . 'foreign=' . urlencode($TABLE) . '">' . lang('Add foreign key') . "</a>\n";
|
||||
echo '<p class="links"><a href="' . h(ME) . 'indexes=' . urlencode($TABLE) . '">' . lang('Alter indexes') . "</a>\n";
|
||||
}
|
||||
|
||||
if (fk_support($table_status)) {
|
||||
echo "<h3 id='foreign-keys'>" . lang('Foreign keys') . "</h3>\n";
|
||||
$foreign_keys = foreign_keys($TABLE);
|
||||
if ($foreign_keys) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<thead><tr><th>" . lang('Source') . "<td>" . lang('Target') . "<td>" . lang('ON DELETE') . "<td>" . lang('ON UPDATE') . "<td> </thead>\n";
|
||||
foreach ($foreign_keys as $name => $foreign_key) {
|
||||
echo "<tr title='" . h($name) . "'>";
|
||||
echo "<th><i>" . implode("</i>, <i>", array_map('h', $foreign_key["source"])) . "</i>";
|
||||
echo "<td><a href='" . h($foreign_key["db"] != "" ? preg_replace('~db=[^&]*~', "db=" . urlencode($foreign_key["db"]), ME) : ($foreign_key["ns"] != "" ? preg_replace('~ns=[^&]*~', "ns=" . urlencode($foreign_key["ns"]), ME) : ME)) . "table=" . urlencode($foreign_key["table"]) . "'>"
|
||||
. ($foreign_key["db"] != "" ? "<b>" . h($foreign_key["db"]) . "</b>." : "") . ($foreign_key["ns"] != "" ? "<b>" . h($foreign_key["ns"]) . "</b>." : "") . h($foreign_key["table"])
|
||||
. "</a>"
|
||||
;
|
||||
echo "(<i>" . implode("</i>, <i>", array_map('h', $foreign_key["target"])) . "</i>)";
|
||||
echo "<td>" . nbsp($foreign_key["on_delete"]) . "\n";
|
||||
echo "<td>" . nbsp($foreign_key["on_update"]) . "\n";
|
||||
echo '<td><a href="' . h(ME . 'foreign=' . urlencode($TABLE) . '&name=' . urlencode($name)) . '">' . lang('Alter') . '</a>';
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
|
||||
if (support("trigger")) {
|
||||
echo "<h3>" . lang('Triggers') . "</h3>\n";
|
||||
$triggers = triggers($TABLE);
|
||||
if ($triggers) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
foreach ($triggers as $key => $val) {
|
||||
echo "<tr valign='top'><td>$val[0]<td>$val[1]<th>" . h($key) . "<td><a href='" . h(ME . 'trigger=' . urlencode($TABLE) . '&name=' . urlencode($key)) . "'>" . lang('Alter') . "</a>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
echo '<p><a href="' . h(ME) . 'trigger=' . urlencode($TABLE) . '">' . lang('Add trigger') . "</a>\n";
|
||||
}
|
||||
echo '<p class="links"><a href="' . h(ME) . 'foreign=' . urlencode($TABLE) . '">' . lang('Add foreign key') . "</a>\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (support(is_view($table_status) ? "view_trigger" : "trigger")) {
|
||||
echo "<h3 id='triggers'>" . lang('Triggers') . "</h3>\n";
|
||||
$triggers = triggers($TABLE);
|
||||
if ($triggers) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
foreach ($triggers as $key => $val) {
|
||||
echo "<tr valign='top'><td>" . h($val[0]) . "<td>" . h($val[1]) . "<th>" . h($key) . "<td><a href='" . h(ME . 'trigger=' . urlencode($TABLE) . '&name=' . urlencode($key)) . "'>" . lang('Alter') . "</a>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
echo '<p class="links"><a href="' . h(ME) . 'trigger=' . urlencode($TABLE) . '">' . lang('Add trigger') . "</a>\n";
|
||||
}
|
||||
|
||||
@@ -1,44 +1,49 @@
|
||||
<?php
|
||||
$TABLE = $_GET["trigger"];
|
||||
$name = $_GET["name"];
|
||||
$trigger_options = trigger_options();
|
||||
$trigger_event = array("INSERT", "UPDATE", "DELETE");
|
||||
$row = (array) trigger($name) + array("Trigger" => $TABLE . "_bi");
|
||||
|
||||
$dropped = false;
|
||||
if ($_POST && !$error && in_array($_POST["Timing"], $trigger_options["Timing"]) && in_array($_POST["Event"], $trigger_event) && in_array($_POST["Type"], $trigger_options["Type"])) {
|
||||
$timing_event = " $_POST[Timing] $_POST[Event]";
|
||||
$on = " ON " . table($TABLE);
|
||||
$dropped = drop_create(
|
||||
"DROP TRIGGER " . idf_escape($_GET["name"]) . ($jush == "pgsql" ? $on : ""),
|
||||
"CREATE TRIGGER " . idf_escape($_POST["Trigger"]) . ($jush == "mssql" ? $on . $timing_event : $timing_event . $on) . rtrim(" $_POST[Type]\n$_POST[Statement]", ";") . ";",
|
||||
ME . "table=" . urlencode($TABLE),
|
||||
lang('Trigger has been dropped.'),
|
||||
lang('Trigger has been altered.'),
|
||||
lang('Trigger has been created.'),
|
||||
$_GET["name"]
|
||||
);
|
||||
}
|
||||
|
||||
page_header(($_GET["name"] != "" ? lang('Alter trigger') . ": " . h($_GET["name"]) : lang('Create trigger')), $error, array("table" => $TABLE));
|
||||
|
||||
$row = array("Trigger" => $TABLE . "_bi");
|
||||
if ($_POST) {
|
||||
if (!$error && in_array($_POST["Timing"], $trigger_options["Timing"]) && in_array($_POST["Event"], $trigger_options["Event"]) && in_array($_POST["Type"], $trigger_options["Type"])) {
|
||||
// don't use drop_create() because there may not be more triggers for the same action
|
||||
$on = " ON " . table($TABLE);
|
||||
$drop = "DROP TRIGGER " . idf_escape($name) . ($jush == "pgsql" ? $on : "");
|
||||
$location = ME . "table=" . urlencode($TABLE);
|
||||
if ($_POST["drop"]) {
|
||||
query_redirect($drop, $location, lang('Trigger has been dropped.'));
|
||||
} else {
|
||||
if ($name != "") {
|
||||
queries($drop);
|
||||
}
|
||||
queries_redirect(
|
||||
$location,
|
||||
($name != "" ? lang('Trigger has been altered.') : lang('Trigger has been created.')),
|
||||
queries(create_trigger($on, $_POST))
|
||||
);
|
||||
if ($name != "") {
|
||||
queries(create_trigger($on, $row + array("Type" => reset($trigger_options["Type"]))));
|
||||
}
|
||||
}
|
||||
}
|
||||
$row = $_POST;
|
||||
} elseif ($_GET["name"] != "") {
|
||||
$row = trigger($_GET["name"]);
|
||||
}
|
||||
|
||||
page_header(($name != "" ? lang('Alter trigger') . ": " . h($name) : lang('Create trigger')), $error, array("table" => $TABLE));
|
||||
?>
|
||||
|
||||
<form action="" method="post" id="form">
|
||||
<table cellspacing="0">
|
||||
<tr><th><?php echo lang('Time'); ?><td><?php echo html_select("Timing", $trigger_options["Timing"], $row["Timing"], "if (/^" . preg_quote($TABLE, "/") . "_[ba][iud]$/.test(this.form['Trigger'].value)) this.form['Trigger'].value = '" . js_escape($TABLE) . "_' + selectValue(this).charAt(0).toLowerCase() + selectValue(this.form['Event']).charAt(0).toLowerCase();"); ?>
|
||||
<tr><th><?php echo lang('Event'); ?><td><?php echo html_select("Event", $trigger_event, $row["Event"], "this.form['Timing'].onchange();"); ?>
|
||||
<tr><th><?php echo lang('Time'); ?><td><?php echo html_select("Timing", $trigger_options["Timing"], $row["Timing"], "triggerChange(/^" . preg_quote($TABLE, "/") . "_[ba][iud]$/, '" . js_escape($TABLE) . "', this.form);"); ?>
|
||||
<tr><th><?php echo lang('Event'); ?><td><?php echo html_select("Event", $trigger_options["Event"], $row["Event"], "this.form['Timing'].onchange();"); ?>
|
||||
<?php echo (in_array("UPDATE OF", $trigger_options["Event"]) ? " <input name='Of' value='" . h($row["Of"]) . "' class='hidden'>": ""); ?>
|
||||
<tr><th><?php echo lang('Type'); ?><td><?php echo html_select("Type", $trigger_options["Type"], $row["Type"]); ?>
|
||||
</table>
|
||||
<p><?php echo lang('Name'); ?>: <input name="Trigger" value="<?php echo h($row["Trigger"]); ?>" maxlength="64">
|
||||
<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>
|
||||
<p><?php textarea("Statement", $row["Statement"]); ?>
|
||||
<p>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<?php if ($_GET["name"] != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?>
|
||||
<?php if ($dropped) { ?><input type="hidden" name="dropped" value="1"><?php } ?>
|
||||
<?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?>
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
</form>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<?php
|
||||
$TYPE = $_GET["type"];
|
||||
$row = $_POST;
|
||||
|
||||
if ($_POST && !$error) {
|
||||
$link = substr(ME, 0, -1);
|
||||
if ($_POST["drop"]) {
|
||||
query_redirect("DROP TYPE " . idf_escape($TYPE), $link, lang('Type has been dropped.'));
|
||||
} else {
|
||||
query_redirect("CREATE TYPE " . idf_escape($_POST["name"]) . " $_POST[as]", $link, lang('Type has been created.'));
|
||||
query_redirect("CREATE TYPE " . idf_escape(trim($row["name"])) . " $row[as]", $link, lang('Type has been created.'));
|
||||
}
|
||||
}
|
||||
|
||||
page_header($TYPE != "" ? lang('Alter type') . ": " . h($TYPE) : lang('Create type'), $error);
|
||||
|
||||
$row["as"] = "AS ";
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
if (!$row) {
|
||||
$row["as"] = "AS ";
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -24,7 +24,7 @@ if ($_POST) {
|
||||
if ($TYPE != "") {
|
||||
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n";
|
||||
} else {
|
||||
echo "<input name='name' value='" . h($row['name']) . "'>\n";
|
||||
echo "<input name='name' value='" . h($row['name']) . "' autocapitalize='off'>\n";
|
||||
textarea("as", $row["as"]);
|
||||
echo "<p><input type='submit' value='" . lang('Save') . "'>\n";
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ if ($_POST) {
|
||||
}
|
||||
$grants = array();
|
||||
$old_pass = "";
|
||||
|
||||
if (isset($_GET["host"]) && ($result = $connection->query("SHOW GRANTS FOR " . q($USER) . "@" . q($_GET["host"])))) { //! use information_schema for MySQL 5 - column names in column privileges are not escaped
|
||||
while ($row = $result->fetch_row()) {
|
||||
if (preg_match('~GRANT (.*) ON (.*) TO ~', $row[0], $match) && preg_match_all('~ *([^(,]*[^ ,(])( *\\([^)]+\\))?~', $match[1], $matches, PREG_SET_ORDER)) { //! escape the part between ON and TO
|
||||
@@ -33,7 +34,7 @@ if (isset($_GET["host"]) && ($result = $connection->query("SHOW GRANTS FOR " . q
|
||||
if ($val[1] != "USAGE") {
|
||||
$grants["$match[2]$val[2]"][$val[1]] = true;
|
||||
}
|
||||
if (ereg(' WITH GRANT OPTION', $row[0])) { //! don't check inside strings and identifiers
|
||||
if (preg_match('~ WITH GRANT OPTION~', $row[0])) { //! don't check inside strings and identifiers
|
||||
$grants["$match[2]$val[2]"]["GRANT OPTION"] = true;
|
||||
}
|
||||
}
|
||||
@@ -46,16 +47,27 @@ if (isset($_GET["host"]) && ($result = $connection->query("SHOW GRANTS FOR " . q
|
||||
|
||||
if ($_POST && !$error) {
|
||||
$old_user = (isset($_GET["host"]) ? q($USER) . "@" . q($_GET["host"]) : "''");
|
||||
$new_user = q($_POST["user"]) . "@" . q($_POST["host"]); // if $_GET["host"] is not set then $new_user is always different
|
||||
$pass = q($_POST["pass"]);
|
||||
if ($_POST["drop"]) {
|
||||
query_redirect("DROP USER $old_user", ME . "privileges=", lang('User has been dropped.'));
|
||||
} else {
|
||||
if ($old_user != $new_user) {
|
||||
$error = !queries(($connection->server_info < 5 ? "GRANT USAGE ON *.* TO" : "CREATE USER") . " $new_user IDENTIFIED BY" . ($_POST["hashed"] ? " PASSWORD" : "") . " $pass");
|
||||
} elseif ($_POST["pass"] != $old_pass || !$_POST["hashed"]) {
|
||||
queries("SET PASSWORD FOR $new_user = " . ($_POST["hashed"] ? $pass : "PASSWORD($pass)"));
|
||||
$new_user = q($_POST["user"]) . "@" . q($_POST["host"]); // if $_GET["host"] is not set then $new_user is always different
|
||||
$pass = $_POST["pass"];
|
||||
if ($pass != '' && !$_POST["hashed"]) {
|
||||
// compute hash in a separate query so that plain text password is not saved to history
|
||||
$pass = $connection->result("SELECT PASSWORD(" . q($pass) . ")");
|
||||
$error = !$pass;
|
||||
}
|
||||
|
||||
$created = false;
|
||||
if (!$error) {
|
||||
if ($old_user != $new_user) {
|
||||
$created = queries(($connection->server_info < 5 ? "GRANT USAGE ON *.* TO" : "CREATE USER") . " $new_user IDENTIFIED BY PASSWORD " . q($pass));
|
||||
$error = !$created;
|
||||
} elseif ($pass != $old_pass) {
|
||||
queries("SET PASSWORD FOR $new_user = " . q($pass));
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$revoke = array();
|
||||
foreach ($new_grants as $object => $grant) {
|
||||
@@ -81,6 +93,7 @@ if ($_POST && !$error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error && isset($_GET["host"])) {
|
||||
if ($old_user != $new_user) {
|
||||
queries("DROP USER $old_user");
|
||||
@@ -92,8 +105,10 @@ if ($_POST && !$error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
queries_redirect(ME . "privileges=", (isset($_GET["host"]) ? lang('User has been altered.') : lang('User has been created.')), !$error);
|
||||
if ($old_user != $new_user) {
|
||||
|
||||
if ($created) {
|
||||
// delete new user in case of an error
|
||||
$connection->query("DROP USER $new_user");
|
||||
}
|
||||
@@ -111,15 +126,15 @@ if ($_POST) {
|
||||
if ($old_pass != "") {
|
||||
$row["hashed"] = true;
|
||||
}
|
||||
$grants[DB != "" && !isset($_GET["host"]) ? idf_escape(addcslashes(DB, "%_")) . ".*" : ""] = array();
|
||||
$grants[(DB == "" || $grants ? "" : idf_escape(addcslashes(DB, "%_\\"))) . ".*"] = array();
|
||||
}
|
||||
|
||||
?>
|
||||
<form action="" method="post">
|
||||
<table cellspacing="0">
|
||||
<tr><th><?php echo lang('Server'); ?><td><input name="host" maxlength="60" value="<?php echo h($row["host"]); ?>">
|
||||
<tr><th><?php echo lang('Username'); ?><td><input name="user" maxlength="16" value="<?php echo h($row["user"]); ?>">
|
||||
<tr><th><?php echo lang('Password'); ?><td><input id="pass" name="pass" value="<?php echo h($row["pass"]); ?>">
|
||||
<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('Password'); ?><td><input name="pass" id="pass" value="<?php echo h($row["pass"]); ?>">
|
||||
<?php if (!$row["hashed"]) { ?><script type="text/javascript">typePassword(document.getElementById('pass'));</script><?php } ?>
|
||||
<?php echo checkbox("hashed", 1, $row["hashed"], lang('Hashed'), "typePassword(this.form['pass'], this.checked);"); ?>
|
||||
</table>
|
||||
@@ -127,13 +142,14 @@ if ($_POST) {
|
||||
<?php
|
||||
//! MAX_* limits, REQUIRE
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<thead><tr><th colspan='2'><a href='http://dev.mysql.com/doc/refman/" . substr($connection->server_info, 0, 3) . "/en/grant.html#priv_level' target='_blank' rel='noreferrer'>" . lang('Privileges') . "</a>";
|
||||
echo "<thead><tr><th colspan='2'>" . lang('Privileges') . doc_link(array('sql' => "grant.html#priv_level"));
|
||||
$i = 0;
|
||||
foreach ($grants as $object => $grant) {
|
||||
echo '<th>' . ($object != "*.*" ? "<input name='objects[$i]' value='" . h($object) . "' size='10'>" : "<input type='hidden' name='objects[$i]' value='*.*' size='10'>*.*"); //! separate db, table, columns, PROCEDURE|FUNCTION, routine
|
||||
echo '<th>' . ($object != "*.*" ? "<input name='objects[$i]' value='" . h($object) . "' size='10' autocapitalize='off'>" : "<input type='hidden' name='objects[$i]' value='*.*' size='10'>*.*"); //! separate db, table, columns, PROCEDURE|FUNCTION, routine
|
||||
$i++;
|
||||
}
|
||||
echo "</thead>\n";
|
||||
|
||||
foreach (array(
|
||||
"" => "",
|
||||
"Server Admin" => lang('Server'),
|
||||
@@ -148,17 +164,18 @@ foreach (array(
|
||||
foreach ($grants as $object => $grant) {
|
||||
$name = "'grants[$i][" . h(strtoupper($privilege)) . "]'";
|
||||
$value = $grant[strtoupper($privilege)];
|
||||
if ($context == "Server Admin" && $object != (isset($grants["*.*"]) ? "*.*" : "")) {
|
||||
if ($context == "Server Admin" && $object != (isset($grants["*.*"]) ? "*.*" : ".*")) {
|
||||
echo "<td> ";
|
||||
} 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>";
|
||||
} else {
|
||||
echo "<td align='center'><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');\"")) . ">"; //! uncheck all except grant if all is checked
|
||||
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
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
?>
|
||||
<p>
|
||||
|
||||
@@ -1,34 +1,58 @@
|
||||
<?php
|
||||
$TABLE = $_GET["view"];
|
||||
$dropped = false;
|
||||
$row = $_POST;
|
||||
|
||||
if ($_POST && !$error) {
|
||||
$dropped = drop_create(
|
||||
"DROP VIEW " . table($TABLE),
|
||||
"CREATE VIEW " . table($_POST["name"]) . " AS\n$_POST[select]",
|
||||
($_POST["drop"] ? substr(ME, 0, -1) : ME . "table=" . urlencode($_POST["name"])),
|
||||
lang('View has been dropped.'),
|
||||
lang('View has been altered.'),
|
||||
lang('View has been created.'),
|
||||
$TABLE
|
||||
);
|
||||
$name = trim($row["name"]);
|
||||
$as = " AS\n$row[select]";
|
||||
$location = ME . "table=" . urlencode($name);
|
||||
$message = lang('View has been altered.');
|
||||
|
||||
if ($_GET["materialized"]) {
|
||||
$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") {
|
||||
query_redirect(($jush == "mssql" ? "ALTER" : "CREATE OR REPLACE") . " VIEW " . table($name) . $as, $location, $message);
|
||||
} else {
|
||||
$temp_name = $name . "_adminer_" . uniqid();
|
||||
drop_create(
|
||||
"DROP $type " . table($TABLE),
|
||||
"CREATE $type " . table($name) . $as,
|
||||
"DROP $type " . table($name),
|
||||
"CREATE $type " . table($temp_name) . $as,
|
||||
"DROP $type " . table($temp_name),
|
||||
($_POST["drop"] ? substr(ME, 0, -1) : $location),
|
||||
lang('View has been dropped.'),
|
||||
$message,
|
||||
lang('View has been created.'),
|
||||
$TABLE,
|
||||
$name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
page_header(($TABLE != "" ? lang('Alter view') : lang('Create view')), $error, array("table" => $TABLE), $TABLE);
|
||||
|
||||
$row = array();
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
} elseif ($TABLE != "") {
|
||||
if (!$_POST && $TABLE != "") {
|
||||
$row = view($TABLE);
|
||||
$row["name"] = $TABLE;
|
||||
if (!$error) {
|
||||
$error = error();
|
||||
}
|
||||
}
|
||||
|
||||
page_header(($TABLE != "" ? lang('Alter view') : lang('Create view')), $error, array("table" => $TABLE), h($TABLE));
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<p><?php echo lang('Name'); ?>: <input name="name" value="<?php echo h($row["name"]); ?>" maxlength="64">
|
||||
<p><?php echo lang('Name'); ?>: <input name="name" value="<?php echo h($row["name"]); ?>" maxlength="64" autocapitalize="off">
|
||||
<p><?php textarea("select", $row["select"]); ?>
|
||||
<p>
|
||||
<?php if ($dropped) { // old view was dropped but new wasn't created ?><input type="hidden" name="dropped" value="1"><?php } ?>
|
||||
<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 } ?>
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
|
||||
279
changes.txt
@@ -1,3 +1,280 @@
|
||||
Adminer 4.2.2 (released ):
|
||||
Fix XSS in alter table (found by HP Fortify)
|
||||
|
||||
Adminer 4.2.1 (released 2015-03-10):
|
||||
Send referrer header to the same domain
|
||||
MySQL: Fix usage of utf8mb4 if the client library doesn't support it
|
||||
MySQL: Use utf8mb4 in export only if required
|
||||
SQLite: Use EXPLAIN QUERY PLAN in SQL query
|
||||
|
||||
Adminer 4.2.0 (released 2015-02-07):
|
||||
Fix XSS in login form (bug #436)
|
||||
Allow limiting number of displayed rows in SQL command
|
||||
Fix reading routine column collations
|
||||
Unlock session in alter database
|
||||
Make master key unreadable to others (bug #410)
|
||||
Fix edit by long non-utf8 string
|
||||
Specify encoding for PHP 5.6 with invalid default_charset
|
||||
Fix saving NULL value, bug since Adminer 4.0.3
|
||||
Send 403 for auth error
|
||||
Report offline and other AJAX errors (bug #419)
|
||||
Don't alter table comment if not changed
|
||||
Add links to documentation on table status page
|
||||
Fix handling of 64 bit numbers in auto_increment
|
||||
Add referrer: never meta tag
|
||||
MySQL: Use utf8mb4 if available
|
||||
MySQL: Support foreign keys in NDB storage
|
||||
PostgreSQL: Materialized views
|
||||
SQLite: Support CURRENT_* default values (bug #417)
|
||||
Elasticsearch: Use where in select
|
||||
Firebird: Alpha version
|
||||
Danish translation
|
||||
|
||||
Adminer 4.1.0 (released 2014-04-18):
|
||||
Provide size of all databases in the overview
|
||||
Prevent against brute force login attempts from the same IP address
|
||||
Compute number of tables in the overview explicitly
|
||||
Display edit form after error in clone or multi-edit
|
||||
Trim trailing non-breaking spaces in SQL textarea
|
||||
Display time of the select command
|
||||
Print elapsed time in HTML instead of SQL command comment
|
||||
Improve gzip export ratio (bug #387)
|
||||
Use rel="noreferrer" for external links, skip adminer.org redirect in WebKit
|
||||
MySQL: Fix enum types in routines (bug #391)
|
||||
MySQL: Fix editing rows by binary values, bug since Adminer 3.7.1
|
||||
MySQL: Respect daylight saving time in dump, bug since Adminer 3.6.4
|
||||
MySQL 5.6.5+: Support ON UPDATE on datatime column
|
||||
SQLite: Support UPDATE OF triggers
|
||||
SQLite: Display auto-created unique indexes, bug since Adminer 3.5.0
|
||||
Editor: Fix login() method, bug since Adminer 4.0.0
|
||||
Translate numbers in ar, bn, fa
|
||||
Vietnamese translation
|
||||
|
||||
Adminer 4.0.3 (released 2014-02-01)
|
||||
MongoDB: insert, truncate, indexes
|
||||
SimpleDB, MongoDB: insert more fields at once
|
||||
SQLite: Fix creating table and altering primary key, bug since Adminer 4.0.0
|
||||
Don't store invalid credentials to session, bug since Adminer 4.0.0
|
||||
Norweigan translation
|
||||
|
||||
Adminer 4.0.2 (released 2014-01-11):
|
||||
Fix handling of long text in SQL textarea
|
||||
Support paste to SQL textarea in Opera
|
||||
|
||||
Adminer 4.0.1 (released 2014-01-11):
|
||||
Don't use type=number if a SQL function is used
|
||||
Disable highlighting in textareas with long texts
|
||||
Don't autofocus SQL textarea in Firefox
|
||||
Don't link NULL foreign key values
|
||||
Fix displaying images in Editor, bug since Adminer 3.6.0
|
||||
Fix uploading files, bug since Adminer 4.0.0
|
||||
MongoDB: Count tables, display ObjectIds, sort, limit, offset, count rows
|
||||
Elasticsearch: Fix compiled version, create and drop DB, drop table
|
||||
|
||||
Adminer 4.0.0 (released 2014-01-08):
|
||||
Driver for SimpleDB, MongoDB and Elasticsearch
|
||||
Highlight SQL in textareas
|
||||
Save and continue edit by AJAX
|
||||
Split SQL command and import
|
||||
Add a new column in alter table on key press
|
||||
Mark length as required for strings
|
||||
Add label to database selection, move logout button
|
||||
Add button for dropping an index
|
||||
Display number of selected rows
|
||||
Add links to documentation
|
||||
Disable underlining links
|
||||
Differentiate views in navigation
|
||||
Improve speed of CSV import
|
||||
Keep form values after refresh in Firefox
|
||||
Mark auto_increment fields in edit
|
||||
Don't append newlines to uploaded files, bug since Adminer 3.7.0
|
||||
Don't display SQL edit form on Ctrl+click on the select query, introduced in Adminer 3.6.4
|
||||
Use MD5 for editing long keys only in supported drivers, bug since Adminer 3.6.4
|
||||
Don't reset column when searching for an empty value with Enter, bug since Adminer 3.6.4
|
||||
Encrypt passwords stored in session by a key stored in cookie
|
||||
Don't execute external JavaScript when verifying version
|
||||
Include JUSH in the compiled version
|
||||
Protect CSRF token against BREACH
|
||||
Non-MySQL: View triggers
|
||||
SQLite: Allow editing primary key
|
||||
SQLite: Allow editing foreign keys
|
||||
PostgreSQL: Fix handling of nextval() default values
|
||||
PostgreSQL: Support creating array columns
|
||||
Customization: Provide schemas()
|
||||
Portugal Portuguese translation
|
||||
Thai translation
|
||||
|
||||
Adminer 3.7.1 (released 2013-06-29):
|
||||
Increase click target for checkboxes
|
||||
Use shadow for highlighting default button
|
||||
Don't use LIMIT 1 if inline updating unique row
|
||||
Don't check previous checkbox on added column in create table (bug #3614245)
|
||||
Order table list by name
|
||||
Verify UTF-8 encoding of CSV import
|
||||
Notify user about expired master password for permanent login
|
||||
Highlight table being altered in navigation
|
||||
Send 404 for invalid database and schema
|
||||
Fix title and links on invalid table pages
|
||||
Display error on invalid alter table and view pages
|
||||
MySQL: Speed up updating rows without numeric or UTF-8 primary key
|
||||
Non-MySQL: Descending indexes
|
||||
PostgreSQL: Fix detecting oid column in PDO
|
||||
PostgreSQL: Handle timestamp types (bug #3614086)
|
||||
Add Korean translation
|
||||
|
||||
Adminer 3.7.0 (released 2013-05-19):
|
||||
Allow more SQL files to be uploaded at the same time
|
||||
Print run time next to executed queries
|
||||
Don't drop original view and routine before creating the new one
|
||||
Highlight default submit button
|
||||
Add server placeholder to login form
|
||||
Disable SQL export when applying functions in select
|
||||
Allow using lang() in plugins (customization)
|
||||
Remove bzip2 compression support
|
||||
Constraint memory used in TAR export
|
||||
Allow exporting views dependent on each other (bug #3459151)
|
||||
Fix resetting search (bug #3612507)
|
||||
Don't use LIMIT 1 if updating unique row (bug #3613109)
|
||||
Restrict editing rows without unique identifier to search results
|
||||
Display navigation bellow main content on mobile browsers
|
||||
Get number of rows on export page asynchronously
|
||||
Respect 'whole result' even if some rows are checked (bug #339 since Adminer 3.7.0)
|
||||
MySQL: Optimize create table page and Editor navigation
|
||||
MySQL: Display bit type as binary number
|
||||
MySQL: Improve export of binary data types
|
||||
MySQL: Fix handling of POINT data type (bug #3582578)
|
||||
MySQL: Don't export binary and geometry columns twice in select
|
||||
MySQL: Fix EXPLAIN in MySQL < 5.1, bug since Adminer 3.6.4
|
||||
SQLite: Export views
|
||||
PostgreSQL: Fix swapped NULL and NOT NULL columns in PDO
|
||||
|
||||
Adminer 3.6.4 (released 2013-04-26):
|
||||
Display pagination on a fixed position
|
||||
Increase default select limit to 50
|
||||
Display SQL edit form on Ctrl+click on the select query
|
||||
Display SQL history from newest
|
||||
Recover original view, trigger, routine if creating fails
|
||||
Do not store plain text password to history in creating user
|
||||
Selectable ON UPDATE CURRENT_TIMESTAMP field in create table
|
||||
Open database to a new window after selecting it with Ctrl
|
||||
Clear column name after resetting search (bug #3601200)
|
||||
Explain partitions in SQL query (bug #3600150)
|
||||
Allow loading more data with inline edit (bug #3605531)
|
||||
Stay on the same page after deleting rows (bug #3605845)
|
||||
Respect checked tables in export filename (bug #3245464)
|
||||
Respect PHP configuration max_input_vars
|
||||
Fix unsetting permanent login after logout
|
||||
Disable autocapitalize in identifiers on mobile browsers
|
||||
MySQL: Compatibility with MySQL 5.6
|
||||
MySQL: Move ALTER export to plugin
|
||||
MySQL: Use numeric time zone in export
|
||||
MySQL: Link processlist documentation
|
||||
SQLite: Export indexes
|
||||
|
||||
Adminer 3.6.3 (released 2013-01-23):
|
||||
Display error code in SQL query
|
||||
Allow specifying external links
|
||||
Treat Meta key same as Ctrl
|
||||
Fix XSS in displaying non-UTF-8 strings
|
||||
Don't use type="number" for decimal numbers
|
||||
|
||||
Adminer 3.6.2 (released 2012-12-21):
|
||||
Edit values by Ctrl+click instead of double click
|
||||
Don't select row on double click
|
||||
Support NULL in routine calls
|
||||
Shorten printed values in varchar fields
|
||||
Display table default values on wide screens
|
||||
Display date in SQL history
|
||||
HTML5 input fields
|
||||
Display warning for missing UPDATE privilege
|
||||
Fix switching language on first load
|
||||
Support enabled mbstring.func_overload
|
||||
MySQL: Prolong comment length since MySQL 5.5
|
||||
PostgreSQL: Fix process list in version 9.2
|
||||
MS SQL: Support databases starting with number
|
||||
|
||||
Adminer 3.6.1 (released 2012-09-17):
|
||||
Fix compiled version on PHP with multibyte support
|
||||
|
||||
Adminer 3.6.0 (released 2012-09-16):
|
||||
Load more data in select
|
||||
Edit strings with \n in textarea
|
||||
Time out long running database list and select count
|
||||
Use VALUES() in INSERT+UPDATE export
|
||||
Style logout button as link
|
||||
Store selected database to permanent login
|
||||
Ctrl+click and Shift+click on button opens form to a blank window
|
||||
Switch language by POST
|
||||
Compress translations
|
||||
MySQL: Support geometry data types
|
||||
selectQueryBuild() method (customization)
|
||||
Serbian translation
|
||||
|
||||
Adminer 3.5.1 (released 2012-08-10):
|
||||
Support same name fields in CSV export
|
||||
Support Shift+click in export
|
||||
|
||||
Adminer 3.5.0 (released 2012-08-05):
|
||||
Links for column search in select
|
||||
Autohide column context menu in select
|
||||
Autodisplay long table names in tables list
|
||||
Display assigned auto_increment after clone
|
||||
SQLite: Full alter table
|
||||
SQLite: Better editing in tables without primary key
|
||||
SQLite: Display number of rows in database overview
|
||||
|
||||
Adminer 3.4.0 (released 2012-06-30):
|
||||
Link to descending order
|
||||
Shift+click on checkbox to select consecutive rows
|
||||
Print current time next to executed SQL queries
|
||||
Warn about selecting data without index
|
||||
Allow specifying database in login form
|
||||
Link to original table in EXPLAIN of SELECT * FROM table t
|
||||
Format numbers in translations
|
||||
MySQL: inform about disabled event_scheduler
|
||||
SQLite: support binary data
|
||||
PostgreSQL: approximate row count in table overview
|
||||
PostgreSQL: improve PDO support in SQL command
|
||||
Oracle: schema, processlist, table overview numbers
|
||||
Simplify work with NULL values (customization)
|
||||
Use namespace in login form (customization)
|
||||
Customizable export filename (customization)
|
||||
Replace JSMin by better JavaScript minifier
|
||||
Don't use AJAX links and forms
|
||||
Indonesian translation
|
||||
Ukrainian translation
|
||||
Bengali translation
|
||||
|
||||
Adminer 3.3.4 (released 2012-03-07):
|
||||
Foreign keys default actions (bug #3397606)
|
||||
SET DEFAULT foreign key action
|
||||
Fix minor parser bug in SQL command with webserver file
|
||||
Ctrl+click on button opens form to a blank window
|
||||
Trim table and column names (bug #3405309)
|
||||
Error message with no response from server in AJAX
|
||||
Esc to cancel AJAX request
|
||||
Move AJAX loading indicator to the right
|
||||
Don't quote bit type in export
|
||||
Don't check row while selecting text
|
||||
Fix invalid references line position on Database schema
|
||||
Disable selecting text on Database schema
|
||||
Ability to disable export (customization)
|
||||
Extensible list of databases (customization)
|
||||
MySQL: set autocommit after connect
|
||||
SQLite, PostgreSQL: vacuum
|
||||
SQLite, PostgreSQL: don't use LIKE for numbers (bug #3420408)
|
||||
PostgreSQL: fix alter foreign key
|
||||
PostgreSQL over PDO: connect if the eponymous database does not exist (bug #3391619)
|
||||
Boolean search (Editor)
|
||||
Persian translation
|
||||
|
||||
Adminer 3.3.3 (released 2011-08-12):
|
||||
Highlight checked rows
|
||||
Titles of links in database overview and navigation
|
||||
Fix trigger export (SQLite)
|
||||
Default trigger statement (SQLite, PostgreSQL)
|
||||
Remove search by expression (PostgreSQL, MS SQL)
|
||||
|
||||
Adminer 3.3.2 (released 2011-08-08):
|
||||
Display error with non-existent row in edit
|
||||
Fix minor parser bug in SQL command with webserver file
|
||||
@@ -143,7 +420,7 @@ Adminer 2.3.1 (released 2010-04-06):
|
||||
Add Drop button to Alter pages (regression from 2.0.0)
|
||||
Link COUNT(*) result to listing
|
||||
Newlines in select query edit
|
||||
Return to referer after edit
|
||||
Return to referrer after edit
|
||||
Respect session.auto_start (bug #2967284)
|
||||
|
||||
Adminer 2.3.0 (released 2010-02-26):
|
||||
|
||||
330
compile.php
Normal file → Executable file
@@ -1,28 +1,21 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
error_reporting(6135); // errors and warnings
|
||||
include dirname(__FILE__) . "/adminer/include/version.inc.php";
|
||||
include dirname(__FILE__) . "/externals/jsmin-php/jsmin.php";
|
||||
|
||||
if (!class_exists("JSMin")) {
|
||||
/** Simple JS minifier without full support for regex literals
|
||||
* @link http://pastebin.com/2Jc2swSr
|
||||
*/
|
||||
class JSMin {
|
||||
/*private static*/ function callback($match) {
|
||||
$s = trim($match[0]);
|
||||
return ($s === "" ? "\n" : ($s[0] === "/" && ($s[1] === "*" || $s[1] === "/") ? "" : $s));
|
||||
}
|
||||
|
||||
/*static*/ function minify($input) {
|
||||
return preg_replace_callback('~//[^\n]*|/\*.*?\*/|/(?!\s)(?:\\\\.|[^/\\\\])*/|\'(?:\\\\.|[^\'\\\\])*\'|"(?:\\\\.|[^"\\\\])*"|\s*[^0-9a-z_$\'"/\s]\s*|\s+~si', array('JSMin', 'callback'), $input);
|
||||
}
|
||||
}
|
||||
}
|
||||
include dirname(__FILE__) . "/externals/JsShrink/jsShrink.php";
|
||||
|
||||
function add_apo_slashes($s) {
|
||||
return addcslashes($s, "\\'");
|
||||
}
|
||||
|
||||
function add_quo_slashes($s) {
|
||||
$return = $s;
|
||||
$return = addcslashes($return, "\n\r\$\"\\");
|
||||
$return = preg_replace('~\0(?![0-7])~', '\\\\0', $return);
|
||||
$return = addcslashes($return, "\0");
|
||||
return $return;
|
||||
}
|
||||
|
||||
function remove_lang($match) {
|
||||
global $translations;
|
||||
$idf = strtr($match[2], array("\\'" => "'", "\\\\" => "\\"));
|
||||
@@ -36,7 +29,7 @@ function remove_lang($match) {
|
||||
function lang_ids($match) {
|
||||
global $lang_ids;
|
||||
$lang_id = &$lang_ids[stripslashes($match[1])];
|
||||
if (!isset($lang_id)) {
|
||||
if ($lang_id === null) {
|
||||
$lang_id = count($lang_ids) - 1;
|
||||
}
|
||||
return ($_SESSION["lang"] ? $match[0] : "lang($lang_id$match[2]");
|
||||
@@ -49,6 +42,19 @@ function put_file($match) {
|
||||
}
|
||||
$return = file_get_contents(dirname(__FILE__) . "/$project/$match[2]");
|
||||
if (basename($match[2]) != "lang.inc.php" || !$_SESSION["lang"]) {
|
||||
if (basename($match[2]) == "lang.inc.php") {
|
||||
$return = str_replace('function lang($idf, $number = null) {', 'function lang($idf, $number = null) {
|
||||
if (is_string($idf)) { // compiled version uses numbers, string comes from a plugin
|
||||
// English translation is closest to the original identifiers //! pluralized translations are not found
|
||||
$pos = array_search($idf, get_translations("en")); //! this should be cached
|
||||
if ($pos !== false) {
|
||||
$idf = $pos;
|
||||
}
|
||||
}', $return, $count);
|
||||
if (!$count) {
|
||||
echo "lang() not found\n";
|
||||
}
|
||||
}
|
||||
$tokens = token_get_all($return); // to find out the last token
|
||||
return "?>\n$return" . (in_array($tokens[count($tokens) - 1][0], array(T_CLOSE_TAG, T_INLINE_HTML), true) ? "<?php" : "");
|
||||
} elseif (preg_match('~\\s*(\\$pos = (.+\n).+;)~sU', $return, $match2)) {
|
||||
@@ -57,17 +63,59 @@ function put_file($match) {
|
||||
return '$_SESSION[lang]';
|
||||
}
|
||||
|
||||
function lang(\$translation, \$number) {
|
||||
\$pos = $match2[2]\t\t: " . (preg_match("~\\\$LANG == '$_SESSION[lang]'.* \\? (.+)\n~U", $match2[1], $match3) ? $match3[1] : "1") . '
|
||||
);
|
||||
return sprintf($translation[$pos], $number);
|
||||
function lang(\$translation, \$number = null) {
|
||||
if (is_array(\$translation)) {
|
||||
\$pos = $match2[2]\t\t\t: " . (preg_match("~\\\$LANG == '$_SESSION[lang]'.* \\? (.+)\n~U", $match2[1], $match3) ? $match3[1] : "1") . '
|
||||
);
|
||||
$translation = $translation[$pos];
|
||||
}
|
||||
$translation = str_replace("%d", "%s", $translation);
|
||||
$number = format_number($number);
|
||||
return sprintf($translation, $number);
|
||||
}
|
||||
';
|
||||
} else {
|
||||
echo "lang() not found\n";
|
||||
echo "lang() \$pos not found\n";
|
||||
}
|
||||
}
|
||||
|
||||
function lzw_compress($string) {
|
||||
// compression
|
||||
$dictionary = array_flip(range("\0", "\xFF"));
|
||||
$word = "";
|
||||
$codes = array();
|
||||
for ($i=0; $i <= strlen($string); $i++) {
|
||||
$x = $string[$i];
|
||||
if (strlen($x) && isset($dictionary[$word . $x])) {
|
||||
$word .= $x;
|
||||
} elseif ($i) {
|
||||
$codes[] = $dictionary[$word];
|
||||
$dictionary[$word . $x] = count($dictionary);
|
||||
$word = $x;
|
||||
}
|
||||
}
|
||||
// convert codes to binary string
|
||||
$dictionary_count = 256;
|
||||
$bits = 8; // ceil(log($dictionary_count, 2))
|
||||
$return = "";
|
||||
$rest = 0;
|
||||
$rest_length = 0;
|
||||
foreach ($codes as $code) {
|
||||
$rest = ($rest << $bits) + $code;
|
||||
$rest_length += $bits;
|
||||
$dictionary_count++;
|
||||
if ($dictionary_count >> $bits) {
|
||||
$bits++;
|
||||
}
|
||||
while ($rest_length > 7) {
|
||||
$rest_length -= 8;
|
||||
$return .= chr($rest >> $rest_length);
|
||||
$rest &= (1 << $rest_length) - 1;
|
||||
}
|
||||
}
|
||||
return $return . ($rest_length ? chr($rest << (8 - $rest_length)) : "");
|
||||
}
|
||||
|
||||
function put_file_lang($match) {
|
||||
global $lang_ids, $project, $langs;
|
||||
if ($_SESSION["lang"]) {
|
||||
@@ -78,23 +126,40 @@ function put_file_lang($match) {
|
||||
include dirname(__FILE__) . "/adminer/lang/$lang.inc.php"; // assign $translations
|
||||
$translation_ids = array_flip($lang_ids); // default translation
|
||||
foreach ($translations as $key => $val) {
|
||||
if (isset($val)) {
|
||||
$translation_ids[$lang_ids[$key]] = $val;
|
||||
if ($val !== null) {
|
||||
$translation_ids[$lang_ids[$key]] = implode("\t", (array) $val);
|
||||
}
|
||||
}
|
||||
$return .= "\tcase \"$lang\": \$translations = array(";
|
||||
foreach ($translation_ids as $val) {
|
||||
$return .= (is_array($val) ? "array('" . implode("', '", array_map('add_apo_slashes', $val)) . "')" : "'" . add_apo_slashes($val) . "'") . ", ";
|
||||
}
|
||||
$return = substr($return, 0, -2) . "); break;\n";
|
||||
$return .= '
|
||||
case "' . $lang . '": $compressed = "' . add_quo_slashes(lzw_compress(implode("\n", $translation_ids))) . '"; break;';
|
||||
}
|
||||
return "switch (\$LANG) {\n$return}\n";
|
||||
$translations_version = crc32($return);
|
||||
return '$translations = &$_SESSION["translations"];
|
||||
if ($_SESSION["translations_version"] != ' . $translations_version . ') {
|
||||
$translations = array();
|
||||
$_SESSION["translations_version"] = ' . $translations_version . ';
|
||||
}
|
||||
|
||||
function get_translations($lang) {
|
||||
switch ($lang) {' . $return . '
|
||||
}
|
||||
$translations = array();
|
||||
foreach (explode("\n", lzw_decompress($compressed)) as $val) {
|
||||
$translations[] = (strpos($val, "\t") ? explode("\t", $val) : $val);
|
||||
}
|
||||
return $translations;
|
||||
}
|
||||
|
||||
if (!$translations) {
|
||||
$translations = get_translations($LANG);
|
||||
}
|
||||
';
|
||||
}
|
||||
|
||||
function short_identifier($number, $chars) {
|
||||
$return = '';
|
||||
while ($number >= 0) {
|
||||
$return .= $chars{$number % strlen($chars)};
|
||||
$return .= $chars[$number % strlen($chars)];
|
||||
$number = floor($number / strlen($chars)) - 1;
|
||||
}
|
||||
return $return;
|
||||
@@ -103,11 +168,38 @@ function short_identifier($number, $chars) {
|
||||
// based on http://latrine.dgx.cz/jak-zredukovat-php-skripty
|
||||
function php_shrink($input) {
|
||||
global $VERSION;
|
||||
$special_variables = array_flip(array('$this', '$GLOBALS', '$_GET', '$_POST', '$_FILES', '$_COOKIE', '$_SESSION', '$_SERVER'));
|
||||
$special_variables = array_flip(array('$this', '$GLOBALS', '$_GET', '$_POST', '$_FILES', '$_COOKIE', '$_SESSION', '$_SERVER', '$http_response_header', '$php_errormsg'));
|
||||
$short_variables = array();
|
||||
$shortening = true;
|
||||
$tokens = token_get_all($input);
|
||||
|
||||
// remove unnecessary { }
|
||||
//! change also `while () { if () {;} }` to `while () if () ;` but be careful about `if () { if () { } } else { }
|
||||
$shorten = 0;
|
||||
$opening = -1;
|
||||
foreach ($tokens as $i => $token) {
|
||||
if (in_array($token[0], array(T_IF, T_ELSE, T_ELSEIF, T_WHILE, T_DO, T_FOR, T_FOREACH), true)) {
|
||||
$shorten = ($token[0] == T_FOR ? 4 : 2);
|
||||
$opening = -1;
|
||||
} elseif (in_array($token[0], array(T_SWITCH, T_FUNCTION, T_CLASS, T_CLOSE_TAG), true)) {
|
||||
$shorten = 0;
|
||||
} elseif ($token === ';') {
|
||||
$shorten--;
|
||||
} elseif ($token === '{') {
|
||||
if ($opening < 0) {
|
||||
$opening = $i;
|
||||
} elseif ($shorten > 1) {
|
||||
$shorten = 0;
|
||||
}
|
||||
} elseif ($token === '}' && $opening >= 0 && $shorten == 1) {
|
||||
unset($tokens[$opening]);
|
||||
unset($tokens[$i]);
|
||||
$shorten = 0;
|
||||
$opening = -1;
|
||||
}
|
||||
}
|
||||
$tokens = array_values($tokens);
|
||||
|
||||
foreach ($tokens as $i => $token) {
|
||||
if ($token[0] === T_VARIABLE && !isset($special_variables[$token[1]])) {
|
||||
$short_variables[$token[1]]++;
|
||||
@@ -115,11 +207,17 @@ function php_shrink($input) {
|
||||
}
|
||||
|
||||
arsort($short_variables);
|
||||
$chars = implode(range('a', 'z')) . '_' . implode(range('A', 'Z'));
|
||||
// preserve variable names between versions if possible
|
||||
$short_variables2 = array_splice($short_variables, strlen($chars));
|
||||
ksort($short_variables);
|
||||
ksort($short_variables2);
|
||||
$short_variables += $short_variables2;
|
||||
foreach (array_keys($short_variables) as $number => $key) {
|
||||
$short_variables[$key] = short_identifier($number, implode(range('a', 'z')) . '_' . implode(range('A', 'Z'))); // could use also numbers and \x7f-\xff
|
||||
$short_variables[$key] = short_identifier($number, $chars); // could use also numbers and \x7f-\xff
|
||||
}
|
||||
|
||||
$set = array_flip(preg_split('//', '!"#$&\'()*+,-./:;<=>?@[\]^`{|}'));
|
||||
$set = array_flip(preg_split('//', '!"#$%&\'()*+,-./:;<=>?@[\]^`{|}'));
|
||||
$space = '';
|
||||
$output = '';
|
||||
$in_echo = false;
|
||||
@@ -129,10 +227,10 @@ function php_shrink($input) {
|
||||
$token = array(0, $token);
|
||||
}
|
||||
if ($tokens[$i+2][0] === T_CLOSE_TAG && $tokens[$i+3][0] === T_INLINE_HTML && $tokens[$i+4][0] === T_OPEN_TAG
|
||||
&& strlen(addcslashes($tokens[$i+3][1], "'\\")) < strlen($tokens[$i+3][1]) + 3
|
||||
&& strlen(add_apo_slashes($tokens[$i+3][1])) < strlen($tokens[$i+3][1]) + 3
|
||||
) {
|
||||
$tokens[$i+2] = array(T_ECHO, 'echo');
|
||||
$tokens[$i+3] = array(T_CONSTANT_ENCAPSED_STRING, "'" . addcslashes($tokens[$i+3][1], "'\\") . "'");
|
||||
$tokens[$i+3] = array(T_CONSTANT_ENCAPSED_STRING, "'" . add_apo_slashes($tokens[$i+3][1]) . "'");
|
||||
$tokens[$i+4] = array(0, ';');
|
||||
}
|
||||
if ($token[0] == T_COMMENT || $token[0] == T_WHITESPACE || ($token[0] == T_DOC_COMMENT && $doc_comment)) {
|
||||
@@ -176,12 +274,35 @@ function php_shrink($input) {
|
||||
}
|
||||
|
||||
function minify_css($file) {
|
||||
return preg_replace('~\\s*([:;{},])\\s*~', '\\1', preg_replace('~/\\*.*\\*/~sU', '', $file));
|
||||
return lzw_compress(preg_replace('~\\s*([:;{},])\\s*~', '\\1', preg_replace('~/\\*.*\\*/~sU', '', $file)));
|
||||
}
|
||||
|
||||
function minify_js($file) {
|
||||
if (function_exists('jsShrink')) {
|
||||
$file = jsShrink($file);
|
||||
}
|
||||
return lzw_compress($file);
|
||||
}
|
||||
|
||||
function compile_file($match) {
|
||||
global $project;
|
||||
return call_user_func($match[2], file_get_contents(dirname(__FILE__) . "/$project/$match[1]"));
|
||||
$file = "";
|
||||
list(, $filenames, $callback) = $match;
|
||||
if ($filenames != "") {
|
||||
foreach (explode(";", $filenames) as $filename) {
|
||||
$file .= file_get_contents(dirname(__FILE__) . "/$project/$filename");
|
||||
}
|
||||
}
|
||||
if ($callback) {
|
||||
$file = call_user_func($callback, $file);
|
||||
}
|
||||
return '"' . add_quo_slashes($file) . '"';
|
||||
}
|
||||
|
||||
$project = "adminer";
|
||||
if ($_SERVER["argv"][1] == "editor") {
|
||||
$project = "editor";
|
||||
array_shift($_SERVER["argv"]);
|
||||
}
|
||||
|
||||
$driver = "";
|
||||
@@ -193,88 +314,97 @@ if (file_exists(dirname(__FILE__) . "/adminer/drivers/" . $_SERVER["argv"][1] .
|
||||
unset($_COOKIE["adminer_lang"]);
|
||||
$_SESSION["lang"] = $_SERVER["argv"][1]; // Adminer functions read language from session
|
||||
include dirname(__FILE__) . "/adminer/include/lang.inc.php";
|
||||
if (isset($_SESSION["lang"])) {
|
||||
if (isset($_SERVER["argv"][2]) || !isset($langs[$_SESSION["lang"]])) {
|
||||
echo "Usage: php compile.php [lang]\nPurpose: Compile adminer[-lang].php and editor[-lang].php.\n";
|
||||
exit(1);
|
||||
}
|
||||
if (isset($langs[$_SESSION["lang"]])) {
|
||||
include dirname(__FILE__) . "/adminer/lang/$_SESSION[lang].inc.php";
|
||||
array_shift($_SERVER["argv"]);
|
||||
}
|
||||
|
||||
if ($_SERVER["argv"][1]) {
|
||||
echo "Usage: php compile.php [editor] [driver] [lang]\n";
|
||||
echo "Purpose: Compile adminer[-driver][-lang].php or editor[-driver][-lang].php.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// check function definition in drivers
|
||||
$filename = dirname(__FILE__) . "/adminer/drivers/mysql.inc.php";
|
||||
preg_match_all('~\\bfunction ([^(]+)~', file_get_contents($filename), $matches); //! respect context (extension, class)
|
||||
$functions = array_combine($matches[1], $matches[0]);
|
||||
unset($functions["__destruct"], $functions["Min_DB"], $functions["Min_Result"]);
|
||||
unset($functions["__destruct"], $functions["Min_DB"], $functions["Min_Result"], $functions["Min_Driver"]);
|
||||
foreach (glob(dirname(__FILE__) . "/adminer/drivers/" . ($driver ? $driver : "*") . ".inc.php") as $filename) {
|
||||
if ($filename != "mysql.inc.php") {
|
||||
$file = file_get_contents($filename);
|
||||
foreach ($functions as $val) {
|
||||
if (!strpos($file, "$val(")) {
|
||||
echo "Missing $val in $filename\n";
|
||||
fprintf(STDERR, "Missing $val in $filename\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include dirname(__FILE__) . "/adminer/include/pdo.inc.php";
|
||||
include dirname(__FILE__) . "/adminer/include/driver.inc.php";
|
||||
$features = array("call" => "routine", "dump", "event", "privileges", "procedure" => "routine", "processlist", "routine", "scheme", "sequence", "status", "trigger", "type", "user" => "privileges", "variables", "view");
|
||||
foreach (array("adminer", "editor") as $project) {
|
||||
$lang_ids = array(); // global variable simplifies usage in a callback function
|
||||
$file = file_get_contents(dirname(__FILE__) . "/$project/index.php");
|
||||
if ($driver) {
|
||||
$connection = (object) array("server_info" => 5.1); // MySQL support is version specific
|
||||
$_GET[$driver] = true; // to load the driver
|
||||
include_once dirname(__FILE__) . "/adminer/drivers/$driver.inc.php";
|
||||
foreach ($features as $key => $feature) {
|
||||
if (!support($feature)) {
|
||||
if (!is_int($key)) {
|
||||
$feature = $key;
|
||||
}
|
||||
$file = str_replace("} elseif (isset(\$_GET[\"$feature\"])) {\n\tinclude \"./$feature.inc.php\";\n", "", $file);
|
||||
$lang_ids = array(); // global variable simplifies usage in a callback function
|
||||
$file = file_get_contents(dirname(__FILE__) . "/$project/index.php");
|
||||
if ($driver) {
|
||||
$connection = (object) array("server_info" => 5.1); // MySQL support is version specific
|
||||
$_GET[$driver] = true; // to load the driver
|
||||
include_once dirname(__FILE__) . "/adminer/drivers/$driver.inc.php";
|
||||
foreach ($features as $key => $feature) {
|
||||
if (!support($feature)) {
|
||||
if (!is_int($key)) {
|
||||
$feature = $key;
|
||||
}
|
||||
}
|
||||
if (!support("routine")) {
|
||||
$file = str_replace("if (isset(\$_GET[\"callf\"])) {\n\t\$_GET[\"call\"] = \$_GET[\"callf\"];\n}\nif (isset(\$_GET[\"function\"])) {\n\t\$_GET[\"procedure\"] = \$_GET[\"function\"];\n}\n", "", $file);
|
||||
$file = str_replace("} elseif (isset(\$_GET[\"$feature\"])) {\n\tinclude \"./$feature.inc.php\";\n", "", $file);
|
||||
}
|
||||
}
|
||||
$file = preg_replace_callback('~\\b(include|require) "([^"]*)";~', 'put_file', $file);
|
||||
$file = str_replace('include "../adminer/include/coverage.inc.php";', '', $file);
|
||||
if ($driver) {
|
||||
$file = preg_replace('(include "../adminer/drivers/(?!' . preg_quote($driver) . ').*\\s*)', '', $file);
|
||||
if (!support("routine")) {
|
||||
$file = str_replace("if (isset(\$_GET[\"callf\"])) {\n\t\$_GET[\"call\"] = \$_GET[\"callf\"];\n}\nif (isset(\$_GET[\"function\"])) {\n\t\$_GET[\"procedure\"] = \$_GET[\"function\"];\n}\n", "", $file);
|
||||
}
|
||||
$file = preg_replace_callback('~\\b(include|require) "([^"]*)";~', 'put_file', $file); // bootstrap.inc.php
|
||||
if ($driver) {
|
||||
foreach ($features as $feature) {
|
||||
if (!support($feature)) {
|
||||
$file = preg_replace("((\t*)" . preg_quote('if (support("' . $feature . '")') . ".*\n\\1\\})sU", '', $file);
|
||||
}
|
||||
}
|
||||
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 = preg_replace_callback("~lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])~s", 'lang_ids', $file);
|
||||
$file = preg_replace_callback('~\\b(include|require) "([^"]*\\$LANG.inc.php)";~', 'put_file_lang', $file);
|
||||
$file = str_replace("\r", "", $file);
|
||||
if ($_SESSION["lang"]) {
|
||||
// single language version
|
||||
$file = preg_replace_callback("~(<\\?php\\s*echo )?lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])(;\\s*\\?>)?~s", 'remove_lang', $file);
|
||||
$file = str_replace("<?php switch_lang(); ?>\n", "", $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 = preg_replace_callback("~compile_file\\('([^']+)', '([^']+)'\\);~", 'compile_file', $file); // integrate static files
|
||||
$replace = 'h(preg_replace("~\\\\\\\\?.*~", "", ME)) . "?file=\\1&version=' . $VERSION;
|
||||
$file = preg_replace("~'\\.\\./adminer/static/(loader\\.gif)~", "location.pathname+'?file=\\1&version=$VERSION", $file);
|
||||
$file = preg_replace('~\\.\\./adminer/static/(loader\\.gif)~', "'+location.pathname+'?file=\\1&version=$VERSION", $file);
|
||||
$file = preg_replace('~\\.\\./adminer/static/(default\\.css|functions\\.js|favicon\\.ico)~', '<?php echo ' . $replace . '"; ?>', $file);
|
||||
$file = preg_replace('~\\.\\./adminer/static/([^\'"]*)~', '" . ' . $replace, $file);
|
||||
$file = str_replace("'../externals/jush/'", "location.protocol + '//www.adminer.org/static/'", $file);
|
||||
$file = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $file);
|
||||
$file = php_shrink($file);
|
||||
|
||||
$filename = $project . (preg_match('~-dev$~', $VERSION) ? "" : "-$VERSION") . ($driver ? "-$driver" : "") . ($_SESSION["lang"] ? "-$_SESSION[lang]" : "") . ".php";
|
||||
fwrite(fopen($filename, "w"), $file); // file_put_contents() since PHP 5
|
||||
echo "$filename created (" . strlen($file) . " B).\n";
|
||||
}
|
||||
$file = preg_replace_callback('~\\b(include|require) "([^"]*)";~', 'put_file', $file);
|
||||
$file = str_replace('include "../adminer/include/coverage.inc.php";', '', $file);
|
||||
if ($driver) {
|
||||
$file = preg_replace('(include "../adminer/drivers/(?!' . preg_quote($driver) . '\.).*\\s*)', '', $file);
|
||||
}
|
||||
$file = preg_replace_callback('~\\b(include|require) "([^"]*)";~', 'put_file', $file); // bootstrap.inc.php
|
||||
if ($driver) {
|
||||
foreach ($features as $feature) {
|
||||
if (!support($feature)) {
|
||||
$file = preg_replace("((\t*)" . preg_quote('if (support("' . $feature . '")') . ".*\n\\1\\})sU", '', $file);
|
||||
}
|
||||
}
|
||||
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 = preg_replace('(;../externals/jush/modules/jush-(?!textarea\.|txt\.|' . preg_quote($driver == "mysql" ? "sql" : $driver) . '\.)[^.]+.js)', '', $file);
|
||||
}
|
||||
if ($project == "editor") {
|
||||
$file = preg_replace('~;../externals/jush/jush.css~', '', $file);
|
||||
$file = preg_replace('~;?../externals/jush/modules/jush[^.]*.js~', '', $file);
|
||||
}
|
||||
$file = preg_replace_callback("~lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])~s", 'lang_ids', $file);
|
||||
$file = preg_replace_callback('~\\b(include|require) "([^"]*\\$LANG.inc.php)";~', 'put_file_lang', $file);
|
||||
$file = str_replace("\r", "", $file);
|
||||
if ($_SESSION["lang"]) {
|
||||
// single language version
|
||||
$file = preg_replace_callback("~(<\\?php\\s*echo )?lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])(;\\s*\\?>)?~s", 'remove_lang', $file);
|
||||
$file = str_replace("<?php switch_lang(); ?>\n", "", $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('<script type="text/javascript" src="../externals/jush/modules/jush-textarea.js"></script>' . "\n", "", $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 = preg_replace_callback("~compile_file\\('([^']+)'(?:, '([^']*)')?\\)~", 'compile_file', $file); // integrate static files
|
||||
$replace = 'h(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/([^\'"]*)~', '" . ' . $replace, $file);
|
||||
$file = preg_replace('~\\.\\./externals/jush/modules/(jush\\.js)~', '<?php echo ' . $replace . '"; ?>', $file);
|
||||
$file = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $file);
|
||||
$file = php_shrink($file);
|
||||
|
||||
$filename = $project . (preg_match('~-dev$~', $VERSION) ? "" : "-$VERSION") . ($driver ? "-$driver" : "") . ($_SESSION["lang"] ? "-$_SESSION[lang]" : "") . ".php";
|
||||
file_put_contents($filename, $file);
|
||||
echo "$filename created (" . strlen($file) . " B).\n";
|
||||
|
||||
31
composer.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "vrana/adminer",
|
||||
"description": "Database management in a single PHP file.",
|
||||
"homepage": "http://www.adminer.org/",
|
||||
"keywords": [
|
||||
"database"
|
||||
],
|
||||
"support": {
|
||||
"issues": "http://sourceforge.net/p/adminer/bugs-and-features/",
|
||||
"forum": "http://sourceforge.net/p/adminer/discussion/",
|
||||
"source": "https://github.com/vrana/adminer/"
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jakub Vrána",
|
||||
"homepage": "http://www.vrana.cz/"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"plugins/"
|
||||
]
|
||||
},
|
||||
"license": [
|
||||
"Apache-2.0",
|
||||
"GPL-2.0"
|
||||
],
|
||||
"scripts": {
|
||||
"compile": "php compile.php"
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ if (!extension_loaded("xdebug")) {
|
||||
$filename = $_GET["coverage"];
|
||||
$coverage = (file_exists($coverage_filename) ? unserialize(file_get_contents($coverage_filename)) : array());
|
||||
$file = explode("<br />", highlight_file($filename, true));
|
||||
unset($prev_color);
|
||||
$prev_color = null;
|
||||
$s = "";
|
||||
for ($l=0; $l <= count($file); $l++) {
|
||||
$line = $file[$l];
|
||||
@@ -43,10 +43,10 @@ if (!extension_loaded("xdebug")) {
|
||||
case -2: $color = "Silver"; break; // dead code
|
||||
case null: $color = ""; break; // not executable
|
||||
}
|
||||
if (!isset($prev_color)) {
|
||||
if ($prev_color === null) {
|
||||
$prev_color = $color;
|
||||
}
|
||||
if ($prev_color != $color || !isset($line)) {
|
||||
if ($prev_color != $color || $line === null) {
|
||||
echo "<div" . ($prev_color ? " style='background-color: $prev_color;'" : "") . ">$s";
|
||||
$open_tags = xhtml_open_tags($s);
|
||||
foreach (array_reverse($open_tags) as $tag) {
|
||||
|
||||
@@ -56,3 +56,7 @@ outline:0;background:url(http://www.bradezone.com/random/adminer_logo.gif) no-re
|
||||
* html #lang,* html #menu,* html #breadcrumb{position:absolute}
|
||||
* html #lang{padding-top:10px;height:30px}
|
||||
* html form#form{height:100%}
|
||||
#logins a,#tables a{background: none}
|
||||
#logout{color:#333;text-decoration:none;border-bottom:1px dotted}
|
||||
#logout:hover{border-color:#333;background:#333;color:#fff}
|
||||
.js .column{background:#ddd}
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
/**
|
||||
* Alternative style for Adminer by Frank Bueltge
|
||||
* @link http://bueltge.de/
|
||||
/**
|
||||
* Alternative style for Adminer by Frank Bültge
|
||||
*
|
||||
* @link http://bueltge.de/
|
||||
* @version 02/18/2014
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
line-height: 1.25em;
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
line-height: 1.4em;
|
||||
background: #F9F9F9;
|
||||
color: #333;
|
||||
}
|
||||
body, select, option, optgroup, button {
|
||||
font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
|
||||
@@ -20,27 +23,67 @@ font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0.8em 20px 0 5px
|
||||
}
|
||||
|
||||
a {
|
||||
color: #21759B;
|
||||
background: none !important;
|
||||
}
|
||||
a:visited {
|
||||
color: #21759B;
|
||||
}
|
||||
a:hover {
|
||||
a:hover, a:hover {
|
||||
text-decoration: none;
|
||||
color: #D54E21;
|
||||
color: #d54e21;
|
||||
}
|
||||
a:focus {
|
||||
background: #c7e7fd;
|
||||
color: #124964;
|
||||
}
|
||||
a:active {
|
||||
background: none;
|
||||
outline: thin dotted;
|
||||
}
|
||||
|
||||
a.active, a.active + a {
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
form {
|
||||
margin: 0;
|
||||
padding: 0 0 0 5px;
|
||||
}
|
||||
table {
|
||||
margin: 0 12px 12px 0;
|
||||
table {
|
||||
width: 100%;
|
||||
clear: both;
|
||||
margin: 0;
|
||||
border-spacing: 0;
|
||||
border-collapse: separate;
|
||||
border-color: gray;
|
||||
}
|
||||
table, thead, tbody {
|
||||
margin: 10px 12px 0 0;
|
||||
border: 1px #BBB solid;
|
||||
font-size: 90%;
|
||||
}
|
||||
thead th, thead td {
|
||||
text-align: center;
|
||||
}
|
||||
td {
|
||||
white-space: normal;
|
||||
overflow: hidden;
|
||||
padding: 0 4px;
|
||||
}
|
||||
th {
|
||||
text-align: left;
|
||||
font-weight: 400;
|
||||
}
|
||||
td, th {
|
||||
background-color: #fff;
|
||||
@@ -54,9 +97,14 @@ border-top-width: 0;
|
||||
td:first-child, th:first-child {
|
||||
border-left-width: 0;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
vertical-align: middle;
|
||||
border-color: inherit;
|
||||
}
|
||||
thead td, thead th {
|
||||
background-color: #DFDFDF;
|
||||
border: none;
|
||||
border: none;
|
||||
border-bottom: 1px #BBB solid;
|
||||
}
|
||||
thead tr:hover td, thead tr:hover th {
|
||||
@@ -85,19 +133,21 @@ fieldset, x:-moz-any-link {
|
||||
padding-top: 4px;
|
||||
}
|
||||
fieldset {
|
||||
%padding-top: 14px;
|
||||
padding-top: 14px;
|
||||
}
|
||||
legend {
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
position: absolute;
|
||||
top: -1.666em;
|
||||
left: -1em;
|
||||
padding: 0 4px;
|
||||
}
|
||||
input[name='limit'], input[name*='length'] {
|
||||
input {
|
||||
padding: 2px 5px 1px 5px;
|
||||
}
|
||||
input[name='limit'], input[name='length'] {
|
||||
width: 3em;
|
||||
xtext-align: right;
|
||||
text-align: right;
|
||||
}
|
||||
input[name='text_length'] {
|
||||
width: 5em;
|
||||
@@ -108,39 +158,83 @@ margin-left: 2px;
|
||||
textarea, input, select {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-moz-border-radius: 4px;
|
||||
-khtml-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-moz-border-radius: 3px;
|
||||
-khtml-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
border-color: #DFDFDF;
|
||||
}
|
||||
select {
|
||||
margin: 0 0 1px 0;
|
||||
}
|
||||
input[type="checkbox"], input[type="radio"], input[type="image"] {
|
||||
border: 0 none;
|
||||
}
|
||||
input[type=button], input[type=submit] {
|
||||
border-color: #bbb;
|
||||
color: #464646;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
font-size: 12px;
|
||||
line-height: 15px;
|
||||
padding: 1px 0 0 0;
|
||||
cursor: pointer;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
white-space: nowrap;
|
||||
border-color: #dfdfdf;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
}
|
||||
input[type=button]:hover, input[type=submit]:hover {
|
||||
color: #000;
|
||||
border-color: #666;
|
||||
input[type="button"]:focus, input[type=submit] {
|
||||
border-color: #a1a1a1;
|
||||
-webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
|
||||
box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
|
||||
}
|
||||
input[type=button], input[type=submit] {
|
||||
text-decoration: none;
|
||||
font-size: 11px !important;
|
||||
line-height: 14px;
|
||||
padding: 2px 8px;
|
||||
cursor: pointer;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-moz-border-radius: 11px;
|
||||
-khtml-border-radius: 11px;
|
||||
-webkit-border-radius: 11px;
|
||||
border-radius: 11px;
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box;
|
||||
-khtml-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
padding: 2px 5px 1px 5px;
|
||||
background: #ececec;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#eee));
|
||||
background-image: -webkit-linear-gradient(top, #fff, #eee);
|
||||
background-image: -moz-linear-gradient(top, #fff, #eee);
|
||||
background-image: -o-linear-gradient(top, #fff, #eee);
|
||||
background-image: linear-gradient(to bottom, #fff, #eee);
|
||||
border-color: #ccc;
|
||||
-webkit-box-shadow: inset 0 0 1px 1px rgba(255,255,255, 0.9);
|
||||
box-shadow: inset 0 0 1px 1px rgba(255,255,255, 0.9);
|
||||
color: #464646;
|
||||
text-shadow: 1px 1px 0 #fff;
|
||||
}
|
||||
input[type=button]:hover, input[type=submit]:hover,
|
||||
input[type=button]:focus, input[type=submit]:focus {
|
||||
background: #ececec;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#eee));
|
||||
background-image: -webkit-linear-gradient(top, #fff, #eee);
|
||||
background-image: -moz-linear-gradient(top, #fff, #eee);
|
||||
background-image: -o-linear-gradient(top, #fff, #eee);
|
||||
background-image: linear-gradient(to bottom, #fff, #eee);
|
||||
border-color: #bbb;
|
||||
-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,.1);
|
||||
box-shadow: 0px 1px 1px rgba(0,0,0,.1);
|
||||
color: #000;
|
||||
}
|
||||
input[type=button]:active, input[type=submit]:active {
|
||||
background: #eee;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#f9f9f9));
|
||||
background-image: -webkit-linear-gradient(top, #eee, #f9f9f9);
|
||||
background-image: -moz-linear-gradient(top, #eee, #f9f9f9);
|
||||
background-image: -o-linear-gradient(top, #eee, #f9f9f9);
|
||||
background-image: linear-gradient(to bottom, #eee, #f9f9f9);
|
||||
border-color: #999 #ddd #ddd #999;
|
||||
color: #555;
|
||||
-webkit-box-shadow: inset 1px 1px 0 rgba(50,50,50,0.1);
|
||||
box-shadow: inset 1px 1px 0 rgba(50,50,50,0.1);
|
||||
}
|
||||
input[type=button]:focus, input[type=submit]:focus {
|
||||
border-color: #aaa;
|
||||
}
|
||||
input + label input, select + label input {
|
||||
margin-left: 4px;
|
||||
@@ -166,6 +260,11 @@ vertical-align: middle;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.js .column {
|
||||
position: relative;
|
||||
background: none;
|
||||
padding: 0;
|
||||
}
|
||||
.error {
|
||||
padding: 8px;
|
||||
color: red;
|
||||
@@ -190,17 +289,20 @@ color: red;
|
||||
.jush-sql {
|
||||
padding: 2px 4px;
|
||||
margin-right: 4px;
|
||||
outline: 1px #BBB dashed;
|
||||
font-size: 9pt;
|
||||
font-size: 11px;
|
||||
}
|
||||
.time {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#content {
|
||||
margin: 2px 0 0 260px;
|
||||
margin: 2px 0 0 270px;
|
||||
padding: 10px 20px 20px 0;
|
||||
}
|
||||
#lang {
|
||||
#lang {
|
||||
font-size:10px;
|
||||
height: 23px;
|
||||
width: 250px;
|
||||
width: 255px;
|
||||
display: block;
|
||||
padding: 1px 0;
|
||||
position: absolute;
|
||||
@@ -212,7 +314,7 @@ border: 1px solid #E3E3E3;
|
||||
line-height: 1.25em;
|
||||
}
|
||||
#lang select {
|
||||
font-size: 8pt;
|
||||
font-size: 10px;
|
||||
}
|
||||
#breadcrumb {
|
||||
margin: 0;
|
||||
@@ -220,7 +322,7 @@ height: 21px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 260px;
|
||||
left: 270px;
|
||||
background-color: #f1f1f1;
|
||||
border: 1px solid #E3E3E3;
|
||||
padding: 2px 12px;
|
||||
@@ -230,7 +332,7 @@ position: absolute;
|
||||
margin: 0;
|
||||
top: 28px;
|
||||
left: 0;
|
||||
width: 250px;
|
||||
width: 255px;
|
||||
background-color: #f1f1f1;
|
||||
border: 1px solid #E3E3E3;
|
||||
}
|
||||
@@ -239,9 +341,11 @@ margin: 0;
|
||||
}
|
||||
#menu p {
|
||||
padding-left: 8px;
|
||||
font-size: 10pt;
|
||||
border-bottom: none;
|
||||
}
|
||||
#dbs {
|
||||
padding: 0 !important;
|
||||
}
|
||||
#menu form p {
|
||||
padding-left: 0;
|
||||
text-align: left;
|
||||
@@ -257,19 +361,15 @@ line-height: 35px;
|
||||
text-shadow: rgba(255,255,255,1) 0 1px 0px;
|
||||
background: none;
|
||||
}
|
||||
h1 {
|
||||
font-size: 12px;
|
||||
}
|
||||
h1 .h1 {
|
||||
font-size: 12px;
|
||||
}
|
||||
h2 {
|
||||
padding: 22px 0 0 10px;
|
||||
}
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
font-weight: 400;
|
||||
font-size: 130%;
|
||||
h3 {
|
||||
font: normal normal normal 18px/22px Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
|
||||
margin: 20px 0 0 5px;
|
||||
}
|
||||
#schema {
|
||||
margin: 1.5em 0 0 220px;
|
||||
@@ -286,7 +386,7 @@ position: absolute;
|
||||
position: absolute;
|
||||
}
|
||||
.js .hidden {
|
||||
display: inline;
|
||||
display: hidden;
|
||||
}
|
||||
.js td.hidden, .js input.hidden {
|
||||
display: none;
|
||||
@@ -302,27 +402,27 @@ color: #333;
|
||||
code {
|
||||
background: transparent;
|
||||
}
|
||||
fieldset, legend, h2, table, .error, .message {
|
||||
-moz-border-radius: 5px;
|
||||
-khtml-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
fieldset, legend, table, thead, tbody, .error, .message {
|
||||
-moz-border-radius: 3px;
|
||||
-khtml-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
#breadcrumb, #lang, #menu {
|
||||
-moz-border-radius-bottomright: 5px;
|
||||
-khtml-border-bottom-right-radius: 5px;
|
||||
-webkit-border-bottom-right-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
-moz-border-radius-bottomright: 3px;
|
||||
-khtml-border-bottom-right-radius: 3px;
|
||||
-webkit-border-bottom-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
#breadcrumb {
|
||||
-moz-border-radius-bottomleft: 5px;
|
||||
-khtml-border-bottom-left-radius: 5px;
|
||||
-webkit-border-bottom-left-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
-moz-border-radius-bottomleft: 3px;
|
||||
-khtml-border-bottom-left-radius: 3px;
|
||||
-webkit-border-bottom-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
#menu {
|
||||
-moz-border-radius-topright: 5px;
|
||||
-khtml-border-top-right-radius: 5px;
|
||||
-webkit-border-top-right-radius: 5px;
|
||||
border-bottom-top-radius: 5px;
|
||||
-khtml-border-top-right-radius: 3px;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||