Compare commits

..

No commits in common. "master" and "11301" have entirely different histories.

813 changed files with 40419 additions and 68703 deletions

28
.gitignore vendored Normal file → Executable file
View File

@ -1,13 +1,19 @@
core/class/phpmailer/.DS_Store
site/.DS_Store
site/data/*
site/tmp/*
site/backup/*
site/file/*
site/i18n/*.json
.DS_Store
# Fichiers du site
site/*
# Dossiers vides dans GitHub
!.gitkeep
/.git
# PHPStorm
.idea/
# Trucs
core/vendor/tinymce/link_list.json
robots.txt
.vscode/*
sitemap.xml.gz
sitemap.xml
.gitignore
core/module/config/tool/data.key
robots.txt
.DS_Store
# Service de mise à jour
gitupdate.sh

View File

@ -32,5 +32,5 @@ Options -Indexes
Options -MultiViews
</IfModule>
# ne pas supprimer la ligne URL rewriting !
# URL rewriting
# Attention, surtout ne rien modifier ci-dessous !
# URL rewriting

2173
CHANGES.md

File diff suppressed because it is too large Load Diff

676
LICENSE
View File

@ -1 +1,675 @@
Cette œuvre est mise à disposition sous licence Attribution - Pas d'Utilisation Commerciale - Pas de Modification 4.0 International. Pour voir une copie de cette licence, visitez http://creativecommons.org/licenses/by-nc-nd/4.0/ ou écrivez à Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
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
state 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 3 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, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program 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, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU 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. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -1,110 +0,0 @@
# ZwiiCMS 13.2.02
Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.
ZwiiCMS a été créé par un développeur de talent, [Rémi Jean](https://remijean.fr/). Il est désormais maintenu par Frédéric Tempez.
[Site](http://zwiicms.fr/) - [Forum](http://forum.zwiicms.com/) - [Version initiale](https://github.com/remijean/ZwiiCMS/) - [GitHub](https://github.com/fredtempez/ZwiiCMS)
## Configuration recommandée
* PHP 7.2 ou plus
* Support de .htaccess
## Licence
Cette œuvre est mise à disposition sous licence Attribution - Pas d'utilisation Commerciale - Pas de Modification 4.0 International.
Pour voir une copie de cette licence, visitez <http://creativecommons.org/licenses/by-nc-nd/4.0/> ou écrivez à Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
## Téléchargement de ZwiiCMS
Pour télécharger la dernière version publiée, rendez-vous :
* sur [la page des mises à jour](https://forge.chapril.org/ZwiiCMS-Team/ZwiiCMS/releases)
* ou sur [la page de téléchargement du site](https://zwiicms.fr/telechargement)
## Installation
Décompressez l'archive de Zwii et téléversez son contenu à la racine de votre serveur ou dans un sous-répertoire. C'est tout !
Vous trouverez de plus amples explications, en particulier pour une installation chez Free, dans la rubrique "Téléchargements" du forum.
## Procédures de mise à jour
A l'occasion de l'installation d'une verion majeure, il est recommandé de réaliser une copie de sauvegarde.
### Automatique
* Connectez-vous à votre site.
* Si une mise à jour est disponible, elle vous est proposée dans la barre d'administration.
* Cliquez sur le bouton "Mettre à jour".
### Manuelle
* Sauvegardez l'intégralité de votre site, spécialement le répertoire "site".
* Décompressez la nouvelle version sur votre ordinateur.
* Transférez son contenu sur votre serveur en activant le remplacement des fichiers.
## Arborescence générale
*Légende : [R] Répertoire - [F] Fichier*
```text
[R] core Cœur du système
[R] class Classes
[R] layout Mise en page
[R] module Modules du cœur
[R] vendor Librairies extérieures
[F] core.js.php Cœur javascript
[F] core.php Cœur PHP
[R] module Modules de page
[R] blog Blog
[R] form Gestionnaire de formulaires
[R] gallery Galerie
[R] news Nouvelles
[R] redirection Redirection
[R] site Contenu du site
[R] backup Sauvegardes automatiques
[R] i18N Langues de l'interface de Zwii
[R] data Répertoire des données
[R] fr Dossier localisé
[F] page.json Données des pages
[F] module.json Données des modules de pages
[F] local.json Données du site propres à la langue
[F] .default Indicateur de la langue de site par défaut
[R] content Dossier des contenus de page
[F] accueil.html Exemple contenu de la page d'accueil
[R] font Dossier contenant les fontes installées
[F] font.html Fichier contenant les appels des fontes à charger sur cdnFonts
[F] font.css Fichier contenant la feuille de style liée aux polices de caractères locales
[F] fontes.woff Fichiers locaux des fontes (woff, etc..)
[R] modules Personnalisation des modules ou données propres
[F] admin.css Thème des pages d'administration
[F] admin.json Données de thème des pages d'administration
[F] blacklist.json Journalisation des tentatives de connexion avec des comptes inconnus
[F] config.json Configuration du site
[F] core.json Configuration du noyau
[F] custom.css Feuille de style de la personnalisation avancée
[F] font.json Descripteur des fontes personnalisées
[F] journal.log Journalisation des activités
[F] language.json Langues de l'interface
[F] profil.json Profils des utilisateurs
[F] theme.css Thème du site
[F] theme.json Données du site
[F] user.json Données des utilisateurs
[F] .backup Marqueur de la sauvegarde des fichiers si présent
[R] file Répertoire d'upload du gestionnaire de fichiers
[R] source Ressources diverses
[R] thumb Miniatures des images
[R] tmp Répertoire temporaire
[F] index.php Fichier d'initialisation de ZwiiCMS
[F] robots.txt Filtrage des répertoires accessibles aux robots des moteurs de recherche
[F] sitemap.xml Plan du site
[F] sitemap.xml.gz Version compressée
Le fichiers .htaccess contribuent à la sécurité en filtrant l'accès aux répertoires sensibles.
```

162
README.md
View File

@ -1,109 +1,107 @@
# ZwiiCMS 13.2.02
Zwii is a database-less (flat-file) CMS that allows you to easily create and manage a web site without any programming knowledge.
ZwiiCMS was created by a talented developer, [Rémi Jean](https://remijean.fr/). It is now maintained by Frédéric Tempez.
# ZwiiCMS 11.3.01
[Site](http://zwiicms.fr/) - [Forum](http://forum.zwiicms.com/) - [Initial version](https://github.com/remijean/ZwiiCMS/) - [GitHub](https://github.com/fredtempez/ZwiiCMS)
Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.
## Recommended configuration
ZwiiCMS a été créé par un développeur de talent, [Rémi Jean](https://remijean.fr/). Il est désormais maintenu par Frédéric Tempez.
* PHP 7.2 or higher
* .htaccess support
[Site](http://zwiicms.fr/) - [Forum](http://forum.zwiicms.com/) - [Version initiale](https://github.com/remijean/ZwiiCMS/) - [GitHub](https://github.com/fredtempez/ZwiiCMS)
## License
## Configuration recommandée
This work is licensed under the Attribution-Noncommercial-No Derivative Works 4.0 International License.
* PHP 7.2 ou plus
* Support de .htaccess
To view a copy of this license, visit <http://creativecommons.org/licenses/by-nc-nd/4.0/> or write to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
## Téléchargement de ZwiiCMS
## Downloading ZwiiCMS
Pour télécharger la dernière version publiée, il faut vous rendre sur la page de téléchargement du [site](https://zwiicms.fr/telechargement)
To download the latest released version, go to :
* [the Updates page](https://forge.chapril.org/ZwiiCMS-Team/ZwiiCMS/releases)
* or at [the site download page](https://zwiicms.fr/download)
La version github est une **version de développement** qui peut encore contenir des bugs mais elle vous permet de tester les dernières nouveautés. Cette version n'est pas recommandée en production.
## Installation
Unzip the Zwii archive and upload its contents to the root of your server or to a subdirectory. That's all!
Décompressez l'archive de Zwii et téléversez son contenu à la racine de votre serveur ou dans un sous-répertoire. C'est tout !
You will find more explanations, in particular for an installation at Free, in the "Downloads" section of the forum.
Vous trouverez de plus amples explications, en particulier pour une installation chez Free, dans la rubrique "Téléchargements" du forum.
## Update procedures
When installing a major version, it is recommended to make a backup copy.
## Procédures de mise à jour
### Automatic
### Automatique
* Connect to your site.
* If an update is available, it is proposed in the administration bar.
* Click on the "Update" button.
* Connectez-vous à votre site.
* Si une mise à jour est disponible, elle vous est proposée dans la barre d'administration.
* Cliquez sur le bouton "Mettre à jour".
### Manual
### Manuelle
* Save your entire site, especially the "site" directory.
* Unzip the new version on your computer.
* Transfer its content to your server by activating the file replacement.
* Sauvegardez l'intégralité de votre site, spécialement le répertoire "site".
* Décompressez la nouvelle version sur votre ordinateur.
* Transférez son contenu sur votre serveur en activant le remplacement des fichiers.
## General tree structure
En cas de difficulté avec la nouvelle version, il suffira de téléverser la sauvegarde pour remettre votre site dans son état initial.
*Legend: [D] Directory - [FILE] File
**Remarques :**
````
text
[DIR] core Core of the system
[DIR] class Classes
[DIR] layout Layout
[DIR] module Core modules
[DIR] vendor External libraries
[FILE] core.js.php Javascript core
[FILE] core.php PHP core
* La mise à jour manuelle désactive la réécriture d'URL. À vous de la réactiver depuis la page de configuration du site.
* La mise à niveau de la version 8 vers la version 9 crée deux fichiers de données distincts ("core.json" et "theme.json") à partir du fichier "data.json" de la version 8, puis le renomme "data_imported.json".
[DIR] module Page modules
[DIR] blog Blog
[DIR] form Form manager
[DIR] gallery Gallery
[DIR] news News
[DIR] redirection Redirection
Pour revenir à la version 8, renommez ce fichier "data.json".
[DIR] site Site content
[DIR] backup Automatic backups
[DIR] i18N Zwii Interface languages
[DIR] data Data directory
[DIR] en Localized folder
[FILE] page.json Page data
[FILE] module.json Page module data
[FILE] local.json Language-specific site data
[FILE] .default Unique file of default site language
[DIR] content Folder of page contents
[FILE] home.html Sample home page content
[DIR] fonts Folder containing the installed fonts
[FILE] fonts.html File containing the fonts calls to load on cdnFonts
[FILE] fonts.css File containing the style sheet linked to the local fonts
[FILE] fonts.woff Local font files (woff, etc..)
[DIR] modules Customization of modules or own data
[FILE] admin.css Theme of administration pages
[FILE] admin.json Theme data for administration pages
[FILE] blacklist.json Logging of login attempts with unknown accounts
[FILE] config.json Site configuration
[FILE] core.json Core configuration
[FILE] custom.css Advanced customization stylesheet
[FILE] font.json Custom font descriptor
[FILE] journal.log Activities logging
[FILE] language.json Interface languages database
[FILE] profil.json Users profiles database
[FILE] theme.css Site theme
[FILE] theme.json Site database
[FILE] user.json User database
[FILE] .backup Marker for file backup if present
[DIR] file File manager upload directory
[DIR] source Various resources
[DIR] thumb Image thumbnails
[DIR] tmp Temporary directory
## Arborescence générale
[FILE] index.php ZwiiCMS initialization file
[FILE] robots.txt Filtering of directories accessible to search engine robots
[FILE] sitemap.xml Sitemap
[FILE] sitemap.xml.gz Compressed version
*Légende : [R] Répertoire - [F] Fichier*
The .htaccess files contribute to security by filtering access to sensitive directories.
```text
[R] core Cœur du système
[R] class Classes
[R] layout Mise en page
[R] module Modules du cœur
[R] vendor Librairies extérieures
[F] core.js.php Cœur javascript
[F] core.php Cœur PHP
[R] module Modules de page
[R] blog Blog
[R] form Gestionnaire de formulaires
[R] gallery Galerie
[R] news Nouvelles
[R] redirection Redirection
[R] site Contenu du site
[R] backup Sauvegardes automatiques
[R] data Répertoire des données
[R] fr Dossier localisé
[F] page.json Données des pages
[F] module.json Données des modules de pages
[F] local.json Données du site propres à la langue
[R] content Dossier des contenus de page
[F] accueil.html Exemple contenu de la page d'accueil
[F] fonts Dossier contenant les fontes installées
[R] modules Personnalisation des modules ou données propres
[F] admin.css Thème des pages d'administration
[F] admin.json Données de thème des pages d'administration
[F] blacklist.json Journalisation des tentatives de connexion avec des comptes inconnus
[F] config.json Configuration du site
[F] core.json Configuration du noyau
[F] custom.css Feuille de style de la personnalisation avancée
[F] fonts.json Descripteur des fontes personnalisées
[F] journal.log Journalisation des actions
[F] theme.css Thème du site
[F] theme.json Données du site
[F] user.json Données des utilisateurs
[F] .backup Marqueur de la sauvegarde des fichiers si présent
[R] file Répertoire d'upload du gestionnaire de fichiers
[R] source Ressources diverses
[R] thumb Miniatures des images
[R] tmp Répertoire temporaire
[F] index.php Fichier d'initialisation de ZwiiCMS
[F] robots.txt Filtrage des répertoires accessibles aux robots des moteurs de recherche
[F] sitemap.xml Plan du site
[F] sitemap.xml.gz Version compressée
Le fichiers .htaccess contribuent à la sécurité en filtrant l'accès aux répertoires sensibles.
```

View File

@ -2,18 +2,15 @@
class autoload {
public static function autoloader () {
require_once 'core/core.php';
require_once 'core/class/router.class.php';
require_once 'core/class/helper.class.php';
require_once 'core/class/template.class.php';
require_once 'core/class/layout.class.php';
require_once 'core/class/sitemap/Runtime.class.php';
require_once 'core/class/sitemap/FileSystem.class.php';
require_once 'core/class/sitemap/SitemapGenerator.class.php';
require_once 'core/class/phpmailer/PHPMailer.class.php';
require_once 'core/class/phpmailer/Exception.class.php';
require_once 'core/class/phpmailer/SMTP.class.php';
require_once 'core/class/jsondb/Dot.class.php';
require_once 'core/class/jsondb/JsonDb.class.php';
require_once "core/class/jsondb/Dot.class.php";
require_once "core/class/jsondb/JsonDb.class.php";
}
}

View File

@ -1,7 +1,6 @@
<?php
class helper
{
class helper {
/** Statut de la réécriture d'URL (pour éviter de lire le contenu du fichier .htaccess à chaque self::baseUrl()) */
public static $rewriteStatus = null;
@ -20,91 +19,30 @@ class helper
const FILTER_URL = 11;
/**
* Traduire le message dans la langue déterminée
*/
public static function translate($text)
{
// La traduction existe déjà dans le core
/*
if (array_key_exists($text, core::$dialog) === false && !empty($text)) {
$dialogues = json_decode(file_get_contents('core/module/install/ressource/i18n/fr_FR.json' ), true);
$data = array_merge($dialogues,[$text => '']);
file_put_contents ('core/module/install/ressource/i18n/fr_FR.json', json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT), LOCK_EX);
}
*/
return (array_key_exists($text, core::$dialog) && !empty(core::$dialog[$text]) ? core::$dialog[$text] : $text);
}
/**
* Formate la date avec le script strftime en UTF8
* Date au format time()
* $format strftime
*/
public static function dateUTF8($format, $date, $locale = 'fr_FR')
{
require_once 'core/class/strftime/php-8.1-strftime.class.php';
return mb_convert_encoding(\PHP81_BC\strftime($format, $date, $locale), 'UTF-8', mb_list_encodings());
}
/**
* Fonction pour assurer la traduction des messages
*/
public static function googleTranslate($to, $text)
{
if (!file_exists('site/i18n/' . $to . '.json')) {
file_put_contents('site/i18n/' . $to . '.json', json_encode([]));
}
if (!empty($text)) {
//Lecture des données en ligne
$data = json_decode(file_get_contents('site/i18n/' . $to . '.json'), true);
// Mode traduction
if ($to !== 'fr_FR') {
$arrayjson = json_decode(file_get_contents('https://clients5.google.com/translate_a/t?client=dict-chrome-ex&sl=auto&tl=' . $to . '&q=' . rawurlencode($text)), true);
$response = $arrayjson[0][0];
// Captation
if ($data !== '') {
if (array_key_exists($text, $data)) {
$data[$text] = $response;
} else {
$data = array_merge($data, [$text => $response]);
}
}
// Mode alimentation des chaines
} else {
// Créer la variable
$data = array_merge($data, [$text => '']);
}
file_put_contents('site/i18n/' . $to . '.json', json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
}
}
/**
* Récupérer l'adresse IP sans tenir compte du proxy
* @param integer Niveau d'anonymat 0 aucun, 1 octet à droite, etc..
* @return string IP adress
* Cette fonction est utilisée par user
*/
*/
public static function getIp($anon = 4)
{
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
public static function getIp($anon = 4) {
if(!empty($_SERVER['HTTP_CLIENT_IP'])){
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else{
$ip=$_SERVER['REMOTE_ADDR'];
}
// Anonymiser l'adresse IP v4
$d = array_slice(explode('.', $ip), 0, $anon);
$d = implode('.', $d);
$d = implode ('.', $d);
$j = array_fill(0, 4 - $anon, 'x');
$k = implode('.', $j);
$k = implode ('.', $j);
$ip = count($j) == 0 ? $d : $d . '.' . $k;
return $ip;
}
@ -115,34 +53,29 @@ class helper
* @return mixed données récupérées
*/
public static function getUrlContents($url)
{
public static function getUrlContents ($url) {
// Ejecter free.fr
if (strpos(self::baseUrl(), 'free.fr') > 0) {
if (strpos(self::baseUrl(),'free.fr') > 0 ){
return false;
}
if (
function_exists('file_get_contents') &&
ini_get('allow_url_fopen')
) {
$url_get_contents_data = @file_get_contents($url); // Masque un warning éventuel
} elseif (function_exists('curl_version')) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$url_get_contents_data = curl_exec($ch);
curl_close($ch);
} elseif (
function_exists('fopen') &&
function_exists('stream_get_contents') &&
ini_get('allow_url_fopen')
) {
$handle = fopen($url, "r");
$url_get_contents_data = stream_get_contents($handle);
} else {
$url_get_contents_data = false;
}
if(function_exists('file_get_contents') &&
ini_get('allow_url_fopen') ){
$url_get_contents_data = @file_get_contents($url); // Masque un warning éventuel
}elseif(function_exists('curl_version')){
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$url_get_contents_data = curl_exec($ch);
curl_close($ch);
}elseif(function_exists('fopen') &&
function_exists('stream_get_contents') &&
ini_get('allow_url_fopen')){
$handle = fopen ($url, "r");
$url_get_contents_data = stream_get_contents($handle);
}else{
$url_get_contents_data = false;
}
return $url_get_contents_data;
}
@ -153,14 +86,13 @@ class helper
* @param string $sort Type de tri à appliquer au tableau (SORT_ASC, SORT_DESC, ou null)
* @return array
*/
public static function arraycolumn($array, $column, $sort = null)
{
public static function arrayCollumn($array, $column, $sort = null) {
$newArray = [];
if (empty($array) === false) {
$newArray = array_map(function ($element) use ($column) {
if(empty($array) === false) {
$newArray = array_map(function($element) use($column) {
return $element[$column];
}, $array);
switch ($sort) {
switch($sort) {
case 'SORT_ASC':
asort($newArray);
break;
@ -172,15 +104,6 @@ class helper
return $newArray;
}
/**
* Compatibilité avec les anciens modules
*/
public static function arrayCollumn($array, $column, $sort = null)
{
return (helper::arrayColumn($array, $column, $sort));
}
/**
* Génère un backup des données de site
@ -189,29 +112,28 @@ class helper
* @return string nom du fichier de sauvegarde
*/
public static function autoBackup($folder, $filter = ['backup', 'tmp'])
{
public static function autoBackup($folder, $filter = ['backup','tmp'] ) {
// Creation du ZIP
$baseName = str_replace('/', '', helper::baseUrl(false, false));
$baseName = str_replace('/','',helper::baseUrl(false,false));
$baseName = empty($baseName) ? 'ZwiiCMS' : $baseName;
$fileName = $baseName . '-backup-' . date('Y-m-d-H-i-s', time()) . '.zip';
$fileName = $baseName . '-backup-' . date('Y-m-d-H-i-s', time()) . '.zip';
$zip = new ZipArchive();
$zip->open($folder . $fileName, ZipArchive::CREATE | ZipArchive::OVERWRITE);
$directory = 'site/';
//$filter = array('backup','tmp','file');
$files = new RecursiveIteratorIterator(
$files = new RecursiveIteratorIterator(
new RecursiveCallbackFilterIterator(
new RecursiveDirectoryIterator(
$directory,
RecursiveDirectoryIterator::SKIP_DOTS
),
function ($fileInfo, $key, $iterator) use ($filter) {
return $fileInfo->isFile() || !in_array($fileInfo->getBaseName(), $filter);
}
new RecursiveDirectoryIterator(
$directory,
RecursiveDirectoryIterator::SKIP_DOTS
),
function ($fileInfo, $key, $iterator) use ($filter) {
return $fileInfo->isFile() || !in_array($fileInfo->getBaseName(), $filter);
}
)
);
foreach ($files as $name => $file) {
if (!$file->isDir()) {
);
foreach ($files as $name => $file) {
if (!$file->isDir()) {
$filePath = $file->getRealPath();
$relativePath = substr($filePath, strlen(realpath($directory)) + 1);
$zip->addFile($filePath, $relativePath);
@ -228,62 +150,61 @@ class helper
* du nom réel
* du numéro de version
*/
public static function getModules()
{
public static function getModules() {
$modules = array();
$dirs = array_diff(scandir('module'), array('..', '.'));
foreach ($dirs as $key => $value) {
// Dossier non vide
if (file_exists('module/' . $value . '/' . $value . '.php')) {
// Lire les constantes en gérant les erreurs de nom de classe
try {
try {
$class_reflex = new \ReflectionClass($value);
$class_constants = $class_reflex->getConstants();
// Constante REALNAME
if (array_key_exists('REALNAME', $class_constants)) {
$realName = $value::REALNAME;
$realName = $value::REALNAME;
} else {
$realName = ucfirst($value);
$realName = ucfirst($value);
}
// Constante VERSION
if (array_key_exists('VERSION', $class_constants)) {
$version = $value::VERSION;
$version = $value::VERSION;
} else {
$version = '0.0';
$version = '0.0';
}
// Constante UPDATE
if (array_key_exists('UPDATE', $class_constants)) {
$update = $value::UPDATE;
$update = $value::UPDATE;
} else {
$update = '0.0';
$update = '0.0';
}
// Constante DELETE
if (array_key_exists('DELETE', $class_constants)) {
$delete = $value::DELETE;
$delete = $value::DELETE;
} else {
$delete = true;
$delete = true;
}
// Constante DATADIRECTORY
if (array_key_exists('DATADIRECTORY', $class_constants)) {
$dataDirectory = $value::DATADIRECTORY;
if ( array_key_exists('DATADIRECTORY', $class_constants)) {
$dataDirectory = $value::DATADIRECTORY;
} else {
$dataDirectory = '';
$dataDirectory = '';
}
// Affection
$modules[$value] = [
'name' => $value,
'realName' => $realName,
'version' => $version,
'update' => $update,
'delete' => $delete,
'dataDirectory' => $dataDirectory
$modules [$value] = [
'realName' => $realName,
'version' => $version,
'update' => $update,
'delete' => $delete,
'dataDirectory' => $dataDirectory
];
} catch (Exception $e) {
} catch (Exception $e){
// on ne fait rien
}
}
}
return ($modules);
return($modules);
}
@ -292,11 +213,10 @@ class helper
* Retourne true si le protocole est en TLS
* @return bool
*/
public static function isHttps()
{
if (
(empty($_SERVER['HTTPS']) === false and $_SERVER['HTTPS'] !== 'off')
or $_SERVER['SERVER_PORT'] === 443
public static function isHttps() {
if(
(empty($_SERVER['HTTPS']) === false AND $_SERVER['HTTPS'] !== 'off')
OR $_SERVER['SERVER_PORT'] === 443
) {
return true;
} else {
@ -311,20 +231,20 @@ class helper
* @param bool $host Affiche ou non l'host
* @return string
*/
public static function baseUrl($queryString = true, $host = true)
{
public static function baseUrl($queryString = true, $host = true) {
// Protocole
$protocol = helper::isHttps() === true ? 'https://' : 'http://';
// Host
if ($host) {
if($host) {
$host = $protocol . $_SERVER['HTTP_HOST'];
}
// Pathinfo
$pathInfo = pathinfo($_SERVER['PHP_SELF']);
// Querystring
if ($queryString and helper::checkRewrite() === false) {
if($queryString AND helper::checkRewrite() === false) {
$queryString = '?';
} else {
}
else {
$queryString = '';
}
return $host . rtrim($pathInfo['dirname'], ' ' . DIRECTORY_SEPARATOR) . '/' . $queryString;
@ -334,17 +254,12 @@ class helper
* Check le statut de l'URL rewriting
* @return bool
*/
public static function checkRewrite()
{
// N'interroge que le serveur Apache
if (strpos($_SERVER["SERVER_SOFTWARE"], 'Apache') > 0) {
self::$rewriteStatus === false;
} elseif (self::$rewriteStatus === null) {
public static function checkRewrite() {
if(self::$rewriteStatus === null) {
// Ouvre et scinde le fichier .htaccess
$htaccess = explode('# URL rewriting', file_get_contents('.htaccess'));
// Retourne un boolean en fonction du contenu de la partie réservée à l'URL rewriting
//self::$rewriteStatus = (empty($htaccess[1]) === false);
self::$rewriteStatus = (strpos($htaccess[1], 'RewriteEngine on') > 0) ? true : false;
self::$rewriteStatus = (empty($htaccess[1]) === false);
}
return self::$rewriteStatus;
}
@ -353,9 +268,8 @@ class helper
* Renvoie le numéro de version de Zwii est en ligne
* @return string
*/
public static function getOnlineVersion($channel)
{
return (helper::getUrlContents(common::ZWII_UPDATE_URL . $channel . '/version'));
public static function getOnlineVersion() {
return (helper::getUrlContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version'));
}
@ -363,14 +277,14 @@ class helper
* Check si une nouvelle version de Zwii est disponible
* @return bool
*/
public static function checkNewVersion($channel)
{
$version = helper::getOnlineVersion($channel);
$update = false;
if (!empty($version)) {
$update = version_compare(common::ZWII_VERSION, $version) == -1;
public static function checkNewVersion() {
if($version = helper::getOnlineVersion()) {
return ((version_compare(common::ZWII_VERSION, $version)) === -1);
}
else {
return false;
}
return $update;
}
@ -379,8 +293,7 @@ class helper
* @param string $rgba Code rgba de la couleur
* @return array
*/
public static function colorVariants($rgba)
{
public static function colorVariants($rgba) {
preg_match('#\(+(.*)\)+#', $rgba, $matches);
$rgba = explode(', ', $matches[1]);
return [
@ -388,12 +301,7 @@ class helper
'darken' => 'rgba(' . max(0, $rgba[0] - 15) . ',' . max(0, $rgba[1] - 15) . ',' . max(0, $rgba[2] - 15) . ',' . $rgba[3] . ')',
'veryDarken' => 'rgba(' . max(0, $rgba[0] - 20) . ',' . max(0, $rgba[1] - 20) . ',' . max(0, $rgba[2] - 20) . ',' . $rgba[3] . ')',
'text' => self::relativeLuminanceW3C($rgba) > .22 ? "#222" : "#DDD",
'rgb' => 'rgb(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ')',
'invert' => 'rgba (' .
($rgba[0] < 128 ? 255 : 0) . ',' .
($rgba[1] < 128 ? 255 : 0) . ',' .
($rgba[1] < 128 ? 255 : 0) . ',' .
($rgba[0] < 128 ? 255 : 0) . ')'
'rgb' => 'rgb(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ')'
];
}
@ -401,8 +309,7 @@ class helper
* Supprime un cookie
* @param string $cookieKey Clé du cookie à supprimer
*/
public static function deleteCookie($cookieKey)
{
public static function deleteCookie($cookieKey) {
unset($_COOKIE[$cookieKey]);
setcookie($cookieKey, '', time() - 3600, helper::baseUrl(false, false), '', false, true);
}
@ -413,10 +320,9 @@ class helper
* @param int $filter Type de filtre à appliquer
* @return string
*/
public static function filter($text, $filter)
{
$text = is_null($text) ? $text : trim($text);
switch ($filter) {
public static function filter($text, $filter) {
$text = trim($text);
switch($filter) {
case self::FILTER_BOOLEAN:
$text = (bool) $text;
break;
@ -432,24 +338,22 @@ class helper
break;
case self::FILTER_ID:
$text = mb_strtolower($text, 'UTF-8');
$text = strip_tags(
str_replace(
explode(',', 'á,à,â,ä,ã,å,ç,é,è,ê,ë,í,ì,î,ï,ñ,ó,ò,ô,ö,õ,ú,ù,û,ü,ý,ÿ,\',", '),
explode(',', 'a,a,a,a,a,a,c,e,e,e,e,i,i,i,i,n,o,o,o,o,o,u,u,u,u,y,y,-,-,-'),
$text
)
);
$text = strip_tags(str_replace(
explode(',', 'á,à,â,ä,ã,å,ç,é,è,ê,ë,í,ì,î,ï,ñ,ó,ò,ô,ö,õ,ú,ù,û,ü,ý,ÿ,\',", '),
explode(',', 'a,a,a,a,a,a,c,e,e,e,e,i,i,i,i,n,o,o,o,o,o,u,u,u,u,y,y,-,-,-'),
$text
));
$text = preg_replace('/([^a-z0-9-])/', '', $text);
// Supprime les emoji
$text = preg_replace('/[[:^print:]]/', '', $text);
// Supprime les tirets en fin de chaine (emoji en fin de nom)
$text = rtrim($text, '-');
$text = rtrim($text,'-');
// Cas où un identifiant est vide
if (empty($text)) {
$text = uniqid('');
}
// Un ID ne peut pas être un entier, pour éviter les conflits avec le système de pagination
if (intval($text) !== 0) {
if(intval($text) !== 0) {
$text = '_' . $text;
}
break;
@ -463,10 +367,10 @@ class helper
$text = password_hash($text, PASSWORD_BCRYPT);
break;
case self::FILTER_STRING_LONG:
$text = mb_substr(filter_var($text, FILTER_SANITIZE_FULL_SPECIAL_CHARS), 0, 500000);
$text = mb_substr(filter_var($text, FILTER_SANITIZE_STRING), 0, 500000);
break;
case self::FILTER_STRING_SHORT:
$text = mb_substr(filter_var($text, FILTER_SANITIZE_FULL_SPECIAL_CHARS), 0, 500);
$text = mb_substr(filter_var($text, FILTER_SANITIZE_STRING), 0, 500);
break;
case self::FILTER_TIMESTAMP:
$text = date('Y-m-d H:i:s', $text);
@ -484,18 +388,17 @@ class helper
* @param array $array Tableau à vérifier
* @return string
*/
public static function increment($key, $array = [])
{
public static function increment($key, $array = []) {
// Pas besoin d'incrémenter si la clef n'existe pas
if ($array === []) {
if($array === []) {
return $key;
}
// Incrémente la clef
else {
// Si la clef est numérique elle est incrémentée
if (is_numeric($key)) {
if(is_numeric($key)) {
$newKey = $key;
while (array_key_exists($newKey, $array) or in_array($newKey, $array)) {
while(array_key_exists($newKey, $array) OR in_array($newKey, $array)) {
$newKey++;
}
}
@ -503,7 +406,7 @@ class helper
else {
$i = 2;
$newKey = $key;
while (array_key_exists($newKey, $array) or in_array($newKey, $array)) {
while(array_key_exists($newKey, $array) OR in_array($newKey, $array)) {
$newKey = $key . '-' . $i;
$i++;
}
@ -517,19 +420,14 @@ class helper
* @param string $css Css à minimiser
* @return string
*/
public static function minifyCss($css)
{
public static function minifyCss($css) {
// Supprime les commentaires
$css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css);
// Supprime les tabulations, espaces, nouvelles lignes, etc...
$css = str_replace(["\r\n", "\r", "\n", "\t", ' ', ' ', ' '], '', $css);
$css = str_replace(["\r\n", "\r", "\n" ,"\t", ' ', ' ', ' '], '', $css);
$css = preg_replace(['(( )+{)', '({( )+)'], '{', $css);
$css = preg_replace(['(( )+})', '(}( )+)', '(;( )*})'], '}', $css);
$css = preg_replace(['(;( )+)', '(( )+;)'], ';', $css);
// Convertir les codes entités
$css = htmlspecialchars_decode($css);
// Supprime les balises HTML
$css = strip_tags($css);
// Retourne le css minifié
return $css;
}
@ -539,8 +437,7 @@ class helper
* @param string $js Js à minimiser
* @return string
*/
public static function minifyJs($js)
{
public static function minifyJs($js) {
// Supprime les commentaires
$js = preg_replace('/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/|\s*(?<![\:\=])\/\/.*/', '', $js);
// Supprime les tabulations, espaces, nouvelles lignes, etc...
@ -558,8 +455,7 @@ class helper
* @param null|int $sufix Suffixe de l'url
* @return array
*/
public static function pagination($array, $url, $item, $suffix = null)
{
public static function pagination($array, $url, $item, $sufix = null) {
// Scinde l'url
$url = explode('/', $url);
// Url de pagination
@ -579,10 +475,10 @@ class helper
$lastElement = ($lastElement > $nbElements) ? $nbElements : $lastElement;
// Mise en forme de la liste des pages
$pages = '';
if ($nbPage > 1) {
for ($i = 1; $i <= $nbPage; $i++) {
if($nbPage > 1) {
for($i = 1; $i <= $nbPage; $i++) {
$disabled = ($i === $currentPage) ? ' class="disabled"' : false;
$pages .= '<a href="' . helper::baseUrl() . $urlCurrent . '/' . $i . $suffix . '"' . $disabled . '>' . $i . '</a>';
$pages .= '<a href="' . helper::baseUrl() . $urlCurrent . '/' . $i . $sufix . '"' . $disabled . '>' . $i . '</a>';
}
$pages = '<div class="pagination">' . $pages . '</div>';
}
@ -597,8 +493,7 @@ class helper
/**
* Calcul de la luminance relative d'une couleur
*/
public static function relativeLuminanceW3C($rgba)
{
public static function relativeLuminanceW3C($rgba) {
// Conversion en sRGB
$RsRGB = $rgba[0] / 255;
$GsRGB = $rgba[1] / 255;
@ -620,8 +515,7 @@ class helper
* @param array $exclude Clés à ignorer ($key)
* @return string
*/
public static function sprintAttributes(array $array = [], array $exclude = [])
{
public static function sprintAttributes(array $array = [], array $exclude = []) {
$exclude = array_merge(
[
'before',
@ -632,15 +526,15 @@ class helper
$exclude
);
$attributes = [];
foreach ($array as $key => $value) {
if (($value or $value === 0) and in_array($key, $exclude) === false) {
foreach($array as $key => $value) {
if(($value OR $value === 0) AND in_array($key, $exclude) === false) {
// Désactive le message de modifications non enregistrées pour le champ
if ($key === 'noDirty') {
if($key === 'noDirty') {
$attributes[] = 'data-no-dirty';
}
// Disabled
// Readonly
elseif (in_array($key, ['disabled', 'readonly'])) {
elseif(in_array($key, ['disabled', 'readonly'])) {
$attributes[] = sprintf('%s', $key);
}
// Autres
@ -659,10 +553,9 @@ class helper
* @param int $length (voir substr de PHP pour fonctionnement)
* @return string
*/
public static function subword($text, $start, $length)
{
public static function subword($text, $start, $length) {
$text = trim($text);
if (strlen($text) > $length) {
if(strlen($text) > $length) {
$text = mb_substr($text, $start, $length);
$text = mb_substr($text, 0, min(mb_strlen($text), mb_strrpos($text, ' ')));
}
@ -672,25 +565,24 @@ class helper
/**
* Cryptage
* @param string $key la clé d'encryptage
* @param string $string la chaine à coder
* @param string $payload la chaine à coder
* @return string
*/
public static function encrypt($string, $key)
{
$encrypted = openssl_encrypt($string, "AES-256-CBC", $key, 0, substr(md5($key), 0, 16));
return base64_encode($encrypted);
public static function encrypt($key, $payload) {
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));
$encrypted = openssl_encrypt($payload, 'aes-256-cbc', $key, 0, $iv);
return base64_encode($encrypted . '::' . $iv);
}
/**
* Décryptage
* @param string $key la clé d'encryptage
* @param string $string la chaine à décoder
* @param string $garble la chaine à décoder
* @return string
*/
public static function decrypt($string, $key)
{
$decrypted = openssl_decrypt(base64_decode($string), "AES-256-CBC", $key, 0, substr(md5($key), 0, 16));
return $decrypted;
public static function decrypt($key, $garble) {
list($encrypted_data, $iv) = explode('::', base64_decode($garble), 2);
return openssl_decrypt($encrypted_data, 'aes-256-cbc', $key, 0, $iv);
}
}
}

View File

@ -10,7 +10,7 @@ use ArrayAccess;
* This class provides dot notation access to arrays, so it's easy to handle
* multidimensional data in a clean way.
*/
class Dot implements \ArrayAccess, \Iterator, \Countable
class Dot implements ArrayAccess
{
/** @var array Data */
@ -94,14 +94,9 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
*/
public static function addValue(&$array, $key, $value = null, $pop = false)
{
if (is_array($key)) {
// Iterate array of paths and values
foreach ($key as $k => $v) {
self::addValue($array, $k, $v);
}
} else {
if (is_string($key)) {
// Iterate path
$keys = explode('.', (string)$key);
$keys = explode('.', $key);
if ($pop === true) {
array_pop($keys);
}
@ -113,6 +108,11 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
}
// Add value to path
$array[] = $value;
} elseif (is_array($key)) {
// Iterate array of paths and values
foreach ($key as $k => $v) {
self::addValue($array, $k, $v);
}
}
}
@ -141,7 +141,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
} elseif (is_array($key)) {
// Iterate array of paths
foreach ($key as $k) {
self::deleteValue($array, $k);
self::delete($k);
}
}
}
@ -154,14 +154,9 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
* @param mixed|null $default Default value
* @return mixed Value of path
*/
public function get($key, $default = null, $asObject = false)
public function get($key = null, $default = null)
{
$value = self::getValue($this->data, $key, $default);
if ($asObject && is_array($value)) {
return new self($value);
}
return $value;
return self::getValue($this->data, $key, $default);
}
/**
@ -169,12 +164,10 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
*
* @param mixed $key Path or array of paths and values
* @param mixed|null $value Value to set if path is not an array
* @return $this
*/
public function set($key, $value = null)
{
self::setValue($this->data, $key, $value);
return $this;
return self::setValue($this->data, $key, $value);
}
/**
@ -183,12 +176,10 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
* @param mixed $key Path or array of paths and values
* @param mixed|null $value Value to set if path is not an array
* @param boolean $pop Helper to pop out last key if value is an array
* @return $this
*/
public function add($key, $value = null, $pop = false)
{
self::addValue($this->data, $key, $value);
return $this;
return self::addValue($this->data, $key, $value, $pop);
}
/**
@ -215,42 +206,10 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
* Delete path or array of paths
*
* @param mixed $key Path or array of paths to delete
* @return $this
*/
public function delete($key)
{
self::deleteValue($this->data, $key);
return $this;
}
/**
* Increase numeric value
*
* @param string $key
* @param float $number
* @return float
*/
public function plus(string $key, float $number): float
{
$newAmount = $this->get($key, 0) + $number;
$this->set($key, $newAmount);
return $newAmount;
}
/**
* Reduce numeric value
*
* @param string $key
* @param float $number
* @return float
*/
public function minus(string $key, float $number): float
{
$newAmount = $this->get($key, 0) - $number;
$this->set($key, $newAmount);
return $newAmount;
return self::deleteValue($this->data, $key);
}
/**
@ -310,33 +269,24 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
}
/**
* @inheritDoc
* ArrayAccess abstract methods
*/
public function offsetSet($offset, $value): void
public function offsetSet($offset, $value)
{
$this->set($offset, $value);
}
/**
* @inheritDoc
*/
public function offsetExists($offset): bool
public function offsetExists($offset)
{
return $this->has($offset);
}
/**
* @inheritDoc
*/
public function offsetGet($offset): mixed
public function offsetGet($offset)
{
return $this->get($offset);
}
/**
* @inheritDoc
*/
public function offsetUnset($offset): void
public function offsetUnset($offset)
{
$this->delete($offset);
}
@ -363,115 +313,4 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
{
$this->delete($key);
}
/**
* Check for emptiness
*
* @return bool
*/
public function isEmpty(): bool
{
return !(bool)count($this->data);
}
/**
* Return all data as array
*
* @return array
*/
public function toArray(): array
{
return $this->data;
}
/**
* Return as json string
*
* @return false|string
*/
public function toJson()
{
return json_encode($this->data, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT);
}
/**
* @return string
*/
public function __toString(): string
{
return $this->toJson();
}
/**
* @return array
*/
public function __toArray(): array
{
return $this->toArray();
}
/**
* Return the current element
* @link https://php.net/manual/en/iterator.current.php
* @return mixed Can return any type.
* @since 5.0.0
*/
public function current(): mixed
{
return current($this->data);
}
/**
* Move forward to next element
* @link https://php.net/manual/en/iterator.next.php
* @return void Any returned value is ignored.
* @since 5.0.0
*/
public function next(): void
{
next($this->data);
}
/**
* Return the key of the current element
* @link https://php.net/manual/en/iterator.key.php
* @return mixed scalar on success, or null on failure.
* @since 5.0.0
*/
public function key(): mixed
{
return key($this->data);
}
/**
* Checks if current position is valid
* @link https://php.net/manual/en/iterator.valid.php
* @return bool The return value will be casted to boolean and then evaluated.
* Returns true on success or false on failure.
* @since 5.0.0
*/
public function valid(): bool
{
$key = key($this->data);
return ($key !== NULL && $key !== FALSE);
}
/**
* Rewind the Iterator to the first element
* @link https://php.net/manual/en/iterator.rewind.php
* @return void Any returned value is ignored.
* @since 5.0.0
*/
public function rewind(): void
{
reset($this->data);
}
/**
* @inheritDoc
*/
public function count(): int
{
return count($this->data);
}
}
}

View File

@ -18,12 +18,6 @@ class JsonDb extends \Prowebcraft\Dot
protected $db = '';
protected $data = null;
protected $config = [];
// Tentative d'encodage après échec
const MAX_JSON_ENCODE_ATTEMPTS = 5;
// Tentative d'écriture après échec
const MAX_FILE_WRITE_ATTEMPTS = 5;
// Délais entre deux tentaives
const RETRY_DELAY_SECONDS = 1;
public function __construct($config = [])
{
@ -31,35 +25,24 @@ class JsonDb extends \Prowebcraft\Dot
'name' => 'data.json',
'backup' => false,
'dir' => getcwd()
//'template' => getcwd() . DIRECTORY_SEPARATOR . 'data.template.json'
], $config);
$this->loadData();
parent::__construct();
}
/**
* Reload data from file
* @return $this
*/
public function reload()
{
$this->loadData(true);
return $this;
}
/**
* Set value or array of values to path
*
* @param mixed $key Path or array of paths and values
* @param mixed|null $value Value to set if path is not an array
* @param bool $save Save data to database
* @param bool $save Save data to database
* @return $this
*/
public function set($key, $value = null, $save = true)
{
parent::set($key, $value);
if ($save)
$this->save();
if ($save) $this->save();
return $this;
}
@ -75,8 +58,7 @@ class JsonDb extends \Prowebcraft\Dot
public function add($key, $value = null, $pop = false, $save = true)
{
parent::add($key, $value, $pop);
if ($save)
$this->save();
if ($save) $this->save();
return $this;
}
@ -85,13 +67,12 @@ class JsonDb extends \Prowebcraft\Dot
*
* @param mixed $key Path or array of paths to delete
* @param bool $save Save data to database
* @return $thisurn $this
* @return $this
*/
public function delete($key, $save = true)
{
parent::delete($key);
if ($save)
$this->save();
if ($save) $this->save();
return $this;
}
@ -107,8 +88,7 @@ class JsonDb extends \Prowebcraft\Dot
public function clear($key = null, $format = false, $save = true)
{
parent::clear($key, $format);
if ($save)
$this->save();
if ($save) $this->save();
return $this;
}
@ -118,70 +98,58 @@ class JsonDb extends \Prowebcraft\Dot
* @param bool $reload Reboot data?
* @return array|mixed|null
*/
protected function loadData($reload = false)
{
protected function loadData($reload = false) {
if ($this->data === null || $reload) {
// $this->db = $this->config['dir'] . DIRECTORY_SEPARATOR . $this->config['name'];
$this->db = $this->config['dir'] . $this->config['name'];
if (!file_exists($this->db)) {
return null; // Rebuild database manage by CMS
return null;
} else {
if ($this->config['backup']) {
try {
copy($this->config['dir'] . DIRECTORY_SEPARATOR . $this->config['name'], $this->config['dir'] . DIRECTORY_SEPARATOR . $this->config['name'] . '.backup');
} catch (\Exception $e) {
error_log('Erreur de chargement : ' . $e);
exit('Erreur de chargement : ' . $e);
// 3 essais
for($i = 0; $i <3; $i++) {
if ($this->data = json_decode(@file_get_contents($this->db), true) ) {
break;
}
// Pause de 10 millisecondes
usleep(10000);
}
// Gestion de l'erreur
if (!$this->data === null) {
exit ('JsonDB : Erreur de lecture du fichier de données ' . $this->db .'. Aucune donnée lisible, essayez dans quelques instants ou vérifiez le système de fichiers.');
}
}
$this->data = json_decode(file_get_contents($this->db), true);
if (!$this->data === null) {
throw new \InvalidArgumentException('Database file ' . $this->db
. ' contains invalid json object. Please validate or remove file');
}
}
return $this->data;
}
/**
* Save database
* Saving to local database
*/
public function save()
{
// Encode les données au format JSON avec les options spécifiées
$encoded_data = json_encode($this->data, JSON_UNESCAPED_UNICODE | JSON_FORCE_OBJECT | JSON_PRETTY_PRINT);
// Vérifie la longueur de la chaîne JSON encodée
$encoded_length = strlen($encoded_data);
// Initialise le compteur de tentatives
$attempt = 0;
// Tente d'encoder les données en JSON et de les sauvegarder jusqu'à 5 fois en cas d'échec
while ($attempt < 5) {
// Essaye d'écrire les données encodées dans le fichier de base de données
$write_result = file_put_contents($this->db, $encoded_data, LOCK_EX); // Les utilisateurs multiples obtiennent un verrou
// Vérifie si l'écriture a réussi
if ($write_result === $encoded_length) {
// Sort de la boucle si l'écriture a réussi
break;
}
// Incrémente le compteur de tentatives
$attempt++;
// Attente
sleep(1);
public function save() {
// Fichier inexistant, le créer
if ( !file_exists($this->db) ) {
touch($this->db);
}
// Backup file
if ($this->config['backup'] === true) {
copy ($this->db, str_replace('json' , 'backup.json', $this->db));
}
if ( is_writable($this->db) ) {
// 3 essais
for($i = 0; $i < 3; $i++) {
if( @file_put_contents($this->db, json_encode($this->data, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT|LOCK_EX)) !== false) {
break;
}
// Pause de 10 millisecondes
usleep(10000);
// Vérifie si l'écriture a échoué même après plusieurs tentatives
if ($write_result !== $encoded_length) {
// Enregistre un message d'erreur dans le journal des erreurs
error_log('Erreur d\'écriture, les données n\'ont pas été sauvegardées.');
// Affiche un message d'erreur et termine le script
exit('Erreur d\'écriture, les données n\'ont pas été sauvegardées.');
}
if ($i === 2) {
exit ('Jsondb : Erreur d\'écriture dans le fichier de données ' . $this->db . '. Vérifiez le système de fichiers.' );
}
} else {
exit ('Jsondb : Écriture interdite dans le fichier de données ' . $this->db .'. Vérifiez les permissions.' );
}
}
}
}

View File

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

View File

@ -1,269 +0,0 @@
# Dot - PHP dot notation array access
Based on [adbario/php-dot-notation](https://github.com/adbario/php-dot-notation) package
Easy access to multidimensional arrays with dot notation.
With dot notation, your code is cleaner and handling deeper arrays is super easy.
This class implements PHP's ArrayAccess class, so Dot object can also be used the same way as normal arrays with additional dot notation.
With Dot you can change this:
```php
echo $data['info']['home']['address'];
```
to this:
```php
echo $data->get('info.home.address');
```
or even this:
```php
echo $data['info.home.address'];
```
## Installation
Via composer:
```
composer require adbario/php-dot-notation
```
Or just copy the class file Dot.php and handle namespace yourself.
#### With [Composer](https://getcomposer.org/):
```
composer require adbario/php-dot-notation
```
#### Manual installation:
1. Download the latest release
2. Extract the files into your project
3. require_once '/path/to/php-dot-notation/src/Dot.php';
## Usage
This array will be used as a reference on this guide:
```php
$array = [
'user' => [
'firstname' => 'John',
'lastname' => 'Smith'
],
'info' => [
'kids' => [
0 => 'Laura',
1 => 'Chris',
2 => 'Little Johnny'
],
'home' => [
'address' => 'Rocky Road 3'
]
]
];
```
### Create a Dot object
To start with an empty array, just create a new Dot object:
```php
$data = new \Adbar\Dot;
```
If you have an array already available, inject it to the Dot object:
```php
$data = new \Adbar\Dot($array);
```
Set an array after creating the Dot object:
```php
$data->setArray($array);
```
Set an array as a reference, and all changes will be made directly to the original array:
```php
$data->setReference($array);
```
### Set a value
Set i.e. a phone number in the 'home' array:
```php
$data->set('info.home.tel', '09-123-456-789');
// Array style
$data['info.home.tel'] = '09-123-456-789';
```
Set multiple values at once:
```php
$data->set([
'user.haircolor' => 'blue',
'info.home.address' => 'Private Lane 1'
]);
```
If the value already exists, Dot will override it with a new value.
### Get a value
```php
echo $data->get('info.home.address');
// Default value if the path doesn't exist
echo $data->get('info.home.country', 'some default value');
// Array style
echo $data['info.home.address'];
```
Get all the stored values:
```php
$values = $data->all();
``
Get a value from a path and remove it:
```php
$address = $data->pull('home.address');
```
Get all the stored values and remove them:
```php
$values = $data->pull();
```
### Add a value
```php
$data->add('info.kids', 'Amy');
```
Multiple values at once:
```php
$data->add('info.kids', [
'Ben', 'Claire'
]);
```
### Check if a value exists
```php
if ($data->has('info.home.address')) {
// Do something...
}
// Array style
if (isset($data['info.home.address'])) {
// Do something...
}
```
### Delete a value
```php
$data->delete('info.home.address');
// Array style
unset($data['info.home.address']);
```
Multiple values at once:
```php
$data->delete([
'user.lastname', 'info.home.address'
]);
```
### Clear values
Delete all the values from a path:
```php
$data->clear('info.home');
```
Clear multiple paths at once:
```php
$data->clear([
'user', 'info.home'
]);
```
Clear all data:
```php
$data->clear();
```
### Sort the values
You can sort the values of a given path or all the stored values.
Sort the values of a path:
```php
$kids = $data->sort('info.kids');
// Sort recursively
$info = $data->sort('info');
```
Sort all the values
```php
$sorted = $data->sort();
// Sort recursively
$sorted = $data->sort();
```
### Magic methods
Magic methods can be used to handle single level data (without dot notation). These examples are not using the same data array as examples above.
Set a value:
```php
$data->name = 'John';
```
Get a value:
```php
echo $data->name;
```
Check if a value exists:
```php
if (isset($data->name)) {
// Do something...
}
```
Delete a value:
```php
unset($data->name);
```
## License
[MIT license](LICENSE.md)

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,4 @@
<?php
/**
* PHPMailer Exception class.
* PHP Version 5.5.
@ -10,7 +9,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2012 - 2017 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
@ -35,6 +34,6 @@ class Exception extends \Exception
*/
public function errorMessage()
{
return '<strong>' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . "</strong><br />\n";
return '<strong>' . htmlspecialchars($this->getMessage()) . "</strong><br />\n";
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,4 @@
<?php
/**
* PHPMailer RFC821 SMTP email transport class.
* PHP Version 5.5.
@ -10,7 +9,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2012 - 2019 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
@ -35,7 +34,7 @@ class SMTP
*
* @var string
*/
const VERSION = '6.7.1';
const VERSION = '6.1.5';
/**
* SMTP line break constant.
@ -186,8 +185,6 @@ class SMTP
'Amazon_SES' => '/[\d]{3} Ok (.*)/',
'SendGrid' => '/[\d]{3} Ok: queued as (.*)/',
'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/',
'Haraka' => '/[\d]{3} Message Queued \((.*)\)/',
'Mailjet' => '/[\d]{3} OK queued as (.*)/',
];
/**
@ -314,11 +311,17 @@ class SMTP
*/
public function connect($host, $port = null, $timeout = 30, $options = [])
{
//Clear errors to avoid confusion
static $streamok;
//This is enabled by default since 5.0.0 but some providers disable it
//Check this once and cache the result
if (null === $streamok) {
$streamok = function_exists('stream_socket_client');
}
// Clear errors to avoid confusion
$this->setError('');
//Make sure we are __not__ connected
// Make sure we are __not__ connected
if ($this->connected()) {
//Already connected, generate error
// Already connected, generate error
$this->setError('Already connected to a server');
return false;
@ -326,66 +329,18 @@ class SMTP
if (empty($port)) {
$port = self::DEFAULT_PORT;
}
//Connect to the SMTP server
// Connect to the SMTP server
$this->edebug(
"Connection: opening to $host:$port, timeout=$timeout, options=" .
(count($options) > 0 ? var_export($options, true) : 'array()'),
self::DEBUG_CONNECTION
);
$this->smtp_conn = $this->getSMTPConnection($host, $port, $timeout, $options);
if ($this->smtp_conn === false) {
//Error info already set inside `getSMTPConnection()`
return false;
}
$this->edebug('Connection: opened', self::DEBUG_CONNECTION);
//Get any announcement
$this->last_reply = $this->get_lines();
$this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);
$responseCode = (int)substr($this->last_reply, 0, 3);
if ($responseCode === 220) {
return true;
}
//Anything other than a 220 response means something went wrong
//RFC 5321 says the server will wait for us to send a QUIT in response to a 554 error
//https://tools.ietf.org/html/rfc5321#section-3.1
if ($responseCode === 554) {
$this->quit();
}
//This will handle 421 responses which may not wait for a QUIT (e.g. if the server is being shut down)
$this->edebug('Connection: closing due to error', self::DEBUG_CONNECTION);
$this->close();
return false;
}
/**
* Create connection to the SMTP server.
*
* @param string $host SMTP server IP or host name
* @param int $port The port number to connect to
* @param int $timeout How long to wait for the connection to open
* @param array $options An array of options for stream_context_create()
*
* @return false|resource
*/
protected function getSMTPConnection($host, $port = null, $timeout = 30, $options = [])
{
static $streamok;
//This is enabled by default since 5.0.0 but some providers disable it
//Check this once and cache the result
if (null === $streamok) {
$streamok = function_exists('stream_socket_client');
}
$errno = 0;
$errstr = '';
if ($streamok) {
$socket_context = stream_context_create($options);
set_error_handler([$this, 'errorHandler']);
$connection = stream_socket_client(
$this->smtp_conn = stream_socket_client(
$host . ':' . $port,
$errno,
$errstr,
@ -393,6 +348,7 @@ class SMTP
STREAM_CLIENT_CONNECT,
$socket_context
);
restore_error_handler();
} else {
//Fall back to fsockopen which should work in more places, but is missing some features
$this->edebug(
@ -400,18 +356,17 @@ class SMTP
self::DEBUG_CONNECTION
);
set_error_handler([$this, 'errorHandler']);
$connection = fsockopen(
$this->smtp_conn = fsockopen(
$host,
$port,
$errno,
$errstr,
$timeout
);
restore_error_handler();
}
restore_error_handler();
//Verify we connected properly
if (!is_resource($connection)) {
// Verify we connected properly
if (!is_resource($this->smtp_conn)) {
$this->setError(
'Failed to connect to server',
'',
@ -426,19 +381,22 @@ class SMTP
return false;
}
//SMTP server can take longer to respond, give longer timeout for first read
//Windows does not have support for this timeout function
$this->edebug('Connection: opened', self::DEBUG_CONNECTION);
// SMTP server can take longer to respond, give longer timeout for first read
// Windows does not have support for this timeout function
if (strpos(PHP_OS, 'WIN') !== 0) {
$max = (int)ini_get('max_execution_time');
//Don't bother if unlimited, or if set_time_limit is disabled
if (0 !== $max && $timeout > $max && strpos(ini_get('disable_functions'), 'set_time_limit') === false) {
$max = (int) ini_get('max_execution_time');
// Don't bother if unlimited
if (0 !== $max && $timeout > $max) {
@set_time_limit($timeout);
}
stream_set_timeout($connection, $timeout, 0);
stream_set_timeout($this->smtp_conn, $timeout, 0);
}
// Get any announcement
$announce = $this->get_lines();
$this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER);
return $connection;
return true;
}
/**
@ -462,7 +420,7 @@ class SMTP
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
}
//Begin encrypted connection
// Begin encrypted connection
set_error_handler([$this, 'errorHandler']);
$crypto_ok = stream_socket_enable_crypto(
$this->smtp_conn,
@ -483,7 +441,7 @@ class SMTP
* @param string $username The user name
* @param string $password The password
* @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2)
* @param OAuthTokenProvider $OAuth An optional OAuthTokenProvider instance for XOAUTH2 authentication
* @param OAuth $OAuth An optional OAuth instance for XOAUTH2 authentication
*
* @return bool True if successfully authenticated
*/
@ -500,11 +458,11 @@ class SMTP
}
if (array_key_exists('EHLO', $this->server_caps)) {
//SMTP extensions are available; try to find a proper authentication method
// SMTP extensions are available; try to find a proper authentication method
if (!array_key_exists('AUTH', $this->server_caps)) {
$this->setError('Authentication is not allowed at this stage');
//'at this stage' means that auth may be allowed after the stage changes
//e.g. after STARTTLS
// 'at this stage' means that auth may be allowed after the stage changes
// e.g. after STARTTLS
return false;
}
@ -548,25 +506,22 @@ class SMTP
}
switch ($authtype) {
case 'PLAIN':
//Start authentication
// Start authentication
if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334)) {
return false;
}
//Send encoded username and password
if (
//Format from https://tools.ietf.org/html/rfc4616#section-2
//We skip the first field (it's forgery), so the string starts with a null byte
!$this->sendCommand(
'User & Password',
base64_encode("\0" . $username . "\0" . $password),
235
)
// Send encoded username and password
if (!$this->sendCommand(
'User & Password',
base64_encode("\0" . $username . "\0" . $password),
235
)
) {
return false;
}
break;
case 'LOGIN':
//Start authentication
// Start authentication
if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) {
return false;
}
@ -578,17 +533,17 @@ class SMTP
}
break;
case 'CRAM-MD5':
//Start authentication
// Start authentication
if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) {
return false;
}
//Get the challenge
// Get the challenge
$challenge = base64_decode(substr($this->last_reply, 4));
//Build the response
// Build the response
$response = $username . ' ' . $this->hmac($challenge, $password);
//send encoded credentials
// send encoded credentials
return $this->sendCommand('Username', base64_encode($response), 235);
case 'XOAUTH2':
//The OAuth instance must be set up prior to requesting auth.
@ -597,7 +552,7 @@ class SMTP
}
$oauth = $OAuth->getOauth64();
//Start authentication
// Start authentication
if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) {
return false;
}
@ -627,15 +582,15 @@ class SMTP
return hash_hmac('md5', $data, $key);
}
//The following borrowed from
//http://php.net/manual/en/function.mhash.php#27225
// The following borrowed from
// http://php.net/manual/en/function.mhash.php#27225
//RFC 2104 HMAC implementation for php.
//Creates an md5 HMAC.
//Eliminates the need to install mhash to compute a HMAC
//by Lance Rushing
// RFC 2104 HMAC implementation for php.
// Creates an md5 HMAC.
// Eliminates the need to install mhash to compute a HMAC
// by Lance Rushing
$bytelen = 64; //byte length for md5
$bytelen = 64; // byte length for md5
if (strlen($key) > $bytelen) {
$key = pack('H*', md5($key));
}
@ -658,7 +613,7 @@ class SMTP
if (is_resource($this->smtp_conn)) {
$sock_status = stream_get_meta_data($this->smtp_conn);
if ($sock_status['eof']) {
//The socket is valid but we are not connected
// The socket is valid but we are not connected
$this->edebug(
'SMTP NOTICE: EOF caught while checking if connected',
self::DEBUG_CLIENT
@ -668,7 +623,7 @@ class SMTP
return false;
}
return true; //everything looks good
return true; // everything looks good
}
return false;
@ -682,10 +637,11 @@ class SMTP
*/
public function close()
{
$this->setError('');
$this->server_caps = null;
$this->helo_rply = null;
if (is_resource($this->smtp_conn)) {
//Close the connection and cleanup
// close the connection and cleanup
fclose($this->smtp_conn);
$this->smtp_conn = null; //Makes for cleaner serialization
$this->edebug('Connection: closed', self::DEBUG_CONNECTION);
@ -695,7 +651,7 @@ class SMTP
/**
* Send an SMTP DATA command.
* Issues a data command and sends the msg_data to the server,
* finalizing the mail transaction. $msg_data is the message
* finializing the mail transaction. $msg_data is the message
* that is to be send with the headers. Each header needs to be
* on a single line followed by a <CRLF> with the message headers
* and the message body being separated by an additional <CRLF>.
@ -720,7 +676,7 @@ class SMTP
* NOTE: this does not count towards line-length limit.
*/
//Normalize line breaks before exploding
// Normalize line breaks before exploding
$lines = explode("\n", str_replace(["\r\n", "\r"], "\n", $msg_data));
/* To distinguish between a complete RFC822 message and a plain message body, we check if the first field
@ -766,8 +722,7 @@ class SMTP
//Send the lines to the server
foreach ($lines_out as $line_out) {
//Dot-stuffing as per RFC5321 section 4.5.2
//https://tools.ietf.org/html/rfc5321#section-4.5.2
//RFC2821 section 4.5.2
if (!empty($line_out) && $line_out[0] === '.') {
$line_out = '.' . $line_out;
}
@ -801,16 +756,7 @@ class SMTP
public function hello($host = '')
{
//Try extended hello first (RFC 2821)
if ($this->sendHello('EHLO', $host)) {
return true;
}
//Some servers shut down the SMTP service here (RFC 5321)
if (substr($this->helo_rply, 0, 3) == '421') {
return false;
}
return $this->sendHello('HELO', $host);
return $this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host);
}
/**
@ -1000,12 +946,12 @@ class SMTP
$this->client_send($commandstring . static::LE, $command);
$this->last_reply = $this->get_lines();
//Fetch SMTP code and possible error code explanation
// Fetch SMTP code and possible error code explanation
$matches = [];
if (preg_match('/^([\d]{3})[ -](?:([\d]\\.[\d]\\.[\d]{1,2}) )?/', $this->last_reply, $matches)) {
$code = (int) $matches[1];
$code_ex = (count($matches) > 2 ? $matches[2] : null);
//Cut off error code from each response line
// Cut off error code from each response line
$detail = preg_replace(
"/{$code}[ -]" .
($code_ex ? str_replace('.', '\\.', $code_ex) . ' ' : '') . '/m',
@ -1013,7 +959,7 @@ class SMTP
$this->last_reply
);
} else {
//Fall back to simple parsing if regex fails
// Fall back to simple parsing if regex fails
$code = (int) substr($this->last_reply, 0, 3);
$code_ex = null;
$detail = substr($this->last_reply, 4);
@ -1036,10 +982,7 @@ class SMTP
return false;
}
//Don't clear the error store when using keepalive
if ($command !== 'RSET') {
$this->setError('');
}
$this->setError('');
return true;
}
@ -1115,10 +1058,8 @@ class SMTP
{
//If SMTP transcripts are left enabled, or debug output is posted online
//it can leak credentials, so hide credentials in all but lowest level
if (
self::DEBUG_LOWLEVEL > $this->do_debug &&
in_array($command, ['User & Password', 'Username', 'Password'], true)
) {
if (self::DEBUG_LOWLEVEL > $this->do_debug &&
in_array($command, ['User & Password', 'Username', 'Password'], true)) {
$this->edebug('CLIENT -> SERVER: [credentials hidden]', self::DEBUG_CLIENT);
} else {
$this->edebug('CLIENT -> SERVER: ' . $data, self::DEBUG_CLIENT);
@ -1172,7 +1113,7 @@ class SMTP
if (!$this->server_caps) {
$this->setError('No HELO/EHLO was sent');
return null;
return;
}
if (!array_key_exists($name, $this->server_caps)) {
@ -1184,7 +1125,7 @@ class SMTP
}
$this->setError('HELO handshake was used; No information about server extensions available');
return null;
return;
}
return $this->server_caps[$name];
@ -1211,7 +1152,7 @@ class SMTP
*/
protected function get_lines()
{
//If the connection is bad, give up straight away
// If the connection is bad, give up straight away
if (!is_resource($this->smtp_conn)) {
return '';
}
@ -1225,52 +1166,24 @@ class SMTP
$selW = null;
while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) {
//Must pass vars in here as params are by reference
//solution for signals inspired by https://github.com/symfony/symfony/pull/6540
set_error_handler([$this, 'errorHandler']);
$n = stream_select($selR, $selW, $selW, $this->Timelimit);
restore_error_handler();
if ($n === false) {
$message = $this->getError()['detail'];
$this->edebug(
'SMTP -> get_lines(): select failed (' . $message . ')',
self::DEBUG_LOWLEVEL
);
//stream_select returns false when the `select` system call is interrupted
//by an incoming signal, try the select again
if (stripos($message, 'interrupted system call') !== false) {
$this->edebug(
'SMTP -> get_lines(): retrying stream_select',
self::DEBUG_LOWLEVEL
);
$this->setError('');
continue;
}
break;
}
if (!$n) {
if (!stream_select($selR, $selW, $selW, $this->Timelimit)) {
$this->edebug(
'SMTP -> get_lines(): select timed-out in (' . $this->Timelimit . ' sec)',
self::DEBUG_LOWLEVEL
);
break;
}
//Deliberate noise suppression - errors are handled afterwards
$str = @fgets($this->smtp_conn, self::MAX_REPLY_LENGTH);
$this->edebug('SMTP INBOUND: "' . trim($str) . '"', self::DEBUG_LOWLEVEL);
$data .= $str;
//If response is only 3 chars (not valid, but RFC5321 S4.2 says it must be handled),
//or 4th character is a space or a line break char, we are done reading, break the loop.
//String array access is a significant micro-optimisation over strlen
// If response is only 3 chars (not valid, but RFC5321 S4.2 says it must be handled),
// or 4th character is a space or a line break char, we are done reading, break the loop.
// String array access is a significant micro-optimisation over strlen
if (!isset($str[3]) || $str[3] === ' ' || $str[3] === "\r" || $str[3] === "\n") {
break;
}
//Timed-out? Log and break
// Timed-out? Log and break
$info = stream_get_meta_data($this->smtp_conn);
if ($info['timed_out']) {
$this->edebug(
@ -1279,7 +1192,7 @@ class SMTP
);
break;
}
//Now check if reads took too long
// Now check if reads took too long
if ($endtime && time() > $endtime) {
$this->edebug(
'SMTP -> get_lines(): timelimit reached (' .

View File

@ -1,28 +0,0 @@
<?php
/**
* German PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP-Fehler: Authentifizierung fehlgeschlagen.';
$PHPMAILER_LANG['connect_host'] = 'SMTP-Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-Fehler: Daten werden nicht akzeptiert.';
$PHPMAILER_LANG['empty_message'] = 'E-Mail-Inhalt ist leer.';
$PHPMAILER_LANG['encoding'] = 'Unbekannte Kodierung: ';
$PHPMAILER_LANG['execute'] = 'Konnte folgenden Befehl nicht ausführen: ';
$PHPMAILER_LANG['file_access'] = 'Zugriff auf folgende Datei fehlgeschlagen: ';
$PHPMAILER_LANG['file_open'] = 'Dateifehler: Konnte folgende Datei nicht öffnen: ';
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
$PHPMAILER_LANG['instantiate'] = 'Mail-Funktion konnte nicht initialisiert werden.';
$PHPMAILER_LANG['invalid_address'] = 'Die Adresse ist ungültig: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Ungültiger Hosteintrag: ';
$PHPMAILER_LANG['invalid_host'] = 'Ungültiger Host: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfängeradresse an.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-Fehler: Die folgenden Empfänger sind nicht korrekt: ';
$PHPMAILER_LANG['signing'] = 'Fehler beim Signieren: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zum SMTP-Server fehlgeschlagen.';
$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP-Server: ';
$PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: ';
$PHPMAILER_LANG['extension_missing'] = 'Fehlende Erweiterung: ';

View File

@ -1,33 +0,0 @@
<?php
/**
* Greek PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'Σφάλμα SMTP: Αδυναμία πιστοποίησης.';
$PHPMAILER_LANG['buggy_php'] = 'Η έκδοση PHP που χρησιμοποιείτε παρουσιάζει σφάλμα που μπορεί να έχει ως αποτέλεσμα κατεστραμένα μηνύματα. Για να το διορθώσετε, αλλάξτε τον τρόπο αποστολής σε SMTP, απενεργοποιήστε την επιλογή mail.add_x_header στο αρχείο php.ini, αλλάξτε λειτουργικό σε MacOS ή Linux ή αναβαθμίστε την PHP σε έκδοση 7.0.17+ ή 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Σφάλμα SMTP: Αδυναμία σύνδεσης με τον φιλοξενητή SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Σφάλμα SMTP: Μη αποδεκτά δεδομένα.';
$PHPMAILER_LANG['empty_message'] = 'Η ηλεκτρονική επιστολή δεν έχει περιεχόμενο.';
$PHPMAILER_LANG['encoding'] = 'Άγνωστη μορφή κωδικοποίησης: ';
$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης: ';
$PHPMAILER_LANG['extension_missing'] = 'Απουσία επέκτασης: ';
$PHPMAILER_LANG['file_access'] = 'Αδυναμία πρόσβασης στο αρχείο: ';
$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Αδυναμία ανοίγματος αρχείου: ';
$PHPMAILER_LANG['from_failed'] = 'Η ακόλουθη διεύθυνση αποστολέα δεν είναι σωστή: ';
$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης συνάρτησης Mail.';
$PHPMAILER_LANG['invalid_address'] = 'Μη έγκυρη διεύθυνση: ';
$PHPMAILER_LANG['invalid_header'] = 'Μη έγκυρο όνομα κεφαλίδας ή τιμή';
$PHPMAILER_LANG['invalid_hostentry'] = 'Μη έγκυρη εισαγωγή φιλοξενητή: ';
$PHPMAILER_LANG['invalid_host'] = 'Μη έγκυρος φιλοξενητής: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer δεν υποστηρίζεται.';
$PHPMAILER_LANG['provide_address'] = 'Δώστε τουλάχιστον μια ηλεκτρονική διεύθυνση παραλήπτη.';
$PHPMAILER_LANG['recipients_failed'] = 'Σφάλμα SMTP: Οι παρακάτω διευθύνσεις παραλήπτη δεν είναι έγκυρες: ';
$PHPMAILER_LANG['signing'] = 'Σφάλμα υπογραφής: ';
$PHPMAILER_LANG['smtp_code'] = 'Κώδικάς SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Πρόσθετες πληροφορίες SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης SMTP.';
$PHPMAILER_LANG['smtp_detail'] = 'Λεπτομέρεια: ';
$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα με τον διακομιστή SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή επαναφοράς μεταβλητής: ';

View File

@ -1,31 +0,0 @@
<?php
/**
* Spanish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Matt Sturdy <matt.sturdy@gmail.com>
* @author Crystopher Glodzienski Cardoso <crystopher.glodzienski@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.';
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.';
$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío.';
$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: ';
$PHPMAILER_LANG['execute'] = 'Imposible ejecutar: ';
$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: ';
$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: ';
$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: ';
$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.';
$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.';
$PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.';
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: ';
$PHPMAILER_LANG['signing'] = 'Error al firmar: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.';
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: ';
$PHPMAILER_LANG['smtp_code'] = 'Código del servidor SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Información adicional del servidor SMTP: ';
$PHPMAILER_LANG['invalid_header'] = 'Nombre o valor de encabezado no válido';

View File

@ -1,38 +0,0 @@
<?php
/**
* French PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* Some French punctuation requires a thin non-breaking space (U+202F) character before it,
* for example before a colon or exclamation mark.
* There is one of these characters between these quotes: ""
* @see http://unicode.org/udhr/n/notes_fra.html
*/
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP: échec de lauthentification.';
$PHPMAILER_LANG['buggy_php'] = 'Votre version de PHP est affectée par un bug qui peut entraîner des messages corrompus. Pour résoudre ce problème, passez à lenvoi par SMTP, désactivez loption mail.add_x_header dans le fichier php.ini, passez à MacOS ou Linux, ou passez PHP à la version 7.0.17+ ou 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Erreur SMTP: impossible de se connecter au serveur SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erreur SMTP: données incorrectes.';
$PHPMAILER_LANG['empty_message'] = 'Corps du message vide.';
$PHPMAILER_LANG['encoding'] = 'Encodage inconnu: ';
$PHPMAILER_LANG['execute'] = 'Impossible de lancer lexécution: ';
$PHPMAILER_LANG['extension_missing'] = 'Extension manquante: ';
$PHPMAILER_LANG['file_access'] = 'Impossible daccéder au fichier: ';
$PHPMAILER_LANG['file_open'] = 'Ouverture du fichier impossible: ';
$PHPMAILER_LANG['from_failed'] = 'Ladresse dexpéditeur suivante a échoué: ';
$PHPMAILER_LANG['instantiate'] = 'Impossible dinstancier la fonction mail.';
$PHPMAILER_LANG['invalid_address'] = 'Adresse courriel non valide: ';
$PHPMAILER_LANG['invalid_header'] = 'Nom ou valeur de len-tête non valide';
$PHPMAILER_LANG['invalid_hostentry'] = 'Entrée dhôte non valide: ';
$PHPMAILER_LANG['invalid_host'] = 'Hôte non valide: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.';
$PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.';
$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP:les destinataires suivants ont échoué: ';
$PHPMAILER_LANG['signing'] = 'Erreur de signature: ';
$PHPMAILER_LANG['smtp_code'] = 'Code SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Informations supplémentaires SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'La fonction SMTP connect() a échouée.';
$PHPMAILER_LANG['smtp_detail'] = 'Détails: ';
$PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Impossible dinitialiser ou de réinitialiser une variable: ';
$PHPMAILER_LANG['extension_missing'] = 'Extension manquante: ';

View File

@ -1,28 +0,0 @@
<?php
/**
* Italian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Ilias Bartolini <brain79@inwind.it>
* @author Stefano Sabatini <sabas88@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dati non accettati dal server.';
$PHPMAILER_LANG['empty_message'] = 'Il corpo del messaggio è vuoto';
$PHPMAILER_LANG['encoding'] = 'Codifica dei caratteri sconosciuta: ';
$PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: ';
$PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: ';
$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: ';
$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: ';
$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail';
$PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: ';
$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente';
$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: ';
$PHPMAILER_LANG['signing'] = 'Errore nella firma: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.';
$PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: ';
$PHPMAILER_LANG['extension_missing'] = 'Estensione mancante: ';

View File

@ -1,27 +0,0 @@
<?php
/**
* Portuguese (European) PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Jonadabe <jonadabe@hotmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.';
$PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.';
$PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está vazia.';
$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder o ficheiro: ';
$PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: ';
$PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: ';
$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.';
$PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
$PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.';
$PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: ';
$PHPMAILER_LANG['signing'] = 'Erro ao assinar: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';
$PHPMAILER_LANG['extension_missing'] = 'Extensão em falta: ';

View File

@ -1,31 +0,0 @@
<?php
/**
* Turkish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Elçin Özel
* @author Can Yılmaz
* @author Mehmet Benlioğlu
* @author @yasinaydin
* @author Ogün Karakuş
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Hatası: Oturum açılamadı.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Hatası: SMTP sunucusuna bağlanılamadı.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Hatası: Veri kabul edilmedi.';
$PHPMAILER_LANG['empty_message'] = 'Mesajın içeriği boş';
$PHPMAILER_LANG['encoding'] = 'Bilinmeyen karakter kodlama: ';
$PHPMAILER_LANG['execute'] = 'Çalıştırılamadı: ';
$PHPMAILER_LANG['file_access'] = 'Dosyaya erişilemedi: ';
$PHPMAILER_LANG['file_open'] = 'Dosya Hatası: Dosya açılamadı: ';
$PHPMAILER_LANG['from_failed'] = 'Belirtilen adreslere gönderme başarısız: ';
$PHPMAILER_LANG['instantiate'] = 'Örnek e-posta fonksiyonu oluşturulamadı.';
$PHPMAILER_LANG['invalid_address'] = 'Geçersiz e-posta adresi: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' e-posta kütüphanesi desteklenmiyor.';
$PHPMAILER_LANG['provide_address'] = 'En az bir alıcı e-posta adresi belirtmelisiniz.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Hatası: Belirtilen alıcılara ulaşılamadı: ';
$PHPMAILER_LANG['signing'] = 'İmzalama hatası: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() fonksiyonu başarısız.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP sunucu hatası: ';
$PHPMAILER_LANG['variable_set'] = 'Değişken ayarlanamadı ya da sıfırlanamadı: ';
$PHPMAILER_LANG['extension_missing'] = 'Eklenti bulunamadı: ';

View File

@ -1,888 +0,0 @@
<?php
class core extends common
{
/**
* Constructeur du coeur
*/
public function __construct()
{
parent::__construct();
// Token CSRF
if (empty($_SESSION['csrf'])) {
$_SESSION['csrf'] = bin2hex(openssl_random_pseudo_bytes(128));
}
// Fuseau horaire
self::$timezone = $this->getData(['config', 'timezone']); // Utile pour transmettre le timezone à la classe helper
date_default_timezone_set(self::$timezone);
// Supprime les fichiers temporaires
$lastClearTmp = mktime(0, 0, 0);
if ($lastClearTmp > $this->getData(['core', 'lastClearTmp']) + 86400) {
$iterator = new DirectoryIterator(self::TEMP_DIR);
foreach ($iterator as $fileInfos) {
if (
$fileInfos->isFile() &&
$fileInfos->getBasename() !== '.htaccess' &&
$fileInfos->getBasename() !== '.gitkeep'
) {
@unlink($fileInfos->getPathname());
}
}
// Date de la dernière suppression
$this->setData(['core', 'lastClearTmp', $lastClearTmp]);
// Enregistre les données
//$this->SaveData();
}
// Backup automatique des données
$lastBackup = mktime(0, 0, 0);
if (
$this->getData(['config', 'autoBackup'])
and $lastBackup > $this->getData(['core', 'lastBackup']) + 86400
and $this->getData(['user']) // Pas de backup pendant l'installation
) {
// Copie des fichier de données
helper::autoBackup(self::BACKUP_DIR, ['backup', 'tmp', 'file']);
// Date du dernier backup
$this->setData(['core', 'lastBackup', $lastBackup]);
// Supprime les backups de plus de 30 jours
$iterator = new DirectoryIterator(self::BACKUP_DIR);
foreach ($iterator as $fileInfos) {
if (
$fileInfos->isFile()
and $fileInfos->getBasename() !== '.htaccess'
and $fileInfos->getMTime() + (86400 * 30) < time()
) {
@unlink($fileInfos->getPathname());
}
}
}
// Crée le fichier de personnalisation avancée
if (file_exists(self::DATA_DIR . 'custom.css') === false) {
$this->secure_file_put_contents(self::DATA_DIR . 'custom.css', file_get_contents('core/module/theme/resource/custom.css'));
chmod(self::DATA_DIR . 'custom.css', 0755);
}
// Crée le fichier de personnalisation
if (file_exists(self::DATA_DIR . 'theme.css') === false) {
$this->secure_file_put_contents(self::DATA_DIR . 'theme.css', '');
chmod(self::DATA_DIR . 'theme.css', 0755);
}
// Crée le fichier de personnalisation de l'administration
if (file_exists(self::DATA_DIR . 'admin.css') === false) {
$this->secure_file_put_contents(self::DATA_DIR . 'admin.css', '');
chmod(self::DATA_DIR . 'admin.css', 0755);
}
// Check la version rafraichissement du theme
$cssVersion = preg_split('/\*+/', file_get_contents(self::DATA_DIR . 'theme.css'));
if (empty($cssVersion[1]) or $cssVersion[1] !== md5(json_encode($this->getData(['theme'])))) {
// Version
$css = '/*' . md5(json_encode($this->getData(['theme']))) . '*/';
/**
* Import des polices de caractères
* A partir du CDN
* ou dans le dossier site/file/source/fonts
* ou pas du tout si fonte webSafe
*/
// Fonts disponibles
$fontsAvailable['files'] = $this->getData(['font', 'files']);
$fontsAvailable['imported'] = $this->getData(['font', 'imported']);
$fontsAvailable['websafe'] = self::$fontsWebSafe;
// Fontes installées
$fonts = [
$this->getData(['theme', 'text', 'font']),
$this->getData(['theme', 'title', 'font']),
$this->getData(['theme', 'header', 'font']),
$this->getData(['theme', 'menu', 'font']),
$this->getData(['theme', 'footer', 'font'])
];
// Suppression des polices identiques
$fonts = array_unique($fonts);
/**
* Charge les fontes
*/
foreach ($fonts as $fontId) {
foreach (['websafe', 'imported', 'files'] as $typeFont) {
if (isset($fontsAvailable[$typeFont][$fontId])) {
$fonts[$fontId] = $fontsAvailable[$typeFont][$fontId]['font-family'];
}
}
}
// Fond du body
$colors = helper::colorVariants($this->getData(['theme', 'body', 'backgroundColor']));
// Body
$css .= 'body{font-family:' . $fonts[$this->getData(['theme', 'text', 'font'])] . ';}';
if ($themeBodyImage = $this->getData(['theme', 'body', 'image'])) {
// Image dans html pour éviter les déformations.
$css .= 'html {background-image:url("../file/source/' . $themeBodyImage . '");background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}';
// Couleur du body transparente
$css .= 'body {background-color: rgba(0,0,0,0)}';
} else {
// Pas d'image couleur du body
$css .= 'html {background-color:' . $colors['normal'] . ';}';
}
// Icône BacktoTop
$css .= '#backToTop {background-color:' . $this->getData(['theme', 'body', 'toTopbackgroundColor']) . ';color:' . $this->getData(['theme', 'body', 'toTopColor']) . ';}';
// Site
$colors = helper::colorVariants($this->getData(['theme', 'text', 'linkColor']));
$css .= 'a{color:' . $colors['normal'] . '}';
// Couleurs de site dans TinyMCe
$css .= 'div.mce-edit-area {font-family:' . $fonts[$this->getData(['theme', 'text', 'font'])] . ';}';
// Site dans TinyMCE
$css .= '.editorWysiwyg, .editorWysiwygComment {background-color:' . $this->getData(['theme', 'site', 'backgroundColor']) . ';}';
$css .= 'span.mce-text{background-color: unset !important;}';
$css .= 'body,.row > div{font-size:' . $this->getData(['theme', 'text', 'fontSize']) . '}';
$css .= 'body{color:' . $this->getData(['theme', 'text', 'textColor']) . '}';
$css .= 'select,input[type=password],input[type=email],input[type=text],input[type=date],input[type=time],input[type=week],input[type=month],input[type=datetime-local],.inputFile,select,textarea{color:' . $this->getData(['theme', 'text', 'textColor']) . ';background-color:' . $this->getData(['theme', 'site', 'backgroundColor']) . ';}';
// spécifiques au module de blog
$css .= '.blogDate {color:' . $this->getData(['theme', 'text', 'textColor']) . ';}.blogPicture img{border:1px solid ' . $this->getData(['theme', 'text', 'textColor']) . '; box-shadow: 1px 1px 5px ' . $this->getData(['theme', 'text', 'textColor']) . ';}';
// Couleur fixée dans admin.css
$css .= '.container {max-width:' . $this->getData(['theme', 'site', 'width']) . '}';
$margin = $this->getData(['theme', 'site', 'margin']) ? '0' : '20px';
// Marge supplémentaire lorsque le pied de page est fixe
if (
$this->getData(['theme', 'footer', 'fixed']) === true &&
$this->getData(['theme', 'footer', 'position']) === 'body'
) {
$marginBottomLarge = ((str_replace('px', '', $this->getData(['theme', 'footer', 'height'])) * 2) + 31) . 'px';
$marginBottomSmall = ((str_replace('px', '', $this->getData(['theme', 'footer', 'height'])) * 2) + 93) . 'px';
} else {
$marginBottomSmall = $margin;
$marginBottomLarge = $margin;
}
$css .= $this->getData(['theme', 'site', 'width']) === '100%'
? '@media (min-width: 769px) {#site{margin:0 auto ' . $marginBottomLarge . ' 0 !important;}}@media (max-width: 768px) {#site{margin:0 auto ' . $marginBottomSmall . ' 0 !important;}}#site.light{margin:5% auto !important;} body{margin:0 auto !important;} #bar{margin:0 auto !important;} body > header{margin:0 auto !important;} body > nav {margin: 0 auto !important;} body > footer {margin:0 auto !important;}'
: '@media (min-width: 769px) {#site{margin: ' . $margin . ' auto ' . $marginBottomLarge . ' auto !important;}}@media (max-width: 768px) {#site{margin: ' . $margin . ' auto ' . $marginBottomSmall . ' auto !important;}}#site.light{margin: 5% auto !important;} body{margin:0px 10px;} #bar{margin: 0 -10px;} body > header{margin: 0 -10px;} body > nav {margin: 0 -10px;} body > footer {margin: 0 -10px;} ';
$css .= $this->getData(['theme', 'site', 'width']) === '750px'
? '.button, button{font-size:0.8em;}'
: '';
$css .= '#site{background-color:' . $this->getData(['theme', 'site', 'backgroundColor']) . ';border-radius:' . $this->getData(['theme', 'site', 'radius']) . ';box-shadow:' . $this->getData(['theme', 'site', 'shadow']) . ' #212223;}';
$colors = helper::colorVariants($this->getData(['theme', 'button', 'backgroundColor']));
$css .= '.speechBubble,.button,.button:hover,button[type=submit],.pagination a,.pagination a:hover,input[type=checkbox]:checked + label:before,input[type=radio]:checked + label:before,.helpContent{background-color:' . $colors['normal'] . ';color:' . $colors['text'] . '}';
$css .= '.helpButton span{color:' . $colors['normal'] . '}';
$css .= 'input[type=text]:hover,input[type=date]:hover,input[type=time]:hover,input[type=week]:hover,input[type=month]:hover,input[type=datetime-local]:hover,input[type=password]:hover,.inputFile:hover,select:hover,textarea:hover{border-color:' . $colors['normal'] . '}';
$css .= '.speechBubble:before{border-color:' . $colors['normal'] . ' transparent transparent transparent}';
$css .= '.button:hover,button[type=submit]:hover,.pagination a:hover,input[type=checkbox]:not(:active):checked:hover + label:before,input[type=checkbox]:active + label:before,input[type=radio]:checked:hover + label:before,input[type=radio]:not(:checked):active + label:before{background-color:' . $colors['darken'] . '}';
$css .= '.helpButton span:hover{color:' . $colors['darken'] . '}';
$css .= '.button:active,button[type=submit]:active,.pagination a:active{background-color:' . $colors['veryDarken'] . '}';
$colors = helper::colorVariants($this->getData(['theme', 'title', 'textColor']));
$css .= 'h1,h2,h3,h4,h5,h6,h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{color:' . $colors['normal'] . ';font-family:' . $fonts[$this->getData(['theme', 'title', 'font'])] . ';font-weight:' . $this->getData(['theme', 'title', 'fontWeight']) . ';text-transform:' . $this->getData(['theme', 'title', 'textTransform']) . '}';
$css .= 'h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover,h5 a:hover,h6 a:hover{color:' . $colors['darken'] . '}';
// Les blocs
$colors = helper::colorVariants($this->getData(['theme', 'block', 'backgroundColor']));
$css .= '.block {border: 1px solid ' . $this->getdata(['theme', 'block', 'borderColor']) . ';}.block h4 {background-color:' . $colors['normal'] . ';color:' . $colors['text'] . ';}';
// Bannière
// Eléments communs
if ($this->getData(['theme', 'header', 'margin'])) {
if ($this->getData(['theme', 'menu', 'position']) === 'site-first') {
$css .= 'header{margin:0 20px}';
} else {
$css .= 'header{margin:20px 20px 0 20px}';
}
}
$colors = helper::colorVariants($this->getData(['theme', 'header', 'backgroundColor']));
$css .= 'header{background-color:' . $colors['normal'] . ';}';
// Bannière de type papier peint
if ($this->getData(['theme', 'header', 'feature']) === 'wallpaper') {
$css .= 'header{background-size:' . $this->getData(['theme', 'header', 'imageContainer']) . '}';
$css .= 'header{background-color:' . $colors['normal'];
// Valeur de hauteur traditionnelle
$css .= ';height:' . $this->getData(['theme', 'header', 'height']) . ';line-height:' . $this->getData(['theme', 'header', 'height']);
$css .= ';text-align:' . $this->getData(['theme', 'header', 'textAlign']) . '}';
if ($themeHeaderImage = $this->getData(['theme', 'header', 'image'])) {
$css .= 'header{background-image:url("../file/source/' . $themeHeaderImage . '");background-position:' . $this->getData(['theme', 'header', 'imagePosition']) . ';background-repeat:' . $this->getData(['theme', 'header', 'imageRepeat']) . '}';
}
$colors = helper::colorVariants($this->getData(['theme', 'header', 'textColor']));
$css .= 'header span{color:' . $colors['normal'] . ';font-family:' . $fonts[$this->getData(['theme', 'header', 'font'])] . ';font-weight:' . $this->getData(['theme', 'header', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'header', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'header', 'textTransform']) . '}';
}
// Bannière au Contenu HTML
if ($this->getData(['theme', 'header', 'feature']) === 'feature') {
// Hauteur de la taille du contenu perso
$css .= 'header {height:' . $this->getData(['theme', 'header', 'height']) . '; min-height:' . $this->getData(['theme', 'header', 'height']) . ';overflow: hidden;}';
}
// Menu
$colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColor']));
$css .= 'nav,nav.navMain a{background-color:' . $colors['normal'] . '}';
$css .= 'nav a,#toggle span,nav a:hover{color:' . $this->getData(['theme', 'menu', 'textColor']) . '}';
$css .= 'nav a:hover{background-color:' . $colors['darken'] . '}';
$css .= 'nav a.active{color:' . $this->getData(['theme', 'menu', 'activeTextColor']) . ';}';
if ($this->getData(['theme', 'menu', 'activeColorAuto']) === true) {
$css .= 'nav a.active{background-color:' . $colors['veryDarken'] . '}';
} else {
$css .= 'nav a.active{background-color:' . $this->getData(['theme', 'menu', 'activeColor']) . '}';
}
$css .= 'nav #burgerText{color:' . $colors['text'] . '}';
// Sous menu
$colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColorSub']));
$css .= 'nav .navSub a{background-color:' . $colors['normal'] . '}';
$css .= 'nav .navMain a.active {border-radius:' . $this->getData(['theme', 'menu', 'radius']) . '}';
$css .= '#menu{text-align:' . $this->getData(['theme', 'menu', 'textAlign']) . '}';
if ($this->getData(['theme', 'menu', 'margin'])) {
if (
$this->getData(['theme', 'menu', 'position']) === 'site-first'
or $this->getData(['theme', 'menu', 'position']) === 'site-second'
) {
$css .= 'nav{padding:10px 10px 0 10px;}';
} else {
$css .= 'nav{padding:0 10px}';
}
} else {
$css .= 'nav{margin:0}';
}
if (
$this->getData(['theme', 'menu', 'position']) === 'top'
) {
$css .= 'nav{padding:0 10px;}';
}
$css .= '#toggle span,#menu a{padding:' . $this->getData(['theme', 'menu', 'height']) . ';font-family:' . $fonts[$this->getData(['theme', 'menu', 'font'])] . ';font-weight:' . $this->getData(['theme', 'menu', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'menu', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'menu', 'textTransform']) . '}';
// Pied de page
$colors = helper::colorVariants($this->getData(['theme', 'footer', 'backgroundColor']));
if ($this->getData(['theme', 'footer', 'margin'])) {
$css .= 'footer{padding:0 20px;}';
} else {
$css .= 'footer{padding:0}';
}
$css .= 'footer span, #footerText > p {color:' . $this->getData(['theme', 'footer', 'textColor']) . ';font-family:' . $fonts[$this->getData(['theme', 'footer', 'font'])] . ';font-weight:' . $this->getData(['theme', 'footer', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'footer', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'footer', 'textTransform']) . '}';
$css .= 'footer {background-color:' . $colors['normal'] . ';color:' . $this->getData(['theme', 'footer', 'textColor']) . '}';
//$css .= 'footer a{color:' . $this->getData(['theme', 'footer', 'textColor']) . '}';
$css .= 'footer #footersite > div {margin:' . $this->getData(['theme', 'footer', 'height']) . ' 0}';
$css .= 'footer #footerbody > div {margin:' . $this->getData(['theme', 'footer', 'height']) . ' 0}';
$css .= '@media (max-width: 768px) {footer #footerbody > div { padding: 2px }}';
$css .= '#footerSocials{text-align:' . $this->getData(['theme', 'footer', 'socialsAlign']) . '}';
$css .= '#footerText > p {text-align:' . $this->getData(['theme', 'footer', 'textAlign']) . '}';
$css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}';
// Enregistre la personnalisation
$this->secure_file_put_contents(self::DATA_DIR . 'theme.css', $css);
// Effacer le cache pour tenir compte de la couleur de fond TinyMCE
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
}
// Check la version rafraichissement du theme admin
$cssVersion = preg_split('/\*+/', file_get_contents(self::DATA_DIR . 'admin.css'));
if (empty($cssVersion[1]) or $cssVersion[1] !== md5(json_encode($this->getData(['admin'])))) {
// Version
$css = '/*' . md5(json_encode($this->getData(['admin']))) . '*/';
// Fonts disponibles
$fontsAvailable['files'] = $this->getData(['font', 'files']);
$fontsAvailable['imported'] = $this->getData(['font', 'imported']);
$fontsAvailable['websafe'] = self::$fontsWebSafe;
/**
* Import des polices de caractères
* A partir du CDN ou dans le dossier site/file/source/fonts
*/
$fonts = [
$this->getData(['admin', 'fontText']),
$this->getData(['admin', 'fontTitle']),
];
// Suppression des polices identiques
$fonts = array_unique($fonts);
/**
* Charge les fontes
*/
foreach ($fonts as $fontId) {
foreach (['websafe', 'imported', 'files'] as $typeFont) {
if (isset($fontsAvailable[$typeFont][$fontId])) {
$fonts[$fontId] = $fontsAvailable[$typeFont][$fontId]['font-family'];
}
}
}
// Thème Administration
$colors = helper::colorVariants($this->getData(['admin', 'backgroundColor']));
$css .= '#site{background-color:' . $colors['normal'] . ';}';
$css .= 'p, div, label, select, input, table, span {font-family:' . $fonts[$this->getData(['admin', 'fontText'])] . '}';
$css .= 'body,.row > div {font-size:' . $this->getData(['admin', 'fontSize']) . '}';
$css .= 'body h1, h2, h3, h4 a, h5, h6 {font-family:' . $fonts[$this->getData(['admin', 'fontTitle'])] . ';color:' . $this->getData(['admin', 'colorTitle']) . ';}';
$css .= '.container {max-width:' . $this->getData(['admin', 'width']) . '}';
$margin = $this->getData(['theme', 'site', 'margin']) ? '0' : '20px';
// Marge supplémentaire lorsque le pied de page est fixe
if (
$this->getData(['theme', 'footer', 'fixed']) === true &&
$this->getData(['theme', 'footer', 'position']) === 'body'
) {
$marginBottomLarge = ((str_replace('px', '', $this->getData(['theme', 'footer', 'height'])) * 2) + 31) . 'px';
$marginBottomSmall = ((str_replace('px', '', $this->getData(['theme', 'footer', 'height'])) * 2) + 93) . 'px';
} else {
$marginBottomSmall = $margin;
$marginBottomLarge = $margin;
}
$css .= $this->getData(['admin', 'width']) === '100%'
? '@media (min-width: 769px) {#site{margin:0 auto ' . $marginBottomLarge . ' 0 !important;}}@media (max-width: 768px) {#site{margin:0 auto ' . $marginBottomSmall . ' 0 !important;}}#site.light{margin:5% auto !important;} body{margin:0 auto !important;} #bar{margin:0 auto !important;} body > header{margin:0 auto !important;} body > nav {margin: 0 auto !important;} body > footer {margin:0 auto !important;}'
: '@media (min-width: 769px) {#site{margin: ' . $margin . ' auto ' . $marginBottomLarge . ' auto !important;}}@media (max-width: 768px) {#site{margin: ' . $margin . ' auto ' . $marginBottomSmall . ' auto !important;}}#site.light{margin: 5% auto !important;} body{margin:0px 10px;} #bar{margin: 0 -10px;} body > header{margin: 0 -10px;} body > nav {margin: 0 -10px;} body > footer {margin: 0 -10px;} ';
$css .= $this->getData(['admin', 'width']) === '750px'
? '.button, button{font-size:0.8em;}'
: '';
// TinyMCE
$colors = helper::colorVariants($this->getData(['admin', 'colorText']));
$css .= 'body:not(.editorWysiwyg), body:not(editorWysiwygComment),span .zwiico-help {color:' . $colors['normal'] . ';}';
$css .= 'table thead tr, table thead tr .zwiico-help{ background-color:' . $colors['normal'] . '; color:' . $colors['text'] . ';}';
$css .= 'table thead th { color:' . $colors['text'] . ';}';
$colors = helper::colorVariants($this->getData(['admin', 'backgroundColorButton']));
$css .= 'input[type=checkbox]:checked + label::before,.speechBubble{background-color:' . $colors['normal'] . ';color:' . $colors['text'] . ';}';
$css .= '.speechBubble::before {border-color:' . $colors['normal'] . ' transparent transparent transparent;}';
$css .= '.button {background-color:' . $colors['normal'] . ';color:' . $colors['text'] . ';}.button:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}';
$colors = helper::colorVariants($this->getData(['admin', 'backgroundColorButtonGrey']));
$css .= '.button.buttonGrey {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGrey:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button.buttonGrey:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}';
$colors = helper::colorVariants($this->getData(['admin', 'backgroundColorButtonRed']));
$css .= '.button.buttonRed {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonRed:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button.buttonRed:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}';
$colors = helper::colorVariants($this->getData(['admin', 'backgroundColorButtonHelp']));
$css .= '.button.buttonHelp {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonHelp:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button.buttonHelp:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}';
$colors = helper::colorVariants($this->getData(['admin', 'backgroundColorButtonGreen']));
$css .= '.button.buttonGreen, button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:hover, button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:active, button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] . ';}';
$colors = helper::colorVariants($this->getData(['admin', 'backgroundBlockColor']));
$css .= '.buttonTab, .block {border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . ';}.buttonTab, .block h4 {background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';}';
$css .= 'table tr,input[type=email],input[type=date],input[type=time],input[type=month],input[type=week],input[type=datetime-local],input[type=text],input[type=password],select:not(#barSelectLanguage),select:not(#barSelectPage),textarea:not(.editorWysiwyg), textarea:not(.editorWysiwygComment),.inputFile{background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . ';}';
// Bordure du contour TinyMCE
$css .= '.mce-tinymce{border: 1px solid ' . $this->getData(['admin', 'borderBlockColor']) . '!important;}';
// Enregistre la personnalisation
$this->secure_file_put_contents(self::DATA_DIR . 'admin.css', $css);
}
}
/**
* Auto-chargement des classes
* @param string $className Nom de la classe à charger
*/
public static function autoload($className)
{
$classPath = strtolower($className) . '/' . strtolower($className) . '.php';
// Module du coeur
if (is_readable('core/module/' . $classPath)) {
require 'core/module/' . $classPath;
}
// Module
elseif (is_readable(self::MODULE_DIR . $classPath)) {
require self::MODULE_DIR . $classPath;
}
// Librairie
elseif (is_readable('core/vendor/' . $classPath)) {
require 'core/vendor/' . $classPath;
}
}
/**
* Routage des modules
*/
public function router()
{
$layout = new layout($this);
// Installation
if (
$this->getData(['user']) === []
and $this->getUrl(0) !== 'install'
) {
http_response_code(302);
header('Location:' . helper::baseUrl() . 'install');
exit();
}
// Journalisation
$this->saveLog();
// Force la déconnexion des membres bannis ou d'une seconde session
if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
and ($this->getUser('group') === self::GROUP_BANNED
or ($_SESSION['csrf'] !== $this->getData(['user', $this->getUser('id'), 'accessCsrf'])
and $this->getData(['config', 'connect', 'autoDisconnect']) === true)
)
) {
$user = new user;
$user->logout();
}
// Mode maintenance
if (
$this->getData(['config', 'maintenance'])
and in_array($this->getUrl(0), ['maintenance', 'user']) === false
and $this->getUrl(1) !== 'login'
and ($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
and $this->getUser('group') < self::GROUP_ADMIN
)
)
) {
// Déconnexion
$user = new user;
$user->logout();
// Redirection
http_response_code(302);
header('Location:' . helper::baseUrl() . 'maintenance');
exit();
}
// Pour éviter une 404 sur une langue étrangère, bascule dans la langue correcte.
if (is_null($this->getData(['page', $this->getUrl(0)]))) {
foreach (self::$languages as $key => $value) {
if (
is_dir(self::DATA_DIR . $key) &&
file_exists(self::DATA_DIR . $key . '/page.json')
) {
$pagesId = json_decode(file_get_contents(self::DATA_DIR . $key . '/page.json'), true);
if (
is_array($pagesId['page']) &&
array_key_exists($this->getUrl(0), $pagesId['page'])
) {
$_SESSION['ZWII_CONTENT'] = $key;
header('Refresh:0; url=' . helper::baseUrl() . $this->getUrl(0));
exit();
}
}
}
}
// Check l'accès à la page
$access = null;
if ($this->getData(['page', $this->getUrl(0)]) !== null) {
if (
$this->getData(['page', $this->getUrl(0), 'group']) === self::GROUP_VISITOR
or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
// and $this->getUser('group') >= $this->getData(['page', $this->getUrl(0), 'group'])
// Modification qui tient compte du profil de la page
and ($this->getUser('group') * 10 + $this->getUser('profil')) >= ($this->getData(['page', $this->getUrl(0), 'group']) * 10 + $this->getData(['page', $this->getUrl(0), 'profil']))
)
) {
$access = true;
} else {
if ($this->getUrl(0) === $this->getData(['locale', 'homePageId'])) {
$access = 'login';
} else {
$access = false;
}
}
// Empêcher l'accès aux pages désactivées par URL directe
if (
($this->getData(['page', $this->getUrl(0), 'disable']) === true
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
) or ($this->getData(['page', $this->getUrl(0), 'disable']) === true
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
and $this->getUser('group') < self::GROUP_EDITOR
)
) {
$access = false;
}
}
/**
* Contrôle si la page demandée est en édition ou accès à la gestion du site
* conditions de blocage :
* - Les deux utilisateurs qui accèdent à la même page sont différents
* - les URLS sont identiques
* - Une partie de l'URL fait partie de la liste de filtrage (édition d'un module etc..)
* - L'édition est ouverte depuis un temps dépassé, on considère que la page est restée ouverte et qu'elle ne sera pas validée
*/
$accessInfo['userName'] = '';
$accessInfo['pageId'] = '';
if ($this->getData(['user'])) {
foreach ($this->getData(['user']) as $userId => $userIds) {
if (!is_null($this->getData(['user', $userId, 'accessUrl']))) {
$t = explode('/', $this->getData(['user', $userId, 'accessUrl']));
}
if (
$this->getUser('id') &&
$userId !== $this->getUser('id') &&
$this->getData(['user', $userId, 'accessUrl']) === $this->getUrl() &&
array_intersect($t, self::$concurrentAccess) &&
//array_intersect($t, self::$accessExclude) !== false &&
time() < $this->getData(['user', $userId, 'accessTimer']) + self::ACCESS_TIMER
) {
$access = false;
$accessInfo['userName'] = $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
$accessInfo['pageId'] = end($t);
}
}
}
// Accès concurrent stocke la page visitée
if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
&& $this->getUser('id')
) {
$this->setData(['user', $this->getUser('id'), 'accessUrl', $this->getUrl()]);
$this->setData(['user', $this->getUser('id'), 'accessTimer', time()]);
}
// Breadcrumb
$title = $this->getData(['page', $this->getUrl(0), 'title']);
if (
!empty($this->getData(['page', $this->getUrl(0), 'parentPageId'])) &&
$this->getData(['page', $this->getUrl(0), 'breadCrumb'])
) {
$title = '<a href="' . helper::baseUrl() .
$this->getData(['page', $this->getUrl(0), 'parentPageId']) .
'">' .
ucfirst($this->getData(['page', $this->getData(['page', $this->getUrl(0), 'parentPageId']), 'title'])) .
'</a> &#8250; ' .
$this->getData(['page', $this->getUrl(0), 'title']);
}
// Importe le style de la page principale
$inlineStyle[] = $this->getData(['page', $this->getUrl(0), 'css']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'css']);
// Importe le script de la page principale
$inlineScript[] = $this->getData(['page', $this->getUrl(0), 'js']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'js']);
// Importe le contenu, le CSS et le script des barres
$contentRight = $this->getData(['page', $this->getUrl(0), 'barRight']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$siteContent) : '';
$inlineStyle[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']);
$inlineScript[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']);
$contentLeft = $this->getData(['page', $this->getUrl(0), 'barLeft']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$siteContent) : '';
$inlineStyle[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']);
$inlineScript[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']);
// Importe la page simple sans module ou avec un module inexistant
if (
$this->getData(['page', $this->getUrl(0)]) !== null
and ($this->getData(['page', $this->getUrl(0), 'moduleId']) === ''
or !class_exists($this->getData(['page', $this->getUrl(0), 'moduleId']))
)
and $access
) {
// Importe le CSS de la page principale
$this->addOutput([
'title' => $title,
'content' => $this->getPage($this->getUrl(0), self::$siteContent),
'metaDescription' => $this->getData(['page', $this->getUrl(0), 'metaDescription']),
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
'contentRight' => $contentRight,
'contentLeft' => $contentLeft,
'inlineStyle' => $inlineStyle,
'inlineScript' => $inlineScript,
]);
}
// Importe le module
else {
// Id du module, et valeurs en sortie de la page s'il s'agit d'un module de page
if ($access and $this->getData(['page', $this->getUrl(0), 'moduleId'])) {
$moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']);
// Construit un meta absent
$metaDescription = $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'blog' && !empty($this->getUrl(1)) && in_array($this->getUrl(1), $this->getData(['module']))
? strip_tags(substr($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'content']), 0, 159))
: $this->getData(['page', $this->getUrl(0), 'metaDescription']);
// Importe le CSS de la page principale
$pageContent = $this->getPage($this->getUrl(0), self::$siteContent);
$this->addOutput([
'title' => $title,
// Meta description = 160 premiers caractères de l'article
'content' => $pageContent,
'metaDescription' => $metaDescription,
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
'contentRight' => $contentRight,
'contentLeft' => $contentLeft,
'inlineStyle' => $inlineStyle,
'inlineScript' => $inlineScript,
]);
} else {
$moduleId = $this->getUrl(0);
$pageContent = '';
}
// Check l'existence du module
if (class_exists($moduleId)) {
/** @var common $module */
$module = new $moduleId;
// Check l'existence de l'action
$action = '';
$ignore = true;
if (!is_null($this->getUrl(1))) {
foreach (explode('-', $this->getUrl(1)) as $actionPart) {
if ($ignore) {
$action .= $actionPart;
$ignore = false;
} else {
$action .= ucfirst($actionPart);
}
}
}
$action = array_key_exists($action, $module::$actions) ? $action : 'index';
if (array_key_exists($action, $module::$actions)) {
$module->$action();
$output = $module->output;
// Check le groupe de l'utilisateur
if (
($module::$actions[$action] === self::GROUP_VISITOR
or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
and $this->getUser('group') >= $module::$actions[$action]
and $this->getUser('permission', $moduleId, $action)
)
)
and $output['access'] === true
) {
// Enregistrement du contenu de la méthode POST lorsqu'une notice est présente
if (common::$inputNotices) {
foreach ($_POST as $postId => $postValue) {
if (is_array($postValue)) {
foreach ($postValue as $subPostId => $subPostValue) {
self::$inputBefore[$postId . '_' . $subPostId] = $subPostValue;
}
} else {
self::$inputBefore[$postId] = $postValue;
}
}
}
// Sinon traitement des données de sortie qui requiert qu'aucune notice ne soit présente
else {
// Notification
if ($output['notification']) {
if ($output['state'] === true) {
$notification = 'ZWII_NOTIFICATION_SUCCESS';
} elseif ($output['state'] === false) {
$notification = 'ZWII_NOTIFICATION_ERROR';
} else {
$notification = 'ZWII_NOTIFICATION_OTHER';
}
$_SESSION[$notification] = $output['notification'];
}
// Redirection
if ($output['redirect']) {
http_response_code(301);
header('Location:' . $output['redirect']);
exit();
}
}
// Données en sortie applicables même lorsqu'une notice est présente
// Affichage
if ($output['display']) {
$this->addOutput([
'display' => $output['display']
]);
}
// Contenu brut
if ($output['content']) {
$this->addOutput([
'content' => $output['content']
]);
}
// Contenu par vue
elseif ($output['view']) {
// Chemin en fonction d'un module du coeur ou d'un module
$modulePath = in_array($moduleId, self::$coreModuleIds) ? 'core/' : '';
// CSS
$stylePath = $modulePath . self::MODULE_DIR . $moduleId . '/view/' . $output['view'] . '/' . $output['view'] . '.css';
if (file_exists($stylePath)) {
$this->addOutput([
'style' => file_get_contents($stylePath)
]);
}
if ($output['style']) {
$this->addOutput([
'style' => file_get_contents($output['style'])
]);
}
// JS
$scriptPath = $modulePath . self::MODULE_DIR . $moduleId . '/view/' . $output['view'] . '/' . $output['view'] . '.js.php';
if (file_exists($scriptPath)) {
ob_start();
include $scriptPath;
$this->addOutput([
'script' => ob_get_clean()
]);
}
// Vue
$viewPath = $modulePath . self::MODULE_DIR . $moduleId . '/view/' . $output['view'] . '/' . $output['view'] . '.php';
if (file_exists($viewPath)) {
ob_start();
include $viewPath;
$modpos = $this->getData(['page', $this->getUrl(0), 'modulePosition']);
if ($modpos === 'top') {
$this->addOutput([
'content' => ob_get_clean() . ($output['showPageContent'] ? $pageContent : '')
]);
} else if ($modpos === 'free') {
if (strstr($pageContent, '[MODULE]', true) === false) {
$begin = strstr($pageContent, '[]', true);
} else {
$begin = strstr($pageContent, '[MODULE]', true);
}
if (strstr($pageContent, '[MODULE]') === false) {
$end = strstr($pageContent, '[]');
} else {
$end = strstr($pageContent, '[MODULE]');
}
$cut = 8;
$end = substr($end, -strlen($end) + $cut);
$this->addOutput([
'content' => ($output['showPageContent'] ? $begin : '') . ob_get_clean() . ($output['showPageContent'] ? $end : '')
]);
} else {
$this->addOutput([
'content' => ($output['showPageContent'] ? $pageContent : '') . ob_get_clean()
]);
}
}
}
// Librairies
if ($output['vendor'] !== $this->output['vendor']) {
$this->addOutput([
'vendor' => array_merge($this->output['vendor'], $output['vendor'])
]);
}
if ($output['title'] !== null) {
$this->addOutput([
'title' => $output['title']
]);
}
// Affiche le bouton d'édition de la page dans la barre de membre
if ($output['showBarEditButton']) {
$this->addOutput([
'showBarEditButton' => $output['showBarEditButton']
]);
}
}
// Erreur 403
else {
$access = false;
}
}
}
}
// Erreurs
if ($access === 'login') {
http_response_code(302);
header('Location:' . helper::baseUrl() . 'user/login/');
exit();
}
if ($access === false) {
http_response_code(403);
if ($accessInfo['userName']) {
$this->addOutput([
'title' => 'Accès verrouillé',
'content' => template::speech('<p>' . sprintf(helper::translate('La page %s est ouverte par l\'utilisateur %s</p><p><a style="color:inherit" href="javascript:history.back()">%s</a></p>'), $accessInfo['pageId'], $accessInfo['userName'], helper::translate('Retour')))
]);
} else {
if (
$this->getData(['locale', 'page403']) !== 'none'
and $this->getData(['page', $this->getData(['locale', 'page403'])])
) {
header('Location:' . helper::baseUrl() . $this->getData(['locale', 'page403']));
} else {
$this->addOutput([
'title' => 'Accès interdit',
'content' => template::speech('<p>' . helper::translate('Vous n\'êtes pas autorisé à consulter cette page (erreur 403)') . '</p><p><a style="color:inherit" href="javascript:history.back()">' . helper::translate('Retour') . '</a></p>')
]);
}
}
} elseif ($this->output['content'] === '') {
http_response_code(404);
if (
$this->getData(['locale', 'page404']) !== 'none'
and $this->getData(['page', $this->getData(['locale', 'page404'])])
) {
header('Location:' . helper::baseUrl() . $this->getData(['locale', 'page404']));
} else {
$this->addOutput([
'title' => 'Page indisponible',
'content' => template::speech('<p>' . helper::translate('La page demandée n\'existe pas ou est introuvable (erreur 404)') . '</p><p><a style="color:inherit" href="javascript:history.back()">' . helper::translate('Retour') . '</a></p>')
]);
}
}
// Mise en forme des métas
if ($this->output['metaTitle'] === '') {
if ($this->output['title']) {
$this->addOutput([
'metaTitle' => strip_tags($this->output['title']) . ' - ' . $this->getData(['locale', 'title'])
]);
} else {
$this->addOutput([
'metaTitle' => $this->getData(['locale', 'title'])
]);
}
}
if ($this->output['metaDescription'] === '') {
$this->addOutput([
'metaDescription' => $this->getData(['locale', 'metaDescription'])
]);
}
switch ($this->output['display']) {
// Layout brut
case self::DISPLAY_RAW:
echo $this->output['content'];
break;
// Layout vide
case self::DISPLAY_LAYOUT_BLANK:
require 'core/layout/blank.php';
break;
// Affichage en JSON
case self::DISPLAY_JSON:
header('Content-Type: application/json');
echo json_encode($this->output['content']);
break;
// RSS feed
case self::DISPLAY_RSS:
header('Content-type: application/rss+xml; charset=UTF-8');
echo $this->output['content'];
break;
// Layout allégé
case self::DISPLAY_LAYOUT_LIGHT:
ob_start();
require 'core/layout/light.php';
$content = ob_get_clean();
// Convertit la chaîne en UTF-8 pour conserver les caractères accentués
$content = mb_convert_encoding($content, 'UTF-8', 'UTF-8');
// Supprime les espaces, les sauts de ligne, les tabulations et autres caractères inutiles
$content = preg_replace('/[\t ]+/u', ' ', $content);
echo $content;
break;
// Layout principal
case self::DISPLAY_LAYOUT_MAIN:
ob_start();
require 'core/layout/main.php';
$content = ob_get_clean();
// Convertit la chaîne en UTF-8 pour conserver les caractères accentués
$content = mb_convert_encoding($content, 'UTF-8', 'UTF-8');
// Supprime les espaces, les sauts de ligne, les tabulations et autres caractères inutiles
$content = preg_replace('/[\t ]+/u', ' ', $content);
echo $content;
break;
}
}
}

View File

@ -1,217 +0,0 @@
<?php
namespace PHP81_BC;
use DateTime;
use DateTimeZone;
use DateTimeInterface;
use Exception;
use IntlDateFormatter;
use IntlGregorianCalendar;
use InvalidArgumentException;
/**
* Locale-formatted PHP81_BC\PHP81_BC\strftime using IntlDateFormatter (PHP 8.1 compatible)
* This provides a cross-platform alternative to PHP81_BC\PHP81_BC\strftime() for when it will be removed from PHP.
* Note that output can be slightly different between libc sprintf and this function as it is using ICU.
*
* Usage:
* use function \PHP81_BC\PHP81_BC\PHP81_BC\strftime;
* echo PHP81_BC\PHP81_BC\strftime('%A %e %B %Y %X', new \DateTime('2021-09-28 00:00:00'), 'fr_FR');
*
* Original use:
* \setlocale(LC_TIME, 'fr_FR.UTF-8');
* echo \PHP81_BC\PHP81_BC\strftime('%A %e %B %Y %X', strtotime('2021-09-28 00:00:00'));
*
* @param string $format Date format
* @param integer|string|DateTime $timestamp Timestamp
* @return string
* @author BohwaZ <https://bohwaz.net/>
*/
function strftime (string $format, $timestamp = null, ?string $locale = null) : string {
if (!($timestamp instanceof DateTimeInterface)) {
$timestamp = is_int($timestamp) ? '@' . $timestamp : (string) $timestamp;
try {
$timestamp = new DateTime($timestamp);
} catch (Exception $e) {
throw new InvalidArgumentException('$timestamp argument is neither a valid UNIX timestamp, a valid date-time string or a DateTime object.', 0, $e);
}
}
$timestamp->setTimezone(new DateTimeZone(date_default_timezone_get()));
if (empty($locale)) {
// get current locale
$locale = setlocale(LC_TIME, '0');
}
// remove trailing part not supported by ext-intl locale
$locale = preg_replace('/[^\w-].*$/', '', $locale);
$intl_formats = [
'%a' => 'EEE', // An abbreviated textual representation of the day Sun through Sat
'%A' => 'EEEE', // A full textual representation of the day Sunday through Saturday
'%b' => 'MMM', // Abbreviated month name, based on the locale Jan through Dec
'%B' => 'MMMM', // Full month name, based on the locale January through December
'%h' => 'MMM', // Abbreviated month name, based on the locale (an alias of %b) Jan through Dec
];
$intl_formatter = function (DateTimeInterface $timestamp, string $format) use ($intl_formats, $locale) {
$tz = $timestamp->getTimezone();
$date_type = IntlDateFormatter::FULL;
$time_type = IntlDateFormatter::FULL;
$pattern = '';
switch ($format) {
// %c = Preferred date and time stamp based on locale
// Example: Tue Feb 5 00:45:10 2009 for February 5, 2009 at 12:45:10 AM
case '%c':
$date_type = IntlDateFormatter::LONG;
$time_type = IntlDateFormatter::SHORT;
break;
// %x = Preferred date representation based on locale, without the time
// Example: 02/05/09 for February 5, 2009
case '%x':
$date_type = IntlDateFormatter::SHORT;
$time_type = IntlDateFormatter::NONE;
break;
// Localized time format
case '%X':
$date_type = IntlDateFormatter::NONE;
$time_type = IntlDateFormatter::MEDIUM;
break;
default:
$pattern = $intl_formats[$format];
}
// In October 1582, the Gregorian calendar replaced the Julian in much of Europe, and
// the 4th October was followed by the 15th October.
// ICU (including IntlDateFormattter) interprets and formats dates based on this cutover.
// Posix (including PHP81_BC\PHP81_BC\strftime) and timelib (including DateTimeImmutable) instead use
// a "proleptic Gregorian calendar" - they pretend the Gregorian calendar has existed forever.
// This leads to the same instants in time, as expressed in Unix time, having different representations
// in formatted strings.
// To adjust for this, a custom calendar can be supplied with a cutover date arbitrarily far in the past.
$calendar = IntlGregorianCalendar::createInstance();
$calendar->setGregorianChange(PHP_INT_MIN);
return (new IntlDateFormatter($locale, $date_type, $time_type, $tz, $calendar, $pattern))->format($timestamp);
};
// Same order as https://www.php.net/manual/en/function.PHP81_BC\PHP81_BC\strftime.php
$translation_table = [
// Day
'%a' => $intl_formatter,
'%A' => $intl_formatter,
'%d' => 'd',
'%e' => function ($timestamp) {
return sprintf('% 2u', $timestamp->format('j'));
},
'%j' => function ($timestamp) {
// Day number in year, 001 to 366
return sprintf('%03d', $timestamp->format('z')+1);
},
'%u' => 'N',
'%w' => 'w',
// Week
'%U' => function ($timestamp) {
// Number of weeks between date and first Sunday of year
$day = new DateTime(sprintf('%d-01 Sunday', $timestamp->format('Y')));
return sprintf('%02u', 1 + ($timestamp->format('z') - $day->format('z')) / 7);
},
'%V' => 'W',
'%W' => function ($timestamp) {
// Number of weeks between date and first Monday of year
$day = new DateTime(sprintf('%d-01 Monday', $timestamp->format('Y')));
return sprintf('%02u', 1 + ($timestamp->format('z') - $day->format('z')) / 7);
},
// Month
'%b' => $intl_formatter,
'%B' => $intl_formatter,
'%h' => $intl_formatter,
'%m' => 'm',
// Year
'%C' => function ($timestamp) {
// Century (-1): 19 for 20th century
return floor($timestamp->format('Y') / 100);
},
'%g' => function ($timestamp) {
return substr($timestamp->format('o'), -2);
},
'%G' => 'o',
'%y' => 'y',
'%Y' => 'Y',
// Time
'%H' => 'H',
'%k' => function ($timestamp) {
return sprintf('% 2u', $timestamp->format('G'));
},
'%I' => 'h',
'%l' => function ($timestamp) {
return sprintf('% 2u', $timestamp->format('g'));
},
'%M' => 'i',
'%p' => 'A', // AM PM (this is reversed on purpose!)
'%P' => 'a', // am pm
'%r' => 'h:i:s A', // %I:%M:%S %p
'%R' => 'H:i', // %H:%M
'%S' => 's',
'%T' => 'H:i:s', // %H:%M:%S
'%X' => $intl_formatter, // Preferred time representation based on locale, without the date
// Timezone
'%z' => 'O',
'%Z' => 'T',
// Time and Date Stamps
'%c' => $intl_formatter,
'%D' => 'm/d/Y',
'%F' => 'Y-m-d',
'%s' => 'U',
'%x' => $intl_formatter,
];
$out = preg_replace_callback('/(?<!%)%([_#-]?)([a-zA-Z])/', function ($match) use ($translation_table, $timestamp) {
$prefix = $match[1];
$char = $match[2];
$pattern = '%'.$char;
if ($pattern == '%n') {
return "\n";
} elseif ($pattern == '%t') {
return "\t";
}
if (!isset($translation_table[$pattern])) {
throw new InvalidArgumentException(sprintf('Format "%s" is unknown in time format', $pattern));
}
$replace = $translation_table[$pattern];
if (is_string($replace)) {
$result = $timestamp->format($replace);
} else {
$result = $replace($timestamp, $pattern);
}
switch ($prefix) {
case '_':
// replace leading zeros with spaces but keep last char if also zero
return preg_replace('/\G0(?=.)/', ' ', $result);
case '#':
case '-':
// remove leading zeros but keep last char if also zero
return preg_replace('/^0+(?=.)/', '', $result);
}
return $result;
}, $format);
$out = str_replace('%%', '%', $out);
return $out;
}

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
@ -16,363 +16,373 @@ var core = {};
/**
* Crée un message d'alerte
*/
core.alert = function (text) {
var lightbox = lity(function ($) {
return $("<div>")
.addClass("lightbox")
.append(
$("<span>").text(text),
$("<div>")
.addClass("lightboxButtons")
.append(
$("<a>")
.addClass("button")
.text("Ok")
.on("click", function () {
lightbox.close();
})
)
)
}(jQuery));
// Validation de la lightbox avec le bouton entrée
$(document).on("keyup", function (event) {
if (event.keyCode === 13) {
lightbox.close();
}
});
return false;
core.alert = function(text) {
var lightbox = lity(function($) {
return $("<div>")
.addClass("lightbox")
.append(
$("<span>").text(text),
$("<div>")
.addClass("lightboxButtons")
.append(
$("<a>")
.addClass("button")
.text("Ok")
.on("click", function() {
lightbox.close();
})
)
)
}(jQuery));
// Validation de la lightbox avec le bouton entrée
$(document).on("keyup", function(event) {
if(event.keyCode === 13) {
lightbox.close();
}
});
return false;
};
/**
* Génère des variations d'une couleur
*/
core.colorVariants = function (rgba) {
rgba = rgba.match(/\(+(.*)\)/);
rgba = rgba[1].split(", ");
return {
"normal": "rgba(" + rgba[0] + "," + rgba[1] + "," + rgba[2] + "," + rgba[3] + ")",
"darken": "rgba(" + Math.max(0, rgba[0] - 15) + "," + Math.max(0, rgba[1] - 15) + "," + Math.max(0, rgba[2] - 15) + "," + rgba[3] + ")",
"veryDarken": "rgba(" + Math.max(0, rgba[0] - 20) + "," + Math.max(0, rgba[1] - 20) + "," + Math.max(0, rgba[2] - 20) + "," + rgba[3] + ")",
"text": core.relativeLuminanceW3C(rgba) > .22 ? "#222" : "#DDD"
};
core.colorVariants = function(rgba) {
rgba = rgba.match(/\(+(.*)\)/);
rgba = rgba[1].split(", ");
return {
"normal": "rgba(" + rgba[0] + "," + rgba[1] + "," + rgba[2] + "," + rgba[3] + ")",
"darken": "rgba(" + Math.max(0, rgba[0] - 15) + "," + Math.max(0, rgba[1] - 15) + "," + Math.max(0, rgba[2] - 15) + "," + rgba[3] + ")",
"veryDarken": "rgba(" + Math.max(0, rgba[0] - 20) + "," + Math.max(0, rgba[1] - 20) + "," + Math.max(0, rgba[2] - 20) + "," + rgba[3] + ")",
//"text": core.relativeLuminanceW3C(rgba) > .22 ? "inherit" : "white"
"text": core.relativeLuminanceW3C(rgba) > .22 ? "#222" : "#DDD"
};
};
/**
* Crée un message de confirmation
*/
core.confirm = function (text, yesCallback, noCallback) {
var lightbox = lity(function ($) {
return $("<div>")
.addClass("lightbox")
.append(
$("<span>").text(text),
$("<div>")
.addClass("lightboxButtons")
.append(
$("<a>")
.addClass("button grey")
.text("<?php echo helper::translate('Non');?>")
.on("click", function () {
lightbox.options('button', true);
lightbox.close();
if (typeof noCallback !== "undefined") {
noCallback();
}
}),
$("<a>")
.addClass("button")
.text("<?php echo helper::translate('Oui');?>")
.on("click", function () {
lightbox.options('button', true);
lightbox.close();
if (typeof yesCallback !== "undefined") {
yesCallback();
}
})
)
)
}(jQuery));
// Callback lors d'un clic sur le fond et sur la croix de fermeture
lightbox.options('button', false);
$(document).on('lity:close', function (event, instance) {
if (
instance.options('button') === false &&
typeof noCallback !== "undefined"
) {
noCallback();
}
});
// Validation de la lightbox avec le bouton entrée
$(document).on("keyup", function (event) {
if (event.keyCode === 13) {
lightbox.close();
if (typeof yesCallback !== "undefined") {
yesCallback();
}
}
});
return false;
core.confirm = function(text, yesCallback, noCallback) {
var lightbox = lity(function($) {
return $("<div>")
.addClass("lightbox")
.append(
$("<span>").text(text),
$("<div>")
.addClass("lightboxButtons")
.append(
$("<a>")
.addClass("button grey")
.text("Non")
.on("click", function() {
lightbox.options('button', true);
lightbox.close();
if(typeof noCallback !== "undefined") {
noCallback();
}
}),
$("<a>")
.addClass("button")
.text("Oui")
.on("click", function() {
lightbox.options('button', true);
lightbox.close();
if(typeof yesCallback !== "undefined") {
yesCallback();
}
})
)
)
}(jQuery));
// Callback lors d'un clic sur le fond et sur la croix de fermeture
lightbox.options('button', false);
$(document).on('lity:close', function(event, instance) {
if(
instance.options('button') === false
&& typeof noCallback !== "undefined"
) {
noCallback();
}
});
// Validation de la lightbox avec le bouton entrée
$(document).on("keyup", function(event) {
if(event.keyCode === 13) {
lightbox.close();
if(typeof yesCallback !== "undefined") {
yesCallback();
}
}
});
return false;
};
/**
* Scripts à exécuter en dernier
*/
core.end = function () {
/**
* Modifications non enregistrées du formulaire
*/
var formDOM = $("form");
// Ignore :
// - TinyMCE car il gère lui même le message
// - Les champs avec data-no-dirty
var inputsDOM = formDOM.find("input:not([data-no-dirty]), select:not([data-no-dirty]), textarea:not(.editorWysiwyg):not([data-no-dirty])");
var inputSerialize = inputsDOM.serialize();
$(window).on("beforeunload", function () {
if (inputsDOM.serialize() !== inputSerialize) {
message = "<?php echo helper::translate('Les modifications que vous avez apportées ne seront peut-être pas enregistrées.');?>";
return message;
}
});
formDOM.submit(function () {
$(window).off("beforeunload");
});
core.end = function() {
/**
* Modifications non enregistrées du formulaire
*/
var formDOM = $("form");
// Ignore :
// - TinyMCE car il gère lui même le message
// - Les champs avec data-no-dirty
var inputsDOM = formDOM.find("input:not([data-no-dirty]), select:not([data-no-dirty]), textarea:not(.editorWysiwyg):not([data-no-dirty])");
var inputSerialize = inputsDOM.serialize();
$(window).on("beforeunload", function() {
if(inputsDOM.serialize() !== inputSerialize) {
return "Les modifications que vous avez apportées ne seront peut-être pas enregistrées.";
}
});
formDOM.submit(function() {
$(window).off("beforeunload");
});
};
$(function () {
core.end();
$(function() {
core.end();
});
/**
* Ajoute une notice
*/
core.noticeAdd = function (id, notice) {
$("#" + id + "Notice").text(notice).removeClass("displayNone");
$("#" + id).addClass("notice");
core.noticeAdd = function(id, notice) {
$("#" + id + "Notice").text(notice).removeClass("displayNone");
$("#" + id).addClass("notice");
};
/**
* Supprime une notice
*/
core.noticeRemove = function (id) {
$("#" + id + "Notice").text("").addClass("displayNone");
$("#" + id).removeClass("notice");
core.noticeRemove = function(id) {
$("#" + id + "Notice").text("").addClass("displayNone");
$("#" + id).removeClass("notice");
};
/**
* Scripts à exécuter en premier
*/
core.start = function () {
/**
* Remonter en haut au clic sur le bouton
*/
var backToTopDOM = $("#backToTop");
backToTopDOM.on("click", function () {
$("body, html").animate({
scrollTop: 0
}, "400");
});
/**
* Affiche / Cache le bouton pour remonter en haut
*/
$(window).on("scroll", function () {
if ($(this).scrollTop() > 200) {
backToTopDOM.fadeIn();
} else {
backToTopDOM.fadeOut();
}
});
/**
* Cache les notifications
*/
var notificationTimer;
$("#notification")
.on("mouseenter", function () {
clearTimeout(notificationTimer);
$("#notificationProgress")
.stop()
.width("100%");
})
.on("mouseleave", function () {
// Disparition de la notification
notificationTimer = setTimeout(function () {
$("#notification").fadeOut();
}, 3000);
// Barre de progression
$("#notificationProgress").animate({
"width": "0%"
}, 3000, "linear");
})
.trigger("mouseleave");
$("#notificationClose").on("click", function () {
clearTimeout(notificationTimer);
$("#notification").fadeOut();
$("#notificationProgress").stop();
});
core.start = function() {
/**
* Remonter en haut au clic sur le bouton
*/
var backToTopDOM = $("#backToTop");
backToTopDOM.on("click", function() {
$("body, html").animate({scrollTop: 0}, "400");
});
/**
* Affiche / Cache le bouton pour remonter en haut
*/
$(window).on("scroll", function() {
if($(this).scrollTop() > 200) {
backToTopDOM.fadeIn();
}
else {
backToTopDOM.fadeOut();
}
});
/**
* Cache les notifications
*/
var notificationTimer;
$("#notification")
.on("mouseenter", function() {
clearTimeout(notificationTimer);
$("#notificationProgress")
.stop()
.width("100%");
})
.on("mouseleave", function() {
// Disparition de la notification
notificationTimer = setTimeout(function() {
$("#notification").fadeOut();
}, 3000);
// Barre de progression
$("#notificationProgress").animate({
"width": "0%"
}, 3000, "linear");
})
.trigger("mouseleave");
$("#notificationClose").on("click", function() {
clearTimeout(notificationTimer);
$("#notification").fadeOut();
$("#notificationProgress").stop();
});
/**
* Traitement du formulaire cookies
*/
$("#cookieForm").submit(function (event) {
/**
* Traitement du formulaire cookies
*/
$("#cookieForm").submit(function(event){
// Variables des cookies
var getUrl = window.location;
var domain = "domain=" + getUrl.hostname + ";";
var e = new Date();
e.setFullYear(e.getFullYear() + 1);
var expires = "expires=" + e.toUTCString();
// Variables des cookies
var getUrl = window.location;
var domain = "domain=" + getUrl.host + ";";
var path = "path=" + getUrl.pathname.split('/')[1] + ";";
var e = new Date();
e.setFullYear(e.getFullYear() + 1);
var expires = "expires=" + e.toUTCString();
// Stocke le cookie d'acceptation
document.cookie = "ZWII_COOKIE_CONSENT=true;samesite=strict;" + domain + expires;
});
// Crée le cookie d'acceptation Google Analytics si l'ID a été saisie
var analytics = "<?php echo $this->getData(['config', 'seo', 'analyticsId']);?>";
// l'Id GA est défini dans la configuration, afficher la checkbox d'acceptation
if( analytics.length > 0){
// Traitement du retour de la checkbox
if ($("#googleAnalytics").is(":checked")) {
// L'URL du serveur faut TRUE
document.cookie = "ZWII_COOKIE_GA_CONSENT=true;samesite=strict;" + domain + path + expires;
} else {
document.cookie = "ZWII_COOKIE_GA_CONSENT=false;samesite=strict;" + domain + path + expires;
}
}
// Stocke le cookie d'acceptation
document.cookie = "ZWII_COOKIE_CONSENT=true;samesite=strict;" + domain + path + expires;
});
/**
* Fermeture de la popup des cookies
*/
$("#cookieConsent .cookieClose").on("click", function () {
$('#cookieConsent').addClass("displayNone");
});
/**
* Fermeture de la popup des cookies
*/
$("#cookieConsent .cookieClose").on("click", function() {
$('#cookieConsent').addClass("displayNone");
});
/**
* Commande de gestion des cookies dans le footer
*/
/**
* Commande de gestion des cookies dans le footer
*/
$("#footerLinkCookie").on("click", function () {
$("#cookieConsent").removeClass("displayNone");
});
$("#footerLinkCookie").on("click", function() {
$("#cookieConsent").removeClass("displayNone");
});
/**
* Affiche / Cache le menu en mode responsive
*/
var menuDOM = $("#menu");
$("#toggle").on("click", function () {
menuDOM.slideToggle();
});
$(window).on("resize", function () {
if ($(window).width() > 768) {
menuDOM.css("display", "");
}
});
/**
* Affiche / Cache le menu en mode responsive
*/
var menuDOM = $("#menu");
$("#toggle").on("click", function() {
menuDOM.slideToggle();
});
$(window).on("resize", function() {
if($(window).width() > 768) {
menuDOM.css("display", "");
}
});
/**
* Choix de page dans la barre de membre
*/
$("#barSelectPage").on("change", function() {
var pageUrl = $(this).val();
if(pageUrl) {
$(location).attr("href", pageUrl);
}
});
/**
* Champs d'upload de fichiers
*/
// Mise à jour de l'affichage des champs d'upload
$(".inputFileHidden").on("change", function() {
var inputFileHiddenDOM = $(this);
var fileName = inputFileHiddenDOM.val();
if(fileName === "") {
fileName = "Choisissez un fichier";
$(inputFileHiddenDOM).addClass("disabled");
}
else {
$(inputFileHiddenDOM).removeClass("disabled");
}
inputFileHiddenDOM.parent().find(".inputFileLabel").text(fileName);
}).trigger("change");
// Suppression du fichier contenu dans le champ
$(".inputFileDelete").on("click", function() {
$(this).parents(".inputWrapper").find(".inputFileHidden").val("").trigger("change");
});
// Suppression de la date contenu dans le champ
$(".inputDateDelete").on("click", function() {
$(this).parents(".inputWrapper").find(".datepicker").val("").trigger("change");
});
// Confirmation de mise à jour
$("#barUpdate").on("click", function() {
return core.confirm("Effectuer la mise à jour ?", function() {
$(location).attr("href", $("#barUpdate").attr("href"));
});
});
// Confirmation de déconnexion
$("#barLogout").on("click", function() {
return core.confirm("Se déconnecter ?", function() {
$(location).attr("href", $("#barLogout").attr("href"));
});
});
/**
* Bloque la multi-soumission des boutons
*/
$("form").on("submit", function() {
$(this).find(".uniqueSubmission")
.addClass("disabled")
.prop("disabled", true)
.empty()
.append(
$("<span>").addClass("zwiico-spin animate-spin")
)
});
/**
* Check adresse email
*/
$("[type=email]").on("change", function() {
var _this = $(this);
var pattern = /^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i;
if(pattern.test(_this.val())) {
core.noticeRemove(_this.attr("id"));
}
else {
core.noticeAdd(_this.attr("id"), "Format incorrect");
}
});
/**
* Iframes et vidéos responsives
*/
var elementDOM = $("iframe, video, embed, object");
// Calcul du ratio et suppression de la hauteur / largeur des iframes
elementDOM.each(function() {
var _this = $(this);
_this
.data("ratio", _this.height() / _this.width())
.data("maxwidth", _this.width())
.removeAttr("width height");
});
// Prend la largeur du parent et détermine la hauteur à l'aide du ratio lors du resize de la fenêtre
$(window).on("resize", function() {
elementDOM.each(function() {
var _this = $(this);
var width = _this.parent().first().width();
if (width > _this.data("maxwidth")){ width = _this.data("maxwidth");}
_this
.width(width)
.height(width * _this.data("ratio"));
});
}).trigger("resize");
/**
* Choix de page dans la barre de membre
*/
$("#barSelectPage").on("change", function () {
var pageUrl = $(this).val();
if (pageUrl) {
$(location).attr("href", pageUrl);
}
});
/**
* Champs d'upload de fichiers
*/
// Mise à jour de l'affichage des champs d'upload
$(".inputFileHidden").on("change", function () {
var inputFileHiddenDOM = $(this);
var fileName = inputFileHiddenDOM.val();
if (fileName === "") {
//fileName = "Sélectionner un fichier";
fileName = "<?php echo helper::translate('Sélectionner un fichier');?>";
$(inputFileHiddenDOM).addClass("disabled");
} else {
$(inputFileHiddenDOM).removeClass("disabled");
}
inputFileHiddenDOM.parent().find(".inputFileLabel").text(fileName);
}).trigger("change");
// Suppression du fichier contenu dans le champ
$(".inputFileDelete").on("click", function () {
$(this).parents(".inputWrapper").find(".inputFileHidden").val("").trigger("change");
});
// Suppression de la date contenu dans le champ
$(".inputDateDelete").on("click", function () {
$(this).parents(".inputWrapper").find(".datepicker").val("").trigger("change");
});
// Confirmation de mise à jour
$("#barUpdate").on("click", function () {
message = "<?php echo helper::translate('Mise à jour') . ' ?';?>";
return core.confirm(message, function () {
$(location).attr("href", $("#barUpdate").attr("href"));
});
});
// Confirmation de déconnexion
$("#barLogout").on("click", function () {
message = "<?php echo helper::translate('Se déconnecter') . ' ?';?>";
return core.confirm(message, function () {
$(location).attr("href", $("#barLogout").attr("href"));
});
});
/**
* Bloque la multi-soumission des boutons
*/
$("form").on("submit", function () {
$(this).find(".uniqueSubmission")
.addClass("disabled")
.prop("disabled", true)
.empty()
.append(
$("<span>").addClass("zwiico-spin animate-spin")
)
});
/**
* Check adresse email
*/
$("[type=email]").on("change", function () {
var _this = $(this);
var pattern = /^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i;
if (pattern.test(_this.val())) {
core.noticeRemove(_this.attr("id"));
} else {
message = "<?php echo helper::translate('Format incorrect');?>";
core.noticeAdd(_this.attr("id"), message);
}
});
/**
* Iframes et vidéos responsives
*/
var elementDOM = $("iframe, video, embed, object");
// Calcul du ratio et suppression de la hauteur / largeur des iframes
elementDOM.each(function () {
var _this = $(this);
_this
.data("ratio", _this.height() / _this.width())
.data("maxwidth", _this.width())
.removeAttr("width height");
});
// Prend la largeur du parent et détermine la hauteur à l'aide du ratio lors du resize de la fenêtre
$(window).on("resize", function () {
elementDOM.each(function () {
var _this = $(this);
var width = _this.parent().first().width();
if (width > _this.data("maxwidth")) {
width = _this.data("maxwidth");
}
_this
.width(width)
.height(width * _this.data("ratio"));
});
}).trigger("resize");
/*
* Header responsive
*/
$(window).on("resize", function () {
var responsive = "<?php echo $this->getdata(['theme','header','imageContainer']);?>";
if (responsive === "cover" || responsive === "contain") {
var widthpx = "<?php echo $this->getdata(['theme','site','width']);?>";
var width = widthpx.substr(0, widthpx.length - 2);
var heightpx = "<?php echo $this->getdata(['theme','header','height']);?>";
var height = heightpx.substr(0, heightpx.length - 2);
var ratio = width / height;
if (($(window).width() / ratio) <= height) {
$("header").height($(window).width() / ratio);
}
}
}).trigger("resize");
/*
* Header responsive
*/
$(window).on("resize", function() {
var responsive = "<?php echo $this->getdata(['theme','header','imageContainer']);?>";
if (responsive === "cover" || responsive === "contain" ) {
var widthpx = "<?php echo $this->getdata(['theme','site','width']);?>";
var width = widthpx.substr(0,widthpx.length-2);
var heightpx = "<?php echo $this->getdata(['theme','header','height']);?>";
var height = heightpx.substr(0,heightpx.length-2);
var ratio = width / height;
if ( ($(window).width() / ratio) <= height) {
//var feature = "<?php echo $this->getdata(['theme','header','feature']);?>";
$("header").height( $(window).width() / ratio );
//if( feature !== "feature"){
// $("header").css("line-height", $(window).width() / ratio + "px");
//};
}
}
}).trigger("resize");
};
@ -382,171 +392,136 @@ core.start();
/**
* Confirmation de suppression
*/
$("#pageDelete").on("click", function () {
var _this = $(this);
message = "<?php echo helper::translate('Confirmez-vous la suppression de cette page ?');?>";
return core.confirm(message, function () {
$(location).attr("href", _this.attr("href"));
});
$("#pageDelete").on("click", function() {
var _this = $(this);
return core.confirm("Êtes-vous sûr de vouloir supprimer cette page ?", function() {
$(location).attr("href", _this.attr("href"));
});
});
/**
* Calcul de la luminance relative d'une couleur
*/
core.relativeLuminanceW3C = function (rgba) {
// Conversion en sRGB
var RsRGB = rgba[0] / 255;
var GsRGB = rgba[1] / 255;
var BsRGB = rgba[2] / 255;
// Ajout de la transparence
var RsRGBA = rgba[3] * RsRGB + (1 - rgba[3]);
var GsRGBA = rgba[3] * GsRGB + (1 - rgba[3]);
var BsRGBA = rgba[3] * BsRGB + (1 - rgba[3]);
// Calcul de la luminance
var R = (RsRGBA <= .03928) ? RsRGBA / 12.92 : Math.pow((RsRGBA + .055) / 1.055, 2.4);
var G = (GsRGBA <= .03928) ? GsRGBA / 12.92 : Math.pow((GsRGBA + .055) / 1.055, 2.4);
var B = (BsRGBA <= .03928) ? BsRGBA / 12.92 : Math.pow((BsRGBA + .055) / 1.055, 2.4);
return .2126 * R + .7152 * G + .0722 * B;
core.relativeLuminanceW3C = function(rgba) {
// Conversion en sRGB
var RsRGB = rgba[0] / 255;
var GsRGB = rgba[1] / 255;
var BsRGB = rgba[2] / 255;
// Ajout de la transparence
var RsRGBA = rgba[3] * RsRGB + (1 - rgba[3]);
var GsRGBA = rgba[3] * GsRGB + (1 - rgba[3]);
var BsRGBA = rgba[3] * BsRGB + (1 - rgba[3]);
// Calcul de la luminance
var R = (RsRGBA <= .03928) ? RsRGBA / 12.92 : Math.pow((RsRGBA + .055) / 1.055, 2.4);
var G = (GsRGBA <= .03928) ? GsRGBA / 12.92 : Math.pow((GsRGBA + .055) / 1.055, 2.4);
var B = (BsRGBA <= .03928) ? BsRGBA / 12.92 : Math.pow((BsRGBA + .055) / 1.055, 2.4);
return .2126 * R + .7152 * G + .0722 * B;
};
// Fonctions
function setCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/; samesite=lax";
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
// Define function to capitalize the first letter of a string
function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
$(document).ready(function () {
/**
* Affiche le sous-menu quand il est sticky
*/
$("nav").mouseenter(function () {
$("#navfixedlogout .navSub").css({
'pointer-events': 'auto'
});
$("#navfixedconnected .navSub").css({
'pointer-events': 'auto'
});
});
$("nav").mouseleave(function () {
$("#navfixedlogout .navSub").css({
'pointer-events': 'none'
});
$("#navfixedconnected .navSub").css({
'pointer-events': 'none'
});
});
$(document).ready(function(){
/**
* Affiche le sous-menu quand il est sticky
*/
$("nav").mouseenter(function(){
$("#navfixedlogout .navSub").css({ 'pointer-events' : 'auto' });
$("#navfixedconnected .navSub").css({ 'pointer-events' : 'auto' });
});
$("nav").mouseleave(function(){
$("#navfixedlogout .navSub").css({ 'pointer-events' : 'none' });
$("#navfixedconnected .navSub").css({ 'pointer-events' : 'none' });
});
/**
* Chargement paresseux des images et des iframes
*/
$("img,picture,iframe").attr("loading", "lazy");
/**
* Chargement paresseux des images et des iframes
*/
$("img,picture,iframe").attr("loading","lazy");
/**
* Effet accordéon
*/
$('.accordion').each(function (e) {
// on stocke l'accordéon dans une variable locale
var accordion = $(this);
// on récupère la valeur data-speed si elle existe
var toggleSpeed = accordion.attr('data-speed') || 100;
/**
* Effet accordéon
*/
$('.accordion').each(function(e) {
// on stocke l'accordéon dans une variable locale
var accordion = $(this);
// on récupère la valeur data-speed si elle existe
var toggleSpeed = accordion.attr('data-speed') || 100;
// fonction pour afficher un élément
function open(item, speed) {
// on récupère tous les éléments, on enlève l'élément actif de ce résultat, et on les cache
accordion.find('.accordion-item').not(item).removeClass('active')
.find('.accordion-content').slideUp(speed);
// on affiche l'élément actif
item.addClass('active')
.find('.accordion-content').slideDown(speed);
}
// fonction pour afficher un élément
function open(item, speed) {
// on récupère tous les éléments, on enlève l'élément actif de ce résultat, et on les cache
accordion.find('.accordion-item').not(item).removeClass('active')
.find('.accordion-content').slideUp(speed);
// on affiche l'élément actif
item.addClass('active')
.find('.accordion-content').slideDown(speed);
}
function close(item, speed) {
accordion.find('.accordion-item').removeClass('active')
.find('.accordion-content').slideUp(speed);
}
function close(item, speed) {
accordion.find('.accordion-item').removeClass('active')
.find('.accordion-content').slideUp(speed);
}
// on initialise l'accordéon, sans animation
open(accordion.find('.active:first'), 0);
// on initialise l'accordéon, sans animation
open(accordion.find('.active:first'), 0);
// au clic sur un titre...
accordion.on('click', '.accordion-title', function(ev) {
ev.preventDefault();
// Masquer l'élément déjà actif
if ($(this).closest('.accordion-item').hasClass('active')) {
close($(this).closest('.accordion-item'), toggleSpeed);
} else {
// ...on lance l'affichage de l'élément, avec animation
open($(this).closest('.accordion-item'), toggleSpeed);
}
});
});
// au clic sur un titre...
accordion.on('click', '.accordion-title', function (ev) {
ev.preventDefault();
// Masquer l'élément déjà actif
if ($(this).closest('.accordion-item').hasClass('active')) {
close($(this).closest('.accordion-item'), toggleSpeed);
} else {
// ...on lance l'affichage de l'élément, avec animation
open($(this).closest('.accordion-item'), toggleSpeed);
}
});
});
/**
* Icône du Menu Burger
*/
$("#toggle").click(function() {
var changeIcon = $('#toggle').children("span");
if ( $(changeIcon).hasClass('zwiico-menu') ) {
$(changeIcon).removeClass('zwiico-menu').addClass('zwiico-cancel');
}
else {
$(changeIcon).addClass('zwiico-menu');
};
});
/**
* Icône du Menu Burger
*/
$("#toggle").click(function () {
var changeIcon = $('#toggle').children("span");
if ($(changeIcon).hasClass('zwiico-menu')) {
$(changeIcon).removeClass('zwiico-menu').addClass('zwiico-cancel');
} else {
$(changeIcon).addClass('zwiico-menu');
};
});
/**
* Active le système d'aide interne
*
*/
/**
* Remove ID Facebook from URL
*/
if (/^\?fbclid=/.test(location.search)) {
location.replace(location.href.replace(/\?fbclid.+/, ""));
};
$(".buttonHelp").click(function() {
$(".helpDisplayContent").slideToggle();
/**
if( $(".buttonHelp").css('opacity') > '0.75'){
$(".buttonHelp").css('opacity','0.5');
}
else{
$(".buttonHelp").css('opacity','1');
}
*/
});
$(".helpDisplayContent").click(function() {
$(".helpDisplayContent").slideToggle();
});
/**
* Sélection d'une langue du site
*/
$("select#barSelectLanguage").on("change", function () {
// La langue courante ne déclenche pas de chargement
var langSelected = $(this).val();
var langSelected = langSelected.split("/");
// Lit le cookie de langue
var langSession = "<?php echo isset($_SESSION['ZWII_CONTENT']) ? $_SESSION['ZWII_CONTENT'] : '';?>";
// Découpe l'URL pour exclure le changement de page avec le thème
var url = window.location;
var currentUrl = url.href.split("/");
// Change si différent, corrige le problème avec le thème et le rechargement de la langue.
if ((currentUrl !== "?theme" ||
currentUrl !== "theme") &&
langSelected[6] !== langSession
) {
//$(location).attr("href", langUrl);
var select = document.getElementById("barSelectLanguage");
var selectedOption = select.options[select.selectedIndex];
if (selectedOption.value !== "") {
window.location = selectedOption.value; }
}
});
/**
* Remove ID Facebook from URL
*/
if(/^\?fbclid=/.test(location.search))
location.replace(location.href.replace(/\?fbclid.+/, ""));
});
/**
* No translate Lity close
*/
$(document).on('lity:ready', function(event, instance) {
$('.lity-close').addClass('notranslate');
});
});

File diff suppressed because it is too large Load Diff

View File

@ -1,56 +0,0 @@
<?php
/**
* Vérification de la version de PHP
*/
if(version_compare(PHP_VERSION, '7.2.0', '<') ) {
exit('PHP 7.2+ mini requis - PHP 7.2+ mini required');
}
if ( version_compare(PHP_VERSION, '8.3.999', '>') ) {
exit('PHP 8.3 pas encore supporté, installez PHP 7.n ou PHP 8.1.n - PHP 8.3 not yet supported, install PHP 7.n or PHP 8.1.n');
}
/**
* Check les modules installés
*/
$e = [
'gd',
'json',
'date',
'mbstring',
'zip',
'intl',
'exif',
'Phar',
'fileinfo',
'session'
];
$m = get_loaded_extensions();
$b = false;
foreach ($e as $k => $v) {
if (array_search($v,$m) === false) {
$b = true;
echo '<pre><p>Module PHP : ' . $v . ' manquant - Module PHP ' . $v . ' missing.</p></pre>';
}
}
if ($b)
exit('<pre><p>ZwiiCMS ne peut pas démarrer ; activez les extensions requises dans PHP.ini- ZwiiCMS cannot start, enabled PHP missing extensions into PHP.ini</p></pre>');
/**
* Contrôle les htacess
*/
$d = [
'',
'site/data/',
'site/backup/',
'site/tmp/',
// 'site/i18n/', pas contrôler pour éviter les pbs de mise à jour
];
foreach ($d as $key) {
if (file_exists($key . '.htaccess') === false)
exit('<pre>ZwiiCMS ne peut pas démarrer, le fichier ' .$key . '.htaccess est manquant.<br />ZwiiCMS cannot start, file ' . $key . '.htaccess is missing.</pre>' );
}

View File

@ -1,52 +0,0 @@
<?php
/**
* Mise à jour avant v12
* */
if (file_exists('site/data/core.json')) {
$core = json_decode(file_get_contents('site/data/core.json'), true);
$version = $core['core']['dataVersion'];
// Avant version 12.0.00
if (
$version < 12000
) {
// Correspondance pour les dossiers de langue à convertir
$languages = [
'fr' => 'fr_FR',
'en' => 'en_EN',
'pt' => 'pt_PT'
];
// Convertit les dossiers vers la nouvelle structure
foreach ($languages as $key => $value) {
if (
is_dir('site/data/' . $key) &&
!is_dir('site/data/' . $value)
) {
$end = rename('site/data/' . $key, 'site/data/' . $value);
}
}
sleep(1);
}
// Renomme les bases de données
if (
$version < 12400
) {
// Renommage les fichiers de données au pluriel
$t = [
'site/data/languages.json' => 'site/data/language.json',
'site/data/fonts.json' => 'site/data/font.json'
];
foreach ($t as $k => $v) {
if (file_exists($k)) {
$d = file_get_contents($k);
$d = str_replace('"' . basename($k, '.json') . '"' , '"' . basename($v, '.json') . '"', $d);
file_put_contents($v, $d);
unlink($k);
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

View File

@ -1,27 +1,21 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$siteContent, 0, 2); ?>">
<html prefix="og: http://ogp.me/ns#" lang="<?php echo self::$i18n;?>">
<head>
<meta charset="UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php $layout->showMetaTitle(); ?>
<?php $layout->showMetaDescription(); ?>
<?php $layout->showMetaType(); ?>
<?php $layout->showMetaImage(); ?>
<?php $layout->showFavicon(); ?>
<?php $layout->showVendor(); ?>
<?php $layout->showStyle(); ?>
<?php $layout->showFonts(); ?>
<?php if (file_exists(self::DATA_DIR . 'font/font.css')): ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>font/font.css?<?php echo md5_file(self::DATA_DIR . 'font/font.css'); ?>">
<?php endif; ?>
<?php $this->showMetaTitle(); ?>
<?php $this->showMetaDescription(); ?>
<?php $this->showMetaType(); ?>
<?php $this->showMetaImage(); ?>
<?php $this->showFavicon(); ?>
<?php $this->showVendor(); ?>
<?php $this->showStyle(); ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/blank.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR.'theme.css'); ?>">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR.'custom.css'); ?>">
</head>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR.'custom.css'); ?>"></head>
<body>
<?php $layout->showContent(); ?>
<?php $layout->showScript(); ?>
<?php $this->showContent(); ?>
<?php $this->showScript(); ?>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
@ -18,14 +18,6 @@
/* Site */
#site {
max-width: 600px !important;
border-radius: 5px !important;
}
#site > section:not(.message),
input[type='password'], input[type='text']
{
background-color: rgba(255, 255, 255, 1) !important;
color: rgba(33, 34, 35, 1) !important;
}
section {

View File

@ -1,30 +1,25 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$siteContent, 0, 2); ?>">
<html prefix="og: http://ogp.me/ns#" lang="<?php echo self::$i18n;?>">
<head>
<meta charset="UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php $layout->showMetaTitle(); ?>
<?php $layout->showMetaDescription(); ?>
<?php $layout->showMetaType(); ?>
<?php $layout->showMetaImage(); ?>
<?php $layout->showFavicon(); ?>
<?php $layout->showVendor(); ?>
<?php $layout->showStyle(); ?>
<?php $layout->showFonts(); ?>
<?php if (file_exists(self::DATA_DIR . 'font/font.css')): ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>font/font.css?<?php echo md5_file(self::DATA_DIR . 'font/font.css'); ?>">
<?php endif; ?>
<?php $this->showMetaTitle(); ?>
<?php $this->showMetaDescription(); ?>
<?php $this->showMetaType(); ?>
<?php $this->showMetaImage(); ?>
<?php $this->showFavicon(); ?>
<?php $this->showVendor(); ?>
<?php $this->showStyle(); ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/light.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR.'theme.css'); ?>">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR.'custom.css'); ?>">
</head>
<body>
<?php $layout->showNotification(); ?>
<?php $this->showNotification(); ?>
<div id="site" class="container light">
<section><?php $layout->showContent(); ?></section>
<section><?php $this->showContent(); ?></section>
</div>
<?php $layout->showScript(); ?>
<?php $this->showScript(); ?>
</body>
</html>

View File

@ -1,8 +1,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo substr(self::$siteContent, 0, 2);?>">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
<head>
<meta charset="UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="x-apple-disable-message-reformatting">

View File

@ -1,217 +1,192 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$siteContent, 0, 2); ?>">
<html prefix="og: http://ogp.me/ns#" lang="<?php echo self::$i18n;?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php $this->showMetaTitle(); ?>
<?php $this->showMetaDescription(); ?>
<?php $this->showMetaType(); ?>
<?php $this->showMetaImage(); ?>
<?php $this->showFavicon(); ?>
<?php $this->showVendor(); ?>
<?php $this->showAnalytics(); ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css?<?php echo md5_file('core/layout/common.css');?>">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR.'theme.css'); ?>">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR.'custom.css'); ?>">
<!-- Détection RSS -->
<?php if ( ( $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'blog'
OR $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'news' )
AND $this->getData(['module', $this->getUrl(0), 'config', 'feeds']) === TRUE ): ?>
<link rel="alternate" type="application/rss+xml" href="'<?php echo helper::baseUrl(). $this->getUrl(0) . '/rss';?>" title="fLUX rss">
<?php endif; ?>
<?php $this->showStyle(); ?>
<?php if (file_exists(self::DATA_DIR .'head.inc.html')) {
include(self::DATA_DIR .'head.inc.html');
}?>
</head>
<body>
<!-- Barre d'administration -->
<?php if($this->getUser('group') > self::GROUP_MEMBER): ?>
<?php $this->showBar(); ?>
<?php endif;?>
<head>
<meta charset="UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta meta="description=" content="ZwiiCMS le CMS multilingue sans base de données">
<meta name="generator" content="ZiiCMS https://forge.chapril.org/ZwiiCMS-Team/ZwiiCMS">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php $layout->showMetaTitle(); ?>
<?php $layout->showMetaDescription(); ?>
<?php $layout->showMetaType(); ?>
<?php $layout->showMetaImage(); ?>
<?php $layout->showFavicon(); ?>
<?php $layout->showVendor(); ?>
<?php $layout->showFonts(); ?>
<?php if (file_exists(self::DATA_DIR . 'font/font.css')): ?>
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>font/font.css?<?php echo md5_file(self::DATA_DIR . 'font/font.css'); ?>">
<?php endif; ?>
<link rel="stylesheet"
href="<?php echo helper::baseUrl(false); ?>core/layout/common.css?<?php echo md5_file('core/layout/common.css'); ?>">
<link rel="stylesheet"
href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR . 'theme.css'); ?>">
<link rel="stylesheet"
href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR . 'custom.css'); ?>">
<!-- Détection RSS -->
<?php if (
($this->getData(['page', $this->getUrl(0), 'moduleId']) === 'blog'
or $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'news')
and $this->getData(['module', $this->getUrl(0), 'config', 'feeds']) === TRUE
): ?>
<link rel="alternate" type="application/rss+xml"
href="'<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" title="fLUX rss">
<?php endif; ?>
<?php $layout->showStyle(); ?>
<?php $layout->showInlineStyle(); ?>
<!-- Script perso dans le header -->
<?php if (file_exists(self::DATA_DIR . 'head.inc.html')) {
include(self::DATA_DIR . 'head.inc.html');
} ?>
</head>
<!-- Notifications -->
<?php $this->showNotification(); ?>
<body>
<!-- Barre d'administration -->
<?php if ($this->getUser('group') > self::GROUP_MEMBER): ?>
<?php $layout->showBar(); ?>
<?php endif; ?>
<!-- Notifications -->
<?php $layout->showNotification(); ?>
<!-- Menu dans le fond du site avant la bannière -->
<?php if ($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top'): ?>
<!-- Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté -->
<?php
if (
$this->getData(['theme', 'menu', 'position']) === 'top'
and $this->getData(['theme', 'menu', 'fixed']) === true
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
and $this->getUser('group') > self::GROUP_MEMBER
) {
echo '<nav id="navfixedconnected" >';
} else {
echo '<nav id="navfixedlogout" >';
}
?>
<!-- Menu Burger -->
<div id="toggle">
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
<?php echo template::ico('menu', ['fontSize' => '2em']); ?>
</div>
<!-- fin du menu burger -->
<?php
$menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
?>
<div id="menu" <?php echo $menuClass; ?>>
<?php $layout->showMenu(); ?>
</div> <!--fin menu -->
</nav>
<?php endif; ?>
<!-- Bannière dans le fond du site -->
<?php if ($this->getData(['theme', 'header', 'position']) === 'body'): ?>
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
<?php
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
$headerClass .= $this->getData(['theme', 'header', 'wide']) === 'none' ? '' : 'container';
?>
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"'; ?>>
<?php if ($this->getData(['theme', 'header', 'feature']) === 'wallpaper'): ?>
<?php if (
$this->getData(['theme', 'header', 'textHide']) === false
// Affiche toujours le titre de la bannière pour l'édition du thème
or ($this->getUrl(0) === 'theme' and $this->getUrl(1) === 'header')
): ?>
<span id="themeHeaderTitle">
<?php echo $this->getData(['locale', 'title']); ?>
</span>
<?php else: ?>
<span id="themeHeaderTitle">&nbsp;</span>
<?php endif; ?>
<?php else: ?>
<div id="featureContent">
<?php echo $this->getData(['theme', 'header', 'featureContent']); ?>
</div>
<?php endif; ?>
</header>
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '</a>' : ''; ?>
<?php endif; ?>
<!-- Menu dans le fond du site après la bannière -->
<?php if ($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?>
<nav>
<!-- Menu burger -->
<div id="toggle">
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
<?php echo template::ico('menu', ['fontSize' => '2em']); ?>
</div>
<!-- fin du menu burger -->
<?php
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
?>
<div id="menu" <?php echo $menuClass; ?>>
<?php $layout->showMenu(); ?>
</div>
</nav>
<?php endif; ?>
<!-- Site -->
<div id="site" class="container">
<?php if ($this->getData(['theme', 'menu', 'position']) === 'site-first'): ?>
<!-- Menu dans le site avant la bannière -->
<nav>
<!-- Menu dans le fond du site avant la bannière -->
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top' ): ?>
<!-- Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté -->
<?php
if ( $this->getData(['theme', 'menu', 'position']) === 'top'
AND $this->getData(['theme', 'menu', 'fixed']) === true
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getUser('group') > self::GROUP_MEMBER) {
echo '<nav id="navfixedconnected" >';
} else {
echo '<nav id="navfixedlogout" >';
}
?>
<!-- Menu Burger -->
<div id="toggle">
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
<?php echo template::ico('menu', ['fontSize' => '2em']); ?>
</div>
<div id="menu" class="container">
<?php $layout->showMenu(); ?>
</div>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div class="notranslate" id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div class="notranslate" id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
<?php echo template::ico('menu',null,null,'2em'); ?></div>
<!-- fin du menu burger -->
<?php
$menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
?>
<div id="menu" <?php echo $menuClass; ?> >
<?php $this->showMenu(); ?>
</div> <!--fin menu -->
</nav>
<?php endif; ?>
<?php if (
$this->getData(['theme', 'header', 'position']) === 'site'
// Affiche toujours la bannière pour l'édition du thème
or ($this->getData(['theme', 'header', 'position']) === 'hide'
and $this->getUrl(0) === 'theme'
)
): ?>
<!-- Bannière dans le site -->
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
<!-- Bannière dans le fond du site -->
<?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?>
<?php
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
$headerClass .= $this->getData(['theme', 'header', 'wide']) === 'none' ? '' : 'container';
?>
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"'; ?>>
<?php if ($this->getData(['theme', 'header', 'feature']) === 'wallpaper'): ?>
<?php if (
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"';?>>
<?php echo ($this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
<?php if ($this->getData(['theme','header','feature']) === 'wallpaper' ): ?>
<?php if(
$this->getData(['theme', 'header', 'textHide']) === false
// Affiche toujours le titre de la bannière pour l'édition du thème
or ($this->getUrl(0) === 'theme' and $this->getUrl(1) === 'header')
OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header')
): ?>
<span id="themeHeaderTitle">
<?php echo $this->getData(['locale', 'title']); ?>
</span>
<span class="notranslate" id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
<?php else: ?>
<span id="themeHeaderTitle">&nbsp;</span>
<span id="themeHeaderTitle">&nbsp;</span>
<?php endif; ?>
<?php else: ?>
<div id="featureContent">
<?php echo $this->getData(['theme', 'header', 'featureContent']); ?>
</diV>
<?php endif; ?>
<?php echo $this->getData(['theme','header','featureContent']);?>
</div>
<?php endif; ?>
</header>
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '</a>' : ''; ?>
<?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '</a>' : ''; ?>
<?php endif; ?>
<?php if (
$this->getData(['theme', 'menu', 'position']) === 'site-second' ||
$this->getData(['theme', 'menu', 'position']) === 'site'
// Affiche toujours le menu pour l'édition du thème
or ($this->getData(['theme', 'menu', 'position']) === 'hide'
and $this->getUrl(0) === 'theme'
)
): ?>
<!-- Menu dans le site après la bannière -->
<nav <?php if ($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone" <?php endif; ?>>
<!-- Menu dans le fond du site après la bannière -->
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?>
<nav>
<!-- Menu burger -->
<div id="toggle">
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
<?php echo template::ico('menu', ['fontSize' => '2em']); ?>
</div>
<div id="menu" class="container">
<?php $layout->showMenu(); ?>
</div>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div class="notranslate" id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div class="notranslate" id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
<?php echo template::ico('menu',null,null,'2em'); ?></div>
<!-- fin du menu burger -->
<?php
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
?>
<div id="menu" <?php echo $menuClass; ?> >
<?php $this->showMenu(); ?></div>
</nav>
<?php endif; ?>
<!-- Corps de page -->
<?php $layout->showMain(); ?>
<!-- footer -->
<?php $layout->showFooter(); ?>
<!-- Fin du site -->
<?php echo $this->getData(['theme', 'footer', 'position']) === 'site' ? '</div>' : ''; ?>
<!-- Lien remonter en haut -->
<div id="backToTop">
<?php echo template::ico('up'); ?>
</div>
<!-- Affichage du consentement aux cookies-->
<?php $layout->showCookies(); ?>
<!-- Les scripts -->
<?php $layout->showScript(); ?>
<!-- Script perso dans body -->
<?php if (file_exists(self::DATA_DIR . 'body.inc.html')) {
include(self::DATA_DIR . 'body.inc.html');
} ?>
</body>
</html>
<!-- Site -->
<div id="site" class="container">
<?php if($this->getData(['theme', 'menu', 'position']) === 'site-first'): ?>
<!-- Menu dans le site avant la bannière -->
<nav>
<div id="toggle">
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div class="notranslate" id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div class="notranslate" id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
<?php echo template::ico('menu',null,null,'2em'); ?></div>
<div id="menu" class="container"><?php $this->showMenu(); ?></div>
</nav>
<?php endif; ?>
<?php if(
$this->getData(['theme', 'header', 'position']) === 'site'
// Affiche toujours la bannière pour l'édition du thème
OR (
$this->getData(['theme', 'header', 'position']) === 'hide'
AND $this->getUrl(0) === 'theme'
)
): ?>
<!-- Bannière dans le site -->
<?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
<?php
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
?>
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"';?>>
<?php if ($this->getData(['theme','header','feature']) === 'wallpaper' ): ?>
<?php if(
$this->getData(['theme', 'header', 'textHide']) === false
// Affiche toujours le titre de la bannière pour l'édition du thème
OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header')
): ?>
<span class="notranslate" id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
<?php else: ?>
<span id="themeHeaderTitle">&nbsp;</span>
<?php endif; ?>
<?php else: ?>
<div id="featureContent">
<?php echo $this->getData(['theme','header','featureContent']);?>
</diV>
<?php endif; ?>
</header>
<?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '</a>' : ''; ?>
<?php endif; ?>
<?php if(
$this->getData(['theme', 'menu', 'position']) === 'site-second' ||
$this->getData(['theme', 'menu', 'position']) === 'site'
// Affiche toujours le menu pour l'édition du thème
OR (
$this->getData(['theme', 'menu', 'position']) === 'hide'
AND $this->getUrl(0) === 'theme'
)
): ?>
<!-- Menu dans le site après la bannière -->
<nav <?php if($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
<div id="toggle">
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div class="notranslate" id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div class="notranslate" id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
<?php echo template::ico('menu',null,null,'2em'); ?></div>
<div id="menu" class="container"><?php $this->showMenu(); ?></div>
</nav>
<?php endif; ?>
<!-- Corps de page -->
<?php $this->showSection();?>
<!-- footer -->
<?php $this->showFooter();?>
<!-- Fin du site -->
<?php echo $this->getData(['theme', 'footer', 'position']) === 'site'? '</div>' : '';?>
<!-- Lien remonter en haut -->
<div id="backToTop"><?php echo template::ico('up'); ?></div>
<!-- Affichage du consentement aux cookies-->
<?php $this->showCookies(); ?>
<!-- Les scripts -->
<?php $this->showScript();?>
</body>
</html>

594
core/module/addon/addon.php Normal file
View File

@ -0,0 +1,594 @@
<?php
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @author Sylvain Lelièvre <lelievresylvain@free.fr>
* @copyright Copyright (C) 2020-2021, Sylvain Lelièvre
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
class addon extends common {
public static $actions = [
'index' => self::GROUP_ADMIN,
'delete' => self::GROUP_ADMIN,
'export' => self::GROUP_ADMIN,
'import' => self::GROUP_ADMIN,
'store' => self::GROUP_ADMIN,
'item' => self::GROUP_ADMIN,
'upload' => self::GROUP_ADMIN,
'uploadItem'=> self::GROUP_ADMIN
];
// URL des modules
const BASEURL_STORE = 'https://store.zwiicms.fr/';
const MODULE_STORE = '?modules/';
// Gestion des modules
public static $modInstal = [];
// pour tests
public static $valeur = [];
// le catalogue
public static $storeList = [];
public static $storeItem = [];
/*
* Effacement d'un module installé et non utilisé
*/
public function delete() {
// Jeton incorrect
if ($this->getUrl(3) !== $_SESSION['csrf']) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'addon',
'state' => false,
'notification' => 'Action non autorisée'
]);
}
else{
// Suppression des dossiers
$infoModules = helper::getModules();
$module = $this->getUrl(2);
//Liste des dossiers associés au module non effacés
if( $this->removeDir('./module/'.$module ) === true ){
$success = true;
$notification = 'Module '. $module .' désinstallé';
if(($infoModules[$this->getUrl(2)]['dataDirectory']) ) {
if (
is_dir($infoModules[$this->getUrl(2)]['dataDirectory'])
&& !$this->removeDir($infoModules[$this->getUrl(2)]['dataDirectory'])
){
$notification = 'Module '.$module .' désinstallé, il reste des données dans ' . $infoModules[$this->getUrl(2)]['dataDirectory'];
}
}
}
else{
$success = false;
$notification = 'La suppression a échouée';
}
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'addon',
'notification' => $notification,
'state' => $success
]);
}
}
/***
* Installation d'un module
* Fonction utilisée par upload et storeUpload
*/
private function install ($moduleName, $checkValid){
$tempFolder = 'datamodules';//uniqid();
$zip = new ZipArchive();
if ($zip->open($moduleName) === TRUE) {
$notification = 'Archive ouverte';
mkdir (self::TEMP_DIR . $tempFolder, 0755);
$zip->extractTo(self::TEMP_DIR . $tempFolder );
// Archive de module ?
$success = false;
$notification = 'Ce n\'est pas l\'archive d\'un module !';
$moduleDir = self::TEMP_DIR . $tempFolder . '/module';
$moduleName = '';
if ( is_dir( $moduleDir )) {
// Lire le nom du module
if ($dh = opendir( $moduleDir )) {
while ( false !== ($file = readdir($dh)) ) {
if ($file != "." && $file != "..") {
$moduleName = $file;
}
}
closedir($dh);
}
// Module normalisé ?
if( is_file( $moduleDir.'/'.$moduleName.'/'.$moduleName.'.php' ) AND is_file( $moduleDir.'/'.$moduleName.'/view/index/index.php' ) ){
// Lecture de la version et de la validation d'update du module pour validation de la mise à jour
// Pour une version <= version installée l'utilisateur doit cocher 'Mise à jour forcée'
$version = '0.0';
$update = '0.0';
$valUpdate = false;
$file = file_get_contents( $moduleDir.'/'.$moduleName.'/'.$moduleName.'.php');
$file = str_replace(' ','',$file);
$file = str_replace("\t",'',$file);
$pos1 = strpos($file, 'constVERSION');
if( $pos1 !== false){
$posdeb = strpos($file, "'", $pos1);
$posend = strpos($file, "'", $posdeb + 1);
$version = substr($file, $posdeb + 1, $posend - $posdeb - 1);
}
$pos1 = strpos($file, 'constUPDATE');
if( $pos1 !== false){
$posdeb = strpos($file, "'", $pos1);
$posend = strpos($file, "'", $posdeb + 1);
$update = substr($file, $posdeb + 1, $posend - $posdeb - 1);
}
// Si version actuelle >= version indiquée dans UPDATE la mise à jour est validée
$infoModules = helper::getModules();
if( $infoModules[$moduleName]['update'] >= $update ) $valUpdate = true;
// Module déjà installé ?
$moduleInstal = false;
foreach($infoModules as $key=>$value ){
if($moduleName === $key){
$moduleInstal = true;
}
}
// Validation de la maj si autorisation du concepteur du module ET
// ( Version plus récente OU Check de forçage )
$valNewVersion = floatval($version);
$valInstalVersion = floatval( $infoModules[$moduleName]['version'] );
$newVersion = false;
if( $valNewVersion > $valInstalVersion ) $newVersion = true;
$validMaj = $valUpdate && ( $newVersion || $checkValid);
// Nouvelle installation ou mise à jour du module
if( ! $moduleInstal || $validMaj ){
// Copie récursive des dossiers
$this->copyDir( self::TEMP_DIR . $tempFolder, './' );
$success = true;
if( ! $moduleInstal ){
$notification = 'Module '.$moduleName.' installé';
}
else{
$notification = 'Module '.$moduleName.' mis à jour';
}
}
else{
$success = false;
if( $valNewVersion == $valInstalVersion){
$notification = ' Version détectée '.$version.' = à celle installée '.$infoModules[$moduleName]['version'];
}
else{
$notification = ' Version détectée '.$version.' < à celle installée '.$infoModules[$moduleName]['version'];
}
if( $valUpdate === false){
if( $infoModules[$moduleName]['update'] === $update ){
$notification = ' Mise à jour par ce procédé interdite par le concepteur du module';
}
else{
$notification = ' Mise à jour par ce procédé interdite, votre version est trop ancienne';
}
}
}
}
}
// Supprimer le dossier temporaire même si le module est invalide
$this->removeDir(self::TEMP_DIR . $tempFolder);
$zip->close();
} else {
// erreur à l'ouverture
$success = false;
$notification = 'Impossible d\'ouvrir l\'archive';
}
return(['success' => $success,
'notification'=> $notification
]);
}
/***
* Installation d'un module à partir du gestionnaire de fichier
*/
public function upload() {
// Soumission du formulaire
if($this->isPost()) {
// Installation d'un module
$checkValidMaj = $this->getInput('configModulesCheck', helper::FILTER_BOOLEAN);
$zipFilename = $this->getInput('configModulesInstallation', helper::FILTER_STRING_SHORT);
if( $zipFilename !== ''){
$success = [
'success' => false,
'notification'=> ''
];
$state = $this->install(self::FILE_DIR.'source/'.$zipFilename, $checkValidMaj);
}
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => $state['notification'],
'state' => $state['success']
]);
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Téléverser un module',
'view' => 'upload'
]);
}
/***
* Installation d'un module par le catalogue
*/
public function uploadItem() {
// Jeton incorrect
if ($this->getUrl(3) !== $_SESSION['csrf']) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'store',
'state' => false,
'notification' => 'Action non autorisée'
]);
} else {
// Récupérer le module en ligne
$moduleName = $this->getUrl(2);
// Informations sur les module en ligne
$store = json_decode(helper::getUrlContents(self::BASEURL_STORE . self::MODULE_STORE . 'list'), true);
// Url du module à télécharger
$moduleFilePath = $store[$moduleName]['file'];
// Télécharger le fichier
$moduleData = helper::getUrlContents(self::BASEURL_STORE . self::FILE_DIR . 'source/' . $moduleFilePath);
// Extraire de l'arborescence
$d = explode('/',$moduleFilePath);
$moduleFile = $d[count($d)-1];
// Créer le dossier modules
if (!is_dir(self::FILE_DIR . 'source/modules')) {
mkdir (self::FILE_DIR . 'source/modules', 0755);
}
// Sauver les données du fichiers
file_put_contents(self::FILE_DIR . 'source/modules/' . $moduleFile, $moduleData);
/**
* $if( $moduleFile !== ''){
* $success = [
* 'success' => false,
* 'notification'=> ''
* ];
* $state = $this->install(self::FILE_DIR.'source/modules/'.$moduleFile, false);
*}
*/
$this->addOutput([
'redirect' => helper::baseUrl() . 'addon/store',
'notification' => $moduleFile . ' téléchargé dans le dossier modules du gestionnaire de fichiers',
'state' => true
]);
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Catalogue de modules',
'view' => 'store'
]);
}
/**
* Catalogue des modules sur le site ZwiiCMS.fr
*/
public function store() {
$store = json_decode(helper::getUrlContents(self::BASEURL_STORE . self::MODULE_STORE . 'list'), true);
if ($store) {
// Modules installés
$infoModules = helper::getModules();
// Clés moduleIds dans les pages
$inPages = helper::arrayCollumn($this->getData(['page']),'moduleId', 'SORT_DESC');
foreach( $inPages as $key=>$value){
$inPagesTitle[ $this->getData(['page', $key, 'title' ]) ] = $value;
}
// Parcourir les données des modules
foreach ($store as $key=>$value) {
// Module non installé
$ico = template::ico('download');
$class = '';
// Le module est installé
if (array_key_exists($key,$infoModules) === true) {
$class = 'buttonGreen';
$ico = template::ico('update');
}
// Le module est installé et utilisé
if (in_array($key,$inPages) === true) {
$class = 'buttonRed';
$ico = template::ico('update');
}
self::$storeList [] = [
$store[$key]['category'],
'<a href="' . self::BASEURL_STORE . self::MODULE_STORE . $key . '" target="_blank" >'.$store[$key]['title'].'</a>',
$store[$key]['version'],
mb_detect_encoding(strftime('%d %B %Y', $store[$key]['versionDate']), 'UTF-8', true)
? strftime('%d %B %Y', $store[$key]['versionDate'])
: utf8_encode(strftime('%d %B %Y', $store[$key]['versionDate'])),
implode(', ', array_keys($inPagesTitle,$key)),
template::button('moduleExport' . $key, [
'class' => $class,
'href' => helper::baseUrl(). $this->getUrl(0) . '/uploadItem/' . $key.'/' . $_SESSION['csrf'],// appel de fonction vaut exécution, utiliser un paramètre
'value' => $ico
])
];
}
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Catalogue de modules en ligne',
'view' => 'store'
]);
}
/**
* Détail d'un objet du catalogue
*/
public function item() {
$store = json_decode(helper::getUrlContents(self::BASEURL_STORE . self::MODULE_STORE . 'list'), true);
self::$storeItem = $store [$this->getUrl(2)] ;
self::$storeItem ['fileDate'] = mb_detect_encoding(strftime('%d %B %Y',self::$storeItem ['fileDate']), 'UTF-8', true)
? strftime('%d %B %Y', self::$storeItem ['fileDate'])
: utf8_encode(strftime('%d %B %Y', self::$storeItem ['fileDate']));
// Valeurs en sortie
$this->addOutput([
'title' =>'Module ' . self::$storeItem['title'],
'view' => 'item'
]);
}
/**
* Gestion des modules
*/
public function index() {
// Lister les modules
// $infoModules[nom_module]['realName'], ['version'], ['update'], ['delete'], ['dataDirectory']
$infoModules = helper::getModules();
// Clés moduleIds dans les pages
$inPages = helper::arrayCollumn($this->getData(['page']),'moduleId', 'SORT_DESC');
foreach( $inPages as $key=>$value){
$inPagesTitle[ $this->getData(['page', $key, 'title' ]) ] = $value;
}
// Parcourir les données des modules
foreach ($infoModules as $key=>$value) {
// Construire le tableau de sortie
self::$modInstal[] = [
$key,
$infoModules[$key]['realName'],
$infoModules[$key]['version'],
implode(', ', array_keys($inPagesTitle,$key)),
//|| ('delete',$infoModules[$key]) && $infoModules[$key]['delete'] === true && implode(', ',array_keys($inPages,$key)) === ''
$infoModules[$key]['delete'] === true && implode(', ',array_keys($inPages,$key)) === ''
? template::button('moduleDelete' . $key, [
'class' => 'moduleDelete buttonRed',
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $key . '/' . $_SESSION['csrf'],
'value' => template::ico('cancel')
])
: '',
implode(', ',array_keys($inPages,$key)) !== ''
? template::button('moduleExport' . $key, [
'href' => helper::baseUrl(). $this->getUrl(0) . '/export/' . $key . '/' . $_SESSION['csrf'],// appel de fonction vaut exécution, utiliser un paramètre
'value' => template::ico('download')
])
: '',
implode(', ',array_keys($inPages,$key)) === ''
? template::button('moduleExport' . $key, [
'href' => helper::baseUrl(). $this->getUrl(0) . '/import/' . $key . '/' . $_SESSION['csrf'],// appel de fonction vaut exécution, utiliser un paramètre
'value' => template::ico('upload')
])
: ''
];
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Gestion des modules',
'view' => 'index'
]);
}
/*
* Export des données d'un module externes ou interne à module.json
*/
public function export(){
// Jeton incorrect
if ($this->getUrl(3) !== $_SESSION['csrf']) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'addon',
'state' => false,
'notification' => 'Action non autorisée'
]);
}
else {
// Lire les données du module
$infoModules = helper::getModules();
// Créer un dossier par défaut
$tmpFolder = self::TEMP_DIR . uniqid();
//$tmpFolder = self::TEMP_DIR . 'test';
if (!is_dir($tmpFolder)) {
mkdir($tmpFolder, 0755);
}
// Clés moduleIds dans les pages
$inPages = helper::arrayCollumn($this->getData(['page']),'moduleId', 'SORT_DESC');
// Parcourir les pages utilisant le module
foreach (array_keys($inPages,$this->getUrl(2)) as $pageId) {
// Export des pages hébergeant le module
$pageParam[$pageId] = $this->getData(['page',$pageId]);
// Export du contenu de la page
//$pageContent[$pageId] = file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $pageId, 'content']));
$pageContent[$pageId] = $this->getPage($pageId, self::$i18n);
// Export de fr/module.json
$moduleId = 'fr/module.json';
$moduleDir = str_replace('site/data/','',$infoModules[$this->getUrl(2)]['dataDirectory']);
// Création de l'arborescence des langues
// Pas de nom dossier de langue - dossier par défaut
$t = explode ('/',$moduleId);
if ( is_array($t)) {
$lang = 'fr';
} else {
$lang = $t[0];
}
// Créer le dossier temporaire si inexistant sinon le nettoie et le créer
if (!is_dir($tmpFolder . '/' . $lang)) {
mkdir ($tmpFolder . '/' . $lang, 0755, true);
} else {
$this->removeDir($tmpFolder . '/' . $lang);
mkdir ($tmpFolder . '/' . $lang, 0755, true);
}
// Créer le dossier temporaire des données du module
if ($infoModules[$this->getUrl(2)]['dataDirectory']) {
if (!is_dir($tmpFolder . '/' . $moduleDir)) {
mkdir ($tmpFolder . '/' . $moduleDir, 0755, true) ;
}
}
// Sauvegarde si données non vides
$tmpData [$pageId] = $this->getData(['module',$pageId ]);
if ($tmpData [$pageId] !== null) {
file_put_contents($tmpFolder . '/' . $moduleId, json_encode($tmpData));
}
// Export des données localisées dans le dossier de données du module
if ($infoModules[$this->getUrl(2)]['dataDirectory'] &&
is_dir($infoModules[$this->getUrl(2)]['dataDirectory'])) {
$this->copyDir ($infoModules[$this->getUrl(2)]['dataDirectory'], $tmpFolder . '/' . $moduleDir);
}
}
// Enregistrement des pages dans le dossier de langue identique à module
if (!file_exists($tmpFolder . '/' . $lang . '/page.json')) {
file_put_contents($tmpFolder . '/' . $lang . '/page.json', json_encode($pageParam));
mkdir ($tmpFolder . '/' . $lang . '/content', 0755);
file_put_contents($tmpFolder . '/' . $lang . '/content/' . $this->getData(['page', $pageId, 'content']), $pageContent);
}
// création du zip
$fileName = $this->getUrl(2) . '.zip';
$this->makeZip ($fileName, $tmpFolder, []);
if (file_exists($fileName)) {
ob_start();
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . $fileName . '"');
header('Content-Length: ' . filesize($fileName));
ob_clean();
ob_end_flush();
readfile( $fileName);
unlink($fileName);
$this->removeDir($tmpFolder);
exit();
} else {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'addon',
'notification' => 'Quelque chose s\'est mal passé',
'state' => false
]);
}
}
}
/*
* Importer des données d'un module externes ou interne à module.json
*/
public function import(){
// Jeton incorrect
if ($this->getUrl(3) !== $_SESSION['csrf']) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'addon',
'state' => false,
'notification' => 'Action non autorisée'
]);
}
else {
// Soumission du formulaire
if($this->isPost()) {
// Récupérer le fichier et le décompacter
$zipFilename = $this->getInput('addonImportFile', helper::FILTER_STRING_SHORT, true);
$tempFolder = uniqid();
mkdir (self::TEMP_DIR . $tempFolder, 0755);
$zip = new ZipArchive();
if ($zip->open(self::FILE_DIR . 'source/' . $zipFilename) === TRUE) {
$zip->extractTo(self::TEMP_DIR . $tempFolder );
}
// Import des données localisées page.json et module.json
// Pour chaque dossier localisé
$dataTarget = array();
$dataSource = array();
// Liste des pages de même nom dans l'archive et le site
$list = '';
foreach (self::$i18nList as $key=>$value) {
// Les Pages et les modules
foreach (['page','module'] as $fileTarget){
if (file_exists(self::TEMP_DIR . $tempFolder . '/' .$key . '/' . $fileTarget . '.json')) {
// Le dossier de langue existe
// faire la fusion
$dataSource = json_decode(file_get_contents(self::TEMP_DIR . $tempFolder . '/' .$key . '/' . $fileTarget . '.json'), true);
// Des pages de même nom que celles de l'archive existent
if( $fileTarget === 'page' ){
foreach( $dataSource as $keydataSource=>$valuedataSource ){
foreach( $this->getData(['page']) as $keypage=>$valuepage ){
if( $keydataSource === $keypage){
$list === '' ? $list .= ' '.$this->getData(['page', $keypage, 'title']) : $list .= ', '.$this->getData(['page', $keypage, 'title']);
}
}
}
}
$dataTarget = json_decode(file_get_contents(self::DATA_DIR . $key . '/' . $fileTarget . '.json'), true);
$data [$fileTarget] = array_merge($dataTarget[$fileTarget], $dataSource);
if( $list === ''){
file_put_contents(self::DATA_DIR . '/' .$key . '/' . $fileTarget . '.json', json_encode( $data ,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT|LOCK_EX) );
}
// copie du contenu de la page
$this->copyDir (self::TEMP_DIR . $tempFolder . '/' .$key . '/content', self::DATA_DIR . '/' .$key . '/content');
// Supprimer les fichiers importés
unlink (self::TEMP_DIR . $tempFolder . '/' .$key . '/' . $fileTarget . '.json');
}
}
}
// Import des fichiers placés ailleurs que dans les dossiers localisés.
$this->copyDir (self::TEMP_DIR . $tempFolder,self::DATA_DIR );
// Supprimer le dossier temporaire
$this->removeDir(self::TEMP_DIR . $tempFolder);
$zip->close();
if( $list !== '' ){
$success = false;
strpos( $list, ',') === false ? $notification = 'Import impossible la page suivante doit être renommée :'.$list : $notification = 'Import impossible les pages suivantes doivent être renommées :'.$list;
}
else{
$success = true;
$notification = 'Import réussi';
}
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'addon',
'state' => $success,
'notification' => $notification
]);
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Importer des données de module',
'view' => 'import'
]);
}
}
}

View File

@ -7,8 +7,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

View File

@ -0,0 +1,31 @@
<?php echo template::formOpen('addonImportForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('addonImportBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'addon',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('addonImportSubmit', [
'value' => 'Appliquer'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Installer des données de module</h4>
<div class="row">
<div class="col6 offset3">
<?php echo template::file('addonImportFile', [
'label' => 'Archive ZIP :',
'type' => 2
]); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -7,8 +7,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

View File

@ -0,0 +1,8 @@
<h3>MODULES INSTALLES</h3>
Les modules installés sont listés dans le tableau avec leur nom usuel (alias) et leur numéro de version.
Si le module est utilisé le nom de la page ou des pages apparaît, dans le cas contraire une icône permet de le supprimer.
<h3>EXPORTER IMPORTER</h3>
<p>Exporter produit une archive au nom du module contenant les pages concernées ainsi que les données et ressources utilisées par le module dans ces pages.</p>
<p>Vous pouvez vous en servir comme d'une sauvegarde partielle ou pour transférer les pages et les données du module vers un autre site.</p>
<p>Une fois le module installé l'import permet de restaurer les pages et les données sauvegardées. Vous devrez avoir au préalable transféré le fichier zip d'un export sur votre serveur par 'Gérer les fichiers'.
Si une page de même nom existe sur votre site vous serez invité à modifier son nom.</p>

View File

@ -0,0 +1,22 @@
/**
* This file is part of Zwii.
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
/**
* Confirmation de suppression
*/
$(".moduleDelete").on("click", function() {
var _this = $(this);
return core.confirm("Êtes-vous sûr de vouloir supprimer ce module ?", function() {
$(location).attr("href", _this.attr("href"));
});
});

View File

@ -0,0 +1,40 @@
<div class="row">
<div class="col2">
<?php echo template::button('configModulesBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl(),
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2">
<?php echo template::button('configModulesHelp', [
'href' => 'https://doc.zwiicms.fr/les-modules',
'target' => '_blank',
'ico' => 'help',
'value' => 'Aide',
'class' => 'buttonHelp'
]); ?>
</div>
<div class="col2 offset4">
<?php echo template::button('configModulesStore', [
'href' => helper::baseUrl() . 'addon/store',
'value' => 'Catalogue en ligne'
]); ?>
</div>
<div class="col2">
<?php echo template::button('configStoreUpload', [
'href' => helper::baseUrl() . 'addon/upload',
'value' => 'Installer'
]); ?>
</div>
</div>
<!-- Aide à propos de la gestion des modules, view index -->
<div class="helpDisplayContent">
<?php echo file_get_contents( 'core/module/addon/view/index/index.help.html') ;?>
</div>
<?php if($module::$modInstal): ?>
<?php echo template::table([2, 2, 2, 2, 1, 1, 1], $module::$modInstal, ['Module installé', 'Alias', 'Version', 'Page(s)', 'Supprimer', 'Exporter', 'Importer']); ?>
<?php else: ?>
<?php echo template::speech('Aucun module installé.'); ?>
<?php endif; ?>

View File

@ -7,8 +7,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

View File

@ -0,0 +1,41 @@
<div class="row">
<div class="col9">
<div class="row">
<div class="col12">
<?php echo $module::$storeItem['content']; ?>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<?php
echo '<img class="downloadItemPicture" src="' . $module::BASEURL_STORE . 'site/file/source/' . $module::$storeItem['picture'] .
'" alt="' . $module::$storeItem['picture'] . '">';
?>
</div>
</div>
<div class="row">
<div class="col12 textAlignCenter">
<?php echo 'Version n°' . $module::$storeItem['fileVersion']; ?>
</div>
</div>
<div class="row">
<div class="col12 textAlignCenter">
<?php echo ' du ' . $module::$storeItem['fileDate']; ?>
</div>
</div>
<div class="row">
<div class="col12 textAlignCenter">
<span>Auteur :
<?php echo $module::$storeItem['fileAuthor']; ?>
</span>
</div>
</div>
<div class="row">
<div class="col12 textAlignCenter">
<span>Licence :
<?php echo $module::$storeItem['fileLicense']; ?>
</span>
</div>
</div>
</div>

View File

@ -7,8 +7,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

View File

@ -0,0 +1,15 @@
<div class="row">
<div class="col2">
<?php echo template::button('configStoreBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'addon/upload',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
</div>
<?php if($module::$storeList): ?>
<?php echo template::table([2, 2, 1, 2, 2, 2, 1], $module::$storeList, ['Catégorie', 'Module', 'Version', 'Date', 'Pages', 'Télécharger ou <br> Mettre à jour']); ?>
<?php else: ?>
<?php echo template::speech('Le catalogue est vide.'); ?>
<?php endif; ?>

View File

@ -7,8 +7,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

View File

@ -0,0 +1,6 @@
<h3>INSTALLER OU METTRE A JOUR</h3>
<p>Avant de choisir le fichier ZIP du module à installer vous devez le télécharger sur votre serveur en utilisant le 'Catalogue en ligne'.</p>
<p>D'autres modules sont également disponibles sur le <a href="https://forum.zwiicms.fr/categories/t%C3%A9l%C3%A9chargements-de-modules" target="_blank" rel="noopener">forum de ZwiiCMS</a>,
téléversez les sur votre serveur avec 'Gérer les fichiers'.</p>
<p>Lors d'une mise à jour Zwii contrôle la version du module à installer, pour réinstaller un module de même numéro de version vous devez cocher 'Mise à jour forcée'.
Il est déconseillé d'installer un module plus ancien.</p>

View File

@ -0,0 +1,52 @@
<?php echo template::formOpen('configModulesUpload'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('configModulesBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'addon',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2">
<?php echo template::button('addonIndexHelp', [
'class' => 'buttonHelp',
'ico' => 'help',
'value' => 'Aide'
]); ?>
</div>
<div class="col2 offset6">
<?php echo template::submit('configModulesSubmit',[
'value' => 'Valider',
'ico' => 'check'
]); ?>
</div>
</div>
<!-- Aide à propos de la gestion des modules, view upload -->
<div class="helpDisplayContent">
<?php echo file_get_contents( 'core/module/addon/view/upload/upload.help.html') ;?>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Installer ou mettre à jour un module téléchargé </h4>
<div class="row">
<div class="col6 offset3">
<?php echo template::file('configModulesInstallation', [
'label' => 'Archive ZIP :',
'type' => 2
]); ?>
</div>
</div>
<div class="row">
<div class="col4 offset3">
<?php echo template::checkbox('configModulesCheck', true, 'Mise à jour forcée', [
'checked' => false,
'help' => 'Permet de forcer une mise à jour même si la version du module est inférieure ou égale à celle du module installé.',
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +0,0 @@
<Files "data.key">
Order Allow,Deny
Deny from all
</Files>

View File

@ -1,47 +0,0 @@
<?php
/*
Ce script PHP est conçu pour être appelé via une requête HTTP GET avec une clé spécifique pour déclencher la création d'une archive ZIP de sauvegarde.
Exemple d'appel dans une URL :
http://example.com/chemin/vers/autobackup.php?key=your_secret_key
La clé doit être fournie en tant que paramètre "key" dans l'URL et correspondre à celle stockée dans le fichier "data.key" pour que la création de l'archive soit autorisée. Si la clé est valide, le script parcourt le répertoire spécifié et ajoute les fichiers à l'archive ZIP. Si la clé est invalide ou absente, le script affiche un message d'erreur et termine son exécution.
*/
// Vérification de la clé
if (isset ($_GET['key'])) {
$key = $_GET['key'];
$storedKey = file_get_contents('data.key');
if ($key !== $storedKey) {
http_response_code(401);
exit();
}
// Création du ZIP
$filter = ['backup', 'tmp'];
$fileName = date('Y-m-d-H-i-s', time()) . '-rolling-backup.zip';
$zip = new ZipArchive();
$zip->open('../../../../site/backup/' . $fileName, ZipArchive::CREATE | ZipArchive::OVERWRITE);
$directory = '../../../../site';
$files = new RecursiveIteratorIterator(
new RecursiveCallbackFilterIterator(
new RecursiveDirectoryIterator(
$directory,
RecursiveDirectoryIterator::SKIP_DOTS
),
function ($fileInfo, $key, $iterator) use ($filter) {
return $fileInfo->isFile() || !in_array($fileInfo->getBaseName(), $filter);
}
)
);
foreach ($files as $name => $file) {
if (!$file->isDir()) {
$filePath = $file->getRealPath();
$relativePath = substr($filePath, strlen(realpath($directory)) + 1);
$zip->addFile($filePath, $relativePath);
}
}
$zip->close();
http_response_code(201);
}

View File

@ -1,49 +0,0 @@
<?php
/*
Ce script PHP est conçu pour supprimer les fichiers ayant l'extension 'tar.gz' dans un répertoire de sauvegarde si leur dernière modification remonte à un certain nombre de jours spécifié via une requête HTTP GET.
Exemple d'appel dans une URL avec le nombre de jours spécifié :
http://example.com/chemin/vers/script.php?days=7&key=your_secret_key
Le script vérifie également la présence et la validité d'une clé spécifique pour déclencher son exécution. La clé doit être fournie en tant que paramètre "key" dans l'URL et correspondre à celle stockée dans le fichier "data.key" pour que la suppression des fichiers soit autorisée. Si la clé est invalide ou absente, le script affiche un message d'erreur et termine son exécution.
*/
// Vérification de la clé
if (isset ($_GET['key'])) {
// Récupération de la clé fournie en GET
$key = $_GET['key'];
// Récupération de la clé stockée dans le fichier data.key
$storedKey = file_get_contents('data.key');
// Vérification de correspondance entre les clés
if ($key !== $storedKey) {
http_response_code(401);
exit();
}
// Récupère le nombre de jours à partir de la variable GET 'days'
$days = isset ($_GET['days']) ? (int) $_GET['days'] : 1; // Par défaut à 1 si non spécifié
// Chemin vers le répertoire contenant les fichiers
$directory = '../../../../site/backup/'; // Remplacez par le chemin réel
// Convertit le nombre de jours en secondes
$timeLimit = strtotime("-$days days");
// Crée un nouvel objet DirectoryIterator
foreach (new DirectoryIterator($directory) as $file) {
// Vérifie si l'élément courant est un fichier et a l'extension 'tar.gz'
if ($file->isFile() && $file->getExtension() === 'tar.gz') {
// Vérifie si le fichier a été modifié avant la limite de temps
if ($file->getMTime() < $timeLimit) {
// Supprime le fichier
unlink($file->getRealPath());
}
}
}
// Si la clé est manquante, affiche un message d'erreur et arrête l'exécution du script
http_response_code(201);
}

View File

@ -7,8 +7,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

View File

@ -5,8 +5,50 @@
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
$(document).ready((function(){$("#configBackupForm").submit((function(e){e.preventDefault();var url="<?php echo helper::baseUrl() . $this->getUrl(0); ?>/backup",message_success="<?php echo helper::translate('Sauvegarde générée avec succès'); ?>",message_error="<?php echo helper::translate('Erreur : sauvegarde non générée !'); ?>",message_title="<?php echo helper::translate('Sauvegarder'); ?>";$.ajax({type:"POST",url:url,data:$("form").serialize(),success:function(data){$("body, .button").css("cursor","default"),core.alert(message_success)},error:function(data){$("body, .button").css("cursor","default"),core.alert(message_error)},complete:function(){$("#configBackupSubmit").removeClass("disabled").prop("disabled",!1),$("#configBackupSubmit").removeClass("uniqueSubmission").prop("uniqueSubmission",!1),$("#configBackupSubmit span").removeClass("zwiico-spin animate-spin"),$("#configBackupSubmit span").addClass("zwiico-check zwiico-margin-right").text(message_title)}})})),$("#configBackupSubmit").on("click",(function(){if($("input[name=configBackupOption]").is(":checked")){var message_warning="<?php echo helper::translate('La sauvegarde des fichiers peut prendre du temps. Continuer ?'); ?>";return core.confirm(message_warning,(function(){$("body, .button").css("cursor","wait"),$("form#configBackupForm").submit()}))}}))}));
$( document).ready(function() {
$("#configBackupForm").submit( function(e){
//$("#configBackupSubmit").addClass("disabled").prop("disabled", true);
e.preventDefault();
var url = "<?php echo helper::baseUrl() . $this->getUrl(0); ?>/backup";
$.ajax({
type: "POST",
url: url,
data: $("form").serialize(),
success: function(data){
$('body, .button').css('cursor', 'default');
core.alert("La sauvegarde a été générée avec succès.");
},
error: function(data){
$('body, .button').css('cursor', 'default');
core.alert("Une erreur s'est produite, la sauvegarde n'a pas été générée !");
},
complete: function(){
$("#configBackupSubmit").removeClass("disabled").prop("disabled", false);
$("#configBackupSubmit").removeClass("uniqueSubmission").prop("uniqueSubmission", false);
$("#configBackupSubmit span").removeClass("zwiico-spin animate-spin");
$("#configBackupSubmit span").addClass("zwiico-check zwiico-margin-right").text("Sauvegarder");
}
});
});
/**
* Confirmation de sauvegarde complète
*/
$("#configBackupSubmit").on("click", function() {
if ($("input[name=configBackupOption]").is(':checked')) {
return core.confirm("Une sauvegarde avec le contenu du gestionnaire de fichier peut prendre du temps à générer. Confirmez-vous ?", function() {
//$(location).attr("href", _this.attr("href"));
$('body, .button').css('cursor', 'wait');
$('form#configBackupForm').submit();
});
}
});
});

View File

@ -1,14 +1,15 @@
<?php echo template::formOpen('configBackupForm'); ?>
<div class="row">
<div class="col1">
<div class="col2">
<?php echo template::button('configBackupBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config',
'value' => template::ico('left')
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset9">
<?php echo template::submit('configBackupSubmit', [
<div class="col2 offset8">
<?php echo template::submit('configBackupSubmit',[
'value' => 'Sauvegarder',
'uniqueSubmission' => true
]); ?>
@ -17,8 +18,7 @@
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Paramètres de la sauvegarde'); ?>
</h4>
<h4>Paramètres de la sauvegarde</h4>
<div class="row">
<div class="col12">
<?php echo template::checkbox('configBackupOption', true, 'Inclure le contenu du gestionnaire de fichiers', [
@ -27,10 +27,10 @@
]); ?>
</div>
<div class="col12">
<em>L'archive est générée dans <a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=backup&type=0&akey=<?php echo md5_file(self::DATA_DIR . 'core.json'); ?>&lang=<?php echo $this->getData(['user', $this->getUser('id'), 'language']);?>" data-lity>le dossier Backup</a> du gestionnaire de fichiers.</em>
<em>L'archive est générée dans <a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=backup&type=0&akey=<?php echo md5_file(self::DATA_DIR.'core.json'); ?>" data-lity>le dossier Backup</a> du gestionnaire de fichiers.</em>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>
<?php echo template::formClose(); ?>

View File

@ -1,54 +1,62 @@
<div id="connectContainer" class="tabContent">
<div id="connectContainer">
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Sécurité de la connexion'); ?>
<!--<span id="specialeHelpButton" class="helpDisplayButton">
<h4>Sécurité de la connexion
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/connexion" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php // echo template::ico('help', ['margin' => 'left']); ?>
<?php echo template::ico('help', 'left');?>
</a>
</span>-->
</span>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('connectShowPassword', true, 'Dévoiler le mot de passe', [
'checked' => $this->getData(['config', 'connect', 'showPassword']),
'help' => 'Le survol d\'une icône de l\'écran de connexion affiche temporairement le mot de passe.'
]); ?>
<div class="col3">
<?php echo template::checkbox('connectCaptcha', true, 'Captcha à la connexion', [
'checked' => $this->getData(['config', 'connect','captcha'])
]); ?>
<?php echo template::checkbox('connectCaptchaStrong', true, 'Captcha complexe', [
'checked' => $this->getData(['config', 'connect', 'captchaStrong']),
'help' => 'Option recommandée pour sécuriser la connexion. S\'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.'
]); ?>
</div>
</div>
<div class="col4">
<div class="col3">
<?php echo template::select('connectCaptchaType', $module::$captchaTypes , [
'label' => 'Type de captcha',
'selected' => $this->getData(['config', 'connect', 'captchaType'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('connectAutoDisconnect', true, 'Déconnexion automatique', [
'checked' => $this->getData(['config', 'connect', 'autoDisconnect']),
'help' => 'Déconnecte les sessions ouvertes précédemment sur d\'autres navigateurs ou terminaux. Activation recommandée.'
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('connectRedirectLogin', true, 'Redirection vers la connexion', [
'checked' => $this->getData(['config', 'connect', 'redirectLogin']),
'help' => 'Cette redirection ne concerne que les pages d\'administration du site.'
<div class="col3">
<?php echo template::checkbox('connectShowPassword', true, 'Dévoiler le mot de passe', [
'checked' => $this->getData(['config', 'connect', 'showPassword']),
'help' => 'Dans l\'écran de connexion, active une icône dont le survol affiche temporairement le mot de passe.'
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::select('connectAttempt', $module::$connectAttempt, [
'label' => 'Limitation des tentatives',
<?php echo template::select('connectAttempt', $module::$connectAttempt , [
'label' => 'Connexions successives',
'selected' => $this->getData(['config', 'connect', 'attempt'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('connectTimeout', $module::$connectTimeout, [
<?php echo template::select('connectTimeout', $module::$connectTimeout , [
'label' => 'Blocage après échecs',
'selected' => $this->getData(['config', 'connect', 'timeout'])
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<label id="helpBlacklist"><?php echo helper::translate('Liste noire'); ?>
<label id="helpBlacklist">Liste noire :
<?php echo template::help(
'La liste noire énumère les tentatives de connexion à partir de comptes inexistants. Sont stockés : la date, l\'heure, le nom du compte et l\'IP.
Après le nombre de tentatives autorisées, l\'IP et le compte sont bloqués.'
);
'La liste noire énumère les tentatives de connexion à partir de comptes inexistants. Sont stockés : la date, l\'heure, le nom du compte et l\'IP.
Après le nombre de tentatives autorisées, l\'IP et le compte sont bloqués.');
?>
</label>
<?php echo template::button('ConnectBlackListDownload', [
@ -62,26 +70,7 @@
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'config/blacklistReset',
'value' => 'Réinitialiser la liste',
'ico' => 'trash'
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::checkbox('connectCaptcha', true, 'Captcha à la connexion', [
'checked' => $this->getData(['config', 'connect', 'captcha'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('connectCaptchaStrong', true, 'Captcha complexe', [
'checked' => $this->getData(['config', 'connect', 'captchaStrong']),
'help' => 'Option recommandée pour sécuriser la connexion. S\'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.'
]); ?>
</div>
<div class="col3">
<?php echo template::select('connectCaptchaType', $module::$captchaTypes, [
'label' => 'Type de captcha',
'selected' => $this->getData(['config', 'connect', 'captchaType'])
'ico' => 'cancel'
]); ?>
</div>
</div>
@ -91,13 +80,12 @@
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Journalisation'); ?>
<!--<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/journalisation" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php // echo template::ico('help', ['margin' => 'left']); ?>
<h4>Journalisation
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/journalisation" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
</a>
</span>
-->
</h4>
<div class="row">
<div class="col3">
@ -110,7 +98,7 @@
'label' => 'Anonymat des adresses IP',
'selected' => $this->getData(['config', 'connect', 'anonymousIp']),
'help' => 'La règlementation française impose un anonymat de niveau 2'
]); ?>
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('ConfigLogDownload', [
@ -124,11 +112,11 @@
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'config/logReset',
'value' => 'Réinitialiser le journal',
'ico' => 'trash'
'ico' => 'cancel'
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -7,8 +7,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
@ -21,47 +21,11 @@
display: block;
}
.activeButton {
filter : brightness(150%);
}
.buttonNotice {
border: 2px solid red !important;
border: 2px solid red !important;
border-radius: 2px;
}
/* Style the tab */
.tab {
margin-top: 1.8em;
overflow: hidden;
text-align: center;
}
.tab~.tabContent {
margin-top: -10px;
}
.buttonTab {
display: inline-block;
transition: 0.3s;
border-radius: 10px 10px 0px 0px;
width: 160px;
margin: 0 1px;
}
.buttonTab:hover {
filter: saturate(200%);
}
.activeButton {
background-color: #00BFFF;
}
.greenInfo, .redInfo {
font-weight: bold;
}
.greenInfo {
color: green;
}
.redInfo {
color: red;
}
}

View File

@ -5,24 +5,12 @@
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
$(document).ready(function () {
/**
* Confirmation de suppression
*/
$("#configBackupDelButton").on("click", function () {
var _this = $(this);
var message_warning = "<?php echo helper::translate('Supprimer toutes les sauvegardes automatiques ?'); ?>";
return core.confirm(message_warning, function () {
$(location).attr("href", _this.attr("href"));
});
});
$( document).ready(function() {
// Positionnement inital des options
//-----------------------------------------------------------------------------------------------------
@ -57,36 +45,36 @@ $(document).ready(function () {
$("#connectCaptchaStrongWrapper").addClass("disabled");
$("#connectCaptchaStrongWrapper").slideDown();
$("#connectCaptchaTypeWrapper").addClass("disabled");
$("#connectCaptchaTypeWrapper").slideDown();
$("#connectCaptchaTypeWrapper").slideDown();
} else {
$("#connectCaptchaStrongWrapper").removeClass("disabled");
$("#connectCaptchaStrongWrapper").slideUp();
$("#connectCaptchaTypeWrapper").removeClass("disabled");
$("#connectCaptchaTypeWrapper").slideUp();
$("#connectCaptchaStrong").prop("checked", false);
$( "#connectCaptchaStrong" ).prop( "checked", false );
}
var configLayout = getCookie("configLayout");
if (configLayout == null) {
configLayout = "setup";
setCookie("configLayout", "setup");
setCookie("configLayout","setup");
}
$("#localeContainer").hide();
$("#socialContainer").hide();
$("#connectContainer").hide();
$("#networkContainer").hide();
$("#setupContainer").hide();
$("#" + configLayout + "Container").show();
$("#" + configLayout + "Container" ).show();
$("#config" + capitalizeFirstLetter(configLayout) + "Button").addClass("activeButton");
// Gestion des événements
//---------------------------------------------------------------------------------------------------------------------
/**
/**
* Afficher et masquer options smtp
*/
$("input[name=smtpEnable]").on("change", function () {
$("input[name=smtpEnable]").on("change", function() {
if ($("input[name=smtpEnable]").is(':checked')) {
$("#smtpParam").addClass("disabled");
$("#smtpParam").slideDown();
@ -100,7 +88,7 @@ $(document).ready(function () {
* Afficher et masquer options Auth
*/
$("select[name=smtpAuth]").on("change", function () {
$("select[name=smtpAuth]").on("change", function() {
if ($("select[name=smtpAuth]").val() == true) {
$("#smtpAuthParam").addClass("disabled");
$("#smtpAuthParam").slideDown();
@ -114,7 +102,7 @@ $(document).ready(function () {
* Options de blocage de connexions
* Contrôle la cohérence des sélections et interdit une seule valeur Aucune
*/
$("select[name=connectAttempt]").on("change", function () {
$("select[name=connectAttempt]").on("change", function() {
if ($("select[name=connectAttempt]").val() === "999") {
$("select[name=connectTimeout]").val(0);
} else {
@ -123,7 +111,7 @@ $(document).ready(function () {
}
}
});
$("select[name=connectTimeout]").on("change", function () {
$("select[name=connectTimeout]").on("change", function() {
if ($("select[name=connectTimeout]").val() === "0") {
$("select[name=connectAttempt]").val(999);
} else {
@ -136,20 +124,20 @@ $(document).ready(function () {
/**
* Captcha strong si captcha sélectionné
*/
$("input[name=connectCaptcha]").on("change", function () {
$("input[name=connectCaptcha]").on("change", function() {
if ($("input[name=connectCaptcha]").is(':checked')) {
$("#connectCaptchaStrongWrapper").addClass("disabled");
$("#connectCaptchaStrongWrapper").slideDown();
$("#connectCaptchaTypeWrapper").addClass("disabled");
$("#connectCaptchaTypeWrapper").slideDown();
$("#connectCaptchaTypeWrapper").slideDown();
} else {
$("#connectCaptchaStrongWrapper").removeClass("disabled");
$("#connectCaptchaStrongWrapper").slideUp();
$("#connectCaptchaTypeWrapper").removeClass("disabled");
$("#connectCaptchaTypeWrapper").slideUp();
$("#connectCaptchaStrong").prop("checked", false);
$( "#connectCaptchaStrong" ).prop( "checked", false );
}
});
@ -157,153 +145,112 @@ $(document).ready(function () {
/**
* Sélection de la page de configuration à afficher
*/
$("#configSetupButton").on("click", function () {
$("#configSetupButton").on("click", function() {
$("#localeContainer").hide();
$("#socialContainer").hide();
$("#connectContainer").hide();
$("#networkContainer").hide();
$("#setupContainer").show();
$("#configSetupButton").addClass("activeButton");
$("#configLocaleButton").removeClass("activeButton");
$("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").removeClass("activeButton");
setCookie("configLayout", "setup");
setCookie("configLayout","setup");
});
$("#configSocialButton").on("click", function () {
$("#configLocaleButton").on("click", function() {
$("#setupContainer").hide();
$("#socialContainer").hide();
$("#connectContainer").hide();
$("#networkContainer").hide();
$("#localeContainer").show();
$("#configSetupButton").removeClass("activeButton");
$("#configLocaleButton").addClass("activeButton");
$("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").removeClass("activeButton");
setCookie("configLayout","locale");
});
$("#configSocialButton").on("click", function() {
$("#connectContainer").hide();
$("#setupContainer").hide();
$("#localeContainer").hide();
$("#networkContainer").hide();
$("#socialContainer").show();
$("#configSetupButton").removeClass("activeButton");
$("#configLocaleButton").removeClass("activeButton");
$("#configSocialButton").addClass("activeButton");
$("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").removeClass("activeButton");
setCookie("configLayout", "social");
setCookie("configLayout","social");
});
$("#configConnectButton").on("click", function () {
$("#configConnectButton").on("click", function() {
$("#setupContainer").hide();
$("#localeContainer").hide();
$("#socialContainer").hide();
$("#networkContainer").hide();
$("#connectContainer").show();
$("#configSetupButton").removeClass("activeButton");
$("#configLocaleButton").removeClass("activeButton");
$("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").addClass("activeButton");
$("#configNetworkButton").removeClass("activeButton");
setCookie("configLayout", "connect");
setCookie("configLayout","connect");
});
$("#configNetworkButton").on("click", function () {
$("#configNetworkButton").on("click", function() {
$("#setupContainer").hide();
$("#localeContainer").hide();
$("#socialContainer").hide();
$("#connectContainer").hide();
$("#networkContainer").show();
$("#configSetupButton").removeClass("activeButton");
$("#configLocaleButton").removeClass("activeButton");
$("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").addClass("activeButton");
setCookie("configLayout", "network");
setCookie("configLayout","network");
});
/**
* Aspect de la souris
*/
$("#socialMetaImage, #socialSiteMap, #configBackupCopyButton").click(function (event) {
*/
$("#socialMetaImage, #socialSiteMap, #configBackupCopyButton").click(function(event) {
$('body, .button').css('cursor', 'wait');
});
// Mise en évidence des erreurs de saisie dans les boutons de sélection
var containers = ["setup", "social", "connect", "network"];
$.each(containers, function (index, value) {
var containers = ["setup", "locale", "social", "connect", "network"];
$.each( containers, function( index, value ){
var a = $("div#" + value + "Container").find("input.notice").not(".displayNone");
if (a.length > 0) {
$("#config" + capitalizeFirstLetter(value) + "Button").addClass("buttonNotice");
$("#config" + capitalizeFirstLetter(value) + "Button").addClass("buttonNotice");
} else {
$("#config" + capitalizeFirstLetter(value) + "Button").removeClass("buttonNotice");
}
});
// Contrôle l'image Open Screen Graph
// Type d'image
$("span#screenType").each(function(){
var text = $(this).text();
if (text.includes("jpg") || text.includes("jpeg") || text.includes("png")) {
$(this).css("color", "green");
} else {
$(this).css("color", "red");
}
});
// La largeur
$("span#screenWide").each(function(){
var screenId = parseInt($(this).text());
if (screenId >= 1200) {
$(this).css("color", "green");
} else {
$(this).css("color", "red");
}
});
// La hauteur
$("span#screenHeight").each(function(){
var screenId = parseInt($(this).text());
if (screenId >= 630) {
$(this).css("color", "green");
} else {
$(this).css("color", "red");
}
});
// Le ratio
$('span#screenRatio').each(function(){
var ratio = parseFloat($(this).text());
if (ratio >= 1.90 && ratio <= 1.92) {
$(this).css("color", "green");
$("#screenFract").css("color", "green");
} else {
$(this).css("color", "red");
$("#screenFract").css("color", "red");
}
});
// Le poids
$('span#screenWeight').each(function(index){
var weight = parseFloat($(this).text());
var fileType = $('span#screenType').eq(index).text();
console.log(weight);
if ((fileType === "jpg" || fileType === "jpeg") && weight < 5000000) {
$(this).css("color", "green");
} else {
$(this).css("color", "red");
}
});
$('span#screenWeight').each(function(index){
var weight = parseFloat($(this).text());
var fileType = $('span#screenType').eq(index).text();
if (fileType === "png" && weight <= 1000000) {
$(this).css("color", "green");
} else {
$(this).css("color", "red");
$("#config" + capitalizeFirstLetter(value) + "Button").removeClass("buttonNotice");
}
});
});
function setCookie(name, value, days) {
function setCookie(name,value,days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/; samesite=lax";
document.cookie = name + "=" + (value || "") + expires + "; path=/; samesite=lax";
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

View File

@ -1,54 +1,62 @@
<?php echo template::formOpen('configForm'); ?>
<?php echo template::formOpen('configForm');?>
<div class="row">
<div class="col1">
<?php echo template::button('configBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl(false),
'value' => template::ico('home')
]); ?>
</div>
<div class="col1">
<?php /**echo template::button('configHelp', [
'class' => 'buttonHelp',
'href' => 'https://doc.zwiicms.fr/configuration-du-site',
'target' => '_blank',
'value' => template::ico('help'),
'help' => 'Consulter l\'aide en ligne'
]); */?>
</div>
<div class="col2 offset6">
<?php echo template::button('configLocaleButton', [
'value' => 'Identité',
'href' => helper::baseUrl() . 'language/site'
]); ?>
</div>
<div class="col2">
<?php echo template::submit('Submit'); ?>
<div class="col2">
<?php echo template::button('configBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl(false),
'ico' => 'home',
'value' => 'Accueil'
]); ?>
</div>
<div class="col2 ">
<?php echo template::button('configHelp', [
'class' => 'buttonHelp',
'href' => 'https://doc.zwiicms.fr/configuration-du-site',
'target' => '_blank',
'ico' => 'help',
'value' => 'Aide'
]); ?>
</div>
<div class="col2 offset6">
<?php echo template::submit('Submit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="row textAlignCenter">
<div class="col2">
<?php echo template::button('configSetupButton', [
'value' => 'Configuration'
]); ?>
</div>
<div class="col2">
<?php echo template::button('configLocaleButton', [
'value' => 'Localisation'
]); ?>
</div>
<div class="col2">
<?php echo template::button('configSocialButton', [
'value' => 'Référencement'
]); ?>
</div>
<div class="col2">
<?php echo template::button('configConnectButton', [
'value' => 'Connexion'
]); ?>
</div>
<div class="col2">
<?php echo template::button('configNetworkButton', [
'value' => 'Réseau'
]); ?>
</div>
</div>
</div>
</div>
<div class="tab">
<?php echo template::button('configSetupButton', [
'value' => 'Configuration',
'class' => 'buttonTab'
]); ?>
<?php echo template::button('configSocialButton', [
'value' => 'Référencement',
'class' => 'buttonTab'
]); ?>
<?php echo template::button('configConnectButton', [
'value' => 'Connexion',
'class' => 'buttonTab'
]); ?>
<?php echo template::button('configNetworkButton', [
'value' => 'Réseau',
'class' => 'buttonTab'
]); ?>
</div>
<?php include('core/module/config/view/setup/setup.php') ?>
<?php include('core/module/config/view/social/social.php') ?>
<?php include('core/module/config/view/connect/connect.php') ?>
<?php include('core/module/config/view/network/network.php') ?>
<?php include ('core/module/config/view/setup/setup.php') ?>
<?php include ('core/module/config/view/locale/locale.php') ?>
<?php include ('core/module/config/view/social/social.php') ?>
<?php include ('core/module/config/view/connect/connect.php') ?>
<?php include ('core/module/config/view/network/network.php') ?>
<?php echo template::formClose(); ?>

View File

@ -0,0 +1,223 @@
<div id="localeContainer">
<div class="row">
<div class="col12">
<div class="block">
<h4>Langues étrangères</h4>
<div class="row">
<div class="col12">
<?php echo template::checkbox('localei18n', true, 'Activer la gestion des langues étrangères', [
'checked' => $this->getData(['config', 'i18n', 'enable']),
'help'=> 'Une nouvelle icône apparaîtra dans la barre d\'administration. Consultez l\'aide de la page concernée pour en apprendre plus.'
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Identité du site <?php echo template::flag('site', '20px');?>
<span id="localeHelpButton" class="helpDisplayButton" title="Cliquer pour consulter l'aide en ligne">
<a href="https://doc.zwiicms.fr/localisation-et-identite" target="_blank">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</h4>
<div class="row">
<div class="col12">
<?php echo template::text('localeTitle', [
'label' => 'Titre du site' ,
'value' => $this->getData(['locale', 'title']),
'help' => 'Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::textarea('localeMetaDescription', [
'label' => 'Description du site',
'value' => $this->getData(['locale', 'metaDescription']),
'help' => 'La description d\'une page participe à son référencement, chaque page doit disposer d\'une description différente.'
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Assignation des pages spéciales <?php echo template::flag('site', '20px');?>
<span id="localeHelpButton" class="helpDisplayButton" title="Cliquer pour consulter l'aide en ligne">
<a href="https://doc.zwiicms.fr/localisation-et-identite" target="_blank">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</h4>
<div class="row">
<div class="col4">
<?php echo template::select('localeHomePageId', helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC'), [
'label' => 'Accueil du site',
'selected' =>$this->getData(['locale', 'homePageId']),
'help' => 'La première page que vos visiteurs verront.'
]); ?>
</div>
<div class="col4">
<?php echo template::select('localePage403', array_merge(['none' => 'Page par défaut'],helper::arrayCollumn($module::$orphansList, 'title', 'SORT_ASC')), [
'label' => 'Accès interdit, erreur 403',
'selected' =>$this->getData(['locale', 'page403']),
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
]); ?>
</div>
<div class="col4">
<?php echo template::select('localePage404', array_merge(['none' => 'Page par défaut'],helper::arrayCollumn($module::$orphansList, 'title', 'SORT_ASC')), [
'label' => 'Page inexistante, erreur 404',
'selected' =>$this->getData(['locale', 'page404']),
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::select('localeLegalPageId', array_merge(['none' => 'Aucune'] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [
'label' => 'Mentions légales',
'selected' => $this->getData(['locale', 'legalPageId']),
'help' => 'Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.'
]); ?>
</div>
<div class="col4">
<?php echo template::select('localeSearchPageId', array_merge(['none' => 'Aucune'] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [
'label' => 'Recherche dans le site',
'selected' => $this->getData(['locale', 'searchPageId']),
'help' => 'Sélectionnez une page contenant le module \'Recherche\'. Une option du pied de page ajoute un lien discret vers cette page.'
]); ?>
</div>
<div class="col4">
<?php
echo template::select('localePage302', array_merge(['none' => 'Page par défaut'],helper::arrayCollumn($module::$orphansList, 'title', 'SORT_ASC')), [
'label' => 'Site en maintenance',
'selected' =>$this->getData(['locale', 'page302']),
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Etiquettes des pages spéciales <?php echo template::flag('site', '20px');?>
<span id="labelHelpButton" class="helpDisplayButton" title="Cliquer pour consulter l'aide en ligne">
<a href="https://doc.zwiicms.fr/etiquettes-des-pages-speciales" target="_blank">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</h4>
<div class="row">
<div class="col6">
<?php echo template::text('localeLegalPageLabel', [
'label' => 'Mentions légales',
'placeholder' => 'Mentions légales',
'value' => $this->getData(['locale', 'legalPageLabel'])
]); ?>
</div>
<div class="col6">
<?php echo template::text('localeSearchPageLabel', [
'label' => 'Rechercher',
'placeholder' => 'Rechercher',
'value' => $this->getData(['locale', 'searchPageLabel'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::text('localeSitemapPageLabel', [
'label' => 'Plan du site',
'placeholder' => 'Plan du site',
'value' => $this->getData(['locale', 'sitemapPageLabel']),
]); ?>
</div>
<div class="col6">
<?php echo template::text('localeCookiesFooterText', [
'label' => 'Cookies',
'value' => $this->getData(['locale', 'cookies', 'cookiesFooterText']),
'placeHolder' => 'Cookies'
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Message d'acceptation des Cookies <?php echo template::flag('site', '20px');?>
<span id="specialeHelpButton" class="helpDisplayButton" title="Cliquer pour consulter l'aide en ligne">
<a href="https://doc.zwiicms.fr/cookies" target="_blank">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</h4>
<div class="row">
<div class="col12">
<?php echo template::text('localeCookiesTitleText', [
'help' => 'Saisissez le titre de la fenêtre de gestion des cookies.',
'label' => 'Titre de la fenêtre',
'value' => $this->getData(['locale', 'cookies', 'titleLabel']),
'placeHolder' => 'Gérer les cookies'
]); ?>
</div>
</div>
<div class="row">
<div class="col8">
<?php echo template::textarea('localeCookiesZwiiText', [
'help' => 'Saisissez le message pour les cookies déposés par ZwiiCMS, nécessaires au fonctionnement et qui ne nécessitent pas de consentement.',
'label' => 'Cookies Zwii',
'value' => $this->getData(['locale', 'cookies', 'mainLabel']),
'placeHolder' => 'Ce site utilise des cookies nécessaires à son fonctionnement, ils permettent de fluidifier son fonctionnement par exemple en mémorisant les données de connexion, la langue que vous avez choisie ou la validation de ce message.'
]); ?>
</div>
<div class="col4">
<?php echo template::text('localeCookiesLinkMlText', [
'help' => 'Saisissez le texte du lien vers les mentions légales,la page doit être définie dans la configuration du site.',
'label' => 'Lien page des mentions légales.',
'value' => $this->getData(['locale', 'cookies', 'linkLegalLabel']),
'placeHolder' => 'Consulter les mentions légales'
]); ?>
</div>
</div>
<div class="row">
<div class="col8">
<?php echo template::textarea('localeCookiesGaText', [
'help' => 'Saisissez le message pour les cookies déposés par Google Analytics, le consentement est requis.',
'label' => 'Cookies Google Analytics',
'value' => $this->getData(['locale', 'cookies', 'gaLabel']),
'placeHolder' => 'Il utilise également des cookies permettant de réaliser des statistiques de visites pour améliorer votre expérience utilisateur, ces cookies déposés par Google Analytics ont besoin de votre consentement.'
]); ?>
</div>
<div class="col4">
<?php echo template::text('localeCookiesCheckboxGaText', [
'help' => 'Saisissez le texte de la case à cocher Google Analytics.',
'label' => 'Checkbox Google Analytics',
'value' => $this->getData(['locale', 'cookies', 'checkboxGaLabel']),
'placeHolder' => 'Autorisation des cookies Google Analytics'
]); ?>
</div>
</div>
<div class="row">
<div class="col4 offset4">
<?php echo template::text('localeCookiesButtonText', [
'label' => 'Bouton de validation',
'value' => $this->getData(['locale', 'cookies', 'buttonValidLabel']),
'placeHolder' => 'J\'ai compris'
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,30 +1,29 @@
<div id="networkContainer" class="tabContent">
<div id="networkContainer">
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Paramètres'); ?>
<!--<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/reseau" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']); ?>
<h4>Paramètres
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/reseau" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
</a>
</span>-->
</span>
</h4>
<div class="row">
<div class="col2">
<?php echo template::select('configProxyType', $module::$proxyType, [
'label' => 'Type de proxy',
'selected' => $this->getData(['config', 'proxyType'])
]); ?>
</div>
<div class="col8">
]); ?>
</div>
<div class="col8">
<?php echo template::text('configProxyUrl', [
'label' => 'Adresse du proxy',
'placeholder' => 'cache.proxy.fr',
'value' => $this->getData(['config', 'proxyUrl'])
]); ?>
</div>
<div class="col2">
<div class="col2">
<?php echo template::text('configProxyPort', [
'label' => 'Port du proxy',
'placeholder' => '6060',
@ -38,78 +37,69 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('SMTP'); ?>
<!--<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/smtp" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']); ?>
<h4>SMTP
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/smtp" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
</a>
</span>-->
</span>
</h4>
<div class="row">
<div class="col6">
<?php echo template::text('smtpFrom', [
'label' => 'Expéditeur',
'placeholder' => 'no-reply@host',
'value' => $this->getData(['config', 'smtp', 'from']),
]); ?>
</div>
<div class="row">
<div class="col12">
<?php echo template::checkbox('smtpEnable', true, 'SMTP personnalisé', [
'checked' => $this->getData(['config', 'smtp', 'enable']),
<div class="col12">
<?php echo template::checkbox('smtpEnable', true, 'Activer SMTP', [
'checked' => $this->getData(['config', 'smtp','enable']),
'help' => 'Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d\'envoi de mail.'
]); ?>
</div>
</div>
<div id="smtpParam">
<div class="row">
<div class="col8">
<?php echo template::text('smtpHost', [
'label' => 'Adresse SMTP',
'placeholder' => 'smtp.fr',
'value' => $this->getData(['config', 'smtp','host'])
]); ?>
</div>
<div class="col2">
<?php echo template::text('smtpPort', [
'label' => 'Port SMTP',
'placeholder' => '589',
'value' => $this->getData(['config', 'smtp','port'])
]); ?>
</div>
<div class="col2">
<?php echo template::select('smtpAuth', $module::$SMTPauth, [
'label' => 'Authentification',
'selected' => $this->getData(['config', 'smtp','auth'])
]); ?>
</div>
</div>
<div id="smtpParam">
<div id="smtpAuthParam">
<div class="row">
<div class="col8">
<?php echo template::text('smtpHost', [
'label' => 'Adresse SMTP',
'placeholder' => 'smtp.fr',
'value' => $this->getData(['config', 'smtp', 'host'])
<div class="col5">
<?php echo template::text('smtpUsername', [
'label' => 'Nom utilisateur',
'value' => $this->getData(['config', 'smtp','username' ])
]); ?>
</div>
<div class="col2">
<?php echo template::text('smtpPort', [
'label' => 'Port SMTP',
'placeholder' => '589',
'value' => $this->getData(['config', 'smtp', 'port'])
<div class="col5">
<?php echo template::password('smtpPassword', [
'label' => 'Mot de passe',
'autocomplete' => 'off',
'value' => $this->getData(['config', 'smtp','username' ]) ? helper::decrypt ($this->getData(['config', 'smtp','username' ]),$this->getData(['config','smtp','password'])) : ''
]); ?>
</div>
<div class="col2">
<?php echo template::select('smtpAuth', $module::$SMTPauth, [
'label' => 'Authentification',
'selected' => $this->getData(['config', 'smtp', 'auth'])
<div class="col2">
<?php echo template::select('smtpSecure', $module::$SMTPEnc , [
'label' => 'Sécurité',
'selected' => $this->getData(['config', 'smtp','secure'])
]); ?>
</div>
</div>
<div id="smtpAuthParam">
<div class="row">
<div class="col5">
<?php echo template::text('smtpUsername', [
'label' => 'Nom utilisateur',
'value' => $this->getData(['config', 'smtp', 'username'])
]); ?>
</div>
<div class="col5">
<?php echo template::password('smtpPassword', [
'label' => 'Mot de passe',
'autocomplete' => 'off',
'value' => $this->getData(['config', 'smtp', 'password'])
]); ?>
</div>
<div class="col2">
<?php echo template::select('smtpSecure', $module::$SMTPEnc, [
'label' => 'Sécurité',
'selected' => $this->getData(['config', 'smtp', 'secure'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -7,8 +7,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

View File

@ -5,8 +5,18 @@
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
$(document).ready((function(){$("#configRestoreSubmit").click((function(event){$("body, .button").css("cursor","wait")}))}));
$( document).ready(function() {
/**
* Aspect de la souris
*/
$("#configRestoreSubmit").click(function(event) {
$('body, .button').css('cursor', 'wait');
});
});

View File

@ -1,14 +1,15 @@
<?php echo template::formOpen('configRestoreForm'); ?>
<div class="row">
<div class="col1">
<div class="col2">
<?php echo template::button('configRestoreBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config',
'value' => template::ico('left')
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset9">
<?php echo template::submit('configRestoreSubmit', [
<div class="col2 offset8">
<?php echo template::submit('configRestoreSubmit',[
'value' => 'Restaurer',
'uniqueSubmission' => true,
]); ?>
@ -17,15 +18,12 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Archive à restaurer'); ?>
</h4>
<h4>Archive à restaurer</h4>
<div class="row">
<div class="col10 offset1">
<div class="row">
<?php echo template::file('configRestoreImportFile', [
'label' => 'Sélectionnez une archive au format ZIP',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'type' => 2,
'help' => 'L\'archive a été déposée dans le gestionnaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.'
]); ?>
@ -40,4 +38,46 @@
</div>
</div>
</div>
<?php echo template::formClose(); ?>
<div class="row">
<div class="col12">
<div class="block">
<h4>Conversion après la restauration<?php echo template::help('Conversion des URL des ressources multimédia entre deux sites aux arborescences différentes.');?></h4>
<div class="row">
<div class="col4 offset1">
<?php
if (is_null($this->getData(['core', 'baseUrl'])) ) {
$baseUrlValue = 'Pas de donnée dans la sauvegarde';
$buttonClass = 'disabled';
} elseif ($this->getData(['core', 'baseUrl']) === '') {
$baseUrlValue = '/';
$buttonClass = helper::baseUrl(false,false) !== $this->getData(['core', 'baseUrl']) ? '' : 'disabled';
} else {
$baseUrlValue = str_replace('?','',$this->getData(['core', 'baseUrl']));
$buttonClass = helper::baseUrl(false,false) !== $baseUrlValue ? '' : 'disabled';
}
echo template::text('configRestoreBaseURLToConvert', [
'label' => 'Dossier de l\'archive' ,
'value' => $baseUrlValue,
'readonly' => true,
'help' => 'Le dossier de base du site est stockée dans la sauvegarde.'
]); ?>
</div>
<div class="col4">
<?php echo template::text('configRestoreCurrentURL', [
'label' => 'Dossier du site actuel',
'value' => helper::baseUrl(false,false),
'readonly' => true
]); ?>
</div>
<div class="col2 verticalAlignMiddle">
<?php echo template::button('configRestoreUpdateBaseURLButton', [
'href' => helper::baseUrl() . 'config/updateBaseUrl',
'class' => $buttonClass,
'value' => 'convertir'
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -7,8 +7,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

View File

@ -1,37 +1,38 @@
<?php echo template::formOpen('configScript'); ?>
<div class="row">
<div class="col1">
<?php echo template::button('configManageBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config',
'value' => template::ico('left')
]); ?>
<div class="row">
<div class="col2">
<?php echo template::button('configManageBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('configManageSubmit',[
'value' => 'Valider',
'ico' => 'check'
]); ?>
</div>
</div>
<div class="col2 offset9">
<?php echo template::submit('configManageSubmit', [
'value' => 'Valider',
'ico' => 'check'
]); ?>
</div>
</div>
<?php if ($this->geturl(2) === 'head') : ?>
<?php if ($this->geturl(2) === 'head'): ?>
<div class="row">
<div class="col12">
<?php echo template::textarea('configScriptHead', [
'value' => file_exists(self::DATA_DIR . 'head.inc.html') ? file_get_contents(self::DATA_DIR . 'head.inc.html') : '',
'value' => file_exists( self::DATA_DIR . 'head.inc.html') ? file_get_contents (self::DATA_DIR . 'head.inc.html') : '' ,
'class' => 'editor'
]); ?>
</div>
</div>
<?php endif ?>
<?php if ($this->geturl(2) === 'body') : ?>
<?php endif ?>
<?php if ($this->geturl(2) === 'body'): ?>
<div class="row">
<div class="col12">
<?php echo template::textarea('configScriptBody', [
'value' => file_exists(self::DATA_DIR . 'body.inc.html') ? file_get_contents(self::DATA_DIR . 'body.inc.html') : '',
'value' => file_exists( self::DATA_DIR . 'body.inc.html') ? file_get_contents (self::DATA_DIR . 'body.inc.html') : '' ,
'class' => 'editor'
]); ?>
</div>
</div>
<?php endif ?>
<?php endif ?>
<?php echo template::formClose(); ?>

View File

@ -1,20 +1,18 @@
<div id="setupContainer" class="tabContent">
<div id="setupContainer">
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Paramètres'); ?>
<!--<span id="setupHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/parametres" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']);
?>
</a>-->
<h4>Paramètres
<span id="setupHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/parametres" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</h4>
<div class="row">
<div class="col4">
<?php echo template::file('configFavicon', [
'type' => 1,
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon',
'value' => $this->getData(['config', 'favicon'])
@ -23,7 +21,6 @@
<div class="col4">
<?php echo template::file('configFaviconDark', [
'type' => 1,
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon thème sombre',
'value' => $this->getData(['config', 'faviconDark'])
@ -39,16 +36,15 @@
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('configCookieConsent', true, 'Message de consentement aux cookies', [
'checked' => $this->getData(['config', 'cookieConsent']),
'help' => 'Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.'
]); ?>
<?php echo template::checkbox('configCookieConsent', true, 'Message de consentement aux cookies', [
'checked' => $this->getData(['config', 'cookieConsent']),
'help' => 'Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.'
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('configRewrite', true, 'Apache URL intelligentes', [
<?php echo template::checkbox('configRewrite', true, 'URL intelligentes', [
'checked' => helper::checkRewrite(),
'help' => 'Supprime le point d\'interrogation dans les URL, l\'option est indisponible avec les autres serveurs Web',
'disabled' => stripos($_SERVER["SERVER_SOFTWARE"], 'nginx')
'help' => 'Supprime ? dans les URL et redirige sur le protocole HTTPS.'
]); ?>
</div>
</div>
@ -58,47 +54,41 @@
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Mise à jour automatisée'); ?>
<!--<span id="updateHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/mise-a-jour" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']);
?>
<h4>Mise à jour automatisée
<span id="updateHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/mise-a-jour" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
</a>
</span>-->
</span>
</h4>
<div class="row">
<div class="col6">
<?php echo template::checkbox('configAutoUpdate', true, 'Rechercher une mise à jour en ligne', [
'checked' => $this->getData(['config', 'autoUpdate']),
'help' => 'La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.',
'disabled' => empty(helper::getOnlineVersion(common::ZWII_UPDATE_CHANNEL))
]); ?>
'checked' => $this->getData(['config', 'autoUpdate']),
'help' => 'La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.',
'disabled' => !$module::$onlineVersion
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('configAutoUpdateHtaccess', true, 'Préserver le fichier htaccess racine', [
'checked' => $this->getData(['config', 'autoUpdateHtaccess']),
'help' => 'Lors d\'une mise à jour automatique, conserve le fichier htaccess de la racine du site.',
'disabled' => empty(helper::getOnlineVersion(common::ZWII_UPDATE_CHANNEL))
]); ?>
'checked' => $this->getData(['config', 'autoUpdateHtaccess']),
'help' => 'Lors d\'une mise à jour automatique, conserve le fichier htaccess de la racine du site.',
'disabled' => !$module::$onlineVersion
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::select('configAutoUpdateDelay', $module::$updateDelay, [
'label' => 'Fréquence de recherche',
'selected' => $this->getData(['config', 'autoUpdateDelay']),
]); ?>
<div class="col6">
<?php echo '<pre>Version installée : <strong>' . common::ZWII_VERSION . '</strong></pre>' ; ?>
<?php echo $module::$onlineVersion ? '<pre>Version en ligne : <strong>' . $module::$onlineVersion . '</strong></pre>' : '' ;?>
</div>
<div class="col3 offset1 verticalAlignBottom">
<pre>Version installée : <strong><?php echo common::ZWII_VERSION ; ?></strong></pre>
<pre>Version en ligne : <strong><?php echo helper::getOnlineVersion(common::ZWII_UPDATE_CHANNEL) ; ?></strong></pre>
</div>
<div class="col3 offset2 verticalAlignBottom">
<div class="col4 verticalAlignBottom">
<?php echo template::button('configUpdateForced', [
'ico' => 'download-cloud',
'href' => helper::baseUrl() . 'install/update',
'value' => $module::$updateButtonText,
'class' => 'buttonRed',
'disabled' => !$module::$onlineVersion
]); ?>
</div>
</div>
@ -108,20 +98,19 @@
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Maintenance'); ?>
<!--<span id="maintenanceHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/mode-maintenance" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']);
?>
<h4>Maintenance
<span id="maintenanceHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/mode-maintenance" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
</a>
</span>-->
</span>
</h4>
<div class="row">
<div class="col6">
<?php echo template::checkbox('configAutoBackup', true, 'Sauvegarde automatique quotidienne du site', [
'checked' => $this->getData(['config', 'autoBackup']),
'help' => 'Une archive du dossier /site/data est conservée pendant 30 jours. Activation recommandée'
]); ?>
'checked' => $this->getData(['config', 'autoBackup']),
'help' => 'Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.</p><p>Les fichiers du site ne sont pas sauvegardés automatiquement. Activation recommandée.'
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('configMaintenance', true, 'Site en maintenance', [
@ -129,85 +118,30 @@
]); ?>
</div>
</div>
<div class="row">
<div class="col4 offset1">
<div class="rows textAlignCenter">
<div class="col3">
<?php echo template::button('configBackupButton', [
'href' => helper::baseUrl() . 'config/backup',
'value' => 'Sauvegarder les données du site',
'value' => 'Sauvegarder',
'ico' => 'download-cloud'
]); ?>
</div>
<div class="col4 offset1">
<div class="col3">
<?php echo template::button('configRestoreButton', [
'href' => helper::baseUrl() . 'config/restore',
'value' => 'Restaurer les données du site',
'value' => 'Restaurer',
'ico' => 'upload-cloud'
]); ?>
</div>
</div>
<div class="row">
<div class="col4 offset1">
<div class="col3">
<?php echo template::button('configBackupCopyButton', [
'href' => helper::baseUrl() . 'config/copyBackups',
'value' => 'Copier sauvegardes auto',
'ico' => 'docs'
]); ?>
</div>
<div class="col4 offset1">
<?php echo template::button('configBackupDelButton', [
'href' => helper::baseUrl() . 'config/delBackups',
'value' => 'Vider dossier sauvegardes auto',
'ico' => 'trash',
'class' => 'buttonRed'
'value' => 'Copie sauvegardes auto',
'ico' => 'download-cloud'
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Scripts externes'); ?>
<!--<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/scripts-externes" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']);
?>
</a>
</span>-->
</h4>
<div class="row">
<div class="col4 offset1 verticalAlignBottom">
<?php echo template::button('socialScriptHead', [
'href' => helper::baseUrl() . 'config/script/head',
'value' => 'Script dans head',
'ico' => 'pencil'
]); ?>
</div>
<div class="col4 offset1 verticalAlignBottom">
<?php echo template::button('socialScriptBody', [
'href' => helper::baseUrl() . 'config/script/body',
'value' => 'Script dans body',
'ico' => 'pencil'
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>ZwiiCMS <a href="https://zwiicms.fr" target="_blank">Site Web</a> - <a href="https://forum.zwiicms.fr" target="_blank">Forum</a>
</h4>
<div class="row textAlignCenter">
<div class="col12">
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Licence Creative Commons" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a>
<p>Cette œuvre est mise à disposition selon les termes de la <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Licence Creative Commons Attribution - Pas d&#39;Utilisation Commerciale - Pas de Modification 4.0 International.</a></p>
<p>Pour voir une copie de cette licence, visitez http://creativecommons.org/licenses/by-nc-nd/4.0/ ou écrivez à Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,58 +1,49 @@
<div id="socialContainer" class="tabContent">
<div id="socialContainer">
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Capture d\'écran Open Graph'); ?>
<!--<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/referencement" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']); ?>
<h4>Paramètres
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/referencement" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
</a>
</span>-->
</span>
</h4>
<div class="row">
<div class="col6">
<div class="col4 offset1">
<div class="row">
<div class="col12">
<?php echo template::file('seoOpenGraphImage', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Image Open Graph',
'value' => $this->getData(['config', 'seo', 'openGraphImage']),
'type' => 1,
'help' => sprintf('%s : JPG - PNG<br />', helper::translate('Format')) .
sprintf('%s : 1200 x 630 pixels<br />', helper::translate('Dimensions minimales')) .
sprintf('%s : 1.91:1<br />', helper::translate('Ratio')) .
sprintf('%s : %s, %s<br />', helper::translate('Taille maximale du fichier'), helper::translate('5 Mo pour les images JPEG'), helper::translate('1 Mo pour les images PNG'))
<?php echo template::button('socialMetaImage', [
'href' => helper::baseUrl() . 'config/configMetaImage',
'value' => 'Générer une capture Open Graph'
]); ?>
</div>
</div>
<div class="row">
<div class="col10 textAlignCenter">
<?php if( !empty($module::$imageOpenGraph['type']) ): ?>
<p>
<?php echo sprintf('%s : <span id="screenType">%s</span>', helper::translate('Format'), $module::$imageOpenGraph['type']); ?>
</p>
<p>
<?php echo sprintf('%s : <span id="screenWide">%s</span> x <span id="screenHeight">%s</span> pixels', helper::translate('Dimensions minimales'), $module::$imageOpenGraph['wide'], $module::$imageOpenGraph['height'] ); ?>
</p>
<p>
<?php echo sprintf('%s : <span id="screenRatio">%s</span><span id="screenFract">:1</span>' , helper::translate('Ratio'), round($module::$imageOpenGraph['ratio'], 2)); ?>
</p>
<p>
<?php echo sprintf('%s : <span id="screenWeight">%s</span>', helper::translate('Poids'), $module::$imageOpenGraph['size']); ?>
</p>
<?php endif; ?>
<div class="col12">
<?php echo template::button('socialSiteMap', [
'href' => helper::baseUrl() . 'config/generateFiles',
'value' => 'Générer sitemap.xml et robots.txt'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::checkbox('seoRobots', true, 'Autoriser les robots à référencer le site', [
'checked' => $this->getData(['config', 'seo','robots'])
]); ?>
</div>
</div>
</div>
<div class="col6">
<?php if (
$this->getData(['config', 'seo', 'openGraphImage']) &&
file_exists(self::FILE_DIR . 'source/' . $this->getData(['config', 'seo', 'openGraphImage']))
): ?>
<img
src="<?php echo self::FILE_DIR . 'source/' . $this->getData(['config', 'seo', 'openGraphImage']); ?>" />
<?php endif; ?>
<div class="col6 offset1">
<?php if (file_exists(self::FILE_DIR.'source/screenshot.jpg')): ?>
<div class="row">
<div class="col8 offset2 textAlignCenter">
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'source/screenshot.jpg';?>" data-tippy-content="Cette capture d'écran est nécessaire aux partages sur les réseaux sociaux. Elle est régénérée lorsque le fichier 'screenshot.jpg' est effacé du gestionnaire de fichiers." />
</div>
</div>
<?php endif;?>
</div>
</div>
</div>
@ -61,128 +52,111 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Référencement'); ?>
</h4>
<div class="row">
<div class="col4 offset1">
<?php echo template::button('socialSiteMap', [
'href' => helper::baseUrl() . 'config/sitemap',
'value' => 'Générer sitemap.xml et robots.txt'
]); ?>
</div>
<div class="col4 offset1">
<?php echo template::checkbox('seoRobots', true, 'Autoriser les robots à référencer le site', [
'checked' => $this->getData(['config', 'seo', 'robots'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Réseaux sociaux'); ?>
<!--<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/reseaux-sociaux" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']); ?>
<h4>Réseaux sociaux
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/reseaux-sociaux" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
</a>
</span>-->
</span>
</h4>
<div class="row">
<div class="col3">
<?php echo template::text('socialFacebookId', [
'help' => 'Saisissez votre ID : https://www.facebook.com/[ID].',
'label' => template::ico('facebook', ['margin' => 'right']) . 'Facebook',
'label' => 'Facebook',
'value' => $this->getData(['config', 'social', 'facebookId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialInstagramId', [
'help' => 'Saisissez votre ID : https://www.instagram.com/[ID].',
'label' => template::ico('instagram', ['margin' => 'right']) . 'Instagram',
'label' => 'Instagram',
'value' => $this->getData(['config', 'social', 'instagramId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialTwitterId', [
'help' => 'Saisissez votre ID : https://twitter.com/[ID].',
'label' => template::ico('twitter', ['margin' => 'right']) . 'Twitter',
'value' => $this->getData(['config', 'social', 'twitterId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialRedditId', [
'help' => 'Saisissez votre ID Reddit : https://www.reddit.com/user/[ID].',
'label' => template::ico('reddit', ['margin' => 'right']) . 'Reddit',
'value' => $this->getData(['config', 'social', 'redditId'])
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::text('socialYoutubeId', [
'help' => 'ID de la chaîne : https://www.youtube.com/channel/[ID].',
'label' => template::ico('youtube', ['margin' => 'right']) . 'Chaîne Youtube',
'label' => 'Chaîne Youtube',
'value' => $this->getData(['config', 'social', 'youtubeId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialYoutubeUserId', [
'help' => 'Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].',
'label' => template::ico('youtube', ['margin' => 'right']) . 'Youtube',
'label' => 'Youtube',
'value' => $this->getData(['config', 'social', 'youtubeUserId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialVimeoId', [
'help' => 'Saisissez votre ID Viemo : https://vimeo.com/[ID].',
'label' => template::ico('vimeo', ['margin' => 'right']) . 'Vimeo',
'value' => $this->getData(['config', 'social', 'vimeoId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialPinterestId', [
'help' => 'Saisissez votre ID : https://pinterest.com/[ID].',
'label' => template::ico('pinterest', ['margin' => 'right']) . 'Pinterest',
'value' => $this->getData(['config', 'social', 'pinterestId'])
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::text('socialTwitterId', [
'help' => 'Saisissez votre ID : https://twitter.com/[ID].',
'label' => 'Twitter',
'value' => $this->getData(['config', 'social', 'twitterId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialPinterestId', [
'help' => 'Saisissez votre ID : https://pinterest.com/[ID].',
'label' => 'Pinterest',
'value' => $this->getData(['config', 'social', 'pinterestId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialLinkedinId', [
'help' => 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].',
'label' => template::ico('linkedin', ['margin' => 'right']) . 'Linkedin',
'label' => 'Linkedin',
'value' => $this->getData(['config', 'social', 'linkedinId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialGithubId', [
'help' => 'Saisissez votre ID Github : https://github.com/[ID].',
'label' => template::ico('github', ['margin' => 'right']) . 'Github',
'value' => $this->getData(['config', 'social', 'githubId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialTwitchId', [
'help' => 'Saisissez votre ID Twitch : https://www.twitch.tv/[ID].',
'label' => template::ico('twitch', ['margin' => 'right']) . 'Twitch',
'value' => $this->getData(['config', 'social', 'twitchId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('socialSteamId', [
'help' => 'Saisissez votre ID Viemo : https://steamcommunity.com/id/[ID].',
'label' => template::ico('steam', ['margin' => 'right']) . 'Steam',
'value' => $this->getData(['config', 'social', 'steamId'])
]); ?>
<?php echo template::text('socialGithubId', [
'help' => 'Saisissez votre ID Github : https://github.com/[ID].',
'label' => 'Github',
'value' => $this->getData(['config', 'social', 'githubId'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Scripts externes
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/scripts-externes" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</h4>
<div class="row">
<div class="col3">
<?php echo template::text('seoAnalyticsId', [
'help' => 'Saisissez l\'ID de suivi.',
'label' => 'Google Analytics',
'placeholder' => 'UA-XXXXXXXX-X',
'value' => $this->getData(['config', 'seo', 'analyticsId'])
]); ?>
</div>
<div class="col3 offset3 verticalAlignBottom">
<?php echo template::button('socialScriptHead', [
'href' => helper::baseUrl() . 'config/script/head',
'value' => 'Script dans head',
'ico' => 'pencil'
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('socialScriptBody', [
'href' => helper::baseUrl() . 'config/script/body',
'value' => 'Script dans body',
'ico' => 'pencil'
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,50 +0,0 @@
<?php
/**
* This file is part of Zwii.
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
class dashboard extends common
{
public static $actions = [
'index' => self::GROUP_ADMIN,
];
public static $infos = [];
/**
* Dashboard
*/
public function index()
{
self::$infos['webserver'] = $_SERVER['SERVER_SOFTWARE'];
self::$infos['php']['version'] = phpversion();
self::$infos['php']['extension'] = get_loaded_extensions();
self::$infos['system']['memory'] = memory_get_usage() . ' octets';
self::$infos['system']['peek'] = 'Pic de mémoire utilisée : ' . memory_get_peak_usage() . ' octets';
$loadAverage = sys_getloadavg();
self::$infos['system']['charge'] = 'Charge moyenne (1 min / 5 min / 15 min) : ' . implode(' / ', $loadAverage) . '</P>';
// Valeurs en sortie
$this->addOutput([
'title' => helper::translate('Tableau de bord'),
'view' => 'index'
]);
}
}

View File

@ -1,54 +0,0 @@
<?php echo template::formOpen('dashboard'); ?>
<div class="row">
<div class="col1">
<?php echo template::button('dashboardFormBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl(false),
'value' => template::ico('home')
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Système'); ?>
</h4>
<div class="row">
<div class="col6">
<p>
<?php echo helper::translate('Serveur Web'); ?>
</p>
<p>
<?php echo $module::$infos['webserver']; ?>
</p>
</div>
<div class="col6">
<p>
<?php echo helper::translate('PHP') . ' ' . $module::$infos['php']['version']; ?>
</p>
<p>
<?php echo implode(' - ', $module::$infos['php']['extension']); ?>
</p>
</div>
</div>
<div class="row">
<div class="col12">
<p>
<?php echo helper::translate('Mémoire'); ?>
</p>
<p>
<?php echo $module::$infos['system']['memory']; ?>
</p>
<p>
<?php echo $module::$infos['system']['charge']; ?>
</p>
<p>
<?php echo $module::$infos['system']['peek']; ?>
</p>
</div>
</div>
</div>
</div>
</div>

View File

@ -8,87 +8,32 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
class install extends common
{
class install extends common {
public static $actions = [
'index' => self::GROUP_VISITOR,
"postinstall" => self::GROUP_VISITOR,
'steps' => self::GROUP_ADMIN,
'update' => self::GROUP_ADMIN
];
// Type de proxy
public static $proxyType = [
'tcp://' => 'TCP',
'http://' => 'HTTP'
];
public static $updateButtonText = 'Réinstaller';
// Thèmes proposés à l'installation
public static $themes = [];
public static $newVersion;
// Fichiers des Interface
public static $i18nFiles = [];
/**
* Pré-installation - choix de la langue
* Installation
*/
public function index()
{
public function index() {
// Accès refusé
if ($this->getData(['user']) !== []) {
// Valeurs en sortie
$this->addOutput([
'access' => false
]);
}
// Soumission du formulaire
if (
//$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$this->isPost()
) {
$lang = $this->getInput('installLanguage');
// Pour la suite de l'installation
// setcookie('ZWII_UI', $lang, time() + 3600, helper::baseUrl(false, false), '', false, false);
$_SESSION['ZWII_UI'] = $this->getInput('installLanguage');
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'install/postinstall'
]);
}
// Liste des langues UI disponibles
if (is_dir(self::I18N_DIR)) {
foreach ($this->getData(['language']) as $lang => $value) {
self::$i18nFiles[$lang] = self::$languages[$lang];
}
}
$this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT,
'title' => helper::translate('ZwiiCMS Installation'),
'view' => 'index'
]);
}
/**
* post Installation
*/
public function postInstall()
{
// Accès refusé
if ($this->getData(['user']) !== []) {
if($this->getData(['user']) !== []) {
// Valeurs en sortie
$this->addOutput([
'access' => false
@ -97,15 +42,10 @@ class install extends common
// Accès autorisé
else {
// Soumission du formulaire
if (
//$this->getUser('permission', __CLASS__, __FUNCTION__) !== true &&
$this->isPost()
) {
if($this->isPost()) {
$success = true;
// Double vérification pour le mot de passe
if ($this->getInput('installPassword', helper::FILTER_STRING_SHORT, true) !== $this->getInput('installConfirmPassword', helper::FILTER_STRING_SHORT, true)) {
if($this->getInput('installPassword', helper::FILTER_STRING_SHORT, true) !== $this->getInput('installConfirmPassword', helper::FILTER_STRING_SHORT, true)) {
self::$inputNotices['installConfirmPassword'] = 'Incorrect';
$success = false;
}
@ -114,75 +54,50 @@ class install extends common
$userLastname = $this->getInput('installLastname', helper::FILTER_STRING_SHORT, true);
$userMail = $this->getInput('installMail', helper::FILTER_MAIL, true);
$userId = $this->getInput('installId', helper::FILTER_ID, true);
// Validation de la langue transmise
self::$i18nUI = $_SESSION['ZWII_UI'];
self::$i18nUI = array_key_exists(self::$i18nUI, self::$languages) ? self::$i18nUI : 'fr_FR';
// par défaut le contenu est la langue d'installation
$_SESSION['ZWII_CONTENT'] = self::$i18nUI;
// Création du dossier de langue avec le marqueur de langue par défaut
if (!is_dir(self::DATA_DIR . $_SESSION['ZWII_CONTENT'])) {
mkdir(self::DATA_DIR . $_SESSION['ZWII_CONTENT']);
touch(self::DATA_DIR . $_SESSION['ZWII_CONTENT'] . '/.default');
}
// Installation du site de test
if (
$this->getInput('installDefaultData', helper::FILTER_BOOLEAN) === false
&& $_SESSION['ZWII_CONTENT'] === 'fr_FR'
) {
$sample = true;
}
$this->initData('page', $_SESSION['ZWII_CONTENT'], $sample);
$this->initData('module', $_SESSION['ZWII_CONTENT'], $sample);
$this->initData('locale', $_SESSION['ZWII_CONTENT'], $sample);
// Création de l'utilisateur si les données sont complétées.
// success retour de l'enregistrement des données
$this->setData([
$success = $this->setData([
'user',
$userId,
[
'firstname' => $userFirstname,
'forgot' => 0,
'group' => self::GROUP_ADMIN,
'profil' => 0,
'lastname' => $userLastname,
'pseudo' => 'Admin',
'signature' => 1,
'mail' => $userMail,
'password' => $this->getInput('installPassword', helper::FILTER_PASSWORD, true),
'language' => $_SESSION['ZWII_CONTENT']
'password' => $this->getInput('installPassword', helper::FILTER_PASSWORD, true)
]
]);
// Compte créé, envoi du mail et création des données du site
if ($success) { // Formulaire complété envoi du mail
// Envoie le mail
// Sent contient true si réussite sinon code erreur d'envoi en clair
$this->sendMail(
$sent = $this->sendMail(
$userMail,
'Installation de votre site',
'Bonjour' . ' <strong>' . $userFirstname . ' ' . $userLastname . '</strong>,<br><br>' .
'Voici les détails de votre installation.<br><br>' .
'<strong>URL du site :</strong> <a href="' . helper::baseUrl(false) . '" target="_blank">' . helper::baseUrl(false) . '</a><br>' .
'<strong>Identifiant du compte :</strong> ' . $this->getInput('installId') . '<br>',
null,
'no-reply@localhost'
null
);
// Nettoyage fr par défaut
if (
$_SESSION['ZWII_CONTENT'] !== 'fr_FR'
) {
if (is_dir(self::DATA_DIR . 'fr_FR'))
$this->deleteDir(self::DATA_DIR . 'fr_FR');
}
// Sauvegarder la configuration du Proxy
$this->setData(['config', 'proxyType', $this->getInput('installProxyType')]);
$this->setData(['config', 'proxyUrl', $this->getInput('installProxyUrl')]);
$this->setData(['config', 'proxyPort', $this->getInput('installProxyPort', helper::FILTER_INT)]);
// Nettoyer les cookies de langue d'une précédente installation
helper::deleteCookie('ZWII_I18N_SITE');
helper::deleteCookie('ZWII_I18N_SCRIPT');
// Installation du site de test
if ($this->getInput('installDefaultData',helper::FILTER_BOOLEAN) === FALSE) {
$this->initData('page','fr',true);
$this->initData('module','fr',true);
$this->setData(['module', 'blog', 'posts', 'mon-premier-article', 'userId', $userId]);
$this->setData(['module', 'blog', 'posts', 'mon-deuxieme-article', 'userId', $userId]);
$this->setData(['module', 'blog', 'posts', 'mon-troisieme-article', 'userId', $userId]);
}
// Images exemples livrées dans tous les cas
try {
// Décompression dans le dossier de fichier temporaires
@ -200,40 +115,51 @@ class install extends common
} catch (Exception $e) {
$success = $e->getMessage();
}
// Nettoyage
unlink(self::TEMP_DIR . 'files.tar.gz');
unlink(self::TEMP_DIR . 'files.tar');
// Créer le dossier des fontes
if (!is_dir(self::DATA_DIR . 'font')) {
mkdir(self::DATA_DIR . 'font');
if (!is_dir(self::DATA_DIR . 'fonts')) {
mkdir(self::DATA_DIR . 'fonts');
}
// Stocker le dossier d'installation
$this->setData(['core', 'baseUrl', helper::baseUrl(false,false) ]);
// Créer sitemap
$this->createSitemap();
// Installation du thème sélectionné
$dataThemes = file_get_contents('core/module/install/ressource/themes/themes.json');
$dataThemes = json_decode($dataThemes, true);
$themeId = $dataThemes [$this->getInput('installTheme', helper::FILTER_STRING_SHORT)]['filename'];
if ($themeId !== 'default' ) {
$theme = new theme;
$theme->import('core/module/install/ressource/themes/' . $themeId);
}
// Copie des langues de l'UI et génération de la base de données
if (is_dir(self::I18N_DIR) === false) {
mkdir(self::I18N_DIR);
// Copie des thèmes dans les fichiers
if (!is_dir(self::FILE_DIR . 'source/theme' )) {
mkdir(self::FILE_DIR . 'source/theme');
}
// Créer la base de données des langues
$this->copyDir('core/module/install/ressource/i18n', self::I18N_DIR);
// Fixe l'adresse from pour les envois d'email
$this->setData(['config', 'smtp', 'from', 'no-reply@' . str_replace('www.', '', $_SERVER['HTTP_HOST'])]);
$this->copyDir('core/module/install/ressource/themes', self::FILE_DIR . 'source/theme');
unlink(self::FILE_DIR . 'source/theme/themes.json');
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl(),
'notification' => helper::translate('Installation terminée'),
'state' => true
'redirect' => helper::baseUrl(false),
'notification' => $sent === true ? 'Installation terminée' : $sent,
'state' => ($sent === true && $success === true) ? true : null
]);
}
}
// Récupération de la liste des thèmes
$dataThemes = file_get_contents('core/module/install/ressource/themes/themes.json');
$dataThemes = json_decode($dataThemes, true);
self::$themes = helper::arrayCollumn($dataThemes, 'name');
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT,
'title' => helper::translate('Installation'),
'view' => 'postinstall'
'title' => 'Installation',
'view' => 'index'
]);
}
}
@ -241,239 +167,138 @@ class install extends common
/**
* Étapes de mise à jour
*/
public function steps()
{
// Action interdite
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
) {
// Valeurs en sortie
$this->addOutput([
'access' => false
]);
} else {
switch ($this->getInput('step', helper::FILTER_INT)) {
// Préparation
case 1:
$success = true;
$message = '';
// RAZ la mise à jour auto
$this->setData(['core', 'updateAvailable', false]);
// Backup du dossier Data
helper::autoBackup(self::BACKUP_DIR, ['backup', 'tmp', 'file']);
// Sauvegarde htaccess
if ($this->getData(['config', 'autoUpdateHtaccess'])) {
$success = copy('.htaccess', '.htaccess' . '.bak');
$message = $success ? '' : 'Erreur de copie du fichier htaccess';
}
// Nettoyage des fichiers d'installation précédents
if ($success && file_exists(self::TEMP_DIR . 'update.tar.gz')) {
$success = unlink(self::TEMP_DIR . 'update.tar.gz');
$message = $success ? '' : 'Impossible d\'effacer la mise à jour précédente';
}
if ($success && file_exists(self::TEMP_DIR . 'update.tar')) {
$success = unlink(self::TEMP_DIR . 'update.tar');
$message = $success ? '' : 'Impossible d\'effacer la mise à jour précédente';
}
// Sauvegarde le message dans le journal
if (!empty($message)) {
$this->saveLog($message);
}
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_JSON,
'content' => [
'success' => $success,
'data' => $success ? null : json_encode($message, JSON_UNESCAPED_UNICODE)
]
]);
break;
// Téléchargement
case 2:
$success = true;
$message = '';
$this->secure_file_put_contents(self::TEMP_DIR . 'update.tar.gz', helper::getUrlContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/update.tar.gz'));
$md5origin = helper::getUrlContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/update.md5');
$md5origin = explode(' ', $md5origin);
$md5target = md5_file(self::TEMP_DIR . 'update.tar.gz');
// Vérifier si les checksums correspondent
if ($md5origin[0] === $md5target) {
$success = true;
$message = "";
} else {
$success = false;
$message = 'Erreur de téléchargement ou de somme de contrôle';
if (file_exists(self::TEMP_DIR . 'update.tar.gz')) {
unlink(self::TEMP_DIR . 'update.tar.gz');
http_response_code(500);
}
}
// Sauvegarde le message dans le journal
if (!empty($message)) {
$this->saveLog($message);
}
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_JSON,
'content' => [
'success' => $success,
'data' => json_encode($message, JSON_UNESCAPED_UNICODE)
]
]);
break;
// Installation
case 3:
$success = true;
$message = '';
// Check la réécriture d'URL avant d'écraser les fichiers
if (helper::checkRewrite()) {
touch(self::DATA_DIR . '.rewrite');
}
// Décompression et installation
try {
// Décompression dans le dossier de fichier temporaires
$pharData = new PharData(self::TEMP_DIR . 'update.tar.gz');
$pharData->decompress();
// Installation
$pharData->extractTo(__DIR__ . '/../../../', null, true);
} catch (Exception $e) {
$message = $e->getMessage();
$success = false;
http_response_code(500);
}
// Nettoyage du dossier
if (file_exists(self::TEMP_DIR . 'update.tar.gz')) {
unlink(self::TEMP_DIR . 'update.tar.gz');
}
if (file_exists(self::TEMP_DIR . 'update.tar')) {
unlink(self::TEMP_DIR . 'update.tar');
}
// Sauvegarde le message dans le journal
if (!empty($message)) {
$this->saveLog($message);
}
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_JSON,
'content' => [
'success' => $success,
'data' => json_encode($message, JSON_UNESCAPED_UNICODE)
]
]);
break;
// Configuration
case 4:
$success = true;
$message = '';
/**
* Restaure le fichier htaccess
*/
// Recopie htaccess
if (
$this->getData(['config', 'autoUpdateHtaccess']) === true
) {
public function steps() {
switch($this->getInput('step', helper::FILTER_INT)) {
// Préparation
case 1:
$success = true;
// RAZ la mise à jour auto
$this->setData(['core','updateAvailable', false]);
// Backup du dossier Data
helper::autoBackup(self::BACKUP_DIR,['backup','tmp','file']);
// Sauvegarde htaccess
if ($this->getData(['config','autoUpdateHtaccess'])) {
$success = copy('.htaccess', '.htaccess' . '.bak');
}
// Nettoyage des fichiers d'installation précédents
if(file_exists(self::TEMP_DIR.'update.tar.gz') && $success) {
$success = unlink(self::TEMP_DIR.'update.tar.gz');
}
if(file_exists(self::TEMP_DIR.'update.tar') && $success) {
$success = unlink(self::TEMP_DIR.'update.tar');
}
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_JSON,
'content' => [
'success' => $success,
'data' => null
]
]);
break;
// Téléchargement
case 2:
// Téléchargement depuis le serveur de Zwii
//$success = (file_put_contents(self::TEMP_DIR.'update.tar.gz', helper::getUrlContents('https://zwiicms.fr/update/' . common::ZWII_UPDATE_CHANNEL . '/update.tar.gz')) !== false);
// URL sur le git
//$newVersion = helper::getUrlContents('https://zwiicms.fr/update/' . common::ZWII_UPDATE_CHANNEL . '/version');
file_put_contents(self::TEMP_DIR.'update.tar.gz', helper::getUrlContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/update.tar.gz'));
$md5origin = helper::getUrlContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/update.md5');
$md5origin = (explode(' ',$md5origin));
$md5target = md5_file(self::TEMP_DIR.'update.tar.gz');
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_JSON,
'content' => [
'success' => $md5origin[0] === $md5target,
'data' => null
]
]);
break;
// Installation
case 3:
$success = true;
// Check la réécriture d'URL avant d'écraser les fichiers
$rewrite = helper::checkRewrite();
// Décompression et installation
try {
// Décompression dans le dossier de fichier temporaires
$pharData = new PharData(self::TEMP_DIR.'update.tar.gz');
$pharData->decompress();
// Installation
$pharData->extractTo(__DIR__ . '/../../../', null, true);
} catch (Exception $e) {
$success = $e->getMessage();
}
// Nettoyage du dossier
if(file_exists(self::TEMP_DIR.'update.tar.gz')) {
unlink(self::TEMP_DIR.'update.tar.gz');
}
if(file_exists(self::TEMP_DIR.'update.tar')) {
unlink(self::TEMP_DIR.'update.tar');
}
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_JSON,
'content' => [
'success' => $success,
'data' => $rewrite
]
]);
break;
// Configuration
case 4:
$success = true;
$rewrite = $this->getInput('data');
// Réécriture d'URL
if ($rewrite === "true") {
$success = (file_put_contents(
'.htaccess',
PHP_EOL .
'<IfModule mod_rewrite.c>' . PHP_EOL .
"\tRewriteEngine on" . PHP_EOL .
"\tRewriteBase " . helper::baseUrl(false, false) . PHP_EOL .
"\tRewriteCond %{REQUEST_FILENAME} !-f" . PHP_EOL .
"\tRewriteCond %{REQUEST_FILENAME} !-d" . PHP_EOL .
"\tRewriteRule ^(.*)$ index.php?$1 [L]" . PHP_EOL .
'</IfModule>',
FILE_APPEND
) !== false);
}
// Recopie htaccess
if ($this->getData(['config','autoUpdateHtaccess']) &&
$success && file_exists( '.htaccess.bak')
) {
// L'écraser avec le backup
$success = copy('.htaccess.bak', '.htaccess');
if ($success === false) {
$message = helper::translate('La copie de sauvegarde du fichier htaccess n\'a pas été restaurée !');
http_response_code(500);
}
// Effacer le backup
$success = copy( '.htaccess.bak' ,'.htaccess' );
// Effacer l ebackup
unlink('.htaccess.bak');
} else {
/**
* Restaure la réécriture d'URL
*/
if (file_exists(self::DATA_DIR . '.rewrite')) { // Ajout des lignes dans le .htaccess
$fileContent = file_get_contents('.htaccess');
$rewriteData = PHP_EOL .
'# URL rewriting' . PHP_EOL .
'<IfModule mod_rewrite.c>' . PHP_EOL .
"\tRewriteEngine on" . PHP_EOL .
"\tRewriteBase " . helper::baseUrl(false, false) . PHP_EOL .
"\tRewriteCond %{REQUEST_FILENAME} !-f" . PHP_EOL .
"\tRewriteCond %{REQUEST_FILENAME} !-d" . PHP_EOL .
"\tRewriteRule ^(.*)$ index.php?$1 [L]" . PHP_EOL .
'</IfModule>' . PHP_EOL .
'# URL rewriting' . PHP_EOL;
$fileContent = str_replace('# URL rewriting', $rewriteData, $fileContent);
$success = $this->secure_file_put_contents(
'.htaccess',
$fileContent
);
unlink(self::DATA_DIR . '.rewrite');
}
}
/**
* Met à jour les dictionnaires des langues depuis les nouveaux modèles installés
*/
require_once('core/module/install/ressource/defaultdata.php');
$installedLanguages = $this->getData(['language']);
$defaultLanguages = init::$defaultData['language'];
foreach ($installedLanguages as $key => $value) {
if (
isset($defaultLanguages[$key]['date']) &&
$defaultLanguages[$key]['date'] > $value['date'] &&
isset($defaultLanguages[$key]['version']) &&
$defaultLanguages[$key]['version'] >= $value['version']
) {
copy('core/module/install/ressource/i18n/' . $key . '.json', self::I18N_DIR . $key . '.json');
$this->setData(['language', $key, $defaultLanguages[$key]]);
}
}
// Sauvegarde le message dans le journal
if (!empty($message)) {
$this->saveLog($message);
}
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_JSON,
'content' => [
'success' => $success,
'data' => json_encode($message, JSON_UNESCAPED_UNICODE)
]
]);
}
}
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_JSON,
'content' => [
'success' => $success,
'data' => null
]
]);
break;
}
}
/**
* Mise à jour
*/
public function update()
{
// Action interdite
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
) {
// Valeurs en sortie
$this->addOutput([
'access' => false
]);
} else {
// Nouvelle version
self::$newVersion = helper::getUrlContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version');
// Variable de version
if (helper::checkNewVersion(common::ZWII_UPDATE_CHANNEL)) {
self::$updateButtonText = helper::translate('Mise à jour');
}
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT,
'title' => helper::translate(self::$updateButtonText),
'view' => 'update'
]);
}
public function update() {
// Nouvelle version
self::$newVersion = helper::getUrlContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version');
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT,
'title' => 'Mise à jour',
'view' => 'update'
]);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,693 +0,0 @@
{
"'Ne pas afficher' crée une page orpheline non accessible par le biais des menus.": "'Do not display' creates an orphan page not accessible through menus.",
"'Sauvegarder et télécharger les données du module": "'Save and download module data",
"1 jour": "1 jour",
"1/4 : Préparation...": "1/4: preparation ...",
"10 minutes": "10 minutes",
"10 tentatives": "10 attempts",
"14 jours": "14 days",
"15 minutes": "15 minutes",
"2 jours": "2 days",
"2/4 : Téléchargement...": "2/4: Download ...",
"3 tentatives": "3 attempts",
"3/4 : Installation...": "3/4 : Installation...",
"4 jours": "4 days",
"4/4 : Configuration...": "4/4 : Setup...",
"5 minutes": "5 minutes",
"5 tentatives": "5 attempts",
"7 jours": "7 days",
"Accueil": "Homepage",
"Accède au site": "Access to the site",
"Accède aux pages réservées": "Access to restricted pages",
"Accède aux pages réservées et à un dossier partagé": "Access to restricted pages and a shared folder",
"Accès bloqué %d minutes": "Blocked access %d minutes",
"Accès désactivé": "Access disabled",
"Accès interdit, erreur 403": "Access prohibited, error 403",
"Action interdite": "Prohibited action",
"Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.": "Compulsory activation according to French laws unless you use your own consent system.",
"Activer": "Enable",
"Activer la journalisation": "Activate journalization",
"Actualiser": "Update",
"Adaptation": "Adaptation",
"Administrateur": "Administrator",
"Administration": "Administration",
"Adresse SMTP": "SMTP Address",
"Adresse du proxy": "Proxy address",
"Adresse électronique": "email address",
"Affectation": "Assignment",
"Affiche le nom de la page parente suivi du nom de la page, le titre ne doit pas être masqué.": "Displays the name of the parent page followed by the page name, the title should not be hidden.",
"Affiche les icônes de gestion du compte et de déconnexion des membres simples connectés": "Displays account management and logout icons for logged-in regular members",
"Afin d'assurer le bon fonctionnement de Zwii, veuillez ne pas fermer cette page avant la fin de l'opération.": "In order to ensure the proper functioning of Zwii, please do not close this page before the end of the operation.",
"Aide": "Help",
"Ajouter": "Add",
"Ajouter un profil": "Add Profile",
"Ajouter un utilisateur": "Add a user",
"Ajouter une fonte": "Add a cast iron",
"Alignement": "Alignment",
"Aligner la bannière avec le contenu": "Align the banner with the contents",
"Ancien mot de passe": "Old Password",
"Anonymat des adresses IP": "Anonymity of IP addresses",
"Apache URL intelligent": "Intelligent Apache URL",
"Apache URL intelligentes": "Intelligent Apache URL",
"Apparence": "Appearance",
"Appliquer": "Apply",
"Approuver un commentaire": "Approve Comment",
"Après": "After",
"Après la bannière": "After the banner",
"Après le contenu de la page": "After the content of the page",
"Archive": "Archive",
"Archive ZIP": "Zip archive",
"Archive copiée dans le dossier Modules du gestionnaire de fichier": "Archive copied in the Modules folder",
"Archive de thème invalide": "Invalid theme archive",
"Archive invalide": "Invalid archive",
"Archive invalide, l'écriture dans le dossier core est interdite": "Invalid archive, writing in the core file is prohibited",
"Archive invalide, le descripteur est absent": "Invalid archive, the descriptor is absent",
"Archive invalide, le fichier de classe est absent": "Invalide archive, the class file is absent",
"Archive invalide, les dossiers ne correspondent pas au descripteur": "Invalid archive, the files do not correspond to the descriptor",
"Archive non spécifiée ou introuvable": "Archive not specified or not found",
"Archive à restaurer": "Archive to restore",
"Arrière plan": "Background",
"Arrière plan des blocs": "Blocks background",
"Arrière plan des champs": "Fields background",
"Arrondi des angles": "Rounding of angles",
"Au centre": "Center",
"Au début": "At first",
"Au milieu au centre": "In the middle in the center",
"Au milieu à droite": "In the middle right",
"Au milieu à gauche": "In the middle on the left",
"Au-dessus du site": "Above the site",
"Aucun": "None",
"Aucun dossier": "No Folder",
"Aucun fichier journal à télécharger": "No log file to download",
"Aucun journal à effacer": "No log file to erase",
"Aucun menu": "No menu",
"Aucune": "None",
"Aucune liste noire à effacer": "No blacklist to erase",
"Aucune liste noire à télécharger": "No blacklist to download",
"Auteur :": "Author:",
"Authentification": "Authentication",
"Automatique": "Automatique",
"Autoriser les robots à référencer le site": "Allow robots to reference the site",
"Autorisé": "Allowed",
"Avant la bannière": "Before the banner",
"Avant le contenu de la page": "Before the content of the page",
"Background": "Background",
"Banni": "Ban",
"Bannière": "Banner",
"Bannière cliquable": "Clickable banner",
"Barre 1/3 - page 2/3": "Sidebar 1/3 - page 2/3",
"Barre 1/4 - page 1/2 - barre 1/4": "Sidebar 1/4 - page 1/2 - Sidebar 1/4",
"Barre 1/4 - page 3/4": "Sidebar 1/4 - page 3/4",
"Barre 2/12 - page 7/12 - barre 3/12": "Sidebar 2/12 - page 7/12 - Sidebar 3/12",
"Barre 3/12 - page 7/12 - barre 2/12": "Sidebar 3/12 - page 7/12 - Sidebar 2/12",
"Barre de membre": "Member bar",
"Barre latérale": "Sidebar",
"Barre latérale droite :": "Right sidebar:",
"Barre latérale gauche :": "Left sidebar:",
"Barres latérales": "Side bars",
"Bienvenue %s %s": "Welcome %s %s",
"Blocage après échecs": "Blocking after chess",
"Blog": "Blog",
"Bords arrondis": "Rounded edges",
"Bordure des blocs": "Blocks border",
"Bordure des champs": "Fields border",
"Bouton Aide": "Help button",
"Bouton Standard": "Standard button",
"Bouton de validation": "Validation button",
"Bouton effacement": "Delete button",
"Bouton retour": "Return button",
"Bouton standard": "Standard button",
"Bouton validation": "Validation button",
"Boutons": "Buttons",
"Caché": "Hidden",
"Cachée": "Hidden",
"Captcha complexe": "Complex captcha",
"Captcha à la connexion": "Captcha at connecting",
"Captcha, identifiant ou mot de passe incorrects": "Incorrect captcha, login or password",
"Capture d'écran Open Graph": "Open Graph screenshot",
"Capture d'écran générée avec succès": "Successful generated screenshot",
"Casse": "Case",
"Catalogue": "Store",
"Catégorie": "Category",
"Ce membre pourra téléverser ou télécharger des fichiers dans le dossier 'partage' et ses sous-dossiers": "This member upload or download files in the 'Sharing' folder and its subfolders",
"Cette page ne doit pas apparaître dans l'arborescence du menu. Créez une page orpheline.": "This page should not appear in the menu tree. Create an orphan page.",
"Cette redirection ne concerne que les pages d'administration du site.": "This redirection only concerns the administration pages of the site.",
"Chaîne Youtube": "Youtube channel",
"Chiffres": "Numbers",
"Cible": "Target",
"Cliquez sur une zone afin d'accéder à ses options de personnalisation.": "Click on an area to access its customization options.",
"Commentaire": "Comment",
"Complète": "Complete",
"Compte administrateur": "Administrator account",
"Compte de l'utilisateur": "User Account",
"Compte verrouillé": "Locked",
"Configuration": "Setup",
"Configuration du module": "Module setup",
"Configurer": "Configure",
"Configurer mon compte": "Set up my account",
"Confirmation": "Confirmation",
"Confirmer la suppression de cet utilisateur": "Confirm the deletion of this user",
"Confirmer la dissociation du module de cette page": "Confirm the dissociation of the module of this page",
"Confirmer la désinstallation du module": "Confirm the uninstalling of the module",
"Confirmer la suppression de cet utilisateur": "Confirm the deletion of this user",
"Confirmer la suppression de cette langue": "Confirm deletion of this language",
"Confirmer la suppression de la page": "Confirm the deletion of the page",
"Confirmer la suppression des données du module": "Confirm the deletion of module data",
"Confirmez-vous la suppression de cette page ?": "Do you confirm the deletion of this page?",
"Connexion": "Connection",
"Consulter l'aide en ligne": "Online help",
"Contents": "Contents",
"Contenu": "Contents",
"Contenu HTML": "HTML contents",
"Contenu avancé": "Advanced contents",
"Contenu du menu vertical": "Vertical menu content",
"Contrôle total": "Full control",
"Cookies": "Cookies",
"Cookies Zwii": "Cookies Zwii",
"Copie de contenus localisés": "Localized content copy",
"Copie de sites inter-langues": "Copy of inter-language sites",
"Copie des traductions rédigées": "Copy of written translations",
"Copie terminée avec des erreurs": "Copy finished with errors",
"Copie terminée avec succès": "Copy successfully completed",
"Copier": "Copy",
"Copier sauvegardes auto": "Copy auto backups",
"Couleur de fond automatique": "Automatic background color",
"Couleur icône haut de page": "Color of top page icon",
"Couleur texte page active": "Active page text color",
"Couleur unie ou papier-peint": "United color or wallpaper",
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence.": "Visible color in the absence of an image. <br /> The horizontal cursor regulates the level of transparency.",
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.": "Visible color in the absence of an image. <br /> The horizontal cursor regulates the level of transparency. The color of the text is automatic.",
"Couleurs": "Colors",
"Dans le site": "Into the site",
"Dans quelle langue utiliserez-vous Zwii ?": "In which language will you use Zwii?",
"Date": "Date",
"Description": "Site description",
"Disponible si le consentement des cookies est activé.": "Available if cookie consent is enabled.",
"Disposition": "Layout",
"Données %s copiées vers %s": "Data %s copied to %s",
"Données des modules": "Module data",
"Données importées": "Imported data",
"Dossier": "Folder",
"Droits sur les dossiers": "Folder authorizations",
"Droits sur les fichiers": "File authorizations",
"Dupliquer": "Duplicate",
"Dupliquer la page": "Duplicate the page",
"Déconnecte les sessions ouvertes précédemment sur d'autres navigateurs ou terminaux. Activation recommandée.": "Disconnects the previously opened sessions on other browsers or terminals. Recommended activation.",
"Déconnecter": "Disconnect",
"Déconnexion !": "Logout!",
"Déconnexion automatique": "Automatic disconnection",
"Définir par défaut": "Set as default",
"Dévoiler le mot de passe": "Reveal the password",
"Effacer": "Delete",
"Effacer la page": "Delete the page",
"Effacer tous les commentaires": "Delete all Comments",
"Effacer toutes les statistiques": "Delete all statistics",
"Effacer un commentaire": "Delete Comment",
"Effacer une catégorie": "Delete category",
"Emplacement :": "Location:",
"Emplacement dans le menu": "Location in the menu",
"En bas au centre": "Down in the center",
"En bas à droite": "At the bottom right",
"En bas à gauche": "At the bottom left",
"En cas de changement de module, les données du module précédent seront supprimées.": "In the event of a module change, data from the previous module will be deleted.",
"En dessous du site": "Below the site",
"En haut au centre": "Top in the center",
"En haut à droite": "Top right",
"En haut à gauche": "On the top corner left",
"En position libre ajoutez le module en plaçant [MODULE] à l'endroit voulu dans votre page.": "In free position add the module by placing [module] to the desired location in your page.",
"En-dehors du site": "Outside the site",
"Enregistrer": "Save",
"Envoyer un message de confirmation": "Send a confirmation message",
"Erreur : sauvegarde non générée !": "Error: non-generated backup!",
"Erreur d'URL": "URL error",
"Erreur d'extraction, vérifiez les permissions": "Extraction error, check permissions",
"Erreur de copie": "Copy error",
"Erreur de copie, vérifiez les permissions": "Copy error, check permissions",
"Erreur de lecture, vérifiez les permissions": "Reading error, check permissions",
"Erreur inconnue": "unknown error",
"Erreur inconnue, le module n'est pas installé": "Unknown error, the module is not installed",
"Export CSV": "Export CSV",
"Expéditeur": "From",
"Extension": "Extension",
"Extraire": "Extract",
"Facebook": "Facebook",
"Famille": "Family",
"Favicon thème sombre": "Dark theme favicon",
"Feuille de style spécifique à la page.": "Style sheet specific to the page.",
"Fichiers": "Files",
"Fichiers effacés": "Erased files",
"Fil d'Ariane dans le titre": "Breadcrumb in the title",
"Fond du sous-menu": "Background of the submenu",
"FontId": "FontId",
"Fonte": "Font",
"Fonte actualisée": "Update",
"Fonte créée": "Font created",
"Fonte en ligne": "Online font",
"Fonte installée": "Installed font",
"Fonte non créée, ressource absente !": "Font not created, absent resource!",
"Fonte supprimée": "Font deleted",
"Fontes": "Fonts",
"Format incorrect": "Wrong format",
"Formulaire": "Form",
"Fréquence de recherche": "Search frequency",
"Fuseau horaire": "Time zone",
"Gabarits de page - Barre latérale": "Page templates - Sidebar",
"Gestion": "Management",
"Gestion des modules": "Module management",
"Gestion des thèmes": "Themes management",
"Gestionnaire de fichiers": "File Manager",
"Github": "Github",
"Grande": "Large",
"Grande (220%)": "Grande (220%)",
"Grande (300px)": "Grande (300px)",
"Gras": "Fetter",
"Groupe": "Group",
"Groupe associé": "Associated Group",
"Groupe requis pour accéder à la page :": "Group required to access the page:",
"Groupes": "Groups",
"Générer sitemap.xml et robots.txt": "Generate sitemap.xml and robots.txt",
"Générer une capture Open Graph": "Generate an Open Graph capture",
"Gérer les catégories": "Manage categories",
"Gérer les commentaires": "Manage comments",
"Gérer les données": "Manage Data",
"Hauteur": "Height:",
"Hauteur de l'image": "Image Height",
"Hauteur de l'image sélectionnée": "Selected Image Height",
"Hauteur maximale": "Maximum height",
"ID de la chaîne : https://www.youtube.com/channel/[ID].": "Channel ID: https://www.youtube.com/channel/ [ID].",
"Icône": "Icon",
"Icône avec bulle de texte": "Icon with text bubble",
"Icône haut de page, couleur arrière-plan": "Top page icon, background color",
"Identifiant": "Identifier",
"Identifiant (sans espace ni majuscule)": "Identifier (without space or capital letters)",
"Identité": "Identity",
"Identité de la fonte": "Identity of the font",
"Identité du site": "Site identity",
"Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.": "It appears in the title bar and sharing on social networks.",
"Image": "Image",
"Image étirée (100% 100%)": "Stretched image (100% 100%)",
"Important": "Important",
"Importante": "Important",
"Importation d'utilisateurs": "Import of users",
"Importation de fichier plat CSV": "CSV flat file import",
"Importation effectuée": "Import done",
"Importer": "Import",
"Importer dans": "Import into",
"Importer des utilisateurs en masse": "Import mass users",
"Impossible d'ouvrir l'archive": "Impossible to open the archive",
"Impossible de modifier votre propre groupe.": "Unable to modify your own group.",
"Impossible de soumettre le formulaire, car il contient des erreurs": "Unable to submit the form, as it contains errors",
"Impossible de supprimer une page contenant des pages enfants": "Unable to delete a page containing children's pages",
"Impossible de supprimer votre propre compte": "Unable to delete your own account",
"Inclure le contenu du gestionnaire de fichiers": "Include the content of the file manager",
"Incorrect": "Incorrect",
"Informations": "Informations",
"Instagram": "Instagram",
"Installation terminée": "Installation completed",
"Installer": "Install",
"Installer depuis le catalogue en ligne": "Install from the online catalog",
"Installer depuis une archive": "Install from an archive",
"Installer les données d'un module": "Install a module data",
"Installer ou mettre à jour un module téléchargé": "Install or update a downloaded module",
"Installer un module": "Install a module",
"Installer un thème archivé (site ou administration)": "Install an archived theme (site or administration)",
"Instructions JS ou jquery spécifiques à la page.": "JS or JQuery instructions specific to the page.",
"Interface": "Interface",
"Jeton invalide": "Invalid token",
"Journal réinitialisé avec succès": "Log file successfully reset",
"Journalisation": "Journalization",
"L'archive a été déposée dans le gestionnaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.": "The archive was deposited in the file manager. Archives below version 9 are not accepted.",
"L'identifiant est défini lors de la création du compte, il ne peut pas être modifié.": "The identifier is defined when creating the account, it cannot be changed.",
"La carte du site a été mise à jour": "The site card has been updated",
"La copie de sauvegarde du fichier htaccess n'a pas été restaurée !": "Backup copy of htaccess file has not been restored!",
"La description d'une page participe à son référencement, chaque page doit disposer d'une description différente.": "The description of a page participates in its referencing, each page must have a different description.",
"La page %s est ouverte par l'utilisateur %s": "Page %s opened by user %s",
"La page demandée n'existe pas ou est introuvable (erreur 404)": "This page does not exists (error 404)",
"La page est affichée dans un menu horizontal mais pas dans le menu vertical d'une barre latérale.": "The page is displayed in a horizontal menu but not in the vertical menu of a sidebar.",
"La première page que vos visiteurs verront.": "The first page that your visitors will see.",
"La règlementation française impose un anonymat de niveau 2": "French regulations require level 2 anonymity",
"La réécriture d'URL n'a pas été restaurée !": "URL rewriting has not been restored!",
"La sauvegarde des fichiers peut prendre du temps. Continuer ?": "The backup of the files can take time. Continue?",
"La suppression a échoué": "The deletion failed",
"La version installée est plus récente": "The installed version is more recent",
"La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.": "The verification is daily. Option deactivated if the server configuration does not allow it.",
"Langue de l'administration": "Language of administration",
"Langue du site par défaut": "Default site language",
"Langue par défaut": "Default language",
"Langues": "Languages",
"Langues disponibles": "Available languages",
"Langues installées": "Installed languages",
"Largeur": "Width",
"Largeur de l'image": "Image Width",
"Largeur du site": "Site Width",
"Le curseur horizontal règle le niveau de transparence, le placer tout à la gauche pour un surlignement invisible.": "The horizontal cursor regulates the level of transparency, place it on the left for invisible highlights.",
"Le curseur horizontal règle le niveau de transparence.": "The horizontal cursor regulates the level of transparency.",
"Le fuseau horaire est utile au bon référencement": "The time zone is useful for the right SEO",
"Le menu accessoire est aligné à droite de la barre de menu, c'est un emplacement réservé aux drapeaux et au bouton de connexion.": "The accessory menu is aligned to the right of the menu bar, it is a place reserved for flags and the login button.",
"Le menu horizontal intégral": "The full horizontal menu",
"Le module %s a été %s": "The module %s was %s",
"Le module %s de la page %s a été supprimé": "The %s module of the %s has been deleted",
"Le module %s est désinstallé, il reste peut-être des données dans %s": "The module %s is uninstalled, there may be data in %s",
"Le sous-menu de la page parente": "The parent page submenu",
"Le survol d'une icône de l'écran de connexion affiche temporairement le mot de passe.": "Flyover of an icon on the connection screen temporarily displays the password.",
"Le titre court est affiché dans les menus. Il peut être identique au titre de la page.": "The short title is displayed in the menus. It can be identical to the page title.",
"Les langues sélectionnées sont identiques": "The selected languages are identical",
"Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.": "Legal notices are compulsory in France. An option of the footer adds a discrete link to this page.",
"Les modifications que vous avez apportées ne seront peut-être pas enregistrées.": "The changes you have made may not be recorded.",
"Les tailles des polices de la bannière, de menu et de pied de page sont proportionnelles à cette taille.": "The font sizes of the banner, menu and footer are proportional to this size.",
"Lettres": "Letters",
"Libre": "Libre",
"Licence :": "Licence:",
"Lien de connexion": "Login link",
"Lien page des mentions légales.": "Link of legal notices.",
"Liens": "Links",
"Limitation des tentatives": "Limitation of attempts",
"Limitée au site": "Limited to the site",
"Linkedin": "Linkedin",
"Liste noire": "Blacklist",
"Liste noire réinitialisée avec succès": "Blacklist successfully reset",
"Lors d'une mise à jour automatique, conserve le fichier htaccess de la racine du site.": "During an automatic update, keeps the htaccess file of the site root.",
"Léger": "Light",
"Légère": "Light",
"Maigre": "Lean",
"Maintenance": "Maintenance",
"Majuscule à chaque mot": "Capper with each word",
"Majuscules": "Capital letters",
"Marges verticales": "Vertical margins",
"Masquer la bannière en écran réduit": "Hide the banner in reduced screen",
"Masquer la page et les pages enfants dans le menu d'une barre latérale": "Hide the page and children's pages in the menu of a sidebar",
"Masquer les pages enfants dans le menu horizontal": "Hide children's pages in the horizontal menu",
"Membre": "Member",
"Membre avec droit de partage": "Member with sharing rights",
"Membre simple": "Simple member",
"Mentions légales": "Legal notice",
"Menu": "Menu",
"Menu accessoire": "Accessory menu",
"Menu burger dans écran réduit": "Burger menu in reduced screen",
"Menu standard": "Standard menu",
"Message d'acceptation des Cookies": "Cookie acceptance message",
"Message de consentement aux cookies": "Cookie consent message",
"Mettre à jour": "Update",
"Mettre à jour le module orphelin": "Update the orphan module",
"Minuscules": "Tiny",
"Mise en forme des titres": "Formatting of titles",
"Mise en forme du texte": "Text formatting",
"Mise en forme du titre": "Title formatting",
"Mise en page": "Layout",
"Mise à jour": "Update",
"Mise à jour automatisée": "Automated update",
"Mise à jour terminée avec succès.": "Successful update completed.",
"Modifications enregistrées": "Modifications recorded",
"Module": "Module",
"Module de la page": "Page module",
"Modules": "Modules",
"Modules configurés": "Configured modules",
"Modules installés": "Installed modules",
"Modules orphelins": "Orphaned modules",
"Mot de passe": "Password",
"Mot de passe oublié": "Forgot your password",
"Mot de passe perdu": "Lost password",
"Motorisé par": "Powered by",
"Moyen": "Medium",
"Moyenne": "Medium",
"Moyenne (200%)": "Average (200%)",
"Moyenne (200px)": "Average (200px)",
"Méta-description": "Meta-description",
"Méta-titre": "Meta title",
"Ne pas afficher": "Do not display",
"Ne pas charger l'exemple de site (utilisateurs avancés)": "Do not load the example of a site (advanced users)",
"Ne pas répéter": "Do not repeat",
"Ne pas saisir les balises": "Don't type tags",
"News": "",
"Niveau 1 (192.168.12.x)": "Level 1 (192.168.12.x)",
"Niveau 2 (192.168.x.x)": "Level 2 (192.168.x.x)",
"Niveau 3 (192.x.x.x)": "Level 3 (192.x.x.x)",
"Nom": "Last Name",
"Nom Prénom": "Last name First Name",
"Nom du profil": "Profile Name",
"Nom utilisateur": "Username",
"Non": "No",
"Non tronquée": "Unmanned",
"Notre site est actuellement en maintenance. Nous sommes désolés pour la gêne occasionnée et faisons notre possible pour être rapidement de retour.": "Our site is currently under maintenance. We are sorry for the inconvenience caused and do our best to be quickly back.",
"Nouveau contenu localisé": "New localized content",
"Nouveau mot de passe": "New Password",
"Nouveau mot de passe enregistré": "New password recorded",
"Nouvel utilisateur": "New user",
"Nouvelle page créée": "New page created",
"Nouvelle page ou barre latérale": "New page or sidebar",
"Obligatoire": "Missing",
"Ombre": "Shadow",
"Option active en mode déconnecté uniquement, les pages enfants sont visibles et accessibles.": "Active option in disconnected mode only, children's pages are visible and accessible.",
"Option recommandée pour sécuriser la connexion. S'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.": "Recommended option to secure the connection. Applies to all the Captchas of the site. Simple Captcha is limited to an addition of numbers from 0 to 10. Complex Captcha uses four numbers of 0 to 20. Recommended activation.",
"Options": "Options",
"Options avancées": "Advanced options",
"Origine": "Origin",
"Oui": "Yes",
"Page": "Page",
"Page 2/3 - barre 1/3": "Page 2/3 - Sidebar 1/3",
"Page 3/4 - barre 1/4": "Page 3/4 - Sidebar 1/4",
"Page associée": "Associated page",
"Page de recherche": "Search page",
"Page dupliquée": "Duplicate page",
"Page et module dupliqués": "Duplicated page and module",
"Page inexistante, erreur 404": "Page non-existent, error 404",
"Page non cliquable": "Non-clickable page",
"Page parent": "Parent page",
"Page standard": "Standard page",
"Page supprimée": "Deleted page",
"Pages dans le menu": "Pages in the menu",
"Pages du site": "Site pages",
"Pages et les modules de": "Pages and modules of",
"Pages orphelines": "Orphan pages",
"Papier peint": "Wallpaper",
"Par défaut le menu est affiché APRES le contenu de la page. Pour le positionner à un emplacement précis, insérez [MENU] dans le contenu de la page.": "By default the menu is displayed after the content of the page. To position it at a specific location, insert [MENU] into the content of the page.",
"Paramètres": "Settings",
"Paramètres de la localisation": "Location parameters",
"Paramètres de la sauvegarde": "Backup settings",
"Paramètres du profil": "Profile Settings",
"Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d'envoi de mail.": "Settings to use when your host does not offer the mail sending feature.",
"Pas de marge au-dessus et en dessous du site": "No margin above and below the site",
"Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.": "Remember to delete your browser's cache if the favicon does not change.",
"Permission": "Permission",
"Permission et référencement": "Permission and SEO",
"Permissions": "Permissions",
"Permissions sur les dossiers": "Folder Permissions",
"Permissions sur les fichiers": "File Permissions",
"Permissions sur les pages": "Page Permissions",
"Petite": "Small",
"Petite (150px)": "Small (150px)",
"Petite (180%)": "Petite (180%)",
"Pied de page": "Footer",
"Pinterest": "Pinterest",
"Plan du site": "Sitemap",
"Police des titres": "Titles font",
"Police du texte": "Text font",
"Port SMTP": "SMTP port",
"Port du proxy": "Proxy port",
"Position": "Position",
"Position du module": "Position of the module",
"Pour définir la page comme barre latérale, choisissez l'option dans la liste.": "To define the page as a sidebar, choose the option from the list.",
"Presse Papier": "Clipboard",
"Presse papier": "Clipboard",
"Profils des groupes": "Group Profiles",
"Proportionnelle à la taille définie dans le site.": "Proportional to that defined in the site.",
"Prénom": "First name",
"Prénom Nom": "Firstname name",
"Préparation de la mise à jour": "Preparation of the update",
"Préserver le fichier htaccess racine": "Preserve the root htaccess file",
"Préserver les comptes des utilisateurs déjà installés": "Preserve user accounts already installed",
"Prévenir l'utilisateur par mail": "Prevent the user by email",
"Prévisualiser": "Preview",
"Pseudo": "Pseudo",
"Rang 9 > rang 1. Le profil de rang 1 n'est pas modifiable.": "Rank 9 > Rank 1. The profile of Rank 1 is not editable.",
"Ratio": "Ratio",
"Ratio :": "Ratio:",
"Recherche": "Search",
"Recherche dans le site": "Search on the site",
"Rechercher": "Search",
"Rechercher une mise à jour en ligne": "Search for an online update",
"Redirection": "Redirection",
"Redirection vers la connexion": "Redirection to connection",
"Renommer": "Rename",
"Renseignez les champs ci-dessous pour finaliser l'installation.": "Fill in the fields below to finalize the installation.",
"Responsive (contain)": "Responsive (contain)",
"Responsive (cover)": "Responsive (cover)",
"Restauration des bases de données absentes": "Restoring missing databases",
"Restauration effectuée avec succès": "Restoration successfully completed",
"Restaurer": "Restore",
"Restaurer les données du site": "Restore site data",
"Rester connecté sur ce navigateur": "Stay connected on this browser",
"Retour": "Return",
"Rien à importer, erreur de format ou fichier incorrect": "Nothing to import, format error or incorrect file",
"Rédacteur": "Editor",
"Référencement": "SEO",
"Réinitialisation du mot de passe": "Reset password",
"Réinitialiser avec le thème par défaut": "Reset with the default theme",
"Réinitialiser la feuille de style": "Reset the style sheet",
"Réinitialiser la liste": "Reset the list",
"Réinitialiser le journal": "Reset the log file",
"Réinstaller": "Reinstall",
"Répétition": "Repetition",
"Réseau": "Network",
"Réseaux sociaux": "Social networks",
"S'ouvre dans un nouvel onglet": "Opens in a new tab",
"SMTP": "SMTP",
"SMTP personnalisé": "Custom SMTP",
"Saisir la clé, puis valider le formulaire avant de cliquer sur le bouton de génération": "Enter the key, then validate the form before clicking on the generation button",
"Saisissez le Titre de gestion des cookies.": "Enter the title of the cookie management window.",
"Saisissez le message pour les cookies déposés par ZwiiCMS, nécessaires au fonctionnement et qui ne nécessitent pas de consentement.": "Enter the message for cookies set by Zwiicms, necessary for operation and which do not require consent.",
"Saisissez le texte du lien vers les mentions légales,la page doit être définie dans la configuration du site.": "Enter the text of the link to the legal notices, the page must be defined in the site configuration.",
"Saisissez votre ID : https://pinterest.com/[ID].": "Enter your ID: https://pinterest.com/[ID].",
"Saisissez votre ID : https://twitter.com/[ID].": "Enter your ID: https://twitter.com/[ID].",
"Saisissez votre ID : https://www.facebook.com/[ID].": "Enter your ID: https://www.facebook.com/).",
"Saisissez votre ID : https://www.instagram.com/[ID].": "Enter your ID: https://www.instagram.com/ [ID].",
"Saisissez votre ID Github : https://github.com/[ID].": "Enter your GitHub ID: https://github.com/[ID].",
"Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].": "Enter your LinkedIn ID: https://fr.linkedin.com/in/[ID].",
"Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].": "Enter your user ID: https://www.youtube.com/user/ [ID].",
"Sauvegarde": "Backup",
"Sauvegarde automatique quotidienne du site": "Daily automatic backup of the site",
"Sauvegarde du thème dans le": "Backup of the theme in the",
"Sauvegarde générée avec succès": "Successfully generated backup.",
"Sauvegarder": "Backup",
"Sauvegarder et télécharger le module": "Save and download the module",
"Sauvegarder le module dans le gestionnaire de fichiers": "Save the module in the file manager",
"Sauvegarder les données du module dans le gestionnaire de fichiers": "Save module data in the file manager",
"Sauvegarder les données du site": "Save site data",
"Script dans body": "Script in body",
"Script dans head": "Script in head",
"Scripts externes": "External scripts",
"Se déconnecter": "Logout",
"Service en ligne inaccessible": "Inaccessible online service",
"Seul un administrateur peut se connecter lors d'une maintenance": "Only an administrator can login during maintenance",
"Si le contenu du gestionnaire de fichiers est très volumineux, mieux vaut une copie par FTP.": "If the content of the file manager is very large, it is better to copy by FTP.",
"Signature": "Signature",
"Site": "Site",
"Site en maintenance": "Site under maintenance",
"Size": "Size",
"Source": "Source",
"Standard": "Standard",
"Style": "Style",
"Suppression interdite": "Deletion prohibited",
"Suppression interdite, page active dans la configuration de la langue du site": "Deletion not allowed, page is active in the site's language configuration",
"Supprime le point d'interrogation dans les URL, l'option est indisponible avec les autres serveurs Web": "Deletes the question mark in the URLs, the option is unavailable with other web servers",
"Supprimer": "Delete",
"Supprimer la page": "Delete the page",
"Supprimer le module": "Delete the module",
"Supprimer toutes les sauvegardes automatiques ?": "Remove all automatic backups?",
"Sur l'axe horizontal": "On the horizontal axis",
"Sur l'axe vertical": "On the vertical axis",
"Sur les deux axes": "On both axes",
"Sécurité": "Security",
"Sécurité de la connexion": "Connection security",
"Sécurité désactivée": "Safety deactivated",
"Sélectionner un fichier": "Select a file",
"Sélectionnez au moins un contenu à afficher": "Select at least one content to display",
"Sélectionnez la langue à copier vers une langue cible": "Select the language to copy to a target language",
"Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.": "Select an icon adapted to a dark theme. <br> Remember to delete your browser's cache if the favicon does not change.",
"Sélectionnez une image ou une icône de petite dimension": "Select a small image or icon",
"Sélectionnez une langue": "Select a language",
"Sélectionnez une page contenant le module 'Recherche'. Une option du pied de page ajoute un lien discret vers cette page.": "Select a page containing the 'research' module. An option of the footer adds a discrete link to this page.",
"Sélectionnez une page pour activer": "Select a page to activate",
"Séparateur": "Separator",
"Taille": "Size",
"Text": "Text",
"Texte": "Text",
"Thème": "Theme",
"Thème de l'administration": "Administration theme",
"Thème du site": "Site theme",
"Thème importé": "Imported theme",
"Thèmes": "Themes",
"Titre": "Title",
"Titre court": "Short title",
"Titre masqué": "Masked title",
"Titre masqué dans la page": "Masked hidden in the page",
"Titres": "Titles",
"Tous les dossiers": "All Folders",
"Tous les droits d'édition des contenus": "All content editing rights",
"Tout Effacer": "Clear All",
"Traduction supprimée": "Translation deleted",
"Très grande": "Very large",
"Très grande (240%)": "Very large (240%)",
"Très grande (400px)": "Very large (400px)",
"Très important": "Very important",
"Très importante": "Very important",
"Très léger": "Very light",
"Très légère": "Very light",
"Très petite": "Very small",
"Très petite (100px) ": "Very small (100px)",
"Très petite (160%)": "Very small (160%)",
"Twitter": "Twitter",
"Type de captcha": "Type of Captcha",
"Type de proxy": "Proxy type",
"Téléchargement et validation de l'archive": "Download and validation of the archive",
"Télécharger": "Download",
"Télécharger la liste": "Download list",
"Télécharger le journal": "Download logs",
"Télécharger le module dans le gestionnaire de fichiers": "Download the module in the file manager",
"Téléverser": "Upload",
"URL incorrecte": "Incorrect url",
"Un mail a été envoyé pour confirmer la réinitialisation": "An email was sent to confirm the reset",
"Une archive du dossier /site/data est conservée pendant 30 jours. Activation recommandée": "An archive of the file /site/data is kept for 30 days. Recommended activation",
"Une erreur est survenue lors de l'étape :": "An error occurred during the stage:",
"Url du fichier de fonte": "Font file URL",
"Utilisateur inexistant": "Non-existent user",
"Utilisateur supprimé": "User deleted",
"Utilisateurs": "Users",
"Valider": "Submit",
"Version": "Version",
"Version n°": "Version n°",
"Vider dossier sauvegardes auto": "Empty auto backup files",
"Visiteur": "Visitor",
"Vous n'êtes pas autorisé à consulter cette page (erreur 403)": "You are not authorised to view this page (error 403)",
"Youtube": "Youtube",
"ZwiiCMS - Installation": "ZwiiCMS - Installation",
"actualisé": "updated",
"favicon.ico": "favicon.ico",
"faviconDark.ico": "favicondark.ico",
"gestionnaire de fichiers": "file manager",
"installé": "installed",
"jour": "day",
"jours": "days",
"sauvegardé avec succès": "successfully saved",
"vers": "to",
"À droite": "Right",
"À gauche": "Left",
"À l'emplacement du mot clé [MODULE] dans la page": "At the location of the keyword [MODULE] on the page",
"Échec de l'écriture, vérifiez les permissions": "Failure of writing, check permissions",
"Échecs": "Fail",
"Éditer": "Edit",
"Éditer la page": "Edit the page",
"Éditer les dialogues": "Edit dialogs",
"Éditer une catégorie": "Edit category",
"Éditeur": "Editor",
"Éditeur CSS": "CSS editor",
"Éditeur JS": "JS editor",
"Éditeur de script %s": "Script editor %s",
"Éditeur de script dans Body": "Script editor in Body",
"Éditeur de script dans Head": "Script editor in Head",
"Éditeur simple": "Simple editor",
"Édition des pages": "Page editing",
"Édition du profil %s": "Edit Profile %s",
"Éléments": "Items",
"Étendu sur la page": "Spread across the page",
"Étiquettes des pages spéciales": "Special pages labels",
"Dimensions minimales": "Minimum dimensions",
"Taille maximale du fichier": "Maximum file size",
"5 Mo pour les images JPEG": "5 MB for JPEG images",
"1 Mo pour les images PNG": "1 MB for PNG images",
"Poids": "Weight",
"Supprimer ce profil ?": "Delete this profile?",
"Masqué": "Hidden",
"Haut de page": "Top of Page",
"Bas de page": "Bottom of Page",
"Petit triangle": "Small Triangle",
"Grand triangle": "Large Triangle",
"Flèche": "Arrow",
"Modèle": "Template",
"Bouton de navigation droit": "Right Navigation Button",
"Bouton de navigation gauche": "Left Navigation Button",
"Groupes / Profils": "Groups / Profiles",
"Prénom commence par": "First Name starts with",
"Nom commence par": "Last Name starts with",
"Impossible de réinitialiser le mot de passe de ce compte !": "Impossible to reset this account password!"
}

View File

@ -1,693 +0,0 @@
{
"'Ne pas afficher' crée une page orpheline non accessible par le biais des menus.": "'No mostrar' crea una página huérfana a la que no se puede acceder a través de los menús.",
"'Sauvegarder et télécharger les données du module": "Guardar y descargar de los datos del módulo",
"1 jour": "1 Jour",
"1/4 : Préparation...": "1/4: Preparando...",
"10 minutes": "10 minutos",
"10 tentatives": "6 intentos",
"14 jours": "14 dias",
"15 minutes": "15 minutos",
"2 jours": "2 dias",
"2/4 : Téléchargement...": "2/4: Descargando...",
"3 tentatives": "3 intentos",
"3/4 : Installation...": "3/4: Instalando...",
"4 jours": "4 días",
"4/4 : Configuration...": "4/4: Configuración...",
"5 minutes": "5 minutos",
"5 tentatives": "5 intentos",
"7 jours": "7 días",
"Accueil": "Inicio",
"Accède au site": "Acceso al sitio",
"Accède aux pages réservées": "Acceso a páginas restringidas",
"Accède aux pages réservées et à un dossier partagé": "Acceso a páginas restringidas y una carpeta compartida",
"Accès bloqué %d minutes": "Acceso bloqueado minutos",
"Accès désactivé": "Acceso desactivado",
"Accès interdit, erreur 403": "Acceso denegado, error 403",
"Action interdite": "Acción no permitida",
"Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.": "Activación obligatoria según las leyes francesas a menos que utilice su propio sistema de consentimiento.",
"Activer": "Activar",
"Activer la journalisation": "Habilitar registro",
"Actualiser": "Actualizar",
"Adaptation": "Adaptación",
"Administrateur": "Administrador",
"Administration": "Administración",
"Adresse SMTP": "Dirección SMTP",
"Adresse du proxy": "Dirección proxy",
"Adresse électronique": "Correo electrónico",
"Affectation": "Asignación",
"Affiche le nom de la page parente suivi du nom de la page, le titre ne doit pas être masqué.": "Mostrar el nombre de la página principal seguido del nombre de la página, el título no debe ocultarse.",
"Affiche les icônes de gestion du compte et de déconnexion des membres simples connectés": "Muestra los iconos de gestión de cuenta y cierre de sesión para miembros regulares conectados",
"Afin d'assurer le bon fonctionnement de Zwii, veuillez ne pas fermer cette page avant la fin de l'opération.": "Para garantizar el correcto funcionamiento de Zwii, no cierre esta página antes de que se complete la operación",
"Aide": "Ayuda",
"Ajouter": "Agregar",
"Ajouter un profil": "Agregar un perfil",
"Ajouter un utilisateur": "Agregar usuario",
"Ajouter une fonte": "Añadir tipografía",
"Alignement": "Alineación de contenido",
"Aligner la bannière avec le contenu": "Alinear el banner con el contenido",
"Ancien mot de passe": "Antigua contraseña",
"Anonymat des adresses IP": "Anonimato de la dirección IP",
"Apache URL intelligent": "URL inteligente de Apache",
"Apache URL intelligentes": "URL inteligentes de Apache",
"Apparence": "Apariencia",
"Appliquer": "Aplicar",
"Approuver un commentaire": "Aprobar comentarios",
"Après": "Después",
"Après la bannière": "Después del banner",
"Après le contenu de la page": "Después del contenido de la página",
"Archive": "Archivo",
"Archive ZIP": "Archivo ZIP",
"Archive copiée dans le dossier Modules du gestionnaire de fichier": "Archivo copiado a la carpeta Módulos del administrador de archivos",
"Archive de thème invalide": "Archivo de tema no válido",
"Archive invalide": "Archivo no válido",
"Archive invalide, l'écriture dans le dossier core est interdite": "Archivo no válido, está prohibido escribir en la carpeta core",
"Archive invalide, le descripteur est absent": "Archivo no válido, falta el descriptor",
"Archive invalide, le fichier de classe est absent": "Archivo no válido, falta el archivo de clase",
"Archive invalide, les dossiers ne correspondent pas au descripteur": "Archivo no válido, las carpetas no coinciden con el descriptor",
"Archive non spécifiée ou introuvable": "Archivo no especificado o no encontrado",
"Archive à restaurer": "Archivo para restaurar",
"Arrière plan": "Fondo",
"Arrière plan des blocs": "Fondo de bloques",
"Arrière plan des champs": "Fondo de zona",
"Arrondi des angles": "Redondeo de ángulos",
"Au centre": "En el centro",
"Au début": "Al principio",
"Au milieu au centre": "En el medio en el centro",
"Au milieu à droite": "En el medio derecho",
"Au milieu à gauche": "En el medio a la izquierda",
"Au-dessus du site": "Por encima del sitio",
"Aucun": "Ninguno",
"Aucun dossier": "Sin carpeta",
"Aucun fichier journal à télécharger": "No hay archivos de registro para descargar",
"Aucun journal à effacer": "No hay registros para borrar",
"Aucun menu": "Ningún menú",
"Aucune": "Ninguna",
"Aucune liste noire à effacer": "No hay lista negra para borrar",
"Aucune liste noire à télécharger": "No hay lista negra para descargar",
"Auteur :": "Autor",
"Authentification": "Autenticación",
"Automatique": "Automáquica",
"Autoriser les robots à référencer le site": "Permitir que los robots hagan referencia al sitio",
"Autorisé": "Autorizado",
"Avant la bannière": "Antes del banner",
"Avant le contenu de la page": "Antes del contenido de la página",
"Background": "Fondo",
"Banni": "Prohibición",
"Bannière": "Banner",
"Bannière cliquable": "Banner",
"Barre 1/3 - page 2/3": "Barra 1/3 - página 2/3",
"Barre 1/4 - page 1/2 - barre 1/4": "Barra 1/4 - página 1/2 - Barra 1/4",
"Barre 1/4 - page 3/4": "Barra 1/4 - página 3/4",
"Barre 2/12 - page 7/12 - barre 3/12": "Barra 2/12 - página 7/12 - Barra 3/12",
"Barre 3/12 - page 7/12 - barre 2/12": "Barra 3/12 - página 7/12 - Barra 2/12",
"Barre de membre": "Barra de miembro",
"Barre latérale": "Barra lateral",
"Barre latérale droite :": "Barra lateral derecha:",
"Barre latérale gauche :": "Barra lateral izquierda:",
"Barres latérales": "Barras laterales",
"Bienvenue %s %s": "Bienvenido %s %s",
"Blocage après échecs": "Bloquear después de fallar",
"Blog": "Blog",
"Bords arrondis": "Bordes redondeados",
"Bordure des blocs": "Borde de bloques",
"Bordure des champs": "Borde de zona",
"Bouton Aide": "Boton de ayuda",
"Bouton Standard": "Botón estándar",
"Bouton de validation": "Botón Validación",
"Bouton effacement": "Botón Eliminar",
"Bouton retour": "Botón de retroceso",
"Bouton standard": "Botón estándar",
"Bouton validation": "Botón de validación",
"Boutons": "Botones",
"Caché": "Oculto",
"Cachée": "Oculto",
"Captcha complexe": "Captcha complejo",
"Captcha à la connexion": "Captcha al iniciar sesión",
"Captcha, identifiant ou mot de passe incorrects": "Captcha, nombre de usuario o contraseña incorrecta",
"Capture d'écran Open Graph": "Captura de pantalla de Open Graph",
"Capture d'écran générée avec succès": "Captura de pantalla generada con éxito",
"Casse": "Roto",
"Catalogue": "Catálogo",
"Catégorie": "Categoría",
"Ce membre pourra téléverser ou télécharger des fichiers dans le dossier 'partage' et ses sous-dossiers": "Este miembro podrá cargar o descargar archivos en la carpeta 'compartir' y sus subcarpetas",
"Cette page ne doit pas apparaître dans l'arborescence du menu. Créez une page orpheline.": "Esta página no debería aparecer en el árbol del menú. Crear una página huérfana.",
"Cette redirection ne concerne que les pages d'administration du site.": "Esta redirección solo afecta a las páginas de administración del sitio.",
"Chaîne Youtube": "Canal de Youtube",
"Chiffres": "Cifras",
"Cible": "Objetivo",
"Cliquez sur une zone afin d'accéder à ses options de personnalisation.": "Haga clic en un área para acceder a sus opciones de personalización.",
"Commentaire": "Comentario",
"Complète": "sin truncar",
"Compte administrateur": "Cuenta de administrador",
"Compte de l'utilisateur": "Cuenta de usuario",
"Compte verrouillé": "Cuenta bloqueada",
"Configuration": "Configuración",
"Configuration du module": "Configuración del módulo",
"Configurer": "Configurar",
"Configurer mon compte": "Configurar mi cuenta",
"Confirmation": "Confirmación",
"Confirmer la suppression de cet utilisateur": "Confirmar eliminación de este usuario",
"Confirmer la dissociation du module de cette page": "Confirmar desvincular módulo de esta página",
"Confirmer la désinstallation du module": "Confirmar la desinstalación del módulo",
"Confirmer la suppression de cet utilisateur": "Confirme la eliminación de este usuario",
"Confirmer la suppression de cette langue": "Confirmar eliminación de este idioma",
"Confirmer la suppression de la page": "Confirmar la eliminación de la página",
"Confirmer la suppression des données du module": "Confirmar la eliminación de datos del módulo",
"Confirmez-vous la suppression de cette page ?": "¿Confirma la eliminación de esta página?",
"Connexion": "Conexión",
"Consulter l'aide en ligne": "Consultar la ayuda en línea",
"Contents": "Contenido",
"Contenu": "Contenido",
"Contenu HTML": "Contenido HTML",
"Contenu avancé": "Contenido avanzado",
"Contenu du menu vertical": "Contenido del menú vertical",
"Contrôle total": "Control total",
"Cookies": "Cookies",
"Cookies Zwii": "Cookies Zwii",
"Copie de contenus localisés": "Copia de contenidos localizados",
"Copie de sites inter-langues": "Copia del sitio multilingües",
"Copie des traductions rédigées": "Copia de traducciones redactadas",
"Copie terminée avec des erreurs": "Copia completada con errores",
"Copie terminée avec succès": "Copia completada con éxito",
"Copier": "Copiar",
"Copier sauvegardes auto": "Copiar guardados automáticos",
"Couleur de fond automatique": "Color de fondo automático",
"Couleur icône haut de page": "Color del icono superior de la página",
"Couleur texte page active": "Color del texto de página activa",
"Couleur unie ou papier-peint": "Color unido o papel tapiz",
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence.": "Color visible en ausencia de una imagen.<br />El control deslizante horizontal ajusta el nivel de transparencia.",
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.": "Color visible en ausencia de una imagen.<br />El control deslizante horizontal ajusta el nivel de transparencia. El color del texto es automático.",
"Couleurs": "Colores",
"Dans le site": "En el sitio",
"Dans quelle langue utiliserez-vous Zwii ?": "¿En qué idioma usará Zwii?",
"Date": "fecha",
"Description": "Descripción del sitio",
"Disponible si le consentement des cookies est activé.": "Disponible si se ha otorgado el consentimiento de las cookies.",
"Disposition": "Arreglo",
"Données %s copiées vers %s": "Datos %s copiados hacia %s",
"Données des modules": "Datos de los módulos",
"Données importées": "Datos importados",
"Dossier": "Carpeta",
"Droits sur les dossiers": "Derechos de las carpetas",
"Droits sur les fichiers": "Derechos de los archivos",
"Dupliquer": "Duplicar",
"Dupliquer la page": "Duplicar la página",
"Déconnecte les sessions ouvertes précédemment sur d'autres navigateurs ou terminaux. Activation recommandée.": "Desconecte sesiones abiertas previamente en otros navegadores o dispositivos. Activación recomendada.",
"Déconnecter": "Desconectar",
"Déconnexion !": "¡Cerrar sesión!",
"Déconnexion automatique": "Cierre de sesión automático",
"Définir par défaut": "Establecer como predeterminado",
"Dévoiler le mot de passe": "Revelar la contraseña",
"Effacer": "Borrar",
"Effacer la page": "Borrar página",
"Effacer tous les commentaires": "Borrar todos los comentarios",
"Effacer toutes les statistiques": "Borrar todas las estadísticas",
"Effacer un commentaire": "Borrar el comentario",
"Effacer une catégorie": "Borrar categoría",
"Emplacement :": "Ubicación",
"Emplacement dans le menu": "Ubicación en el menú",
"En bas au centre": "Abajo en el centro",
"En bas à droite": "Abajo a la derecha",
"En bas à gauche": "Abajo a la izquierda",
"En cas de changement de module, les données du module précédent seront supprimées.": "Al cambiar de módulo se borrarán los datos del módulo anterior.",
"En dessous du site": "Debajo del sitio",
"En haut au centre": "Cubra en el centro",
"En haut à droite": "Arriba a la derecha",
"En haut à gauche": "Arriba a la izquierda",
"En position libre ajoutez le module en plaçant [MODULE] à l'endroit voulu dans votre page.": "En posición libre agregue el módulo colocando [MODULE] en la ubicación deseada en su página.",
"En-dehors du site": "Fuera del sitio",
"Enregistrer": "Registrar",
"Envoyer un message de confirmation": "Enviar mensaje de confirmación",
"Erreur : sauvegarde non générée !": "Error: copia de seguridad no generada!",
"Erreur d'URL": "Error de URL",
"Erreur d'extraction, vérifiez les permissions": "Error de extracción, verifique los permisos",
"Erreur de copie": "Error de copia",
"Erreur de copie, vérifiez les permissions": "error de copia, verifique las permisiones",
"Erreur de lecture, vérifiez les permissions": "Error de lectura, verifique los permisos",
"Erreur inconnue": "error desconocido",
"Erreur inconnue, le module n'est pas installé": "Error desconocido, el módulo no está instalado",
"Export CSV": "Exportar CSV",
"Expéditeur": "Remitente",
"Extension": "Extensión",
"Extraire": "Extraer",
"Facebook": "Facebook",
"Famille": "Vínculo",
"Favicon thème sombre": "favicon de tema oscuro",
"Feuille de style spécifique à la page.": "Hoja de estilo específica de la página.",
"Fichiers": "Archivos",
"Fichiers effacés": "archivos borrados",
"Fil d'Ariane dans le titre": "Migas de pan en el título",
"Fond du sous-menu": "Fondo del submenú",
"FontId": "ID de fuente",
"Fonte": "Fuente",
"Fonte actualisée": "fuente actualizada",
"Fonte créée": "Fuente creada",
"Fonte en ligne": "Tipografía en línea",
"Fonte installée": "Tipografía instalada",
"Fonte non créée, ressource absente !": "¡Fuente no creada, por falta recurso!",
"Fonte supprimée": "Fuente eliminada",
"Fontes": "Tipografias",
"Format incorrect": "Formato incorrecto",
"Formulaire": "Formulario",
"Fréquence de recherche": "Frecuencia de búsqueda",
"Fuseau horaire": "Zona horaria",
"Gabarits de page - Barre latérale": "Patrón de página - Barra lateral",
"Gestion": "Administrar",
"Gestion des modules": "Gestión de módulos",
"Gestion des thèmes": "Gestión de temas",
"Gestionnaire de fichiers": "Administrador de archivos",
"Github": "Github",
"Grande": "Grande",
"Grande (220%)": "Grande (220%)",
"Grande (300px)": "Grande (300px)",
"Gras": "Negrita",
"Groupe": "Grupo",
"Groupe associé": "Grupo asociado",
"Groupe requis pour accéder à la page :": "Grupo necesario para acceder a la página:",
"Groupes": "Grupos",
"Générer sitemap.xml et robots.txt": "Generar sitemap.xml y robots.txt",
"Générer une capture Open Graph": "Generar una captura de Open Graph",
"Gérer les catégories": "Gestionar categorías",
"Gérer les commentaires": "Administrar comentarios",
"Gérer les données": "Administrar datos",
"Hauteur": "Altura",
"Hauteur de l'image": "Altura de la imagen",
"Hauteur de l'image sélectionnée": "Altura de la imagen seleccionada",
"Hauteur maximale": "Altura máxima",
"ID de la chaîne : https://www.youtube.com/channel/[ID].": "ID del canal: https://www.youtube.com/channel/[ID].",
"Icône": "Icono",
"Icône avec bulle de texte": "Icono con burbuja de texto",
"Icône haut de page, couleur arrière-plan": "Icono superior de la página, color de fondo",
"Identifiant": "Identificación",
"Identifiant (sans espace ni majuscule)": "Identificación (sin espacios ni mayúsculas)",
"Identité": "Identificación",
"Identité de la fonte": "Identidad de tipografía",
"Identité du site": "identidad del sitio",
"Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.": "Aparece en la barra de título y se comparte en redes sociales.",
"Image": "Imagen",
"Image étirée (100% 100%)": "Imagen estirada (100% 100%)",
"Important": "Importante",
"Importante": "Importante",
"Importation d'utilisateurs": "Importación de usuarios",
"Importation de fichier plat CSV": "Importar archivo plano CSV",
"Importation effectuée": "Importación realizada",
"Importer": "Importar",
"Importer dans": "Importar a",
"Importer des utilisateurs en masse": "Importar usuarios de forma masiva",
"Impossible d'ouvrir l'archive": "No se puede abrir el archivo",
"Impossible de modifier votre propre groupe.": "No puede editar su propio grupo.",
"Impossible de soumettre le formulaire, car il contient des erreurs": "No se puede enviar el formulario porque contiene errores",
"Impossible de supprimer une page contenant des pages enfants": "No se puede eliminar una página que contiene páginas secundarias",
"Impossible de supprimer votre propre compte": "No puede eliminar su propia cuenta",
"Inclure le contenu du gestionnaire de fichiers": "Incluir el contenido del administrador de archivos",
"Incorrect": "Incorrecto",
"Informations": "Información",
"Instagram": "Instagram",
"Installation terminée": "instalación completa",
"Installer": "Instalar",
"Installer depuis le catalogue en ligne": "Instalar desde el archivo en línea",
"Installer depuis une archive": "Instalar desde un archivo",
"Installer les données d'un module": "Instalar datos de un módulo",
"Installer ou mettre à jour un module téléchargé": "Instalar o actualizar un módulo descargado",
"Installer un module": "Instalar un módulo",
"Installer un thème archivé (site ou administration)": "Instalar un tema archivado (sitio o administración)",
"Instructions JS ou jquery spécifiques à la page.": "Instrucciones JS o jquery específicas de la página.",
"Interface": "Idiomas interfaz",
"Jeton invalide": "Simbolo no valido",
"Journal réinitialisé avec succès": "Registro reiniciado con éxito",
"Journalisation": "Inicio sesión",
"L'archive a été déposée dans le gestionnaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.": "El archivo ha sido depositado en el administrador de archivos. No se aceptan archivos inferiores a la versión 9.",
"L'identifiant est défini lors de la création du compte, il ne peut pas être modifié.": "El identificador se define al crear la cuenta, no se puede modificar.",
"La carte du site a été mise à jour": "El mapa del sitio ha sido actualizado.",
"La copie de sauvegarde du fichier htaccess n'a pas été restaurée !": "¡La copia de seguridad del archivo htaccess no ha sido restaurada!",
"La description d'une page participe à son référencement, chaque page doit disposer d'une description différente.": "La descripción de una página participa en su referenciación, cada página debe tener una descripción diferente.",
"La page %s est ouverte par l'utilisateur %s": "La página %s ha sido abierta por el usuario %s",
"La page demandée n'existe pas ou est introuvable (erreur 404)": "La page demandée n'existe pas ou est introuvable (erreur 404)",
"La page est affichée dans un menu horizontal mais pas dans le menu vertical d'une barre latérale.": "La página se muestra en un menú horizontal pero no en el menú vertical de una barra lateral.",
"La première page que vos visiteurs verront.": "La primera página que verán tus visitantes.",
"La règlementation française impose un anonymat de niveau 2": "La normativa francesa impone el anonimato de nivel 2",
"La réécriture d'URL n'a pas été restaurée !": "¡La reescritura de URL no ha sido restaurada!",
"La sauvegarde des fichiers peut prendre du temps. Continuer ?": "La copia de seguridad de los archivos puede tardar un poco. ¿Desea continuar?",
"La suppression a échoué": "Eliminación fallida",
"La version installée est plus récente": "La versión instalada es más nueva.",
"La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.": "La comprobación es diaria. Opción deshabilitada si la configuración del servidor no lo permite.",
"Langue de l'administration": "Idioma de la administración",
"Langue du site par défaut": "Idioma predeterminado del sitio",
"Langue par défaut": "Idioma predeterminado",
"Langues": "Idiomas",
"Langues disponibles": "Idiomas Disponibles",
"Langues installées": "Idiomas instalados",
"Largeur": "Anchura o Ancho",
"Largeur de l'image": "Ancho de la imagen",
"Largeur du site": "Ancho del sitio",
"Le curseur horizontal règle le niveau de transparence, le placer tout à la gauche pour un surlignement invisible.": "El control deslizante horizontal establece el nivel de transparencia, colóquelo completamente hacia la izquierda para obtener un resaltado invisible.",
"Le curseur horizontal règle le niveau de transparence.": "El cursor horizontal regula el nivel de transparencia.",
"Le fuseau horaire est utile au bon référencement": "La zona horaria es útil para una buena referencia",
"Le menu accessoire est aligné à droite de la barre de menu, c'est un emplacement réservé aux drapeaux et au bouton de connexion.": "El menù accesorio está alineado a la derecha de la barra de menú, es un marcador de posición para las banderas y el botón de inicio de sesión",
"Le menu horizontal intégral": "El menú horizontal completo",
"Le module %s a été %s": "El módulo %s ha sido %s",
"Le module %s de la page %s a été supprimé": "Se eliminó el módulo %s de la página %s",
"Le module %s est désinstallé, il reste peut-être des données dans %s": "El módulo %s está desinstalado, es posible que queden datos en %s",
"Le sous-menu de la page parente": "El submenú de la página principal",
"Le survol d'une icône de l'écran de connexion affiche temporairement le mot de passe.": "Al pasar el cursor sobre un ícono de la pantalla de inicio de sesión, se muestra temporalmente la contraseña",
"Le titre court est affiché dans les menus. Il peut être identique au titre de la page.": "El título corto se muestra en los menús. Puede ser el mismo que el título de la página.",
"Les langues sélectionnées sont identiques": "Los idiomas seleccionados son idénticos",
"Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.": "Los avisos legales son obligatorios en Francia. Una opción en el pie de página agrega un enlace discreto a esta página.",
"Les modifications que vous avez apportées ne seront peut-être pas enregistrées.": "Es posible que no se guarden los cambios realizados.",
"Les tailles des polices de la bannière, de menu et de pied de page sont proportionnelles à cette taille.": "Los tamaños de fuente del banner, menú y pie de página son proporcionales a este tamaño.",
"Lettres": "Letras",
"Libre": "Libre",
"Licence :": "Licencia",
"Lien de connexion": "Enlace de inicio de sesión",
"Lien page des mentions légales.": "Enlace página aviso legal.",
"Liens": "Enlaces",
"Limitation des tentatives": "Limitación de intentos",
"Limitée au site": "Limitado al sitio",
"Linkedin": "Linkedin",
"Liste noire": "Lista negra",
"Liste noire réinitialisée avec succès": "Lista negra restablecida con éxito",
"Lors d'une mise à jour automatique, conserve le fichier htaccess de la racine du site.": "Durante una actualización automática, mantenga el archivo htaccess de la raíz del sitio.",
"Léger": "Ligero",
"Légère": "Ligera",
"Maigre": "Delgado",
"Maintenance": "Mantenimiento",
"Majuscule à chaque mot": "Capper con cada palabra",
"Majuscules": "Letras mayúsculas",
"Marges verticales": "Márgenes verticales",
"Masquer la bannière en écran réduit": "Ocultar el banner en pantalla reducida",
"Masquer la page et les pages enfants dans le menu d'une barre latérale": "Ocultar página y páginas secundarias en un menú de la barra lateral",
"Masquer les pages enfants dans le menu horizontal": "Ocultar páginas secundarias en el menú horizontal",
"Membre": "Miembro",
"Membre avec droit de partage": "Miembro con derecho de compartir",
"Membre simple": "Miembro simple",
"Mentions légales": "Notas legales",
"Menu": "Menù",
"Menu accessoire": "Menú accesorio",
"Menu burger dans écran réduit": "Menú hamburguesa en pantalla reducida",
"Menu standard": "Menú estándar",
"Message d'acceptation des Cookies": "Mensaje de aceptación de cookies",
"Message de consentement aux cookies": "Mensaje de consentimiento de cookies",
"Mettre à jour": "Actualizar",
"Mettre à jour le module orphelin": "Actualizar módulo huérfano",
"Minuscules": "Diminuto",
"Mise en forme des titres": "Formato de título",
"Mise en forme du texte": "Formato de texto",
"Mise en forme du titre": "Formato de título",
"Mise en page": "Diseño",
"Mise à jour": "actualización",
"Mise à jour automatisée": "Actualización automática",
"Mise à jour terminée avec succès.": "Actualización completada con éxito.",
"Modifications enregistrées": "Cambios guardados",
"Module": "Módulo",
"Module de la page": "Módulo de página",
"Modules": "Módulos",
"Modules configurés": "Módulos Configurados",
"Modules installés": "Módulos instalados",
"Modules orphelins": "Módulos huérfanos",
"Mot de passe": "Contraseña",
"Mot de passe oublié": "Contraseña olvidada",
"Mot de passe perdu": "Contraseña perdida",
"Motorisé par": "Motorizado por",
"Moyen": "Medio",
"Moyenne": "Media",
"Moyenne (200%)": "Promedio (200%)",
"Moyenne (200px)": "Promedio (200px)",
"Méta-description": "Meta-descripción",
"Méta-titre": "Meta-título",
"Ne pas afficher": "No se muestra",
"Ne pas charger l'exemple de site (utilisateurs avancés)": "No cargar sitio de muestra (usuarios avanzados)",
"Ne pas répéter": "No repitas",
"Ne pas saisir les balises": "No ingrese las etiquetas",
"News": "Noticias",
"Niveau 1 (192.168.12.x)": "Nivel 1 (192.168.12.x)",
"Niveau 2 (192.168.x.x)": "Nivel 2 (192.168.x.x)",
"Niveau 3 (192.x.x.x)": "Nivel 3 (192.x.x.x)",
"Nom": "Nombre",
"Nom Prénom": "Apellido nombre",
"Nom du profil": "Nombre del perfil",
"Nom utilisateur": "Nombre de usuario",
"Non": "No",
"Non tronquée": "Sin personal",
"Notre site est actuellement en maintenance. Nous sommes désolés pour la gêne occasionnée et faisons notre possible pour être rapidement de retour.": "Nuestro sitio está actualmente en mantenimiento. Lamentamos las molestias y estamos haciendo todo lo posible para regresar lo antes posible",
"Nouveau contenu localisé": "Nuevo contenido localizado",
"Nouveau mot de passe": "Nueva contraseña",
"Nouveau mot de passe enregistré": "Nueva contraseña guardada",
"Nouvel utilisateur": "Nuevo usuario",
"Nouvelle page créée": "Nueva página creada",
"Nouvelle page ou barre latérale": "Nueva página o barra lateral",
"Obligatoire": "Obligatorio",
"Ombre": "Sombra",
"Option active en mode déconnecté uniquement, les pages enfants sont visibles et accessibles.": "Opción activa solo en modo fuera de línea, las páginas secundarias son visibles y accesibles.",
"Option recommandée pour sécuriser la connexion. S'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.": "Opción recomendada para asegurar la conexión. Se aplica a todos los captchas en el sitio. El captcha simple está limitado a una suma de números del 0 al 10. El captcha complejo usa cuatro operaciones de números del 0 al 20. Activación recomendada.",
"Options": "Opciones",
"Options avancées": "Opciones avanzadas",
"Origine": "Origen",
"Oui": "Sí",
"Page": "Página",
"Page 2/3 - barre 1/3": "página 2/3 - Barra 1/3",
"Page 3/4 - barre 1/4": "página 3/4 - Barra 1/4",
"Page associée": "Página asociada",
"Page de recherche": "Página de búsqueda",
"Page dupliquée": "Página duplicada",
"Page et module dupliqués": "Página y módulo duplicados",
"Page inexistante, erreur 404": "La página no existe, error 404",
"Page non cliquable": "No se puede hacer clic en la página",
"Page parent": "Página principal",
"Page standard": "Página estándar",
"Page supprimée": "página eliminada",
"Pages dans le menu": "Páginas del menú",
"Pages du site": "Páginas del sitio",
"Pages et les modules de": "Páginas y módulos",
"Pages orphelines": "Páginas huérfanas",
"Papier peint": "Color de fondo",
"Par défaut le menu est affiché APRES le contenu de la page. Pour le positionner à un emplacement précis, insérez [MENU] dans le contenu de la page.": "Por defecto, el menú se muestra DESPUÉS del contenido de la página. Para colocarlo en una ubicación específica, inserte [MENÚ] en el contenido de la página.",
"Paramètres": "Configuraciones",
"Paramètres de la localisation": "Configuración de la ubicación",
"Paramètres de la sauvegarde": "Configuración de copia de seguridad",
"Paramètres du profil": "Configuración del perfil",
"Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d'envoi de mail.": "Configuraciones para usar cuando su host no ofrece la funcionalidad para enviar correo.",
"Pas de marge au-dessus et en dessous du site": "Sin margen encima y debajo del sitio",
"Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.": "Recuerde eliminar el caché de su navegador si el favicon no cambia.",
"Permission": "Permiso",
"Permission et référencement": "Permiso y referenciación",
"Permissions": "Permisos",
"Permissions sur les dossiers": "Permisos de las carpetas",
"Permissions sur les fichiers": "Permisos de los archivos",
"Permissions sur les pages": "Permisos de las páginas",
"Petite": "Pequeño",
"Petite (150px)": "Pequeño (150px)",
"Petite (180%)": "Petite (180%)",
"Pied de page": "Pie de página",
"Pinterest": "Pinterest",
"Plan du site": "Mapa del sitio",
"Police des titres": "Tipografía del titulo",
"Police du texte": "Tipografía del texto",
"Port SMTP": "Puerto SMTP",
"Port du proxy": "Puerto proxy",
"Position": "Posición",
"Position du module": "Posición del módulo",
"Pour définir la page comme barre latérale, choisissez l'option dans la liste.": "Para configurar la página como barra lateral, elija la opción de la lista.",
"Presse Papier": "Portapapeles",
"Presse papier": "Portapapeles",
"Profils des groupes": "Perfiles de grupos",
"Proportionnelle à la taille définie dans le site.": "Proporcional a la definida en el sitio.",
"Prénom": "Nombre de pila",
"Prénom Nom": "Nombre Apellido",
"Préparation de la mise à jour": "Preparáción de la actualización",
"Préserver le fichier htaccess racine": "Conservar archivo raíz htaccess",
"Préserver les comptes des utilisateurs déjà installés": "Conservar las cuentas de usuario ya instaladas",
"Prévenir l'utilisateur par mail": "Notificar al usuario por correo electrónico",
"Prévisualiser": "Previsualizar",
"Pseudo": "Apodo",
"Rang 9 > rang 1. Le profil de rang 1 n'est pas modifiable.": "Rango 9 > rango 1. El perfil del rango 1 no se puede modificar.",
"Ratio": "Proporción",
"Ratio :": "Relación",
"Recherche": "Buscar",
"Recherche dans le site": "Buscar en el sitio",
"Rechercher": "Buscar",
"Rechercher une mise à jour en ligne": "Buscar una actualización en línea",
"Redirection": "Redirección",
"Redirection vers la connexion": "Redirección hacia conexión",
"Renommer": "Renombrar",
"Renseignez les champs ci-dessous pour finaliser l'installation.": "Complete las zonas a continuación para terminar la instalación.",
"Responsive (contain)": "Responsivo (contener)",
"Responsive (cover)": "Responsivo (cobertura)",
"Restauration des bases de données absentes": "Restauración de bases de datos faltantes",
"Restauration effectuée avec succès": "Restauración completada con éxito",
"Restaurer": "Restaurar",
"Restaurer les données du site": "Restaurar datos del sitio",
"Rester connecté sur ce navigateur": "Permanecer conectado en este navegador",
"Retour": "Retroceder",
"Rien à importer, erreur de format ou fichier incorrect": "Nada que importar, error de formato o archivo incorrecto",
"Rédacteur": "Editor",
"Référencement": "Referenciación",
"Réinitialisation du mot de passe": "Restablecer la contraseña de usuario",
"Réinitialiser avec le thème par défaut": "establecer tema predeterminado",
"Réinitialiser la feuille de style": "Restablecer hoja de estilo",
"Réinitialiser la liste": "Restablecer lista",
"Réinitialiser le journal": "Restablecer registro",
"Réinstaller": "Reinstalar",
"Répétition": "Repetición",
"Réseau": "La red",
"Réseaux sociaux": "Redes sociales",
"S'ouvre dans un nouvel onglet": "Se abre en una nueva pestaña",
"SMTP": "SMTP",
"SMTP personnalisé": "SMTP personalizado",
"Saisir la clé, puis valider le formulaire avant de cliquer sur le bouton de génération": "Ingrese la clave, luego valide el formulario antes de hacer clic en el botón generar",
"Saisissez le Titre de gestion des cookies.": "Introduce el título de la ventana de gestión de cookies.",
"Saisissez le message pour les cookies déposés par ZwiiCMS, nécessaires au fonctionnement et qui ne nécessitent pas de consentement.": "Ingrese el mensaje para las cookies colocadas por ZwiiCMS, necesarias para su funcionamiento y que no requieren consentimiento.",
"Saisissez le texte du lien vers les mentions légales,la page doit être définie dans la configuration du site.": "Ingrese el texto del enlace a los avisos legales, la página debe estar definida en la configuración del sitio.",
"Saisissez votre ID : https://pinterest.com/[ID].": "Ingrese su ID: https://pinterest.com/[ID].",
"Saisissez votre ID : https://twitter.com/[ID].": "Ingrese su ID: https://twitter.com/[ID].",
"Saisissez votre ID : https://www.facebook.com/[ID].": "Ingrese su ID: https://www.facebook.com/[ID].",
"Saisissez votre ID : https://www.instagram.com/[ID].": "Ingrese su ID: https://www.instagram.com/[ID].",
"Saisissez votre ID Github : https://github.com/[ID].": "Ingrese su ID de Github: https://github.com/[ID].",
"Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].": "Ingrese su ID de Linkedin: https://fr.linkedin.com/in/[ID].",
"Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].": "Ingrese su ID de usuario: https://www.youtube.com/user/[ID].",
"Sauvegarde": "Salvaguardad",
"Sauvegarde automatique quotidienne du site": "Copia de seguridad diaria automática del sitio",
"Sauvegarde du thème dans le": "Guardando tema en el",
"Sauvegarde générée avec succès": "Copia de seguridad generada con éxito",
"Sauvegarder": "Para salvaguardar",
"Sauvegarder et télécharger le module": "Guardar y descargar módulo",
"Sauvegarder le module dans le gestionnaire de fichiers": "Guardar módulo en el administrador de archivos",
"Sauvegarder les données du module dans le gestionnaire de fichiers": "Guardar de los datos del módulo en el administrador de archivos",
"Sauvegarder les données du site": "Guardar datos del sitio",
"Script dans body": "Script en el body",
"Script dans head": "Script en el head",
"Scripts externes": "Guiones externos",
"Se déconnecter": "Desconectarse",
"Service en ligne inaccessible": "Servicio en línea inaccesible",
"Seul un administrateur peut se connecter lors d'une maintenance": "Solo un administrador puede iniciar sesión durante un mantenimiento",
"Si le contenu du gestionnaire de fichiers est très volumineux, mieux vaut une copie par FTP.": "Si el contenido del administrador de archivos es muy grande, es mejor copiar por FTP.",
"Signature": "Firma",
"Site": "Idiomas instalados",
"Site en maintenance": "Sitio en mantenimiento",
"Size": "Tamaño",
"Source": "Fuente",
"Standard": "Estándar",
"Style": "Estilo",
"Suppression interdite": "Borrado prohibido",
"Suppression interdite, page active dans la configuration de la langue du site": "Eliminación no permitida, la página está activa en la configuración de idioma del sitio",
"Supprime le point d'interrogation dans les URL, l'option est indisponible avec les autres serveurs Web": "Eliminar el signo de interrogación en las URL, la opción no está disponible con otros servidores web",
"Supprimer": "Borrar",
"Supprimer la page": "Eliminar página",
"Supprimer le module": "Eliminar módulo",
"Supprimer toutes les sauvegardes automatiques ?": "¿Eliminar todos los guardados automáticos?",
"Sur l'axe horizontal": "En el eje horizontal",
"Sur l'axe vertical": "En el eje vertical",
"Sur les deux axes": "En ambos hachas",
"Sécurité": "Seguridad",
"Sécurité de la connexion": "Seguridad de la conexión",
"Sécurité désactivée": "Seguridad desactivada",
"Sélectionner un fichier": "Seleccione un archivo",
"Sélectionnez au moins un contenu à afficher": "Seleccione al menos un contenido para mostrar",
"Sélectionnez la langue à copier vers une langue cible": "Seleccione el idioma para copiar hacia oyto idioma",
"Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.": "Seleccione un ícono adecuado para un tema oscuro.<br>Recuerde eliminar el caché de su navegador si el favicon no cambia",
"Sélectionnez une image ou une icône de petite dimension": "Seleccione una imagen o icono pequeño",
"Sélectionnez une langue": "Seleccione un idioma",
"Sélectionnez une page contenant le module 'Recherche'. Une option du pied de page ajoute un lien discret vers cette page.": "Seleccione una página que contenga el módulo 'Buscar'. Una opción de pie de página agrega un enlace discreto a esta página.",
"Sélectionnez une page pour activer": "Seleccione una página para activar",
"Séparateur": "Separador",
"Taille": "Tamaño",
"Text": "Texto",
"Texte": "Texto",
"Thème": "Tema",
"Thème de l'administration": "Tema de administración",
"Thème du site": "Tema del sitio",
"Thème importé": "Tema importado",
"Thèmes": "Temas",
"Titre": "Título",
"Titre court": "Título corto",
"Titre masqué": "Título enmascarado",
"Titre masqué dans la page": "Título oculto en la página",
"Titres": "Títulos",
"Tous les dossiers": "Todas las carpetas",
"Tous les droits d'édition des contenus": "Todos los derechos de edición de contenido",
"Tout Effacer": "Borrar todo",
"Traduction supprimée": "Traducción eliminada",
"Très grande": "Muy grande",
"Très grande (240%)": "Muy grande (240%)",
"Très grande (400px)": "Muy grande (400px)",
"Très important": "Muy importante",
"Très importante": "Muy importante",
"Très léger": "Muy ligero",
"Très légère": "Muy ligera",
"Très petite": "Muy pequeño",
"Très petite (100px) ": "Muy pequeño (100px)",
"Très petite (160%)": "Muy pequeño (160%)",
"Twitter": "Twitter",
"Type de captcha": "Tipo de captcha",
"Type de proxy": "Tipo de proxy",
"Téléchargement et validation de l'archive": "Descarga y validación del archivo",
"Télécharger": "Descargar",
"Télécharger la liste": "Descargar la revista",
"Télécharger le journal": "Descargar la revista",
"Télécharger le module dans le gestionnaire de fichiers": "Descargar módulo al administrador de archivos",
"Téléverser": "Subir",
"URL incorrecte": "URL incorrecta",
"Un mail a été envoyé pour confirmer la réinitialisation": "Se ha enviado un correo electrónico para confirmar el restablecimiento.",
"Une archive du dossier /site/data est conservée pendant 30 jours. Activation recommandée": "Un archivo que contiene la carpeta /site/data se conserva durante 30 días. Activación recomendada .",
"Une erreur est survenue lors de l'étape :": "Ocurrió un error durante el proceso",
"Url du fichier de fonte": "Url del archivo de tipo de letra",
"Utilisateur inexistant": "Usuario inexistente",
"Utilisateur supprimé": "Usuario eliminado",
"Utilisateurs": "Usuarios",
"Valider": "Validar",
"Version": "Versión",
"Version n°": "Número de versión",
"Vider dossier sauvegardes auto": "Carpeta de autoguardado vacía",
"Visiteur": "Visitante",
"Vous n'êtes pas autorisé à consulter cette page (erreur 403)": "No está autorizado para ver esta página (error 403)",
"Youtube": "YouTube",
"ZwiiCMS - Installation": "ZwiiCMS - Instalación",
"actualisé": "actualizado",
"favicon.ico": "Recuerde borrar el caché de su navegador si el favicon no cambia.",
"faviconDark.ico": "faviconDark.ico",
"gestionnaire de fichiers": "administrador de archivos",
"installé": "instalado",
"jour": "día",
"jours": "días",
"sauvegardé avec succès": "Guardado exitosamente",
"vers": "hacia",
"À droite": "A la derecha",
"À gauche": "A la izquierda",
"À l'emplacement du mot clé [MODULE] dans la page": "En la ubicación de la palabra clave [MODULE] en la página",
"Échec de l'écriture, vérifiez les permissions": "Escritura fallida, verifique los permisos",
"Échecs": "Fracasos",
"Éditer": "Editar",
"Éditer la page": "Editar página",
"Éditer les dialogues": "Editar los diálogos",
"Éditer une catégorie": "Editar categoría",
"Éditeur": "Editor",
"Éditeur CSS": "Editor de CSS",
"Éditeur JS": "Editor de JS",
"Éditeur de script %s": "Editor de script %s",
"Éditeur de script dans Body": "Éditor del script en el Body",
"Éditeur de script dans Head": "Éditor del script en el Head",
"Éditeur simple": "Editor simple",
"Édition des pages": "Edición de páginas",
"Édition du profil %s": "Edición del perfil %s",
"Éléments": "Elementos",
"Étendu sur la page": "Extendido en la página",
"Étiquettes des pages spéciales": "Etiquetas de páginas especiales",
"Dimensions minimales": "Dimensiones mínimas",
"Taille maximale du fichier": "Tamaño máximo de archivo",
"5 Mo pour les images JPEG": "5 MB para imágenes JPEG",
"1 Mo pour les images PNG": "1 MB para imágenes PNG",
"Poids": "Peso",
"Supprimer ce profil ?": "¿Eliminar este perfil?",
"Masqué": "Oculto",
"Haut de page": "Parte superior de la página",
"Bas de page": "Parte inferior de la página",
"Petit triangle": "Triángulo pequeño",
"Grand triangle": "Triángulo grande",
"Flèche": "Flecha",
"Modèle": "Plantilla",
"Bouton de navigation droit": "Botón de navegación derecha",
"Bouton de navigation gauche": "Botón de navegación izquierda",
"Groupes / Profils": "Grupos / Perfiles",
"Prénom commence par": "El nombre comienza con",
"Nom commence par": "El apellido comienza con",
"Impossible de réinitialiser le mot de passe de ce compte !": "No puedo restablecer la contraseña de esta cuenta."
}

View File

@ -1,693 +0,0 @@
{
"'Ne pas afficher' crée une page orpheline non accessible par le biais des menus.": "",
"'Sauvegarder et télécharger les données du module": "",
"1 jour": "",
"1/4 : Préparation...": "",
"10 minutes": "",
"10 tentatives": "",
"14 jours": "",
"15 minutes": "",
"2 jours": "",
"2/4 : Téléchargement...": "",
"3 tentatives": "",
"3/4 : Installation...": "",
"4 jours": "",
"4/4 : Configuration...": "",
"5 minutes": "",
"5 tentatives": "",
"7 jours": "",
"Accueil": "",
"Accède au site": "",
"Accède aux pages réservées": "",
"Accède aux pages réservées et à un dossier partagé": "",
"Accès bloqué %d minutes": "",
"Accès désactivé": "",
"Accès interdit, erreur 403": "",
"Action interdite": "",
"Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.": "",
"Activer": "",
"Activer la journalisation": "",
"Actualiser": "",
"Adaptation": "",
"Administrateur": "",
"Administration": "",
"Adresse SMTP": "",
"Adresse du proxy": "",
"Adresse électronique": "",
"Affectation": "",
"Affiche le nom de la page parente suivi du nom de la page, le titre ne doit pas être masqué.": "",
"Affiche les icônes de gestion du compte et de déconnexion des membres simples connectés": "",
"Afin d'assurer le bon fonctionnement de Zwii, veuillez ne pas fermer cette page avant la fin de l'opération.": "",
"Aide": "",
"Ajouter": "",
"Ajouter un profil": "",
"Ajouter un utilisateur": "",
"Ajouter une fonte": "",
"Alignement": "",
"Aligner la bannière avec le contenu": "",
"Ancien mot de passe": "",
"Anonymat des adresses IP": "",
"Apache URL intelligent": "",
"Apache URL intelligentes": "",
"Apparence": "",
"Appliquer": "",
"Approuver un commentaire": "",
"Après": "",
"Après la bannière": "",
"Après le contenu de la page": "",
"Archive": "",
"Archive ZIP": "",
"Archive copiée dans le dossier Modules du gestionnaire de fichier": "",
"Archive de thème invalide": "",
"Archive invalide": "",
"Archive invalide, l'écriture dans le dossier core est interdite": "",
"Archive invalide, le descripteur est absent": "",
"Archive invalide, le fichier de classe est absent": "",
"Archive invalide, les dossiers ne correspondent pas au descripteur": "",
"Archive non spécifiée ou introuvable": "",
"Archive à restaurer": "",
"Arrière plan": "",
"Arrière plan des blocs": "",
"Arrière plan des champs": "",
"Arrondi des angles": "",
"Au centre": "",
"Au début": "",
"Au milieu au centre": "",
"Au milieu à droite": "",
"Au milieu à gauche": "",
"Au-dessus du site": "",
"Aucun": "",
"Aucun dossier": "",
"Aucun fichier journal à télécharger": "",
"Aucun journal à effacer": "",
"Aucun menu": "",
"Aucune": "",
"Aucune liste noire à effacer": "",
"Aucune liste noire à télécharger": "",
"Auteur :": "",
"Authentification": "",
"Automatique": "",
"Autoriser les robots à référencer le site": "",
"Autorisé": "",
"Avant la bannière": "",
"Avant le contenu de la page": "",
"Background": "",
"Banni": "",
"Bannière": "",
"Bannière cliquable": "",
"Barre 1/3 - page 2/3": "",
"Barre 1/4 - page 1/2 - barre 1/4": "",
"Barre 1/4 - page 3/4": "",
"Barre 2/12 - page 7/12 - barre 3/12": "",
"Barre 3/12 - page 7/12 - barre 2/12": "",
"Barre de membre": "",
"Barre latérale": "",
"Barre latérale droite :": "",
"Barre latérale gauche :": "",
"Barres latérales": "",
"Bienvenue %s %s": "",
"Blocage après échecs": "",
"Blog": "",
"Bords arrondis": "",
"Bordure des blocs": "",
"Bordure des champs": "",
"Bouton Aide": "",
"Bouton Standard": "",
"Bouton de validation": "",
"Bouton effacement": "",
"Bouton retour": "",
"Bouton standard": "",
"Bouton validation": "",
"Boutons": "",
"Caché": "",
"Cachée": "",
"Captcha complexe": "",
"Captcha à la connexion": "",
"Captcha, identifiant ou mot de passe incorrects": "",
"Capture d'écran Open Graph": "",
"Capture d'écran générée avec succès": "",
"Casse": "",
"Catalogue": "",
"Catégorie": "",
"Ce membre pourra téléverser ou télécharger des fichiers dans le dossier 'partage' et ses sous-dossiers": "",
"Cette page ne doit pas apparaître dans l'arborescence du menu. Créez une page orpheline.": "",
"Cette redirection ne concerne que les pages d'administration du site.": "",
"Chaîne Youtube": "",
"Chiffres": "",
"Cible": "",
"Cliquez sur une zone afin d'accéder à ses options de personnalisation.": "",
"Commentaire": "",
"Complète": "",
"Compte administrateur": "",
"Compte de l'utilisateur": "",
"Compte verrouillé": "",
"Configuration": "",
"Configuration du module": "",
"Configurer": "",
"Configurer mon compte": "",
"Confirmation": "",
"Confirmer la suppression de cet utilisateur": "",
"Confirmer la dissociation du module de cette page": "",
"Confirmer la désinstallation du module": "",
"Confirmer la suppression de cet utilisateur": "",
"Confirmer la suppression de cette langue": "",
"Confirmer la suppression de la page": "",
"Confirmer la suppression des données du module": "",
"Confirmez-vous la suppression de cette page ?": "",
"Connexion": "",
"Consulter l'aide en ligne": "",
"Contents": "",
"Contenu": "",
"Contenu HTML": "",
"Contenu avancé": "",
"Contenu du menu vertical": "",
"Contrôle total": "",
"Cookies": "",
"Cookies Zwii": "",
"Copie de contenus localisés": "",
"Copie de sites inter-langues": "",
"Copie des traductions rédigées": "",
"Copie terminée avec des erreurs": "",
"Copie terminée avec succès": "",
"Copier": "",
"Copier sauvegardes auto": "",
"Couleur de fond automatique": "",
"Couleur icône haut de page": "",
"Couleur texte page active": "",
"Couleur unie ou papier-peint": "",
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence.": "",
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.": "",
"Couleurs": "",
"Dans le site": "",
"Dans quelle langue utiliserez-vous Zwii ?": "",
"Date": "",
"Description": "",
"Disponible si le consentement des cookies est activé.": "",
"Disposition": "",
"Données %s copiées vers %s": "",
"Données des modules": "",
"Données importées": "",
"Dossier": "",
"Droits sur les dossiers": "",
"Droits sur les fichiers": "",
"Dupliquer": "",
"Dupliquer la page": "",
"Déconnecte les sessions ouvertes précédemment sur d'autres navigateurs ou terminaux. Activation recommandée.": "",
"Déconnecter": "",
"Déconnexion !": "",
"Déconnexion automatique": "",
"Définir par défaut": "",
"Dévoiler le mot de passe": "",
"Effacer": "",
"Effacer la page": "",
"Effacer tous les commentaires": "",
"Effacer toutes les statistiques": "",
"Effacer un commentaire": "",
"Effacer une catégorie": "",
"Emplacement :": "",
"Emplacement dans le menu": "",
"En bas au centre": "",
"En bas à droite": "",
"En bas à gauche": "",
"En cas de changement de module, les données du module précédent seront supprimées.": "",
"En dessous du site": "",
"En haut au centre": "",
"En haut à droite": "",
"En haut à gauche": "",
"En position libre ajoutez le module en plaçant [MODULE] à l'endroit voulu dans votre page.": "",
"En-dehors du site": "",
"Enregistrer": "",
"Envoyer un message de confirmation": "",
"Erreur : sauvegarde non générée !": "",
"Erreur d'URL": "",
"Erreur d'extraction, vérifiez les permissions": "",
"Erreur de copie": "",
"Erreur de copie, vérifiez les permissions": "",
"Erreur de lecture, vérifiez les permissions": "",
"Erreur inconnue": "",
"Erreur inconnue, le module n'est pas installé": "",
"Export CSV": "",
"Expéditeur": "",
"Extension": "",
"Extraire": "",
"Facebook": "",
"Famille": "",
"Favicon thème sombre": "",
"Feuille de style spécifique à la page.": "",
"Fichiers": "",
"Fichiers effacés": "",
"Fil d'Ariane dans le titre": "",
"Fond du sous-menu": "",
"FontId": "",
"Fonte": "",
"Fonte actualisée": "",
"Fonte créée": "",
"Fonte en ligne": "",
"Fonte installée": "",
"Fonte non créée, ressource absente !": "",
"Fonte supprimée": "",
"Fontes": "",
"Format incorrect": "",
"Formulaire": "",
"Fréquence de recherche": "",
"Fuseau horaire": "",
"Gabarits de page - Barre latérale": "",
"Gestion": "",
"Gestion des modules": "",
"Gestion des thèmes": "",
"Gestionnaire de fichiers": "",
"Github": "",
"Grande": "",
"Grande (220%)": "",
"Grande (300px)": "",
"Gras": "",
"Groupe": "",
"Groupe associé": "",
"Groupe requis pour accéder à la page :": "",
"Groupes": "",
"Générer sitemap.xml et robots.txt": "",
"Générer une capture Open Graph": "",
"Gérer les catégories": "",
"Gérer les commentaires": "",
"Gérer les données": "",
"Hauteur": "",
"Hauteur de l'image": "",
"Hauteur de l'image sélectionnée": "",
"Hauteur maximale": "",
"ID de la chaîne : https://www.youtube.com/channel/[ID].": "",
"Icône": "",
"Icône avec bulle de texte": "",
"Icône haut de page, couleur arrière-plan": "",
"Identifiant": "",
"Identifiant (sans espace ni majuscule)": "",
"Identité": "",
"Identité de la fonte": "",
"Identité du site": "",
"Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.": "",
"Image": "",
"Image étirée (100% 100%)": "",
"Important": "",
"Importante": "",
"Importation d'utilisateurs": "",
"Importation de fichier plat CSV": "",
"Importation effectuée": "",
"Importer": "",
"Importer dans": "",
"Importer des utilisateurs en masse": "",
"Impossible d'ouvrir l'archive": "",
"Impossible de modifier votre propre groupe.": "",
"Impossible de soumettre le formulaire, car il contient des erreurs": "",
"Impossible de supprimer une page contenant des pages enfants": "",
"Impossible de supprimer votre propre compte": "",
"Inclure le contenu du gestionnaire de fichiers": "",
"Incorrect": "",
"Informations": "",
"Instagram": "",
"Installation terminée": "",
"Installer": "",
"Installer depuis le catalogue en ligne": "",
"Installer depuis une archive": "",
"Installer les données d'un module": "",
"Installer ou mettre à jour un module téléchargé": "",
"Installer un module": "",
"Installer un thème archivé (site ou administration)": "",
"Instructions JS ou jquery spécifiques à la page.": "",
"Interface": "",
"Jeton invalide": "",
"Journal réinitialisé avec succès": "",
"Journalisation": "",
"L'archive a été déposée dans le gestionnaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.": "",
"L'identifiant est défini lors de la création du compte, il ne peut pas être modifié.": "",
"La carte du site a été mise à jour": "",
"La copie de sauvegarde du fichier htaccess n'a pas été restaurée !": "",
"La description d'une page participe à son référencement, chaque page doit disposer d'une description différente.": "",
"La page %s est ouverte par l'utilisateur %s": "",
"La page demandée n'existe pas ou est introuvable (erreur 404)": "",
"La page est affichée dans un menu horizontal mais pas dans le menu vertical d'une barre latérale.": "",
"La première page que vos visiteurs verront.": "",
"La règlementation française impose un anonymat de niveau 2": "",
"La réécriture d'URL n'a pas été restaurée !": "",
"La sauvegarde des fichiers peut prendre du temps. Continuer ?": "",
"La suppression a échoué": "",
"La version installée est plus récente": "",
"La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.": "",
"Langue de l'administration": "",
"Langue du site par défaut": "",
"Langue par défaut": "",
"Langues": "",
"Langues disponibles": "",
"Langues installées": "",
"Largeur": "",
"Largeur de l'image": "",
"Largeur du site": "",
"Le curseur horizontal règle le niveau de transparence, le placer tout à la gauche pour un surlignement invisible.": "",
"Le curseur horizontal règle le niveau de transparence.": "",
"Le fuseau horaire est utile au bon référencement": "",
"Le menu accessoire est aligné à droite de la barre de menu, c'est un emplacement réservé aux drapeaux et au bouton de connexion.": "",
"Le menu horizontal intégral": "",
"Le module %s a été %s": "",
"Le module %s de la page %s a été supprimé": "",
"Le module %s est désinstallé, il reste peut-être des données dans %s": "",
"Le sous-menu de la page parente": "",
"Le survol d'une icône de l'écran de connexion affiche temporairement le mot de passe.": "",
"Le titre court est affiché dans les menus. Il peut être identique au titre de la page.": "",
"Les langues sélectionnées sont identiques": "",
"Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.": "",
"Les modifications que vous avez apportées ne seront peut-être pas enregistrées.": "",
"Les tailles des polices de la bannière, de menu et de pied de page sont proportionnelles à cette taille.": "",
"Lettres": "",
"Libre": "",
"Licence :": "",
"Lien de connexion": "",
"Lien page des mentions légales.": "",
"Liens": "",
"Limitation des tentatives": "",
"Limitée au site": "",
"Linkedin": "",
"Liste noire": "",
"Liste noire réinitialisée avec succès": "",
"Lors d'une mise à jour automatique, conserve le fichier htaccess de la racine du site.": "",
"Léger": "",
"Légère": "",
"Maigre": "",
"Maintenance": "",
"Majuscule à chaque mot": "",
"Majuscules": "",
"Marges verticales": "",
"Masquer la bannière en écran réduit": "",
"Masquer la page et les pages enfants dans le menu d'une barre latérale": "",
"Masquer les pages enfants dans le menu horizontal": "",
"Membre": "",
"Membre avec droit de partage": "",
"Membre simple": "",
"Mentions légales": "",
"Menu": "",
"Menu accessoire": "",
"Menu burger dans écran réduit": "",
"Menu standard": "",
"Message d'acceptation des Cookies": "",
"Message de consentement aux cookies": "",
"Mettre à jour": "",
"Mettre à jour le module orphelin": "",
"Minuscules": "",
"Mise en forme des titres": "",
"Mise en forme du texte": "",
"Mise en forme du titre": "",
"Mise en page": "",
"Mise à jour": "",
"Mise à jour automatisée": "",
"Mise à jour terminée avec succès.": "",
"Modifications enregistrées": "",
"Module": "",
"Module de la page": "",
"Modules": "",
"Modules configurés": "",
"Modules installés": "",
"Modules orphelins": "",
"Mot de passe": "",
"Mot de passe oublié": "",
"Mot de passe perdu": "",
"Motorisé par": "",
"Moyen": "",
"Moyenne": "",
"Moyenne (200%)": "",
"Moyenne (200px)": "",
"Méta-description": "",
"Méta-titre": "",
"Ne pas afficher": "",
"Ne pas charger l'exemple de site (utilisateurs avancés)": "",
"Ne pas répéter": "",
"Ne pas saisir les balises": "",
"News": "",
"Niveau 1 (192.168.12.x)": "",
"Niveau 2 (192.168.x.x)": "",
"Niveau 3 (192.x.x.x)": "",
"Nom": "",
"Nom Prénom": "",
"Nom du profil": "",
"Nom utilisateur": "",
"Non": "",
"Non tronquée": "",
"Notre site est actuellement en maintenance. Nous sommes désolés pour la gêne occasionnée et faisons notre possible pour être rapidement de retour.": "",
"Nouveau contenu localisé": "",
"Nouveau mot de passe": "",
"Nouveau mot de passe enregistré": "",
"Nouvel utilisateur": "",
"Nouvelle page créée": "",
"Nouvelle page ou barre latérale": "",
"Obligatoire": "",
"Ombre": "",
"Option active en mode déconnecté uniquement, les pages enfants sont visibles et accessibles.": "",
"Option recommandée pour sécuriser la connexion. S'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.": "",
"Options": "",
"Options avancées": "",
"Origine": "",
"Oui": "",
"Page": "",
"Page 2/3 - barre 1/3": "",
"Page 3/4 - barre 1/4": "",
"Page associée": "",
"Page de recherche": "",
"Page dupliquée": "",
"Page et module dupliqués": "",
"Page inexistante, erreur 404": "",
"Page non cliquable": "",
"Page parent": "",
"Page standard": "",
"Page supprimée": "",
"Pages dans le menu": "",
"Pages du site": "",
"Pages et les modules de": "",
"Pages orphelines": "",
"Papier peint": "",
"Par défaut le menu est affiché APRES le contenu de la page. Pour le positionner à un emplacement précis, insérez [MENU] dans le contenu de la page.": "",
"Paramètres": "",
"Paramètres de la localisation": "",
"Paramètres de la sauvegarde": "",
"Paramètres du profil": "",
"Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d'envoi de mail.": "",
"Pas de marge au-dessus et en dessous du site": "",
"Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.": "",
"Permission": "",
"Permission et référencement": "",
"Permissions": "",
"Permissions sur les dossiers": "",
"Permissions sur les fichiers": "",
"Permissions sur les pages": "",
"Petite": "",
"Petite (150px)": "",
"Petite (180%)": "",
"Pied de page": "",
"Pinterest": "",
"Plan du site": "",
"Police des titres": "",
"Police du texte": "",
"Port SMTP": "",
"Port du proxy": "",
"Position": "",
"Position du module": "",
"Pour définir la page comme barre latérale, choisissez l'option dans la liste.": "",
"Presse Papier": "",
"Presse papier": "",
"Profils des groupes": "",
"Proportionnelle à la taille définie dans le site.": "",
"Prénom": "",
"Prénom Nom": "",
"Préparation de la mise à jour": "",
"Préserver le fichier htaccess racine": "",
"Préserver les comptes des utilisateurs déjà installés": "",
"Prévenir l'utilisateur par mail": "",
"Prévisualiser": "",
"Pseudo": "",
"Rang 9 > rang 1. Le profil de rang 1 n'est pas modifiable.": "",
"Ratio": "",
"Ratio :": "",
"Recherche": "",
"Recherche dans le site": "",
"Rechercher": "",
"Rechercher une mise à jour en ligne": "",
"Redirection": "",
"Redirection vers la connexion": "",
"Renommer": "",
"Renseignez les champs ci-dessous pour finaliser l'installation.": "",
"Responsive (contain)": "",
"Responsive (cover)": "",
"Restauration des bases de données absentes": "",
"Restauration effectuée avec succès": "",
"Restaurer": "",
"Restaurer les données du site": "",
"Rester connecté sur ce navigateur": "",
"Retour": "",
"Rien à importer, erreur de format ou fichier incorrect": "",
"Rédacteur": "",
"Référencement": "",
"Réinitialisation du mot de passe": "",
"Réinitialiser avec le thème par défaut": "",
"Réinitialiser la feuille de style": "",
"Réinitialiser la liste": "",
"Réinitialiser le journal": "",
"Réinstaller": "",
"Répétition": "",
"Réseau": "",
"Réseaux sociaux": "",
"S'ouvre dans un nouvel onglet": "",
"SMTP": "",
"SMTP personnalisé": "",
"Saisir la clé, puis valider le formulaire avant de cliquer sur le bouton de génération": "",
"Saisissez le Titre de gestion des cookies.": "",
"Saisissez le message pour les cookies déposés par ZwiiCMS, nécessaires au fonctionnement et qui ne nécessitent pas de consentement.": "",
"Saisissez le texte du lien vers les mentions légales,la page doit être définie dans la configuration du site.": "",
"Saisissez votre ID : https://pinterest.com/[ID].": "",
"Saisissez votre ID : https://twitter.com/[ID].": "",
"Saisissez votre ID : https://www.facebook.com/[ID].": "",
"Saisissez votre ID : https://www.instagram.com/[ID].": "",
"Saisissez votre ID Github : https://github.com/[ID].": "",
"Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].": "",
"Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].": "",
"Sauvegarde": "",
"Sauvegarde automatique quotidienne du site": "",
"Sauvegarde du thème dans le": "",
"Sauvegarde générée avec succès": "",
"Sauvegarder": "",
"Sauvegarder et télécharger le module": "",
"Sauvegarder le module dans le gestionnaire de fichiers": "",
"Sauvegarder les données du module dans le gestionnaire de fichiers": "",
"Sauvegarder les données du site": "",
"Script dans body": "",
"Script dans head": "",
"Scripts externes": "",
"Se déconnecter": "",
"Service en ligne inaccessible": "",
"Seul un administrateur peut se connecter lors d'une maintenance": "",
"Si le contenu du gestionnaire de fichiers est très volumineux, mieux vaut une copie par FTP.": "",
"Signature": "",
"Site": "",
"Site en maintenance": "",
"Size": "",
"Source": "",
"Standard": "",
"Style": "",
"Suppression interdite": "",
"Suppression interdite, page active dans la configuration de la langue du site": "",
"Supprime le point d'interrogation dans les URL, l'option est indisponible avec les autres serveurs Web": "",
"Supprimer": "",
"Supprimer la page": "",
"Supprimer le module": "",
"Supprimer toutes les sauvegardes automatiques ?": "",
"Sur l'axe horizontal": "",
"Sur l'axe vertical": "",
"Sur les deux axes": "",
"Sécurité": "",
"Sécurité de la connexion": "",
"Sécurité désactivée": "",
"Sélectionner un fichier": "",
"Sélectionnez au moins un contenu à afficher": "",
"Sélectionnez la langue à copier vers une langue cible": "",
"Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.": "",
"Sélectionnez une image ou une icône de petite dimension": "",
"Sélectionnez une langue": "",
"Sélectionnez une page contenant le module 'Recherche'. Une option du pied de page ajoute un lien discret vers cette page.": "",
"Sélectionnez une page pour activer": "",
"Séparateur": "",
"Taille": "",
"Text": "",
"Texte": "",
"Thème": "",
"Thème de l'administration": "",
"Thème du site": "",
"Thème importé": "",
"Thèmes": "",
"Titre": "",
"Titre court": "",
"Titre masqué": "",
"Titre masqué dans la page": "",
"Titres": "",
"Tous les dossiers": "",
"Tous les droits d'édition des contenus": "",
"Tout Effacer": "",
"Traduction supprimée": "",
"Très grande": "",
"Très grande (240%)": "",
"Très grande (400px)": "",
"Très important": "",
"Très importante": "",
"Très léger": "",
"Très légère": "",
"Très petite": "",
"Très petite (100px) ": "",
"Très petite (160%)": "",
"Twitter": "",
"Type de captcha": "",
"Type de proxy": "",
"Téléchargement et validation de l'archive": "",
"Télécharger": "",
"Télécharger la liste": "",
"Télécharger le journal": "",
"Télécharger le module dans le gestionnaire de fichiers": "",
"Téléverser": "",
"URL incorrecte": "",
"Un mail a été envoyé pour confirmer la réinitialisation": "",
"Une archive du dossier /site/data est conservée pendant 30 jours. Activation recommandée": "",
"Une erreur est survenue lors de l'étape :": "",
"Url du fichier de fonte": "",
"Utilisateur inexistant": "",
"Utilisateur supprimé": "",
"Utilisateurs": "",
"Valider": "",
"Version": "",
"Version n°": "",
"Vider dossier sauvegardes auto": "",
"Visiteur": "",
"Vous n'êtes pas autorisé à consulter cette page (erreur 403)": "",
"Youtube": "",
"ZwiiCMS - Installation": "",
"actualisé": "",
"favicon.ico": "",
"faviconDark.ico": "",
"gestionnaire de fichiers": "",
"installé": "",
"jour": "",
"jours": "",
"sauvegardé avec succès": "",
"vers": "",
"À droite": "",
"À gauche": "",
"À l'emplacement du mot clé [MODULE] dans la page": "",
"Échec de l'écriture, vérifiez les permissions": "",
"Échecs": "",
"Éditer": "",
"Éditer la page": "",
"Éditer les dialogues": "",
"Éditer une catégorie": "",
"Éditeur": "",
"Éditeur CSS": "",
"Éditeur JS": "",
"Éditeur de script %s": "",
"Éditeur de script dans Body": "",
"Éditeur de script dans Head": "",
"Éditeur simple": "",
"Édition des pages": "",
"Édition du profil %s": "",
"Éléments": "",
"Étendu sur la page": "",
"Étiquettes des pages spéciales": "",
"Dimensions minimales": "",
"Taille maximale du fichier": "",
"5 Mo pour les images JPEG": "",
"1 Mo pour les images PNG": "",
"Poids": "",
"Supprimer ce profil ?": "",
"Masqué": "",
"Haut de page": "",
"Bas de page": "",
"Petit triangle": "",
"Grand triangle": "",
"Flèche": "",
"Modèle": "",
"Bouton de navigation droit": "",
"Bouton de navigation gauche": "",
"Groupes / Profils": "",
"Prénom commence par": "",
"Nom commence par": "",
"Impossible de réinitialiser le mot de passe de ce compte !": ""
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,22 @@
{
"defaut" : {
"name": "Le thème par défaut, ambiance bleu et montagne",
"filename": ""
},
"moderne": {
"name": "Thème avec la nouvelle bannière personnalisable",
"filename": "theme_moderne.zip"
},
"affaire": {
"name": "Thème affaire, bannière centre d'appel, ambiance prune",
"filename": "theme_affaire.zip"
},
"black": {
"name": "Thème de nuit, ambiance nocturne",
"filename": "theme_orange_black.zip"
},
"facebook": {
"name": "Thème Facebook ancienne génération, pas de bannière, menu fixe fond bleu",
"filename": "theme_old_facebook.zip"
}
}

View File

@ -1,18 +1 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
/** NE PAS EFFACER
* admin.css
*/
/* Vide */

View File

@ -0,0 +1,37 @@
/**
* This file is part of Zwii.
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
/**
* Affichage de l'id en simulant FILTER_ID
*/
$("#installId").on("change keydown keyup", function(event) {
var userId = $(this).val();
if(
event.keyCode !== 8 // BACKSPACE
&& event.keyCode !== 37 // LEFT
&& event.keyCode !== 39 // RIGHT
&& event.keyCode !== 46 // DELETE
&& window.getSelection().toString() !== userId // Texte sélectionné
) {
var searchReplace = {
"á": "a", "à": "a", "â": "a", "ä": "a", "ã": "a", "å": "a", "ç": "c", "é": "e", "è": "e", "ê": "e", "ë": "e", "í": "i", "ì": "i", "î": "i", "ï": "i", "ñ": "n", "ó": "o", "ò": "o", "ô": "o", "ö": "o", "õ": "o", "ú": "u", "ù": "u", "û": "u", "ü": "u", "ý": "y", "ÿ": "y",
"Á": "A", "À": "A", "Â": "A", "Ä": "A", "Ã": "A", "Å": "A", "Ç": "C", "É": "E", "È": "E", "Ê": "E", "Ë": "E", "Í": "I", "Ì": "I", "Î": "I", "Ï": "I", "Ñ": "N", "Ó": "O", "Ò": "O", "Ô": "O", "Ö": "O", "Õ": "O", "Ú": "U", "Ù": "U", "Û": "U", "Ü": "U", "Ý": "Y", "Ÿ": "Y",
"'": "-", "\"": "-", " ": "-"
};
userId = userId.replace(/[áàâäãåçéèêëíìîïñóòôöõúùûüýÿ'" ]/ig, function(match) {
return searchReplace[match];
});
userId = userId.replace(/[^a-z0-9-]/ig, "");
$(this).val(userId);
}
});

View File

@ -1,20 +1,61 @@
<?php echo template::formOpen('installForm'); ?>
<h3>
<?php echo helper::translate('Dans quelle langue utiliserez-vous Zwii ?'); ?>
</h3>
<div class="row">
<div class="col6 offset3">
<?php echo template::select('installLanguage', $module::$i18nFiles, [
'label' => 'Langues installées',
'selected' => array_key_exists ('fr_FR', $module::$i18nFiles) ? 'fr_FR': reset($module::$i18nFiles),
]); ?>
</div>
</div>
<div class="row">
<div class="col3 offset9">
<?php echo template::submit('installSubmit', [
'value' => 'Suivant'
]); ?>
</div>
</div>
<p>Renseignez les champs ci-dessous pour finaliser l'installation.</p>
<?php echo template::formOpen('installForm'); ?>
<?php echo template::text('installId', [
'autocomplete' => 'off',
'label' => 'Identifiant'
]); ?>
<div class="row">
<div class="col6">
<?php echo template::password('installPassword', [
'autocomplete' => 'off',
'label' => 'Mot de passe'
]); ?>
</div>
<div class="col6">
<?php echo template::password('installConfirmPassword', [
'autocomplete' => 'off',
'label' => 'Confirmation'
]); ?>
</div>
</div>
<?php echo template::mail('installMail', [
'autocomplete' => 'off',
'label' => 'Adresse mail'
]); ?>
<div class="row">
<div class="col6">
<?php echo template::text('installFirstname', [
'autocomplete' => 'off',
'label' => 'Prénom'
]); ?>
</div>
<div class="col6">
<?php echo template::text('installLastname', [
'autocomplete' => 'off',
'label' => 'Nom'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::select('installTheme', $module::$themes, [
'label' => 'Thème'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::checkbox('installDefaultData',true , 'Ne pas charger l\'exemple de site (utilisateurs avancés)', [
'checked' => false
]);
?>
</div>
</div>
<div class="row">
<div class="col3 offset9">
<?php echo template::submit('installSubmit', [
'value' => 'Installer'
]); ?>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -1,22 +0,0 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
/** NE PAS EFFACER
* admin.css
*/
.title {
font-weight: bold;
}

View File

@ -1,13 +0,0 @@
/**
* This file is part of Zwii.
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
$("#installId").on("change keydown keyup",(function(event){var userId=$(this).val();if(8!==event.keyCode&&37!==event.keyCode&&39!==event.keyCode&&46!==event.keyCode&&window.getSelection().toString()!==userId){var searchReplace={"á":"a","à":"a","â":"a","ä":"a","ã":"a","å":"a","ç":"c","é":"e","è":"e","ê":"e","ë":"e","í":"i","ì":"i","î":"i","ï":"i","ñ":"n","ó":"o","ò":"o","ô":"o","ö":"o","õ":"o","ú":"u","ù":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Á":"A","À":"A","Â":"A","Ä":"A","Ã":"A","Å":"A","Ç":"C","É":"E","È":"E","Ê":"E","Ë":"E","Í":"I","Ì":"I","Î":"I","Ï":"I","Ñ":"N","Ó":"O","Ò":"O","Ô":"O","Ö":"O","Õ":"O","Ú":"U","Ù":"U","Û":"U","Ü":"U","Ý":"Y","Ÿ":"Y","'":"-",'"':"-"," ":"-"};userId=(userId=userId.replace(/[áàâäãåçéèêëíìîïñóòôöõúùûüýÿ'" ]/gi,(function(match){return searchReplace[match]}))).replace(/[^a-z0-9-]/gi,""),$(this).val(userId)}}));

View File

@ -1,119 +0,0 @@
<p>
<?php echo helper::translate('Renseignez les champs ci-dessous pour finaliser l\'installation.'); ?>
</p>
<?php echo template::formOpen('installForm'); ?>
<div class="row">
<div class="col12">
<details open>
<summary>
<span class="title">
<?php echo helper::translate('Compte administrateur'); ?>
</span>
</summary>
<div class="row">
<div class="col6">
<?php echo template::text('installFirstname', [
'autocomplete' => 'off',
'label' => 'Prénom'
]); ?>
</div>
<div class="col6">
<?php echo template::text('installLastname', [
'autocomplete' => 'off',
'label' => 'Nom'
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::text('installId', [
'autocomplete' => 'off',
'label' => 'Identifiant'
]); ?>
</div>
<div class="col6">
<?php echo template::mail('installMail', [
'autocomplete' => 'off',
'label' => 'Adresse électronique'
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::password('installPassword', [
'autocomplete' => 'off',
'label' => 'Mot de passe'
]); ?>
</div>
<div class="col6">
<?php echo template::password('installConfirmPassword', [
'autocomplete' => 'off',
'label' => 'Confirmation'
]); ?>
</div>
</div>
</details>
</div>
</div>
<div class="row">
<div class="col12">
<details close>
<summary>
<span class="title">
<?php echo helper::translate('Options avancées'); ?>
</span>
</summary>
<?php if ($_SESSION['ZWII_UI'] === 'fr_FR'): ?>
<div class="row">
<div class="col12">
<?php echo template::checkbox('installDefaultData', true, 'Ne pas charger l\'exemple de site (utilisateurs avancés)', [
'checked' => false
]);
?>
</div>
</div>
<?php endif; ?>
<div class="row">
<div class="col3">
<?php echo template::select('installProxyType', $module::$proxyType, [
'label' => 'Type de proxy'
]); ?>
</div>
<div class="col6">
<?php echo template::text('installProxyUrl', [
'label' => 'Adresse du proxy',
'placeholder' => 'cache.proxy.fr'
]); ?>
</div>
<div class="col3">
<?php echo template::text('installProxyPort', [
'label' => 'Port du proxy',
'placeholder' => '6060'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::hidden('installLanguage', [
'value' => $this->getUrl(2)
]); ?>
</div>
</div>
</div>
</div>
</details>
<div class="row">
<div class="col2">
<?php echo template::button('installPrevious', [
'class' => 'buttonGrey',
'href' => helper::baseUrl(true) . '?install',
'value' => template::ico('left')
]); ?>
</div>
<div class="col3 offset7">
<?php echo template::submit('installSubmit', [
'value' => 'Installer'
]); ?>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -7,8 +7,8 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @copyright Copyright (C) 2018-2022, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

View File

@ -1,73 +1,63 @@
/**
* Exécution des différentes étapes de mise à jour
*/
function step(i, data) {
var errors = ["<?php echo helper::translate('Préparation de la mise à jour'); ?>", "<?php echo helper::translate('Téléchargement et validation de l\'archive'); ?>", "<?php echo helper::translate('Installation'); ?>", "<?php echo helper::translate('Configuration'); ?>"];
$(".installUpdateProgressText").hide(), $(".installUpdateProgressText[data-id=" + i + "]").show();
$("body").css("cursor", "wait");
$.ajax({
type: "POST",
url: "<?php echo helper::baseUrl(false); ?>?install/steps",
data: {
step: i,
data: data
},
success: function (result) {
setTimeout((function () {
if (4 === i) {
$("#installUpdateSuccess").show();
$("body").css("cursor", "default");
$("#installUpdateEnd").removeClass("disabled");
$("#installUpdateProgress").hide();
} else {
step(i + 1, result.data);
}
}), 2e3)
},
error: function (xhr) {
// Balance tout dans la console
console.log(i);
console.log(xhr.responseText);
console.log(errors);
// Appel de la fonction de gestion d'erreur
showError(i, xhr.responseText, errors);
}
});
// Affiche le texte de progression
$(".installUpdateProgressText").hide();
$(".installUpdateProgressText[data-id=" + i + "]").show();
// Requête ajax
$.ajax({
type: "POST",
url: "<?php echo helper::baseUrl(false); ?>?install/steps", // Ignore la réécriture d'URL
data: {
step: i,
data: data
},
// Succès de la requête
success: function(result) {
setTimeout(function() {
// Succès
if(result.success === true) {
// Fin de la mise à jour
if(i === 4) {
// Affiche le message de succès
$("#installUpdateSuccess").show();
// Déverrouille le bouton "Terminer"
$("#installUpdateEnd").removeClass("disabled");
// Cache le texte de progression
$("#installUpdateProgress").hide();
}
// Prochaine étape
else {
step(i + 1, result.data);
}
}
// Échec
else {
// Affiche le message d'erreur
$("#installUpdateErrorStep").text(i);
$("#installUpdateError").show();
// Déverrouille le bouton "Terminer"
$("#installUpdateEnd").removeClass("disabled");
// Cache le texte de progression
$("#installUpdateProgress").hide();
// Affiche le résultat dans la console
console.error(result);
}
}, 2000);
},
// Échec de la requête
error: function(xhr) {
// Affiche le message d'erreur
$("#installUpdateErrorStep").text(0);
$("#installUpdateError").show();
// Déverrouille le bouton "Terminer"
$("#installUpdateEnd").removeClass("disabled");
// Cache le texte de progression
$("#installUpdateProgress").hide();
// Affiche l'erreur dans la console
console.error(xhr);
}
});
}
function showError(step, message, errors) {
$("body").css("cursor", "default");
$("#installUpdateErrorStep").text(errors[step] + " (étape n°" + step + ")");
$("#installUpdateError").show();
$("#installUpdateEnd").removeClass("disabled");
$("#installUpdateProgress").hide();
// Vérifier si l'accolade ouvrante est trouvée et qu'elle n'est pas en première position
if (typeof message !== 'object') {
// Trouver la position du premier "{" pour repérer le début du tableau
const startOfArray = message.indexOf('{');
// Extraire le message du warning jusqu'au début du tableau
const warningMessage = message.substring(0, startOfArray).trim();
// Extraire le tableau JSON entre les accolades
const jsonString = message.substring(startOfArray);
const jsonData = JSON.parse(jsonString);
// Afficher les résultats
if (jsonData) {
$("#installUpdateErrorMessage").html("<strong>Détails de l'erreur :</strong><br> " +
jsonData.data.replace(/^"(.*)"$/, '$1') +
"<br>" +
warningMessage.replace(/<[^p].*?>/g, ""));
}
} else {
// Vous pouvez également faire quelque chose d'autre ici, par exemple, afficher un message à l'utilisateur, etc.
$("#installUpdateErrorMessage").html(message);
}
}
$(window).on("load", function () {
step(1, null);
});
$(window).on("load", step(1, null));

View File

@ -1,56 +1,29 @@
<div id="updateContainer">
<p><strong>
<?php echo helper::translate('Version'); ?>
&nbsp;
<?php echo self::ZWII_VERSION; ?>
<?php echo helper::translate('vers'); ?>
&nbsp;
<?php echo $module::$newVersion; ?>
</strong></p>
<p>
<?php echo helper::translate('Afin d\'assurer le bon fonctionnement de Zwii, veuillez ne pas fermer cette page avant la fin de l\'opération.'); ?>
</p>
<div class="row">
<div class="col9 verticalAlignMiddle">
<div id="installUpdateProgress">
<?php echo template::ico('spin', ['animate' => true]); ?>
<span class="installUpdateProgressText" data-id="1">
<?php echo helper::translate('1/4 : Préparation...'); ?>
</span>
<span class="installUpdateProgressText displayNone" data-id="2">
<?php echo helper::translate('2/4 : Téléchargement...'); ?>
</span>
<span class="installUpdateProgressText displayNone" data-id="3">
<?php echo helper::translate('3/4 : Installation...'); ?>
</span>
<span class="installUpdateProgressText displayNone" data-id="4">
<?php echo helper::translate('4/4 : Configuration...'); ?>
</span>
</div>
<div id="installUpdateError" class="message colorRed displayNone">
<?php echo template::ico('cancel'); ?>
<strong>
<?php echo helper::translate('Une erreur est survenue lors de l\'étape :') . '<br>'; ?>
<span id="installUpdateErrorStep"> </span>.
</strong>
</div>
<div id="installUpdateSuccess" class="message colorGreen displayNone">
<?php echo template::ico('check'); ?>
<?php echo helper::translate('Mise à jour terminée avec succès.'); ?>
</div>
<p><strong>Mise à jour de Zwii <?php echo self::ZWII_VERSION; ?> vers Zwii <?php echo $module::$newVersion; ?>.</strong></p>
<p>Afin d'assurer le bon fonctionnement de Zwii, veuillez ne pas fermer cette page avant la fin de l'opération.</p>
<div class="row">
<div class="col9 verticalAlignMiddle">
<div id="installUpdateProgress">
<?php echo template::ico('spin', '', true); ?>
<span class="installUpdateProgressText" data-id="1">1/4 : Préparation...</span>
<span class="installUpdateProgressText displayNone" data-id="2">2/4 : Téléchargement...</span>
<span class="installUpdateProgressText displayNone" data-id="3">3/4 : Installation...</span>
<span class="installUpdateProgressText displayNone" data-id="4">4/4 : Configuration...</span>
</div>
<div class="col3 verticalAlignTop">
<?php echo template::button('installUpdateEnd', [
'value' => 'Terminer',
'href' => helper::baseUrl() . 'config',
'ico' => 'check',
'class' => 'disabled'
]); ?>
<div id="installUpdateError" class="colorRed displayNone">
<?php echo template::ico('cancel', ''); ?>
Une erreur est survenue lors de l'étape <span id="installUpdateErrorStep"></span>.
</div>
<div id="installUpdateSuccess" class="colorGreen displayNone">
<?php echo template::ico('check', ''); ?>
Mise à jour terminée avec succès.
</div>
</div>
<div class="row">
<div class="col12">
<p><em><span class="colorRed" id="installUpdateErrorMessage"></span></em></p>
</div>
<div class="col3 verticalAlignMiddle">
<?php echo template::button('installUpdateEnd', [
'value' => 'Terminer',
'href' => helper::baseUrl() . 'config',
'ico' => 'check',
'class' => 'disabled'
]); ?>
</div>
</div>

View File

@ -1,712 +0,0 @@
<?php
/**
* This file is part of Zwii.
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
class language extends common
{
// URL langues de l'UI en ligne
const ZWII_UI_URL = 'https://forge.chapril.org/ZwiiCMS-Team/zwiicms-translations/raw/branch/master/v13/';
public static $actions = [
'index' => self::GROUP_ADMIN,
'copy' => self::GROUP_ADMIN,
'add' => self::GROUP_ADMIN,
// Ajouter une langue de contenu
'edit' => self::GROUP_ADMIN,
// Éditer une langue de l'UI
'locale' => self::GROUP_ADMIN,
// Éditer une langue de contenu
'delete' => self::GROUP_ADMIN,
// Effacer une langue de contenu ou de l'interface
'content' => self::GROUP_VISITOR,
'update' => self::GROUP_ADMIN,
'default' => self::GROUP_ADMIN
];
const PAGINATION = '20';
// Language contents
public static $translateOptions = [];
// Page pour la configuration dans la langue
public static $pagesList = [];
public static $orphansList = [];
public static $pages = '';
// Liste des langues installées
public static $languagesUiInstalled = [];
public static $languagesInstalled = [];
public static $languagesStore = [];
public static $dialogues = [];
// Liste des langues cibles
public static $languagesTarget = [];
// Activation du bouton de copie
public static $siteCopy = true;
// Localisation en cours d'édition
public static $locales = [];
//UI
// Fichiers des langues de l'interface
public static $i18nFiles = [];
/**
* Met à jour les traduction du site depuis le store
*/
public function update()
{
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
) {
// Valeurs en sortie
$this->addOutput([
'access' => false
]);
} else {
$lang = $this->getUrl(2);
// Action interdite ou URl avec le code langue incorrecte
if (
array_key_exists($lang, self::$languages) === false
) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'language',
'state' => false,
'notification' => helper::translate('Action interdite')
]);
}
// Télécharger le descripteur en ligne
$languageData = json_decode(helper::getUrlContents(self::ZWII_UI_URL . $lang . '.json'), true);
$descripteur = json_decode(helper::getUrlContents(self::ZWII_UI_URL . 'language.json'), true);
$success = false;
if (
is_array($languageData) &&
is_array($descripteur['language'][$lang])
) {
if ($this->setData(['language', $lang, $descripteur['language'][$lang]])) {
$success = $this->secure_file_put_contents(self::I18N_DIR . $lang . '.json', $languageData);
$success = is_int($success) ? true : false;
}
}
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'language',
'notification' => $success ? helper::translate('Copie terminée avec succès') : 'Copie terminée avec des erreurs',
'state' => $success
]);
}
}
/**
* Configuration avancée des langues
*/
public function copy()
{
// Soumission du formulaire
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$this->isPost()
) {
// Initialisation
$success = false;
$copyFrom = $this->getInput('translateFormCopySource');
$toCreate = $this->getInput('translateFormCopyTarget');
if ($copyFrom !== $toCreate) {
// Création du dossier
if (is_dir(self::DATA_DIR . $toCreate) === false) { // Si le dossier est déjà créé
$success = mkdir(self::DATA_DIR . $toCreate, 0755);
$success = mkdir(self::DATA_DIR . $toCreate . '/content', 0755);
} else {
$success = true;
}
// Copier les données par défaut
$success = (copy(self::DATA_DIR . $copyFrom . '/locale.json', self::DATA_DIR . $toCreate . '/locale.json') === true && $success === true) ? true : false;
$success = (copy(self::DATA_DIR . $copyFrom . '/module.json', self::DATA_DIR . $toCreate . '/module.json') === true && $success === true) ? true : false;
$success = (copy(self::DATA_DIR . $copyFrom . '/page.json', self::DATA_DIR . $toCreate . '/page.json') === true && $success === true) ? true : false;
$success = ($this->copyDir(self::DATA_DIR . $copyFrom . '/content', self::DATA_DIR . $toCreate . '/content') === true && $success === true) ? true : false;
// Enregistrer la langue
if ($success) {
$notification = sprintf(helper::translate('Données %s copiées vers %s'), self::$languages[$copyFrom], self::$languages[$toCreate]);
} else {
$notification = helper::translate('Erreur de copie, vérifiez les permissions');
}
} else {
$success = false;
$notification = helper::translate('Les langues sélectionnées sont identiques');
}
// Valeurs en sortie
$this->addOutput([
'notification' => $notification,
'title' => 'Utilitaire de copie',
'view' => 'index',
'state' => $success
]);
}
// Tableau des langues installées
foreach (self::$languages as $key => $value) {
// tableau des langues installées
if (is_dir(self::DATA_DIR . $key)) {
self::$languagesTarget[$key] = self::$languages[$key];
}
}
// Langues cibles fr en plus
self::$languagesInstalled = self::$languagesTarget;
// Valeurs en sortie
$this->addOutput([
'title' => helper::translate('Copie de contenus localisés'),
'view' => 'copy'
]);
}
/**
* Configuration
*/
public function index()
{
// --------------------------------------------------------------------------------------------------
// Langues du site
// --------------------------------------------------------------------------------------------------
foreach (self::$languages as $key => $value) {
// tableau des langues installées
if (is_dir(self::DATA_DIR . $key)) {
if (
file_exists(self::DATA_DIR . $key . '/page.json') &&
file_exists(self::DATA_DIR . $key . '/module.json') &&
file_exists(self::DATA_DIR . $key . '/locale.json')
) {
if (file_exists(self::DATA_DIR . $key . '/.default')) {
$messageLocale = helper::translate('Langue par défaut');
} elseif (isset($_SESSION['ZWII_CONTENT']) && $_SESSION['ZWII_CONTENT'] === $key) {
$messageLocale = helper::translate('Langue du site sélectionnée');
} else {
$messageLocale = '';
}
self::$languagesInstalled[] = [
template::flag($key, '20 %') . '&nbsp;' . $value . ' (' . $key . ')',
$messageLocale,
template::button('translateContentLanguageLocaleEdit' . $key, [
'class' => file_exists(self::DATA_DIR . $key . '/locale.json') ? '' : ' disabled',
'href' => helper::baseUrl() . $this->getUrl(0) . '/locale/' . $key,
'value' => template::ico('pencil'),
'help' => 'Éditer'
]),
template::button('translateContentLanguageLocaleDelete' . $key, [
'class' => 'translateDelete buttonRed' . ($messageLocale ? ' disabled' : ''),
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/locale/' . $key,
'value' => template::ico('trash'),
'help' => 'Supprimer',
])
];
}
}
}
// Activation du bouton de copie
self::$siteCopy = count(self::$languagesInstalled) > 1 ? false : true;
// --------------------------------------------------------------------------------------------------
// Langues de l'UI
// --------------------------------------------------------------------------------------------------
// Langues attachées à des utilisateurs non effaçables
$usersUI = [];
$users = $this->getData(['user']);
foreach ($users as $key => $value) {
array_push($usersUI, $this->getData(['user', $key, 'language']));
}
// Langues installées
$installedUI = $this->getData(['language']);
if (array_key_exists('language', $installedUI)) {
$installedUI = $installedUI['language'];
}
// Langues disponibles en ligne
$storeUI = json_decode(helper::getUrlContents(self::ZWII_UI_URL . 'language.json'), true);
$storeUI = $storeUI ? $storeUI['language'] : null;
// Construction du tableau à partir des langues disponibles dans le store
foreach ($installedUI as $file => $value) {
// La langue est-elle référencée ?
if (array_key_exists(basename($file, '.json'), $installedUI)) {
// La langue est déjà installée
self::$languagesUiInstalled[$file] = [
template::flag($file, '20 %') . '&nbsp;' . self::$languages[$file],
$value['version'],
helper::dateUTF8('%d/%m/%Y', $value['date'], self::$i18nUI),
//self::$i18nUI === $file ? helper::translate('Interface') : '',
'',
/*
template::button('translateContentLanguageUIEdit' . $file, [
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $file,
'value' => template::ico('pencil'),
'help' => 'Éditer',
'disabled' => 'fr_FR' === $file
]),
*/
template::button('translateContentLanguageUIDownload' . $file, [
'class' => isset($storeUI[$file]['version']) && version_compare($installedUI[$file]['version'], $storeUI[$file]['version']) < 0 ? 'buttonGreen' : '',
'href' => helper::baseUrl() . $this->getUrl(0) . '/update/' . $file,
'value' => template::ico('update'),
'help' => 'Mise à jour',
]),
template::button('translateContentLanguageUIDelete' . $file, [
'class' => 'translateDelete buttonRed' . (in_array($file, $usersUI) ? ' disabled' : ''),
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/ui/' . $file,
'value' => template::ico('trash'),
'help' => 'Supprimer',
]),
];
}
}
// Construction du tableau à partir des langues disponibles dans le store
if ($storeUI) {
foreach ($storeUI as $file => $value) {
// La langue est-elle installée ?
if (array_key_exists($file, $installedUI) === false) {
self::$languagesStore[$file] = [
template::flag($file, '20 %') . '&nbsp;' . self::$languages[$file],
$value['version'],
helper::dateUTF8('%d/%m/%Y', $value['date'], self::$i18nUI),
'',
template::button('translateContentLanguageUIDownload' . $file, [
'class' => 'buttonGreen',
'href' => helper::baseUrl() . $this->getUrl(0) . '/update/' . $file,
'value' => template::ico('shopping-basket'),
'help' => 'Installer',
])
];
}
}
}
// Pointer vers la fenêtre
switch ($this->getUrl(1)) {
case 'interface':
setcookie('translateLayout', 'ui', time() + 3600, '/', '', false, false);
break;
case 'site':
setcookie('translateLayout', 'content', time() + 3600, '/', '', false, false);
break;
default:
break;
}
// Valeurs en sortie
$this->addOutput([
'title' => helper::translate('Langues'),
'view' => 'index'
]);
}
/***
* Ajouter une langue de contenu
*/
public function add()
{
// Soumission du formulaire
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$this->isPost()
) {
$lang = $this->getInput('translateAddContent');
// Constructeur pour cette langue
$this->jsonDB($lang);
// Création du contenu
$this->initData('page', $lang);
$this->initData('module', $lang);
$this->initData('locale', $lang);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'language',
'notification' => helper::translate('Modifications enregistrées'),
'state' => true
]);
}
// Préparation de l'affichage du formulaire
//-----------------------------------------
// Tableau des langues non installées
foreach (self::$languages as $key => $value) {
if (!is_dir(self::DATA_DIR . $key))
self::$i18nFiles[$key] = $value;
}
// Valeurs en sortie
$this->addOutput([
'title' => helper::translate('Nouveau contenu localisé'),
'view' => 'add'
]);
}
/**
* Edition des paramètres de la langue de contenu
*/
public function locale()
{
// Action interdite ou URl avec le code langue incorrecte
$lang = $this->getUrl(2);
if (
array_key_exists($lang, self::$languages) === false
) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'language',
'state' => false,
'notification' => helper::translate('Action interdite')
]);
}
// Soumission du formulaire
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$this->isPost()
) {
// Sauvegarder les locales
$data = [
'locale' => [
'homePageId' => $this->getInput('localeHomePageId', helper::FILTER_ID, true),
'page404' => $this->getInput('localePage404'),
'page403' => $this->getInput('localePage403'),
'page302' => $this->getInput('localePage302'),
'legalPageId' => $this->getInput('localeLegalPageId'),
'searchPageId' => $this->getInput('localeSearchPageId'),
'poweredPageLabel' => empty($this->getInput('localePoweredPageLabel', helper::FILTER_STRING_SHORT)) ? 'Motorisé par' : $this->getInput('localePoweredPageLabel', helper::FILTER_STRING_SHORT),
'searchPageLabel' => empty($this->getInput('localeSearchPageLabel', helper::FILTER_STRING_SHORT)) ? 'Rechercher' : $this->getInput('localeSearchPageLabel', helper::FILTER_STRING_SHORT),
'legalPageLabel' => empty($this->getInput('localeLegalPageLabel', helper::FILTER_STRING_SHORT)) ? 'Mentions légales' : $this->getInput('localeLegalPageLabel', helper::FILTER_STRING_SHORT),
'sitemapPageLabel' => empty($this->getInput('localeSitemapPageLabel', helper::FILTER_STRING_SHORT)) ? 'Plan du site' : $this->getInput('localeSitemapPageLabel', helper::FILTER_STRING_SHORT),
'metaDescription' => $this->getInput('localeMetaDescription', helper::FILTER_STRING_LONG, true),
'title' => $this->getInput('localeTitle', helper::FILTER_STRING_SHORT, true),
'cookies' => [
// Les champs sont obligatoires si l'option consentement des cookies est active
'mainLabel' => $this->getInput('localeCookiesZwiiText', helper::FILTER_STRING_LONG, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)),
'titleLabel' => $this->getInput('localeCookiesTitleText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)),
'linkLegalLabel' => $this->getInput('localeCookiesLinkMlText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)),
'cookiesFooterText' => $this->getInput('localeCookiesFooterText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)),
'buttonValidLabel' => $this->getInput('localeCookiesButtonText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN))
]
]
];
// Sauvegarde hors méthodes si la langue n'est pas celle de l'UI
if ($lang === self::$siteContent) {
// Enregistrer les données par lecture directe du formulaire
$this->setData(['locale', $data['locale']]);
} else {
// Sauver sur le disque
$this->secure_file_put_contents(self::DATA_DIR . $lang . '/locale.json', $data);
}
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => helper::translate('Modifications enregistrées'),
'state' => true
]);
}
// Préparation de l'affichage du formulaire
//-----------------------------------------
// La locale est-elle celle de la langue de l'UI ?
if ($lang === self::$siteContent) {
self::$locales[$lang]['locale'] = $this->getData(['locale']);
} else {
// Lire les locales sans passer par les méthodes
self::$locales[$lang] = json_decode(file_get_contents(self::DATA_DIR . $lang . '/locale.json'), true);
}
// Générer la liste des pages disponibles
self::$pagesList = $this->getData(['page']);
foreach (self::$pagesList as $page => $pageId) {
if (
$this->getData(['page', $page, 'block']) === 'bar' ||
$this->getData(['page', $page, 'disable']) === true
) {
unset(self::$pagesList[$page]);
}
}
self::$orphansList = $this->getData(['page']);
foreach (self::$orphansList as $page => $pageId) {
if (
$this->getData(['page', $page, 'block']) === 'bar' ||
$this->getData(['page', $page, 'disable']) === true ||
$this->getdata(['page', $page, 'position']) !== 0
) {
unset(self::$orphansList[$page]);
}
}
// Valeurs en sortie
$this->addOutput([
'title' => helper::translate('Paramètres de la localisation') . '&nbsp;' . template::flag($lang, '20 %'),
'view' => 'locale'
]);
}
/**
* Edition de la langue de l'interface
*/
public function edit()
{
$lang = $this->getUrl(2);
// Action interdite ou URl avec le code langue incorrecte
if (
array_key_exists($lang, self::$languages) === false
) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'language',
'state' => false,
'notification' => helper::translate('Action interdite')
]);
}
// Soumission du formulaire
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$this->isPost()
) {
// Sauvegarder les champs de la langue
$data = json_decode(file_get_contents(self::I18N_DIR . $lang . '.json'), true);
foreach ($data as $key => $value) {
$target = $this->getInput('translateString' . array_search($key, array_keys($data)));
if (empty($target) === false) {
$data[$key] = $target;
}
}
$this->secure_file_put_contents(self::I18N_DIR . $lang . '.json', $data);
// Mettre à jour le descripteur
$this->setData([
'language',
$lang,
[
'version' => $this->getInput('translateEditVersion'),
'date' => $this->getInput('translateEditDate', helper::FILTER_DATETIME),
]
]);
// Valeurs en sortie
$this->addOutput([
'notification' => helper::translate('Modifications enregistrées'),
'redirect' => helper::baseUrl() . 'language',
'state' => true,
]);
}
// Construction du formulaire
// Chargement des dialogue de la langue cible
if (!isset($data)) {
$data = json_decode(file_get_contents(self::I18N_DIR . $this->getUrl(2) . '.json'), true);
}
// Ajout des champs absents selon la langue de référence
$dataFr = json_decode(file_get_contents(self::I18N_DIR . 'fr_FR.json'), true);
foreach ($dataFr as $key => $value) {
if (!array_key_exists($key, $data)) {
$data[$key] = '';
}
}
$this->secure_file_put_contents(self::I18N_DIR . $lang . '.json', $data);
// Tableau des chaines à traduire dans la langue sélectionnée
foreach ($data as $key => $value) {
$dialogues[] = ['source' => $key, 'target' => $value];
}
// Pagination
$pagination = helper::pagination($dialogues, $this->getUrl(), self::PAGINATION);
// Liste des pages
self::$pages = $pagination['pages'];
// Articles en fonction de la pagination
for ($i = $pagination['first']; $i < $pagination['last']; $i++) {
self::$dialogues[$i] = $dialogues[$i];
}
// Valeurs en sortie
$this->addOutput([
'title' => helper::translate('Éditer les dialogues') . '&nbsp;' . template::flag($lang, '20 %'),
'view' => 'edit',
'vendor' => [
'flatpickr',
],
]);
}
/***
* Effacer une langue de contenu
*/
public function delete()
{
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
) {
// Valeurs en sortie
$this->addOutput([
'access' => false
]);
} else {
// Action interdite ou URl avec le code langue incorrecte
$target = $this->getUrl(2);
$lang = $this->getUrl(3);
if (
array_key_exists($lang, self::$languages) === false
) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'language',
'state' => false,
'notification' => helper::translate('Action interdite')
]);
}
switch ($target) {
case 'locale':
$success = false;
// Effacement d'une site dans une langue
if (is_dir(self::DATA_DIR . $lang) === true) {
$success = $this->deleteDir(self::DATA_DIR . $lang);
}
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'language',
'notification' => $success ? helper::translate('Traduction supprimée') : helper::translate('Erreur inconnue'),
'state' => $success
]);
break;
case 'ui':
$success = false;
// Effacement d'une langue de l'interface
if (file_exists(self::I18N_DIR . $lang . '.json') === true) {
$this->deleteData(['language', $lang]);
$success = unlink(self::I18N_DIR . $lang . '.json');
}
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'language',
'notification' => $success ? helper::translate('Traduction supprimée') : helper::translate('Erreur inconnue'),
'state' => $success
]);
break;
default:
# Do nothing
break;
}
}
}
/*
* Modifie la langue du site par défaut
*
*/
public function default()
{
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
) {
// Valeurs en sortie
$this->addOutput([
'access' => false
]);
} else {
// Action interdite ou URl avec le code langue incorrecte
$lang = $this->getUrl(2);
if (
array_key_exists($lang, self::$languages) === false
) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'language',
'state' => false,
'notification' => helper::translate('Action interdite')
]);
}
foreach (self::$languages as $key => $value) {
if (file_exists(self::DATA_DIR . $key . '/.default')) {
unlink(self::DATA_DIR . $key . '/.default');
touch(self::DATA_DIR . $lang . '/.default');
break;
}
}
// Valeurs en sortie
$this->addOutput([
'notification' => helper::translate('Modifications enregistrées'),
'redirect' => helper::baseUrl() . 'language',
'state' => true,
]);
}
}
/*
* Traitement du changement de langue
* Fonction utilisée par le noyau
*/
public function content()
{
// Langue sélectionnée
$lang = $this->getUrl(2);
/**
* Changement de la langue si
* différe de la langue active
* déjà initialisée
* fait partie des langues installées
*/
if (
is_dir(self::DATA_DIR . $lang) &&
array_key_exists($lang, self::$languages) === true
) {
// Stocker la sélection
$_SESSION['ZWII_CONTENT'] = $lang;
}
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl()
]);
}
}

View File

@ -1,20 +0,0 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
/** @import url("site/data/admin.css"); */
/** NE PAS EFFACER
* admin.css
*/

View File

@ -1,29 +0,0 @@
<?php echo template::formOpen('translateAddForm'); ?>
<div class="row">
<div class="col1">
<?php echo template::button('translateFormBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'language',
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset9">
<?php echo template::submit('translateFormSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Sélectionnez une langue'); ?>
</h4>
<div class="row">
<div class="col4 offset4">
<?php echo template::select('translateAddContent', $module::$i18nFiles, [
'label' => 'Langues disponibles'
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -1,20 +0,0 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
/** @import url("site/data/admin.css"); */
/** NE PAS EFFACER
* admin.css
*/

View File

@ -1,59 +0,0 @@
<?php echo template::formOpen('translateUIForm'); ?>
<div class="row">
<div class="col1">
<?php echo template::button('translateUIFormBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'language',
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset9">
<?php echo template::submit('translateUIFormSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Paramètres'); ?>
</h4>
<div class="row">
<div class="col6">
<?php echo template::text('translateEditVersion', [
'label' => 'Version n°',
'value' => $this->getData(['language', $this->getUrl(2), 'version'])
]); ?>
</div>
<div class="col6">
<?php echo template::date('translateEditDate', [
'label' => 'Date de publication',
'type' => 'datetime-local',
'value' => $this->getData(['language', $this->getUrl(2), 'date'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<div class="row">
<?php foreach ($module::$dialogues as $key => $value) : ?>
<div class="col6">
<?php echo sprintf('%g -', $key); ?>
<?php echo $value['source']; ?>
</div>
<div class="col6">
<?php echo template::text('translateString' . $key, [
'label' => '',
'value' => $value['target']
]); ?>
</div>
<?php endforeach; ?>
</div>
<?php echo $module::$pages; ?>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -1,54 +0,0 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
/** NE PAS EFFACER
* admin.css
*/
#setupContainer {
display: block;
}
.buttonNotice {
border: 2px solid red !important;
border-radius: 2px;
}
/* Style the tab */
.tab {
margin-top: 1.8em;
overflow: hidden;
text-align: center;
}
.tab ~ .tabContent {
margin-top: -10px;
}
.buttonTab {
display: inline-block;
transition: 0.3s;
border-radius: 10px 10px 0px 0px;
width: 160px;
margin: 0 1px;
}
.buttonTab:hover {
filter: saturate(200%);
}
.activeButton {
background-color: #00BFFF;
}

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