Compare commits
No commits in common. "master" and "12.0.09" have entirely different histories.
4
.gitignore
vendored
4
.gitignore
vendored
@ -4,10 +4,8 @@ site/data/*
|
||||
site/tmp/*
|
||||
site/backup/*
|
||||
site/file/*
|
||||
site/i18n/*.json
|
||||
site/i18n/*.*
|
||||
.DS_Store
|
||||
core/vendor/tinymce/link_list.json
|
||||
robots.txt
|
||||
sitemap.xml
|
||||
.gitignore
|
||||
core/module/config/tool/data.key
|
11
.htaccess
11
.htaccess
@ -32,16 +32,5 @@ Options -Indexes
|
||||
Options -MultiViews
|
||||
</IfModule>
|
||||
|
||||
# Enlever le slash final des URL
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} ^(.+)/$
|
||||
RewriteRule ^ %1 [R=301,L]
|
||||
|
||||
# ne pas supprimer la ligne URL rewriting !
|
||||
# URL rewriting
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1326
CHANGES.md
1326
CHANGES.md
File diff suppressed because it is too large
Load Diff
676
LICENSE
676
LICENSE
@ -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>.
|
110
LISEZMOI.md
110
LISEZMOI.md
@ -1,110 +0,0 @@
|
||||
# ZwiiCMS 13.5.00
|
||||
|
||||
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.
|
||||
|
||||
```
|
167
README.md
167
README.md
@ -1,109 +1,108 @@
|
||||
# ZwiiCMS 13.5.00
|
||||
# ZwiiCMS 12.0.09
|
||||
|
||||
Zwii is a database-less (flat-file) CMS that allows you to easily create and manage a web site without any programming knowledge.
|
||||
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 was created by a talented developer, [Rémi Jean](https://remijean.fr/). It is now maintained by Frédéric Tempez.
|
||||
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/) - [Initial version](https://github.com/remijean/ZwiiCMS/) - [GitHub](https://github.com/fredtempez/ZwiiCMS)
|
||||
[Site](http://zwiicms.fr/) - [Forum](http://forum.zwiicms.com/) - [Version initiale](https://github.com/remijean/ZwiiCMS/) - [GitHub](https://github.com/fredtempez/ZwiiCMS)
|
||||
|
||||
## Recommended configuration
|
||||
## Configuration recommandée
|
||||
|
||||
* PHP 7.2 or higher
|
||||
* .htaccess support
|
||||
* PHP 7.2 ou plus
|
||||
* Support de .htaccess
|
||||
|
||||
## License
|
||||
## Téléchargement de ZwiiCMS
|
||||
|
||||
This work is licensed under the Attribution-Noncommercial-No Derivative Works 4.0 International License.
|
||||
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 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.
|
||||
|
||||
## Downloading ZwiiCMS
|
||||
|
||||
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
|
||||
[R] fonts Dossier contenant les fontes installées
|
||||
[F] fonts.html Fichier contenant les appels des fontes à charger sur cdnFonts
|
||||
[F] fonts.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] 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.
|
||||
|
||||
```
|
||||
|
@ -2,11 +2,8 @@
|
||||
|
||||
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';
|
||||
|
@ -8,7 +8,7 @@ class helper
|
||||
|
||||
/** Filtres personnalisés */
|
||||
const FILTER_BOOLEAN = 1;
|
||||
const FILTER_DATETIME = 2; // filtre pour le champ de formulaire A conserver pour la compatibilité
|
||||
const FILTER_DATETIME = 2;
|
||||
const FILTER_FLOAT = 3;
|
||||
const FILTER_ID = 4;
|
||||
const FILTER_INT = 5;
|
||||
@ -16,14 +16,8 @@ class helper
|
||||
const FILTER_PASSWORD = 7;
|
||||
const FILTER_STRING_LONG = 8;
|
||||
const FILTER_STRING_SHORT = 9;
|
||||
const FILTER_TIMESTAMP = 10; // Saisie d'une date en locatime
|
||||
const FILTER_TIMESTAMP = 10;
|
||||
const FILTER_URL = 11;
|
||||
const FILTER_DATE = 12; // filtre pour le champ de formulaire
|
||||
const FILTER_TIME = 13; // filtre pour le champ de formulair
|
||||
const FILTER_MONTH = 14; // filtre pour le champ de formulair
|
||||
const FILTER_YEAR = 16; // filtre pour le champ de formulair
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@ -32,15 +26,6 @@ class helper
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -49,41 +34,42 @@ class helper
|
||||
* Date au format time()
|
||||
* $format strftime
|
||||
*/
|
||||
public static function dateUTF8($format, $date, $locale = 'fr_FR')
|
||||
public static function dateUTF8($format, $date)
|
||||
{
|
||||
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());
|
||||
return mb_detect_encoding(\PHP81_BC\strftime($format, $date), 'UTF-8', true)
|
||||
? \PHP81_BC\strftime($format, $date)
|
||||
: utf8_encode(\PHP81_BC\strftime($format, $date));
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction pour assurer la traduction des messages
|
||||
*/
|
||||
public static function googleTranslate($to, $text)
|
||||
{
|
||||
public static function googleTranslate($to, $text){
|
||||
if (!file_exists('site/i18n/' . $to . '.json')) {
|
||||
file_put_contents('site/i18n/' . $to . '.json', json_encode([]));
|
||||
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];
|
||||
$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)) {
|
||||
if (array_key_exists($text, $data) ) {
|
||||
$data[$text] = $response;
|
||||
} else {
|
||||
$data = array_merge($data, [$text => $response]);
|
||||
$data = array_merge($data,[$text => $response]);
|
||||
}
|
||||
}
|
||||
// Mode alimentation des chaines
|
||||
// Mode alimentation des chaines
|
||||
} else {
|
||||
// Créer la variable
|
||||
$data = array_merge($data, [$text => '']);
|
||||
$data = array_merge($data,[$text => '']);
|
||||
}
|
||||
file_put_contents('site/i18n/' . $to . '.json', json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
|
||||
file_put_contents ('site/i18n/' . $to . '.json', json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT), LOCK_EX);
|
||||
|
||||
}
|
||||
}
|
||||
@ -200,12 +186,12 @@ class helper
|
||||
// Creation du ZIP
|
||||
$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,
|
||||
@ -234,7 +220,7 @@ 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('..', '.'));
|
||||
@ -276,7 +262,7 @@ class helper
|
||||
$dataDirectory = '';
|
||||
}
|
||||
// Affection
|
||||
$modules[$value] = [
|
||||
$modules[$value] = [
|
||||
'name' => $value,
|
||||
'realName' => $realName,
|
||||
'version' => $version,
|
||||
@ -344,12 +330,13 @@ class helper
|
||||
{
|
||||
// N'interroge que le serveur Apache
|
||||
if (strpos($_SERVER["SERVER_SOFTWARE"], 'Apache') > 0) {
|
||||
self::$rewriteStatus = false;
|
||||
} else {
|
||||
self::$rewriteStatus === false;
|
||||
} elseif (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 = (strpos($htaccess[1], 'RewriteEngine on') !== false);
|
||||
//self::$rewriteStatus = (empty($htaccess[1]) === false);
|
||||
self::$rewriteStatus = (strpos($htaccess[1], 'RewriteEngine on') > 0) ? true : false;
|
||||
}
|
||||
return self::$rewriteStatus;
|
||||
}
|
||||
@ -358,9 +345,9 @@ class helper
|
||||
* Renvoie le numéro de version de Zwii est en ligne
|
||||
* @return string
|
||||
*/
|
||||
public static function getOnlineVersion($channel)
|
||||
public static function getOnlineVersion()
|
||||
{
|
||||
return (helper::getUrlContents(common::ZWII_UPDATE_URL . $channel . '/version'));
|
||||
return (helper::getUrlContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version'));
|
||||
}
|
||||
|
||||
|
||||
@ -368,14 +355,14 @@ class helper
|
||||
* Check si une nouvelle version de Zwii est disponible
|
||||
* @return bool
|
||||
*/
|
||||
public static function checkNewVersion($channel)
|
||||
public static function checkNewVersion()
|
||||
{
|
||||
$version = helper::getOnlineVersion($channel);
|
||||
$update = false;
|
||||
$version = helper::getOnlineVersion();
|
||||
if (!empty($version)) {
|
||||
$update = version_compare(common::ZWII_VERSION, $version) == -1;
|
||||
return ((version_compare(common::ZWII_VERSION, $version)) === -1);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return $update;
|
||||
}
|
||||
|
||||
|
||||
@ -393,12 +380,12 @@ 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] . ')',
|
||||
'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) . ')'
|
||||
($rgba[0] < 128 ? 255 : 0) . ',' .
|
||||
($rgba[1] < 128 ? 255 : 0) . ',' .
|
||||
($rgba[1] < 128 ? 255 : 0) . ',' .
|
||||
($rgba[0] < 128 ? 255 : 0) . ')'
|
||||
];
|
||||
}
|
||||
|
||||
@ -408,8 +395,8 @@ class helper
|
||||
*/
|
||||
public static function deleteCookie($cookieKey)
|
||||
{
|
||||
setcookie($cookieKey, '', time() - 3600, helper::baseUrl(false, false), '', false, true);
|
||||
unset($_COOKIE[$cookieKey]);
|
||||
setcookie($cookieKey, '', time() - 3600, helper::baseUrl(false, false), '', false, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -432,19 +419,16 @@ class helper
|
||||
$text = (int) $date->format('U');
|
||||
break;
|
||||
case self::FILTER_FLOAT:
|
||||
$text = str_replace(',', '.', $text); // Remplacer les virgules par des points
|
||||
$text = filter_var($text, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
|
||||
$text = filter_var($text, FILTER_SANITIZE_NUMBER_FLOAT);
|
||||
$text = (float) $text;
|
||||
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);
|
||||
@ -480,11 +464,6 @@ class helper
|
||||
case self::FILTER_URL:
|
||||
$text = filter_var($text, FILTER_SANITIZE_URL);
|
||||
break;
|
||||
case self::FILTER_DATE:
|
||||
$text = date('Y-m-d', $text);
|
||||
break;
|
||||
case self::FILTER_TIME:
|
||||
$text = date('H:i', $text);
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
@ -537,10 +516,6 @@ class helper
|
||||
$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;
|
||||
}
|
||||
@ -569,7 +544,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);
|
||||
@ -593,7 +568,7 @@ class helper
|
||||
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>';
|
||||
}
|
||||
@ -673,57 +648,35 @@ class helper
|
||||
public static function subword($text, $start, $length)
|
||||
{
|
||||
$text = trim($text);
|
||||
|
||||
// Vérifier si la longueur du texte sans les balises dépasse la longueur souhaitée
|
||||
if (mb_strlen(strip_tags($text)) > $length) {
|
||||
// Utiliser mb_substr pour couper le texte
|
||||
if (strlen($text) > $length) {
|
||||
$text = mb_substr($text, $start, $length);
|
||||
|
||||
// S'assurer que le texte ne se termine pas au milieu d'un mot
|
||||
$lastSpace = mb_strrpos($text, ' ');
|
||||
if ($lastSpace !== false) {
|
||||
$text = mb_substr($text, 0, $lastSpace);
|
||||
}
|
||||
|
||||
// Fermer les balises HTML ouvertes
|
||||
$dom = new DOMDocument();
|
||||
@$dom->loadHTML('<div>' . $text . '</div>', LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
|
||||
$text = $dom->saveHTML();
|
||||
|
||||
// Retirer la balise de conteneur ajoutée
|
||||
$text = preg_replace('~^<div>(.*)</div>$~s', '$1', $text);
|
||||
|
||||
// Ajouter des points de suspension si le texte a été coupé
|
||||
$text .= '...';
|
||||
$text = mb_substr($text, 0, min(mb_strlen($text), mb_strrpos($text, ' ')));
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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)
|
||||
public static function encrypt($key, $payload)
|
||||
{
|
||||
$encrypted = openssl_encrypt($string, "AES-256-CBC", $key, 0, substr(md5($key), 0, 16));
|
||||
return base64_encode($encrypted);
|
||||
$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)
|
||||
public static function decrypt($key, $garble)
|
||||
{
|
||||
$decrypted = openssl_decrypt(base64_decode($string), "AES-256-CBC", $key, 0, substr(md5($key), 0, 16));
|
||||
return $decrypted;
|
||||
list($encrypted_data, $iv) = explode('::', base64_decode($garble), 2);
|
||||
return openssl_decrypt($encrypted_data, 'aes-256-cbc', $key, 0, $iv);
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 = [])
|
||||
{
|
||||
@ -58,8 +52,7 @@ class JsonDb extends \Prowebcraft\Dot
|
||||
public function set($key, $value = null, $save = true)
|
||||
{
|
||||
parent::set($key, $value);
|
||||
if ($save)
|
||||
$this->save();
|
||||
if ($save) $this->save();
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -75,8 +68,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;
|
||||
}
|
||||
|
||||
@ -90,8 +82,7 @@ class JsonDb extends \Prowebcraft\Dot
|
||||
public function delete($key, $save = true)
|
||||
{
|
||||
parent::delete($key);
|
||||
if ($save)
|
||||
$this->save();
|
||||
if ($save) $this->save();
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -107,8 +98,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,20 +108,19 @@ 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'] . $this->config['name'];
|
||||
$this->db = $this->config['dir'] . DIRECTORY_SEPARATOR . $this->config['name'];
|
||||
if (!file_exists($this->db)) {
|
||||
return null; // Rebuild database manage by CMS
|
||||
} 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);
|
||||
}
|
||||
try {
|
||||
//todo make backup of database
|
||||
copy ($this->config['dir'] . DIRECTORY_SEPARATOR . $this->config['name'], $this->config['dir'] . DIRECTORY_SEPARATOR . $this->config['name'] . '.backup');
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->data = json_decode(file_get_contents($this->db), true);
|
||||
@ -146,46 +135,9 @@ class JsonDb extends \Prowebcraft\Dot
|
||||
/**
|
||||
* Save 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);
|
||||
$encoded_data = json_encode($this->data, JSON_UNESCAPED_UNICODE | JSON_FORCE_OBJECT);
|
||||
|
||||
// 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
|
||||
|
||||
//$now = \DateTime::createFromFormat('U.u', microtime(true));
|
||||
//file_put_contents("tmplog.txt", '[JsonDb][' . $now->format('H:i:s.u') . ']--' . $this->db . "\r\n", FILE_APPEND);
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
// 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.');
|
||||
}
|
||||
public function save() {
|
||||
file_put_contents($this->db, json_encode($this->data, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT|LOCK_EX)); // Multi user get a locker
|
||||
}
|
||||
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -350,8 +350,8 @@ class PHPMailer
|
||||
public $Password = '';
|
||||
|
||||
/**
|
||||
* SMTP authentication type. Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2.
|
||||
* If not specified, the first one from that list that the server supports will be selected.
|
||||
* SMTP auth type.
|
||||
* Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
@ -750,7 +750,7 @@ class PHPMailer
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.7.1';
|
||||
const VERSION = '6.6.0';
|
||||
|
||||
/**
|
||||
* Error severity: message only, continue processing.
|
||||
@ -858,7 +858,7 @@ class PHPMailer
|
||||
private function mailPassthru($to, $subject, $body, $header, $params)
|
||||
{
|
||||
//Check overloading of mail function to avoid double-encoding
|
||||
if ((int)ini_get('mbstring.func_overload') & 1) {
|
||||
if (ini_get('mbstring.func_overload') & 1) {
|
||||
$subject = $this->secureHeader($subject);
|
||||
} else {
|
||||
$subject = $this->encodeHeader($this->secureHeader($subject));
|
||||
@ -1066,8 +1066,8 @@ class PHPMailer
|
||||
* Addresses that have been added already return false, but do not throw exceptions.
|
||||
*
|
||||
* @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo'
|
||||
* @param string $address The email address
|
||||
* @param string $name An optional username associated with the address
|
||||
* @param string $address The email address to send, resp. to reply to
|
||||
* @param string $name
|
||||
*
|
||||
* @throws Exception
|
||||
*
|
||||
@ -1075,11 +1075,9 @@ class PHPMailer
|
||||
*/
|
||||
protected function addOrEnqueueAnAddress($kind, $address, $name)
|
||||
{
|
||||
$pos = false;
|
||||
if ($address !== null) {
|
||||
$address = trim($address);
|
||||
$pos = strrpos($address, '@');
|
||||
}
|
||||
$address = trim($address);
|
||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||
$pos = strrpos($address, '@');
|
||||
if (false === $pos) {
|
||||
//At-sign is missing.
|
||||
$error_message = sprintf(
|
||||
@ -1096,14 +1094,8 @@ class PHPMailer
|
||||
|
||||
return false;
|
||||
}
|
||||
if ($name !== null && is_string($name)) {
|
||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||
} else {
|
||||
$name = '';
|
||||
}
|
||||
$params = [$kind, $address, $name];
|
||||
//Enqueue addresses with IDN until we know the PHPMailer::$CharSet.
|
||||
//Domain is assumed to be whatever is after the last @ symbol in the address
|
||||
if (static::idnSupported() && $this->has8bitChars(substr($address, ++$pos))) {
|
||||
if ('Reply-To' !== $kind) {
|
||||
if (!array_key_exists($address, $this->RecipientsQueue)) {
|
||||
@ -1124,22 +1116,6 @@ class PHPMailer
|
||||
return call_user_func_array([$this, 'addAnAddress'], $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the boundaries to use for delimiting MIME parts.
|
||||
* If you override this, ensure you set all 3 boundaries to unique values.
|
||||
* The default boundaries include a "=_" sequence which cannot occur in quoted-printable bodies,
|
||||
* as suggested by https://www.rfc-editor.org/rfc/rfc2045#section-6.7
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setBoundaries()
|
||||
{
|
||||
$this->uniqueid = $this->generateId();
|
||||
$this->boundary[1] = 'b1=_' . $this->uniqueid;
|
||||
$this->boundary[2] = 'b2=_' . $this->uniqueid;
|
||||
$this->boundary[3] = 'b3=_' . $this->uniqueid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an address to one of the recipient arrays or to the ReplyTo array.
|
||||
* Addresses that have been added already return false, but do not throw exceptions.
|
||||
@ -1304,7 +1280,7 @@ class PHPMailer
|
||||
*/
|
||||
public function setFrom($address, $name = '', $auto = true)
|
||||
{
|
||||
$address = trim((string)$address);
|
||||
$address = trim($address);
|
||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||
//Don't validate now addresses with IDN. Will be done in send().
|
||||
$pos = strrpos($address, '@');
|
||||
@ -1571,17 +1547,17 @@ class PHPMailer
|
||||
|
||||
//Validate From, Sender, and ConfirmReadingTo addresses
|
||||
foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) {
|
||||
$this->{$address_kind} = trim($this->{$address_kind});
|
||||
if (empty($this->{$address_kind})) {
|
||||
$this->$address_kind = trim($this->$address_kind);
|
||||
if (empty($this->$address_kind)) {
|
||||
continue;
|
||||
}
|
||||
$this->{$address_kind} = $this->punyencodeAddress($this->{$address_kind});
|
||||
if (!static::validateAddress($this->{$address_kind})) {
|
||||
$this->$address_kind = $this->punyencodeAddress($this->$address_kind);
|
||||
if (!static::validateAddress($this->$address_kind)) {
|
||||
$error_message = sprintf(
|
||||
'%s (%s): %s',
|
||||
$this->lang('invalid_address'),
|
||||
$address_kind,
|
||||
$this->{$address_kind}
|
||||
$this->$address_kind
|
||||
);
|
||||
$this->setError($error_message);
|
||||
$this->edebug($error_message);
|
||||
@ -1681,17 +1657,17 @@ class PHPMailer
|
||||
default:
|
||||
$sendMethod = $this->Mailer . 'Send';
|
||||
if (method_exists($this, $sendMethod)) {
|
||||
return $this->{$sendMethod}($this->MIMEHeader, $this->MIMEBody);
|
||||
return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody);
|
||||
}
|
||||
|
||||
return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
|
||||
}
|
||||
} catch (Exception $exc) {
|
||||
$this->setError($exc->getMessage());
|
||||
$this->edebug($exc->getMessage());
|
||||
if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true && $this->smtp->connected()) {
|
||||
if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true) {
|
||||
$this->smtp->reset();
|
||||
}
|
||||
$this->setError($exc->getMessage());
|
||||
$this->edebug($exc->getMessage());
|
||||
if ($this->exceptions) {
|
||||
throw $exc;
|
||||
}
|
||||
@ -1879,7 +1855,7 @@ class PHPMailer
|
||||
if (!static::isPermittedPath($path)) {
|
||||
return false;
|
||||
}
|
||||
$readable = is_file($path);
|
||||
$readable = file_exists($path);
|
||||
//If not a UNC path (expected to start with \\), check read permission, see #2069
|
||||
if (strpos($path, '\\\\') !== 0) {
|
||||
$readable = $readable && is_readable($path);
|
||||
@ -1907,14 +1883,7 @@ class PHPMailer
|
||||
foreach ($this->to as $toaddr) {
|
||||
$toArr[] = $this->addrFormat($toaddr);
|
||||
}
|
||||
$to = trim(implode(', ', $toArr));
|
||||
|
||||
//If there are no To-addresses (e.g. when sending only to BCC-addresses)
|
||||
//the following should be added to get a correct DKIM-signature.
|
||||
//Compare with $this->preSend()
|
||||
if ($to === '') {
|
||||
$to = 'undisclosed-recipients:;';
|
||||
}
|
||||
$to = implode(', ', $toArr);
|
||||
|
||||
$params = null;
|
||||
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
|
||||
@ -2117,9 +2086,6 @@ class PHPMailer
|
||||
$this->smtp->setDebugLevel($this->SMTPDebug);
|
||||
$this->smtp->setDebugOutput($this->Debugoutput);
|
||||
$this->smtp->setVerp($this->do_verp);
|
||||
if ($this->Host === null) {
|
||||
$this->Host = 'localhost';
|
||||
}
|
||||
$hosts = explode(';', $this->Host);
|
||||
$lastexception = null;
|
||||
|
||||
@ -2226,8 +2192,7 @@ class PHPMailer
|
||||
//As we've caught all exceptions, just report whatever the last one was
|
||||
if ($this->exceptions && null !== $lastexception) {
|
||||
throw $lastexception;
|
||||
}
|
||||
if ($this->exceptions) {
|
||||
} elseif ($this->exceptions) {
|
||||
// no exception was thrown, likely $this->smtp->connect() failed
|
||||
$message = $this->getSmtpErrorMessage('connect_host');
|
||||
throw new Exception($message);
|
||||
@ -2810,7 +2775,10 @@ class PHPMailer
|
||||
{
|
||||
$body = '';
|
||||
//Create unique IDs and preset boundaries
|
||||
$this->setBoundaries();
|
||||
$this->uniqueid = $this->generateId();
|
||||
$this->boundary[1] = 'b1_' . $this->uniqueid;
|
||||
$this->boundary[2] = 'b2_' . $this->uniqueid;
|
||||
$this->boundary[3] = 'b3_' . $this->uniqueid;
|
||||
|
||||
if ($this->sign_key_file) {
|
||||
$body .= $this->getMailMIME() . static::$LE;
|
||||
@ -2846,7 +2814,7 @@ class PHPMailer
|
||||
$altBodyEncoding = static::ENCODING_QUOTED_PRINTABLE;
|
||||
}
|
||||
//Use this as a preamble in all multipart message types
|
||||
$mimepre = '';
|
||||
$mimepre = 'This is a multi-part message in MIME format.' . static::$LE . static::$LE;
|
||||
switch ($this->message_type) {
|
||||
case 'inline':
|
||||
$body .= $mimepre;
|
||||
@ -3082,18 +3050,6 @@ class PHPMailer
|
||||
return $body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the boundaries that this message will use
|
||||
* @return array
|
||||
*/
|
||||
public function getBoundaries()
|
||||
{
|
||||
if (empty($this->boundary)) {
|
||||
$this->setBoundaries();
|
||||
}
|
||||
return $this->boundary;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the start of a message boundary.
|
||||
*
|
||||
@ -3749,21 +3705,20 @@ class PHPMailer
|
||||
* These differ from 'regular' attachments in that they are intended to be
|
||||
* displayed inline with the message, not just attached for download.
|
||||
* This is used in HTML messages that embed the images
|
||||
* the HTML refers to using the `$cid` value in `img` tags, for example `<img src="cid:mylogo">`.
|
||||
* the HTML refers to using the $cid value.
|
||||
* Never use a user-supplied path to a file!
|
||||
*
|
||||
* @param string $path Path to the attachment
|
||||
* @param string $cid Content ID of the attachment; Use this to reference
|
||||
* the content when using an embedded image in HTML
|
||||
* @param string $name Overrides the attachment filename
|
||||
* @param string $encoding File encoding (see $Encoding) defaults to `base64`
|
||||
* @param string $type File MIME type (by default mapped from the `$path` filename's extension)
|
||||
* @param string $disposition Disposition to use: `inline` (default) or `attachment`
|
||||
* (unlikely you want this – {@see `addAttachment()`} instead)
|
||||
* @param string $name Overrides the attachment name
|
||||
* @param string $encoding File encoding (see $Encoding)
|
||||
* @param string $type File MIME type
|
||||
* @param string $disposition Disposition to use
|
||||
*
|
||||
* @return bool True on successfully adding an attachment
|
||||
* @throws Exception
|
||||
*
|
||||
* @return bool True on successfully adding an attachment
|
||||
*/
|
||||
public function addEmbeddedImage(
|
||||
$path,
|
||||
@ -4141,8 +4096,12 @@ class PHPMailer
|
||||
//Is it a valid IPv4 address?
|
||||
return filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false;
|
||||
}
|
||||
//Is it a syntactically valid hostname (when embeded in a URL)?
|
||||
return filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false;
|
||||
if (filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false) {
|
||||
//Is it a syntactically valid hostname?
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4211,7 +4170,6 @@ class PHPMailer
|
||||
* @param string $name Custom header name
|
||||
* @param string|null $value Header value
|
||||
*
|
||||
* @return bool True if a header was set successfully
|
||||
* @throws Exception
|
||||
*/
|
||||
public function addCustomHeader($name, $value = null)
|
||||
@ -4506,7 +4464,6 @@ class PHPMailer
|
||||
'ics' => 'text/calendar',
|
||||
'xml' => 'text/xml',
|
||||
'xsl' => 'text/xml',
|
||||
'csv' => 'text/csv',
|
||||
'wmv' => 'video/x-ms-wmv',
|
||||
'mpeg' => 'video/mpeg',
|
||||
'mpe' => 'video/mpeg',
|
||||
@ -4614,7 +4571,7 @@ class PHPMailer
|
||||
public function set($name, $value = '')
|
||||
{
|
||||
if (property_exists($this, $name)) {
|
||||
$this->{$name} = $value;
|
||||
$this->$name = $value;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -4661,27 +4618,15 @@ class PHPMailer
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove trailing whitespace from a string.
|
||||
*
|
||||
* @param string $text
|
||||
*
|
||||
* @return string The text to remove whitespace from
|
||||
*/
|
||||
public static function stripTrailingWSP($text)
|
||||
{
|
||||
return rtrim($text, " \r\n\t");
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip trailing line breaks from a string.
|
||||
* Remove trailing breaks from a string.
|
||||
*
|
||||
* @param string $text
|
||||
*
|
||||
* @return string The text to remove breaks from
|
||||
*/
|
||||
public static function stripTrailingBreaks($text)
|
||||
public static function stripTrailingWSP($text)
|
||||
{
|
||||
return rtrim($text, "\r\n");
|
||||
return rtrim($text, " \r\n\t");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4847,7 +4792,7 @@ class PHPMailer
|
||||
$body = static::normalizeBreaks($body, self::CRLF);
|
||||
|
||||
//Reduce multiple trailing line breaks to a single one
|
||||
return static::stripTrailingBreaks($body) . self::CRLF;
|
||||
return static::stripTrailingWSP($body) . self::CRLF;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,7 +35,7 @@ class SMTP
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.7.1';
|
||||
const VERSION = '6.6.0';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
@ -682,6 +682,7 @@ class SMTP
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
$this->setError('');
|
||||
$this->server_caps = null;
|
||||
$this->helo_rply = null;
|
||||
if (is_resource($this->smtp_conn)) {
|
||||
@ -1036,10 +1037,7 @@ class SMTP
|
||||
return false;
|
||||
}
|
||||
|
||||
//Don't clear the error store when using keepalive
|
||||
if ($command !== 'RSET') {
|
||||
$this->setError('');
|
||||
}
|
||||
$this->setError('');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -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: ';
|
@ -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'] = 'Αδυναμία ορισμού ή επαναφοράς μεταβλητής: ';
|
@ -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';
|
@ -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: ';
|
@ -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: ';
|
@ -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ı: ';
|
@ -1,898 +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(64));
|
||||
}
|
||||
|
||||
// Fuseau horaire
|
||||
common::$timezone = $this->getData(['config', 'timezone']); // Utile pour transmettre le timezone à la classe helper
|
||||
date_default_timezone_set(common::$timezone);
|
||||
// Supprime les fichiers temporaires
|
||||
$lastClearTmp = mktime(0, 0, 0);
|
||||
if ($lastClearTmp > $this->getData(['core', 'lastClearTmp']) + 86400) {
|
||||
$iterator = new DirectoryIterator(common::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]);
|
||||
}
|
||||
// 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(common::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(common::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(common::DATA_DIR . 'custom.css') === false) {
|
||||
$this->secure_file_put_contents(common::DATA_DIR . 'custom.css', file_get_contents('core/module/theme/resource/custom.css'));
|
||||
chmod(common::DATA_DIR . 'custom.css', 0755);
|
||||
}
|
||||
// Crée le fichier de personnalisation
|
||||
if (file_exists(common::DATA_DIR . 'theme.css') === false) {
|
||||
$this->secure_file_put_contents(common::DATA_DIR . 'theme.css', '');
|
||||
chmod(common::DATA_DIR . 'theme.css', 0755);
|
||||
}
|
||||
// Crée le fichier de personnalisation de l'administration
|
||||
if (file_exists(common::DATA_DIR . 'admin.css') === false) {
|
||||
$this->secure_file_put_contents(common::DATA_DIR . 'admin.css', '');
|
||||
chmod(common::DATA_DIR . 'admin.css', 0755);
|
||||
}
|
||||
|
||||
// Check la version rafraichissement du theme
|
||||
$cssVersion = preg_split('/\*+/', file_get_contents(common::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'] = common::$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(common::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(common::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'] = common::$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(common::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(common::MODULE_DIR . $classPath)) {
|
||||
require common::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->isConnected() === true
|
||||
and ($this->getUser('group') === common::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->isConnected() === false
|
||||
or ($this->isConnected() === true
|
||||
and $this->getUser('group') < common::GROUP_ADMIN
|
||||
)
|
||||
)
|
||||
) {
|
||||
// Déconnexion
|
||||
$user = new user;
|
||||
$user->logout();
|
||||
// Redirection
|
||||
http_response_code(302);
|
||||
header('Location:' . helper::baseUrl() . 'maintenance');
|
||||
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']) === common::GROUP_VISITOR
|
||||
or ($this->isConnected() === true
|
||||
// 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->isConnected() === false
|
||||
) or ($this->getData(['page', $this->getUrl(0), 'disable']) === true
|
||||
and $this->isConnected() === true
|
||||
and $this->getUser('group') < common::GROUP_EDITOR
|
||||
)
|
||||
) {
|
||||
$access = false;
|
||||
}
|
||||
// Lève une erreur si l'url est celle d'une page avec des éléments surnuméraires https://www.site.fr/page/truc
|
||||
if (
|
||||
array_key_exists($this->getUrl(0), $this->getData(['page']))
|
||||
and $this->getUrl(1)
|
||||
and $this->getData(['page', $this->getUrl(0), 'moduleId']) === ''
|
||||
) {
|
||||
$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, common::$concurrentAccess) &&
|
||||
//array_intersect($t, common::$accessExclude) !== false &&
|
||||
time() < $this->getData(['user', $userId, 'accessTimer']) + common::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->isConnected() === true
|
||||
&& $this->getUser('id')
|
||||
&& !$this->isPost()
|
||||
) {
|
||||
$this->setData(['user', $this->getUser('id'), 'accessUrl', $this->getUrl()], false);
|
||||
$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> › ' .
|
||||
$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']), common::$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']), common::$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), common::$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), common::$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] === common::GROUP_VISITOR
|
||||
or ($this->isConnected() === true
|
||||
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) {
|
||||
common::$inputBefore[$postId . '_' . $subPostId] = $subPostValue;
|
||||
}
|
||||
} else {
|
||||
common::$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, common::$coreModuleIds) ? 'core/' : '';
|
||||
// CSS
|
||||
$stylePath = $modulePath . common::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 . common::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 . common::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 : '')
|
||||
]);
|
||||
} elseif ($modpos === 'free' && strstr($pageContent, '[MODULE]')) {
|
||||
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);
|
||||
// Pour éviter une 404, bascule dans l'espace correct si la page existe dans cette langue.
|
||||
// Parcourir les espaces
|
||||
foreach (common::$languages as $langId => $value) {
|
||||
;
|
||||
if (
|
||||
// l'espace existe
|
||||
is_dir(common::DATA_DIR . $langId) &&
|
||||
file_exists(common::DATA_DIR . $langId . '/page.json')
|
||||
) {
|
||||
// Lire les données des pages
|
||||
$pagesId = json_decode(file_get_contents(common::DATA_DIR . $langId . '/page.json'), true);
|
||||
if (
|
||||
// La page existe
|
||||
is_array($pagesId['page']) &&
|
||||
array_key_exists($this->getUrl(0), $pagesId['page'])
|
||||
) {
|
||||
// Basculer
|
||||
$_SESSION['ZWII_SITE_CONTENT'] = $langId;
|
||||
header('Refresh:0; url=' . helper::baseUrl() . $this->getUrl());
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
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 common::DISPLAY_RAW:
|
||||
echo $this->output['content'];
|
||||
break;
|
||||
// Layout vide
|
||||
case common::DISPLAY_LAYOUT_BLANK:
|
||||
require 'core/layout/blank.php';
|
||||
break;
|
||||
// Affichage en JSON
|
||||
case common::DISPLAY_JSON:
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($this->output['content']);
|
||||
break;
|
||||
// RSS feed
|
||||
case common::DISPLAY_RSS:
|
||||
header('Content-type: application/rss+xml; charset=UTF-8');
|
||||
echo $this->output['content'];
|
||||
break;
|
||||
// Layout allégé
|
||||
case common::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 common::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;
|
||||
}
|
||||
}
|
||||
}
|
@ -128,17 +128,7 @@ class SitemapGenerator
|
||||
*/
|
||||
private $sampleRobotsLines = [
|
||||
"User-agent: *",
|
||||
"Disallow: /",
|
||||
"User-agent: Googlebot",
|
||||
"Allow: /",
|
||||
"User-agent: bingbot",
|
||||
"Allow: /",
|
||||
"User-agent: Slurp",
|
||||
"Allow: /",
|
||||
"User-agent: DuckDuckBot",
|
||||
"Allow: /",
|
||||
"User-agent: Baiduspider",
|
||||
"Allow: /"
|
||||
];
|
||||
/**
|
||||
* @var array list of valid changefreq values according to the spec
|
||||
|
@ -28,7 +28,7 @@ class template
|
||||
$attributes['value'] = helper::translate($attributes['value']);
|
||||
$attributes['help'] = helper::translate($attributes['help']);
|
||||
// Retourne le html
|
||||
return sprintf(
|
||||
return sprintf(
|
||||
'<a %s class="button %s %s %s" %s>%s</a>',
|
||||
helper::sprintAttributes($attributes, ['class', 'disabled', 'ico', 'value']),
|
||||
$attributes['disabled'] ? 'disabled' : '',
|
||||
@ -65,12 +65,12 @@ class template
|
||||
// Limite addition et soustraction selon le type de captcha
|
||||
$numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20];
|
||||
$letters = ['u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a'];
|
||||
$limit = $attributes['limit'] ? count($letters) - 1 : 10;
|
||||
$limit = $attributes['limit'] ? count($letters) - 1 : 10;
|
||||
|
||||
// Tirage de l'opération
|
||||
mt_srand();
|
||||
mt_srand((float) microtime() * 1000000);
|
||||
// Captcha simple limité à l'addition
|
||||
$operator = $attributes['limit'] ? mt_rand(1, 4) : 1;
|
||||
$operator = $attributes['limit'] ? mt_rand(1, 4) : 1;
|
||||
|
||||
// Limite si multiplication ou division
|
||||
if ($operator > 2) {
|
||||
@ -78,9 +78,9 @@ class template
|
||||
}
|
||||
|
||||
// Tirage des nombres
|
||||
mt_srand();
|
||||
mt_srand( microtime(true) * 1000000);
|
||||
$firstNumber = mt_rand(1, $limit);
|
||||
mt_srand();
|
||||
mt_srand( microtime(true) * 1000000);
|
||||
$secondNumber = mt_rand(1, $limit);
|
||||
|
||||
// Permutation si addition ou soustraction
|
||||
@ -93,26 +93,26 @@ class template
|
||||
// Icône de l'opérateur et calcul du résultat
|
||||
switch ($operator) {
|
||||
case 1:
|
||||
$operator = template::ico('plus', ['fontSize' => '2em;']);
|
||||
$result = $firstNumber + $secondNumber;
|
||||
$operator = template::ico('plus');
|
||||
$result = $firstNumber + $secondNumber;
|
||||
break;
|
||||
case 2:
|
||||
$operator = template::ico('minus', ['fontSize' => '2em;']);
|
||||
$result = $firstNumber - $secondNumber;
|
||||
$operator = template::ico('minus');
|
||||
$result = $firstNumber - $secondNumber;
|
||||
break;
|
||||
case 3:
|
||||
$operator = template::ico('cancel', ['fontSize' => '2em;']);
|
||||
$result = $firstNumber * $secondNumber;
|
||||
$operator = template::ico('cancel');
|
||||
$result = $firstNumber * $secondNumber;
|
||||
break;
|
||||
case 4:
|
||||
$operator = template::ico('divide', ['fontSize' => '2em;']);
|
||||
$operator = template::ico('divide');
|
||||
$limit2 = [10, 10, 6, 5, 4, 3, 2, 2, 2, 2];
|
||||
for ($i = 1; $i <= $firstNumber; $i++) {
|
||||
$limit = $limit2[$i - 1];
|
||||
}
|
||||
mt_srand();
|
||||
mt_srand((float) microtime() * 1000000);
|
||||
$secondNumber = mt_rand(1, $limit);
|
||||
$firstNumber = $firstNumber * $secondNumber;
|
||||
$firstNumber = $firstNumber * $secondNumber;
|
||||
$result = $firstNumber / $secondNumber;
|
||||
break;
|
||||
}
|
||||
@ -125,8 +125,8 @@ class template
|
||||
$secondLetter = uniqid();
|
||||
|
||||
// Masquage image source pour éviter un décodage
|
||||
copy('core/vendor/zwiico/png/' . $attributes['type'] . '/' . $letters[$firstNumber] . '.png', 'site/tmp/' . $firstLetter . '.png');
|
||||
copy('core/vendor/zwiico/png/' . $attributes['type'] . '/' . $letters[$secondNumber] . '.png', 'site/tmp/' . $secondLetter . '.png');
|
||||
copy('core/vendor/zwiico/png/' . $attributes['type'] . '/' . $letters[$firstNumber] . '.png', 'site/tmp/' . $firstLetter . '.png');
|
||||
copy('core/vendor/zwiico/png/' . $attributes['type'] . '/' . $letters[$secondNumber] . '.png', 'site/tmp/' . $secondLetter . '.png');
|
||||
|
||||
|
||||
// Début du wrapper
|
||||
@ -134,7 +134,7 @@ class template
|
||||
// Label
|
||||
$html .= self::label(
|
||||
$attributes['id'],
|
||||
'<img class="captcha' . ucFirst($attributes['type']) . '" src="' . helper::baseUrl(false) . 'site/tmp/' . $firstLetter . '.png" /> <strong>' . $operator . '</strong> <img class="captcha' . ucFirst($attributes['type']) . '" src="' . helper::baseUrl(false) . 'site/tmp/' . $secondLetter . '.png" />' . template::ico('eq', ['fontSize' => '2em;']),
|
||||
'<img class="captcha' . ucFirst($attributes['type']) . '" src="' . helper::baseUrl(false) . 'site/tmp/' . $firstLetter . '.png" /> <strong>' . $operator . '</strong> <img class="captcha' . ucFirst($attributes['type']) . '" src="' . helper::baseUrl(false) . 'site/tmp/' . $secondLetter . '.png" /> en chiffres ?',
|
||||
[
|
||||
'help' => $attributes['help']
|
||||
]
|
||||
@ -224,7 +224,6 @@ class template
|
||||
* Crée un champ date
|
||||
* @param string $nameId Nom et id du champ
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @param string type date seule ; time heure seule ; datetime-local (jour et heure)
|
||||
* @return string
|
||||
*/
|
||||
public static function date($nameId, array $attributes = [])
|
||||
@ -242,34 +241,18 @@ class template
|
||||
'label' => '',
|
||||
'name' => $nameId,
|
||||
'placeholder' => '',
|
||||
'readonly' => false,
|
||||
'value' => '',
|
||||
'type' => 'date',
|
||||
'readonly' => true,
|
||||
'value' => ''
|
||||
], $attributes);
|
||||
// Traduction de l'aide et de l'étiquette
|
||||
$attributes['label'] = helper::translate($attributes['label']);
|
||||
$attributes['help'] = helper::translate($attributes['help']);
|
||||
//$attributes['placeholder'] = helper::translate($attributes['placeholder']);
|
||||
// Filtre selon le type
|
||||
switch ($attributes['type']) {
|
||||
case 'datetime-local':
|
||||
$filter = helper::FILTER_TIMESTAMP;
|
||||
break;
|
||||
case 'date':
|
||||
$filter = helper::FILTER_DATE; // Pour générer une valeur uniquement sur la date
|
||||
break;
|
||||
case 'time':
|
||||
$filter = helper::FILTER_TIME; // Pour générer une valeur uniquement sur l'heure
|
||||
break;
|
||||
default:
|
||||
$filter = null; // pas de filtre pour month and year
|
||||
break;
|
||||
}
|
||||
// Sauvegarde des données en cas d'erreur
|
||||
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||
} else {
|
||||
$attributes['value'] = ($attributes['value'] ? helper::filter($attributes['value'], $filter) : '');
|
||||
$attributes['value'] = ($attributes['value'] ? helper::filter($attributes['value'], helper::FILTER_TIMESTAMP) : '');
|
||||
}
|
||||
// Début du wrapper
|
||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||
@ -289,11 +272,15 @@ class template
|
||||
// Date visible
|
||||
$html .= '<div class="inputDateManagerWrapper">';
|
||||
$html .= sprintf(
|
||||
'<input type="' . $attributes['type'] . '" class="datepicker %s" value="%s" %s>',
|
||||
'<input type="text" class="datepicker %s" value="%s" %s>',
|
||||
$attributes['class'],
|
||||
$attributes['value'],
|
||||
helper::sprintAttributes($attributes, ['class', 'value'])
|
||||
);
|
||||
$html .= self::button($attributes['id'] . 'Delete', [
|
||||
'class' => 'inputDateDelete',
|
||||
'value' => self::ico('cancel')
|
||||
]);
|
||||
$html .= '</div>';
|
||||
// Fin du wrapper
|
||||
$html .= '</div>';
|
||||
@ -301,7 +288,6 @@ class template
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Crée un champ d'upload de fichier
|
||||
* @param string $nameId Nom et id du champ
|
||||
@ -325,7 +311,6 @@ class template
|
||||
'name' => $nameId,
|
||||
'type' => 2,
|
||||
'value' => '',
|
||||
'folder' => '',
|
||||
'language' => 'fr_FR'
|
||||
], $attributes);
|
||||
// Traduction de l'aide et de l'étiquette
|
||||
@ -362,21 +347,19 @@ class template
|
||||
$html .= sprintf(
|
||||
'<a
|
||||
href="' .
|
||||
helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php' .
|
||||
'?relative_url=1' .
|
||||
'&lang=' . $attributes['language'] .
|
||||
'&field_id=' . $attributes['id'] .
|
||||
'&type=' . $attributes['type'] .
|
||||
'&akey=' . md5_file(core::DATA_DIR . 'core.json') .
|
||||
// Ajoute le nom du dossier si la variable est passée
|
||||
(!empty($attributes['folder']) ? '&fldr=' . $attributes['folder'] : '') .
|
||||
($attributes['extensions'] ? '&extensions=' . $attributes['extensions'] : '')
|
||||
. '"
|
||||
helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php' .
|
||||
'?relative_url=1' .
|
||||
'&lang=' . $attributes['language'] .
|
||||
'&field_id=' . $attributes['id'] .
|
||||
'&type=' . $attributes['type'] .
|
||||
'&akey=' . md5_file(core::DATA_DIR . 'core.json') .
|
||||
($attributes['extensions'] ? '&extensions=' . $attributes['extensions'] : '')
|
||||
. '"
|
||||
class="inputFile %s %s"
|
||||
%s
|
||||
data-lity
|
||||
>
|
||||
' . self::ico('upload-cloud', ['margin' => 'right']) . '
|
||||
' . self::ico('upload', ['margin' => 'right']) . '
|
||||
<span class="inputFileLabel"></span>
|
||||
</a>',
|
||||
$attributes['class'],
|
||||
@ -415,7 +398,7 @@ class template
|
||||
$html = '<form id="' . $id . '" method="post">';
|
||||
// Stock le token CSRF
|
||||
$html .= self::hidden('csrf', [
|
||||
'value' => htmlentities($_SESSION['csrf'], ENT_QUOTES | ENT_HTML5, 'UTF-8')
|
||||
'value' => $_SESSION['csrf']
|
||||
]);
|
||||
// Retourne le html
|
||||
return $html;
|
||||
@ -485,12 +468,12 @@ class template
|
||||
'attr' => '',
|
||||
'help' => '',
|
||||
'id' => '',
|
||||
'alt' => '',
|
||||
], $attributes);
|
||||
// Traduction de l'aide
|
||||
$attributes['help'] = helper::translate($attributes['help']);
|
||||
// Contenu de l'icône
|
||||
$alt = $attributes['help'] ? $attributes['help'] : $ico;
|
||||
$item = $attributes['href'] ? '<a id="' . $attributes['id'] . '" data-tippy-content="' . $attributes['help'] . '" alt="' . $alt . '" href="' . $attributes['href'] . '" ' . $attributes['attr'] . ' >' : '';
|
||||
$item = $attributes['href'] ? '<a id="' . $attributes['id'] . '" data-tippy-content="' . $attributes['help'] . '" alt="' . $attributes['help'] . '" href="' . $attributes['href'] . '" ' . $attributes['attr'] . ' >' : '';
|
||||
$item .= '<span class="zwiico-' . $ico . ($attributes['margin'] ? ' zwiico-margin-' . $attributes['margin'] : '') . ($attributes['animate'] ? ' animate-spin' : '') . '" style="font-size:' . $attributes['fontSize'] . '"><!----></span>';
|
||||
$item .= ($attributes['href']) ? '</a>' : '';
|
||||
return $item;
|
||||
@ -512,8 +495,8 @@ class template
|
||||
$lang = $langId;
|
||||
break;
|
||||
case 'selected':
|
||||
if (isset($_SESSION['ZWII_SITE_CONTENT'])) {
|
||||
$lang = $_SESSION['ZWII_SITE_CONTENT'];
|
||||
if (isset($_COOKIE['ZWII_CONTENT'])) {
|
||||
$lang = $_COOKIE['ZWII_CONTENT'];
|
||||
} else {
|
||||
$lang = 'fr_FR';
|
||||
}
|
||||
@ -540,10 +523,8 @@ class template
|
||||
'for' => $for,
|
||||
'help' => ''
|
||||
], $attributes);
|
||||
// Traduction de l'aide et de l'étiquette
|
||||
$text = helper::translate($text);
|
||||
$attributes['help'] = helper::translate($attributes['help']);
|
||||
|
||||
// Traduction de l'étiquette si déjà appelée par une fonction de template
|
||||
;
|
||||
if (
|
||||
get_called_class() !== 'template'
|
||||
) {
|
||||
@ -704,16 +685,15 @@ class template
|
||||
'label' => '',
|
||||
'name' => $nameId,
|
||||
'selected' => '',
|
||||
'font' => [],
|
||||
'multiple' => ''
|
||||
'fonts' => []
|
||||
], $attributes);
|
||||
// Traduction de l'aide et de l'étiquette
|
||||
$attributes['label'] = helper::translate($attributes['label']);
|
||||
$attributes['help'] = helper::translate($attributes['help']);
|
||||
// Stocker les fontes et remettre à zéro le tableau des fontes transmis pour éviter une erreur de sprintAttributes
|
||||
if (empty($attributes['font']) === false) {
|
||||
$fonts = $attributes['font'];
|
||||
$attributes['font'] = [];
|
||||
if (empty($attributes['fonts']) === false) {
|
||||
$fonts = $attributes['fonts'];
|
||||
$attributes['fonts'] = [];
|
||||
}
|
||||
// Sauvegarde des données en cas d'erreur
|
||||
if ($attributes['before'] and array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||
@ -734,11 +714,6 @@ class template
|
||||
$attributes['class'] .= ' notice';
|
||||
}
|
||||
$html .= self::notice($attributes['id'], $notice);
|
||||
// Attribut multiple
|
||||
if ($attributes['multiple'] === true) {
|
||||
echo "ppp";
|
||||
$attributes['multiple'] = 'multiple';
|
||||
}
|
||||
// Début sélection
|
||||
$html .= sprintf(
|
||||
'<select %s>',
|
||||
@ -746,7 +721,7 @@ class template
|
||||
);
|
||||
foreach ($options as $value => $text) {
|
||||
// Select des liste de fontes
|
||||
$html .= isset($fonts) ? sprintf(
|
||||
$html .= isset($fonts) ? sprintf(
|
||||
'<option value="%s"%s style="font-family: %s;">%s</option>',
|
||||
$value,
|
||||
$attributes['selected'] == $value ? ' selected' : '', // Double == pour ignorer le type de variable car $_POST change les types en string
|
||||
@ -757,7 +732,7 @@ class template
|
||||
'<option value="%s"%s>%s</option>',
|
||||
$value,
|
||||
$attributes['selected'] == $value ? ' selected' : '', // Double == pour ignorer le type de variable car $_POST change les types en string
|
||||
helper::translate($text)
|
||||
$text
|
||||
);
|
||||
}
|
||||
// Fin sélection
|
||||
@ -768,7 +743,6 @@ class template
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Crée une bulle de dialogue
|
||||
* @param string $text Texte de la bulle
|
||||
@ -776,7 +750,7 @@ class template
|
||||
*/
|
||||
public static function speech($text)
|
||||
{
|
||||
return '<div class="speech"><div class="speechBubble">' . helper::translate($text) . '</div>' . template::ico('mimi speechMimi', ['fontSize' => '7em']) . '</div>';
|
||||
return '<div class="speech"><div class="speechBubble">' . $text . '</div>' . template::ico('mimi speechMimi', ['fontSize' => '7em']) . '</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -800,7 +774,7 @@ class template
|
||||
// Traduction de l'aide et de l'étiquette
|
||||
$attributes['value'] = helper::translate($attributes['value']);
|
||||
// Retourne le html
|
||||
return sprintf(
|
||||
return sprintf(
|
||||
'<button type="submit" class="%s%s" %s>%s</button>',
|
||||
$attributes['class'],
|
||||
$attributes['uniqueSubmission'] ? 'uniqueSubmission' : '',
|
||||
@ -828,7 +802,7 @@ class template
|
||||
], $attributes);
|
||||
// Traduction de l'aide et de l'étiquette
|
||||
foreach ($head as $value) {
|
||||
$head[array_search($value, $head)] = helper::translate($value);
|
||||
$head[array_search($value, $head)] = helper::translate($value);
|
||||
}
|
||||
// Début du wrapper
|
||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="tableWrapper ' . $attributes['classWrapper'] . '">';
|
||||
@ -895,8 +869,7 @@ class template
|
||||
'name' => $nameId,
|
||||
'placeholder' => '',
|
||||
'readonly' => false,
|
||||
'value' => '',
|
||||
'type' => 'text'
|
||||
'value' => ''
|
||||
], $attributes);
|
||||
// Traduction de l'aide et de l'étiquette
|
||||
$attributes['label'] = helper::translate($attributes['label']);
|
||||
@ -923,7 +896,7 @@ class template
|
||||
$html .= self::notice($attributes['id'], $notice);
|
||||
// Texte
|
||||
$html .= sprintf(
|
||||
'<input type="' . $attributes['type'] . '" %s>',
|
||||
'<input type="text" %s>',
|
||||
helper::sprintAttributes($attributes)
|
||||
);
|
||||
// Fin du wrapper
|
||||
|
547
core/core.js.php
547
core/core.js.php
File diff suppressed because one or more lines are too long
3025
core/core.php
3025
core/core.php
File diff suppressed because it is too large
Load Diff
@ -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>' );
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -3,11 +3,7 @@
|
||||
/**
|
||||
* Mises à jour suivant les versions de Zwii
|
||||
*/
|
||||
|
||||
// Pas d'installation depuis une version inférieur
|
||||
if (
|
||||
$this->getData(['core', 'dataVersion']) < 9227
|
||||
) {
|
||||
if ($this->getData(['core', 'dataVersion']) < 9227) {
|
||||
// Arrêt du script
|
||||
exit('ZwiiCMS version 12 est incompatible avec la base de données installée. L\'installation d\'une version intermédiaire 10 ou 11 est nécessaire.');
|
||||
}
|
||||
@ -18,19 +14,19 @@ if ($this->getData(['core', 'dataVersion']) < 10000) {
|
||||
|
||||
//----------------------------------------
|
||||
// Mettre à jour les données des galeries
|
||||
$hierarchy = array();
|
||||
foreach ($this->getHierarchy() as $parentKey => $parentValue) {
|
||||
$hierarchy[] = $parentKey;
|
||||
$pageList = array();
|
||||
foreach ($this->getHierarchy(null, null, null) as $parentKey => $parentValue) {
|
||||
$pageList[] = $parentKey;
|
||||
foreach ($parentValue as $childKey) {
|
||||
$hierarchy[] = $childKey;
|
||||
$pageList[] = $childKey;
|
||||
}
|
||||
}
|
||||
// Mise à jour des données pour la galerie v2
|
||||
foreach ($hierarchy as $parentKey => $parent) {
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
//La page a une galerie
|
||||
if ($this->getData(['page', $parent, 'moduleId']) === 'gallery') {
|
||||
// Parcourir les dossiers de la galerie
|
||||
$tempData = $this->getData(['module', $parent]);
|
||||
$tempData = $this->getData(['module', $parent]);
|
||||
$i = 1;
|
||||
foreach ($tempData as $galleryKey => $galleryItem) {
|
||||
// Ordre de tri des galeries
|
||||
@ -62,7 +58,7 @@ if ($this->getData(['core', 'dataVersion']) < 10000) {
|
||||
}
|
||||
}
|
||||
// Contrôle des options php.ini pour la mise à jour auto
|
||||
if (helper::getUrlContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version') === false) {
|
||||
if (helper::getUrlContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version') === false) {
|
||||
$this->setData(['config', 'autoUpdate', false]);
|
||||
}
|
||||
|
||||
@ -75,8 +71,7 @@ if ($this->getData(['core', 'dataVersion']) < 10092) {
|
||||
$dir = getcwd();
|
||||
chdir('core/vendor/fullpage');
|
||||
$files = glob('*');
|
||||
foreach ($files as $file)
|
||||
unlink($file);
|
||||
foreach ($files as $file) unlink($file);
|
||||
chdir($dir);
|
||||
rmdir('core/vendor/fullpage/');
|
||||
}
|
||||
@ -135,7 +130,7 @@ if ($this->getData(['core', 'dataVersion']) < 10200) {
|
||||
}
|
||||
// Créer les en-têtes du journal
|
||||
$d = 'Date;Heure;IP;Id;Action' . PHP_EOL;
|
||||
$this->secure_file_put_contents(self::DATA_DIR . 'journal.log', $d);
|
||||
file_put_contents(self::DATA_DIR . 'journal.log', $d);
|
||||
// Init préservation htaccess
|
||||
$this->setData(['config', 'autoUpdateHtaccess', false]);
|
||||
// Options de barre de membre simple
|
||||
@ -168,8 +163,7 @@ if ($this->getData(['core', 'dataVersion']) < 10300) {
|
||||
$dir = getcwd();
|
||||
chdir('core/module/search');
|
||||
$files = glob('*');
|
||||
foreach ($files as $file)
|
||||
unlink($file);
|
||||
foreach ($files as $file) unlink($file);
|
||||
chdir($dir);
|
||||
rmdir('core/module/search/');
|
||||
}
|
||||
@ -179,15 +173,16 @@ if ($this->getData(['core', 'dataVersion']) < 10300) {
|
||||
$this->setData(['config', 'searchPageId', '']);
|
||||
|
||||
// Mettre à jour les données des galeries
|
||||
$hierarchy = array(); foreach ($this->getHierarchy() as $parentKey => $parentValue) {
|
||||
$hierarchy[] = $parentKey;
|
||||
$pageList = array();
|
||||
foreach ($this->getHierarchy(null, null, null) as $parentKey => $parentValue) {
|
||||
$pageList[] = $parentKey;
|
||||
foreach ($parentValue as $childKey) {
|
||||
$hierarchy[] = $childKey;
|
||||
$pageList[] = $childKey;
|
||||
}
|
||||
}
|
||||
// Mise à jour des données de thème de la galerie
|
||||
// Les données de thème sont communes au site
|
||||
foreach ($hierarchy as $parentKey => $parent) {
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
//La page a une galerie
|
||||
if ($this->getData(['page', $parent, 'moduleId']) === 'gallery') {
|
||||
foreach ($this->getData(['module', $parent]) as $galleryKey => $galleryItem) {
|
||||
@ -239,15 +234,15 @@ if ($this->getData(['core', 'dataVersion']) < 10304) {
|
||||
// Version 10.3.06
|
||||
if ($this->getData(['core', 'dataVersion']) < 10306) {
|
||||
// Liste des pages
|
||||
$hierarchy = array();
|
||||
foreach ($this->getHierarchy() as $parentKey => $parentValue) {
|
||||
$hierarchy[] = $parentKey;
|
||||
$pageList = array();
|
||||
foreach ($this->getHierarchy(null, null, null) as $parentKey => $parentValue) {
|
||||
$pageList[] = $parentKey;
|
||||
foreach ($parentValue as $childKey) {
|
||||
$hierarchy[] = $childKey;
|
||||
$pageList[] = $childKey;
|
||||
}
|
||||
}
|
||||
// Mettre à jour les données des blogs les articles sont dans posts
|
||||
foreach ($hierarchy as $parentKey => $parent) {
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
//La page a un blog
|
||||
if ($this->getData(['page', $parent, 'moduleId']) === 'blog') {
|
||||
if (is_array($this->getData(['module', $parent]))) {
|
||||
@ -262,7 +257,7 @@ if ($this->getData(['core', 'dataVersion']) < 10306) {
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($hierarchy as $parentKey => $parent) {
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
//La page a une news
|
||||
if ($this->getData(['page', $parent, 'moduleId']) === 'news') {
|
||||
if (is_array($this->getData(['module', $parent]))) {
|
||||
@ -297,37 +292,37 @@ if ($this->getData(['core', 'dataVersion']) < 10400) {
|
||||
|
||||
// Ajouter les champs de blog v3
|
||||
// Liste des pages dans pageList
|
||||
$hierarchy = array();
|
||||
foreach ($this->getHierarchy() as $parentKey => $parentValue) {
|
||||
$hierarchy[] = $parentKey;
|
||||
$pageList = array();
|
||||
foreach ($this->getHierarchy(null, null, null) as $parentKey => $parentValue) {
|
||||
$pageList[] = $parentKey;
|
||||
foreach ($parentValue as $childKey) {
|
||||
$hierarchy[] = $childKey;
|
||||
$pageList[] = $childKey;
|
||||
}
|
||||
}
|
||||
// Parcourir pageList et rechercher les modules de blog
|
||||
|
||||
foreach ($hierarchy as $parentKey => $parent) {
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
//La page est un blog
|
||||
if ($this->getData(['page', $parent, 'moduleId']) === 'blog') {
|
||||
$articleIds = array_keys(helper::arrayColumn($this->getData(['module', $parent, 'posts']), 'publishedOn', 'SORT_DESC'));
|
||||
foreach ($articleIds as $key => $article) {
|
||||
// Droits les deux groupes
|
||||
$this->setData(['module', $parent, 'posts', $article, 'editConsent', 3]);
|
||||
$this->setData(['module', $parent, 'posts', $article, 'editConsent', 3]);
|
||||
// Limite de taille 500
|
||||
$this->setData(['module', $parent, 'posts', $article, 'commentMaxlength', '500']);
|
||||
$this->setData(['module', $parent, 'posts', $article, 'commentMaxlength', '500']);
|
||||
// Pas d'approbation des commentaires
|
||||
$this->setData(['module', $parent, 'posts', $article, 'commentApproved', false]);
|
||||
$this->setData(['module', $parent, 'posts', $article, 'commentApproved', false]);
|
||||
// pas de notification
|
||||
$this->setData(['module', $parent, 'posts', $article, 'commentNotification', false]);
|
||||
$this->setData(['module', $parent, 'posts', $article, 'commentNotification', false]);
|
||||
// groupe de notification
|
||||
$this->setData(['module', $parent, 'posts', $article, 'commentGroupNotification', 3]);
|
||||
$this->setData(['module', $parent, 'posts', $article, 'commentGroupNotification', 3]);
|
||||
}
|
||||
|
||||
// Traitement des commentaires
|
||||
if (is_array($this->getData(['module', $parent, 'posts', $article, 'comment']))) {
|
||||
foreach ($this->getData(['module', $parent, 'posts', $article, 'comment']) as $commentId => $comment) {
|
||||
if (is_array($this->getData(['module', $parent, 'posts', $article, 'comment']))) {
|
||||
foreach ($this->getData(['module', $parent, 'posts', $article, 'comment']) as $commentId => $comment) {
|
||||
// Approbation
|
||||
$this->setData(['module', $parent, 'posts', $article, 'comment', $commentId, 'approval', true]);
|
||||
$this->setData(['module', $parent, 'posts', $article, 'comment', $commentId, 'approval', true]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -388,15 +383,15 @@ if ($this->getData(['core', 'dataVersion']) < 10600) {
|
||||
// Mise à jour des données des modules autonomes
|
||||
|
||||
// Liste des pages dans pageList
|
||||
$hierarchy = array();
|
||||
foreach ($this->getHierarchy() as $parentKey => $parentValue) {
|
||||
$hierarchy[] = $parentKey;
|
||||
$pageList = array();
|
||||
foreach ($this->getHierarchy(null, null, null) as $parentKey => $parentValue) {
|
||||
$pageList[] = $parentKey;
|
||||
foreach ($parentValue as $childKey) {
|
||||
$hierarchy[] = $childKey;
|
||||
$pageList[] = $childKey;
|
||||
}
|
||||
}
|
||||
// Parcourir pageList et rechercher les modules au CSS autonomes
|
||||
foreach ($hierarchy as $parentKey => $parent) {
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
if (
|
||||
$this->getData(['page', $parent, 'moduleId']) === 'search'
|
||||
|| $this->getData(['page', $parent, 'moduleId']) === 'gallery'
|
||||
@ -435,8 +430,7 @@ if ($this->getData(['core', 'dataVersion']) < 11000) {
|
||||
$this->setData(['config', 'i18n', 'pt', 'none']);
|
||||
|
||||
// Supprimer les fichiers de backup
|
||||
if (file_exists('site/data/.backup'))
|
||||
unlink('site/data/.backup');
|
||||
if (file_exists('site/data/.backup')) unlink('site/data/.backup');
|
||||
$path = realpath('site/data');
|
||||
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename) {
|
||||
if (strpos($filename, 'backup.json')) {
|
||||
@ -446,20 +440,20 @@ if ($this->getData(['core', 'dataVersion']) < 11000) {
|
||||
|
||||
// Externaliser les contenus des pages
|
||||
// Liste des pages dans pageList
|
||||
$hierarchy = array();
|
||||
$pageList = array();
|
||||
// Creation du contenu de la page
|
||||
if (!is_dir(self::DATA_DIR . self::$siteContent . '/content')) {
|
||||
mkdir(self::DATA_DIR . self::$siteContent . '/content', 0755);
|
||||
if (!is_dir(self::DATA_DIR . self::$i18nContent . '/content')) {
|
||||
mkdir(self::DATA_DIR . self::$i18nContent . '/content', 0755);
|
||||
}
|
||||
foreach ($this->getHierarchy() as $parentKey => $parentValue) {
|
||||
$hierarchy[] = $parentKey;
|
||||
foreach ($this->getHierarchy(null, null, null) as $parentKey => $parentValue) {
|
||||
$pageList[] = $parentKey;
|
||||
foreach ($parentValue as $childKey) {
|
||||
$hierarchy[] = $childKey;
|
||||
$pageList[] = $childKey;
|
||||
}
|
||||
}
|
||||
foreach ($hierarchy as $parentKey => $parent) {
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
$content = $this->getData(['page', $parent, 'content']);
|
||||
//$this->secure_file_put_contents(self::DATA_DIR . self::$siteContent . '/content/' . $parent . '.html', $content);
|
||||
//file_put_contents(self::DATA_DIR . self::$i18nContent . '/content/' . $parent . '.html', $content);
|
||||
$this->setPage($parent, $content, 'fr');
|
||||
$this->setData(['page', $parent, 'content', $parent . '.html']);
|
||||
}
|
||||
@ -509,13 +503,13 @@ if ($this->getData(['core', 'dataVersion']) < 11200) {
|
||||
$this->setData(['config', 'connect', 'captchaType', 'alpha']);
|
||||
|
||||
// Ajout de la variable shortTitle basée sur Title
|
||||
foreach ($this->getHierarchy() as $parentKey => $parentValue) {
|
||||
$hierarchy[] = $parentKey;
|
||||
foreach ($this->getHierarchy(null, null, null) as $parentKey => $parentValue) {
|
||||
$pageList[] = $parentKey;
|
||||
foreach ($parentValue as $childKey) {
|
||||
$hierarchy[] = $childKey;
|
||||
$pageList[] = $childKey;
|
||||
}
|
||||
}
|
||||
foreach ($hierarchy as $parentKey => $parent) {
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
$this->setData(['page', $parent, 'shortTitle', $this->getData(['page', $parent, 'title'])]);
|
||||
}
|
||||
|
||||
@ -527,7 +521,7 @@ if ($this->getData(['core', 'dataVersion']) < 11200) {
|
||||
// Option des cookies dans le footer
|
||||
$this->setData(['theme', 'footer', 'displayCookie', false]);
|
||||
|
||||
// Acceptation et Paramètres des cookies RGPD
|
||||
// Acceptation et paramétres des cookies RGPD
|
||||
$this->setData(['locale', 'cookies', 'cookiesZwiiText', '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.']);
|
||||
$this->setData(['locale', 'cookies', 'cookiesTitleText', 'Gérer les cookies']);
|
||||
$this->setData(['locale', 'cookies', 'cookiesLinkMlText', 'Consulter les mentions légales']);
|
||||
@ -547,10 +541,10 @@ if ($this->getData(['core', 'dataVersion']) < 11200) {
|
||||
if ($this->getData(['core', 'dataVersion']) < 11202) {
|
||||
|
||||
// Renommer les champs
|
||||
$this->setData(['locale', 'cookies', 'mainLabel', $this->getData(['locale', 'cookies', 'cookiesZwiiText'])]);
|
||||
$this->setData(['locale', 'cookies', 'gaLabel', $this->getData(['locale', 'cookies', 'cookiesGaText'])]);
|
||||
$this->setData(['locale', 'cookies', 'titleLabel', $this->getData(['locale', 'cookies', 'cookiesTitleText'])]);
|
||||
$this->setData(['locale', 'cookies', 'linkLegalLabel', $this->getData(['locale', 'cookies', 'cookiesLinkMlText'])]);
|
||||
$this->setData(['locale', 'cookies', 'mainLabel', $this->getData(['locale', 'cookies', 'cookiesZwiiText'])]);
|
||||
$this->setData(['locale', 'cookies', 'gaLabel', $this->getData(['locale', 'cookies', 'cookiesGaText'])]);
|
||||
$this->setData(['locale', 'cookies', 'titleLabel', $this->getData(['locale', 'cookies', 'cookiesTitleText'])]);
|
||||
$this->setData(['locale', 'cookies', 'linkLegalLabel', $this->getData(['locale', 'cookies', 'cookiesLinkMlText'])]);
|
||||
$this->setData(['locale', 'cookies', 'checkboxGaLabel', $this->getData(['locale', 'cookies', 'cookiesCheckboxGaText'])]);
|
||||
$this->setData(['locale', 'cookies', 'buttonValidLabel', $this->getData(['locale', 'cookies', 'cookiesButtonText'])]);
|
||||
// Effacer les anciens champs
|
||||
@ -573,26 +567,26 @@ if ($this->getData(['core', 'dataVersion']) < 11203) {
|
||||
$c3 = 0;
|
||||
$success = false;
|
||||
// Boucler sur les pages
|
||||
foreach ($this->getHierarchy() as $parentId => $childIds) {
|
||||
$content = $this->getPage($parentId, self::$siteContent);
|
||||
foreach ($this->getHierarchy(null, null, null) as $parentId => $childIds) {
|
||||
$content = $this->getPage($parentId, self::$i18nContent);
|
||||
$titre = $this->getData(['page', $parentId, 'title']);
|
||||
$content = $titre . ' ' . $content;
|
||||
$content = $titre . ' ' . $content;
|
||||
$replace = str_replace('href="' . $old, 'href="' . $new, stripslashes($content), $c1);
|
||||
$replace = str_replace('src="' . $old, 'src="' . $new, stripslashes($replace), $c2);
|
||||
|
||||
if ($c1 > 0 || $c2 > 0) {
|
||||
$success = true;
|
||||
$this->setPage($parentId, $replace, self::$siteContent);
|
||||
$this->setPage($parentId, $replace, self::$i18nContent);
|
||||
$c3 += $c1 + $c2;
|
||||
}
|
||||
foreach ($childIds as $childId) {
|
||||
$content = $this->getPage($childId, self::$siteContent);
|
||||
$content = $titre . ' ' . $content;
|
||||
$content = $this->getPage($childId, self::$i18nContent);
|
||||
$content = $titre . ' ' . $content;
|
||||
$replace = str_replace('href="' . $old, 'href="' . $new, stripslashes($content), $c1);
|
||||
$replace = str_replace('src="' . $old, 'src="' . $new, stripslashes($replace), $c2);
|
||||
if ($c1 > 0 || $c2 > 0) {
|
||||
$success = true;
|
||||
$this->setPage($childId, $replace, self::$siteContent);
|
||||
$this->setPage($childId, $replace, self::$i18nContent);
|
||||
$c3 += $c1 + $c2;
|
||||
}
|
||||
}
|
||||
@ -652,11 +646,11 @@ if ($this->getData(['core', 'dataVersion']) < 11300) {
|
||||
|
||||
$this->setData(['theme', 'footer', 'font', $fonts[$this->getData(['theme', 'footer', 'font'])]]);
|
||||
$this->setData(['theme', 'header', 'font', $fonts[$this->getData(['theme', 'header', 'font'])]]);
|
||||
$this->setData(['theme', 'menu', 'font', $fonts[$this->getData(['theme', 'menu', 'font'])]]);
|
||||
$this->setData(['theme', 'text', 'font', $fonts[$this->getData(['theme', 'text', 'font'])]]);
|
||||
$this->setData(['theme', 'title', 'font', $fonts[$this->getData(['theme', 'title', 'font'])]]);
|
||||
$this->setData(['admin', 'fontTitle', $fonts[$this->getData(['admin', 'fontTitle'])]]);
|
||||
$this->setData(['admin', 'fontText', $fonts[$this->getData(['admin', 'fontText'])]]);
|
||||
$this->setData(['theme', 'menu', 'font', $fonts[$this->getData(['theme', 'menu', 'font'])]]);
|
||||
$this->setData(['theme', 'text', 'font', $fonts[$this->getData(['theme', 'text', 'font'])]]);
|
||||
$this->setData(['theme', 'title', 'font', $fonts[$this->getData(['theme', 'title', 'font'])]]);
|
||||
$this->setData(['admin', 'fontTitle', $fonts[$this->getData(['admin', 'fontTitle'])]]);
|
||||
$this->setData(['admin', 'fontText', $fonts[$this->getData(['admin', 'fontText'])]]);
|
||||
|
||||
unlink(self::DATA_DIR . 'admin.css');
|
||||
unlink(self::DATA_DIR . 'theme.css');
|
||||
@ -669,13 +663,13 @@ if ($this->getData(['core', 'dataVersion']) < 11300) {
|
||||
if ($this->getData(['core', 'dataVersion']) < 11303) {
|
||||
|
||||
// Ajout de la variable shortTitle basée sur Title
|
||||
foreach ($this->getHierarchy() as $parentKey => $parentValue) {
|
||||
$hierarchy[] = $parentKey;
|
||||
foreach ($this->getHierarchy(null, null, null) as $parentKey => $parentValue) {
|
||||
$pageList[] = $parentKey;
|
||||
foreach ($parentValue as $childKey) {
|
||||
$hierarchy[] = $childKey;
|
||||
$pageList[] = $childKey;
|
||||
}
|
||||
}
|
||||
foreach ($hierarchy as $parentKey => $parent) {
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
$this->setData(['page', $parent, 'extraPosition', false]);
|
||||
}
|
||||
|
||||
@ -688,10 +682,10 @@ if ($this->getData(['core', 'dataVersion']) < 11303) {
|
||||
if ($this->getData(['core', 'dataVersion']) < 11306) {
|
||||
|
||||
// Supprime les fontes déclarées en double par la version précédentes
|
||||
$files = $this->getData(['font', 'files']);
|
||||
$files = $this->getData(['fonts', 'files']);
|
||||
foreach ($files as $fontId => $fontFile) {
|
||||
if (!is_null($this->getData(['font', 'imported', $fontId]))) {
|
||||
$this->deleteData(['font', 'imported', $fontId]);
|
||||
if (!is_null($this->getData(['fonts', 'imported', $fontId]))) {
|
||||
$this->deleteData(['fonts', 'imported', $fontId]);
|
||||
}
|
||||
}
|
||||
// Mise à jour
|
||||
@ -703,7 +697,7 @@ if ($this->getData(['core', 'dataVersion']) < 11400) {
|
||||
|
||||
// Effacer le dossier
|
||||
if (is_dir('core/module/addon')) {
|
||||
$this->deleteDir('core/module/addon');
|
||||
$this->removeDir('core/module/addon');
|
||||
}
|
||||
|
||||
|
||||
@ -720,12 +714,12 @@ if ($this->getData(['core', 'dataVersion']) < 11400) {
|
||||
],
|
||||
'droid-sans-2' => [
|
||||
'name' => 'Droid Sans',
|
||||
'font-family' => '\'Droid Sans\', sans-serif',
|
||||
'font-family' => '\'Droid Sans\', sans-serif',
|
||||
'resource' => 'https://fonts.cdnfonts.com/css/droid-sans-2'
|
||||
],
|
||||
'droid-serif-2' => [
|
||||
'name' => 'Droid Serif',
|
||||
'font-family' => '\'Droid Serif\', serif',
|
||||
'font-family' => '\'Droid Serif\', serif',
|
||||
'resource' => 'https://fonts.cdnfonts.com/css/droid-serif-2'
|
||||
],
|
||||
'indie-flower' => [
|
||||
@ -801,51 +795,39 @@ if ($this->getData(['core', 'dataVersion']) < 11400) {
|
||||
];
|
||||
|
||||
// Conversion des fontes locales
|
||||
|
||||
$files = $this->getData(['font', 'files']);
|
||||
|
||||
$files = $this->getData(['fonts', 'files']);
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $fontId => $fontName) {
|
||||
if (
|
||||
gettype($fontName) === 'string'
|
||||
&& file_exists(self::DATA_DIR . 'fonts/' . $fontName)
|
||||
) {
|
||||
$this->setData([
|
||||
'font',
|
||||
'files',
|
||||
$fontId,
|
||||
[
|
||||
'name' => ucfirst($fontId),
|
||||
'font-family' => '\'' . ucfirst($fontId) . '\', sans-serif',
|
||||
'resource' => $fontName
|
||||
]
|
||||
]);
|
||||
$this->setData(['fonts', 'files', $fontId, [
|
||||
'name' => ucfirst($fontId),
|
||||
'font-family' => '\'' . ucfirst($fontId) . '\', sans-serif',
|
||||
'resource' => $fontName
|
||||
]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Consersion des fontes importées
|
||||
$imported = $this->getData(['font', 'imported']);
|
||||
$imported = $this->getData(['fonts', 'imported']);
|
||||
if (is_array($imported)) {
|
||||
foreach ($imported as $fontId => $fontUrl) {
|
||||
if (gettype($fontUrl) === 'string') {
|
||||
$this->setData([
|
||||
'font',
|
||||
'imported',
|
||||
$fontId,
|
||||
[
|
||||
'name' => ucfirst($fontId),
|
||||
'font-family' => '\'' . ucfirst($fontId) . '\', sans-serif',
|
||||
'resource' => 'https:\\fonts.cdnfonts.com\css' . $fontUrl
|
||||
]
|
||||
]);
|
||||
$this->setData(['fonts', 'imported', $fontId, [
|
||||
'name' => ucfirst($fontId),
|
||||
'font-family' => '\'' . ucfirst($fontId) . '\', sans-serif',
|
||||
'resource' => 'https:\\fonts.cdnfonts.com\css' . $fontUrl
|
||||
]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Importation des fontes exemples
|
||||
$template = $fonts;
|
||||
foreach ($template as $fontId => $fontValue) {
|
||||
$this->setData(['font', 'imported', $fontId, $fontValue]);
|
||||
$this->setData(['fonts', 'imported', $fontId, $fontValue]);
|
||||
}
|
||||
|
||||
// Redirection des pages d'administration vers la bannière de connexion
|
||||
@ -897,16 +879,16 @@ if ($this->getData(['core', 'dataVersion']) < 12000) {
|
||||
helper::deleteCookie('ZWII_CONTENTSCRIPT');
|
||||
|
||||
// Nettoyage de fichiers inutiles
|
||||
if (file_exists('core/module/user/view/import/import.help.html')) {
|
||||
unlink('core/module/user/view/import/import.help.html');
|
||||
if (file_exists('core\module\user\view\import\import.help.html')) {
|
||||
unlink('core\module\user\view\import\import.help.html');
|
||||
}
|
||||
|
||||
// Supprimer les fichier associés
|
||||
if (is_dir('core/module/translate/ressource')) {
|
||||
$this->deleteDir('core/module/translate/ressource');
|
||||
$this->removeDir('core/module/translate/ressource');
|
||||
}
|
||||
if (is_dir('core/vendor/i18n/css')) {
|
||||
$this->deleteDir('core/vendor/i18n/css');
|
||||
$this->removeDir('core/vendor/i18n/css');
|
||||
}
|
||||
if (file_exists('core/vendor/i18n/inc.json')) {
|
||||
unlink('core/vendor/i18n/inc.json');
|
||||
@ -919,7 +901,7 @@ if ($this->getData(['core', 'dataVersion']) < 12000) {
|
||||
}
|
||||
// Copier les fichiers de l'interface
|
||||
if (!is_dir(self::I18N_DIR)) {
|
||||
// Créer le dossier
|
||||
// Créer le d$ossier
|
||||
$this->copyDir('core/module/install/ressource/i18n', self::I18N_DIR);
|
||||
}
|
||||
// Langue de l'interface
|
||||
@ -932,187 +914,3 @@ if ($this->getData(['core', 'dataVersion']) < 12000) {
|
||||
// Mise à jour
|
||||
$this->setData(['core', 'dataVersion', 12000]);
|
||||
}
|
||||
|
||||
// Version 12.3.01
|
||||
if ($this->getData(['core', 'dataVersion']) < 12301) {
|
||||
// Valeur par défaut du délai de recherche de mise à jour en ligne
|
||||
$this->setData(['config', 'autoUpdateDelay', 86400]);
|
||||
|
||||
|
||||
// Nettoyage de flatPickr
|
||||
if (is_dir('core/vendor/flatpickr')) {
|
||||
$this->deleteDir('core/vendor/flatpickr');
|
||||
}
|
||||
|
||||
// email reply
|
||||
$this->deleteData(['config', 'smtp', 'sender']);
|
||||
$this->setData(['config', 'smtp', 'from', 'no-reply@' . str_replace('www.', '', $_SERVER['HTTP_HOST'])]);
|
||||
|
||||
// Mise à jour
|
||||
$this->setData(['core', 'dataVersion', 12301]);
|
||||
}
|
||||
|
||||
// Version 12.3.08
|
||||
if ($this->getData(['core', 'dataVersion']) < 12308) {
|
||||
|
||||
// Langue par défaut
|
||||
$l = [
|
||||
'fr_FR' => 'Français',
|
||||
'en_EN' => 'English',
|
||||
'es' => 'Español',
|
||||
];
|
||||
foreach ($l as $key => $value) {
|
||||
if (is_dir(self::DATA_DIR . $key)) {
|
||||
touch(self::DATA_DIR . $key . '/.default');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Mise à jour
|
||||
$this->setData(['core', 'dataVersion', 12308]);
|
||||
}
|
||||
|
||||
// Version 12.3.09
|
||||
if ($this->getData(['core', 'dataVersion']) < 12309) {
|
||||
|
||||
// Mettre à jour les locales
|
||||
foreach (self::$languages as $key => $value) {
|
||||
// tableau des langues installées
|
||||
if (is_dir(self::DATA_DIR . $key)) {
|
||||
$d = json_decode(file_get_contents(self::DATA_DIR . $key . '/locale.json'), true);
|
||||
$d = array_merge($d['locale'], ['poweredPageLabel' => 'Motorisé par']);
|
||||
$t['locale'] = $d;
|
||||
$this->secure_file_put_contents(self::DATA_DIR . $key . '/locale.json', $t);
|
||||
}
|
||||
}
|
||||
|
||||
// Mise à jour
|
||||
$this->setData(['core', 'dataVersion', 12309]);
|
||||
}
|
||||
|
||||
// Version 13.0.00
|
||||
if ($this->getData(['core', 'dataVersion']) < 13000) {
|
||||
|
||||
// Nettoyage du dossier de langue d'installation'
|
||||
if (file_exists('core/vendor/tinymce/langs/langs.zip'))
|
||||
unlink('core/vendor/tinymce/langs/langs.zip');
|
||||
if (file_exists('core/module/install/ressource/i18n/de.json'))
|
||||
unlink('core/module/install/ressource/i18n/de.json');
|
||||
if (file_exists('core/module/install/ressource/i18n/it.json'))
|
||||
unlink('core/module/install/ressource/i18n/it.json');
|
||||
if (file_exists('core/module/install/ressource/i18n/pt_PT.json'))
|
||||
unlink('core/module/install/ressource/i18n/pt_PT.json');
|
||||
if (file_exists('core/module/install/ressource/i18n/gr_GR.json'))
|
||||
unlink('core/module/install/ressource/i18n/gr_GR.json');
|
||||
|
||||
// Création du dossier partage pour les nouveaux droits
|
||||
if (!is_dir(self::FILE_DIR . 'source/partage')) {
|
||||
mkdir(self::FILE_DIR . 'source/partage');
|
||||
}
|
||||
|
||||
// Efface le dossier translate
|
||||
if (is_dir('core/module/translate')) {
|
||||
$this->deleteDir('core/module/translate');
|
||||
}
|
||||
|
||||
// Renomme le fichier et le dossier des fontes
|
||||
if (file_exists(self::DATA_DIR . 'fonts/fonts.html')) {
|
||||
rename(self::DATA_DIR . 'fonts/fonts.html', self::DATA_DIR . 'fonts/font.html');
|
||||
}
|
||||
if (is_dir(self::DATA_DIR . 'fonts')) {
|
||||
rename(self::DATA_DIR . 'fonts', self::DATA_DIR . 'font');
|
||||
}
|
||||
|
||||
|
||||
// Ajouter le prénom comme pseudo et le pseudo comme signature
|
||||
foreach ($this->getData(['user']) as $userId => $userIds) {
|
||||
switch ($this->getData(['user', $userId, 'group'])) {
|
||||
case '1':
|
||||
case '2':
|
||||
$this->setData(['user', $userId, 'profil', 1]);
|
||||
break;
|
||||
default:
|
||||
$this->setData(['user', $userId, 'profil', 0]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Récupérer la liste de toutes les pages dans toutes langues
|
||||
$hierarchy = array();
|
||||
$languages = array();
|
||||
// Tableau des langues non installées
|
||||
foreach (self::$languages as $key => $value) {
|
||||
if (is_dir(self::DATA_DIR . $key))
|
||||
$languages[] = $key;
|
||||
foreach ($this->getHierarchy() as $parentKey => $parentValue) {
|
||||
$hierarchy[] = $parentKey;
|
||||
foreach ($parentValue as $childKey) {
|
||||
$hierarchy[] = $childKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mise à jour des pages, le profil est mis à 0 pour les groupes sans profil et 1 pour es groupes avec profil
|
||||
$currentlanguage = self::$siteContent;
|
||||
foreach ($languages as $langId) {
|
||||
|
||||
foreach ($hierarchy as $parentKey => $parent) {
|
||||
switch ($this->getData(['page', $parent, 'group'])) {
|
||||
case 1:
|
||||
case 2:
|
||||
$this->setData(['page', $parent, 'profil', 1]);
|
||||
break;
|
||||
default:
|
||||
$this->setData(['page', $parent, 'profil', 0]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$_SESSION['ZWII_SITE_CONTENT'] = $currentlanguage;
|
||||
|
||||
// Supprime la clé OpenOgraph
|
||||
$this->deleteData(['config', 'seo', 'keyApi']);
|
||||
|
||||
// Mise à jour
|
||||
$this->setData(['core', 'dataVersion', 13000]);
|
||||
}
|
||||
|
||||
// Version 13.0.05
|
||||
if ($this->getData(['core', 'dataVersion']) < 13005) {
|
||||
|
||||
if (is_dir('core/module/plugin/view/dataImport')) {
|
||||
$this->deleteDir('core/module/plugin/view/dataImport');
|
||||
}
|
||||
if (file_exists('core/module/plugin/view/index/index.js.php')) {
|
||||
unlink('core/module/plugin/view/index/index.js.php');
|
||||
}
|
||||
|
||||
// Installe l'adresse d'envoi si non spécifiée
|
||||
if (empty($this->getData(['config', 'smtp', 'from']))) {
|
||||
$this->setData(['config', 'smtp', 'from', 'no-reply@localhost']);
|
||||
}
|
||||
|
||||
// Fixe la taille de l'administration identique à la taille de site
|
||||
$size = $this->getData(['theme', 'site', 'width']);
|
||||
$this->setData(['admin', 'width', $size]);
|
||||
|
||||
// Ancienne déclaration oubliée !!
|
||||
if ($this->getData(['admin', 'backgroundColorButtonHelp']) === null) {
|
||||
$this->setData(['admin', 'backgroundColorButtonHelp', 'rgba(255, 153, 0, 1)']);
|
||||
}
|
||||
|
||||
// Mise à jour
|
||||
$this->setData(['core', 'dataVersion', 13005]);
|
||||
}
|
||||
|
||||
// Version 13.1.01
|
||||
if ($this->getData(['core', 'dataVersion']) < 13101) {
|
||||
|
||||
// Supprime le choix du thème à l'installation
|
||||
if (is_dir('core/module/install/ressource/themes')) {
|
||||
$this->deleteDir('core/module/install/ressource/themes') ;
|
||||
}
|
||||
|
||||
// Mise à jour
|
||||
$this->setData(['core', 'dataVersion', 13101]);
|
||||
}
|
@ -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/
|
||||
*/
|
||||
|
||||
|
@ -1,27 +1,22 @@
|
||||
<!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::$i18nContent;?>">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="content-type" content="text/html;">
|
||||
<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>
|
||||
<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
@ -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 {
|
||||
|
@ -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::$i18nContent;?>">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="content-type" content="text/html;">
|
||||
<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>
|
@ -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;">
|
||||
<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">
|
||||
|
@ -1,217 +1,196 @@
|
||||
<!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::$i18nContent;?>">
|
||||
<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(); ?>
|
||||
<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'); ?>">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="content-type" content="text/html;">
|
||||
<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>
|
||||
<!-- 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(); ?>
|
||||
<!-- Script perso dans le header -->
|
||||
<?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;?>
|
||||
|
||||
<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->isConnected() === true
|
||||
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"> </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>
|
||||
<!-- Notifications -->
|
||||
<?php $this->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>
|
||||
<div id="menu" class="container">
|
||||
<?php $layout->showMenu(); ?>
|
||||
</div>
|
||||
<?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 $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 id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
|
||||
<?php else: ?>
|
||||
<span id="themeHeaderTitle"> </span>
|
||||
<span id="themeHeaderTitle"> </span>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<div id="featureContent">
|
||||
<?php echo $this->getData(['theme', 'header', 'featureContent']); ?>
|
||||
</diV>
|
||||
<?php echo $this->getData(['theme','header','featureContent']);?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php echo ($this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '</a>' : '';?>
|
||||
</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; ?>>
|
||||
<!-- 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 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 $this->showMenu(); ?></div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<!-- Corps de page -->
|
||||
<?php $layout->showMain(); ?>
|
||||
<!-- footer -->
|
||||
<?php $layout->showFooter(); ?>
|
||||
|
||||
<!-- 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 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 $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 id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
|
||||
<?php else: ?>
|
||||
<span id="themeHeaderTitle"> </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 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 $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>' : ''; ?>
|
||||
<?php echo $this->getData(['theme', 'footer', 'position']) === 'site'? '</div>' : '';?>
|
||||
|
||||
<!-- Lien remonter en haut -->
|
||||
<div id="backToTop">
|
||||
<?php echo template::ico('up'); ?>
|
||||
</div>
|
||||
<div id="backToTop"><?php echo template::ico('up'); ?></div>
|
||||
<!-- Affichage du consentement aux cookies-->
|
||||
<?php $layout->showCookies(); ?>
|
||||
<?php $this->showCookies(); ?>
|
||||
<!-- Les scripts -->
|
||||
<?php $layout->showScript(); ?>
|
||||
<?php $this->showScript();?>
|
||||
<!-- Script perso dans body -->
|
||||
<?php if (file_exists(self::DATA_DIR . 'body.inc.html')) {
|
||||
include(self::DATA_DIR . 'body.inc.html');
|
||||
} ?>
|
||||
</body>
|
||||
|
||||
include(self::DATA_DIR . 'body.inc.html');
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
@ -9,8 +9,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/
|
||||
*/
|
||||
|
||||
@ -22,7 +22,7 @@ class config extends common
|
||||
'copyBackups' => self::GROUP_ADMIN,
|
||||
'delBackups' => self::GROUP_ADMIN,
|
||||
'configMetaImage' => self::GROUP_ADMIN,
|
||||
'sitemap' => self::GROUP_ADMIN,
|
||||
'siteMap' => self::GROUP_ADMIN,
|
||||
'index' => self::GROUP_ADMIN,
|
||||
'restore' => self::GROUP_ADMIN,
|
||||
'updateBaseUrl' => self::GROUP_ADMIN,
|
||||
@ -30,124 +30,123 @@ class config extends common
|
||||
'logReset' => self::GROUP_ADMIN,
|
||||
'logDownload' => self::GROUP_ADMIN,
|
||||
'blacklistReset' => self::GROUP_ADMIN,
|
||||
'blacklistDownload' => self::GROUP_ADMIN,
|
||||
'register' => self::GROUP_ADMIN,
|
||||
'blacklistDownload' => self::GROUP_ADMIN
|
||||
];
|
||||
|
||||
public static $timezones = [
|
||||
'Pacific/Midway' => '(GMT-11:00) Midway Island',
|
||||
'US/Samoa' => '(GMT-11:00) Samoa',
|
||||
'US/Hawaii' => '(GMT-10:00) Hawaii',
|
||||
'US/Alaska' => '(GMT-09:00) Alaska',
|
||||
'US/Pacific' => '(GMT-08:00) Pacific Time (US & Canada)',
|
||||
'America/Tijuana' => '(GMT-08:00) Tijuana',
|
||||
'US/Arizona' => '(GMT-07:00) Arizona',
|
||||
'US/Mountain' => '(GMT-07:00) Mountain Time (US & Canada)',
|
||||
'America/Chihuahua' => '(GMT-07:00) Chihuahua',
|
||||
'America/Mazatlan' => '(GMT-07:00) Mazatlan',
|
||||
'America/Mexico_City' => '(GMT-06:00) Mexico City',
|
||||
'America/Monterrey' => '(GMT-06:00) Monterrey',
|
||||
'Canada/Saskatchewan' => '(GMT-06:00) Saskatchewan',
|
||||
'US/Central' => '(GMT-06:00) Central Time (US & Canada)',
|
||||
'US/Eastern' => '(GMT-05:00) Eastern Time (US & Canada)',
|
||||
'US/East-Indiana' => '(GMT-05:00) Indiana (East)',
|
||||
'America/Bogota' => '(GMT-05:00) Bogota',
|
||||
'America/Lima' => '(GMT-05:00) Lima',
|
||||
'America/Caracas' => '(GMT-04:30) Caracas',
|
||||
'Canada/Atlantic' => '(GMT-04:00) Atlantic Time (Canada)',
|
||||
'America/La_Paz' => '(GMT-04:00) La Paz',
|
||||
'America/Santiago' => '(GMT-04:00) Santiago',
|
||||
'Canada/Newfoundland' => '(GMT-03:30) Newfoundland',
|
||||
'America/Buenos_Aires' => '(GMT-03:00) Buenos Aires',
|
||||
'Greenland' => '(GMT-03:00) Greenland',
|
||||
'Atlantic/Stanley' => '(GMT-02:00) Stanley',
|
||||
'Atlantic/Azores' => '(GMT-01:00) Azores',
|
||||
'Atlantic/Cape_Verde' => '(GMT-01:00) Cape Verde Is.',
|
||||
'Africa/Casablanca' => '(GMT) Casablanca',
|
||||
'Europe/Dublin' => '(GMT) Dublin',
|
||||
'Europe/Lisbon' => '(GMT) Lisbon',
|
||||
'Europe/London' => '(GMT) London',
|
||||
'Africa/Monrovia' => '(GMT) Monrovia',
|
||||
'Europe/Amsterdam' => '(GMT+01:00) Amsterdam',
|
||||
'Europe/Belgrade' => '(GMT+01:00) Belgrade',
|
||||
'Europe/Berlin' => '(GMT+01:00) Berlin',
|
||||
'Europe/Bratislava' => '(GMT+01:00) Bratislava',
|
||||
'Europe/Brussels' => '(GMT+01:00) Brussels',
|
||||
'Europe/Budapest' => '(GMT+01:00) Budapest',
|
||||
'Europe/Copenhagen' => '(GMT+01:00) Copenhagen',
|
||||
'Europe/Ljubljana' => '(GMT+01:00) Ljubljana',
|
||||
'Europe/Madrid' => '(GMT+01:00) Madrid',
|
||||
'Europe/Paris' => '(GMT+01:00) Paris',
|
||||
'Europe/Prague' => '(GMT+01:00) Prague',
|
||||
'Europe/Rome' => '(GMT+01:00) Rome',
|
||||
'Europe/Sarajevo' => '(GMT+01:00) Sarajevo',
|
||||
'Europe/Skopje' => '(GMT+01:00) Skopje',
|
||||
'Europe/Stockholm' => '(GMT+01:00) Stockholm',
|
||||
'Europe/Vienna' => '(GMT+01:00) Vienna',
|
||||
'Europe/Warsaw' => '(GMT+01:00) Warsaw',
|
||||
'Europe/Zagreb' => '(GMT+01:00) Zagreb',
|
||||
'Europe/Athens' => '(GMT+02:00) Athens',
|
||||
'Europe/Bucharest' => '(GMT+02:00) Bucharest',
|
||||
'Africa/Cairo' => '(GMT+02:00) Cairo',
|
||||
'Africa/Harare' => '(GMT+02:00) Harare',
|
||||
'Europe/Helsinki' => '(GMT+02:00) Helsinki',
|
||||
'Europe/Istanbul' => '(GMT+02:00) Istanbul',
|
||||
'Asia/Jerusalem' => '(GMT+02:00) Jerusalem',
|
||||
'Europe/Kiev' => '(GMT+02:00) Kyiv',
|
||||
'Europe/Minsk' => '(GMT+02:00) Minsk',
|
||||
'Europe/Riga' => '(GMT+02:00) Riga',
|
||||
'Europe/Sofia' => '(GMT+02:00) Sofia',
|
||||
'Europe/Tallinn' => '(GMT+02:00) Tallinn',
|
||||
'Europe/Vilnius' => '(GMT+02:00) Vilnius',
|
||||
'Asia/Baghdad' => '(GMT+03:00) Baghdad',
|
||||
'Asia/Kuwait' => '(GMT+03:00) Kuwait',
|
||||
'Europe/Moscow' => '(GMT+03:00) Moscow',
|
||||
'Africa/Nairobi' => '(GMT+03:00) Nairobi',
|
||||
'Asia/Riyadh' => '(GMT+03:00) Riyadh',
|
||||
'Europe/Volgograd' => '(GMT+03:00) Volgograd',
|
||||
'Asia/Tehran' => '(GMT+03:30) Tehran',
|
||||
'Asia/Baku' => '(GMT+04:00) Baku',
|
||||
'Asia/Muscat' => '(GMT+04:00) Muscat',
|
||||
'Asia/Tbilisi' => '(GMT+04:00) Tbilisi',
|
||||
'Asia/Yerevan' => '(GMT+04:00) Yerevan',
|
||||
'Asia/Kabul' => '(GMT+04:30) Kabul',
|
||||
'Asia/Yekaterinburg' => '(GMT+05:00) Ekaterinburg',
|
||||
'Asia/Karachi' => '(GMT+05:00) Karachi',
|
||||
'Asia/Tashkent' => '(GMT+05:00) Tashkent',
|
||||
'Asia/Kolkata' => '(GMT+05:30) Kolkata',
|
||||
'Asia/Kathmandu' => '(GMT+05:45) Kathmandu',
|
||||
'Asia/Almaty' => '(GMT+06:00) Almaty',
|
||||
'Asia/Dhaka' => '(GMT+06:00) Dhaka',
|
||||
'Asia/Novosibirsk' => '(GMT+06:00) Novosibirsk',
|
||||
'Asia/Bangkok' => '(GMT+07:00) Bangkok',
|
||||
'Asia/Jakarta' => '(GMT+07:00) Jakarta',
|
||||
'Asia/Krasnoyarsk' => '(GMT+07:00) Krasnoyarsk',
|
||||
'Asia/Chongqing' => '(GMT+08:00) Chongqing',
|
||||
'Asia/Hong_Kong' => '(GMT+08:00) Hong Kong',
|
||||
'Asia/Irkutsk' => '(GMT+08:00) Irkutsk',
|
||||
'Asia/Kuala_Lumpur' => '(GMT+08:00) Kuala Lumpur',
|
||||
'Australia/Perth' => '(GMT+08:00) Perth',
|
||||
'Asia/Singapore' => '(GMT+08:00) Singapore',
|
||||
'Asia/Taipei' => '(GMT+08:00) Taipei',
|
||||
'Asia/Ulaanbaatar' => '(GMT+08:00) Ulaan Bataar',
|
||||
'Asia/Urumqi' => '(GMT+08:00) Urumqi',
|
||||
'Asia/Seoul' => '(GMT+09:00) Seoul',
|
||||
'Asia/Tokyo' => '(GMT+09:00) Tokyo',
|
||||
'Asia/Yakutsk' => '(GMT+09:00) Yakutsk',
|
||||
'Australia/Adelaide' => '(GMT+09:30) Adelaide',
|
||||
'Australia/Darwin' => '(GMT+09:30) Darwin',
|
||||
'Australia/Brisbane' => '(GMT+10:00) Brisbane',
|
||||
'Australia/Canberra' => '(GMT+10:00) Canberra',
|
||||
'Pacific/Guam' => '(GMT+10:00) Guam',
|
||||
'Australia/Hobart' => '(GMT+10:00) Hobart',
|
||||
'Australia/Melbourne' => '(GMT+10:00) Melbourne',
|
||||
'Pacific/Port_Moresby' => '(GMT+10:00) Port Moresby',
|
||||
'Australia/Sydney' => '(GMT+10:00) Sydney',
|
||||
'Asia/Vladivostok' => '(GMT+10:00) Vladivostok',
|
||||
'Asia/Magadan' => '(GMT+11:00) Magadan',
|
||||
'Pacific/Auckland' => '(GMT+12:00) Auckland',
|
||||
'Pacific/Fiji' => '(GMT+12:00) Fiji',
|
||||
'Asia/Kamchatka' => '(GMT+12:00) Kamchatka'
|
||||
'Pacific/Midway' => '(GMT-11:00) Midway Island',
|
||||
'US/Samoa' => '(GMT-11:00) Samoa',
|
||||
'US/Hawaii' => '(GMT-10:00) Hawaii',
|
||||
'US/Alaska' => '(GMT-09:00) Alaska',
|
||||
'US/Pacific' => '(GMT-08:00) Pacific Time (US & Canada)',
|
||||
'America/Tijuana' => '(GMT-08:00) Tijuana',
|
||||
'US/Arizona' => '(GMT-07:00) Arizona',
|
||||
'US/Mountain' => '(GMT-07:00) Mountain Time (US & Canada)',
|
||||
'America/Chihuahua' => '(GMT-07:00) Chihuahua',
|
||||
'America/Mazatlan' => '(GMT-07:00) Mazatlan',
|
||||
'America/Mexico_City' => '(GMT-06:00) Mexico City',
|
||||
'America/Monterrey' => '(GMT-06:00) Monterrey',
|
||||
'Canada/Saskatchewan' => '(GMT-06:00) Saskatchewan',
|
||||
'US/Central' => '(GMT-06:00) Central Time (US & Canada)',
|
||||
'US/Eastern' => '(GMT-05:00) Eastern Time (US & Canada)',
|
||||
'US/East-Indiana' => '(GMT-05:00) Indiana (East)',
|
||||
'America/Bogota' => '(GMT-05:00) Bogota',
|
||||
'America/Lima' => '(GMT-05:00) Lima',
|
||||
'America/Caracas' => '(GMT-04:30) Caracas',
|
||||
'Canada/Atlantic' => '(GMT-04:00) Atlantic Time (Canada)',
|
||||
'America/La_Paz' => '(GMT-04:00) La Paz',
|
||||
'America/Santiago' => '(GMT-04:00) Santiago',
|
||||
'Canada/Newfoundland' => '(GMT-03:30) Newfoundland',
|
||||
'America/Buenos_Aires' => '(GMT-03:00) Buenos Aires',
|
||||
'Greenland' => '(GMT-03:00) Greenland',
|
||||
'Atlantic/Stanley' => '(GMT-02:00) Stanley',
|
||||
'Atlantic/Azores' => '(GMT-01:00) Azores',
|
||||
'Atlantic/Cape_Verde' => '(GMT-01:00) Cape Verde Is.',
|
||||
'Africa/Casablanca' => '(GMT) Casablanca',
|
||||
'Europe/Dublin' => '(GMT) Dublin',
|
||||
'Europe/Lisbon' => '(GMT) Lisbon',
|
||||
'Europe/London' => '(GMT) London',
|
||||
'Africa/Monrovia' => '(GMT) Monrovia',
|
||||
'Europe/Amsterdam' => '(GMT+01:00) Amsterdam',
|
||||
'Europe/Belgrade' => '(GMT+01:00) Belgrade',
|
||||
'Europe/Berlin' => '(GMT+01:00) Berlin',
|
||||
'Europe/Bratislava' => '(GMT+01:00) Bratislava',
|
||||
'Europe/Brussels' => '(GMT+01:00) Brussels',
|
||||
'Europe/Budapest' => '(GMT+01:00) Budapest',
|
||||
'Europe/Copenhagen' => '(GMT+01:00) Copenhagen',
|
||||
'Europe/Ljubljana' => '(GMT+01:00) Ljubljana',
|
||||
'Europe/Madrid' => '(GMT+01:00) Madrid',
|
||||
'Europe/Paris' => '(GMT+01:00) Paris',
|
||||
'Europe/Prague' => '(GMT+01:00) Prague',
|
||||
'Europe/Rome' => '(GMT+01:00) Rome',
|
||||
'Europe/Sarajevo' => '(GMT+01:00) Sarajevo',
|
||||
'Europe/Skopje' => '(GMT+01:00) Skopje',
|
||||
'Europe/Stockholm' => '(GMT+01:00) Stockholm',
|
||||
'Europe/Vienna' => '(GMT+01:00) Vienna',
|
||||
'Europe/Warsaw' => '(GMT+01:00) Warsaw',
|
||||
'Europe/Zagreb' => '(GMT+01:00) Zagreb',
|
||||
'Europe/Athens' => '(GMT+02:00) Athens',
|
||||
'Europe/Bucharest' => '(GMT+02:00) Bucharest',
|
||||
'Africa/Cairo' => '(GMT+02:00) Cairo',
|
||||
'Africa/Harare' => '(GMT+02:00) Harare',
|
||||
'Europe/Helsinki' => '(GMT+02:00) Helsinki',
|
||||
'Europe/Istanbul' => '(GMT+02:00) Istanbul',
|
||||
'Asia/Jerusalem' => '(GMT+02:00) Jerusalem',
|
||||
'Europe/Kiev' => '(GMT+02:00) Kyiv',
|
||||
'Europe/Minsk' => '(GMT+02:00) Minsk',
|
||||
'Europe/Riga' => '(GMT+02:00) Riga',
|
||||
'Europe/Sofia' => '(GMT+02:00) Sofia',
|
||||
'Europe/Tallinn' => '(GMT+02:00) Tallinn',
|
||||
'Europe/Vilnius' => '(GMT+02:00) Vilnius',
|
||||
'Asia/Baghdad' => '(GMT+03:00) Baghdad',
|
||||
'Asia/Kuwait' => '(GMT+03:00) Kuwait',
|
||||
'Europe/Moscow' => '(GMT+03:00) Moscow',
|
||||
'Africa/Nairobi' => '(GMT+03:00) Nairobi',
|
||||
'Asia/Riyadh' => '(GMT+03:00) Riyadh',
|
||||
'Europe/Volgograd' => '(GMT+03:00) Volgograd',
|
||||
'Asia/Tehran' => '(GMT+03:30) Tehran',
|
||||
'Asia/Baku' => '(GMT+04:00) Baku',
|
||||
'Asia/Muscat' => '(GMT+04:00) Muscat',
|
||||
'Asia/Tbilisi' => '(GMT+04:00) Tbilisi',
|
||||
'Asia/Yerevan' => '(GMT+04:00) Yerevan',
|
||||
'Asia/Kabul' => '(GMT+04:30) Kabul',
|
||||
'Asia/Yekaterinburg' => '(GMT+05:00) Ekaterinburg',
|
||||
'Asia/Karachi' => '(GMT+05:00) Karachi',
|
||||
'Asia/Tashkent' => '(GMT+05:00) Tashkent',
|
||||
'Asia/Kolkata' => '(GMT+05:30) Kolkata',
|
||||
'Asia/Kathmandu' => '(GMT+05:45) Kathmandu',
|
||||
'Asia/Almaty' => '(GMT+06:00) Almaty',
|
||||
'Asia/Dhaka' => '(GMT+06:00) Dhaka',
|
||||
'Asia/Novosibirsk' => '(GMT+06:00) Novosibirsk',
|
||||
'Asia/Bangkok' => '(GMT+07:00) Bangkok',
|
||||
'Asia/Jakarta' => '(GMT+07:00) Jakarta',
|
||||
'Asia/Krasnoyarsk' => '(GMT+07:00) Krasnoyarsk',
|
||||
'Asia/Chongqing' => '(GMT+08:00) Chongqing',
|
||||
'Asia/Hong_Kong' => '(GMT+08:00) Hong Kong',
|
||||
'Asia/Irkutsk' => '(GMT+08:00) Irkutsk',
|
||||
'Asia/Kuala_Lumpur' => '(GMT+08:00) Kuala Lumpur',
|
||||
'Australia/Perth' => '(GMT+08:00) Perth',
|
||||
'Asia/Singapore' => '(GMT+08:00) Singapore',
|
||||
'Asia/Taipei' => '(GMT+08:00) Taipei',
|
||||
'Asia/Ulaanbaatar' => '(GMT+08:00) Ulaan Bataar',
|
||||
'Asia/Urumqi' => '(GMT+08:00) Urumqi',
|
||||
'Asia/Seoul' => '(GMT+09:00) Seoul',
|
||||
'Asia/Tokyo' => '(GMT+09:00) Tokyo',
|
||||
'Asia/Yakutsk' => '(GMT+09:00) Yakutsk',
|
||||
'Australia/Adelaide' => '(GMT+09:30) Adelaide',
|
||||
'Australia/Darwin' => '(GMT+09:30) Darwin',
|
||||
'Australia/Brisbane' => '(GMT+10:00) Brisbane',
|
||||
'Australia/Canberra' => '(GMT+10:00) Canberra',
|
||||
'Pacific/Guam' => '(GMT+10:00) Guam',
|
||||
'Australia/Hobart' => '(GMT+10:00) Hobart',
|
||||
'Australia/Melbourne' => '(GMT+10:00) Melbourne',
|
||||
'Pacific/Port_Moresby' => '(GMT+10:00) Port Moresby',
|
||||
'Australia/Sydney' => '(GMT+10:00) Sydney',
|
||||
'Asia/Vladivostok' => '(GMT+10:00) Vladivostok',
|
||||
'Asia/Magadan' => '(GMT+11:00) Magadan',
|
||||
'Pacific/Auckland' => '(GMT+12:00) Auckland',
|
||||
'Pacific/Fiji' => '(GMT+12:00) Fiji',
|
||||
'Asia/Kamchatka' => '(GMT+12:00) Kamchatka'
|
||||
];
|
||||
// Type de proxy
|
||||
public static $proxyType = [
|
||||
@ -188,14 +187,7 @@ class config extends common
|
||||
];
|
||||
public static $captchaTypes = [
|
||||
'num' => 'Chiffres',
|
||||
'alpha' => 'Lettres'
|
||||
];
|
||||
public static $updateDelay = [
|
||||
86400 => '1',
|
||||
172800 => '2',
|
||||
345600 => '4',
|
||||
604800 => '7',
|
||||
1209600 => '14',
|
||||
'alpha' => 'Lettres'
|
||||
];
|
||||
|
||||
// Langue traduite courante
|
||||
@ -205,35 +197,23 @@ class config extends common
|
||||
public static $onlineVersion = '';
|
||||
public static $updateButtonText = 'Réinstaller';
|
||||
|
||||
public static $imageOpenGraph = [];
|
||||
|
||||
/**
|
||||
* Génére les fichiers pour les crawlers
|
||||
* Sitemap compressé et non compressé
|
||||
* Robots.txt
|
||||
*/
|
||||
public function sitemap()
|
||||
public function siteMap()
|
||||
{
|
||||
// La page n'existe pas
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
|
||||
) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} else {
|
||||
// Mettre à jour le site map
|
||||
$successSitemap = $this->updateSitemap();
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'config',
|
||||
'notification' => $successSitemap ? helper::translate('La carte du site a été mise à jour') : helper::translate('Echec de l\'écriture, vérifiez les permissions'),
|
||||
'state' => $successSitemap
|
||||
]);
|
||||
}
|
||||
// Mettre à jour le site map
|
||||
$successSitemap = $this->createSitemap();
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'config',
|
||||
'notification' => $successSitemap ? helper::translate('La carte du site a été mise à jour') : helper::translate('Echec de l\'écriture, vérifiez les permissions'),
|
||||
'state' => $successSitemap
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@ -243,10 +223,7 @@ class config extends common
|
||||
public function backup()
|
||||
{
|
||||
// Soumission du formulaire
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
|
||||
$this->isPost()
|
||||
) {
|
||||
if ($this->isPost()) {
|
||||
// Creation du ZIP
|
||||
$filter = $this->getInput('configBackupOption', helper::FILTER_BOOLEAN) === true ? ['backup', 'tmp'] : ['backup', 'tmp', 'file'];
|
||||
$fileName = helper::autoBackup(self::TEMP_DIR, $filter);
|
||||
@ -302,8 +279,10 @@ class config extends common
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Traitement des données reçues valides.
|
||||
if (!empty($token) && $data !== false) {
|
||||
if (!empty($token) && $data !== false) {
|
||||
$data = json_decode($data, true);
|
||||
$img = $data['screenshot'];
|
||||
// Effacer l'image et la miniature png
|
||||
@ -316,9 +295,9 @@ class config extends common
|
||||
$success = copy($img, self::FILE_DIR . 'source/screenshot.jpg');
|
||||
}
|
||||
|
||||
$notification = empty($token)
|
||||
$notification = empty($token)
|
||||
? 'La clé de l\'API ne peut pas être vide'
|
||||
: ($success === false ? 'Service en ligne inaccessible' : 'Capture d\'écran générée avec succès');
|
||||
: ($success === false ? 'Service en ligne inaccessible' : 'Capture d\'écran générée avec succès');
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -334,10 +313,7 @@ class config extends common
|
||||
public function restore()
|
||||
{
|
||||
// Soumission du formulaire
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
|
||||
$this->isPost()
|
||||
) {
|
||||
if ($this->isPost()) {
|
||||
|
||||
$success = false;
|
||||
|
||||
@ -366,7 +342,12 @@ class config extends common
|
||||
'state' => false
|
||||
]);
|
||||
}
|
||||
|
||||
// Lire le contenu de l'archive dans le tableau files
|
||||
/*
|
||||
for ($i = 0; $i < $zip->numFiles; $i++) {
|
||||
$stat = $zip->statIndex($i);
|
||||
$files[] = (basename($stat['name']));
|
||||
}*/
|
||||
// Extraction de l'archive dans un dossier temporaire
|
||||
$tmpDir = uniqid(8);
|
||||
$success = $zip->extractTo(self::TEMP_DIR . $tmpDir);
|
||||
@ -374,7 +355,7 @@ class config extends common
|
||||
$data = json_decode(file_get_contents(self::TEMP_DIR . $tmpDir . '/data/core.json'), true);
|
||||
$dataVersion = $data['core']['dataVersion'];
|
||||
// Version non prises en charge <9 ou erreur d'extraction
|
||||
if (intval(substr($dataVersion, 0, 1)) <= 9 or !$success) {
|
||||
if (intval(substr($dataVersion, 0, 1)) <= 9 or !$success) {
|
||||
// Valeurs en sortie erreur
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Restaurer'),
|
||||
@ -394,7 +375,7 @@ class config extends common
|
||||
|
||||
// Copie dans le dossier /site/data
|
||||
$success = $this->copyDir(self::TEMP_DIR . $tmpDir, 'site/');
|
||||
$this->deleteDir(self::TEMP_DIR . $tmpDir);
|
||||
$this->removeDir(self::TEMP_DIR . $tmpDir);
|
||||
|
||||
// Restaurer les users originaux d'une v10 si option cochée
|
||||
if (
|
||||
@ -405,8 +386,8 @@ class config extends common
|
||||
}
|
||||
|
||||
// Message de notification
|
||||
$notification = $success === true ? 'Restauration effectuée avec succès' : 'Erreur inconnue';
|
||||
$redirect = $this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN) === true ? helper::baseUrl() . 'config/restore' : helper::baseUrl() . 'user/login/';
|
||||
$notification = $success === true ? 'Restauration effectuée avec succès' : 'Erreur inconnue';
|
||||
$redirect = $this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN) === true ? helper::baseUrl() . 'config/restore' : helper::baseUrl() . 'user/login/';
|
||||
// Valeurs en sortie erreur
|
||||
$this->addOutput([
|
||||
'redirect' => $redirect,
|
||||
@ -429,10 +410,7 @@ class config extends common
|
||||
public function index()
|
||||
{
|
||||
// Soumission du formulaire
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
|
||||
$this->isPost()
|
||||
) {
|
||||
if ($this->isPost()) {
|
||||
|
||||
// Basculement en mise à jour auto, remise à 0 du compteur
|
||||
if (
|
||||
@ -442,6 +420,7 @@ class config extends common
|
||||
$this->setData(['core', 'lastAutoUpdate', 0]);
|
||||
}
|
||||
|
||||
|
||||
// Sauvegarder la configuration
|
||||
$this->setData([
|
||||
'config',
|
||||
@ -457,7 +436,6 @@ class config extends common
|
||||
'proxyType' => $this->getInput('configProxyType'),
|
||||
'proxyUrl' => $this->getInput('configProxyUrl'),
|
||||
'proxyPort' => $this->getInput('configProxyPort', helper::FILTER_INT),
|
||||
'autoUpdateDelay' => $this->getInput('configAutoUpdateDelay', helper::FILTER_INT),
|
||||
'social' => [
|
||||
'facebookId' => $this->getInput('socialFacebookId'),
|
||||
'linkedinId' => $this->getInput('socialLinkedinId'),
|
||||
@ -466,25 +444,21 @@ class config extends common
|
||||
'twitterId' => $this->getInput('socialTwitterId'),
|
||||
'youtubeId' => $this->getInput('socialYoutubeId'),
|
||||
'youtubeUserId' => $this->getInput('socialYoutubeUserId'),
|
||||
'githubId' => $this->getInput('socialGithubId'),
|
||||
'redditId' => $this->getInput('socialRedditId'),
|
||||
'twitchId' => $this->getInput('socialTwitchId'),
|
||||
'vimeoId' => $this->getInput('socialVimeoId'),
|
||||
'steamId' => $this->getInput('socialSteamId'),
|
||||
'githubId' => $this->getInput('socialGithubId')
|
||||
],
|
||||
'smtp' => [
|
||||
'enable' => $this->getInput('smtpEnable', helper::FILTER_BOOLEAN),
|
||||
'host' => $this->getInput('smtpHost', helper::FILTER_STRING_SHORT),
|
||||
'port' => $this->getInput('smtpPort', helper::FILTER_INT),
|
||||
'host' => $this->getInput('smtpHost', helper::FILTER_STRING_SHORT, $this->getInput('smtpEnable', helper::FILTER_BOOLEAN)),
|
||||
'port' => $this->getInput('smtpPort', helper::FILTER_INT, $this->getInput('smtpEnable', helper::FILTER_BOOLEAN)),
|
||||
'auth' => $this->getInput('smtpAuth', helper::FILTER_BOOLEAN),
|
||||
'secure' => $this->getInput('smtpSecure', helper::FILTER_STRING_SHORT),
|
||||
'username' => $this->getInput('smtpUsername', helper::FILTER_STRING_SHORT),
|
||||
'password' => helper::encrypt($this->getInput('smtpPassword', helper::FILTER_STRING_SHORT), $this->getInput('smtpHost', helper::FILTER_STRING_SHORT)),
|
||||
'from' => $this->getInput('smtpFrom', helper::FILTER_MAIL, true),
|
||||
'secure' => $this->getInput('smtpSecure', helper::FILTER_BOOLEAN),
|
||||
'username' => $this->getInput('smtpUsername', helper::FILTER_STRING_SHORT, $this->getInput('smtpAuth', helper::FILTER_BOOLEAN)),
|
||||
'password' => helper::encrypt($this->getData(['config', 'smtp', 'username']), $this->getInput('smtpPassword', null, $this->getInput('smtpAuth', helper::FILTER_BOOLEAN))),
|
||||
'sender' => $this->getInput('smtpSender', helper::FILTER_MAIL)
|
||||
],
|
||||
'seo' => [
|
||||
'robots' => $this->getInput('seoRobots', helper::FILTER_BOOLEAN),
|
||||
'openGraphImage' => $this->getInput('seoOpenGraphImage', helper::FILTER_STRING_SHORT),
|
||||
'keyApi' => $this->getInput('seoKeyApi', helper::FILTER_STRING_SHORT),
|
||||
],
|
||||
'connect' => [
|
||||
'attempt' => $this->getInput('connectAttempt', helper::FILTER_INT),
|
||||
@ -509,8 +483,7 @@ class config extends common
|
||||
unlink($filename);
|
||||
}
|
||||
}
|
||||
if (file_exists('site/data/.backup'))
|
||||
unlink('site/data/.backup');
|
||||
if (file_exists('site/data/.backup')) unlink('site/data/.backup');
|
||||
} else {
|
||||
touch('site/data/.backup');
|
||||
}
|
||||
@ -524,8 +497,8 @@ class config extends common
|
||||
) {
|
||||
// Ajout des lignes dans le .htaccess
|
||||
$fileContent = file_get_contents('.htaccess');
|
||||
$rewriteData =
|
||||
'# URL rewriting' . PHP_EOL .
|
||||
$rewriteData = PHP_EOL .
|
||||
'# URL rewriting' . PHP_EOL .
|
||||
'<IfModule mod_rewrite.c>' . PHP_EOL .
|
||||
"\tRewriteEngine on" . PHP_EOL .
|
||||
"\tRewriteBase " . helper::baseUrl(false, false) . PHP_EOL .
|
||||
@ -533,9 +506,9 @@ class config extends common
|
||||
"\tRewriteCond %{REQUEST_FILENAME} !-d" . PHP_EOL .
|
||||
"\tRewriteRule ^(.*)$ index.php?$1 [L]" . PHP_EOL .
|
||||
'</IfModule>' . PHP_EOL .
|
||||
'# URL rewriting';
|
||||
'# URL rewriting' . PHP_EOL;
|
||||
$fileContent = str_replace('# URL rewriting', $rewriteData, $fileContent);
|
||||
$this->secure_file_put_contents(
|
||||
file_put_contents(
|
||||
'.htaccess',
|
||||
$fileContent
|
||||
);
|
||||
@ -551,7 +524,7 @@ class config extends common
|
||||
$fileContent = file_get_contents('.htaccess');
|
||||
$fileContent = explode('# URL rewriting', $fileContent);
|
||||
$fileContent = $fileContent[0] . '# URL rewriting' . $fileContent[2];
|
||||
$this->secure_file_put_contents(
|
||||
file_put_contents(
|
||||
'.htaccess',
|
||||
$fileContent
|
||||
);
|
||||
@ -570,72 +543,10 @@ class config extends common
|
||||
]);
|
||||
}
|
||||
|
||||
// Activation du bouton de mise à jour
|
||||
if (
|
||||
helper::checkNewVersion(common::ZWII_UPDATE_CHANNEL)
|
||||
&& $this->getData(['core', 'updateAvailable']) === false
|
||||
&& $this->getData(['config', 'autoUpdate'])
|
||||
) {
|
||||
$this->setData(['core', 'updateAvailable', true]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'config',
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
// Variable de version
|
||||
if (helper::checkNewVersion(common::ZWII_UPDATE_CHANNEL)) {
|
||||
self::$updateButtonText = helper::translate('Mise à jour');
|
||||
}
|
||||
|
||||
|
||||
// Sélecteur de délais, compléter avec la traduction en jours
|
||||
foreach (self::$updateDelay as $key => $value) {
|
||||
self::$updateDelay[$key] = $key === 86400 ? $value . ' ' . helper::translate('jour') : $value . ' ' . helper::translate('jours');
|
||||
}
|
||||
|
||||
// Paramètres de l'image OpenGraph
|
||||
$imagePath = self::FILE_DIR . 'source/' . $this->getData(['config', 'seo', 'openGraphImage']);
|
||||
|
||||
// Par défaut
|
||||
self::$imageOpenGraph['type'] = '';
|
||||
self::$imageOpenGraph['size'] = '';
|
||||
self::$imageOpenGraph['wide'] = '';
|
||||
self::$imageOpenGraph['height'] = '';
|
||||
self::$imageOpenGraph['ratio'] = 0;
|
||||
if (
|
||||
$this->getData(['config', 'seo', 'openGraphImage'])
|
||||
&& file_exists($imagePath)
|
||||
) {
|
||||
// Infos sur l'image Open Graph
|
||||
$typeMime = exif_imagetype($imagePath);
|
||||
switch ($typeMime) {
|
||||
case IMAGETYPE_JPEG:
|
||||
$typeMime = 'jpeg';
|
||||
break;
|
||||
case IMAGETYPE_PNG:
|
||||
$typeMime = 'png';
|
||||
break;
|
||||
default:
|
||||
$typeMime = image_type_to_mime_type($typeMime);
|
||||
}
|
||||
self::$imageOpenGraph['type'] = $typeMime;
|
||||
$imageSize = getimagesize($imagePath);
|
||||
self::$imageOpenGraph['wide'] = $imageSize[0];
|
||||
self::$imageOpenGraph['height'] = $imageSize[1];
|
||||
self::$imageOpenGraph['ratio'] = self::$imageOpenGraph['wide'] / self::$imageOpenGraph['height'];
|
||||
|
||||
self::$imageOpenGraph['size'] = filesize($imagePath);
|
||||
$tailleEnOctets = filesize($imagePath);
|
||||
|
||||
if ($tailleEnOctets >= 1024 * 1024) {
|
||||
// Si la taille est supérieure ou égale à 1 Mo, afficher en mégaoctets
|
||||
self::$imageOpenGraph['size'] = round($tailleEnOctets / (1024 * 1024), 2) . ' Mo';
|
||||
} else {
|
||||
// Sinon, afficher en kilooctets
|
||||
self::$imageOpenGraph['size'] = round($tailleEnOctets / 1024, 2) . ' Ko';
|
||||
}
|
||||
self::$onlineVersion = helper::getUrlContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version');
|
||||
if (self::$onlineVersion > common::ZWII_VERSION) {
|
||||
self::$updateButtonText = helper::translate('Mettre à jour');
|
||||
}
|
||||
|
||||
// Valeurs en sortie
|
||||
@ -649,16 +560,13 @@ class config extends common
|
||||
public function script()
|
||||
{
|
||||
// Soumission du formulaire
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
|
||||
$this->isPost()
|
||||
) {
|
||||
if ($this->isPost()) {
|
||||
// Ecrire les fichiers de script
|
||||
if ($this->geturl(2) === 'head') {
|
||||
$this->secure_file_put_contents(self::DATA_DIR . 'head.inc.html', $this->getInput('configScriptHead', null));
|
||||
file_put_contents(self::DATA_DIR . 'head.inc.html', $this->getInput('configScriptHead', null));
|
||||
}
|
||||
if ($this->geturl(2) === 'body') {
|
||||
$this->secure_file_put_contents(self::DATA_DIR . 'body.inc.html', $this->getInput('configScriptBody', null));
|
||||
file_put_contents(self::DATA_DIR . 'body.inc.html', $this->getInput('configScriptBody', null));
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -687,36 +595,26 @@ class config extends common
|
||||
|
||||
public function logReset()
|
||||
{
|
||||
// Action interdite
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
|
||||
) {
|
||||
if (file_exists(self::DATA_DIR . 'journal.log')) {
|
||||
unlink(self::DATA_DIR . 'journal.log');
|
||||
// Créer les en-têtes des journaux
|
||||
$d = 'Date;Heure;IP;Id;Action' . PHP_EOL;
|
||||
file_put_contents(self::DATA_DIR . 'journal.log', $d);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => helper::translate('Journal réinitialisé avec succès'),
|
||||
'state' => true
|
||||
]);
|
||||
} else {
|
||||
if (file_exists(self::DATA_DIR . 'journal.log')) {
|
||||
unlink(self::DATA_DIR . 'journal.log');
|
||||
// Créer les en-têtes des journaux
|
||||
$d = 'Date;Heure;IP;Id;Action' . PHP_EOL;
|
||||
$this->secure_file_put_contents(self::DATA_DIR . 'journal.log', $d);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => helper::translate('Journal réinitialisé avec succès'),
|
||||
'state' => true
|
||||
]);
|
||||
} else {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => helper::translate('Aucun journal à effacer'),
|
||||
'state' => false
|
||||
]);
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => helper::translate('Aucun journal à effacer'),
|
||||
'state' => false
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -727,35 +625,24 @@ class config extends common
|
||||
*/
|
||||
public function logDownload()
|
||||
{
|
||||
// Action interdite
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
|
||||
) {
|
||||
$fileName = self::DATA_DIR . 'journal.log';
|
||||
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);
|
||||
exit();
|
||||
} else {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => helper::translate('Aucun fichier journal à télécharger'),
|
||||
'state' => false
|
||||
]);
|
||||
} else {
|
||||
$fileName = self::DATA_DIR . 'journal.log';
|
||||
if (file_exists($fileName)) {
|
||||
ob_start();
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Disposition: attachment; filename="' . $fileName . '"');
|
||||
header('Content-Length: ' . filesize($fileName));
|
||||
ob_clean();
|
||||
ob_end_flush();
|
||||
readfile($fileName);
|
||||
exit();
|
||||
} else {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => helper::translate('Aucun fichier journal à télécharger'),
|
||||
'state' => false
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -764,46 +651,34 @@ class config extends common
|
||||
*/
|
||||
public function blacklistDownload()
|
||||
{
|
||||
// Action interdite
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
|
||||
) {
|
||||
ob_start();
|
||||
$fileName = self::TEMP_DIR . 'blacklist.log';
|
||||
$d = 'Date dernière tentative;Heure dernière tentative;Id;Adresse IP;Nombre d\'échecs' . PHP_EOL;
|
||||
file_put_contents($fileName, $d);
|
||||
if (file_exists($fileName)) {
|
||||
$d = $this->getData(['blacklist']);
|
||||
$data = '';
|
||||
foreach ($d as $key => $item) {
|
||||
$data .= helper::dateUTF8('%Y %m %d', $item['lastFail']) . ' - ' . helper::dateUTF8('%H:%M', time());
|
||||
$data .= $key . ';' . $item['ip'] . ';' . $item['connectFail'] . PHP_EOL;
|
||||
}
|
||||
file_put_contents($fileName, $data, FILE_APPEND);
|
||||
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(self::TEMP_DIR . 'blacklist.log');
|
||||
exit();
|
||||
} else {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
'title' => helper::translate('Confighelper::translate(uration'),
|
||||
'view' => 'index',
|
||||
'notification' => helper::translate('Aucune liste noire à télécharger'),
|
||||
'state' => false
|
||||
]);
|
||||
} else {
|
||||
ob_start();
|
||||
$fileName = self::TEMP_DIR . 'blacklist.log';
|
||||
$d = 'Date dernière tentative;Heure dernière tentative;Id;Adresse IP;Nombre d\'échecs' . PHP_EOL;
|
||||
$this->secure_file_put_contents($fileName, $d);
|
||||
if (file_exists($fileName)) {
|
||||
$d = $this->getData(['blacklist']);
|
||||
$data = '';
|
||||
foreach ($d as $key => $item) {
|
||||
$data .= helper::dateUTF8('%Y %m %d', $item['lastFail'], self::$i18nUI) . ' - ' . helper::dateUTF8('%H:%M', time(), self::$i18nUI);
|
||||
$data .= $key . ';' . $item['ip'] . ';' . $item['connectFail'] . PHP_EOL;
|
||||
}
|
||||
$this->secure_file_put_contents($fileName, $data, FILE_APPEND);
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Content-Disposition: attachment; filename="' . $fileName . '"');
|
||||
header('Content-Length: ' . filesize($fileName));
|
||||
ob_clean();
|
||||
ob_end_flush();
|
||||
readfile($fileName);
|
||||
unlink(self::TEMP_DIR . 'blacklist.log');
|
||||
exit();
|
||||
} else {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => helper::translate('Aucune liste noire à télécharger'),
|
||||
'state' => false
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -813,33 +688,23 @@ class config extends common
|
||||
|
||||
public function blacklistReset()
|
||||
{
|
||||
// Action interdite
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
|
||||
) {
|
||||
if (file_exists(self::DATA_DIR . 'blacklist.json')) {
|
||||
$this->setData(['blacklist', []]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => helper::translate('Liste noire réinitialisée avec succès'),
|
||||
'state' => true
|
||||
]);
|
||||
} else {
|
||||
if (file_exists(self::DATA_DIR . 'blacklist.json')) {
|
||||
$this->setData(['blacklist', []]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => helper::translate('Liste noire réinitialisée avec succès'),
|
||||
'state' => true
|
||||
]);
|
||||
} else {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => helper::translate('Aucune liste noire à effacer'),
|
||||
'state' => false
|
||||
]);
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => helper::translate('Aucune liste noire à effacer'),
|
||||
'state' => false
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -848,26 +713,16 @@ class config extends common
|
||||
*/
|
||||
public function copyBackups()
|
||||
{
|
||||
// Action interdite
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
|
||||
) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} else {
|
||||
|
||||
$success = $this->copyDir(self::BACKUP_DIR, self::FILE_DIR . 'source/backup');
|
||||
$success = $this->copyDir(self::BACKUP_DIR, self::FILE_DIR . 'source/backup');
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => $success ? helper::translate('Copie terminée avec succès') : helper::translate('Copie terminée avec des erreurs'),
|
||||
'state' => $success
|
||||
]);
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => $success ? helper::translate('Copie terminée avec succès') : helper::translate('Copie terminée avec des erreurs'),
|
||||
'state' => $success
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -875,69 +730,22 @@ class config extends common
|
||||
*/
|
||||
public function delBackups()
|
||||
{
|
||||
// Action interdite
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
|
||||
) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} else {
|
||||
$path = realpath(self::BACKUP_DIR);
|
||||
$success = $fail = 0;
|
||||
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename) {
|
||||
if (strpos($filename, '.zip')) {
|
||||
$path = realpath(self::BACKUP_DIR);
|
||||
$success = $fail = 0;
|
||||
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename) {
|
||||
if (strpos($filename, '.zip')) {
|
||||
|
||||
$r = unlink($filename);
|
||||
$success = $r === true ? $success + 1 : $success;
|
||||
$fail = $r === false ? $fail + 1 : $fail;
|
||||
}
|
||||
$r = unlink($filename);
|
||||
$success = $r === true ? $success + 1 : $success;
|
||||
$fail = $r === false ? $fail + 1 : $fail;
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => $success . helper::translate('Fichiers effacés') . ' - ' . helper::translate('Échecs') . ': ' . $fail,
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction pour vérifier la présence du module de réécriture
|
||||
* @return bool
|
||||
*/
|
||||
public function isModRewriteEnabled()
|
||||
{
|
||||
// Check if Apache and mod_rewrite is loaded
|
||||
if (function_exists('apache_get_modules')) {
|
||||
$modules = apache_get_modules();
|
||||
return in_array('mod_rewrite', $modules);
|
||||
} else {
|
||||
// Fallback if not using Apache or unable to detect modules
|
||||
return getenv('HTTP_MOD_REWRITE') == 'On' || getenv('REDIRECT_STATUS') == '200';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stocke la variable dans les paramètres de l'utilisateur pour activer la tab à sa prochaine visite
|
||||
* @return never
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
$this->setData([
|
||||
'user',
|
||||
$this->getUser('id'),
|
||||
'view',
|
||||
[
|
||||
'config' => $this->getUrl(2),
|
||||
'page' => $this->getData(['user', $this->getUser('id'), 'view', 'page']),
|
||||
]
|
||||
]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'config/' . $this->getUrl(2),
|
||||
'title' => helper::translate('Configuration'),
|
||||
'view' => 'index',
|
||||
'notification' => $success . helper::translate('Fichiers effacés') . ' - ' . helper::translate('Échecs') . ': ' . $fail,
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
<Files "data.key">
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</Files>
|
@ -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);
|
||||
}
|
@ -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);
|
||||
}
|
@ -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/
|
||||
*/
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
* 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){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()}))}}))}));
|
@ -109,7 +109,7 @@
|
||||
<?php echo template::select('connectAnonymousIp', $module::$anonIP, [
|
||||
'label' => 'Anonymat des adresses IP',
|
||||
'selected' => $this->getData(['config', 'connect', 'anonymousIp']),
|
||||
'help' => 'La règlementation française impose un anonymat de niveau 2'
|
||||
'help' => 'La réglementation française impose un anonymat de niveau 2'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3 verticalAlignBottom">
|
||||
|
@ -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/
|
||||
*/
|
||||
|
||||
@ -53,15 +53,3 @@
|
||||
.activeButton {
|
||||
background-color: #00BFFF;
|
||||
}
|
||||
|
||||
.greenInfo, .redInfo {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.greenInfo {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.redInfo {
|
||||
color: red;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -7,13 +7,16 @@
|
||||
'value' => template::ico('home')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset7">
|
||||
<?php echo template::button('configLocaleButton', [
|
||||
'value' => 'Identité',
|
||||
'href' => helper::baseUrl() . 'language/site'
|
||||
]); ?>
|
||||
<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">
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('Submit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -21,24 +24,21 @@
|
||||
<div class="tab">
|
||||
<?php echo template::button('configSetupButton', [
|
||||
'value' => 'Configuration',
|
||||
'class' => 'buttonTab',
|
||||
//'href' => helper::baseUrl() . 'config/register/setup'
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
<?php echo template::button('configSocialButton', [
|
||||
'value' => 'Référencement',
|
||||
'class' => 'buttonTab',
|
||||
//'href' => helper::baseUrl() . 'config/register/social'
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
|
||||
<?php echo template::button('configConnectButton', [
|
||||
'value' => 'Connexion',
|
||||
'class' => 'buttonTab',
|
||||
//'href' => helper::baseUrl() . 'config/register/connect'
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
|
||||
<?php echo template::button('configNetworkButton', [
|
||||
'value' => 'Réseau',
|
||||
'class' => 'buttonTab',
|
||||
//'href' => helper::baseUrl() . 'config/register/network'
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
</div>
|
||||
|
||||
|
@ -2,8 +2,7 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Paramètres'); ?>
|
||||
<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']); ?>
|
||||
@ -38,8 +37,7 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('SMTP'); ?>
|
||||
<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']); ?>
|
||||
@ -47,69 +45,61 @@
|
||||
</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 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="col12">
|
||||
<?php echo template::checkbox('smtpEnable', true, 'SMTP personnalisé', [
|
||||
'checked' => $this->getData(['config', 'smtp', 'enable']),
|
||||
'help' => 'Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d\'envoi de mail.'
|
||||
<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="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::text('smtpPort', [
|
||||
'label' => 'Port SMTP',
|
||||
'placeholder' => '589',
|
||||
'value' => $this->getData(['config', 'smtp', 'port'])
|
||||
<?php echo template::select('smtpSecure', $module::$SMTPEnc, [
|
||||
'label' => 'Sécurité',
|
||||
'selected' => $this->getData(['config', 'smtp', 'secure'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::select('smtpAuth', $module::$SMTPauth, [
|
||||
'label' => 'Authentification',
|
||||
'selected' => $this->getData(['config', 'smtp', 'auth'])
|
||||
]); ?>
|
||||
</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>
|
@ -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/
|
||||
*/
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
* 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")}))}));
|
@ -1,13 +1,14 @@
|
||||
<?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">
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('configRestoreSubmit', [
|
||||
'value' => 'Restaurer',
|
||||
'uniqueSubmission' => true,
|
||||
|
@ -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/
|
||||
*/
|
||||
|
||||
|
@ -1,13 +1,14 @@
|
||||
<?php echo template::formOpen('configScript'); ?>
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<div class="col2">
|
||||
<?php echo template::button('configManageBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'config',
|
||||
'value' => template::ico('left')
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset9">
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('configManageSubmit', [
|
||||
'value' => 'Valider',
|
||||
'ico' => 'check'
|
||||
|
@ -3,6 +3,11 @@
|
||||
<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>-->
|
||||
</span>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
@ -11,8 +16,7 @@
|
||||
'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']),
|
||||
'folder' => $this->getData(['config', 'favicon']) ? dirname($this->getData(['config', 'favicon'])) : ''
|
||||
'value' => $this->getData(['config', 'favicon'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
@ -21,8 +25,7 @@
|
||||
'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']),
|
||||
'folder' => $this->getData(['config', 'faviconDark']) ? dirname($this->getData(['config', 'faviconDark'])) : ''
|
||||
'value' => $this->getData(['config', 'faviconDark'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
@ -43,8 +46,8 @@
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configRewrite', true, 'Apache 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"], 'Apache') === false and $module->isModRewriteEnabled()
|
||||
'help' => 'Supprime le point d\'interrogation dans les URL, l\'option est indisponible avec les autres serveurs Web',
|
||||
'disabled' => stripos($_SERVER["SERVER_SOFTWARE"], 'nginx')
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -55,40 +58,40 @@
|
||||
<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']); ?>
|
||||
</a>
|
||||
</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))
|
||||
'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))
|
||||
'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>
|
||||
@ -99,6 +102,11 @@
|
||||
<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']); ?>
|
||||
</a>
|
||||
</span>-->
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
@ -153,6 +161,11 @@
|
||||
<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">
|
||||
@ -173,27 +186,4 @@
|
||||
</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'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>
|
@ -2,52 +2,40 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Capture d\'écran Open Graph'); ?>
|
||||
<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']); ?>
|
||||
</a>
|
||||
</span>-->
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="col7">
|
||||
<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']),
|
||||
'folder' => $this->getData(['config', 'seo', 'openGraphImage']) ? dirname($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::text('seoKeyApi', [
|
||||
'label' => 'Clé de l\'API <a href="https://app.screenshotapi.net/" target="_blank">ScreenShotApi</a>',
|
||||
'value' => $this->getData(['config', 'seo', 'keyApi']),
|
||||
'help' => 'Créez un compte gratuit, recopier la clé , puis valider le formulaire avant de cliquer sur le bouton de génération'
|
||||
]); ?>
|
||||
</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="col6 offset3">
|
||||
<?php echo template::button('socialMetaImage', [
|
||||
'href' => helper::baseUrl() . 'config/configMetaImage',
|
||||
'value' => 'Générer une capture Open Graph'
|
||||
]); ?>
|
||||
</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']); ?>" />
|
||||
<div class="col5">
|
||||
<?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>
|
||||
@ -57,8 +45,7 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Référencement'); ?>
|
||||
<h4><?php echo helper::translate('Référencement'); ?>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col4 offset1">
|
||||
@ -79,98 +66,72 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<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']); ?>
|
||||
</a>
|
||||
</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',
|
||||
'label' => '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'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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'
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
@ -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>
|
@ -8,8 +8,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/
|
||||
*/
|
||||
|
||||
@ -30,7 +30,8 @@ class install extends common
|
||||
'http://' => 'HTTP'
|
||||
];
|
||||
|
||||
public static $updateButtonText = 'Réinstaller';
|
||||
// Thèmes proposés à l'installation
|
||||
public static $themes = [];
|
||||
|
||||
public static $newVersion;
|
||||
|
||||
@ -49,35 +50,37 @@ class install extends common
|
||||
'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'
|
||||
]);
|
||||
// Accès autorisé
|
||||
else {
|
||||
// Soumission du formulaire
|
||||
if ($this->isPost()) {
|
||||
$lang = $this->getInput('installLanguage');
|
||||
setcookie('ZWII_UI', $lang, time() + 3600, helper::baseUrl(false, false), '', helper::isHttps(), true);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'install/postinstall/' . $lang
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// Liste des langues UI disponibles
|
||||
if (is_dir(self::I18N_DIR)) {
|
||||
foreach ($this->getData(['language']) as $lang => $value) {
|
||||
self::$i18nFiles[$lang] = self::$languages[$lang];
|
||||
$dir = getcwd();
|
||||
chdir(self::I18N_DIR);
|
||||
$files = glob('*.json');
|
||||
// Ajouter une clé au tableau avec le code de langue
|
||||
foreach ($files as $file) {
|
||||
// La langue est-elle référencée ?
|
||||
if (array_key_exists(basename($file, '.json'), self::$languages)) {
|
||||
self::$i18nFiles[basename($file, '.json')] = self::$languages[basename($file, '.json')];
|
||||
}
|
||||
}
|
||||
chdir($dir);
|
||||
}
|
||||
|
||||
$this->addOutput([
|
||||
'display' => self::DISPLAY_LAYOUT_LIGHT,
|
||||
'title' => helper::translate('ZwiiCMS Installation'),
|
||||
'title' => helper::translate('Installation'),
|
||||
'view' => 'index'
|
||||
]);
|
||||
}
|
||||
@ -97,13 +100,13 @@ 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;
|
||||
|
||||
// Validation de la langue transmise
|
||||
$lang = array_key_exists($this->getUrl(2), self::$languages) ? $this->getUrl(2) : 'fr_FR';
|
||||
|
||||
// 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)) {
|
||||
self::$inputNotices['installConfirmPassword'] = 'Incorrect';
|
||||
@ -115,121 +118,136 @@ class install extends common
|
||||
$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_SITE_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_SITE_CONTENT'])) {
|
||||
mkdir(self::DATA_DIR . $_SESSION['ZWII_SITE_CONTENT']);
|
||||
touch(self::DATA_DIR . $_SESSION['ZWII_SITE_CONTENT'] . '/.default');
|
||||
}
|
||||
|
||||
// Installation du site de test
|
||||
if (
|
||||
$this->getInput('installDefaultData', helper::FILTER_BOOLEAN) === false
|
||||
&& $_SESSION['ZWII_SITE_CONTENT'] === 'fr_FR'
|
||||
) {
|
||||
$sample = true;
|
||||
}
|
||||
$this->initData('page', $_SESSION['ZWII_SITE_CONTENT'], $sample);
|
||||
$this->initData('module', $_SESSION['ZWII_SITE_CONTENT'], $sample);
|
||||
$this->initData('locale', $_SESSION['ZWII_SITE_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_SITE_CONTENT']
|
||||
'language' => $lang
|
||||
]
|
||||
]);
|
||||
|
||||
// Envoie le mail
|
||||
// Sent contient true si réussite sinon code erreur d'envoi en clair
|
||||
$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'
|
||||
);
|
||||
// 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
|
||||
$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
|
||||
);
|
||||
|
||||
// Nettoyage fr par défaut
|
||||
if (
|
||||
$_SESSION['ZWII_SITE_CONTENT'] !== 'fr_FR'
|
||||
) {
|
||||
if (is_dir(self::DATA_DIR . 'fr_FR'))
|
||||
$this->deleteDir(self::DATA_DIR . 'fr_FR');
|
||||
}
|
||||
// Nettoyer les cookies de langue d'une précédente installation
|
||||
helper::deleteCookie('ZWII_CONTENT');
|
||||
|
||||
// Sauvegarder la configuration du Proxy
|
||||
$this->setData(['config', 'proxyType', $this->getInput('installProxyType')], false);
|
||||
$this->setData(['config', 'proxyUrl', $this->getInput('installProxyUrl')], false);
|
||||
$this->setData(['config', 'proxyPort', $this->getInput('installProxyPort', helper::FILTER_INT)], false);
|
||||
|
||||
// Images exemples livrées dans tous les cas
|
||||
try {
|
||||
// Décompression dans le dossier de fichier temporaires
|
||||
if (file_exists(self::TEMP_DIR . 'files.tar.gz')) {
|
||||
unlink(self::TEMP_DIR . 'files.tar.gz');
|
||||
// Effacer le dossier de contenu fr créé par défaut si la langue est différente.
|
||||
|
||||
/*if (
|
||||
self::$i18nContent !== 'fr_FR'
|
||||
&& is_dir('site/data/fr')
|
||||
) {
|
||||
$this->removeDir('site/data/fr');
|
||||
}*/
|
||||
|
||||
// Installation du site de test
|
||||
if ($this->getInput('installDefaultData', helper::FILTER_BOOLEAN) === false
|
||||
&& $lang === 'fr_FR' ) {
|
||||
$this->initData('page', self::$i18nContent, true);
|
||||
$this->initData('module', self::$i18nContent, 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]);
|
||||
}
|
||||
if (file_exists(self::TEMP_DIR . 'files.tar')) {
|
||||
unlink(self::TEMP_DIR . 'files.tar');
|
||||
|
||||
// Jeu réduit pour les pages étrangères
|
||||
if ( $lang !== 'fr_FR') {
|
||||
$this->initData('page', self::$i18nContent, false);
|
||||
$this->initData('module', self::$i18nContent, false);
|
||||
}
|
||||
copy('core/module/install/ressource/files.tar.gz', self::TEMP_DIR . 'files.tar.gz');
|
||||
$pharData = new PharData(self::TEMP_DIR . 'files.tar.gz');
|
||||
$pharData->decompress();
|
||||
// Installation
|
||||
$pharData->extractTo(__DIR__ . '/../../../', null, true);
|
||||
} catch (Exception $e) {
|
||||
$success = $e->getMessage();
|
||||
|
||||
// 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)]);
|
||||
|
||||
// Images exemples livrées dans tous les cas
|
||||
try {
|
||||
// Décompression dans le dossier de fichier temporaires
|
||||
if (file_exists(self::TEMP_DIR . 'files.tar.gz')) {
|
||||
unlink(self::TEMP_DIR . 'files.tar.gz');
|
||||
}
|
||||
if (file_exists(self::TEMP_DIR . 'files.tar')) {
|
||||
unlink(self::TEMP_DIR . 'files.tar');
|
||||
}
|
||||
copy('core/module/install/ressource/files.tar.gz', self::TEMP_DIR . 'files.tar.gz');
|
||||
$pharData = new PharData(self::TEMP_DIR . 'files.tar.gz');
|
||||
$pharData->decompress();
|
||||
// Installation
|
||||
$pharData->extractTo(__DIR__ . '/../../../', null, true);
|
||||
} catch (Exception $e) {
|
||||
$success = $e->getMessage();
|
||||
}
|
||||
|
||||
// Nettoyage
|
||||
unlink(self::TEMP_DIR . 'files.tar.gz');
|
||||
unlink(self::TEMP_DIR . 'files.tar');
|
||||
helper::deleteCookie('ZWII_UI');
|
||||
|
||||
// Créer le dossier des fontes
|
||||
if (!is_dir(self::DATA_DIR . 'fonts')) {
|
||||
mkdir(self::DATA_DIR . 'fonts');
|
||||
}
|
||||
|
||||
// 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 thèmes dans les fichiers
|
||||
if (!is_dir(self::FILE_DIR . 'source/theme')) {
|
||||
mkdir(self::FILE_DIR . 'source/theme');
|
||||
}
|
||||
$this->copyDir('core/module/install/ressource/themes', self::FILE_DIR . 'source/theme');
|
||||
unlink(self::FILE_DIR . 'source/theme/themes.json');
|
||||
|
||||
// Créer sitemap
|
||||
$this->createSitemap();
|
||||
// Mise à jour de la liste des pages pour TinyMCE
|
||||
$this->listPages();
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl(false),
|
||||
'notification' => $sent === true ? helper::translate('Installation terminée') : $sent,
|
||||
'state' => ($sent === true && $success === true) ? true : null
|
||||
]);
|
||||
}
|
||||
|
||||
// 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');
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
// 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'])], false);
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl(),
|
||||
'notification' => helper::translate('Installation terminée'),
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
// Force la sauvegarde
|
||||
$this->saveDB('config');
|
||||
|
||||
// Affichage du formulaire
|
||||
|
||||
// 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::arrayColumn($dataThemes, 'name');
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -245,205 +263,122 @@ class install extends common
|
||||
*/
|
||||
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)) {
|
||||
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' => $message
|
||||
]
|
||||
]);
|
||||
break;
|
||||
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:
|
||||
$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' => $message
|
||||
]
|
||||
]);
|
||||
break;
|
||||
case 2:
|
||||
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;
|
||||
$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' => $message,
|
||||
]
|
||||
]);
|
||||
break;
|
||||
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;
|
||||
$message = '';
|
||||
|
||||
/**
|
||||
* Restaure le fichier htaccess
|
||||
*/
|
||||
// Recopie htaccess
|
||||
if (
|
||||
$this->getData(['config', 'autoUpdateHtaccess']) === true
|
||||
) {
|
||||
// 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
|
||||
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' => $message
|
||||
]
|
||||
]);
|
||||
}
|
||||
case 4:
|
||||
$success = true;
|
||||
$rewrite = $this->getInput('data');
|
||||
// Réécriture d'URL
|
||||
if ($rewrite === "true") { // 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);
|
||||
file_put_contents(
|
||||
'.htaccess',
|
||||
$fileContent
|
||||
);
|
||||
}
|
||||
// Recopie htaccess
|
||||
if (
|
||||
$this->getData(['config', 'autoUpdateHtaccess']) &&
|
||||
$success && file_exists('.htaccess.bak')
|
||||
) {
|
||||
// L'écraser avec le backup
|
||||
$success = copy('.htaccess.bak', '.htaccess');
|
||||
// Effacer le backup
|
||||
unlink('.htaccess.bak');
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'display' => self::DISPLAY_JSON,
|
||||
'content' => [
|
||||
'success' => $success,
|
||||
'data' => null
|
||||
]
|
||||
]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -452,31 +387,13 @@ class install extends common
|
||||
*/
|
||||
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'
|
||||
]);
|
||||
}
|
||||
// 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' => helper::translate('Mise à jour'),
|
||||
'view' => 'update'
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
@ -5,7 +5,6 @@ class init extends common
|
||||
'config' => [
|
||||
'autoBackup' => true,
|
||||
'autoUpdate' => true,
|
||||
'autoUpdateDelay' => 86400,
|
||||
'autoUpdateHtaccess' => false,
|
||||
'favicon' => 'favicon.ico',
|
||||
'faviconDark' => 'faviconDark.ico',
|
||||
@ -26,11 +25,10 @@ class init extends common
|
||||
'proxyType' => 'tcp://',
|
||||
'smtp' => [
|
||||
'enable' => false,
|
||||
'from'=> 'no-reply@localhost'
|
||||
],
|
||||
'seo' => [
|
||||
'robots' => true,
|
||||
'openGraphImage' => 'screenshot.png'
|
||||
'keyApi' => 'XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'
|
||||
],
|
||||
'connect' => [
|
||||
'timeout' => 600,
|
||||
@ -46,13 +44,33 @@ class init extends common
|
||||
]
|
||||
],
|
||||
'core' => [
|
||||
'dataVersion' => 13000,
|
||||
'dataVersion' => 11600,
|
||||
'lastBackup' => 0,
|
||||
'lastClearTmp' => 0,
|
||||
'lastAutoUpdate' => 0,
|
||||
'updateAvailable' => false
|
||||
],
|
||||
'font' => [
|
||||
'locale' => [
|
||||
'homePageId' => 'accueil',
|
||||
'page302' => 'none',
|
||||
'page403' => 'none',
|
||||
'page404' => 'none',
|
||||
'legalPageId' => 'none',
|
||||
'searchPageId' => 'none',
|
||||
'searchPageLabel' => 'Rechercher',
|
||||
'sitemapPageLabel' => 'Plan du site',
|
||||
'legalPageLabel' => 'Mentions légales',
|
||||
'metaDescription' => 'Zwii est un CMS sans base de données qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.',
|
||||
'title' => 'Votre site en quelques clics !',
|
||||
'cookies' => [
|
||||
'mainLabel' => '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.',
|
||||
'titleLabel' => 'Cookies essentiels',
|
||||
'linkLegalLabel' => 'Consulter les mentions légales',
|
||||
'cookiesFooterText' => 'Cookies',
|
||||
'buttonValidLabel' => 'J\'ai compris'
|
||||
]
|
||||
],
|
||||
'fonts' => [
|
||||
'files' => [],
|
||||
'imported' => [
|
||||
'arimo' => [
|
||||
@ -72,12 +90,12 @@ class init extends common
|
||||
],
|
||||
'droid-sans-2' => [
|
||||
'name' => 'Droid Sans',
|
||||
'font-family' => '\'Droid Sans\', sans-serif',
|
||||
'font-family' => '\'Droid Sans\', sans-serif',
|
||||
'resource' => 'https://fonts.cdnfonts.com/css/droid-sans-2'
|
||||
],
|
||||
'droid-serif-2' => [
|
||||
'name' => 'Droid Serif',
|
||||
'font-family' => '\'Droid Serif\', serif',
|
||||
'font-family' => '\'Droid Serif\', serif',
|
||||
'resource' => 'https://fonts.cdnfonts.com/css/droid-serif-2'
|
||||
],
|
||||
'indie-flower' => [
|
||||
@ -157,8 +175,39 @@ class init extends common
|
||||
]
|
||||
]
|
||||
],
|
||||
'page' => [
|
||||
'accueil' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => 'accueil.html',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => true,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 1,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Accueil',
|
||||
'shortTitle' => 'Accueil',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
]
|
||||
],
|
||||
'module' => [],
|
||||
'user' => [],
|
||||
'theme' => [
|
||||
'theme' => [
|
||||
'body' => [
|
||||
'backgroundColor' => 'rgba(236, 239, 241, 1)',
|
||||
'image' => '',
|
||||
@ -281,489 +330,12 @@ class init extends common
|
||||
'backgroundColorButtonGreen' => 'rgba(100, 207, 8, 1)',
|
||||
'backgroundColorButtonHelp' => 'rgba(255, 153, 0, 1)',
|
||||
'backgroundBlockColor' => 'rgba(236, 239, 241, 1)',
|
||||
'borderBlockColor' => 'rgba(190, 202, 209, 1)',
|
||||
'width' => '960px'
|
||||
'borderBlockColor' => 'rgba(190, 202, 209, 1)'
|
||||
],
|
||||
'blacklist' => [],
|
||||
'language' => [
|
||||
"fr_FR" => [
|
||||
"version" => 13007,
|
||||
"date" => 1699354723
|
||||
],
|
||||
"es" => [
|
||||
"version" => 13007,
|
||||
"date" => 1699354723
|
||||
],
|
||||
"en_EN" => [
|
||||
"version" => 13007,
|
||||
"date" => 1699354723
|
||||
]
|
||||
],
|
||||
'profil' => [
|
||||
'-1' => [
|
||||
'name' => 'Banni',
|
||||
'readonly' => true,
|
||||
'permanent' => true,
|
||||
'comment' => 'Accès désactivé',
|
||||
],
|
||||
'0' => [
|
||||
'name' => 'Visiteur',
|
||||
'readonly' => true,
|
||||
'permanent' => true,
|
||||
'comment' => 'Accède au site',
|
||||
],
|
||||
'1' => [
|
||||
'1' => [
|
||||
'name' => 'Membre simple',
|
||||
'readonly' => false,
|
||||
'permanent' => true,
|
||||
'comment' => 'Accède aux pages réservées',
|
||||
'filemanager' => false,
|
||||
'file' => [
|
||||
'download' => false,
|
||||
'edit' => false,
|
||||
'create' => false,
|
||||
'rename' => false,
|
||||
'upload' => false,
|
||||
'delete' => false,
|
||||
'preview' => false,
|
||||
'duplicate' => false,
|
||||
'extract' => false,
|
||||
'copycut' => false,
|
||||
'chmod' => false
|
||||
],
|
||||
'folder' => [
|
||||
'create' => false,
|
||||
'delete' => false,
|
||||
'rename' => false,
|
||||
'copycut' => false,
|
||||
'chmod' => false,
|
||||
'share' => false,
|
||||
'path' => null,
|
||||
],
|
||||
'page' => [
|
||||
'add' => false,
|
||||
'delete' => false,
|
||||
'duplicate' => false,
|
||||
'edit' => false,
|
||||
'jsEditor' => false,
|
||||
'cssEditor' => false,
|
||||
'module' => false,
|
||||
],
|
||||
'blog' => [
|
||||
'add' => false,
|
||||
'delete' => false,
|
||||
'edit' => false,
|
||||
'option' => false,
|
||||
'config' => false,
|
||||
'comment' => false,
|
||||
'commentApprove' => false,
|
||||
'commentDelete' => false,
|
||||
'commentDeleteAll' => false,
|
||||
],
|
||||
'form' => [
|
||||
'option' => false,
|
||||
'config' => false,
|
||||
'data' => false,
|
||||
'delete' => false,
|
||||
'deleteAll' => false,
|
||||
'export2csv' => false,
|
||||
],
|
||||
'gallery' => [
|
||||
'config' => false,
|
||||
'delete' => false,
|
||||
'edit' => false,
|
||||
'add' => false,
|
||||
'option' => false,
|
||||
'theme' => false,
|
||||
],
|
||||
'news' => [
|
||||
'add' => false,
|
||||
'config' => false,
|
||||
'option' => false,
|
||||
'delete' => false,
|
||||
'edit' => false,
|
||||
],
|
||||
'redirection' => [
|
||||
'config' => false,
|
||||
],
|
||||
'search' => [
|
||||
'config' => false,
|
||||
],
|
||||
'user' => [
|
||||
'edit' => true,
|
||||
]
|
||||
],
|
||||
'2' => [
|
||||
'name' => 'Membre avec droit de partage',
|
||||
'readonly' => false,
|
||||
'permanent' => false,
|
||||
'comment' => 'Accède aux pages réservées et à un dossier partagé',
|
||||
'filemanager' => true,
|
||||
'file' => [
|
||||
'download' => false,
|
||||
'edit' => false,
|
||||
'create' => false,
|
||||
'rename' => false,
|
||||
'upload' => false,
|
||||
'delete' => false,
|
||||
'preview' => false,
|
||||
'duplicate' => false,
|
||||
'extract' => false,
|
||||
'copycut' => false,
|
||||
'chmod' => false
|
||||
],
|
||||
'folder' => [
|
||||
'create' => false,
|
||||
'delete' => false,
|
||||
'rename' => false,
|
||||
'copycut' => false,
|
||||
'chmod' => false,
|
||||
'share' => true,
|
||||
'path' => '/site/file/source/partage/',
|
||||
],
|
||||
'page' => [
|
||||
'add' => false,
|
||||
'delete' => false,
|
||||
'duplicate' => false,
|
||||
'edit' => false,
|
||||
'jsEditor' => false,
|
||||
'cssEditor' => false,
|
||||
'module' => false,
|
||||
],
|
||||
'blog' => [
|
||||
'add' => false,
|
||||
'delete' => false,
|
||||
'edit' => false,
|
||||
'option' => false,
|
||||
'config' => false,
|
||||
'comment' => false,
|
||||
'commentApprove' => false,
|
||||
'commentDelete' => false,
|
||||
'commentDeleteAll' => false,
|
||||
],
|
||||
'form' => [
|
||||
'option' => false,
|
||||
'config' => false,
|
||||
'data' => false,
|
||||
'delete' => false,
|
||||
'deleteAll' => false,
|
||||
'export2csv' => false,
|
||||
],
|
||||
'gallery' => [
|
||||
'config' => false,
|
||||
'delete' => false,
|
||||
'edit' => false,
|
||||
'add' => false,
|
||||
'option' => false,
|
||||
'theme' => false,
|
||||
'dirs' => false,
|
||||
'sortGalleries' => false,
|
||||
'sortPictures' => false,
|
||||
],
|
||||
'news' => [
|
||||
'add' => false,
|
||||
'config' => false,
|
||||
'option' => false,
|
||||
'delete' => false,
|
||||
'edit' => false,
|
||||
],
|
||||
'redirection' => [
|
||||
'config' => false,
|
||||
],
|
||||
'search' => [
|
||||
'config' => false,
|
||||
],
|
||||
'user' => [
|
||||
'edit' => true,
|
||||
]
|
||||
],
|
||||
],
|
||||
'2' => [
|
||||
'1' => [
|
||||
'name' => 'Éditeur simple',
|
||||
'readonly' => false,
|
||||
'permanent' => true,
|
||||
'comment' => 'Édition des pages',
|
||||
'filemanager' => true,
|
||||
'file' => [
|
||||
'download' => true,
|
||||
'edit' => true,
|
||||
'create' => true,
|
||||
'rename' => true,
|
||||
'upload' => true,
|
||||
'delete' => false,
|
||||
'preview' => true,
|
||||
'duplicate' => false,
|
||||
'extract' => false,
|
||||
'copycut' => false,
|
||||
'chmod' => false
|
||||
],
|
||||
'folder' => [
|
||||
'create' => false,
|
||||
'delete' => false,
|
||||
'rename' => false,
|
||||
'copycut' => false,
|
||||
'chmod' => false,
|
||||
'share' => true,
|
||||
'path' => '/site/file/source/partage/',
|
||||
],
|
||||
'page' => [
|
||||
'add' => false,
|
||||
'delete' => false,
|
||||
'duplicate' => false,
|
||||
'edit' => true,
|
||||
'jsEditor' => true,
|
||||
'cssEditor' => true,
|
||||
'module' => true,
|
||||
],
|
||||
'blog' => [
|
||||
'add' => true,
|
||||
'delete' => false,
|
||||
'edit' => true,
|
||||
'option' => false,
|
||||
'config' => false,
|
||||
'comment' => false,
|
||||
'commentApprove' => false,
|
||||
'commentDelete' => false,
|
||||
'commentDeleteAll' => false,
|
||||
],
|
||||
'form' => [
|
||||
'option' => false,
|
||||
'config' => false,
|
||||
'data' => false,
|
||||
'delete' => false,
|
||||
'deleteAll' => false,
|
||||
'export2csv' => false,
|
||||
|
||||
],
|
||||
'gallery' => [
|
||||
'config' => false,
|
||||
'delete' => false,
|
||||
'edit' => false,
|
||||
'add' => false,
|
||||
'option' => false,
|
||||
'theme' => false,
|
||||
],
|
||||
'news' => [
|
||||
'add' => true,
|
||||
'config' => false,
|
||||
'option' => false,
|
||||
'delete' => false,
|
||||
'edit' => true,
|
||||
],
|
||||
'redirection' => [
|
||||
'config' => false,
|
||||
],
|
||||
'search' => [
|
||||
'config' => false,
|
||||
],
|
||||
'user' => [
|
||||
'edit' => true,
|
||||
]
|
||||
],
|
||||
'2' => [
|
||||
'name' => 'Rédacteur',
|
||||
'readonly' => false,
|
||||
'permanent' => false,
|
||||
'comment' => 'Tous les droits d\'édition des contenus',
|
||||
'filemanager' => true,
|
||||
'file' => [
|
||||
'download' => true,
|
||||
'edit' => true,
|
||||
'create' => true,
|
||||
'rename' => true,
|
||||
'upload' => true,
|
||||
'delete' => true,
|
||||
'preview' => true,
|
||||
'duplicate' => true,
|
||||
'extract' => true,
|
||||
'copycut' => true,
|
||||
'chmod' => true
|
||||
],
|
||||
'folder' => [
|
||||
'create' => true,
|
||||
'delete' => true,
|
||||
'rename' => true,
|
||||
'copycut' => true,
|
||||
'chmod' => true,
|
||||
'share' => true,
|
||||
'path' => '/site/file/source/partage/',
|
||||
],
|
||||
'page' => [
|
||||
'add' => true,
|
||||
'delete' => true,
|
||||
'duplicate' => true,
|
||||
'edit' => true,
|
||||
'jsEditor' => true,
|
||||
'cssEditor' => true,
|
||||
'module' => true,
|
||||
],
|
||||
'blog' => [
|
||||
'add' => true,
|
||||
'delete' => true,
|
||||
'edit' => true,
|
||||
'option' => true,
|
||||
'config' => true,
|
||||
'comment' => true,
|
||||
'commentApprove' => true,
|
||||
'commentDelete' => true,
|
||||
'commentDeleteAll' => true,
|
||||
],
|
||||
'form' => [
|
||||
'option' => true,
|
||||
'config' => true,
|
||||
'data' => true,
|
||||
'delete' => true,
|
||||
'deleteAll' => true,
|
||||
'export2csv' => true,
|
||||
],
|
||||
'gallery' => [
|
||||
'config' => true,
|
||||
'delete' => true,
|
||||
'edit' => true,
|
||||
'add' => true,
|
||||
'option' => true,
|
||||
'theme' => true,
|
||||
],
|
||||
'news' => [
|
||||
'add' => true,
|
||||
'config' => true,
|
||||
'option' => true,
|
||||
'delete' => true,
|
||||
'edit' => true,
|
||||
],
|
||||
'redirection' => [
|
||||
'config' => true,
|
||||
],
|
||||
'search' => [
|
||||
'config' => true,
|
||||
],
|
||||
'user' => [
|
||||
'edit' => true,
|
||||
]
|
||||
],
|
||||
],
|
||||
'3' => [
|
||||
'name' => 'Administrateur',
|
||||
'readonly' => true,
|
||||
'permanent' => true,
|
||||
'comment' => 'Contrôle total',
|
||||
]
|
||||
]
|
||||
'blacklist' => []
|
||||
];
|
||||
public static $defaultDataI18n = [
|
||||
'fr_FR' => [
|
||||
'locale' => [
|
||||
'homePageId' => 'accueil',
|
||||
'page302' => 'none',
|
||||
'page403' => 'none',
|
||||
'page404' => 'none',
|
||||
'legalPageId' => 'none',
|
||||
'searchPageId' => 'none',
|
||||
'searchPageLabel' => 'Rechercher',
|
||||
'sitemapPageLabel' => 'Plan du site',
|
||||
'legalPageLabel' => 'Mentions légales',
|
||||
'metaDescription' => 'Zwii est un CMS sans base de données qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.',
|
||||
'title' => 'Votre site en quelques clics !',
|
||||
'cookies' => [
|
||||
'mainLabel' => '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.',
|
||||
'titleLabel' => 'Cookies essentiels',
|
||||
'linkLegalLabel' => 'Consulter les mentions légales',
|
||||
'cookiesFooterText' => 'Cookies',
|
||||
'buttonValidLabel' => 'J\'ai compris'
|
||||
]
|
||||
],
|
||||
'page' => [
|
||||
'accueil' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => 'accueil.html',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => true,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 1,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Accueil',
|
||||
'shortTitle' => 'Accueil',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
]
|
||||
],
|
||||
'module' => [],
|
||||
'html' => '<h2>Bienvenue dans cette nouvelle installation de ZwiiCMS. Créez et gérez votre site facilement avec notre système convivial.</h2>'
|
||||
],
|
||||
'es' => [
|
||||
'locale' => [
|
||||
'homePageId' => 'inicio',
|
||||
'page302' => 'none',
|
||||
'page403' => 'none',
|
||||
'page404' => 'none',
|
||||
'legalPageId' => 'none',
|
||||
'searchPageId' => 'none',
|
||||
'searchPageLabel' => 'none',
|
||||
'sitemapPageLabel' => 'none',
|
||||
'legalPageLabel' => 'legales',
|
||||
"metaDescription" => "Zwii es un CMS sin base de datos que facilita la creación y gestión de un sitio web sin necesidad de conocimientos de programación.",
|
||||
"title" => "¡Tu sitio en unos clics!",
|
||||
"cookies" => [
|
||||
"mainLabel" => "Este sitio web utiliza cookies necesarias para su funcionamiento. Estas cookies permiten optimizar su funcionamiento, por ejemplo, memorizando los datos de conexión, el idioma que has elegido o la validación de este mensaje.",
|
||||
"titleLabel" => "Cookies esenciales",
|
||||
"linkLegalLabel" => "Consultar el aviso legal",
|
||||
"cookiesFooterText" => "Cookies",
|
||||
"buttonValidLabel" => "Aceptar"
|
||||
]
|
||||
],
|
||||
'page' => [
|
||||
'inicio' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => 'inico.html',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => true,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 1,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Página de inicio',
|
||||
'shortTitle' => 'Página de inicio',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
]
|
||||
],
|
||||
'module' => [],
|
||||
'html' => '<h2>¡Bienvenido/a a esta nueva instalación de ZwiiCMS!</h2><p>Crea y administra tu sitio web de manera sencilla con nuestro sistema amigable.</p><p>Esta es tu primera página, inicia sesión para crear nuevas.</p>'
|
||||
],
|
||||
'default' => [
|
||||
'en_EN' => [
|
||||
'locale' => [
|
||||
'homePageId' => 'home',
|
||||
'page302' => 'none',
|
||||
@ -773,7 +345,6 @@ class init extends common
|
||||
'searchPageId' => 'none',
|
||||
'searchPageLabel' => 'none',
|
||||
'sitemapPageLabel' => 'none',
|
||||
'poweredPageLabel' => 'Powered by',
|
||||
'legalPageLabel' => 'legals',
|
||||
'metaDescription' => 'Zwii is a database-free CMS that makes it easy to create and manage a website without any programming knowledge.',
|
||||
'title' => 'Your site in a few clicks!',
|
||||
@ -801,9 +372,8 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'position' => 1,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Home page',
|
||||
'title' => 'HomePage',
|
||||
'shortTitle' => 'Home',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
@ -816,11 +386,12 @@ class init extends common
|
||||
'js' => ''
|
||||
]
|
||||
],
|
||||
'module' => [],
|
||||
'html' => '<h2>Welcome to this new installation of ZwiiCMS.</h2><p>Easily create and manage your website with our user-friendly system.</p><p>This is your first page, log in to create new ones.</p>'
|
||||
'html' => 'Welcome in this ZiiCMS, this is you first page !'
|
||||
]
|
||||
];
|
||||
public static $siteTemplate = [
|
||||
|
||||
|
||||
public static $siteData = [
|
||||
'page' => [
|
||||
'accueil' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -837,7 +408,6 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'position' => 1,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Accueil',
|
||||
'shortTitle' => 'Accueil',
|
||||
@ -865,14 +435,13 @@ class init extends common
|
||||
'parentPageId' => 'accueil',
|
||||
'position' => 1,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Page Enfant',
|
||||
'shortTitle' => 'Enfant',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'extraPosition' => false,
|
||||
@ -893,14 +462,13 @@ class init extends common
|
||||
'modulePosition' => 'bottom',
|
||||
'position' => 2,
|
||||
'group' => self::GROUP_MEMBER,
|
||||
'profil' => 1,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Page privée',
|
||||
'shortTitle' => 'Privée',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'extraPosition' => false,
|
||||
@ -921,14 +489,13 @@ class init extends common
|
||||
'modulePosition' => 'bottom',
|
||||
'position' => 2,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Mise en page',
|
||||
'shortTitle' => 'Mise en page',
|
||||
'block' => '4-8',
|
||||
'barLeft' => 'barre',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'extraPosition' => false,
|
||||
@ -949,14 +516,13 @@ class init extends common
|
||||
'modulePosition' => 'bottom',
|
||||
'position' => 3,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Barre latérale avec menu',
|
||||
'shortTitle' => 'Menu latéral',
|
||||
'block' => '9-3',
|
||||
'barLeft' => '',
|
||||
'barRight' => 'barrelateraleavecmenu',
|
||||
'displayMenu' => 'none',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'extraPosition' => false,
|
||||
@ -977,14 +543,13 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'position' => 3,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Blog',
|
||||
'shortTitle' => 'Blog',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'extraPosition' => false,
|
||||
@ -1005,14 +570,13 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'position' => 4,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Galeries d\'images',
|
||||
'shortTitle' => 'Galeries',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'extraPosition' => false,
|
||||
@ -1034,7 +598,6 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'position' => 5,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => true,
|
||||
'title' => 'Site de Zwii',
|
||||
'shortTitle' => 'Site de Zwii',
|
||||
@ -1062,7 +625,6 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'position' => 6,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Contact',
|
||||
'shortTitle' => 'Contact',
|
||||
@ -1090,7 +652,6 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'position' => 0,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Barre latérale',
|
||||
'shortTitle' => 'Barre latérale',
|
||||
@ -1118,7 +679,6 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'position' => 0,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Barre latérale avec menu',
|
||||
'shortTitle' => 'Barre latérale avec menu',
|
||||
@ -1145,8 +705,7 @@ class init extends common
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 0,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'group' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Mentions légales',
|
||||
'shortTitle' => 'Mentions légales',
|
||||
@ -1175,7 +734,6 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'position' => 0,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Maintenance en cours',
|
||||
'shortTitle' => 'Maintenance en cours',
|
||||
@ -1204,7 +762,6 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'position' => 0,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Erreur 403',
|
||||
'shortTitle' => 'Erreur 403',
|
||||
@ -1232,7 +789,6 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'position' => 0,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Erreur 404',
|
||||
'shortTitle' => 'Erreur 404',
|
||||
@ -1260,7 +816,6 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'position' => 7,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'profil' => 0,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Recherche dans le site',
|
||||
'shortTitle' => 'Rechercher',
|
||||
@ -1299,17 +854,17 @@ class init extends common
|
||||
'picturePosition' => 'left',
|
||||
'hidePicture' => false,
|
||||
'pictureSize' => 20,
|
||||
'picturePosition' => 'left',
|
||||
'publishedOn' => 1548790902,
|
||||
'state' => true,
|
||||
'title' => 'Mon premier article',
|
||||
'userId' => '',
|
||||
// Géré au moment de l'installation
|
||||
'userId' => '', // Géré au moment de l'installation
|
||||
'editConsent' => 'all',
|
||||
'commentMaxlength' => '500',
|
||||
'commentApproved' => false,
|
||||
'commentClose' => false,
|
||||
'commentNotification' => false,
|
||||
'commentGroupNotification' => 1
|
||||
'commentApproved' => false,
|
||||
'commentClose' => false,
|
||||
'commentNotification' => false,
|
||||
'commentGroupNotification' => 1
|
||||
],
|
||||
'mon-deuxieme-article' => [
|
||||
'closeComment' => false,
|
||||
@ -1319,17 +874,17 @@ class init extends common
|
||||
'hidePicture' => false,
|
||||
'picturePosition' => 'right',
|
||||
'pictureSize' => 40,
|
||||
'picturePosition' => 'right',
|
||||
'publishedOn' => 1550432502,
|
||||
'state' => true,
|
||||
'title' => 'Mon deuxième article',
|
||||
'userId' => '',
|
||||
// Géré au moment de l'installation
|
||||
'userId' => '', // Géré au moment de l'installation
|
||||
'editConsent' => 'all',
|
||||
'commentMaxlength' => '500',
|
||||
'commentApproved' => false,
|
||||
'commentClose' => false,
|
||||
'commentNotification' => false,
|
||||
'commentGroupNotification' => 1
|
||||
'commentApproved' => false,
|
||||
'commentClose' => false,
|
||||
'commentNotification' => false,
|
||||
'commentGroupNotification' => 1
|
||||
],
|
||||
'mon-troisieme-article' => [
|
||||
'closeComment' => true,
|
||||
@ -1339,17 +894,17 @@ class init extends common
|
||||
'hidePicture' => false,
|
||||
'picturePosition' => 'left',
|
||||
'pictureSize' => 100,
|
||||
'picturePosition' => 'left',
|
||||
'publishedOn' => 1550864502,
|
||||
'state' => true,
|
||||
'title' => 'Mon troisième article',
|
||||
'userId' => '',
|
||||
// Géré au moment de l'installation
|
||||
'userId' => '', // Géré au moment de l'installation
|
||||
'editConsent' => 'all',
|
||||
'commentMaxlength' => '500',
|
||||
'commentApproved' => false,
|
||||
'commentClose' => false,
|
||||
'commentNotification' => false,
|
||||
'commentGroupNotification' => 1
|
||||
'commentApproved' => false,
|
||||
'commentClose' => false,
|
||||
'commentNotification' => false,
|
||||
'commentGroupNotification' => 1
|
||||
],
|
||||
],
|
||||
],
|
||||
@ -1361,9 +916,7 @@ class init extends common
|
||||
'directory' => self::FILE_DIR . 'source/galerie/landscape',
|
||||
'homePicture' => 'iceberg.jpg',
|
||||
'sort' => 'SORT_ASC',
|
||||
'position' => 1,
|
||||
'showPageContent' => false,
|
||||
'fullScreen' => false
|
||||
'position' => 1
|
||||
],
|
||||
'legend' => [
|
||||
'desertjpg' => 'Un désert',
|
||||
@ -1382,9 +935,7 @@ class init extends common
|
||||
'directory' => self::FILE_DIR . 'source/galerie/space',
|
||||
'homePicture' => 'nebula.jpg',
|
||||
'sort' => 'SORT_ASC',
|
||||
'position' => 2,
|
||||
'showPageContent' => false,
|
||||
'fullScreen' => false
|
||||
'position' => 2
|
||||
],
|
||||
'legend' => [
|
||||
'earthjpg' => 'La Terre et la Lune',
|
||||
@ -1399,24 +950,24 @@ class init extends common
|
||||
],
|
||||
],
|
||||
'theme' => [
|
||||
'thumbAlign' => 'center',
|
||||
'thumbWidth' => '18em',
|
||||
'thumbHeight' => '15em',
|
||||
'thumbMargin' => '.5em',
|
||||
'thumbBorder' => '.1em',
|
||||
'thumbOpacity' => '.7',
|
||||
'thumbAlign' => 'center',
|
||||
'thumbWidth' => '18em',
|
||||
'thumbHeight' => '15em',
|
||||
'thumbMargin' => '.5em',
|
||||
'thumbBorder' => '.1em',
|
||||
'thumbOpacity' => '.7',
|
||||
'thumbBorderColor' => 'rgba(221, 221, 221, 1)',
|
||||
'thumbRadius' => '.3em',
|
||||
'thumbShadows' => '1px 1px 10px',
|
||||
'thumbRadius' => '.3em',
|
||||
'thumbShadows' => '1px 1px 10px',
|
||||
'thumbShadowsColor' => 'rgba(125, 125, 125, 1)',
|
||||
'legendHeight' => '.375em',
|
||||
'legendAlign' => 'center',
|
||||
'legendTextColor' => 'rgba(255, 255, 255, 1)',
|
||||
'legendBgColor' => 'rgba(0, 0, 0, .6)',
|
||||
'style' => 'site/data/modules/gallery/galeries.css'
|
||||
'legendHeight' => '.375em',
|
||||
'legendAlign' => 'center',
|
||||
'legendTextColor' => 'rgba(255, 255, 255, 1)',
|
||||
'legendBgColor' => 'rgba(0, 0, 0, .6)',
|
||||
'style' => 'site/data/modules/gallery/galeries.css'
|
||||
],
|
||||
'config' => [
|
||||
'versionData' => '3.0'
|
||||
'versionData' => '3.0'
|
||||
],
|
||||
],
|
||||
'site-de-zwii' => [
|
||||
@ -1434,7 +985,7 @@ class init extends common
|
||||
'data' => [],
|
||||
'input' => [
|
||||
[
|
||||
'name' => 'Adresse électronique',
|
||||
'name' => 'Adresse mail',
|
||||
'position' => 1,
|
||||
'required' => true,
|
||||
'type' => 'mail',
|
||||
@ -1464,20 +1015,9 @@ class init extends common
|
||||
'page404' => 'none',
|
||||
'legalPageId' => 'none',
|
||||
'searchPageId' => 'none',
|
||||
'poweredPageLabel' => 'Motorisé par',
|
||||
'searchPageLabel' => 'Rechercher',
|
||||
'sitemapPageLabel' => 'Plan du site',
|
||||
'legalPageLabel' => 'Mentions légales',
|
||||
'metaDescription' => 'Zwii est un CMS sans base de données qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.',
|
||||
'title' => 'Votre site en quelques clics !',
|
||||
'cookies' => [
|
||||
'mainLabel' => '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.',
|
||||
'titleLabel' => 'Cookies essentiels',
|
||||
'linkLegalLabel' => 'Consulter les mentions légales',
|
||||
'cookiesFooterText' => 'Cookies',
|
||||
'buttonValidLabel' => 'J\'ai compris'
|
||||
]
|
||||
],
|
||||
'title' => 'Votre site en quelques clics !'
|
||||
]
|
||||
];
|
||||
|
||||
public static $siteContent = [
|
||||
@ -1550,11 +1090,11 @@ class init extends common
|
||||
<p justify="">Le site internet propose les services suivants :</p>
|
||||
<p justify="">Publication</p>
|
||||
<p justify="">Le site est accessible gratuitement en tout lieu à tout Utilisateur ayant un accès à Internet. Tous les frais supportés par l\'Utilisateur pour accéder au service (matériel informatique, logiciels, connexion Internet, etc.) sont à sa charge.</p>
|
||||
<p justify="">L’Utilisateur non membre n\'a pas accès aux services réservés. Pour cela, il doit s’inscrire en remplissant le formulaire. En acceptant de s’inscrire aux services réservés, l’Utilisateur membre s’engage à fournir des informations sincères et exactes concernant son état civil et ses coordonnées, notamment son Adresse électronique.</p>
|
||||
<p justify="">L’Utilisateur non membre n\'a pas accès aux services réservés. Pour cela, il doit s’inscrire en remplissant le formulaire. En acceptant de s’inscrire aux services réservés, l’Utilisateur membre s’engage à fournir des informations sincères et exactes concernant son état civil et ses coordonnées, notamment son adresse email.</p>
|
||||
<p justify="">Pour accéder aux services, l’Utilisateur doit ensuite s\'identifier à l\'aide de son identifiant et de son mot de passe qui lui seront communiqués après son inscription.</p>
|
||||
<p justify="">Tout Utilisateur membre régulièrement inscrit pourra également solliciter sa désinscription en se rendant à la page dédiée sur son espace personnel. Celle-ci sera effective dans un délai raisonnable.</p>
|
||||
<p justify="">Tout événement dû à un cas de force majeure ayant pour conséquence un dysfonctionnement du site ou serveur et sous réserve de toute interruption ou modification en cas de maintenance, n\'engage pas la responsabilité de www.site.com. Dans ces cas, l’Utilisateur accepte ainsi ne pas tenir rigueur à l’éditeur de toute interruption ou suspension de service, même sans préavis.</p>
|
||||
<p justify="">L\'Utilisateur a la possibilité de contacter le site par messagerie électronique à l’Adresse électronique de l’éditeur communiqué à l’ARTICLE 1.</p>
|
||||
<p justify="">L\'Utilisateur a la possibilité de contacter le site par messagerie électronique à l’adresse email de l’éditeur communiqué à l’ARTICLE 1.</p>
|
||||
<h2>ARTICLE 3 : Collecte des données</h2>
|
||||
<p justify="">Le site est exempté de déclaration à la Commission Nationale Informatique et Libertés (CNIL) dans la mesure où il ne collecte aucune donnée concernant les Utilisateurs.</p>
|
||||
<h2>ARTICLE 4 : Propriété intellectuelle</h2>
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
490
core/module/install/ressource/i18n/it.json
Normal file
490
core/module/install/ressource/i18n/it.json
Normal file
@ -0,0 +1,490 @@
|
||||
{
|
||||
"Se déconnecter ?": "Log out?",
|
||||
"Mettre à jour ?": "Aggiornamento?",
|
||||
"Confirmez-vous la suppression de cette page ?": "Confermi la cancellazione di questa pagina?",
|
||||
"Format incorrect": "Formato non corretto",
|
||||
"Les modifications que vous avez apportées ne seront peut-être pas enregistrées.": "Le modifiche apportate potrebbero non essere salvate",
|
||||
"Oui": "Sì",
|
||||
"Non": "No",
|
||||
"Identifiant": "Nome utente",
|
||||
"Mot de passe": "Password",
|
||||
"Confirmation": "Conferma",
|
||||
"Adresse électronique": "Indirizzo e-mail",
|
||||
"Prénom": "Nome",
|
||||
"Nom": "Cognome",
|
||||
"Ne pas charger l'exemple de site (utilisateurs avancés)": "Non caricare il sito di esempio (utenti avanzati)",
|
||||
"Type de proxy": "Tipo di proxy",
|
||||
"Adresse du proxy": "Indirizzo proxy",
|
||||
"Port du proxy": "Porta proxy",
|
||||
"Thème": "Tema",
|
||||
"Installer": "Installa",
|
||||
"Consulter l'aide en ligne": "Consultare la guida in linea",
|
||||
"favicon.ico": "favicon.ico",
|
||||
"Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.": "Considerate di cancellare la cache del browser se la favicon non cambia",
|
||||
"faviconDark.ico": "faviconDark.ico",
|
||||
"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.": "Selezionare un'icona adatta a un tema scuro.<br>Ricordarsi di cancellare la cache del browser se la favicon non cambia.",
|
||||
"Fuseau horaire": "Fuso orario",
|
||||
"Le fuseau horaire est utile au bon référencement": "Il fuso orario è utile per una buona SEO.",
|
||||
"Message de consentement aux cookies": "Messaggio di consenso ai cookie",
|
||||
"Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.": "Attivazione obbligatoria secondo le leggi francesi, a meno che non si utilizzi il proprio sistema di consenso.",
|
||||
"Apache URL intelligentes": "Apache Smart URLs",
|
||||
"Supprime le point d'interrogation dans les URL, l'option est indisponible avec les autres serveurs Web": "Rimuove il punto interrogativo negli URL; l'opzione non è disponibile con altri server web",
|
||||
"Rechercher une mise à jour en ligne": "Cercare un aggiornamento online",
|
||||
"La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.": "La verifica è quotidiana. Disattivato se la configurazione del server non lo consente.",
|
||||
"Préserver le fichier htaccess racine": "Conserva il file htaccess principale",
|
||||
"Lors d'une mise à jour automatique, conserve le fichier htaccess de la racine du site.": "Durante un aggiornamento automatico, conserva il file htaccess principale del sito.",
|
||||
"Sauvegarde automatique quotidienne du site": "Backup automatico giornaliero del sito",
|
||||
"Une archive du dossier /site/data est conservée pendant 30 jours. Activation recommandée": "Un archivio della directory /sito/dati viene conservato per 30 giorni. Attivazione consigliata",
|
||||
"Site en maintenance": "Sito in mantenimento",
|
||||
"Clé de l'API <a href='https://app.screenshotapi.net/' target='_blank'>ScreenShotApi</a>": "Chiave API <a href='https://app.screenshotapi.net/' target='_blank'>ScreenShotApi</a>",
|
||||
"Saisir la clé, puis valider le formulaire avant de cliquer sur le bouton de génération": "Inserire la chiave, quindi convalidare il modulo prima di fare clic sul pulsante di generazione",
|
||||
"Autoriser les robots à référencer le site": "Consentire ai robot di fare riferimento al sito",
|
||||
"Facebook": "Facebook",
|
||||
"Saisissez votre ID : https://www.facebook.com/[ID].": "Inserire il proprio ID: https://www.facebook.com/[ID].",
|
||||
"Instagram": "Instagram",
|
||||
"Saisissez votre ID : https://www.instagram.com/[ID].": "Inserire il proprio ID: https://www.instagram.com/[ID].",
|
||||
"Chaîne Youtube": "Canale Youtube",
|
||||
"ID de la chaîne : https://www.youtube.com/channel/[ID].": "ID del canale: https://www.youtube.com/channel/[ID].",
|
||||
"Youtube": "Youtube",
|
||||
"Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].": "Inserire il proprio ID: https://www.youtube.com/user/[ID].",
|
||||
"Twitter": "Twitter",
|
||||
"Saisissez votre ID : https://twitter.com/[ID].": "Inserire il proprio ID: https://twitter.com/[ID].",
|
||||
"Pinterest": "Pinterest",
|
||||
"Saisissez votre ID : https://pinterest.com/[ID].": "Inserire il proprio ID: https://pinterest.com/[ID].",
|
||||
"Linkedin": "Linkedin",
|
||||
"Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].": "Inserire il proprio ID Linkedin: https://fr.linkedin.com/in/[ID].",
|
||||
"Github": "Github",
|
||||
"Saisissez votre ID Github : https://github.com/[ID].": "Inserire il proprio ID Github: https://github.com/[ID].",
|
||||
"Dévoiler le mot de passe": "Svelare il password",
|
||||
"Le survol d'une icône de l'écran de connexion affiche temporairement le mot de passe.": "Passando il mouse su un'icona nella schermata di accesso si visualizza temporaneamente la password",
|
||||
"Déconnexion automatique": "Auto Logout",
|
||||
"Déconnecte les sessions ouvertes précédemment sur d'autres navigateurs ou terminaux. Activation recommandée.": "Disconnette le sessioni precedentemente aperte su altri browser o terminali. Consigliata l'abilitazione",
|
||||
"Redirection vers la connexion": "Reindirizzamento al login",
|
||||
"Cette redirection ne concerne que les pages d'administration du site.": "Questo reindirizzamento è solo per le pagine di amministrazione del sito",
|
||||
"Limitation des tentatives": "Limitazione dei tentativi",
|
||||
"Blocage après échecs": "Blocco dopo i fallimenti",
|
||||
"Captcha à la connexion": "Captcha al login",
|
||||
"Captcha complexe": "captcha complesso",
|
||||
"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.": "Opzione consigliata per proteggere la connessione. Si applica a tutti i captchas del sito. Il captcha semplice si limita all'aggiunta di numeri da 0 a 10. Il captcha complesso utilizza quattro operazioni su numeri da 0 a 20. Attivazione consigliata.",
|
||||
"Type de captcha": "Tipo di Captcha",
|
||||
"Activer la journalisation": "Abilita la registrazione",
|
||||
"Anonymat des adresses IP": "Anonimato degli indirizzi IP",
|
||||
"La réglementation française impose un anonymat de niveau 2": "La legge francese richiede l'anonimato di livello 2",
|
||||
"Activer SMTP": "Attivare SMTP",
|
||||
"Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d'envoi de mail.": "Impostazioni da utilizzare quando l'host non offre la funzionalità di invio della posta.",
|
||||
"Adresse SMTP": "Indirizzo SMTP",
|
||||
"Port SMTP": "Porta SMTP",
|
||||
"Authentification": "Autenticazione",
|
||||
"Nom utilisateur": "Nome utente",
|
||||
"Sécurité": "Sicurezza",
|
||||
"Nouvelle page ou barre latérale": "Nuova pagina o barra laterale",
|
||||
"Éditer la page": "Modifica pagina",
|
||||
"Supprimer la page": "Cancella pagina",
|
||||
"Gérer les modules": "Gestisci moduli",
|
||||
"Configuration": "Configurazione",
|
||||
"Utilisateurs": "Utenti",
|
||||
"Déconnecter": "Disconnessione",
|
||||
"Éditer": "Modifica",
|
||||
"Supprimer": "Cancella",
|
||||
"Importer des utilisateurs en masse": "Importazione di utenti in blocco",
|
||||
"Ajouter un utilisateur": "Aggiungere utente",
|
||||
"Pseudo": "Nickname",
|
||||
"Signature": "Firma",
|
||||
"Groupe": "Gruppo",
|
||||
"Impossible de modifier votre propre groupe.": "Impossibile modificare il proprio gruppo",
|
||||
"Partage de fichiers autorisé": "Condivisione di file consentita",
|
||||
"Ce membre pourra téléverser ou télécharger des fichiers dans le dossier 'partage' et ses sous-dossiers": "Questo membro potrà caricare o scaricare file nella cartella 'share' e nelle sue sottocartelle",
|
||||
"L'identifiant est défini lors de la création du compte, il ne peut pas être modifié.": "Il nome utente viene impostato alla creazione dell'account, non può essere modificato",
|
||||
"Ancien mot de passe": "Password precedente",
|
||||
"Nouveau mot de passe": "Nuova password",
|
||||
"Séparateur": "Separatore",
|
||||
"Envoyer un message de confirmation": "Invia messaggio di conferma",
|
||||
"Prévenir l'utilisateur par mail": "Notifica all'utente via e-mail",
|
||||
"Copie de sites inter-langues": "Copia di siti in più lingue",
|
||||
"Titre du site": "Titolo del sito",
|
||||
"Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.": "Appare nella barra del titolo e viene condiviso sui social network",
|
||||
"Description du site": "Descrizione del sito",
|
||||
"La description d'une page participe à son référencement, chaque page doit disposer d'une description différente.": "La descrizione di una pagina contribuisce alla sua referenziazione; ogni pagina deve avere una descrizione diversa.",
|
||||
"Accueil du site": "Home page",
|
||||
"La première page que vos visiteurs verront.": "La prima pagina che i visitatori vedranno",
|
||||
"Accès interdit, erreur 403": "Accesso negato, errore 403",
|
||||
"Cette page ne doit pas apparaître dans l'arborescence du menu. Créez une page orpheline.": "Questa pagina non dovrebbe apparire nell'albero dei menu. Creare una pagina orfana",
|
||||
"Page inexistante, erreur 404": "La pagina non esiste, errore 404",
|
||||
"Mentions légales": "Avviso legale",
|
||||
"Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.": "Le comunicazioni legali sono obbligatorie in Francia. Un'opzione a piè di pagina aggiunge un link discreto a questa pagina",
|
||||
"Recherche dans le site": "Cerca nel sito",
|
||||
"Sélectionnez une page contenant le module 'Recherche'. Une option du pied de page ajoute un lien discret vers cette page.": "Selezionare una pagina contenente il modulo 'Ricerca'. Un'opzione a piè di pagina aggiunge un link discreto a questa pagina.",
|
||||
"Rechercher": "Ricerca",
|
||||
"Plan du site": "Mappa del sito",
|
||||
"Cookies": "Cookies",
|
||||
"Titre de la fenêtre": "Titolo della finestra",
|
||||
"Saisissez le titre de la fenêtre de gestion des cookies.": "Inserire il titolo della finestra di gestione dei cookie",
|
||||
"Bouton de validation": "Pulsante di convalida",
|
||||
"Cookies Zwii": "Zwii Cookies",
|
||||
"Saisissez le message pour les cookies déposés par ZwiiCMS, nécessaires au fonctionnement et qui ne nécessitent pas de consentement.": "Inserire il messaggio per i cookie depositati da ZwiiCMS, che sono necessari per il funzionamento e non richiedono consenso.",
|
||||
"Lien page des mentions légales.": "Link alla pagina delle note legali.",
|
||||
"Saisissez le texte du lien vers les mentions légales,la page doit être définie dans la configuration du site.": "Inserire il testo del link alla nota legale; la pagina deve essere definita nella configurazione del sito.",
|
||||
"Pages et les modules de": "Pagine e moduli di",
|
||||
"Vers": "A",
|
||||
"Supprimer le module": "Elimina modulo",
|
||||
"Sauvegarder le module dans le gestionnaire de fichiers": "Salva il modulo nel file manager",
|
||||
"Sauvegarder et télécharger le module": "Salva e scarica il modulo",
|
||||
"Sauvegarder les données du module dans le gestionnaire de fichiers": "Salva i dati del modulo nel file manager",
|
||||
"'Sauvegarder et télécharger les données du module": "Salva e scarica i dati del modulo",
|
||||
"Installer depuis le catalogue en ligne": "Installa dal catalogo online",
|
||||
"Installer depuis une archive": "Installa da archivio",
|
||||
"Mettre à jour le module orphelin": "Aggiornamento del modulo orfano",
|
||||
"Télécharger le module dans le gestionnaire de fichiers": "Scarica il modulo nel file manager",
|
||||
"Connexion": "Login",
|
||||
"Ajouter une fonte": "Aggiungi un carattere",
|
||||
"Fonte en ligne": "Font online",
|
||||
"Fonte installée": "Font installata",
|
||||
"Identifiant (sans espace ni majuscule)": "Identificatore (senza spazi o lettere maiuscole)",
|
||||
"Famille": "Famiglia",
|
||||
"Url du fichier de fonte": "Url del file di font",
|
||||
"Réinitialiser avec le thème par défaut": "Reimpostare il tema predefinito",
|
||||
"Arrière plan": "Sfondo",
|
||||
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence.": "Colore visibile senza immagine. Il cursore orizzontale imposta il livello di trasparenza",
|
||||
"Titres": "Titoli",
|
||||
"Texte": "Testo",
|
||||
"Arrière plan des champs": "Sfondo dei campi",
|
||||
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.": "Colore visibile senza immagine. Il cursore orizzontale imposta il livello di trasparenza. Il colore del testo è automatico",
|
||||
"Bordure des champs": "Bordo campo",
|
||||
"Bouton Aide": "Pulsante di aiuto",
|
||||
"Bouton retour": "Pulsante posteriore",
|
||||
"Bouton standard": "Pulsante standard",
|
||||
"Bouton effacement": "Pulsante di cancellazione",
|
||||
"Bouton validation": "Pulsante di convalida",
|
||||
"Police du texte": "Font di testo",
|
||||
"Taille": "Dimensione",
|
||||
"Police des titres": "Font del titolo",
|
||||
"Réinitialiser la feuille de style": "Reimpostare il foglio di stile",
|
||||
"Rester connecté sur ce navigateur": "Rimani connesso su questo browser",
|
||||
"Effacer la page": "Cancella pagina",
|
||||
"Titre": "Titolo",
|
||||
"Titre court": "Titolo breve",
|
||||
"Le titre court est affiché dans les menus. Il peut être identique au titre de la page.": "Il titolo breve viene visualizzato nei menu. Può essere identico al titolo della pagina",
|
||||
"Titre masqué dans la page": "Titolo nascosto nella pagina",
|
||||
"Fil d'Ariane dans le titre": "Breadcrumb nel titolo",
|
||||
"Affiche le nom de la page parente suivi du nom de la page, le titre ne doit pas être masqué.": "Visualizza il nome della pagina madre seguito dal nome della pagina; il titolo non deve essere nascosto",
|
||||
"Position": "Posizione",
|
||||
"'Ne pas afficher' crée une page orpheline non accessible par le biais des menus.": "'Non mostrare' crea una pagina orfana a cui non si può accedere tramite i menu",
|
||||
"Page parent": "Pagina madre",
|
||||
"Emplacement :": "Posizione:",
|
||||
"Le menu accessoire est aligné à droite de la barre de menu, c'est un emplacement réservé aux drapeaux et au bouton de connexion.": "Il menu accessorio è allineato a destra della barra dei menu, è un segnaposto per le bandiere e il pulsante di accesso.",
|
||||
"Page non cliquable": "Pagina non cliccabile",
|
||||
"Option active en mode déconnecté uniquement, les pages enfants sont visibles et accessibles.": "Opzione attiva solo in modalità offline, le pagine dei bambini sono visibili e accessibili",
|
||||
"S'ouvre dans un nouvel onglet": "Si apre in una nuova scheda",
|
||||
"Apparence": "Aspetto",
|
||||
"Sélectionnez une image ou une icône de petite dimension": "Selezionare un'immagine o un'icona piccola",
|
||||
"Masquer les pages enfants dans le menu horizontal": "Nascondi le pagine figlio nel menu orizzontale",
|
||||
"Masquer la page et les pages enfants dans le menu d'une barre latérale": "Nascondi pagina e pagine figlio in un menu della barra laterale",
|
||||
"La page est affichée dans un menu horizontal mais pas dans le menu vertical d'une barre latérale.": "La pagina viene visualizzata in un menu orizzontale ma non nel menu verticale di una barra laterale.",
|
||||
"Module": "Modulo",
|
||||
"En cas de changement de module, les données du module précédent seront supprimées.": "Quando si cambia il modulo, i dati del modulo precedente vengono cancellati.",
|
||||
"Position du module": "Posizione del modulo",
|
||||
"En position libre ajoutez le module en plaçant [MODULE] à l'endroit voulu dans votre page.": "In posizione libera aggiungere il modulo posizionando [MODULO] nel punto desiderato della pagina.",
|
||||
"Feuille de style spécifique à la page.": "Foglio di stile specifico della pagina.",
|
||||
"Instructions JS ou jquery spécifiques à la page.": "Istruzioni JS o jquery specifiche della pagina.",
|
||||
"Gabarits de page - Barre latérale": "Modelli di pagina - Barra laterale",
|
||||
"Pour définir la page comme barre latérale, choisissez l'option dans la liste.": "Per impostare la pagina come barra laterale, scegliere l'opzione dall'elenco.",
|
||||
"Barre latérale gauche :": "Barra laterale sinistra:",
|
||||
"Barre latérale droite :": "Barra laterale destra:",
|
||||
"Contenu du menu vertical": "Contenuto del menu verticale",
|
||||
"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.": "Per impostazione predefinita, il menu viene visualizzato DOPO il contenuto della pagina. Per posizionarlo in una posizione specifica, inserire [MENU] nel contenuto della pagina.",
|
||||
"Groupe requis pour accéder à la page :": "Gruppo richiesto per accedere alla pagina:",
|
||||
"Méta-titre": "Meta titolo",
|
||||
"Méta-description": "Meta descrizione",
|
||||
"Module de la page": "Modulo pagina",
|
||||
"Paramètres de la sauvegarde": "Impostazioni di backup",
|
||||
"Sécurité de la connexion": "Sicurezza della connessione",
|
||||
"Journalisation": "Registrazione",
|
||||
"Paramètres": "Impostazioni",
|
||||
"SMTP": "SMTP",
|
||||
"Archive à restaurer": "Archivio da ripristinare",
|
||||
"Mise à jour automatisée": "Aggiornamento automatico",
|
||||
"Capture d'écran Open Graph": "Schermata Open Graph",
|
||||
"Référencement": "Referenziamento",
|
||||
"Réseaux sociaux": "Reti sociali",
|
||||
"Renseignez les champs ci-dessous pour finaliser l'installation.": "Compilare i campi sottostanti per completare l'installazione.",
|
||||
"Compte administrateur": "Account amministratore",
|
||||
"Options avancées": "Opzioni avanzate",
|
||||
"Mise à jour de ZwiiCMS": "Aggiornare ZwiiCMS",
|
||||
"vers ZwiiCMS": "a ZwiiCMS",
|
||||
"Afin d'assurer le bon fonctionnement de Zwii, veuillez ne pas fermer cette page avant la fin de l'opération.": "Per garantire il corretto funzionamento di Zwii, non chiudere questa pagina fino al completamento dell'operazione.",
|
||||
"1/4 : Préparation...": "1/4 : Preparazione...",
|
||||
"2/4 : Téléchargement...": "2/4 : Download...",
|
||||
"3/4 : Installation...": "3/4: Installazione...",
|
||||
"4/4 : Configuration...": "4/4 : Configurazione...",
|
||||
"Une erreur est survenue lors de l'étape :": "Si è verificato un errore nel passaggio:",
|
||||
"Mise à jour terminée avec succès.": "Aggiornamento completato con successo.",
|
||||
"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.": "Il nostro sito è attualmente in manutenzione. Ci scusiamo per l'inconveniente e stiamo facendo del nostro meglio per tornare presto",
|
||||
"Installer les données d'un module": "Installazione di dati da un modulo",
|
||||
"Sauvegarde": "Backup",
|
||||
"Modules orphelins": "Moduli orfani",
|
||||
"Modules configurés": "Moduli configurati",
|
||||
"Modules installés": "Moduli installati",
|
||||
"Données des modules": "Dati dei moduli",
|
||||
"Version n°": "Versione n°",
|
||||
"Du": "Da",
|
||||
"Auteur :": "Autore:",
|
||||
"Licence :": "Licenza:",
|
||||
"Installer ou mettre à jour un module téléchargé": "Installare o aggiornare un modulo scaricato",
|
||||
"Couleurs": "Colori",
|
||||
"Mise en forme du texte": "Formattazione del testo",
|
||||
"Image": "Immagine",
|
||||
"Identité de la fonte": "Identità del carattere",
|
||||
"Disposition": "Layout",
|
||||
"Contenu personnalisé": "Contenuto personalizzato",
|
||||
"Informations": "Informazioni",
|
||||
"Mise en forme du titre": "Formattazione del titolo",
|
||||
"Papier peint": "Sfondo",
|
||||
"Largeur de l'image :": "Larghezza immagine :",
|
||||
"Hauteur de l'image :": "Altezza immagine:",
|
||||
"largeur du site": "Larghezza del sito",
|
||||
"Ratio :": "Rapporto :",
|
||||
"largeur de site :": "larghezza del sito:",
|
||||
"Installer un thème archivé (site ou administration)": "Installa il tema archiviato (sito o amministrazione)",
|
||||
"Sauvegarde du thème dans le": "Salva tema nel",
|
||||
"gestionnaire de fichiers": "File manager",
|
||||
"Télécharger le thème": "Scarica il tema",
|
||||
"Contenu": "Contenuto",
|
||||
"Mise en forme des titres": "Formattazione dei titoli",
|
||||
"Copie des traductions rédigées": "Copia di traduzioni scritte",
|
||||
"Identité": "Identità",
|
||||
"Permissions :": "Autorizzazioni:",
|
||||
"Accès aux pages privées": "Accesso alle pagine private",
|
||||
"Ajout - Édition - Suppression de fichiers": "Aggiungi - Modifica - Elimina file",
|
||||
"Administration complète du site": "Amministrazione completa del sito",
|
||||
"Importation de fichier plat CSV": "Importazione di un file piatto CSV",
|
||||
"Confirmer la suppression de cet utilisateur": "Confermare la cancellazione di questo utente",
|
||||
"Sauvegarde générée avec succès.": "Backup generato con successo",
|
||||
"Erreur : sauvegarde non générée !": "Errore: backup non generato!",
|
||||
"Sauvegarder": "Salva",
|
||||
"La sauvegarde des fichiers peut prendre du temps. Continuer ?": "Il backup dei file può richiedere del tempo. Continuare?",
|
||||
"Supprimer toutes les sauvegardes automatiques ?": "Cancellare tutti i backup automatici?",
|
||||
"Préparation de la mise à jour": "Preparazione dell'aggiornamento",
|
||||
"Téléchargement et validation de l'archive": "Scaricare e convalidare l'archivio",
|
||||
"Installation": "Installazione",
|
||||
"Confirmer la suppression de la page": "Confermare la cancellazione della pagina",
|
||||
"Confirmer la suppression des données du module": "Confermare la cancellazione dei dati del modulo",
|
||||
"Ne pas afficher": "Non visualizzare",
|
||||
"Au début": "All'inizio",
|
||||
"Après": "Dopo",
|
||||
"Confirmer la désinstallation du module": "Confermare la disinstallazione del modulo",
|
||||
"Confirmer la dissociation du module de cette page": "Confermare la dissociazione del modulo da questa pagina",
|
||||
"Sauvegarder les données du site": "Salva i dati del sito",
|
||||
"Restaurer les données du site": "Ripristino dei dati del sito",
|
||||
"Vider dossier sauvegardes auto": "Svuota la cartella di backup automatico",
|
||||
"Copier sauvegardes auto": "Copia dei backup automatici",
|
||||
"Réinstaller": "Reinstallare",
|
||||
"Script dans head": "Scrittura in testa",
|
||||
"Script dans body": "Script nel corpo",
|
||||
"Générer une capture Open Graph": "Generare l'acquisizione di Open Graph",
|
||||
"Générer sitemap.xml et robots.txt": "Generare sitemap.xml e robots.txt",
|
||||
"Télécharger la liste": "Scaricare l'elenco",
|
||||
"Réinitialiser la liste": "Reset del elenco",
|
||||
"Télécharger le journal": "Scaricare log",
|
||||
"Réinitialiser le journal": "Registrazione reset",
|
||||
"Fond du sous-menu": "Sfondo del sottomenu",
|
||||
"Liens": "Link",
|
||||
"Arrière plan des blocs": "Sfondo dei blocchi",
|
||||
"Bordure des blocs": "Confini dei blocchi",
|
||||
"Boutons": "Pulsanti",
|
||||
"Thème du site": "Tema del sito",
|
||||
"Thème de l'administration": "Tema dell'amministrazione",
|
||||
"Appliquer": "Applicare",
|
||||
"Enregistrer": "Salva",
|
||||
"Éditeur CSS": "Editor CSS",
|
||||
"Éditeur JS": "Editor JS",
|
||||
"Ne pas saisir les balises": "Non inserire i tag",
|
||||
"Accueil": "Casa",
|
||||
"Aide": "Aiuto",
|
||||
"Fontes": "Caratteri",
|
||||
"Gestion": "Gestione",
|
||||
"Administration": "Amministrazione",
|
||||
"Langues": "Lingue",
|
||||
"Langues de l'interface": "Linguaggi di interfaccia",
|
||||
"Éditer les dialogues": "Modifica finestre",
|
||||
"Langues installées": "Lingue installate",
|
||||
"Langues du site": "Lingue del sito",
|
||||
"Interface": "Interfaccia",
|
||||
"Langue de l'administration": "Lingua dell'amministrazione",
|
||||
"Dans quelle langue utiliserez-vous Zwii ?": "In quale lingua utilizzerete Zwii?",
|
||||
"Maintenance": "Manutenzione",
|
||||
"Scripts externes": "Script esterni",
|
||||
"Version": "Versione",
|
||||
"Catégorie": "Categoria",
|
||||
"Page": "Pagina",
|
||||
"Page associée": "Pagina correlata",
|
||||
"Copie de contenus localisés": "Copia del contenuto localizzato",
|
||||
"Nouveau contenu localisé": "Nuovo contenuto localizzato",
|
||||
"Sélectionnez une langue": "Selezionare una lingua",
|
||||
"Langues disponibles": "Lingue disponibili",
|
||||
"Sélectionnez la langue à copier vers une langue cible": "Selezionare la lingua da copiare in una lingua di destinazione",
|
||||
"De": "Da",
|
||||
"vers": "A",
|
||||
"Action interdite": "Azione vietata",
|
||||
"Modifications enregistrées": "Modifiche salvate",
|
||||
"Éditeur de script %s": "Script Editor %s",
|
||||
"Journal réinitialisé avec succès": "Registro resettato con successo",
|
||||
"Aucun journal à effacer": "Nessun registro da eliminare",
|
||||
"Aucun fichier journal à télécharger": "Nessun file di log da scaricare",
|
||||
"Aucune liste noire à télécharger": "Nessuna lista nera da scaricare",
|
||||
"Liste noire réinitialisée avec succès": "Lista nera resettata con successo",
|
||||
"Aucune liste noire à effacer": "Nessuna lista nera da cancellare",
|
||||
"Copie terminée avec succès": "Copia completata con successo",
|
||||
"Copie terminée avec des erreurs": "Copia completata con errori",
|
||||
"Fichiers effacés": "File eliminati",
|
||||
"Restaurer": "Ripristino",
|
||||
"Restauration effectuée avec succès": "Ripristino completato con successo",
|
||||
"Échecs": "Fallito",
|
||||
"Erreur inconnue": "Errore sconosciuto",
|
||||
"Archive invalide": "Archivio non valido",
|
||||
"URL incorrecte": "URL non corretto",
|
||||
"Paramètres de la localisation": "Impostazioni di posizione",
|
||||
"Mise à jour": "Aggiornamento",
|
||||
"Gestion des modules": "Gestione dei moduli",
|
||||
"Installer un module": "Installare un modulo",
|
||||
"Pied de page": "Piè di pagina",
|
||||
"Bannière": "Banner",
|
||||
"Thèmes": "Temi",
|
||||
"Menu": "Menu",
|
||||
"Site": "Sito",
|
||||
"Gestion des thèmes": "Gestione del tema",
|
||||
"Nouvel utilisateur": "Nuovo utente",
|
||||
"Mot de passe oublié": "Password dimenticata",
|
||||
"Réinitialisation du mot de passe": "Reimpostare la password",
|
||||
"Importation d'utilisateurs": "Importazione di utenti",
|
||||
"Contenu avancé": "Contenuto avanzato",
|
||||
"Mise en page": "Layout",
|
||||
"Permission et référencement": "Permessi e riferimenti",
|
||||
"Le curseur horizontal règle le niveau de transparence, le placer tout à la gauche pour un surlignement invisible.": "Il cursore orizzontale regola il livello di trasparenza; posizionarlo all'estrema sinistra per ottenere un'evidenziazione invisibile",
|
||||
"Contenu multilangues": "Contenuto multilingue",
|
||||
"Multilangue": "Multilingua",
|
||||
"Extension": "Estensione",
|
||||
"Permission": "Autorizzazione",
|
||||
"Emplacement dans le menu": "Posizione nel menu",
|
||||
"Réseau": "Rete",
|
||||
"Étiquettes des pages spéciales": "Etichette di pagina speciali",
|
||||
"Identité du site": "Identità del sito",
|
||||
"Message d'acceptation des Cookies": "Messaggio di accettazione dei cookie",
|
||||
"Favicon thème sombre": "Favicon tema scuro",
|
||||
"Apache URL intelligent": "Apache URL smart",
|
||||
"Liste noire": "Liste nera",
|
||||
"Ajout - Édition - Suppression de pages": "Aggiungere - Modificare - Cancellare pagine",
|
||||
"Importer": "Importazione",
|
||||
"Clé de l'API <a href=\"https://app.screenshotapi.net/\" target=\"_blank\">ScreenShotApi</a>": "Chiave API<a href=\"https://app.screenshotapi.net/\" target=\"_blank\">ScreenShotApi</a>",
|
||||
"Créez un compte gratuit, recopier la clé , puis valider le formulaire avant de cliquer sur le bouton de génération": "Creare un account gratuito, copiare la chiave, quindi convalidare il modulo prima di fare clic sul pulsante genera",
|
||||
"La clé de l'API ne peut pas être vide": "La chiave API non può essere vuota",
|
||||
"Service en ligne inaccessible": "Servizio online inaccessibile",
|
||||
"La carte du site a été mise à jour": "La mappa del sito è stata aggiornata",
|
||||
"Echec de l'écriture, vérifiez les permissions": "Scrittura fallita, controllare i permessi",
|
||||
"Capture d'écran générée avec succès": "Screenshot generato con successo",
|
||||
"Inclure le contenu du gestionnaire de fichiers": "Includi il contenuto del gestore del sito",
|
||||
"Si le contenu du gestionnaire de fichiers est très volumineux, mieux vaut une copie par FTP.": "Se il contenuto del file manager è molto grande, meglio copiare via FTP",
|
||||
"Retour": "Indietro",
|
||||
"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'archivio è stato scaricato nel file manager. Gli archivi inferiori alla versione 9 non sono accettati.",
|
||||
"Préserver les comptes des utilisateurs déjà installés": "Conserva gli account utente già installati",
|
||||
"Éditeur de script dans Head": "Editor di script in Head.",
|
||||
"Valider": "Convalidare",
|
||||
"Éditeur de script dans Body": "Editor di script in Body",
|
||||
"FontId": "FontId",
|
||||
"Affectation": "Assegnazione",
|
||||
"Origine": "Origine",
|
||||
"Bouton Standard": "Pulsante standard",
|
||||
"Configuration du module": "Configurazione del modulo",
|
||||
"Installation terminée": "Installazione completata",
|
||||
"Jeton invalide": "Token non valido",
|
||||
"Suppression interdite": "Cancellazione vietata",
|
||||
"Page dupliquée": "Pagina duplicata",
|
||||
"Page et module dupliqués": "Pagina e modulo duplicati",
|
||||
"Nouvelle page créée": "Nuova pagina creata",
|
||||
"Suppression interdite, page active dans la configuration du site": "Cancellazione vietata, pagina attiva nella configurazione del sito",
|
||||
"Impossible de supprimer une page contenant des pages enfants": "Impossibile cancellare una pagina contenente pagine figlio",
|
||||
"Page supprimée": "Pagina eliminata",
|
||||
"La suppression a échoué": "Cancellazione fallita",
|
||||
"Le module %s est désinstallé, il reste peut-être des données dans %s": "Il modulo %s è stato disinstallato, potrebbero essere rimasti dei dati in %s",
|
||||
"Archive invalide, le descripteur est absent": "Archivio non valido, manca il descrittore",
|
||||
"Archive invalide, les dossiers ne correspondent pas au descripteur": "Archivio non valido, le cartelle non corrispondono al descrittore",
|
||||
"Archive invalide, l'écriture dans le dossier core est interdite": "Archivio non valido, la scrittura nella cartella core non è consentita",
|
||||
"Archive invalide, le fichier de classe est absent": "Archivio non valido, manca il file di classe.",
|
||||
"La version installée est plus récente": "La versione installata è più recente.",
|
||||
"actualisé": "aggiornato",
|
||||
"installé": "installato",
|
||||
"Erreur inconnue, le module n'est pas installé": "Errore sconosciuto, modulo non installato",
|
||||
"Impossible d'ouvrir l'archive": "Impossibile aprire l'archivio",
|
||||
"Archive copiée dans le dossier Modules du gestionnaire de fichier": "Archivio copiato nella cartella Modulo del file manager.",
|
||||
"Erreur de copie": "Errore di copia",
|
||||
"Le module %s de la page %s a été supprimé": "Il modulo %s a pagina %s è stato cancellato",
|
||||
"Le module %s a été %s": "Il modulo %s è stato %s",
|
||||
"Données importées": "Dati importati",
|
||||
"Sélectionnez au moins un contenu à afficher": "Selezionare almeno un contenuto da visualizzare",
|
||||
"Fonte créée":"Font creato",
|
||||
"Fonte non créée, ressource absente !": "Font non creato, risorsa non presente!",
|
||||
"Fonte actualisée": "Font aggiornato",
|
||||
"Fonte supprimée": "Font cancellato",
|
||||
"Thème importé": "Tema importato",
|
||||
"Erreur d'extraction, vérifiez les permissions": "Errore di estrazione, controllare le autorizzazioni",
|
||||
"Archive de thème invalide": "Archivio tema non valido",
|
||||
"Archive non spécifiée ou introuvable": "Archivio non specificato o non trovato",
|
||||
"sauvegardé avec succès": "backup riuscito",
|
||||
"Données %s copiées vers %s": "Dati %s copiati in %s",
|
||||
"Erreur de copie, vérifiez les permissions": "Errore di copia, controllare le autorizzazioni",
|
||||
"Les langues sélectionnées sont identiques": "Le lingue selezionate sono identiche",
|
||||
"Erreur d'URL": "Errore URL",
|
||||
"Traduction supprimée": "Traduzione cancellata",
|
||||
"Impossible de supprimer votre propre compte": "Impossibile eliminare il proprio account",
|
||||
"Utilisateur supprimé": "Utente cancellato",
|
||||
"Incorrect": "Non corretto",
|
||||
"Un mail a été envoyé pour confirmer la réinitialisation": "È stata inviata un'e-mail per confermare il reset",
|
||||
"Utilisateur inexistant": "L'utente non esiste",
|
||||
"Compte verrouillé": "Account bloccato",
|
||||
"Captcha, identifiant ou mot de passe incorrects": "Captcha, nome utente o password non corretti",
|
||||
"Seul un administrateur peut se connecter lors d'une maintenance": "Solo un amministratore può accedere durante la manutenzione",
|
||||
"Bienvenue %s %s": "Benvenuto %s %s",
|
||||
"Accès bloqué %d minutes": "Accesso bloccato per %d minuti",
|
||||
"Déconnexion !": "Logout!",
|
||||
"Nouveau mot de passe enregistré": "Nuova password salvata",
|
||||
"Rien à importer, erreur de format ou fichier incorrect": "Niente da importare, errore di formato o file non corretto",
|
||||
"Importation effectuée": "Importazione completata",
|
||||
"Erreur de lecture, vérifiez les permissions": "Errore di lettura, controllare le autorizzazioni",
|
||||
"Sécurité désactivée": "Sicurezza disabilitata",
|
||||
"3 tentatives": "3 tentativi",
|
||||
"5 tentatives": "5 tentativi",
|
||||
"10 tentatives": "10 tentativi",
|
||||
"5 minutes": "5 minuti",
|
||||
"10 minutes": "10 minuti",
|
||||
"15 minutes": "15 minuti",
|
||||
"Complète": "Completo",
|
||||
"Niveau 1 (192.168.12.x)": "Livello 1 (192.168.12.x)",
|
||||
"Niveau 2 (192.168.x.x)": "Livello 2 (192.168.x.x)",
|
||||
"Niveau 3 (192.x.x.x)": "Livello 3 (192.x.x.x)",
|
||||
"Chiffres": "Numeri",
|
||||
"Lettres": "Lettere",
|
||||
"Icône": "Icona",
|
||||
"Icône avec bulle de texte": "Icona con bolla di testo",
|
||||
"Après le contenu de la page": "Dopo il contenuto della pagina",
|
||||
"Avant le contenu de la page": "Prima del contenuto della pagina",
|
||||
"À l'emplacement du mot clé [MODULE] dans la page": "Nella posizione della parola chiave [MODULO] nella pagina",
|
||||
"Page standard": "Pagina standard",
|
||||
"Barre 1/3 - page 2/3": "Barra 1/3 - pagina 2/3",
|
||||
"Page 2/3 - barre 1/3": "Pagina 2/3 - barra 1/3",
|
||||
"Barre 1/4 - page 3/4": "Barra 1/4 - pagina 3/4",
|
||||
"Page 3/4 - barre 1/4": "Pagina 3/4 - barra 1/4",
|
||||
"Barre 1/4 - page 1/2 - barre 1/4": "Barra 1/4 - pagina 1/2 - barra 1/4",
|
||||
"Barre 2/12 - page 7/12 - barre 3/12": "Barra 2/12 - pagina 7/12 - barra 3/12",
|
||||
"Barre 3/12 - page 7/12 - barre 2/12": "Barra 3/12 - pagina 7/12 - barra 2/12",
|
||||
"Barre latérale": "Barra laterale",
|
||||
"Aucun menu": "Nessun menu",
|
||||
"Le menu horizontal intégral": "Il menu orizzontale completo",
|
||||
"Le sous-menu de la page parente": "Il sottomenu della pagina madre",
|
||||
"Menu standard": "Menu standard",
|
||||
"Menu accessoire": "Menu accessorio",
|
||||
"Activer": "Attivare",
|
||||
"Importer dans": "Importazione in",
|
||||
"Archive": "Archivio",
|
||||
"Archive ZIP": "Archivio ZIP",
|
||||
"Langue par défaut": "Lingua predefinita",
|
||||
"Langue du site sélectionnée": "Lingua del sito selezionata"
|
||||
}
|
492
core/module/install/ressource/i18n/pt_PT.json
Normal file
492
core/module/install/ressource/i18n/pt_PT.json
Normal file
@ -0,0 +1,492 @@
|
||||
{
|
||||
"Adresse électronique": "Endereço de email",
|
||||
"Une archive du dossier /site/data est conservée pendant 30 jours. Activation recommandée": "Um arquivo da pasta /site/data é mantido por 30 dias. Ativação recomendada",
|
||||
"Déconnecte les sessions ouvertes précédemment sur d'autres navigateurs ou terminaux. Activation recommandée.": "Desconecta sessões previamente abertas em outros navegadores ou terminais. Ativação recomendada.",
|
||||
"Sauvegarder les données du module dans le gestionnaire de fichiers": "Salve os dados do módulo no gerenciador de arquivos",
|
||||
"'Sauvegarder et télécharger les données du module": "Salvar e baixar dados do módulo",
|
||||
"Le menu accessoire est aligné à droite de la barre de menu, c'est un emplacement réservé aux drapeaux et au bouton de connexion.": "O menu de acessórios está alinhado à direita da barra de menus, é um espaço reservado para sinalizadores e o botão de login.",
|
||||
"Ne pas saisir les balises": "Não insira tags",
|
||||
"Langues de l'interface": "Idiomas da interface",
|
||||
"Éditer les dialogues": "Editar caixas de diálogo",
|
||||
"Langues du site": "Idiomas do site",
|
||||
"Page associée": "página relacionada",
|
||||
"Multilangue": "Multilíngue",
|
||||
"Rien à importer, erreur de format ou fichier incorrect": "Nada para importar, erro de formatação ou arquivo incorreto",
|
||||
"Sécurité désactivée": "Segurança desativada",
|
||||
"3 tentatives": "3 tentativas",
|
||||
"5 tentatives": "5 tentativas",
|
||||
"10 tentatives": "10 tentativas",
|
||||
"5 minutes": "5 minutos",
|
||||
"10 minutes": "10 minutos",
|
||||
"15 minutes": "15 minutos",
|
||||
"Complète": "Completo",
|
||||
"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)",
|
||||
"Chiffres": "Cifras",
|
||||
"Lettres": "Letras",
|
||||
"Icône": "Ícone",
|
||||
"Icône avec bulle de texte": "Ícone com bolha de texto",
|
||||
"Après le contenu de la page": "Depois do conteúdo da página",
|
||||
"Avant le contenu de la page": "Antes do conteúdo da página",
|
||||
"À l'emplacement du mot clé [MODULE] dans la page": "No local da palavra-chave [MODULE] na página",
|
||||
"Page standard": "Página normal",
|
||||
"Barre 1/3 - page 2/3": "Barra 1/3 - página 2/3",
|
||||
"Page 2/3 - barre 1/3": "Página 2/3 - barra 1/3",
|
||||
"Barre 1/4 - page 3/4": "Barra 1/4 - página 3/4",
|
||||
"Page 3/4 - barre 1/4": "Página 3/4 - barra 1/4",
|
||||
"Barre 1/4 - page 1/2 - barre 1/4": "Barra 1/4 - página 1/2 - barra 1/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 latérale": "Barra lateral",
|
||||
"Aucun menu": "Sem menu",
|
||||
"Le menu horizontal intégral": "O menu horizontal completo",
|
||||
"Le sous-menu de la page parente": "O submenu da página pai",
|
||||
"Menu standard": "Menu normal",
|
||||
"Menu accessoire": "Menu de acessórios",
|
||||
"Activer": "Permitir",
|
||||
"Importer dans": "Importar para",
|
||||
"Archive ZIP": "Arquivo ZIP",
|
||||
"Archive": "Arquivo",
|
||||
"Langue par défaut": "Idioma padrão",
|
||||
"Langue du site sélectionnée": "Idioma do site selecionado",
|
||||
"Se déconnecter ?": "Sair ?",
|
||||
"Mettre à jour ?": "Actualizar ?",
|
||||
"Confirmez-vous la suppression de cette page ?": "Confirma a eliminação desta página?",
|
||||
"Format incorrect": "Formato incorreto",
|
||||
"Les modifications que vous avez apportées ne seront peut-être pas enregistrées.": "As alterações feitas podem não ser salvas.",
|
||||
"Oui": "Sim",
|
||||
"Non": "Não",
|
||||
"Identifiant": "Identificador",
|
||||
"Mot de passe": "Senha",
|
||||
"Confirmation": "Confirmação",
|
||||
"Prénom": "Primeiro nome",
|
||||
"Nom": "Nome",
|
||||
"Ne pas charger l'exemple de site (utilisateurs avancés)": "Não carregue o site de amostra (usuários avançados)",
|
||||
"Type de proxy": "Tipo de proxy",
|
||||
"Adresse du proxy": "Endereço proxy",
|
||||
"Port du proxy": "Porta proxy",
|
||||
"Thème": "Tema",
|
||||
"Installer": "Instalar",
|
||||
"Consulter l'aide en ligne": "Consulte a ajuda online",
|
||||
"favicon.ico": "",
|
||||
"Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.": "Lembre-se de excluir o cache do seu navegador se o favicon não mudar.",
|
||||
"faviconDark.ico": "faviconDark.ico",
|
||||
"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.": "Selecione um ícone adequado para um tema escuro.<br>Lembre-se de excluir o cache do seu navegador se o favicon não mudar.",
|
||||
"Fuseau horaire": "Fuso horário",
|
||||
"Le fuseau horaire est utile au bon référencement": "O fuso horário é útil para uma boa referência",
|
||||
"Message de consentement aux cookies": "Mensagem de consentimento de cookies",
|
||||
"Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.": "Ativação obrigatória de acordo com as leis francesas, a menos que você use seu próprio sistema de consentimento.",
|
||||
"Apache URL intelligentes": "URLs inteligentes do Apache",
|
||||
"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",
|
||||
"Rechercher une mise à jour en ligne": "verifique se há uma atualização on-line",
|
||||
"La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.": "A verificação é diária. Opção desabilitada se a configuração do servidor não permitir.",
|
||||
"Préserver le fichier htaccess racine": "Preservar o arquivo htaccess raiz",
|
||||
"Lors d'une mise à jour automatique, conserve le fichier htaccess de la racine du site.": "Durante uma atualização automática, mantém o arquivo htaccess da raiz do site.",
|
||||
"Sauvegarde automatique quotidienne du site": "Backup diário automático do site",
|
||||
"Site en maintenance": "Site em manutenção",
|
||||
"Clé de l'API <a href='https://app.screenshotapi.net/' target='_blank'>ScreenShotApi</a>": "Chave de API <a href='https://app.screenshotapi.net/' target='_blank'>ScreenShotApi</a>",
|
||||
"Saisir la clé, puis valider le formulaire avant de cliquer sur le bouton de génération": "Digite a chave e valide o formulário antes de clicar no botão gerar",
|
||||
"Autoriser les robots à référencer le site": "Permitir que robôs façam referência ao site",
|
||||
"Facebook": "Facebook",
|
||||
"Saisissez votre ID : https://www.facebook.com/[ID].": "Digite seu ID: https://www.facebook.com/[ID].",
|
||||
"Instagram": "Instagram",
|
||||
"Saisissez votre ID : https://www.instagram.com/[ID].": "Digite seu ID: https://www.instagram.com/[ID].",
|
||||
"Chaîne Youtube": "canal do Youtube",
|
||||
"ID de la chaîne : https://www.youtube.com/channel/[ID].": "ID do canal: https://www.youtube.com/channel/[ID].",
|
||||
"Youtube": "YouTube",
|
||||
"Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].": "Digite seu ID de usuário: https://www.youtube.com/user/[ID].",
|
||||
"Twitter": "Twitter",
|
||||
"Saisissez votre ID : https://twitter.com/[ID].": "Digite seu ID: https://twitter.com/[ID].",
|
||||
"Pinterest": "Pinterest",
|
||||
"Saisissez votre ID : https://pinterest.com/[ID].": "Digite seu ID: https://pinterest.com/[ID].",
|
||||
"Linkedin": "Linkedin",
|
||||
"Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].": "Digite seu ID do Linkedin: https://fr.linkedin.com/in/[ID].",
|
||||
"Github": "Github",
|
||||
"Saisissez votre ID Github : https://github.com/[ID].": "Digite seu ID do Github: https://github.com/[ID].",
|
||||
"Dévoiler le mot de passe": "Revele a senha",
|
||||
"Le survol d'une icône de l'écran de connexion affiche temporairement le mot de passe.": "Passar o mouse sobre um ícone da tela de login exibe temporariamente a senha.",
|
||||
"Déconnexion automatique": "Logout automático",
|
||||
"Redirection vers la connexion": "Redirecionar para login",
|
||||
"Cette redirection ne concerne que les pages d'administration du site.": "Este redirecionamento diz respeito apenas às páginas de administração do site.",
|
||||
"Limitation des tentatives": "Limitação de tentativa",
|
||||
"Blocage après échecs": "Bloqueio após falhas",
|
||||
"Captcha à la connexion": "Captcha no login",
|
||||
"Captcha complexe": "Captcha Complexo",
|
||||
"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.": "Opção recomendada para proteger a conexão. Aplica-se a todos os captchas do site. O captcha simples está limitado à adição de números de 0 a 10. O captcha complexo utiliza quatro operações de números de 0 a 20. Ativação recomendada.",
|
||||
"Type de captcha": "Tipo de captcha",
|
||||
"Activer la journalisation": "Ativar registro",
|
||||
"Anonymat des adresses IP": "Anonimato dos endereços IP",
|
||||
"La réglementation française impose un anonymat de niveau 2": "Regulamentos franceses impõem anonimato de nível 2",
|
||||
"Activer SMTP": "Ativar SMTP",
|
||||
"Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d'envoi de mail.": "Parâmetros a serem usados quando seu host não oferece a funcionalidade de envio de e-mail.",
|
||||
"Adresse SMTP": "Endereço SMTP",
|
||||
"Port SMTP": "Porta SMTP",
|
||||
"Authentification": "Autenticação",
|
||||
"Nom utilisateur": "Nome de usuário",
|
||||
"Sécurité": "Segurança",
|
||||
"Nouvelle page ou barre latérale": "Nova página ou barra lateral",
|
||||
"Éditer la page": "Editar página",
|
||||
"Supprimer la page": "Excluir página",
|
||||
"Gérer les modules": "Gerenciar módulos",
|
||||
"Configuration": "Configuração",
|
||||
"Utilisateurs": "Usuários",
|
||||
"Déconnecter": "Desconectar",
|
||||
"Éditer": "Editar",
|
||||
"Supprimer": "Deletar",
|
||||
"Importer des utilisateurs en masse": "Importar usuários em massa",
|
||||
"Ajouter un utilisateur": "Adicionar usuário",
|
||||
"Pseudo": "Pseudo",
|
||||
"Signature": "Assinatura",
|
||||
"Groupe": "Banda",
|
||||
"Impossible de modifier votre propre groupe.": "Não foi possível editar seu próprio grupo.",
|
||||
"Partage de fichiers autorisé": "Compartilhamento de arquivos permitido",
|
||||
"Ce membre pourra téléverser ou télécharger des fichiers dans le dossier 'partage' et ses sous-dossiers": "Este membro poderá fazer upload ou download de arquivos na pasta 'compartilhar' e suas subpastas",
|
||||
"L'identifiant est défini lors de la création du compte, il ne peut pas être modifié.": "O identificador é definido ao criar a conta, não pode ser modificado.",
|
||||
"Ancien mot de passe": "Senha Antiga",
|
||||
"Nouveau mot de passe": "Nova Senha",
|
||||
"Séparateur": "Separador",
|
||||
"Envoyer un message de confirmation": "Envie uma mensagem de confirmação",
|
||||
"Prévenir l'utilisateur par mail": "Notifique o usuário por e-mail",
|
||||
"Copie de sites inter-langues": "Copiando sites em vários idiomas",
|
||||
"Titre du site": "Titulo do site",
|
||||
"Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.": "Ele aparece na barra de título e nos compartilhamentos de mídia social.",
|
||||
"Description du site": "Descrição do Site",
|
||||
"La description d'une page participe à son référencement, chaque page doit disposer d'une description différente.": "A descrição de uma página participa de sua referenciação, cada página deve ter uma descrição diferente.",
|
||||
"Accueil du site": "Pagina inicial",
|
||||
"La première page que vos visiteurs verront.": "A primeira página que seus visitantes verão.",
|
||||
"Accès interdit, erreur 403": "Acesso negado, erro 403",
|
||||
"Cette page ne doit pas apparaître dans l'arborescence du menu. Créez une page orpheline.": "Esta página não deve aparecer na árvore do menu. Crie uma página órfã..",
|
||||
"Page inexistante, erreur 404": "A página não existe, erro 404",
|
||||
"Mentions légales": "Notícia legal",
|
||||
"Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.": "Avisos legais são obrigatórios na França. Uma opção de rodapé adiciona um link discreto a esta página.",
|
||||
"Recherche dans le site": "Pesquisa de sites",
|
||||
"Sélectionnez une page contenant le module 'Recherche'. Une option du pied de page ajoute un lien discret vers cette page.": "Selecione uma página contendo o módulo 'Pesquisar'. Uma opção de rodapé adiciona um link discreto a esta página.",
|
||||
"Rechercher": "Buscar",
|
||||
"Plan du site": "Mapa do site",
|
||||
"Cookies": "Cookies",
|
||||
"Titre de la fenêtre": "Título da janela",
|
||||
"Saisissez le titre de la fenêtre de gestion des cookies.": "Digite o título da janela de gerenciamento de cookies.",
|
||||
"Bouton de validation": "Botão de validação",
|
||||
"Cookies Zwii": "Cookies Zwii",
|
||||
"Saisissez le message pour les cookies déposés par ZwiiCMS, nécessaires au fonctionnement et qui ne nécessitent pas de consentement.": "Insira a mensagem para cookies depositados pelo ZwiiCMS, necessários para o funcionamento e que não requerem consentimento.",
|
||||
"Lien page des mentions légales.": "Link da página de aviso legal.",
|
||||
"Saisissez le texte du lien vers les mentions légales,la page doit être définie dans la configuration du site.": "Digite o texto do link para os avisos legais, a página deve ser definida na configuração do site.",
|
||||
"Pages et les modules de": "Páginas e módulos",
|
||||
"Vers": "Para",
|
||||
"Supprimer le module": "Excluir módulo",
|
||||
"Sauvegarder le module dans le gestionnaire de fichiers": "Salvar módulo no gerenciador de arquivos",
|
||||
"Sauvegarder et télécharger le module": "Salve e baixe o módulo",
|
||||
"Installer depuis le catalogue en ligne": "Instalar a partir do catálogo online",
|
||||
"Installer depuis une archive": "Instalar do arquivo",
|
||||
"Mettre à jour le module orphelin": "Atualizar módulo órfão",
|
||||
"Télécharger le module dans le gestionnaire de fichiers": "Carregar módulo para o gerenciador de arquivos",
|
||||
"Connexion": "Conecte-se",
|
||||
"Ajouter une fonte": "Adicionar uma fonte",
|
||||
"Fonte en ligne": "Elenco on-line",
|
||||
"Fonte installée": "Tipografía instalada",
|
||||
"Identifiant (sans espace ni majuscule)": "Identificador (sem espaços ou maiúsculas)",
|
||||
"Famille": "família",
|
||||
"Url du fichier de fonte": "URL do arquivo de fonte",
|
||||
"Réinitialiser avec le thème par défaut": "Redefinir para o tema padrão",
|
||||
"Arrière plan": "Fundo",
|
||||
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence.": "Cor visível na ausência de uma imagem.<br />O controle deslizante horizontal ajusta o nível de transparência.",
|
||||
"Titres": "Títulos",
|
||||
"Texte": "Texto",
|
||||
"Arrière plan des champs": "Plano de fundo do campo",
|
||||
"Couleur visible en l'absence d'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.": "Cor visível na ausência de uma imagem.<br />O controle deslizante horizontal ajusta o nível de transparência. A cor do texto é automática.",
|
||||
"Bordure des champs": "Borda do campo",
|
||||
"Bouton Aide": "Botão de ajuda",
|
||||
"Bouton retour": "botão voltar",
|
||||
"Bouton standard": "botão padrão",
|
||||
"Bouton effacement": "Botão Excluir",
|
||||
"Bouton validation": "Botão de validação",
|
||||
"Police du texte": "Fonte de texto",
|
||||
"Taille": "Tamanho",
|
||||
"Police des titres": "tipografia do título",
|
||||
"Réinitialiser la feuille de style": "redefinir folha de estilo",
|
||||
"Rester connecté sur ce navigateur": "Permaneça conectado neste navegador",
|
||||
"Effacer la page": "limpar página",
|
||||
"Dupliquer la page": "duplicar a página",
|
||||
"Titre": "Título",
|
||||
"Titre court": "Título curto",
|
||||
"Le titre court est affiché dans les menus. Il peut être identique au titre de la page.": "O título curto é exibido nos menus. Pode ser o mesmo que o título da página.",
|
||||
"Titre masqué dans la page": "Título mascarado na página",
|
||||
"Fil d'Ariane dans le titre": "Farinha de rosca no título",
|
||||
"Affiche le nom de la page parente suivi du nom de la page, le titre ne doit pas être masqué.": "Mostre o nome da página principal seguido do nome da página, o título não deve ficar oculto.",
|
||||
"Position": "Posição",
|
||||
"'Ne pas afficher' crée une page orpheline non accessible par le biais des menus.": "'Não mostrar' cria uma página órfã que não pode ser acessada pelos menus.",
|
||||
"Page parent": "Página principal",
|
||||
"Emplacement :": "Localização",
|
||||
"Page non cliquable": "A página não é clicável",
|
||||
"Option active en mode déconnecté uniquement, les pages enfants sont visibles et accessibles.": "Opção ativa apenas no modo offline, as páginas filhas ficam visíveis e acessíveis.",
|
||||
"S'ouvre dans un nouvel onglet": "Abre em uma nova guia",
|
||||
"Apparence": "Apariencia",
|
||||
"Sélectionnez une image ou une icône de petite dimension": "Selecione uma pequena imagem ou ícone",
|
||||
"Masquer les pages enfants dans le menu horizontal": "Selecione uma pequena imagem ou ícone",
|
||||
"Masquer la page et les pages enfants dans le menu d'une barre latérale": "Seleccione una imagen o icono pequeño",
|
||||
"La page est affichée dans un menu horizontal mais pas dans le menu vertical d'une barre latérale.": "A página é exibida em um menu horizontal, mas não no menu vertical de uma barra lateral.",
|
||||
"Module": "Módulo",
|
||||
"En cas de changement de module, les données du module précédent seront supprimées.": "Ao alterar o módulo, os dados do módulo anterior serão apagados.",
|
||||
"Position du module": "Posição do módulo",
|
||||
"En position libre ajoutez le module en plaçant [MODULE] à l'endroit voulu dans votre page.": "Na posição livre adicione o módulo colocando [MODULE] no local desejado em sua página.",
|
||||
"Feuille de style spécifique à la page.": "Hoja de estilo específica de la página.",
|
||||
"Instructions JS ou jquery spécifiques à la page.": "Instrucciones JS o jquery específicas de la página.",
|
||||
"Gabarits de page - Barre latérale": "Mestre da página - Barra lateral",
|
||||
"Pour définir la page comme barre latérale, choisissez l'option dans la liste.": "Para definir a página como barra lateral, escolha a opção na lista.",
|
||||
"Barre latérale gauche :": "barra lateral esquerda:",
|
||||
"Barre latérale droite :": "Barra lateral direita:",
|
||||
"Contenu du menu vertical": "Conteúdo do menu vertical",
|
||||
"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 padrão, o menu é exibido APÓS o conteúdo da página. Para colocá-lo em um local específico, insira [MENU] no conteúdo da página.",
|
||||
"Groupe requis pour accéder à la page :": "Grupo necessário para acessar a página:",
|
||||
"Méta-titre": "Meta-título",
|
||||
"Méta-description": "Meta Descrição",
|
||||
"Module de la page": "Módulo de página",
|
||||
"Paramètres de la sauvegarde": "Configurações de backup",
|
||||
"Sécurité de la connexion": "segurança de conexão",
|
||||
"Journalisation": "Conecte-se",
|
||||
"Paramètres": "Definições",
|
||||
"SMTP": "SMTP",
|
||||
"Archive à restaurer": "Arquivo para restaurar",
|
||||
"Mise à jour automatisée": "atualização automática",
|
||||
"Capture d'écran Open Graph": "Captura de tela do Open Graph",
|
||||
"Référencement": "referenciando",
|
||||
"Réseaux sociaux": "Redes sociais",
|
||||
"Renseignez les champs ci-dessous pour finaliser l'installation.": "Complete as zonas abaixo para concluir a instalação.",
|
||||
"Compte administrateur": "Conta de administrador",
|
||||
"Options avancées": "Opções avançadas",
|
||||
"Mise à jour de ZwiiCMS": "Atualização do ZwiiCMS",
|
||||
"vers ZwiiCMS": "Rumo ao ZwiiCMS",
|
||||
"Afin d'assurer le bon fonctionnement de Zwii, veuillez ne pas fermer cette page avant la fin de l'opération.": "Para garantir o funcionamento adequado do Zwii, não feche esta página antes que a operação seja concluída",
|
||||
"1/4 : Préparation...": "1/4: Preparando...",
|
||||
"2/4 : Téléchargement...": "2/4: Baixando...",
|
||||
"3/4 : Installation...": "3/4: Instalando...",
|
||||
"4/4 : Configuration...": "4/4: Contexto...",
|
||||
"Une erreur est survenue lors de l'étape :": "Ocorreu um erro durante o processo",
|
||||
"Mise à jour terminée avec succès.": "Atualização concluída com sucesso.",
|
||||
"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.": "Nosso site está atualmente em manutenção. Lamentamos o transtorno e estamos fazendo o possível para retornar o mais breve possível.",
|
||||
"Installer les données d'un module": "Instalar dados de um módulo",
|
||||
"Sauvegarde": "Salvaguarda",
|
||||
"Modules orphelins": "Módulos órfãos",
|
||||
"Modules configurés": "Módulos Configurados",
|
||||
"Modules installés": "Módulos instalados",
|
||||
"Données des modules": "Dados do módulo",
|
||||
"Version n°": "Número da versão",
|
||||
"Du": "Del",
|
||||
"Auteur :": "Autor",
|
||||
"Licence :": "Licença",
|
||||
"Installer ou mettre à jour un module téléchargé": "Instalar ou atualizar um módulo baixado",
|
||||
"Couleurs": "Cores",
|
||||
"Mise en forme du texte": "Formato de texto",
|
||||
"Image": "Imagen",
|
||||
"Identité de la fonte": "Identidade tipográfica",
|
||||
"Disposition": "Arranjo",
|
||||
"Contenu personnalisé": "Conteúdo personalizado",
|
||||
"Informations": "Informação",
|
||||
"Mise en forme du titre": "Formato do título",
|
||||
"Papier peint": "Cor de fundo",
|
||||
"Largeur de l'image :": "Largura da imagem",
|
||||
"Hauteur de l'image :": "Altura da imagem",
|
||||
"largeur du site": "Largura do site",
|
||||
"Ratio :": "Relação",
|
||||
"largeur de site :": "Largura do site",
|
||||
"Installer un thème archivé (site ou administration)": "Instale um tema arquivado (site ou administrador)",
|
||||
"Sauvegarde du thème dans le": "Salvando tema para",
|
||||
"gestionnaire de fichiers": "Gerenciador de arquivos",
|
||||
"Télécharger le thème": "Baixar tema",
|
||||
"Contenu": "Conteúdo",
|
||||
"Mise en forme des titres": "Formato do título",
|
||||
"Copie des traductions rédigées": "Cópia de traduções editadas",
|
||||
"Identité": "Identificação",
|
||||
"Permissions :": "Permissões",
|
||||
"Accès aux pages privées": "Acesso a páginas privadas",
|
||||
"Ajout - Édition - Suppression de fichiers": "Adicionar/editar/excluir arquivos",
|
||||
"Administration complète du site": "Administração completa do site",
|
||||
"Importation de fichier plat CSV": "Importar arquivo CSV simples",
|
||||
"Confirmer la suppression de cet utilisateur": "Confirme a exclusão deste usuário",
|
||||
"Sauvegarde générée avec succès.": "Backup gerado com sucesso",
|
||||
"Erreur : sauvegarde non générée !": "Erro: backup não gerado!",
|
||||
"Sauvegarder": "Para salvaguardar",
|
||||
"La sauvegarde des fichiers peut prendre du temps. Continuer ?": "O backup de arquivos pode demorar um pouco. Você deseja continuar?",
|
||||
"Supprimer toutes les sauvegardes automatiques ?": "Remover todos os salvamentos automáticos?",
|
||||
"Préparation de la mise à jour": "Preparaação para a atualização",
|
||||
"Téléchargement et validation de l'archive": "Download e validação de arquivos",
|
||||
"Installation": "Instalação",
|
||||
"Confirmer la suppression de la page": "Confirmar exclusão de página",
|
||||
"Confirmer la suppression des données du module": "Confirme a exclusão de dados do módulo",
|
||||
"Ne pas afficher": "Não exibido",
|
||||
"Au début": "No princípio",
|
||||
"Après": "Depois",
|
||||
"Confirmer la désinstallation du module": "Confirme a desinstalação do módulo",
|
||||
"Confirmer la dissociation du module de cette page": "Confirme o módulo de desvinculação desta página",
|
||||
"Sauvegarder les données du site": "Salvar dados do site",
|
||||
"Restaurer les données du site": "Restaurar dados do site",
|
||||
"Vider dossier sauvegardes auto": "Pasta de salvamento automático vazia",
|
||||
"Copier sauvegardes auto": "Copiar salvamentos automáticos",
|
||||
"Réinstaller": "Reinstalar",
|
||||
"Script dans head": "Script en el head",
|
||||
"Script dans body": "Script en el body",
|
||||
"Générer une capture Open Graph": "Gerar uma captura do Open Graph",
|
||||
"Générer sitemap.xml et robots.txt": "Gerar sitemap.xml e robots.txt",
|
||||
"Télécharger la liste": "Baixar lista",
|
||||
"Réinitialiser la liste": "Redefinir lista",
|
||||
"Télécharger le journal": "Baixar Registro",
|
||||
"Réinitialiser le journal": "Restablecer registro",
|
||||
"Fond du sous-menu": "Plano de fundo do submenu",
|
||||
"Liens": "Links",
|
||||
"Arrière plan des blocs": "Fundo de blocos",
|
||||
"Bordure des blocs": "Borda dos blocos",
|
||||
"Boutons": "Botões",
|
||||
"Thème du site": "Tema do site",
|
||||
"Thème de l'administration": "Tema administrativo",
|
||||
"Appliquer": "Aplicar",
|
||||
"Enregistrer": "Registrar",
|
||||
"Éditeur CSS": "Editor de CSS",
|
||||
"Éditeur JS": "Editor de JS",
|
||||
"Accueil": "Começar",
|
||||
"Aide": "Ajuda",
|
||||
"Fontes": "Fontes",
|
||||
"Gestion": "Gerenciar",
|
||||
"Administration": "Gestão",
|
||||
"Langues": "Línguas",
|
||||
"Interface": "Interface",
|
||||
"Langue de l'administration": "Idioma de administração",
|
||||
"Langues installées": "Idiomas instalados",
|
||||
"Dans quelle langue utiliserez-vous Zwii ?": "Qual idioma o Zwii usará?",
|
||||
"Maintenance": "Manutenção",
|
||||
"Scripts externes": "Scripts externos",
|
||||
"Version": "Versão",
|
||||
"Catégorie": "Categoria",
|
||||
"Page": "Página",
|
||||
"Copie de contenus localisés": "Cópia do conteúdo localizado",
|
||||
"Nouveau contenu localisé": "Novo conteúdo localizado",
|
||||
"Sélectionnez une langue": "Selecione um idioma",
|
||||
"Langues disponibles": "Idiomas disponíveis",
|
||||
"Sélectionnez la langue à copier vers une langue cible": "Selecione o idioma para copiar para outro idioma",
|
||||
"De": "Do",
|
||||
"vers": "Para",
|
||||
"Action interdite": "ação não permitida",
|
||||
"Modifications enregistrées": "Alterações salvas",
|
||||
"URL incorrecte": "URL errada",
|
||||
"Paramètres de la localisation": "Configurações de localização",
|
||||
"Mise à jour": "Atualizar",
|
||||
"Gestion des modules": "Gerenciamento de módulo",
|
||||
"Catalogue de modules": "Catálogo de módulos",
|
||||
"Installer un module": "Instalar um módulo",
|
||||
"Pied de page": "Rodapé",
|
||||
"Bannière": "Bandeira",
|
||||
"Thèmes": "Temas",
|
||||
"Menu": "Menu",
|
||||
"Site": "Sitio",
|
||||
"Gestion des thèmes": "Gerenciamento de tópicos",
|
||||
"Nouvel utilisateur": "Novo usuário",
|
||||
"Mot de passe oublié": "Senha esquecida",
|
||||
"Réinitialisation du mot de passe": "Redefinir a senha do usuário",
|
||||
"Importation d'utilisateurs": "Importação de usuários",
|
||||
"Contenu avancé": "Conteúdo avançado",
|
||||
"Mise en page": "Esquema",
|
||||
"Permission et référencement": "Permissão e referência",
|
||||
"Éditeur de script %s": "Editor de script %s",
|
||||
"Journal réinitialisé avec succès": "Registro redefinido com sucesso",
|
||||
"Aucun journal à effacer": "Não há registros para excluir",
|
||||
"Aucun fichier journal à télécharger": "Nenhum arquivo de log para download",
|
||||
"Aucune liste noire à télécharger": "Nenhuma lista negra para baixar",
|
||||
"Liste noire réinitialisée avec succès": "Lista negra redefinida com sucesso",
|
||||
"Aucune liste noire à effacer": "Não há lista negra para excluir",
|
||||
"Copie terminée avec succès": "Cópia concluída com sucesso",
|
||||
"Copie terminée avec des erreurs": "Cópia concluída com erros",
|
||||
"Fichiers effacés": "arquivos excluídos",
|
||||
"Restaurer": "Restaurar",
|
||||
"Restauration effectuée avec succès": "Restauração concluída com sucesso",
|
||||
"Échecs": "Falhas",
|
||||
"Erreur inconnue": "Erro desconhecido",
|
||||
"Archive invalide": "arquivo inválido",
|
||||
"Le curseur horizontal règle le niveau de transparence, le placer tout à la gauche pour un surlignement invisible.": "O controle deslizante horizontal define o nível de transparência, defina-o totalmente para a esquerda para um destaque invisível.",
|
||||
"Contenu multilangues": "Conteúdo multilíngue",
|
||||
"Extension": "Extensão",
|
||||
"Permission": "Permissão",
|
||||
"Emplacement dans le menu": "Localização no menu",
|
||||
"Réseau": "La red",
|
||||
"Étiquettes des pages spéciales": "Tags de página especiais",
|
||||
"Identité du site": "Identidade do site",
|
||||
"Message d'acceptation des Cookies": "Mensagem de aceitação de cookies",
|
||||
"Favicon thème sombre": "favicon tema escuro",
|
||||
"Apache URL intelligent": "URL inteligente do Apache",
|
||||
"Liste noire": "Lista negra",
|
||||
"Ajout - Édition - Suppression de pages": "Adicionando - Editando - Excluindo páginas",
|
||||
"Importer": "Importar",
|
||||
"Clé de l'API <a href=\"https://app.screenshotapi.net/\" target=\"_blank\">ScreenShotApi</a>": "Chave de API <a href=\"https://app.screenshotapi.net/\" target=\"_blank\">ScreenShotApi</a>",
|
||||
"Créez un compte gratuit, recopier la clé , puis valider le formulaire avant de cliquer sur le bouton de génération": "Crie uma conta gratuita, copie a chave e valide o formulário antes de clicar no botão gerar",
|
||||
"La clé de l'API ne peut pas être vide": "A chave de API não pode estar vazia",
|
||||
"Service en ligne inaccessible": "Serviço online inacessível",
|
||||
"La carte du site a été mise à jour": "O mapa do site foi atualizado.",
|
||||
"Echec de l'écriture, vérifiez les permissions": "Falha na gravação, verifique as permissões",
|
||||
"Capture d'écran générée avec succès": "Captura de tela gerada com sucesso",
|
||||
"Inclure le contenu du gestionnaire de fichiers": "Captura de tela gerada com sucesso",
|
||||
"Si le contenu du gestionnaire de fichiers est très volumineux, mieux vaut une copie par FTP.": "Se o conteúdo do gerenciador de arquivos for muito grande, é melhor copiar por FTP.",
|
||||
"Retour": "De volta",
|
||||
"L'archive a été déposée dans le gestionnaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.": "O arquivo foi depositado no gerenciador de arquivos. Arquivos anteriores à versão 9 não são aceitos.",
|
||||
"Préserver les comptes des utilisateurs déjà installés": "Preservar contas de usuário já instaladas",
|
||||
"Éditeur de script dans Head": "Éditor do script no Head",
|
||||
"Valider": "Validar",
|
||||
"Éditeur de script dans Body": "Éditor do script no Body",
|
||||
"FontId": "ID da fonte",
|
||||
"Affectation": "Atribuição",
|
||||
"Origine": "Fonte",
|
||||
"Bouton Standard": "botão padrão",
|
||||
"Configuration du module": "Configuração do módulo",
|
||||
"Installation terminée": "instalação completa",
|
||||
"Jeton invalide": "Símbolo inválido",
|
||||
"Suppression interdite": "exclusão proibida",
|
||||
"Page dupliquée": "Página duplicada",
|
||||
"Page et module dupliqués": "Página y módulo duplicados",
|
||||
"Nouvelle page créée": "Nova página criada",
|
||||
"Suppression interdite, page active dans la configuration du site": "Exclusão proibida, página ativa nas configurações do site",
|
||||
"Impossible de supprimer une page contenant des pages enfants": "Não é possível excluir uma página que contém páginas filhas",
|
||||
"Page supprimée": "página excluída",
|
||||
"La suppression a échoué": "exclusão malsucedida",
|
||||
"Le module %s est désinstallé, il reste peut-être des données dans %s": "O módulo é desinstalado, os dados podem permanecer",
|
||||
"Archive invalide, le descripteur est absent": "Arquivo inválido, descritor ausente",
|
||||
"Archive invalide, les dossiers ne correspondent pas au descripteur": "Arquivo inválido, as pastas não correspondem ao descritor",
|
||||
"Archive invalide, l'écriture dans le dossier core est interdite": "Arquivo inválido, é proibido gravar na pasta principal",
|
||||
"Archive invalide, le fichier de classe est absent": "Arquivo inválido, arquivo de classe está faltando",
|
||||
"La version installée est plus récente": "A versão instalada é mais recente.",
|
||||
"actualisé": "Atualizada",
|
||||
"installé": "Instalado",
|
||||
"Erreur inconnue, le module n'est pas installé": "Erro desconhecido, o módulo não está instalado",
|
||||
"Impossible d'ouvrir l'archive": "Não é possível abrir o arquivo",
|
||||
"Archive copiée dans le dossier Modules du gestionnaire de fichier": "Arquivo copiado para a pasta do Módulos Gerenciador de arquivos",
|
||||
"Erreur de copie": "Erro de cópia",
|
||||
"Le module %s de la page %s a été supprimé": "Módulo de página removido",
|
||||
"Le module %s a été %s": "O módulo foi",
|
||||
"Données importées": "Dados importados",
|
||||
"Sélectionnez au moins un contenu à afficher": "Selecione pelo menos um conteúdo para exibir",
|
||||
"Fonte créée": "Fonte criada",
|
||||
"Fonte non créée, ressource absente !": "Fonte não criada, por falta de recursos!",
|
||||
"Fonte actualisée": "Fonte atualizada",
|
||||
"Fonte supprimée": "fonte removida",
|
||||
"Thème importé": "Tema importado",
|
||||
"Erreur d'extraction, vérifiez les permissions": "Extrair erro, verificar permissões",
|
||||
"Archive de thème invalide": "Arquivo de tema inválido",
|
||||
"Archive non spécifiée ou introuvable": "Arquivo não especificado ou não encontrado",
|
||||
"sauvegardé avec succès": "Salvo com sucesso",
|
||||
"Données %s copiées vers %s": "Dados copiados para",
|
||||
"Erreur de copie, vérifiez les permissions": "Erro de cópia, verifique as permissões",
|
||||
"Les langues sélectionnées sont identiques": "Os idiomas selecionados são idênticos",
|
||||
"Erreur d'URL": "Erro de URL",
|
||||
"Traduction supprimée": "Tradução removida",
|
||||
"Impossible de supprimer votre propre compte": "Você não pode excluir sua própria conta",
|
||||
"Utilisateur supprimé": "Usuário excluído",
|
||||
"Incorrect": "Incorreta",
|
||||
"Un mail a été envoyé pour confirmer la réinitialisation": "Um e-mail foi enviado para confirmar a redefinição.",
|
||||
"Utilisateur inexistant": "Usuário inexistente",
|
||||
"Compte verrouillé": "Conta bloqueada",
|
||||
"Captcha, identifiant ou mot de passe incorrects": "Captcha, nome de usuário ou senha incorretos",
|
||||
"Seul un administrateur peut se connecter lors d'une maintenance": "Somente um administrador pode fazer login durante uma manutenção",
|
||||
"Bienvenue %s %s": "Bem-vindo",
|
||||
"Accès bloqué %d minutes": "Minutos de acesso bloqueado",
|
||||
"Déconnexion !": "Fechar Sessão!",
|
||||
"Nouveau mot de passe enregistré": "Nova senha salva",
|
||||
"Importation effectuée": "Importação concluída",
|
||||
"Erreur de lecture, vérifiez les permissions": "Erro de leitura, verifique as permissões"
|
||||
}
|
BIN
core/module/install/ressource/themes/theme_affaire.zip
Normal file
BIN
core/module/install/ressource/themes/theme_affaire.zip
Normal file
Binary file not shown.
BIN
core/module/install/ressource/themes/theme_moderne.zip
Normal file
BIN
core/module/install/ressource/themes/theme_moderne.zip
Normal file
Binary file not shown.
BIN
core/module/install/ressource/themes/theme_old_facebook.zip
Normal file
BIN
core/module/install/ressource/themes/theme_old_facebook.zip
Normal file
Binary file not shown.
BIN
core/module/install/ressource/themes/theme_orange_black.zip
Normal file
BIN
core/module/install/ressource/themes/theme_orange_black.zip
Normal file
Binary file not shown.
22
core/module/install/ressource/themes/themes.json
Normal file
22
core/module/install/ressource/themes/themes.json
Normal 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"
|
||||
}
|
||||
}
|
@ -1,18 +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
|
||||
*/
|
@ -1,22 +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
|
||||
*/
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
}
|
||||
/* Vide */
|
@ -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/
|
||||
*/
|
||||
$("#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)}}));
|
@ -2,77 +2,71 @@
|
||||
<?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>
|
||||
<h3>
|
||||
<?php echo helper::translate('Compte administrateur'); ?>
|
||||
</h3>
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::text('installId', [
|
||||
'autocomplete' => 'off',
|
||||
'label' => 'Identifiant'
|
||||
]); ?>
|
||||
</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>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::mail('installMail', [
|
||||
'autocomplete' => 'off',
|
||||
'label' => 'Adresse électronique'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
<ul class="accordion" data-speed="150">
|
||||
<li class="accordion-item">
|
||||
<h3 class="accordion-title">
|
||||
<?php echo '▷ ' . helper::translate('Options avancées'); ?>
|
||||
</h3>
|
||||
<div class="accordion-content">
|
||||
<?php if ($this->getUrl(2) === '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>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('installProxyType', $module::$proxyType, [
|
||||
@ -94,14 +88,18 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::select('installTheme', $module::$themes, [
|
||||
'label' => 'Thème'
|
||||
]); ?>
|
||||
<?php echo template::hidden('installLanguage', [
|
||||
'value' => $this->getUrl(2)
|
||||
]); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('installPrevious', [
|
||||
|
@ -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/
|
||||
*/
|
||||
|
||||
|
@ -1,16 +1,6 @@
|
||||
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({
|
||||
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(), $.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo helper::baseUrl(false); ?>?install/steps",
|
||||
data: {
|
||||
@ -18,78 +8,13 @@ function step(i, data) {
|
||||
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);
|
||||
}
|
||||
}, 2000);
|
||||
setTimeout((function () {
|
||||
!0 === result.success ? 4 === i ? ($("#installUpdateSuccess").show(), $("#installUpdateEnd").removeClass("disabled"), $("#installUpdateProgress").hide()) : step(i + 1, result.data) : ($("#installUpdateErrorStep").text(errors[i]), $("#installUpdateError").show(), $("#installUpdateEnd").removeClass("disabled"), $("#installUpdateProgress").hide(), console.error(result), $("#installUpdateErrorMessage").text(result.replace(/<[^p].*?>/g, "")))
|
||||
}), 2e3)
|
||||
},
|
||||
error: function (xhr) {
|
||||
console.log(i);
|
||||
console.log(xhr.responseText);
|
||||
console.log(errors);
|
||||
|
||||
// Vérification du code d'erreur HTTP pour gérer la déconnexion
|
||||
if (xhr.status === 401 || xhr.status === 403) {
|
||||
alert("Votre session a expiré. Veuillez vous reconnecter.");
|
||||
window.location.href = "?user/login"; // Redirige vers la page de connexion
|
||||
} else {
|
||||
// Appel de la fonction de gestion d'erreur
|
||||
showError(i, xhr.responseText, errors);
|
||||
}
|
||||
$("#installUpdateErrorStep").text(errors[1]), $("#installUpdateError").show(), $("#installUpdateEnd").removeClass("disabled"), $("#installUpdateProgress").hide(), console.error(xhr.responseText), $("#installUpdateErrorMessage").text(xhr.responseText.replace(/<[^p].*?>/g, ""))
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
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('{');
|
||||
|
||||
if (startOfArray !== -1 && startOfArray > 0) {
|
||||
// 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);
|
||||
|
||||
try {
|
||||
const jsonData = JSON.parse(jsonString);
|
||||
|
||||
// Afficher les résultats si le parsing JSON est réussi
|
||||
if (jsonData) {
|
||||
$("#installUpdateErrorMessage").html("<strong>Détails de l'erreur :</strong><br> " +
|
||||
jsonData.data.replace(/^"(.*)"$/, '$1') +
|
||||
"<br>" +
|
||||
warningMessage.replace(/<[^p].*?>/g, ""));
|
||||
}
|
||||
} catch (e) {
|
||||
// Afficher un message générique en cas d'erreur de parsing
|
||||
console.error("Erreur de parsing JSON : ", e);
|
||||
$("#installUpdateErrorMessage").html("Une erreur inattendue est survenue lors du traitement des détails de l'erreur.");
|
||||
}
|
||||
} else {
|
||||
// Si pas de JSON détecté, afficher le message brut
|
||||
$("#installUpdateErrorMessage").html("Message d'erreur : " + message);
|
||||
}
|
||||
} else {
|
||||
$("#installUpdateErrorMessage").html(message);
|
||||
}
|
||||
}
|
||||
|
||||
$(window).on("load", function () {
|
||||
step(1, null);
|
||||
});
|
||||
$(window).on("load", step(1, null));
|
@ -1,56 +1,55 @@
|
||||
<div id="updateContainer">
|
||||
<p><strong>
|
||||
<?php echo helper::translate('Version'); ?>
|
||||
|
||||
<?php echo self::ZWII_VERSION; ?>
|
||||
<?php echo helper::translate('vers'); ?>
|
||||
|
||||
<?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>
|
||||
<?php echo helper::translate('Mise à jour de ZwiiCMS'); ?>
|
||||
|
||||
<?php echo self::ZWII_VERSION; ?>
|
||||
<?php echo helper::translate('vers ZwiiCMS'); ?>
|
||||
|
||||
<?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 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'); ?>
|
||||
<strong>
|
||||
<?php echo helper::translate('Une erreur est survenue lors de l\'étape :'); ?>
|
||||
|
||||
<span id="installUpdateErrorStep"> </span>.
|
||||
</strong>
|
||||
</div>
|
||||
<div id="installUpdateSuccess" class="colorGreen displayNone">
|
||||
<?php echo template::ico('check'); ?>
|
||||
<?php echo helper::translate('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 verticalAlignTop">
|
||||
<?php echo template::button('installUpdateEnd', [
|
||||
'value' => 'Terminer',
|
||||
'href' => helper::baseUrl() . 'config',
|
||||
'ico' => 'check',
|
||||
'class' => 'disabled'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<p><em><span class="colorRed" id="installUpdateErrorMessage"></span></em></p>
|
||||
</div>
|
||||
</div
|
@ -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_SITE_CONTENT']) && $_SESSION['ZWII_SITE_CONTENT'] === $key) {
|
||||
$messageLocale = helper::translate('Langue du site sélectionnée');
|
||||
} else {
|
||||
$messageLocale = '';
|
||||
}
|
||||
self::$languagesInstalled[] = [
|
||||
template::flag($key, '20 %') . ' ' . $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 %') . ' ' . 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 %') . ' ' . 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') . ' ' . 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') . ' ' . 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_SITE_CONTENT'] = $lang;
|
||||
}
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl()
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
@ -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(); ?>
|
@ -1,98 +0,0 @@
|
||||
<?php echo template::formOpen('translateForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<?php echo template::button('translateFormBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(),
|
||||
'value' => template::ico('home')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1">
|
||||
<?php /**echo template::button('translateHelp', [
|
||||
'href' => 'https://doc.zwiicms.fr/prise-en-charge-des-langues-etrangeres',
|
||||
'target' => '_blank',
|
||||
'value' => template::ico('help'),
|
||||
'class' => 'buttonHelp',
|
||||
'help' => 'Consulter l\'aide en ligne'
|
||||
]);*/?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab">
|
||||
<?php echo template::button('translateUiButton', [
|
||||
'value' => 'Interface',
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
<?php echo template::button('translateContentButton', [
|
||||
'value' => 'Site',
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
</div>
|
||||
|
||||
<div id="uiContainer" class="tabContent">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Langues installées'); ?>
|
||||
</h4>
|
||||
<?php if ($module::$languagesUiInstalled): ?>
|
||||
<?php echo template::table([2, 1, 1, 5, 1, 1], $module::$languagesUiInstalled, ['Langues', 'Version', 'Date', '', '', '']); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Catalogue'); ?>
|
||||
</h4>
|
||||
<?php if ($module::$languagesStore): ?>
|
||||
<?php echo template::table([2, 1, 2, 6, 1], $module::$languagesStore, ['Langues', 'Version', 'Date', '', '']); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="contentContainer" class="tabContent">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Paramètres'); ?>
|
||||
</h4>
|
||||
<div class="col4 offset2">
|
||||
<?php echo template::button('translateButtonCopyContent', [
|
||||
'href' => helper::baseUrl() . 'language/copy',
|
||||
'ico' => 'docs',
|
||||
'disabled' => $module::$siteCopy,
|
||||
'value' => 'Copie de contenus localisés'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::button('translateButtonAddContent', [
|
||||
'href' => helper::baseUrl() . 'language/add',
|
||||
'ico' => 'plus',
|
||||
'class' => 'buttonGreen',
|
||||
'value' => 'Nouveau contenu localisé'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Langues installées'); ?>
|
||||
</h4>
|
||||
<?php if ($module::$languagesInstalled): ?>
|
||||
<?php echo template::table([2, 6, 1, 1], $module::$languagesInstalled, ['Langues', '', '', '']); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo template::formClose(); ?>
|
@ -8,8 +8,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/
|
||||
*/
|
||||
|
||||
@ -41,7 +41,7 @@ class maintenance extends common
|
||||
? ''
|
||||
: $this->getData(['page', $this->getData(['locale', 'page302']), 'title']),
|
||||
//'content' => $this->getdata(['page',$this->getData(['locale','page302']),'content']),
|
||||
'content' => $this->getPage($this->getData(['locale', 'page302']), self::$siteContent),
|
||||
'content' => $this->getPage($this->getData(['locale', 'page302']), self::$i18nContent),
|
||||
'view' => 'index'
|
||||
]);
|
||||
} else {
|
||||
|
@ -9,8 +9,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,13 +18,12 @@ class page extends common
|
||||
{
|
||||
|
||||
public static $actions = [
|
||||
'add' => self::GROUP_EDITOR,
|
||||
'delete' => self::GROUP_EDITOR,
|
||||
'edit' => self::GROUP_EDITOR,
|
||||
'duplicate' => self::GROUP_EDITOR,
|
||||
'jsEditor' => self::GROUP_EDITOR,
|
||||
'cssEditor' => self::GROUP_EDITOR,
|
||||
'register' => self::GROUP_EDITOR,
|
||||
'add' => self::GROUP_MODERATOR,
|
||||
'delete' => self::GROUP_MODERATOR,
|
||||
'edit' => self::GROUP_MODERATOR,
|
||||
'duplicate' => self::GROUP_MODERATOR,
|
||||
'jsEditor' => self::GROUP_MODERATOR,
|
||||
'cssEditor' => self::GROUP_MODERATOR
|
||||
];
|
||||
public static $pagesNoParentId = [
|
||||
'' => 'Aucune'
|
||||
@ -42,42 +41,28 @@ class page extends common
|
||||
// Position du module
|
||||
public static $modulePosition = [
|
||||
'bottom' => 'Après le contenu de la page',
|
||||
'top' => 'Avant le contenu de la page',
|
||||
'free' => 'À l\'emplacement du mot clé [MODULE] dans la page'
|
||||
'top' => 'Avant le contenu de la page',
|
||||
'free' => 'À l\'emplacement du mot clé [MODULE] dans la page'
|
||||
];
|
||||
public static $pageBlocks = [
|
||||
'12' => 'Page standard',
|
||||
'bar' => 'Barre latérale',
|
||||
'4-8' => 'Barre 1/3 - page 2/3',
|
||||
'8-4' => 'Page 2/3 - barre 1/3',
|
||||
'3-9' => 'Barre 1/4 - page 3/4',
|
||||
'9-3' => 'Page 3/4 - barre 1/4',
|
||||
'12' => 'Page standard',
|
||||
'bar' => 'Barre latérale',
|
||||
'4-8' => 'Barre 1/3 - page 2/3',
|
||||
'8-4' => 'Page 2/3 - barre 1/3',
|
||||
'3-9' => 'Barre 1/4 - page 3/4',
|
||||
'9-3' => 'Page 3/4 - barre 1/4',
|
||||
'3-6-3' => 'Barre 1/4 - page 1/2 - barre 1/4',
|
||||
'2-7-3' => 'Barre 2/12 - page 7/12 - barre 3/12',
|
||||
'3-7-2' => 'Barre 3/12 - page 7/12 - barre 2/12',
|
||||
];
|
||||
public static $displayMenu = [
|
||||
'none' => 'Aucun menu',
|
||||
'parents' => 'Le menu horizontal intégral',
|
||||
'children' => 'Le sous-menu de la page parente'
|
||||
'none' => 'Aucun menu',
|
||||
'parents' => 'Le menu horizontal intégral',
|
||||
'children' => 'Le sous-menu de la page parente'
|
||||
];
|
||||
public static $extraPosition = [
|
||||
false => 'Menu standard',
|
||||
true => 'Menu accessoire'
|
||||
];
|
||||
|
||||
public static $userProfils = [];
|
||||
|
||||
public static $navIconTemplate = [
|
||||
'dir' => 'Petit triangle',
|
||||
'open' => 'Grand triangle',
|
||||
'big' => 'Flèche',
|
||||
];
|
||||
|
||||
public static $navIconPosition = [
|
||||
'none' => 'Masqué',
|
||||
'top' => 'Haut de page',
|
||||
'bottom' => 'Bas de page',
|
||||
false => 'Menu standard',
|
||||
true => 'Menu accessoire'
|
||||
];
|
||||
|
||||
|
||||
@ -86,57 +71,56 @@ class page extends common
|
||||
*/
|
||||
public function duplicate()
|
||||
{
|
||||
// La session ne correspond pas au site ouvert dans cet onglet
|
||||
if (
|
||||
// Contrôle la présence de l'id de langue uniquement si l'id est fourni afin de ne pas bloquer les modules non mis à jour
|
||||
$this->getUrl(3) && $this->getUrl(3) != self::$siteContent
|
||||
) {
|
||||
$_SESSION['ZWII_SITE_CONTENT'] = $this->getUrl(3);
|
||||
header('Refresh:0; url=' . helper::baseUrl() . $this->getUrl());
|
||||
exit();
|
||||
}
|
||||
|
||||
// Adresse sans le token
|
||||
$page = $this->getUrl(2);
|
||||
|
||||
$url = explode('&', $this->getUrl(2));
|
||||
// La page n'existe pas
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true ||
|
||||
$this->getData(['page', $page]) === null
|
||||
) {
|
||||
if ($this->getData(['page', $url[0]]) === null) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} else {
|
||||
// Duplication de la page
|
||||
$pageTitle = $this->getData(['page', $page, 'title']);
|
||||
$pageId = helper::increment(helper::filter($pageTitle, helper::FILTER_ID), $this->getData(['page']));
|
||||
$pageId = helper::increment($pageId, self::$coreModuleIds);
|
||||
$pageId = helper::increment($pageId, self::$moduleIds);
|
||||
$data = $this->getData([
|
||||
'page',
|
||||
$page
|
||||
]);
|
||||
// Ecriture
|
||||
$this->setData(['page', $pageId, $data], false);
|
||||
$notification = helper::translate('Page dupliquée');
|
||||
// Duplication du module présent
|
||||
if ($this->getData(['page', $page, 'moduleId'])) {
|
||||
$data = $this->getData(['module', $page]);
|
||||
$this->setData(['module', $pageId, $data], false);
|
||||
$notification = helper::translate('Page et module dupliqués');
|
||||
}
|
||||
// Force la sauvegarde
|
||||
$this->saveDB('page');
|
||||
|
||||
} // Jeton incorrect
|
||||
elseif (!isset($_GET['csrf'])) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $pageId . '/' . self::$siteContent,
|
||||
'notification' => $notification,
|
||||
'state' => true
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $url[0],
|
||||
'notification' => helper::translate('Jeton invalide')
|
||||
]);
|
||||
} elseif ($_GET['csrf'] !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $url[0],
|
||||
'notification' => helper::translate('Suppression interdite')
|
||||
]);
|
||||
}
|
||||
// Duplication de la page
|
||||
$pageTitle = $this->getData(['page', $url[0], 'title']);
|
||||
$pageId = helper::increment(helper::filter($pageTitle, helper::FILTER_ID), $this->getData(['page']));
|
||||
$pageId = helper::increment($pageId, self::$coreModuleIds);
|
||||
$pageId = helper::increment($pageId, self::$moduleIds);
|
||||
$data = $this->getData([
|
||||
'page',
|
||||
$url[0]
|
||||
]);
|
||||
// Ecriture
|
||||
$this->setData(['page', $pageId, $data]);
|
||||
$notification = helper::translate('Page dupliquée');
|
||||
// Duplication du module présent
|
||||
if ($this->getData(['page', $url[0], 'moduleId'])) {
|
||||
$data = $this->getData([
|
||||
'module',
|
||||
$url[0]
|
||||
]);
|
||||
// Ecriture
|
||||
$this->setData(['module', $pageId, $data]);
|
||||
$notification = helper::translate('Page et module dupliqués');
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $pageId,
|
||||
'notification' => $notification,
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@ -145,76 +129,55 @@ class page extends common
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
// La session ne correspond pas au site ouvert dans cet onglet
|
||||
if (
|
||||
// Contrôle la présence de l'id de langue uniquement si l'id est fourni afin de ne pas bloquer les modules non mis à jour
|
||||
$this->getUrl(3) && $this->getUrl(3) != self::$siteContent
|
||||
) {
|
||||
$_SESSION['ZWII_SITE_CONTENT'] = $this->getUrl(3);
|
||||
header('Refresh:0; url=' . helper::baseUrl() . $this->getUrl());
|
||||
exit();
|
||||
$pageTitle = 'Nouvelle page';
|
||||
$pageId = helper::increment(helper::filter($pageTitle, helper::FILTER_ID), $this->getData(['page']));
|
||||
$this->setData([
|
||||
'page',
|
||||
$pageId,
|
||||
[
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => $pageId . '.html',
|
||||
'hideTitle' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'parentPageId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'position' => 0,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => $pageTitle,
|
||||
'shortTitle' => $pageTitle,
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => '0',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuHead' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'js' => '',
|
||||
'css' => ''
|
||||
]
|
||||
]);
|
||||
// Creation du contenu de la page
|
||||
if (!is_dir(self::DATA_DIR . self::$i18nContent . '/content')) {
|
||||
mkdir(self::DATA_DIR . self::$i18nContent . '/content', 0755);
|
||||
}
|
||||
|
||||
if ($this->getUser('permission', __CLASS__, __FUNCTION__) !== true) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} else {
|
||||
$pageTitle = 'Nouvelle page';
|
||||
$pageId = helper::increment(helper::filter($pageTitle, helper::FILTER_ID), $this->getData(['page']));
|
||||
$this->setData([
|
||||
'page',
|
||||
$pageId,
|
||||
[
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => $pageId . '.html',
|
||||
'hideTitle' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'parentPageId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'position' => 0,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => $pageTitle,
|
||||
'shortTitle' => $pageTitle,
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'navLeft' => 'none',
|
||||
'navRight' => 'none',
|
||||
'navTemplate' => 'dir',
|
||||
'displayMenu' => '0',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuHead' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'js' => '',
|
||||
'css' => ''
|
||||
]
|
||||
]);
|
||||
// Creation du contenu de la page
|
||||
if (!is_dir(self::DATA_DIR . self::$siteContent . '/content')) {
|
||||
mkdir(self::DATA_DIR . self::$siteContent . '/content', 0755);
|
||||
}
|
||||
//$this->secure_file_put_contents(self::DATA_DIR . self::$siteContent . '/content/' . $pageId . '.html', '<p>Contenu de votre nouvelle page.</p>');
|
||||
$this->setPage($pageId, '<p>Contenu de votre nouvelle page.</p>', self::$siteContent);
|
||||
|
||||
// Ne met à jour le sitemap pour éviter un warning, de toute manière la nouvelle page doit être éditée.
|
||||
// $this->updateSitemap();
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $pageId,
|
||||
'notification' => helper::translate('Nouvelle page créée'),
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
|
||||
//file_put_contents(self::DATA_DIR . self::$i18nContent . '/content/' . $pageId . '.html', '<p>Contenu de votre nouvelle page.</p>');
|
||||
$this->setPage($pageId, '<p>Contenu de votre nouvelle page.</p>', self::$i18nContent);
|
||||
// Met à jour le site map
|
||||
$this->createSitemap('all');
|
||||
// Mise à jour de la liste des pages pour TinyMCE
|
||||
$this->listPages();
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $pageId,
|
||||
'notification' => helper::translate('Nouvelle page créée'),
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -222,105 +185,120 @@ class page extends common
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
// La session ne correspond pas au site ouvert dans cet onglet
|
||||
if (
|
||||
// Contrôle la présence de l'id de langue uniquement si l'id est fourni afin de ne pas bloquer les modules non mis à jour
|
||||
$this->getUrl(3) && $this->getUrl(3) != self::$siteContent
|
||||
) {
|
||||
$_SESSION['ZWII_SITE_CONTENT'] = $this->getUrl(3);
|
||||
header('Refresh:0; url=' . helper::baseUrl() . $this->getUrl());
|
||||
exit();
|
||||
}
|
||||
|
||||
// $url prend l'adresse sans le token
|
||||
$page = $this->getUrl(2);
|
||||
$url = explode('&', $this->getUrl(2));
|
||||
// La page n'existe pas
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true ||
|
||||
$this->getData(['page', $page]) === null
|
||||
) {
|
||||
if ($this->getData(['page', $url[0]]) === null) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} // Jeton incorrect
|
||||
elseif (!isset($_GET['csrf'])) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $url[0],
|
||||
'notification' => helper::translate('Jeton invalide')
|
||||
]);
|
||||
} elseif ($_GET['csrf'] !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $url[0],
|
||||
'notification' => helper::translate('Suppression interdite')
|
||||
]);
|
||||
}
|
||||
// Impossible de supprimer la page d'accueil
|
||||
elseif ($page === $this->getData(['locale', 'homePageId'])) {
|
||||
elseif ($url[0] === $this->getData(['locale', 'homePageId'])) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'config',
|
||||
'notification' => helper::translate('Suppression interdite, page active dans la configuration de la langue du site')
|
||||
'redirect' => helper::baseUrl() . 'config',
|
||||
'notification' => helper::translate('Suppression interdite, page active dans la configuration du site')
|
||||
]);
|
||||
}
|
||||
// Impossible de supprimer la page affectée
|
||||
elseif ($page === $this->getData(['locale', 'searchPageId'])) {
|
||||
// Impossible de supprimer la page de recherche affectée
|
||||
elseif ($url[0] === $this->getData(['locale', 'searchPageId'])) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'config',
|
||||
'notification' => helper::translate('Suppression interdite, page active dans la configuration de la langue du site')
|
||||
'redirect' => helper::baseUrl() . 'config',
|
||||
'notification' => helper::translate('Suppression interdite, page active dans la configuration du site')
|
||||
]);
|
||||
}
|
||||
// Impossible de supprimer la page affectée
|
||||
elseif ($page === $this->getData(['locale', 'legalPageId'])) {
|
||||
// Impossible de supprimer la page des mentions légales affectée
|
||||
elseif ($url[0] === $this->getData(['locale', 'legalPageId'])) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'config',
|
||||
'notification' => helper::translate('Suppression interdite, page active dans la configuration de la langue du site')
|
||||
'notification' => helper::translate('Suppression interdite, page active dans la configuration du site')
|
||||
]);
|
||||
}
|
||||
// Impossible de supprimer la page affectée
|
||||
elseif ($page === $this->getData(['locale', 'page404'])) {
|
||||
// Impossible de supprimer la page des mentions légales affectée
|
||||
elseif ($url[0] === $this->getData(['locale', 'page404'])) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'config',
|
||||
'notification' => helper::translate('Suppression interdite, page active dans la configuration de la langue du site')
|
||||
'notification' => helper::translate('Suppression interdite, page active dans la configuration du site')
|
||||
]);
|
||||
}
|
||||
// Impossible de supprimer la page affectée
|
||||
elseif ($page === $this->getData(['locale', 'page403'])) {
|
||||
// Impossible de supprimer la page des mentions légales affectée
|
||||
elseif ($url[0] === $this->getData(['locale', 'page403'])) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'config',
|
||||
'notification' => helper::translate('Suppression interdite, page active dans la configuration de la langue du site')
|
||||
'notification' => helper::translate('Suppression interdite, page active dans la configuration du site')
|
||||
]);
|
||||
}
|
||||
// Impossible de supprimer la page affectée
|
||||
elseif ($page === $this->getData(['locale', 'page302'])) {
|
||||
// Impossible de supprimer la page des mentions légales affectée
|
||||
elseif ($url[0] === $this->getData(['locale', 'page302'])) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'config',
|
||||
'notification' => helper::translate('Suppression interdite, page active dans la configuration de la langue du site')
|
||||
'notification' => helper::translate('Suppression interdite, page active dans la configuration du site')
|
||||
]);
|
||||
}
|
||||
// Jeton incorrect
|
||||
elseif (!isset($_GET['csrf'])) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $url[0],
|
||||
'notification' => helper::translate('Jeton invalide')
|
||||
]);
|
||||
} elseif ($_GET['csrf'] !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $url[0],
|
||||
'notification' => helper::translate('Suppression interdite')
|
||||
]);
|
||||
}
|
||||
// Impossible de supprimer une page contenant des enfants
|
||||
elseif ($this->getHierarchy($page, null)) {
|
||||
elseif ($this->getHierarchy($url[0], null)) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $page . '/' . self::$siteContent,
|
||||
'notification' => helper::translate('Impossible de supprimer une page contenant des pages enfants')
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $url[0],
|
||||
'notification' => helper::translate('Impossible de supprimer une page contenant des pages enfants')
|
||||
]);
|
||||
}
|
||||
// Suppression
|
||||
else {
|
||||
|
||||
// Effacer le dossier du module
|
||||
$moduleId = $this->getData(['page', $page, 'moduleId']);
|
||||
$moduleId = $this->getData(['page', $url[0], 'moduleId']);
|
||||
$modulesData = helper::getModules();
|
||||
if (
|
||||
array_key_exists($moduleId, $modulesData)
|
||||
&& is_dir($modulesData[$moduleId]['dataDirectory'] . $page)
|
||||
&& is_dir($modulesData[$moduleId]['dataDirectory'] . $url[0])
|
||||
) {
|
||||
$this->deleteDir($modulesData[$moduleId]['dataDirectory'] . $page);
|
||||
$this->removeDir($modulesData[$moduleId]['dataDirectory'] . $url[0]);
|
||||
}
|
||||
// Effacer la page
|
||||
$this->deleteData(['page', $page]);
|
||||
if (file_exists(self::DATA_DIR . self::$siteContent . '/content/' . $page . '.html')) {
|
||||
unlink(self::DATA_DIR . self::$siteContent . '/content/' . $page . '.html');
|
||||
$this->deleteData(['page', $url[0]]);
|
||||
if (file_exists(self::DATA_DIR . self::$i18nContent . '/content/' . $url[0] . '.html')) {
|
||||
unlink(self::DATA_DIR . self::$i18nContent . '/content/' . $url[0] . '.html');
|
||||
}
|
||||
$this->deleteData(['module', $page]);
|
||||
|
||||
// Met à jour le sitemap
|
||||
$this->updateSitemap();
|
||||
|
||||
$this->deleteData(['module', $url[0]]);
|
||||
// Met à jour le site map
|
||||
$this->createSitemap('all');
|
||||
// Mise à jour de la liste des pages pour TinyMCE
|
||||
$this->listPages();
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl(false),
|
||||
@ -336,22 +314,8 @@ class page extends common
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
|
||||
// La session ne correspond pas au site ouvert dans cet onglet
|
||||
if (
|
||||
// Contrôle la présence de l'id de langue uniquement si l'id est fourni afin de ne pas bloquer les modules non mis à jour
|
||||
$this->getUrl(3) && $this->getUrl(3) != self::$siteContent
|
||||
) {
|
||||
$_SESSION['ZWII_SITE_CONTENT'] = $this->getUrl(3);
|
||||
header('Refresh:0; url=' . helper::baseUrl() . $this->getUrl());
|
||||
exit();
|
||||
}
|
||||
|
||||
// La page n'existe pas
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true ||
|
||||
$this->getData(['page', $this->getUrl(2)]) === null
|
||||
) {
|
||||
if ($this->getData(['page', $this->getUrl(2)]) === null) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
@ -360,10 +324,7 @@ class page extends common
|
||||
// La page existe
|
||||
else {
|
||||
// Soumission du formulaire
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
|
||||
$this->isPost()
|
||||
) {
|
||||
if ($this->isPost()) {
|
||||
// Si le Title n'est pas vide, premier test pour positionner la notification du champ obligatoire
|
||||
if ($this->getInput('pageEditTitle', helper::FILTER_ID, true) !== null && $this->getInput('pageEditTitle') !== '') {
|
||||
// Génére l'ID si le titre de la page a changé
|
||||
@ -384,13 +345,11 @@ class page extends common
|
||||
$pageId = helper::increment($pageId, self::$moduleIds);
|
||||
// Met à jour les enfants
|
||||
foreach ($this->getHierarchy($this->getUrl(2), null) as $childrenPageId) {
|
||||
$this->setData(['page', $childrenPageId, 'parentPageId', $pageId], false);
|
||||
$this->setData(['page', $childrenPageId, 'parentPageId', $pageId]);
|
||||
}
|
||||
// Force la sauvegarde
|
||||
$this->saveDB('page');
|
||||
// Change l'id de page dans les données des modules
|
||||
if ($this->getData(['module', $this->getUrl(2)]) !== null) {
|
||||
$this->setData(['module', $pageId, $this->getData(['module', $this->getUrl(2)])], false);
|
||||
$this->setData(['module', $pageId, $this->getData(['module', $this->getUrl(2)])]);
|
||||
$this->deleteData(['module', $this->getUrl(2)]);
|
||||
// Renommer le dossier du module
|
||||
$moduleId = $this->getData(['page', $this->getUrl(2), 'moduleId']);
|
||||
@ -399,12 +358,10 @@ class page extends common
|
||||
// Placer la feuille de style dans un dossier au nom de la nouvelle instance
|
||||
mkdir($modulesData[$moduleId]['dataDirectory'] . $pageId, 0755);
|
||||
copy($modulesData[$moduleId]['dataDirectory'] . $this->getUrl(2), $modulesData[$moduleId]['dataDirectory'] . $pageId);
|
||||
$this->deleteDir($modulesData[$moduleId]['dataDirectory'] . $this->getUrl(2));
|
||||
$this->removeDir($modulesData[$moduleId]['dataDirectory'] . $this->getUrl(2));
|
||||
// Mettre à jour le nom de la feuille de style
|
||||
$this->setData(['module', $pageId, 'theme', 'style', $modulesData[$moduleId]['dataDirectory'] . $pageId], false);
|
||||
$this->setData(['module', $pageId, 'theme', 'style', $modulesData[$moduleId]['dataDirectory'] . $pageId]);
|
||||
}
|
||||
// Force la sauvegarde
|
||||
$this->saveDB('module');
|
||||
}
|
||||
// Si la page correspond à la page d'accueil, change l'id dans la configuration du site
|
||||
if ($this->getData(['locale', 'homePageId']) === $this->getUrl(2)) {
|
||||
@ -418,28 +375,26 @@ class page extends common
|
||||
// Supprime l'ancienne page si l'id a changée
|
||||
if ($pageId !== $this->getUrl(2)) {
|
||||
$this->deleteData(['page', $this->getUrl(2)]);
|
||||
if (file_exists(self::DATA_DIR . self::$siteContent . '/content/' . $this->getUrl(2) . '.html')) {
|
||||
unlink(self::DATA_DIR . self::$siteContent . '/content/' . $this->getUrl(2) . '.html');
|
||||
if (file_exists(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getUrl(2) . '.html')) {
|
||||
unlink(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getUrl(2) . '.html');
|
||||
}
|
||||
}
|
||||
// Traitement des pages spéciales affectées dans la config :
|
||||
if ($this->getUrl(2) === $this->getData(['locale', 'legalPageId'])) {
|
||||
$this->setData(['locale', 'legalPageId', $pageId], false);
|
||||
$this->setData(['locale', 'legalPageId', $pageId]);
|
||||
}
|
||||
if ($this->getUrl(2) === $this->getData(['locale', 'searchPageId'])) {
|
||||
$this->setData(['locale', 'searchPageId', $pageId], false);
|
||||
$this->setData(['locale', 'searchPageId', $pageId]);
|
||||
}
|
||||
if ($this->getUrl(2) === $this->getData(['locale', 'page404'])) {
|
||||
$this->setData(['locale', 'page404', $pageId], false);
|
||||
$this->setData(['locale', 'page404', $pageId]);
|
||||
}
|
||||
if ($this->getUrl(2) === $this->getData(['locale', 'page403'])) {
|
||||
$this->setData(['locale', 'page403', $pageId], false);
|
||||
$this->setData(['locale', 'page403', $pageId]);
|
||||
}
|
||||
if ($this->getUrl(2) === $this->getData(['locale', 'page302'])) {
|
||||
$this->setData(['locale', 'page302', $pageId], false);
|
||||
$this->setData(['locale', 'page302', $pageId]);
|
||||
}
|
||||
// Force la sauvegarde
|
||||
$this->saveDB('locale');
|
||||
// Si la page est une page enfant, actualise les positions des autres enfants du parent, sinon actualise les pages sans parents
|
||||
$lastPosition = 1;
|
||||
$hierarchy = $this->getInput('pageEditParentPageId') ? $this->getHierarchy($this->getInput('pageEditParentPageId')) : array_keys($this->getHierarchy());
|
||||
@ -458,7 +413,7 @@ class page extends common
|
||||
$lastPosition++;
|
||||
}
|
||||
// Change la position
|
||||
$this->setData(['page', $hierarchyPageId, 'position', $lastPosition], false);
|
||||
$this->setData(['page', $hierarchyPageId, 'position', $lastPosition]);
|
||||
// Incrémente pour la prochaine position
|
||||
$lastPosition++;
|
||||
}
|
||||
@ -478,49 +433,35 @@ class page extends common
|
||||
// Une page parent devient orpheline, les pages enfants le devienne pour éviter une incohérence
|
||||
if (
|
||||
$position === 0 &&
|
||||
$position !== $this->getData(['page', $this->getUrl(2), 'position']) &&
|
||||
$position !== $this->getData(['page', $this->getUrl(2), 'position']) &&
|
||||
$this->getinput('pageEditBlock') !== 'bar'
|
||||
) {
|
||||
foreach ($this->getHierarchy($pageId) as $parentId => $childId) {
|
||||
if ($this->getData(['page', $childId, 'parentPageId']) === $pageId) {
|
||||
$this->setData(['page', $childId, 'position', 0], false);
|
||||
$this->setData(['page', $childId, 'position', 0]);
|
||||
}
|
||||
}
|
||||
// Force la sauvegarde
|
||||
$this->saveDB('page');
|
||||
}
|
||||
|
||||
// La page est une barre latérale qui a été renommée : changer le nom de la barre dans les pages qui l'utilisent
|
||||
if ($this->getinput('pageEditBlock') === 'bar') {
|
||||
foreach ($this->getHierarchy() as $eachPageId => $parentId) {
|
||||
if ($this->getData(['page', $eachPageId, 'barRight']) === $this->getUrl(2)) {
|
||||
$this->setData(['page', $eachPageId, 'barRight', $pageId], false);
|
||||
$this->setData(['page', $eachPageId, 'barRight', $pageId]);
|
||||
}
|
||||
if ($this->getData(['page', $eachPageId, 'barLeft']) === $this->getUrl(2)) {
|
||||
$this->setData(['page', $eachPageId, 'barLeft', $pageId], false);
|
||||
$this->setData(['page', $eachPageId, 'barLeft', $pageId]);
|
||||
}
|
||||
foreach ($parentId as $childId) {
|
||||
if ($this->getData(['page', $childId, 'barRight']) === $this->getUrl(2)) {
|
||||
$this->setData(['page', $childId, 'barRight', $pageId], false);
|
||||
$this->setData(['page', $childId, 'barRight', $pageId]);
|
||||
}
|
||||
if ($this->getData(['page', $childId, 'barLeft']) === $this->getUrl(2)) {
|
||||
$this->setData(['page', $childId, 'barLeft', $pageId], false);
|
||||
$this->setData(['page', $childId, 'barLeft', $pageId]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Détermine le groupe selon que la page est une barre ou une page standard
|
||||
$group = $this->getinput('pageEditBlock') !== 'bar' ? $this->getInput('pageEditGroup', helper::FILTER_INT) : 0;
|
||||
|
||||
//Détermine le profil d'utilisateur en fonction du groupe sinon le groupe vaut 0
|
||||
$profil = 0;
|
||||
if (
|
||||
$this->getinput('pageEditBlock') !== 'bar' ||
|
||||
$group === 1 ||
|
||||
$group === 2
|
||||
) {
|
||||
$profil = $this->getInput('pageEditProfil' . $group, helper::FILTER_INT);
|
||||
}
|
||||
|
||||
// Modifie la page ou en crée une nouvelle si l'id a changé
|
||||
$this->setData([
|
||||
@ -539,36 +480,34 @@ class page extends common
|
||||
'modulePosition' => $this->getInput('pageModulePosition'),
|
||||
'parentPageId' => $this->getInput('pageEditParentPageId'),
|
||||
'position' => $position,
|
||||
'group' => $group,
|
||||
'profil' => $profil,
|
||||
'group' => $this->getinput('pageEditBlock') !== 'bar' ? $this->getInput('pageEditGroup', helper::FILTER_INT) : 0,
|
||||
'targetBlank' => $this->getInput('pageEditTargetBlank', helper::FILTER_BOOLEAN),
|
||||
'title' => $this->getInput('pageEditTitle', helper::FILTER_STRING_SHORT),
|
||||
'shortTitle' => $this->getInput('pageEditShortTitle', helper::FILTER_STRING_SHORT, true),
|
||||
'block' => $this->getinput('pageEditBlock'),
|
||||
'barLeft' => $barLeft,
|
||||
'barRight' => $barRight,
|
||||
'navLeft' => $this->getInput('pageEditNavLeft'),
|
||||
'navRight' => $this->getInput('pageEditNavRight'),
|
||||
'navTemplate' => $this->getInput('pageEditNavTemplate'),
|
||||
'displayMenu' => $this->getinput('pageEditDisplayMenu'),
|
||||
'hideMenuSide' => $this->getinput('pageEditHideMenuSide', helper::FILTER_BOOLEAN),
|
||||
'hideMenuHead' => $this->getinput('pageEditHideMenuHead', helper::FILTER_BOOLEAN),
|
||||
'hideMenuChildren' => $this->getinput('pageEditHideMenuChildren', helper::FILTER_BOOLEAN),
|
||||
'extraPosition' => $this->getinput('pageEditExtraPosition', helper::FILTER_BOOLEAN),
|
||||
'css' => $this->getData(['page', $this->getUrl(2), 'css']) == null ? '' : $this->getData(['page', $this->getUrl(2), 'css']),
|
||||
'js' => $this->getData(['page', $this->getUrl(2), 'js']) == null ? '' : $this->getData(['page', $this->getUrl(2), 'js']),
|
||||
'css' => $this->getData(['page', $this->getUrl(2), 'css']),
|
||||
'js' => $this->getData(['page', $this->getUrl(2), 'js']),
|
||||
]
|
||||
]);
|
||||
|
||||
// Creation du contenu de la page
|
||||
if (!is_dir(self::DATA_DIR . self::$siteContent . '/content')) {
|
||||
mkdir(self::DATA_DIR . self::$siteContent . '/content', 0755);
|
||||
if (!is_dir(self::DATA_DIR . self::$i18nContent . '/content')) {
|
||||
mkdir(self::DATA_DIR . self::$i18nContent . '/content', 0755);
|
||||
}
|
||||
$content = empty($this->getInput('pageEditContent', null)) ? '<p></p>' : str_replace('<p></p>', '<p> </p>', $this->getInput('pageEditContent', null));
|
||||
$this->setPage($pageId, $content, self::$siteContent);
|
||||
$this->setPage($pageId, $content, self::$i18nContent);
|
||||
|
||||
// Met à jour le sitemap
|
||||
$this->updateSitemap();
|
||||
// Met à jour le site map
|
||||
$this->createSitemap('all');
|
||||
// Mise à jour de la liste des pages pour TinyMCE
|
||||
$this->listPages();
|
||||
|
||||
// Redirection vers la configuration
|
||||
if (
|
||||
@ -590,19 +529,7 @@ class page extends common
|
||||
}
|
||||
}
|
||||
}
|
||||
// Construction du formulaire
|
||||
|
||||
// Met à jour le sitemap
|
||||
$this->updateSitemap();
|
||||
|
||||
// Création du sélecteur de modules
|
||||
self::$moduleIds = [];
|
||||
foreach (helper::getModules() as $key => $values) {
|
||||
self::$moduleIds[$key] = $values['realName'] . ' (' . $key . ')';
|
||||
}
|
||||
self::$moduleIds = array_merge(['' => 'Aucun'], self::$moduleIds);
|
||||
|
||||
// Pages sans parent
|
||||
self::$moduleIds = array_merge(['' => 'Aucun'], helper::arrayColumn(helper::getModules(), 'realName', 'SORT_ASC')); // Pages sans parent
|
||||
foreach ($this->getHierarchy() as $parentPageId => $childrenPageIds) {
|
||||
if ($parentPageId !== $this->getUrl(2)) {
|
||||
self::$pagesNoParentId[$parentPageId] = $this->getData(['page', $parentPageId, 'title']);
|
||||
@ -617,20 +544,6 @@ class page extends common
|
||||
self::$pagesBarId[$parentPageId] = $this->getData(['page', $parentPageId, 'title']);
|
||||
}
|
||||
}
|
||||
// Profils installés
|
||||
// Profils disponibles
|
||||
foreach ($this->getData(['profil']) as $profilId => $profilData) {
|
||||
if ($profilId < self::GROUP_MEMBER) {
|
||||
continue;
|
||||
}
|
||||
if ($profilId === self::GROUP_ADMIN) {
|
||||
self::$userProfils[$profilId][self::GROUP_ADMIN] = $profilData['name'];
|
||||
continue;
|
||||
}
|
||||
foreach ($profilData as $key => $value) {
|
||||
self::$userProfils[$profilId][$key] = $profilData[$key]['name'];
|
||||
}
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => $this->getData(['page', $this->getUrl(2), 'title']),
|
||||
@ -648,22 +561,20 @@ class page extends common
|
||||
public function cssEditor()
|
||||
{
|
||||
// Soumission du formulaire
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
|
||||
$this->isPost()
|
||||
) {
|
||||
$css = $this->getInput('pageCssEditorContent', helper::FILTER_STRING_LONG) === null ? '' : $this->getInput('pageCssEditorContent', helper::FILTER_STRING_LONG);
|
||||
if ($this->isPost()) {
|
||||
// Supprime les balises styles si elles ont été saisies
|
||||
$css = $this->getInput('pageCssEditorContent', null);
|
||||
$css = str_replace('<style>', '', $css);
|
||||
$css = str_replace('</style>', '', $css);
|
||||
// Enregistre le CSS
|
||||
$this->setData([
|
||||
'page',
|
||||
$this->getUrl(2),
|
||||
'css',
|
||||
'page', $this->getUrl(2), 'css',
|
||||
$css
|
||||
]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'notification' => helper::translate('Modifications enregistrées'),
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2) . '/' . self::$siteContent,
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2),
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
@ -683,22 +594,20 @@ class page extends common
|
||||
public function jsEditor()
|
||||
{
|
||||
// Soumission du formulaire
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
|
||||
$this->isPost()
|
||||
) {
|
||||
$js = $this->getInput('pageJsEditorContent', helper::FILTER_STRING_LONG) === null ? '' : $this->getInput('pageJsEditorContent', helper::FILTER_STRING_LONG);
|
||||
// Supprime les balises scripts si elles ont été saisies
|
||||
$js = $this->getInput('pageJsEditorContent', null);
|
||||
$js = str_replace('<script>', '', $js);
|
||||
$js = str_replace('<script>', '', $js);
|
||||
if ($this->isPost()) {
|
||||
// Enregistre le JS
|
||||
$this->setData([
|
||||
'page',
|
||||
$this->getUrl(2),
|
||||
'js',
|
||||
'page', $this->getUrl(2), 'js',
|
||||
$js
|
||||
]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'notification' => helper::translate('Modifications enregistrées'),
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2) . '/' . self::$siteContent,
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2),
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
@ -711,39 +620,4 @@ class page extends common
|
||||
'view' => 'jsEditor'
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne les informations sur les pages en omettant les clés CSS et JS qui occasionnent des bugs d'affichage dans l'éditeur de page
|
||||
* @return string tableau associatif des pages dans le menu
|
||||
*/
|
||||
public function getPageInfo()
|
||||
{
|
||||
$p = $this->getData(['page']);
|
||||
$d = array_map(function ($d) {
|
||||
unset($d["css"], $d["js"]);
|
||||
return $d;
|
||||
}, $p);
|
||||
return json_encode($d);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stocke la variable dans les paramètres de l'utilisateur pour activer la tab à sa prochaine visite
|
||||
* @return never
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
$this->setData([
|
||||
'user',
|
||||
$this->getUser('id'),
|
||||
'view',
|
||||
[
|
||||
'page' => $this->getUrl(2),
|
||||
'config' => $this->getData(['user', $this->getUser('id'), 'view', 'config']),
|
||||
]
|
||||
]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $this->getUrl(3) . '/' . self::$siteContent,
|
||||
]);
|
||||
}
|
||||
}
|
@ -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/
|
||||
*/
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="col1">
|
||||
<?php echo template::button('pageCssEditorBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2) . '/' . self::$siteContent,
|
||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2),
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
@ -12,9 +12,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo helper::translate('Ne pas saisir les balises') . htmlentities(' <style></style>'); ?>
|
||||
</div>
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('pageCssEditorContent', [
|
||||
'value' => is_null($this->getData(['page', $this->getUrl(2), 'css'])) ? '' : $this->getData(['page', $this->getUrl(2), 'css']),
|
||||
'value' => empty($this->getData(['page', $this->getUrl(2), 'css'])) ? '' : $this->getData(['page', $this->getUrl(2), 'css']),
|
||||
'class' => 'editor'
|
||||
]); ?>
|
||||
</div>
|
||||
|
@ -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/
|
||||
*/
|
||||
|
||||
@ -44,7 +44,3 @@
|
||||
background-color: #00BFFF;
|
||||
}
|
||||
|
||||
#pageEditProfil1Wrapper,
|
||||
#pageEditProfil2Wrapper {
|
||||
padding: 0;
|
||||
}
|
@ -7,15 +7,15 @@
|
||||
* @author Rémi Jean <remi.jean@outlook.com>
|
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||
* @authorFré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/
|
||||
*/
|
||||
|
||||
/**
|
||||
* Confirmation de suppression
|
||||
*/
|
||||
$("#pageEditDelete").on("click", function() {
|
||||
$("#pageEditDelete").on("click", function() {
|
||||
var _this = $(this);
|
||||
var message_delete = "<?php echo helper::translate('Confirmer la suppression de la page'); ?>";
|
||||
return core.confirm(message_delete, function() {
|
||||
@ -23,7 +23,7 @@ $("#pageEditDelete").on("click", function() {
|
||||
});
|
||||
});
|
||||
|
||||
$("#pageEditModuleId").on("change", function() {
|
||||
$("#pageEditModuleId").on("click", function() {
|
||||
protectModule();
|
||||
});
|
||||
|
||||
@ -54,32 +54,19 @@ function protectModule() {
|
||||
*/
|
||||
$( document ).ready(function() {
|
||||
|
||||
// Changement de profil
|
||||
$(".pageEditGroupProfil").hide();
|
||||
$("#pageEditGroupProfil" + $("#pageEditGroup").val()).show();
|
||||
|
||||
$("#pageEditGroup").on("change", function () {
|
||||
$(".pageEditGroupProfil").hide();
|
||||
$("#pageEditGroupProfil" + $(this).val()).show();
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Sélection des onglets
|
||||
*/
|
||||
var pageLayout = "<?php echo $this->getData(['user', $this->getUser('id'), 'view', 'page']);?>";
|
||||
|
||||
// Non défini, valeur par défaut
|
||||
if (pageLayout == "") {
|
||||
var pageLayout = getCookie("pageLayout");
|
||||
if (pageLayout == null) {
|
||||
pageLayout = "content";
|
||||
setCookie("pageLayout", "content");
|
||||
}
|
||||
// Tout cacher
|
||||
$("#pageEditContentContainer").hide();
|
||||
$("#pageEditExtensionContainer").hide();
|
||||
$("#pageEditPositionContainer").hide();
|
||||
$("#pageEditLayoutContainer").hide();
|
||||
$("#pageEditPermissionContainer").hide();
|
||||
// Afficher la bonne tab
|
||||
$("#pageEdit" + capitalizeFirstLetter(pageLayout) + "Container").show();
|
||||
$("#pageEdit" + capitalizeFirstLetter(pageLayout) + "Button").addClass("activeButton");
|
||||
|
||||
@ -196,7 +183,6 @@ $( document ).ready(function() {
|
||||
$("#pageEditSeoWrapper").slideUp();
|
||||
$("#pageEditAdvancedWrapper").removeClass("disabled");
|
||||
$("#pageEditAdvancedWrapper").slideUp();
|
||||
$(".navSelect").slideUp();
|
||||
/*
|
||||
$("#pageEditBlockLayout").removeClass("col6");
|
||||
$("#pageEditBlockLayout").addClass("col12");
|
||||
@ -298,6 +284,7 @@ $( document ).ready(function() {
|
||||
$("#PageEditPositionButton").removeClass("activeButton");
|
||||
$("#pageEditLayoutButton").removeClass("activeButton");
|
||||
$("#pageEditPermissionButton").removeClass("activeButton");
|
||||
setCookie("pageLayout", "content");
|
||||
});
|
||||
$("#pageEditExtensionButton").on("click", function () {
|
||||
$("#pageEditContentContainer").hide();
|
||||
@ -310,6 +297,7 @@ $( document ).ready(function() {
|
||||
$("#PageEditPositionButton").removeClass("activeButton");
|
||||
$("#pageEditLayoutButton").removeClass("activeButton");
|
||||
$("#pageEditPermissionButton").removeClass("activeButton");
|
||||
setCookie("pageLayout", "extension");
|
||||
});
|
||||
$("#PageEditPositionButton").on("click", function () {
|
||||
$("#pageEditContentContainer").hide();
|
||||
@ -322,6 +310,7 @@ $( document ).ready(function() {
|
||||
$("#PageEditPositionButton").addClass("activeButton");
|
||||
$("#pageEditLayoutButton").removeClass("activeButton");
|
||||
$("#pageEditPermissionButton").removeClass("activeButton");
|
||||
setCookie("pageLayout", "position");
|
||||
});
|
||||
$("#pageEditLayoutButton").on("click", function () {
|
||||
$("#pageEditContentContainer").hide();
|
||||
@ -334,6 +323,7 @@ $( document ).ready(function() {
|
||||
$("#PageEditPositionButton").removeClass("activeButton");
|
||||
$("#pageEditLayoutButton").addClass("activeButton");
|
||||
$("#pageEditPermissionButton").removeClass("activeButton");
|
||||
setCookie("pageLayout", "layout");
|
||||
});
|
||||
$("#pageEditPermissionButton").on("click", function () {
|
||||
$("#pageEditContentContainer").hide();
|
||||
@ -346,6 +336,7 @@ $( document ).ready(function() {
|
||||
$("#pageEditPositionButton").removeClass("activeButton");
|
||||
$("#pageEditLayoutButton").removeClass("activeButton");
|
||||
$("#pageEditPermissionButton").addClass("activeButton");
|
||||
setCookie("pageLayout", "permission");
|
||||
});
|
||||
|
||||
/**
|
||||
@ -508,7 +499,6 @@ pageEditBlockDOM.on("change", function() {
|
||||
$("#pageEditModuleConfig").slideUp();
|
||||
$("#pageEditDisplayMenuWrapper").addClass("disabled");
|
||||
$("#pageEditDisplayMenuWrapper").slideDown();
|
||||
$(".navSelect").slideUp();
|
||||
/*
|
||||
$("#pageEditBlockLayout").removeClass("col6");
|
||||
$("#pageEditBlockLayout").addClass("col12");
|
||||
@ -529,7 +519,6 @@ pageEditBlockDOM.on("change", function() {
|
||||
$("#pageEditModuleConfig").slideDown();
|
||||
$("#pageEditDisplayMenuWrapper").removeClass("disabled");
|
||||
$("#pageEditDisplayMenuWrapper").slideUp();
|
||||
$(".navSelect").slideDown();
|
||||
if ($("#pageEditParentPageId").val() !== "") {
|
||||
$("#pageEditbreadCrumbWrapper").addClass("disabled");
|
||||
$("#pageEditbreadCrumbWrapper").slideDown();
|
||||
@ -655,7 +644,7 @@ $("#pageEditParentPageId").on("change", function() {
|
||||
|
||||
function buildPagesList(extraPosition) {
|
||||
var hierarchy = <?php echo json_encode($this->getHierarchy()); ?>;
|
||||
var pages = <?php echo $module->getPageInfo(); ?>;
|
||||
var pages = <?php echo json_encode($this->getData(['page'])); ?>;
|
||||
var positionInitial = <?php echo $this->getData(['page',$this->getUrl(2),"position"]); ?>;
|
||||
var extraPosition = $("#pageEditExtraPosition").val();
|
||||
var positionDOM = $("#pageEditPosition");
|
||||
@ -720,6 +709,30 @@ function buildPagesList(extraPosition) {
|
||||
positionDOM.val(positionSelected);
|
||||
};
|
||||
|
||||
/**
|
||||
* Cookies
|
||||
*/
|
||||
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);
|
||||
|
@ -1,23 +1,34 @@
|
||||
<?php echo template::formOpen('pageEditForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<?php echo template::button('configModulesBack', [
|
||||
<?php $href = helper::baseUrl() . $this->getUrl(2); ?>
|
||||
<?php if ($this->getData(['page', $this->getUrl(2), 'moduleId']) === 'redirection' || 'code') $href = helper::baseUrl(); ?>
|
||||
<?php echo template::button('pageEditBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . $this->getUrl(2),
|
||||
'value' => template::ico('left')
|
||||
'href' => $href,
|
||||
'value' => template::ico('home')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1 offset7">
|
||||
<div class="col1">
|
||||
<?php /**echo template::button('pageEditHelp', [
|
||||
'href' => 'https://doc.zwiicms.fr/edition-des-pages',
|
||||
'target' => '_blank',
|
||||
'value' => template::ico('help'),
|
||||
'class' => 'buttonHelp',
|
||||
'help' => 'Consulter l\'aide en ligne'
|
||||
]); */ ?>
|
||||
</div>
|
||||
<div class="col1 offset6">
|
||||
<?php echo template::button('pageEditDelete', [
|
||||
'class' => 'buttonRed',
|
||||
'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(2) . '/' . self::$siteContent,
|
||||
'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(2) . '&csrf=' . $_SESSION['csrf'],
|
||||
'value' => template::ico('trash'),
|
||||
'help' => 'Effacer la page'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1">
|
||||
<?php echo template::button('pageEditDuplicate', [
|
||||
'href' => helper::baseUrl() . 'page/duplicate/' . $this->getUrl(2) . '/' . self::$siteContent,
|
||||
'href' => helper::baseUrl() . 'page/duplicate/' . $this->getUrl(2) . '&csrf=' . $_SESSION['csrf'],
|
||||
'value' => template::ico('clone'),
|
||||
'help' => 'Dupliquer la page'
|
||||
]); ?>
|
||||
@ -28,31 +39,27 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab">
|
||||
<?php echo template::button('pageEditContentButton', [
|
||||
'value' => 'Contenu',
|
||||
'class' => 'buttonTab',
|
||||
'href' => helper::baseUrl() . 'page/register/content/' . $this->geturl(2)
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
<?php echo template::button('pageEditPositionButton', [
|
||||
<?php echo template::button('PageEditPositionButton', [
|
||||
'value' => 'Menu',
|
||||
'class' => 'buttonTab',
|
||||
'href' => helper::baseUrl() . 'page/register/position/' . $this->geturl(2)
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
<?php echo template::button('pageEditExtensionButton', [
|
||||
'value' => 'Extension',
|
||||
'class' => 'buttonTab',
|
||||
'href' => helper::baseUrl() . 'page/register/extension/' . $this->geturl(2)
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
<?php echo template::button('pageEditLayoutButton', [
|
||||
'value' => 'Mise en page',
|
||||
'class' => 'buttonTab',
|
||||
'href' => helper::baseUrl() . 'page/register/layout/' . $this->geturl(2)
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
<?php echo template::button('pageEditPermissionButton', [
|
||||
'value' => 'Permission',
|
||||
'class' => 'buttonTab',
|
||||
'href' => helper::baseUrl() . 'page/register/permission/' . $this->geturl(2)
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
</div>
|
||||
|
||||
@ -60,8 +67,12 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Titres'); ?>
|
||||
<h4><?php echo helper::translate('Titres'); ?>
|
||||
<!--<span id="infoHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/informations-generales" 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="col8">
|
||||
@ -98,7 +109,7 @@
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('pageEditContent', [
|
||||
'class' => 'editorWysiwyg',
|
||||
'value' => $this->getPage($this->getUrl(2), self::$siteContent)
|
||||
'value' => $this->getPage($this->getUrl(2), self::$i18nContent)
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -108,8 +119,12 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Emplacement dans le menu'); ?>
|
||||
<h4><?php echo helper::translate('Emplacement dans le menu'); ?>
|
||||
<!--<span id="positionHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/emplacement-dans-le-menu" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
||||
</a>
|
||||
</span>-->
|
||||
</h4>
|
||||
<div class="blockContainer">
|
||||
<div class="row">
|
||||
@ -120,11 +135,11 @@
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php if ($this->getHierarchy($this->getUrl(2), false)): ?>
|
||||
<?php if ($this->getHierarchy($this->getUrl(2), false)) : ?>
|
||||
<?php echo template::hidden('pageEditParentPageId', [
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
|
||||
]); ?>
|
||||
<?php else: ?>
|
||||
<?php else : ?>
|
||||
<?php echo template::select('pageEditParentPageId', $module::$pagesNoParentId, [
|
||||
'label' => 'Page parent',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
|
||||
@ -133,7 +148,7 @@
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('pageEditExtraPosition', $module::$extraPosition, [
|
||||
'label' => 'Emplacement',
|
||||
'label' => 'Emplacement :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'extraPosition']),
|
||||
'help' => 'Le menu accessoire est aligné à droite de la barre de menu, c\'est un emplacement réservé aux drapeaux et au bouton de connexion.'
|
||||
]); ?>
|
||||
@ -159,8 +174,12 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Options avancées'); ?>
|
||||
<h4><?php echo helper::translate('Options avancées'); ?>
|
||||
<!--<span id="advancedHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/options-d-emplacement-avancee" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
||||
</a>
|
||||
</span>-->
|
||||
</h4>
|
||||
<div class="blockContainer">
|
||||
<div class="row">
|
||||
@ -175,8 +194,7 @@
|
||||
'help' => 'Sélectionnez une image ou une icône de petite dimension',
|
||||
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
|
||||
'label' => 'Icône',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl']),
|
||||
'folder' => $this->getData(['page', $this->getUrl(2), 'iconUrl']) ? dirname($this->getData(['page', $this->getUrl(2), 'iconUrl'])) : '',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -203,8 +221,7 @@
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Module'); ?>
|
||||
<h4><?php echo helper::translate('Module'); ?>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col10">
|
||||
@ -241,9 +258,7 @@
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Contenu avancé'); ?>
|
||||
</h4>
|
||||
<h4><?php echo helper::translate('Contenu avancé');?></h4>
|
||||
<div class="row">
|
||||
<div class="col6 offset3">
|
||||
<?php echo template::button('pageEditCssEditor', [
|
||||
@ -271,8 +286,12 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Mise en page'); ?>
|
||||
<h4><?php echo helper::translate('Mise en page'); ?>
|
||||
<!--<span id="layoutHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/mise-en-page-2" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
||||
</a>
|
||||
</span>-->
|
||||
</h4>
|
||||
<div class="blockContainer">
|
||||
<div class="row">
|
||||
@ -289,21 +308,21 @@
|
||||
</div>
|
||||
<div class="col6">
|
||||
<!-- Sélection des barres latérales -->
|
||||
<?php if ($this->getHierarchy($this->getUrl(2), false, true)): ?>
|
||||
<?php if ($this->getHierarchy($this->getUrl(2), false, true)) : ?>
|
||||
<?php echo template::hidden('pageEditBarLeft', [
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'barLeft'])
|
||||
]); ?>
|
||||
<?php else: ?>
|
||||
<?php else : ?>
|
||||
<?php echo template::select('pageEditBarLeft', $module::$pagesBarId, [
|
||||
'label' => 'Barre latérale gauche :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'barLeft'])
|
||||
]); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->getHierarchy($this->getUrl(2), false, true)): ?>
|
||||
<?php if ($this->getHierarchy($this->getUrl(2), false, true)) : ?>
|
||||
<?php echo template::hidden('pageEditBarRight', [
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'barRight'])
|
||||
]); ?>
|
||||
<?php else: ?>
|
||||
<?php else : ?>
|
||||
<?php echo template::select('pageEditBarRight', $module::$pagesBarId, [
|
||||
'label' => 'Barre latérale droite :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'barRight'])
|
||||
@ -316,26 +335,6 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row navSelect">
|
||||
<div class="col4">
|
||||
<?php echo template::select('pageEditNavLeft', $module::$navIconPosition, [
|
||||
'label' => 'Bouton de navigation gauche',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'navLeft']),
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('pageEditNavTemplate', $module::$navIconTemplate, [
|
||||
'label' => 'Modèle',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'navTemplate']),
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('pageEditNavRight', $module::$navIconPosition, [
|
||||
'label' => 'Bouton de navigation droit',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'navRight']),
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -346,38 +345,21 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Permission et référencement'); ?>
|
||||
<h4><?php echo helper::translate('Permission et référencement');?>
|
||||
<!--<span id="seoHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/permission-et-referencement" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php //echo template::ico('help', ['margin' => 'left']); ?>
|
||||
</a>
|
||||
</span>-->
|
||||
</h4>
|
||||
<div class="blockContainer">
|
||||
<div class="row">
|
||||
<div class='col6'>
|
||||
<?php echo template::select('pageEditGroup', self::$groupPublics, [
|
||||
'label' => 'Groupe minimal pour accéder à la page',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'group']),
|
||||
'help' => 'Les groupes de niveau supérieur accèdent à la page.'
|
||||
'label' => 'Groupe requis pour accéder à la page :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'group'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="pageEditGroupProfil displayNone"
|
||||
id="pageEditGroupProfil<?php echo self::GROUP_MEMBER; ?>">
|
||||
<?php echo template::select('pageEditProfil' . self::GROUP_MEMBER, $module::$userProfils[self::GROUP_MEMBER], [
|
||||
'label' => 'Profil minimal pour accéder à la page',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'profil']),
|
||||
'help' => 'Les profils de niveau supérieur accèdent à la page.',
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="pageEditGroupProfil displayNone"
|
||||
id="pageEditGroupProfil<?php echo self::GROUP_EDITOR; ?>">
|
||||
<?php echo template::select('pageEditProfil' . self::GROUP_EDITOR, $module::$userProfils[self::GROUP_EDITOR], [
|
||||
'label' => 'Profil minimal pour accéder à la page',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'profil']),
|
||||
'help' => 'Les profils de niveau supérieur accèdent à la page.',
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class='col12'>
|
||||
<?php echo template::text('pageEditMetaTitle', [
|
||||
'label' => 'Méta-titre',
|
||||
@ -395,4 +377,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo template::formClose(); ?>
|
@ -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/
|
||||
*/
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="col1">
|
||||
<?php echo template::button('pageJsEditorBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2) . '/' . self::$siteContent,
|
||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2),
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
@ -12,9 +12,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo helper::translate('Ne pas saisir les balises') . htmlentities(' <script></script>'); ?>
|
||||
</div>
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('pageJsEditorContent', [
|
||||
'value' => is_null($this->getData(['page', $this->getUrl(2), 'js'])) ? '' : $this->getData(['page', $this->getUrl(2), 'js']),
|
||||
'value' => empty($this->getData(['page', $this->getUrl(2), 'js'])) ? '' : $this->getData(['page', $this->getUrl(2), 'js']),
|
||||
'class' => 'editor'
|
||||
]); ?>
|
||||
</div>
|
||||
|
@ -9,8 +9,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/
|
||||
*/
|
||||
|
||||
@ -20,19 +20,19 @@ class plugin extends common
|
||||
public static $actions = [
|
||||
'index' => self::GROUP_ADMIN,
|
||||
'delete' => self::GROUP_ADMIN,
|
||||
'save' => self::GROUP_ADMIN,
|
||||
'save' => self::GROUP_ADMIN, // Sauvegarde le module dans un fichier ZIP ou dans le gestionnaire
|
||||
'dataExport' => self::GROUP_ADMIN, // Fonction muette d'exportation
|
||||
'dataImport' => self::GROUP_ADMIN, // les données d'un module
|
||||
'dataDelete' => self::GROUP_ADMIN,
|
||||
'store' => self::GROUP_ADMIN,
|
||||
//'item' => self::GROUP_ADMIN,
|
||||
// détail d'un objet
|
||||
'upload' => self::GROUP_ADMIN,
|
||||
// Téléverser catalogue
|
||||
'item' => self::GROUP_ADMIN, // détail d'un objet
|
||||
'upload' => self::GROUP_ADMIN, // Téléverser catalogue
|
||||
'uploadItem' => self::GROUP_ADMIN // Téléverser par archive
|
||||
];
|
||||
|
||||
// URL des modules
|
||||
const BASEURL_STORE = 'https://store.zwiicms.fr/';
|
||||
const MODULE_STORE = '?modules/';
|
||||
|
||||
const MODULE_STORE = 'modules/';
|
||||
|
||||
// Gestion des modules
|
||||
public static $modulesData = [];
|
||||
@ -51,34 +51,33 @@ class plugin extends common
|
||||
|
||||
|
||||
/*
|
||||
* Effacement d'un module installé et non utilisé
|
||||
*/
|
||||
* Effacement d'un module installé et non utilisé
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
|
||||
// Action interdite
|
||||
if ($this->getUser('permission', __CLASS__, __FUNCTION__) !== true) {
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(3) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
'state' => false,
|
||||
'notification' => helper::translate('Action interdite')
|
||||
]);
|
||||
} else {
|
||||
// Suppression des dossiers
|
||||
$infoModules = helper::getModules();
|
||||
$module = $this->getUrl(2);
|
||||
//Liste des dossiers associés au module non effacés
|
||||
if (
|
||||
is_dir('./module/' . $module) &&
|
||||
$this->deleteDir('./module/' . $module) === true
|
||||
) {
|
||||
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'])
|
||||
) {
|
||||
$s = $this->deleteDir($infoModules[$this->getUrl(2)]['dataDirectory']);
|
||||
$notification = $s === false ? sprintf(helper::translate('Le module %s est désinstallé, il reste peut-être des données dans %s'), $module, $infoModules[$this->getUrl(2)]['dataDirectory']) : $notification;
|
||||
$notification = sprintf(helper::translate('Le module %s est désinstallé, il reste peut-être des données dans %s'), $module, $infoModules[$this->getUrl(2)]['dataDirectory']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -131,7 +130,7 @@ class plugin extends common
|
||||
$module = json_decode(file_get_contents(self::TEMP_DIR . $tempFolder . 'enum.json'), true);
|
||||
} else {
|
||||
// Message de retour
|
||||
$this->deleteDir(self::TEMP_DIR . $tempFolder);
|
||||
$this->removeDir(self::TEMP_DIR . $tempFolder);
|
||||
$zip->close();
|
||||
return ([
|
||||
'success' => false,
|
||||
@ -146,7 +145,7 @@ class plugin extends common
|
||||
// Vérification de la présence des dossier décrits
|
||||
if (!is_dir(self::TEMP_DIR . $tempFolder . $src)) {
|
||||
// Message de retour
|
||||
$this->deleteDir(self::TEMP_DIR . $tempFolder);
|
||||
$this->removeDir(self::TEMP_DIR . $tempFolder);
|
||||
$zip->close();
|
||||
return ([
|
||||
'success' => false,
|
||||
@ -156,7 +155,7 @@ class plugin extends common
|
||||
// Interdire l'écriture dans le dossier core
|
||||
if (strstr($dest, 'core') !== false) {
|
||||
// Message de retour
|
||||
$this->deleteDir(self::TEMP_DIR . $tempFolder);
|
||||
$this->removeDir(self::TEMP_DIR . $tempFolder);
|
||||
$zip->close();
|
||||
return ([
|
||||
'success' => false,
|
||||
@ -171,7 +170,7 @@ class plugin extends common
|
||||
*/
|
||||
if (!file_exists(self::TEMP_DIR . $tempFolder . $module['name'] . '.php')) {
|
||||
// Message de retour
|
||||
$this->deleteDir(self::TEMP_DIR . $tempFolder);
|
||||
$this->removeDir(self::TEMP_DIR . $tempFolder);
|
||||
$zip->close();
|
||||
return ([
|
||||
'success' => false,
|
||||
@ -184,7 +183,7 @@ class plugin extends common
|
||||
* Le module est-il déjà installé ?
|
||||
* Si oui lire le numéro de version et le stocker dans $versionInstalled
|
||||
*/
|
||||
if (is_file(self::MODULE_DIR . $module['name'] . '/' . $module['name'] . '.php')) {
|
||||
if (is_file(self::MODULE_DIR . $module['name'] . '/' . $module['name'] . '.php')) {
|
||||
$c = helper::getModules();
|
||||
if (array_key_exists($module['name'], $c)) {
|
||||
$versionInstalled = $c[$module['name']]['version'];
|
||||
@ -204,7 +203,7 @@ class plugin extends common
|
||||
$installOk = true;
|
||||
} else {
|
||||
// Message de retour
|
||||
$this->deleteDir(self::TEMP_DIR . $tempFolder);
|
||||
$this->removeDir(self::TEMP_DIR . $tempFolder);
|
||||
$zip->close();
|
||||
return ([
|
||||
'success' => false,
|
||||
@ -219,33 +218,29 @@ class plugin extends common
|
||||
// Copie du module
|
||||
$success = $this->copyDir(self::TEMP_DIR . $tempFolder, self::MODULE_DIR . $module['name']);
|
||||
// Copie récursive des dossiers externes
|
||||
if (is_array($module['dataDirectory'])) {
|
||||
foreach ($module['dataDirectory'] as $src => $dest) {
|
||||
if (!is_dir(self::TEMP_DIR . $tempFolder . $src)) {
|
||||
mkdir(self::TEMP_DIR . $tempFolder . $src);
|
||||
}
|
||||
$success = $success || $this->copyDir(self::TEMP_DIR . $tempFolder . $src, $dest);
|
||||
foreach ($module['dirs'] as $src => $dest) {
|
||||
if (!is_dir(self::TEMP_DIR . $tempFolder . $src)) {
|
||||
mkdir(self::TEMP_DIR . $tempFolder . $src);
|
||||
}
|
||||
$success = $success && $this->copyDir(self::TEMP_DIR . $tempFolder . $src, $dest);
|
||||
}
|
||||
// Message de retour
|
||||
$t = isset($versionInstalled) ? helper::translate('actualisé') : helper::translate('installé');
|
||||
$this->deleteDir(self::TEMP_DIR . $tempFolder);
|
||||
$this->removeDir(self::TEMP_DIR . $tempFolder);
|
||||
$zip->close();
|
||||
return ([
|
||||
'success' => $success,
|
||||
'notification' => $success
|
||||
? sprintf(helper::translate('Le module %s a été %s'), $module['name'], $t)
|
||||
: helper::translate('Erreur inconnue, le module n\'est pas installé')
|
||||
'notification' => $success ? sprintf(helper::translate('Le module %s a été %s'), $module['name'], $t)
|
||||
: helper::translate('Erreur inconnue, le module n\'est pas installé')
|
||||
]);
|
||||
} else {
|
||||
// Supprimer le dossier temporaire
|
||||
$this->deleteDir(self::TEMP_DIR . $tempFolder);
|
||||
$zip->close();
|
||||
return ([
|
||||
'success' => false,
|
||||
'notification' => helper::translate('Erreur inconnue, le module n\'est pas installé')
|
||||
]);
|
||||
|
||||
// Supprimer le dossier temporaire
|
||||
$this->removeDir(self::TEMP_DIR . $tempFolder);
|
||||
$zip->close();
|
||||
}
|
||||
} else {
|
||||
// Message de retour
|
||||
@ -262,14 +257,10 @@ class plugin extends common
|
||||
public function upload()
|
||||
{
|
||||
// Soumission du formulaire
|
||||
|
||||
if (
|
||||
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
|
||||
$this->isPost()
|
||||
) {
|
||||
if ($this->isPost()) {
|
||||
// Installation d'un module
|
||||
$checkValidMaj = $this->getInput('configModulesCheck', helper::FILTER_BOOLEAN);
|
||||
$zipFilename = $this->getInput('configModulesInstallation', helper::FILTER_STRING_SHORT);
|
||||
$zipFilename = $this->getInput('configModulesInstallation', helper::FILTER_STRING_SHORT);
|
||||
if ($zipFilename !== '') {
|
||||
$state = $this->install(self::FILE_DIR . 'source/' . $zipFilename, $checkValidMaj);
|
||||
}
|
||||
@ -291,11 +282,13 @@ class plugin extends common
|
||||
*/
|
||||
public function uploadItem()
|
||||
{
|
||||
// Action interdite
|
||||
if ($this->getUser('permission', __CLASS__, __FUNCTION__) !== true) {
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(3) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
'redirect' => helper::baseUrl() . 'store',
|
||||
'state' => false,
|
||||
'notification' => helper::translate('Action interdite')
|
||||
]);
|
||||
} else {
|
||||
// Récupérer le module en ligne
|
||||
@ -314,7 +307,7 @@ class plugin extends common
|
||||
mkdir(self::FILE_DIR . 'source/modules', 0755);
|
||||
}
|
||||
// Sauver les données du fichiers
|
||||
$this->secure_file_put_contents(self::FILE_DIR . 'source/modules/' . $moduleFile, $moduleData);
|
||||
file_put_contents(self::FILE_DIR . 'source/modules/' . $moduleFile, $moduleData);
|
||||
|
||||
// Installation directe
|
||||
if (file_exists(self::FILE_DIR . 'source/modules/' . $moduleFile)) {
|
||||
@ -325,12 +318,11 @@ class plugin extends common
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin/store',
|
||||
'redirect' => helper::baseUrl() . 'plugin/store',
|
||||
'notification' => $r['notification'],
|
||||
'state' => $r['success']
|
||||
]);
|
||||
}
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Catalogue de modules'),
|
||||
@ -344,20 +336,16 @@ class plugin extends common
|
||||
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::arrayColumn($this->getData(['page']), 'moduleId', 'SORT_DESC');
|
||||
|
||||
foreach ($inPages as $key => $value) {
|
||||
$pagesInfos[$this->getData(['page', $key, 'title'])] = $value;
|
||||
}
|
||||
// Parcourir les données des modules
|
||||
foreach ($store as $key => $value) {
|
||||
if (empty($key)) {
|
||||
continue;
|
||||
}
|
||||
$pageInfos = array_keys($inPages, $key);
|
||||
// Module non installé
|
||||
$ico = template::ico('download');
|
||||
$class = '';
|
||||
@ -369,20 +357,20 @@ class plugin extends common
|
||||
$help = 'Mettre à jour le module orphelin';
|
||||
}
|
||||
// Le module est installé et utilisé
|
||||
if (in_array($key, $inPages) === true) {
|
||||
if (array_key_exists($key, $inPages) === true) {
|
||||
$class = 'buttonRed';
|
||||
$ico = template::ico('update');
|
||||
$ico = template::ico('update');
|
||||
$help = 'Mettre à jour le module attaché, une sauvegarde des données de module est recommandée !';
|
||||
}
|
||||
self::$storeList[] = [
|
||||
$store[$key]['category'],
|
||||
'<a href="' . self::BASEURL_STORE . self::MODULE_STORE . $key . '" target="_blank" >' . $store[$key]['title'] . '</a>',
|
||||
$store[$key]['version'],
|
||||
helper::dateUTF8('%d %B %Y', $store[$key]['versionDate'], self::$i18nUI),
|
||||
implode(' - ', $pageInfos),
|
||||
helper::dateUTF8('%d %B %Y', $store[$key]['versionDate']),
|
||||
implode(', ', array_keys($pagesInfos, $key)),
|
||||
template::button('moduleExport' . $key, [
|
||||
'class' => $class,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/uploadItem/' . $key,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/uploadItem/' . $key . '/' . $_SESSION['csrf'], // appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => $ico,
|
||||
'help' => $help
|
||||
])
|
||||
@ -404,7 +392,7 @@ class plugin extends common
|
||||
{
|
||||
$store = json_decode(helper::getUrlContents(self::BASEURL_STORE . self::MODULE_STORE . 'list'), true);
|
||||
self::$storeItem = $store[$this->getUrl(2)];
|
||||
self::$storeItem['fileDate'] = helper::dateUTF8('%d %B %Y', self::$storeItem['fileDate'], self::$i18nUI);
|
||||
self::$storeItem['fileDate'] = helper::dateUTF8('%d %B %Y', self::$storeItem['fileDate']);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Module ' . self::$storeItem['title']),
|
||||
@ -412,30 +400,16 @@ class plugin extends common
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne le contenu du store en ligne
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getStore() {
|
||||
$store = json_decode(helper::getUrlContents(self::BASEURL_STORE . self::MODULE_STORE . 'list'), true);
|
||||
return $store;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des modules
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$i18nSites = [];
|
||||
// Tableau des langues rédigées
|
||||
foreach (self::$languages as $key => $value) {
|
||||
// tableau des langues installées
|
||||
if (
|
||||
is_dir(self::DATA_DIR . $key)
|
||||
&& file_exists(self::DATA_DIR . $key . '/page.json')
|
||||
&& file_exists(self::DATA_DIR . $key . '/module.json')
|
||||
) {
|
||||
if (is_dir(self::DATA_DIR . $key)) {
|
||||
$i18nSites[$key] = $value;
|
||||
}
|
||||
}
|
||||
@ -445,11 +419,10 @@ class plugin extends common
|
||||
|
||||
// Parcourir les langues du site traduit et recherche les modules affectés à des pages
|
||||
$pagesInfos = [];
|
||||
|
||||
foreach ($i18nSites as $keyi18n => $valuei18n) {
|
||||
|
||||
// Clés moduleIds dans les pages de la langue
|
||||
$pages = json_decode(file_get_contents(self::DATA_DIR . $keyi18n . '/page.json'), true);
|
||||
$pages = json_decode(file_get_contents(self::DATA_DIR . $keyi18n . '/' . 'page.json'), true);
|
||||
|
||||
// Extraire les clés des modules
|
||||
$pagesModules[$keyi18n] = array_filter(helper::arrayColumn($pages['page'], 'moduleId', 'SORT_DESC'), 'strlen');
|
||||
@ -457,6 +430,7 @@ class plugin extends common
|
||||
// Générer la liste des pages avec module de la langue par défaut
|
||||
foreach ($pagesModules[$keyi18n] as $key => $value) {
|
||||
if (!empty($value)) {
|
||||
|
||||
$pagesInfos[$keyi18n][$key]['pageId'] = $key;
|
||||
$pagesInfos[$keyi18n][$key]['title'] = $pages['page'][$key]['title'];
|
||||
$pagesInfos[$keyi18n][$key]['moduleId'] = $value;
|
||||
@ -487,13 +461,13 @@ class plugin extends common
|
||||
$infoModules[$key]['version'],
|
||||
'',
|
||||
$infoModules[$key]['delete'] === true
|
||||
? template::button('moduleDelete' . $key, [
|
||||
'class' => 'moduleDelete buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $key,
|
||||
'value' => template::ico('trash'),
|
||||
'help' => 'Supprimer le module'
|
||||
])
|
||||
: '',
|
||||
? template::button('moduleDelete' . $key, [
|
||||
'class' => 'moduleDelete buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $key . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('trash'),
|
||||
'help' => 'Supprimer le module'
|
||||
])
|
||||
: '',
|
||||
|
||||
];
|
||||
}
|
||||
@ -510,12 +484,12 @@ class plugin extends common
|
||||
$infoModules[$key]['version'],
|
||||
'',
|
||||
template::button('moduleSave' . $key, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/save/filemanager/' . $key,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/save/filemanager/' . $key . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('download-cloud'),
|
||||
'help' => 'Sauvegarder le module dans le gestionnaire de fichiers'
|
||||
]),
|
||||
template::button('moduleDownload' . $key, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/save/download/' . $key,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/save/download/' . $key . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('download'),
|
||||
'help' => 'Sauvegarder et télécharger le module'
|
||||
])
|
||||
@ -539,22 +513,19 @@ class plugin extends common
|
||||
self::$modulesData[] = [
|
||||
$infoModules[$pagesInfos[$keyi18n][$keyPage]['moduleId']]['realName'] . ' (' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . ')',
|
||||
$infoModules[$pagesInfos[$keyi18n][$keyPage]['moduleId']]['version'],
|
||||
template::flag($keyi18n, '20px') . ' <a href ="' . helper::baseUrl() . $keyPage . '" target="_blank">' . $pagesInfos[$keyi18n][$keyPage]['title'] . ' (' . $keyPage . ')</a>',
|
||||
template::flag($keyi18n, '20px') . ' <a href ="' . helper::baseUrl() . $keyPage . '" target="_blank">' . $pagesInfos[$keyi18n][$keyPage]['title'] . ' (' . $keyPage . ')</a>',
|
||||
template::button('dataExport' . $keyPage, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$siteContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
|
||||
// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage . '/' . $_SESSION['csrf'], // appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('download-cloud'),
|
||||
'help' => 'Sauvegarder les données du module dans le gestionnaire de fichiers'
|
||||
]),
|
||||
template::button('dataExport' . $keyPage, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$siteContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
|
||||
// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage . '/' . $_SESSION['csrf'], // appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('download'),
|
||||
'help' => 'Sauvegarder et télécharger les données du module'
|
||||
]),
|
||||
template::button('dataDelete' . $keyPage, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$siteContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
|
||||
// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage . '/' . $_SESSION['csrf'], // appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('trash'),
|
||||
'class' => 'buttonRed dataDelete',
|
||||
'help' => 'Détacher le module de la page',
|
||||
@ -566,9 +537,6 @@ class plugin extends common
|
||||
}
|
||||
}
|
||||
|
||||
// Désactive l'icône rouge
|
||||
$this->setData(['core', 'updateModuleAvailable', false]);
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Gestion des modules'),
|
||||
@ -582,15 +550,18 @@ class plugin extends common
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
// Action interdite
|
||||
if ($this->getUser('permission', __CLASS__, __FUNCTION__) !== true) {
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(4) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
'state' => false,
|
||||
'notification' => helper::translate('Action interdite')
|
||||
]);
|
||||
} else {
|
||||
|
||||
// Créer un dossier temporaire
|
||||
$tmpFolder = self::TEMP_DIR . uniqid() . '/';
|
||||
$tmpFolder = self::TEMP_DIR . uniqid();
|
||||
if (!is_dir($tmpFolder)) {
|
||||
mkdir($tmpFolder, 0755);
|
||||
}
|
||||
@ -600,43 +571,272 @@ class plugin extends common
|
||||
|
||||
// Descripteur de l'archive
|
||||
$infoModule = helper::getModules();
|
||||
|
||||
//Nom de l'archive
|
||||
$fileName = $moduleId . str_replace('.', '-', $infoModule[$moduleId]['version']) . '.zip';
|
||||
$fileName = $moduleId . $infoModule[$moduleId]['version'] . '.zip';
|
||||
|
||||
// Régénération du descripteur du module
|
||||
file_put_contents(self::MODULE_DIR . $moduleId . '/enum.json', json_encode($infoModule[$moduleId], JSON_UNESCAPED_UNICODE));
|
||||
// Régénération du module
|
||||
$success = file_put_contents(self::MODULE_DIR . $moduleId . '/enum.json', json_encode($infoModule[$moduleId]));
|
||||
|
||||
// Construire l'archive
|
||||
$this->makeZip($tmpFolder . $fileName, self::MODULE_DIR . $moduleId);
|
||||
$this->makeZip(self::TEMP_DIR . $fileName, self::MODULE_DIR . $moduleId);
|
||||
|
||||
switch ($action) {
|
||||
case 'filemanager':
|
||||
if (is_dir(self::FILE_DIR . 'source/modules') === false) {
|
||||
if (!file_exists(self::FILE_DIR . 'source/modules')) {
|
||||
mkdir(self::FILE_DIR . 'source/modules');
|
||||
}
|
||||
$success = copy($tmpFolder . $fileName, self::FILE_DIR . 'source/modules/' . $fileName);
|
||||
$success = $success && copy(self::TEMP_DIR . $fileName, self::FILE_DIR . 'source/modules/' . $moduleId . '.zip');
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
'notification' => $success ? helper::translate('Archive copiée dans le dossier Modules du gestionnaire de fichier') : helper::translate('Erreur de copie'),
|
||||
'state' => $success
|
||||
]);
|
||||
// Nettoyage
|
||||
unlink(self::TEMP_DIR . $fileName);
|
||||
$this->removeDir($tmpFolder);
|
||||
break;
|
||||
case 'download':
|
||||
// Téléchargement du ZIP
|
||||
header('Content-Description: File Transfer');
|
||||
default:
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Content-Disposition: attachment; filename="' . $fileName . '"');
|
||||
header('Content-Length: ' . filesize($tmpFolder . $fileName));
|
||||
readfile($tmpFolder . $fileName);
|
||||
header('Content-Length: ' . filesize(self::TEMP_DIR . $fileName));
|
||||
ob_clean();
|
||||
ob_end_flush();
|
||||
readfile(self::TEMP_DIR . $fileName);
|
||||
// Nettoyage
|
||||
unlink(self::TEMP_DIR . $fileName);
|
||||
$this->removeDir($tmpFolder);
|
||||
exit();
|
||||
}
|
||||
// Nettoyage
|
||||
unlink(self::TEMP_DIR . $fileName);
|
||||
$this->deleteDir($tmpFolder);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Détacher un module d'une page en supprimant les données du module
|
||||
* 2 : i18n id
|
||||
* 3 : moduleId
|
||||
* 4 : pageId
|
||||
* 5 : CSRF
|
||||
*/
|
||||
public function dataDelete()
|
||||
{
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(5) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
'state' => false,
|
||||
'notification' => helper::translate('Action interdite')
|
||||
]);
|
||||
} else {
|
||||
$this->setData(['page', $this->getUrl(4), 'moduleId', '']);
|
||||
$this->deleteData(['module', $this->getUrl(4)]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
'notification' => sprintf(helper::translate('Le module %s de la page %s a été supprimé'), $this->getUrl(3), $this->getUrl(4)),
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Export des données d'un module
|
||||
* Structure de l'adresse reçue
|
||||
* 2 : i18n id
|
||||
* 3 : moduleId
|
||||
* 4 : pageId
|
||||
* 5 : CSRF
|
||||
*/
|
||||
public function dataExport()
|
||||
{
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(6) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
'state' => false,
|
||||
'notification' => helper::translate('Action interdite')
|
||||
]);
|
||||
} else {
|
||||
|
||||
// Créer un dossier temporaire
|
||||
$tmpFolder = self::TEMP_DIR . uniqid();
|
||||
if (!is_dir($tmpFolder)) {
|
||||
mkdir($tmpFolder, 0755);
|
||||
}
|
||||
|
||||
$action = $this->getUrl(2);
|
||||
$lang = $this->getUrl(3);
|
||||
$moduleId = $this->getUrl(4);
|
||||
$pageId = $this->getUrl(5);
|
||||
|
||||
// DOnnèes du module de la page sléectionnée
|
||||
$moduleData = $this->getData(['module', $pageId]);
|
||||
|
||||
// Descripteur du module
|
||||
$infoModules = helper::getModules();
|
||||
$infoModule = $infoModules[$moduleId];
|
||||
|
||||
// Copier les données et le descripteur
|
||||
$success = file_put_contents($tmpFolder . '/module.json', json_encode($moduleData)) === false ? false : true;
|
||||
|
||||
$success = $success && is_int(file_put_contents($tmpFolder . '/enum.json', json_encode([$moduleId => $infoModule])));
|
||||
// Le dossier du module s'il existe
|
||||
if (is_dir(self::DATA_DIR . $moduleId . '/' . $pageId)) {
|
||||
// Copier le dossier des données
|
||||
$success = $success && $this->copyDir(self::DATA_DIR . '/' . $moduleId . '/' . $pageId, $tmpFolder . '/dataDirectory');
|
||||
}
|
||||
|
||||
// Création du zip
|
||||
$fileName = $lang . '-' . $moduleId . '-' . $pageId . '.zip';
|
||||
$this->makeZip(self::TEMP_DIR . $fileName, $tmpFolder);
|
||||
|
||||
// Gestin de l'action
|
||||
if ($success) {
|
||||
switch ($action) {
|
||||
case 'filemanager':
|
||||
if (!file_exists(self::FILE_DIR . 'source/modules')) {
|
||||
mkdir(self::FILE_DIR . 'source/modules');
|
||||
}
|
||||
if (file_exists(self::TEMP_DIR . $fileName)) {
|
||||
$success = $success && copy(self::TEMP_DIR . $fileName, self::FILE_DIR . 'source/modules/data' . $moduleId . '.zip');
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
'notification' => $success ? helper::translate('Données copiées dans le dossier Module du gestionnaire de fichier') : helper::translate('Erreur de copie'),
|
||||
'state' => $success
|
||||
]);
|
||||
// Nettoyage
|
||||
unlink(self::TEMP_DIR . $fileName);
|
||||
$this->removeDir($tmpFolder);
|
||||
}
|
||||
break;
|
||||
case 'download':
|
||||
default:
|
||||
if (file_exists(self::TEMP_DIR . $fileName)) {
|
||||
ob_start();
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Disposition: attachment; filename="' . self::TEMP_DIR . $fileName . '"');
|
||||
header('Content-Length: ' . filesize(self::TEMP_DIR . $fileName));
|
||||
ob_clean();
|
||||
ob_end_flush();
|
||||
readfile(self::TEMP_DIR . $fileName);
|
||||
unlink(self::TEMP_DIR . $fileName);
|
||||
$this->removeDir($tmpFolder);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
'notification' => helper::translate('Erreur inconnue'),
|
||||
'state' => false
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Importer des données d'un module externes ou interne à module.json
|
||||
*/
|
||||
public function dataImport()
|
||||
{
|
||||
|
||||
// Soumission du formulaire d'importation du module dans une page libre
|
||||
if ($this->isPost()) {
|
||||
// Récupérer le fichier et le décompacter
|
||||
$zipFilename = $this->getInput('pluginImportFile', helper::FILTER_STRING_SHORT, true);
|
||||
$pageId = $this->getInput('pluginImportPage', null, true);
|
||||
$tmpFolder = uniqid();
|
||||
|
||||
// Extraction dans un dossier temporaire
|
||||
mkdir(self::TEMP_DIR . $tmpFolder, 0755);
|
||||
$zip = new ZipArchive();
|
||||
if ($zip->open(self::FILE_DIR . 'source/' . $zipFilename) === TRUE) {
|
||||
$zip->extractTo(self::TEMP_DIR . $tmpFolder);
|
||||
}
|
||||
|
||||
// Lire le descripteur
|
||||
$descripteur = json_decode(file_get_contents(self::TEMP_DIR . $tmpFolder . '/enum.json'), true);
|
||||
$moduleId = array_key_first($descripteur);
|
||||
|
||||
// Lecture des données du module
|
||||
$moduleData = json_decode(file_get_contents(self::TEMP_DIR . $tmpFolder . '/module.json'), true);
|
||||
|
||||
// Chargement des données du module importé
|
||||
$this->setData(['module', $pageId, $moduleData]);
|
||||
|
||||
// Intégration des données du module importé dans la page
|
||||
$this->setData(['page', $pageId, 'moduleId', $moduleId]);
|
||||
|
||||
// Copie des fichiers d'accompagnement
|
||||
// Le dossier du module s'il existe
|
||||
if (is_dir($tmpFolder . '/dataDirectory')) {
|
||||
// Copier le dossier des données
|
||||
$this->copyDir($tmpFolder . '/dataDirectory', self::DATA_DIR . '/' . $moduleId . '/' . $pageId);
|
||||
}
|
||||
|
||||
// Supprimer le dossier temporaire
|
||||
$this->removeDir(self::TEMP_DIR . $tmpFolder);
|
||||
$zip->close();
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
'state' => true,
|
||||
'notification' => helper::translate('Données importées')
|
||||
]);
|
||||
}
|
||||
// Bouton d'importation des données d'un module spécifique
|
||||
if (count(explode('/', $this->getUrl())) === 6) {
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(3) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
'state' => false,
|
||||
'notification' => helper::translate('Action interdite')
|
||||
]);
|
||||
}
|
||||
|
||||
// Traitement
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
'state' => true,
|
||||
'notification' => helper::translate('Données importées')
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Liste des pages sans module
|
||||
* et ne sont pas des barres latérales
|
||||
*/
|
||||
self::$pagesList = $this->getHierarchy(null, null, null);
|
||||
foreach (self::$pagesList as $page => $value) {
|
||||
if (
|
||||
$this->getData(['page', $page, 'block']) === 'bar' ||
|
||||
//$this->getData(['page',$page,'disable']) === true ||
|
||||
$this->getData(['page', $page, 'moduleId']) !== ''
|
||||
) {
|
||||
unset(self::$pagesList[$page]);
|
||||
} else {
|
||||
self::$pagesList[$page] = $page;
|
||||
}
|
||||
}
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Importer des données de module'),
|
||||
'view' => 'dataImport'
|
||||
]);
|
||||
}
|
||||
}
|
@ -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/
|
||||
*/
|
||||
|
37
core/module/plugin/view/dataImport/dataImport.php
Normal file
37
core/module/plugin/view/dataImport/dataImport.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php echo template::formOpen('pluginImportForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<?php echo template::button('pluginImportBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'plugin',
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset9">
|
||||
<?php echo template::submit('pluginImportSubmit', [
|
||||
'value' => 'Appliquer'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4><?php echo helper::translate('Installer les données d\'un module'); ?>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::file('pluginImportFile', [
|
||||
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
|
||||
'label' => 'Archive ZIP',
|
||||
'type' => 2
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::select('pluginImportPage', $module::$pagesList, [
|
||||
'label' => 'Importer dans' . template::flag('selected', '20px')
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -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/
|
||||
*/
|
||||
|
||||
@ -17,3 +17,31 @@
|
||||
* admin.css
|
||||
*/
|
||||
|
||||
|
||||
/* 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: 200px;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
.buttonTab:hover {
|
||||
filter: saturate(200%);
|
||||
}
|
||||
|
||||
.activeButton {
|
||||
background-color: #00BFFF;
|
||||
}
|
||||
|
||||
|
13
core/module/plugin/view/index/index.js.php
Normal file
13
core/module/plugin/view/index/index.js.php
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* 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/
|
||||
*/
|
||||
function setCookie(name,value,days){var expires="";if(days){var date=new Date;date.setTime(date.getTime()+24*days*60*60*1e3),expires="; expires="+date.toUTCString()}document.cookie=name+"="+(value||"")+expires+"; path=/; samesite=lax"}function getCookie(name){for(var nameEQ=name+"=",ca=document.cookie.split(";"),i=0;i<ca.length;i++){for(var c=ca[i];" "==c.charAt(0);)c=c.substring(1,c.length);if(0==c.indexOf(nameEQ))return c.substring(nameEQ.length,c.length)}return null}function capitalizeFirstLetter(string){return string.charAt(0).toUpperCase()+string.slice(1)}$(document).ready((function(){var pluginLayout=getCookie("pluginLayout");null==pluginLayout&&(pluginLayout="module",setCookie("pluginLayout","module")),console.log(pluginLayout),$("#moduleContainer").hide(),$("#dataContainer").hide(),$("#"+pluginLayout+"Container").show(),$("#plugin"+capitalizeFirstLetter(pluginLayout)+"Button").addClass("activeButton")})),$(".moduleDelete").on("click",(function(){var _this=$(this),message_delete="<?php echo helper::translate('Confirmer la désinstallation du module'); ?>";return core.confirm(message_delete,(function(){$(location).attr("href",_this.attr("href"))}))})),$(".dataDelete").on("click",(function(){var _this=$(this),message_unlink="<?php echo helper::translate('Confirmer la dissociation du module de cette page'); ?>";return core.confirm(message_unlink,(function(){$(location).attr("href",_this.attr("href"))}))})),$("#pluginModuleButton").on("click",(function(){$("#dataContainer").hide(),$("#moduleContainer").show(),$("#pluginModuleButton").addClass("activeButton"),$("#pluginDataButton").removeClass("activeButton"),setCookie("pluginLayout","module")})),$("#pluginDataButton").on("click",(function(){$("#moduleContainer").hide(),$("#dataContainer").show(),$("#pluginModuleButton").removeClass("activeButton"),$("#pluginDataButton").addClass("activeButton"),setCookie("pluginLayout","data")}));
|
@ -3,17 +3,17 @@
|
||||
<?php echo template::button('configModulesBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(),
|
||||
'value' => template::ico('home')
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1">
|
||||
<?php /**echo template::button('pluginHelp', [
|
||||
'href' => 'https://doc.zwiicms.fr/gestion-des-modules',
|
||||
'target' => '_blank',
|
||||
'value' => template::ico('help'),
|
||||
'class' => 'buttonHelp',
|
||||
'help' => 'Consulter l\'aide en ligne'
|
||||
]);*/?>
|
||||
'href' => 'https://doc.zwiicms.fr/gestion-des-modules',
|
||||
'target' => '_blank',
|
||||
'value' => template::ico('help'),
|
||||
'class' => 'buttonHelp',
|
||||
'help' => 'Consulter l\'aide en ligne'
|
||||
]);*/ ?>
|
||||
</div>
|
||||
<div class="col1 offset8">
|
||||
<?php echo template::button('pluginModulesStore', [
|
||||
@ -30,31 +30,70 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($module::$modulesInstalled): ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Sauvegarde'); ?>
|
||||
</h4>
|
||||
<?php echo template::table([2, 2, 1, 5, 1, 1], $module::$modulesInstalled, ['Module', 'Identifiant', 'Version', '', '', '']); ?>
|
||||
<div class="tab">
|
||||
<?php echo template::button('pluginModuleButton', [
|
||||
'value' => 'Modules installés',
|
||||
'class' => ' buttonTab'
|
||||
]); ?>
|
||||
<?php echo template::button('pluginDataButton', [
|
||||
'value' => 'Données des modules',
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="tabContent" id="moduleContainer">
|
||||
<?php if ($module::$modulesInstalled) : ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4><?php echo helper::translate('Sauvegarde'); ?>
|
||||
</h4>
|
||||
<?php echo template::table([2, 2, 1, 5, 1, 1], $module::$modulesInstalled, ['Module', 'Identifiant', 'Version', '', '', '']); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php echo template::speech('Aucun module installé.'); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($module::$modulesOrphan): ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Modules orphelins'); ?>
|
||||
</h4>
|
||||
<?php echo template::table([2, 2, 1, 6, 1], $module::$modulesOrphan, ['Module', 'Identifiant', 'Version', '', '']); ?>
|
||||
<?php else : ?>
|
||||
<?php echo template::speech('Aucun module installé.'); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($module::$modulesOrphan) : ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4><?php echo helper::translate('Modules orphelins'); ?>
|
||||
</h4>
|
||||
<?php echo template::table([2, 2, 1, 6, 1], $module::$modulesOrphan, ['Module', 'Identifiant', 'Version', '', '']); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php echo template::speech('Aucun module orphelin.'); ?>
|
||||
<?php endif; ?>
|
||||
<?php else : ?>
|
||||
<?php echo template::speech('Aucun module orphelin.'); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="tabContent displayNone" id="dataContainer">
|
||||
<?php if ($module::$modulesData) : ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>
|
||||
<?php echo helper::translate('Modules configurés'); ?>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col1 offset11">
|
||||
<?php echo template::button('configModuledataImport', [
|
||||
'href' => helper::baseUrl() . 'plugin/dataImport',
|
||||
'value' => template::ico('upload'),
|
||||
"help" => 'Importer des données de module dans une page libre'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::table([4, 1, 4, 1, 1, 1], $module::$modulesData, ['Module', 'Version', 'Page associée', '', '', '']); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php echo template::speech('Aucune donnée de module.'); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
@ -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,7 +21,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12 textAlignCenter">
|
||||
<?php echo helper::translate('date') . ' ' . $module::$storeItem['fileDate']; ?>
|
||||
<?php echo helper::translate('du') . ' ' . $module::$storeItem['fileDate']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@ -35,7 +35,7 @@
|
||||
<div class="row">
|
||||
<div class="col12 textAlignCenter">
|
||||
<span>
|
||||
<?php echo helper::translate('Licence'); ?>
|
||||
<?php echo helper::translate('Licence :'); ?>
|
||||
|
||||
<?php echo $module::$storeItem['fileLicense']; ?>
|
||||
</span>
|
||||
|
@ -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/
|
||||
*/
|
||||
|
||||
|
@ -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/
|
||||
*/
|
||||
|
||||
|
@ -8,8 +8,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/
|
||||
*/
|
||||
|
||||
|
@ -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/
|
||||
*/
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user