Compare commits
44 commits
feature/ph
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
980dea41de | ||
|
6bb4d778cb | ||
|
39257c8e81 | ||
|
d065ec4e9f | ||
|
2eba0b5154 | ||
|
e0b4854e8c | ||
|
3e3eff6d69 | ||
|
1e517cea68 | ||
|
2a5e8b6c21 | ||
|
f1e13af925 | ||
|
3bec52f278 | ||
|
3430f24a54 | ||
|
1bd4d4fc19 | ||
|
438739b1f6 | ||
|
027816adf2 | ||
|
a5aaa593d3 | ||
|
a0f4c9be28 | ||
|
4554780092 | ||
|
07b3dc3f1d | ||
|
9d835d3ed2 | ||
|
7130a8c058 | ||
|
d5ccd05355 | ||
|
be5d174dd7 | ||
|
bad57d349e | ||
|
40f04571ed | ||
|
cb37e4568b | ||
|
bc44e5f676 | ||
|
27132d1175 | ||
|
55d40f8563 | ||
|
0f52b4f3d3 | ||
|
f9c33e6e19 | ||
|
5798a285e8 | ||
|
1fca093e51 | ||
|
c93adaabea | ||
|
28d9543c14 | ||
|
8bcb334146 | ||
|
d4f1fc0ee0 | ||
|
d7a9c10158 | ||
|
3c77899250 | ||
|
c3fcff0f56 | ||
|
92f68d8dff | ||
|
471915e289 | ||
|
1177e98b3f | ||
|
1f14b418ee |
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
||||||
/adminer*.php
|
/adminer*.php
|
||||||
/editor*.php
|
/editor*.php
|
||||||
/vendor/
|
/vendor/
|
||||||
|
/.idea
|
||||||
|
|
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
[submodule "jush"]
|
||||||
|
path = externals/jush
|
||||||
|
url = https://github.com/vrana/jush
|
||||||
|
[submodule "JsShrink"]
|
||||||
|
path = externals/JsShrink
|
||||||
|
url = https://github.com/vrana/JsShrink
|
||||||
[submodule "designs/hydra"]
|
[submodule "designs/hydra"]
|
||||||
path = designs/hydra
|
path = designs/hydra
|
||||||
url = https://github.com/Niyko/Hydra-Dark-Theme-for-Adminer
|
url = https://github.com/Niyko/Hydra-Dark-Theme-for-Adminer
|
||||||
|
|
202
LICENSE.Apache-2.0
Normal file
202
LICENSE.Apache-2.0
Normal file
|
@ -0,0 +1,202 @@
|
||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
339
LICENSE.GPL-2.0-only
Normal file
339
LICENSE.GPL-2.0-only
Normal file
|
@ -0,0 +1,339 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License.
|
|
@ -3,19 +3,26 @@
|
||||||
**Adminer** - Database management in a single PHP file
|
**Adminer** - Database management in a single PHP file
|
||||||
**Adminer Editor** - Data manipulation for end-users
|
**Adminer Editor** - Data manipulation for end-users
|
||||||
|
|
||||||
### A bit of history
|
## A bit of history
|
||||||
|
|
||||||
The original Adminer was created and maintained by Jakub Vrána in the [vrana/adminer](https://github.com/vrana/adminer) repository.
|
The original Adminer was created and maintained by Jakub Vrána in the [vrana/adminer](https://github.com/vrana/adminer) repository.
|
||||||
Not being maintained for more than two years and being a daily user of Adminer, I've tried to get in touch with the original developer to propose my help to continue the project, but without success, I got no answer.
|
Not being maintained for more than two years and being a daily user of Adminer, I've tried to get in touch with the original developer to propose my help to continue the project, but without success, I got no answer.
|
||||||
I have then started to search if someone would be interested in continuing the project with me and found someone who seemed to have the same interest and view on the future of this project.
|
I have then started to search if someone would be interested in continuing the project with me and found someone who seemed to have the same interest and view on the future of this project.
|
||||||
I am now starting to take over the project under a slightly different name and will try to keep compatibility with all current database engines but also to give Adminer a new features, layout, etc.
|
I am now starting to take over the project under a slightly different name and will try to keep compatibility with all current database engines but also to give Adminer a new features, layout, etc.
|
||||||
|
|
||||||
### Before participating
|
## Before participating
|
||||||
|
|
||||||
Before you start developing around AdminerEvo, please carefully read the roadmap, the status of open issues, and even get in touch with us.
|
Before you start developing around AdminerEvo, please carefully read the roadmap, the status of open issues, and even get in touch with us.
|
||||||
It would be sad spending time/energy on development of a feature which would not be accepted into the main project.
|
It would be sad spending time/energy on development of a feature which would not be accepted into the main project.
|
||||||
|
|
||||||
### Information from the original developer
|
## License
|
||||||
|
|
||||||
|
This work is dual-licensed under Apache 2.0 and GPL 2.0.
|
||||||
|
You can choose between either one of them if you use this work.
|
||||||
|
|
||||||
|
`SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-only`
|
||||||
|
|
||||||
|
## Information from the original developer
|
||||||
|
|
||||||
|||
|
|||
|
||||||
|---|---|
|
|---|---|
|
|
@ -22,26 +22,17 @@ if ($TABLE != "") {
|
||||||
}
|
}
|
||||||
|
|
||||||
$row = $_POST;
|
$row = $_POST;
|
||||||
if (isset($row["fields"])) {
|
|
||||||
$row["fields"] = (array) $row["fields"];
|
$row["fields"] = (array) $row["fields"];
|
||||||
}
|
if ($row["auto_increment_col"]) {
|
||||||
if (isset($row["auto_increment_col"]) && $row["auto_increment_col"]) {
|
|
||||||
$row["fields"][$row["auto_increment_col"]]["auto_increment"] = true;
|
$row["fields"][$row["auto_increment_col"]]["auto_increment"] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST) {
|
if ($_POST) {
|
||||||
$array = [];
|
set_adminer_settings(array("comments" => $_POST["comments"], "defaults" => $_POST["defaults"]));
|
||||||
if (isset($_POST["comments"])) {
|
|
||||||
$array["comments"] = $_POST["comments"];
|
|
||||||
}
|
|
||||||
if (isset($_POST["defaults"])) {
|
|
||||||
$array["defaults"] = $_POST["defaults"];
|
|
||||||
}
|
|
||||||
set_adminer_settings($array);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST && !process_fields($row["fields"]) && !$error) {
|
if ($_POST && !process_fields($row["fields"]) && !$error) {
|
||||||
if (isset($_POST["drop"]) && $_POST["drop"]) {
|
if ($_POST["drop"]) {
|
||||||
queries_redirect(substr(ME, 0, -1), lang('Table has been dropped.'), drop_tables(array($TABLE)));
|
queries_redirect(substr(ME, 0, -1), lang('Table has been dropped.'), drop_tables(array($TABLE)));
|
||||||
} else {
|
} else {
|
||||||
$fields = array();
|
$fields = array();
|
||||||
|
@ -52,16 +43,13 @@ if ($_POST && !process_fields($row["fields"]) && !$error) {
|
||||||
$after = " FIRST";
|
$after = " FIRST";
|
||||||
|
|
||||||
foreach ($row["fields"] as $key => $field) {
|
foreach ($row["fields"] as $key => $field) {
|
||||||
$foreign_key = null;
|
|
||||||
if (isset($field["type"]) && isset($foreign_keys[$field["type"]])) {
|
|
||||||
$foreign_key = $foreign_keys[$field["type"]];
|
$foreign_key = $foreign_keys[$field["type"]];
|
||||||
}
|
|
||||||
$type_field = ($foreign_key !== null ? $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["field"] != "") {
|
||||||
if (isset($field["has_default"]) === false || !$field["has_default"]) {
|
if (!$field["has_default"]) {
|
||||||
$field["default"] = null;
|
$field["default"] = null;
|
||||||
}
|
}
|
||||||
if (isset($row["auto_increment_col"]) && $key == $row["auto_increment_col"]) {
|
if ($key == $row["auto_increment_col"]) {
|
||||||
$field["auto_increment"] = true;
|
$field["auto_increment"] = true;
|
||||||
}
|
}
|
||||||
$process_field = process_field($field, $type_field);
|
$process_field = process_field($field, $type_field);
|
||||||
|
@ -135,7 +123,7 @@ page_header(($TABLE != "" ? lang('Alter table') : lang('Create table')), $error,
|
||||||
|
|
||||||
if (!$_POST) {
|
if (!$_POST) {
|
||||||
$row = array(
|
$row = array(
|
||||||
"Engine" => (isset($_COOKIE["adminer_engine"]) ? $_COOKIE["adminer_engine"] : null),
|
"Engine" => $_COOKIE["adminer_engine"],
|
||||||
"fields" => array(array("field" => "", "type" => (isset($types["int"]) ? "int" : (isset($types["integer"]) ? "integer" : "")), "on_update" => "")),
|
"fields" => array(array("field" => "", "type" => (isset($types["int"]) ? "int" : (isset($types["integer"]) ? "integer" : "")), "on_update" => "")),
|
||||||
"partition_names" => array(""),
|
"partition_names" => array(""),
|
||||||
);
|
);
|
||||||
|
@ -144,7 +132,7 @@ if (!$_POST) {
|
||||||
$row = $table_status;
|
$row = $table_status;
|
||||||
$row["name"] = $TABLE;
|
$row["name"] = $TABLE;
|
||||||
$row["fields"] = array();
|
$row["fields"] = array();
|
||||||
if (isset($_GET["auto_increment"]) === false || !$_GET["auto_increment"]) { // don't prefill by original Auto_increment for the sake of performance and not reusing deleted ids
|
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["Auto_increment"] = "";
|
||||||
}
|
}
|
||||||
foreach ($orig_fields as $field) {
|
foreach ($orig_fields as $field) {
|
||||||
|
@ -178,7 +166,7 @@ foreach ($engines as $engine) {
|
||||||
<form action="" method="post" id="form">
|
<form action="" method="post" id="form">
|
||||||
<p>
|
<p>
|
||||||
<?php if (support("columns") || $TABLE == "") { ?>
|
<?php if (support("columns") || $TABLE == "") { ?>
|
||||||
<?php echo lang('Table name'); ?>: <input name="name" data-maxlength="64" value="<?php echo h(isset($row["name"]) ? $row["name"] : null); ?>" autocapitalize="off">
|
<?php echo lang('Table name'); ?>: <input name="name" data-maxlength="64" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
|
||||||
<?php if ($TABLE == "" && !$_POST) { echo script("focus(qs('#form')['name']);"); } ?>
|
<?php if ($TABLE == "" && !$_POST) { echo script("focus(qs('#form')['name']);"); } ?>
|
||||||
<?php echo ($engines ? "<select name='Engine'>" . optionlist(array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) . "</select>" . on_help("getTarget(event).value", 1) . script("qsl('select').onchange = helpClose;") : ""); ?>
|
<?php echo ($engines ? "<select name='Engine'>" . optionlist(array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) . "</select>" . on_help("getTarget(event).value", 1) . script("qsl('select').onchange = helpClose;") : ""); ?>
|
||||||
<?php echo ($collations && !preg_match("~sqlite|mssql~", $jush) ? html_select("Collation", array("" => "(" . lang('collation') . ")") + $collations, $row["Collation"]) : ""); ?>
|
<?php echo ($collations && !preg_match("~sqlite|mssql~", $jush) ? html_select("Collation", array("" => "(" . lang('collation') . ")") + $collations, $row["Collation"]) : ""); ?>
|
||||||
|
@ -201,9 +189,9 @@ edit_fields($row["fields"], $collations, "TABLE", $foreign_keys);
|
||||||
$comments = ($_POST ? $_POST["comments"] : adminer_setting("comments"));
|
$comments = ($_POST ? $_POST["comments"] : adminer_setting("comments"));
|
||||||
echo (support("comment")
|
echo (support("comment")
|
||||||
? checkbox("comments", 1, $comments, lang('Comment'), "editingCommentsClick(this, true);", "jsonly")
|
? checkbox("comments", 1, $comments, lang('Comment'), "editingCommentsClick(this, true);", "jsonly")
|
||||||
. ' ' . (preg_match('~\n~', isset($row["Comment"]) ? $row["Comment"] : null)
|
. ' ' . (preg_match('~\n~', $row["Comment"])
|
||||||
? "<textarea name='Comment' rows='2' cols='20'" . ($comments ? "" : " class='hidden'") . ">" . h($row["Comment"]) . "</textarea>"
|
? "<textarea name='Comment' rows='2' cols='20'" . ($comments ? "" : " class='hidden'") . ">" . h($row["Comment"]) . "</textarea>"
|
||||||
: '<input name="Comment" value="' . h(isset($row["Comment"]) ? $row["Comment"] : null) . '" data-maxlength="' . (min_version(5.5) ? 2048 : 60) . '"' . ($comments ? "" : " class='hidden'") . '>'
|
: '<input name="Comment" value="' . h($row["Comment"]) . '" data-maxlength="' . (min_version(5.5) ? 2048 : 60) . '"' . ($comments ? "" : " class='hidden'") . '>'
|
||||||
)
|
)
|
||||||
: '')
|
: '')
|
||||||
;
|
;
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
if (isset($_POST["tables"]) && isset($_POST["views"])) {
|
|
||||||
$tables_views = array_merge((array) $_POST["tables"], (array) $_POST["views"]);
|
$tables_views = array_merge((array) $_POST["tables"], (array) $_POST["views"]);
|
||||||
} elseif (isset($_POST["tables"])) {
|
|
||||||
$tables_views = (array)$_POST["tables"];
|
|
||||||
} elseif (isset($_POST["views"])) {
|
|
||||||
$tables_views = (array)$_POST["views"];
|
|
||||||
} else {
|
|
||||||
$tables_views = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($tables_views && !$error && !$_POST["search"]) {
|
if ($tables_views && !$error && !$_POST["search"]) {
|
||||||
$result = true;
|
$result = true;
|
||||||
|
@ -52,10 +44,10 @@ if ($tables_views && !$error && !$_POST["search"]) {
|
||||||
queries_redirect(substr(ME, 0, -1), $message, $result);
|
queries_redirect(substr(ME, 0, -1), $message, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header((isset($_GET["ns"]) === false || $_GET["ns"] == "" ? lang('Database') . ": " . h(DB) : lang('Schema') . ": " . h($_GET["ns"])), $error, true);
|
page_header(($_GET["ns"] == "" ? lang('Database') . ": " . h(DB) : lang('Schema') . ": " . h($_GET["ns"])), $error, true);
|
||||||
|
|
||||||
if ($adminer->homepage()) {
|
if ($adminer->homepage()) {
|
||||||
if (isset($_GET["ns"]) === false || $_GET["ns"] !== "") {
|
if ($_GET["ns"] !== "") {
|
||||||
echo "<h3 id='tables-views'>" . lang('Tables and views') . "</h3>\n";
|
echo "<h3 id='tables-views'>" . lang('Tables and views') . "</h3>\n";
|
||||||
$tables_list = tables_list();
|
$tables_list = tables_list();
|
||||||
if (!$tables_list) {
|
if (!$tables_list) {
|
||||||
|
@ -64,7 +56,7 @@ if ($adminer->homepage()) {
|
||||||
echo "<form action='' method='post'>\n";
|
echo "<form action='' method='post'>\n";
|
||||||
if (support("table")) {
|
if (support("table")) {
|
||||||
echo "<fieldset><legend>" . lang('Search data in tables') . " <span id='selected2'></span></legend><div>";
|
echo "<fieldset><legend>" . lang('Search data in tables') . " <span id='selected2'></span></legend><div>";
|
||||||
echo "<input type='search' name='query' value='" . h((isset($_POST["query"]) && $_POST["query"] ? $_POST["query"] : "")) . "'>";
|
echo "<input type='search' name='query' value='" . h($_POST["query"]) . "'>";
|
||||||
echo script("qsl('input').onkeydown = partialArg(bodyKeydown, 'search');", "");
|
echo script("qsl('input').onkeydown = partialArg(bodyKeydown, 'search');", "");
|
||||||
echo " <input type='submit' name='search' value='" . lang('Search') . "'>\n";
|
echo " <input type='submit' name='search' value='" . lang('Search') . "'>\n";
|
||||||
if ($adminer->operator_regexp !== null) {
|
if ($adminer->operator_regexp !== null) {
|
||||||
|
@ -72,7 +64,7 @@ if ($adminer->homepage()) {
|
||||||
echo doc_link(array('sql' => 'regexp.html', 'pgsql' => 'functions-matching.html#FUNCTIONS-POSIX-REGEXP')) . "</p>\n";
|
echo doc_link(array('sql' => 'regexp.html', 'pgsql' => 'functions-matching.html#FUNCTIONS-POSIX-REGEXP')) . "</p>\n";
|
||||||
}
|
}
|
||||||
echo "</div></fieldset>\n";
|
echo "</div></fieldset>\n";
|
||||||
if (isset($_POST["search"]) && $_POST["query"] != "") {
|
if ($_POST["search"] && $_POST["query"] != "") {
|
||||||
$_GET["where"][0]["op"] = $adminer->operator_regexp === null || empty($_POST['regexp']) ? "LIKE %%" : $adminer->operator_regexp;
|
$_GET["where"][0]["op"] = $adminer->operator_regexp === null || empty($_POST['regexp']) ? "LIKE %%" : $adminer->operator_regexp;
|
||||||
search_tables();
|
search_tables();
|
||||||
}
|
}
|
||||||
|
@ -151,7 +143,7 @@ if ($adminer->homepage()) {
|
||||||
echo "<p>" . lang('Move to other database') . ": ";
|
echo "<p>" . lang('Move to other database') . ": ";
|
||||||
echo ($databases ? html_select("target", $databases, $db) : '<input name="target" value="' . h($db) . '" autocapitalize="off">');
|
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 " <input type='submit' name='move' value='" . lang('Move') . "'>";
|
||||||
echo (support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "'> " . checkbox("overwrite", 1, isset($_POST["overwrite"]), lang('overwrite')) : "");
|
echo (support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "'> " . checkbox("overwrite", 1, $_POST["overwrite"], lang('overwrite')) : "");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
echo "<input type='hidden' name='all' value=''>"; // used by trCheck()
|
echo "<input type='hidden' name='all' value=''>"; // used by trCheck()
|
||||||
|
|
|
@ -8,64 +8,77 @@ if (isset($_GET["elastic"])) {
|
||||||
class Min_DB {
|
class Min_DB {
|
||||||
var $extension = "JSON", $server_info, $errno, $error, $_url, $_db;
|
var $extension = "JSON", $server_info, $errno, $error, $_url, $_db;
|
||||||
|
|
||||||
/** Performs query
|
/**
|
||||||
* @param string
|
* @param string $path
|
||||||
* @param array
|
* @param array|null $content
|
||||||
* @param string
|
* @param string $method
|
||||||
* @return mixed
|
* @return array|false
|
||||||
*/
|
*/
|
||||||
function rootQuery($path, $content = array(), $method = 'GET') {
|
function rootQuery($path, array $content = null, $method = 'GET') {
|
||||||
@ini_set('track_errors', 1); // @ - may be disabled
|
@ini_set('track_errors', 1); // @ - may be disabled
|
||||||
$file = @file_get_contents("$this->_url/" . ltrim($path, '/'), false, stream_context_create(array('http' => array(
|
$file = @file_get_contents("$this->_url/" . ltrim($path, '/'), false, stream_context_create(array('http' => array(
|
||||||
'method' => $method,
|
'method' => $method,
|
||||||
'content' => $content === null ? $content : json_encode($content),
|
'content' => $content !== null ? json_encode($content) : null,
|
||||||
'header' => 'Content-Type: application/json',
|
'header' => $content !== null ? 'Content-Type: application/json' : [],
|
||||||
'ignore_errors' => 1, // available since PHP 5.2.10
|
'ignore_errors' => 1,
|
||||||
|
'follow_location' => 0,
|
||||||
|
'max_redirects' => 0,
|
||||||
))));
|
))));
|
||||||
if (!$file) {
|
|
||||||
$this->error = error_get_last()['message'];
|
if ($file === false) {
|
||||||
return $file;
|
$this->error = lang('Invalid server or credentials.');
|
||||||
}
|
|
||||||
if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) {
|
|
||||||
$this->error = lang('Invalid credentials.') . " $http_response_header[0]";
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$return = json_decode($file, true);
|
$return = json_decode($file, true);
|
||||||
if ($return === null) {
|
if ($return === null) {
|
||||||
$this->errno = json_last_error();
|
$this->error = lang('Invalid server or credentials.');
|
||||||
if (function_exists('json_last_error_msg')) {
|
return false;
|
||||||
$this->error = json_last_error_msg();
|
}
|
||||||
|
|
||||||
|
if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) {
|
||||||
|
if (isset($return['error']['root_cause'][0]['type'])) {
|
||||||
|
$this->error = $return['error']['root_cause'][0]['type'] . ": " . $return['error']['root_cause'][0]['reason'];
|
||||||
} else {
|
} else {
|
||||||
$constants = get_defined_constants(true);
|
$this->error = lang('Invalid server or credentials.');
|
||||||
foreach ($constants['json'] as $name => $value) {
|
|
||||||
if ($value == $this->errno && preg_match('~^JSON_ERROR_~', $name)) {
|
|
||||||
$this->error = $name;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Performs query relative to actual selected DB
|
/** Performs query relative to actual selected DB
|
||||||
* @param string
|
* @param string $path
|
||||||
* @param array
|
* @param array|null $content
|
||||||
* @param string
|
* @param string $method
|
||||||
* @return mixed
|
* @return array|false
|
||||||
*/
|
*/
|
||||||
function query($path, $content = array(), $method = 'GET') {
|
function query($path, array $content = null, $method = 'GET') {
|
||||||
return $this->rootQuery(($this->_db != "" ? "$this->_db/" : "/") . ltrim($path, '/'), $content, $method);
|
return $this->rootQuery(($this->_db != "" ? "$this->_db/" : "/") . ltrim($path, '/'), $content, $method);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $server
|
||||||
|
* @param string $username
|
||||||
|
* @param string $password
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
function connect($server, $username, $password) {
|
function connect($server, $username, $password) {
|
||||||
preg_match('~^(https?://)?(.*)~', $server, $match);
|
$this->_url = build_http_url($server, $username, $password, "localhost", 9200);
|
||||||
$this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]";
|
|
||||||
$return = $this->query('');
|
$return = $this->query('');
|
||||||
if ($return) {
|
if (!$return) {
|
||||||
$this->server_info = $return['version']['number'];
|
return false;
|
||||||
}
|
}
|
||||||
return (bool) $return;
|
|
||||||
|
if (!isset($return['version']['number'])) {
|
||||||
|
$this->error = lang('Invalid server or credentials.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->server_info = $return['version']['number'];
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function select_db($database) {
|
function select_db($database) {
|
||||||
|
@ -227,9 +240,6 @@ if (isset($_GET["elastic"])) {
|
||||||
global $adminer;
|
global $adminer;
|
||||||
$connection = new Min_DB;
|
$connection = new Min_DB;
|
||||||
list($server, $username, $password) = $adminer->credentials();
|
list($server, $username, $password) = $adminer->credentials();
|
||||||
if (strpos($server, '/') !== false || strpos($server, ':') !== false) {
|
|
||||||
return lang('Only hostname or IP address');
|
|
||||||
}
|
|
||||||
if ($password != "" && $connection->connect($server, $username, "")) {
|
if ($password != "" && $connection->connect($server, $username, "")) {
|
||||||
return lang('Database does not support password.');
|
return lang('Database does not support password.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,7 @@ if (!defined("DRIVER")) {
|
||||||
function connect($server = "", $username = "", $password = "", $database = null, $port = null, $socket = null) {
|
function connect($server = "", $username = "", $password = "", $database = null, $port = null, $socket = null) {
|
||||||
global $adminer;
|
global $adminer;
|
||||||
mysqli_report(MYSQLI_REPORT_OFF); // stays between requests, not required since PHP 5.3.4
|
mysqli_report(MYSQLI_REPORT_OFF); // stays between requests, not required since PHP 5.3.4
|
||||||
if (strpos($server, ':') !== false) {
|
|
||||||
list($host, $port) = explode(":", $server, 2); // part after : is used for port or socket
|
list($host, $port) = explode(":", $server, 2); // part after : is used for port or socket
|
||||||
} else {
|
|
||||||
$host = $server;
|
|
||||||
}
|
|
||||||
$ssl = $adminer->connectSsl();
|
$ssl = $adminer->connectSsl();
|
||||||
if ($ssl) {
|
if ($ssl) {
|
||||||
$this->ssl_set($ssl['key'], $ssl['cert'], $ssl['ca'], '', '');
|
$this->ssl_set($ssl['key'], $ssl['cert'], $ssl['ca'], '', '');
|
||||||
|
@ -544,11 +540,6 @@ if (!defined("DRIVER")) {
|
||||||
$return = array();
|
$return = array();
|
||||||
foreach (get_rows("SHOW FULL COLUMNS FROM " . table($table)) as $row) {
|
foreach (get_rows("SHOW FULL COLUMNS FROM " . table($table)) as $row) {
|
||||||
preg_match('~^([^( ]+)(?:\((.+)\))?( unsigned)?( zerofill)?$~', $row["Type"], $match);
|
preg_match('~^([^( ]+)(?:\((.+)\))?( unsigned)?( zerofill)?$~', $row["Type"], $match);
|
||||||
for ($i = 0; $i < 5; $i++) {
|
|
||||||
if (isset($match[$i]) === false) {
|
|
||||||
$match[$i] = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$return[$row["Field"]] = array(
|
$return[$row["Field"]] = array(
|
||||||
"field" => $row["Field"],
|
"field" => $row["Field"],
|
||||||
"full_type" => $row["Type"],
|
"full_type" => $row["Type"],
|
||||||
|
|
|
@ -234,10 +234,7 @@ if (isset($_GET["pgsql"])) {
|
||||||
"information_schema" => "infoschema",
|
"information_schema" => "infoschema",
|
||||||
"pg_catalog" => "catalog",
|
"pg_catalog" => "catalog",
|
||||||
);
|
);
|
||||||
$link = null;
|
$link = $links[$_GET["ns"]];
|
||||||
if (isset($_GET["ns"]) && isset($links[$_GET["ns"]])) {
|
|
||||||
$links[$_GET["ns"]];
|
|
||||||
}
|
|
||||||
if ($link) {
|
if ($link) {
|
||||||
return "$link-" . str_replace("_", "-", $name) . ".html";
|
return "$link-" . str_replace("_", "-", $name) . ".html";
|
||||||
}
|
}
|
||||||
|
@ -470,7 +467,7 @@ ORDER BY connamespace, conname") as $row) {
|
||||||
global $connection;
|
global $connection;
|
||||||
$return = h($connection->error);
|
$return = h($connection->error);
|
||||||
if (preg_match('~^(.*\n)?([^\n]*)\n( *)\^(\n.*)?$~s', $return, $match)) {
|
if (preg_match('~^(.*\n)?([^\n]*)\n( *)\^(\n.*)?$~s', $return, $match)) {
|
||||||
$return = $match[1] . preg_replace('~((?:[^&]|&[^;]*;){' . strlen($match[3]) . '})(.*)~', '\1<b>\2</b>', $match[2]) . (isset($match[4]) ? $match[4] : null);
|
$return = $match[1] . preg_replace('~((?:[^&]|&[^;]*;){' . strlen($match[3]) . '})(.*)~', '\1<b>\2</b>', $match[2]) . $match[4];
|
||||||
}
|
}
|
||||||
return nl_br($return);
|
return nl_br($return);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$TABLE = $_GET["edit"];
|
$TABLE = $_GET["edit"];
|
||||||
$fields = fields($TABLE);
|
$fields = fields($TABLE);
|
||||||
$where = (isset($_GET["select"]) ? ($_POST["check"] && count($_POST["check"]) == 1 ? where_check($_POST["check"][0], $fields) : "") : where($_GET, $fields));
|
$where = (isset($_GET["select"]) ? ($_POST["check"] && count($_POST["check"]) == 1 ? where_check($_POST["check"][0], $fields) : "") : where($_GET, $fields));
|
||||||
$update = (isset($_GET["select"]) ? (isset($_POST["edit"]) ? $_POST["edit"] : null) : $where);
|
$update = (isset($_GET["select"]) ? $_POST["edit"] : $where);
|
||||||
foreach ($fields as $name => $field) {
|
foreach ($fields as $name => $field) {
|
||||||
if (!isset($field["privileges"][$update ? "update" : "insert"]) || $adminer->fieldName($field) == "" || $field["generated"]) {
|
if (!isset($field["privileges"][$update ? "update" : "insert"]) || $adminer->fieldName($field) == "" || $field["generated"]) {
|
||||||
unset($fields[$name]);
|
unset($fields[$name]);
|
||||||
|
@ -11,14 +11,14 @@ foreach ($fields as $name => $field) {
|
||||||
|
|
||||||
if ($_POST && !$error && !isset($_GET["select"])) {
|
if ($_POST && !$error && !isset($_GET["select"])) {
|
||||||
$location = $_POST["referer"];
|
$location = $_POST["referer"];
|
||||||
if (isset($_POST["insert"]) && $_POST["insert"]) { // continue edit or insert
|
if ($_POST["insert"]) { // continue edit or insert
|
||||||
$location = ($update ? null : $_SERVER["REQUEST_URI"]);
|
$location = ($update ? null : $_SERVER["REQUEST_URI"]);
|
||||||
} elseif (!preg_match('~^.+&select=.+$~', $location)) {
|
} elseif (!preg_match('~^.+&select=.+$~', $location)) {
|
||||||
$location = ME . "select=" . urlencode($TABLE);
|
$location = ME . "select=" . urlencode($TABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$indexes = indexes($TABLE);
|
$indexes = indexes($TABLE);
|
||||||
$unique_array = unique_array((isset($_GET["where"]) ? $_GET["where"] : []), $indexes);
|
$unique_array = unique_array($_GET["where"], $indexes);
|
||||||
$query_where = "\nWHERE $where";
|
$query_where = "\nWHERE $where";
|
||||||
|
|
||||||
if (isset($_POST["delete"])) {
|
if (isset($_POST["delete"])) {
|
||||||
|
@ -60,14 +60,14 @@ if ($_POST && !$error && !isset($_GET["select"])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$row = null;
|
$row = null;
|
||||||
if (isset($_POST["save"]) &&$_POST["save"]) {
|
if ($_POST["save"]) {
|
||||||
$row = (array) $_POST["fields"];
|
$row = (array) $_POST["fields"];
|
||||||
} elseif ($where) {
|
} elseif ($where) {
|
||||||
$select = array();
|
$select = array();
|
||||||
foreach ($fields as $name => $field) {
|
foreach ($fields as $name => $field) {
|
||||||
if (isset($field["privileges"]["select"])) {
|
if (isset($field["privileges"]["select"])) {
|
||||||
$as = convert_field($field);
|
$as = convert_field($field);
|
||||||
if (isset($_POST["clone"]) && $_POST["clone"] && isset($field["auto_increment"]) && $field["auto_increment"]) {
|
if ($_POST["clone"] && $field["auto_increment"]) {
|
||||||
$as = "''";
|
$as = "''";
|
||||||
}
|
}
|
||||||
if ($jush == "sql" && preg_match("~enum|set~", $field["type"])) {
|
if ($jush == "sql" && preg_match("~enum|set~", $field["type"])) {
|
||||||
|
|
|
@ -6,13 +6,13 @@ if ($_GET["file"] == "favicon.ico") {
|
||||||
echo lzw_decompress(compile_file('../adminer/static/favicon.ico', 'lzw_compress'));
|
echo lzw_decompress(compile_file('../adminer/static/favicon.ico', 'lzw_compress'));
|
||||||
} elseif ($_GET["file"] == "default.css") {
|
} elseif ($_GET["file"] == "default.css") {
|
||||||
header("Content-Type: text/css; charset=utf-8");
|
header("Content-Type: text/css; charset=utf-8");
|
||||||
echo lzw_decompress(compile_file('../adminer/static/default.css;../vendor/vrana/jush/jush.css', 'minify_css'));
|
echo lzw_decompress(compile_file('../adminer/static/default.css;../externals/jush/jush.css', 'minify_css'));
|
||||||
} elseif ($_GET["file"] == "functions.js") {
|
} elseif ($_GET["file"] == "functions.js") {
|
||||||
header("Content-Type: text/javascript; charset=utf-8");
|
header("Content-Type: text/javascript; charset=utf-8");
|
||||||
echo lzw_decompress(compile_file('../adminer/static/functions.js;static/editing.js', 'minify_js'));
|
echo lzw_decompress(compile_file('../adminer/static/functions.js;static/editing.js', 'minify_js'));
|
||||||
} elseif ($_GET["file"] == "jush.js") {
|
} elseif ($_GET["file"] == "jush.js") {
|
||||||
header("Content-Type: text/javascript; charset=utf-8");
|
header("Content-Type: text/javascript; charset=utf-8");
|
||||||
echo lzw_decompress(compile_file('../vendor/vrana/jush/modules/jush.js;../vendor/vrana/jush/modules/jush-textarea.js;../vendor/vrana/jush/modules/jush-txt.js;../vendor/vrana/jush/modules/jush-js.js;../vendor/vrana/jush/modules/jush-sql.js;../vendor/vrana/jush/modules/jush-pgsql.js;../vendor/vrana/jush/modules/jush-sqlite.js;../vendor/vrana/jush/modules/jush-mssql.js;../vendor/vrana/jush/modules/jush-oracle.js;../vendor/vrana/jush/modules/jush-simpledb.js', 'minify_js'));
|
echo lzw_decompress(compile_file('../externals/jush/modules/jush.js;../externals/jush/modules/jush-textarea.js;../externals/jush/modules/jush-txt.js;../externals/jush/modules/jush-js.js;../externals/jush/modules/jush-sql.js;../externals/jush/modules/jush-pgsql.js;../externals/jush/modules/jush-sqlite.js;../externals/jush/modules/jush-mssql.js;../externals/jush/modules/jush-oracle.js;../externals/jush/modules/jush-simpledb.js', 'minify_js'));
|
||||||
} else {
|
} else {
|
||||||
header("Content-Type: image/gif");
|
header("Content-Type: image/gif");
|
||||||
switch ($_GET["file"]) {
|
switch ($_GET["file"]) {
|
||||||
|
|
|
@ -84,7 +84,7 @@ $j = 0;
|
||||||
foreach ($row["source"] as $key => $val) {
|
foreach ($row["source"] as $key => $val) {
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td>" . html_select("source[" . (+$key) . "]", array(-1 => "") + $source, $val, ($j == count($row["source"]) - 1 ? "foreignAddRow.call(this);" : 1), "label-source");
|
echo "<td>" . html_select("source[" . (+$key) . "]", array(-1 => "") + $source, $val, ($j == count($row["source"]) - 1 ? "foreignAddRow.call(this);" : 1), "label-source");
|
||||||
echo "<td>" . html_select("target[" . (+$key) . "]", $target, $row["target"][$key], 1, "label-target");
|
echo "<td>" . html_select("target[" . (+$key) . "]", $target, isset($row["target"][$key]) ? $row["target"][$key] : null, 1, "label-target");
|
||||||
$j++;
|
$j++;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -121,12 +121,12 @@ class Adminer {
|
||||||
echo "<table cellspacing='0' class='layout'>\n";
|
echo "<table cellspacing='0' class='layout'>\n";
|
||||||
echo $this->loginFormField('driver', '<tr><th>' . lang('System') . '<td>', html_select("auth[driver]", $drivers, DRIVER, "loginDriver(this);") . "\n");
|
echo $this->loginFormField('driver', '<tr><th>' . lang('System') . '<td>', html_select("auth[driver]", $drivers, DRIVER, "loginDriver(this);") . "\n");
|
||||||
echo $this->loginFormField('server', '<tr><th>' . lang('Server') . '<td>', '<input name="auth[server]" value="' . h(SERVER) . '" title="hostname[:port]" placeholder="localhost" autocapitalize="off">' . "\n");
|
echo $this->loginFormField('server', '<tr><th>' . lang('Server') . '<td>', '<input name="auth[server]" value="' . h(SERVER) . '" title="hostname[:port]" placeholder="localhost" autocapitalize="off">' . "\n");
|
||||||
echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td>', '<input name="auth[username]" id="username" value="' . h((isset($_GET["username"]) ? $_GET["username"] : "")) . '" autocomplete="username" autocapitalize="off">' . script("focus(qs('#username')); qs('#username').form['auth[driver]'].onchange();"));
|
echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td>', '<input name="auth[username]" id="username" value="' . h($_GET["username"]) . '" autocomplete="username" autocapitalize="off">' . script("focus(qs('#username')); qs('#username').form['auth[driver]'].onchange();"));
|
||||||
echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td>', '<input type="password" name="auth[password]" autocomplete="current-password">' . "\n");
|
echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td>', '<input type="password" name="auth[password]" autocomplete="current-password">' . "\n");
|
||||||
echo $this->loginFormField('db', '<tr><th>' . lang('Database') . '<td>', '<input name="auth[db]" value="' . h((isset($_GET["db"]) ? $_GET["db"] : "")) . '" autocapitalize="off">' . "\n");
|
echo $this->loginFormField('db', '<tr><th>' . lang('Database') . '<td>', '<input name="auth[db]" value="' . h($_GET["db"]) . '" autocapitalize="off">' . "\n");
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
|
echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
|
||||||
echo checkbox("auth[permanent]", 1, isset($_COOKIE["adminer_permanent"]) ? $_COOKIE["adminer_permanent"] : null, lang('Permanent login')) . "\n";
|
echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get login form field
|
/** Get login form field
|
||||||
|
@ -318,7 +318,7 @@ class Adminer {
|
||||||
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
|
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
echo "<tr" . odd() . "><th>" . h($field["field"]);
|
echo "<tr" . odd() . "><th>" . h($field["field"]);
|
||||||
echo "<td><span title='" . h(isset($field["collation"]) ? $field["collation"] : null) . "'>" . h(isset($field["full_type"]) ? $field["full_type"] : null) . "</span>";
|
echo "<td><span title='" . h($field["collation"]) . "'>" . h($field["full_type"]) . "</span>";
|
||||||
echo ($field["null"] ? " <i>NULL</i>" : "");
|
echo ($field["null"] ? " <i>NULL</i>" : "");
|
||||||
echo ($field["auto_increment"] ? " <i>" . lang('Auto Increment') . "</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 (isset($field["default"]) ? " <span title='" . lang('Default value') . "'>[<b>" . h($field["default"]) . "</b>]</span>" : "");
|
||||||
|
@ -340,8 +340,8 @@ class Adminer {
|
||||||
$print = array();
|
$print = array();
|
||||||
foreach ($index["columns"] as $key => $val) {
|
foreach ($index["columns"] as $key => $val) {
|
||||||
$print[] = "<i>" . h($val) . "</i>"
|
$print[] = "<i>" . h($val) . "</i>"
|
||||||
. (isset($index["lengths"][$key]) && $index["lengths"][$key] ? "(" . $index["lengths"][$key] . ")" : "")
|
. ($index["lengths"][$key] ? "(" . $index["lengths"][$key] . ")" : "")
|
||||||
. (isset($index["descs"][$key]) && $index["descs"][$key] ? " DESC" : "")
|
. ($index["descs"][$key] ? " DESC" : "")
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
echo "<tr title='" . h($name) . "'><th>$index[type]<td>" . implode(", ", $print) . "\n";
|
echo "<tr title='" . h($name) . "'><th>$index[type]<td>" . implode(", ", $print) . "\n";
|
||||||
|
@ -398,7 +398,6 @@ class Adminer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$change_next = "this.parentNode.firstChild.onchange();";
|
$change_next = "this.parentNode.firstChild.onchange();";
|
||||||
if (isset($_GET["where"])) {
|
|
||||||
foreach (array_merge((array) $_GET["where"], array(array())) as $i => $val) {
|
foreach (array_merge((array) $_GET["where"], array(array())) as $i => $val) {
|
||||||
if (!$val || ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators))) {
|
if (!$val || ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators))) {
|
||||||
echo "<div>" . select_input(
|
echo "<div>" . select_input(
|
||||||
|
@ -416,7 +415,6 @@ class Adminer {
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
echo "</div></fieldset>\n";
|
echo "</div></fieldset>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -429,7 +427,6 @@ class Adminer {
|
||||||
function selectOrderPrint($order, $columns, $indexes) {
|
function selectOrderPrint($order, $columns, $indexes) {
|
||||||
print_fieldset("sort", lang('Sort'), $order);
|
print_fieldset("sort", lang('Sort'), $order);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
if (isset($_GET["order"])) {
|
|
||||||
foreach ((array) $_GET["order"] as $key => $val) {
|
foreach ((array) $_GET["order"] as $key => $val) {
|
||||||
if ($val != "") {
|
if ($val != "") {
|
||||||
echo "<div>" . select_input(" name='order[$i]'", $columns, $val, "selectFieldChange");
|
echo "<div>" . select_input(" name='order[$i]'", $columns, $val, "selectFieldChange");
|
||||||
|
@ -440,7 +437,6 @@ class Adminer {
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
echo "<div>" . select_input(" name='order[$i]'", $columns, "", "selectAddRow");
|
echo "<div>" . select_input(" name='order[$i]'", $columns, "", "selectAddRow");
|
||||||
echo checkbox("desc[$i]", 1, false, lang('descending'));
|
echo checkbox("desc[$i]", 1, false, lang('descending'));
|
||||||
echo " <input type='image' src='../adminer/static/cross.gif' class='jsonly icon' title='", h(lang('Remove')), "' alt='x'>";
|
echo " <input type='image' src='../adminer/static/cross.gif' class='jsonly icon' title='", h(lang('Remove')), "' alt='x'>";
|
||||||
|
@ -530,7 +526,6 @@ class Adminer {
|
||||||
global $functions, $grouping;
|
global $functions, $grouping;
|
||||||
$select = array(); // select expressions, empty for *
|
$select = array(); // select expressions, empty for *
|
||||||
$group = array(); // expressions without aggregation - will be used for GROUP BY if an aggregation function is used
|
$group = array(); // expressions without aggregation - will be used for GROUP BY if an aggregation function is used
|
||||||
if (isset($_GET["columns"])) {
|
|
||||||
foreach ((array) $_GET["columns"] as $key => $val) {
|
foreach ((array) $_GET["columns"] as $key => $val) {
|
||||||
if ($val["fun"] == "count" || ($val["col"] != "" && (!$val["fun"] || in_array($val["fun"], $functions) || in_array($val["fun"], $grouping)))) {
|
if ($val["fun"] == "count" || ($val["col"] != "" && (!$val["fun"] || in_array($val["fun"], $functions) || in_array($val["fun"], $grouping)))) {
|
||||||
$select[$key] = apply_sql_function($val["fun"], ($val["col"] != "" ? idf_escape($val["col"]) : "*"));
|
$select[$key] = apply_sql_function($val["fun"], ($val["col"] != "" ? idf_escape($val["col"]) : "*"));
|
||||||
|
@ -539,7 +534,6 @@ class Adminer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return array($select, $group);
|
return array($select, $group);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -556,7 +550,6 @@ class Adminer {
|
||||||
$return[] = "MATCH (" . implode(", ", array_map('idf_escape', $index["columns"])) . ") AGAINST (" . q($_GET["fulltext"][$i]) . (isset($_GET["boolean"][$i]) ? " IN BOOLEAN MODE" : "") . ")";
|
$return[] = "MATCH (" . implode(", ", array_map('idf_escape', $index["columns"])) . ") AGAINST (" . q($_GET["fulltext"][$i]) . (isset($_GET["boolean"][$i]) ? " IN BOOLEAN MODE" : "") . ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($_GET["where"])) {
|
|
||||||
foreach ((array) $_GET["where"] as $key => $val) {
|
foreach ((array) $_GET["where"] as $key => $val) {
|
||||||
if ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators)) {
|
if ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators)) {
|
||||||
$prefix = "";
|
$prefix = "";
|
||||||
|
@ -593,7 +586,6 @@ class Adminer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -604,7 +596,6 @@ class Adminer {
|
||||||
*/
|
*/
|
||||||
function selectOrderProcess($fields, $indexes) {
|
function selectOrderProcess($fields, $indexes) {
|
||||||
$return = array();
|
$return = array();
|
||||||
if (isset($_GET["order"])) {
|
|
||||||
foreach ((array) $_GET["order"] as $key => $val) {
|
foreach ((array) $_GET["order"] as $key => $val) {
|
||||||
if ($val != "") {
|
if ($val != "") {
|
||||||
$return[] = (preg_match('~^((COUNT\(DISTINCT |[A-Z0-9_]+\()(`(?:[^`]|``)+`|"(?:[^"]|"")+")\)|COUNT\(\*\))$~', $val) ? $val : idf_escape($val)) //! MS SQL uses []
|
$return[] = (preg_match('~^((COUNT\(DISTINCT |[A-Z0-9_]+\()(`(?:[^`]|``)+`|"(?:[^"]|"")+")\)|COUNT\(\*\))$~', $val) ? $val : idf_escape($val)) //! MS SQL uses []
|
||||||
|
@ -612,7 +603,6 @@ class Adminer {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -733,10 +723,30 @@ class Adminer {
|
||||||
*/
|
*/
|
||||||
function editInput($table, $field, $attrs, $value) {
|
function editInput($table, $field, $attrs, $value) {
|
||||||
if ($field["type"] == "enum") {
|
if ($field["type"] == "enum") {
|
||||||
return (isset($_GET["select"]) ? "<label><input type='radio'$attrs value='-1' checked><i>" . lang('original') . "</i></label> " : "")
|
$options = array();
|
||||||
. ($field["null"] ? "<label><input type='radio'$attrs value=''" . ($value !== null || isset($_GET["select"]) ? "" : " checked") . "><i>NULL</i></label> " : "")
|
$selected = $value;
|
||||||
. enum_input("radio", $attrs, $field, $value, 0) // 0 - empty
|
if (isset($_GET["select"])) {
|
||||||
;
|
$options[-1] = lang('original');
|
||||||
|
if ($selected === null) {
|
||||||
|
$selected = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($field["null"]) {
|
||||||
|
$options[""] = "NULL";
|
||||||
|
if ($value === null && !isset($_GET["select"])) {
|
||||||
|
$selected = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$options[0] = lang('empty');
|
||||||
|
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
|
||||||
|
foreach ($matches[1] as $i => $val) {
|
||||||
|
$val = stripcslashes(str_replace("''", "'", $val));
|
||||||
|
$options[$i + 1] = $val;
|
||||||
|
if ($value === $val) {
|
||||||
|
$selected = $i + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "<select$attrs>" . optionlist($options, (string) $selected, 1) . "</select>"; // 1 - use keys
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -860,6 +870,7 @@ class Adminer {
|
||||||
$insert = "";
|
$insert = "";
|
||||||
$buffer = "";
|
$buffer = "";
|
||||||
$keys = array();
|
$keys = array();
|
||||||
|
$generatedKeys = array();
|
||||||
$suffix = "";
|
$suffix = "";
|
||||||
$fetch_function = ($table != '' ? 'fetch_assoc' : 'fetch_row');
|
$fetch_function = ($table != '' ? 'fetch_assoc' : 'fetch_row');
|
||||||
while ($row = $result->$fetch_function()) {
|
while ($row = $result->$fetch_function()) {
|
||||||
|
@ -867,6 +878,10 @@ class Adminer {
|
||||||
$values = array();
|
$values = array();
|
||||||
foreach ($row as $val) {
|
foreach ($row as $val) {
|
||||||
$field = $result->fetch_field();
|
$field = $result->fetch_field();
|
||||||
|
if (!empty($fields[$field->name]['generated'])) {
|
||||||
|
$generatedKeys[$field->name] = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$keys[] = $field->name;
|
$keys[] = $field->name;
|
||||||
$key = idf_escape($field->name);
|
$key = idf_escape($field->name);
|
||||||
$values[] = "$key = VALUES($key)";
|
$values[] = "$key = VALUES($key)";
|
||||||
|
@ -884,6 +899,10 @@ class Adminer {
|
||||||
$insert = "INSERT INTO " . table($table) . " (" . implode(", ", array_map('idf_escape', $keys)) . ") VALUES";
|
$insert = "INSERT INTO " . table($table) . " (" . implode(", ", array_map('idf_escape', $keys)) . ") VALUES";
|
||||||
}
|
}
|
||||||
foreach ($row as $key => $val) {
|
foreach ($row as $key => $val) {
|
||||||
|
if (isset($generatedKeys[$key])) {
|
||||||
|
unset($row[$key]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$field = $fields[$key];
|
$field = $fields[$key];
|
||||||
$row[$key] = ($val !== null
|
$row[$key] = ($val !== null
|
||||||
? unconvert_field($field, preg_match(number_type(), $field["type"]) && !preg_match('~\[~', $field["full_type"]) && is_numeric($val) ? $val : q(($val === false ? 0 : $val)))
|
? unconvert_field($field, preg_match(number_type(), $field["type"]) && !preg_match('~\[~', $field["full_type"]) && is_numeric($val) ? $val : q(($val === false ? 0 : $val)))
|
||||||
|
@ -949,13 +968,13 @@ class Adminer {
|
||||||
*/
|
*/
|
||||||
function homepage() {
|
function homepage() {
|
||||||
$links = [];
|
$links = [];
|
||||||
if (isset($_GET["ns"]) && $_GET["ns"] == "" && support("database")) {
|
if ($_GET["ns"] == "" && support("database")) {
|
||||||
$links[] = '<a href="' . h(ME) . 'database=">' . lang('Alter database') . '</a>';
|
$links[] = '<a href="' . h(ME) . 'database=">' . lang('Alter database') . '</a>';
|
||||||
}
|
}
|
||||||
if (support("scheme")) {
|
if (support("scheme")) {
|
||||||
$links[] = "<a href='" . h(ME) . "scheme='>" . ($_GET["ns"] != "" ? lang('Alter schema') : lang('Create schema')) . "</a>";
|
$links[] = "<a href='" . h(ME) . "scheme='>" . ($_GET["ns"] != "" ? lang('Alter schema') : lang('Create schema')) . "</a>";
|
||||||
}
|
}
|
||||||
if (isset($_GET["ns"]) && $_GET["ns"] !== "") {
|
if ($_GET["ns"] !== "") {
|
||||||
$links[] = '<a href="' . h(ME) . 'schema=">' . lang('Database schema') . '</a>';
|
$links[] = '<a href="' . h(ME) . 'schema=">' . lang('Database schema') . '</a>';
|
||||||
}
|
}
|
||||||
if (support("privileges")) {
|
if (support("privileges")) {
|
||||||
|
@ -974,11 +993,11 @@ class Adminer {
|
||||||
?>
|
?>
|
||||||
<h1>
|
<h1>
|
||||||
<?php echo $this->name(); ?> <span class="version"><?php echo $VERSION; ?></span>
|
<?php echo $this->name(); ?> <span class="version"><?php echo $VERSION; ?></span>
|
||||||
|
<a href="https://download.adminerevo.org/latest/adminer/"<?php echo target_blank(); ?> id="version" title="<?php echo lang('A newer version of AdminerEvo is available, download it now!'); ?>"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?></a>
|
||||||
</h1>
|
</h1>
|
||||||
<?php
|
<?php
|
||||||
if ($missing == "auth") {
|
if ($missing == "auth") {
|
||||||
$output = "";
|
$output = "";
|
||||||
if (isset( $_SESSION["pwds"])) {
|
|
||||||
foreach ((array) $_SESSION["pwds"] as $vendor => $servers) {
|
foreach ((array) $_SESSION["pwds"] as $vendor => $servers) {
|
||||||
foreach ($servers as $server => $usernames) {
|
foreach ($servers as $server => $usernames) {
|
||||||
foreach ($usernames as $username => $password) {
|
foreach ($usernames as $username => $password) {
|
||||||
|
@ -991,13 +1010,12 @@ class Adminer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if ($output) {
|
if ($output) {
|
||||||
echo "<ul id='logins'>\n$output</ul>\n" . script("mixin(qs('#logins'), {onmouseover: menuOver, onmouseout: menuOut});");
|
echo "<ul id='logins'>\n$output</ul>\n" . script("mixin(qs('#logins'), {onmouseover: menuOver, onmouseout: menuOut});");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$tables = array();
|
$tables = array();
|
||||||
if (isset($_GET["ns"]) === false || $_GET["ns"] !== "" && !$missing && DB != "") {
|
if ($_GET["ns"] !== "" && !$missing && DB != "") {
|
||||||
$connection->select_db(DB);
|
$connection->select_db(DB);
|
||||||
$tables = table_status('', true);
|
$tables = table_status('', true);
|
||||||
}
|
}
|
||||||
|
@ -1034,13 +1052,13 @@ bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\d\.?\d).*~s', '
|
||||||
$links[] = "<a href='" . h(ME) . "import='" . bold(isset($_GET["import"])) . ">" . lang('Import') . "</a>";
|
$links[] = "<a href='" . h(ME) . "import='" . bold(isset($_GET["import"])) . ">" . lang('Import') . "</a>";
|
||||||
}
|
}
|
||||||
if (support("dump")) {
|
if (support("dump")) {
|
||||||
$links[] = "<a href='" . h(ME) . "dump=" . urlencode(isset($_GET["table"]) ? $_GET["table"] : (isset($_GET["select"]) && $_GET["select"] ? $_GET["select"] : "" )) . "' id='dump'" . bold(isset($_GET["dump"])) . ">" . lang('Export') . "</a>";
|
$links[] = "<a href='" . h(ME) . "dump=" . urlencode(isset($_GET["table"]) ? $_GET["table"] : $_GET["select"]) . "' id='dump'" . bold(isset($_GET["dump"])) . ">" . lang('Export') . "</a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo generate_linksbar($links);
|
echo generate_linksbar($links);
|
||||||
|
|
||||||
if (isset($_GET["ns"]) === false || $_GET["ns"] !== "" && !$missing && DB != "") {
|
if ($_GET["ns"] !== "" && !$missing && DB != "") {
|
||||||
echo generate_linksbar(['<a href="' . h(ME) . 'create="' . bold(isset($_GET["create"]) && $_GET["create"] === "") . ">" . lang('Create table') . "</a>"]);
|
echo generate_linksbar(['<a href="' . h(ME) . 'create="' . bold($_GET["create"] === "") . ">" . lang('Create table') . "</a>"]);
|
||||||
if (!$tables) {
|
if (!$tables) {
|
||||||
echo "<p class='message'>" . lang('No tables.') . "\n";
|
echo "<p class='message'>" . lang('No tables.') . "\n";
|
||||||
} else {
|
} else {
|
||||||
|
@ -1100,20 +1118,13 @@ bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\d\.?\d).*~s', '
|
||||||
foreach ($tables as $table => $status) {
|
foreach ($tables as $table => $status) {
|
||||||
$name = $this->tableName($status);
|
$name = $this->tableName($status);
|
||||||
if ($name != "") {
|
if ($name != "") {
|
||||||
$array = [];
|
|
||||||
if (isset($_GET["table"])) $array[] = $_GET["table"];
|
|
||||||
if (isset($_GET["create"])) $array[] = $_GET["create"];
|
|
||||||
if (isset($_GET["indexes"])) $array[] = $_GET["indexes"];
|
|
||||||
if (isset($_GET["foreign"])) $array[] = $_GET["foreign"];
|
|
||||||
if (isset($_GET["trigger"])) $array[] = $_GET["trigger"];
|
|
||||||
if (isset($_GET["select"])) $array[] = $_GET["select"];
|
|
||||||
echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"'
|
echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"'
|
||||||
. bold(isset($_GET["select"]) && $_GET["select"] == $table || isset($_GET["edit"]) && $_GET["edit"] == $table, "select")
|
. bold($_GET["select"] == $table || $_GET["edit"] == $table, "select")
|
||||||
. " title='" . lang('Select data') . "'>" . lang('select') . "</a> "
|
. " title='" . lang('Select data') . "'>" . lang('select') . "</a> "
|
||||||
;
|
;
|
||||||
echo (support("table") || support("indexes")
|
echo (support("table") || support("indexes")
|
||||||
? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"'
|
? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"'
|
||||||
. bold(in_array($table, $array), (is_view($status) ? "view" : "structure"))
|
. bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"], $_GET["select"])), (is_view($status) ? "view" : "structure"))
|
||||||
. " title='" . lang('Show structure') . "'>$name</a>"
|
. " title='" . lang('Show structure') . "'>$name</a>"
|
||||||
: "<span>$name</span>"
|
: "<span>$name</span>"
|
||||||
) . "\n";
|
) . "\n";
|
||||||
|
|
|
@ -1,20 +1,72 @@
|
||||||
<?php
|
<?php
|
||||||
$connection = '';
|
$connection = '';
|
||||||
|
|
||||||
$has_token = isset($_SESSION["token"]) && $_SESSION["token"];
|
$has_token = $_SESSION["token"];
|
||||||
if (!$has_token) {
|
if (!$has_token) {
|
||||||
$_SESSION["token"] = rand(1, 1e6); // defense against cross-site request forgery
|
$_SESSION["token"] = rand(1, 1e6); // defense against cross-site request forgery
|
||||||
}
|
}
|
||||||
$token = get_token(); ///< @var string CSRF protection
|
$token = get_token(); ///< @var string CSRF protection
|
||||||
|
|
||||||
$permanent = array();
|
$permanent = array();
|
||||||
if (isset($_COOKIE["adminer_permanent"]) && $_COOKIE["adminer_permanent"]) {
|
if ($_COOKIE["adminer_permanent"]) {
|
||||||
foreach (explode(" ", $_COOKIE["adminer_permanent"]) as $val) {
|
foreach (explode(" ", $_COOKIE["adminer_permanent"]) as $val) {
|
||||||
list($key) = explode(":", $val);
|
list($key) = explode(":", $val);
|
||||||
$permanent[$key] = $val;
|
$permanent[$key] = $val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function validate_server_input() {
|
||||||
|
if (SERVER == "") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$parts = parse_url(SERVER);
|
||||||
|
if (!$parts) {
|
||||||
|
auth_error(lang('Invalid server or credentials.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check proper URL parts.
|
||||||
|
if (isset($parts['user']) || isset($parts['pass']) || isset($parts['query']) || isset($parts['fragment'])) {
|
||||||
|
auth_error(lang('Invalid server or credentials.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Allow only HTTP/S scheme.
|
||||||
|
if (isset($parts['scheme']) && !preg_match('~^(https?)$~i', $parts['scheme'])) {
|
||||||
|
auth_error(lang('Invalid server or credentials.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Allow only host without a path. Note that "localhost" is parsed as path.
|
||||||
|
$host = (isset($parts['host']) ? $parts['host'] : '') . (isset($parts['path']) ? $parts['path'] : '');
|
||||||
|
if (strpos(rtrim($host, '/'), '/') !== false) {
|
||||||
|
auth_error(lang('Invalid server or credentials.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check privileged ports.
|
||||||
|
if (isset($parts['port']) && ($parts['port'] < 1024 || $parts['port'] > 65535)) {
|
||||||
|
auth_error(lang('Connecting to privileged ports is not allowed.'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $server
|
||||||
|
* @param string $username
|
||||||
|
* @param string $password
|
||||||
|
* @param string $defaultServer
|
||||||
|
* @param int|null $defaultPort
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function build_http_url($server, $username, $password, $defaultServer, $defaultPort = null) {
|
||||||
|
if (!preg_match('~^(https?://)?([^:]*)(:\d+)?$~', rtrim($server, '/'), $matches)) {
|
||||||
|
$this->error = lang('Invalid server or credentials.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ($matches[1] ?: "http://") .
|
||||||
|
($username !== "" || $password !== "" ? "$username:$password@" : "") .
|
||||||
|
($matches[2] !== "" ? $matches[2] : $defaultServer) .
|
||||||
|
(isset($matches[3]) ? $matches[3] : ($defaultPort ? ":$defaultPort" : ""));
|
||||||
|
}
|
||||||
|
|
||||||
function add_invalid_login() {
|
function add_invalid_login() {
|
||||||
global $adminer;
|
global $adminer;
|
||||||
$fp = file_open_lock(get_temp_dir() . "/adminer.invalid");
|
$fp = file_open_lock(get_temp_dir() . "/adminer.invalid");
|
||||||
|
@ -40,30 +92,25 @@ function add_invalid_login() {
|
||||||
|
|
||||||
function check_invalid_login() {
|
function check_invalid_login() {
|
||||||
global $adminer;
|
global $adminer;
|
||||||
$filename = get_temp_dir() . "/adminer.invalid";
|
$invalids = unserialize(@file_get_contents(get_temp_dir() . "/adminer.invalid")); // @ - may not exist
|
||||||
if (file_exists($filename)) {
|
|
||||||
$invalids = unserialize(file_get_contents(get_temp_dir() . "/adminer.invalid"));
|
|
||||||
} else {
|
|
||||||
$invalids = [];
|
|
||||||
}
|
|
||||||
$invalid = ($invalids ? $invalids[$adminer->bruteForceKey()] : array());
|
$invalid = ($invalids ? $invalids[$adminer->bruteForceKey()] : array());
|
||||||
if ($invalid === null) {
|
if ($invalid === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$next_attempt = (isset($invalid[1]) && $invalid[1] > 29 ? $invalid[0] - time() : 0); // allow 30 invalid attempts
|
$next_attempt = ($invalid[1] > 29 ? $invalid[0] - time() : 0); // allow 30 invalid attempts
|
||||||
if ($next_attempt > 0) { //! do the same with permanent login
|
if ($next_attempt > 0) { //! do the same with permanent login
|
||||||
auth_error(lang('Too many unsuccessful logins, try again in %d minute(s).', ceil($next_attempt / 60)));
|
auth_error(lang('Too many unsuccessful logins, try again in %d minute(s).', ceil($next_attempt / 60)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$auth = (isset($_POST["auth"]) ? $_POST["auth"] : null);
|
$auth = $_POST["auth"];
|
||||||
if ($auth) {
|
if ($auth) {
|
||||||
session_regenerate_id(); // defense against session fixation
|
session_regenerate_id(); // defense against session fixation
|
||||||
$vendor = isset($auth["driver"]) ? $auth["driver"] : null;
|
$vendor = $auth["driver"];
|
||||||
$server = isset($auth["server"]) ? $auth["server"] : null;
|
$server = trim($auth["server"]);
|
||||||
$username = isset($auth["username"]) ? $auth["username"] : null;
|
$username = $auth["username"];
|
||||||
$password = isset($auth["password"]) ? (string) $auth["password"] : null;
|
$password = (string) $auth["password"];
|
||||||
$db = isset($auth["db"]) ? $auth["db"] : null;
|
$db = $auth["db"];
|
||||||
set_password($vendor, $server, $username, $password);
|
set_password($vendor, $server, $username, $password);
|
||||||
$_SESSION["db"][$vendor][$server][$username][$db] = true;
|
$_SESSION["db"][$vendor][$server][$username][$db] = true;
|
||||||
if ($auth["permanent"]) {
|
if ($auth["permanent"]) {
|
||||||
|
@ -81,12 +128,12 @@ if ($auth) {
|
||||||
redirect(auth_url($vendor, $server, $username, $db));
|
redirect(auth_url($vendor, $server, $username, $db));
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif (isset($_POST["logout"]) && $_POST["logout"] && (!$has_token || verify_token())) {
|
} elseif ($_POST["logout"] && (!$has_token || verify_token())) {
|
||||||
foreach (array("pwds", "db", "dbs", "queries") as $key) {
|
foreach (array("pwds", "db", "dbs", "queries") as $key) {
|
||||||
set_session($key, null);
|
set_session($key, null);
|
||||||
}
|
}
|
||||||
unset_permanent();
|
unset_permanent();
|
||||||
redirect(substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1), lang('Logout successful.') . '.');
|
redirect(substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1), lang('Logout successful.'));
|
||||||
|
|
||||||
} elseif ($permanent && !$_SESSION["pwds"]) {
|
} elseif ($permanent && !$_SESSION["pwds"]) {
|
||||||
session_regenerate_id();
|
session_regenerate_id();
|
||||||
|
@ -119,7 +166,7 @@ function auth_error($error) {
|
||||||
$session_name = session_name();
|
$session_name = session_name();
|
||||||
if (isset($_GET["username"])) {
|
if (isset($_GET["username"])) {
|
||||||
header("HTTP/1.1 403 Forbidden"); // 401 requires sending WWW-Authenticate header
|
header("HTTP/1.1 403 Forbidden"); // 401 requires sending WWW-Authenticate header
|
||||||
if (((isset($_COOKIE[$session_name]) && $_COOKIE[$session_name]) || (isset($_GET[$session_name]) && $_GET[$session_name])) && !$has_token) {
|
if (($_COOKIE[$session_name] || $_GET[$session_name]) && !$has_token) {
|
||||||
$error = lang('Session expired, please login again.');
|
$error = lang('Session expired, please login again.');
|
||||||
} else {
|
} else {
|
||||||
restart_session();
|
restart_session();
|
||||||
|
@ -134,7 +181,7 @@ function auth_error($error) {
|
||||||
unset_permanent();
|
unset_permanent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((isset($_COOKIE[$session_name]) === false || !$_COOKIE[$session_name]) && (isset($_GET[$session_name]) && $_GET[$session_name]) && ini_bool("session.use_only_cookies")) {
|
if (!$_COOKIE[$session_name] && $_GET[$session_name] && ini_bool("session.use_only_cookies")) {
|
||||||
$error = lang('Session support must be enabled.');
|
$error = lang('Session support must be enabled.');
|
||||||
}
|
}
|
||||||
$params = session_get_cookie_params();
|
$params = session_get_cookie_params();
|
||||||
|
@ -163,27 +210,20 @@ if (isset($_GET["username"]) && !class_exists("Min_DB")) {
|
||||||
stop_session(true);
|
stop_session(true);
|
||||||
|
|
||||||
if (isset($_GET["username"]) && is_string(get_password())) {
|
if (isset($_GET["username"]) && is_string(get_password())) {
|
||||||
if (strpos(SERVER, ':') !== false) {
|
validate_server_input();
|
||||||
list($host, $port) = explode(":", SERVER, 2);
|
|
||||||
} else {
|
|
||||||
$host = SERVER;
|
|
||||||
$port = null;
|
|
||||||
}
|
|
||||||
if (preg_match('~^\s*([-+]?\d+)~', $port, $match) && ($match[1] < 1024 || $match[1] > 65535)) { // is_numeric('80#') would still connect to port 80
|
|
||||||
auth_error(lang('Connecting to privileged ports is not allowed.'));
|
|
||||||
}
|
|
||||||
check_invalid_login();
|
check_invalid_login();
|
||||||
|
|
||||||
$connection = connect();
|
$connection = connect();
|
||||||
$driver = new Min_Driver($connection);
|
$driver = new Min_Driver($connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
$login = null;
|
$login = null;
|
||||||
if (!is_object($connection) || ($login = $adminer->login($_GET["username"], get_password())) !== true) {
|
if (!is_object($connection) || ($login = $adminer->login($_GET["username"], get_password())) !== true) {
|
||||||
$error = (is_string($connection) ? h($connection) : (is_string($login) ? $login : lang('Invalid credentials.')));
|
$error = (is_string($connection) ? h($connection) : (is_string($login) ? $login : lang('Invalid server or credentials.')));
|
||||||
auth_error($error . (preg_match('~^ | $~', get_password()) ? '<br>' . lang('There is a space in the input password which might be the cause.') : ''));
|
auth_error($error . (preg_match('~^ | $~', get_password()) ? '<br>' . lang('There is a space in the input password which might be the cause.') : ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST["logout"]) && $_POST["logout"] && $has_token && !verify_token()) {
|
if ($_POST["logout"] && $has_token && !verify_token()) {
|
||||||
page_header(lang('Logout'), lang('Invalid CSRF token. Send the form again.'));
|
page_header(lang('Logout'), lang('Invalid CSRF token. Send the form again.'));
|
||||||
page_footer("db");
|
page_footer("db");
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
function adminer_errors($errNo, $errStr, $errFile, $errLine) {
|
function adminer_errors($errno, $errstr) {
|
||||||
file_put_contents("php://stderr", sprintf("%d - %s - %s:%d\n", $errNo, $errStr, $errFile, $errLine));
|
return !!preg_match('~^(Trying to access array offset on( value of type)? null|Undefined array key)~', $errstr);
|
||||||
printf("%d - %s - %s:%d\n", $errNo, $errStr, $errFile, $errLine);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
error_reporting(6135); // errors and warnings
|
error_reporting(6135); // errors and warnings
|
||||||
|
@ -31,10 +30,10 @@ if (isset($_GET["file"])) {
|
||||||
include "../adminer/file.inc.php";
|
include "../adminer/file.inc.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["script"]) && $_GET["script"] == "version") {
|
if ($_GET["script"] == "version") {
|
||||||
$fp = file_open_lock(get_temp_dir() . "/adminer.version");
|
$fp = file_open_lock(get_temp_dir() . "/adminer.version");
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
file_write_unlock($fp, serialize(array("signature" => $_POST["signature"], "version" => $_POST["version"])));
|
file_write_unlock($fp, serialize(array("version" => $_POST["version"])));
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -44,13 +43,13 @@ global $adminer, $connection, $driver, $drivers, $edit_functions, $enum_length,
|
||||||
if (!$_SERVER["REQUEST_URI"]) { // IIS 5 compatibility
|
if (!$_SERVER["REQUEST_URI"]) { // IIS 5 compatibility
|
||||||
$_SERVER["REQUEST_URI"] = $_SERVER["ORIG_PATH_INFO"];
|
$_SERVER["REQUEST_URI"] = $_SERVER["ORIG_PATH_INFO"];
|
||||||
}
|
}
|
||||||
if (isset($_SERVER["QUERY_STRING"]) && !strpos($_SERVER["REQUEST_URI"], '?') && $_SERVER["QUERY_STRING"] != "") { // IIS 7 compatibility
|
if (!strpos($_SERVER["REQUEST_URI"], '?') && $_SERVER["QUERY_STRING"] != "") { // IIS 7 compatibility
|
||||||
$_SERVER["REQUEST_URI"] .= "?$_SERVER[QUERY_STRING]";
|
$_SERVER["REQUEST_URI"] .= "?$_SERVER[QUERY_STRING]";
|
||||||
}
|
}
|
||||||
if (isset($_SERVER["HTTP_X_FORWARDED_PREFIX"]) && $_SERVER["HTTP_X_FORWARDED_PREFIX"]) {
|
if ($_SERVER["HTTP_X_FORWARDED_PREFIX"]) {
|
||||||
$_SERVER["REQUEST_URI"] = $_SERVER["HTTP_X_FORWARDED_PREFIX"] . $_SERVER["REQUEST_URI"];
|
$_SERVER["REQUEST_URI"] = $_SERVER["HTTP_X_FORWARDED_PREFIX"] . $_SERVER["REQUEST_URI"];
|
||||||
}
|
}
|
||||||
$HTTPS = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off")) || ini_bool("session.cookie_secure"); // session.cookie_secure could be set on HTTP if we are behind a reverse proxy
|
$HTTPS = ($_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off")) || ini_bool("session.cookie_secure"); // session.cookie_secure could be set on HTTP if we are behind a reverse proxy
|
||||||
|
|
||||||
@ini_set("session.use_trans_sid", false); // protect links in export, @ - may be disabled
|
@ini_set("session.use_trans_sid", false); // protect links in export, @ - may be disabled
|
||||||
if (!defined("SID")) {
|
if (!defined("SID")) {
|
||||||
|
@ -103,16 +102,8 @@ if ($adminer->operators === null) {
|
||||||
$adminer->operator_regexp = $operator_regexp;
|
$adminer->operator_regexp = $operator_regexp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET[DRIVER])) {
|
|
||||||
define("SERVER", $_GET[DRIVER]); // read from pgsql=localhost
|
define("SERVER", $_GET[DRIVER]); // read from pgsql=localhost
|
||||||
} else {
|
|
||||||
define("SERVER", "");
|
|
||||||
}
|
|
||||||
if (isset($_GET["db"])) {
|
|
||||||
define("DB", $_GET["db"]); // for the sake of speed and size
|
define("DB", $_GET["db"]); // for the sake of speed and size
|
||||||
} else {
|
|
||||||
define("DB", "");
|
|
||||||
}
|
|
||||||
define("ME", preg_replace('~\?.*~', '', relative_uri()) . '?'
|
define("ME", preg_replace('~\?.*~', '', relative_uri()) . '?'
|
||||||
. (sid() ? SID . '&' : '')
|
. (sid() ? SID . '&' : '')
|
||||||
. (SERVER !== null ? DRIVER . "=" . urlencode(SERVER) . '&' : '')
|
. (SERVER !== null ? DRIVER . "=" . urlencode(SERVER) . '&' : '')
|
||||||
|
|
|
@ -5,7 +5,7 @@ function connect_error() {
|
||||||
header("HTTP/1.1 404 Not Found");
|
header("HTTP/1.1 404 Not Found");
|
||||||
page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), true);
|
page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), true);
|
||||||
} else {
|
} else {
|
||||||
if (isset($_POST["db"]) && $_POST["db"] && !$error) {
|
if ($_POST["db"] && !$error) {
|
||||||
queries_redirect(substr(ME, 0, -1), lang('Databases have been dropped.'), drop_databases($_POST["db"]));
|
queries_redirect(substr(ME, 0, -1), lang('Databases have been dropped.'), drop_databases($_POST["db"]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,17 +42,17 @@ function connect_error() {
|
||||||
. "</thead>\n"
|
. "</thead>\n"
|
||||||
;
|
;
|
||||||
|
|
||||||
$databases = (isset($_GET["dbsize"]) && $_GET["dbsize"] ? count_tables($databases) : array_flip($databases));
|
$databases = ($_GET["dbsize"] ? count_tables($databases) : array_flip($databases));
|
||||||
|
|
||||||
foreach ($databases as $db => $tables) {
|
foreach ($databases as $db => $tables) {
|
||||||
$root = h(ME) . "db=" . urlencode($db);
|
$root = h(ME) . "db=" . urlencode($db);
|
||||||
$id = h("Db-" . $db);
|
$id = h("Db-" . $db);
|
||||||
echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) (isset($_POST["db"]) ? $_POST["db"] : [])), "", "", "", $id) : "");
|
echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]), "", "", "", $id) : "");
|
||||||
echo "<th><a href='$root' id='$id'>" . h($db) . "</a>";
|
echo "<th><a href='$root' id='$id'>" . h($db) . "</a>";
|
||||||
$collation = h(db_collation($db, $collations));
|
$collation = h(db_collation($db, $collations));
|
||||||
echo "<td>" . (support("database") ? "<a href='$root" . ($scheme ? "&ns=" : "") . "&database=' title='" . lang('Alter database') . "'>$collation</a>" : $collation);
|
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') . "'>" . (isset($_GET["dbsize"]) && $_GET["dbsize"] ? $tables : "?") . "</a>";
|
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) . "'>" . (isset($_GET["dbsize"]) && $_GET["dbsize"] ? db_size($db) : "?");
|
echo "<td align='right' id='size-" . h($db) . "'>" . ($_GET["dbsize"] ? db_size($db) : "?");
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,8 +82,8 @@ if (isset($_GET["import"])) {
|
||||||
$_GET["sql"] = $_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"]) || (isset($_GET["script"]) && $_GET["script"] == "connect") || (isset($_GET["script"]) && $_GET["script"] == "kill"))) {
|
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 != "" || (isset($_GET["refresh"]) && $_GET["refresh"])) {
|
if (DB != "" || $_GET["refresh"]) {
|
||||||
restart_session();
|
restart_session();
|
||||||
set_session("dbs", null);
|
set_session("dbs", null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,22 +35,10 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||||
<body class="<?php echo lang('ltr'); ?> nojs <?php echo $GLOBALS['project']; ?>">
|
<body class="<?php echo lang('ltr'); ?> nojs <?php echo $GLOBALS['project']; ?>">
|
||||||
<?php
|
<?php
|
||||||
$filename = get_temp_dir() . "/adminer.version";
|
$filename = get_temp_dir() . "/adminer.version";
|
||||||
if ((isset($_COOKIE["adminer_version"]) === false || !$_COOKIE["adminer_version"]) && function_exists('openssl_verify') && file_exists($filename) && filemtime($filename) + 86400 > time()) { // 86400 - 1 day in seconds
|
if (!$_COOKIE["adminer_version"] && file_exists($filename) && filemtime($filename) + 86400 > time()) { // 86400 - 1 day in seconds
|
||||||
$version = unserialize(file_get_contents($filename));
|
$version = unserialize(file_get_contents($filename));
|
||||||
$public = "-----BEGIN PUBLIC KEY-----
|
|
||||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwqWOVuF5uw7/+Z70djoK
|
|
||||||
RlHIZFZPO0uYRezq90+7Amk+FDNd7KkL5eDve+vHRJBLAszF/7XKXe11xwliIsFs
|
|
||||||
DFWQlsABVZB3oisKCBEuI71J4kPH8dKGEWR9jDHFw3cWmoH3PmqImX6FISWbG3B8
|
|
||||||
h7FIx3jEaw5ckVPVTeo5JRm/1DZzJxjyDenXvBQ/6o9DgZKeNDgxwKzH+sw9/YCO
|
|
||||||
jHnq1cFpOIISzARlrHMa/43YfeNRAm/tsBXjSxembBPo7aQZLAWHmaj5+K19H10B
|
|
||||||
nCpz9Y++cipkVEiKRGih4ZEvjoFysEOdRLj6WiD/uUNky4xGeA6LaJqh5XpkFkcQ
|
|
||||||
fQIDAQAB
|
|
||||||
-----END PUBLIC KEY-----
|
|
||||||
";
|
|
||||||
if (openssl_verify($version["version"], base64_decode($version["signature"]), $public) == 1) {
|
|
||||||
$_COOKIE["adminer_version"] = $version["version"]; // doesn't need to send to the browser
|
$_COOKIE["adminer_version"] = $version["version"]; // doesn't need to send to the browser
|
||||||
}
|
}
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<script<?php echo nonce(); ?>>
|
<script<?php echo nonce(); ?>>
|
||||||
mixin(document.body, {onkeydown: bodyKeydown, onclick: bodyClick<?php
|
mixin(document.body, {onkeydown: bodyKeydown, onclick: bodyClick<?php
|
||||||
|
@ -76,11 +64,11 @@ var thousandsSeparator = '<?php echo js_escape(lang(',')); ?>';
|
||||||
echo "$server\n";
|
echo "$server\n";
|
||||||
} else {
|
} else {
|
||||||
echo "<a href='" . h($link) . "' accesskey='1' title='Alt+Shift+1'>$server</a> » ";
|
echo "<a href='" . h($link) . "' accesskey='1' title='Alt+Shift+1'>$server</a> » ";
|
||||||
if ((isset($_GET["ns"]) && $_GET["ns"] != "") || (DB != "" && is_array($breadcrumb))) {
|
if ($_GET["ns"] != "" || (DB != "" && is_array($breadcrumb))) {
|
||||||
echo '<a href="' . h($link . "&db=" . urlencode(DB) . (support("scheme") ? "&ns=" : "")) . '">' . h(DB) . '</a> » ';
|
echo '<a href="' . h($link . "&db=" . urlencode(DB) . (support("scheme") ? "&ns=" : "")) . '">' . h(DB) . '</a> » ';
|
||||||
}
|
}
|
||||||
if (is_array($breadcrumb)) {
|
if (is_array($breadcrumb)) {
|
||||||
if (isset($_GET["ns"]) && $_GET["ns"] != "") {
|
if ($_GET["ns"] != "") {
|
||||||
echo '<a href="' . h(substr(ME, 0, -1)) . '">' . h($_GET["ns"]) . '</a> » ';
|
echo '<a href="' . h(substr(ME, 0, -1)) . '">' . h($_GET["ns"]) . '</a> » ';
|
||||||
}
|
}
|
||||||
foreach ($breadcrumb as $key => $val) {
|
foreach ($breadcrumb as $key => $val) {
|
||||||
|
@ -133,8 +121,8 @@ function csp() {
|
||||||
return array(
|
return array(
|
||||||
array(
|
array(
|
||||||
"script-src" => "'self' 'unsafe-inline' 'nonce-" . get_nonce() . "' 'strict-dynamic'", // 'self' is a fallback for browsers not supporting 'strict-dynamic', 'unsafe-inline' is a fallback for browsers not supporting 'nonce-'
|
"script-src" => "'self' 'unsafe-inline' 'nonce-" . get_nonce() . "' 'strict-dynamic'", // 'self' is a fallback for browsers not supporting 'strict-dynamic', 'unsafe-inline' is a fallback for browsers not supporting 'nonce-'
|
||||||
"connect-src" => "'self'",
|
"connect-src" => "'self' https://api.github.com/repos/adminerevo/adminerevo/releases/latest",
|
||||||
"frame-src" => "https://www.adminer.org",
|
"frame-src" => "'self'",
|
||||||
"object-src" => "'none'",
|
"object-src" => "'none'",
|
||||||
"base-uri" => "'none'",
|
"base-uri" => "'none'",
|
||||||
"form-action" => "'self'",
|
"form-action" => "'self'",
|
||||||
|
|
|
@ -47,7 +47,7 @@ function get_driver($id) {
|
||||||
$query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page);
|
$query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page);
|
||||||
if (!$query) {
|
if (!$query) {
|
||||||
$query = "SELECT" . limit(
|
$query = "SELECT" . limit(
|
||||||
(isset($_GET["page"]) && $_GET["page"] != "last" && $limit != "" && $group && $is_group && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . implode(", ", $select) . "\nFROM " . table($table),
|
($_GET["page"] != "last" && $limit != "" && $group && $is_group && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . implode(", ", $select) . "\nFROM " . table($table),
|
||||||
($where ? "\nWHERE " . implode(" AND ", $where) : "") . ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : ""),
|
($where ? "\nWHERE " . implode(" AND ", $where) : "") . ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : ""),
|
||||||
($limit != "" ? +$limit : null),
|
($limit != "" ? +$limit : null),
|
||||||
($page ? $limit * $page : 0),
|
($page ? $limit * $page : 0),
|
||||||
|
|
|
@ -104,8 +104,8 @@ function referencable_primary($self) {
|
||||||
foreach (table_status('', true) as $table_name => $table) {
|
foreach (table_status('', true) as $table_name => $table) {
|
||||||
if ($table_name != $self && fk_support($table)) {
|
if ($table_name != $self && fk_support($table)) {
|
||||||
foreach (fields($table_name) as $field) {
|
foreach (fields($table_name) as $field) {
|
||||||
if (isset($field["primary"]) && $field["primary"]) {
|
if ($field["primary"]) {
|
||||||
if (isset($return[$table_name]) && $return[$table_name]) { // multi column primary key
|
if ($return[$table_name]) { // multi column primary key
|
||||||
unset($return[$table_name]);
|
unset($return[$table_name]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -121,10 +121,7 @@ function referencable_primary($self) {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function adminer_settings() {
|
function adminer_settings() {
|
||||||
$settings = [];
|
|
||||||
if (isset($_COOKIE["adminer_settings"])) {
|
|
||||||
parse_str($_COOKIE["adminer_settings"], $settings);
|
parse_str($_COOKIE["adminer_settings"], $settings);
|
||||||
}
|
|
||||||
return $settings;
|
return $settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +131,7 @@ function adminer_settings() {
|
||||||
*/
|
*/
|
||||||
function adminer_setting($key) {
|
function adminer_setting($key) {
|
||||||
$settings = adminer_settings();
|
$settings = adminer_settings();
|
||||||
return (isset($settings[$key]) ? $settings[$key] : null);
|
return $settings[$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Store settings to a cookie
|
/** Store settings to a cookie
|
||||||
|
@ -185,11 +182,11 @@ if ($foreign_keys) {
|
||||||
$structured_types[lang('Foreign keys')] = $foreign_keys;
|
$structured_types[lang('Foreign keys')] = $foreign_keys;
|
||||||
}
|
}
|
||||||
echo optionlist(array_merge($extra_types, $structured_types), $type);
|
echo optionlist(array_merge($extra_types, $structured_types), $type);
|
||||||
?></select><td><input name="<?php echo h($key); ?>[length]" value="<?php echo h(isset($field["length"]) ? $field["length"] : null); ?>" size="3"<?php echo ((isset($field["length"]) === false || !$field["length"]) && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); //! type="number" with enabled JavaScript ?> aria-labelledby="label-length"><td class="options"><?php
|
?></select><td><input name="<?php echo h($key); ?>[length]" value="<?php echo h($field["length"]); ?>" size="3"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); //! type="number" with enabled JavaScript ?> aria-labelledby="label-length"><td class="options"><?php
|
||||||
echo "<select name='" . h($key) . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, (isset($field["collation"]) ? $field["collation"] : null)) . '</select>';
|
echo "<select name='" . h($key) . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>';
|
||||||
echo ($unsigned ? "<select name='" . h($key) . "[unsigned]'" . (!$type || preg_match(number_type(), $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, (isset($field["unsigned"]) ? $field["unsigned"] : null)) . '</select>' : '');
|
echo ($unsigned ? "<select name='" . h($key) . "[unsigned]'" . (!$type || preg_match(number_type(), $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : '');
|
||||||
echo (isset($field['on_update']) ? "<select name='" . h($key) . "[on_update]'" . (preg_match('~timestamp|datetime~', $type) ? "" : " class='hidden'") . '>' . optionlist(array("" => "(" . lang('ON UPDATE') . ")", "CURRENT_TIMESTAMP"), (preg_match('~^CURRENT_TIMESTAMP~i', (isset($field["on_update"]) ? $field["on_update"] : null)) ? "CURRENT_TIMESTAMP" : $field["on_update"])) . '</select>' : '');
|
echo (isset($field['on_update']) ? "<select name='" . h($key) . "[on_update]'" . (preg_match('~timestamp|datetime~', $type) ? "" : " class='hidden'") . '>' . optionlist(array("" => "(" . lang('ON UPDATE') . ")", "CURRENT_TIMESTAMP"), (preg_match('~^CURRENT_TIMESTAMP~i', $field["on_update"]) ? "CURRENT_TIMESTAMP" : $field["on_update"])) . '</select>' : '');
|
||||||
echo ($foreign_keys ? "<select name='" . h($key) . "[on_delete]'" . (preg_match("~`~", $type) ? "" : " class='hidden'") . "><option value=''>(" . lang('ON DELETE') . ")" . optionlist(explode("|", $on_actions), (isset($field["on_delete"]) ? $field["on_delete"] : null)) . "</select> " : " "); // space for IE
|
echo ($foreign_keys ? "<select name='" . h($key) . "[on_delete]'" . (preg_match("~`~", $type) ? "" : " class='hidden'") . "><option value=''>(" . lang('ON DELETE') . ")" . optionlist(explode("|", $on_actions), $field["on_delete"]) . "</select> " : " "); // space for IE
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Filter length value including enums
|
/** Filter length value including enums
|
||||||
|
@ -230,11 +227,11 @@ function process_field($field, $type_field) {
|
||||||
return array(
|
return array(
|
||||||
idf_escape(trim($field["field"])),
|
idf_escape(trim($field["field"])),
|
||||||
process_type($type_field),
|
process_type($type_field),
|
||||||
(isset($field["null"]) && $field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp
|
($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp
|
||||||
default_value($field),
|
default_value($field),
|
||||||
(preg_match('~timestamp|datetime~', $field["type"]) && $field["on_update"] ? " ON UPDATE $field[on_update]" : ""),
|
(preg_match('~timestamp|datetime~', $field["type"]) && $field["on_update"] ? " ON UPDATE $field[on_update]" : ""),
|
||||||
(support("comment") && $field["comment"] != "" ? " COMMENT " . q($field["comment"]) : ""),
|
(support("comment") && $field["comment"] != "" ? " COMMENT " . q($field["comment"]) : ""),
|
||||||
(isset($field["auto_increment"]) && $field["auto_increment"] ? auto_increment() : null),
|
($field["auto_increment"] ? auto_increment() : null),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,7 +307,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
|
||||||
<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" data-maxlength="64" autocapitalize="off" aria-labelledby="label-name"><?php } ?>
|
<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" data-maxlength="64" autocapitalize="off" aria-labelledby="label-name"><?php } ?>
|
||||||
<input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>"><?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
|
<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") { ?>
|
<?php if ($type == "TABLE") { ?>
|
||||||
<td><?php echo checkbox("fields[$i][null]", 1, isset($field["null"]) ? $field["null"] : null, "", "", "block", "label-null"); ?>
|
<td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block", "label-null"); ?>
|
||||||
<td><label class="block"><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?> aria-labelledby="label-ai"></label><td<?php echo $default_class; ?>><?php
|
<td><label class="block"><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?> aria-labelledby="label-ai"></label><td<?php echo $default_class; ?>><?php
|
||||||
echo checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "label-default"); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" aria-labelledby="label-default"><?php
|
echo checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "label-default"); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" aria-labelledby="label-default"><?php
|
||||||
echo (support("comment") ? "<td$comment_class><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' data-maxlength='" . (min_version(5.5) ? 1024 : 255) . "' aria-labelledby='label-comment'>" : "");
|
echo (support("comment") ? "<td$comment_class><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' data-maxlength='" . (min_version(5.5) ? 1024 : 255) . "' aria-labelledby='label-comment'>" : "");
|
||||||
|
@ -331,7 +328,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
|
||||||
*/
|
*/
|
||||||
function process_fields(&$fields) {
|
function process_fields(&$fields) {
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
if (isset($_POST["up"]) && $_POST["up"]) {
|
if ($_POST["up"]) {
|
||||||
$last = 0;
|
$last = 0;
|
||||||
foreach ($fields as $key => $field) {
|
foreach ($fields as $key => $field) {
|
||||||
if (key($_POST["up"]) == $key) {
|
if (key($_POST["up"]) == $key) {
|
||||||
|
@ -344,7 +341,7 @@ function process_fields(&$fields) {
|
||||||
}
|
}
|
||||||
$offset++;
|
$offset++;
|
||||||
}
|
}
|
||||||
} elseif (isset($_POST["down"]) && $_POST["down"]) {
|
} elseif ($_POST["down"]) {
|
||||||
$found = false;
|
$found = false;
|
||||||
foreach ($fields as $key => $field) {
|
foreach ($fields as $key => $field) {
|
||||||
if (isset($field["field"]) && $found) {
|
if (isset($field["field"]) && $found) {
|
||||||
|
@ -357,10 +354,10 @@ function process_fields(&$fields) {
|
||||||
}
|
}
|
||||||
$offset++;
|
$offset++;
|
||||||
}
|
}
|
||||||
} elseif (isset($_POST["add"]) && $_POST["add"]) {
|
} elseif ($_POST["add"]) {
|
||||||
$fields = array_values($fields);
|
$fields = array_values($fields);
|
||||||
array_splice($fields, key($_POST["add"]), 0, array(array()));
|
array_splice($fields, key($_POST["add"]), 0, array(array()));
|
||||||
} elseif (isset($_POST["drop_col"]) === false || !$_POST["drop_col"]) {
|
} elseif (!$_POST["drop_col"]) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -548,7 +545,7 @@ function doc_link($paths, $text = "<sup>?</sup>") {
|
||||||
$urls['sql'] = "https://mariadb.com/kb/en/library/";
|
$urls['sql'] = "https://mariadb.com/kb/en/library/";
|
||||||
$paths['sql'] = (isset($paths['mariadb']) ? $paths['mariadb'] : str_replace(".html", "/", $paths['sql']));
|
$paths['sql'] = (isset($paths['mariadb']) ? $paths['mariadb'] : str_replace(".html", "/", $paths['sql']));
|
||||||
}
|
}
|
||||||
return (isset($paths[$jush]) && $paths[$jush] ? "<a href='" . h($urls[$jush] . $paths[$jush]) . "'" . target_blank() . ">$text</a>" : "");
|
return ($paths[$jush] ? "<a href='" . h($urls[$jush] . $paths[$jush]) . "'" . target_blank() . ">$text</a>" : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Wrap gzencode() for usage in ob_start()
|
/** Wrap gzencode() for usage in ob_start()
|
||||||
|
|
|
@ -490,7 +490,6 @@ function escape_key($key) {
|
||||||
function where($where, $fields = array()) {
|
function where($where, $fields = array()) {
|
||||||
global $connection, $jush;
|
global $connection, $jush;
|
||||||
$return = array();
|
$return = array();
|
||||||
if (isset($where["where"])) {
|
|
||||||
foreach ((array) $where["where"] as $key => $val) {
|
foreach ((array) $where["where"] as $key => $val) {
|
||||||
$key = bracket_escape($key, 1); // 1 - back
|
$key = bracket_escape($key, 1); // 1 - back
|
||||||
$column = escape_key($key);
|
$column = escape_key($key);
|
||||||
|
@ -504,12 +503,9 @@ function where($where, $fields = array()) {
|
||||||
$return[] = "$column = " . q($val) . " COLLATE " . charset($connection) . "_bin";
|
$return[] = "$column = " . q($val) . " COLLATE " . charset($connection) . "_bin";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (isset($where["null"])) {
|
|
||||||
foreach ((array) $where["null"] as $key) {
|
foreach ((array) $where["null"] as $key) {
|
||||||
$return[] = escape_key($key) . " IS NULL";
|
$return[] = escape_key($key) . " IS NULL";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return implode(" AND ", $return);
|
return implode(" AND ", $return);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -599,11 +595,8 @@ function stop_session($force = false) {
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
function &get_session($key) {
|
function &get_session($key) {
|
||||||
if (isset($_GET["username"]) && isset($_SESSION[$key][DRIVER][SERVER][$_GET["username"]])) {
|
|
||||||
return $_SESSION[$key][DRIVER][SERVER][$_GET["username"]];
|
return $_SESSION[$key][DRIVER][SERVER][$_GET["username"]];
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Set session variable for current server
|
/** Set session variable for current server
|
||||||
* @param string
|
* @param string
|
||||||
|
@ -637,11 +630,8 @@ function auth_url($vendor, $server, $username, $db = null) {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function is_ajax() {
|
function is_ajax() {
|
||||||
if (isset($_SERVER["HTTP_X_REQUESTED_WITH"])) {
|
|
||||||
return ($_SERVER["HTTP_X_REQUESTED_WITH"] == "XMLHttpRequest");
|
return ($_SERVER["HTTP_X_REQUESTED_WITH"] == "XMLHttpRequest");
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Send Location header and exit
|
/** Send Location header and exit
|
||||||
* @param string null to only set a message
|
* @param string null to only set a message
|
||||||
|
@ -1007,7 +997,7 @@ function input($field, $value, $function) {
|
||||||
echo "<textarea$attrs cols='50' rows='12' class='jush-js'>" . h($value) . '</textarea>';
|
echo "<textarea$attrs cols='50' rows='12' class='jush-js'>" . h($value) . '</textarea>';
|
||||||
} else {
|
} else {
|
||||||
// int(3) is only a display hint
|
// int(3) is only a display hint
|
||||||
$maxlength = (!preg_match('~int~', $field["type"]) && preg_match('~^(\d+)(,(\d+))?$~', $field["length"], $match) ? ((preg_match("~binary~", $field["type"]) ? 2 : 1) * $match[1] + (isset($match[3]) && $match[3] ? 1 : 0) + (isset($match[2]) && $match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
|
$maxlength = (!preg_match('~int~', $field["type"]) && preg_match('~^(\d+)(,(\d+))?$~', $field["length"], $match) ? ((preg_match("~binary~", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
|
||||||
if ($jush == 'sql' && min_version(5.6) && preg_match('~time~', $field["type"])) {
|
if ($jush == 'sql' && min_version(5.6) && preg_match('~time~', $field["type"])) {
|
||||||
$maxlength += 7; // microtime
|
$maxlength += 7; // microtime
|
||||||
}
|
}
|
||||||
|
@ -1515,15 +1505,13 @@ function edit_form($table, $fields, $row, $update) {
|
||||||
: (isset($_GET["select"]) ? false : $default)
|
: (isset($_GET["select"]) ? false : $default)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if ((isset($_POST["save"]) === false || !$_POST["save"]) && is_string($value)) {
|
if (!$_POST["save"] && is_string($value)) {
|
||||||
$value = $adminer->editVal($value, $field);
|
$value = $adminer->editVal($value, $field);
|
||||||
}
|
}
|
||||||
$fname = null;
|
$fname = null;
|
||||||
if (isset($_POST["function"][$name])) {
|
if (isset($_POST["function"][$name])) {
|
||||||
$fname = (string)$_POST["function"][$name];
|
$fname = (string)$_POST["function"][$name];
|
||||||
}
|
}
|
||||||
$function = null;
|
|
||||||
if (isset($_POST["save"])) {
|
|
||||||
$function = ($_POST["save"]
|
$function = ($_POST["save"]
|
||||||
? $fname
|
? $fname
|
||||||
: ($update && preg_match('~^CURRENT_TIMESTAMP~i', $field["on_update"])
|
: ($update && preg_match('~^CURRENT_TIMESTAMP~i', $field["on_update"])
|
||||||
|
@ -1531,7 +1519,6 @@ function edit_form($table, $fields, $row, $update) {
|
||||||
: ($value === false ? null : ($value !== null ? '' : 'NULL'))
|
: ($value === false ? null : ($value !== null ? '' : 'NULL'))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
|
||||||
if (!$_POST && !$update && $value == $field["default"] && preg_match('~^[\w.]+\(~', $value)) {
|
if (!$_POST && !$update && $value == $field["default"] && preg_match('~^[\w.]+\(~', $value)) {
|
||||||
$function = "SQL";
|
$function = "SQL";
|
||||||
}
|
}
|
||||||
|
@ -1568,7 +1555,7 @@ function edit_form($table, $fields, $row, $update) {
|
||||||
: ($_POST || !$fields ? "" : script("focus(qsa('td', qs('#form'))[1].firstChild);"))
|
: ($_POST || !$fields ? "" : script("focus(qsa('td', qs('#form'))[1].firstChild);"))
|
||||||
);
|
);
|
||||||
if (isset($_GET["select"])) {
|
if (isset($_GET["select"])) {
|
||||||
hidden_fields(array("check" => (array) isset($_POST["check"]) ? $_POST["check"] : null, "clone" => isset($_POST["clone"]) ? $_POST["clone"] : null, "all" => isset($_POST["all"]) ? $_POST["all"] : null));
|
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="referer" value="<?php echo h(isset($_POST["referer"]) ? $_POST["referer"] : $_SERVER["HTTP_REFERER"]); ?>">
|
||||||
|
|
|
@ -63,7 +63,7 @@ function get_lang() {
|
||||||
*/
|
*/
|
||||||
function lang($idf, $number = null) {
|
function lang($idf, $number = null) {
|
||||||
global $LANG, $translations;
|
global $LANG, $translations;
|
||||||
$translation = (isset($translations[$idf]) ? $translations[$idf] : $idf);
|
$translation = ($translations[$idf] ? $translations[$idf] : $idf);
|
||||||
if (is_array($translation)) {
|
if (is_array($translation)) {
|
||||||
$pos = ($number == 1 ? 0
|
$pos = ($number == 1 ? 0
|
||||||
: ($LANG == 'cs' || $LANG == 'sk' ? ($number && $number < 5 ? 1 : 2) // different forms for 1, 2-4, other
|
: ($LANG == 'cs' || $LANG == 'sk' ? ($number && $number < 5 ? 1 : 2) // different forms for 1, 2-4, other
|
||||||
|
@ -102,10 +102,10 @@ if (isset($_POST["lang"]) && verify_token()) { // $error not yet available
|
||||||
}
|
}
|
||||||
|
|
||||||
$LANG = "en";
|
$LANG = "en";
|
||||||
if (isset($_COOKIE["adminer_lang"]) && isset($langs[$_COOKIE["adminer_lang"]])) {
|
if (isset($langs[$_COOKIE["adminer_lang"]])) {
|
||||||
cookie("adminer_lang", $_COOKIE["adminer_lang"]);
|
cookie("adminer_lang", $_COOKIE["adminer_lang"]);
|
||||||
$LANG = $_COOKIE["adminer_lang"];
|
$LANG = $_COOKIE["adminer_lang"];
|
||||||
} elseif (isset($_SESSION["lang"]) && isset($langs[$_SESSION["lang"]])) {
|
} elseif (isset($langs[$_SESSION["lang"]])) {
|
||||||
$LANG = $_SESSION["lang"];
|
$LANG = $_SESSION["lang"];
|
||||||
} else {
|
} else {
|
||||||
$accept_language = array();
|
$accept_language = array();
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<?php
|
<?php
|
||||||
$VERSION = "4.8.4-dev";
|
$VERSION = "4.8.4";
|
||||||
|
|
|
@ -14,7 +14,7 @@ include "./include/tmpfile.inc.php";
|
||||||
$enum_length = "'(?:''|[^'\\\\]|\\\\.)*'";
|
$enum_length = "'(?:''|[^'\\\\]|\\\\.)*'";
|
||||||
$inout = "IN|OUT|INOUT";
|
$inout = "IN|OUT|INOUT";
|
||||||
|
|
||||||
if (isset($_GET["select"]) && ((isset($_POST["edit"]) && $_POST["edit"]) || (isset($_POST["clone"]) && $_POST["clone"])) && (isset($_POST["save"]) || !$_POST["save"])) {
|
if (isset($_GET["select"]) && ($_POST["edit"] || $_POST["clone"]) && !$_POST["save"]) {
|
||||||
$_GET["edit"] = $_GET["select"];
|
$_GET["edit"] = $_GET["select"];
|
||||||
}
|
}
|
||||||
if (isset($_GET["callf"])) {
|
if (isset($_GET["callf"])) {
|
||||||
|
|
|
@ -72,7 +72,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"]) {
|
||||||
page_header(lang('Indexes'), $error, array("table" => $TABLE), h($TABLE));
|
page_header(lang('Indexes'), $error, array("table" => $TABLE), h($TABLE));
|
||||||
|
|
||||||
$fields = array_keys(fields($TABLE));
|
$fields = array_keys(fields($TABLE));
|
||||||
if (isset($_POST["add"]) && $_POST["add"]) {
|
if ($_POST["add"]) {
|
||||||
foreach ($row["indexes"] as $key => $index) {
|
foreach ($row["indexes"] as $key => $index) {
|
||||||
if ($index["columns"][count($index["columns"])] != "") {
|
if ($index["columns"][count($index["columns"])] != "") {
|
||||||
$row["indexes"][$key]["columns"][] = "";
|
$row["indexes"][$key]["columns"][] = "";
|
||||||
|
@ -113,8 +113,8 @@ if ($primary) {
|
||||||
}
|
}
|
||||||
$j = 1;
|
$j = 1;
|
||||||
foreach ($row["indexes"] as $index) {
|
foreach ($row["indexes"] as $index) {
|
||||||
if (isset($_POST["drop_col"]) === false || !$_POST["drop_col"] || $j != key($_POST["drop_col"])) {
|
if (!$_POST["drop_col"] || $j != key($_POST["drop_col"])) {
|
||||||
echo "<tr><td>" . html_select("indexes[$j][type]", array(-1 => "") + $index_types, isset($index["type"]) ? $index["type"] : null, ($j == count($row["indexes"]) ? "indexesAddRow.call(this);" : 1), "label-type");
|
echo "<tr><td>" . html_select("indexes[$j][type]", array(-1 => "") + $index_types, $index["type"], ($j == count($row["indexes"]) ? "indexesAddRow.call(this);" : 1), "label-type");
|
||||||
|
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
ksort($index["columns"]);
|
ksort($index["columns"]);
|
||||||
|
@ -127,12 +127,12 @@ foreach ($row["indexes"] as $index) {
|
||||||
"partial(" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . ", '" . js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_") . "')"
|
"partial(" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . ", '" . js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_") . "')"
|
||||||
);
|
);
|
||||||
echo ($jush == "sql" || $jush == "mssql" ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "' title='" . lang('Length') . "'>" : "");
|
echo ($jush == "sql" || $jush == "mssql" ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "' title='" . lang('Length') . "'>" : "");
|
||||||
echo (support("descidx") ? checkbox("indexes[$j][descs][$i]", 1, isset($index["descs"][$key]) ? $index["descs"][$key] : null, lang('descending')) : "");
|
echo (support("descidx") ? checkbox("indexes[$j][descs][$i]", 1, $index["descs"][$key], lang('descending')) : "");
|
||||||
echo " </span>";
|
echo " </span>";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<td><input name='indexes[$j][name]' value='" . h(isset($index["name"]) ? $index["name"] : null) . "' autocapitalize='off' aria-labelledby='label-name'>\n";
|
echo "<td><input name='indexes[$j][name]' value='" . h($index["name"]) . "' autocapitalize='off' aria-labelledby='label-name'>\n";
|
||||||
echo "<td><input type='image' class='icon' name='drop_col[$j]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "'>" . script("qsl('input').onclick = partial(editingRemoveRow, 'indexes\$1[type]');");
|
echo "<td><input type='image' class='icon' name='drop_col[$j]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "'>" . script("qsl('input').onclick = partial(editingRemoveRow, 'indexes\$1[type]');");
|
||||||
}
|
}
|
||||||
$j++;
|
$j++;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'تسجيل الدخول',
|
'Login' => 'تسجيل الدخول',
|
||||||
'Logout successful.' => 'تم تسجيل الخروج بنجاح.',
|
'Logout successful.' => 'تم تسجيل الخروج بنجاح.',
|
||||||
'Invalid credentials.' => 'بيانات الدخول غير صالحة.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'الخادم',
|
'Server' => 'الخادم',
|
||||||
'Username' => 'اسم المستخدم',
|
'Username' => 'اسم المستخدم',
|
||||||
'Password' => 'كلمة المرور',
|
'Password' => 'كلمة المرور',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'no' => null,
|
'no' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Изход',
|
'Logout' => 'Изход',
|
||||||
'Logged as: %s' => 'Текущ потребител: %s',
|
'Logged as: %s' => 'Текущ потребител: %s',
|
||||||
'Logout successful.' => 'Излизането е успешно.',
|
'Logout successful.' => 'Излизането е успешно.',
|
||||||
'Invalid credentials.' => 'Невалидни потребителски данни.',
|
'Invalid server or credentials.' => null,
|
||||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Прекалено много неуспешни опити за вход, опитайте пак след %d минута.', 'Прекалено много неуспешни опити за вход, опитайте пак след %d минути.'),
|
'Too many unsuccessful logins, try again in %d minute(s).' => array('Прекалено много неуспешни опити за вход, опитайте пак след %d минута.', 'Прекалено много неуспешни опити за вход, опитайте пак след %d минути.'),
|
||||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Главната парола вече е невалидна. <a href="https://www.adminer.org/en/extension/"%s>Изберете</a> %s метод, за да я направите постоянна.',
|
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Главната парола вече е невалидна. <a href="https://www.adminer.org/en/extension/"%s>Изберете</a> %s метод, за да я направите постоянна.',
|
||||||
'Language' => 'Език',
|
'Language' => 'Език',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'লগইন',
|
'Login' => 'লগইন',
|
||||||
'Logout successful.' => 'সফলভাবে লগআউট হয়েছে।',
|
'Logout successful.' => 'সফলভাবে লগআউট হয়েছে।',
|
||||||
'Invalid credentials.' => 'ভুল পাসওয়ার্ড।',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'সার্ভার',
|
'Server' => 'সার্ভার',
|
||||||
'Username' => 'ইউজারের নাম',
|
'Username' => 'ইউজারের নাম',
|
||||||
'Password' => 'পাসওয়ার্ড',
|
'Password' => 'পাসওয়ার্ড',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'no' => null,
|
'no' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Odjava',
|
'Logout' => 'Odjava',
|
||||||
'Logged as: %s' => 'Prijavi se kao: %s',
|
'Logged as: %s' => 'Prijavi se kao: %s',
|
||||||
'Logout successful.' => 'Uspešna odjava.',
|
'Logout successful.' => 'Uspešna odjava.',
|
||||||
'Invalid credentials.' => 'Nevažeće dozvole.',
|
'Invalid server or credentials.' => null,
|
||||||
'Language' => 'Jezik',
|
'Language' => 'Jezik',
|
||||||
'Invalid CSRF token. Send the form again.' => 'Nevažeći CSRF kod. Proslijedite ponovo formu.',
|
'Invalid CSRF token. Send the form again.' => 'Nevažeći CSRF kod. Proslijedite ponovo formu.',
|
||||||
'No extension' => 'Bez dodataka',
|
'No extension' => 'Bez dodataka',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Inicia la sessió',
|
'Login' => 'Inicia la sessió',
|
||||||
'Logout successful.' => 'Desconnexió correcta.',
|
'Logout successful.' => 'Desconnexió correcta.',
|
||||||
'Invalid credentials.' => 'Credencials invàlides.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'Servidor',
|
'Server' => 'Servidor',
|
||||||
'Username' => 'Nom d\'usuari',
|
'Username' => 'Nom d\'usuari',
|
||||||
'Password' => 'Contrasenya',
|
'Password' => 'Contrasenya',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'no' => null,
|
'no' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Odhlásit',
|
'Logout' => 'Odhlásit',
|
||||||
'Logged as: %s' => 'Přihlášen jako: %s',
|
'Logged as: %s' => 'Přihlášen jako: %s',
|
||||||
'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
|
'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
|
||||||
'Invalid credentials.' => 'Neplatné přihlašovací údaje.',
|
'Invalid server or credentials.' => 'Neplatný server nebo přihlašovací údaje.',
|
||||||
'There is a space in the input password which might be the cause.' => 'Problém může být, že je v zadaném hesle mezera.',
|
'There is a space in the input password which might be the cause.' => 'Problém může být, že je v zadaném hesle mezera.',
|
||||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer nepodporuje přístup k databázi bez hesla, <a href="https://www.adminer.org/cs/password/"%s>více informací</a>.',
|
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer nepodporuje přístup k databázi bez hesla, <a href="https://www.adminer.org/cs/password/"%s>více informací</a>.',
|
||||||
'Database does not support password.' => 'Databáze nepodporuje heslo.',
|
'Database does not support password.' => 'Databáze nepodporuje heslo.',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Copy to clipboard' => 'Kopírovat do schránky',
|
'Copy to clipboard' => 'Kopírovat do schránky',
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => 'Ke stažení je nová verze AdminerEvo!',
|
||||||
);
|
);
|
||||||
|
|
|
@ -9,7 +9,7 @@ $translations = array(
|
||||||
'Logout' => 'Log ud',
|
'Logout' => 'Log ud',
|
||||||
'Logged as: %s' => 'Logget ind som: %s',
|
'Logged as: %s' => 'Logget ind som: %s',
|
||||||
'Logout successful.' => 'Log af vellykket.',
|
'Logout successful.' => 'Log af vellykket.',
|
||||||
'Invalid credentials.' => 'Ugyldige log ind oplysninger.',
|
'Invalid server or credentials.' => null,
|
||||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-kodeordet er udløbet. <a href="https://www.adminer.org/en/extension/"%s>Implementer</a> en metode for %s for at gøre det permanent.',
|
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-kodeordet er udløbet. <a href="https://www.adminer.org/en/extension/"%s>Implementer</a> en metode for %s for at gøre det permanent.',
|
||||||
'Language' => 'Sprog',
|
'Language' => 'Sprog',
|
||||||
'Invalid CSRF token. Send the form again.' => 'Ugyldigt CSRF-token - Genindsend formen.',
|
'Invalid CSRF token. Send the form again.' => 'Ugyldigt CSRF-token - Genindsend formen.',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Login',
|
'Login' => 'Login',
|
||||||
'Logout successful.' => 'Abmeldung erfolgreich.',
|
'Logout successful.' => 'Abmeldung erfolgreich.',
|
||||||
'Invalid credentials.' => 'Ungültige Anmelde-Informationen.',
|
'Invalid server or credentials.' => 'Ungültige Server oder Anmelde-Informationen.',
|
||||||
'Server' => 'Server',
|
'Server' => 'Server',
|
||||||
'Username' => 'Benutzer',
|
'Username' => 'Benutzer',
|
||||||
'Password' => 'Passwort',
|
'Password' => 'Passwort',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Αποσύνδεση',
|
'Logout' => 'Αποσύνδεση',
|
||||||
'Logged as: %s' => 'Συνδεθήκατε ως %s',
|
'Logged as: %s' => 'Συνδεθήκατε ως %s',
|
||||||
'Logout successful.' => 'Αποσυνδεθήκατε με επιτυχία.',
|
'Logout successful.' => 'Αποσυνδεθήκατε με επιτυχία.',
|
||||||
'Invalid credentials.' => 'Εσφαλμένα Διαπιστευτήρια.',
|
'Invalid server or credentials.' => null,
|
||||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Επανειλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτό.', 'Επανειλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτά.'),
|
'Too many unsuccessful logins, try again in %d minute(s).' => array('Επανειλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτό.', 'Επανειλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτά.'),
|
||||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Έληξε ο Κύριος Κωδικός. <a href="https://www.adminer.org/en/extension/"%s>Ενεργοποιήστε</a> τη μέθοδο %s για να τον κάνετε μόνιμο.',
|
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Έληξε ο Κύριος Κωδικός. <a href="https://www.adminer.org/en/extension/"%s>Ενεργοποιήστε</a> τη μέθοδο %s για να τον κάνετε μόνιμο.',
|
||||||
'Language' => 'Γλώσσα',
|
'Language' => 'Γλώσσα',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Login',
|
'Login' => 'Login',
|
||||||
'Logout successful.' => 'Sesión finalizada con éxito.',
|
'Logout successful.' => 'Sesión finalizada con éxito.',
|
||||||
'Invalid credentials.' => 'Usuario y/o clave de acceso incorrecta.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'Servidor',
|
'Server' => 'Servidor',
|
||||||
'Username' => 'Usuario',
|
'Username' => 'Usuario',
|
||||||
'Password' => 'Contraseña',
|
'Password' => 'Contraseña',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'no' => null,
|
'no' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Logi sisse',
|
'Login' => 'Logi sisse',
|
||||||
'Logout successful.' => 'Väljalogimine õnnestus.',
|
'Logout successful.' => 'Väljalogimine õnnestus.',
|
||||||
'Invalid credentials.' => 'Ebakorrektsed andmed.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'Server',
|
'Server' => 'Server',
|
||||||
'Username' => 'Kasutajanimi',
|
'Username' => 'Kasutajanimi',
|
||||||
'Password' => 'Parool',
|
'Password' => 'Parool',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'no' => null,
|
'no' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'خروج',
|
'Logout' => 'خروج',
|
||||||
'Logged as: %s' => 'ورود به عنوان: %s',
|
'Logged as: %s' => 'ورود به عنوان: %s',
|
||||||
'Logout successful.' => 'با موفقیت خارج شدید.',
|
'Logout successful.' => 'با موفقیت خارج شدید.',
|
||||||
'Invalid credentials.' => 'اعتبار سنجی نامعتبر.',
|
'Invalid server or credentials.' => null,
|
||||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.', 'ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.'),
|
'Too many unsuccessful logins, try again in %d minute(s).' => array('ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.', 'ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.'),
|
||||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'رمز اصلی باطل شده است. روش %s را <a href="https://www.adminer.org/en/extension/"%s>پیاده سازی</a> کرده تا آن را دائمی سازید.',
|
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'رمز اصلی باطل شده است. روش %s را <a href="https://www.adminer.org/en/extension/"%s>پیاده سازی</a> کرده تا آن را دائمی سازید.',
|
||||||
'Language' => 'زبان',
|
'Language' => 'زبان',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Kirjaudu ulos',
|
'Logout' => 'Kirjaudu ulos',
|
||||||
'Logged as: %s' => 'Olet kirjautunut käyttäjänä: %s',
|
'Logged as: %s' => 'Olet kirjautunut käyttäjänä: %s',
|
||||||
'Logout successful.' => 'Uloskirjautuminen onnistui.',
|
'Logout successful.' => 'Uloskirjautuminen onnistui.',
|
||||||
'Invalid credentials.' => 'Virheelliset kirjautumistiedot.',
|
'Invalid server or credentials.' => null,
|
||||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.', 'Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.'),
|
'Too many unsuccessful logins, try again in %d minute(s).' => array('Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.', 'Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.'),
|
||||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-salasana ei ole enää voimassa. <a href="https://www.adminer.org/en/extension/"%s>Toteuta</a> %s-metodi sen tekemiseksi pysyväksi.',
|
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-salasana ei ole enää voimassa. <a href="https://www.adminer.org/en/extension/"%s>Toteuta</a> %s-metodi sen tekemiseksi pysyväksi.',
|
||||||
'Language' => 'Kieli',
|
'Language' => 'Kieli',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Copy to clipboard' => null,
|
'Copy to clipboard' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Authentification',
|
'Login' => 'Authentification',
|
||||||
'Logout successful.' => 'Au revoir !',
|
'Logout successful.' => 'Au revoir !',
|
||||||
'Invalid credentials.' => 'Authentification échouée.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'Serveur',
|
'Server' => 'Serveur',
|
||||||
'Username' => 'Utilisateur',
|
'Username' => 'Utilisateur',
|
||||||
'Password' => 'Mot de passe',
|
'Password' => 'Mot de passe',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => 'Désactiver %s ou activer %s or %s extensions.',
|
'Disable %s or enable %s or %s extensions.' => 'Désactiver %s ou activer %s or %s extensions.',
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Conectar',
|
'Login' => 'Conectar',
|
||||||
'Logout successful.' => 'Pechouse a sesión con éxito.',
|
'Logout successful.' => 'Pechouse a sesión con éxito.',
|
||||||
'Invalid credentials.' => 'Credenciais (usuario e/ou contrasinal) inválidos.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'Servidor',
|
'Server' => 'Servidor',
|
||||||
'Username' => 'Usuario',
|
'Username' => 'Usuario',
|
||||||
'Password' => 'Contrasinal',
|
'Password' => 'Contrasinal',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'התחברות',
|
'Login' => 'התחברות',
|
||||||
'Logout successful.' => 'ההתחברות הצליחה',
|
'Logout successful.' => 'ההתחברות הצליחה',
|
||||||
'Invalid credentials.' => 'פרטי התחברות שגויים',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'שרת',
|
'Server' => 'שרת',
|
||||||
'Username' => 'שם משתמש',
|
'Username' => 'שם משתמש',
|
||||||
'Password' => 'סיסמה',
|
'Password' => 'סיסמה',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Belépés',
|
'Login' => 'Belépés',
|
||||||
'Logout successful.' => 'Sikeres kilépés.',
|
'Logout successful.' => 'Sikeres kilépés.',
|
||||||
'Invalid credentials.' => 'Érvénytelen adatok.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'Szerver',
|
'Server' => 'Szerver',
|
||||||
'Username' => 'Felhasználó',
|
'Username' => 'Felhasználó',
|
||||||
'Password' => 'Jelszó',
|
'Password' => 'Jelszó',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'no' => null,
|
'no' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Keluar',
|
'Logout' => 'Keluar',
|
||||||
'Logged as: %s' => 'Masuk sebagai: %s',
|
'Logged as: %s' => 'Masuk sebagai: %s',
|
||||||
'Logout successful.' => 'Berhasil keluar.',
|
'Logout successful.' => 'Berhasil keluar.',
|
||||||
'Invalid credentials.' => 'Akses tidak sah.',
|
'Invalid server or credentials.' => null,
|
||||||
'Language' => 'Bahasa',
|
'Language' => 'Bahasa',
|
||||||
'Invalid CSRF token. Send the form again.' => 'Token CSRF tidak sah. Kirim ulang formulir.',
|
'Invalid CSRF token. Send the form again.' => 'Token CSRF tidak sah. Kirim ulang formulir.',
|
||||||
'No extension' => 'Ekstensi tidak ada',
|
'No extension' => 'Ekstensi tidak ada',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Autenticazione',
|
'Login' => 'Autenticazione',
|
||||||
'Logout successful.' => 'Uscita effettuata con successo.',
|
'Logout successful.' => 'Uscita effettuata con successo.',
|
||||||
'Invalid credentials.' => 'Credenziali non valide.',
|
'Invalid server or credentials.' => 'Server o credenziali non valide.',
|
||||||
'Server' => 'Server',
|
'Server' => 'Server',
|
||||||
'Username' => 'Utente',
|
'Username' => 'Utente',
|
||||||
'Password' => 'Password',
|
'Password' => 'Password',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'no' => 'no',
|
'no' => 'no',
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'ログイン',
|
'Login' => 'ログイン',
|
||||||
'Logout successful.' => 'ログアウト',
|
'Logout successful.' => 'ログアウト',
|
||||||
'Invalid credentials.' => '不正なログイン',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'サーバ',
|
'Server' => 'サーバ',
|
||||||
'Username' => 'ユーザ名',
|
'Username' => 'ユーザ名',
|
||||||
'Password' => 'パスワード',
|
'Password' => 'パスワード',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'შესვლა',
|
'Login' => 'შესვლა',
|
||||||
'Logout successful.' => 'გამოხვედით სისტემიდან.',
|
'Logout successful.' => 'გამოხვედით სისტემიდან.',
|
||||||
'Invalid credentials.' => 'არასწორი მომხმარებელი ან პაროლი.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'სერვერი',
|
'Server' => 'სერვერი',
|
||||||
'Username' => 'მომხმარებელი',
|
'Username' => 'მომხმარებელი',
|
||||||
'Password' => 'პაროლი',
|
'Password' => 'პაროლი',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'Copy to clipboard' => null,
|
'Copy to clipboard' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -121,7 +121,7 @@ $translations = array(
|
||||||
'Indexes have been altered.' => '색인을 변경했습니다.',
|
'Indexes have been altered.' => '색인을 변경했습니다.',
|
||||||
'Indexes' => '색인',
|
'Indexes' => '색인',
|
||||||
'Insert' => '삽입',
|
'Insert' => '삽입',
|
||||||
'Invalid credentials.' => '잘못된 로그인',
|
'Invalid server or credentials.' => null,
|
||||||
'Invalid CSRF token. Send the form again.' => '잘못된 CSRF 토큰입니다. 다시 보내주십시오.',
|
'Invalid CSRF token. Send the form again.' => '잘못된 CSRF 토큰입니다. 다시 보내주십시오.',
|
||||||
'Invalid database.' => '잘못된 데이터베이스입니다.',
|
'Invalid database.' => '잘못된 데이터베이스입니다.',
|
||||||
'Invalid schema.' => '잘못된 스키마입니다.',
|
'Invalid schema.' => '잘못된 스키마입니다.',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'no' => null,
|
'no' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Atsijungti',
|
'Logout' => 'Atsijungti',
|
||||||
'Logged as: %s' => 'Prisijungęs kaip: %s',
|
'Logged as: %s' => 'Prisijungęs kaip: %s',
|
||||||
'Logout successful.' => 'Jūs atsijungėte nuo sistemos.',
|
'Logout successful.' => 'Jūs atsijungėte nuo sistemos.',
|
||||||
'Invalid credentials.' => 'Neteisingi prisijungimo duomenys.',
|
'Invalid server or credentials.' => null,
|
||||||
'Language' => 'Kalba',
|
'Language' => 'Kalba',
|
||||||
'Invalid CSRF token. Send the form again.' => 'Neteisingas CSRF tokenas. Bandykite siųsti formos duomenis dar kartą.',
|
'Invalid CSRF token. Send the form again.' => 'Neteisingas CSRF tokenas. Bandykite siųsti formos duomenis dar kartą.',
|
||||||
'No extension' => 'Nėra plėtiio',
|
'No extension' => 'Nėra plėtiio',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'no' => null,
|
'no' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Ieiet',
|
'Login' => 'Ieiet',
|
||||||
'Logout successful.' => 'Jūs veiksmīgi izgājāt no sistēmas.',
|
'Logout successful.' => 'Jūs veiksmīgi izgājāt no sistēmas.',
|
||||||
'Invalid credentials.' => 'Nepareizs lietotāja vārds vai parole.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'Serveris',
|
'Server' => 'Serveris',
|
||||||
'Username' => 'Lietotājs',
|
'Username' => 'Lietotājs',
|
||||||
'Password' => 'Parole',
|
'Password' => 'Parole',
|
||||||
|
@ -306,4 +306,6 @@ $translations = array(
|
||||||
'Copy to clipboard' => null,
|
'Copy to clipboard' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Log keluar',
|
'Logout' => 'Log keluar',
|
||||||
'Logged as: %s' => 'Log masuk sebagai: %s',
|
'Logged as: %s' => 'Log masuk sebagai: %s',
|
||||||
'Logout successful.' => 'Log keluar berjaya.',
|
'Logout successful.' => 'Log keluar berjaya.',
|
||||||
'Invalid credentials.' => 'Akses tidak sah.',
|
'Invalid server or credentials.' => null,
|
||||||
'Too many unsuccessful logins, try again in %d minute(s).' => 'Terlalu banyak percubaan log masuk yang gagal, sila cuba lagi dalam masa %d minit.',
|
'Too many unsuccessful logins, try again in %d minute(s).' => 'Terlalu banyak percubaan log masuk yang gagal, sila cuba lagi dalam masa %d minit.',
|
||||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Kata laluan utama telah luput. <a href="https://www.adminer.org/en/extension/"%s>Gunakan</a> cara %s untuk mengekalkannya.',
|
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Kata laluan utama telah luput. <a href="https://www.adminer.org/en/extension/"%s>Gunakan</a> cara %s untuk mengekalkannya.',
|
||||||
'Language' => 'Bahasa',
|
'Language' => 'Bahasa',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Aanmelden',
|
'Login' => 'Aanmelden',
|
||||||
'Logout successful.' => 'Successvol afgemeld.',
|
'Logout successful.' => 'Successvol afgemeld.',
|
||||||
'Invalid credentials.' => 'Ongeldige gebruikersgegevens.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'Server',
|
'Server' => 'Server',
|
||||||
'Username' => 'Gebruikersnaam',
|
'Username' => 'Gebruikersnaam',
|
||||||
'Password' => 'Wachtwoord',
|
'Password' => 'Wachtwoord',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'no' => 'neen',
|
'no' => 'neen',
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -9,7 +9,7 @@ $translations = array(
|
||||||
'Logout' => 'Logg ut',
|
'Logout' => 'Logg ut',
|
||||||
'Logged as: %s' => 'Logget inn som: %s',
|
'Logged as: %s' => 'Logget inn som: %s',
|
||||||
'Logout successful.' => 'Utlogging vellykket.',
|
'Logout successful.' => 'Utlogging vellykket.',
|
||||||
'Invalid credentials.' => 'Ugylding innloggingsinformasjon.',
|
'Invalid server or credentials.' => null,
|
||||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-passord er utløpt. <a href="https://www.adminer.org/en/extension/"%s>Implementer</a> en metode for %s for å gjøre det permanent.',
|
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-passord er utløpt. <a href="https://www.adminer.org/en/extension/"%s>Implementer</a> en metode for %s for å gjøre det permanent.',
|
||||||
'Language' => 'Språk',
|
'Language' => 'Språk',
|
||||||
'Invalid CSRF token. Send the form again.' => 'Ugylding CSRF-token - Send inn skjemaet igjen.',
|
'Invalid CSRF token. Send the form again.' => 'Ugylding CSRF-token - Send inn skjemaet igjen.',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Wyloguj',
|
'Logout' => 'Wyloguj',
|
||||||
'Logged as: %s' => 'Zalogowany jako: %s',
|
'Logged as: %s' => 'Zalogowany jako: %s',
|
||||||
'Logout successful.' => 'Wylogowano pomyślnie.',
|
'Logout successful.' => 'Wylogowano pomyślnie.',
|
||||||
'Invalid credentials.' => 'Nieprawidłowe dane logowania.',
|
// 'Invalid credentials.' => 'Nieprawidłowy serwer lub 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.'),
|
'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="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Ważność hasła głównego wygasła. <a href="https://www.adminer.org/pl/extension/"%s>Zaimplementuj</a> własną metodę %s, aby ustawić je na stałe.',
|
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Ważność hasła głównego wygasła. <a href="https://www.adminer.org/pl/extension/"%s>Zaimplementuj</a> własną metodę %s, aby ustawić je na stałe.',
|
||||||
'Language' => 'Język',
|
'Language' => 'Język',
|
||||||
|
@ -350,4 +350,7 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
|
'Invalid server or credentials.' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Entrar',
|
'Login' => 'Entrar',
|
||||||
'Logout successful.' => 'Saída bem sucedida.',
|
'Logout successful.' => 'Saída bem sucedida.',
|
||||||
'Invalid credentials.' => 'Identificação inválida.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'Servidor',
|
'Server' => 'Servidor',
|
||||||
'Username' => 'Usuário',
|
'Username' => 'Usuário',
|
||||||
'Password' => 'Senha',
|
'Password' => 'Senha',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'HH:MM:SS' => null,
|
'HH:MM:SS' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Entrar',
|
'Login' => 'Entrar',
|
||||||
'Logout successful.' => 'Sessão terminada com sucesso.',
|
'Logout successful.' => 'Sessão terminada com sucesso.',
|
||||||
'Invalid credentials.' => 'Identificação inválida.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'Servidor',
|
'Server' => 'Servidor',
|
||||||
'Username' => 'Nome de utilizador',
|
'Username' => 'Nome de utilizador',
|
||||||
'Password' => 'Senha',
|
'Password' => 'Senha',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'HH:MM:SS' => null,
|
'HH:MM:SS' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Intră',
|
'Login' => 'Intră',
|
||||||
'Logout successful.' => 'Ați ieșit cu succes.',
|
'Logout successful.' => 'Ați ieșit cu succes.',
|
||||||
'Invalid credentials.' => 'Numele de utilizator sau parola este greșită.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'Server',
|
'Server' => 'Server',
|
||||||
'Username' => 'Nume de utilizator',
|
'Username' => 'Nume de utilizator',
|
||||||
'Password' => 'Parola',
|
'Password' => 'Parola',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'no' => null,
|
'no' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Войти',
|
'Login' => 'Войти',
|
||||||
'Logout successful.' => 'Вы успешно покинули систему.',
|
'Logout successful.' => 'Вы успешно покинули систему.',
|
||||||
'Invalid credentials.' => 'Неправильное имя пользователя или пароль.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'Сервер',
|
'Server' => 'Сервер',
|
||||||
'Username' => 'Имя пользователя',
|
'Username' => 'Имя пользователя',
|
||||||
'Password' => 'Пароль',
|
'Password' => 'Пароль',
|
||||||
|
@ -304,5 +304,5 @@ $translations = array(
|
||||||
'Copy to clipboard' => 'Скопировать в буфер обмена',
|
'Copy to clipboard' => 'Скопировать в буфер обмена',
|
||||||
'Disable %s or enable %s or %s extensions.' => 'Отключите %s или включите расширения %s или %s.',
|
'Disable %s or enable %s or %s extensions.' => 'Отключите %s или включите расширения %s или %s.',
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'Prihlásiť sa',
|
'Login' => 'Prihlásiť sa',
|
||||||
'Logout successful.' => 'Odhlásenie prebehlo v poriadku.',
|
'Logout successful.' => 'Odhlásenie prebehlo v poriadku.',
|
||||||
'Invalid credentials.' => 'Neplatné prihlasovacie údaje.',
|
'Invalid server or credentials.' => 'Neplatný server alebo prihlasovacie údaje.',
|
||||||
'Server' => 'Server',
|
'Server' => 'Server',
|
||||||
'Username' => 'Používateľ',
|
'Username' => 'Používateľ',
|
||||||
'Password' => 'Heslo',
|
'Password' => 'Heslo',
|
||||||
|
@ -70,7 +70,7 @@ $translations = array(
|
||||||
'Unable to select the table' => 'Tabuľku sa nepodarilo vypísať',
|
'Unable to select the table' => 'Tabuľku sa nepodarilo vypísať',
|
||||||
'Invalid CSRF token. Send the form again.' => 'Neplatný token CSRF. Odošlite formulár znova.',
|
'Invalid CSRF token. Send the form again.' => 'Neplatný token CSRF. Odošlite formulár znova.',
|
||||||
'Comment' => 'Komentár',
|
'Comment' => 'Komentár',
|
||||||
'Default values' => 'Východzie hodnoty',
|
'Default values' => 'Predvolené hodnoty',
|
||||||
'%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtov'),
|
'%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtov'),
|
||||||
'No commands to execute.' => 'Žiadne príkazy na vykonanie.',
|
'No commands to execute.' => 'Žiadne príkazy na vykonanie.',
|
||||||
'Unable to upload a file.' => 'Súbor sa nepodarilo nahrať.',
|
'Unable to upload a file.' => 'Súbor sa nepodarilo nahrať.',
|
||||||
|
@ -94,8 +94,8 @@ $translations = array(
|
||||||
'Add column' => 'Pridať stĺpec',
|
'Add column' => 'Pridať stĺpec',
|
||||||
'Alter' => 'Zmeniť',
|
'Alter' => 'Zmeniť',
|
||||||
'Add foreign key' => 'Pridať cudzí kľúč',
|
'Add foreign key' => 'Pridať cudzí kľúč',
|
||||||
'ON DELETE' => 'ON DELETE',
|
'ON DELETE' => 'Pri zmazaní',
|
||||||
'ON UPDATE' => 'ON UPDATE',
|
'ON UPDATE' => 'Pri aktualizácii',
|
||||||
'Index Type' => 'Typ indexu',
|
'Index Type' => 'Typ indexu',
|
||||||
'Column (length)' => 'Stĺpec (dĺžka)',
|
'Column (length)' => 'Stĺpec (dĺžka)',
|
||||||
'View has been dropped.' => 'Pohľad bol odstránený.',
|
'View has been dropped.' => 'Pohľad bol odstránený.',
|
||||||
|
@ -266,43 +266,45 @@ $translations = array(
|
||||||
'Edit all' => 'Upraviť všetko',
|
'Edit all' => 'Upraviť všetko',
|
||||||
'HH:MM:SS' => 'HH:MM:SS',
|
'HH:MM:SS' => 'HH:MM:SS',
|
||||||
|
|
||||||
'Drop %s?' => null,
|
'Drop %s?' => 'Odstrániť %s?',
|
||||||
'Tables have been optimized.' => null,
|
'Tables have been optimized.' => 'Tabuľky boli optimalizované.',
|
||||||
'as a regular expression' => null,
|
'as a regular expression' => 'ako regulárny výraz',
|
||||||
'Materialized view' => null,
|
'Materialized view' => 'Materializovaný pohľad',
|
||||||
'Vacuum' => null,
|
'Vacuum' => 'Vyčistiť',
|
||||||
'Selected' => null,
|
'Selected' => 'Označené',
|
||||||
'overwrite' => null,
|
'overwrite' => 'prepísať',
|
||||||
'DB' => null,
|
'DB' => 'DB',
|
||||||
'File must be in UTF-8 encoding.' => null,
|
'File must be in UTF-8 encoding.' => 'Súbor musí byť v kódovaní UTF-8.',
|
||||||
'Modify' => null,
|
'Modify' => 'Zmeniť',
|
||||||
'Load more data' => null,
|
'Load more data' => 'Nahráť ďalšie dáta',
|
||||||
'Loading' => null,
|
'Loading' => 'Nahráva sa',
|
||||||
'Copy to clipboard' => null,
|
'Copy to clipboard' => 'Kopírovať do schránky',
|
||||||
'ATTACH queries are not supported.' => null,
|
'ATTACH queries are not supported.' => 'Dotazy ATTACH nie sú podporované.',
|
||||||
'Warnings' => null,
|
'Warnings' => 'Varovania',
|
||||||
'%d / ' => array(),
|
'%d / ' => '%d / ',
|
||||||
'Limit rows' => null,
|
'Limit rows' => 'Limit riadkov',
|
||||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer nepodporuje prístup k databáze bez hesla, <a href="https://www.adminer.org/cs/password/"%s>viac informácií</a>.',
|
||||||
'Default value' => null,
|
'Default value' => 'Predvolená hodnota',
|
||||||
'Full table scan' => null,
|
'Full table scan' => 'Prechod celej tabuľky',
|
||||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
'Too many unsuccessful logins, try again in %d minute(s).' => array('Príliš veľa pokusov o prihlásenie, skúste to znova za %d minutu.', 'Príliš veľa pokusov o prihlásenie, skúste to znova za %d minuty.', 'Príliš veľa pokusov o prihlásenie, skúste to znova za %d minút.'),
|
||||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Platnosť hlavného hesla vypršala. <a href="https://www.adminer.org/cs/extension/"%s>Implementujte</a> metodu %s, aby platilo natrvalo.',
|
||||||
'The action will be performed after successful login with the same credentials.' => null,
|
'The action will be performed after successful login with the same credentials.' => 'Akcia sa vykoná po úspešnom prihlásení s rovnakými prihlasovacími údajmi.',
|
||||||
'Connecting to privileged ports is not allowed.' => null,
|
'Connecting to privileged ports is not allowed.' => 'Pripojenie k privilegovaným portom nie je povolené.',
|
||||||
'There is a space in the input password which might be the cause.' => null,
|
'There is a space in the input password which might be the cause.' => 'V zadanom hesle je medzera, ktorá môže byť príčinou.',
|
||||||
'If you did not send this request from Adminer then close this page.' => null,
|
'If you did not send this request from Adminer then close this page.' => 'Pokiaľ ste tento požiadavok neodoslali z Adminera, zatvorte túto stránku.',
|
||||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
'You can upload a big SQL file via FTP and import it from server.' => 'Veľký SQL soubor môžete nahrať pomocou FTP a importovať ho zo servera.',
|
||||||
'Size' => null,
|
'Size' => 'Veľkosť',
|
||||||
'Compute' => null,
|
'Compute' => 'Spočítať',
|
||||||
'You are offline.' => null,
|
'You are offline.' => 'Ste offline.',
|
||||||
'You have no privileges to update this table.' => null,
|
'You have no privileges to update this table.' => 'Nemáte oprávnenie na aktualizáciu tejto tabuľky.',
|
||||||
'Saving' => null,
|
'Saving' => 'Ukladá sa',
|
||||||
'Unknown error.' => null,
|
'Unknown error.' => 'Neznáma chyba.',
|
||||||
'Database does not support password.' => null,
|
'Database does not support password.' => 'Databáza nepodporuje heslo.',
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => 'Zakážte %s alebo povoľte rozšírenie %s alebo %s.',
|
||||||
'yes' => null,
|
'yes' => 'áno',
|
||||||
'no' => null,
|
'no' => 'nie',
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => 'Stiahnite si novú verziu AdminerEvo!',
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Odjavi se',
|
'Logout' => 'Odjavi se',
|
||||||
'Logged as: %s' => 'Prijavljen kot: %s',
|
'Logged as: %s' => 'Prijavljen kot: %s',
|
||||||
'Logout successful.' => 'Prijava uspešna.',
|
'Logout successful.' => 'Prijava uspešna.',
|
||||||
'Invalid credentials.' => 'Neveljavne pravice.',
|
'Invalid server or credentials.' => 'Neveljaven strežnik ali pravice.',
|
||||||
'Language' => 'Jezik',
|
'Language' => 'Jezik',
|
||||||
'Invalid CSRF token. Send the form again.' => 'Neveljaven token CSRF. Pošljite formular še enkrat.',
|
'Invalid CSRF token. Send the form again.' => 'Neveljaven token CSRF. Pošljite formular še enkrat.',
|
||||||
'No extension' => 'Brez dodatkov',
|
'No extension' => 'Brez dodatkov',
|
||||||
|
@ -347,4 +347,6 @@ $translations = array(
|
||||||
'HH:MM:SS' => null,
|
'HH:MM:SS' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Одјава',
|
'Logout' => 'Одјава',
|
||||||
'Logged as: %s' => 'Пријави се као: %s',
|
'Logged as: %s' => 'Пријави се као: %s',
|
||||||
'Logout successful.' => 'Успешна одјава.',
|
'Logout successful.' => 'Успешна одјава.',
|
||||||
'Invalid credentials.' => 'Неважеће дозволе.',
|
'Invalid server or credentials.' => null,
|
||||||
'Language' => 'Језик',
|
'Language' => 'Језик',
|
||||||
'Invalid CSRF token. Send the form again.' => 'Неважећи CSRF код. Проследите поново форму.',
|
'Invalid CSRF token. Send the form again.' => 'Неважећи CSRF код. Проследите поново форму.',
|
||||||
'No extension' => 'Без додатака',
|
'No extension' => 'Без додатака',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Logga ut',
|
'Logout' => 'Logga ut',
|
||||||
'Logged as: %s' => 'Inloggad som: %s',
|
'Logged as: %s' => 'Inloggad som: %s',
|
||||||
'Logout successful.' => 'Du är nu utloggad.',
|
'Logout successful.' => 'Du är nu utloggad.',
|
||||||
'Invalid credentials.' => 'Ogiltiga inloggningsuppgifter.',
|
'Invalid server or credentials.' => null,
|
||||||
'There is a space in the input password which might be the cause.' => 'Det finns ett mellanslag i lösenordet, vilket kan vara anledningen.',
|
'There is a space in the input password which might be the cause.' => 'Det finns ett mellanslag i lösenordet, vilket kan vara anledningen.',
|
||||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer tillåter inte att ansluta till en databas utan lösenord. <a href="https://www.adminer.org/en/password/"%s>Mer information</a>.',
|
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer tillåter inte att ansluta till en databas utan lösenord. <a href="https://www.adminer.org/en/password/"%s>Mer information</a>.',
|
||||||
'Database does not support password.' => 'Databasen stödjer inte lösenord.',
|
'Database does not support password.' => 'Databasen stödjer inte lösenord.',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Copy to clipboard' => null,
|
'Copy to clipboard' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'நுழை',
|
'Login' => 'நுழை',
|
||||||
'Logout successful.' => 'வெற்றிகரமாய் வெளியேறியாயிற்று.',
|
'Logout successful.' => 'வெற்றிகரமாய் வெளியேறியாயிற்று.',
|
||||||
'Invalid credentials.' => 'சரியான விபரங்கள் இல்லை.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'வழங்கி (Server)',
|
'Server' => 'வழங்கி (Server)',
|
||||||
'Username' => 'பயனாளர் (User)',
|
'Username' => 'பயனாளர் (User)',
|
||||||
'Password' => 'கடவுச்சொல்',
|
'Password' => 'கடவுச்சொல்',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'no' => null,
|
'no' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$translations = array(
|
$translations = array(
|
||||||
'Login' => 'เข้าสู่ระบบ',
|
'Login' => 'เข้าสู่ระบบ',
|
||||||
'Logout successful.' => 'ออกจากระบบเรียบร้อยแล้ว.',
|
'Logout successful.' => 'ออกจากระบบเรียบร้อยแล้ว.',
|
||||||
'Invalid credentials.' => 'ข้อมูลไม่ถูกต้อง.',
|
'Invalid server or credentials.' => null,
|
||||||
'Server' => 'เซอเวอร์',
|
'Server' => 'เซอเวอร์',
|
||||||
'Username' => 'ชื่อผู้ใช้งาน',
|
'Username' => 'ชื่อผู้ใช้งาน',
|
||||||
'Password' => 'รหัสผ่าน',
|
'Password' => 'รหัสผ่าน',
|
||||||
|
@ -305,4 +305,6 @@ $translations = array(
|
||||||
'no' => null,
|
'no' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Çıkış',
|
'Logout' => 'Çıkış',
|
||||||
'Logged as: %s' => '%s olarak giriş yapıldı.',
|
'Logged as: %s' => '%s olarak giriş yapıldı.',
|
||||||
'Logout successful.' => 'Oturum başarıyla sonlandı.',
|
'Logout successful.' => 'Oturum başarıyla sonlandı.',
|
||||||
'Invalid credentials.' => 'Geçersiz kimlik bilgileri.',
|
'Invalid server or credentials.' => null,
|
||||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Çok fazla oturum açma denemesi yapıldı.', '%d Dakika sonra tekrar deneyiniz.'),
|
'Too many unsuccessful logins, try again in %d minute(s).' => array('Çok fazla oturum açma denemesi yapıldı.', '%d Dakika sonra tekrar deneyiniz.'),
|
||||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Ana şifrenin süresi doldu. Kalıcı olması için <a href="https://www.adminer.org/en/extension/"%s>%s medodunu</a> kullanın.',
|
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Ana şifrenin süresi doldu. Kalıcı olması için <a href="https://www.adminer.org/en/extension/"%s>%s medodunu</a> kullanın.',
|
||||||
'Language' => 'Dil',
|
'Language' => 'Dil',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Вийти',
|
'Logout' => 'Вийти',
|
||||||
'Logged as: %s' => 'Ви увійшли як: %s',
|
'Logged as: %s' => 'Ви увійшли як: %s',
|
||||||
'Logout successful.' => 'Ви вдало вийшли з системи.',
|
'Logout successful.' => 'Ви вдало вийшли з системи.',
|
||||||
'Invalid credentials.' => 'Неправильні дані входу.',
|
'Invalid server or credentials.' => null,
|
||||||
'Language' => 'Мова',
|
'Language' => 'Мова',
|
||||||
'Invalid CSRF token. Send the form again.' => 'Недійсний CSRF токен. Надішліть форму ще раз.',
|
'Invalid CSRF token. Send the form again.' => 'Недійсний CSRF токен. Надішліть форму ще раз.',
|
||||||
'No extension' => 'Нема розширень',
|
'No extension' => 'Нема розширень',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Thoát',
|
'Logout' => 'Thoát',
|
||||||
'Logged as: %s' => 'Vào dưới tên: %s',
|
'Logged as: %s' => 'Vào dưới tên: %s',
|
||||||
'Logout successful.' => 'Đã thoát xong.',
|
'Logout successful.' => 'Đã thoát xong.',
|
||||||
'Invalid credentials.' => 'Tài khoản sai.',
|
'Invalid server or credentials.' => null,
|
||||||
'Too many unsuccessful logins, try again in %d minute(s).' => 'Bạn gõ sai tài khoản quá nhiều lần, hãy thử lại sau %d phút nữa.',
|
'Too many unsuccessful logins, try again in %d minute(s).' => 'Bạn gõ sai tài khoản quá nhiều lần, hãy thử lại sau %d phút nữa.',
|
||||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Mật khẩu đã hết hạn. <a href="https://www.adminer.org/en/extension/"%s>Thử cách làm</a> để giữ cố định.',
|
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Mật khẩu đã hết hạn. <a href="https://www.adminer.org/en/extension/"%s>Thử cách làm</a> để giữ cố định.',
|
||||||
'Language' => 'Ngôn ngữ',
|
'Language' => 'Ngôn ngữ',
|
||||||
|
@ -349,4 +349,6 @@ $translations = array(
|
||||||
'Disable %s or enable %s or %s extensions.' => null,
|
'Disable %s or enable %s or %s extensions.' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => 'Xx',
|
'Logout' => 'Xx',
|
||||||
'Logged as: %s' => 'Xx: %s',
|
'Logged as: %s' => 'Xx: %s',
|
||||||
'Logout successful.' => 'Xx.',
|
'Logout successful.' => 'Xx.',
|
||||||
'Invalid credentials.' => 'Xx.',
|
'Invalid server or credentials.' => 'Xx.',
|
||||||
'There is a space in the input password which might be the cause.' => 'Xx.',
|
'There is a space in the input password which might be the cause.' => 'Xx.',
|
||||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Xx, <a href="https://www.adminer.org/en/password/"%s>xx</a>.',
|
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Xx, <a href="https://www.adminer.org/en/password/"%s>xx</a>.',
|
||||||
'Database does not support password.' => 'Xx.',
|
'Database does not support password.' => 'Xx.',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Copy to clipboard' => null,
|
'Copy to clipboard' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => '登出',
|
'Logout' => '登出',
|
||||||
'Logged as: %s' => '登錄為: %s',
|
'Logged as: %s' => '登錄為: %s',
|
||||||
'Logout successful.' => '成功登出。',
|
'Logout successful.' => '成功登出。',
|
||||||
'Invalid credentials.' => '無效的憑證。',
|
'Invalid server or credentials.' => null,
|
||||||
'There is a space in the input password which might be the cause.' => '您輸入的密碼中有一個空格,這可能是導致問題的原因。',
|
'There is a space in the input password which might be the cause.' => '您輸入的密碼中有一個空格,這可能是導致問題的原因。',
|
||||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer預設不支援訪問沒有密碼的資料庫,<a href="https://www.adminer.org/en/password/"%s>詳情見這裡</a>.',
|
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer預設不支援訪問沒有密碼的資料庫,<a href="https://www.adminer.org/en/password/"%s>詳情見這裡</a>.',
|
||||||
'Database does not support password.' => '資料庫不支援密碼。',
|
'Database does not support password.' => '資料庫不支援密碼。',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Copy to clipboard' => null,
|
'Copy to clipboard' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ $translations = array(
|
||||||
'Logout' => '登出',
|
'Logout' => '登出',
|
||||||
'Logged as: %s' => '登录用户:%s',
|
'Logged as: %s' => '登录用户:%s',
|
||||||
'Logout successful.' => '成功登出。',
|
'Logout successful.' => '成功登出。',
|
||||||
'Invalid credentials.' => '无效凭据。',
|
'Invalid server or credentials.' => null,
|
||||||
'There is a space in the input password which might be the cause.' => '您输入的密码中有一个空格,这可能是导致问题的原因。',
|
'There is a space in the input password which might be the cause.' => '您输入的密码中有一个空格,这可能是导致问题的原因。',
|
||||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer默认不支持访问没有密码的数据库,<a href="https://www.adminer.org/en/password/"%s>详情见这里</a>.',
|
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer默认不支持访问没有密码的数据库,<a href="https://www.adminer.org/en/password/"%s>详情见这里</a>.',
|
||||||
'Database does not support password.' => '数据库不支持密码。',
|
'Database does not support password.' => '数据库不支持密码。',
|
||||||
|
@ -350,4 +350,6 @@ $translations = array(
|
||||||
'Copy to clipboard' => null,
|
'Copy to clipboard' => null,
|
||||||
|
|
||||||
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
// 'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||||
|
|
||||||
|
'A newer version of AdminerEvo is available, download it now!' => null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,12 +4,8 @@ $table_status = table_status1($TABLE);
|
||||||
$indexes = indexes($TABLE);
|
$indexes = indexes($TABLE);
|
||||||
$fields = fields($TABLE);
|
$fields = fields($TABLE);
|
||||||
$foreign_keys = column_foreign_keys($TABLE);
|
$foreign_keys = column_foreign_keys($TABLE);
|
||||||
$oid = (isset($table_status["Oid"]) ? $table_status["Oid"] : null);
|
$oid = $table_status["Oid"];
|
||||||
if (isset($_COOKIE["adminer_import"])) {
|
|
||||||
parse_str($_COOKIE["adminer_import"], $adminer_import);
|
parse_str($_COOKIE["adminer_import"], $adminer_import);
|
||||||
} else {
|
|
||||||
$adminer_import = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
$rights = array(); // privilege => 0
|
$rights = array(); // privilege => 0
|
||||||
$columns = array(); // selectable columns
|
$columns = array(); // selectable columns
|
||||||
|
@ -26,12 +22,12 @@ foreach ($fields as $key => $field) {
|
||||||
}
|
}
|
||||||
|
|
||||||
list($select, $group) = $adminer->selectColumnsProcess($columns, $indexes);
|
list($select, $group) = $adminer->selectColumnsProcess($columns, $indexes);
|
||||||
$is_group = count($group) < count($select) || (isset($select[0]) && strstr($select[0], "DISTINCT"));
|
$is_group = count($group) < count($select) || strstr($select[0], "DISTINCT");
|
||||||
$where = $adminer->selectSearchProcess($fields, $indexes);
|
$where = $adminer->selectSearchProcess($fields, $indexes);
|
||||||
$order = $adminer->selectOrderProcess($fields, $indexes);
|
$order = $adminer->selectOrderProcess($fields, $indexes);
|
||||||
$limit = $adminer->selectLimitProcess();
|
$limit = $adminer->selectLimitProcess();
|
||||||
|
|
||||||
if (isset($_GET["val"]) && $_GET["val"] && is_ajax()) {
|
if ($_GET["val"] && is_ajax()) {
|
||||||
header("Content-Type: text/plain; charset=utf-8");
|
header("Content-Type: text/plain; charset=utf-8");
|
||||||
foreach ($_GET["val"] as $unique_idf => $row) {
|
foreach ($_GET["val"] as $unique_idf => $row) {
|
||||||
$as = convert_field($fields[key($row)]);
|
$as = convert_field($fields[key($row)]);
|
||||||
|
@ -65,7 +61,7 @@ if ($oid && !$primary) {
|
||||||
|
|
||||||
if ($_POST && !$error) {
|
if ($_POST && !$error) {
|
||||||
$where_check = $where;
|
$where_check = $where;
|
||||||
if ((isset($_POST["all"]) === false || !$_POST["all"]) && (isset($_POST["check"]) && is_array($_POST["check"]))) {
|
if (!$_POST["all"] && is_array($_POST["check"])) {
|
||||||
$checks = array();
|
$checks = array();
|
||||||
foreach ($_POST["check"] as $check) {
|
foreach ($_POST["check"] as $check) {
|
||||||
$checks[] = where_check($check, $fields);
|
$checks[] = where_check($check, $fields);
|
||||||
|
@ -73,7 +69,7 @@ if ($_POST && !$error) {
|
||||||
$where_check[] = "((" . implode(") OR (", $checks) . "))";
|
$where_check[] = "((" . implode(") OR (", $checks) . "))";
|
||||||
}
|
}
|
||||||
$where_check = ($where_check ? "\nWHERE " . implode(" AND ", $where_check) : "");
|
$where_check = ($where_check ? "\nWHERE " . implode(" AND ", $where_check) : "");
|
||||||
if (isset($_POST["export"]) && $_POST["export"]) {
|
if ($_POST["export"]) {
|
||||||
cookie("adminer_import", "output=" . urlencode($_POST["output"]) . "&format=" . urlencode($_POST["format"]));
|
cookie("adminer_import", "output=" . urlencode($_POST["output"]) . "&format=" . urlencode($_POST["format"]));
|
||||||
dump_headers($TABLE);
|
dump_headers($TABLE);
|
||||||
$adminer->dumpTable($TABLE, "");
|
$adminer->dumpTable($TABLE, "");
|
||||||
|
@ -96,11 +92,11 @@ if ($_POST && !$error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$adminer->selectEmailProcess($where, $foreign_keys)) {
|
if (!$adminer->selectEmailProcess($where, $foreign_keys)) {
|
||||||
if ((isset($_POST["save"]) && $_POST["save"]) || (isset($_POST["delete"]) && $_POST["delete"])) { // edit
|
if ($_POST["save"] || $_POST["delete"]) { // edit
|
||||||
$result = true;
|
$result = true;
|
||||||
$affected = 0;
|
$affected = 0;
|
||||||
$set = array();
|
$set = array();
|
||||||
if (isset($_POST["delete"]) === false || !$_POST["delete"]) {
|
if (!$_POST["delete"]) {
|
||||||
foreach ($columns as $name => $val) { //! should check also for edit or insert privileges
|
foreach ($columns as $name => $val) { //! should check also for edit or insert privileges
|
||||||
$val = process_input($fields[$name]);
|
$val = process_input($fields[$name]);
|
||||||
if ($val !== null && ($_POST["clone"] || $val !== false)) {
|
if ($val !== null && ($_POST["clone"] || $val !== false)) {
|
||||||
|
@ -108,11 +104,11 @@ if ($_POST && !$error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((isset($_POST["delete"]) && $_POST["delete"]) || $set) {
|
if ($_POST["delete"] || $set) {
|
||||||
if (isset($_POST["clone"]) && $_POST["clone"]) {
|
if ($_POST["clone"]) {
|
||||||
$query = "INTO " . table($TABLE) . " (" . implode(", ", array_keys($set)) . ")\nSELECT " . implode(", ", $set) . "\nFROM " . table($TABLE);
|
$query = "INTO " . table($TABLE) . " (" . implode(", ", array_keys($set)) . ")\nSELECT " . implode(", ", $set) . "\nFROM " . table($TABLE);
|
||||||
}
|
}
|
||||||
if ((isset($_POST["all"]) && $_POST["all"]) || ($primary && isset($_POST["check"]) && is_array($_POST["check"])) || $is_group) {
|
if ($_POST["all"] || ($primary && is_array($_POST["check"])) || $is_group) {
|
||||||
$result = ($_POST["delete"]
|
$result = ($_POST["delete"]
|
||||||
? $driver->delete($TABLE, $where_check)
|
? $driver->delete($TABLE, $where_check)
|
||||||
: ($_POST["clone"]
|
: ($_POST["clone"]
|
||||||
|
@ -125,7 +121,7 @@ if ($_POST && !$error) {
|
||||||
foreach ((array) $_POST["check"] as $val) {
|
foreach ((array) $_POST["check"] as $val) {
|
||||||
// where is not unique so OR can't be used
|
// where is not unique so OR can't be used
|
||||||
$where2 = "\nWHERE " . ($where ? implode(" AND ", $where) . " AND " : "") . where_check($val, $fields);
|
$where2 = "\nWHERE " . ($where ? implode(" AND ", $where) . " AND " : "") . where_check($val, $fields);
|
||||||
$result = (isset($_POST["delete"]) && $_POST["delete"]
|
$result = ($_POST["delete"]
|
||||||
? $driver->delete($TABLE, $where2, 1)
|
? $driver->delete($TABLE, $where2, 1)
|
||||||
: ($_POST["clone"]
|
: ($_POST["clone"]
|
||||||
? queries("INSERT" . limit1($TABLE, $query, $where2))
|
? queries("INSERT" . limit1($TABLE, $query, $where2))
|
||||||
|
@ -140,13 +136,13 @@ if ($_POST && !$error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$message = lang('%d item(s) have been affected.', $affected);
|
$message = lang('%d item(s) have been affected.', $affected);
|
||||||
if (isset($_POST["clone"]) && $_POST["clone"] && $result && $affected == 1) {
|
if ($_POST["clone"] && $result && $affected == 1) {
|
||||||
$last_id = last_id();
|
$last_id = last_id();
|
||||||
if ($last_id) {
|
if ($last_id) {
|
||||||
$message = lang('Item%s has been inserted.', " $last_id");
|
$message = lang('Item%s has been inserted.', " $last_id");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
queries_redirect(remove_from_uri(isset($_POST["all"]) && $_POST["all"] && isset($_POST["delete"]) && $_POST["delete"] ? "page" : ""), $message, $result);
|
queries_redirect(remove_from_uri($_POST["all"] && $_POST["delete"] ? "page" : ""), $message, $result);
|
||||||
if (!$_POST["delete"]) {
|
if (!$_POST["delete"]) {
|
||||||
edit_form($TABLE, $fields, (array) $_POST["fields"], !$_POST["clone"]);
|
edit_form($TABLE, $fields, (array) $_POST["fields"], !$_POST["clone"]);
|
||||||
page_footer();
|
page_footer();
|
||||||
|
@ -229,7 +225,6 @@ if (is_ajax()) {
|
||||||
$set = null;
|
$set = null;
|
||||||
if (isset($rights["insert"]) || !support("table")) {
|
if (isset($rights["insert"]) || !support("table")) {
|
||||||
$set = "";
|
$set = "";
|
||||||
if (isset($_GET["where"])) {
|
|
||||||
foreach ((array) $_GET["where"] as $val) {
|
foreach ((array) $_GET["where"] as $val) {
|
||||||
if ($foreign_keys[$val["col"]] && count($foreign_keys[$val["col"]]) == 1 && ($val["op"] == "="
|
if ($foreign_keys[$val["col"]] && count($foreign_keys[$val["col"]]) == 1 && ($val["op"] == "="
|
||||||
|| (!$val["op"] && !preg_match('~[_%]~', $val["val"])) // LIKE in Editor
|
|| (!$val["op"] && !preg_match('~[_%]~', $val["val"])) // LIKE in Editor
|
||||||
|
@ -238,7 +233,6 @@ if (isset($rights["insert"]) || !support("table")) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$adminer->selectLinks($table_status, $set);
|
$adminer->selectLinks($table_status, $set);
|
||||||
|
|
||||||
if (!$columns && support("table")) {
|
if (!$columns && support("table")) {
|
||||||
|
@ -259,7 +253,7 @@ if (!$columns && support("table")) {
|
||||||
$adminer->selectActionPrint($indexes);
|
$adminer->selectActionPrint($indexes);
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
|
|
||||||
$page = (isset($_GET["page"]) ? $_GET["page"] : null);
|
$page = $_GET["page"];
|
||||||
if ($page == "last") {
|
if ($page == "last") {
|
||||||
$found_rows = $connection->result(count_rows($TABLE, $where, $is_group, $group));
|
$found_rows = $connection->result(count_rows($TABLE, $where, $is_group, $group));
|
||||||
$page = floor(max(0, $found_rows - 1) / $limit);
|
$page = floor(max(0, $found_rows - 1) / $limit);
|
||||||
|
@ -307,7 +301,7 @@ if (!$columns && support("table")) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// use count($rows) without LIMIT, COUNT(*) without grouping, FOUND_ROWS otherwise (slowest)
|
// use count($rows) without LIMIT, COUNT(*) without grouping, FOUND_ROWS otherwise (slowest)
|
||||||
if (isset($_GET["page"]) && $_GET["page"] != "last" && $limit != "" && $group && $is_group && $jush == "sql") {
|
if ($_GET["page"] != "last" && $limit != "" && $group && $is_group && $jush == "sql") {
|
||||||
$found_rows = $connection->result(" SELECT FOUND_ROWS()"); // space to allow mysql.trace_mode
|
$found_rows = $connection->result(" SELECT FOUND_ROWS()"); // space to allow mysql.trace_mode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,7 +316,7 @@ if (!$columns && support("table")) {
|
||||||
echo "<thead><tr>" . (!$group && $select
|
echo "<thead><tr>" . (!$group && $select
|
||||||
? ""
|
? ""
|
||||||
: "<td><input type='checkbox' id='all-page' class='jsonly'>" . script("qs('#all-page').onclick = partial(formCheck, /check/);", "")
|
: "<td><input type='checkbox' id='all-page' class='jsonly'>" . script("qs('#all-page').onclick = partial(formCheck, /check/);", "")
|
||||||
. " <a href='" . h(isset($_GET["modify"]) && $_GET["modify"] ? remove_from_uri("modify") : $_SERVER["REQUEST_URI"] . "&modify=1") . "' title='" . lang('Modify') . "' class='edit-all'>" . lang('Modify') . "</a>");
|
. " <a href='" . h($_GET["modify"] ? remove_from_uri("modify") : $_SERVER["REQUEST_URI"] . "&modify=1") . "' title='" . lang('Modify') . "' class='edit-all'>" . lang('Modify') . "</a>");
|
||||||
$names = array();
|
$names = array();
|
||||||
$functions = array();
|
$functions = array();
|
||||||
reset($select);
|
reset($select);
|
||||||
|
@ -339,7 +333,7 @@ if (!$columns && support("table")) {
|
||||||
$href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
|
$href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
|
||||||
$desc = "&desc%5B0%5D=1";
|
$desc = "&desc%5B0%5D=1";
|
||||||
echo "<th id='th[" . h(bracket_escape($key)) . "]'>" . script("mixin(qsl('th'), {onmouseover: partial(columnMouse), onmouseout: partial(columnMouse, ' hidden')});", "");
|
echo "<th id='th[" . h(bracket_escape($key)) . "]'>" . script("mixin(qsl('th'), {onmouseover: partial(columnMouse), onmouseout: partial(columnMouse, ' hidden')});", "");
|
||||||
echo '<a href="' . h($href . ((isset($order[0]) && $order[0] == $column) || (isset($order[0]) && $order[0] == $key) || (!$order && $is_group && $group[0] == $column) ? $desc : '')) . '">'; // $order[0] == $key - COUNT(*)
|
echo '<a href="' . h($href . ($order[0] == $column || $order[0] == $key || (!$order && $is_group && $group[0] == $column) ? $desc : '')) . '">'; // $order[0] == $key - COUNT(*)
|
||||||
echo apply_sql_function($val["fun"] ?? null, $name) . "</a>"; //! columns looking like functions
|
echo apply_sql_function($val["fun"] ?? null, $name) . "</a>"; //! columns looking like functions
|
||||||
echo "<span class='column hidden'>";
|
echo "<span class='column hidden'>";
|
||||||
echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";
|
echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";
|
||||||
|
@ -355,7 +349,7 @@ if (!$columns && support("table")) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$lengths = array();
|
$lengths = array();
|
||||||
if (isset($_GET["modify"]) && $_GET["modify"]) {
|
if ($_GET["modify"]) {
|
||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
foreach ($row as $key => $val) {
|
foreach ($row as $key => $val) {
|
||||||
$lengths[$key] = max($lengths[$key], min(40, strlen(utf8_decode($val))));
|
$lengths[$key] = max($lengths[$key], min(40, strlen(utf8_decode($val))));
|
||||||
|
@ -392,7 +386,7 @@ if (!$columns && support("table")) {
|
||||||
$unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val === false ? "f" : $val) : "null%5B%5D=" . urlencode($key));
|
$unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val === false ? "f" : $val) : "null%5B%5D=" . urlencode($key));
|
||||||
}
|
}
|
||||||
echo "<tr" . odd() . ">" . (!$group && $select ? "" : "<td>"
|
echo "<tr" . odd() . ">" . (!$group && $select ? "" : "<td>"
|
||||||
. checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) (isset($_POST["check"]) ? $_POST["check"] : null)))
|
. checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]))
|
||||||
. ($is_group || information_schema(DB) ? "" : " <a href='" . h(ME . "edit=" . urlencode($TABLE) . $unique_idf) . "' class='edit' title='" . lang('edit') . "'>" . lang('edit') . "</a>")
|
. ($is_group || information_schema(DB) ? "" : " <a href='" . h(ME . "edit=" . urlencode($TABLE) . $unique_idf) . "' class='edit' title='" . lang('edit') . "'>" . lang('edit') . "</a>")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -409,7 +403,6 @@ if (!$columns && support("table")) {
|
||||||
$link = ME . 'download=' . urlencode($TABLE) . '&field=' . urlencode($key) . $unique_idf;
|
$link = ME . 'download=' . urlencode($TABLE) . '&field=' . urlencode($key) . $unique_idf;
|
||||||
}
|
}
|
||||||
if (!$link && $val !== null) { // link related items
|
if (!$link && $val !== null) { // link related items
|
||||||
if (isset($foreign_keys[$key])) {
|
|
||||||
foreach ((array) $foreign_keys[$key] as $foreign_key) {
|
foreach ((array) $foreign_keys[$key] as $foreign_key) {
|
||||||
if (count($foreign_keys[$key]) == 1 || end($foreign_key["source"]) == $key) {
|
if (count($foreign_keys[$key]) == 1 || end($foreign_key["source"]) == $key) {
|
||||||
$link = "";
|
$link = "";
|
||||||
|
@ -426,7 +419,6 @@ if (!$columns && support("table")) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if ($key == "COUNT(*)") { //! columns looking like functions
|
if ($key == "COUNT(*)") { //! columns looking like functions
|
||||||
$link = ME . "select=" . urlencode($TABLE);
|
$link = ME . "select=" . urlencode($TABLE);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
@ -449,7 +441,7 @@ if (!$columns && support("table")) {
|
||||||
$editable = !is_array($row[$key]) && is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key];
|
$editable = !is_array($row[$key]) && is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key];
|
||||||
$text = preg_match('~text|lob~', $field["type"] ?? null);
|
$text = preg_match('~text|lob~', $field["type"] ?? null);
|
||||||
echo "<td id='$id'";
|
echo "<td id='$id'";
|
||||||
if ((isset($_GET["modify"]) && $_GET["modify"] && $editable) || $value !== null) {
|
if (($_GET["modify"] && $editable) || $value !== null) {
|
||||||
$h_value = h($value !== null ? $value : $row[$key]);
|
$h_value = h($value !== null ? $value : $row[$key]);
|
||||||
echo ">" . ($text ? "<textarea name='$id' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>$h_value</textarea>" : "<input name='$id' value='$h_value' size='$lengths[$key]'>");
|
echo ">" . ($text ? "<textarea name='$id' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>$h_value</textarea>" : "<input name='$id' value='$h_value' size='$lengths[$key]'>");
|
||||||
} else {
|
} else {
|
||||||
|
@ -479,8 +471,7 @@ if (!$columns && support("table")) {
|
||||||
if (!is_ajax()) {
|
if (!is_ajax()) {
|
||||||
if ($rows || $page) {
|
if ($rows || $page) {
|
||||||
$exact_count = true;
|
$exact_count = true;
|
||||||
$found_rows = null;
|
if ($_GET["page"] != "last") {
|
||||||
if (isset($_GET["page"]) && $_GET["page"] != "last") {
|
|
||||||
if ($limit == "" || (count($rows) < $limit && ($rows || !$page))) {
|
if ($limit == "" || (count($rows) < $limit && ($rows || !$page))) {
|
||||||
$found_rows = ($page ? $page * $limit : 0) + count($rows);
|
$found_rows = ($page ? $page * $limit : 0) + count($rows);
|
||||||
} elseif ($jush != "sql" || !$is_group) {
|
} elseif ($jush != "sql" || !$is_group) {
|
||||||
|
@ -545,8 +536,8 @@ if (!$columns && support("table")) {
|
||||||
|
|
||||||
if ($adminer->selectCommandPrint()) {
|
if ($adminer->selectCommandPrint()) {
|
||||||
?>
|
?>
|
||||||
<fieldset<?php echo (isset($_GET["modify"]) && $_GET["modify"] ? '' : ' class="jsonly"'); ?>><legend><?php echo lang('Modify'); ?></legend><div>
|
<fieldset<?php echo ($_GET["modify"] ? '' : ' class="jsonly"'); ?>><legend><?php echo lang('Modify'); ?></legend><div>
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>"<?php echo (isset($_GET["modify"]) && $_GET["modify"] ? '' : ' title="' . lang('Ctrl+click on a value to modify it.') . '"'); ?>>
|
<input type="submit" value="<?php echo lang('Save'); ?>"<?php echo ($_GET["modify"] ? '' : ' title="' . lang('Ctrl+click on a value to modify it.') . '"'); ?>>
|
||||||
</div></fieldset>
|
</div></fieldset>
|
||||||
<fieldset><legend><?php echo lang('Selected'); ?> <span id="selected"></span></legend><div>
|
<fieldset><legend><?php echo lang('Selected'); ?> <span id="selected"></span></legend><div>
|
||||||
<input type="submit" name="edit" value="<?php echo lang('Edit'); ?>">
|
<input type="submit" name="edit" value="<?php echo lang('Edit'); ?>">
|
||||||
|
@ -557,19 +548,17 @@ if (!$columns && support("table")) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$format = $adminer->dumpFormat();
|
$format = $adminer->dumpFormat();
|
||||||
if (isset($_GET["columns"])) {
|
|
||||||
foreach ((array) $_GET["columns"] as $column) {
|
foreach ((array) $_GET["columns"] as $column) {
|
||||||
if ($column["fun"]) {
|
if ($column["fun"]) {
|
||||||
unset($format['sql']);
|
unset($format['sql']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if ($format) {
|
if ($format) {
|
||||||
print_fieldset("export", lang('Export') . " <span id='selected2'></span>");
|
print_fieldset("export", lang('Export') . " <span id='selected2'></span>");
|
||||||
$output = $adminer->dumpOutput();
|
$output = $adminer->dumpOutput();
|
||||||
echo ($output ? html_select("output", $output, (isset($adminer_import["output"]) ? $adminer_import["output"] : null)) . " " : "");
|
echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : "");
|
||||||
echo html_select("format", $format, (isset($adminer_import["format"]) ? $adminer_import["format"] : null));
|
echo html_select("format", $format, $adminer_import["format"]);
|
||||||
echo " <input type='submit' name='export' value='" . lang('Export') . "'>\n";
|
echo " <input type='submit' name='export' value='" . lang('Export') . "'>\n";
|
||||||
echo "</div></fieldset>\n";
|
echo "</div></fieldset>\n";
|
||||||
}
|
}
|
||||||
|
@ -585,7 +574,7 @@ if (!$columns && support("table")) {
|
||||||
echo script("qsl('a').onclick = partial(toggle, 'import');", "");
|
echo script("qsl('a').onclick = partial(toggle, 'import');", "");
|
||||||
echo "<span id='import' class='hidden'>: ";
|
echo "<span id='import' class='hidden'>: ";
|
||||||
echo "<input type='file' name='csv_file'> ";
|
echo "<input type='file' name='csv_file'> ";
|
||||||
echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), (isset($adminer_import["format"]) ? $adminer_import["format"] : null), 1); // 1 - select
|
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='submit' name='import' value='" . lang('Import') . "'>";
|
||||||
echo "</span>";
|
echo "</span>";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
if (!$error && isset($_POST["export"]) && $_POST["export"]) {
|
if (!$error && $_POST["export"]) {
|
||||||
dump_headers("sql");
|
dump_headers("sql");
|
||||||
$adminer->dumpTable("", "");
|
$adminer->dumpTable("", "");
|
||||||
$adminer->dumpData("", "table", $_POST["query"]);
|
$adminer->dumpData("", "table", $_POST["query"]);
|
||||||
|
@ -9,7 +9,7 @@ if (!$error && isset($_POST["export"]) && $_POST["export"]) {
|
||||||
restart_session();
|
restart_session();
|
||||||
$history_all = &get_session("queries");
|
$history_all = &get_session("queries");
|
||||||
$history = &$history_all[DB];
|
$history = &$history_all[DB];
|
||||||
if (!$error && isset($_POST["clear"]) && $_POST["clear"]) {
|
if (!$error && $_POST["clear"]) {
|
||||||
$history = array();
|
$history = array();
|
||||||
redirect(remove_from_uri("history"));
|
redirect(remove_from_uri("history"));
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ if (!$error && $_POST) {
|
||||||
$query .= fread($fp, 1e5);
|
$query .= fread($fp, 1e5);
|
||||||
} else {
|
} else {
|
||||||
$offset = $match[0][1] + strlen($s);
|
$offset = $match[0][1] + strlen($s);
|
||||||
if ($s[0] != "\\") {
|
if (!isset($s[0]) || $s[0] != "\\") {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ if (!$error && $_POST) {
|
||||||
$empty = false;
|
$empty = false;
|
||||||
$q = substr($query, 0, $pos);
|
$q = substr($query, 0, $pos);
|
||||||
$commands++;
|
$commands++;
|
||||||
$print = "<pre id='sql-$commands'><code class='jush-$jush'>" . $adminer->sqlCommandQuery($q) . "</code></pre>\n";
|
$print = "<pre id='sql-$commands'><code class='jush-$jush copy-to-clipboard'>" . $adminer->sqlCommandQuery($q) . "</code></pre>\n";
|
||||||
$print .= generate_linksbar(["<a href='#' class='copy-to-clipboard'>" . lang('Copy to clipboard') . "</a>"]);
|
$print .= generate_linksbar(["<a href='#' class='copy-to-clipboard'>" . lang('Copy to clipboard') . "</a>"]);
|
||||||
if ($jush == "sqlite" && preg_match("~^$space*+ATTACH\\b~i", $q, $match)) {
|
if ($jush == "sqlite" && preg_match("~^$space*+ATTACH\\b~i", $q, $match)) {
|
||||||
// PHP doesn't support setting SQLITE_LIMIT_ATTACHED
|
// PHP doesn't support setting SQLITE_LIMIT_ATTACHED
|
||||||
|
@ -216,16 +216,16 @@ if (!isset($_GET["import"])) {
|
||||||
$q = $_GET["sql"]; // overwrite $q from if ($_POST) to save memory
|
$q = $_GET["sql"]; // overwrite $q from if ($_POST) to save memory
|
||||||
if ($_POST) {
|
if ($_POST) {
|
||||||
$q = $_POST["query"];
|
$q = $_POST["query"];
|
||||||
} elseif (isset($_GET["history"]) && $_GET["history"] == "all") {
|
} elseif ($_GET["history"] == "all") {
|
||||||
$q = $history;
|
$q = $history;
|
||||||
} elseif (isset($_GET["history"]) && $_GET["history"] != "") {
|
} elseif ($_GET["history"] != "") {
|
||||||
$q = $history[$_GET["history"]][0];
|
$q = $history[$_GET["history"]][0];
|
||||||
}
|
}
|
||||||
echo "<p>";
|
echo "<p>";
|
||||||
textarea("query", $q, 20);
|
textarea("query", $q, 20);
|
||||||
echo script(($_POST ? "" : "qs('textarea').focus();\n") . "qs('#form').onsubmit = partial(sqlSubmit, qs('#form'), '" . js_escape(remove_from_uri("sql|limit|error_stops|only_errors|history")) . "');");
|
echo script(($_POST ? "" : "qs('textarea').focus();\n") . "qs('#form').onsubmit = partial(sqlSubmit, qs('#form'), '" . js_escape(remove_from_uri("sql|limit|error_stops|only_errors|history")) . "');");
|
||||||
echo "<p>$execute\n";
|
echo "<p>$execute\n";
|
||||||
echo lang('Limit rows') . ": <input type='number' name='limit' class='size' value='" . h(isset($_POST["limit"]) ? $_POST["limit"] : (isset($_GET["limit"]) ? $_GET["limit"] : null)) . "'>\n";
|
echo lang('Limit rows') . ": <input type='number' name='limit' class='size' value='" . h($_POST ? $_POST["limit"] : $_GET["limit"]) . "'>\n";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
echo "<fieldset><legend>" . lang('File upload') . "</legend><div>";
|
echo "<fieldset><legend>" . lang('File upload') . "</legend><div>";
|
||||||
|
@ -245,8 +245,8 @@ if (!isset($_GET["import"])) {
|
||||||
echo "<p>";
|
echo "<p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo checkbox("error_stops", 1, (isset($_POST["error_stops"]) ? $_POST["error_stops"] : isset($_GET["import"]) || (isset($_GET["error_stops"]) && $_GET["error_stops"])), lang('Stop on error')) . "\n";
|
echo checkbox("error_stops", 1, ($_POST ? $_POST["error_stops"] : isset($_GET["import"]) || $_GET["error_stops"]), lang('Stop on error')) . "\n";
|
||||||
echo checkbox("only_errors", 1, (isset($_POST["only_errors"]) ? $_POST["only_errors"] : isset($_GET["import"]) || (isset($_GET["only_errors"]) && $_GET["only_errors"])), lang('Show only errors')) . "\n";
|
echo checkbox("only_errors", 1, ($_POST ? $_POST["only_errors"] : isset($_GET["import"]) || $_GET["only_errors"]), lang('Show only errors')) . "\n";
|
||||||
echo "<input type='hidden' name='token' value='$token'>\n";
|
echo "<input type='hidden' name='token' value='$token'>\n";
|
||||||
|
|
||||||
if (!isset($_GET["import"]) && $history) {
|
if (!isset($_GET["import"]) && $history) {
|
||||||
|
|
|
@ -24,13 +24,13 @@ code { background: #eee; }
|
||||||
tbody tr:hover td, tbody tr:hover th { background: #eee; }
|
tbody tr:hover td, tbody tr:hover th { background: #eee; }
|
||||||
pre { margin: 1em 0 0; }
|
pre { margin: 1em 0 0; }
|
||||||
pre, textarea { font: 100%/1.25 monospace; }
|
pre, textarea { font: 100%/1.25 monospace; }
|
||||||
input, button { vertical-align: middle; border-radius: 5px; padding: 2px; }
|
input, button { vertical-align: middle; border-radius: 5px; padding: 2px; border-width: 1px; }
|
||||||
input.default { box-shadow: 1px 1px 1px #777; }
|
input.default { box-shadow: 1px 1px 1px #777; }
|
||||||
input.required { box-shadow: 1px 1px 1px red; }
|
input.required { box-shadow: 1px 1px 1px red; }
|
||||||
input.maxlength { box-shadow: 1px 1px 1px red; }
|
input.maxlength { box-shadow: 1px 1px 1px red; }
|
||||||
input.wayoff { left: -1000px; position: absolute; }
|
input.wayoff { left: -1000px; position: absolute; }
|
||||||
input[type='submit'] { padding-left: 10px; padding-right: 10px; }
|
input[type='submit'] { padding-left: 10px; padding-right: 10px; }
|
||||||
select { border-radius: 5px; padding: 2px; vertical-align: middle;; }
|
select { border-radius: 5px; padding: 2px; vertical-align: middle; }
|
||||||
fieldset label input[type='checkbox'] { margin-bottom: 6px; }
|
fieldset label input[type='checkbox'] { margin-bottom: 6px; }
|
||||||
fieldset a { line-height: 20px; }
|
fieldset a { line-height: 20px; }
|
||||||
#fieldset-select .icon, #fieldset-search .icon, #fieldset-sort .icon { cursor: pointer; }
|
#fieldset-select .icon, #fieldset-search .icon, #fieldset-sort .icon { cursor: pointer; }
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 9.4 KiB |
|
@ -101,27 +101,22 @@ function cookie(assign, days) {
|
||||||
*/
|
*/
|
||||||
function verifyVersion(current, url, token) {
|
function verifyVersion(current, url, token) {
|
||||||
cookie('adminer_version=0', 1);
|
cookie('adminer_version=0', 1);
|
||||||
var iframe = document.createElement('iframe');
|
ajax('https://api.github.com/repos/adminerevo/adminerevo/releases/latest', function (request) {
|
||||||
iframe.src = 'https://www.adminer.org/version/?current=' + current;
|
var data = window.JSON ? JSON.parse(request.responseText) : eval('(' + request.responseText + ')');
|
||||||
iframe.frameBorder = 0;
|
version = data.tag_name.replace(/[^\d.]/g, '');
|
||||||
iframe.marginHeight = 0;
|
|
||||||
iframe.scrolling = 'no';
|
if (version) {
|
||||||
iframe.style.width = '7ex';
|
cookie('adminer_version=' + version, 1);
|
||||||
iframe.style.height = '1.25em';
|
var data = 'version=' + version;
|
||||||
if (window.postMessage && window.addEventListener) {
|
|
||||||
iframe.style.display = 'none';
|
|
||||||
addEventListener('message', function (event) {
|
|
||||||
if (event.origin == 'https://www.adminer.org') {
|
|
||||||
var match = /version=(.+)/.exec(event.data);
|
|
||||||
if (match) {
|
|
||||||
cookie('adminer_version=' + match[1], 1);
|
|
||||||
ajax(url + 'script=version', function () {
|
ajax(url + 'script=version', function () {
|
||||||
}, event.data + '&token=' + token);
|
}, data + '&token=' + token);
|
||||||
|
|
||||||
|
if (version != current) {
|
||||||
|
qs('#version').innerText = version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, false);
|
|
||||||
}
|
});
|
||||||
qs('#version').appendChild(iframe);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get value of select
|
/** Get value of select
|
||||||
|
@ -889,21 +884,21 @@ function findDefaultSubmit(el) {
|
||||||
* @param HTMLElement
|
* @param HTMLElement
|
||||||
*/
|
*/
|
||||||
function setupCopyToClipboard(document) {
|
function setupCopyToClipboard(document) {
|
||||||
var node = document.querySelector("a.copy-to-clipboard");
|
var node = document.querySelectorAll("a.copy-to-clipboard");
|
||||||
if (node) {
|
node.forEach(function(element) {
|
||||||
node.addEventListener("click", function() {
|
element.addEventListener("click", function() {
|
||||||
var nodeSql = document.querySelector("code.copy-to-clipboard");
|
var nodeSql = document.querySelector("code.copy-to-clipboard");
|
||||||
if (nodeSql == null || nodeSql == undefined) {
|
if (nodeSql == null || nodeSql == undefined) {
|
||||||
nodeSql = document.querySelector("textarea.sqlarea");
|
nodeSql = document.querySelector("textarea.sqlarea");
|
||||||
}
|
}
|
||||||
if (nodeSql != null && nodeSql != undefined) {
|
if (nodeSql != null && nodeSql != undefined) {
|
||||||
if (node.classList.contains('expand')) {
|
if (element.classList.contains('expand')) {
|
||||||
document.getElementById(node.getAttribute('data-expand-id')).classList.remove("hidden");
|
document.getElementById(element.getAttribute('data-expand-id')).classList.remove("hidden");
|
||||||
}
|
}
|
||||||
copyToClipboard(nodeSql);
|
copyToClipboard(nodeSql);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Copy element's content in clipboard
|
/** Copy element's content in clipboard
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
$TABLE = isset($_GET["trigger"]) ? $_GET["trigger"] : null;
|
$TABLE = $_GET["trigger"];
|
||||||
$name = isset($_GET["name"]) ? $_GET["name"] : null;
|
$name = $_GET["name"];
|
||||||
$trigger_options = trigger_options();
|
$trigger_options = trigger_options();
|
||||||
$row = (array) trigger($name, $TABLE) + array("Trigger" => $TABLE . "_bi");
|
$row = (array) trigger($name, $TABLE) + array("Trigger" => $TABLE . "_bi");
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ if ($_POST) {
|
||||||
$on = " ON " . table($TABLE);
|
$on = " ON " . table($TABLE);
|
||||||
$drop = "DROP TRIGGER " . idf_escape($name) . ($jush == "pgsql" ? $on : "");
|
$drop = "DROP TRIGGER " . idf_escape($name) . ($jush == "pgsql" ? $on : "");
|
||||||
$location = ME . "table=" . urlencode($TABLE);
|
$location = ME . "table=" . urlencode($TABLE);
|
||||||
if (isset($_POST["drop"]) && $_POST["drop"]) {
|
if ($_POST["drop"]) {
|
||||||
query_redirect($drop, $location, lang('Trigger has been dropped.'));
|
query_redirect($drop, $location, lang('Trigger has been dropped.'));
|
||||||
} else {
|
} else {
|
||||||
if ($name != "") {
|
if ($name != "") {
|
||||||
|
@ -34,10 +34,10 @@ page_header(($name != "" ? lang('Alter trigger') . ": " . h($name) : lang('Creat
|
||||||
|
|
||||||
<form action="" method="post" id="form">
|
<form action="" method="post" id="form">
|
||||||
<table cellspacing="0" class="layout">
|
<table cellspacing="0" class="layout">
|
||||||
<tr><th><?php echo lang('Time'); ?><td><?php echo html_select("Timing", isset($trigger_options["Timing"]) ? $trigger_options["Timing"] : null, isset($row["Timing"]) ? $row["Timing"] : null, "triggerChange(/^" . preg_quote($TABLE, "/") . "_[ba][iud]$/, '" . js_escape($TABLE) . "', this.form);"); ?>
|
<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", isset($trigger_options["Event"]) ? $trigger_options["Event"] : null, isset($row["Event"]) ? $row["Event"] : null, "this.form['Timing'].onchange();"); ?>
|
<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(isset($row["Of"]) ? $row["Of"] : null) . "' class='hidden'>": ""); ?>
|
<?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", isset($trigger_options["Type"]) ? $trigger_options["Type"] : null, isset($row["Type"]) ? $row["Type"] : null); ?>
|
<tr><th><?php echo lang('Type'); ?><td><?php echo html_select("Type", $trigger_options["Type"], $row["Type"]); ?>
|
||||||
</table>
|
</table>
|
||||||
<p><?php echo lang('Name'); ?>: <input name="Trigger" value="<?php echo h($row["Trigger"]); ?>" data-maxlength="64" autocapitalize="off">
|
<p><?php echo lang('Name'); ?>: <input name="Trigger" value="<?php echo h($row["Trigger"]); ?>" data-maxlength="64" autocapitalize="off">
|
||||||
<?php echo script("qs('#form')['Timing'].onchange();"); ?>
|
<?php echo script("qs('#form')['Timing'].onchange();"); ?>
|
||||||
|
|
14
changes.txt
14
changes.txt
|
@ -1,4 +1,16 @@
|
||||||
Adminer 4.8.3 (released 2023-10-xx):
|
Adminer 4.8.4 (released 2024-04-07):
|
||||||
|
Removed size for integer on MySQL 8+
|
||||||
|
Replaced deprecated by error_get_last()
|
||||||
|
Allow responsive styles on larger devices (PR #75)
|
||||||
|
Fixed issue with editor tables list
|
||||||
|
Adjusted href of editor title
|
||||||
|
Fixes of warnings on PHP8.3
|
||||||
|
Filter removal buttons on table select pages (PR #77)
|
||||||
|
Skip dump of generated columns (PR #95)
|
||||||
|
Add LICENSE file, clarify dual-licensing (PR #122)
|
||||||
|
Restore latest version check (PR #129)
|
||||||
|
|
||||||
|
Adminer 4.8.3 (released 2023-10-05):
|
||||||
Added some translations to russian language (PR #31)
|
Added some translations to russian language (PR #31)
|
||||||
Better URL detection (PR #33)
|
Better URL detection (PR #33)
|
||||||
Main logo SVG, improved theme compatibility, RTL support (PR #34)
|
Main logo SVG, improved theme compatibility, RTL support (PR #34)
|
||||||
|
|
60
compile.php
60
compile.php
|
@ -1,13 +1,13 @@
|
||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
function adminer_errors($errNo, $errStr, $errFile, $errLine) {
|
function adminer_errors($errno, $errstr) {
|
||||||
file_put_contents("php://stderr", sprintf("%d - %s - %s:%d\n", $errNo, $errStr, $errFile, $errLine));
|
return !!preg_match('~^(Trying to access array offset on value of type null|Undefined array key)~', $errstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
error_reporting(6135); // errors and warnings
|
error_reporting(6135); // errors and warnings
|
||||||
set_error_handler('adminer_errors', E_WARNING);
|
set_error_handler('adminer_errors', E_WARNING);
|
||||||
include dirname(__FILE__) . "/adminer/include/version.inc.php";
|
include dirname(__FILE__) . "/adminer/include/version.inc.php";
|
||||||
include dirname(__FILE__) . "/vendor/vrana/jsshrink/jsShrink.php";
|
include dirname(__FILE__) . "/externals/JsShrink/jsShrink.php";
|
||||||
|
|
||||||
function add_apo_slashes($s) {
|
function add_apo_slashes($s) {
|
||||||
return addcslashes($s, "\\'");
|
return addcslashes($s, "\\'");
|
||||||
|
@ -37,7 +37,7 @@ function lang_ids($match) {
|
||||||
if ($lang_id === null) {
|
if ($lang_id === null) {
|
||||||
$lang_id = count($lang_ids) - 1;
|
$lang_id = count($lang_ids) - 1;
|
||||||
}
|
}
|
||||||
return (isset($_SESSION["lang"]) && $_SESSION["lang"] ? $match[0] : "lang($lang_id$match[2]");
|
return ($_SESSION["lang"] ? $match[0] : "lang($lang_id$match[2]");
|
||||||
}
|
}
|
||||||
|
|
||||||
function put_file($match) {
|
function put_file($match) {
|
||||||
|
@ -64,7 +64,7 @@ header("Cache-Control: immutable");
|
||||||
if ($driver && dirname($match[2]) == "../adminer/drivers") {
|
if ($driver && dirname($match[2]) == "../adminer/drivers") {
|
||||||
$return = preg_replace('~^if \(isset\(\$_GET\["' . $driver . '"]\)\) \{(.*)^}~ms', '\1', $return);
|
$return = preg_replace('~^if \(isset\(\$_GET\["' . $driver . '"]\)\) \{(.*)^}~ms', '\1', $return);
|
||||||
}
|
}
|
||||||
if (basename($match[2]) != "lang.inc.php" || isset($_SESSION["lang"]) === false || !$_SESSION["lang"]) {
|
if (basename($match[2]) != "lang.inc.php" || !$_SESSION["lang"]) {
|
||||||
$return = str_replace('<?php echo $GLOBALS[\'project\']; ?>', $project, $return);
|
$return = str_replace('<?php echo $GLOBALS[\'project\']; ?>', $project, $return);
|
||||||
if (basename($match[2]) == "lang.inc.php") {
|
if (basename($match[2]) == "lang.inc.php") {
|
||||||
$return = str_replace('function lang($idf, $number = null) {', 'function lang($idf, $number = null) {
|
$return = str_replace('function lang($idf, $number = null) {', 'function lang($idf, $number = null) {
|
||||||
|
@ -109,8 +109,7 @@ function lzw_compress($string) {
|
||||||
$word = "";
|
$word = "";
|
||||||
$codes = array();
|
$codes = array();
|
||||||
for ($i=0; $i <= strlen($string); $i++) {
|
for ($i=0; $i <= strlen($string); $i++) {
|
||||||
if (isset($string[$i])) {
|
$x = @$string[$i];
|
||||||
$x = $string[$i];
|
|
||||||
if (strlen($x) && isset($dictionary[$word . $x])) {
|
if (strlen($x) && isset($dictionary[$word . $x])) {
|
||||||
$word .= $x;
|
$word .= $x;
|
||||||
} elseif ($i) {
|
} elseif ($i) {
|
||||||
|
@ -119,7 +118,6 @@ function lzw_compress($string) {
|
||||||
$word = $x;
|
$word = $x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// convert codes to binary string
|
// convert codes to binary string
|
||||||
$dictionary_count = 256;
|
$dictionary_count = 256;
|
||||||
$bits = 8; // ceil(log($dictionary_count, 2))
|
$bits = 8; // ceil(log($dictionary_count, 2))
|
||||||
|
@ -144,7 +142,7 @@ function lzw_compress($string) {
|
||||||
|
|
||||||
function put_file_lang($match) {
|
function put_file_lang($match) {
|
||||||
global $lang_ids, $project, $langs;
|
global $lang_ids, $project, $langs;
|
||||||
if (isset($_SESSION["lang"]) && $_SESSION["lang"]) {
|
if ($_SESSION["lang"]) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
$return = "";
|
$return = "";
|
||||||
|
@ -153,11 +151,9 @@ function put_file_lang($match) {
|
||||||
$translation_ids = array_flip($lang_ids); // default translation
|
$translation_ids = array_flip($lang_ids); // default translation
|
||||||
foreach ($translations as $key => $val) {
|
foreach ($translations as $key => $val) {
|
||||||
if ($val !== null) {
|
if ($val !== null) {
|
||||||
if (isset($lang_ids[$key])) {
|
|
||||||
$translation_ids[$lang_ids[$key]] = implode("\t", (array) $val);
|
$translation_ids[$lang_ids[$key]] = implode("\t", (array) $val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$return .= '
|
$return .= '
|
||||||
case "' . $lang . '": $compressed = "' . add_quo_slashes(lzw_compress(implode("\n", $translation_ids))) . '"; break;';
|
case "' . $lang . '": $compressed = "' . add_quo_slashes(lzw_compress(implode("\n", $translation_ids))) . '"; break;';
|
||||||
}
|
}
|
||||||
|
@ -231,13 +227,9 @@ function php_shrink($input) {
|
||||||
|
|
||||||
foreach ($tokens as $i => $token) {
|
foreach ($tokens as $i => $token) {
|
||||||
if ($token[0] === T_VARIABLE && !isset($special_variables[$token[1]])) {
|
if ($token[0] === T_VARIABLE && !isset($special_variables[$token[1]])) {
|
||||||
if (isset($short_variables[$token[1]]) === false) {
|
|
||||||
$short_variables[$token[1]] = 1;
|
|
||||||
} else {
|
|
||||||
$short_variables[$token[1]]++;
|
$short_variables[$token[1]]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
arsort($short_variables);
|
arsort($short_variables);
|
||||||
$chars = implode(range('a', 'z')) . '_' . implode(range('A', 'Z'));
|
$chars = implode(range('a', 'z')) . '_' . implode(range('A', 'Z'));
|
||||||
|
@ -259,7 +251,8 @@ function php_shrink($input) {
|
||||||
if (!is_array($token)) {
|
if (!is_array($token)) {
|
||||||
$token = array(0, $token);
|
$token = array(0, $token);
|
||||||
}
|
}
|
||||||
if (isset($tokens[$i+2][0]) && $tokens[$i+2][0] === T_CLOSE_TAG && isset($tokens[$i+3][0]) && $tokens[$i+3][0] === T_INLINE_HTML && isset($tokens[$i+4][0]) && $tokens[$i+4][0] === T_OPEN_TAG
|
if (!is_null($tokens[$i+2])
|
||||||
|
&& $tokens[$i+2][0] === T_CLOSE_TAG && $tokens[$i+3][0] === T_INLINE_HTML && $tokens[$i+4][0] === T_OPEN_TAG
|
||||||
&& strlen(add_apo_slashes($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+2] = array(T_ECHO, 'echo');
|
||||||
|
@ -320,14 +313,7 @@ function minify_js($file) {
|
||||||
function compile_file($match) {
|
function compile_file($match) {
|
||||||
global $project;
|
global $project;
|
||||||
$file = "";
|
$file = "";
|
||||||
$filenames = null;
|
list(, $filenames, $callback) = $match;
|
||||||
if (isset($match[1])) {
|
|
||||||
$filenames = $match[1];
|
|
||||||
}
|
|
||||||
$callback = null;
|
|
||||||
if (isset($match[2])) {
|
|
||||||
$callback = $match[2];
|
|
||||||
}
|
|
||||||
if ($filenames != "") {
|
if ($filenames != "") {
|
||||||
foreach (explode(";", $filenames) as $filename) {
|
foreach (explode(";", $filenames) as $filename) {
|
||||||
$file .= file_get_contents(dirname(__FILE__) . "/$project/$filename");
|
$file .= file_get_contents(dirname(__FILE__) . "/$project/$filename");
|
||||||
|
@ -362,28 +348,26 @@ function ini_bool($ini) {
|
||||||
|
|
||||||
|
|
||||||
$project = "adminer";
|
$project = "adminer";
|
||||||
if (isset($_SERVER["argv"][1]) && $_SERVER["argv"][1] == "editor") {
|
if ($_SERVER["argv"][1] == "editor") {
|
||||||
$project = "editor";
|
$project = "editor";
|
||||||
array_shift($_SERVER["argv"]);
|
array_shift($_SERVER["argv"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$driver = "";
|
$driver = "";
|
||||||
if (isset($_SERVER["argv"][1]) && file_exists(dirname(__FILE__) . "/adminer/drivers/" . $_SERVER["argv"][1] . ".inc.php")) {
|
if (file_exists(dirname(__FILE__) . "/adminer/drivers/" . $_SERVER["argv"][1] . ".inc.php")) {
|
||||||
$driver = $_SERVER["argv"][1];
|
$driver = $_SERVER["argv"][1];
|
||||||
array_shift($_SERVER["argv"]);
|
array_shift($_SERVER["argv"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($_COOKIE["adminer_lang"]);
|
unset($_COOKIE["adminer_lang"]);
|
||||||
if (isset($_SERVER["argv"][1])) {
|
|
||||||
$_SESSION["lang"] = $_SERVER["argv"][1]; // Adminer functions read language from session
|
$_SESSION["lang"] = $_SERVER["argv"][1]; // Adminer functions read language from session
|
||||||
}
|
|
||||||
include dirname(__FILE__) . "/adminer/include/lang.inc.php";
|
include dirname(__FILE__) . "/adminer/include/lang.inc.php";
|
||||||
if (isset($_SESSION["lang"]) && isset($langs[$_SESSION["lang"]])) {
|
if (isset($langs[$_SESSION["lang"]])) {
|
||||||
include dirname(__FILE__) . "/adminer/lang/$_SESSION[lang].inc.php";
|
include dirname(__FILE__) . "/adminer/lang/$_SESSION[lang].inc.php";
|
||||||
array_shift($_SERVER["argv"]);
|
array_shift($_SERVER["argv"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_SERVER["argv"][1]) && $_SERVER["argv"][1]) {
|
if ($_SERVER["argv"][1]) {
|
||||||
echo "Usage: php compile.php [editor] [driver] [lang]\n";
|
echo "Usage: php compile.php [editor] [driver] [lang]\n";
|
||||||
echo "Purpose: Compile adminer[-driver][-lang].php or editor[-driver][-lang].php.\n";
|
echo "Purpose: Compile adminer[-driver][-lang].php or editor[-driver][-lang].php.\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -443,7 +427,7 @@ if ($driver) {
|
||||||
if (count($drivers) == 1) {
|
if (count($drivers) == 1) {
|
||||||
$file = str_replace('<?php echo html_select("auth[driver]", $drivers, DRIVER) . "\n"; ?>', "<input type='hidden' name='auth[driver]' value='" . ($driver == "mysql" ? "server" : $driver) . "'>" . reset($drivers), $file);
|
$file = str_replace('<?php echo html_select("auth[driver]", $drivers, DRIVER) . "\n"; ?>', "<input type='hidden' name='auth[driver]' value='" . ($driver == "mysql" ? "server" : $driver) . "'>" . reset($drivers), $file);
|
||||||
}
|
}
|
||||||
$file = preg_replace('(;../vendor/vrana/jush/modules/jush-(?!textarea\.|txt\.|js\.|' . preg_quote($driver == "mysql" ? "sql" : $driver) . '\.)[^.]+.js)', '', $file);
|
$file = preg_replace('(;../externals/jush/modules/jush-(?!textarea\.|txt\.|js\.|' . preg_quote($driver == "mysql" ? "sql" : $driver) . '\.)[^.]+.js)', '', $file);
|
||||||
$file = preg_replace_callback('~doc_link\(array\((.*)\)\)~sU', function ($match) use ($driver) {
|
$file = preg_replace_callback('~doc_link\(array\((.*)\)\)~sU', function ($match) use ($driver) {
|
||||||
list(, $links) = $match;
|
list(, $links) = $match;
|
||||||
$links = preg_replace("~'(?!(" . ($driver == "mysql" ? "sql|mariadb" : $driver) . ")')[^']*' => [^,]*,?~", '', $links);
|
$links = preg_replace("~'(?!(" . ($driver == "mysql" ? "sql|mariadb" : $driver) . ")')[^']*' => [^,]*,?~", '', $links);
|
||||||
|
@ -452,30 +436,30 @@ if ($driver) {
|
||||||
//! strip doc_link() definition
|
//! strip doc_link() definition
|
||||||
}
|
}
|
||||||
if ($project == "editor") {
|
if ($project == "editor") {
|
||||||
$file = preg_replace('~;.\.\/vendor/vrana/jush/jush\.css~', '', $file);
|
$file = preg_replace('~;.\.\/externals/jush/jush\.css~', '', $file);
|
||||||
$file = preg_replace('~compile_file\(\'\.\./(vendor/vrana/jush/modules/jush\.js|adminer/static/[^.]+\.gif)[^)]+\)~', "''", $file);
|
$file = preg_replace('~compile_file\(\'\.\./(externals/jush/modules/jush\.js|adminer/static/[^.]+\.gif)[^)]+\)~', "''", $file);
|
||||||
}
|
}
|
||||||
$file = preg_replace_callback("~lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])~s", 'lang_ids', $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 = preg_replace_callback('~\b(include|require) "([^"]*\$LANG.inc.php)";~', 'put_file_lang', $file);
|
||||||
$file = str_replace("\r", "", $file);
|
$file = str_replace("\r", "", $file);
|
||||||
if (isset($_SESSION["lang"]) && $_SESSION["lang"]) {
|
if ($_SESSION["lang"]) {
|
||||||
// single language version
|
// single language version
|
||||||
$file = preg_replace_callback("~(<\\?php\\s*echo )?lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])(;\\s*\\?>)?~s", 'remove_lang', $file);
|
$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 switch_lang(); ?>\n", "", $file);
|
||||||
$file = str_replace('<?php echo $LANG; ?>', $_SESSION["lang"], $file);
|
$file = str_replace('<?php echo $LANG; ?>', $_SESSION["lang"], $file);
|
||||||
}
|
}
|
||||||
$file = str_replace('<?php echo script_src("static/editing.js"); ?>' . "\n", "", $file);
|
$file = str_replace('<?php echo script_src("static/editing.js"); ?>' . "\n", "", $file);
|
||||||
$file = preg_replace('~\s+echo script_src\("\.\./vendor/vrana/jush/modules/jush-(textarea|txt|js|\$jush)\.js"\);~', '', $file);
|
$file = preg_replace('~\s+echo script_src\("\.\./externals/jush/modules/jush-(textarea|txt|js|\$jush)\.js"\);~', '', $file);
|
||||||
$file = str_replace('<link rel="stylesheet" type="text/css" href="../vendor/vrana/jush/jush.css">' . "\n", "", $file);
|
$file = str_replace('<link rel="stylesheet" type="text/css" href="../externals/jush/jush.css">' . "\n", "", $file);
|
||||||
$file = preg_replace_callback("~compile_file\\('([^']+)'(?:, '([^']*)')?\\)~", 'compile_file', $file); // integrate static files
|
$file = preg_replace_callback("~compile_file\\('([^']+)'(?:, '([^']*)')?\\)~", 'compile_file', $file); // integrate static files
|
||||||
$replace = 'preg_replace("~\\\\\\\\?.*~", "", ME) . "?file=\1&version=' . $VERSION . '"';
|
$replace = 'preg_replace("~\\\\\\\\?.*~", "", ME) . "?file=\1&version=' . $VERSION . '"';
|
||||||
$file = preg_replace('~\.\./adminer/static/(default\.css|favicon\.ico)~', '<?php echo h(' . $replace . '); ?>', $file);
|
$file = preg_replace('~\.\./adminer/static/(default\.css|favicon\.ico)~', '<?php echo h(' . $replace . '); ?>', $file);
|
||||||
$file = preg_replace('~"\.\./adminer/static/(functions\.js)"~', $replace, $file);
|
$file = preg_replace('~"\.\./adminer/static/(functions\.js)"~', $replace, $file);
|
||||||
$file = preg_replace('~\.\./adminer/static/([^\'"]*)~', '" . h(' . $replace . ') . "', $file);
|
$file = preg_replace('~\.\./adminer/static/([^\'"]*)~', '" . h(' . $replace . ') . "', $file);
|
||||||
$file = preg_replace('~"\.\./vendor/vrana/jush/modules/(jush\.js)"~', $replace, $file);
|
$file = preg_replace('~"\.\./externals/jush/modules/(jush\.js)"~', $replace, $file);
|
||||||
$file = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $file);
|
$file = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $file);
|
||||||
$file = php_shrink($file);
|
$file = php_shrink($file);
|
||||||
|
|
||||||
$filename = $project . (preg_match('~-dev$~', $VERSION) ? "" : "-$VERSION") . ($driver ? "-$driver" : "") . (isset($_SESSION["lang"]) && $_SESSION["lang"] ? "-$_SESSION[lang]" : "") . ".php";
|
$filename = $project . (preg_match('~-dev$~', $VERSION) ? "" : "-$VERSION") . ($driver ? "-$driver" : "") . ($_SESSION["lang"] ? "-$_SESSION[lang]" : "") . ".php";
|
||||||
file_put_contents($filename, $file);
|
file_put_contents($filename, $file);
|
||||||
echo "$filename created (" . strlen($file) . " B).\n";
|
echo "$filename created (" . strlen($file) . " B).\n";
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
{
|
{
|
||||||
"name": "adminerevo/adminerevo",
|
"name": "vrana/adminer",
|
||||||
"description": "Database management in a single PHP file.",
|
"description": "Database management in a single PHP file.",
|
||||||
"homepage": "https://www.adminerevo.org/",
|
"homepage": "https://www.adminer.org/",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"database"
|
"database"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/adminerevo/adminerevo/issues/",
|
"issues": "https://sourceforge.net/p/adminer/bugs-and-features/",
|
||||||
"source": "https://github.com/adminerevo/adminerevo/"
|
"forum": "https://sourceforge.net/p/adminer/discussion/",
|
||||||
|
"source": "https://github.com/vrana/adminer/"
|
||||||
},
|
},
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@ -26,19 +27,5 @@
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile": "php compile.php"
|
"compile": "php compile.php"
|
||||||
},
|
|
||||||
"repositories": [
|
|
||||||
{
|
|
||||||
"type": "vcs",
|
|
||||||
"url": "https://github.com/vrana/jush.git"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "vcs",
|
|
||||||
"url": "https://github.com/vrana/jsshrink.git"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"require": {
|
|
||||||
"vrana/jush": "dev-master#ae33623c66189375a3654954cddc1c73f65c36fa",
|
|
||||||
"vrana/jsshrink": "dev-master#96a466fa4cef74ba8362f4bc4b1bb17b2c9ecbcc"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
105
composer.lock
generated
105
composer.lock
generated
|
@ -1,105 +0,0 @@
|
||||||
{
|
|
||||||
"_readme": [
|
|
||||||
"This file locks the dependencies of your project to a known state",
|
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
|
||||||
"This file is @generated automatically"
|
|
||||||
],
|
|
||||||
"content-hash": "07c328449153caaf58dca2fa394054e3",
|
|
||||||
"packages": [
|
|
||||||
{
|
|
||||||
"name": "vrana/jsshrink",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/vrana/JsShrink.git",
|
|
||||||
"reference": "96a466fa4cef74ba8362f4bc4b1bb17b2c9ecbcc"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/vrana/JsShrink/zipball/96a466fa4cef74ba8362f4bc4b1bb17b2c9ecbcc",
|
|
||||||
"reference": "96a466fa4cef74ba8362f4bc4b1bb17b2c9ecbcc",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"default-branch": true,
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"component": {
|
|
||||||
"scripts": [
|
|
||||||
"jsShrink.js"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"files": [
|
|
||||||
"jsShrink.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"license": [
|
|
||||||
"Apache-2.0",
|
|
||||||
"GPL-2.0"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Jakub Vrána",
|
|
||||||
"homepage": "http://www.vrana.cz"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Remove spaces and comments from JavaScript code (available in PHP and JavaScript).",
|
|
||||||
"homepage": "https://github.com/vrana/JsShrink",
|
|
||||||
"support": {
|
|
||||||
"source": "https://github.com/vrana/JsShrink/tree/master",
|
|
||||||
"issues": "https://github.com/vrana/JsShrink/issues"
|
|
||||||
},
|
|
||||||
"time": "2014-10-25T23:40:07+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "vrana/jush",
|
|
||||||
"version": "dev-master",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/vrana/jush.git",
|
|
||||||
"reference": "ae33623c66189375a3654954cddc1c73f65c36fa"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/vrana/jush/zipball/ae33623c66189375a3654954cddc1c73f65c36fa",
|
|
||||||
"reference": "ae33623c66189375a3654954cddc1c73f65c36fa",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"default-branch": true,
|
|
||||||
"type": "library",
|
|
||||||
"license": [
|
|
||||||
"Apache-2.0",
|
|
||||||
"GPL-2.0-only"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Jakub Vrána",
|
|
||||||
"homepage": "https://www.vrana.cz/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "JUSH - JavaScript Syntax Highlighter",
|
|
||||||
"homepage": "http://jush.sourceforge.net/",
|
|
||||||
"keywords": [
|
|
||||||
"javascript",
|
|
||||||
"syntax highlighter"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"source": "https://github.com/vrana/jush/"
|
|
||||||
},
|
|
||||||
"time": "2021-02-06T15:06:41+00:00"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"packages-dev": [],
|
|
||||||
"aliases": [],
|
|
||||||
"minimum-stability": "stable",
|
|
||||||
"stability-flags": {
|
|
||||||
"vrana/jush": 20,
|
|
||||||
"vrana/jsshrink": 20
|
|
||||||
},
|
|
||||||
"prefer-stable": false,
|
|
||||||
"prefer-lowest": false,
|
|
||||||
"platform": [],
|
|
||||||
"platform-dev": [],
|
|
||||||
"plugin-api-version": "2.6.0"
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -13,7 +13,8 @@ It is available for download as a single self-contained PHP file, making it easy
|
||||||
to deploy anywhere.
|
to deploy anywhere.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
[Download](https://github.com/adminerevo/adminerevo){ .md-button .md-button--secondary target=\_blank }
|
[Download](https://download.adminerevo.org){ .md-button .md-button--primary target=\_blank }
|
||||||
|
[View Source](https://github.com/adminerevo/adminerevo){ .md-button .md-button--secondary target=\_blank }
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
|
|
@ -3,8 +3,8 @@ page_header(lang('Server'), "", false);
|
||||||
|
|
||||||
if ($adminer->homepage()) {
|
if ($adminer->homepage()) {
|
||||||
echo "<form action='' method='post'>\n";
|
echo "<form action='' method='post'>\n";
|
||||||
echo "<p>" . lang('Search data in tables') . ": <input type='search' name='query' value='" . h(isset($_POST["query"]) ? $_POST["query"] : null) . "'> <input type='submit' value='" . lang('Search') . "'>\n";
|
echo "<p>" . lang('Search data in tables') . ": <input type='search' name='query' value='" . h($_POST["query"]) . "'> <input type='submit' value='" . lang('Search') . "'>\n";
|
||||||
if (isset($_POST["query"]) && $_POST["query"] != "") {
|
if ($_POST["query"] != "") {
|
||||||
search_tables();
|
search_tables();
|
||||||
}
|
}
|
||||||
echo "<div class='scrollable'>\n";
|
echo "<div class='scrollable'>\n";
|
||||||
|
@ -19,7 +19,7 @@ if ($adminer->homepage()) {
|
||||||
foreach (table_status() as $table => $row) {
|
foreach (table_status() as $table => $row) {
|
||||||
$name = $adminer->tableName($row);
|
$name = $adminer->tableName($row);
|
||||||
if (isset($row["Engine"]) && $name != "") {
|
if (isset($row["Engine"]) && $name != "") {
|
||||||
echo '<tr' . odd() . '><td>' . checkbox("tables[]", $table, in_array($table, (array) (isset($_POST["tables"]) ? $_POST["tables"] : []), true));
|
echo '<tr' . odd() . '><td>' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true));
|
||||||
echo "<th><a href='" . h(ME) . 'select=' . urlencode($table) . "'>$name</a>";
|
echo "<th><a href='" . h(ME) . 'select=' . urlencode($table) . "'>$name</a>";
|
||||||
$val = format_number($row["Rows"]);
|
$val = format_number($row["Rows"]);
|
||||||
echo "<td align='right'><a href='" . h(ME . "edit=") . urlencode($table) . "'>" . ($row["Engine"] == "InnoDB" && $val ? "~ $val" : $val) . "</a>";
|
echo "<td align='right'><a href='" . h(ME . "edit=") . urlencode($table) . "'>" . ($row["Engine"] == "InnoDB" && $val ? "~ $val" : $val) . "</a>";
|
||||||
|
|
|
@ -72,11 +72,11 @@ class Adminer {
|
||||||
|
|
||||||
function loginForm() {
|
function loginForm() {
|
||||||
echo "<table cellspacing='0' class='layout'>\n";
|
echo "<table cellspacing='0' class='layout'>\n";
|
||||||
echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td>', '<input type="hidden" name="auth[driver]" value="server"><input name="auth[username]" id="username" value="' . h((isset($_GET["username"]) ? $_GET["username"] : null)) . '" autocomplete="username" autocapitalize="off">' . script("focus(qs('#username'));"));
|
echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td>', '<input type="hidden" name="auth[driver]" value="server"><input name="auth[username]" id="username" value="' . h($_GET["username"]) . '" autocomplete="username" autocapitalize="off">' . script("focus(qs('#username'));"));
|
||||||
echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td>', '<input type="password" name="auth[password]" autocomplete="current-password">' . "\n");
|
echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td>', '<input type="password" name="auth[password]" autocomplete="current-password">' . "\n");
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
|
echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
|
||||||
echo checkbox("auth[permanent]", 1, (isset($_COOKIE["adminer_permanent"]) ? $_COOKIE["adminer_permanent"] : null), lang('Permanent login')) . "\n";
|
echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function loginFormField($name, $heading, $value) {
|
function loginFormField($name, $heading, $value) {
|
||||||
|
@ -224,7 +224,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectSearchPrint($where, $columns, $indexes) {
|
function selectSearchPrint($where, $columns, $indexes) {
|
||||||
$where = isset($_GET["where"]) ? (array) $_GET["where"] : [];
|
$where = (array) $_GET["where"];
|
||||||
echo '<fieldset id="fieldset-search"><legend>' . lang('Search') . "</legend><div>\n";
|
echo '<fieldset id="fieldset-search"><legend>' . lang('Search') . "</legend><div>\n";
|
||||||
$keys = array();
|
$keys = array();
|
||||||
foreach ($where as $key => $val) {
|
foreach ($where as $key => $val) {
|
||||||
|
@ -293,7 +293,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
||||||
echo "<select name='index_order'>" . optionlist(array("" => "") + $orders, ($_GET["order"][0] != "" ? "" : $_GET["index_order"]), true) . "</select>";
|
echo "<select name='index_order'>" . optionlist(array("" => "") + $orders, ($_GET["order"][0] != "" ? "" : $_GET["index_order"]), true) . "</select>";
|
||||||
echo "</div></fieldset>\n";
|
echo "</div></fieldset>\n";
|
||||||
}
|
}
|
||||||
if (isset($_GET["order"]) && $_GET["order"]) {
|
if ($_GET["order"]) {
|
||||||
echo "<div style='display: none;'>" . hidden_fields(array(
|
echo "<div style='display: none;'>" . hidden_fields(array(
|
||||||
"order" => array(1 => reset($_GET["order"])),
|
"order" => array(1 => reset($_GET["order"])),
|
||||||
"desc" => ($_GET["desc"] ? array(1 => 1) : array()),
|
"desc" => ($_GET["desc"] ? array(1 => 1) : array()),
|
||||||
|
@ -326,13 +326,13 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
||||||
|
|
||||||
function selectEmailPrint($emailFields, $columns) {
|
function selectEmailPrint($emailFields, $columns) {
|
||||||
if ($emailFields) {
|
if ($emailFields) {
|
||||||
print_fieldset("email", lang('E-mail'), isset($_POST["email_append"]) ? $_POST["email_append"] : null);
|
print_fieldset("email", lang('E-mail'), $_POST["email_append"]);
|
||||||
echo "<div>";
|
echo "<div>";
|
||||||
echo script("qsl('div').onkeydown = partialArg(bodyKeydown, 'email');");
|
echo script("qsl('div').onkeydown = partialArg(bodyKeydown, 'email');");
|
||||||
echo "<p>" . lang('From') . ": <input name='email_from' value='" . h(isset($_POST["email_from"]) ? $_POST["email_from"] : (isset($_COOKIE["adminer_email"]) ? $_COOKIE["adminer_email"] : null)) . "'>\n";
|
echo "<p>" . lang('From') . ": <input name='email_from' value='" . h($_POST ? $_POST["email_from"] : $_COOKIE["adminer_email"]) . "'>\n";
|
||||||
echo lang('Subject') . ": <input name='email_subject' value='" . h(isset($_POST["email_subject"]) ? $_POST["email_subject"] : null) . "'>\n";
|
echo lang('Subject') . ": <input name='email_subject' value='" . h($_POST["email_subject"]) . "'>\n";
|
||||||
echo "<p><textarea name='email_message' rows='15' cols='75'>" . h(isset($_POST["email_message"]) ? $_POST["email_message"] : null . (isset($_POST["email_append"]) && $_POST["email_append"] ? '{$' . "$_POST[email_addition]}" : "")) . "</textarea>\n";
|
echo "<p><textarea name='email_message' rows='15' cols='75'>" . h($_POST["email_message"] . ($_POST["email_append"] ? '{$' . "$_POST[email_addition]}" : "")) . "</textarea>\n";
|
||||||
echo "<p>" . script("qsl('p').onkeydown = partialArg(bodyKeydown, 'email_append');", "") . html_select("email_addition", $columns, isset($_POST["email_addition"]) ? $_POST["email_addition"] : null) . "<input type='submit' name='email_append' value='" . lang('Insert') . "'>\n"; //! JavaScript
|
echo "<p>" . script("qsl('p').onkeydown = partialArg(bodyKeydown, 'email_append');", "") . html_select("email_addition", $columns, $_POST["email_addition"]) . "<input type='submit' name='email_append' value='" . lang('Insert') . "'>\n"; //! JavaScript
|
||||||
echo "<p>" . lang('Attachments') . ": <input type='file' name='email_files[]'>" . script("qsl('input').onchange = emailFileChange;");
|
echo "<p>" . lang('Attachments') . ": <input type='file' name='email_files[]'>" . script("qsl('input').onchange = emailFileChange;");
|
||||||
echo "<p>" . (count($emailFields) == 1 ? '<input type="hidden" name="email_field" value="' . h(key($emailFields)) . '">' : html_select("email_field", $emailFields));
|
echo "<p>" . (count($emailFields) == 1 ? '<input type="hidden" name="email_field" value="' . h(key($emailFields)) . '">' : html_select("email_field", $emailFields));
|
||||||
echo "<input type='submit' name='email' value='" . lang('Send') . "'>" . confirm();
|
echo "<input type='submit' name='email' value='" . lang('Send') . "'>" . confirm();
|
||||||
|
@ -348,7 +348,6 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
||||||
function selectSearchProcess($fields, $indexes) {
|
function selectSearchProcess($fields, $indexes) {
|
||||||
global $driver;
|
global $driver;
|
||||||
$return = array();
|
$return = array();
|
||||||
if (isset($_GET["where"])) {
|
|
||||||
foreach ((array) $_GET["where"] as $key => $where) {
|
foreach ((array) $_GET["where"] as $key => $where) {
|
||||||
$col = $where["col"];
|
$col = $where["col"];
|
||||||
$op = $where["op"];
|
$op = $where["op"];
|
||||||
|
@ -377,16 +376,15 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
||||||
$return[] = ($conds ? "(" . implode(" OR ", $conds) . ")" : "1 = 0");
|
$return[] = ($conds ? "(" . implode(" OR ", $conds) . ")" : "1 = 0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectOrderProcess($fields, $indexes) {
|
function selectOrderProcess($fields, $indexes) {
|
||||||
$index_order = isset($_GET["index_order"]) ? $_GET["index_order"] : null;
|
$index_order = $_GET["index_order"];
|
||||||
if ($index_order != "") {
|
if ($index_order != "") {
|
||||||
unset($_GET["order"][1]);
|
unset($_GET["order"][1]);
|
||||||
}
|
}
|
||||||
if (isset($_GET["order"]) && $_GET["order"]) {
|
if ($_GET["order"]) {
|
||||||
return array(idf_escape(reset($_GET["order"])) . ($_GET["desc"] ? " DESC" : ""));
|
return array(idf_escape(reset($_GET["order"])) . ($_GET["desc"] ? " DESC" : ""));
|
||||||
}
|
}
|
||||||
foreach (($index_order != "" ? array($indexes[$index_order]) : $indexes) as $index) {
|
foreach (($index_order != "" ? array($indexes[$index_order]) : $indexes) as $index) {
|
||||||
|
@ -418,10 +416,10 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectEmailProcess($where, $foreignKeys) {
|
function selectEmailProcess($where, $foreignKeys) {
|
||||||
if (isset($_POST["email_append"]) && $_POST["email_append"]) {
|
if ($_POST["email_append"]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (isset($_POST["email"]) && $_POST["email"]) {
|
if ($_POST["email"]) {
|
||||||
$sent = 0;
|
$sent = 0;
|
||||||
if ($_POST["all"] || $_POST["check"]) {
|
if ($_POST["all"] || $_POST["check"]) {
|
||||||
$field = idf_escape($_POST["email_field"]);
|
$field = idf_escape($_POST["email_field"]);
|
||||||
|
@ -480,9 +478,30 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
||||||
|
|
||||||
function editInput($table, $field, $attrs, $value) {
|
function editInput($table, $field, $attrs, $value) {
|
||||||
if ($field["type"] == "enum") {
|
if ($field["type"] == "enum") {
|
||||||
return (isset($_GET["select"]) ? "<label><input type='radio'$attrs value='-1' checked><i>" . lang('original') . "</i></label> " : "")
|
$options = array();
|
||||||
. enum_input("radio", $attrs, $field, ($value || isset($_GET["select"]) ? $value : 0), ($field["null"] ? "" : null))
|
$selected = $value;
|
||||||
;
|
if (isset($_GET["select"])) {
|
||||||
|
$options[-1] = lang('original');
|
||||||
|
if ($selected === null) {
|
||||||
|
$selected = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($field["null"]) {
|
||||||
|
$options[""] = "NULL";
|
||||||
|
if ($value === null && !isset($_GET["select"])) {
|
||||||
|
$selected = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$options[0] = lang('empty');
|
||||||
|
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
|
||||||
|
foreach ($matches[1] as $i => $val) {
|
||||||
|
$val = stripcslashes(str_replace("''", "'", $val));
|
||||||
|
$options[$i + 1] = $val;
|
||||||
|
if ($value === $val) {
|
||||||
|
$selected = $i + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "<select$attrs>" . optionlist($options, (string) $selected, 1) . "</select>"; // 1 - use keys
|
||||||
}
|
}
|
||||||
$options = $this->_foreignKeyOptions($table, $field["field"], $value);
|
$options = $this->_foreignKeyOptions($table, $field["field"], $value);
|
||||||
if ($options !== null) {
|
if ($options !== null) {
|
||||||
|
@ -593,7 +612,6 @@ qsl('div').onclick = whisperClick;", "")
|
||||||
<?php
|
<?php
|
||||||
if ($missing == "auth") {
|
if ($missing == "auth") {
|
||||||
$first = true;
|
$first = true;
|
||||||
if (isset($_SESSION["pwds"])) {
|
|
||||||
foreach ((array) $_SESSION["pwds"] as $vendor => $servers) {
|
foreach ((array) $_SESSION["pwds"] as $vendor => $servers) {
|
||||||
foreach ($servers[""] as $username => $password) {
|
foreach ($servers[""] as $username => $password) {
|
||||||
if ($password !== null) {
|
if ($password !== null) {
|
||||||
|
@ -606,7 +624,6 @@ qsl('div').onclick = whisperClick;", "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$this->databasesPrint($missing);
|
$this->databasesPrint($missing);
|
||||||
if ($missing != "db" && $missing != "ns") {
|
if ($missing != "db" && $missing != "ns") {
|
||||||
|
@ -631,10 +648,10 @@ qsl('div').onclick = whisperClick;", "")
|
||||||
$name = $this->tableName($row);
|
$name = $this->tableName($row);
|
||||||
if (isset($row["Engine"]) && $name != "") { // ignore views and tables without name
|
if (isset($row["Engine"]) && $name != "") { // ignore views and tables without name
|
||||||
echo "<a href='" . h(ME) . 'select=' . urlencode($row["Name"]) . "'"
|
echo "<a href='" . h(ME) . 'select=' . urlencode($row["Name"]) . "'"
|
||||||
. bold((isset($_GET["select"]) && $_GET["select"] == $row["Name"]) || (isset($_GET["edit"]) && $_GET["edit"] == $row["Name"]), "select")
|
. bold($_GET["select"] == $row["Name"] || $_GET["edit"] == $row["Name"], "select")
|
||||||
. " title='" . lang('Select data') . "'>$name</a>\n";
|
. " title='" . lang('Select data') . "'>$name</a>\n";
|
||||||
echo "<a href='" . h(ME) . 'select=' . urlencode($row["Name"]) . "'"
|
echo "<a href='" . h(ME) . 'select=' . urlencode($row["Name"]) . "'"
|
||||||
. bold((isset($_GET["select"]) && $_GET["select"] == $row["Name"]) || (isset($_GET["edit"]) && $_GET["edit"] == $row["Name"]), "")
|
. bold($_GET["select"] == $row["Name"] || $_GET["edit"] == $row["Name"], "")
|
||||||
. " title='" . lang('Select data') . "'>$name</a>\n";
|
. " title='" . lang('Select data') . "'>$name</a>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -642,7 +659,6 @@ qsl('div').onclick = whisperClick;", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
function _foreignColumn($foreignKeys, $column) {
|
function _foreignColumn($foreignKeys, $column) {
|
||||||
if (isset($foreignKeys[$column])) {
|
|
||||||
foreach ((array) $foreignKeys[$column] as $foreignKey) {
|
foreach ((array) $foreignKeys[$column] as $foreignKey) {
|
||||||
if (count($foreignKey["source"]) == 1) {
|
if (count($foreignKey["source"]) == 1) {
|
||||||
$name = $this->rowDescription($foreignKey["table"]);
|
$name = $this->rowDescription($foreignKey["table"]);
|
||||||
|
@ -653,7 +669,6 @@ qsl('div').onclick = whisperClick;", "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function _foreignKeyOptions($table, $column, $value = null) {
|
function _foreignKeyOptions($table, $column, $value = null) {
|
||||||
global $connection;
|
global $connection;
|
||||||
|
|
|
@ -11,7 +11,7 @@ $GLOBALS['project'] = basename(dirname(__FILE__));
|
||||||
include "../adminer/include/bootstrap.inc.php";
|
include "../adminer/include/bootstrap.inc.php";
|
||||||
$drivers[DRIVER] = lang('Login');
|
$drivers[DRIVER] = lang('Login');
|
||||||
|
|
||||||
if (isset($_GET["select"]) && ((isset($_POST["edit"]) && $_POST["edit"]) || (isset($_POST["clone"]) && $_POST["clone"])) && (isset($_POST["save"]) === false || !$_POST["save"])) {
|
if (isset($_GET["select"]) && ($_POST["edit"] || $_POST["clone"]) && !$_POST["save"]) {
|
||||||
$_GET["edit"] = $_GET["select"];
|
$_GET["edit"] = $_GET["select"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
externals/JsShrink
vendored
Submodule
1
externals/JsShrink
vendored
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 17cbfacae67dede6d94d94ce92214c8ca31d858e
|
1
externals/jush
vendored
Submodule
1
externals/jush
vendored
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit ae33623c66189375a3654954cddc1c73f65c36fa
|
|
@ -8,56 +8,78 @@ if (isset($_GET["clickhouse"])) {
|
||||||
var $extension = "JSON", $server_info, $errno, $_result, $error, $_url;
|
var $extension = "JSON", $server_info, $errno, $_result, $error, $_url;
|
||||||
var $_db = 'default';
|
var $_db = 'default';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $db
|
||||||
|
* @param string $query
|
||||||
|
* @return Min_Result|bool
|
||||||
|
*/
|
||||||
function rootQuery($db, $query) {
|
function rootQuery($db, $query) {
|
||||||
@ini_set('track_errors', 1); // @ - may be disabled
|
@ini_set('track_errors', 1); // @ - may be disabled
|
||||||
$file = @file_get_contents("$this->_url/?database=$db", false, stream_context_create(array('http' => array(
|
$file = @file_get_contents("$this->_url/?database=$db", false, stream_context_create(array('http' => array(
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
'content' => $this->isQuerySelectLike($query) ? "$query FORMAT JSONCompact" : $query,
|
'content' => $this->isQuerySelectLike($query) ? "$query FORMAT JSONCompact" : $query,
|
||||||
'header' => 'Content-type: application/x-www-form-urlencoded',
|
'header' => 'Content-type: application/x-www-form-urlencoded',
|
||||||
'ignore_errors' => 1, // available since PHP 5.2.10
|
'ignore_errors' => 1,
|
||||||
|
'follow_location' => 0,
|
||||||
|
'max_redirects' => 0,
|
||||||
))));
|
))));
|
||||||
|
|
||||||
if ($file === false) {
|
if ($file === false) {
|
||||||
$this->error = $php_errormsg;
|
$this->error = lang('Invalid server or credentials.');
|
||||||
return $file;
|
|
||||||
}
|
|
||||||
if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) {
|
|
||||||
$this->error = lang('Invalid credentials.') . " $http_response_header[0]";
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$return = json_decode($file, true);
|
|
||||||
if ($return === null) {
|
if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) {
|
||||||
|
foreach ($http_response_header as $header) {
|
||||||
|
if (preg_match('~^X-ClickHouse-Exception-Code:~i', $header)) {
|
||||||
|
$this->error = preg_replace('~\(version [^(]+\(.+$~', '', $file);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->error = lang('Invalid server or credentials.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!$this->isQuerySelectLike($query) && $file === '') {
|
if (!$this->isQuerySelectLike($query) && $file === '') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->errno = json_last_error();
|
$return = json_decode($file, true);
|
||||||
if (function_exists('json_last_error_msg')) {
|
if ($return === null) {
|
||||||
$this->error = json_last_error_msg();
|
$this->error = lang('Invalid server or credentials.');
|
||||||
} else {
|
return false;
|
||||||
$constants = get_defined_constants(true);
|
|
||||||
foreach ($constants['json'] as $name => $value) {
|
|
||||||
if ($value == $this->errno && preg_match('~^JSON_ERROR_~', $name)) {
|
|
||||||
$this->error = $name;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($return['rows']) || !isset($return['data']) || !isset($return['meta'])) {
|
||||||
|
$this->error = lang('Invalid server or credentials.');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
return new Min_Result($return['rows'], $return['data'], $return['meta']);
|
||||||
return new Min_Result($return);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function isQuerySelectLike($query) {
|
function isQuerySelectLike($query) {
|
||||||
return (bool) preg_match('~^(select|show)~i', $query);
|
return (bool) preg_match('~^(select|show)~i', $query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $query
|
||||||
|
* @return bool|Min_Result
|
||||||
|
*/
|
||||||
function query($query) {
|
function query($query) {
|
||||||
return $this->rootQuery($this->_db, $query);
|
return $this->rootQuery($this->_db, $query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $server
|
||||||
|
* @param string $username
|
||||||
|
* @param string $password
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
function connect($server, $username, $password) {
|
function connect($server, $username, $password) {
|
||||||
preg_match('~^(https?://)?(.*)~', $server, $match);
|
$this->_url = build_http_url($server, $username, $password, "localhost", 8123);
|
||||||
$this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]";
|
|
||||||
$return = $this->query('SELECT 1');
|
$return = $this->query('SELECT 1');
|
||||||
return (bool) $return;
|
return (bool) $return;
|
||||||
}
|
}
|
||||||
|
@ -92,11 +114,17 @@ if (isset($_GET["clickhouse"])) {
|
||||||
class Min_Result {
|
class Min_Result {
|
||||||
var $num_rows, $_rows, $columns, $meta, $_offset = 0;
|
var $num_rows, $_rows, $columns, $meta, $_offset = 0;
|
||||||
|
|
||||||
function __construct($result) {
|
/**
|
||||||
$this->num_rows = $result['rows'];
|
* @param int $rows
|
||||||
$this->_rows = $result['data'];
|
* @param array[] $data
|
||||||
$this->meta = $result['meta'];
|
* @param array[] $meta
|
||||||
$this->columns = array_column($this->meta, 'name');
|
*/
|
||||||
|
function __construct($rows, array $data, array $meta) {
|
||||||
|
$this->num_rows = $rows;
|
||||||
|
$this->_rows = $data;
|
||||||
|
$this->meta = $meta;
|
||||||
|
$this->columns = array_column($meta, 'name');
|
||||||
|
|
||||||
reset($this->_rows);
|
reset($this->_rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,49 @@ if (isset($_GET["simpledb"])) {
|
||||||
|
|
||||||
if (class_exists('SimpleXMLElement') && ini_bool('allow_url_fopen')) {
|
if (class_exists('SimpleXMLElement') && ini_bool('allow_url_fopen')) {
|
||||||
class Min_DB {
|
class Min_DB {
|
||||||
var $extension = "SimpleXML", $server_info = '2009-04-15', $error, $timeout, $next, $affected_rows, $_result;
|
var $extension = "SimpleXML", $server_info = '2009-04-15', $error, $timeout, $next, $affected_rows, $_url, $_result;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $server
|
||||||
|
* @param string $password
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function connect($server, $password) {
|
||||||
|
if ($server == '' || $password == '') {
|
||||||
|
$this->error = lang('Invalid server or credentials.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$parts = parse_url($server);
|
||||||
|
|
||||||
|
if (!$parts || !isset($parts['host']) || !preg_match('~^sdb\.([a-z0-9-]+\.)?amazonaws\.com$~i', $parts['host']) ||
|
||||||
|
isset($parts['port'])
|
||||||
|
) {
|
||||||
|
$this->error = lang('Invalid server or credentials.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->_url = build_http_url($server, '', '', '');
|
||||||
|
|
||||||
|
return (bool) $this->workaroundLoginRequest('ListDomains', ['MaxNumberOfDomains' => 1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME: This is so wrong :-( Move sdb_request to Min_DB!
|
||||||
|
private function workaroundLoginRequest($action, $params = array()) {
|
||||||
|
global $connection;
|
||||||
|
|
||||||
|
$connection = $this;
|
||||||
|
$result = sdb_request($action, $params);
|
||||||
|
$connection = null;
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
function select_db($database) {
|
function select_db($database) {
|
||||||
return ($database == "domain");
|
return ($database == "domain");
|
||||||
}
|
}
|
||||||
|
|
||||||
function query($query, $unbuffered = false) {
|
function query($query) {
|
||||||
$params = array('SelectExpression' => $query, 'ConsistentRead' => 'true');
|
$params = array('SelectExpression' => $query, 'ConsistentRead' => 'true');
|
||||||
if ($this->next) {
|
if ($this->next) {
|
||||||
$params['NextToken'] = $this->next;
|
$params['NextToken'] = $this->next;
|
||||||
|
@ -248,11 +284,15 @@ if (isset($_GET["simpledb"])) {
|
||||||
|
|
||||||
function connect() {
|
function connect() {
|
||||||
global $adminer;
|
global $adminer;
|
||||||
list(, , $password) = $adminer->credentials();
|
|
||||||
if ($password != "") {
|
$connection = new Min_DB;
|
||||||
return lang('Database does not support password.');
|
|
||||||
|
list($server, , $password) = $adminer->credentials();
|
||||||
|
if ($connection->connect($server, $password)) {
|
||||||
|
return $connection;
|
||||||
}
|
}
|
||||||
return new Min_DB;
|
|
||||||
|
return $connection->error;
|
||||||
}
|
}
|
||||||
|
|
||||||
function support($feature) {
|
function support($feature) {
|
||||||
|
@ -422,13 +462,16 @@ if (isset($_GET["simpledb"])) {
|
||||||
$query = str_replace('%7E', '~', substr($query, 1));
|
$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)));
|
$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
|
@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(
|
|
||||||
|
$file = @file_get_contents($connection->_url, false, stream_context_create(array('http' => array(
|
||||||
'method' => 'POST', // may not fit in URL with GET
|
'method' => 'POST', // may not fit in URL with GET
|
||||||
'content' => $query,
|
'content' => $query,
|
||||||
'ignore_errors' => 1, // available since PHP 5.2.10
|
'ignore_errors' => 1,
|
||||||
|
'follow_location' => 0,
|
||||||
|
'max_redirects' => 0,
|
||||||
))));
|
))));
|
||||||
if (!$file) {
|
if (!$file) {
|
||||||
$connection->error = $php_errormsg;
|
$connection->error = error_get_last()['message'];
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
libxml_use_internal_errors(true);
|
libxml_use_internal_errors(true);
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
* @author Jakub Vrana, https://www.vrana.cz/
|
* @author Jakub Vrana, https://www.vrana.cz/
|
||||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||||
|
* @depreacted 4.8.4 is now default behavior
|
||||||
*/
|
*/
|
||||||
class AdminerEnumOption {
|
class AdminerEnumOption {
|
||||||
|
|
||||||
|
|
1
todo.txt
1
todo.txt
|
@ -20,7 +20,6 @@ Joining tables - PRIMARY KEY (table, joining)
|
||||||
Rank, Tree structure
|
Rank, Tree structure
|
||||||
|
|
||||||
MySQL:
|
MySQL:
|
||||||
Generated columns (MySQL >= 5.7.6)
|
|
||||||
Data longer than max_allowed_packet can be sent by mysqli_stmt_send_long_data()
|
Data longer than max_allowed_packet can be sent by mysqli_stmt_send_long_data()
|
||||||
|
|
||||||
MariaDB:
|
MariaDB:
|
||||||
|
|
Loading…
Reference in a new issue